From 53562be71d337172fe856dff3e9c7ca37cbe37b0 Mon Sep 17 00:00:00 2001 From: Juntu Chen Date: Wed, 18 Dec 2024 13:31:25 -0500 Subject: [PATCH 01/55] updated OPS outgoing call --- .../src/callAutomationClient.ts | 11 +-- .../generated/src/callAutomationApiClient.ts | 10 +-- .../src/generated/src/index.ts | 8 +-- .../src/generated/src/models/index.ts | 48 ++++++++++++- .../src/generated/src/models/mappers.ts | 69 ++++++++++++++++++- .../src/generated/src/models/parameters.ts | 2 +- .../src/operations/callConnection.ts | 12 ++-- .../generated/src/operations/callDialog.ts | 10 +-- .../src/generated/src/operations/callMedia.ts | 10 +-- .../generated/src/operations/callRecording.ts | 10 +-- .../src/generated/src/operations/index.ts | 8 +-- .../operationsInterfaces/callConnection.ts | 2 +- .../src/operationsInterfaces/callDialog.ts | 2 +- .../src/operationsInterfaces/callMedia.ts | 2 +- .../src/operationsInterfaces/callRecording.ts | 2 +- .../src/operationsInterfaces/index.ts | 8 +-- .../src/models/options.ts | 12 +++- .../swagger/README.md | 2 +- .../test/node/callAutomationClient.spec.ts | 38 +++------- 19 files changed, 180 insertions(+), 86 deletions(-) diff --git a/sdk/communication/communication-call-automation/src/callAutomationClient.ts b/sdk/communication/communication-call-automation/src/callAutomationClient.ts index e869021cdd24..30c8bc630d87 100644 --- a/sdk/communication/communication-call-automation/src/callAutomationClient.ts +++ b/sdk/communication/communication-call-automation/src/callAutomationClient.ts @@ -59,11 +59,6 @@ export interface CallAutomationClientOptions extends CommonClientOptions { * The identifier of the source of the call for call creating/answering/inviting operation. */ sourceIdentity?: CommunicationUserIdentifier; - /** - * The identifier of the One Phone System bot for call creating operation. - * Should be mutually exclusive with sourceIdentity. - */ - opsSourceIdentity?: MicrosoftTeamsAppIdentifier; } /** @@ -80,7 +75,6 @@ const isCallAutomationClientOptions = (options: any): options is CallAutomationC export class CallAutomationClient { private readonly callAutomationApiClient: CallAutomationApiClient; private readonly sourceIdentity?: CommunicationUserIdentifierModel; - private readonly opsSourceIdentity?: MicrosoftTeamsAppIdentifierModel; private readonly credential: TokenCredential | KeyCredential; private readonly internalPipelineOptions: InternalPipelineOptions; private readonly callAutomationEventProcessor: CallAutomationEventProcessor; @@ -143,7 +137,6 @@ export class CallAutomationClient { ); this.sourceIdentity = communicationUserIdentifierModelConverter(options.sourceIdentity); - this.opsSourceIdentity = microsoftTeamsAppIdentifierModelConverter(options.opsSourceIdentity); } /** @@ -262,7 +255,7 @@ export class CallAutomationClient { ): Promise { const request: CreateCallRequest = { source: this.sourceIdentity, - opsSource: this.opsSourceIdentity, + teamsAppSource: microsoftTeamsAppIdentifierModelConverter(options.teamsAppSource), targets: [communicationIdentifierModelConverter(targetParticipant.targetParticipant)], callbackUri: callbackUrl, operationContext: options.operationContext, @@ -295,7 +288,7 @@ export class CallAutomationClient { ): Promise { const request: CreateCallRequest = { source: this.sourceIdentity, - opsSource: this.opsSourceIdentity, + teamsAppSource: microsoftTeamsAppIdentifierModelConverter(options.teamsAppSource), targets: targetParticipants.map((target) => communicationIdentifierModelConverter(target)), callbackUri: callbackUrl, operationContext: options.operationContext, diff --git a/sdk/communication/communication-call-automation/src/generated/src/callAutomationApiClient.ts b/sdk/communication/communication-call-automation/src/generated/src/callAutomationApiClient.ts index cd760b618a22..017c7964ea4f 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/callAutomationApiClient.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/callAutomationApiClient.ts @@ -17,15 +17,15 @@ import { CallMediaImpl, CallDialogImpl, CallRecordingImpl, -} from "./operations/index.js"; +} from "./operations"; import { CallConnection, CallMedia, CallDialog, CallRecording, -} from "./operationsInterfaces/index.js"; -import * as Parameters from "./models/parameters.js"; -import * as Mappers from "./models/mappers.js"; +} from "./operationsInterfaces"; +import * as Parameters from "./models/parameters"; +import * as Mappers from "./models/mappers"; import { CallAutomationApiClientOptionalParams, CreateCallRequest, @@ -38,7 +38,7 @@ import { RedirectCallOptionalParams, RejectCallRequest, RejectCallOptionalParams, -} from "./models/index.js"; +} from "./models"; export class CallAutomationApiClient extends coreClient.ServiceClient { endpoint: string; diff --git a/sdk/communication/communication-call-automation/src/generated/src/index.ts b/sdk/communication/communication-call-automation/src/generated/src/index.ts index 25051937501e..9e17818e8dd7 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/index.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper.js"; -export * from "./models/index.js"; -export { CallAutomationApiClient } from "./callAutomationApiClient.js"; -export * from "./operationsInterfaces/index.js"; +export { getContinuationToken } from "./pagingHelper"; +export * from "./models"; +export { CallAutomationApiClient } from "./callAutomationApiClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/communication/communication-call-automation/src/generated/src/models/index.ts b/sdk/communication/communication-call-automation/src/generated/src/models/index.ts index ecc485f622b0..abf4ef7c303a 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/models/index.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/models/index.ts @@ -27,8 +27,8 @@ export interface CreateCallRequest { sourceDisplayName?: string; /** The identifier of the source of the call */ source?: CommunicationUserIdentifierModel; - /** The identifier of the source in an OPS call */ - opsSource?: MicrosoftTeamsAppIdentifierModel; + /** The identifier of the source for creating call with Teams resource account ID. */ + teamsAppSource?: MicrosoftTeamsAppIdentifierModel; /** A customer set value used to track the answering of a call. */ operationContext?: string; /** The callback URI. */ @@ -749,6 +749,50 @@ export interface RecordingStateResponse { recordingKind?: RecordingKind; } +/** The incoming call event. */ +export interface IncomingCall { + /** + * The communication identifier of the target user. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly to?: CommunicationIdentifierModel; + /** + * The communication identifier of the user who initiated the call. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly from?: CommunicationIdentifierModel; + /** + * The server call id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serverCallId?: string; + /** + * Display name of caller. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly callerDisplayName?: string; + /** + * Custom Context of Incoming Call + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customContext?: CustomCallingContextInternal; + /** + * Incoming call context. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly incomingCallContext?: string; + /** + * The communication identifier of the user on behalf of whom the call is made. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly onBehalfOfCallee?: CommunicationIdentifierModel; + /** + * Correlation ID for event to call correlation. Also called ChainId for skype chain ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly correlationId?: string; +} + export interface CollectTonesResult { /** NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tones?: Tone[]; diff --git a/sdk/communication/communication-call-automation/src/generated/src/models/mappers.ts b/sdk/communication/communication-call-automation/src/generated/src/models/mappers.ts index d5b306a6efc6..3dd6f9e2185a 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/models/mappers.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/models/mappers.ts @@ -46,8 +46,8 @@ export const CreateCallRequest: coreClient.CompositeMapper = { className: "CommunicationUserIdentifierModel", }, }, - opsSource: { - serializedName: "opsSource", + teamsAppSource: { + serializedName: "teamsAppSource", type: { name: "Composite", className: "MicrosoftTeamsAppIdentifierModel", @@ -2030,6 +2030,71 @@ export const RecordingStateResponse: coreClient.CompositeMapper = { }, }; +export const IncomingCall: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IncomingCall", + modelProperties: { + to: { + serializedName: "to", + type: { + name: "Composite", + className: "CommunicationIdentifierModel", + }, + }, + from: { + serializedName: "from", + type: { + name: "Composite", + className: "CommunicationIdentifierModel", + }, + }, + serverCallId: { + serializedName: "serverCallId", + readOnly: true, + type: { + name: "String", + }, + }, + callerDisplayName: { + serializedName: "callerDisplayName", + readOnly: true, + type: { + name: "String", + }, + }, + customContext: { + serializedName: "customContext", + type: { + name: "Composite", + className: "CustomCallingContextInternal", + }, + }, + incomingCallContext: { + serializedName: "incomingCallContext", + readOnly: true, + type: { + name: "String", + }, + }, + onBehalfOfCallee: { + serializedName: "onBehalfOfCallee", + type: { + name: "Composite", + className: "CommunicationIdentifierModel", + }, + }, + correlationId: { + serializedName: "correlationId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const CollectTonesResult: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/communication/communication-call-automation/src/generated/src/models/parameters.ts b/sdk/communication/communication-call-automation/src/generated/src/models/parameters.ts index e78989bb9ef8..955b0b20b73f 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/models/parameters.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/models/parameters.ts @@ -38,7 +38,7 @@ import { StartDialogRequest as StartDialogRequestMapper, UpdateDialogRequest as UpdateDialogRequestMapper, StartCallRecordingRequest as StartCallRecordingRequestMapper, -} from "../models/mappers.js"; +} from "../models/mappers"; export const contentType: OperationParameter = { parameterPath: ["options", "contentType"], diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/callConnection.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/callConnection.ts index cab5532a9e38..bee6ed521a63 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/callConnection.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/callConnection.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { CallConnection } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper"; +import { CallConnection } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { CallAutomationApiClient } from "../callAutomationApiClient.js"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CallAutomationApiClient } from "../callAutomationApiClient"; import { CallParticipantInternal, CallConnectionGetParticipantsNextOptionalParams, @@ -43,7 +43,7 @@ import { CallConnectionGetParticipantOptionalParams, CallConnectionGetParticipantResponse, CallConnectionGetParticipantsNextResponse, -} from "../models/index.js"; +} from "../models"; /// /** Class containing CallConnection operations. */ diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/callDialog.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/callDialog.ts index 8d3a768299bb..02330c389d27 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/callDialog.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/callDialog.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { CallDialog } from "../operationsInterfaces/index.js"; +import { CallDialog } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { CallAutomationApiClient } from "../callAutomationApiClient.js"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CallAutomationApiClient } from "../callAutomationApiClient"; import { StartDialogRequest, CallDialogStartDialogOptionalParams, @@ -18,7 +18,7 @@ import { CallDialogStopDialogOptionalParams, UpdateDialogRequest, CallDialogUpdateDialogOptionalParams, -} from "../models/index.js"; +} from "../models"; /** Class containing CallDialog operations. */ export class CallDialogImpl implements CallDialog { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/callMedia.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/callMedia.ts index b563938d3763..222203b43c57 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/callMedia.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/callMedia.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { CallMedia } from "../operationsInterfaces/index.js"; +import { CallMedia } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { CallAutomationApiClient } from "../callAutomationApiClient.js"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CallAutomationApiClient } from "../callAutomationApiClient"; import { PlayRequest, CallMediaPlayOptionalParams, @@ -41,7 +41,7 @@ import { CallMediaStartMediaStreamingOptionalParams, StopMediaStreamingRequest, CallMediaStopMediaStreamingOptionalParams, -} from "../models/index.js"; +} from "../models"; /** Class containing CallMedia operations. */ export class CallMediaImpl implements CallMedia { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/callRecording.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/callRecording.ts index 8059b42bc4b6..77a91a7b2a67 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/callRecording.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/callRecording.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { CallRecording } from "../operationsInterfaces/index.js"; +import { CallRecording } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { CallAutomationApiClient } from "../callAutomationApiClient.js"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CallAutomationApiClient } from "../callAutomationApiClient"; import { StartCallRecordingRequest, CallRecordingStartRecordingOptionalParams, @@ -20,7 +20,7 @@ import { CallRecordingStopRecordingOptionalParams, CallRecordingPauseRecordingOptionalParams, CallRecordingResumeRecordingOptionalParams, -} from "../models/index.js"; +} from "../models"; /** Class containing CallRecording operations. */ export class CallRecordingImpl implements CallRecording { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/index.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/index.ts index 829c6a0bef97..0e60c378238d 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/index.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/index.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./callConnection.js"; -export * from "./callMedia.js"; -export * from "./callDialog.js"; -export * from "./callRecording.js"; +export * from "./callConnection"; +export * from "./callMedia"; +export * from "./callDialog"; +export * from "./callRecording"; diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callConnection.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callConnection.ts index 65e3d775b292..abf0d138172f 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callConnection.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callConnection.ts @@ -34,7 +34,7 @@ import { CallConnectionCancelAddParticipantResponse, CallConnectionGetParticipantOptionalParams, CallConnectionGetParticipantResponse, -} from "../models/index.js"; +} from "../models"; /// /** Interface representing a CallConnection. */ diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callDialog.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callDialog.ts index 9099de30b228..4fccc524812b 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callDialog.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callDialog.ts @@ -13,7 +13,7 @@ import { CallDialogStopDialogOptionalParams, UpdateDialogRequest, CallDialogUpdateDialogOptionalParams, -} from "../models/index.js"; +} from "../models"; /** Interface representing a CallDialog. */ export interface CallDialog { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callMedia.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callMedia.ts index 8391e8d95f38..6f2b4f3f461a 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callMedia.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callMedia.ts @@ -36,7 +36,7 @@ import { CallMediaStartMediaStreamingOptionalParams, StopMediaStreamingRequest, CallMediaStopMediaStreamingOptionalParams, -} from "../models/index.js"; +} from "../models"; /** Interface representing a CallMedia. */ export interface CallMedia { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts index b4dd60293ae8..4b783a500955 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts @@ -15,7 +15,7 @@ import { CallRecordingStopRecordingOptionalParams, CallRecordingPauseRecordingOptionalParams, CallRecordingResumeRecordingOptionalParams, -} from "../models/index.js"; +} from "../models"; /** Interface representing a CallRecording. */ export interface CallRecording { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/index.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/index.ts index 829c6a0bef97..0e60c378238d 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/index.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/index.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./callConnection.js"; -export * from "./callMedia.js"; -export * from "./callDialog.js"; -export * from "./callRecording.js"; +export * from "./callConnection"; +export * from "./callMedia"; +export * from "./callDialog"; +export * from "./callRecording"; diff --git a/sdk/communication/communication-call-automation/src/models/options.ts b/sdk/communication/communication-call-automation/src/models/options.ts index 17d23a535b70..68ba18968cea 100644 --- a/sdk/communication/communication-call-automation/src/models/options.ts +++ b/sdk/communication/communication-call-automation/src/models/options.ts @@ -1,7 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PhoneNumberIdentifier, CommunicationIdentifier } from "@azure/communication-common"; +import type { + PhoneNumberIdentifier, + CommunicationIdentifier, + MicrosoftTeamsAppIdentifier, +} from "@azure/communication-common"; import type { OperationOptions } from "@azure/core-client"; import type { MediaStreamingConfiguration, @@ -116,6 +120,12 @@ export interface CreateCallOptions extends OperationOptions { transcriptionConfiguration?: TranscriptionConfiguration; /** The Custom Context. */ customCallingContext?: CustomCallingContext; + /** + * Overrides default client source by a MicrosoftTeamsAppIdentifier type source. + * Required for creating call with Teams resource account ID. + * This is per-operation setting and does not change the client's default source. + */ + teamsAppSource?: MicrosoftTeamsAppIdentifier; } /** diff --git a/sdk/communication/communication-call-automation/swagger/README.md b/sdk/communication/communication-call-automation/swagger/README.md index 8323c607fa9f..f03162b1de82 100644 --- a/sdk/communication/communication-call-automation/swagger/README.md +++ b/sdk/communication/communication-call-automation/swagger/README.md @@ -13,7 +13,7 @@ license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../src/generated tag: package-2023-10-03-preview require: - - https://github.com/Azure/azure-rest-api-specs/blob/be2a0fa68829fcb15c4e6b47aa6bc4bdd566c1cf/specification/communication/data-plane/CallAutomation/readme.md + - https://github.com/Azure/azure-rest-api-specs/blob/49077c54d273f0fb418b0a244866f74f587d0daf/specification/communication/data-plane/CallAutomation/readme.md package-version: 1.3.0-beta.1 model-date-time-as-string: false optional-response-headers: true diff --git a/sdk/communication/communication-call-automation/test/node/callAutomationClient.spec.ts b/sdk/communication/communication-call-automation/test/node/callAutomationClient.spec.ts index bced07a5ff99..425f67b3555c 100644 --- a/sdk/communication/communication-call-automation/test/node/callAutomationClient.spec.ts +++ b/sdk/communication/communication-call-automation/test/node/callAutomationClient.spec.ts @@ -38,16 +38,7 @@ vi.mock("../src/index.js", async (importActual) => { }); import { CallAutomationClient } from "../../src/index.js"; - -function createOPSCallAutomationClient( - oPSSourceIdentity: MicrosoftTeamsAppIdentifier, -): CallAutomationClient { - const connectionString = "endpoint=https://redacted.communication.azure.com/;accesskey=redacted"; - - return new CallAutomationClient(connectionString, { - opsSourceIdentity: oPSSourceIdentity, - }); -} +import { MicrosoftTeamsAppIdentifierModel } from "../../src/generated/src/models/mappers.js"; describe("Call Automation Client Unit Tests", () => { let targets: CommunicationIdentifier[]; @@ -132,21 +123,6 @@ describe("Call Automation Client Unit Tests", () => { // defined dummy variables const appId = "28:acs:redacted"; const appCloud = KnownCommunicationCloudEnvironmentModel.Public; - const oPSSouceStub = { - teamsAppId: appId, - cloud: appCloud, - }; - - // stub an OPS CallAutomationClient - const createOPSClientStub = vi - .fn() - .mockImplementation(() => createOPSCallAutomationClient(oPSSouceStub)); - - // Use the stubbed factory function to create the client - const oPSClient: MockedObject = createOPSClientStub(); - - // Explicitly stub the createCall method - oPSClient.createCall = vi.fn(); // mocks const createCallResultMock: CreateCallResult = { @@ -163,14 +139,20 @@ describe("Call Automation Client Unit Tests", () => { }, }; - vi.spyOn(oPSClient, "createCall").mockResolvedValue(createCallResultMock); - const promiseResult = oPSClient.createCall(target, CALL_CALLBACK_URL); + vi.spyOn(client, "createCall").mockResolvedValue(createCallResultMock); + const promiseResult = client.createCall(target, CALL_CALLBACK_URL, { + teamsAppSource: { + rawId: appId, + teamsAppId: appId, + cloud: appCloud, + } as MicrosoftTeamsAppIdentifier, + }); // asserts promiseResult .then((result: CreateCallResult) => { assert.isNotNull(result); - expect(oPSClient.createCall).toHaveBeenCalledWith(target, CALL_CALLBACK_URL); + expect(client.createCall).toHaveBeenCalledWith(target, CALL_CALLBACK_URL); assert.equal(result, createCallResultMock); return; }) From 340b1a50e02f85b0c8a466961f78b5e12a0c58a0 Mon Sep 17 00:00:00 2001 From: Juntu Chen Date: Wed, 18 Dec 2024 15:51:23 -0500 Subject: [PATCH 02/55] updated --- .../communication-call-automation/src/callAutomationClient.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/communication/communication-call-automation/src/callAutomationClient.ts b/sdk/communication/communication-call-automation/src/callAutomationClient.ts index 30c8bc630d87..d2209c86217c 100644 --- a/sdk/communication/communication-call-automation/src/callAutomationClient.ts +++ b/sdk/communication/communication-call-automation/src/callAutomationClient.ts @@ -7,7 +7,6 @@ import type { InternalPipelineOptions } from "@azure/core-rest-pipeline"; import type { CommunicationIdentifier, CommunicationUserIdentifier, - MicrosoftTeamsAppIdentifier, } from "@azure/communication-common"; import { parseClientArguments, isKeyCredential } from "@azure/communication-common"; import { logger } from "./models/logger.js"; @@ -15,7 +14,6 @@ import type { AnswerCallRequest, CallAutomationApiClient, CommunicationUserIdentifierModel, - MicrosoftTeamsAppIdentifierModel, CreateCallRequest, RedirectCallRequest, RejectCallRequest, From a8cfa520aa6aa3e416872e19542a8f20b1d6e893 Mon Sep 17 00:00:00 2001 From: Deyaaeldeen Almahallawi Date: Wed, 18 Dec 2024 13:13:39 -0800 Subject: [PATCH 03/55] [test creds] Fix build warnings (#32289) --- sdk/test-utils/test-credential/tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/test-utils/test-credential/tsconfig.json b/sdk/test-utils/test-credential/tsconfig.json index 273d9078a24a..7b9b3182625d 100644 --- a/sdk/test-utils/test-credential/tsconfig.json +++ b/sdk/test-utils/test-credential/tsconfig.json @@ -3,5 +3,8 @@ { "path": "./tsconfig.src.json" }, { "path": "./tsconfig.samples.json" }, { "path": "./tsconfig.test.json" } - ] + ], + "compilerOptions": { + "esModuleInterop": true + } } From 1c2f32537bfda52506704ab868040e80c78ac846 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Tue, 17 Dec 2024 15:30:32 -0800 Subject: [PATCH 04/55] [EngSys] upgrade dev dependency typescript version to 5.7.2 with `rush add --dev -m -p typescript@~5.7.2` except `dev-tool` due to copmilation error detailed at https://github.com/Azure/azure-sdk-for-js/issues/32278. Also bump versions in non-rush projects and samples. ***NO_CI*** cosmos: fix new error about implicit `any[]` storage-blob: react to `Buffer` typing change storage-file-datalake test: react to Uint8Array typing change --- common/config/rush/pnpm-lock.yaml | 2659 ++++++++--------- .../cjs-forms/typescript/package.json | 2 +- .../typescript/package.json | 2 +- .../simple/typescript/package.json | 2 +- .../typescript/package.json | 2 +- .../typescript/package.json | 2 +- .../eslint-plugin-azure-sdk/package.json | 2 +- .../tests/rules/ts-package-json-sdktype.ts | 4 +- .../vite-plugin-browser-test-map/package.json | 2 +- sdk/advisor/arm-advisor/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../agrifood-farming-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/agrifood/arm-agrifood/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/ai/ai-inference-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-analysisservices/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../ai-anomaly-detector-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/apicenter/arm-apicenter/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../arm-apimanagement/package.json | 2 +- .../samples/v9/typescript/package.json | 2 +- .../arm-appcomplianceautomation/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../app-configuration/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-appconfiguration/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../perf-tests/app-configuration/package.json | 2 +- .../arm-appcontainers/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- .../arm-appinsights/package.json | 2 +- .../samples/v5-beta/typescript/package.json | 2 +- sdk/appplatform/arm-appplatform/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-appservice-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/appservice/arm-appservice/package.json | 2 +- .../samples/v15/typescript/package.json | 2 +- sdk/astro/arm-astro/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/attestation/arm-attestation/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/attestation/attestation/package.json | 2 +- .../package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../arm-authorization/package.json | 2 +- .../samples/v10-beta/typescript/package.json | 2 +- sdk/automanage/arm-automanage/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/automation/arm-automation/package.json | 2 +- .../samples/v11-beta/typescript/package.json | 2 +- sdk/avs/arm-avs/package.json | 2 +- .../samples/v6/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/azurestack/arm-azurestack/package.json | 2 +- .../samples/v3-beta/typescript/package.json | 2 +- .../arm-azurestackhci/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../arm-baremetalinfrastructure/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/batch/arm-batch/package.json | 2 +- .../samples/v10/typescript/package.json | 2 +- sdk/batch/batch-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/batch/batch/package.json | 2 +- sdk/billing/arm-billing/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../arm-billingbenefits/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/botservice/arm-botservice/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- sdk/cdn/arm-cdn/package.json | 2 +- .../samples/v9/typescript/package.json | 2 +- .../arm-changeanalysis/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/changes/arm-changes/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/chaos/arm-chaos/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../ai-language-conversations/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../ai-language-text/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../ai-language-textauthoring/package.json | 2 +- .../perf-tests/ai-language-text/package.json | 2 +- .../arm-cognitiveservices/package.json | 2 +- .../samples/v7/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/commerce/arm-commerce/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../arm-communication/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../communication-alpha-ids/package.json | 2 +- .../package.json | 2 +- .../communication-chat/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../communication-common/package.json | 2 +- .../communication-email/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../communication-identity/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../communication-job-router/package.json | 2 +- .../communication-messages-rest/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../communication-phone-numbers/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../communication-rooms/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../communication-short-codes/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../communication-sms/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../communication-tiering/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/compute/arm-compute-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/compute/arm-compute/package.json | 2 +- .../samples/v22/typescript/package.json | 2 +- .../arm-computefleet/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-computeschedule/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-confidentialledger/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../confidential-ledger-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/confluent/arm-confluent/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../arm-connectedcache/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-connectedvmware/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/consumption/arm-consumption/package.json | 2 +- .../samples/v9/typescript/package.json | 2 +- .../arm-containerinstance/package.json | 2 +- .../samples/v9-beta/typescript/package.json | 2 +- .../samples/v9/typescript/package.json | 2 +- .../arm-containerregistry/package.json | 2 +- .../samples/v11-beta/typescript/package.json | 2 +- .../container-registry/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../container-registry/package.json | 2 +- .../arm-containerservice-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-containerservice/package.json | 2 +- .../samples/v21/typescript/package.json | 2 +- .../arm-containerservicefleet/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../ai-content-safety-rest/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/core/abort-controller/package.json | 2 +- sdk/core/core-amqp/package.json | 2 +- sdk/core/core-auth/package.json | 2 +- sdk/core/core-client-rest/package.json | 2 +- sdk/core/core-client/package.json | 2 +- sdk/core/core-http-compat/package.json | 2 +- sdk/core/core-lro/package.json | 2 +- sdk/core/core-paging/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/core/core-rest-pipeline/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/core/core-sse/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/core/core-tracing/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/core/core-util/package.json | 2 +- sdk/core/core-xml/package.json | 2 +- sdk/core/logger/package.json | 2 +- .../core-rest-pipeline/package.json | 2 +- sdk/core/ts-http-runtime/package.json | 2 +- sdk/cosmosdb/arm-cosmosdb/package.json | 2 +- .../samples/v16/typescript/package.json | 2 +- sdk/cosmosdb/cosmos/package.json | 2 +- .../cosmos/samples/v3/typescript/package.json | 2 +- .../cosmos/samples/v4/typescript/package.json | 2 +- sdk/cosmosdb/cosmos/src/client/Item/Items.ts | 9 +- .../arm-cosmosdbforpostgresql/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-costmanagement/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-customerinsights/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- sdk/dashboard/arm-dashboard/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-databoundaries/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/databox/arm-databox/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/databoxedge/arm-databoxedge/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/databricks/arm-databricks/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- sdk/datacatalog/arm-datacatalog/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- sdk/datadog/arm-datadog/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- sdk/datafactory/arm-datafactory/package.json | 2 +- .../samples/v17/typescript/package.json | 2 +- .../arm-datalake-analytics/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- .../arm-datamigration/package.json | 2 +- .../samples/v3-beta/typescript/package.json | 2 +- .../arm-dataprotection/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-defendereasm/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-deploymentmanager/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../arm-desktopvirtualization/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/devcenter/arm-devcenter/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../developer-devcenter-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/devhub/arm-devhub/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../samples/v6-beta/typescript/package.json | 2 +- .../arm-deviceregistry/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-deviceupdate/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../iot-device-update-rest/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-devopsinfrastructure/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/devspaces/arm-devspaces/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/devtestlabs/arm-devtestlabs/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../arm-digitaltwins/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../digital-twins-core/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../package.json | 2 +- sdk/dns/arm-dns/package.json | 2 +- .../samples/v5-beta/typescript/package.json | 2 +- sdk/dnsresolver/arm-dnsresolver/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../ai-document-translator-rest/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-domainservices/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- sdk/dynatrace/arm-dynatrace/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/easm/defender-easm-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/edgezones/arm-edgezones/package.json | 2 +- sdk/education/arm-education/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/elastic/arm-elastic/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/elasticsans/arm-elasticsan/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- sdk/eventgrid/arm-eventgrid/package.json | 2 +- .../samples/v14-beta/typescript/package.json | 2 +- .../eventgrid-namespaces/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../eventgrid-system-events/package.json | 2 +- sdk/eventgrid/eventgrid/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../perf-tests/eventgrid/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/eventhub/arm-eventhub/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- sdk/eventhub/event-hubs/package.json | 2 +- .../event-hubs/samples-express/package.json | 2 +- .../samples/v5-beta/express/package.json | 2 +- .../samples/v5-beta/typescript/package.json | 2 +- .../samples/v5/express/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../event-hubs/test/stress/app/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- sdk/eventhub/mock-hub/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../event-hubs-track-1/package.json | 2 +- .../perf-tests/event-hubs/package.json | 2 +- .../arm-extendedlocation/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/fabric/arm-fabric/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/face/ai-vision-face-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/features/arm-features/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- sdk/fluidrelay/arm-fluidrelay/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../ai-form-recognizer/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../ai-form-recognizer/package.json | 2 +- sdk/frontdoor/arm-frontdoor/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../arm-graphservices/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-guestconfiguration/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/hanaonazure/arm-hanaonazure/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../arm-hardwaresecuritymodules/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- sdk/hdinsight/arm-hdinsight/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-hdinsightcontainers/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/healthbot/arm-healthbot/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-healthcareapis/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../arm-healthdataaiservices/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-hybridcompute/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../arm-hybridconnectivity/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-hybridcontainerservice/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-hybridkubernetes/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-hybridnetwork/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/identity/identity-broker/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../identity-cache-persistence/package.json | 2 +- sdk/identity/identity-vscode/package.json | 2 +- .../AzureFunctions/RunTest/package.json | 2 +- .../integration/AzureWebApps/package.json | 2 +- sdk/identity/identity/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../DevToolsTest/package.json | 2 +- .../package.json | 2 +- sdk/identity/perf-tests/identity/package.json | 2 +- .../arm-imagebuilder/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- sdk/iot/iot-modelsrepository/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/iotcentral/arm-iotcentral/package.json | 2 +- .../samples/v7-beta/typescript/package.json | 2 +- .../arm-iotfirmwaredefense/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/iothub/arm-iothub/package.json | 2 +- .../samples/v6/typescript/package.json | 2 +- .../arm-iotoperations/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/keyvault/arm-keyvault/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- sdk/keyvault/keyvault-admin/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../keyvault-certificates/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- sdk/keyvault/keyvault-common/package.json | 2 +- sdk/keyvault/keyvault-keys/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- sdk/keyvault/keyvault-secrets/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../keyvault-certificates/package.json | 2 +- .../perf-tests/keyvault-keys/package.json | 2 +- .../perf-tests/keyvault-secrets/package.json | 2 +- .../arm-kubernetesconfiguration/package.json | 2 +- .../samples/v6/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/kusto/arm-kusto/package.json | 2 +- .../samples/v7/typescript/package.json | 2 +- .../samples/v8/typescript/package.json | 2 +- sdk/labservices/arm-labservices/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../arm-largeinstance/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/liftrqumulo/arm-qumulo/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/links/arm-links/package.json | 2 +- sdk/loadtesting/arm-loadtesting/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../load-testing-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/locks/arm-locks/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/logic/arm-logic/package.json | 2 +- .../samples/v8/typescript/package.json | 2 +- .../arm-commitmentplans/package.json | 2 +- .../arm-machinelearning/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../arm-webservices/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-workspaces/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-machinelearningcompute/package.json | 2 +- .../samples/v3-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- sdk/maintenance/arm-maintenance/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-managedapplications/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../arm-managednetworkfabric/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-managementgroups/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-managementpartner/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- sdk/maps/arm-maps/package.json | 2 +- .../samples/v3-beta/typescript/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- sdk/maps/maps-common/package.json | 2 +- sdk/maps/maps-geolocation-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/maps/maps-render-rest/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- sdk/maps/maps-route-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/maps/maps-search-rest/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- sdk/maps/maps-timezone-rest/package.json | 2 +- sdk/mariadb/arm-mariadb/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-marketplaceordering/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../arm-mediaservices/package.json | 2 +- .../samples/v13/typescript/package.json | 2 +- .../ai-metrics-advisor/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../ai-metrics-advisor/package.json | 2 +- sdk/migrate/arm-migrate/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-migrationdiscoverysap/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-mixedreality/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../mixed-reality-authentication/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-mobilenetwork/package.json | 2 +- .../samples/v6/typescript/package.json | 2 +- .../arm-mongocluster/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/monitor/arm-monitor/package.json | 2 +- .../samples/v8-beta/typescript/package.json | 2 +- sdk/monitor/monitor-ingestion/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../monitor-opentelemetry/package.json | 2 +- sdk/monitor/monitor-query/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../perf-tests/monitor-ingestion/package.json | 2 +- .../monitor-opentelemetry/package.json | 2 +- .../perf-tests/monitor-query/package.json | 2 +- sdk/msi/arm-msi/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/mysql/arm-mysql-flexible/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- sdk/mysql/arm-mysql/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../arm-neonpostgres/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/netapp/arm-netapp/package.json | 2 +- .../samples/v21-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/network/arm-network-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/network/arm-network/package.json | 2 +- .../samples/v33/typescript/package.json | 2 +- .../arm-networkanalytics/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-networkcloud/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- .../arm-networkfunction/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-newrelicobservability/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/nginx/arm-nginx/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../samples/v3-beta/typescript/package.json | 2 +- sdk/oep/arm-oep/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/openai/openai/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- .../openai/samples/v2/typescript/package.json | 2 +- .../arm-operationalinsights/package.json | 2 +- .../samples/v9/typescript/package.json | 2 +- .../arm-operations/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../arm-oracledatabase/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/orbital/arm-orbital/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-paloaltonetworksngfw/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/peering/arm-peering/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-playwrighttesting/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../microsoft-playwright-testing/package.json | 2 +- .../package.json | 2 +- sdk/policy/arm-policy/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../arm-policyinsights/package.json | 2 +- .../samples/v6-beta/typescript/package.json | 2 +- sdk/portal/arm-portal/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-postgresql-flexible/package.json | 2 +- .../samples/v8-beta/typescript/package.json | 2 +- sdk/postgresql/arm-postgresql/package.json | 2 +- .../samples/v6/typescript/package.json | 2 +- .../arm-powerbidedicated/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../arm-powerbiembedded/package.json | 2 +- sdk/privatedns/arm-privatedns/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- sdk/purview/arm-purview/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../purview-administration-rest/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/purview/purview-catalog-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/purview/purview-datamap-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../purview-scanning-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/purview/purview-sharing-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../purview-workflow-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/quantum/arm-quantum/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/quantum/quantum-jobs/package.json | 2 +- sdk/quota/arm-quota/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-recoveryservices/package.json | 2 +- .../samples/v6/typescript/package.json | 2 +- .../arm-recoveryservicesbackup/package.json | 2 +- .../samples/v13/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../arm-redhatopenshift/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/redis/arm-rediscache/package.json | 2 +- .../samples/v8/typescript/package.json | 2 +- .../arm-redisenterprisecache/package.json | 2 +- .../samples/v3-beta/typescript/package.json | 2 +- sdk/relay/arm-relay/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../package.json | 2 +- .../arm-reservations/package.json | 2 +- .../samples/v9/typescript/package.json | 2 +- .../arm-resourceconnector/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-resourcegraph/package.json | 2 +- .../samples/v5-beta/typescript/package.json | 2 +- .../arm-resourcehealth/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../samples/v4/typescript/package.json | 2 +- .../arm-resourcemover/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-resources-subscriptions/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/resources/arm-resources/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../schema-registry-avro/package.json | 2 +- .../schema-registry-avro/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../schema-registry-json/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../schema-registry/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/scvmm/arm-scvmm/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/search/arm-search/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../perf-tests/search-documents/package.json | 2 +- sdk/search/search-documents/package.json | 2 +- .../samples/v11/typescript/package.json | 2 +- .../samples/v12-beta/typescript/package.json | 2 +- .../samples/v12/typescript/package.json | 2 +- sdk/security/arm-security/package.json | 2 +- .../samples/v6-beta/typescript/package.json | 2 +- .../arm-securitydevops/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-securityinsight/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/selfhelp/arm-selfhelp/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- .../arm-serialconsole/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/service-map/arm-servicemap/package.json | 2 +- .../samples/v3-beta/typescript/package.json | 2 +- sdk/servicebus/arm-servicebus/package.json | 2 +- .../samples/v6-beta/typescript/package.json | 2 +- .../service-bus-track-1/package.json | 2 +- .../perf-tests/service-bus/package.json | 2 +- sdk/servicebus/service-bus/package.json | 2 +- .../samples/v7-beta/typescript/package.json | 2 +- .../samples/v7/typescript/package.json | 2 +- .../service-bus/test/stress/app/package.json | 2 +- .../arm-servicefabric-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-servicefabric/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-servicefabricmesh/package.json | 2 +- .../samples/v3-beta/typescript/package.json | 2 +- .../arm-servicelinker/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- .../arm-servicenetworking/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/signalr/arm-signalr/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../samples/v6-beta/typescript/package.json | 2 +- sdk/sphere/arm-sphere/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../arm-springappdiscovery/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/sql/arm-sql/package.json | 2 +- .../samples/v11-beta/typescript/package.json | 2 +- .../arm-sqlvirtualmachine/package.json | 2 +- .../samples/v5-beta/typescript/package.json | 2 +- sdk/standbypool/arm-standbypool/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/storage/arm-storage/package.json | 2 +- .../samples/v18/typescript/package.json | 2 +- .../storage-blob-track-1/package.json | 2 +- .../perf-tests/storage-blob/package.json | 2 +- .../storage-file-datalake/package.json | 2 +- .../storage-file-share-track-1/package.json | 2 +- .../storage-file-share/package.json | 2 +- .../storage-blob-changefeed/package.json | 2 +- .../samples/v12-beta/typescript/package.json | 2 +- sdk/storage/storage-blob/package.json | 2 +- .../samples/v12/typescript/package.json | 2 +- .../storage-blob/src/utils/utils.node.ts | 2 +- sdk/storage/storage-blob/test/utils/index.ts | 4 +- .../storage-file-datalake/package.json | 2 +- .../samples/v12/typescript/package.json | 2 +- .../test/browser/highlevel.browser.spec.ts | 4 +- sdk/storage/storage-file-share/package.json | 2 +- .../samples/v12/typescript/package.json | 2 +- .../storage-internal-avro/package.json | 2 +- sdk/storage/storage-queue/package.json | 2 +- .../samples/v12/typescript/package.json | 2 +- .../arm-storageactions/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-storagecache/package.json | 2 +- .../samples/v8/typescript/package.json | 2 +- .../arm-storageimportexport/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-storagemover/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/storagesync/arm-storagesync/package.json | 2 +- .../samples/v9/typescript/package.json | 2 +- .../arm-storsimple1200series/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-storsimple8000series/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-streamanalytics/package.json | 2 +- .../samples/v5-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- .../arm-subscriptions/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- sdk/support/arm-support/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- sdk/synapse/arm-synapse/package.json | 2 +- .../samples/v9-beta/typescript/package.json | 2 +- .../synapse-access-control-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../synapse-access-control/package.json | 2 +- sdk/synapse/synapse-artifacts/package.json | 2 +- .../package.json | 2 +- sdk/synapse/synapse-monitoring/package.json | 2 +- sdk/synapse/synapse-spark/package.json | 2 +- sdk/tables/data-tables/package.json | 2 +- .../samples/v12/typescript/package.json | 2 +- .../samples/v13/typescript/package.json | 2 +- .../perf-tests/data-tables/package.json | 2 +- sdk/template/perf-tests/template/package.json | 2 +- sdk/template/template-dpg/package.json | 2 +- sdk/template/template/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-templatespecs/package.json | 2 +- .../samples/v2/typescript/package.json | 2 +- sdk/terraform/arm-terraform/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/test-utils/perf/package.json | 2 +- sdk/test-utils/recorder/package.json | 2 +- sdk/test-utils/test-credential/package.json | 2 +- sdk/test-utils/test-utils-vitest/package.json | 2 +- sdk/test-utils/test-utils/package.json | 2 +- .../ai-text-analytics/package.json | 2 +- .../samples/v5/typescript/package.json | 2 +- .../perf-tests/ai-text-analytics/package.json | 2 +- .../arm-timeseriesinsights/package.json | 2 +- .../samples/v2-beta/typescript/package.json | 2 +- .../arm-trafficmanager/package.json | 2 +- .../samples/v6/typescript/package.json | 2 +- .../ai-translation-document-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../ai-translation-text-rest/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../arm-trustedsigning/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- .../package.json | 2 +- .../arm-visualstudio/package.json | 2 +- .../samples/v4-beta/typescript/package.json | 2 +- .../arm-vmwarecloudsimple/package.json | 2 +- .../samples/v3/typescript/package.json | 2 +- .../arm-voiceservices/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/web-pubsub/arm-webpubsub/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../web-pubsub-client-protobuf/package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- sdk/web-pubsub/web-pubsub-client/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../web-pubsub-express/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/web-pubsub/web-pubsub/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- sdk/workloads/arm-workloads/package.json | 2 +- .../samples/v1/typescript/package.json | 2 +- .../package.json | 2 +- .../samples/v1-beta/typescript/package.json | 2 +- 805 files changed, 2106 insertions(+), 2174 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index f2fc86612e7a..2a21ccf9010c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2436,19 +2436,19 @@ packages: os: [win32] '@rush-temp/abort-controller@file:projects/abort-controller.tgz': - resolution: {integrity: sha512-Ibs4EGGgbpw0LEoDt3EGXdsXD4/PZORrGn9cHzY7ojEMByVAUsGV4EkWLm6PlClIcf6uRtJk91wKXyzLdandcQ==, tarball: file:projects/abort-controller.tgz} + resolution: {integrity: sha512-QRUK0l+VYxjpO6PTQ7r/3e2t17eBGGXzCvqD0FItkYHsULciSbI7Zdd9WjgtUFK5hhG8A7T9Q6hfESxaxGR0/A==, tarball: file:projects/abort-controller.tgz} version: 0.0.0 '@rush-temp/agrifood-farming@file:projects/agrifood-farming.tgz': - resolution: {integrity: sha512-QO5oynBAKz7qpL0WPKrhzMRp/WpsKLZSSRwPKM+LT/4YC3gbyv69hebqORLGVEBAhkZUnlpLutSb4kjtIT08cQ==, tarball: file:projects/agrifood-farming.tgz} + resolution: {integrity: sha512-kKT8/WGSRhkyg9A2RkomX9suhkpXyGt74VTKqKBlYR6CMwdd5/vP/bm8VBUNPnbLmHJAqBOuJqu5dpKkaHZ+bQ==, tarball: file:projects/agrifood-farming.tgz} version: 0.0.0 '@rush-temp/ai-anomaly-detector@file:projects/ai-anomaly-detector.tgz': - resolution: {integrity: sha512-uAtJxw7sxAUVMd5s+cuR5BcBDASw6pbLwo8W/XA6s9UBApJPjy5qvF2yLe306/oKQzPXohuLXsoNGASQOf5eUg==, tarball: file:projects/ai-anomaly-detector.tgz} + resolution: {integrity: sha512-tKrp/yhe21BhkFTbBegAKg8VDQ76rv4R8pxvj3v+pUZ+bjEDLAKFA1k74qoUYht7Ew5y4ezRKB+GqCPYh3VmVA==, tarball: file:projects/ai-anomaly-detector.tgz} version: 0.0.0 '@rush-temp/ai-content-safety@file:projects/ai-content-safety.tgz': - resolution: {integrity: sha512-wYg56r/F6an8nPb6NlNYV4IkMT+vOk6QewQFK3Gef2DuAHLtxmq5feJG247k4z4jVkEE2pf9BOC3dLPGp/rPCQ==, tarball: file:projects/ai-content-safety.tgz} + resolution: {integrity: sha512-xOpgdfH/OsMtcMu4u2C8aa7uxFogy07yAmnWakmDcGburi1wqsmrBybVYuuY9rQ65yzhxNMbQGaoVJEknkWnnA==, tarball: file:projects/ai-content-safety.tgz} version: 0.0.0 '@rush-temp/ai-document-intelligence@file:projects/ai-document-intelligence.tgz': @@ -2456,711 +2456,711 @@ packages: version: 0.0.0 '@rush-temp/ai-document-translator@file:projects/ai-document-translator.tgz': - resolution: {integrity: sha512-MVtb7N/AgQW4ZKsGGYz5mXyBCy3FCBQfpi/IVVe4jGEUoQMkqInzp3Qr2czfYJF1Aw5m9mFu04z/qufBOc8mkA==, tarball: file:projects/ai-document-translator.tgz} + resolution: {integrity: sha512-eB4XF6y7wyT8ZCW46tmtpg7i9akFtBjYEZ1FBoSGd+uHwYp42hHWLCGzlo2nhdyvPP2eiU/0axXO6Rlo9jhsIw==, tarball: file:projects/ai-document-translator.tgz} version: 0.0.0 '@rush-temp/ai-form-recognizer@file:projects/ai-form-recognizer.tgz': - resolution: {integrity: sha512-ZiQoRK272m3Q5fM4MGB22td80/epACHLgCUtVzhpRcB5V4+pNKR+UGoSeASRrg1HRI3KJBqJwveLkeuLlcO4gA==, tarball: file:projects/ai-form-recognizer.tgz} + resolution: {integrity: sha512-bkDBegrU9fJ8Jj3EwR71DkjpQuBAjlX8zMljitGeQbeRHek02H82i2HzGu7bttXb8WVt5p4GPFFrbjen/xPN2Q==, tarball: file:projects/ai-form-recognizer.tgz} version: 0.0.0 '@rush-temp/ai-inference@file:projects/ai-inference.tgz': - resolution: {integrity: sha512-k+K5D9zuPfVBOlaRCRsV65vGhKd0wVN2Dk3vo/NAUqELWQK9+zsWmGXHUcBXV6xyNfbkdGrznur9r4Nfa39Tiw==, tarball: file:projects/ai-inference.tgz} + resolution: {integrity: sha512-bd/zSkrYpedo3WfI1LneB9xngytMQ6rBB7U3NFPUlJSaRP4PbP5qjPf6E0LOvUjWF3ROsvEagLrQCnRCt12uTQ==, tarball: file:projects/ai-inference.tgz} version: 0.0.0 '@rush-temp/ai-language-conversations@file:projects/ai-language-conversations.tgz': - resolution: {integrity: sha512-d3vaikHjJHVlneVLVu4fid6/HPKV/aIcYYbI1r4eL6OnUpWapjrWdIEmNf6xILz8HkLKNQM8qVdDyT+HRjaVUA==, tarball: file:projects/ai-language-conversations.tgz} + resolution: {integrity: sha512-gp0T/+/o67A44AbjWKOaSPh7jtSoTKKTA1N2MpCueBfRMLns8s2VrM+KK/nzGEBfdXg4PKqkyes0A1VvgxywoA==, tarball: file:projects/ai-language-conversations.tgz} version: 0.0.0 '@rush-temp/ai-language-text@file:projects/ai-language-text.tgz': - resolution: {integrity: sha512-PCHG4RlNUlxg2qxYUzpux5qwU/BXFe32NiTXm7j1qNUOFeyUWaXne/VbM5O/NTyUaliuiAOMIgkqUpFa41gK6w==, tarball: file:projects/ai-language-text.tgz} + resolution: {integrity: sha512-n6FqRIxx4ITNn8zyiy/ehfXu0b10brSpJtXnueHONlEkvboa8qyV8NiR1bUCvTavLrt+jijNyCVMnXZkx+yRCw==, tarball: file:projects/ai-language-text.tgz} version: 0.0.0 '@rush-temp/ai-language-textauthoring@file:projects/ai-language-textauthoring.tgz': - resolution: {integrity: sha512-66itVcfNfUYh77OvYUpjQT4sYsX3GXY2R8JBVyzftWWOKhn0uV+JHpq5M1iQzXQu0J0tRqiKh7Db7yndgj3kAg==, tarball: file:projects/ai-language-textauthoring.tgz} + resolution: {integrity: sha512-IvGKkFhhYyLTJ18TKqCMRTgaIWeG9H0HMdMZGjgHSpm6fwC4slxUgh5fHDde/5SehgZmCraZDSxJelvy5PBIZg==, tarball: file:projects/ai-language-textauthoring.tgz} version: 0.0.0 '@rush-temp/ai-metrics-advisor@file:projects/ai-metrics-advisor.tgz': - resolution: {integrity: sha512-Xy0ImIzleKUA7VxBCkv4huvwqPjtZXDt3FAgUez7wyDUMS7OC1XVAvyg5pKcIPZLXGmHJ//3S54/2Lbzx+G14A==, tarball: file:projects/ai-metrics-advisor.tgz} + resolution: {integrity: sha512-AxwsBkChyxD6pZwEvGZ+wI+pSeBCd+DeIa57nIIJdvZnIE2o/FE14B7NU1lPMlPPm7nYtXzixlZveFP1FhdOLw==, tarball: file:projects/ai-metrics-advisor.tgz} version: 0.0.0 '@rush-temp/ai-text-analytics@file:projects/ai-text-analytics.tgz': - resolution: {integrity: sha512-L2zCkxd+XHPzXC7QO5xfI2QPG/E2rvGRFhpgjfidcfzqmG9kYMxvzxSlFlLXTYTj2ZEZ5Q8ARJ4SYx6XMle2NQ==, tarball: file:projects/ai-text-analytics.tgz} + resolution: {integrity: sha512-W8zFnKDK545BnmEU/GV8nawA/ylUxHQR4U05wtmWfIvk0x1CsQGhzy+OljNVuZjYqiWwixK5yrRRaxfWUHifAw==, tarball: file:projects/ai-text-analytics.tgz} version: 0.0.0 '@rush-temp/ai-translation-document@file:projects/ai-translation-document.tgz': - resolution: {integrity: sha512-uww2BsjAY/OIlLTv7C6bTvX5EN4Jk4ar7Iae2gTqCoaM5invyar8/6ImMR+0KN++Ca3zXc2CXilIXrnnlItHRA==, tarball: file:projects/ai-translation-document.tgz} + resolution: {integrity: sha512-A4YsJqwzk9MroVkL4FLwI6a72rapOZ73c1mTIPoN1SshgCmnjSemsjM+Sb9E7tjY2zQFFRyB5x81vr8T2ld7zw==, tarball: file:projects/ai-translation-document.tgz} version: 0.0.0 '@rush-temp/ai-translation-text@file:projects/ai-translation-text.tgz': - resolution: {integrity: sha512-3XHDssLX0ri0CjiccRr82uxLp55vWhz/mOIB2bz6zjrGD7QRPSsvIjzh1enrZwVX1/w73UcBKtPMxioOvDyfJA==, tarball: file:projects/ai-translation-text.tgz} + resolution: {integrity: sha512-KTLP3Z3PXY0OE1/AiIllgWxbxgorvCR8/9hLAmg85soexVco7nbGMGAVb/29DBiZYPbUndqvz5ij0BetrZmWPg==, tarball: file:projects/ai-translation-text.tgz} version: 0.0.0 '@rush-temp/ai-vision-face@file:projects/ai-vision-face.tgz': - resolution: {integrity: sha512-ktM3Ox3D54Pau2C1Ggi84dOAExqiKEoH0JI9PoVUmaT0UssSCuhz9Til/3cA+2MlIJ2+BYTbFuuh6QjyafFhlA==, tarball: file:projects/ai-vision-face.tgz} + resolution: {integrity: sha512-L8az8MtIIvL5o7FEZCaEbkp8M35tjr2hh4znuK/P7TuaN1ZbizrPw9FQHl7fgo9wgvmnsc/VVjX+KH7MZVeTvw==, tarball: file:projects/ai-vision-face.tgz} version: 0.0.0 '@rush-temp/ai-vision-image-analysis@file:projects/ai-vision-image-analysis.tgz': - resolution: {integrity: sha512-wNM3J9/H4ST0bOPIsjtDoTIy6xu2fdb/fLJRuny5XVr+L0QPIsjzzhr9ZW6c8ngTrYlamlKDXhF9a0Tu0pNhGg==, tarball: file:projects/ai-vision-image-analysis.tgz} + resolution: {integrity: sha512-NFXvJWrKpUAGk4agWsBBlK6TYlzrfNyWGKTQW3998XBMalRFTbLrHC+KPdCfuCOB3yudDdgtlG2Bz0O8uhAIpw==, tarball: file:projects/ai-vision-image-analysis.tgz} version: 0.0.0 '@rush-temp/api-management-custom-widgets-scaffolder@file:projects/api-management-custom-widgets-scaffolder.tgz': - resolution: {integrity: sha512-9eh7MlgIf2tFsx3qR16GIeljbB7gT0wCaSdd3J9nIqo/dSg+ncVMcoQLfh8DLoEXl567PqCX0R1OcXjN8Y6hWQ==, tarball: file:projects/api-management-custom-widgets-scaffolder.tgz} + resolution: {integrity: sha512-X7hFy0az7KDpzacRqi41kddtIE8nPQYGR5tq2mdaQiZp6PN0fSemUD0F7WaLu1eOs6mjOSVkg85AX0RFgJKHgg==, tarball: file:projects/api-management-custom-widgets-scaffolder.tgz} version: 0.0.0 '@rush-temp/api-management-custom-widgets-tools@file:projects/api-management-custom-widgets-tools.tgz': - resolution: {integrity: sha512-dMAIacqzLU3uGgVdn+A8r+/Vv7vC4Emr0Z0T3lCVhq7JoQmL3I7yyUueYdP6tPVYSGzko9MdRYXA11RvB9GHPA==, tarball: file:projects/api-management-custom-widgets-tools.tgz} + resolution: {integrity: sha512-AEfwhZUeKMqpK3TUJk5fUepqPOwwGjkKZJFyee5ooAU0KKoxONonLyznAbxVYcDLGUqzXARI8GxsEeSY6P9Isg==, tarball: file:projects/api-management-custom-widgets-tools.tgz} version: 0.0.0 '@rush-temp/app-configuration@file:projects/app-configuration.tgz': - resolution: {integrity: sha512-XhwqKUAITo1k9UGUOfsulMGMig1cs4NLpxF5hIwK91cMo+EbLHvYzUl6SypPw4IxasziMoyVtUobTvEsafDDDg==, tarball: file:projects/app-configuration.tgz} + resolution: {integrity: sha512-6nXAnRtNwDQx/CTCcCLlLdV1kd1dbR7mp7INH5/2flQMgw/K1twdg+tCIBbQEGXU2Yow/VOX8TDXXbLTF8ng0Q==, tarball: file:projects/app-configuration.tgz} version: 0.0.0 '@rush-temp/arm-advisor@file:projects/arm-advisor.tgz': - resolution: {integrity: sha512-D1BxHrcwrZyZzUlBOFw8zvHIz7diGlrrAti7LTE3ps4m3oSDy+VgNmxns27hLB8L2Ps8juIlspjO9g/y3Ypx0A==, tarball: file:projects/arm-advisor.tgz} + resolution: {integrity: sha512-xSYl+4IYPWIxFqAyION4BRsWO/OfSl2l0qETNmvz9LyfTDY36sw6tcqvzk0CVGp1M6rfzSFpkqqVhr2sTLqyLw==, tarball: file:projects/arm-advisor.tgz} version: 0.0.0 '@rush-temp/arm-agrifood@file:projects/arm-agrifood.tgz': - resolution: {integrity: sha512-CkjONgJdovBPgzatQ0EtgPxNtEN+AUnHEvaPh7rijUH7nUtWWXt+SjGnlCb7FnfYw2DRRmYBYjiRj8ODn0yxUw==, tarball: file:projects/arm-agrifood.tgz} + resolution: {integrity: sha512-faqvQ6Yfe9K1eDj3m5YlpfAgE2vZXU3ERmbD9+npJdRhxEvazTNlKt6rMGCDkT6hb20CU8qO7eNpUx6ht//OeQ==, tarball: file:projects/arm-agrifood.tgz} version: 0.0.0 '@rush-temp/arm-analysisservices@file:projects/arm-analysisservices.tgz': - resolution: {integrity: sha512-tG6leEIYvsDZ/paEF3tmC57LeHEm6iuSqXOW9k7DTxDDNiaiD5m76YMC72kki6oLtNbCACjZgyMTf8OVexDHcg==, tarball: file:projects/arm-analysisservices.tgz} + resolution: {integrity: sha512-J0A5HjwB1f09abQd49wzCUDbLmLQwbDCLQBjIA8c0xArBSQ7LWQiAyFmwtG/nl0I1THTeLS8R1KjbIaAHvNQCw==, tarball: file:projects/arm-analysisservices.tgz} version: 0.0.0 '@rush-temp/arm-apicenter@file:projects/arm-apicenter.tgz': - resolution: {integrity: sha512-Ka7hu76MtkwZVb6huAfKTilueJZ68+vqh5Ahtab12CkEmKGgIoCWo4xt/0AGYuUuM+rjfGE26AEuJjs2m4DZUw==, tarball: file:projects/arm-apicenter.tgz} + resolution: {integrity: sha512-7XnNlP+0iJQNJDlkcWeF5p2VfK3WokuFIR9TTVcsKp+HLFux7NxRLmJWOc0MHY+xCRInmoQGDWvIP7iyrvXKlw==, tarball: file:projects/arm-apicenter.tgz} version: 0.0.0 '@rush-temp/arm-apimanagement@file:projects/arm-apimanagement.tgz': - resolution: {integrity: sha512-S3MLMloN9uifzJSbJ6SDnGMALjqvpLmWNF3G7fmzO4eVCp3fbUn3Gz7e1MjTw8+p9jo2eTraiOCYovqy9HfdkQ==, tarball: file:projects/arm-apimanagement.tgz} + resolution: {integrity: sha512-00aKO8kZKXmEPx1Dk6WJaNWTZlkf8a/ACSgfzO3KJl+ajhHz6esxJiUXzr8JD946eXlxiEJ1HelJpeZKJQWMxg==, tarball: file:projects/arm-apimanagement.tgz} version: 0.0.0 '@rush-temp/arm-appcomplianceautomation@file:projects/arm-appcomplianceautomation.tgz': - resolution: {integrity: sha512-BWwkFmGqy8AhOcD1RSgsNGwI2Mc7pSzzbUMrF63AZJNhbwfr1QSe8Fk9kQjwlpK11ej9PWJK8ueTeoMbG0bYKw==, tarball: file:projects/arm-appcomplianceautomation.tgz} + resolution: {integrity: sha512-ylaXn0dmtRcgNdIqV73uyic7oMRzVflEXkZKSKcSu342LI42OB/8asQ2jDE1RbVYQsF+2X+8+LT6r33BeJSB9Q==, tarball: file:projects/arm-appcomplianceautomation.tgz} version: 0.0.0 '@rush-temp/arm-appconfiguration@file:projects/arm-appconfiguration.tgz': - resolution: {integrity: sha512-PXVr4uQ6rUOjRPtiwxha3d7GD3KUSs6g/UR83fMcbQU4GcpkkPSzUhydkWyxqkJUfAj2G7D5XDrDGgnoYR5wLw==, tarball: file:projects/arm-appconfiguration.tgz} + resolution: {integrity: sha512-/39WrxTSq10tVjRji9mmInhdSYB9JJ/fbaRuE1gnaUPOcRq8Gy+7pGPT42fxsthglOA4cpnFPQnW9BTpS2ZVOg==, tarball: file:projects/arm-appconfiguration.tgz} version: 0.0.0 '@rush-temp/arm-appcontainers@file:projects/arm-appcontainers.tgz': - resolution: {integrity: sha512-qXEDXcovdIfsWZccNM2Sc2T4Ky2EF4TzgbPrPnbQvd2v4xv72RyzqosD/3pKXsfHu7nh/Tsn1KnVfcNPyLUcRA==, tarball: file:projects/arm-appcontainers.tgz} + resolution: {integrity: sha512-UnFo4rdWLQ66rmecv28SUhJ+Uny+GDzRBrISfiFQcSw/aFZXZ/i52gH0SIgzi68JAcuEAV6PvHFt1ot/m/e9CA==, tarball: file:projects/arm-appcontainers.tgz} version: 0.0.0 '@rush-temp/arm-appinsights@file:projects/arm-appinsights.tgz': - resolution: {integrity: sha512-Qv78CyKrBKjLg4TmEzdrNcH5S+/LUwd3Tl+Qok0xxR9+JIueJ1KVI0lh41Dw96PyeuzhznIsbK9ZiQgfbvBiFg==, tarball: file:projects/arm-appinsights.tgz} + resolution: {integrity: sha512-pTE5lGBibSRFAEHVz8deDAgLklg8TkDoqqj8Go9wFaahW3CtEit5PF1lKWy5r/6ERY3573bj2Am0plYi/CCIAQ==, tarball: file:projects/arm-appinsights.tgz} version: 0.0.0 '@rush-temp/arm-appplatform@file:projects/arm-appplatform.tgz': - resolution: {integrity: sha512-0ktS2gnEFylf2w0BJMVrVJN8v7eJViQSdhDB4C3JtUkQYeK//IpoPHhMoOgGdifOcqJxoyEbbOXLf1uzJSfycQ==, tarball: file:projects/arm-appplatform.tgz} + resolution: {integrity: sha512-zlR5o37FGQzlJUhxajIFyhm0AG380+mhYDfUiLExrAe8Hq/6cqgBUBoo5eVetCbWE4EbrKQLj6moq6+B9hIH6g==, tarball: file:projects/arm-appplatform.tgz} version: 0.0.0 '@rush-temp/arm-appservice-1@file:projects/arm-appservice-1.tgz': - resolution: {integrity: sha512-SoJVn7fzwPdktgviquaucBfzq6I/i8xLrmqeFrlGn9GDc4JGL+qi1mUKfbTq5VlT7ZoLOkfak1RZNj4BvyntZw==, tarball: file:projects/arm-appservice-1.tgz} + resolution: {integrity: sha512-1mmqZCGN8CfwT5Pmn3+DcZgxGqgoac0x3pbbGOb3l6J4E5esnKbq5MjH+4+gR9Id0I3wR5boS4OyhB3MEb/rtw==, tarball: file:projects/arm-appservice-1.tgz} version: 0.0.0 '@rush-temp/arm-appservice-profile-2020-09-01-hybrid@file:projects/arm-appservice-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-T0URrFgjBZB3zN+VOY2AIXyr1sPwckJM0O8wEAZTCgrNR6OF+6jkj3a/cWmePb2oykGE7pSZegWxtLOma0ZmVg==, tarball: file:projects/arm-appservice-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-aY2WHcDiQKcJyxPHabOtKk2pSa+4zAx7WV7Y/3Le0rXnVSmgo0aHFMQOU0UvAHWDoJka0AdEeO9ErgIh2g11Ow==, tarball: file:projects/arm-appservice-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-appservice@file:projects/arm-appservice.tgz': - resolution: {integrity: sha512-M+DjKAoDigUCPppAB9cxuIsJZY63M7xlRf53NL+VSWexzqXjyNv7o59z7wq93Y3/g76Ja158hKangOmNCgV1yA==, tarball: file:projects/arm-appservice.tgz} + resolution: {integrity: sha512-zIsAoZQ7Hdb2Z4rLmGKMVZd3MUQ3ajhjAJTOHoKML6FxS8u3J7c4TAGOvVz/rZC6U2+EjAymFwqetf+V3Swu7g==, tarball: file:projects/arm-appservice.tgz} version: 0.0.0 '@rush-temp/arm-astro@file:projects/arm-astro.tgz': - resolution: {integrity: sha512-QokjGLS7CjBMJ4aY0AfsEzH5uz9FMvMblWEl+eq9Y60hMifdcRZQq3hKXQoaTasmcESQLcDFlX1vedpyaT4JgA==, tarball: file:projects/arm-astro.tgz} + resolution: {integrity: sha512-czQB85cg8obOWRQWQZAIb39w2GCOD8mapF1ommQ88QHcCNssrnmrJ2nx0KEpmnLNhRl1bxSg59c9PNAXXk0A8w==, tarball: file:projects/arm-astro.tgz} version: 0.0.0 '@rush-temp/arm-attestation@file:projects/arm-attestation.tgz': - resolution: {integrity: sha512-Iy6luLMZ1g397NZScTa/ohlf9Ldtm8B12B8Gte1x2BPkay7KAxx53ollbollCLfvsIg2CRF2jjwPBw7cdI5bMg==, tarball: file:projects/arm-attestation.tgz} + resolution: {integrity: sha512-Iy4LBc1uYVDE1eXc0ueKGHoxsO/GeXJs71L7N+p+606BNPwLPVTC7q/AYwWRi9KYAMIzyvF75fBnkwiAEnmKgA==, tarball: file:projects/arm-attestation.tgz} version: 0.0.0 '@rush-temp/arm-authorization-profile-2020-09-01-hybrid@file:projects/arm-authorization-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-fNgfMoz68jlUpSYwsx1nKM+emOx+uWalCSdFocVo1pOflUVqVG9Dkcqx3doW7KNCqgtHJB5gDtcHHGMcCcZdMg==, tarball: file:projects/arm-authorization-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-OHROfKuILSNQdMVLsHVoTt5+E10Ubh3XJjVnRX56AjRbyBqVhz8eJL+o7tHl7j/bJxDcvZ7zQqWepJvWlTFsLQ==, tarball: file:projects/arm-authorization-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-authorization@file:projects/arm-authorization.tgz': - resolution: {integrity: sha512-NLG3IUqABR883jvpWXyLkxSzruWFask+mVAnJVUemvPvNUZebRJWOPNGvWzk3+oz3bFW7pjs1cMQPsYsqyyfig==, tarball: file:projects/arm-authorization.tgz} + resolution: {integrity: sha512-FKY6io3PmpKOZjk3ilkT3FEARqb055GTpZWsGjbR2cL5a3przJ7giMSlvpJCoXmJGRs5lv8XH8F7crZcOSVYbQ==, tarball: file:projects/arm-authorization.tgz} version: 0.0.0 '@rush-temp/arm-automanage@file:projects/arm-automanage.tgz': - resolution: {integrity: sha512-d5s7KjgfOefEf/anZ/dJwh9Pn09FlaSyfZZaJY7DF2scRCACDr8keEI/e+PtBKba1EjES3k5rUYPWFIYiMg4Hg==, tarball: file:projects/arm-automanage.tgz} + resolution: {integrity: sha512-mq/1+w9bJFRTXjeBrov4NHF1Ilt95vf90FrPRr/pAZ52oi8XRNR8/OeBx0WvI49GjDpDvkqUtw5ylSHIXhF5FQ==, tarball: file:projects/arm-automanage.tgz} version: 0.0.0 '@rush-temp/arm-automation@file:projects/arm-automation.tgz': - resolution: {integrity: sha512-TqmXj7NSOF68sm9EpkZgaLs2SBWphqd4VYkl24snyf5+BYLb1kenqVzgYYjezAeyjZpZ0azu/16XcjCZvSkT4Q==, tarball: file:projects/arm-automation.tgz} + resolution: {integrity: sha512-3sDCScvGYiuGjVyx6XsLQ3DRFHQSn8YF6Fe1MhJTulISJX+y5ntCQAurnP2RtysO7P4Pqw3QWbhLjK+N5PYckA==, tarball: file:projects/arm-automation.tgz} version: 0.0.0 '@rush-temp/arm-avs@file:projects/arm-avs.tgz': - resolution: {integrity: sha512-gKKWuyaCJw1LTUpB9bKS8NZTVeFOLw/ZIZGlcCJtTFr1M38EWINWIpC01JQPY11lRO8SAKdluWcZHar+0Q++KQ==, tarball: file:projects/arm-avs.tgz} + resolution: {integrity: sha512-YaWz2KgrKnUtn3asgtVFZEJV3nHmehSdCrN/q32IyW4H9n8Np7He6V/jq1RqU3AtDTdCSu3UVcJGtcbyDmDvwg==, tarball: file:projects/arm-avs.tgz} version: 0.0.0 '@rush-temp/arm-azureadexternalidentities@file:projects/arm-azureadexternalidentities.tgz': - resolution: {integrity: sha512-fbPS/locSCawv54IfDLHCG64oy173GUCIemzGxi8XamxG3vmwSyt2r1/OXP7vnnvtJLdmgvt7gDkc03gqBa+4g==, tarball: file:projects/arm-azureadexternalidentities.tgz} + resolution: {integrity: sha512-VjtGtEGtjICua+e7XBjV5WOSq6yKvu90JJ1yELdhAO+ONpZYME/aZoFGg0rq/J+IzYHsG7072ZFLlo+ixExH0w==, tarball: file:projects/arm-azureadexternalidentities.tgz} version: 0.0.0 '@rush-temp/arm-azurestack@file:projects/arm-azurestack.tgz': - resolution: {integrity: sha512-lNKiE0vlbVCwV5qYTJJ3NaXTnkh5z39AWT1OKN8Lkkawtu+nrHN0CDL/sDZLNRMat0SqOLIQdrrovVvGRx55PQ==, tarball: file:projects/arm-azurestack.tgz} + resolution: {integrity: sha512-i4GdDXeN9agaOWrGtA7jKiRPzujIbdvHowUW74nPkCV+mzHG3oVV//UNIi0qWW2YsnjrTIQ2l4d8jD0Hkk6qog==, tarball: file:projects/arm-azurestack.tgz} version: 0.0.0 '@rush-temp/arm-azurestackhci@file:projects/arm-azurestackhci.tgz': - resolution: {integrity: sha512-ksvoo9PJ4yqG7dqCsHt1kn0mpGRFf4B844Elvk2q78L2bHXnzBTybDwBI9UHPVyoOHgWFMvk6yYxs7PRfl8dZQ==, tarball: file:projects/arm-azurestackhci.tgz} + resolution: {integrity: sha512-+eCjFkQNSkQE+FhgJKVgUaBLNZQehgkl0MSmFOLLXTc0a/pKPqz0qD1g/M2pnzwPVw7UaIwTB1keYd0z87KSzQ==, tarball: file:projects/arm-azurestackhci.tgz} version: 0.0.0 '@rush-temp/arm-baremetalinfrastructure@file:projects/arm-baremetalinfrastructure.tgz': - resolution: {integrity: sha512-xfxQNbxSY6JWbZ5aFAofwG8kx74O+Ygx7isnR5EvumXX/SejoY1CNMrr6TcaimR4xfbrylq+HTEpwrnI7PCh/g==, tarball: file:projects/arm-baremetalinfrastructure.tgz} + resolution: {integrity: sha512-ECVogeEBV8qOKhSKt0HbGmXpTHc7QEevuNWO8j1qmXnFG2UaJ8Pj+Xpyvk1JxxqNQ06YnxgWlwcnfEvgZeSVcQ==, tarball: file:projects/arm-baremetalinfrastructure.tgz} version: 0.0.0 '@rush-temp/arm-batch@file:projects/arm-batch.tgz': - resolution: {integrity: sha512-4UxIHq88HL+NjPnIEJYgonSdfs8LpzVk7GMYTyysFtSDlB8PU5D+BbeTKViqqxKroGh1OnSEVw3/RYsGaXvd1A==, tarball: file:projects/arm-batch.tgz} + resolution: {integrity: sha512-hoilBPbg1zn0QZHbNNpOo/cOlibJ6b10j/3qUyUX9+MXToxYG82ncoLN149qGbxpkaqjQQcpnxAI7ZmPp4NLoQ==, tarball: file:projects/arm-batch.tgz} version: 0.0.0 '@rush-temp/arm-billing@file:projects/arm-billing.tgz': - resolution: {integrity: sha512-ChU0Sya8ifxVCDsGQnow9BvYy83LOk1qYlcjQYtueTXOr4Um0QmhRP2iFryxmpbJ487kx5eq+ZHgnC/07E24TA==, tarball: file:projects/arm-billing.tgz} + resolution: {integrity: sha512-rwfFX1uECqzJKcx0ecW7xEqZK2S8Y345lE2lm6Z4N8M44hyhv7wVMDf/VarcyLtTSPNaJqba/4x5wL7NKTU+hg==, tarball: file:projects/arm-billing.tgz} version: 0.0.0 '@rush-temp/arm-billingbenefits@file:projects/arm-billingbenefits.tgz': - resolution: {integrity: sha512-37kEsM3GlMykjC8qTGGW0wMUzEuaADbq5BjPtb/HAQHmB6PRzc+y387vRA/YGgzr6sK/ZId+E6nmQ900o8XvWA==, tarball: file:projects/arm-billingbenefits.tgz} + resolution: {integrity: sha512-GLJhlFc7juxNawCeZr2NjC4AWnjiIHU2PVHxpheyWS3FJ/RiBfFDcJPGV8lfnE7VJUr5rN5AmnYLof0oGklL+w==, tarball: file:projects/arm-billingbenefits.tgz} version: 0.0.0 '@rush-temp/arm-botservice@file:projects/arm-botservice.tgz': - resolution: {integrity: sha512-8ACeKqiwfg5/z6X8r6r2nuqFaySE0bsq2Ck5CqK67Fa3/p0DpeqTg6tJWM0Xm2bCqTM9px6HjjNHKPVy6Akq7Q==, tarball: file:projects/arm-botservice.tgz} + resolution: {integrity: sha512-KZdspyDagf2oZR/UMozAsW5yR2oWB+9Vr+NQZSqeWfDg0S5qU94ScR5KGRCgxM43YuLCNkmN1EZTbhfFY+F/nQ==, tarball: file:projects/arm-botservice.tgz} version: 0.0.0 '@rush-temp/arm-cdn@file:projects/arm-cdn.tgz': - resolution: {integrity: sha512-gO6pg6b1D9xGR1uvK/7OlUmWfKSZvtWF82sEQiN4irDaRMKmKRmoJWZbl3x8TYd8pfFi7peBXMYxVpBez/VCRg==, tarball: file:projects/arm-cdn.tgz} + resolution: {integrity: sha512-eN+tz/69n7nF04fPaWtBiQ87ys1Wt1T/RnpoyDRtsikeXHBsbNzCCTowWvdjv8KhRt7P7jdo3FqWXUAkv/nP6A==, tarball: file:projects/arm-cdn.tgz} version: 0.0.0 '@rush-temp/arm-changeanalysis@file:projects/arm-changeanalysis.tgz': - resolution: {integrity: sha512-OM2TmcymZliEhaTf9UJGoDmflVSrhrzIWKQqw7A8/CarEuI8I8cXPxV4+vmfRTM5RnMUzcyOy9rVPHNIngw81Q==, tarball: file:projects/arm-changeanalysis.tgz} + resolution: {integrity: sha512-aOFGOt2rADHCR+Y3vkfZi1QszXOhfFXeDNZZnON6J87LR/RpgCoVbWyBLz+R1bryjzv/lNsMPPkneJ+SFbR45Q==, tarball: file:projects/arm-changeanalysis.tgz} version: 0.0.0 '@rush-temp/arm-changes@file:projects/arm-changes.tgz': - resolution: {integrity: sha512-xAHnPXuiOMEaEA93S1o2AI4rbXcVhQWypOyC/AaWd/3XsE+lQ5P+eeI4xrhiEln0iDx5fvBo/Ta/SAk0vFCT6Q==, tarball: file:projects/arm-changes.tgz} + resolution: {integrity: sha512-VHWw1qKvig50NsvnucBYhZPhy5C4VhWqdXeJMzH6X6nEo69rLG9wO4HucSdR9HfqFZ5S44voYj7LOK5X7eQb0g==, tarball: file:projects/arm-changes.tgz} version: 0.0.0 '@rush-temp/arm-chaos@file:projects/arm-chaos.tgz': - resolution: {integrity: sha512-G/5zX4AqrAT/+c+atQXGjSvkm0JcW11R2SNnmXLC9PL5QeogP/9A7L8vGkLYPf68FY8NqElTiDf2pL+/8x0ghg==, tarball: file:projects/arm-chaos.tgz} + resolution: {integrity: sha512-55gboIlBeU8bjXj/a7mwbUChnuaozfbkLMztpCxXQABI85EYe83ffl9VgVqm7iXy61tF6gUOMphDbeSfKFc4RQ==, tarball: file:projects/arm-chaos.tgz} version: 0.0.0 '@rush-temp/arm-cognitiveservices@file:projects/arm-cognitiveservices.tgz': - resolution: {integrity: sha512-2v6ZM1wtAQ0vU451JL+EWzD5yvWeC3YZtlADX2eQdd/c9Ukw86QvuNysXcIFyZvdDHQiSk9NCc4NO3pIiBqweg==, tarball: file:projects/arm-cognitiveservices.tgz} + resolution: {integrity: sha512-yecoAzQg345s9n+EnMPL4MBVV4Gw1p0NSsAKDNrM7xHCjaWL+Rk34c4OBHnsdCBlcDX3I3ZOkJwpxczqSnlXng==, tarball: file:projects/arm-cognitiveservices.tgz} version: 0.0.0 '@rush-temp/arm-commerce-profile-2020-09-01-hybrid@file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-LLjnSy1chLxDiJBaToBD9lxa1cwXKJTwTyObY5mKzhTiV22L09pVawBcp9CewnteQCwEAkAEqFK/VvByzB3T8A==, tarball: file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-/jTMRk6+nqbThGMAx6pEmbzgcL8Sevfsq9VoVlTYNPRbPp2e4VOx6QUAjFfHqLcHfv1dgODFm607F9WzQBj+jQ==, tarball: file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-commerce@file:projects/arm-commerce.tgz': - resolution: {integrity: sha512-7+WLdbFP3jTjowwDOIInvN4DbzQDNNQGoR28fDI7R59gpAMfBCHMnu0DN6r5pqFlcbL/8tUe0R7td5S0OOqo3A==, tarball: file:projects/arm-commerce.tgz} + resolution: {integrity: sha512-6+mOYVf9aO1LJU2IRK109qacdGtW8b3zfmmg0PCdsrStx3cl99w2EC4OhWJIUDvgQlGDDPUlgtrEOD9KVaZWWw==, tarball: file:projects/arm-commerce.tgz} version: 0.0.0 '@rush-temp/arm-commitmentplans@file:projects/arm-commitmentplans.tgz': - resolution: {integrity: sha512-owzp6xildelcxFFm3VXH7HFhCHLZNK54QtAPfCFKlBhrOD3GDqhq1E+87UQp0kxNs08prVlp84EltLlF1fBf5w==, tarball: file:projects/arm-commitmentplans.tgz} + resolution: {integrity: sha512-Y/34ECLtb7OqLucqlGDMkOnvJHbr9z+XVe85pZhlVSCRToPPRAgyhqjX6Tzl7QmlW9IRpYa6VQ0BmC0/r1KoSA==, tarball: file:projects/arm-commitmentplans.tgz} version: 0.0.0 '@rush-temp/arm-communication@file:projects/arm-communication.tgz': - resolution: {integrity: sha512-6OxH9SewmnJcM4jsKlnWQYy21tJLbtGxtFEHT04WBlDgZ5AXyYdsH1jWz4jlP3tS1z++sfvRf50sI82rAOOPiQ==, tarball: file:projects/arm-communication.tgz} + resolution: {integrity: sha512-ky8czAhv63ppT0wDJG83fbQb3dzTHNFHrDYI0RReDZXfRhJMc0WBeLDVrARnqFeS4tg6gM+1u0BJwtvfGKhO9w==, tarball: file:projects/arm-communication.tgz} version: 0.0.0 '@rush-temp/arm-compute-1@file:projects/arm-compute-1.tgz': - resolution: {integrity: sha512-zgoR+wBMIqoaVj1fIAGWAcN49W4gLFgjkwC7myUjMkWzJaAf6tgwKATj0GX+lDpqNiUyqmtVf8kp89JbZJJW2Q==, tarball: file:projects/arm-compute-1.tgz} + resolution: {integrity: sha512-8FzW+vrW6+oGXLHdf0ZDgqSRM9A8PldfJvWO73gIUxacv4/dq5964UyK5F7jw5AZmsgxUCtXSRmA9xbA2kfBCg==, tarball: file:projects/arm-compute-1.tgz} version: 0.0.0 '@rush-temp/arm-compute-profile-2020-09-01-hybrid@file:projects/arm-compute-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-QVt7B4Cs+YnXOIl7Q0P4OgoKyqvF2TJGShDFSYpfF9kaWdJ2/GPwnOzO55kr8WTSdlEVOnRIja4LkjrtZ8OYZA==, tarball: file:projects/arm-compute-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-RXrFNSeYl4yEA9DIbqu5i/gd06j/DxCkOXSp/C358zrk6xpqRQzgWvK+/2gOWXVSe599pzhtNt/UVXpeMwvTug==, tarball: file:projects/arm-compute-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-compute@file:projects/arm-compute.tgz': - resolution: {integrity: sha512-AgZ/l9ck2Nom7li+m6S/vwW6ZdqVbJV3v8qh8QXQHoc+G5iJW3O6sWvS/Cr6opXfPNxqYPgdTsIqx7HsoKuvtA==, tarball: file:projects/arm-compute.tgz} + resolution: {integrity: sha512-hifAAD1GYTmQ/rBDgwhjvRY3RNBjIZBB/x/tcBz+1fn5amRa/C5GMMqtybC853kaVuH2SWOocorrtMHTo/Ks/g==, tarball: file:projects/arm-compute.tgz} version: 0.0.0 '@rush-temp/arm-computefleet@file:projects/arm-computefleet.tgz': - resolution: {integrity: sha512-KNacYssZkHv1/lsUIsCMJ1wsVZw6ssf4feH9W6Pmnz8R/K0rHDiF7E7ambEa+euPWPT6kHal7J9fjxAA1rOIWg==, tarball: file:projects/arm-computefleet.tgz} + resolution: {integrity: sha512-0cXmYkP6BC+rpZF30nOPzX72QzBfHP0iamJAUKGriMelkP/CvSHLzlc0iSChtrvLF+f+7Irm0Rq2CS8fRR8PGA==, tarball: file:projects/arm-computefleet.tgz} version: 0.0.0 '@rush-temp/arm-computeschedule@file:projects/arm-computeschedule.tgz': - resolution: {integrity: sha512-LikjGLDhppCKtO9/RI42l+TovuXgyFifllzgtNrGC3+mkan99xV0Vw/2jCqTL0v+HrFXKsPwrHzvtaWrGfJ14g==, tarball: file:projects/arm-computeschedule.tgz} + resolution: {integrity: sha512-c/+NgTKQURRLUShIyScM53VoFwieM+cr9h+WpoAqCHHvYHW2nvljuSfPoPQHuXMiDVRuiDlHQ+kt4Nq1ZJDguw==, tarball: file:projects/arm-computeschedule.tgz} version: 0.0.0 '@rush-temp/arm-confidentialledger@file:projects/arm-confidentialledger.tgz': - resolution: {integrity: sha512-j22Qkx/N76TwFsM2MQ+7CWpJVTxOJ9AR+bTLJS9b9XuGcQmcTcB4oqIG8huD4FsR4Ej/R2SvWzTInIv7JHTSRQ==, tarball: file:projects/arm-confidentialledger.tgz} + resolution: {integrity: sha512-lxnTzOnQYy5ONAKWE1PhqPo734ZHdeN/zTDexeA5wkvMiCQfjvvUyGDKGbgNZ46IPKR3lvRh5N3g61FAtj+tgA==, tarball: file:projects/arm-confidentialledger.tgz} version: 0.0.0 '@rush-temp/arm-confluent@file:projects/arm-confluent.tgz': - resolution: {integrity: sha512-FLVgTKySPDb+s/YvrFqTOVMlhH6Zzzc/DHsIfFGSsv0CmBlAOOgONRUSOldZAmk8DaBsq9l18OQ6glLk0Kc54A==, tarball: file:projects/arm-confluent.tgz} + resolution: {integrity: sha512-LyR0wtT6/smPX+yMvftXoDVp4ZQd8jMyDyCP+LnhI605m/qTe5Fm3vupvUlXb/HV5wUSCO6CgXAMzKZ8CIjYVA==, tarball: file:projects/arm-confluent.tgz} version: 0.0.0 '@rush-temp/arm-connectedcache@file:projects/arm-connectedcache.tgz': - resolution: {integrity: sha512-br4EU3We4o4ri3cAJhHvkAh/yEeu924X37t899KkKtNmqgI2vP6YX09aWowD9KalMEKuxsXOJtVKuX8IfIa2gQ==, tarball: file:projects/arm-connectedcache.tgz} + resolution: {integrity: sha512-vFESYmaDovvmrGLvaLVxXXWRjqBeSXKUFZQGwBrNJaaY7EOqOubedo8HbeLSyxNQfUNyRACkUiFyks7GIowDRA==, tarball: file:projects/arm-connectedcache.tgz} version: 0.0.0 '@rush-temp/arm-connectedvmware@file:projects/arm-connectedvmware.tgz': - resolution: {integrity: sha512-Z15DBUS0fRC3sFDm4mL6IacP1aROtBEswh4uL11FCGYeMaLBcP4RY466I1TGiQr/C/sOTUpGNfC/7cZm5eNKEA==, tarball: file:projects/arm-connectedvmware.tgz} + resolution: {integrity: sha512-sVqKuuhjeC3Y4Vx33BYYJ5KDwuK9dGt37UwMSjmQAoU5wwE3QQG7CqbgBVck0PyzWpkgDPrbb1vXyEMNVl6C2g==, tarball: file:projects/arm-connectedvmware.tgz} version: 0.0.0 '@rush-temp/arm-consumption@file:projects/arm-consumption.tgz': - resolution: {integrity: sha512-7Qcotg8q//3Yx7sc2L+sC0DNujm0UqL6YvWyCPR9SyrJlysRqjwjLyA1kUAcuIaiLoASVwkN2Cr5SamqBFWt2Q==, tarball: file:projects/arm-consumption.tgz} + resolution: {integrity: sha512-rHj6mnz21Z4PoRZnazbDDICDKW/LCkn5V3N32yMoKc6FHq0zrdZgBLvDnUVBFk+rfeBI9by7Ijgv6M62a5uJLw==, tarball: file:projects/arm-consumption.tgz} version: 0.0.0 '@rush-temp/arm-containerinstance@file:projects/arm-containerinstance.tgz': - resolution: {integrity: sha512-WgW47GC2i6+CKIVHdiPsrxEx69N9bgEq8wd8JxH1DzzYrCrUBjQHc2/gwdfXtCebxOAnV8d34N1I10xTB1zNxQ==, tarball: file:projects/arm-containerinstance.tgz} + resolution: {integrity: sha512-7Ln6v9AFDpQl/LWoSVgt14Vk/6G6b2Ng5+fPi0xVAu1KmskucUfmcQWof1ZYvqk8YSaYP535tuVUPyi4vL7gwg==, tarball: file:projects/arm-containerinstance.tgz} version: 0.0.0 '@rush-temp/arm-containerorchestratorruntime@file:projects/arm-containerorchestratorruntime.tgz': - resolution: {integrity: sha512-jYkdD3JE46i6HXD5rnOW9rRu6d7u3bSM/OFtK8BXKUM/OHVIDZL5zJjAb5wE669ZO02Pp6D9+sNPrMXgapIZpw==, tarball: file:projects/arm-containerorchestratorruntime.tgz} + resolution: {integrity: sha512-SV+SkKPQnTrSIMI9L+tXR1XvTE/XG/QOJ6jXW83H+kfNwTkpG1AAxfXINM6NmKUb7oQrTgcpKTDSsJqyiSbkqQ==, tarball: file:projects/arm-containerorchestratorruntime.tgz} version: 0.0.0 '@rush-temp/arm-containerregistry@file:projects/arm-containerregistry.tgz': - resolution: {integrity: sha512-W5QFkYUymyFC37J474TBVLm8dS4v4SG8jmlkOTdgreoxBrodRGuuFOMq+vCFiB5mysjIxC0yoF4Yeu9tLN2Atw==, tarball: file:projects/arm-containerregistry.tgz} + resolution: {integrity: sha512-nQRVE5Dmd7+CxKK/OWv2BMjjjo5LVgiZJ45yqkwf3YqCijeakpNZH9eZNfSwDlZSxCo8wPw1qkqjgJ4XhS2dFw==, tarball: file:projects/arm-containerregistry.tgz} version: 0.0.0 '@rush-temp/arm-containerservice-1@file:projects/arm-containerservice-1.tgz': - resolution: {integrity: sha512-v4oUge3KUxvfRXctNDpO0S1IXLB7O0NuHpmoBt3SnCMMlmkn0UxzLDwm4mMj/+a8yK+0M9p7jv1uZzIeG7ZtOg==, tarball: file:projects/arm-containerservice-1.tgz} + resolution: {integrity: sha512-MXdBJpqSwAmqEG53FsDK3T68anPmUWPadKn+29aXq+hEqQn1mYaWJdAtBr/DV+UI8j7bhSuq4xskk24HJLC6LA==, tarball: file:projects/arm-containerservice-1.tgz} version: 0.0.0 '@rush-temp/arm-containerservice@file:projects/arm-containerservice.tgz': - resolution: {integrity: sha512-wu7PC2z52hhOWVGgV8Zveddriawa58uIUQrxBTnP7ucjCCt2c+xV59nv5/UJLhWbYt1gZfv6t1KhAzpINWjJ5w==, tarball: file:projects/arm-containerservice.tgz} + resolution: {integrity: sha512-d8rePmExkqv4Y+ofJT19moyj89Ks2keYENuunHVIiXATEx14kjM/wzbRmydjoomkBGa8YOmvHzt0NxGs8xW7Nw==, tarball: file:projects/arm-containerservice.tgz} version: 0.0.0 '@rush-temp/arm-containerservicefleet@file:projects/arm-containerservicefleet.tgz': - resolution: {integrity: sha512-H1wJv0Kf89R2aUcd3f0I10mz2VIjUSYBWDC9WnYUki7iPC7MEHYTq+z2tDhZuapFEmOv4aJOrEXc0W/okK7pcg==, tarball: file:projects/arm-containerservicefleet.tgz} + resolution: {integrity: sha512-TVduI4oRkqnhUwxSMoPifU4trEnWZw450q3mIAtM1850OVx6h9tqHgAiUt3GnvPlfHPw4VZxCHy8S+IWqwIFTg==, tarball: file:projects/arm-containerservicefleet.tgz} version: 0.0.0 '@rush-temp/arm-cosmosdb@file:projects/arm-cosmosdb.tgz': - resolution: {integrity: sha512-3Fsk4gja6/lwm9xM6f8MrnPWcUxgVOEUKTiwNS8qZuWS7hTDVHNLTShgJL0cexrCk5lXXkLv6givho1XVroNVg==, tarball: file:projects/arm-cosmosdb.tgz} + resolution: {integrity: sha512-OrO8Gtlec2DgGUqu/bAelwZ/7QtHLWHEO8GRp6leoDkMPWu2CtRgMfNEK1RPhHTdDDmbTxr7H2gM2X6kW5ds5w==, tarball: file:projects/arm-cosmosdb.tgz} version: 0.0.0 '@rush-temp/arm-cosmosdbforpostgresql@file:projects/arm-cosmosdbforpostgresql.tgz': - resolution: {integrity: sha512-0iXym2ToxLI94WBDmBiDLqaWbqHJv0R/k3eigUdW1BTzd6izDU5srs383HOnQOTnXHw5m+WehR4v8jwpAlBTlg==, tarball: file:projects/arm-cosmosdbforpostgresql.tgz} + resolution: {integrity: sha512-WW8pQ+Mc88D9927pDc2JOu6VvmKjX/CsaHfzVH8FhwPSj0Ij5tp73izIyV5NDzO5EfYgcI8/qCzuUcfnGlso0A==, tarball: file:projects/arm-cosmosdbforpostgresql.tgz} version: 0.0.0 '@rush-temp/arm-costmanagement@file:projects/arm-costmanagement.tgz': - resolution: {integrity: sha512-VITLenQyG97MJX0mubMwI/LF2h6yZ24rPjqB/TVVmgzZn2Sru0SQi/uE1DafH2i66vgrNTixQQPpx2O2/fRcwQ==, tarball: file:projects/arm-costmanagement.tgz} + resolution: {integrity: sha512-I2trlTT5J3zl3JZO1gOY2X+aC9soyO31wC8Jc8BeT4hLEYwDC/bSDHkYpSd7r50OxaOlvGsR6c3dMo9c2XXI6g==, tarball: file:projects/arm-costmanagement.tgz} version: 0.0.0 '@rush-temp/arm-customerinsights@file:projects/arm-customerinsights.tgz': - resolution: {integrity: sha512-98CPhTexsifIk0S98PlaHxE3nKVTR6A2irkoB2gW4h3hCnV5jvuzqE0YkjNOX4WHRlbdsz2VAOurbwJBu0uELQ==, tarball: file:projects/arm-customerinsights.tgz} + resolution: {integrity: sha512-OZT1zaQyVxUdpVCaV/PTkOIq6AW/45ITE0rmk+x2BQVRY6oNgLzYOaV9oZ3WYW6tDqBAEANg6iRH4WWnshTR2A==, tarball: file:projects/arm-customerinsights.tgz} version: 0.0.0 '@rush-temp/arm-dashboard@file:projects/arm-dashboard.tgz': - resolution: {integrity: sha512-pySkisT5QKuWJ2tDXqrSyy7tQxYCav4wRbr1uah0zi6Q4b2DbN9uF1SiH2oTosxdJapmp/iX9t08pFPXdqo0bw==, tarball: file:projects/arm-dashboard.tgz} + resolution: {integrity: sha512-9TAn3nKHexcm3CttnFGhcbHuzdH1quZMRnKTX0CRGQW9aBv8cXtnefvySuMNyfPOWtNJdUNIO4S5D7luk1dIHg==, tarball: file:projects/arm-dashboard.tgz} version: 0.0.0 '@rush-temp/arm-databoundaries@file:projects/arm-databoundaries.tgz': - resolution: {integrity: sha512-wLUftGbWKL+TPyHmCr3+R57RJnDnmMiq39F/5jj9LT6+nkZC5dQqzi/6xQMjel0eO5Hb/gpJPrS0Bh4cVIzodw==, tarball: file:projects/arm-databoundaries.tgz} + resolution: {integrity: sha512-FTpWALpcmz7xC+OBP2z9kvG8k40tXWon1y+lZrkWRtZpv1SH3ZboZUpvDlaS1M5xSU7QQiSuiM2Nevwq3HJ1ZA==, tarball: file:projects/arm-databoundaries.tgz} version: 0.0.0 '@rush-temp/arm-databox@file:projects/arm-databox.tgz': - resolution: {integrity: sha512-FSg7kPpIg0mStu853D+D+lJPioa+NdmPgUjUU18OQIccWclG7gxF8HM7Ef6FNXe0zQYUJ5cz0JMAAuL/BsRDFQ==, tarball: file:projects/arm-databox.tgz} + resolution: {integrity: sha512-wVKbtR3SHxgiUwabg+4FQ26p+aa5z8ul7bzeuPNdMJ7DjSd5qod4eSR4vtQryJjkI5p4RPS2vQItlwJkJRWvbA==, tarball: file:projects/arm-databox.tgz} version: 0.0.0 '@rush-temp/arm-databoxedge-profile-2020-09-01-hybrid@file:projects/arm-databoxedge-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-OHeltnMuqLHzKJaTiM3+603isDei9+Wpa4bc6hhSLe+Dqa8d7X1uZxC5IUvFgLflsorEyk5Wdus0QGG1o7IOmQ==, tarball: file:projects/arm-databoxedge-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-iVPfzvH6auDBZyP+jZycwyaPgTxbIFnkaApwiABQa2eCHmO2TnI97+fyijpmD6e/RVTGUxQZ1opmJ0y7SZAB8Q==, tarball: file:projects/arm-databoxedge-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-databoxedge@file:projects/arm-databoxedge.tgz': - resolution: {integrity: sha512-JVQ5EWutgad5d+Og0wE+lBws/cG7SLRk/P9w3NxaV3RTUBY2Vf2fhrhdg479exk5uZu05l05bTE2RmpMi1tJ1g==, tarball: file:projects/arm-databoxedge.tgz} + resolution: {integrity: sha512-B61mUbBbqOEorjzLSn+L1dkIlHb0X9eI9FE/XCaFCPQga1G7KtCbQ0P1MWJi7UFy4Jju0lJAkz2uDnwzGSdvxg==, tarball: file:projects/arm-databoxedge.tgz} version: 0.0.0 '@rush-temp/arm-databricks@file:projects/arm-databricks.tgz': - resolution: {integrity: sha512-5pvFm0wQoAJ30xwdyNfe3OhSrwAfR9tLkQHaDhfaFGec2T3yQgMCdnRzy/eGnecu8iqe5SmVjftfW6J/M7rF6w==, tarball: file:projects/arm-databricks.tgz} + resolution: {integrity: sha512-HhWOdm8xW1q4F6oOggt6lhvGYPAj/V3wKX/UZv+6an1Tp00SEMSUOCeQaeyvV4Cy7mXVXrFcM8waGIS1JI8M+g==, tarball: file:projects/arm-databricks.tgz} version: 0.0.0 '@rush-temp/arm-datacatalog@file:projects/arm-datacatalog.tgz': - resolution: {integrity: sha512-VxXJY2cECk5BNFzuevpj3c+lOsA68L66GIbP6Gs6CsTS8k5b4FpdaTc1fhMPpySIy4XVNORSolv41dc07lRd4g==, tarball: file:projects/arm-datacatalog.tgz} + resolution: {integrity: sha512-tGav2Xm8/R49XTbNsRkLaduXpbfKCWc2yELrEhhCZgc75arSx3oFezTWMrCHAj/vedqpOuVUcAL2qUG+dOdWbQ==, tarball: file:projects/arm-datacatalog.tgz} version: 0.0.0 '@rush-temp/arm-datadog@file:projects/arm-datadog.tgz': - resolution: {integrity: sha512-XYTLBwLoUbG/bLpurxfYc8fdjJdC3k44eyELiI7xEvTlf8YOgaNo33ZiD9M6qrk1zAq/lMfiQAftcn4r1HFp2g==, tarball: file:projects/arm-datadog.tgz} + resolution: {integrity: sha512-UFYwBhhTm+f5u1evJf1GPaz5AhRcn9Juj1zt81VR0Z9sVmUr/l7fF89Lh+Qkt6GRg5syv8CZYaSSc1zo6Kndmw==, tarball: file:projects/arm-datadog.tgz} version: 0.0.0 '@rush-temp/arm-datafactory@file:projects/arm-datafactory.tgz': - resolution: {integrity: sha512-qikjmI+QVuFy+i7rnXt14yi76naXGNw8UJ6ZtLQf5KQK7rC2y+ry2j4ZgJJJml9pnnNs6eLGkNZXTNhFEgIt1Q==, tarball: file:projects/arm-datafactory.tgz} + resolution: {integrity: sha512-gGZGKv/2W3PKagNsG+DGP99wkQXtdBiEfl8mc/RJcG349cUedSrZWd/q8hfxh00N6ViqVgcl9AjsameGKkBeMA==, tarball: file:projects/arm-datafactory.tgz} version: 0.0.0 '@rush-temp/arm-datalake-analytics@file:projects/arm-datalake-analytics.tgz': - resolution: {integrity: sha512-hXqpBd45FAkLY/h8f2RIm15ooelN43tPObFvT5WRDaJrgPynWtKX2eUmAQs41UcojREicRhESARygfNRZ21BVQ==, tarball: file:projects/arm-datalake-analytics.tgz} + resolution: {integrity: sha512-Pf3sD+mtZsYhp2A8zFa7gII5UZPc/5vvj6fxe/WfBmLcqYyObhW3W4+ubBO5KN6rvxwlKXOtDDx12t+CoRCKIQ==, tarball: file:projects/arm-datalake-analytics.tgz} version: 0.0.0 '@rush-temp/arm-datamigration@file:projects/arm-datamigration.tgz': - resolution: {integrity: sha512-vNVORYVrOdqlZIYpSREFNkORdR87NaWeUQ8t+71A8sohrmXDy8n8A3NDWzmf/ED28YJU8tgciMbTaVJSU7JkHA==, tarball: file:projects/arm-datamigration.tgz} + resolution: {integrity: sha512-a+kXVuOHrzNMoPvyZDVDpwectbh8gW9CzzeeB1212yh6BiO+mSdXSxD4QMuygXxmNIxSHhgzb8MwG3r1qVToAQ==, tarball: file:projects/arm-datamigration.tgz} version: 0.0.0 '@rush-temp/arm-dataprotection@file:projects/arm-dataprotection.tgz': - resolution: {integrity: sha512-kSd61PX2ko37Zdy1zjwGmFVlnQ2BX/tOJY5f3ZuLXu+wz+ZlDB4ANSJx+1mQEXay+W+LQOyGGmpsKSqIBeGgag==, tarball: file:projects/arm-dataprotection.tgz} + resolution: {integrity: sha512-N2GOJeRGNBqeYF8jICoy9Iqt2x2pEE6bFIyom9EDT8v1s1XaYoqymLoKwjYMllGky+3ZGTVxKctDSxqlpDUZJQ==, tarball: file:projects/arm-dataprotection.tgz} version: 0.0.0 '@rush-temp/arm-defendereasm@file:projects/arm-defendereasm.tgz': - resolution: {integrity: sha512-MnYHXcs9ykG0T3V0q6MG+dgjwjv+ab0iKJJ4pVgJ+x7W/D2L0M06xjkUIOgnM+OqCvevgAQjXcODYUVQ/TCCLA==, tarball: file:projects/arm-defendereasm.tgz} + resolution: {integrity: sha512-9aibOD4KZ/vMVE9uxjAvkl+XNJvTcI5T4JyWFT+xsm10mOor9BtTFkpOOEzW3L2rzwgqDkRufBcl8YX30A65qA==, tarball: file:projects/arm-defendereasm.tgz} version: 0.0.0 '@rush-temp/arm-deploymentmanager@file:projects/arm-deploymentmanager.tgz': - resolution: {integrity: sha512-oCGXrk98Ct8xhUpegmObQg42aL9LRFo2ZQaUECDVyos2s1nRNp3JhYa4uZ88REEfHkQvsxDeIiHL9Ay/5CWbSA==, tarball: file:projects/arm-deploymentmanager.tgz} + resolution: {integrity: sha512-q+HTSfzfG+rqXpa/elgcISj/cC0SYeJ2/1tJaNAj9c3OHMh5kA/LCn5iLaCjihfa91zQJFqiZz0h10EiRlGDgQ==, tarball: file:projects/arm-deploymentmanager.tgz} version: 0.0.0 '@rush-temp/arm-desktopvirtualization@file:projects/arm-desktopvirtualization.tgz': - resolution: {integrity: sha512-KvsIp1oUXXoO/YtSCmFUnFKBu34dVDPc+LIJGF7NqqikgTW5d81ZBrB2ja25i4n3LwdfDaeqneFqeNnDE6HUnQ==, tarball: file:projects/arm-desktopvirtualization.tgz} + resolution: {integrity: sha512-4olKnT3/xgxuaQCpem59XW51YbXs0rlMLOGIhXE5MO5+kp6DVAQbjOSEsJLtO9A9QpUs057NE1rBuslHYB6+UQ==, tarball: file:projects/arm-desktopvirtualization.tgz} version: 0.0.0 '@rush-temp/arm-devcenter@file:projects/arm-devcenter.tgz': - resolution: {integrity: sha512-yQZn1aS20uu3vu3W9QEztzHm0KPdQ0oiR4XPPiNa4VL1x8QmFFo13Hy34vZitSY888ndj03+ia9duFuP1GcHXg==, tarball: file:projects/arm-devcenter.tgz} + resolution: {integrity: sha512-iMaC3yvDbW9YOPcXSEXoK6ahbpxzperM+VMUxD7pNEzWpJjJVUqfJMn/rj/eb14RPpEZWz3OJHcDhxoGLNhW4w==, tarball: file:projects/arm-devcenter.tgz} version: 0.0.0 '@rush-temp/arm-devhub@file:projects/arm-devhub.tgz': - resolution: {integrity: sha512-NN9OVVJae5zu0J9q7xr90dMrTEXGKD28qMqk4Ba+cHcdygvmO6oUj42d8ZP3s7+kglxfReusRSPvr5etXBHv3g==, tarball: file:projects/arm-devhub.tgz} + resolution: {integrity: sha512-QjyPnOwFP5mPT/FrQ0m6sLZAedWSzOPU69uQtGGbEZhfX2TqwK321KHgaONjFEsf2yH/JXVpGHvqFp8RpGxhaQ==, tarball: file:projects/arm-devhub.tgz} version: 0.0.0 '@rush-temp/arm-deviceprovisioningservices@file:projects/arm-deviceprovisioningservices.tgz': - resolution: {integrity: sha512-H3u0KwxioBNNC/0D2s4NZyKq3w1Uu8tldR3f6TebaVBNnd+Jv1Im91AmPro0GFW4LOqlZYSKYCEJ67qUvqmlEg==, tarball: file:projects/arm-deviceprovisioningservices.tgz} + resolution: {integrity: sha512-LtsvjluihZbDOjb19qdSo+VdU9HOcMbGdXrdYWz6EaT1t9lff1Fczfr6MhLUK3H2JF92a+ANgGZ83I7yHJVSLA==, tarball: file:projects/arm-deviceprovisioningservices.tgz} version: 0.0.0 '@rush-temp/arm-deviceregistry@file:projects/arm-deviceregistry.tgz': - resolution: {integrity: sha512-53HdFn7sWJMsEEpdv8FwE0mDhnehuXbvD4YeVrHpPv0TfNtcJDESDZn89nxCueKAskryv50CZc60CSt1fmYK2g==, tarball: file:projects/arm-deviceregistry.tgz} + resolution: {integrity: sha512-0bWMD74mBtOu2gcjb2Sv8ItM8hzu8pOfQHcKge9qnAoL+F/a9AVxjZLbr/jiA/o0RFMWJEtWgeDUeM6HRg4+7g==, tarball: file:projects/arm-deviceregistry.tgz} version: 0.0.0 '@rush-temp/arm-deviceupdate@file:projects/arm-deviceupdate.tgz': - resolution: {integrity: sha512-wQQyZndge/2Gn6lNdhoRXzgBUEkQM6K9q1zX8MQ/hwOCiR+8PcUMLx+FAwUTLEOTZhKEK5NK3UOKiZ6r4rdhWA==, tarball: file:projects/arm-deviceupdate.tgz} + resolution: {integrity: sha512-O8T8MSzp0+T1BREa9gE91zzR0GA38D3kBosDUTY0gff7y6hG+sKFg15W/wmK4PLNda2rS2luNHivVid9cB0eEw==, tarball: file:projects/arm-deviceupdate.tgz} version: 0.0.0 '@rush-temp/arm-devopsinfrastructure@file:projects/arm-devopsinfrastructure.tgz': - resolution: {integrity: sha512-26NUbY9nDuqLqDF06QZFrMoNdmuI3nmYfTx5FjpwRcMR+jJobCAbvrAD5AKLz8AM1cdbls6LoEXEEd9XmsgALA==, tarball: file:projects/arm-devopsinfrastructure.tgz} + resolution: {integrity: sha512-c2J38ucLdV3wJZJOu0HfFRUvGKApKpSzQl1jt27R7AS4hCm5Vei2ZE85zE3nf84tytFtqQmFpOLWFMzjbCX9Jw==, tarball: file:projects/arm-devopsinfrastructure.tgz} version: 0.0.0 '@rush-temp/arm-devspaces@file:projects/arm-devspaces.tgz': - resolution: {integrity: sha512-aixqVLljwv0PTFefmZGXVzq6uw6LVKD2nEkMZoeQ4LQtXRKGrWmHQVZhJhhipYrWBvkLkujd0PKzlg0dxLUtIw==, tarball: file:projects/arm-devspaces.tgz} + resolution: {integrity: sha512-M+g3ehZVqHp8ZmRdIIw7OOak0xE8wLi8QB82lK4jqhpdftPnToxYqGNTVHzsLJKRC0P9L3EUjyb3kL+WJNgA3g==, tarball: file:projects/arm-devspaces.tgz} version: 0.0.0 '@rush-temp/arm-devtestlabs@file:projects/arm-devtestlabs.tgz': - resolution: {integrity: sha512-h2kzODtzcDyb2xt2wGE8UiseHJmiEGyxJo8AOHtX24AoK8egbBrSgKF5QkDRRkorMpL3sJwr8QghV+d70sJ+2g==, tarball: file:projects/arm-devtestlabs.tgz} + resolution: {integrity: sha512-kJi/YWvLwigtrX95bHndXd4J9JzMwCe7D5sz7NByvI7t7Hb6tKBBNILlK9jMv0lKCKrVhWW/oMzVMRqfjqyfrw==, tarball: file:projects/arm-devtestlabs.tgz} version: 0.0.0 '@rush-temp/arm-digitaltwins@file:projects/arm-digitaltwins.tgz': - resolution: {integrity: sha512-h+IMoqeCBx7ZWASIro+G6pOZpMiJFvIhhRSa7T8WZP3yR4J8NZuHfejB7eE0n2FTlZ0idwB8iFoVIEHe7caCFA==, tarball: file:projects/arm-digitaltwins.tgz} + resolution: {integrity: sha512-qjYFTmBcvdfjTFfMp9Hpfhjcz5s5PnLzFZGqMlFFfOHlws3HPj2Qvg7ZQL1N0EgelTscVBGl0gDqEJb421kepg==, tarball: file:projects/arm-digitaltwins.tgz} version: 0.0.0 '@rush-temp/arm-dns-profile-2020-09-01-hybrid@file:projects/arm-dns-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-ZPZlpv2BkW6vDdX8sWIwMEzAG8XmLkqDW596p/bk+ppet7TSKVlTXJQm715ax5j0hrMvdv2Ou6sz9WPLvGk8sQ==, tarball: file:projects/arm-dns-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-CEhB1OAmb7SrgomYCrRpWEbRvfbBC/dQsl1UU+iMxwxlGuESbsY+DeKNiBRjL0CpXLk7cA49bE1pJsgl1OLPCQ==, tarball: file:projects/arm-dns-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-dns@file:projects/arm-dns.tgz': - resolution: {integrity: sha512-Krrg2bNHSMdpPBmAiYHiamqHR8CGmHDhsbqwSGRkf9lk5Fj4g32yIfmnFaccZayjwPffwrJvrogykYnRoAJB/Q==, tarball: file:projects/arm-dns.tgz} + resolution: {integrity: sha512-Fv1+I9t23YOn9aPQ3qJ1utd9el+iP0vXU6KaAQmDDiqnEOeTzBs7VEX6OdOmknk6mMQY4cz1jFvWXSOXrbG81w==, tarball: file:projects/arm-dns.tgz} version: 0.0.0 '@rush-temp/arm-dnsresolver@file:projects/arm-dnsresolver.tgz': - resolution: {integrity: sha512-d4MKBBo6BLDZMrq8xeYUIEkQzl1n+5WwFEqTsXgxYFn3ytCkWbxq2wJZLa42lj5yQbUn/qAdb30CRCId7OLF5g==, tarball: file:projects/arm-dnsresolver.tgz} + resolution: {integrity: sha512-xpWvSv+gKGY1qKThdCTI0c/47qia5bpHYmulft2ldiT/cpJX/1q9Tso7xxKNE/BWw0t5BQZf2paSRtkNTUXMAQ==, tarball: file:projects/arm-dnsresolver.tgz} version: 0.0.0 '@rush-temp/arm-domainservices@file:projects/arm-domainservices.tgz': - resolution: {integrity: sha512-4E4gNwGG0RGAqvHo8ExneMfHPn6WVY3Yy2C2F5XJXbdOKZiAdbWy9nXJtTk3LaU3h+TcXlKvjZY5QqHtD36kzA==, tarball: file:projects/arm-domainservices.tgz} + resolution: {integrity: sha512-NQwbddlbcBARuNp0948HFU37x87IX6HazeKDxs11UJEO6R61MRQQ1ce2UwwiCxHLxJwIydsrTf3LGmVKW05hdg==, tarball: file:projects/arm-domainservices.tgz} version: 0.0.0 '@rush-temp/arm-dynatrace@file:projects/arm-dynatrace.tgz': - resolution: {integrity: sha512-Qxua3jCy2Ce6/e6QCVgzl4BAIm7B9TYT4gq/REbVugajXMmYLAg7CzYOnEGO+fn6GKNVI8JfGOJ7Md2wGufZSA==, tarball: file:projects/arm-dynatrace.tgz} + resolution: {integrity: sha512-jICt7MQw+5bf4FyrFeumvGzjCMvsoziof00iRuOTbFoe0bdYtu5ms1VU5nm4a6FMdYEgPGjViFxzejRmqD+gqA==, tarball: file:projects/arm-dynatrace.tgz} version: 0.0.0 '@rush-temp/arm-edgezones@file:projects/arm-edgezones.tgz': - resolution: {integrity: sha512-7Lx+GC3XiUXQHYTMYyxOJZ1oNmYQO17cc4GvuXpm6dv7siGj5rCidZiebA53JEWr/TspcctIeGnG8AHLAVsBYw==, tarball: file:projects/arm-edgezones.tgz} + resolution: {integrity: sha512-ZoTJK4gY+gSQG8vzzx1eTkG3sQ6PEe1WWm3ZlaoJeWOvCrcc4SjiB8ruztDOrRlClU6EfiRxPiHhCnVxzD+orw==, tarball: file:projects/arm-edgezones.tgz} version: 0.0.0 '@rush-temp/arm-education@file:projects/arm-education.tgz': - resolution: {integrity: sha512-kEkH5EbmXARAMym5+1asm58axxzQstB85hXIT6w+5Ym23DYOzh4L/YU/OYplcY8YrcfD3e+kDTxfFCueTW+ZBw==, tarball: file:projects/arm-education.tgz} + resolution: {integrity: sha512-zgdkezssOrcBmUh7p+8lhakVNR6IDF3w6xSwxxp27Pdnw+WFFu4yd5Y13Hxcq0wFpksPbFIRTMwvojykpnh8lQ==, tarball: file:projects/arm-education.tgz} version: 0.0.0 '@rush-temp/arm-elastic@file:projects/arm-elastic.tgz': - resolution: {integrity: sha512-DinFfqf+rpdVwbcYy4jtdhdzjPahFH1QLgR42KJB32//9wyd/ahLtKSck8lyE8VXgLwIZnDCfC2R+TFHWxXr+g==, tarball: file:projects/arm-elastic.tgz} + resolution: {integrity: sha512-B6JtLtbIk8dsI/Iq8egINVSQhJb4yazileCyk8KeiiRuudTQzSw0Z7ZeNSPrOM378UmNYoBFEinoI/u/wrBaxQ==, tarball: file:projects/arm-elastic.tgz} version: 0.0.0 '@rush-temp/arm-elasticsan@file:projects/arm-elasticsan.tgz': - resolution: {integrity: sha512-13eBsAn43tcUqJdR7FF2JgIlvniY7NarMgE6VqVcSPfEeretB1qOnMRxpbqiiK5PM8h+xNRKKWW6sHPvnzeqZg==, tarball: file:projects/arm-elasticsan.tgz} + resolution: {integrity: sha512-1qMDLi2rMl5RtIwcFp/87hIdDA7Xi1ReMgfNC5ZAFUtTAJEtxDS+LSa4EVvE5SmhV7PO1jyffD588/qqCTQVFw==, tarball: file:projects/arm-elasticsan.tgz} version: 0.0.0 '@rush-temp/arm-eventgrid@file:projects/arm-eventgrid.tgz': - resolution: {integrity: sha512-JjB7sWlLaJJI17Aq5LjyF8E2T3cpcHTX2TFPZH6HuYgDbyW8HNh69cQiTU8zn4SOtCsjngdepNDZJ+89GDN3ew==, tarball: file:projects/arm-eventgrid.tgz} + resolution: {integrity: sha512-XrBQvYOCJPcgRwmh+OfSW6RriM1kEJgvdHN7v7YKv7CxC1GTHPeydXjDkXdJGPytQCM/mhkXhU51BjBNBlEmJw==, tarball: file:projects/arm-eventgrid.tgz} version: 0.0.0 '@rush-temp/arm-eventhub-profile-2020-09-01-hybrid@file:projects/arm-eventhub-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-MJwgCY/Lf9aKmlVWfZU6ijOoaq1rER0NsdhwIpQYWmPNIRs/3pRZZK8SOiIdn0UdCsSzYgjQe3a4aKCQ23wvFw==, tarball: file:projects/arm-eventhub-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-AP8IjPiTg9t6TKSl/lfEY1IKOtwI0z05cgW/HLsLtPeANS38CO8i4Gc7trXpueplOupT9MA+p+I4BUKLmNvaMw==, tarball: file:projects/arm-eventhub-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-eventhub@file:projects/arm-eventhub.tgz': - resolution: {integrity: sha512-Z73wU6oog7l372K5Jh8PvfRBCJrMsHVrMdPlSuSWyrSrOEpdk/BtkbQLSimzrEE/CBIxC/YWJT8+wCqsBdmTFg==, tarball: file:projects/arm-eventhub.tgz} + resolution: {integrity: sha512-ri2+qZVF92tZRkr8jIA9Z2M0cDH4IY4N02eweD9VkuMy7ljbUgOEfQPyBODwgayzEZTTypkWfYPHPkMd5cjAgQ==, tarball: file:projects/arm-eventhub.tgz} version: 0.0.0 '@rush-temp/arm-extendedlocation@file:projects/arm-extendedlocation.tgz': - resolution: {integrity: sha512-9NfCa99idfVPvPHivzstA6VTI1qsu7GM+kpVA9Mmr9R9o/x7gGXRb4P/ICcOjpFLqVx/fBty0dAfT9EMYLz3mw==, tarball: file:projects/arm-extendedlocation.tgz} + resolution: {integrity: sha512-0Q4ERpGjiu6ysPmv81Wwia+ia1IFntKL3bxUDXRZnF/CIBWSxIJz3mc8Y4KBTBmU2hFT2XqDtRF0lEb85/mCDQ==, tarball: file:projects/arm-extendedlocation.tgz} version: 0.0.0 '@rush-temp/arm-fabric@file:projects/arm-fabric.tgz': - resolution: {integrity: sha512-ICWVjR6hU0iagAV8KUf4dINj8JVMdphqd+y6bJH97q45JuzNuOdSFTw4XA/cI7bZn6OuanDSpwQN0JIFlgZZnw==, tarball: file:projects/arm-fabric.tgz} + resolution: {integrity: sha512-Kyj7uF0W9WuZiwZhsGWUoHiMEIKtnxcQ3Uitor3xe/snSbHxiphCowhrsJqacCpV7O1KNDye/GGJAT9zPi6aHw==, tarball: file:projects/arm-fabric.tgz} version: 0.0.0 '@rush-temp/arm-features@file:projects/arm-features.tgz': - resolution: {integrity: sha512-soUDcRTTSIxaFoxhHY+Br3eQbDoC32FoD0tRWcp4iEtMPx8xg1SR0WzTrUQjBrcA6T0hcUD/xifLdRI/f6PGrg==, tarball: file:projects/arm-features.tgz} + resolution: {integrity: sha512-kti6F+TM3DQ/Ozti2/w9o/+20Uxa76UOFHeaffxym2Q1IyJsVxb3amRq/OSLWN++60cgbjZvsNRWxwQoO2DsUw==, tarball: file:projects/arm-features.tgz} version: 0.0.0 '@rush-temp/arm-fluidrelay@file:projects/arm-fluidrelay.tgz': - resolution: {integrity: sha512-KgyOOxK2OVyNDlD8qyxYRoxbX34RJi7tmrFLreSOHHAlx7s/1iRGQLKl8uli99JEfbXn5rxPQ2OECys3NZEMLQ==, tarball: file:projects/arm-fluidrelay.tgz} + resolution: {integrity: sha512-47brk8m6avghNARU5QKN4MezZRyr2JZL+A0fov20hXxQOHBf3EEpRmDESa5d4jLreDZAdwNvddLLxCODCokxFA==, tarball: file:projects/arm-fluidrelay.tgz} version: 0.0.0 '@rush-temp/arm-frontdoor@file:projects/arm-frontdoor.tgz': - resolution: {integrity: sha512-uZsgDcWezCBHlRhNxqGa2ky9kWeS6n03IaRcoGBrTFoxSjxPbd6ak9LJYewanKRlFYzpgdfeRX3PkH0QdMSMVQ==, tarball: file:projects/arm-frontdoor.tgz} + resolution: {integrity: sha512-wMp26gijFQThYzDwxV7nktYGa7w+hfE7bqpU4Eu3NqQhxHKQjv9bYKi806hKF4KMtgUmXyUZvjCFuT/SINYpCg==, tarball: file:projects/arm-frontdoor.tgz} version: 0.0.0 '@rush-temp/arm-graphservices@file:projects/arm-graphservices.tgz': - resolution: {integrity: sha512-TGzs+7Ro1M0sC99GN+Am+Rxpn7zQCfZqnUMtVDR0i+gJcuUs+k0Ae9KbnCWBuALNEkgz6+J4LUEp7tGioqsyoQ==, tarball: file:projects/arm-graphservices.tgz} + resolution: {integrity: sha512-2M+eN+lfRPYn6HN0BHfUXy7kQoH8DvQ2qEvUPduoWKrcmGI776p9buBXpX1bX4X2SxARMPuND/fzaUVsG5m1Fw==, tarball: file:projects/arm-graphservices.tgz} version: 0.0.0 '@rush-temp/arm-guestconfiguration@file:projects/arm-guestconfiguration.tgz': - resolution: {integrity: sha512-Qx8VJusJZqiya50IWU1bDdHLdpCn0BsazFuG4itqnYhHNrbnLfPE0JVa7OH99c4CjyOB6X9mWHZqkkI8AcWS8Q==, tarball: file:projects/arm-guestconfiguration.tgz} + resolution: {integrity: sha512-F1wj/nPt/Mjwn8jcyea47ScQSjhLZDfXQmwE8pOUAXDoGYNY1n08/1uGB2mQfkTzV7V+2Uwkax5Y62uuWpJEvw==, tarball: file:projects/arm-guestconfiguration.tgz} version: 0.0.0 '@rush-temp/arm-hanaonazure@file:projects/arm-hanaonazure.tgz': - resolution: {integrity: sha512-rRNuo0l8Zg6E+KYcsWDtU5+YNRanhPVH94nSuaGgtE5SHXxzP1/cCaC+TiUBh2nv2ix+KdQLfk7KvrbxLql02g==, tarball: file:projects/arm-hanaonazure.tgz} + resolution: {integrity: sha512-QZsMXKEvae/3PvdYS+HNgeJiJcLgGZTD78jkTlOJR4trC0mT3k9pABY8UdAUuNbCIzNDOdidvYvz+ShGWttqog==, tarball: file:projects/arm-hanaonazure.tgz} version: 0.0.0 '@rush-temp/arm-hardwaresecuritymodules@file:projects/arm-hardwaresecuritymodules.tgz': - resolution: {integrity: sha512-h80yFNPvE0S9rUyvFg79hGGId9y9JHWWOfcFfA0pZirLBBwjGlQ1NEB+RC7vxjr/PSS5FnHU0c1POvelvE+i7g==, tarball: file:projects/arm-hardwaresecuritymodules.tgz} + resolution: {integrity: sha512-0COU6dKzH/k+PqurC4mXNIUmTGGEj+vnTL2HHKM2wBd1C1V9bd+sKEl629b48jt4e8KpPCzN1FZIPXaA6XJANg==, tarball: file:projects/arm-hardwaresecuritymodules.tgz} version: 0.0.0 '@rush-temp/arm-hdinsight@file:projects/arm-hdinsight.tgz': - resolution: {integrity: sha512-h/hHPg6Y+KLB1rIOMpMH4zVVyiDei0I3FB0nn3yH+3tfiD1RmS9TqQR5gdZ6aXV4JAObUNTPCbOjvHLz3KPvgw==, tarball: file:projects/arm-hdinsight.tgz} + resolution: {integrity: sha512-cFm0JaE8DE2/1wdnORgG87Wlb423ibRA2eU0Aeuwp1ruF7l8eFTb+gf3SbmFNKi84dbW3wfVn0TFqfbBUFFJdA==, tarball: file:projects/arm-hdinsight.tgz} version: 0.0.0 '@rush-temp/arm-hdinsightcontainers@file:projects/arm-hdinsightcontainers.tgz': - resolution: {integrity: sha512-8C+RTGt0qg6PaaDafHIohAeyig/HDvr6oul7HALAp99rYT/hcXVa/bXeIEar48gqV3qvZLGCfPG0qEjSCAUMgg==, tarball: file:projects/arm-hdinsightcontainers.tgz} + resolution: {integrity: sha512-tL1unEs1FKpIJ1mSTRCQokD/GGH9NzHuDeRjoNkC7GWolbxU34GhRNtygd4NvNoSahMSBjuDKOPemITJDBYx4g==, tarball: file:projects/arm-hdinsightcontainers.tgz} version: 0.0.0 '@rush-temp/arm-healthbot@file:projects/arm-healthbot.tgz': - resolution: {integrity: sha512-ZvCbgCLFOf7Zjy7NUcEon24b7NvIvYEs7LrHqaB4UcEv4zLu8lWWsYdhPsl/FQ0/2x1wcj1ptuUr7x4nyTluoA==, tarball: file:projects/arm-healthbot.tgz} + resolution: {integrity: sha512-nYkDXZsTW28brbQs6w9oNMxPji/gj51fZXmBg8sbCiC7pscBxM91wbfkxdezb/SOBX9CvBvp3t/jrGtFvNoPeQ==, tarball: file:projects/arm-healthbot.tgz} version: 0.0.0 '@rush-temp/arm-healthcareapis@file:projects/arm-healthcareapis.tgz': - resolution: {integrity: sha512-XFGG59GhCl69iQtxM07G7wqajRc1Hoz0AQwjlJsZzovvDTRCRBshi5/tV446k9TIiwfUbE5SGhUSmeXnG6I5+g==, tarball: file:projects/arm-healthcareapis.tgz} + resolution: {integrity: sha512-lc2GPSWRF+d8vvfhOMp52C3wh1o3FrHtkvFlXAsbA5BcozgS9O+MpIYOLK2qDd5yvc9JDg97dPndUOBHMrsndA==, tarball: file:projects/arm-healthcareapis.tgz} version: 0.0.0 '@rush-temp/arm-healthdataaiservices@file:projects/arm-healthdataaiservices.tgz': - resolution: {integrity: sha512-dJpfHl/LBPMZLu5rkXUEgX979cUA42TJ6FTsucJK5453bRpMnVioKezlFOUIxPkcVoS7WTd+aYg1kwLDhzprfg==, tarball: file:projects/arm-healthdataaiservices.tgz} + resolution: {integrity: sha512-ODMnBnH3q7IzgBleBT0YhmR5ZwoLw4tmF2epFdFzQ+EuaI7ZzfyWoWlPpJu4RB8ZGvnlQSvCd8eMTDOKL41rFw==, tarball: file:projects/arm-healthdataaiservices.tgz} version: 0.0.0 '@rush-temp/arm-hybridcompute@file:projects/arm-hybridcompute.tgz': - resolution: {integrity: sha512-amI/kQ47EWaSbp+zsIm9U0jb4ZpLZcjRHFgNccOUfp01TSqAIHAG5Twa8flYNJz2Bz9mN1nG/M5KqlZ/wuucMA==, tarball: file:projects/arm-hybridcompute.tgz} + resolution: {integrity: sha512-6IHRzN5LEPWKPmytB6kF9+Yn872LQwicXzFYnTGps2NCYZkBeEuq+969nuSbH+fnTfLwoaly+CYICyGtAWSNIQ==, tarball: file:projects/arm-hybridcompute.tgz} version: 0.0.0 '@rush-temp/arm-hybridconnectivity@file:projects/arm-hybridconnectivity.tgz': - resolution: {integrity: sha512-Tnu9KX8kw/tik9X6yOzTyq186+vhz80ILoSoevWNIl93DU/EKo6hTAGpBVOFqjzNxqm+iqLgntfN5wSCSmvhfg==, tarball: file:projects/arm-hybridconnectivity.tgz} + resolution: {integrity: sha512-SOh3A2AkiyffUGwW4Uh1jj2p8EJ0Vv1+Hqfg4t63C5unphFFauEGxKYb4ggWZAJw2qqwfurLxkZgfCXQhh7J7g==, tarball: file:projects/arm-hybridconnectivity.tgz} version: 0.0.0 '@rush-temp/arm-hybridcontainerservice@file:projects/arm-hybridcontainerservice.tgz': - resolution: {integrity: sha512-ov1rUIrnCBVx0Sg1udes6gK6AOCR9ucmXAmi4jpIVsc2TwBk6wy9SHuhQr4GGR8oT6/IoIeVFmEWbSmffGr1+Q==, tarball: file:projects/arm-hybridcontainerservice.tgz} + resolution: {integrity: sha512-DuL2F7HCF2FOGm6QkEizwd0NEkA0i1CN6BKGhOeuYa+A/G6SMAtPAtbmh/h2mckVnscteb66Aycbcq/5UIJkiA==, tarball: file:projects/arm-hybridcontainerservice.tgz} version: 0.0.0 '@rush-temp/arm-hybridkubernetes@file:projects/arm-hybridkubernetes.tgz': - resolution: {integrity: sha512-6zX+oNC7Bsp4Xll5Rlk/i8S+iVu+H03Ljs6z4XEPbeu2WwMy3gYLOGEbvWwpYLgXhBztbHwUisB8WutiHKgdqA==, tarball: file:projects/arm-hybridkubernetes.tgz} + resolution: {integrity: sha512-ZCf5wnyi9Odjuo9zi4fNutKPMgbg47kGuF7ojJJMJ6LOUyCL5IuLLh/SX6039WO0j+apYIG7s7lTmBW2/Fv9aQ==, tarball: file:projects/arm-hybridkubernetes.tgz} version: 0.0.0 '@rush-temp/arm-hybridnetwork@file:projects/arm-hybridnetwork.tgz': - resolution: {integrity: sha512-fUTQ5hI8Vf7J2JLGf6mVsUm0rjvoNoCzuK9cltel5vfiymRIAAviIPbfZsrso3y2fgInuVnadjZegICiYTdTBw==, tarball: file:projects/arm-hybridnetwork.tgz} + resolution: {integrity: sha512-XioKMmwABSZ/yHHr2yM9gdnxl4822IC4XiEG830v+11KXBgac0n5PYeFA+HheB2BoFLFVCP8bZeUM/mtBby7Sw==, tarball: file:projects/arm-hybridnetwork.tgz} version: 0.0.0 '@rush-temp/arm-imagebuilder@file:projects/arm-imagebuilder.tgz': - resolution: {integrity: sha512-CaGA+yU+KisoqzdQk5pvAVaYjG3Vjp61lEslJIP1fKEE4BtPIj1OZxInvu/YpdcCPs5GvQ5OulxJ7mjp5o9Q3g==, tarball: file:projects/arm-imagebuilder.tgz} + resolution: {integrity: sha512-xVMlrAkVP+4wOhBNW6yd7XT893i0I7BbmS1RdKbS453C+f8CcGe5ldoOWklofd2q0vFGqw5o9H0rK14p7rG0zQ==, tarball: file:projects/arm-imagebuilder.tgz} version: 0.0.0 '@rush-temp/arm-informaticadatamanagement@file:projects/arm-informaticadatamanagement.tgz': - resolution: {integrity: sha512-s//Ip0XxZUTqc6Su/vvGsXmZEEMqRrwIgAe5B5M9Nl3H0ObVu117Xivlz45ysk7GLDeFj2ly5W+ZhyLjbhLFDw==, tarball: file:projects/arm-informaticadatamanagement.tgz} + resolution: {integrity: sha512-qzd7xZCaeDEQJT9aXHbhrFUofCNWra6+o3IrcY6JgkdMSn/fI5+h0pt64FguzGhnVaJRcJ3i54N6X0EiyPlcVQ==, tarball: file:projects/arm-informaticadatamanagement.tgz} version: 0.0.0 '@rush-temp/arm-iotcentral@file:projects/arm-iotcentral.tgz': - resolution: {integrity: sha512-v1pzEoQKkZGUCmaT/n37wUfupb9UYuWYFdgvRHihDZtzgn26+Z3kAdqEXIW3Ka/F9Zjf3fHHkEw7nGn6/xrvsA==, tarball: file:projects/arm-iotcentral.tgz} + resolution: {integrity: sha512-dUHimMPtETSCEnlFIwhu8DdkB7OT8Vx/Lzxn0vYVU+lCDVbdALT2IRNqtmchbN/wd+3S7TGF1qy2/y/3R90FgA==, tarball: file:projects/arm-iotcentral.tgz} version: 0.0.0 '@rush-temp/arm-iotfirmwaredefense@file:projects/arm-iotfirmwaredefense.tgz': - resolution: {integrity: sha512-VeJsaq6Ffv5l98tAAk6HNn4pxpZORK4BmIUiaooWhCDvrhqCGqBQKp524+1rGyhQmwE3IqMg+FOfSG88E0zWrg==, tarball: file:projects/arm-iotfirmwaredefense.tgz} + resolution: {integrity: sha512-noW8/bJa/Pw9RPjsx0+IS/g+aYCVSLvd6drmug5oZ8UF/a36mCgEnwjdnEieU8ATywagaIgsmvI7tfm1R7NHNg==, tarball: file:projects/arm-iotfirmwaredefense.tgz} version: 0.0.0 '@rush-temp/arm-iothub-profile-2020-09-01-hybrid@file:projects/arm-iothub-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-pe4sIGT0dEIr8afa8unWifg2Rrq34UUNtBUuYYWNw/OTS1adZgeL8BBg5fjk7ydnbjXMG1lawnjhd0KMJYNj1Q==, tarball: file:projects/arm-iothub-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-SMNPpYIhZiZT5a88fCk+dkGoVNRsPXm87FpnnrJWo6WDKvX79OjpivLO8mkJppAYWVOhpfaaavTEf8tFM+HlHQ==, tarball: file:projects/arm-iothub-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-iothub@file:projects/arm-iothub.tgz': - resolution: {integrity: sha512-pmH/9nz4lT7bOWJbBNaUCA+q8KJNjbLZdvop3710/kfaKe4jNp9q9M3+Uxx0YpnwQ4ILRu+ioR1uLxdjhUS+OA==, tarball: file:projects/arm-iothub.tgz} + resolution: {integrity: sha512-hZrsn5YVgcrc0hhQ0Hxw3p2KylY5/UYex3ouBK774NTRVendKUjHUwi6VTJN54FPh8OYrJO1nQUYahvXZhmh1Q==, tarball: file:projects/arm-iothub.tgz} version: 0.0.0 '@rush-temp/arm-iotoperations@file:projects/arm-iotoperations.tgz': - resolution: {integrity: sha512-cSjFFCKmI/3TAVPk7BHWbSTCBg6JOVJ3jvJURbPxmeiIaab+SIvBHRH2d5N/sT1ktQirW+wr1aF410IqvfDEKw==, tarball: file:projects/arm-iotoperations.tgz} + resolution: {integrity: sha512-0dG/Ad4Jtr8ZwdSkt3Pu7qsao/aKcEQV4LPFYvys4yt4vGvYAOgt+i23sAlPPOik1SeYUE/8CCvFluVUl3VtNQ==, tarball: file:projects/arm-iotoperations.tgz} version: 0.0.0 '@rush-temp/arm-keyvault-profile-2020-09-01-hybrid@file:projects/arm-keyvault-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-k8e0z42TUU7lnPgdy0hJqIZn/7EWBfC5HyGL+R1LvEXrlHDYQSnlPVG0JsaUuVrI2VpVFs7ahK1enWFOKI4O3A==, tarball: file:projects/arm-keyvault-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-bW8BDRZAzMLhXASzv5N8O8KzH5WQAK4RWNPvUm6E1uf9itdgXuhyst//opTJPsCJ0Rn31q/A2DsBjgIDzc2Hvw==, tarball: file:projects/arm-keyvault-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-keyvault@file:projects/arm-keyvault.tgz': - resolution: {integrity: sha512-UiieCdUQKZKIcMIFPVZEKfoCa3ZS3ZcE6XL+Ky18u9nYoBVkeHzgMFlHP4UudaMcimbloRdI5rhXHBpjUceP5g==, tarball: file:projects/arm-keyvault.tgz} + resolution: {integrity: sha512-2Q/FImXfCKzvA6UphwQ5xnbvEN7Sqcjw6iYHyQ8WE4Yc1BcJA0IIsMuffcX0lbL90fmf01Z89LBAiTEmrcepRA==, tarball: file:projects/arm-keyvault.tgz} version: 0.0.0 '@rush-temp/arm-kubernetesconfiguration@file:projects/arm-kubernetesconfiguration.tgz': - resolution: {integrity: sha512-g9yGHBzb+hffJ46WX30LznZ6vPNuz+fJIwvMqpbHsw4an4C5jF+LjEtdjJpIHge26uOYU842afp5ZG1GKLnQDQ==, tarball: file:projects/arm-kubernetesconfiguration.tgz} + resolution: {integrity: sha512-uMCytuhkoGwgvYyXkOb+HinlrPi+uMIMmBna4rrjSzrGK2cYd8HoGip5xnmqOF0xQ6NnOFXqSCkv9p8FsxM16A==, tarball: file:projects/arm-kubernetesconfiguration.tgz} version: 0.0.0 '@rush-temp/arm-kusto@file:projects/arm-kusto.tgz': - resolution: {integrity: sha512-db0yFEULqkX52uIdurqmTWUDs15jhhRdLS+91BiZQ+mIdSOwd3Y38SJD85PVLwQti8Z8bEkkwkJORHlK/y63KQ==, tarball: file:projects/arm-kusto.tgz} + resolution: {integrity: sha512-hbWGpSndYZhKYM74fPcf7RHMxtX438N+4mD28Uy9wD4ZCTJd0vZhagIyhF04gfBQWnnB9mikvB85KI6upo8mfg==, tarball: file:projects/arm-kusto.tgz} version: 0.0.0 '@rush-temp/arm-labservices@file:projects/arm-labservices.tgz': - resolution: {integrity: sha512-ChkyHxb9CH12mPRoFXuiUIBSmIkQs7YUeRvRDK0dPx9CE56ipUw3ClrL72emJPI0ZuggKYwsrWAfZZKlp02Pag==, tarball: file:projects/arm-labservices.tgz} + resolution: {integrity: sha512-+odxjSvU3tYEN/noFSVHXcZDg0wctbqbOvs6KVYiaFgNshSQqhxq6xh00/R0/pamCz+jWckyFaj8zT8kPbQObQ==, tarball: file:projects/arm-labservices.tgz} version: 0.0.0 '@rush-temp/arm-largeinstance@file:projects/arm-largeinstance.tgz': - resolution: {integrity: sha512-NWuBj+T1UpbNwOVDHynXVdmiKTceyefDJa49nwpzi2FSGlhjLbaM6a1viToZFxYd+Oxk9T5OzeUUxo2BySGbgw==, tarball: file:projects/arm-largeinstance.tgz} + resolution: {integrity: sha512-UHvK9jEa5atiGKiRsEY9L3VhrynJliaHMcJREmJV1N9HI2fQIrbdaSVEyXKJAtcKU8upeGsZQy40kaaFwqScoQ==, tarball: file:projects/arm-largeinstance.tgz} version: 0.0.0 '@rush-temp/arm-links@file:projects/arm-links.tgz': - resolution: {integrity: sha512-yy09FGeGBBKCMifaMklQr1ATSTBohwxDvzgkQTBHYN6d8gwL8xNoqs/XMoe7MgWmqCsM4HI144RdiV5fOd2Z8g==, tarball: file:projects/arm-links.tgz} + resolution: {integrity: sha512-/XShf6BZxAY/svvfBARXC+6Nlw0ek2FF6wIFaT3ttqzThdmqqzR5Vy2gVYtL1E7D1qbwnTG/oz7HXkA4OAaGpg==, tarball: file:projects/arm-links.tgz} version: 0.0.0 '@rush-temp/arm-loadtesting@file:projects/arm-loadtesting.tgz': - resolution: {integrity: sha512-/sE8n6gEBRDa6YOXrAHAeK6yGL5Q8LR82DkKgywKk3cj2sdXOQyhN/JTBpr3rtCeKodddiqlDSbSG7UaEe8Zow==, tarball: file:projects/arm-loadtesting.tgz} + resolution: {integrity: sha512-z7pwRfgL7Uv8JqgvrB01Z5Uy5mEvVxZnABVU6GX2PkEMnkYJQqDv5XcTxT/gHWDrxG6VKMoqqFv3vT10qA5iDA==, tarball: file:projects/arm-loadtesting.tgz} version: 0.0.0 '@rush-temp/arm-locks-profile-2020-09-01-hybrid@file:projects/arm-locks-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-95rTstnnj6NMMejPoGbPaRfxV28K8t1Pv8T5a0T8F0+NIsrwrJQSO5o7RMbyfxlMtSzewMXfAiHjI5dXtKIPEg==, tarball: file:projects/arm-locks-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-lmdozFNZ7FTEyp4SUhsFx1+jHZR4esXBJwpSewMgEbkeYMz5qnkFQ+rYtYjkpp9F7Uo10xKVU6+aqrAyY9l3Yg==, tarball: file:projects/arm-locks-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-locks@file:projects/arm-locks.tgz': - resolution: {integrity: sha512-GMn+Vj8HH/zCkhGM4WCxx5haz4uaIIhdfZOL6d/+UKDKLLa14FczlyPmr3YGp/j8UZwoYh4kpDW89NX1lgpcHQ==, tarball: file:projects/arm-locks.tgz} + resolution: {integrity: sha512-6hEhFhFro4RySLWD/sdZTG0jo4+q6FuHRXpL/5EJg+TWC4oD5LZIhQZYUgajeVqcwRZr1AP6BGJHoWeokOfN6Q==, tarball: file:projects/arm-locks.tgz} version: 0.0.0 '@rush-temp/arm-logic@file:projects/arm-logic.tgz': - resolution: {integrity: sha512-KuE69JK5/8B8kpjxZmseu5T0y+hVtDGS0GqzyJ80TjnvbGa0w3c3bhTAX/vAZ2XThDKycY8jUNjSSVIv12VFMg==, tarball: file:projects/arm-logic.tgz} + resolution: {integrity: sha512-vVuwj9tKT5ciOJkOTTNvpYm7YPV0DBy2/3eYHE8mAvJGuOGX8GjyF7NrRCMig4mKmooR8fgkyknOgRf+DnSIDQ==, tarball: file:projects/arm-logic.tgz} version: 0.0.0 '@rush-temp/arm-machinelearning@file:projects/arm-machinelearning.tgz': - resolution: {integrity: sha512-BoTVjtbcJi5mj0hcFrrcJDujK4MT1Ewcm9hHXb1yLpCUfC6haAUwPWEgv4aNMYl0ivclWNsVN4LJK0JXIhfy5w==, tarball: file:projects/arm-machinelearning.tgz} + resolution: {integrity: sha512-kLlOT51xPOlxBK42f3di4Ax7jcN4X1850huQkMkAANJlgi2cOnPZqxtzG4yAweBE6GZAi+0AcNS+4TG9/JIUXA==, tarball: file:projects/arm-machinelearning.tgz} version: 0.0.0 '@rush-temp/arm-machinelearningcompute@file:projects/arm-machinelearningcompute.tgz': - resolution: {integrity: sha512-5dkpWsTu7SnJepOJD7b0xv10K+YwWbTMjpicevVi1HRIqk0dHtNaYhF2ymXPyVyCEBPmuklrgjDq5e3LKWZVqA==, tarball: file:projects/arm-machinelearningcompute.tgz} + resolution: {integrity: sha512-aDl8y6YsdSszylh5HfV80DjzddAbp+5iKOQ+1PSanI9D1FG5Vk8dNrxLK1Dsp/7lsAy5S22HpXWG4cJtLyegFg==, tarball: file:projects/arm-machinelearningcompute.tgz} version: 0.0.0 '@rush-temp/arm-machinelearningexperimentation@file:projects/arm-machinelearningexperimentation.tgz': - resolution: {integrity: sha512-6+PDR/fwpYkNLIJR/4Q8X5r+dDIGjBLc8FNdiLDBHXgM/qJkoKvHKjmU46j6ml8P8vaCj8xb5ZtntqFNNKYWIA==, tarball: file:projects/arm-machinelearningexperimentation.tgz} + resolution: {integrity: sha512-bK4a6uKb+thHH5iKwtVNqAKolopy2k5rk1Gj1JVoSGhdJlbbDoO0K0J+UDk0Ztd7OfNmclxg+7sUIeYf60mELg==, tarball: file:projects/arm-machinelearningexperimentation.tgz} version: 0.0.0 '@rush-temp/arm-maintenance@file:projects/arm-maintenance.tgz': - resolution: {integrity: sha512-Tw1UMNZZRdpKcKCNJxRHu/pA6oXWyBWQp0D/5w5binFIA4lUysqy9DwuTDE2cE61eP4OHodttV6ZMOUUWW9wHQ==, tarball: file:projects/arm-maintenance.tgz} + resolution: {integrity: sha512-2E6lcc3tKURk94ePQgvxjurGUd5P2JHRcbcJg+FDSKq8sF844d+jJhxMB1GmiS2ZIzWQ1HBhRtkNwkT78ILQkQ==, tarball: file:projects/arm-maintenance.tgz} version: 0.0.0 '@rush-temp/arm-managedapplications@file:projects/arm-managedapplications.tgz': - resolution: {integrity: sha512-DZ0QO9C7MJ9Ipe6oFSaCVWZfdsrAmpgjxetJckZAG7M2TE0ybKAIhz3toZd+RMI1Dz+sU7tzF4/fRMtRiZLL+Q==, tarball: file:projects/arm-managedapplications.tgz} + resolution: {integrity: sha512-C1r0Vro0NPhvuJlOTKQEoAY+dVgznW0ar7tW58GqyLEJ/ZhsjQ72nyL0CBVfUJYb+dJBuyP5X3KN6le+LNCPDg==, tarball: file:projects/arm-managedapplications.tgz} version: 0.0.0 '@rush-temp/arm-managednetworkfabric@file:projects/arm-managednetworkfabric.tgz': - resolution: {integrity: sha512-9GYAqpQgt9jLhCrRLJBGxBLb1Mr6cu1uSdEC4uFPSaQiVPFOIzt8NfoBjdLJj3h5BHtZX6C4aBUWkFgNSYH+oQ==, tarball: file:projects/arm-managednetworkfabric.tgz} + resolution: {integrity: sha512-M4MqiQAYXnttygDpDq8FXKDSbtuttkFsLE+GmUvzyzdrL77c3AvZeRklDrgCG9oNVGitEJHCspLsc8vSrxoNMw==, tarball: file:projects/arm-managednetworkfabric.tgz} version: 0.0.0 '@rush-temp/arm-managementgroups@file:projects/arm-managementgroups.tgz': - resolution: {integrity: sha512-ZPH5lJy5CoA41C41tCPdGKi9a0aj7OHffXtf5VgMnFS8k5EQ1o31jvTW3UJt942W2DjUflrgPfI2CiHQvTpNqQ==, tarball: file:projects/arm-managementgroups.tgz} + resolution: {integrity: sha512-TrhL5LDt+jT88yP7+EzSnTSjY3cZxOG/AJoa+5ZDzAoOHEN/mq93t141tOKAk+uYfwZxie34TJrr9A5PJEnJ7Q==, tarball: file:projects/arm-managementgroups.tgz} version: 0.0.0 '@rush-temp/arm-managementpartner@file:projects/arm-managementpartner.tgz': - resolution: {integrity: sha512-b7vr0rX95p0R6VX4XbGlcGxbDxA0OOjO8xDJaZ2QsIj+BFZclj2Vk8gBg5M/CVrYbkILJAplxq34acvRBIkHAw==, tarball: file:projects/arm-managementpartner.tgz} + resolution: {integrity: sha512-bAtZCcfwN2IQs3tbKABmSaWM41ZGadaAteBeOuTU0N4hLx7mNeZHvzLaXgGXhfC+u2nwrcfVX+xwh4ZzG1FPmQ==, tarball: file:projects/arm-managementpartner.tgz} version: 0.0.0 '@rush-temp/arm-maps@file:projects/arm-maps.tgz': - resolution: {integrity: sha512-jnVSRmQUMBKtHqs9zaMOuGiRcY6cEsIZJgBkiKgPC3wsSsMvzTYsPtHpb9QUjc2f2rTLrYvqbwXl/Dd5D4SXGA==, tarball: file:projects/arm-maps.tgz} + resolution: {integrity: sha512-TzN282W+EsZlN2dx/qVjNxGh7T7tz+1W/z0eIWLNz46V2AV9kgKMccJnFWsJGU1hMISEIv3Pa/4iCQgwj/t/tw==, tarball: file:projects/arm-maps.tgz} version: 0.0.0 '@rush-temp/arm-mariadb@file:projects/arm-mariadb.tgz': - resolution: {integrity: sha512-z5GeUg6P9XjhjMBb6p7/sMlPezfZSDycPsVyK2R29nReiz4an9mScHGhSBfbzOHtSNbnG9De4Fn9XsJ8xHsWgg==, tarball: file:projects/arm-mariadb.tgz} + resolution: {integrity: sha512-0vGdddMqtOg//9tMQFSVjLZ5StXQfaLM+APSEuSpZYGf3BZBGAq3VJIF6j19+Pl9lKfbQo03zzINnR0/RD59YQ==, tarball: file:projects/arm-mariadb.tgz} version: 0.0.0 '@rush-temp/arm-marketplaceordering@file:projects/arm-marketplaceordering.tgz': - resolution: {integrity: sha512-JiGCXNYNr0qNxEFb/SbkVLD1FAb6sf/ly0phSwAVVoJ3Vo9mXa16RmeKKt4M1DXRn3kUVDEfbiXlMN7QhQ1FwQ==, tarball: file:projects/arm-marketplaceordering.tgz} + resolution: {integrity: sha512-RTKwtzOR451jN5SPIy1MjeLIRPP5wuoCF4wcFGYtSEtpFcNl8kJCWTCeLL6a0uBIejkiGvGGhiQSCTb8K8lznw==, tarball: file:projects/arm-marketplaceordering.tgz} version: 0.0.0 '@rush-temp/arm-mediaservices@file:projects/arm-mediaservices.tgz': - resolution: {integrity: sha512-LxV9vQ4QjDuxVKri2jmwIlv7ZuMCDykPlJC+75PtF7ZKgUjhoqDtTRGVgn8d+o7vZ+s4qnS1D8oX78zhhCUE6A==, tarball: file:projects/arm-mediaservices.tgz} + resolution: {integrity: sha512-1FVu8PRCGKH2QqyiQ42d3SCxjcSpBtgEpT6y2G0HPd9MqMwmWx+GZqKCEWWN0sTzzmHrZOO9GEAuv0dRxuL4Ug==, tarball: file:projects/arm-mediaservices.tgz} version: 0.0.0 '@rush-temp/arm-migrate@file:projects/arm-migrate.tgz': - resolution: {integrity: sha512-/jIx38kSm77xuhLwYqRNMKkkXrQ8fVeX/tNe0l2A4Vgn66v2BB8pF12LICEHec0B+SpYxuJuMj+xPOA42D2EhQ==, tarball: file:projects/arm-migrate.tgz} + resolution: {integrity: sha512-m1h+0wNA/R5mOndYFAtWYlVBBHUxiMmfYSNY+0WdmEhayQMXNErFsR+Zi4ONXsZUSRDUIQAYpHkBNtD7S+04Ng==, tarball: file:projects/arm-migrate.tgz} version: 0.0.0 '@rush-temp/arm-migrationdiscoverysap@file:projects/arm-migrationdiscoverysap.tgz': - resolution: {integrity: sha512-qEqghxFBcyRSbLxzUMJWdm/8+hXIg279kyg+QjdKHuDJR/iAUy/ve8UGMibTu35Lh0dqwxkt4aewJaviRnxXkQ==, tarball: file:projects/arm-migrationdiscoverysap.tgz} + resolution: {integrity: sha512-M5Cb89VmSlInF64axWblxeo1E9EDcj9Fk/sZiTqcr4a1gXqylvcX75zLVgTda/BFdkNhM+YhxzK4mw/bjfVUxw==, tarball: file:projects/arm-migrationdiscoverysap.tgz} version: 0.0.0 '@rush-temp/arm-mixedreality@file:projects/arm-mixedreality.tgz': - resolution: {integrity: sha512-yL68FpMgpLlV5+jJS+ouRiBSImQ8yBYiDr0GJn1ntUyAXEaikFMLB5mszLm9UitBw28JT/crY/iPghPVkyBtUA==, tarball: file:projects/arm-mixedreality.tgz} + resolution: {integrity: sha512-iycDyv0JK9Pglr/9YDkx5OgDXExtABNYhwmNuJl/W6ZG3pQrAH7aTLpE68tPv6OW4dkXj67wbAiEITWYFa9WYA==, tarball: file:projects/arm-mixedreality.tgz} version: 0.0.0 '@rush-temp/arm-mobilenetwork@file:projects/arm-mobilenetwork.tgz': - resolution: {integrity: sha512-o8FIYhlNJTD4OpgTS4Gs1NErPStsKcdJQKwQ9In4mkpyzbuXTKtjUPMgVHuyet5gYQXtkmWpg9QGtEXm+snn9g==, tarball: file:projects/arm-mobilenetwork.tgz} + resolution: {integrity: sha512-OD/BxuKG3iLGYiZJ5wjIDDYHnMehn3RkbVgv3zE3nU6n3maNCxn2DKYY42dkdRXLgkHU6aa4/JGr7ew5GgcN6A==, tarball: file:projects/arm-mobilenetwork.tgz} version: 0.0.0 '@rush-temp/arm-mongocluster@file:projects/arm-mongocluster.tgz': - resolution: {integrity: sha512-uHXY8aiy59HNsKOlADr+OcpDG8TihgYdOW4ZXH1ap6Lc+nlMFoMVFYFbM2O0w40S2Me9pQaUbHOe+/94MCjoWQ==, tarball: file:projects/arm-mongocluster.tgz} + resolution: {integrity: sha512-3WU5K6IHkIJNsqg/jZsr1LPrLS4WtMEsl+S9uch4/Nlz+PsZIq6lWZSF6qpcer0NTPcZxiL9qMfr/egukutuQA==, tarball: file:projects/arm-mongocluster.tgz} version: 0.0.0 '@rush-temp/arm-monitor-profile-2020-09-01-hybrid@file:projects/arm-monitor-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-rTxYrZUavcQEHzRVMmHjV8GU+Z2c1ZPL3N4zAP1nLNI+DpAI02kTwAv07d6KXITAWI3D/lb4bJDQPhrcJw9rAQ==, tarball: file:projects/arm-monitor-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-H3edbbzLNxa2QMD7GpeE+gPca5gootNTw/C4IaWHXcF+C2o5NzPndeGZCkH8msrDmIEqeVdQIadVixuHbqk8Fg==, tarball: file:projects/arm-monitor-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-monitor@file:projects/arm-monitor.tgz': - resolution: {integrity: sha512-CdbDd7vrDOkaLczqumy0Y+LviCwZc38H3RjT7LdmuCQ2FmYGZ3EXb7ONIpGN3fdOlrW9DEKi7KwrC7onLDqFtw==, tarball: file:projects/arm-monitor.tgz} + resolution: {integrity: sha512-M+9Vl69s/OYxdMGIxHpf3nWXrop324ZKiBi6SCycDLTo/sPmPLaeYPN/IWo6ezxTdXEkdmbz9x2/3Q0ObsicVg==, tarball: file:projects/arm-monitor.tgz} version: 0.0.0 '@rush-temp/arm-msi@file:projects/arm-msi.tgz': - resolution: {integrity: sha512-hW54OyjwjUzQIf33xmJlw7tpK9/xUuVkPv8rVrL0X81uxRMuonSzMcL8Oux8ku3CQcpIWOSPZcdgBNaW9HqYHw==, tarball: file:projects/arm-msi.tgz} + resolution: {integrity: sha512-FzpDNmC0LBG+LJKJp1boykhkmHdh4fnGRCOaS5nMb6MofUMZw2WjVzfGGHYfThDnz6T7AWcOi6CElyo7l2bUrA==, tarball: file:projects/arm-msi.tgz} version: 0.0.0 '@rush-temp/arm-mysql-flexible@file:projects/arm-mysql-flexible.tgz': - resolution: {integrity: sha512-TziMij0OeKL7XTDKwOBksnLYd+/zRkbY8DgrGFqhzhwQBKSTIB2qda5ajFwq98yxoNmHu7glVuHsozkE9O9IZg==, tarball: file:projects/arm-mysql-flexible.tgz} + resolution: {integrity: sha512-GnOkBpP30YZdy5IzHlPvehgAzD2OMlxsWVsF5wETQCEdlhStOIccPZtSVyWZ66jzB0CaDvEY58hpUSilH5MY8A==, tarball: file:projects/arm-mysql-flexible.tgz} version: 0.0.0 '@rush-temp/arm-mysql@file:projects/arm-mysql.tgz': - resolution: {integrity: sha512-L8KQkiZSpaeRkNXaNlkqDezpDQcg/jk2zN7N86rzzqpHR29ZgmtSgZe5DyTDeEXbNKwtwIdMx00SZt3L9Wl/3g==, tarball: file:projects/arm-mysql.tgz} + resolution: {integrity: sha512-2XQaxtLQde8fM599JLpHLaxT5s0g48yhiH98RLapLRCeMKsJiuxhc0VYqAgIOB1x4ZuzqU2JVm3VC+ZTvsPrsA==, tarball: file:projects/arm-mysql.tgz} version: 0.0.0 '@rush-temp/arm-neonpostgres@file:projects/arm-neonpostgres.tgz': - resolution: {integrity: sha512-II/DGCMv6QZqpGCjn9o/+ILk8WsafWkiVxP5G1BIl7mizvVif4jFL7mdHO+WootJP8leIjFjFxLUmHn3mifD0w==, tarball: file:projects/arm-neonpostgres.tgz} + resolution: {integrity: sha512-x9rzK76vTk+VC2qJJlXpi/BlK5JKLN8hMc1beypwQf6z3yMz8/DLXnhNkJiP4JPnVqLXnzrJXFePepIeHshveg==, tarball: file:projects/arm-neonpostgres.tgz} version: 0.0.0 '@rush-temp/arm-netapp@file:projects/arm-netapp.tgz': - resolution: {integrity: sha512-D8HclxKCz66wgWM5tX73wyx3qXyBT+XKSW1vhPkk3bSkzWPtVtpbgoGsp9mHZ20Og+/mGYu8CARp80fg0N61YA==, tarball: file:projects/arm-netapp.tgz} + resolution: {integrity: sha512-kp8VFPYM4BCzTqjzWSb+NLQeHonOctqDie4bI+HqWK+o/nmBH6aKjxu8ydetLxCeWvBO/Dhe6QrJpMF673pmrA==, tarball: file:projects/arm-netapp.tgz} version: 0.0.0 '@rush-temp/arm-network-1@file:projects/arm-network-1.tgz': - resolution: {integrity: sha512-cVAhqcWQjDSupwUm6IMgEy+sUMRBkJz2v4JtXuAznwXp6lVCf6ZsVAX3mYQ5k3nTnJ4uLGShF8q4SRl5WUE0tQ==, tarball: file:projects/arm-network-1.tgz} + resolution: {integrity: sha512-v3WX0EhxWhjyjRmHFJKbsVHbbrk+cVc4qah2uwvPzQfpENJOsWcQD+DaJ5GIc5bIllnW59IoZISf3u2ZoB+ZgQ==, tarball: file:projects/arm-network-1.tgz} version: 0.0.0 '@rush-temp/arm-network-profile-2020-09-01-hybrid@file:projects/arm-network-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-ZdoRrIsRaKJJMECq2hEaagRWP9mGpi4h8pQs23InyRZnl70LQ6PTyrjAw6KNOwdhmzTYYeQuOVKyF/+071cwEg==, tarball: file:projects/arm-network-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-yFjR+QdJtlm+lIjsYDdZamwAUKqzVQ4+/5Ouc910XBn35bs+i1oIQmFdet6FB3gSm1+8fjXr8fL78YJAcqKAAw==, tarball: file:projects/arm-network-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-network@file:projects/arm-network.tgz': - resolution: {integrity: sha512-HZ883UymI96YCQtFycmqAdi0Zo0oXsUGhKwZDwQejYqv9i5TepqfqX51UvG+pcyeuws2C/LFAeyc0vDVOKTTOQ==, tarball: file:projects/arm-network.tgz} + resolution: {integrity: sha512-1aHVc4vgeXhvhqm5J9LpnbG8pKqt4fPrP3ESUtJyaW1WaxNfi6f8GnCN2aPtd+6pqADVmwd2mx3ky/RHD+WwtQ==, tarball: file:projects/arm-network.tgz} version: 0.0.0 '@rush-temp/arm-networkanalytics@file:projects/arm-networkanalytics.tgz': - resolution: {integrity: sha512-xrqjE+6rSJeT68iKQd+zhQgDgnu8D8gYC6XHXLLYCXHD4KU9mRrBrQDC4TBjA4X58lkuBzCxwhvWO8MDv6nUDw==, tarball: file:projects/arm-networkanalytics.tgz} + resolution: {integrity: sha512-CVhdZGn0T4l0MPDLtQwHis93CUfwiZJKi1sLIs3BFgk1T+np5uhs2zmVQnxA1jeXjBw62+ORx6teowEBGSm6Pg==, tarball: file:projects/arm-networkanalytics.tgz} version: 0.0.0 '@rush-temp/arm-networkcloud@file:projects/arm-networkcloud.tgz': - resolution: {integrity: sha512-TYoiz7E48sIDK2KCZtG5kNrB7Z5Lq5NA1TSwBIKAZPIoMUaOPjP4wdvhcIlRTokZVpyp0PnA3tfj5UpwJoLbsA==, tarball: file:projects/arm-networkcloud.tgz} + resolution: {integrity: sha512-D8qBS+5kWmS52C8cAVZwU8bxTzt/Rtm/ApCez9YZTUu6EG5gryBTHSAeU8Oc0JkdJ0qh+mWYmlWoYqAUouc73A==, tarball: file:projects/arm-networkcloud.tgz} version: 0.0.0 '@rush-temp/arm-networkfunction@file:projects/arm-networkfunction.tgz': - resolution: {integrity: sha512-66XNH+aARp03bIVqn0EaSoG/RJr6ieqoFOqZdSNajeuhZZAnXtYiXcKGgNrOWplhM5EAOqLt3F3hTTxQ/62HNQ==, tarball: file:projects/arm-networkfunction.tgz} + resolution: {integrity: sha512-6Vc4p5xnvbA0wZxmQzLuozb2105KTXYO9W7Wp6U257ZPB4E1DcMJGJ2es8Be6TnAnzI+hEvj5fz7A0GTGE8m8A==, tarball: file:projects/arm-networkfunction.tgz} version: 0.0.0 '@rush-temp/arm-newrelicobservability@file:projects/arm-newrelicobservability.tgz': - resolution: {integrity: sha512-ROn6IVp/fropYecul1jImHT0/7A10uZb1M8bjQtfiYEsX7PL+LxErBQ0+fUYPeg2S9w0oRrue/020bOdA15Kkg==, tarball: file:projects/arm-newrelicobservability.tgz} + resolution: {integrity: sha512-nToJd5oZM1IL70WHARvYvi7fx83soTrvtar47HHeqVjIJxY/eHuogNFcAdvMmY8Lfv4jg67WH9ApBzu8PML70w==, tarball: file:projects/arm-newrelicobservability.tgz} version: 0.0.0 '@rush-temp/arm-nginx@file:projects/arm-nginx.tgz': - resolution: {integrity: sha512-oQwCqgF4eeRtGZd5FzUTvxzPvZfa0Fcun3+/BF1Sn22xUh+tre68LDqxPc1QxvcWv8cjcigt44Q62iNDPw9k0Q==, tarball: file:projects/arm-nginx.tgz} + resolution: {integrity: sha512-t23y4psXT3a1C7INiX7imXwHyzC/g87OyivMXKHMS6FXt3ADOTj0QOSIniZOPPdEBVCKLRaC0XlhBwfwI5dGvQ==, tarball: file:projects/arm-nginx.tgz} version: 0.0.0 '@rush-temp/arm-notificationhubs@file:projects/arm-notificationhubs.tgz': @@ -3168,491 +3168,491 @@ packages: version: 0.0.0 '@rush-temp/arm-oep@file:projects/arm-oep.tgz': - resolution: {integrity: sha512-kcNxlGEwbv4nGURvjctpHgqm+yJq5R5iqc8uhWlKXdqeqZP8dSgmT5xHIRlgm2lx/K99Pu1cVsWcTn+UMr+kng==, tarball: file:projects/arm-oep.tgz} + resolution: {integrity: sha512-VVmSfmL+jMLG+Jn6PFIdTqmf+9SdwZ3I8at3oHnQEss/BTpJCDieQ76vAsNi4GoenEStJYIV2OVvY0t2Gw+U4g==, tarball: file:projects/arm-oep.tgz} version: 0.0.0 '@rush-temp/arm-operationalinsights@file:projects/arm-operationalinsights.tgz': - resolution: {integrity: sha512-FZZxJuuoSlIalV5BluQAhugfjGzBxRIQcOHXc/HZyxjw9Hf61ovtujP4WbS6f7O9T0DnlnaR4Vhi6auk5NQcuw==, tarball: file:projects/arm-operationalinsights.tgz} + resolution: {integrity: sha512-tgicya+465vMz+klPztgXnNOdNnNsLoSRZ6mRDfRj519DP5Ad2rPmgzyExPKW7xJiehaNBRS5CqmMIp5qtKcMQ==, tarball: file:projects/arm-operationalinsights.tgz} version: 0.0.0 '@rush-temp/arm-operations@file:projects/arm-operations.tgz': - resolution: {integrity: sha512-j02KwOQOovg3gBROLrI5EtOuc12imuP08P/BXzzFFsj6my4gJDFFFpH9uUWWlyh4/hUjFJabuD3syJ21NzI8FQ==, tarball: file:projects/arm-operations.tgz} + resolution: {integrity: sha512-0ym+MEVVrfkYzxywJKrlJAbwQM1TQ9qR90B4aXrahtjacwJ3j6S2c9Dq3Eh5pGpU97Q1NStuEohnPnXZYdrvuQ==, tarball: file:projects/arm-operations.tgz} version: 0.0.0 '@rush-temp/arm-oracledatabase@file:projects/arm-oracledatabase.tgz': - resolution: {integrity: sha512-Nx0Fm5KiY2E/RULPbLvtnofwa1qEwkjCpZJQOqnpx6Yp4Zt6IXdXzKwkyZJwxhJQfLT9M9Vp0Wk2s8Q+w55s6Q==, tarball: file:projects/arm-oracledatabase.tgz} + resolution: {integrity: sha512-l6nhCD9d1IfIC9HzCxPQ/NCMqQgzDB3L7uVpQW8GpD6pZAV4M4g0e6CX95icklgqh59KqaArZAATbzQlITZ2fg==, tarball: file:projects/arm-oracledatabase.tgz} version: 0.0.0 '@rush-temp/arm-orbital@file:projects/arm-orbital.tgz': - resolution: {integrity: sha512-VChA+wWKh76iveQmYO+fY2M6UNwBbob3jirk7HWM/rT+f7RrTMtVGHA7aX3yc1kMNjnRdr0KXOYRxX32jETaZQ==, tarball: file:projects/arm-orbital.tgz} + resolution: {integrity: sha512-yzmZSQu+upHm5SHvDxgdjDHTke0E8YqAMA8YOA9oaNMj5HhIrktMhaVudep0PyxkgN5FFY5OjZU59KILfDhFiA==, tarball: file:projects/arm-orbital.tgz} version: 0.0.0 '@rush-temp/arm-paloaltonetworksngfw@file:projects/arm-paloaltonetworksngfw.tgz': - resolution: {integrity: sha512-MO5qyn0ASirdNunW9peK9x5FMEPeMNCA1Y7bP9fV+EdugFqZlSix20LOj7FRAqDHeQBaWKq6hxBMYteBbCI4aA==, tarball: file:projects/arm-paloaltonetworksngfw.tgz} + resolution: {integrity: sha512-88Ym9HMZ67Rd6t6jYorDcWPdKSAYtt1Pbc/9xxyUWOLquabs3YeTJ/W3nrHSUU4nNgh7QBgQHU7TtE1IsTObwA==, tarball: file:projects/arm-paloaltonetworksngfw.tgz} version: 0.0.0 '@rush-temp/arm-peering@file:projects/arm-peering.tgz': - resolution: {integrity: sha512-HmosH+mVdr2KFShx4rFsR+OFmATi/pQ4uZK6Cx+DKy6RP71AuJ6BMgvLDEwj3UW3x1T4PiLW+Lq/Y3J4m61O2Q==, tarball: file:projects/arm-peering.tgz} + resolution: {integrity: sha512-9JSEKB20oOKAhOxeQZdYkKmlfDAyUund2pnDWzHNK+bWDBWvas7xvM1pk48VQ/7Z7KQz1cWIXzMcVW42zcX1Yw==, tarball: file:projects/arm-peering.tgz} version: 0.0.0 '@rush-temp/arm-playwrighttesting@file:projects/arm-playwrighttesting.tgz': - resolution: {integrity: sha512-xo3xP8S9EVbr/epwn7/8mA2ZKGNJGH6dH7lECWT/0PasyyPIh9LTfLudkve+IRrRa/cSnFtRfYqKg6x6P0VUMA==, tarball: file:projects/arm-playwrighttesting.tgz} + resolution: {integrity: sha512-DoFdSeAM4GWLDFECLvCLScg80mpkRsKvwLyXtbmZqer687UOBWpOW1fcKO+uVxkxbUzu1R8eoj6o4wuhE8zk8A==, tarball: file:projects/arm-playwrighttesting.tgz} version: 0.0.0 '@rush-temp/arm-policy-profile-2020-09-01-hybrid@file:projects/arm-policy-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-ZDFvs0vEppJV46jmMdiHNawWE1nzFrUuKNyDtr25Ah5eJPs13Ex/omNrBwyKaL8EqgJhVk1E0QjwbT2kVjzP/g==, tarball: file:projects/arm-policy-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-O4pesDEC4sjhSswkTPTwhI4sxSU0GEZTNXuZ3sjtzjZFDzgX8CvS6clo5Zh/tVfNNRFbfzxwa/Zx8oAHyOgpnA==, tarball: file:projects/arm-policy-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-policy@file:projects/arm-policy.tgz': - resolution: {integrity: sha512-dnzae8wqMqBt9Noeke9GV/ZjFShAipdbFxvf/B77e498QBKvVhc77W0dPEJ71gvpn6hXrtJRaKfuuUijU7kXbA==, tarball: file:projects/arm-policy.tgz} + resolution: {integrity: sha512-AoQkt+bNDS18EfmA+DO8c2Sn83z61IWWuESB30vfCVOmCppJrlCeZAj7pO1AADS3NF5Fu2qAQJyU3BsLn73ycA==, tarball: file:projects/arm-policy.tgz} version: 0.0.0 '@rush-temp/arm-policyinsights@file:projects/arm-policyinsights.tgz': - resolution: {integrity: sha512-HTdFG1ZKIXQBRU23ZidAodgGoYHZ9bd247c3ge2bviLYZDb0GmScmJT7k+fSwR88OuqOtK9PlwshxcdZ08grmw==, tarball: file:projects/arm-policyinsights.tgz} + resolution: {integrity: sha512-b+6hk01Q5/+dXp+3Mn9Z0DhMlF7JEk8V/AwovGuthBjrERaJk6NK+OZuixns0W7MaoIT/hleqlQeKFgv4LZ5Dw==, tarball: file:projects/arm-policyinsights.tgz} version: 0.0.0 '@rush-temp/arm-portal@file:projects/arm-portal.tgz': - resolution: {integrity: sha512-ac1uLWXJr2eBZXOJQsgzP/DzZgANlR8hmhgledppNGoTlGpL5xtmplQsgTJA4kiNiW3Py1IeILHoUT/e0SQetQ==, tarball: file:projects/arm-portal.tgz} + resolution: {integrity: sha512-1CVZceMpLsBDMJPLp31T9RUlUPw//bXFM7EaKV5BY7xoGAW60UiO5rofYnbx5KkZKYs/Gwu7DybIpGn1A9fjYw==, tarball: file:projects/arm-portal.tgz} version: 0.0.0 '@rush-temp/arm-postgresql-flexible@file:projects/arm-postgresql-flexible.tgz': - resolution: {integrity: sha512-RmOQ9wNXMQRM3G19xEb82Q2aMQb50KUdlRp5sUUSXvfEuylvl3J42w64S33/JuP18aJRzUbRrrjwYuLkuzKl4A==, tarball: file:projects/arm-postgresql-flexible.tgz} + resolution: {integrity: sha512-wOZIHP/xTA/R6cMevGQczLaxLL/lhTkstsfTahD7wn6Xmuy7vEdkrJAN5QHdtxwUVvMbi1CE95b7CVzbE18BDw==, tarball: file:projects/arm-postgresql-flexible.tgz} version: 0.0.0 '@rush-temp/arm-postgresql@file:projects/arm-postgresql.tgz': - resolution: {integrity: sha512-Qz2lPanI70yKPTIwFgbrAjh4wQ1eXm91A7wtRHPQTfDtFoGmEFuijngaO9Yd6fFs3tHmi6qBAI2XRo3S/Xj/2Q==, tarball: file:projects/arm-postgresql.tgz} + resolution: {integrity: sha512-MR11xzqeG976J0USbgnkQZkK8XdmzhB5LqEsONnAgSTbJxhQ3JoHwrxqrAgrbqE1QUfrM1DSRy3m3bRvQzd1aA==, tarball: file:projects/arm-postgresql.tgz} version: 0.0.0 '@rush-temp/arm-powerbidedicated@file:projects/arm-powerbidedicated.tgz': - resolution: {integrity: sha512-2dwO0vo231ilasGQOqxDIh4YWDjcMxrz5UiA83ExUX5/8d6ARJ7IEdTuyZmChb4eqIrFn8YAJoVpBEUqsStqCQ==, tarball: file:projects/arm-powerbidedicated.tgz} + resolution: {integrity: sha512-sPrwel0+Lt085jd3cl7eW9NXlQDqjtx1pIZkjDAFVskMyvrDRGtS+loTUHO/jjdFXXpgPxaMz09CqAefZGBF2w==, tarball: file:projects/arm-powerbidedicated.tgz} version: 0.0.0 '@rush-temp/arm-powerbiembedded@file:projects/arm-powerbiembedded.tgz': - resolution: {integrity: sha512-IdTn6iuo8wqZx66DqRUYLQHIT0zn9vC1Z34rfRWNd1scl53quIjQIGqXM7h/xbxKuMjwQXrb4H/k/wgnTMEYgA==, tarball: file:projects/arm-powerbiembedded.tgz} + resolution: {integrity: sha512-DY97nnx3schLET8AXWCLqBNiiAlfEwOH4DWM74SzVvjmcopDi7eva1xrKm4f7a7pmPpQahxC/01UX0o5zINsog==, tarball: file:projects/arm-powerbiembedded.tgz} version: 0.0.0 '@rush-temp/arm-privatedns@file:projects/arm-privatedns.tgz': - resolution: {integrity: sha512-0PdXCg1RDafbXYQLzgeq/0D7tiNpgGHyeeCoCywRjCu64q+NAosSEj/Ld8oE502lW1NCs1x95PWI9n3QyKOL7A==, tarball: file:projects/arm-privatedns.tgz} + resolution: {integrity: sha512-BdXrxvNQuZs2P/csX4G1q2ajK0TBDm9efJw6eWE0p55Km9xaulv1WHNZ4VIOWD7RnhJCNtMAuuoB1CSxZHo23Q==, tarball: file:projects/arm-privatedns.tgz} version: 0.0.0 '@rush-temp/arm-purview@file:projects/arm-purview.tgz': - resolution: {integrity: sha512-LMKUjCNeRr2jy3y1cPwNq+oTHKOi268kOtJY2iGKLpq18tyRKF07T0h8p3ATxmpwLs83t0IX4n6KiZYn5ZH2Lw==, tarball: file:projects/arm-purview.tgz} + resolution: {integrity: sha512-hxE8typvPzyVGUy+RZeNK+Q/gLEgseAG1eNsn++nQ+p4p6rU/2iPjWarJM97idBeFTHhEC25cQCqgHXK4bL8JQ==, tarball: file:projects/arm-purview.tgz} version: 0.0.0 '@rush-temp/arm-quantum@file:projects/arm-quantum.tgz': - resolution: {integrity: sha512-6RyfMM6JtN0uHStgWeHhnx0xwcTOXyaiA7APEO8toa4M6AlnDAjIsRgIVrcCbH6NYtN1PLZYsMjjGK1arBrWtQ==, tarball: file:projects/arm-quantum.tgz} + resolution: {integrity: sha512-gr24tljmQxyqsUH8ipDNMSeKuxzzlreZZZXh3Vkbt3WRyMg2PJsW5aef8RgTOoX1N1F/Iiur6hj0puiBt9xIJg==, tarball: file:projects/arm-quantum.tgz} version: 0.0.0 '@rush-temp/arm-qumulo@file:projects/arm-qumulo.tgz': - resolution: {integrity: sha512-q5mzdhHerC5xsu8eIkLMkhhL+5aIJ6qQuSeUS2HI7YBwR45cETK4D7OVvmDzjGbk9ppZEJzruW5exmr9rX960w==, tarball: file:projects/arm-qumulo.tgz} + resolution: {integrity: sha512-DZs1TcFxfCOnRQ1IxlPzxCHq7H2/X1QljZ0IVbCqJ7sd1ngnWFq3U7gh09giZpSdeROGwlu0rnHNqQowjblMnA==, tarball: file:projects/arm-qumulo.tgz} version: 0.0.0 '@rush-temp/arm-quota@file:projects/arm-quota.tgz': - resolution: {integrity: sha512-RszIfSdeseV5e7QjKSQKwJG9tcJ0GiD/KoFPvMs0Y8JKiBeRmYBTO21+kHcSjmzvfzyyL1yqsVLeisqrlbfA3A==, tarball: file:projects/arm-quota.tgz} + resolution: {integrity: sha512-y7L0hKG1puKuCcNIdu0kivas9EGP6ND2IWgRD1qL7RubTaUCFtXicYUGGt+HdyCBk5TDFJ422ecyA21gXy+gFA==, tarball: file:projects/arm-quota.tgz} version: 0.0.0 '@rush-temp/arm-recoveryservices-siterecovery@file:projects/arm-recoveryservices-siterecovery.tgz': - resolution: {integrity: sha512-2tBGwUcxmzF/E+zeXoZdzBSHB+YMSf+5wmjM7p+DAlNAf1mbjWNgK8AJ4z+1XEXWtSwNPbb6Wc2Mf7IIgbP6CQ==, tarball: file:projects/arm-recoveryservices-siterecovery.tgz} + resolution: {integrity: sha512-008v5ABUzHAsibHli/ZgGJD+0jfHdFmZL778+UHDebo5SSa4J/PCqtLT1ttNg3X1sHQucz8ZxCgZIxQzHs+H9w==, tarball: file:projects/arm-recoveryservices-siterecovery.tgz} version: 0.0.0 '@rush-temp/arm-recoveryservices@file:projects/arm-recoveryservices.tgz': - resolution: {integrity: sha512-vutlHypMNAAvlnrq8DQLrlsOD7F7KYEOzyl83fzdPeCgQvhJjLQgAo3yMDu/lWsXRJvmCMc6fRSL9r5G2/7tyw==, tarball: file:projects/arm-recoveryservices.tgz} + resolution: {integrity: sha512-1J764ERzMmNUSWwXC/Bft1YXJKSOOeHOz36igdHV5302XkDxjcMa+T6TOiArCzCVMJCX8FQEBpe7LjIPjcafKA==, tarball: file:projects/arm-recoveryservices.tgz} version: 0.0.0 '@rush-temp/arm-recoveryservicesbackup@file:projects/arm-recoveryservicesbackup.tgz': - resolution: {integrity: sha512-ORhyV+a1rFQtHN6u3poH/0o+fGGCpsX3pR0ugCqJR0ANrV0yt9xyK3A9Dk7ivq80gNyZHNy5RIyKVmEVobT+6A==, tarball: file:projects/arm-recoveryservicesbackup.tgz} + resolution: {integrity: sha512-76IF5KI/OCOCdLaKuMR+C5gCzNfBLMzBCfgQ4d5cW9DovTXxhRzO9sXzKfwmgnL1+VUyvCo3GxhzTYm6ncwd7A==, tarball: file:projects/arm-recoveryservicesbackup.tgz} version: 0.0.0 '@rush-temp/arm-recoveryservicesdatareplication@file:projects/arm-recoveryservicesdatareplication.tgz': - resolution: {integrity: sha512-jwyTWXOa41S6FC1Eq5lU5cqsV92IXbrEi6PUnSFlfDnwJEt06hFrWnIkU4qAnNf9B4WMXoPk4ELt0FaNeNQyyA==, tarball: file:projects/arm-recoveryservicesdatareplication.tgz} + resolution: {integrity: sha512-AHHJ75uI52v1CjDrAS/Vz96KjP2q1IikVmlpspeJqIidQ+/5v1CObBy0sHkynCz1Gwa6dvnCQjN4OOJZK/5LkQ==, tarball: file:projects/arm-recoveryservicesdatareplication.tgz} version: 0.0.0 '@rush-temp/arm-redhatopenshift@file:projects/arm-redhatopenshift.tgz': - resolution: {integrity: sha512-uHurAUW+gRNaJcINKZFzmtdRLwLPbkkDk6G3kfHuv9VAxvZnmR4d6gkbFIBqPY/LTSOZVVtGKGUjrCydpqSqDw==, tarball: file:projects/arm-redhatopenshift.tgz} + resolution: {integrity: sha512-23R0w2KiKbFf8YFP2ta7KHEAxkh72HsNiA5dknN8J1ckj343t8bYnmUB0hRKNL3H+PrxPr524F2PKNxAQkcRiQ==, tarball: file:projects/arm-redhatopenshift.tgz} version: 0.0.0 '@rush-temp/arm-rediscache@file:projects/arm-rediscache.tgz': - resolution: {integrity: sha512-mqXKgjQsTByY4hoNrEiHkWH3rM44q2jDp2StlUCKzCBl7ymAOpr5csyv96CzMPz+SQ0Q+wMLG1qfBFqBg4EUwA==, tarball: file:projects/arm-rediscache.tgz} + resolution: {integrity: sha512-o/WavjUvSM12zp157VxQXcnBjnJCCx71op3cOmGs1G1GvlbSyctjdxh7gCC+joaQgqSbly+uLUXBWVfNKUg5JQ==, tarball: file:projects/arm-rediscache.tgz} version: 0.0.0 '@rush-temp/arm-redisenterprisecache@file:projects/arm-redisenterprisecache.tgz': - resolution: {integrity: sha512-TvS2jTD38S5+eaF3aAU3x6wjVqwu+whAMApe9j8Mto7P+I7d3cWHzPW39SgVvq1nlJNv7affikeP3OLt/fLu1g==, tarball: file:projects/arm-redisenterprisecache.tgz} + resolution: {integrity: sha512-5Z8uYrGcW5YFRPIJu5eQREcrMDR7Q9k8wn5HCoJA1Wikzn3eU+8F4VbzZUSizYeOGDQpmb9IucwRht6ou3V34A==, tarball: file:projects/arm-redisenterprisecache.tgz} version: 0.0.0 '@rush-temp/arm-relay@file:projects/arm-relay.tgz': - resolution: {integrity: sha512-npAuAXjnc/ux0phmw9NZMrKpIucViOpyzniHqHhnb9ji3JOH6E8n6ItXjU2lnP8jL1KrkchouR9h+npdeSUF0g==, tarball: file:projects/arm-relay.tgz} + resolution: {integrity: sha512-lMx/fFZsO2YkByAVnv7dZJQTOmM/y7M+5RHBl7qJ2NSfchb4wQxs5ToAn3NiRugl7b6JRF2l1GbQvTqsYT6RHw==, tarball: file:projects/arm-relay.tgz} version: 0.0.0 '@rush-temp/arm-reservations@file:projects/arm-reservations.tgz': - resolution: {integrity: sha512-sewBvCJL2Pk+iTgC31ZfN81phMuXpCmsFrwVdor+nuMHk7OpTa1ID/2ZNsMRNSy7qIBte4sTyu7i+EK3eKMkng==, tarball: file:projects/arm-reservations.tgz} + resolution: {integrity: sha512-sBNWrCCUTRq9NWEA3RXTAziFxXcPDzkvjZvhdi+L9quEvY5nbPG8opNHL7WlkF08LwI009kqwgKzDKioQknCUg==, tarball: file:projects/arm-reservations.tgz} version: 0.0.0 '@rush-temp/arm-resourceconnector@file:projects/arm-resourceconnector.tgz': - resolution: {integrity: sha512-IQ/DVs8L3Y9b1xrY2DEJqyeMv+ch8EphbTjapMxDo/n7jsG88INZl6OO7Cs7I/+K2IeFJYElCWhqAdYRTRGAzg==, tarball: file:projects/arm-resourceconnector.tgz} + resolution: {integrity: sha512-SLMM7BNGlN1W6Eryz2mzeMPMiA+l3iAOtacTKlsG+sEwLcetNF+OLB12sUqgVS75BeFXo3nujpqp+NtT6AaZtw==, tarball: file:projects/arm-resourceconnector.tgz} version: 0.0.0 '@rush-temp/arm-resourcegraph@file:projects/arm-resourcegraph.tgz': - resolution: {integrity: sha512-FkmQjiHnhCh/MbUDAPq1H4IanZMsgOy5N7fhcMVQ+lx6BKXuXLS+f5xnwUrqTqpgGmHknAopJDBzRJnGFpoZoA==, tarball: file:projects/arm-resourcegraph.tgz} + resolution: {integrity: sha512-cqMXQAifgNf4d1YcPufETrpI6sJ81Rx0/9e+lKjqYoTavqxn8nJ9ockOR6M1nlF0iB6gqSC/ea/fwK4Hc+RSuQ==, tarball: file:projects/arm-resourcegraph.tgz} version: 0.0.0 '@rush-temp/arm-resourcehealth@file:projects/arm-resourcehealth.tgz': - resolution: {integrity: sha512-GXHO8e7peT+K3AAEnPnBLBWSxYWC6HJuwTXagizGp1nVTrsdxOXdNKZlzdp5xnNLwzvO8K4uD49L1EydzpRxnQ==, tarball: file:projects/arm-resourcehealth.tgz} + resolution: {integrity: sha512-kY5dMY1m/BXvjyc0TAVo7aMUw6hkdXO9sT9ih96CqxoxiF/NH95b2wh4W0/qwkD9CKa2njhrZFaUDNUyisZb0g==, tarball: file:projects/arm-resourcehealth.tgz} version: 0.0.0 '@rush-temp/arm-resourcemover@file:projects/arm-resourcemover.tgz': - resolution: {integrity: sha512-E1TpN34Obt6d0qo/RJYOOTYnN5n1ko8+T2KJI6ntrNdjKjDNe/b27aGY72wiPYN47ZPYiN5DIN6oijAu3CwE1Q==, tarball: file:projects/arm-resourcemover.tgz} + resolution: {integrity: sha512-WB/HObBMAeJd9pFmNZGIUzYLHkEq9h1UH5U4AJ/pIr18WbCXhWujhYcIXVbrPRvUgCNBCcIxMJhoCnokQvIf/w==, tarball: file:projects/arm-resourcemover.tgz} version: 0.0.0 '@rush-temp/arm-resources-profile-2020-09-01-hybrid@file:projects/arm-resources-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-SaS4VUUNfV2+iGdNFzNCjvdHRjEXBXOYxBvO9jmwSuLP04bTrzGeSMcyHr/7xUiRu+gDtuNNL8I3MpOWxf9yKQ==, tarball: file:projects/arm-resources-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-0P/+Saz742+PPnAn272/Oz9v0y0FFj2F05aIU/+W/uSBWz9ojpyog25M/QPBpCYgjOHd/mXbffhraYJPTua53w==, tarball: file:projects/arm-resources-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-resources-subscriptions@file:projects/arm-resources-subscriptions.tgz': - resolution: {integrity: sha512-eOV6/AQ6x+Duu7SU0VYAgE293uri9RmSKCQW0t6+ND0bQe+0hkhyKhqpYvYcA51K1t8F0RwHpe5L+a3MX0BQug==, tarball: file:projects/arm-resources-subscriptions.tgz} + resolution: {integrity: sha512-5GnGGfzjo/OB1Uv4xsBUPOQ99svgWbgoa8peip0lvo/YzuakScDh3ATqOY8l6KF87yxNYAVUrAOfP3d6GgLynA==, tarball: file:projects/arm-resources-subscriptions.tgz} version: 0.0.0 '@rush-temp/arm-resources@file:projects/arm-resources.tgz': - resolution: {integrity: sha512-Z5o8wSKtwptEh6C9wnr2XfNKWE9TVUqbbtrUzET8J9ZbA7hIdfGehg7oA/zobUBy6BTORv+AvxcWwMb3T4otUA==, tarball: file:projects/arm-resources.tgz} + resolution: {integrity: sha512-Yg3ikDGlXGok1QoLxiMEvYSoby8yPNbF+WWVkRXSwWz3YYh4d7E/rIzwyivSyTp9ofEjPTzIXqXmZtcGgfiuWA==, tarball: file:projects/arm-resources.tgz} version: 0.0.0 '@rush-temp/arm-resourcesdeploymentstacks@file:projects/arm-resourcesdeploymentstacks.tgz': - resolution: {integrity: sha512-Z1tI4du1XM08k7N4w6B6lZfV2OUZRU/vRihoSoA8UtjwsAhrJUr/eEg7zoTqJROk/UsTV543WKudEs+E9Uybuw==, tarball: file:projects/arm-resourcesdeploymentstacks.tgz} + resolution: {integrity: sha512-MKeL96dmEcCmLzFUchFUV1e3FWp8wOM2m9WfFfDFhmfvKxr56QHp3meGly2C089g2ZdDF25ARoztiPmNzOtYgg==, tarball: file:projects/arm-resourcesdeploymentstacks.tgz} version: 0.0.0 '@rush-temp/arm-scvmm@file:projects/arm-scvmm.tgz': - resolution: {integrity: sha512-lCG97NBspknQZe6X8gOmxq3BlO93Ae5W6ahYbhL0LH9Z31pD7mYWZ07K6vZNnxe9AFjJq3S4ATzKJRMt2BGA1g==, tarball: file:projects/arm-scvmm.tgz} + resolution: {integrity: sha512-JmBrposOB3f0bULiL9yDPyOBfQAFt1KloDxGzTbmPPP7KfKbpYkkK7DZq9gzL/jMR3nlUCTxBgTHc+orTU40Fw==, tarball: file:projects/arm-scvmm.tgz} version: 0.0.0 '@rush-temp/arm-search@file:projects/arm-search.tgz': - resolution: {integrity: sha512-iuw1O//MMi4PQwJ2m7GZ6kceex3NPwx/uCZTrQpoSsWICVA53It5UrKhp1V2B50LUmR+JPW168oHiRze/baEQQ==, tarball: file:projects/arm-search.tgz} + resolution: {integrity: sha512-CSGe1ApSTZMu44mukcuUU//7eoDAtffXWDTvY3H+kIYuBwF/y7TasWB1t6Su2hcADnrczG2A7Ju1kKzZWuX5kg==, tarball: file:projects/arm-search.tgz} version: 0.0.0 '@rush-temp/arm-security@file:projects/arm-security.tgz': - resolution: {integrity: sha512-0hAtZ4beurHm2edfOJ4dZbG5Qp/pRT0Sul9jgV/YMbPmCPrJoEYAOipT+aMsG+1icbF/SLGrYbdOFvoXLMSeXA==, tarball: file:projects/arm-security.tgz} + resolution: {integrity: sha512-Jg4VVVfU683pxk/R3z2/xRKZda1e0heHyWXJQQRRUNW/IMKHAI202P2ySDk8QvROlELz/cm5xDd8nBeUxyCXCg==, tarball: file:projects/arm-security.tgz} version: 0.0.0 '@rush-temp/arm-securitydevops@file:projects/arm-securitydevops.tgz': - resolution: {integrity: sha512-v+jADVUWyJLcnsUtIvMLI0awZzUexStBcMuUKP3ESrA2/aGjZj+j42sK4CNvFHq24lZIT7e8um9Zwjy+8hYCbQ==, tarball: file:projects/arm-securitydevops.tgz} + resolution: {integrity: sha512-fGTT+XyYEixb185bcZZ7LILWrxhXFuEhYdTZFUyhAhhwDe/pEZIXcfJ8UXLLYABfoBz0dRQCd8EQPYvXh8y6mw==, tarball: file:projects/arm-securitydevops.tgz} version: 0.0.0 '@rush-temp/arm-securityinsight@file:projects/arm-securityinsight.tgz': - resolution: {integrity: sha512-7cVlhAQhaZ4EFSbZ9K4Gi6ZW4UPl0oiohRdJK2gybcpLScGRt63ZwwxfzTaVf0+MlsqdZd6pa4r7yeX2HRcyJQ==, tarball: file:projects/arm-securityinsight.tgz} + resolution: {integrity: sha512-jDaUR42R/4oP75bObifhzRk/oUtQi7RoSMHxsIle8IK+nCubQ9e0qt7Q225PZTlh1c4wzdfht0t+z4mw8zFX5w==, tarball: file:projects/arm-securityinsight.tgz} version: 0.0.0 '@rush-temp/arm-selfhelp@file:projects/arm-selfhelp.tgz': - resolution: {integrity: sha512-Ph4D1Ur9Z+T1AOFFq1AGWfG9b/z2yGbieehEsKLSNqrr0yet/CKSwqS/aVsS9DRIC4p/JxxBQD3ISvW3IaAVtQ==, tarball: file:projects/arm-selfhelp.tgz} + resolution: {integrity: sha512-IRo7QeAtCHYpwD3iGWu1abIstu6qUE1PHXT0CXA/ZzWLlyJ4j4gyxWGmplVXuuie7PTJ07ED20AGtqOT29dRQw==, tarball: file:projects/arm-selfhelp.tgz} version: 0.0.0 '@rush-temp/arm-serialconsole@file:projects/arm-serialconsole.tgz': - resolution: {integrity: sha512-4dbLLMQuoKm/8gcYsVOgwT+z/C00VsIi1GQi8S3T3EokYDociEHMN3RlbSot2UAX+vlguPyvhfSdH4IJjYwjyQ==, tarball: file:projects/arm-serialconsole.tgz} + resolution: {integrity: sha512-GypqRJaY2dP+f9cTFTRIy6qp43toqtJgR/9G/JFp7uYj8P9txtx0IyHyB0er+kfFmoOzsKS121BqksHSWGk1qA==, tarball: file:projects/arm-serialconsole.tgz} version: 0.0.0 '@rush-temp/arm-servicebus@file:projects/arm-servicebus.tgz': - resolution: {integrity: sha512-zaW1RSsqb0bZ4KqQ7tU7wpCqretSpWAJoO0SnSFI8Vtogp3+w+rWtaEzj8Qxz/nd/iczIZ7XmuTbwonE4H14lw==, tarball: file:projects/arm-servicebus.tgz} + resolution: {integrity: sha512-0Id22+g5s1ZTnTdTFKKyXRYwnDIuU4FKRlH4e20TmKMnGmiNQo/ib5qI5RsW2l0p33zm7H9NA+yukAc9l/TQzQ==, tarball: file:projects/arm-servicebus.tgz} version: 0.0.0 '@rush-temp/arm-servicefabric-1@file:projects/arm-servicefabric-1.tgz': - resolution: {integrity: sha512-7cAJaq3WJyeDMESFjmTkrJx0iDBk2FnXsRuRTuO6ceXJJFf2MtCNDPDcjyNdjyrYWYKoIueOYanxoWqvkxBqcw==, tarball: file:projects/arm-servicefabric-1.tgz} + resolution: {integrity: sha512-yrrFIzWc99z8Gz2MOjkEBBk27F1Ry9OHDzNxZk1MbU5u4ZLcPoTm64hCjVVWfGnyEsrApqo1HVSI949KDkomsw==, tarball: file:projects/arm-servicefabric-1.tgz} version: 0.0.0 '@rush-temp/arm-servicefabric@file:projects/arm-servicefabric.tgz': - resolution: {integrity: sha512-oj6EbRigeNBbz+Fc5PL18asJi2kVpLEMLatFc9M1eBEzOjBb6q7lClglRfyd9DabZHCgc0kCVbzrRAMYfucJHw==, tarball: file:projects/arm-servicefabric.tgz} + resolution: {integrity: sha512-onlinX89I6AcQvlV8+4aNVn8e/yXskZBfMMemAFYVM9GS9AX3Em6JTXRO/3ZD9qu7Zf+wyrE2yRr6OmcJn/jEg==, tarball: file:projects/arm-servicefabric.tgz} version: 0.0.0 '@rush-temp/arm-servicefabricmanagedclusters@file:projects/arm-servicefabricmanagedclusters.tgz': - resolution: {integrity: sha512-GVGzfGJV/tvWsjKPNITHAUPjE9Njzylms8inT5iDe91Swx/tSGM4wKAy9tcLX17AftxJ/PAq+Rc53mDbR0HMrQ==, tarball: file:projects/arm-servicefabricmanagedclusters.tgz} + resolution: {integrity: sha512-XJORCYQaxGTI4A/xLddK8PR4axcz55i7KHb9iXpwJCTbEt7VGQKD6HoRGSYrHVK1/zZjH91U2uTtIVZTCfB6nw==, tarball: file:projects/arm-servicefabricmanagedclusters.tgz} version: 0.0.0 '@rush-temp/arm-servicefabricmesh@file:projects/arm-servicefabricmesh.tgz': - resolution: {integrity: sha512-HUsSTE8noll3tA5q9BJ9HdGtojcy1I/X3yWEKEP1Km3AaHBMAw+dyhWKg5mqyITIWBRmym4FEb6fzSi0FrSGyQ==, tarball: file:projects/arm-servicefabricmesh.tgz} + resolution: {integrity: sha512-SKsvA+wOsuyrm8ksf0Pf5BPDL1Gq4Jfy+GsuQKopo9LlamEg6M0xqCApY/SN5TW3z4QrMZGuOB/J6m02kc0pKQ==, tarball: file:projects/arm-servicefabricmesh.tgz} version: 0.0.0 '@rush-temp/arm-servicelinker@file:projects/arm-servicelinker.tgz': - resolution: {integrity: sha512-1sBugobeVUtlTSjm7CpABVop49HmOxn7VdvlvWUdsrgwRbZa/LwxCSR267VAzUVubgCAbVOFZ8ofY1k4nanB1A==, tarball: file:projects/arm-servicelinker.tgz} + resolution: {integrity: sha512-1xg6e3Z10CmtZXgv3f/2EO9eUM5mtF9TLgx/Ei9bqiSUJn5gTJFNreLy39DeoV5tc1/RoDZMIvb7u5+xpWXSpQ==, tarball: file:projects/arm-servicelinker.tgz} version: 0.0.0 '@rush-temp/arm-servicemap@file:projects/arm-servicemap.tgz': - resolution: {integrity: sha512-qF4TUDzN+MDK9PUfjuqlQr5CTkku0WZfNVXmt6Gsm2KcJbrt4WBX7hxbZjz7usW14riBJGwaBPsA6naZT+Fkhg==, tarball: file:projects/arm-servicemap.tgz} + resolution: {integrity: sha512-zjUBgTPPQX5GgV7C8Wuwmne6/iditU0oQu/UIoHiIARbaA28G2Q5sJ1/2mNu1yC8WXNuuKKROGBg7S/W319lGg==, tarball: file:projects/arm-servicemap.tgz} version: 0.0.0 '@rush-temp/arm-servicenetworking@file:projects/arm-servicenetworking.tgz': - resolution: {integrity: sha512-+g4A/M/8bv6wPw39fVGovVoDscjlu6J1W9LEELpi9In/o7Bpvuv28D7eXEOOMQQX/a7K36auP7feXWiqVGGKJA==, tarball: file:projects/arm-servicenetworking.tgz} + resolution: {integrity: sha512-SrjrSzLKl8APiyM3ZtyOsQp+1jmlmZbm7TGrodgTt0G8pQQlnz8IkLqVgWt9R3lGjjRF2O0MAs9H2TchvyyXRQ==, tarball: file:projects/arm-servicenetworking.tgz} version: 0.0.0 '@rush-temp/arm-signalr@file:projects/arm-signalr.tgz': - resolution: {integrity: sha512-VDTvbzZ9a/5kMYkm65mt9yzmXJZbUBM7/F3ETnz7JnbaeDhEaetnXG0qanzA7bxVjf0efFJEObQiX/2BS3fnOw==, tarball: file:projects/arm-signalr.tgz} + resolution: {integrity: sha512-VR/RmVSR6u0nImrhL10S9GsbXbEd2h2CqbyNo/9b3VMmEAu49uz3bK7PiRXvdI4RSsI1TeEceeXjJ25e70V2ww==, tarball: file:projects/arm-signalr.tgz} version: 0.0.0 '@rush-temp/arm-sphere@file:projects/arm-sphere.tgz': - resolution: {integrity: sha512-X1Eq639iJk1jyonnuPgAmKMTQua/9x/WAx1I2ZQmzqweUQNJByWSpFJEzKK7/Z9bovDW0yU9ZTaIYTEYHui3OA==, tarball: file:projects/arm-sphere.tgz} + resolution: {integrity: sha512-mAK7/5u1SglQ1F3KuYi1W58khwoQN/MHJNS5tW2k5f1rpLJKobgAwiCLVEFgfblu+JmK7NEGp/yMtwa9fugaDw==, tarball: file:projects/arm-sphere.tgz} version: 0.0.0 '@rush-temp/arm-springappdiscovery@file:projects/arm-springappdiscovery.tgz': - resolution: {integrity: sha512-xaXEzE40dYh1PnNQHNyPqiQKh2TBf028SFhlv9shBnIEEspGJY27bLTPq8k2VtOlFqFlZBYUGt93Io9+daQh9Q==, tarball: file:projects/arm-springappdiscovery.tgz} + resolution: {integrity: sha512-P8bpWmz6FDPevTDskX0EdEaUtVmdbL/nr18qsWCLDNRpU3JUOzCsahzCMIjpoxY0VoapSbIokOhcCs6uKwhcrA==, tarball: file:projects/arm-springappdiscovery.tgz} version: 0.0.0 '@rush-temp/arm-sql@file:projects/arm-sql.tgz': - resolution: {integrity: sha512-6O/rm8Da2EkufqBMIeMT83368TT/aCLUJL93bmBWvkiyJNhYPUaBv24amV3dIlk+IyOJFwD9/ZR2WPJsHoa41A==, tarball: file:projects/arm-sql.tgz} + resolution: {integrity: sha512-Y+6aa4zND6EgCIink/2aq2TA1DWTkW1YzVZajzFaynLLZ2K3zXnd7qVxb2fbSvx5WFNlS3OnZfWfKN2g/RK/mw==, tarball: file:projects/arm-sql.tgz} version: 0.0.0 '@rush-temp/arm-sqlvirtualmachine@file:projects/arm-sqlvirtualmachine.tgz': - resolution: {integrity: sha512-OFGH6leaNBM7RrKk2wyLm9xtfMOJkoQbbSk6vWv022TgdnkByXQEeNuyDtVr8Yn0yCf08HAy2n3JXi0lLSWfpw==, tarball: file:projects/arm-sqlvirtualmachine.tgz} + resolution: {integrity: sha512-jaF4BXGDVHqgT+KVrUz7joRKg+lDAUlsY065kaIfsg4Nf8YCJmOAknVyCzcGR1pTvFY1UG81Gc+3fqU1rU0+Qw==, tarball: file:projects/arm-sqlvirtualmachine.tgz} version: 0.0.0 '@rush-temp/arm-standbypool@file:projects/arm-standbypool.tgz': - resolution: {integrity: sha512-lBp+YGTwo3+S+0zRPNL42SjK4lLENcKqTdRrqbJfiiLvwu92k6wmM2YWr5xZXHh5arGKmz2FkNZuo5nFlRdKOA==, tarball: file:projects/arm-standbypool.tgz} + resolution: {integrity: sha512-DF5wCFKQyLiFXpQgOkUmz9hReXdMUJhPkrN3AHoQXuZyLx+wA8YEdelvInjVGJ4d0vAT1/QR8TAbM4Cm0VpX+Q==, tarball: file:projects/arm-standbypool.tgz} version: 0.0.0 '@rush-temp/arm-storage-profile-2020-09-01-hybrid@file:projects/arm-storage-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-geaWGERDYyP8A7Bal4+lnMKqyMRzG+D+D+nSAxc/pwXso6AjR87tkcHdO1QekQ9B+YYE5MD83eRZFjZG2WkCFA==, tarball: file:projects/arm-storage-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-hTj3dx0q/yfP/Pl10XTCHJDvw0N8zyPVQMm3+VDpQkODNBahzyIflcc4cGu7FMpJi9qAqyWqJbdywj3CbPCBmg==, tarball: file:projects/arm-storage-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-storage@file:projects/arm-storage.tgz': - resolution: {integrity: sha512-96YAfFqgmj+OyrSdb+epWp9tJ0MkJRF2UzjkCaZKG4pMvYJn0wmoHGJUDULXdjeng4wBzyuBfCHgMSh+4IhNVg==, tarball: file:projects/arm-storage.tgz} + resolution: {integrity: sha512-wvvO57WHgf2fwzobLBLO7aUgVvxrJBub5pMckND8IpvYw9awqfdhP7V0kV+keZrPxhcygK2XnY32nsCPunj8sQ==, tarball: file:projects/arm-storage.tgz} version: 0.0.0 '@rush-temp/arm-storageactions@file:projects/arm-storageactions.tgz': - resolution: {integrity: sha512-MXJ4W4OcHn2M1vIodSjm5wOEk4YaeNZFMcT5yZ4Ei4QOXlhF9KOK6ItjWTCfuS6mRcUalzDk3C56f8Y9tS+01w==, tarball: file:projects/arm-storageactions.tgz} + resolution: {integrity: sha512-Tq3PUkeMnLjdwFUfpnILuHBMG5K5NJWGiZuJ289MZZRHaq5jB5roc/Vra16nwb0aW8cAZbW/nXT7yl+z2XeHKQ==, tarball: file:projects/arm-storageactions.tgz} version: 0.0.0 '@rush-temp/arm-storagecache@file:projects/arm-storagecache.tgz': - resolution: {integrity: sha512-Iz0XFemAu+T67djKwb1It9AA/JxBlK44gAOTt+T6TXz8QArdoZrKAHdK3EpE3SbwcduADOJTQe8Jm9dyGyx7jw==, tarball: file:projects/arm-storagecache.tgz} + resolution: {integrity: sha512-k0d7BswwX7slBNI1udId1vryA6pEcrUW1vhOxMCOr8qnTPXpBoCWGpiUgEqWAb7Ij/YbD9xFECxxGCVSU9CGOA==, tarball: file:projects/arm-storagecache.tgz} version: 0.0.0 '@rush-temp/arm-storageimportexport@file:projects/arm-storageimportexport.tgz': - resolution: {integrity: sha512-pJrYG2PXkcKJfbbbZBseevZ8gypmFBHj4e7WBhXDdUssJJrQk/F5LZGNqgNuOLAJr15WBb8HG+ksKds7VtFVEQ==, tarball: file:projects/arm-storageimportexport.tgz} + resolution: {integrity: sha512-wWYXAOQzceRQrW2iNkc9hRjnRcMv1XYuL3wX2f5s9nnr4aPKsdkQd8aNjvLV9zX0qFQSsOWzkeh1a5ltTe6ISQ==, tarball: file:projects/arm-storageimportexport.tgz} version: 0.0.0 '@rush-temp/arm-storagemover@file:projects/arm-storagemover.tgz': - resolution: {integrity: sha512-weFz8IfC43cI+eRUNa5vgEuxE5+8fUjiJbEJKELAWx0RanZ8AqJUsO0TPhuv4SH+pgUpyGLnBCVquPUvKpxPFg==, tarball: file:projects/arm-storagemover.tgz} + resolution: {integrity: sha512-bCAKnCipcNgK97r9dFp6xBdMynr3/yk5qFzeddAgDwuj1Gc9mKnsDsBAi11BFdTTVr6tQLs/2ym1iQ3Nnxl1pw==, tarball: file:projects/arm-storagemover.tgz} version: 0.0.0 '@rush-temp/arm-storagesync@file:projects/arm-storagesync.tgz': - resolution: {integrity: sha512-XMyVLoa+SiHBrDtdPOCDeociinHaQDtanvZqZxNMx+49SXB35gUwmAXU2cHbKFwFbVjxfC9WebJUnQZ5Gp6j8g==, tarball: file:projects/arm-storagesync.tgz} + resolution: {integrity: sha512-urri/ZoULfTBbkHm92qC5hSohyDk6zABcHrqTYqRAwA9D4jeckUeZaFFFkvRUGbkM3OnlGLwHvzbJzDpzG2Bfw==, tarball: file:projects/arm-storagesync.tgz} version: 0.0.0 '@rush-temp/arm-storsimple1200series@file:projects/arm-storsimple1200series.tgz': - resolution: {integrity: sha512-p18DSvegaISVvEQgLwS/wIu4FEL7iy7V+2kzneXWJ4rOZtC8kr0dPooDiMu63OMEgiaX7cN1Fv1YvwGlZaDuvQ==, tarball: file:projects/arm-storsimple1200series.tgz} + resolution: {integrity: sha512-xqNXF6vt4FQbaTMvBT31UUE811TZ5yTosjR6tnVnIICJenSYkQm9ZDogXGP9eGPnu+1DkX1LdYgEH93glIuxyA==, tarball: file:projects/arm-storsimple1200series.tgz} version: 0.0.0 '@rush-temp/arm-storsimple8000series@file:projects/arm-storsimple8000series.tgz': - resolution: {integrity: sha512-RUuXcxA2aXSND/iZoTw5T/KnGNFiqd/1dzFcnLdZK1cOLx9veZq0Bti05Vx+Q09IkHd2/pRG4+i6A3M9l105uw==, tarball: file:projects/arm-storsimple8000series.tgz} + resolution: {integrity: sha512-dgyOy6r3SnFGag1JxxB5oo3M6qOM7Vr/Parn94alsrhmt0Wgbvb1xUBCwSKRmutKm6SXSquMjMKmMO6qrl96Pg==, tarball: file:projects/arm-storsimple8000series.tgz} version: 0.0.0 '@rush-temp/arm-streamanalytics@file:projects/arm-streamanalytics.tgz': - resolution: {integrity: sha512-tXN/qz7WNj31YxzX5ENilTMbYgb0I5g48HNObXrL5h6ZxmNAwCLKg1JKtqQu7iN4OCVcRua/uEKht9csg2zHNw==, tarball: file:projects/arm-streamanalytics.tgz} + resolution: {integrity: sha512-vlJYSwXAvefMWqB9cERmqWRD0u/mVxljKcmogcpG0TwWxp7znyjoa3Gv7HpLQVlDigJ83Hu8WG8VR5ev6Vf1PQ==, tarball: file:projects/arm-streamanalytics.tgz} version: 0.0.0 '@rush-temp/arm-subscriptions-profile-2020-09-01-hybrid@file:projects/arm-subscriptions-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-7eHfQI96LJu7+HIDcQziI6FMxmTzVzmlcsqiroZHARuy1WNuzIeqhdeE6P/Pyl9Dq67cAzT8rFvLr5pkYQA8pA==, tarball: file:projects/arm-subscriptions-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-o/ObKWHGw1j7IQHngyT83OSlvWXXc4u0/j5J2ybjiDCRKoUBjCog2RyVJMHI6zZWYSU1IuhewPV+vUoQ4jZXZw==, tarball: file:projects/arm-subscriptions-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-subscriptions@file:projects/arm-subscriptions.tgz': - resolution: {integrity: sha512-5K4QcxvI5c5wpCedgOiOqyQq9fmyZgm7bPbFN/NnEyB+U3WWq9GSEwTPH4gfSS+vT020/VvfHunbtKQ7AiqimA==, tarball: file:projects/arm-subscriptions.tgz} + resolution: {integrity: sha512-QlgxJlUvq8R58rwwAVaeSIfUX26KHvnBldTpLhQ0LCsM9vIFhJIAFtrfzjQB64nwjSBsMTDou1RIbtkEvDzS7A==, tarball: file:projects/arm-subscriptions.tgz} version: 0.0.0 '@rush-temp/arm-support@file:projects/arm-support.tgz': - resolution: {integrity: sha512-A4sKuLckOFtXAUkrT7sQEeO9e49ZxvnKKDLgxjkKzRTtBGnNUObkWtM0uuheAmZfb6VkbdDTMqPhm9JYcnLsbQ==, tarball: file:projects/arm-support.tgz} + resolution: {integrity: sha512-pJvAJkJj/3L2LY1+VysQPWkJm4z6raPlL7HvbmLBa4dB57rPMglSlJO2JuJVXJtC5Qj+NJsfJpboINb/w69yAA==, tarball: file:projects/arm-support.tgz} version: 0.0.0 '@rush-temp/arm-synapse@file:projects/arm-synapse.tgz': - resolution: {integrity: sha512-+RXTQnZ3jRrW5BtrJ+DE985oS9+TmeALBnz2eHPlPsCuE6cq+5l2QIN8VmF3E4qLXMCk7vlhT9tqm0pT4EIuTw==, tarball: file:projects/arm-synapse.tgz} + resolution: {integrity: sha512-Dhlh9esxP7DRkBKx1OFNfWEbiVPKC8kfejshEXcdB+Qepfps7Ut1WE4mX4+X24LYzepMbvDOMhZOz9lwmfCwRQ==, tarball: file:projects/arm-synapse.tgz} version: 0.0.0 '@rush-temp/arm-templatespecs@file:projects/arm-templatespecs.tgz': - resolution: {integrity: sha512-a9Z7C23xpdyQKGO5lC1Cq8z+jysc7Fz3aDnO/hqYfiWKKzk+SEJxyGTj/A+LKV1GF0ef+X3n/gZ/XpQBXadz1A==, tarball: file:projects/arm-templatespecs.tgz} + resolution: {integrity: sha512-+W16ggQOwxAgHYavP/guVT5fJF0QZK4t0LaxL33Z67GtG1+pJoriDhG2Yx/43mzfvdbIHNmbKJlaLz/EQ213dA==, tarball: file:projects/arm-templatespecs.tgz} version: 0.0.0 '@rush-temp/arm-terraform@file:projects/arm-terraform.tgz': - resolution: {integrity: sha512-N33mFCaqI2ZhFQmBD9XUJCLTiWbuU1ezZsBV0/gRiWFzzt+zBTwgEt/x/HE39Tc7q2JbCnzqB+ms5PjyIHxzsw==, tarball: file:projects/arm-terraform.tgz} + resolution: {integrity: sha512-MmAHnFD7Z0Xfsrh5L9XxEJmBezrkmQowYiN9DB+0NhCe7c5V4F3W+UFgZaBSWi/Ui3ENzY7KFruR/ulnBBvqbQ==, tarball: file:projects/arm-terraform.tgz} version: 0.0.0 '@rush-temp/arm-timeseriesinsights@file:projects/arm-timeseriesinsights.tgz': - resolution: {integrity: sha512-66UJCOVX51rULKhiFKVxu09SNib9U9Jn6LwNPQnwKdT8DM/784e7IFzOW+q2lYJ7qPMq+xdp9dhq/jfRVV6kjA==, tarball: file:projects/arm-timeseriesinsights.tgz} + resolution: {integrity: sha512-0pTPtK7xWh5ng8bQSU3yefJS/D6uwASMwDHbK1a/FwM44T5TlOJULx3qIBQbVTGyyaGSeTqxHN9TWGHh3u6Idg==, tarball: file:projects/arm-timeseriesinsights.tgz} version: 0.0.0 '@rush-temp/arm-trafficmanager@file:projects/arm-trafficmanager.tgz': - resolution: {integrity: sha512-7NGteJ8Gj3tbjQbgQcIclrNr9V5zTZAO4msufJfW+IhjJ9qZC4mGsn8FevJG8eNS8fe+psC1qzIS094qb+XOKw==, tarball: file:projects/arm-trafficmanager.tgz} + resolution: {integrity: sha512-E/sq0Q6UOECHqvLvzEoW71y/JiYLGQbStpmLxYRUZZWvGiKtjaydeDZB9yLx6fg+UrtUw/hgqXpfXoSvUIXgEg==, tarball: file:projects/arm-trafficmanager.tgz} version: 0.0.0 '@rush-temp/arm-trustedsigning@file:projects/arm-trustedsigning.tgz': - resolution: {integrity: sha512-wGwPeLkUdS8uFAHYhPGRjtS5hsI+ChbmQHSs8C9H4EDrel45yFDkNKazb3Njff0LPlTQFDggKVitNaWAANJEwg==, tarball: file:projects/arm-trustedsigning.tgz} + resolution: {integrity: sha512-TY0nGtBJJ/5K3tOLwkUHB94POVYbfKTGNPvdyWfkftcTOoZmjRqY9AGvIVPC+fwqtv+niWPyfuSATXDYYg6STA==, tarball: file:projects/arm-trustedsigning.tgz} version: 0.0.0 '@rush-temp/arm-visualstudio@file:projects/arm-visualstudio.tgz': - resolution: {integrity: sha512-V7R4lsuKzRLw3mRmT8h5AMEYK9ah44VVasK4HElO0pDqoU3peCSW1UAg8FlkSvK6z74+krq2T7DNiyhwDi6d1g==, tarball: file:projects/arm-visualstudio.tgz} + resolution: {integrity: sha512-iiZ0g3uwkqtjx+H41oV9OTgKD9wjgGWUPH+fKUQwxdIks6rtKClQER8XjTZDZ7t4OdB2ISd0vn7rc6Jxvbeyng==, tarball: file:projects/arm-visualstudio.tgz} version: 0.0.0 '@rush-temp/arm-vmwarecloudsimple@file:projects/arm-vmwarecloudsimple.tgz': - resolution: {integrity: sha512-IXtvkSMEhfyuQbt6rgL/GPMT/1q4aHaq/cpcw2KQkvMSDwnivsHi5qonQ5OAeHoHGvcrZ1U5pNdbsZaPAoMy1w==, tarball: file:projects/arm-vmwarecloudsimple.tgz} + resolution: {integrity: sha512-3tZQi3RvQ5yfzrqSatt6cKaCqCecLYMfHY66bjzsbRa+gTp+NExBkANfU5R8emT2i6ea+UZZ2hQCWsx1AJ+C3w==, tarball: file:projects/arm-vmwarecloudsimple.tgz} version: 0.0.0 '@rush-temp/arm-voiceservices@file:projects/arm-voiceservices.tgz': - resolution: {integrity: sha512-aDeupRN9CQs+kr6PrS8kmxdgURfMeu+w8Ty5cibkXKdbF8hYL00TWuHET/NcJqqVG1xVeU8XKKXt/2+G3aMYBw==, tarball: file:projects/arm-voiceservices.tgz} + resolution: {integrity: sha512-kosR59A5JXOp58KN2jfVZ3f6Oo9ARcAuKIq72BrhU88jtqX1RDSkiBZb5J5uZekba24YN9OT/kxQaYqgXOjXIA==, tarball: file:projects/arm-voiceservices.tgz} version: 0.0.0 '@rush-temp/arm-webpubsub@file:projects/arm-webpubsub.tgz': - resolution: {integrity: sha512-HNbaAuehSdvlqQYICMuKWgqkA+btcUaCvNxNQhK+J8zJF4F9rnprLOQngf5GzWlG68K5EjGL7k7Tqp4FYRqJTQ==, tarball: file:projects/arm-webpubsub.tgz} + resolution: {integrity: sha512-fDLBArOc3A7XZhQBW8i1gKOJGxs1Fx3EJ8HvbS1OBk4J3Hi6IHqCAb4bt110r6MFVvhsj4Jp65mxy2kKT+fLKg==, tarball: file:projects/arm-webpubsub.tgz} version: 0.0.0 '@rush-temp/arm-webservices@file:projects/arm-webservices.tgz': - resolution: {integrity: sha512-Ylcsx7hFgB6ULizv8XbJT7kwpjVboyR5S4Nsk0+IgXejnVGb/I/XpQfkzlXZ7YWT6hUiGNPr/Y47yCFo/8soyA==, tarball: file:projects/arm-webservices.tgz} + resolution: {integrity: sha512-qUZCuYNZ5kT0ECo3thcPesQw6YbfkKu1L5kkCH4Fz6p3TExrb8pJE3cGeoi48uKPlMMGwzVwZiLjmNW++vGxEQ==, tarball: file:projects/arm-webservices.tgz} version: 0.0.0 '@rush-temp/arm-workloads@file:projects/arm-workloads.tgz': - resolution: {integrity: sha512-DeDaUMsA4kn9aeYpKuHD/xRG+YIm5sTTfxgbHKua+j3QgFCGE3LHNPBhZrVC1kj1lV8TkIquJgeJFPCgS3mpbg==, tarball: file:projects/arm-workloads.tgz} + resolution: {integrity: sha512-6o/OYAczoTYq6N9JwIhFvKG9ThlCO7Ykm+LTZdyc20DGAt09QRPa5EQZgp4eYOc5RkT5owOKXwQ4Wzwp9bCtmw==, tarball: file:projects/arm-workloads.tgz} version: 0.0.0 '@rush-temp/arm-workloadssapvirtualinstance@file:projects/arm-workloadssapvirtualinstance.tgz': - resolution: {integrity: sha512-P/U9WU01yPSrfER/3cV8v8yzAe4nTaDst2A5DNcdhnI0DqjBgpkn7n8q3Sao7CsV0ZFKZ3WsC37URX20ftpBHw==, tarball: file:projects/arm-workloadssapvirtualinstance.tgz} + resolution: {integrity: sha512-1efeXQjj+Bot5kxmH3FyAfkKZje9/4FL8/HsR1nWFIAmDkjAb3N50IHt1TUOSguH+0le7gULBM9H7WnVor36nw==, tarball: file:projects/arm-workloadssapvirtualinstance.tgz} version: 0.0.0 '@rush-temp/arm-workspaces@file:projects/arm-workspaces.tgz': - resolution: {integrity: sha512-4GaA1E4yv9t4ydjGi23WamFB7CSbkQ1/vXsewkuQN28XFiSWI81xYQimpsKvwN7IOhXwFO4FPZIGSzMoq2b3OQ==, tarball: file:projects/arm-workspaces.tgz} + resolution: {integrity: sha512-67f9NkAU5nvUWiyVz6158pq4UW/Vbcojn1iwVuK3NSQLx+12y7h8LqtQ5vBhAuhGpH3PzsfF1VacA1ChJOGV6w==, tarball: file:projects/arm-workspaces.tgz} version: 0.0.0 '@rush-temp/attestation@file:projects/attestation.tgz': - resolution: {integrity: sha512-3sCMDoIZh5Y23js3HfWFMKzahYChBEc/+kaUas0+0FJ06UcWuof3jLf7hXnADbxp+J8/RCnvDqy/0xDmOcZkPA==, tarball: file:projects/attestation.tgz} + resolution: {integrity: sha512-hPBFt/E37B8+HgXfZAon6tztIRmoNwxJaNaHCMp5XhJBcM7yXmYye9mkM32NOpeMEs5dMYZ40kH6L78JhLV+tQ==, tarball: file:projects/attestation.tgz} version: 0.0.0 '@rush-temp/batch@file:projects/batch.tgz': - resolution: {integrity: sha512-XuL+PYlzGB/YmNDbnPrIq9AjDzOIhnjUFAr7XTwTGR8huP18WZWmL/m0YW4MlwP69ewEyjD8dWCAb0KmJl92pQ==, tarball: file:projects/batch.tgz} + resolution: {integrity: sha512-D2HxCf4Ng9SdTAqHY54j94Sb+ksmCFT4y9WK7CfoHeFy4xp5B3gdFxV/D1MTFqRXGEkb1cibarcbGeA7NNDzFg==, tarball: file:projects/batch.tgz} version: 0.0.0 '@rush-temp/communication-alpha-ids@file:projects/communication-alpha-ids.tgz': - resolution: {integrity: sha512-JoRTIDlwHZDPs7keNqgIU0MrximNBp+fJgAIZoRfwav8szwZz08PtN2HvqjTP1BZ8bFcnOkdlWJhZwvcHiPBsA==, tarball: file:projects/communication-alpha-ids.tgz} + resolution: {integrity: sha512-2mCkBSd5Aq1sCmWxODVQdJY/Stvo2Y2hkYIB/qe15/BNNDB/O8mQM5DxN8n4uZQ8dYjmjsB2Cru/8lzcYmJwwg==, tarball: file:projects/communication-alpha-ids.tgz} version: 0.0.0 '@rush-temp/communication-call-automation@file:projects/communication-call-automation.tgz': - resolution: {integrity: sha512-j9rSk+SzAA5RTLrNqnlSWmfabKPVUE/iu7X3ckI3iQyYIgHYjn1Ek+zXQaN0DYMThl2chTjnq389qCuy1OeT4Q==, tarball: file:projects/communication-call-automation.tgz} + resolution: {integrity: sha512-F9DGlpBcYN0Ffr7Mko/qCsYUfU83yJsMaqEywR5HmJSlTTBglYab6M/XAQ+mPOu+kCV7CW1FuZpmPLwOZ3lKDg==, tarball: file:projects/communication-call-automation.tgz} version: 0.0.0 '@rush-temp/communication-chat@file:projects/communication-chat.tgz': - resolution: {integrity: sha512-b8v2dH6bvbYnjZtQtKl6ReggBc4gkDHx66jdrHCgqW4yEpxfFsQAqHDQgZftlGhJCUe5eKKRJ6vqBEwhTOGWDA==, tarball: file:projects/communication-chat.tgz} + resolution: {integrity: sha512-gThm/5AqZz3gY9ictxjbunfB5SQ54wIiTJ/WmtlO/WRI6ju4JbMb1qJ7xuyNhK9445d/mijEjKEaHNS5dmJbCw==, tarball: file:projects/communication-chat.tgz} version: 0.0.0 '@rush-temp/communication-common@file:projects/communication-common.tgz': - resolution: {integrity: sha512-XzWEZCKhE4dx4TzQbLDgRWi+8qjzn8gojvk/pDAUuWUcG7nhg1H2rB67Ygmtys2qgIrTh1mB5wDyPwvVLDzjcA==, tarball: file:projects/communication-common.tgz} + resolution: {integrity: sha512-B096hJCl8KGVcAI4GLoLl0Imon8q/uo6UPQvBFGlRd+10RJqgwVuv6bwQcsIdLZGc9EtFR4dh1WpmJIk/oHkfQ==, tarball: file:projects/communication-common.tgz} version: 0.0.0 '@rush-temp/communication-email@file:projects/communication-email.tgz': - resolution: {integrity: sha512-QhLsLLokYOq6xNcg5alwSd7zmjUr5iul+3/p1yq7jzXk2vDsxGU32Wq5S1ALu5jX+eTLPpxjm8WPdCFc37UtIg==, tarball: file:projects/communication-email.tgz} + resolution: {integrity: sha512-kCtc9UyXFNIZpnxLwcKwNh4UXaKq/VL0NbDsNrAcAcMvnb/jGF00cla5XIWx/aDDP4+kKLGGAOLIP03sGlglFg==, tarball: file:projects/communication-email.tgz} version: 0.0.0 '@rush-temp/communication-identity@file:projects/communication-identity.tgz': - resolution: {integrity: sha512-cHCdd2LiWjg4jftWNnziaCV9uNSMfkhoUDFlKBymYkvmj4dbrgoobwpuPOkqJ4zoB9r86aiRDNP/E0YmMF2RFw==, tarball: file:projects/communication-identity.tgz} + resolution: {integrity: sha512-GXi3SsU9e78RWIBopm7ZbFghRH0O58RuR3WbCCb1a58tkDNEwtdlb+BCUEKqmgAg1UyzsNK0DLA9ks0TTQR7tQ==, tarball: file:projects/communication-identity.tgz} version: 0.0.0 '@rush-temp/communication-job-router-1@file:projects/communication-job-router-1.tgz': - resolution: {integrity: sha512-7NGs1l8E3JJ5oW9FXr+0jZnJyJkaCWcNqd/iA2rE1PqlEPv1bJ1GkPY+vh6cmDoZUSodOmWK4kn7Un4S5nsinw==, tarball: file:projects/communication-job-router-1.tgz} + resolution: {integrity: sha512-n2z2bSadooX3ECLjkCFKuepcUpBcSxc2IFMRRn1DeGJhGE6ZcUtyU4+RqeSc6wqNgYR5FDyeoDUK2g4daEacmg==, tarball: file:projects/communication-job-router-1.tgz} version: 0.0.0 '@rush-temp/communication-job-router@file:projects/communication-job-router.tgz': - resolution: {integrity: sha512-2asWr03USbfs287ufZkj8sgX94e8AIkX8BU9mVvBxqPp+5NwM8F2I2OeKa/ZRb9z7dcawliux8IwyB2kNGIEAg==, tarball: file:projects/communication-job-router.tgz} + resolution: {integrity: sha512-9X96kUlGoPpl9rkpH5lO7i8zNcJ1iCVu/ekombcm80uo/HE52hUTYxPxnkPyK8fLjG1rmkKhMN/v4yWVv8Yanw==, tarball: file:projects/communication-job-router.tgz} version: 0.0.0 '@rush-temp/communication-messages@file:projects/communication-messages.tgz': - resolution: {integrity: sha512-IcDGaDqJ1GhWIIajWNiyS4FUnZB3JEvDYXG7mopGzk4wgpUfOhVoVrJuz07pg3unKTn48Oqlm4EOWFmAm0wbag==, tarball: file:projects/communication-messages.tgz} + resolution: {integrity: sha512-ReB7ZS3ys+VFPUzPcmiUQlhyqhaiR08drMVGcMcPYJMCfNmenW6+cZ1AzriNVY0CSio71MQyyh3WDJk/0Z3aPA==, tarball: file:projects/communication-messages.tgz} version: 0.0.0 '@rush-temp/communication-phone-numbers@file:projects/communication-phone-numbers.tgz': - resolution: {integrity: sha512-24JG0UquvqCfpD2fHYVg31EE7Zu+1LadlqbxK1oIhPj3dnaQ152m8T++HHMAkFzfbNdaH/1yqWjLTpBVotKMXA==, tarball: file:projects/communication-phone-numbers.tgz} + resolution: {integrity: sha512-m2kcdE07LLUjLO+pVUNAW+heNAqNJLo+FfAjbZ3Z4ZjsOH4gWkC3sDhPb2lNZBzRPH8SuBQchhseyggJPED4+A==, tarball: file:projects/communication-phone-numbers.tgz} version: 0.0.0 '@rush-temp/communication-recipient-verification@file:projects/communication-recipient-verification.tgz': - resolution: {integrity: sha512-cpVMuIbO+tSFbjQSjDB1yOL3QgqBKppbLvWuYCe2JoY10LBIu+a5SWMTSk9DbjlN+DfUCQ8gQN01zbizH0BBhw==, tarball: file:projects/communication-recipient-verification.tgz} + resolution: {integrity: sha512-e2/J7CYk4aVzkAz8QrHSxZs5HwS1CaecXw08mFGI/uhDuNxmcWL1oHqRNJCDk8AMGsAzRd6u3neZkJuabfDB6w==, tarball: file:projects/communication-recipient-verification.tgz} version: 0.0.0 '@rush-temp/communication-rooms@file:projects/communication-rooms.tgz': - resolution: {integrity: sha512-F/7ZgMfumTgdSJXk4iLzYs3cbwxW08iZlD3OjjDYAqkYG/qodpxjdwjDxneSeXLPaIDUwYBnz9S7LTTzvSGtcA==, tarball: file:projects/communication-rooms.tgz} + resolution: {integrity: sha512-PLrdNfiv+awM5bJVE7hO1uD9TQPJXkC1ScwrwthgA1i8OoQaEWn+vpskW5Mkm50At/a4tl2aAMob2Pz72dSqTw==, tarball: file:projects/communication-rooms.tgz} version: 0.0.0 '@rush-temp/communication-short-codes@file:projects/communication-short-codes.tgz': - resolution: {integrity: sha512-4Bh0DOycDYo2hEz+Yj2Z1IJ+BrRhHj3PLWrEPEBRS61LJqNcFHxyROmdSniFzPFMccdLftvLeekkq34WbBcMuw==, tarball: file:projects/communication-short-codes.tgz} + resolution: {integrity: sha512-Ds1Js7sk+85Ato6lhobS3rv4SyE9QLtWuGcjh1okN0L61Z+oayXi6LjM5XVMD3gzlgV4S6tKgJX4G+yvqv2Mww==, tarball: file:projects/communication-short-codes.tgz} version: 0.0.0 '@rush-temp/communication-sms@file:projects/communication-sms.tgz': - resolution: {integrity: sha512-dmscPn+No1b2ix4Mc9o8yZR34qSg/0GaILdZES+WE1tBsYeSqo8yWKJo3/bTOSNBRR5oIdHe+XafVl1sWObFdw==, tarball: file:projects/communication-sms.tgz} + resolution: {integrity: sha512-HCXJQnm4PLnKjfZutc1vHXh9ed2iq1e5CI6rvjzRw0SzCgfs1GmtwMtt05bJyanzeunaiWLXWMfKHVoQa9MlsA==, tarball: file:projects/communication-sms.tgz} version: 0.0.0 '@rush-temp/communication-tiering@file:projects/communication-tiering.tgz': - resolution: {integrity: sha512-rz1BR/nFh76ye4xr8Y7ma9rk7L5MdY/OvQzCHdccWUqJtna7thL+3dBEzfugUV3+3x25rHJ6QTwpj6VFz8P6Pg==, tarball: file:projects/communication-tiering.tgz} + resolution: {integrity: sha512-UqpcP6tGe7h8mJpfdq3qLXa7F6ctb6QHGbJr1cHw7GrUeICfRd8IGX4o2YOtwi7WoRIxcakFLtR3DmJT/aS3sg==, tarball: file:projects/communication-tiering.tgz} version: 0.0.0 '@rush-temp/communication-toll-free-verification@file:projects/communication-toll-free-verification.tgz': - resolution: {integrity: sha512-mh4iB2h+E3K7dWs6knXVxNVb98YvNIrrSZobhGiQoRb9Wy6RGmX45o28nQyHVm7yk7nQV+DTtBu4N3aTIQtKUQ==, tarball: file:projects/communication-toll-free-verification.tgz} + resolution: {integrity: sha512-Remwrhf8Wr+z3waxN07OrU/VPbgH5ODU42JKx/a0z34FdIcJqtJky/Fdnn/UGY/dE6ID1Ft0tWSSpqjIZXOfMA==, tarball: file:projects/communication-toll-free-verification.tgz} version: 0.0.0 '@rush-temp/confidential-ledger@file:projects/confidential-ledger.tgz': - resolution: {integrity: sha512-kz/gO0p1kTIesYPMsgME5Tc8BCXl3x6DQgBG9NDcR586apYrge1buEHANawGmE/uh44YKSsT5PjHgRCBIkz1Wg==, tarball: file:projects/confidential-ledger.tgz} + resolution: {integrity: sha512-Gh04SARYLYKqfJcMhnzqQ4aoQcWNw+tokGGhULmwQhutUaYCVjx69T3fzYTkEeXjWx/289eFK3zBD8TMA3p7+g==, tarball: file:projects/confidential-ledger.tgz} version: 0.0.0 '@rush-temp/container-registry@file:projects/container-registry.tgz': - resolution: {integrity: sha512-TiZ/Z7Ox5LgTvY4HsWVTLaLv+P137p9P473qmw1lqDcrffv+rrg8tQhLFYdK/xc5I+rypBVT75msDDqwPrRBGA==, tarball: file:projects/container-registry.tgz} + resolution: {integrity: sha512-kdY7KS5+D/ak6cDTTtGkGMcJmPSvX9imMZx/XYkCwLcX9Smjf6WAenHlTrqXHusrUQbQWIpSS3wX8j/wwrAC0Q==, tarball: file:projects/container-registry.tgz} version: 0.0.0 '@rush-temp/core-amqp@file:projects/core-amqp.tgz': - resolution: {integrity: sha512-/2vGGrll/08qao8LtbTxEkN2iv7PM0QIEuIz2P4GAWeSYDsFC/WA4vqLv9rJuIYnPPBjVmsDtcoDYdAOOOx0Rg==, tarball: file:projects/core-amqp.tgz} + resolution: {integrity: sha512-6R/j0QXMcZDQejz7pIEGZM4qt7vIJi66XRJxjb2SZUMwQMW8KW1DI3icXWym7XbMGYe//7xN3p4WvrB8X4+ttw==, tarball: file:projects/core-amqp.tgz} version: 0.0.0 '@rush-temp/core-auth@file:projects/core-auth.tgz': - resolution: {integrity: sha512-2/zRN82mg2u9wY05YBvFovr4UtjJufNuslCMWFz6Izeb714PJ5ui/rKBkNSCGqF2rN/wYdRYEyjBoVPt3xvZ6A==, tarball: file:projects/core-auth.tgz} + resolution: {integrity: sha512-iEVoTzAcGaXNYMa35kTeGLpc6vDMudigPv3e8H7ScYEo65cPE5Eb8VU7g+3iIlsKy8IermU3ej6Lh+LT6c0+EQ==, tarball: file:projects/core-auth.tgz} version: 0.0.0 '@rush-temp/core-client-1@file:projects/core-client-1.tgz': - resolution: {integrity: sha512-5aveSHwePaeXSLXGtJoqNzrczR+H2982g41Q/hfAyR93MS0wuXC3j2nigqFb9Hsg7X89yd8Hp5yRiLzXCxDCnw==, tarball: file:projects/core-client-1.tgz} + resolution: {integrity: sha512-9ZEc2vKobhXoZHrfFDBvHweAMn0o59182D+Dmt0KoW6zOq9t2n01Ffs7srNsiPzD7JW6zAI97xD/YyE+oc85Xw==, tarball: file:projects/core-client-1.tgz} version: 0.0.0 '@rush-temp/core-client@file:projects/core-client.tgz': - resolution: {integrity: sha512-5dh3EbYk/fk+XEee8QohXAIYVGiBlZ83HMxNbPM5PloKBPU1KR/XpxzE9meoCCZI/YXYde7y0XtJt0WrrMD0EA==, tarball: file:projects/core-client.tgz} + resolution: {integrity: sha512-LTaEj+DEbgClG30/7hesDyOEuW2Q/DV9Zy2mKakMokRL+hpaNO/ZTNjE1EIITPF/YlyHkbRObEBJg0PTSMOlWQ==, tarball: file:projects/core-client.tgz} version: 0.0.0 '@rush-temp/core-http-compat@file:projects/core-http-compat.tgz': - resolution: {integrity: sha512-qOdiUTJ9rDmwQJmnitpCp0NINREdG5D9EwIQ3kOT+YtiOVwhPGdLW43TN5dSE7ked8JBpt9A2WDDqHu44ZZQnA==, tarball: file:projects/core-http-compat.tgz} + resolution: {integrity: sha512-WCxXz29Nwezv17SRleJivtwtfJAkEnDtEHkU3dy6cz1WfHIzvdg4WNl/pYzMVaUlph7jPXnSKS3lG57jkUL6dw==, tarball: file:projects/core-http-compat.tgz} version: 0.0.0 '@rush-temp/core-lro@file:projects/core-lro.tgz': - resolution: {integrity: sha512-cBsvf63Tx1YzHui0z45RnZ7cf1YO8mmMjWHAVKamM1qkgYjqAHlkuy8tHg58bX2UA2fD6zResUWrLFTeVcaGXw==, tarball: file:projects/core-lro.tgz} + resolution: {integrity: sha512-JVRq/adT3XVwGXBVhK42yFSTQ+sGrXfQTYCUyzj1c/nbaVSPfj3K38eKQHfTLSAs/UiwdUz9rFkxuo6CQvbkjQ==, tarball: file:projects/core-lro.tgz} version: 0.0.0 '@rush-temp/core-paging@file:projects/core-paging.tgz': - resolution: {integrity: sha512-px6mk9CbnVeYyrkPiQyEzTxWYSljX8H0ErfmgqMztDUixkf5di4gATajF862TC9HZqhvu823m7TPYr6ZrcE6wg==, tarball: file:projects/core-paging.tgz} + resolution: {integrity: sha512-rqIl/vEKXgaTdblbuDtV9AjgG8LaW1sjoSzt7uNfrm/rxuE3Tje7KH8AioD3Srwq8X7zJtSFfhL6AE7kHsm7UQ==, tarball: file:projects/core-paging.tgz} version: 0.0.0 '@rush-temp/core-rest-pipeline@file:projects/core-rest-pipeline.tgz': - resolution: {integrity: sha512-cLY3mP8nNh39e2Z+HOapFC46okrP5yUhdCp11L7uTalzKw78YSdgczo/nDgeuEBQBbplEasTcPrqYsVSpwqpxQ==, tarball: file:projects/core-rest-pipeline.tgz} + resolution: {integrity: sha512-SPxNEm9DuIbsz2a7i0Ivx024OwAn+Ev+SdNG5T63xSBxDwIwItwu+iEnOHLKOYL8z36nMfS/rsY+t2KChtvdqQ==, tarball: file:projects/core-rest-pipeline.tgz} version: 0.0.0 '@rush-temp/core-sse@file:projects/core-sse.tgz': - resolution: {integrity: sha512-mJ6yU1aJSHYVmT31VIT4SQSNzaMvqNi0IAWz+DHH2XZj+GTcVazXvt3x02xgQMraoXRuBuaEBiW5RfwqK99Jiw==, tarball: file:projects/core-sse.tgz} + resolution: {integrity: sha512-H/mEtruUb/MOjGHy0ztH+AQMtE9xEvwBZ9gsHBnskbqIFLCq71qjV4cC2xf2jQuhh3F4g951fVZmo8EaxVXSmA==, tarball: file:projects/core-sse.tgz} version: 0.0.0 '@rush-temp/core-tracing@file:projects/core-tracing.tgz': - resolution: {integrity: sha512-4CmZFhCjzOgxIJxUQ3TtpCqlzz9WqVC40ObRj+7A819dmf7ZjHwkMWCY5uK1oa/HgCzDTJr9BAhWsJuAy8RXHg==, tarball: file:projects/core-tracing.tgz} + resolution: {integrity: sha512-dZh9oD34MM1YoIH/NIz1q/te9nuqEQq3Qmy3KV11z5IIN1TK4EY2Z+itAlD8riIsovcdGdkYYYexAituZiW1oQ==, tarball: file:projects/core-tracing.tgz} version: 0.0.0 '@rush-temp/core-util@file:projects/core-util.tgz': - resolution: {integrity: sha512-ITGwI/UWm/wik2GMJMHcshniArRh9zY4RAh4cC8Qm3YPUmBDVYDnWaczz5varWczO6/3yNNeqFGCb7p4KQM/LA==, tarball: file:projects/core-util.tgz} + resolution: {integrity: sha512-ta2SbaLRy+PThLC/g/rO7AcVCCtCqAiAgh9zHA734k0xa9EfMwjD+OUGME6olcqUK6ysP6qxx7Fa0aMDIrAI3g==, tarball: file:projects/core-util.tgz} version: 0.0.0 '@rush-temp/core-xml@file:projects/core-xml.tgz': - resolution: {integrity: sha512-GzkUuDtgvIBn354F3Fu1kg5qhh4tWLUptqtoMQVtyTsiaXx74vGD1L+cPqPg/mgowEwD1MsT+0BjKoAtm56RIQ==, tarball: file:projects/core-xml.tgz} + resolution: {integrity: sha512-fFpMAMWfycHdvc8akEBFE3f2+IIC6bwpVrDljTXC+v9iayjk7NyRZu44OYql6E9LwR9vGXhBvdQgHGpwCKFqAw==, tarball: file:projects/core-xml.tgz} version: 0.0.0 '@rush-temp/cosmos@file:projects/cosmos.tgz': - resolution: {integrity: sha512-8xMmkXxJCocWUM/b58gByW//I5fGgVoYD3EZpEwsM9J5aa3RhCEpJU8guu6m31frsXFPRwqyQdxmqVDN4QUezw==, tarball: file:projects/cosmos.tgz} + resolution: {integrity: sha512-v9YVLjFKbVmx5EWiE7LsPWU04QvgDtvIkB2cGhQhm+sbNsCmXtdvkuRLCU7KqB/fWUMjAmnE14leCv/9cKYr8Q==, tarball: file:projects/cosmos.tgz} version: 0.0.0 '@rush-temp/create-microsoft-playwright-testing@file:projects/create-microsoft-playwright-testing.tgz': - resolution: {integrity: sha512-B9WGzCSNUgX+6tno77dWcNkHz6R11S8AQnwV09k6RxLFfWIY1WGRtctRBlLOLUh28jjMNZILl5n+Q/pnl4t6xA==, tarball: file:projects/create-microsoft-playwright-testing.tgz} + resolution: {integrity: sha512-QReV3D7CMr9TFCztQXN83tO85v2ZprJBJsKm7CI//OFr0BqvW7GecGB3LDW7gIhkoAGo27v/kn3SVU6zd2XAxg==, tarball: file:projects/create-microsoft-playwright-testing.tgz} version: 0.0.0 '@rush-temp/data-tables@file:projects/data-tables.tgz': - resolution: {integrity: sha512-6DsqDKJ5vhGuTmfed7CDqfFd0e2PuShSBuLkw0JOotU6d38zWLYOwTr2uVZZ5Azy1EgcoKTuUhPR6tnJkR6VZg==, tarball: file:projects/data-tables.tgz} + resolution: {integrity: sha512-PulQSwpxayalc1mmixBqFNgDIiHd6VvFa5b5XTYG2rTDQeT38yQkrz23VZSe39mRTBtkCJ/xmJlaM2JbmDcgrw==, tarball: file:projects/data-tables.tgz} version: 0.0.0 '@rush-temp/defender-easm@file:projects/defender-easm.tgz': - resolution: {integrity: sha512-0Yyj7rKh/j1845BHPktg5XGocXT2LgaBfIH5GaC5PNz1T67xzTkBb9PIzTL7nq+7O41QhInyUkjzLNS67vbqCQ==, tarball: file:projects/defender-easm.tgz} + resolution: {integrity: sha512-M7uv7x1Q+rMmXhyrmRQS18eqQ99iV6jSEEXihDGBqTW+nwu9GncFs2e29HatvijbEahAd858UdGQmnpA7vWeyA==, tarball: file:projects/defender-easm.tgz} version: 0.0.0 '@rush-temp/dev-tool@file:projects/dev-tool.tgz': @@ -3660,167 +3660,167 @@ packages: version: 0.0.0 '@rush-temp/developer-devcenter@file:projects/developer-devcenter.tgz': - resolution: {integrity: sha512-Udy5L39qvC1bAYmkcYQ62Pj7frKtq+q6xGml9ppF+yBSMoew6HHzZVHqMi3kExEbqZX4uPABBG5nEbPdd/qDYA==, tarball: file:projects/developer-devcenter.tgz} + resolution: {integrity: sha512-DUh+U6IwsLDin8o4TepU5ulb/ihIVvtVS5Ic7lo7fqWL+nu2co9OPa2LADWNZkynKnQ2PdpfYSUoHLswQ1Dg3A==, tarball: file:projects/developer-devcenter.tgz} version: 0.0.0 '@rush-temp/digital-twins-core@file:projects/digital-twins-core.tgz': - resolution: {integrity: sha512-23aRefg7hb8EYeZzvQ2heD0OQ8Oa6TxYEDhA3ApKSbP43eYi9NKfKLWuc5Yu/ilZpvWAic6bk2JSKSrsEeBpqA==, tarball: file:projects/digital-twins-core.tgz} + resolution: {integrity: sha512-S6e0wMawtAsuNVJoGJhpD75sOVgiM90D55LPKVwgsD2XlYca+a3tgsBF2e5r3+JEsY3CIHltx1l+7V6lw594Tw==, tarball: file:projects/digital-twins-core.tgz} version: 0.0.0 '@rush-temp/eslint-plugin-azure-sdk@file:projects/eslint-plugin-azure-sdk.tgz': - resolution: {integrity: sha512-e7igZ+pswECeYzd6qwvp1qzh97QhaLaDQgx2QRpFKct6nvO3wdMR8083Z1Nmab8wvOYIqf8a20foFPTegJc42g==, tarball: file:projects/eslint-plugin-azure-sdk.tgz} + resolution: {integrity: sha512-jWj69WgiFoOogXXtzLYIS2ifYXlETD9SjSSoqCmcPRjD5wrI+Yy0eHqnoz/gb0kD+lrxRw3+xR9R5xI5Qa+O5w==, tarball: file:projects/eslint-plugin-azure-sdk.tgz} version: 0.0.0 '@rush-temp/event-hubs@file:projects/event-hubs.tgz': - resolution: {integrity: sha512-j9YciF9vtRTK7EMgIG5h9jMcJ/v8iPNtlelLJCMP3pDfQ9wlL+C/hH9S9V861470ISevdwBCuYIAEGru8Lbsiw==, tarball: file:projects/event-hubs.tgz} + resolution: {integrity: sha512-/p3FxXRK6T07l5e+fAifSqMSLgU1gI5uqb6reoQSiScHLD9+wR9iB+dm/VKFYBQLQgcZaFw6+OOvNGI6FFP5zg==, tarball: file:projects/event-hubs.tgz} version: 0.0.0 '@rush-temp/eventgrid-namespaces@file:projects/eventgrid-namespaces.tgz': - resolution: {integrity: sha512-31t8p/MJncx5h2r4hTfU+RD+pLoChbFxxot6xQdioVpsJyH1Wyrl1A26yV4uAyzO0ooKushRrIUj2GbVpb5Rig==, tarball: file:projects/eventgrid-namespaces.tgz} + resolution: {integrity: sha512-QWlu5P4cTrl0+sEDG59ql8auC/dlM0YQOLjS0OEPBgcaGmv+46XbJ/n+guQWn0d/QJDk2u6A/p+H2JZNWGsj8g==, tarball: file:projects/eventgrid-namespaces.tgz} version: 0.0.0 '@rush-temp/eventgrid-system-events@file:projects/eventgrid-system-events.tgz': - resolution: {integrity: sha512-J9WSaHbb572Gh+WpNvDx5NF+NAaY9HTSAOWuBNfzplXZG1h5e7wilvy86TqheypQqdxhsau7IhbsRHEOEeFAPA==, tarball: file:projects/eventgrid-system-events.tgz} + resolution: {integrity: sha512-HI9nnixEHOC7sGLIzr5b8Ds7N9g6TJd8xPKc1/YH6GEu8yXGhnsil0b3BlPtc8AbB4e6EI0EZXVlM7g/emLeGg==, tarball: file:projects/eventgrid-system-events.tgz} version: 0.0.0 '@rush-temp/eventgrid@file:projects/eventgrid.tgz': - resolution: {integrity: sha512-xNO7uSbCB0gSezDYBsFLGRv0mgFhuRovCGLgicVWr3KBzCHr9fZn2OdSSIIsBAx68K8Ha0nHjeHPC0jlhL/cCQ==, tarball: file:projects/eventgrid.tgz} + resolution: {integrity: sha512-KHH8YB9Oo31Dys7ErK/ahizdOFsZbZKM1kAcHoEkyf0201fYeG97DgZNhWPsJS7dCdBIRti3JDg1zsElrq2Aew==, tarball: file:projects/eventgrid.tgz} version: 0.0.0 '@rush-temp/eventhubs-checkpointstore-blob@file:projects/eventhubs-checkpointstore-blob.tgz': - resolution: {integrity: sha512-AqSaI6MACDs5mqh3Lim/Qop+IBW9nuhO4z5/QQEEYsbIU0fPadAuNSIYy9tdZHd/rhUAHpQzRoCIHk54+OtZrg==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} + resolution: {integrity: sha512-oSZVENE6s+pOpKx4E+T2WD0Ix6FSFh5gu3R+Puh/uY1g8rCdflQrI5ijrj/wQJbXSuKfc/rxejXHiy9qNwpEuQ==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} version: 0.0.0 '@rush-temp/eventhubs-checkpointstore-table@file:projects/eventhubs-checkpointstore-table.tgz': - resolution: {integrity: sha512-P3Cu8PCr0Mpwx1KRYGqJtpUu6cUBnu3l8y2XVFNvrMKyrv4sjJuCzhHtYtlNkYMNesgn66If2fQE5sj1akl9QA==, tarball: file:projects/eventhubs-checkpointstore-table.tgz} + resolution: {integrity: sha512-g/azVzFHObfBh73mZppu6VlSUxSqInhGIYXNqr0DBbGD8XLJiQt0t4+t371Gg46pPTtNGSa2LRtgrDmL6VNoiA==, tarball: file:projects/eventhubs-checkpointstore-table.tgz} version: 0.0.0 '@rush-temp/functions-authentication-events@file:projects/functions-authentication-events.tgz': - resolution: {integrity: sha512-QDFKCZDdiYdWR2L8YM/sUsLuvyTAgGhnyKvh8WbiKyuPKPiePEjifUir+YXDFblAvJ/ugmEd8roRTzVYq68dbQ==, tarball: file:projects/functions-authentication-events.tgz} + resolution: {integrity: sha512-eKgDeSHnl+cPQtK93TCkcXj3N01XuH1tb1gHy6l5/6GT1Wt+mtoQmab5di5f5lKw4wboNnRAAqVImmTIp3wB2A==, tarball: file:projects/functions-authentication-events.tgz} version: 0.0.0 '@rush-temp/health-deidentification@file:projects/health-deidentification.tgz': - resolution: {integrity: sha512-6LdN/I3/IT+r5A4w8Ac5rRXYnfUzCGhSyEhSq0zB1vEsyX0oOz5viCnGYYqmiyOOfGvgqaMBOk4KwrCCeMcTOA==, tarball: file:projects/health-deidentification.tgz} + resolution: {integrity: sha512-WvXaEOwkm6B2rGYZa4ck2QXG5vy+hUhdVVMvcKBMQIM3Yj3s9vDOPHkNnhOUSrBr7dl4leufPwkB4XRPk/9lcw==, tarball: file:projects/health-deidentification.tgz} version: 0.0.0 '@rush-temp/health-insights-cancerprofiling@file:projects/health-insights-cancerprofiling.tgz': - resolution: {integrity: sha512-VbNwjG9FeYaNHVZ5ccHivYA5aMTBQaj9e/3S1qhujNHdW79W4w9R989l0SMtitK7WXcC7OfQunMVVA/v5BKPeA==, tarball: file:projects/health-insights-cancerprofiling.tgz} + resolution: {integrity: sha512-geAt3rf6oy2p+i9m3t0cOWlu+dKCWVQASvE7DxLLakoMnsvi+aqD77AawtQHQ3XSmCPkO+5bzIY8D9/U5lIY/Q==, tarball: file:projects/health-insights-cancerprofiling.tgz} version: 0.0.0 '@rush-temp/health-insights-clinicalmatching@file:projects/health-insights-clinicalmatching.tgz': - resolution: {integrity: sha512-gPS26NLHskZBUrKuYf6hZouvsKGu6G09W2sGxPEnaCTj5KGmZN/aL9K9WOchcwTcY5HBQM98VwV3EEhTeNYiag==, tarball: file:projects/health-insights-clinicalmatching.tgz} + resolution: {integrity: sha512-3/mcIkHlJenLYTtm2WMMY9y9C5Pq6XPdEV2gj6KyWLxfsym2f0/xreLug7vyrBevNBBwWJ3iXdo8fAOEGHQElg==, tarball: file:projects/health-insights-clinicalmatching.tgz} version: 0.0.0 '@rush-temp/health-insights-radiologyinsights@file:projects/health-insights-radiologyinsights.tgz': - resolution: {integrity: sha512-IC51lwhRQqr8r5PP7rrUwlrQXDDWlI0DbP2GE8H2prk+A9IauQB7CIHrjosRCtJINIMMaQJXa2roHF5GVtbv0w==, tarball: file:projects/health-insights-radiologyinsights.tgz} + resolution: {integrity: sha512-zM22IyKb4lZZwgkDk1ayw7pFElxBFIt82Amw+eBYnSw3qGvPbxq4JHZJWWI7YJDYVXwXfI+2ntrZ7BNpceagxQ==, tarball: file:projects/health-insights-radiologyinsights.tgz} version: 0.0.0 '@rush-temp/identity-broker@file:projects/identity-broker.tgz': - resolution: {integrity: sha512-vq3L3DyNQvVXqYonnD5vweOxzUQrulNdo7115ZCAV7e1y7Q0GfwvwC5k5LyeCY0F5TT3iQuUwHBDIE15/EMYpg==, tarball: file:projects/identity-broker.tgz} + resolution: {integrity: sha512-VMhst9cjgRmvpOdYwWFqCa+Lk7xNUa2TJCnzJLnRylT54+pcjmIl/JDDHBXDFOp3CbtZ4XcCFOe/dqiK5EYQmg==, tarball: file:projects/identity-broker.tgz} version: 0.0.0 '@rush-temp/identity-cache-persistence@file:projects/identity-cache-persistence.tgz': - resolution: {integrity: sha512-KZZ87ScLnkCME+QJbrXDl2QaV5KA/7Ax8YPhKHPJSgh1j42oKa1twt9WRYt6rv7mpyzaB6d4jkDHqubFJdRiWA==, tarball: file:projects/identity-cache-persistence.tgz} + resolution: {integrity: sha512-/TJL8m6FX0cAXSPJdPAsNXE+FakKrObM5+VxTz3+StvqSSgy8XCQ9IVCtB9HMgo8B0SwX08eV26n6AsAeo4+OA==, tarball: file:projects/identity-cache-persistence.tgz} version: 0.0.0 '@rush-temp/identity-vscode@file:projects/identity-vscode.tgz': - resolution: {integrity: sha512-cPpTxfD+emujmd87h4AkgVwMIGV5tZpD/rAmx10EVBYQo3KREJ3sp9dKA5Aq+oPQVcNeslrJM+lth3+ume9vMg==, tarball: file:projects/identity-vscode.tgz} + resolution: {integrity: sha512-KkDwJxnBrnc3r5nJE19vs8qJ0mZLmPCfTXH6Pt5I+ih20byHg7GIJsPZmBIh5ELWS+9+dIIGX+oepA2Kv9SF+A==, tarball: file:projects/identity-vscode.tgz} version: 0.0.0 '@rush-temp/identity@file:projects/identity.tgz': - resolution: {integrity: sha512-P0HbQwwg1mF2aczzbJ5iXPm+nf8N/iWXqAupzCtVBFQ+VC1OrVIQhL987fdKgpl/3c2LD4KdEm0rf9IoqO9/lQ==, tarball: file:projects/identity.tgz} + resolution: {integrity: sha512-/+5wUhxo8VSfSoED4nO4bGD6XhzFsgz2hcoe713rWtWR+0THnH0S/WOfyM9NrzrjSk7VabI/9UQPjjQ6CFm90g==, tarball: file:projects/identity.tgz} version: 0.0.0 '@rush-temp/iot-device-update@file:projects/iot-device-update.tgz': - resolution: {integrity: sha512-oFZBCkmzOfAe/6o3MolyvY6IlmFANQFBxz2x99rmNOwYWrWFstP5LWTOluKzFAnafGtkPTb8PdzL/Uyk0LgKuw==, tarball: file:projects/iot-device-update.tgz} + resolution: {integrity: sha512-yDlW2Y3FM5JvvIKL/wl6UGSNryhW6Bc+pAt0UjIbwqTQSEK3rh1QEIlOwSGGtgkSxofQNQ/mIybUZh4xAGLaYw==, tarball: file:projects/iot-device-update.tgz} version: 0.0.0 '@rush-temp/iot-modelsrepository@file:projects/iot-modelsrepository.tgz': - resolution: {integrity: sha512-hJMVERfcQNl1arQVH2kNoM2in/mmJ4z6kwm2udCgcU8OnrJoJUVCFELh1hBxKpbIFkwb3DJLs8Racg2WNo8dBw==, tarball: file:projects/iot-modelsrepository.tgz} + resolution: {integrity: sha512-Ykdo7/1izLksJORIsq9fZSxlmtZ+7ZmN7u1/SEEBi10tUIouGxll8IXi4DngvQh3iXBUN0Zr2SofGkwg57D/JA==, tarball: file:projects/iot-modelsrepository.tgz} version: 0.0.0 '@rush-temp/keyvault-admin@file:projects/keyvault-admin.tgz': - resolution: {integrity: sha512-4T4Drp4Ho5XDjqmusRaUkqzfMRXIP5g2wNH4/yQLP+IKrwX6cIRBA7VjIXn9iYFikcw8+Dyove8130WKf6KnAQ==, tarball: file:projects/keyvault-admin.tgz} + resolution: {integrity: sha512-9nrkkH+RxeVz3ygp5vzRYD3DszYzyUch+Zp91THbSTktEAFHRMxfuUD56glXmTTxf//KN1y+HxYAJNfxCO+AdQ==, tarball: file:projects/keyvault-admin.tgz} version: 0.0.0 '@rush-temp/keyvault-certificates@file:projects/keyvault-certificates.tgz': - resolution: {integrity: sha512-hHHFZjEUX2s1FPN5WTYcqoT1hqSFS7iJnQvqh6nFyknX+Z9pOUl5+gU6gaxGxwYiLV3yPo+wYN4+w/S9K9x7DQ==, tarball: file:projects/keyvault-certificates.tgz} + resolution: {integrity: sha512-1jHJ2NsW3OKtSzvwyCPj5WW1JizSDlqn258gIYCUoNpsftDKWYnYew7L1+7AMGtAjJ9DKIlj3FEkGzBBAs05yw==, tarball: file:projects/keyvault-certificates.tgz} version: 0.0.0 '@rush-temp/keyvault-common@file:projects/keyvault-common.tgz': - resolution: {integrity: sha512-rTXsqvFYag+m2JKDGB2LuWRhQ/I87lcBSEe2rR5XXBCv/nqLjTZn273dRDGiLm+fTb/c03Vy3higYqgStuCNZg==, tarball: file:projects/keyvault-common.tgz} + resolution: {integrity: sha512-/l6HCEo4TkJTquqJD0Wo/PKoyMuC1nnYWJr5fcHLFCkhzLGx0GWagh0FB/44s6O8ySHf5Yp1AtdbujTqx7LI4w==, tarball: file:projects/keyvault-common.tgz} version: 0.0.0 '@rush-temp/keyvault-keys@file:projects/keyvault-keys.tgz': - resolution: {integrity: sha512-Y2UfpOV8HfTmUGL1uYR7FJM2bNyeTyMQ2pD0+9u/uHIuZmuIgfX3aYMtn0ZmIaspNXDDnzUEDahvgKZbJsd0Pw==, tarball: file:projects/keyvault-keys.tgz} + resolution: {integrity: sha512-NsRNSZEgu6v2GcTPI6//0ooo9j3mSW9+dRKlA9pYykNLrPHSBsOXdZDbz6+kSzN1DV/THbrEGTuuCIfcEV33Eg==, tarball: file:projects/keyvault-keys.tgz} version: 0.0.0 '@rush-temp/keyvault-secrets@file:projects/keyvault-secrets.tgz': - resolution: {integrity: sha512-XdGtBXoiBvpODd8UhGwxazB7/nQiYZxp2/mMGE/pwVKyi64zTVMa7FZKGnJolBlWvycaJJ8Qxql3Eg3c9EvDOg==, tarball: file:projects/keyvault-secrets.tgz} + resolution: {integrity: sha512-fD04k0UvAxSf4/kzDtbAcEL4PZAeOJDy+4hJs3mAHTtDb+G/ss9VvZtH71JNW+1/dxWt4mklzSwYGew18pVpKQ==, tarball: file:projects/keyvault-secrets.tgz} version: 0.0.0 '@rush-temp/load-testing@file:projects/load-testing.tgz': - resolution: {integrity: sha512-mWVb1m4MgOwmwvtCgw+GpN4BwujiAzXpm+2lWJdLgtH4EFCwkLQWaefkaSqlyXMEXqCy/lPJYAS4hXrIP7DkEg==, tarball: file:projects/load-testing.tgz} + resolution: {integrity: sha512-VM94elIsp3vzhq2d2uRJHMvLsibwQQKKTOYtKGHtPiDgWsKO0HErys9adGBnU+QWZmTlDNr5hDEOj6iKoJzB9w==, tarball: file:projects/load-testing.tgz} version: 0.0.0 '@rush-temp/logger@file:projects/logger.tgz': - resolution: {integrity: sha512-8fQDOieFeyQCxjSYMdXHCt7P4sZA75rTVR5Vsc0zD4g+x5k/PW2ZXILXlHiVNhoSmN1A7tBoQZILI0z0Bo7rBg==, tarball: file:projects/logger.tgz} + resolution: {integrity: sha512-J3HH4CHq8ek7QBQUz0Zre5jHH6aXdqiHwCDPpx+IC7G03SEh35L6VQqrO4igbLzGV8tgsjAj4bcgflUOceuHPw==, tarball: file:projects/logger.tgz} version: 0.0.0 '@rush-temp/maps-common@file:projects/maps-common.tgz': - resolution: {integrity: sha512-7IIkOs3sUOtOgIdp3Ub14NUBdqW6KtzCuwnnyFt7gxK9Fq2vUpn/77XOOZ/pnh7agJHiMZj+Y/0nYmcmCKYu+A==, tarball: file:projects/maps-common.tgz} + resolution: {integrity: sha512-8FYnl3Ie4WmP9cB71Qx9VEm32Xmk1zGa4vp9RfuWNv1fK6ONqkhz/kj6+8f635JvJzk4P9cNCv2rTMAfPj6VOg==, tarball: file:projects/maps-common.tgz} version: 0.0.0 '@rush-temp/maps-geolocation@file:projects/maps-geolocation.tgz': - resolution: {integrity: sha512-pmNHm5WCIRn8MxaO6SWedBhcV/fSxsZ1SAVnA/n0XaDm9ra21chQXMxzznlSNAWOFv4hxt0LYczZnfsHOlgo2g==, tarball: file:projects/maps-geolocation.tgz} + resolution: {integrity: sha512-G1NK8ViOWLWEqz8fjQbwJvLzyEa33AYF1xgmizu2OUBiKnQSidwyiMWm1BAM16YAQEyGmyajrQ4ZvpeTZg900w==, tarball: file:projects/maps-geolocation.tgz} version: 0.0.0 '@rush-temp/maps-render@file:projects/maps-render.tgz': - resolution: {integrity: sha512-QAN/KrCWpGIXIWoapOwdtSefJ5ZjzaWvD/yy7sWXZyzFSPftL11l12oXJcE+iBy5409gXNlMuH9ZKj6DgA/tGA==, tarball: file:projects/maps-render.tgz} + resolution: {integrity: sha512-nPJbDK7r/LfIUZetyVeuggG4CWMh42MLX9QuokhiGl+4SCVrTf5ESkPI+Ufk2YDXkk1IKWVqHbQMIw5GGPbGyA==, tarball: file:projects/maps-render.tgz} version: 0.0.0 '@rush-temp/maps-route@file:projects/maps-route.tgz': - resolution: {integrity: sha512-5+w6/ULXCxZtXZhoJ5l7+MKUKaQIx49viOcfYMVGjQw0vi0Tq59nx9Qrl6qWos6BC1kILM5uINp8W47dBpCNWA==, tarball: file:projects/maps-route.tgz} + resolution: {integrity: sha512-1NvRAfoIKOrovLRPeyF6kxZZ/mT0AMpZSIFedbXCkh/X1cfIFCr3BoqM9HyagjJDqC2C5MvDVG7kl4U2xQEwCg==, tarball: file:projects/maps-route.tgz} version: 0.0.0 '@rush-temp/maps-search@file:projects/maps-search.tgz': - resolution: {integrity: sha512-3L9N9SrTi+SdvxB/8TQWgZDIuBtS6ODj8qc+QNqdc5XyToQop38/Hh6GV+xVt+W28umT3ZufBQbz9dA5McL/6w==, tarball: file:projects/maps-search.tgz} + resolution: {integrity: sha512-2gfYB8NHnqpxhOH7Nu2pzS+QyHj7NF+1tOoInO6ZMOFpPaRDRByDYHXUYiYalasWXw40zQ6kJNnrOKLSz1cw2g==, tarball: file:projects/maps-search.tgz} version: 0.0.0 '@rush-temp/maps-timezone@file:projects/maps-timezone.tgz': - resolution: {integrity: sha512-sEtcM3loBeQzGSRhj/Ttjn1+I2cQmaSD9nDYErPYcLWs0sM0CLzORm8NCFxQ6rUoNle2pDsyq9q4a1QNtJsccg==, tarball: file:projects/maps-timezone.tgz} + resolution: {integrity: sha512-CaQjQwtyU105FlczZdgRpxVEHDtEN85AIB7AtmPBP1AYHDS571g4tVcedkGaVwI5rFGL/wkfDqul64RzY53H3g==, tarball: file:projects/maps-timezone.tgz} version: 0.0.0 '@rush-temp/microsoft-playwright-testing@file:projects/microsoft-playwright-testing.tgz': - resolution: {integrity: sha512-bFmkrsJp/HZb6jKwqpSlCfm1efwv6MAIGc7Pt4iALJeqOnqAcaCQLnj5BPyOrrdpPjX7hKThkWjjkyN5udRurQ==, tarball: file:projects/microsoft-playwright-testing.tgz} + resolution: {integrity: sha512-40h1FHAwlBMDYIlyYtNZ9p1WLtWhVWGDIJ8PC7dIS8MucwNAOKmABM5R0e1wZW9ZGeahsUV2WgGwENI1OJhmoQ==, tarball: file:projects/microsoft-playwright-testing.tgz} version: 0.0.0 '@rush-temp/mixed-reality-authentication@file:projects/mixed-reality-authentication.tgz': - resolution: {integrity: sha512-Bsz1T7DiYEemT/QBXP17VhVdwURzYSksepyslzhbYu9H7YXiGZ9j+3EQO8jghK4nmT9QGw76r9relaxe/gXrkA==, tarball: file:projects/mixed-reality-authentication.tgz} + resolution: {integrity: sha512-QV3RN8/JaqTcMXhXtvZz0Kr+ayuk8AUkveXPBA6Lo1dOoww5reoAIdlNxcFgmAYbIwEZvFZE+F+1WZVmSym6zQ==, tarball: file:projects/mixed-reality-authentication.tgz} version: 0.0.0 '@rush-temp/mixed-reality-remote-rendering@file:projects/mixed-reality-remote-rendering.tgz': - resolution: {integrity: sha512-P2Dn/x4ZkmwEL4t6zD5ObCNR6bIcDs+rMqO0flALaeTGiAPXF0RN98ZSJmEofy57xTtT7jhOJwRBaRV9MMUPtw==, tarball: file:projects/mixed-reality-remote-rendering.tgz} + resolution: {integrity: sha512-GUTKfOj8N2wQUHcgwuiQym6VplQgf5yGi50sx03bFjKRDpyg0qhGW4W3yMTM+J7qneIAD0o+OlalPYfoR0eiSg==, tarball: file:projects/mixed-reality-remote-rendering.tgz} version: 0.0.0 '@rush-temp/mock-hub@file:projects/mock-hub.tgz': - resolution: {integrity: sha512-XQS2MMS5Q1hRiH/QR6+Swm4E+0t/Gx5x8pQLGO/tmsyxmD/YrRmVUrSweu8BTNRTnBvHj+eHR0Src+iPlYdZLg==, tarball: file:projects/mock-hub.tgz} + resolution: {integrity: sha512-7GByFgy4SONH/wN6VoSRgVGjUYkBT2u7qBE4R68mwMBjTaw6wE4Frefj1pD4m8xzT9FVPZO+1SBzLWZx6jGODw==, tarball: file:projects/mock-hub.tgz} version: 0.0.0 '@rush-temp/monitor-ingestion@file:projects/monitor-ingestion.tgz': - resolution: {integrity: sha512-pllRWLfOMD+ngWvcILVdzLi1f1XtozTseyFDESOKh67IT3MbSBExuav0w6vQOk2H5E88cpYU8mh0c/kFn2/Iwg==, tarball: file:projects/monitor-ingestion.tgz} + resolution: {integrity: sha512-aCOT4gmFqqOMvPqD5Dz9LolMR+rcrdNhAQGUvKhBP2OYQN0s9vK8mqJ6F2UyZzXuA4aPDOdazw5CPZNqHwhWQA==, tarball: file:projects/monitor-ingestion.tgz} version: 0.0.0 '@rush-temp/monitor-opentelemetry-exporter@file:projects/monitor-opentelemetry-exporter.tgz': - resolution: {integrity: sha512-xsjW4M06eNJllSD3XxEBc9of8nqfjVGDaQKZX8mXhUi2sAbl3/yaz81QZr5z2E/LDopf+jEyybFZXmb86CGj5A==, tarball: file:projects/monitor-opentelemetry-exporter.tgz} + resolution: {integrity: sha512-vGk9GE2y36wg9l6Ap1H0uF+7ABbTetOFunUkvMHJvsMs6Icvqk4e3mdTskpksllFxHKdKcYlVrVoRWKbduduZA==, tarball: file:projects/monitor-opentelemetry-exporter.tgz} version: 0.0.0 '@rush-temp/monitor-opentelemetry@file:projects/monitor-opentelemetry.tgz': - resolution: {integrity: sha512-qMd0t6qBoOWdl7AnrbdiMggNrMJ5hjarzGFToQ2LHLhXutpOrFtS+F/1KluT2ZGYCF92fG/3eQIRflpXTqh+3w==, tarball: file:projects/monitor-opentelemetry.tgz} + resolution: {integrity: sha512-/BzTHUT1c/UrjQXwysC67I13fTHX9wG6/QZ9ti83i0vxqIgso71d7M286s3lj3p0RZjlbDarDEI3xLsHbtSimQ==, tarball: file:projects/monitor-opentelemetry.tgz} version: 0.0.0 '@rush-temp/monitor-query@file:projects/monitor-query.tgz': - resolution: {integrity: sha512-sem5FqZV7WwEFv9RgJLakq0oXVDmU3dI9S0q1293cuVgr6rbaAH9BMyWmiETQgOG+M74it4M3HeDZC19NmimHw==, tarball: file:projects/monitor-query.tgz} + resolution: {integrity: sha512-aORZTFLRCKfSaKCnKLaDIaF7Bf6zGf94C/etdfoRzFBaPEg3J+rpCxwf7RWofQYMuBA/SM5ds30VFVB4WXnSBQ==, tarball: file:projects/monitor-query.tgz} version: 0.0.0 '@rush-temp/notification-hubs@file:projects/notification-hubs.tgz': @@ -3828,255 +3828,255 @@ packages: version: 0.0.0 '@rush-temp/openai@file:projects/openai.tgz': - resolution: {integrity: sha512-HbvC8ZldtA4WQ2pLFQaqYn7GBJbve7a4L/FlCFInJL8qXMDqC0B0by+XFQRFwJNyhR16BUE4OzqLtmr0RZHi0A==, tarball: file:projects/openai.tgz} + resolution: {integrity: sha512-AS0oxEZNcOLMhQCDUvIyEGYJFmxXLuOTrjITjmfDiMimKX3QVHXjwSp0hM+SzV6PDgnkZxZwsxkmh3DUWWfzxw==, tarball: file:projects/openai.tgz} version: 0.0.0 '@rush-temp/opentelemetry-instrumentation-azure-sdk@file:projects/opentelemetry-instrumentation-azure-sdk.tgz': - resolution: {integrity: sha512-r+gEq2FsbTtlgzdkPMZQJ96SLP5CxksQ3n6Kxm/nx6cKzEoyOqGZxNcOOJ2yqd7Poz2xEbp75MsPGaCC3c/cRw==, tarball: file:projects/opentelemetry-instrumentation-azure-sdk.tgz} + resolution: {integrity: sha512-eModE1QIQYnpwo9TJEt1S5hRm5gZdZZUMlgbmw4WInQYbNyyur/4/KCLUNLJ9QnPbZ4Al4ppWkhz55i6qjjn/A==, tarball: file:projects/opentelemetry-instrumentation-azure-sdk.tgz} version: 0.0.0 '@rush-temp/perf-ai-form-recognizer@file:projects/perf-ai-form-recognizer.tgz': - resolution: {integrity: sha512-p6M8KE5r+eju7mdFu51fAPG+Q2ui88B4SKhIU+X1MjAEGxYnvvs5q1Am12FOGPbMDpCpKIQc9GmQhvgdnm9JZw==, tarball: file:projects/perf-ai-form-recognizer.tgz} + resolution: {integrity: sha512-5l02xHdacovQBW7IggbnJ2biOHWh7+RueAwZCqfgdebT6UPEQ49TViMDttaFokwVt9wA6Xpw6E0KibEQD8MzUA==, tarball: file:projects/perf-ai-form-recognizer.tgz} version: 0.0.0 '@rush-temp/perf-ai-language-text@file:projects/perf-ai-language-text.tgz': - resolution: {integrity: sha512-nieSyETytAM0xPUnovc0mrNCOoEu+igHjJ1Ak0yZQdDpJgesfvkWZ2RMK1uu33oIVGC5B/qFHUSEMkCkY/q4tg==, tarball: file:projects/perf-ai-language-text.tgz} + resolution: {integrity: sha512-Xh/wwoZJC4mafg0saB8f8LwOOlHhYG02K8lLyy6xSRl9waMADwyD4SnQ4X7DL6NanJnn0BKYsBc2SiBfSszUvw==, tarball: file:projects/perf-ai-language-text.tgz} version: 0.0.0 '@rush-temp/perf-ai-metrics-advisor@file:projects/perf-ai-metrics-advisor.tgz': - resolution: {integrity: sha512-+EI1/2y01yAyGAf7ICP7CLKMCEaPxr2UH1wE/oZrmx3JyF+DzBfGAXEzifrNNFcSlM9B/4SThFzzk9w202G1Kw==, tarball: file:projects/perf-ai-metrics-advisor.tgz} + resolution: {integrity: sha512-Kttcl+ysaxcxZudTAL4yCYClloxxUlQfoGrESMYrpFN5m/+KUEe3X8DluzImROWAZ0FpXRQNabYYeuPdkk99dw==, tarball: file:projects/perf-ai-metrics-advisor.tgz} version: 0.0.0 '@rush-temp/perf-ai-text-analytics@file:projects/perf-ai-text-analytics.tgz': - resolution: {integrity: sha512-Pan1PGinVC3NSJWrVyHJT04npqIDFlna70gSOyN/gwPRa1CGoWSa2UCeH1bXbXwzE02/hWfyCfNCenj4ZK+xkg==, tarball: file:projects/perf-ai-text-analytics.tgz} + resolution: {integrity: sha512-9E1jnTuWh26jbvakWincpCeAwqzs6CqslmX2Ds4GTt++ddXNHlhd2bc6ewwnL1CDYtwrG00o3cS2bBNMgksyEg==, tarball: file:projects/perf-ai-text-analytics.tgz} version: 0.0.0 '@rush-temp/perf-app-configuration@file:projects/perf-app-configuration.tgz': - resolution: {integrity: sha512-9LvlDdhQWIchxx5NH3ZDDJwS5zQKpL8v/Q3PaSkohXqqfrdCHyaAymZBzaXP6ypTnq9kDbigzjUeoZFM248WMw==, tarball: file:projects/perf-app-configuration.tgz} + resolution: {integrity: sha512-9H3GC0sVdaDhP8/YdQ7ATvB2uVy7duWZJF6/8mvWKXD6xrZqKOf3oY4dpS3lnB8+0TX1bWrqYoRZrvdFHT+TgA==, tarball: file:projects/perf-app-configuration.tgz} version: 0.0.0 '@rush-temp/perf-container-registry@file:projects/perf-container-registry.tgz': - resolution: {integrity: sha512-6J3aCs2BR1Fax6SWXRZEFxn8wlkRUoiRVIb8QrbjgHDUYy950dYuomYjISAiG3qptNHs8jvny4Y5tZmheI+Bww==, tarball: file:projects/perf-container-registry.tgz} + resolution: {integrity: sha512-SbknaX6pupYx1XdhO6R4M272HobgzBq/8f46LNYO1ownvLIAdur5UAEVMGAt7DKFhmqRRaN3GCLMN8WL5y7efA==, tarball: file:projects/perf-container-registry.tgz} version: 0.0.0 '@rush-temp/perf-core-rest-pipeline@file:projects/perf-core-rest-pipeline.tgz': - resolution: {integrity: sha512-KWEPnchNnpCiHjuk8vd2aza0LmqMfhUOVJ402HWrXZXo0ilrsq1YYvoPhbNj1Bk5sNjLDvA4Y9xI9ofAe1NwGQ==, tarball: file:projects/perf-core-rest-pipeline.tgz} + resolution: {integrity: sha512-xlzwOE4DTFjWmnsPkW9ldm8JKP8sufs5hA6K73biNAFKWowyNOFFYghua5Fv3D0uU8Dtk4X+Vo6MCyDDv8YXbQ==, tarball: file:projects/perf-core-rest-pipeline.tgz} version: 0.0.0 '@rush-temp/perf-data-tables@file:projects/perf-data-tables.tgz': - resolution: {integrity: sha512-WO8vtk6tP1pRgwbdzhoFGnqVdi3USclFI9zsdyCYbXnVX97ha83TJDTrtX/h5XyfHqffhCKxmw+FxVcDELbmbQ==, tarball: file:projects/perf-data-tables.tgz} + resolution: {integrity: sha512-boakCiCUXSKFRkCP8fkJF1udh8uk3Uo9h9t1UomfCz9uaG5xYGZ1TxzzZybCyQ7RZpatx2G9W1bhhVEVMQUuwQ==, tarball: file:projects/perf-data-tables.tgz} version: 0.0.0 '@rush-temp/perf-event-hubs@file:projects/perf-event-hubs.tgz': - resolution: {integrity: sha512-wI2AMlyoiWZwHmAp26FMACjMS3EPmJltNwnNkQB0/cDlSkOI8X+jvu/EvdxusXD5xYzGErWtXCPjss9EuH4IwA==, tarball: file:projects/perf-event-hubs.tgz} + resolution: {integrity: sha512-ZOvhNgZXd8jCqjolzr1Y4T09z2T4xChB1OR2BtTsqblb8LxUVRf4+lUkHWtRgY3UY5t9uwHqvQ1bqK0E9hfvFA==, tarball: file:projects/perf-event-hubs.tgz} version: 0.0.0 '@rush-temp/perf-eventgrid@file:projects/perf-eventgrid.tgz': - resolution: {integrity: sha512-dt3yEhJhegjfan5c/jJLs7T+Minp/kWPcsRLcm5esNfmjQFBuroYQ1W1Zc6CAJxDojw7AeUVW5X5P1K2Lt15mQ==, tarball: file:projects/perf-eventgrid.tgz} + resolution: {integrity: sha512-3kyBKr1UtEMeDFc+CdafS64c1Kl82jVvEzat6GsGAAqhelciSvnVOy+6Wr0irQMfhwesERzZrgQIErZiUlUbkg==, tarball: file:projects/perf-eventgrid.tgz} version: 0.0.0 '@rush-temp/perf-identity@file:projects/perf-identity.tgz': - resolution: {integrity: sha512-Ky6GozlRP3Wr8LDCvUlndPP0ZhHIo77wy1Cf58/W2brw9NUBLV8aHki070fjpXSFobKJKUGTWpBFbFyRmU1gVg==, tarball: file:projects/perf-identity.tgz} + resolution: {integrity: sha512-nJGzbSUcyYdQkfd6NXGSF4u+4TE1TueZHHMqpOeCr5TxC6M+Olz1UyDiwUxSwYYWtY07oR8ZBEBVHZRAje8Xpw==, tarball: file:projects/perf-identity.tgz} version: 0.0.0 '@rush-temp/perf-keyvault-certificates@file:projects/perf-keyvault-certificates.tgz': - resolution: {integrity: sha512-m+XXXPUCWfLR+4RfVNAmbFuaZdzGYWEvk+z4xCQImvCq+F17q5bcO5mnGCwpoDOGbMaTHi53yLK5e2B4mRGgKw==, tarball: file:projects/perf-keyvault-certificates.tgz} + resolution: {integrity: sha512-C8lsx6GoI+R/QrAV1AnZ/6a/4wwoMeMmaEbkDJNL1SPeKxk0ygIfouBbivlf/vpuqUtNIEejxgg/9twXmaQ6jQ==, tarball: file:projects/perf-keyvault-certificates.tgz} version: 0.0.0 '@rush-temp/perf-keyvault-keys@file:projects/perf-keyvault-keys.tgz': - resolution: {integrity: sha512-7Y3Fs0TxYz6C686H2FYyLAQnpwlTxypIz/YasYJXs62Tv4I6J9r1/EgelJNs0uDTDTVG+UoZvm6i++lohbWkXQ==, tarball: file:projects/perf-keyvault-keys.tgz} + resolution: {integrity: sha512-xWxVN5GP1cHPnPKdUhPzrwiPX5sCeK/Qsm8HdqWj30oJaxZWbWc4I15iesT7duWc3cb0V5dW1WtZ9aer++Llqg==, tarball: file:projects/perf-keyvault-keys.tgz} version: 0.0.0 '@rush-temp/perf-keyvault-secrets@file:projects/perf-keyvault-secrets.tgz': - resolution: {integrity: sha512-W82F++lmwp3GlLHRWCpr9q97cnmDOM+CsTOMpXND1ZMki5E4x6kJezFTtrzYYcZeh8+/z8EDCAYKzWMfOFETLw==, tarball: file:projects/perf-keyvault-secrets.tgz} + resolution: {integrity: sha512-M2Ju8rn2YCQnLwqxPIGo4Ei0kyDyUkNbIPnqqm6Toq50qaVT3nobDItTDC8m6s0P1RRs+7tMuZWMDQwH5Ev3Pg==, tarball: file:projects/perf-keyvault-secrets.tgz} version: 0.0.0 '@rush-temp/perf-monitor-ingestion@file:projects/perf-monitor-ingestion.tgz': - resolution: {integrity: sha512-OQ69bcFfSdEWvM22k3EJz0mCKje9dTppw0bFA5uf9arJN8cBdLnG6CF+tq1Yrp6cLKR5b/QARyQP8AY6WEo39g==, tarball: file:projects/perf-monitor-ingestion.tgz} + resolution: {integrity: sha512-Cjnl+CdFmJhavD6mzt03U57OCmUAwmcvfV/rW7ocSDvXIICMb1fJ2hL3AwNFNyMSxqL36hfnQXJDU9m4JNF2lw==, tarball: file:projects/perf-monitor-ingestion.tgz} version: 0.0.0 '@rush-temp/perf-monitor-opentelemetry@file:projects/perf-monitor-opentelemetry.tgz': - resolution: {integrity: sha512-xUDDX7s9/9jA+L93I13fMZP90yzlJUNgt+zy0KhCNthiEtzu/GIvPdjGEOyT2k1+Z6yhPAM2o2hQuMF2o+oxqw==, tarball: file:projects/perf-monitor-opentelemetry.tgz} + resolution: {integrity: sha512-uH9+327f5tG3WP/aOoouTM07cdKAfTMqtOd14a/wJJHJ37YK7KOylLjdhBD3QV7A2EPCqvfD1RvsBp63W+AXEw==, tarball: file:projects/perf-monitor-opentelemetry.tgz} version: 0.0.0 '@rush-temp/perf-monitor-query@file:projects/perf-monitor-query.tgz': - resolution: {integrity: sha512-m+3hLcmLGYB093WXGWNAaOSCB9dgMLyySPn+aL4eFJYtwSoZisks9ANmXbETekv86r9y+DxcflijsaA67r2LJg==, tarball: file:projects/perf-monitor-query.tgz} + resolution: {integrity: sha512-tGEXrw59vNmAbXI4WfzXslMPir4s6n1B7fzPfZRY1Qsu3H9N8sPN9LzxedGnYQBnB7zpDUoS9CYIOhN7Rp2iKw==, tarball: file:projects/perf-monitor-query.tgz} version: 0.0.0 '@rush-temp/perf-schema-registry-avro@file:projects/perf-schema-registry-avro.tgz': - resolution: {integrity: sha512-LfY5zyGD6QV6ne63pKBXb4nZJdlGTFB6HTFXOzfy8jdan73lnd/VEnyAOKV97geKuA5DIfFJQ0MLUUY6ON1vLg==, tarball: file:projects/perf-schema-registry-avro.tgz} + resolution: {integrity: sha512-yQJT0MLAu3zYyD7V2UW3tGS/Mjo3Mu2eL8jdf5xPcGH43rPJ/UnXrc5mLfdmCEj3DZJnnbOKLPToUNEYC0/Vdg==, tarball: file:projects/perf-schema-registry-avro.tgz} version: 0.0.0 '@rush-temp/perf-search-documents@file:projects/perf-search-documents.tgz': - resolution: {integrity: sha512-YMcZFXH0CAnzzHs+pelaFN2yoTQBUHEAbV3x507cMqkq4NdiQiCwjO6k0nqEK+xxl6kZJ/zCeRJal79KlhmkFg==, tarball: file:projects/perf-search-documents.tgz} + resolution: {integrity: sha512-eWFmkBPTrISk73C/HYKJRryn0kCtgdyR4xj6pM8KE9ig2ks4fMS1xSd7QA9xla1kOsGJeUJ0mFon/v8wrKlqmw==, tarball: file:projects/perf-search-documents.tgz} version: 0.0.0 '@rush-temp/perf-service-bus@file:projects/perf-service-bus.tgz': - resolution: {integrity: sha512-ZtHLJScvVwQmlMMaLMZe0KPwrDc7Obvo93bueYoJoZcQJ4wrXQD2MhXTZuRAWo3CGkByzv0oFEPGg3urKy73dg==, tarball: file:projects/perf-service-bus.tgz} + resolution: {integrity: sha512-+Abo4qC16bfro0DAr4r27I5p3hEi1l5K9ar0pDY8kZFYCkXatkBmrX5vv9Vc6e+Zraxra71XViLcy7e8FBondw==, tarball: file:projects/perf-service-bus.tgz} version: 0.0.0 '@rush-temp/perf-storage-blob@file:projects/perf-storage-blob.tgz': - resolution: {integrity: sha512-ndiUIY/2sTD1nix+Km5dGfvJTrKRYDCL3/ZJhWfh2pWc1cup85tDdC3hl6hOnT746dWFMpTo1bhatoOOcjeEYA==, tarball: file:projects/perf-storage-blob.tgz} + resolution: {integrity: sha512-3UhHsZ71UawKCO/y04jIb1YP12wiVpwxWsm7EjsrCRT8VrA2xSNmXYyqIz6s44mcqVNBWHzoU7QWLMl5EbDL5A==, tarball: file:projects/perf-storage-blob.tgz} version: 0.0.0 '@rush-temp/perf-storage-file-datalake@file:projects/perf-storage-file-datalake.tgz': - resolution: {integrity: sha512-kKfSIqcwmfwLH0qRThgHMSnjxtBrAApzNIu4wh+0CChWNEXxyxO4EUHHLTpsz5ErMnVWi17tF6IT5tvsw0rMSQ==, tarball: file:projects/perf-storage-file-datalake.tgz} + resolution: {integrity: sha512-wfZp6ds9Yr0kwUgDhQtgPcW84arFJL8x1lfbUU6b8Fhk8D4xkiEdfzYdHlpLahsPDhZtoyhR2d8uyXfesiEbSQ==, tarball: file:projects/perf-storage-file-datalake.tgz} version: 0.0.0 '@rush-temp/perf-storage-file-share@file:projects/perf-storage-file-share.tgz': - resolution: {integrity: sha512-HxVcq/7U436G6d4/ue7Fg1Juzus8PAOnYHic0pP00WvntD2uwexSV3WDQZCDOzsuzVKCkWEaFW3xr+tydLM8TA==, tarball: file:projects/perf-storage-file-share.tgz} + resolution: {integrity: sha512-uTKvbLsUhsw+s5J3uC3KVzP/OVopbITUquqXBFiH2ycYDBFAy43pyELnP+ARDp3qWOp+7+VDH2BDMeioQdp+uQ==, tarball: file:projects/perf-storage-file-share.tgz} version: 0.0.0 '@rush-temp/perf-template@file:projects/perf-template.tgz': - resolution: {integrity: sha512-i6UEyKvgmn6FvOtrhdZkwnXMGsvbMgShf5YRJPf65eSnu8HDC3xx0eo0Cx86HwcjLohRuNa4GorVT7+b5h1BHA==, tarball: file:projects/perf-template.tgz} + resolution: {integrity: sha512-YRmoZtn/FyHky+ovqr1bmXLOYXxSj+FxvRqNyQw2CZcpFvnEdeK7YL3R1vDtRvqXYz1KrnfMm7LPTlclHHrrJQ==, tarball: file:projects/perf-template.tgz} version: 0.0.0 '@rush-temp/purview-administration@file:projects/purview-administration.tgz': - resolution: {integrity: sha512-sgg4tkB4l9zyjfabBh9sUFhifmfGF+ntAIAb2e9vsDSCi1ttSW6dQHrKx5IFCKwz3b0Cl0DaeRMwS8j4e8hecQ==, tarball: file:projects/purview-administration.tgz} + resolution: {integrity: sha512-GuX4ptJEu9WiaNd5gZimvxeCvkSX1Lx6esvjdXBMrwWw8J0IUV+ip62B3DO48sYyXTU3f18BBLonbxkMezinMQ==, tarball: file:projects/purview-administration.tgz} version: 0.0.0 '@rush-temp/purview-catalog@file:projects/purview-catalog.tgz': - resolution: {integrity: sha512-P4T1DLaTzNfhCfRSS/tZTK6wVBW2sBDaf9tAw6qOqvlz3ZPkJ5vTGehSROpmF8eDPloYnN7IaDtM/Pdi3d2d/w==, tarball: file:projects/purview-catalog.tgz} + resolution: {integrity: sha512-zZguAY+p5nP6woyVn01/CNrb7RiXyELra7FjA8gfv9csdBL4+eb6dzWpOJxLaJQ7l3VCIqzPmVEOy2BI9NEgkg==, tarball: file:projects/purview-catalog.tgz} version: 0.0.0 '@rush-temp/purview-datamap@file:projects/purview-datamap.tgz': - resolution: {integrity: sha512-7oiGt2hH9ZkCV8TyJRw6R4MvjW1O2ULh5uJ+cg3GIx4BKR1bcZYk73h9m4k56lwo15yDon0raH0UmjfoNb7Rng==, tarball: file:projects/purview-datamap.tgz} + resolution: {integrity: sha512-BsJd0lYCuWnjy1y/KNgf7wwuY4dzwq0grtDrnj+nn+BXdRV1AFj7AWidSWtASAPus0dEoSL31s7rGW70M0IBIw==, tarball: file:projects/purview-datamap.tgz} version: 0.0.0 '@rush-temp/purview-scanning@file:projects/purview-scanning.tgz': - resolution: {integrity: sha512-4060O8WtwjIXcuZEqtihG9mNZBUsaY5vEBCXdX/KgZdDyAdxaz+ly58sFqmPVhQrrsFcEAoiK3eM3d1aT02/LQ==, tarball: file:projects/purview-scanning.tgz} + resolution: {integrity: sha512-3//USsp+OcONrh4BsZVi8bkx7KCMhq2rAvA/UKiZeUg9dwPyYQobK5f5z3fCBc27Km2JqvJeaBvMr6rhVtFvYA==, tarball: file:projects/purview-scanning.tgz} version: 0.0.0 '@rush-temp/purview-sharing@file:projects/purview-sharing.tgz': - resolution: {integrity: sha512-7I95FPCB1deMsV/SaCRhORc5RRUsCrw5eHZLOvt2Ij5fF2cIOCv6nvAi0qlzyOwxZsbMSh21qJenVxLx25gVIQ==, tarball: file:projects/purview-sharing.tgz} + resolution: {integrity: sha512-TRYUaWtJDOyE4Lzr8B2abyn5MDm/K/3EpKlzimf9i7rpv7sIs+priXnLhxIVUWfTbdU9YGS7/Jywj8FOu/h77w==, tarball: file:projects/purview-sharing.tgz} version: 0.0.0 '@rush-temp/purview-workflow@file:projects/purview-workflow.tgz': - resolution: {integrity: sha512-cdYtC2hiHpniV2a3lK+YjL72OLtV5ekUtCffOgqU4O0DlyPAPhVKzEP5PU3jzfgsGtwzPwcL4r9AJFIUQIMB+w==, tarball: file:projects/purview-workflow.tgz} + resolution: {integrity: sha512-PD5TWl/BL6Ovd0oo1b99t27iQtcqHRAL1HJI/eDauNBlIeCJj5CdHLiI6wQ0xSEk1L/Jwi59QEttGalfhO92tw==, tarball: file:projects/purview-workflow.tgz} version: 0.0.0 '@rush-temp/quantum-jobs@file:projects/quantum-jobs.tgz': - resolution: {integrity: sha512-EaLGlOUQ2CrimwA50SUS/N7P2x6i+uyHvqbqHFRgMCWB8g3vyl8dDQH5Y3EMcQiO41fAg75nTPtwatsIkAYNLg==, tarball: file:projects/quantum-jobs.tgz} + resolution: {integrity: sha512-OZajlq/uUTxNTWOTXQazc8p+u5UISYkpJSzzJ/jTfDYp6xc5T0EKJ43CJvSKib4HmhwfC1tG+DpBP7J0yqb/PA==, tarball: file:projects/quantum-jobs.tgz} version: 0.0.0 '@rush-temp/schema-registry-avro@file:projects/schema-registry-avro.tgz': - resolution: {integrity: sha512-xy7wUN0smV928ueXcqOM9xeP9JACYQr3NXHdCj4AuZTzkIsCJQc2/AgerhqBiVKlreiJxX899IO2MZ1+gt8MXA==, tarball: file:projects/schema-registry-avro.tgz} + resolution: {integrity: sha512-QggEAS9N+U6mftm9qX/Joa575OgnOKH7njTZ/dc2sNsr2YilVKhV/r26HKaOg7Fo80/6nb9j5D3Z3uesNJ9c1Q==, tarball: file:projects/schema-registry-avro.tgz} version: 0.0.0 '@rush-temp/schema-registry-json@file:projects/schema-registry-json.tgz': - resolution: {integrity: sha512-3N5zNBBRFH1HW5mEXv+Rs3x9oFuHMVDXhcCtP0xRE3pXnnQsWPISPNMvnd4lEXXIQZxcU2q6elHbY/KaJE57LQ==, tarball: file:projects/schema-registry-json.tgz} + resolution: {integrity: sha512-ftp70PfOs/I6Lcw8B8mvJbHnVsNOCUSHbw00DpEgSHm6Nt9tlG8eM1sx4ijqDLxn/5ip9+etpuyA0apMOlppxg==, tarball: file:projects/schema-registry-json.tgz} version: 0.0.0 '@rush-temp/schema-registry@file:projects/schema-registry.tgz': - resolution: {integrity: sha512-Wss9M85LpZmL8YI0eIzt0N1uXD9+DsOH1KmHtMOl/7kWlvjRfSNtnoJ0J5R7OeNPYZJu7tc2C3DkjrQ3Jf0EcQ==, tarball: file:projects/schema-registry.tgz} + resolution: {integrity: sha512-z9VF+T0gWW8kdoyzgVkf1j/FreRi4fiSakq+SAldr02BXaWJ2hAU6D1AXPLX4r8elUNUQ8ZvZEbzW+4qMI6KsA==, tarball: file:projects/schema-registry.tgz} version: 0.0.0 '@rush-temp/search-documents@file:projects/search-documents.tgz': - resolution: {integrity: sha512-/zkv3RZpvF5SXN3aKwaX8QidH+/p6MUfd4j7BYtJRrTp+HCbscmtm+DrGZwqRHhUAUBdsbLQ3E/CXDMlfuOpig==, tarball: file:projects/search-documents.tgz} + resolution: {integrity: sha512-zFAp5t+Of6V11EorzgBgCaMsT6qKsB2nvCnYLqV1GqevFBZkwmOe6645AISYLAamYpmF9kJqCCSkt7JB+3A/aw==, tarball: file:projects/search-documents.tgz} version: 0.0.0 '@rush-temp/service-bus@file:projects/service-bus.tgz': - resolution: {integrity: sha512-h3VAF/BwJEz++gcPcaKJXOaKdeNCi+ivQjg7ElYyGw4ZHr79xMK5XC1d5pM9/v0PzYZYyVC3EH626OaUDdyIMA==, tarball: file:projects/service-bus.tgz} + resolution: {integrity: sha512-m9QW1mXNS4uxNpoDyiU5vtMR+E0RCbeXGJ5xzHr2FsrrgcM0FXqDY5kefHC7AYZcZhHVQVezhM69W2j76kDXlw==, tarball: file:projects/service-bus.tgz} version: 0.0.0 '@rush-temp/storage-blob-changefeed@file:projects/storage-blob-changefeed.tgz': - resolution: {integrity: sha512-ePu98HtUE3oQKxzZKtUltZVLQkVsQsOfkVOo2cVlP1Gd+VFBR1rJmzoxDwMjB2KiNZ798/iZpOpvjb7jkVaM6A==, tarball: file:projects/storage-blob-changefeed.tgz} + resolution: {integrity: sha512-bmUuc6Tt9h4Gd3Bqxr2a2kO7SO1i5BhRTqOj+gvdVSexeI8O3XlTG/BZLWVjpVs5Kogk8P4WC5g/oK7UCEd9nQ==, tarball: file:projects/storage-blob-changefeed.tgz} version: 0.0.0 '@rush-temp/storage-blob@file:projects/storage-blob.tgz': - resolution: {integrity: sha512-o4fvn8N8oqpEZoE7QQGCAD4SNVl+N84tR9XHSflTNOgtAu/trEPPHIlfMGpxEtWoZ6ckdNN82+Qpp3hFwgUSkw==, tarball: file:projects/storage-blob.tgz} + resolution: {integrity: sha512-RgwswnoSDSlpaiglMU2Ig/ZH1Q9U6atVhj1j3hMfdXbxtaW1h5UTNsXIRj62zL9fSSGfs/Kbs9Plqiv8MGWwaA==, tarball: file:projects/storage-blob.tgz} version: 0.0.0 '@rush-temp/storage-file-datalake@file:projects/storage-file-datalake.tgz': - resolution: {integrity: sha512-93dDSk1IRMq2VqxCo9u5FaD2GKjqk+Zd3oiOJke4G0SCKh2sfFG0Fxf8x0gs0UTeV5T9ULP7bo4MMcUGqx3u5g==, tarball: file:projects/storage-file-datalake.tgz} + resolution: {integrity: sha512-gllmDWBgw/XbQH1SmwF4sjdy0Nd0R0AAIZjGmAkMT3Q9wZTiFyiS+zQ76vU/c6SgFYKKtu/3cHMgEyGEN4qlPQ==, tarball: file:projects/storage-file-datalake.tgz} version: 0.0.0 '@rush-temp/storage-file-share@file:projects/storage-file-share.tgz': - resolution: {integrity: sha512-5s/VZD9sppyBXKXdVRRe/yR+SawnoG2mYkiaZqhk+UxmERtmqnQFI8JaDz+CRnFvp6jyo1owsax/XI7jrCZ1Wg==, tarball: file:projects/storage-file-share.tgz} + resolution: {integrity: sha512-dDxzzjULfTzlStQTaKymkMBtBXbvUgWoLdHfjtNg59vSxpHCpUafdPdUAvat2mwmvOMoq76RBKxWrP+WaWPE1w==, tarball: file:projects/storage-file-share.tgz} version: 0.0.0 '@rush-temp/storage-internal-avro@file:projects/storage-internal-avro.tgz': - resolution: {integrity: sha512-0/1MHKhTF7ZXrvNrPeDpGFLE+BihBnqf9K4+jceVs75PEunRPanEjFVoBgI71KVxNJzpEuZO3HpaOSFjSpqLIw==, tarball: file:projects/storage-internal-avro.tgz} + resolution: {integrity: sha512-OoKn7/4mFg1hcHHfZnGfiDelCmFJqHtMao3cnoAeySgRt2la2240tLOZ9QDX/KiphsFIKsd0s0EF/lZ/215suQ==, tarball: file:projects/storage-internal-avro.tgz} version: 0.0.0 '@rush-temp/storage-queue@file:projects/storage-queue.tgz': - resolution: {integrity: sha512-Hf4ZmCwPImeCrvsFnQ4MYVgI+rhMBMJ2jOqfZD1YEXD85QyveHpe3sYPLn3WlMvYua+BDkVoXQUoFZok22j9FA==, tarball: file:projects/storage-queue.tgz} + resolution: {integrity: sha512-8JJJCCfjNVBECM1q+EuUOPLK7vyxs6AiaJ5yHLpsqHBXs+7ONHJoiMme2jsaTRTZ1wCXAJdYD+vpZpcBCkcWWQ==, tarball: file:projects/storage-queue.tgz} version: 0.0.0 '@rush-temp/synapse-access-control-1@file:projects/synapse-access-control-1.tgz': - resolution: {integrity: sha512-PsDI9ixsWoG5tbuoB6Wd2BVZZvqY2rHjdfrUQu8RK+vGxCFhm9sYPNZ/u7SCk7Twm/eZCi7FtlHClXTiWhKSAg==, tarball: file:projects/synapse-access-control-1.tgz} + resolution: {integrity: sha512-vQIlLd25b2VOLFhs3TAxL/5D0sAsrlF24G4JhzIql5iBbhoWAdcV8PiOQCoXvV4Req019bLNv/3V1s1xef0iuQ==, tarball: file:projects/synapse-access-control-1.tgz} version: 0.0.0 '@rush-temp/synapse-access-control@file:projects/synapse-access-control.tgz': - resolution: {integrity: sha512-9xdlw5x0quMLB/SC77TKuY4c9igb2+HFgbGAKlE/RoEe0xa9azz9mACQzrzEipqEkmcETcTuIyvGXzJHEi6KXw==, tarball: file:projects/synapse-access-control.tgz} + resolution: {integrity: sha512-+s06PfjpaIhHqeWFf674X7/NNuamWT0NoBAkT5hHBmuXx03Zu1IV+vEnbbU/jhxStNvAIyxtYNwG3eprl4uhnQ==, tarball: file:projects/synapse-access-control.tgz} version: 0.0.0 '@rush-temp/synapse-artifacts@file:projects/synapse-artifacts.tgz': - resolution: {integrity: sha512-5rjggfXNlltSIRafPLODuubz9l0qMTDLyDbF9fMNGQxiCs+CQ9CHFxYu26bL3bC8FkqKbFzi9TntWrWX1F/TYw==, tarball: file:projects/synapse-artifacts.tgz} + resolution: {integrity: sha512-LNy3I13iPwEZcOMUA+0GlrOkcbZeuNCXU/5cAHa/ZHCuCcX/TVeSZjp4qNLyESsrFHkjkcm9H8F7HwiXAz1fZQ==, tarball: file:projects/synapse-artifacts.tgz} version: 0.0.0 '@rush-temp/synapse-managed-private-endpoints@file:projects/synapse-managed-private-endpoints.tgz': - resolution: {integrity: sha512-Zpd22jZb08NobyWIJwBybVo2rLF1jcIPtcPosR7Gtuv286aRX2tdD1ki14DasDmhtox1Ey6EiUkx9gtq9+W5sw==, tarball: file:projects/synapse-managed-private-endpoints.tgz} + resolution: {integrity: sha512-+AnKZbBAiAWzO9xGQIGhCuY0PIOb7Q0i0jjeJqsaSfFXYbpb96oNMSTDyiReh4zymjeIBXbk/ZDWByl0Z2YAMA==, tarball: file:projects/synapse-managed-private-endpoints.tgz} version: 0.0.0 '@rush-temp/synapse-monitoring@file:projects/synapse-monitoring.tgz': - resolution: {integrity: sha512-I5BQzGL2nrC0KkDbMwt6You5P/21te8gmwJkGNLZWeVLEQ2L8eZoRCwIbx8cDd45uTn6qLM6gKqRylQLnOBm0g==, tarball: file:projects/synapse-monitoring.tgz} + resolution: {integrity: sha512-B5XKe0BYKZa+B+LBgP75lhFUwp2S/hWXRP2t7Ox+Noqp+P7cxIKbmKtuO+n+zybI3K/rGlu7EOu0Ylaph5qTZw==, tarball: file:projects/synapse-monitoring.tgz} version: 0.0.0 '@rush-temp/synapse-spark@file:projects/synapse-spark.tgz': - resolution: {integrity: sha512-7VuuV5NynayhACA7upeM3teS3wfatr9zrVsViPOWaY9D2pg63KDr3duw0olTfwdDyIzFvraUWChLH1YGesC9Wg==, tarball: file:projects/synapse-spark.tgz} + resolution: {integrity: sha512-LSC4aWFcmPEuH0WzIojk4Wm+g+5T+guyK00yxrao5j22vMBycfJEXM4+6L9k4W4cPY4+mM4nY+OAn+qZzsFRoQ==, tarball: file:projects/synapse-spark.tgz} version: 0.0.0 '@rush-temp/template-dpg@file:projects/template-dpg.tgz': - resolution: {integrity: sha512-UJwkAC81L049EHeAKs0ou6XCuvhFYRC0eddCEuuTg5a9/y65Jm/zVZQm9WieV/cIgQVUcQSH6zz/4Fg7jqnvvg==, tarball: file:projects/template-dpg.tgz} + resolution: {integrity: sha512-ccgJgu44ghxTWQMdpnEdmSu/srrvSScpAzs48Ubw6V+tOYbQqhixE47aUiachQCDf5vK3IbMcZIO1fdhC3N0tg==, tarball: file:projects/template-dpg.tgz} version: 0.0.0 '@rush-temp/template@file:projects/template.tgz': - resolution: {integrity: sha512-e1OZUpDtuUT9uqmUoX+mbLvb256x5QU3krHiQ9CWTtQG0qy7VibCTWyPtP9dyQzpzR70XgUqlHYRNKrylWKWaA==, tarball: file:projects/template.tgz} + resolution: {integrity: sha512-H2/oFMSfDxPon7Mv2v0m5p2gr9InTivwebZNiha4NU4DiNb09i2SteqEB6b+OTncit0xzIBUBMoDfSNeadUDhw==, tarball: file:projects/template.tgz} version: 0.0.0 '@rush-temp/test-credential@file:projects/test-credential.tgz': - resolution: {integrity: sha512-ahmpTdtCcHDXpM5VF1hiTI91ouMI4U3eQwvJja43zmLFmi4AlKOSYwsJysdX4GF9pAduMR54rP64mC1PyK3b8Q==, tarball: file:projects/test-credential.tgz} + resolution: {integrity: sha512-nxVadMKSs5/73p5DN2pi6oyVSwSxlkXWj64mhH6PpVnPCOZRvWKP7AdFbR9armmsyPxnyXo7fKAugs46VG8JcA==, tarball: file:projects/test-credential.tgz} version: 0.0.0 '@rush-temp/test-perf@file:projects/test-perf.tgz': - resolution: {integrity: sha512-9JhmeybzMzC4Tcd08aOo6rmJ1KSJu1DZZIjnK8SovRPzh2W+V5AMHjkLY7jzujyAWC7y1vAU6SCAjCxgtzKrNQ==, tarball: file:projects/test-perf.tgz} + resolution: {integrity: sha512-eqtZ87NKeFIlFdJWUkgs5TkFYoaPZrcu6EL6xpYfLM0CR1PW/SKndlfo7FF/TuY4sr5CNiAyDwf2jJCkxdo1cg==, tarball: file:projects/test-perf.tgz} version: 0.0.0 '@rush-temp/test-recorder@file:projects/test-recorder.tgz': - resolution: {integrity: sha512-ca93qy0WlC+uOB/l2f8zrE6nmV6Cz8dUIsfMylW/L+rQF95T6ulPyMUV3He8s9tRsFYdNe+eIWrXqVdAzuToXA==, tarball: file:projects/test-recorder.tgz} + resolution: {integrity: sha512-14kV91XUw1IHNezuIDaYOuUTCA8uQwFXnArpt46PnzaamUUO3bjOJvpRCUeA49KzVBIhuSlCsDoMV1x+eALq3w==, tarball: file:projects/test-recorder.tgz} version: 0.0.0 '@rush-temp/test-utils-vitest@file:projects/test-utils-vitest.tgz': - resolution: {integrity: sha512-TZ0JoLUcj0z4c6zQUSR7Cgz8M970PDDbhCOC05+N4KI16GR3HtYrkPm/YNsLOJZ934ZypPeQccL3rkQ7W+mmXQ==, tarball: file:projects/test-utils-vitest.tgz} + resolution: {integrity: sha512-N4LL6PjUezwHgIXeWU7ZrOyLecUUz8B+lkNiuGdlvVDW5z8kdhfCuYsu/nyXkkZ0KgLZ8kLuw9pSYYrtU53hqA==, tarball: file:projects/test-utils-vitest.tgz} version: 0.0.0 '@rush-temp/test-utils@file:projects/test-utils.tgz': - resolution: {integrity: sha512-A1LivzUuFF+kXN4mR9u430aQKuLaD5pVk94AzzOcAAASvkTPJQuU2yE34MR8FtXFi9yKmwnLFw56stqEontcdw==, tarball: file:projects/test-utils.tgz} + resolution: {integrity: sha512-8ACKzmu/lFoVHoTTd6820aStaGH4Q3sPcCKqzYpu/7jDZb0nssW9pJBmxXPl5LRKNjI6VFJ2j+RhafduLaWGMQ==, tarball: file:projects/test-utils.tgz} version: 0.0.0 '@rush-temp/ts-http-runtime@file:projects/ts-http-runtime.tgz': - resolution: {integrity: sha512-npn/z1hHJ0qqSXSxNecWqYSM2b0ZnXjWKMBKVEObMM+kxrWugOdvQNUmEmsD/r9bnHsIYmMg/u+qaOmh/GOyTA==, tarball: file:projects/ts-http-runtime.tgz} + resolution: {integrity: sha512-Vgx4v++LycyZ3rzuYhHMUfiAUiPQh+mzMiPg1mItc+Q5FlYCJUi3pC9T3f0PidN+8frharlC4ig/pzzVtLxPiQ==, tarball: file:projects/ts-http-runtime.tgz} version: 0.0.0 '@rush-temp/vite-plugin-browser-test-map@file:projects/vite-plugin-browser-test-map.tgz': - resolution: {integrity: sha512-N2fbMcGSQDaMjyppu24TSnRXoyiGmcL9RotrxTdamiXV22j6e8i1zYhpzvRhnhvT5U1XaYtWWXrPnMVM149YSQ==, tarball: file:projects/vite-plugin-browser-test-map.tgz} + resolution: {integrity: sha512-RQRZV814BLKC5OYc4jqgpS2QgEgsYJN5nfloGZP4KFN1gso01EaTmveUKqFjMxOQM+qZdfwEMMLBgrE4f7dSKw==, tarball: file:projects/vite-plugin-browser-test-map.tgz} version: 0.0.0 '@rush-temp/web-pubsub-client-protobuf@file:projects/web-pubsub-client-protobuf.tgz': - resolution: {integrity: sha512-9sgZsAR3tTAtbiZnoxbIh4r3Flno3WJ8SdQrlTCIHtyP9/8GIspGVUgBGrOOrmQLW+dzdusqNEJp/eqY87lfBg==, tarball: file:projects/web-pubsub-client-protobuf.tgz} + resolution: {integrity: sha512-ycc1Rprmc0b+yD/C2p45xLOpZa8CrviXKmD7FzSk4+l5uRWYD8rXsjXHjzBAABcj3Zkws7UVoC0Z2BQNhSf9mA==, tarball: file:projects/web-pubsub-client-protobuf.tgz} version: 0.0.0 '@rush-temp/web-pubsub-client@file:projects/web-pubsub-client.tgz': - resolution: {integrity: sha512-5aR1boV+6egjYReYidhtA4uWoxqMzhIydKLYPrGy6tjkOuEaoaUltSg0OOWVp2/3OPqoTNwbN53gmBWkfF+k0g==, tarball: file:projects/web-pubsub-client.tgz} + resolution: {integrity: sha512-JbCJ31buDmVnsx6j53CKj22x7b+as+PqrQO4jJxpHWwxnqhDFb+uTLtUhSl1hmoT9ohJexsJ6aX9yjyqasJfYA==, tarball: file:projects/web-pubsub-client.tgz} version: 0.0.0 '@rush-temp/web-pubsub-express@file:projects/web-pubsub-express.tgz': - resolution: {integrity: sha512-1XC45faVaVx/yNzemEnwMgV+KwZPv44GgD0hA9Nclx5gNyjOTDSbqd7YpWpft/ioItN5J3MJSXfH0WieAXZmJw==, tarball: file:projects/web-pubsub-express.tgz} + resolution: {integrity: sha512-86hva5A4EIZFIq9xXjdB/vzLWWpir7lyrgfXyeiXV2Si4QfI1FhTpklI0YqeIp0QUJI4tc0DaQ4dKDxA8yKTGQ==, tarball: file:projects/web-pubsub-express.tgz} version: 0.0.0 '@rush-temp/web-pubsub@file:projects/web-pubsub.tgz': - resolution: {integrity: sha512-9qOQ3T6D4CiqL/mRmdEK6fl05ZmfXc+F76zy6eQMct15j6XqFy3GODZmdOPpW6BqOrOPbwRvTULlGTR+BcScsA==, tarball: file:projects/web-pubsub.tgz} + resolution: {integrity: sha512-JVdyHioMalJ0HB0A6TGGTHXrOGIHx+nbz5K3YjkVldP51Yp8cJ7+UapvPifN5FY3XE+oJd77bAlQsSLAK3ge8Q==, tarball: file:projects/web-pubsub.tgz} version: 0.0.0 '@rushstack/node-core-library@5.10.0': @@ -7879,21 +7879,11 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - typescript@5.3.3: - resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} - engines: {node: '>=14.17'} - hasBin: true - typescript@5.4.2: resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} engines: {node: '>=14.17'} hasBin: true - typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} - engines: {node: '>=14.17'} - hasBin: true - typescript@5.6.1-rc: resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} engines: {node: '>=14.17'} @@ -9693,12 +9683,12 @@ snapshots: '@rush-temp/abort-controller@file:projects/abort-controller.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -9726,13 +9716,13 @@ snapshots: '@azure-rest/core-client': 1.4.0 '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -9760,7 +9750,7 @@ snapshots: '@azure-rest/core-client': 1.4.0 '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 csv-parse: 5.6.0 @@ -9768,7 +9758,7 @@ snapshots: eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -9794,7 +9784,7 @@ snapshots: '@rush-temp/ai-content-safety@file:projects/ai-content-safety.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 @@ -9802,7 +9792,7 @@ snapshots: playwright: 1.49.1 rollup-plugin-copy: 3.5.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -9861,13 +9851,13 @@ snapshots: '@rush-temp/ai-document-translator@file:projects/ai-document-translator.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -9895,7 +9885,7 @@ snapshots: '@azure/core-lro': 2.7.2 '@rollup/plugin-node-resolve': 15.3.0(rollup@4.28.1) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 @@ -9904,7 +9894,7 @@ snapshots: prettier: 3.4.2 rollup: 4.28.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -9936,7 +9926,7 @@ snapshots: '@opentelemetry/instrumentation': 0.56.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-node': 1.29.0(@opentelemetry/api@1.9.0) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 @@ -9944,7 +9934,7 @@ snapshots: playwright: 1.49.1 source-map-support: 0.5.21 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -9971,13 +9961,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10005,7 +9995,7 @@ snapshots: '@azure/core-lro': 2.7.2 '@types/decompress': 4.2.7 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) chai: 5.1.2 chai-exclude: 3.0.0(chai@5.1.2) @@ -10014,7 +10004,7 @@ snapshots: eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10041,14 +10031,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10075,13 +10065,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10108,13 +10098,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10161,9 +10151,9 @@ snapshots: mocha: 11.0.2 nyc: 17.1.0 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10176,14 +10166,14 @@ snapshots: '@rush-temp/ai-translation-text@file:projects/ai-translation-text.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10209,7 +10199,7 @@ snapshots: '@rush-temp/ai-vision-face@file:projects/ai-vision-face.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 @@ -10217,7 +10207,7 @@ snapshots: prettier: 3.4.2 tshy: 1.18.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10243,14 +10233,14 @@ snapshots: '@rush-temp/ai-vision-image-analysis@file:projects/ai-vision-image-analysis.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10291,7 +10281,7 @@ snapshots: prettier: 3.4.2 rollup: 4.28.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) yargs: 17.7.2 yargs-parser: 21.1.1 @@ -10316,13 +10306,13 @@ snapshots: dependencies: '@azure-rest/core-client': 1.4.0 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 mime: 4.0.4 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10349,14 +10339,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 nock: 13.5.6 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -10389,9 +10379,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10408,9 +10398,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10427,9 +10417,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10447,9 +10437,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10467,9 +10457,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10487,10 +10477,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10511,10 +10501,10 @@ snapshots: mkdirp: 3.0.1 mocha: 11.0.2 rimraf: 5.0.10 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.5.4) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.5.4 + typescript: 5.7.2 uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' @@ -10532,10 +10522,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10550,9 +10540,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10570,9 +10560,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10590,10 +10580,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10611,9 +10601,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10645,9 +10635,9 @@ snapshots: mocha: 11.0.2 nyc: 17.1.0 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10669,9 +10659,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10686,9 +10676,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10704,9 +10694,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10724,9 +10714,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10742,9 +10732,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10762,9 +10752,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10782,10 +10772,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10802,9 +10792,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10819,9 +10809,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10839,10 +10829,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10860,9 +10850,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10879,10 +10869,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10899,10 +10889,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10919,9 +10909,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10939,9 +10929,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10959,9 +10949,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10976,9 +10966,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10993,9 +10983,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11014,9 +11004,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11034,9 +11024,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11052,9 +11042,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11069,9 +11059,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11086,9 +11076,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11106,9 +11096,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11127,10 +11117,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11148,9 +11138,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11183,9 +11173,9 @@ snapshots: mocha: 11.0.2 nyc: 17.1.0 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11198,13 +11188,13 @@ snapshots: '@rush-temp/arm-computefleet@file:projects/arm-computefleet.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -11230,14 +11220,14 @@ snapshots: '@rush-temp/arm-computeschedule@file:projects/arm-computeschedule.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 prettier: 3.4.2 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -11273,9 +11263,9 @@ snapshots: dotenv: 16.4.7 esm: 3.2.25 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11293,9 +11283,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11305,14 +11295,14 @@ snapshots: dependencies: '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tshy: 2.0.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -11347,9 +11337,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11365,9 +11355,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11384,10 +11374,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11396,13 +11386,13 @@ snapshots: '@rush-temp/arm-containerorchestratorruntime@file:projects/arm-containerorchestratorruntime.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -11437,9 +11427,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11457,10 +11447,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11492,9 +11482,9 @@ snapshots: mocha: 11.0.2 nyc: 17.1.0 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11515,10 +11505,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11535,10 +11525,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11556,9 +11546,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11576,9 +11566,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11595,9 +11585,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11615,9 +11605,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11636,10 +11626,10 @@ snapshots: mkdirp: 3.0.1 mocha: 11.0.2 rimraf: 5.0.10 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.5.4) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.5.4 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11657,9 +11647,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11677,9 +11667,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11696,9 +11686,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11716,9 +11706,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11735,9 +11725,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11755,9 +11745,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11774,10 +11764,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11794,9 +11784,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11813,9 +11803,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11833,10 +11823,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11854,9 +11844,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11873,9 +11863,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11891,9 +11881,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11911,9 +11901,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11929,9 +11919,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11949,9 +11939,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11969,9 +11959,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -11989,9 +11979,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12001,14 +11991,14 @@ snapshots: dependencies: '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 8.57.1 playwright: 1.49.1 tshy: 2.0.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -12041,9 +12031,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12060,9 +12050,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12080,9 +12070,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12100,9 +12090,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12119,10 +12109,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12139,10 +12129,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12159,9 +12149,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12179,9 +12169,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12191,14 +12181,14 @@ snapshots: dependencies: '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tshy: 2.0.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -12231,9 +12221,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12250,10 +12240,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12270,10 +12260,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12291,9 +12281,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12311,9 +12301,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12332,10 +12322,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12353,9 +12343,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12364,14 +12354,14 @@ snapshots: '@rush-temp/arm-fabric@file:projects/arm-fabric.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 prettier: 3.4.2 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -12403,9 +12393,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12421,9 +12411,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12441,9 +12431,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12461,9 +12451,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12479,9 +12469,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12498,9 +12488,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12521,10 +12511,10 @@ snapshots: mkdirp: 3.0.1 mocha: 11.0.2 rimraf: 5.0.10 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.5.4) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.5.4 + typescript: 5.7.2 uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' @@ -12543,10 +12533,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12563,10 +12553,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12583,9 +12573,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12603,9 +12593,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12615,14 +12605,14 @@ snapshots: dependencies: '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 8.57.1 playwright: 1.49.1 tshy: 2.0.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -12656,10 +12646,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12675,9 +12665,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12695,9 +12685,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12714,9 +12704,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12734,9 +12724,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12755,10 +12745,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12776,10 +12766,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12796,9 +12786,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12814,9 +12804,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12834,9 +12824,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12854,9 +12844,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12865,13 +12855,13 @@ snapshots: '@rush-temp/arm-iotoperations@file:projects/arm-iotoperations.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -12906,9 +12896,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12926,9 +12916,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12946,9 +12936,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12966,9 +12956,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12986,9 +12976,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13006,9 +12996,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13023,9 +13013,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13042,9 +13032,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13060,9 +13050,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13077,9 +13067,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13097,9 +13087,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13117,10 +13107,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13137,9 +13127,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13155,9 +13145,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13173,9 +13163,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13193,9 +13183,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13213,9 +13203,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13232,9 +13222,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13250,9 +13240,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13268,9 +13258,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13287,9 +13277,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13305,9 +13295,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13325,9 +13315,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13343,9 +13333,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13363,9 +13353,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13380,9 +13370,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13400,10 +13390,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13412,14 +13402,14 @@ snapshots: '@rush-temp/arm-mongocluster@file:projects/arm-mongocluster.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 prettier: 3.4.2 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -13452,9 +13442,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13472,9 +13462,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13490,9 +13480,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13510,10 +13500,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13530,9 +13520,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13542,14 +13532,14 @@ snapshots: dependencies: '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 8.57.1 playwright: 1.49.1 tshy: 2.0.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -13583,10 +13573,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13604,10 +13594,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13625,9 +13615,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13659,9 +13649,9 @@ snapshots: mocha: 11.0.2 nyc: 17.1.0 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13683,9 +13673,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13703,10 +13693,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13723,9 +13713,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13743,9 +13733,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13763,9 +13753,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13808,9 +13798,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13828,9 +13818,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13847,9 +13837,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13867,10 +13857,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13888,9 +13878,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13908,9 +13898,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13925,9 +13915,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13945,9 +13935,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13963,9 +13953,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -13981,9 +13971,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14001,9 +13991,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14019,9 +14009,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14039,9 +14029,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14058,9 +14048,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14078,9 +14068,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14097,9 +14087,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14116,10 +14106,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14136,9 +14126,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14156,9 +14146,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14176,10 +14166,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14197,9 +14187,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14217,9 +14207,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14237,9 +14227,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14258,9 +14248,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14278,9 +14268,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14298,10 +14288,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14320,10 +14310,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14341,9 +14331,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14361,9 +14351,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14381,9 +14371,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14401,9 +14391,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14418,9 +14408,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14436,9 +14426,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14456,9 +14446,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14476,9 +14466,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14494,9 +14484,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14514,9 +14504,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14534,10 +14524,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14555,10 +14545,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14576,10 +14566,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14597,9 +14587,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14617,9 +14607,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14637,9 +14627,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14657,10 +14647,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14675,9 +14665,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14695,9 +14685,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14715,9 +14705,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14749,9 +14739,9 @@ snapshots: mocha: 11.0.2 nyc: 17.1.0 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14772,10 +14762,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14791,9 +14781,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14810,10 +14800,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14829,9 +14819,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14849,9 +14839,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14869,9 +14859,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14889,9 +14879,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14909,9 +14899,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14928,10 +14918,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14949,9 +14939,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -14960,14 +14950,14 @@ snapshots: '@rush-temp/arm-standbypool@file:projects/arm-standbypool.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 prettier: 3.4.2 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15001,9 +14991,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15020,10 +15010,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15041,9 +15031,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15061,9 +15051,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15079,9 +15069,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15099,10 +15089,10 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15119,9 +15109,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15138,9 +15128,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15157,9 +15147,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15177,9 +15167,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15195,9 +15185,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15214,9 +15204,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15234,9 +15224,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15254,9 +15244,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15271,9 +15261,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15283,14 +15273,14 @@ snapshots: dependencies: '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tshy: 2.0.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15325,9 +15315,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15343,9 +15333,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15354,13 +15344,13 @@ snapshots: '@rush-temp/arm-trustedsigning@file:projects/arm-trustedsigning.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15394,9 +15384,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15414,9 +15404,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15434,9 +15424,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15454,9 +15444,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15473,9 +15463,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15493,9 +15483,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15513,9 +15503,9 @@ snapshots: chai: 4.5.0 dotenv: 16.4.7 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15530,9 +15520,9 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -15541,7 +15531,7 @@ snapshots: '@rush-temp/attestation@file:projects/attestation.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) buffer: 6.0.3 dotenv: 16.4.7 @@ -15551,7 +15541,7 @@ snapshots: playwright: 1.49.1 safe-buffer: 5.2.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: @@ -15578,14 +15568,14 @@ snapshots: '@rush-temp/batch@file:projects/batch.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 moment: 2.30.1 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15612,13 +15602,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15645,7 +15635,7 @@ snapshots: dependencies: '@azure/communication-phone-numbers': 1.2.0 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 @@ -15653,7 +15643,7 @@ snapshots: inherits: 2.0.4 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15680,14 +15670,14 @@ snapshots: dependencies: '@azure/communication-signaling': 1.0.0-beta.29 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 events: 3.3.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15713,7 +15703,7 @@ snapshots: '@rush-temp/communication-common@file:projects/communication-common.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 events: 3.3.0 @@ -15722,7 +15712,7 @@ snapshots: mockdate: 3.0.5 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: @@ -15750,13 +15740,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15784,14 +15774,14 @@ snapshots: '@azure/core-lro': 2.7.2 '@azure/msal-node': 2.16.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 events: 3.3.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15818,7 +15808,7 @@ snapshots: dependencies: '@types/node': 18.19.68 '@types/uuid': 8.3.4 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 @@ -15826,7 +15816,7 @@ snapshots: inherits: 2.0.4 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 uuid: 8.3.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) @@ -15854,14 +15844,14 @@ snapshots: '@rush-temp/communication-job-router@file:projects/communication-job-router.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15887,7 +15877,7 @@ snapshots: '@rush-temp/communication-messages@file:projects/communication-messages.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 @@ -15895,7 +15885,7 @@ snapshots: karma-source-map-support: 1.4.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15922,14 +15912,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 events: 3.3.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15956,14 +15946,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 events: 3.3.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15989,13 +15979,13 @@ snapshots: '@rush-temp/communication-rooms@file:projects/communication-rooms.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16022,14 +16012,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 events: 3.3.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16055,14 +16045,14 @@ snapshots: '@rush-temp/communication-sms@file:projects/communication-sms.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 events: 3.3.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16090,7 +16080,7 @@ snapshots: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 '@types/uuid': 8.3.4 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 @@ -16098,7 +16088,7 @@ snapshots: inherits: 2.0.4 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 uuid: 8.3.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: @@ -16126,14 +16116,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 inherits: 2.0.4 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16163,7 +16153,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16185,13 +16175,13 @@ snapshots: '@rush-temp/container-registry@file:projects/container-registry.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16220,7 +16210,7 @@ snapshots: '@types/debug': 4.1.12 '@types/node': 18.19.68 '@types/ws': 8.5.13 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) buffer: 6.0.3 debug: 4.4.0(supports-color@8.1.1) @@ -16231,7 +16221,7 @@ snapshots: rhea: 3.0.3 rhea-promise: 3.0.3 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) ws: 8.18.0 transitivePeerDependencies: @@ -16259,12 +16249,12 @@ snapshots: '@rush-temp/core-auth@file:projects/core-auth.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16290,12 +16280,12 @@ snapshots: '@rush-temp/core-client-1@file:projects/core-client-1.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16321,12 +16311,12 @@ snapshots: '@rush-temp/core-client@file:projects/core-client.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16352,11 +16342,11 @@ snapshots: '@rush-temp/core-http-compat@file:projects/core-http-compat.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16382,12 +16372,12 @@ snapshots: '@rush-temp/core-lro@file:projects/core-lro.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16413,12 +16403,12 @@ snapshots: '@rush-temp/core-paging@file:projects/core-paging.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16444,14 +16434,14 @@ snapshots: '@rush-temp/core-rest-pipeline@file:projects/core-rest-pipeline.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16478,7 +16468,7 @@ snapshots: dependencies: '@types/express': 4.17.21 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 @@ -16486,7 +16476,7 @@ snapshots: playwright: 1.49.1 tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16512,12 +16502,12 @@ snapshots: '@rush-temp/core-tracing@file:projects/core-tracing.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16543,12 +16533,12 @@ snapshots: '@rush-temp/core-util@file:projects/core-util.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16575,13 +16565,13 @@ snapshots: dependencies: '@types/node': 18.19.68 '@types/trusted-types': 2.0.7 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 fast-xml-parser: 4.5.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16629,9 +16619,9 @@ snapshots: semaphore: 1.1.0 sinon: 17.0.1 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -16646,7 +16636,7 @@ snapshots: eslint: 9.17.0 prompts: 2.4.2 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@20.17.10)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16668,13 +16658,13 @@ snapshots: '@rush-temp/data-tables@file:projects/data-tables.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16701,13 +16691,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16807,13 +16797,13 @@ snapshots: dependencies: '@azure/core-lro': 3.0.0 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16839,13 +16829,13 @@ snapshots: '@rush-temp/digital-twins-core@file:projects/digital-twins-core.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16878,12 +16868,12 @@ snapshots: '@types/eslint__js': 8.42.3 '@types/estree': 1.0.6 '@types/node': 18.19.68 - '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.17.0)(typescript@5.6.3))(eslint@9.17.0)(typescript@5.6.3) - '@typescript-eslint/parser': 8.16.0(eslint@9.17.0)(typescript@5.6.3) - '@typescript-eslint/rule-tester': 8.16.0(eslint@9.17.0)(typescript@5.6.3) - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.16.0(eslint@9.17.0)(typescript@5.6.3) - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/rule-tester': 8.16.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.17.0)(typescript@5.7.2) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 eslint-config-prettier: 9.1.0(eslint@9.17.0) @@ -16898,8 +16888,8 @@ snapshots: rimraf: 5.0.10 tshy: 2.0.1 tslib: 2.8.1 - typescript: 5.6.3 - typescript-eslint: 8.16.0(eslint@9.17.0)(typescript@5.6.3) + typescript: 5.7.2 + typescript-eslint: 8.16.0(eslint@9.17.0)(typescript@5.7.2) vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16929,7 +16919,7 @@ snapshots: '@types/debug': 4.1.12 '@types/node': 18.19.68 '@types/ws': 7.4.7 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) buffer: 6.0.3 chai: 5.1.2 @@ -16946,7 +16936,7 @@ snapshots: rhea-promise: 3.0.3 tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) ws: 8.18.0 transitivePeerDependencies: @@ -16974,14 +16964,14 @@ snapshots: '@rush-temp/eventgrid-namespaces@file:projects/eventgrid-namespaces.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) buffer: 6.0.3 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17007,12 +16997,12 @@ snapshots: '@rush-temp/eventgrid-system-events@file:projects/eventgrid-system-events.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17038,13 +17028,13 @@ snapshots: '@rush-temp/eventgrid@file:projects/eventgrid.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17073,7 +17063,7 @@ snapshots: '@types/chai-as-promised': 7.1.8 '@types/debug': 4.1.12 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) buffer: 6.0.3 chai: 5.1.2 @@ -17086,7 +17076,7 @@ snapshots: stream: 0.0.3 tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17116,7 +17106,7 @@ snapshots: '@types/chai-as-promised': 7.1.8 '@types/debug': 4.1.12 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) buffer: 6.0.3 chai: 5.1.2 @@ -17128,7 +17118,7 @@ snapshots: process: 0.11.10 stream: 0.0.3 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17156,13 +17146,13 @@ snapshots: dependencies: '@azure/functions': 3.5.1 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17188,14 +17178,14 @@ snapshots: '@rush-temp/health-deidentification@file:projects/health-deidentification.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 loupe: 3.1.2 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17222,14 +17212,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17256,14 +17246,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17290,14 +17280,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17326,12 +17316,12 @@ snapshots: '@azure/msal-node': 2.16.2 '@azure/msal-node-extensions': 1.5.0 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17359,14 +17349,14 @@ snapshots: '@azure/msal-node': 2.16.2 '@azure/msal-node-extensions': 1.5.0 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 keytar: 7.9.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17398,7 +17388,7 @@ snapshots: keytar: 7.9.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17427,7 +17417,7 @@ snapshots: '@types/ms': 0.7.34 '@types/node': 18.19.68 '@types/stoppable': 1.1.3 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 @@ -17440,7 +17430,7 @@ snapshots: playwright: 1.49.1 stoppable: 1.1.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: @@ -17468,13 +17458,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17500,13 +17490,13 @@ snapshots: '@rush-temp/iot-modelsrepository@file:projects/iot-modelsrepository.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 events: 3.3.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17533,13 +17523,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17566,13 +17556,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17598,12 +17588,12 @@ snapshots: '@rush-temp/keyvault-common@file:projects/keyvault-common.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17630,14 +17620,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dayjs: 1.11.13 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17669,7 +17659,7 @@ snapshots: eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17692,14 +17682,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17725,13 +17715,13 @@ snapshots: '@rush-temp/logger@file:projects/logger.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17758,12 +17748,12 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17790,14 +17780,14 @@ snapshots: dependencies: '@azure/maps-common': 1.0.0-beta.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17824,14 +17814,14 @@ snapshots: dependencies: '@azure/maps-common': 1.0.0-beta.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17859,14 +17849,14 @@ snapshots: '@azure-rest/core-client': 1.4.0 '@azure/maps-common': 1.0.0-beta.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17894,14 +17884,14 @@ snapshots: '@azure/core-lro': 2.7.2 '@azure/maps-common': 1.0.0-beta.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17929,14 +17919,14 @@ snapshots: '@azure/core-lro': 2.7.2 '@azure/maps-common': 1.0.0-beta.2 '@types/node': 22.7.9 - '@vitest/browser': 2.1.8(@types/node@22.7.9)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@22.7.9)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@22.7.9)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -17970,7 +17960,7 @@ snapshots: mocha: 11.0.2 sinon: 17.0.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -17978,13 +17968,13 @@ snapshots: '@rush-temp/mixed-reality-authentication@file:projects/mixed-reality-authentication.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18011,13 +18001,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18049,7 +18039,7 @@ snapshots: playwright: 1.49.1 rhea: 3.0.3 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18072,14 +18062,14 @@ snapshots: dependencies: '@types/node': 18.19.68 '@types/pako': 2.0.3 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 pako: 2.1.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18116,14 +18106,14 @@ snapshots: '@opentelemetry/sdk-trace-node': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.28.0 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 nock: 13.5.6 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18183,7 +18173,7 @@ snapshots: sinon: 17.0.1 tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18194,13 +18184,13 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-node': 1.29.0(@opentelemetry/api@1.9.0) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18259,14 +18249,14 @@ snapshots: '@rush-temp/openai@file:projects/openai.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))(zod@3.23.8)': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 openai: 4.76.3(zod@3.23.8) playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18299,13 +18289,13 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-node': 1.29.0(@opentelemetry/api@1.9.0) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18334,7 +18324,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18345,7 +18335,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18356,7 +18346,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18367,7 +18357,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18379,7 +18369,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18390,7 +18380,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18404,7 +18394,7 @@ snapshots: eslint: 9.17.0 express: 4.21.2 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 undici: 7.1.0 transitivePeerDependencies: - jiti @@ -18416,7 +18406,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18428,7 +18418,7 @@ snapshots: eslint: 9.17.0 moment: 2.30.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18453,7 +18443,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18464,7 +18454,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18475,7 +18465,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18486,7 +18476,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18497,7 +18487,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18508,7 +18498,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18522,7 +18512,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18533,7 +18523,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18545,7 +18535,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18557,7 +18547,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18568,7 +18558,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18579,7 +18569,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18590,7 +18580,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18601,7 +18591,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18614,7 +18604,7 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -18622,13 +18612,13 @@ snapshots: '@rush-temp/purview-administration@file:projects/purview-administration.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18655,13 +18645,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18687,14 +18677,14 @@ snapshots: '@rush-temp/purview-datamap@file:projects/purview-datamap.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18720,13 +18710,13 @@ snapshots: '@rush-temp/purview-scanning@file:projects/purview-scanning.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18753,14 +18743,14 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18786,14 +18776,14 @@ snapshots: '@rush-temp/purview-workflow@file:projects/purview-workflow.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18819,14 +18809,14 @@ snapshots: '@rush-temp/quantum-jobs@file:projects/quantum-jobs.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18855,7 +18845,7 @@ snapshots: '@rollup/plugin-inject': 5.0.5(rollup@4.28.1) '@types/node': 18.19.68 '@types/uuid': 8.3.4 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) avsc: 5.7.7 buffer: 6.0.3 @@ -18866,7 +18856,7 @@ snapshots: process: 0.11.10 stream: 0.0.3 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 uuid: 8.3.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: @@ -18896,7 +18886,7 @@ snapshots: '@azure/schema-registry': 1.3.0 '@rollup/plugin-inject': 5.0.5(rollup@4.28.1) '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) ajv: 8.17.1 buffer: 6.0.3 @@ -18905,7 +18895,7 @@ snapshots: lru-cache: 10.4.3 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18932,13 +18922,13 @@ snapshots: '@rush-temp/schema-registry@file:projects/schema-registry.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -18965,7 +18955,7 @@ snapshots: dependencies: '@azure/openai': 1.0.0-beta.12 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.3.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 @@ -18973,7 +18963,7 @@ snapshots: playwright: 1.49.1 tslib: 2.8.1 type-plus: 7.6.2 - typescript: 5.3.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19005,7 +18995,7 @@ snapshots: '@types/node': 18.19.68 '@types/uuid': 8.3.4 '@types/ws': 7.4.7 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) buffer: 6.0.3 chai: 5.1.2 @@ -19023,7 +19013,7 @@ snapshots: process: 0.11.10 rhea-promise: 3.0.3 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 uuid: 8.3.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) ws: 8.18.0 @@ -19076,12 +19066,12 @@ snapshots: karma-sourcemap-loader: 0.3.8 mocha: 11.0.2 nyc: 17.1.0 - puppeteer: 23.10.4(typescript@5.6.3) + puppeteer: 23.10.4(typescript@5.7.2) sinon: 17.0.1 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 transitivePeerDependencies: - '@swc/core' @@ -19117,11 +19107,11 @@ snapshots: karma-sourcemap-loader: 0.3.8 mocha: 11.0.2 nyc: 17.1.0 - puppeteer: 23.10.4(typescript@5.6.3) + puppeteer: 23.10.4(typescript@5.7.2) source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 transitivePeerDependencies: - '@swc/core' @@ -19159,12 +19149,12 @@ snapshots: karma-sourcemap-loader: 0.3.8 mocha: 11.0.2 nyc: 17.1.0 - puppeteer: 23.10.4(typescript@5.6.3) + puppeteer: 23.10.4(typescript@5.7.2) sinon: 17.0.1 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 transitivePeerDependencies: - '@swc/core' @@ -19200,12 +19190,12 @@ snapshots: karma-sourcemap-loader: 0.3.8 mocha: 11.0.2 nyc: 17.1.0 - puppeteer: 23.10.4(typescript@5.6.3) + puppeteer: 23.10.4(typescript@5.7.2) sinon: 17.0.1 source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 transitivePeerDependencies: - '@swc/core' @@ -19237,11 +19227,11 @@ snapshots: karma-sourcemap-loader: 0.3.8 mocha: 11.0.2 nyc: 17.1.0 - puppeteer: 23.10.4(typescript@5.6.3) + puppeteer: 23.10.4(typescript@5.7.2) source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 transitivePeerDependencies: - '@swc/core' @@ -19275,11 +19265,11 @@ snapshots: karma-sourcemap-loader: 0.3.8 mocha: 11.0.2 nyc: 17.1.0 - puppeteer: 23.10.4(typescript@5.6.3) + puppeteer: 23.10.4(typescript@5.7.2) source-map-support: 0.5.21 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 util: 0.12.5 transitivePeerDependencies: - '@swc/core' @@ -19293,13 +19283,13 @@ snapshots: '@rush-temp/synapse-access-control-1@file:projects/synapse-access-control-1.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19325,13 +19315,13 @@ snapshots: '@rush-temp/synapse-access-control@file:projects/synapse-access-control.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19358,13 +19348,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19390,13 +19380,13 @@ snapshots: '@rush-temp/synapse-managed-private-endpoints@file:projects/synapse-managed-private-endpoints.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19422,12 +19412,12 @@ snapshots: '@rush-temp/synapse-monitoring@file:projects/synapse-monitoring.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19453,13 +19443,13 @@ snapshots: '@rush-temp/synapse-spark@file:projects/synapse-spark.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19485,13 +19475,13 @@ snapshots: '@rush-temp/template-dpg@file:projects/template-dpg.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19518,13 +19508,13 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19550,12 +19540,12 @@ snapshots: '@rush-temp/test-credential@file:projects/test-credential.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19587,7 +19577,7 @@ snapshots: fs-extra: 11.2.0 minimist: 1.2.8 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -19595,14 +19585,14 @@ snapshots: '@rush-temp/test-recorder@file:projects/test-recorder.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) concurrently: 8.2.2 eslint: 9.17.0 express: 4.21.2 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19629,13 +19619,13 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) '@vitest/expect': 2.1.8 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19672,9 +19662,9 @@ snapshots: eslint: 9.17.0 mocha: 11.0.2 sinon: 19.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -19684,7 +19674,7 @@ snapshots: '@rush-temp/ts-http-runtime@file:projects/ts-http-runtime.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) eslint: 9.17.0 http-proxy-agent: 7.0.2 @@ -19692,7 +19682,7 @@ snapshots: playwright: 1.49.1 tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19723,8 +19713,8 @@ snapshots: prettier: 3.4.2 rimraf: 5.0.10 tslib: 2.8.1 - typescript: 5.6.3 - typescript-eslint: 8.16.0(eslint@9.17.0)(typescript@5.6.3) + typescript: 5.7.2 + typescript-eslint: 8.16.0(eslint@9.17.0)(typescript@5.7.2) transitivePeerDependencies: - jiti - supports-color @@ -19742,7 +19732,7 @@ snapshots: protobufjs: 7.4.0 protobufjs-cli: 1.1.3(protobufjs@7.4.0) tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19767,7 +19757,7 @@ snapshots: dependencies: '@types/node': 18.19.68 '@types/ws': 7.4.7 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) buffer: 6.0.3 dotenv: 16.4.7 @@ -19775,7 +19765,7 @@ snapshots: events: 3.3.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) ws: 7.5.10 transitivePeerDependencies: @@ -19805,13 +19795,13 @@ snapshots: '@types/express-serve-static-core': 4.19.6 '@types/jsonwebtoken': 9.0.7 '@types/node': 18.19.68 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 express: 4.21.2 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -19840,14 +19830,14 @@ snapshots: '@types/jsonwebtoken': 9.0.7 '@types/node': 18.19.68 '@types/ws': 8.5.13 - '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 jsonwebtoken: 9.0.2 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) ws: 8.18.0 transitivePeerDependencies: @@ -20238,6 +20228,24 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.16.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/type-utils': 8.16.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.16.0 + eslint: 9.17.0 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/parser@8.16.0(eslint@9.17.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.16.0 @@ -20251,10 +20259,23 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/rule-tester@8.16.0(eslint@9.17.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.16.0(eslint@9.17.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.16.0(eslint@9.17.0)(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.16.0 + debug: 4.4.0(supports-color@8.1.1) + eslint: 9.17.0 + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/rule-tester@8.16.0(eslint@9.17.0)(typescript@5.7.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.17.0)(typescript@5.7.2) ajv: 6.12.6 eslint: 9.17.0 json-stable-stringify-without-jsonify: 1.0.1 @@ -20281,6 +20302,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/type-utils@8.16.0(eslint@9.17.0)(typescript@5.7.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.17.0)(typescript@5.7.2) + debug: 4.4.0(supports-color@8.1.1) + eslint: 9.17.0 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/types@8.16.0': {} '@typescript-eslint/typescript-estree@8.16.0(typescript@5.6.3)': @@ -20298,6 +20331,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)': + dependencies: + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/visitor-keys': 8.16.0 + debug: 4.4.0(supports-color@8.1.1) + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.16.0(eslint@9.17.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) @@ -20310,54 +20358,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.16.0': + '@typescript-eslint/utils@8.16.0(eslint@9.17.0)(typescript@5.7.2)': dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) + '@typescript-eslint/scope-manager': 8.16.0 '@typescript-eslint/types': 8.16.0 - eslint-visitor-keys: 4.2.0 - - '@ungap/structured-clone@1.2.1': {} - - '@vitest/browser@2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.3.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)': - dependencies: - '@testing-library/dom': 10.4.0 - '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) - '@vitest/mocker': 2.1.8(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) - '@vitest/utils': 2.1.8 - magic-string: 0.30.15 - msw: 2.6.8(@types/node@18.19.68)(typescript@5.3.3) - sirv: 3.0.0 - tinyrainbow: 1.2.0 - vitest: 2.1.8(@types/node@22.7.9)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) - ws: 8.18.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + eslint: 9.17.0 optionalDependencies: - playwright: 1.49.1 + typescript: 5.7.2 transitivePeerDependencies: - - '@types/node' - - bufferutil - - typescript - - utf-8-validate - - vite + - supports-color - '@vitest/browser@2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)': + '@typescript-eslint/visitor-keys@8.16.0': dependencies: - '@testing-library/dom': 10.4.0 - '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) - '@vitest/mocker': 2.1.8(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) - '@vitest/utils': 2.1.8 - magic-string: 0.30.15 - msw: 2.6.8(@types/node@18.19.68)(typescript@5.6.3) - sirv: 3.0.0 - tinyrainbow: 1.2.0 - vitest: 2.1.8(@types/node@22.7.9)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) - ws: 8.18.0 - optionalDependencies: - playwright: 1.49.1 - transitivePeerDependencies: - - '@types/node' - - bufferutil - - typescript - - utf-8-validate - - vite + '@typescript-eslint/types': 8.16.0 + eslint-visitor-keys: 4.2.0 + + '@ungap/structured-clone@1.2.1': {} '@vitest/browser@2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)': dependencies: @@ -20380,27 +20398,6 @@ snapshots: - utf-8-validate - vite - '@vitest/browser@2.1.8(@types/node@22.7.9)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)': - dependencies: - '@testing-library/dom': 10.4.0 - '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) - '@vitest/mocker': 2.1.8(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) - '@vitest/utils': 2.1.8 - magic-string: 0.30.15 - msw: 2.6.8(@types/node@22.7.9)(typescript@5.6.3) - sirv: 3.0.0 - tinyrainbow: 1.2.0 - vitest: 2.1.8(@types/node@22.7.9)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) - ws: 8.18.0 - optionalDependencies: - playwright: 1.49.1 - transitivePeerDependencies: - - '@types/node' - - bufferutil - - typescript - - utf-8-validate - - vite - '@vitest/browser@2.1.8(@types/node@22.7.9)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)': dependencies: '@testing-library/dom': 10.4.0 @@ -20421,7 +20418,6 @@ snapshots: - typescript - utf-8-validate - vite - optional: true '@vitest/coverage-istanbul@2.1.8(vitest@2.1.8)': dependencies: @@ -21028,14 +21024,14 @@ snapshots: object-assign: 4.1.1 vary: 1.1.2 - cosmiconfig@9.0.0(typescript@5.6.3): + cosmiconfig@9.0.0(typescript@5.7.2): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 cp-file@10.0.0: dependencies: @@ -22815,56 +22811,6 @@ snapshots: ms@2.1.3: {} - msw@2.6.8(@types/node@18.19.68)(typescript@5.3.3): - dependencies: - '@bundled-es-modules/cookie': 2.0.1 - '@bundled-es-modules/statuses': 1.0.1 - '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.0(@types/node@18.19.68) - '@mswjs/interceptors': 0.37.3 - '@open-draft/deferred-promise': 2.2.0 - '@open-draft/until': 2.1.0 - '@types/cookie': 0.6.0 - '@types/statuses': 2.0.5 - chalk: 4.1.2 - graphql: 16.9.0 - headers-polyfill: 4.0.3 - is-node-process: 1.2.0 - outvariant: 1.4.3 - path-to-regexp: 6.3.0 - strict-event-emitter: 0.5.1 - type-fest: 4.30.1 - yargs: 17.7.2 - optionalDependencies: - typescript: 5.3.3 - transitivePeerDependencies: - - '@types/node' - - msw@2.6.8(@types/node@18.19.68)(typescript@5.6.3): - dependencies: - '@bundled-es-modules/cookie': 2.0.1 - '@bundled-es-modules/statuses': 1.0.1 - '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.0(@types/node@18.19.68) - '@mswjs/interceptors': 0.37.3 - '@open-draft/deferred-promise': 2.2.0 - '@open-draft/until': 2.1.0 - '@types/cookie': 0.6.0 - '@types/statuses': 2.0.5 - chalk: 4.1.2 - graphql: 16.9.0 - headers-polyfill: 4.0.3 - is-node-process: 1.2.0 - outvariant: 1.4.3 - path-to-regexp: 6.3.0 - strict-event-emitter: 0.5.1 - type-fest: 4.30.1 - yargs: 17.7.2 - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - '@types/node' - msw@2.6.8(@types/node@18.19.68)(typescript@5.7.2): dependencies: '@bundled-es-modules/cookie': 2.0.1 @@ -22890,31 +22836,6 @@ snapshots: transitivePeerDependencies: - '@types/node' - msw@2.6.8(@types/node@22.7.9)(typescript@5.6.3): - dependencies: - '@bundled-es-modules/cookie': 2.0.1 - '@bundled-es-modules/statuses': 1.0.1 - '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.0(@types/node@22.7.9) - '@mswjs/interceptors': 0.37.3 - '@open-draft/deferred-promise': 2.2.0 - '@open-draft/until': 2.1.0 - '@types/cookie': 0.6.0 - '@types/statuses': 2.0.5 - chalk: 4.1.2 - graphql: 16.9.0 - headers-polyfill: 4.0.3 - is-node-process: 1.2.0 - outvariant: 1.4.3 - path-to-regexp: 6.3.0 - strict-event-emitter: 0.5.1 - type-fest: 4.30.1 - yargs: 17.7.2 - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - '@types/node' - msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2): dependencies: '@bundled-es-modules/cookie': 2.0.1 @@ -22939,7 +22860,6 @@ snapshots: typescript: 5.7.2 transitivePeerDependencies: - '@types/node' - optional: true mustache@4.2.0: {} @@ -23468,11 +23388,11 @@ snapshots: - supports-color - utf-8-validate - puppeteer@23.10.4(typescript@5.6.3): + puppeteer@23.10.4(typescript@5.7.2): dependencies: '@puppeteer/browsers': 2.6.1 chromium-bidi: 0.8.0(devtools-protocol@0.0.1367902) - cosmiconfig: 9.0.0(typescript@5.6.3) + cosmiconfig: 9.0.0(typescript@5.7.2) devtools-protocol: 0.0.1367902 puppeteer-core: 23.10.4 typed-query-selector: 2.12.0 @@ -24185,12 +24105,16 @@ snapshots: dependencies: typescript: 5.6.3 + ts-api-utils@1.4.3(typescript@5.7.2): + dependencies: + typescript: 5.7.2 + ts-morph@24.0.0: dependencies: '@ts-morph/common': 0.25.0 code-block-writer: 13.0.3 - ts-node@10.9.2(@types/node@18.19.68)(typescript@5.5.4): + ts-node@10.9.2(@types/node@18.19.68)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -24204,11 +24128,11 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.5.4 + typescript: 5.6.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - ts-node@10.9.2(@types/node@18.19.68)(typescript@5.6.3): + ts-node@10.9.2(@types/node@18.19.68)(typescript@5.7.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -24222,7 +24146,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.6.3 + typescript: 5.7.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -24316,14 +24240,21 @@ snapshots: transitivePeerDependencies: - supports-color - typescript@4.2.4: {} + typescript-eslint@8.16.0(eslint@9.17.0)(typescript@5.7.2): + dependencies: + '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.17.0)(typescript@5.7.2) + eslint: 9.17.0 + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color - typescript@5.3.3: {} + typescript@4.2.4: {} typescript@5.4.2: {} - typescript@5.5.4: {} - typescript@5.6.1-rc: {} typescript@5.6.3: {} diff --git a/common/tools/dev-tool/test/samples/files/expectations/cjs-forms/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/cjs-forms/typescript/package.json index 706aa3625430..3a94f1549003 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/cjs-forms/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/cjs-forms/typescript/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/common/tools/dev-tool/test/samples/files/expectations/output-customization/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/output-customization/typescript/package.json index 74fab6ee1ddd..7d9d57082861 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/output-customization/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/output-customization/typescript/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/common/tools/dev-tool/test/samples/files/expectations/simple/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/simple/typescript/package.json index 28b388eebf71..6fd1ebf65093 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/simple/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/simple/typescript/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/common/tools/dev-tool/test/samples/files/expectations/simple@1.0.0-beta.1/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/simple@1.0.0-beta.1/typescript/package.json index 3ec84c6c954e..8b1cb1b2f073 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/simple@1.0.0-beta.1/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/simple@1.0.0-beta.1/typescript/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/common/tools/dev-tool/test/samples/files/expectations/special-characters/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/special-characters/typescript/package.json index 56ced7ad1c53..87bec26f3cc8 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/special-characters/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/special-characters/typescript/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/common/tools/eslint-plugin-azure-sdk/package.json b/common/tools/eslint-plugin-azure-sdk/package.json index a3ce8f781aca..9541f6a6a738 100644 --- a/common/tools/eslint-plugin-azure-sdk/package.json +++ b/common/tools/eslint-plugin-azure-sdk/package.json @@ -121,7 +121,7 @@ "eslint-config-prettier": "^9.0.0", "glob": "^10.3.10", "tslib": "^2.6.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "typescript-eslint": "~8.16.0" }, "devDependencies": { diff --git a/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-sdktype.ts b/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-sdktype.ts index d358e06516ad..833575bcf98e 100644 --- a/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-sdktype.ts +++ b/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-sdktype.ts @@ -161,7 +161,7 @@ const examplePackageGood = `{ "rollup-plugin-terser": "^5.1.1", "sinon": "^9.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "ws": "^7.1.1", "typedoc": "0.15.2" } @@ -314,7 +314,7 @@ const examplePackageBad = `{ "rollup-plugin-terser": "^5.1.1", "sinon": "^9.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "ws": "^7.1.1", "typedoc": "0.15.2" } diff --git a/common/tools/vite-plugin-browser-test-map/package.json b/common/tools/vite-plugin-browser-test-map/package.json index 96c241dff6aa..c1a6caa80cfc 100644 --- a/common/tools/vite-plugin-browser-test-map/package.json +++ b/common/tools/vite-plugin-browser-test-map/package.json @@ -57,7 +57,7 @@ "eslint": "^9.9.0", "prettier": "^3.3.3", "rimraf": "^5.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "typescript-eslint": "~8.16.0" } } diff --git a/sdk/advisor/arm-advisor/package.json b/sdk/advisor/arm-advisor/package.json index 63da3ae85f2c..86ed016aa23a 100644 --- a/sdk/advisor/arm-advisor/package.json +++ b/sdk/advisor/arm-advisor/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/advisor/arm-advisor/samples/v3/typescript/package.json b/sdk/advisor/arm-advisor/samples/v3/typescript/package.json index 3da84e2834af..d82e47a4e21a 100644 --- a/sdk/advisor/arm-advisor/samples/v3/typescript/package.json +++ b/sdk/advisor/arm-advisor/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/agrifood/agrifood-farming-rest/package.json b/sdk/agrifood/agrifood-farming-rest/package.json index be417d785489..5b94666f4bf3 100644 --- a/sdk/agrifood/agrifood-farming-rest/package.json +++ b/sdk/agrifood/agrifood-farming-rest/package.json @@ -100,7 +100,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "type": "module", diff --git a/sdk/agrifood/agrifood-farming-rest/samples/v1-beta/typescript/package.json b/sdk/agrifood/agrifood-farming-rest/samples/v1-beta/typescript/package.json index c075cc6bb8b3..8057fce19ce5 100644 --- a/sdk/agrifood/agrifood-farming-rest/samples/v1-beta/typescript/package.json +++ b/sdk/agrifood/agrifood-farming-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/agrifood/agrifood-farming-rest/samples/v1/typescript/package.json b/sdk/agrifood/agrifood-farming-rest/samples/v1/typescript/package.json index ff3c91de183c..ba1a957f5309 100644 --- a/sdk/agrifood/agrifood-farming-rest/samples/v1/typescript/package.json +++ b/sdk/agrifood/agrifood-farming-rest/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ "@azure/identity": "^4.2.1" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/agrifood/arm-agrifood/package.json b/sdk/agrifood/arm-agrifood/package.json index cb87a233c321..f3bc5ccadd0f 100644 --- a/sdk/agrifood/arm-agrifood/package.json +++ b/sdk/agrifood/arm-agrifood/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/agrifood/arm-agrifood", "repository": { diff --git a/sdk/agrifood/arm-agrifood/samples/v1-beta/typescript/package.json b/sdk/agrifood/arm-agrifood/samples/v1-beta/typescript/package.json index 666780d5e0a6..67e4f2c1dd5c 100644 --- a/sdk/agrifood/arm-agrifood/samples/v1-beta/typescript/package.json +++ b/sdk/agrifood/arm-agrifood/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/ai/ai-inference-rest/package.json b/sdk/ai/ai-inference-rest/package.json index a123687845b0..484d9657f7d2 100644 --- a/sdk/ai/ai-inference-rest/package.json +++ b/sdk/ai/ai-inference-rest/package.json @@ -108,7 +108,7 @@ "eslint": "^9.9.0", "playwright": "^1.41.2", "source-map-support": "^0.5.9", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "scripts": { diff --git a/sdk/ai/ai-inference-rest/samples/v1-beta/typescript/package.json b/sdk/ai/ai-inference-rest/samples/v1-beta/typescript/package.json index 220d0b7a9a09..a27522f6c900 100644 --- a/sdk/ai/ai-inference-rest/samples/v1-beta/typescript/package.json +++ b/sdk/ai/ai-inference-rest/samples/v1-beta/typescript/package.json @@ -47,7 +47,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/analysisservices/arm-analysisservices/package.json b/sdk/analysisservices/arm-analysisservices/package.json index 652593a27f76..aa7622542c74 100644 --- a/sdk/analysisservices/arm-analysisservices/package.json +++ b/sdk/analysisservices/arm-analysisservices/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/analysisservices/arm-analysisservices", "repository": { diff --git a/sdk/analysisservices/arm-analysisservices/samples/v4/typescript/package.json b/sdk/analysisservices/arm-analysisservices/samples/v4/typescript/package.json index b2fffc8bc642..76d120fd8788 100644 --- a/sdk/analysisservices/arm-analysisservices/samples/v4/typescript/package.json +++ b/sdk/analysisservices/arm-analysisservices/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/anomalydetector/ai-anomaly-detector-rest/package.json b/sdk/anomalydetector/ai-anomaly-detector-rest/package.json index 45a0fc703221..729c27591321 100644 --- a/sdk/anomalydetector/ai-anomaly-detector-rest/package.json +++ b/sdk/anomalydetector/ai-anomaly-detector-rest/package.json @@ -78,7 +78,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/anomalydetector/ai-anomaly-detector-rest/README.md", diff --git a/sdk/anomalydetector/ai-anomaly-detector-rest/samples/v1-beta/typescript/package.json b/sdk/anomalydetector/ai-anomaly-detector-rest/samples/v1-beta/typescript/package.json index ccd745ffe498..4ba51d74514f 100644 --- a/sdk/anomalydetector/ai-anomaly-detector-rest/samples/v1-beta/typescript/package.json +++ b/sdk/anomalydetector/ai-anomaly-detector-rest/samples/v1-beta/typescript/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/apicenter/arm-apicenter/package.json b/sdk/apicenter/arm-apicenter/package.json index c51fbf64e62c..50ec8d23d84e 100644 --- a/sdk/apicenter/arm-apicenter/package.json +++ b/sdk/apicenter/arm-apicenter/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/package.json b/sdk/apicenter/arm-apicenter/samples/v1/typescript/package.json index e5e5749ee348..397b1756968e 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/package.json +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/apimanagement/api-management-custom-widgets-scaffolder/package.json b/sdk/apimanagement/api-management-custom-widgets-scaffolder/package.json index 386ddc57a5e2..89a9653872be 100644 --- a/sdk/apimanagement/api-management-custom-widgets-scaffolder/package.json +++ b/sdk/apimanagement/api-management-custom-widgets-scaffolder/package.json @@ -66,7 +66,7 @@ "magic-string": "^0.30.8", "prettier": "^3.3.3", "rollup": "^4.14.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "dependencies": { diff --git a/sdk/apimanagement/api-management-custom-widgets-tools/package.json b/sdk/apimanagement/api-management-custom-widgets-tools/package.json index 74533106684c..2d7f6f647cbc 100644 --- a/sdk/apimanagement/api-management-custom-widgets-tools/package.json +++ b/sdk/apimanagement/api-management-custom-widgets-tools/package.json @@ -56,7 +56,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.42.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "dependencies": { diff --git a/sdk/apimanagement/arm-apimanagement/package.json b/sdk/apimanagement/arm-apimanagement/package.json index e09e0f0b594c..4f1cc02ebab2 100644 --- a/sdk/apimanagement/arm-apimanagement/package.json +++ b/sdk/apimanagement/arm-apimanagement/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/package.json b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/package.json index 74621f1fb976..29cd45b63ac6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/package.json +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/package.json b/sdk/appcomplianceautomation/arm-appcomplianceautomation/package.json index e1f87e1027f2..7ffe34901a92 100644 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/package.json +++ b/sdk/appcomplianceautomation/arm-appcomplianceautomation/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/package.json b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/package.json index 093a3dfd36f9..29c67082edbf 100644 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/package.json +++ b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/appconfiguration/app-configuration/package.json b/sdk/appconfiguration/app-configuration/package.json index 0c808933a1cc..f877b4e09e94 100644 --- a/sdk/appconfiguration/app-configuration/package.json +++ b/sdk/appconfiguration/app-configuration/package.json @@ -98,7 +98,7 @@ "eslint": "^9.9.0", "nock": "^13.5.4", "playwright": "^1.47.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.1" }, "//sampleConfiguration": { diff --git a/sdk/appconfiguration/app-configuration/samples/v1-beta/typescript/package.json b/sdk/appconfiguration/app-configuration/samples/v1-beta/typescript/package.json index ca320a69e3e3..287301e97c99 100644 --- a/sdk/appconfiguration/app-configuration/samples/v1-beta/typescript/package.json +++ b/sdk/appconfiguration/app-configuration/samples/v1-beta/typescript/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/appconfiguration/app-configuration/samples/v1/typescript/package.json b/sdk/appconfiguration/app-configuration/samples/v1/typescript/package.json index 15a55805d267..b619ec61885e 100644 --- a/sdk/appconfiguration/app-configuration/samples/v1/typescript/package.json +++ b/sdk/appconfiguration/app-configuration/samples/v1/typescript/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/appconfiguration/arm-appconfiguration/package.json b/sdk/appconfiguration/arm-appconfiguration/package.json index 28439ef0f581..9961833274b8 100644 --- a/sdk/appconfiguration/arm-appconfiguration/package.json +++ b/sdk/appconfiguration/arm-appconfiguration/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@microsoft/api-extractor": "^7.31.1", "mkdirp": "^3.0.1", - "typescript": "~5.5.3", + "typescript": "~5.7.2", "uglify-js": "^3.4.9", "rimraf": "^5.0.0", "dotenv": "^16.0.0", diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/package.json b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/package.json index e7412a91dd60..cedd3fd2f6ac 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/package.json +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/appconfiguration/perf-tests/app-configuration/package.json b/sdk/appconfiguration/perf-tests/app-configuration/package.json index e2b7b3f934f9..30ad6fdabf22 100644 --- a/sdk/appconfiguration/perf-tests/app-configuration/package.json +++ b/sdk/appconfiguration/perf-tests/app-configuration/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json index aef63b3f6fa4..93b721c908d2 100644 --- a/sdk/appcontainers/arm-appcontainers/package.json +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-appcontainers.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json index 35332c53f587..f5a6c50599f6 100644 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json +++ b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/applicationinsights/arm-appinsights/package.json b/sdk/applicationinsights/arm-appinsights/package.json index a276a871c46f..37e05df8945c 100644 --- a/sdk/applicationinsights/arm-appinsights/package.json +++ b/sdk/applicationinsights/arm-appinsights/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/applicationinsights/arm-appinsights", "repository": { diff --git a/sdk/applicationinsights/arm-appinsights/samples/v5-beta/typescript/package.json b/sdk/applicationinsights/arm-appinsights/samples/v5-beta/typescript/package.json index 6d1866020941..93a5c63cd63f 100644 --- a/sdk/applicationinsights/arm-appinsights/samples/v5-beta/typescript/package.json +++ b/sdk/applicationinsights/arm-appinsights/samples/v5-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/appplatform/arm-appplatform/package.json b/sdk/appplatform/arm-appplatform/package.json index d37e1a1847fb..ddfdcffd523a 100644 --- a/sdk/appplatform/arm-appplatform/package.json +++ b/sdk/appplatform/arm-appplatform/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/appplatform/arm-appplatform/samples/v3/typescript/package.json b/sdk/appplatform/arm-appplatform/samples/v3/typescript/package.json index 02c9fe685574..2734fce3ff78 100644 --- a/sdk/appplatform/arm-appplatform/samples/v3/typescript/package.json +++ b/sdk/appplatform/arm-appplatform/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/appservice/arm-appservice-profile-2020-09-01-hybrid/package.json b/sdk/appservice/arm-appservice-profile-2020-09-01-hybrid/package.json index bf56d9367742..d1c086e17fd9 100644 --- a/sdk/appservice/arm-appservice-profile-2020-09-01-hybrid/package.json +++ b/sdk/appservice/arm-appservice-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appservice/arm-appservice-profile-2020-09-01-hybrid", "repository": { diff --git a/sdk/appservice/arm-appservice-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/appservice/arm-appservice-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index 373a5f64ddbe..ed080cc92270 100644 --- a/sdk/appservice/arm-appservice-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/appservice/arm-appservice-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/appservice/arm-appservice-rest/package.json b/sdk/appservice/arm-appservice-rest/package.json index 77b5658b8159..748d4fc74c23 100644 --- a/sdk/appservice/arm-appservice-rest/package.json +++ b/sdk/appservice/arm-appservice-rest/package.json @@ -105,7 +105,7 @@ "nyc": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "browser": { "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js" diff --git a/sdk/appservice/arm-appservice-rest/samples/v1-beta/typescript/package.json b/sdk/appservice/arm-appservice-rest/samples/v1-beta/typescript/package.json index 348fcc428bdb..c1ce3edb7493 100644 --- a/sdk/appservice/arm-appservice-rest/samples/v1-beta/typescript/package.json +++ b/sdk/appservice/arm-appservice-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/appservice/arm-appservice/package.json b/sdk/appservice/arm-appservice/package.json index 49a656ef8f79..747891f059db 100644 --- a/sdk/appservice/arm-appservice/package.json +++ b/sdk/appservice/arm-appservice/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/appservice/arm-appservice/samples/v15/typescript/package.json b/sdk/appservice/arm-appservice/samples/v15/typescript/package.json index 70435277fc38..c1db69900f21 100644 --- a/sdk/appservice/arm-appservice/samples/v15/typescript/package.json +++ b/sdk/appservice/arm-appservice/samples/v15/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/astro/arm-astro/package.json b/sdk/astro/arm-astro/package.json index e31421d8ae67..85939e7e0ea7 100644 --- a/sdk/astro/arm-astro/package.json +++ b/sdk/astro/arm-astro/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/astro/arm-astro/samples/v1-beta/typescript/package.json b/sdk/astro/arm-astro/samples/v1-beta/typescript/package.json index 63d223e49113..bb559a034da2 100644 --- a/sdk/astro/arm-astro/samples/v1-beta/typescript/package.json +++ b/sdk/astro/arm-astro/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/attestation/arm-attestation/package.json b/sdk/attestation/arm-attestation/package.json index b66f5b5ad4af..48e23764bfc9 100644 --- a/sdk/attestation/arm-attestation/package.json +++ b/sdk/attestation/arm-attestation/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/attestation/arm-attestation", "repository": { diff --git a/sdk/attestation/arm-attestation/samples/v2/typescript/package.json b/sdk/attestation/arm-attestation/samples/v2/typescript/package.json index 4f412e983b92..384b9d862d29 100644 --- a/sdk/attestation/arm-attestation/samples/v2/typescript/package.json +++ b/sdk/attestation/arm-attestation/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/attestation/attestation/package.json b/sdk/attestation/attestation/package.json index 65b0ef0c72c9..fc910d200493 100644 --- a/sdk/attestation/attestation/package.json +++ b/sdk/attestation/attestation/package.json @@ -96,7 +96,7 @@ "inherits": "^2.0.3", "playwright": "^1.48.1", "safe-buffer": "^5.2.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1", "vitest": "^2.1.3" }, diff --git a/sdk/authorization/arm-authorization-profile-2020-09-01-hybrid/package.json b/sdk/authorization/arm-authorization-profile-2020-09-01-hybrid/package.json index 94954d330242..e867375e8c8c 100644 --- a/sdk/authorization/arm-authorization-profile-2020-09-01-hybrid/package.json +++ b/sdk/authorization/arm-authorization-profile-2020-09-01-hybrid/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/authorization/arm-authorization-profile-2020-09-01-hybrid/samples/v3/typescript/package.json b/sdk/authorization/arm-authorization-profile-2020-09-01-hybrid/samples/v3/typescript/package.json index 28ed69f9e1bb..baccdff475f1 100644 --- a/sdk/authorization/arm-authorization-profile-2020-09-01-hybrid/samples/v3/typescript/package.json +++ b/sdk/authorization/arm-authorization-profile-2020-09-01-hybrid/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/authorization/arm-authorization/package.json b/sdk/authorization/arm-authorization/package.json index 1824ca41be1b..1e5430a12a51 100644 --- a/sdk/authorization/arm-authorization/package.json +++ b/sdk/authorization/arm-authorization/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/authorization/arm-authorization/samples/v10-beta/typescript/package.json b/sdk/authorization/arm-authorization/samples/v10-beta/typescript/package.json index 91cc70abbefe..ef4c57cb4182 100644 --- a/sdk/authorization/arm-authorization/samples/v10-beta/typescript/package.json +++ b/sdk/authorization/arm-authorization/samples/v10-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/automanage/arm-automanage/package.json b/sdk/automanage/arm-automanage/package.json index 4716d8576cc6..b5f689517706 100644 --- a/sdk/automanage/arm-automanage/package.json +++ b/sdk/automanage/arm-automanage/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/automanage/arm-automanage/samples/v1/typescript/package.json b/sdk/automanage/arm-automanage/samples/v1/typescript/package.json index 09db29ca95a0..adba99295a48 100644 --- a/sdk/automanage/arm-automanage/samples/v1/typescript/package.json +++ b/sdk/automanage/arm-automanage/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/automation/arm-automation/package.json b/sdk/automation/arm-automation/package.json index c4e55f7fc426..ca72f7a4f824 100644 --- a/sdk/automation/arm-automation/package.json +++ b/sdk/automation/arm-automation/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/automation/arm-automation/samples/v11-beta/typescript/package.json b/sdk/automation/arm-automation/samples/v11-beta/typescript/package.json index 075e7536624d..ba2fce371a20 100644 --- a/sdk/automation/arm-automation/samples/v11-beta/typescript/package.json +++ b/sdk/automation/arm-automation/samples/v11-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/avs/arm-avs/package.json b/sdk/avs/arm-avs/package.json index 343e6d15997a..2ccfcf01c57a 100644 --- a/sdk/avs/arm-avs/package.json +++ b/sdk/avs/arm-avs/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/avs/arm-avs/samples/v6/typescript/package.json b/sdk/avs/arm-avs/samples/v6/typescript/package.json index 81b4115c628a..d560cc8b1a06 100644 --- a/sdk/avs/arm-avs/samples/v6/typescript/package.json +++ b/sdk/avs/arm-avs/samples/v6/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/azureadexternalidentities/arm-azureadexternalidentities/package.json b/sdk/azureadexternalidentities/arm-azureadexternalidentities/package.json index e4aceb169232..d3a4267e42c9 100644 --- a/sdk/azureadexternalidentities/arm-azureadexternalidentities/package.json +++ b/sdk/azureadexternalidentities/arm-azureadexternalidentities/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azureadexternalidentities/arm-azureadexternalidentities", "repository": { diff --git a/sdk/azureadexternalidentities/arm-azureadexternalidentities/samples/v1/typescript/package.json b/sdk/azureadexternalidentities/arm-azureadexternalidentities/samples/v1/typescript/package.json index d7e6e64ecf45..83e881d31039 100644 --- a/sdk/azureadexternalidentities/arm-azureadexternalidentities/samples/v1/typescript/package.json +++ b/sdk/azureadexternalidentities/arm-azureadexternalidentities/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/azurestack/arm-azurestack/package.json b/sdk/azurestack/arm-azurestack/package.json index 85282c5190c7..dd2426b22fa2 100644 --- a/sdk/azurestack/arm-azurestack/package.json +++ b/sdk/azurestack/arm-azurestack/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azurestack/arm-azurestack", "repository": { diff --git a/sdk/azurestack/arm-azurestack/samples/v3-beta/typescript/package.json b/sdk/azurestack/arm-azurestack/samples/v3-beta/typescript/package.json index b25703ad634b..dfc3dd383f6c 100644 --- a/sdk/azurestack/arm-azurestack/samples/v3-beta/typescript/package.json +++ b/sdk/azurestack/arm-azurestack/samples/v3-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/azurestackhci/arm-azurestackhci/package.json b/sdk/azurestackhci/arm-azurestackhci/package.json index 87849e439bad..980bb8544a19 100644 --- a/sdk/azurestackhci/arm-azurestackhci/package.json +++ b/sdk/azurestackhci/arm-azurestackhci/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/azurestackhci/arm-azurestackhci/samples/v4-beta/typescript/package.json b/sdk/azurestackhci/arm-azurestackhci/samples/v4-beta/typescript/package.json index 686c7b0fa33c..7198a16eb906 100644 --- a/sdk/azurestackhci/arm-azurestackhci/samples/v4-beta/typescript/package.json +++ b/sdk/azurestackhci/arm-azurestackhci/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/package.json b/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/package.json index 25f6087623e2..dd591b0a0b18 100644 --- a/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/package.json +++ b/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/samples/v1-beta/typescript/package.json b/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/samples/v1-beta/typescript/package.json index 919c034315f8..6126dcdb2646 100644 --- a/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/samples/v1-beta/typescript/package.json +++ b/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^14.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/samples/v1/typescript/package.json b/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/samples/v1/typescript/package.json index 4c0f1c0e1597..b27c16b2047d 100644 --- a/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/samples/v1/typescript/package.json +++ b/sdk/baremetalinfrastructure/arm-baremetalinfrastructure/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/batch/arm-batch/package.json b/sdk/batch/arm-batch/package.json index add0eade8d69..3e3e43430cb4 100644 --- a/sdk/batch/arm-batch/package.json +++ b/sdk/batch/arm-batch/package.json @@ -41,7 +41,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/batch/arm-batch/samples/v10/typescript/package.json b/sdk/batch/arm-batch/samples/v10/typescript/package.json index fadf8da76a7f..4f621fc8fe1e 100644 --- a/sdk/batch/arm-batch/samples/v10/typescript/package.json +++ b/sdk/batch/arm-batch/samples/v10/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/batch/batch-rest/package.json b/sdk/batch/batch-rest/package.json index c88a6305ca66..ec87d2f1a729 100644 --- a/sdk/batch/batch-rest/package.json +++ b/sdk/batch/batch-rest/package.json @@ -83,7 +83,7 @@ "eslint": "^9.9.0", "moment": "^2.30.1", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.6" }, "scripts": { diff --git a/sdk/batch/batch-rest/samples/v1-beta/typescript/package.json b/sdk/batch/batch-rest/samples/v1-beta/typescript/package.json index dea4c898a680..2920d465c8de 100644 --- a/sdk/batch/batch-rest/samples/v1-beta/typescript/package.json +++ b/sdk/batch/batch-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/batch/batch/package.json b/sdk/batch/batch/package.json index 77721a119816..a44330d68c17 100644 --- a/sdk/batch/batch/package.json +++ b/sdk/batch/batch/package.json @@ -56,7 +56,7 @@ "source-map-support": "^0.5.19", "ts-node": "^10.9.2", "ts-node-dev": "^2.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "uglify-js": "^3.6.0", "uuid": "^10.0.0" }, diff --git a/sdk/billing/arm-billing/package.json b/sdk/billing/arm-billing/package.json index 3c464017c645..65cb6985108d 100644 --- a/sdk/billing/arm-billing/package.json +++ b/sdk/billing/arm-billing/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/billing/arm-billing/samples/v5/typescript/package.json b/sdk/billing/arm-billing/samples/v5/typescript/package.json index eb14424b0cc0..0f0e8a9c2c88 100644 --- a/sdk/billing/arm-billing/samples/v5/typescript/package.json +++ b/sdk/billing/arm-billing/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/billingbenefits/arm-billingbenefits/package.json b/sdk/billingbenefits/arm-billingbenefits/package.json index 0c2efd2dc01c..7a748d57fc7f 100644 --- a/sdk/billingbenefits/arm-billingbenefits/package.json +++ b/sdk/billingbenefits/arm-billingbenefits/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/billingbenefits/arm-billingbenefits", "repository": { diff --git a/sdk/billingbenefits/arm-billingbenefits/samples/v1/typescript/package.json b/sdk/billingbenefits/arm-billingbenefits/samples/v1/typescript/package.json index 30cf931dab74..c98a140fbb50 100644 --- a/sdk/billingbenefits/arm-billingbenefits/samples/v1/typescript/package.json +++ b/sdk/billingbenefits/arm-billingbenefits/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json index aac7c5b1e599..b2a26ef7dbdf 100644 --- a/sdk/botservice/arm-botservice/package.json +++ b/sdk/botservice/arm-botservice/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/package.json b/sdk/botservice/arm-botservice/samples/v4/typescript/package.json index b842c3869b53..9dc4c9bfc718 100644 --- a/sdk/botservice/arm-botservice/samples/v4/typescript/package.json +++ b/sdk/botservice/arm-botservice/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cdn/arm-cdn/package.json b/sdk/cdn/arm-cdn/package.json index 78393e739589..d80595afe9f4 100644 --- a/sdk/cdn/arm-cdn/package.json +++ b/sdk/cdn/arm-cdn/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/package.json b/sdk/cdn/arm-cdn/samples/v9/typescript/package.json index f11c5f9deaf4..817318f72599 100644 --- a/sdk/cdn/arm-cdn/samples/v9/typescript/package.json +++ b/sdk/cdn/arm-cdn/samples/v9/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/changeanalysis/arm-changeanalysis/package.json b/sdk/changeanalysis/arm-changeanalysis/package.json index 9df0132beb8a..f970abcf8cfa 100644 --- a/sdk/changeanalysis/arm-changeanalysis/package.json +++ b/sdk/changeanalysis/arm-changeanalysis/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/changeanalysis/arm-changeanalysis", "repository": { diff --git a/sdk/changeanalysis/arm-changeanalysis/samples/v2/typescript/package.json b/sdk/changeanalysis/arm-changeanalysis/samples/v2/typescript/package.json index ee72851d4fcb..b3aa9ac26c82 100644 --- a/sdk/changeanalysis/arm-changeanalysis/samples/v2/typescript/package.json +++ b/sdk/changeanalysis/arm-changeanalysis/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/changes/arm-changes/package.json b/sdk/changes/arm-changes/package.json index 0d3b54544581..58fcc6175373 100644 --- a/sdk/changes/arm-changes/package.json +++ b/sdk/changes/arm-changes/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/changes/arm-changes", "repository": { diff --git a/sdk/changes/arm-changes/samples/v1/typescript/package.json b/sdk/changes/arm-changes/samples/v1/typescript/package.json index bad3f06274c7..8060629bd06b 100644 --- a/sdk/changes/arm-changes/samples/v1/typescript/package.json +++ b/sdk/changes/arm-changes/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/chaos/arm-chaos/package.json b/sdk/chaos/arm-chaos/package.json index 3e7fb7413f12..3ffb88672496 100644 --- a/sdk/chaos/arm-chaos/package.json +++ b/sdk/chaos/arm-chaos/package.json @@ -40,7 +40,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/package.json b/sdk/chaos/arm-chaos/samples/v1/typescript/package.json index 088819261d81..14002d21e290 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/package.json +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cognitivelanguage/ai-language-conversations/package.json b/sdk/cognitivelanguage/ai-language-conversations/package.json index 2db7b53c0662..2352e21296d8 100644 --- a/sdk/cognitivelanguage/ai-language-conversations/package.json +++ b/sdk/cognitivelanguage/ai-language-conversations/package.json @@ -42,7 +42,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitivelanguage/ai-language-conversations/README.md", diff --git a/sdk/cognitivelanguage/ai-language-conversations/samples/v1-beta/typescript/package.json b/sdk/cognitivelanguage/ai-language-conversations/samples/v1-beta/typescript/package.json index ddeb518f3be0..074ab7cbbbde 100644 --- a/sdk/cognitivelanguage/ai-language-conversations/samples/v1-beta/typescript/package.json +++ b/sdk/cognitivelanguage/ai-language-conversations/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cognitivelanguage/ai-language-text/package.json b/sdk/cognitivelanguage/ai-language-text/package.json index efa37100af59..851c4d4571ed 100644 --- a/sdk/cognitivelanguage/ai-language-text/package.json +++ b/sdk/cognitivelanguage/ai-language-text/package.json @@ -115,7 +115,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "type": "module", diff --git a/sdk/cognitivelanguage/ai-language-text/samples/v1-beta/typescript/package.json b/sdk/cognitivelanguage/ai-language-text/samples/v1-beta/typescript/package.json index b31a0ed87669..7bca7ed8722c 100644 --- a/sdk/cognitivelanguage/ai-language-text/samples/v1-beta/typescript/package.json +++ b/sdk/cognitivelanguage/ai-language-text/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cognitivelanguage/ai-language-text/samples/v1/typescript/package.json b/sdk/cognitivelanguage/ai-language-text/samples/v1/typescript/package.json index a794e9956ca7..585d6a90f974 100644 --- a/sdk/cognitivelanguage/ai-language-text/samples/v1/typescript/package.json +++ b/sdk/cognitivelanguage/ai-language-text/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cognitivelanguage/ai-language-textauthoring/package.json b/sdk/cognitivelanguage/ai-language-textauthoring/package.json index 421059b35aa7..b77dae100b4c 100644 --- a/sdk/cognitivelanguage/ai-language-textauthoring/package.json +++ b/sdk/cognitivelanguage/ai-language-textauthoring/package.json @@ -77,7 +77,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitivelanguage/ai-language-textauthoring/README.md", diff --git a/sdk/cognitivelanguage/perf-tests/ai-language-text/package.json b/sdk/cognitivelanguage/perf-tests/ai-language-text/package.json index db7e08f8947e..e1d0972ca71f 100644 --- a/sdk/cognitivelanguage/perf-tests/ai-language-text/package.json +++ b/sdk/cognitivelanguage/perf-tests/ai-language-text/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/package.json b/sdk/cognitiveservices/arm-cognitiveservices/package.json index 470bc4816ed4..985c005606df 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/package.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/package.json b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/package.json index ec8ed57b364b..d998e7749d0c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/package.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/package.json b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/package.json index cef6920866b4..35c395a8ed1d 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/package.json +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index e01060e46d37..30b0db428b63 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/commerce/arm-commerce/package.json b/sdk/commerce/arm-commerce/package.json index 7a811f8712e4..c6e53b560184 100644 --- a/sdk/commerce/arm-commerce/package.json +++ b/sdk/commerce/arm-commerce/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/commerce/arm-commerce", "repository": { diff --git a/sdk/commerce/arm-commerce/samples/v4-beta/typescript/package.json b/sdk/commerce/arm-commerce/samples/v4-beta/typescript/package.json index 58e4b5fe0ebd..bc4b4b93a199 100644 --- a/sdk/commerce/arm-commerce/samples/v4-beta/typescript/package.json +++ b/sdk/commerce/arm-commerce/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/arm-communication/package.json b/sdk/communication/arm-communication/package.json index 6ac6ce04b6b2..d4e734aa384f 100644 --- a/sdk/communication/arm-communication/package.json +++ b/sdk/communication/arm-communication/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/communication/arm-communication/samples/v4/typescript/package.json b/sdk/communication/arm-communication/samples/v4/typescript/package.json index 97a9f9c01dce..bf9939c88061 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/package.json +++ b/sdk/communication/arm-communication/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-alpha-ids/package.json b/sdk/communication/communication-alpha-ids/package.json index bddffa9290ec..051050458308 100644 --- a/sdk/communication/communication-alpha-ids/package.json +++ b/sdk/communication/communication-alpha-ids/package.json @@ -81,7 +81,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//metadata": { diff --git a/sdk/communication/communication-call-automation/package.json b/sdk/communication/communication-call-automation/package.json index 0443c0dfd80d..8f4724a5440f 100644 --- a/sdk/communication/communication-call-automation/package.json +++ b/sdk/communication/communication-call-automation/package.json @@ -100,7 +100,7 @@ "eslint": "^9.9.0", "inherits": "^2.0.3", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "type": "module", diff --git a/sdk/communication/communication-chat/package.json b/sdk/communication/communication-chat/package.json index 9a5564b0df4c..c9135d9d2e69 100644 --- a/sdk/communication/communication-chat/package.json +++ b/sdk/communication/communication-chat/package.json @@ -84,7 +84,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "//metadata": { diff --git a/sdk/communication/communication-chat/samples/v1/typescript/package.json b/sdk/communication/communication-chat/samples/v1/typescript/package.json index bfcabc116cac..e855db2dc305 100644 --- a/sdk/communication/communication-chat/samples/v1/typescript/package.json +++ b/sdk/communication/communication-chat/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ "@azure/communication-identity": "^1.0.0" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-common/package.json b/sdk/communication/communication-common/package.json index 367a5233903b..729db3a9059a 100644 --- a/sdk/communication/communication-common/package.json +++ b/sdk/communication/communication-common/package.json @@ -77,7 +77,7 @@ "inherits": "^2.0.3", "mockdate": "^3.0.5", "playwright": "^1.48.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1", "vitest": "^2.1.3" }, diff --git a/sdk/communication/communication-email/package.json b/sdk/communication/communication-email/package.json index 05dae1e8fa6a..4d104b55d009 100644 --- a/sdk/communication/communication-email/package.json +++ b/sdk/communication/communication-email/package.json @@ -65,7 +65,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-email/", diff --git a/sdk/communication/communication-email/samples/v1-beta/typescript/package.json b/sdk/communication/communication-email/samples/v1-beta/typescript/package.json index fb49b23cfb18..ffb373c402fe 100644 --- a/sdk/communication/communication-email/samples/v1-beta/typescript/package.json +++ b/sdk/communication/communication-email/samples/v1-beta/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-identity/package.json b/sdk/communication/communication-identity/package.json index 3c8e90d8cd87..18cd1e22b55d 100644 --- a/sdk/communication/communication-identity/package.json +++ b/sdk/communication/communication-identity/package.json @@ -118,7 +118,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "type": "module", diff --git a/sdk/communication/communication-identity/samples/v1/typescript/package.json b/sdk/communication/communication-identity/samples/v1/typescript/package.json index 9ca967ff9a59..f634bded3e89 100644 --- a/sdk/communication/communication-identity/samples/v1/typescript/package.json +++ b/sdk/communication/communication-identity/samples/v1/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-job-router-rest/package.json b/sdk/communication/communication-job-router-rest/package.json index 8e7809cd10e1..4fb46a67a980 100644 --- a/sdk/communication/communication-job-router-rest/package.json +++ b/sdk/communication/communication-job-router-rest/package.json @@ -81,7 +81,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-job-router-rest/README.md", diff --git a/sdk/communication/communication-job-router-rest/samples/v1-beta/typescript/package.json b/sdk/communication/communication-job-router-rest/samples/v1-beta/typescript/package.json index b8c1365387f0..5afcbeee008c 100644 --- a/sdk/communication/communication-job-router-rest/samples/v1-beta/typescript/package.json +++ b/sdk/communication/communication-job-router-rest/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-job-router/package.json b/sdk/communication/communication-job-router/package.json index d2b4481d3bd9..c50cb1c6ce79 100644 --- a/sdk/communication/communication-job-router/package.json +++ b/sdk/communication/communication-job-router/package.json @@ -95,7 +95,7 @@ "eslint": "^9.9.0", "inherits": "^2.0.3", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1", "vitest": "^2.1.4" }, diff --git a/sdk/communication/communication-messages-rest/package.json b/sdk/communication/communication-messages-rest/package.json index a40c82320c09..d765002130e2 100644 --- a/sdk/communication/communication-messages-rest/package.json +++ b/sdk/communication/communication-messages-rest/package.json @@ -82,7 +82,7 @@ "eslint": "^9.9.0", "karma-source-map-support": "~1.4.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-messages-rest-rest/README.md", diff --git a/sdk/communication/communication-messages-rest/samples/v1/typescript/package.json b/sdk/communication/communication-messages-rest/samples/v1/typescript/package.json index db78ff2629db..7b1bc7be1481 100644 --- a/sdk/communication/communication-messages-rest/samples/v1/typescript/package.json +++ b/sdk/communication/communication-messages-rest/samples/v1/typescript/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-messages-rest/samples/v2/typescript/package.json b/sdk/communication/communication-messages-rest/samples/v2/typescript/package.json index 30867fa92a1d..961f15e5c00b 100644 --- a/sdk/communication/communication-messages-rest/samples/v2/typescript/package.json +++ b/sdk/communication/communication-messages-rest/samples/v2/typescript/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-phone-numbers/package.json b/sdk/communication/communication-phone-numbers/package.json index dc5197340ca0..d7ff7fd203ee 100644 --- a/sdk/communication/communication-phone-numbers/package.json +++ b/sdk/communication/communication-phone-numbers/package.json @@ -82,7 +82,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//metadata": { diff --git a/sdk/communication/communication-phone-numbers/samples/v1/typescript/package.json b/sdk/communication/communication-phone-numbers/samples/v1/typescript/package.json index cba5aef8a7b5..17a79b7a7e46 100644 --- a/sdk/communication/communication-phone-numbers/samples/v1/typescript/package.json +++ b/sdk/communication/communication-phone-numbers/samples/v1/typescript/package.json @@ -31,7 +31,7 @@ "dotenv": "latest" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-recipient-verification/package.json b/sdk/communication/communication-recipient-verification/package.json index cda1201eee4d..a1f6e329c1a7 100644 --- a/sdk/communication/communication-recipient-verification/package.json +++ b/sdk/communication/communication-recipient-verification/package.json @@ -82,7 +82,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//metadata": { diff --git a/sdk/communication/communication-recipient-verification/samples/v1-beta/typescript/package.json b/sdk/communication/communication-recipient-verification/samples/v1-beta/typescript/package.json index 52ebd35e58de..9d2ce89ed5a1 100644 --- a/sdk/communication/communication-recipient-verification/samples/v1-beta/typescript/package.json +++ b/sdk/communication/communication-recipient-verification/samples/v1-beta/typescript/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-rooms/package.json b/sdk/communication/communication-rooms/package.json index c00bc9e21bbd..6de39bda3656 100644 --- a/sdk/communication/communication-rooms/package.json +++ b/sdk/communication/communication-rooms/package.json @@ -46,7 +46,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-rooms/", diff --git a/sdk/communication/communication-rooms/samples/v1/typescript/package.json b/sdk/communication/communication-rooms/samples/v1/typescript/package.json index 02b25cf3ea8d..5b448ef7e820 100644 --- a/sdk/communication/communication-rooms/samples/v1/typescript/package.json +++ b/sdk/communication/communication-rooms/samples/v1/typescript/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-short-codes/package.json b/sdk/communication/communication-short-codes/package.json index c9bd8da7eacd..6317d599c916 100644 --- a/sdk/communication/communication-short-codes/package.json +++ b/sdk/communication/communication-short-codes/package.json @@ -82,7 +82,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//metadata": { diff --git a/sdk/communication/communication-short-codes/samples/v1/typescript/package.json b/sdk/communication/communication-short-codes/samples/v1/typescript/package.json index 32ec8d60aa2c..0642b82f749f 100644 --- a/sdk/communication/communication-short-codes/samples/v1/typescript/package.json +++ b/sdk/communication/communication-short-codes/samples/v1/typescript/package.json @@ -31,7 +31,7 @@ "dotenv": "latest" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-sms/package.json b/sdk/communication/communication-sms/package.json index a5c3c5173c84..649e75d4c9a2 100644 --- a/sdk/communication/communication-sms/package.json +++ b/sdk/communication/communication-sms/package.json @@ -82,7 +82,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//metadata": { diff --git a/sdk/communication/communication-sms/samples/v1/typescript/package.json b/sdk/communication/communication-sms/samples/v1/typescript/package.json index b86010f6e9c0..75b212347c23 100644 --- a/sdk/communication/communication-sms/samples/v1/typescript/package.json +++ b/sdk/communication/communication-sms/samples/v1/typescript/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-tiering/package.json b/sdk/communication/communication-tiering/package.json index 6dab36285c93..160c283c8fce 100644 --- a/sdk/communication/communication-tiering/package.json +++ b/sdk/communication/communication-tiering/package.json @@ -85,7 +85,7 @@ "eslint": "^9.9.0", "inherits": "^2.0.3", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//metadata": { diff --git a/sdk/communication/communication-tiering/samples/v1-beta/typescript/package.json b/sdk/communication/communication-tiering/samples/v1-beta/typescript/package.json index 32d3415e4b21..21bc883f8cdd 100644 --- a/sdk/communication/communication-tiering/samples/v1-beta/typescript/package.json +++ b/sdk/communication/communication-tiering/samples/v1-beta/typescript/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/communication/communication-toll-free-verification/package.json b/sdk/communication/communication-toll-free-verification/package.json index 7c7a588bb796..1b66df408657 100644 --- a/sdk/communication/communication-toll-free-verification/package.json +++ b/sdk/communication/communication-toll-free-verification/package.json @@ -82,7 +82,7 @@ "eslint": "^9.9.0", "inherits": "^2.0.3", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//metadata": { diff --git a/sdk/compute/arm-compute-profile-2020-09-01-hybrid/package.json b/sdk/compute/arm-compute-profile-2020-09-01-hybrid/package.json index 24af711ed35c..9d2e62cd272c 100644 --- a/sdk/compute/arm-compute-profile-2020-09-01-hybrid/package.json +++ b/sdk/compute/arm-compute-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/compute/arm-compute-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/compute/arm-compute-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index 423572f19dc0..62a62b1f1b3a 100644 --- a/sdk/compute/arm-compute-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/compute/arm-compute-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/compute/arm-compute-rest/package.json b/sdk/compute/arm-compute-rest/package.json index 49c784740f28..1f7875e23044 100644 --- a/sdk/compute/arm-compute-rest/package.json +++ b/sdk/compute/arm-compute-rest/package.json @@ -97,7 +97,7 @@ "nyc": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute-rest/README.md", "//metadata": { diff --git a/sdk/compute/arm-compute-rest/samples/v1-beta/typescript/package.json b/sdk/compute/arm-compute-rest/samples/v1-beta/typescript/package.json index 45644d109b1b..a98ba7651e9c 100644 --- a/sdk/compute/arm-compute-rest/samples/v1-beta/typescript/package.json +++ b/sdk/compute/arm-compute-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/compute/arm-compute/package.json b/sdk/compute/arm-compute/package.json index 7c2dc3a7554e..edfcfe3cb8d5 100644 --- a/sdk/compute/arm-compute/package.json +++ b/sdk/compute/arm-compute/package.json @@ -41,7 +41,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/compute/arm-compute/samples/v22/typescript/package.json b/sdk/compute/arm-compute/samples/v22/typescript/package.json index 683d053645d4..5e7eb8e30209 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/package.json +++ b/sdk/compute/arm-compute/samples/v22/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/computefleet/arm-computefleet/package.json b/sdk/computefleet/arm-computefleet/package.json index 2407da376e0c..8fe450f688e1 100644 --- a/sdk/computefleet/arm-computefleet/package.json +++ b/sdk/computefleet/arm-computefleet/package.json @@ -70,7 +70,7 @@ "dotenv": "^16.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", "@vitest/coverage-istanbul": "^2.0.5", diff --git a/sdk/computefleet/arm-computefleet/samples/v1/typescript/package.json b/sdk/computefleet/arm-computefleet/samples/v1/typescript/package.json index df6749026e0b..e535d19366e7 100644 --- a/sdk/computefleet/arm-computefleet/samples/v1/typescript/package.json +++ b/sdk/computefleet/arm-computefleet/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/computeschedule/arm-computeschedule/package.json b/sdk/computeschedule/arm-computeschedule/package.json index a8c2d2e5fc04..15c9cbcee13a 100644 --- a/sdk/computeschedule/arm-computeschedule/package.json +++ b/sdk/computeschedule/arm-computeschedule/package.json @@ -69,7 +69,7 @@ "@types/node": "^18.0.0", "eslint": "^9.9.0", "prettier": "^3.2.5", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", "@vitest/coverage-istanbul": "^2.0.5", diff --git a/sdk/computeschedule/arm-computeschedule/samples/v1-beta/typescript/package.json b/sdk/computeschedule/arm-computeschedule/samples/v1-beta/typescript/package.json index ed5e22ac8f82..4af8bbe8d883 100644 --- a/sdk/computeschedule/arm-computeschedule/samples/v1-beta/typescript/package.json +++ b/sdk/computeschedule/arm-computeschedule/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/confidentialledger/arm-confidentialledger/package.json b/sdk/confidentialledger/arm-confidentialledger/package.json index 9f2a4a8986f2..729a639e4f65 100644 --- a/sdk/confidentialledger/arm-confidentialledger/package.json +++ b/sdk/confidentialledger/arm-confidentialledger/package.json @@ -40,7 +40,7 @@ "esm": "^3.2.18", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/confidentialledger/arm-confidentialledger/samples/v1-beta/typescript/package.json b/sdk/confidentialledger/arm-confidentialledger/samples/v1-beta/typescript/package.json index a658c0168957..469c0d504451 100644 --- a/sdk/confidentialledger/arm-confidentialledger/samples/v1-beta/typescript/package.json +++ b/sdk/confidentialledger/arm-confidentialledger/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/confidentialledger/arm-confidentialledger/samples/v1/typescript/package.json b/sdk/confidentialledger/arm-confidentialledger/samples/v1/typescript/package.json index a4f6cbb8ab01..e9fff0e2cb77 100644 --- a/sdk/confidentialledger/arm-confidentialledger/samples/v1/typescript/package.json +++ b/sdk/confidentialledger/arm-confidentialledger/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/confidentialledger/confidential-ledger-rest/package.json b/sdk/confidentialledger/confidential-ledger-rest/package.json index 0141cff45d75..c52782507ebb 100644 --- a/sdk/confidentialledger/confidential-ledger-rest/package.json +++ b/sdk/confidentialledger/confidential-ledger-rest/package.json @@ -96,7 +96,7 @@ "@vitest/coverage-istanbul": "^2.1.5", "dotenv": "^16.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "type": "module", diff --git a/sdk/confidentialledger/confidential-ledger-rest/samples/v1-beta/typescript/package.json b/sdk/confidentialledger/confidential-ledger-rest/samples/v1-beta/typescript/package.json index 542836c79106..c45b844fdeac 100644 --- a/sdk/confidentialledger/confidential-ledger-rest/samples/v1-beta/typescript/package.json +++ b/sdk/confidentialledger/confidential-ledger-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/confluent/arm-confluent/package.json b/sdk/confluent/arm-confluent/package.json index dfe005ff3209..888b815e3ac1 100644 --- a/sdk/confluent/arm-confluent/package.json +++ b/sdk/confluent/arm-confluent/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/confluent/arm-confluent/samples/v3/typescript/package.json b/sdk/confluent/arm-confluent/samples/v3/typescript/package.json index ae90556bd2d4..2374bb599ebf 100644 --- a/sdk/confluent/arm-confluent/samples/v3/typescript/package.json +++ b/sdk/confluent/arm-confluent/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/connectedcache/arm-connectedcache/package.json b/sdk/connectedcache/arm-connectedcache/package.json index f566945abcd0..74c5590dadfa 100644 --- a/sdk/connectedcache/arm-connectedcache/package.json +++ b/sdk/connectedcache/arm-connectedcache/package.json @@ -71,7 +71,7 @@ "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "tshy": "^2.0.0", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json index 057fc03a44a2..79927b7a5839 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/connectedvmware/arm-connectedvmware/package.json b/sdk/connectedvmware/arm-connectedvmware/package.json index aa42df9763e1..74696f7dd369 100644 --- a/sdk/connectedvmware/arm-connectedvmware/package.json +++ b/sdk/connectedvmware/arm-connectedvmware/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/package.json b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/package.json index 1bd7302858c0..d865986bcd69 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/package.json +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/consumption/arm-consumption/package.json b/sdk/consumption/arm-consumption/package.json index 37bb1e21ac61..b29b11555ef1 100644 --- a/sdk/consumption/arm-consumption/package.json +++ b/sdk/consumption/arm-consumption/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/package.json b/sdk/consumption/arm-consumption/samples/v9/typescript/package.json index 7b0be1246fb0..2a04de9dec7d 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/package.json +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/containerinstance/arm-containerinstance/package.json b/sdk/containerinstance/arm-containerinstance/package.json index 460f2323fe0f..c68264da642a 100644 --- a/sdk/containerinstance/arm-containerinstance/package.json +++ b/sdk/containerinstance/arm-containerinstance/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-containerinstance.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/containerinstance/arm-containerinstance/samples/v9-beta/typescript/package.json b/sdk/containerinstance/arm-containerinstance/samples/v9-beta/typescript/package.json index 46acd5d9ce82..db92edade56d 100644 --- a/sdk/containerinstance/arm-containerinstance/samples/v9-beta/typescript/package.json +++ b/sdk/containerinstance/arm-containerinstance/samples/v9-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/containerinstance/arm-containerinstance/samples/v9/typescript/package.json b/sdk/containerinstance/arm-containerinstance/samples/v9/typescript/package.json index 0b6f1d0e1059..ca5b1c294eb8 100644 --- a/sdk/containerinstance/arm-containerinstance/samples/v9/typescript/package.json +++ b/sdk/containerinstance/arm-containerinstance/samples/v9/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/containerregistry/arm-containerregistry/package.json b/sdk/containerregistry/arm-containerregistry/package.json index 9ccf09a15218..fbd4396048d8 100644 --- a/sdk/containerregistry/arm-containerregistry/package.json +++ b/sdk/containerregistry/arm-containerregistry/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/containerregistry/arm-containerregistry/samples/v11-beta/typescript/package.json b/sdk/containerregistry/arm-containerregistry/samples/v11-beta/typescript/package.json index 03eb4fef8dee..29f11df76688 100644 --- a/sdk/containerregistry/arm-containerregistry/samples/v11-beta/typescript/package.json +++ b/sdk/containerregistry/arm-containerregistry/samples/v11-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/containerregistry/container-registry/package.json b/sdk/containerregistry/container-registry/package.json index fdd1cfa4f539..344d5991c6e9 100644 --- a/sdk/containerregistry/container-registry/package.json +++ b/sdk/containerregistry/container-registry/package.json @@ -96,7 +96,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "//sampleConfiguration": { diff --git a/sdk/containerregistry/container-registry/samples/v1/typescript/package.json b/sdk/containerregistry/container-registry/samples/v1/typescript/package.json index 7181053f2018..c4cdbb11cb73 100644 --- a/sdk/containerregistry/container-registry/samples/v1/typescript/package.json +++ b/sdk/containerregistry/container-registry/samples/v1/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/containerregistry/perf-tests/container-registry/package.json b/sdk/containerregistry/perf-tests/container-registry/package.json index 017fb3a7a960..888ba71942f7 100644 --- a/sdk/containerregistry/perf-tests/container-registry/package.json +++ b/sdk/containerregistry/perf-tests/container-registry/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/containerservice/arm-containerservice-rest/package.json b/sdk/containerservice/arm-containerservice-rest/package.json index a4196130f661..9496a2720590 100644 --- a/sdk/containerservice/arm-containerservice-rest/package.json +++ b/sdk/containerservice/arm-containerservice-rest/package.json @@ -105,7 +105,7 @@ "nyc": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "browser": { "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js" diff --git a/sdk/containerservice/arm-containerservice-rest/samples/v1-beta/typescript/package.json b/sdk/containerservice/arm-containerservice-rest/samples/v1-beta/typescript/package.json index 759a69516005..a64b7bfc094f 100644 --- a/sdk/containerservice/arm-containerservice-rest/samples/v1-beta/typescript/package.json +++ b/sdk/containerservice/arm-containerservice-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 153bb88c0123..92d5978bebdc 100644 --- a/sdk/containerservice/arm-containerservice/package.json +++ b/sdk/containerservice/arm-containerservice/package.json @@ -29,7 +29,7 @@ "types": "./types/arm-containerservice.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/package.json b/sdk/containerservice/arm-containerservice/samples/v21/typescript/package.json index 7c4f4f1fb13a..7d9ef5c6d604 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/package.json +++ b/sdk/containerservice/arm-containerservice/samples/v21/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/containerservice/arm-containerservicefleet/package.json b/sdk/containerservice/arm-containerservicefleet/package.json index 0c211cda16b9..1908b1f8b232 100644 --- a/sdk/containerservice/arm-containerservicefleet/package.json +++ b/sdk/containerservice/arm-containerservicefleet/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-containerservicefleet.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/package.json b/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/package.json index bf3616ae6c26..fe7bd0a901ea 100644 --- a/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/package.json +++ b/sdk/containerservice/arm-containerservicefleet/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/containerservice/arm-containerservicefleet/samples/v1/typescript/package.json b/sdk/containerservice/arm-containerservicefleet/samples/v1/typescript/package.json index f021fb311121..e75a40fdc394 100644 --- a/sdk/containerservice/arm-containerservicefleet/samples/v1/typescript/package.json +++ b/sdk/containerservice/arm-containerservicefleet/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/contentsafety/ai-content-safety-rest/package.json b/sdk/contentsafety/ai-content-safety-rest/package.json index e11eefa5a88e..d6282a569528 100644 --- a/sdk/contentsafety/ai-content-safety-rest/package.json +++ b/sdk/contentsafety/ai-content-safety-rest/package.json @@ -81,7 +81,7 @@ "eslint": "^9.9.0", "playwright": "^1.49.0", "rollup-plugin-copy": "^3.5.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/contentsafety/ai-content-safety-rest/README.md", diff --git a/sdk/contentsafety/ai-content-safety-rest/samples/v1/typescript/package.json b/sdk/contentsafety/ai-content-safety-rest/samples/v1/typescript/package.json index c98d6221a678..2f8149c2c627 100644 --- a/sdk/contentsafety/ai-content-safety-rest/samples/v1/typescript/package.json +++ b/sdk/contentsafety/ai-content-safety-rest/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/core/abort-controller/package.json b/sdk/core/abort-controller/package.json index c655c1d116d9..d3a2228b2648 100644 --- a/sdk/core/abort-controller/package.json +++ b/sdk/core/abort-controller/package.json @@ -90,7 +90,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/core-amqp/package.json b/sdk/core/core-amqp/package.json index 2385763f5d07..adac96f3cbc5 100644 --- a/sdk/core/core-amqp/package.json +++ b/sdk/core/core-amqp/package.json @@ -99,7 +99,7 @@ "debug": "^4.3.4", "eslint": "^9.9.0", "playwright": "^1.43.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5", "ws": "^8.17.0" }, diff --git a/sdk/core/core-auth/package.json b/sdk/core/core-auth/package.json index 66282de28968..14fcf6d17b7b 100644 --- a/sdk/core/core-auth/package.json +++ b/sdk/core/core-auth/package.json @@ -86,7 +86,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/core-client-rest/package.json b/sdk/core/core-client-rest/package.json index 986743ded440..c18df229ab6b 100644 --- a/sdk/core/core-client-rest/package.json +++ b/sdk/core/core-client-rest/package.json @@ -89,7 +89,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/core-client/package.json b/sdk/core/core-client/package.json index 386ae9fc5296..45c6c1072f20 100644 --- a/sdk/core/core-client/package.json +++ b/sdk/core/core-client/package.json @@ -91,7 +91,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/core-http-compat/package.json b/sdk/core/core-http-compat/package.json index 71649126d421..72614b0edff3 100644 --- a/sdk/core/core-http-compat/package.json +++ b/sdk/core/core-http-compat/package.json @@ -87,7 +87,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/core-lro/package.json b/sdk/core/core-lro/package.json index 1665953bf35a..ab4bcbd977c1 100644 --- a/sdk/core/core-lro/package.json +++ b/sdk/core/core-lro/package.json @@ -104,7 +104,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/core-paging/package.json b/sdk/core/core-paging/package.json index 3644a98455f1..a48c5325d523 100644 --- a/sdk/core/core-paging/package.json +++ b/sdk/core/core-paging/package.json @@ -90,7 +90,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/core-paging/samples/v1/typescript/package.json b/sdk/core/core-paging/samples/v1/typescript/package.json index b73392d75fc0..230181c302b6 100644 --- a/sdk/core/core-paging/samples/v1/typescript/package.json +++ b/sdk/core/core-paging/samples/v1/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/core/core-rest-pipeline/package.json b/sdk/core/core-rest-pipeline/package.json index d745874527b9..b701fb3ddd7f 100644 --- a/sdk/core/core-rest-pipeline/package.json +++ b/sdk/core/core-rest-pipeline/package.json @@ -109,7 +109,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "tshy": { diff --git a/sdk/core/core-rest-pipeline/samples/v1/typescript/package.json b/sdk/core/core-rest-pipeline/samples/v1/typescript/package.json index c5eead584939..bfd8f92940a9 100644 --- a/sdk/core/core-rest-pipeline/samples/v1/typescript/package.json +++ b/sdk/core/core-rest-pipeline/samples/v1/typescript/package.json @@ -30,7 +30,7 @@ "dotenv": "latest" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/core/core-sse/package.json b/sdk/core/core-sse/package.json index 88a1ed285c4b..cbc0395560a4 100644 --- a/sdk/core/core-sse/package.json +++ b/sdk/core/core-sse/package.json @@ -95,7 +95,7 @@ "express": "^4.19.2", "playwright": "^1.46.0", "tsx": "^4.17.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "dependencies": { diff --git a/sdk/core/core-sse/samples/v1/typescript/package.json b/sdk/core/core-sse/samples/v1/typescript/package.json index 68260d141dcd..3d99b56c2931 100644 --- a/sdk/core/core-sse/samples/v1/typescript/package.json +++ b/sdk/core/core-sse/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/core/core-sse/samples/v2/typescript/package.json b/sdk/core/core-sse/samples/v2/typescript/package.json index afd9e92b460c..b04d899e0107 100644 --- a/sdk/core/core-sse/samples/v2/typescript/package.json +++ b/sdk/core/core-sse/samples/v2/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/core/core-tracing/package.json b/sdk/core/core-tracing/package.json index 01e481556288..160b1326ff5e 100644 --- a/sdk/core/core-tracing/package.json +++ b/sdk/core/core-tracing/package.json @@ -85,7 +85,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/core-tracing/samples/v1/typescript/package.json b/sdk/core/core-tracing/samples/v1/typescript/package.json index 649d624df035..692c6f420a25 100644 --- a/sdk/core/core-tracing/samples/v1/typescript/package.json +++ b/sdk/core/core-tracing/samples/v1/typescript/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/core/core-util/package.json b/sdk/core/core-util/package.json index 44cfec032b58..9cededcd3904 100644 --- a/sdk/core/core-util/package.json +++ b/sdk/core/core-util/package.json @@ -86,7 +86,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/core-xml/package.json b/sdk/core/core-xml/package.json index ce7222e8f15c..9ee4e673be2d 100644 --- a/sdk/core/core-xml/package.json +++ b/sdk/core/core-xml/package.json @@ -86,7 +86,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/logger/package.json b/sdk/core/logger/package.json index cd4bd520e979..12e0c1d36eda 100644 --- a/sdk/core/logger/package.json +++ b/sdk/core/logger/package.json @@ -91,7 +91,7 @@ "dotenv": "^16.3.1", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//metadata": { diff --git a/sdk/core/perf-tests/core-rest-pipeline/package.json b/sdk/core/perf-tests/core-rest-pipeline/package.json index 0bd27f0dce69..fa9103a1529a 100644 --- a/sdk/core/perf-tests/core-rest-pipeline/package.json +++ b/sdk/core/perf-tests/core-rest-pipeline/package.json @@ -24,7 +24,7 @@ "concurrently": "^8.2.0", "eslint": "^9.9.0", "express": "^4.21.2", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/core/ts-http-runtime/package.json b/sdk/core/ts-http-runtime/package.json index bcee760ab07d..f53852ee52c2 100644 --- a/sdk/core/ts-http-runtime/package.json +++ b/sdk/core/ts-http-runtime/package.json @@ -104,7 +104,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5", "tsx": "^4.19.1" }, diff --git a/sdk/cosmosdb/arm-cosmosdb/package.json b/sdk/cosmosdb/arm-cosmosdb/package.json index 5f51bd7bb481..01be1663ec94 100644 --- a/sdk/cosmosdb/arm-cosmosdb/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-cosmosdb.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/package.json b/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/package.json index d65903804613..8bb3e6ea8d4a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cosmosdb/cosmos/package.json b/sdk/cosmosdb/cosmos/package.json index 97c89a26f366..73125b2b4b27 100644 --- a/sdk/cosmosdb/cosmos/package.json +++ b/sdk/cosmosdb/cosmos/package.json @@ -120,7 +120,7 @@ "sinon": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "//sampleConfiguration": { "skip": [ diff --git a/sdk/cosmosdb/cosmos/samples/v3/typescript/package.json b/sdk/cosmosdb/cosmos/samples/v3/typescript/package.json index 9f4f69908e35..cc12359a0300 100644 --- a/sdk/cosmosdb/cosmos/samples/v3/typescript/package.json +++ b/sdk/cosmosdb/cosmos/samples/v3/typescript/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@types/uuid": "^8.0.0", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cosmosdb/cosmos/samples/v4/typescript/package.json b/sdk/cosmosdb/cosmos/samples/v4/typescript/package.json index 2c78551aaa64..905a12b72433 100644 --- a/sdk/cosmosdb/cosmos/samples/v4/typescript/package.json +++ b/sdk/cosmosdb/cosmos/samples/v4/typescript/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cosmosdb/cosmos/src/client/Item/Items.ts b/sdk/cosmosdb/cosmos/src/client/Item/Items.ts index f37d9476501b..f5e825c7a81c 100644 --- a/sdk/cosmosdb/cosmos/src/client/Item/Items.ts +++ b/sdk/cosmosdb/cosmos/src/client/Item/Items.ts @@ -26,6 +26,7 @@ import type { OperationInput, BulkOptions, BulkOperationResponse, + Operation, } from "../../utils/batch"; import { isKeyInRange, @@ -482,8 +483,8 @@ export class Items { min: keyRange.minInclusive, max: keyRange.maxExclusive, rangeId: keyRange.id, - indexes: [], - operations: [], + indexes: [] as number[], + operations: [] as Operation[], }; }); @@ -617,8 +618,8 @@ export class Items { min: keyRange.minInclusive, max: keyRange.maxExclusive, rangeId: keyRange.id, - indexes: [], - operations: [], + indexes: [] as number[], + operations: [] as Operation[], }; }); let indexValue = 0; diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/package.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/package.json index 6a6f568f7179..88f48118bece 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/package.json +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/package.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/package.json index 4cb4df79dfa9..a8b07c0a8bd6 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/package.json +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/package.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/package.json index 74cd0bdf5257..739946a0fe5e 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/package.json +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/cost-management/arm-costmanagement/package.json b/sdk/cost-management/arm-costmanagement/package.json index b61842a4e0d3..5b67919c7f50 100644 --- a/sdk/cost-management/arm-costmanagement/package.json +++ b/sdk/cost-management/arm-costmanagement/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/package.json b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/package.json index 2db76cf9e620..107605a8bed7 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/package.json +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/customer-insights/arm-customerinsights/package.json b/sdk/customer-insights/arm-customerinsights/package.json index 081515655307..1d7a34a06fa6 100644 --- a/sdk/customer-insights/arm-customerinsights/package.json +++ b/sdk/customer-insights/arm-customerinsights/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/customer-insights/arm-customerinsights", "repository": { diff --git a/sdk/customer-insights/arm-customerinsights/samples/v4/typescript/package.json b/sdk/customer-insights/arm-customerinsights/samples/v4/typescript/package.json index f59813026a71..ff889871d043 100644 --- a/sdk/customer-insights/arm-customerinsights/samples/v4/typescript/package.json +++ b/sdk/customer-insights/arm-customerinsights/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/dashboard/arm-dashboard/package.json b/sdk/dashboard/arm-dashboard/package.json index 43c9e84ddbca..a7274b7ee6a9 100644 --- a/sdk/dashboard/arm-dashboard/package.json +++ b/sdk/dashboard/arm-dashboard/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/package.json b/sdk/dashboard/arm-dashboard/samples/v1/typescript/package.json index 1cc9e177b540..2485462c258a 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/package.json +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/databoundaries/arm-databoundaries/package.json b/sdk/databoundaries/arm-databoundaries/package.json index 7b01664c0ae0..b6ba0f3155f9 100644 --- a/sdk/databoundaries/arm-databoundaries/package.json +++ b/sdk/databoundaries/arm-databoundaries/package.json @@ -27,7 +27,7 @@ "devDependencies": { "@microsoft/api-extractor": "^7.31.1", "mkdirp": "^3.0.1", - "typescript": "~5.5.3", + "typescript": "~5.7.2", "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", diff --git a/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/package.json b/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/package.json index 2551972f12b0..0b5d2f64a516 100644 --- a/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/package.json +++ b/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/databox/arm-databox/package.json b/sdk/databox/arm-databox/package.json index db0848c037b9..255e8d8209af 100644 --- a/sdk/databox/arm-databox/package.json +++ b/sdk/databox/arm-databox/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/databox/arm-databox/samples/v5/typescript/package.json b/sdk/databox/arm-databox/samples/v5/typescript/package.json index 50ba1bda3bcb..31abe9b33dcb 100644 --- a/sdk/databox/arm-databox/samples/v5/typescript/package.json +++ b/sdk/databox/arm-databox/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/databoxedge/arm-databoxedge-profile-2020-09-01-hybrid/package.json b/sdk/databoxedge/arm-databoxedge-profile-2020-09-01-hybrid/package.json index 9b11f97739d6..cffafc6c4a25 100644 --- a/sdk/databoxedge/arm-databoxedge-profile-2020-09-01-hybrid/package.json +++ b/sdk/databoxedge/arm-databoxedge-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/databoxedge/arm-databoxedge-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/databoxedge/arm-databoxedge-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index 29fade4f9544..fe4a70a8f948 100644 --- a/sdk/databoxedge/arm-databoxedge-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/databoxedge/arm-databoxedge-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/databoxedge/arm-databoxedge/package.json b/sdk/databoxedge/arm-databoxedge/package.json index ea492b9e789f..f36b46e638e9 100644 --- a/sdk/databoxedge/arm-databoxedge/package.json +++ b/sdk/databoxedge/arm-databoxedge/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databoxedge/arm-databoxedge", "repository": { diff --git a/sdk/databoxedge/arm-databoxedge/samples/v2/typescript/package.json b/sdk/databoxedge/arm-databoxedge/samples/v2/typescript/package.json index 7784e6a4d060..7530b5bb3865 100644 --- a/sdk/databoxedge/arm-databoxedge/samples/v2/typescript/package.json +++ b/sdk/databoxedge/arm-databoxedge/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/databricks/arm-databricks/package.json b/sdk/databricks/arm-databricks/package.json index c941560deb6d..6e9896df6a75 100644 --- a/sdk/databricks/arm-databricks/package.json +++ b/sdk/databricks/arm-databricks/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/databricks/arm-databricks/samples/v3/typescript/package.json b/sdk/databricks/arm-databricks/samples/v3/typescript/package.json index bc121b1bcf4b..1dda68f66d4b 100644 --- a/sdk/databricks/arm-databricks/samples/v3/typescript/package.json +++ b/sdk/databricks/arm-databricks/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/datacatalog/arm-datacatalog/package.json b/sdk/datacatalog/arm-datacatalog/package.json index 0ce0209367fa..17d583fef7b2 100644 --- a/sdk/datacatalog/arm-datacatalog/package.json +++ b/sdk/datacatalog/arm-datacatalog/package.json @@ -37,7 +37,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datacatalog/arm-datacatalog", "repository": { diff --git a/sdk/datacatalog/arm-datacatalog/samples/v4/typescript/package.json b/sdk/datacatalog/arm-datacatalog/samples/v4/typescript/package.json index 070cc640a60d..5b2328105210 100644 --- a/sdk/datacatalog/arm-datacatalog/samples/v4/typescript/package.json +++ b/sdk/datacatalog/arm-datacatalog/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/datadog/arm-datadog/package.json b/sdk/datadog/arm-datadog/package.json index e2aee66ac95e..34a361ef0f44 100644 --- a/sdk/datadog/arm-datadog/package.json +++ b/sdk/datadog/arm-datadog/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/datadog/arm-datadog/samples/v3/typescript/package.json b/sdk/datadog/arm-datadog/samples/v3/typescript/package.json index 8d59e398e4db..e2fbf9841f1c 100644 --- a/sdk/datadog/arm-datadog/samples/v3/typescript/package.json +++ b/sdk/datadog/arm-datadog/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index d5729b782444..6d2cc6027789 100644 --- a/sdk/datafactory/arm-datafactory/package.json +++ b/sdk/datafactory/arm-datafactory/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/datafactory/arm-datafactory/samples/v17/typescript/package.json b/sdk/datafactory/arm-datafactory/samples/v17/typescript/package.json index e91051e61d95..d0aca65b3649 100644 --- a/sdk/datafactory/arm-datafactory/samples/v17/typescript/package.json +++ b/sdk/datafactory/arm-datafactory/samples/v17/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/datalake-analytics/arm-datalake-analytics/package.json b/sdk/datalake-analytics/arm-datalake-analytics/package.json index 13b8f2f33980..f57fa6806dfb 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/package.json +++ b/sdk/datalake-analytics/arm-datalake-analytics/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datalake-analytics/arm-datalake-analytics", "repository": { diff --git a/sdk/datalake-analytics/arm-datalake-analytics/samples/v2-beta/typescript/package.json b/sdk/datalake-analytics/arm-datalake-analytics/samples/v2-beta/typescript/package.json index 0386abc68d74..7c0dd52b9db0 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/samples/v2-beta/typescript/package.json +++ b/sdk/datalake-analytics/arm-datalake-analytics/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/datamigration/arm-datamigration/package.json b/sdk/datamigration/arm-datamigration/package.json index dc414fadfbdf..86ce1d033f0e 100644 --- a/sdk/datamigration/arm-datamigration/package.json +++ b/sdk/datamigration/arm-datamigration/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datamigration/arm-datamigration", "repository": { diff --git a/sdk/datamigration/arm-datamigration/samples/v3-beta/typescript/package.json b/sdk/datamigration/arm-datamigration/samples/v3-beta/typescript/package.json index 60b4d64f7f25..10d69d625cc3 100644 --- a/sdk/datamigration/arm-datamigration/samples/v3-beta/typescript/package.json +++ b/sdk/datamigration/arm-datamigration/samples/v3-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/dataprotection/arm-dataprotection/package.json b/sdk/dataprotection/arm-dataprotection/package.json index 639bc6774847..b7218afbdf8f 100644 --- a/sdk/dataprotection/arm-dataprotection/package.json +++ b/sdk/dataprotection/arm-dataprotection/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/dataprotection/arm-dataprotection/samples/v2/typescript/package.json b/sdk/dataprotection/arm-dataprotection/samples/v2/typescript/package.json index 1e537dd8644a..700cb7036d80 100644 --- a/sdk/dataprotection/arm-dataprotection/samples/v2/typescript/package.json +++ b/sdk/dataprotection/arm-dataprotection/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/defendereasm/arm-defendereasm/package.json b/sdk/defendereasm/arm-defendereasm/package.json index eb6476f9fbe1..a28a783906fa 100644 --- a/sdk/defendereasm/arm-defendereasm/package.json +++ b/sdk/defendereasm/arm-defendereasm/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/defendereasm/arm-defendereasm/samples/v1-beta/typescript/package.json b/sdk/defendereasm/arm-defendereasm/samples/v1-beta/typescript/package.json index dd0159cf000f..fce37f6ba961 100644 --- a/sdk/defendereasm/arm-defendereasm/samples/v1-beta/typescript/package.json +++ b/sdk/defendereasm/arm-defendereasm/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/deploymentmanager/arm-deploymentmanager/package.json b/sdk/deploymentmanager/arm-deploymentmanager/package.json index d705c317f5d2..9a52a6597ac8 100644 --- a/sdk/deploymentmanager/arm-deploymentmanager/package.json +++ b/sdk/deploymentmanager/arm-deploymentmanager/package.json @@ -37,7 +37,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deploymentmanager/arm-deploymentmanager", "repository": { diff --git a/sdk/deploymentmanager/arm-deploymentmanager/samples/v4-beta/typescript/package.json b/sdk/deploymentmanager/arm-deploymentmanager/samples/v4-beta/typescript/package.json index 8dc0bbd8e0fa..bf70e910b758 100644 --- a/sdk/deploymentmanager/arm-deploymentmanager/samples/v4-beta/typescript/package.json +++ b/sdk/deploymentmanager/arm-deploymentmanager/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/package.json b/sdk/desktopvirtualization/arm-desktopvirtualization/package.json index 2fe39e3ce785..35372717112f 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/package.json +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/samples/v1/typescript/package.json b/sdk/desktopvirtualization/arm-desktopvirtualization/samples/v1/typescript/package.json index 443d2a476d67..31165a840f74 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/samples/v1/typescript/package.json +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/devcenter/arm-devcenter/package.json b/sdk/devcenter/arm-devcenter/package.json index 92d4a2d0bc09..608cbbbdd210 100644 --- a/sdk/devcenter/arm-devcenter/package.json +++ b/sdk/devcenter/arm-devcenter/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/devcenter/arm-devcenter/samples/v1/typescript/package.json b/sdk/devcenter/arm-devcenter/samples/v1/typescript/package.json index 4bb747af97c2..853c29d41c06 100644 --- a/sdk/devcenter/arm-devcenter/samples/v1/typescript/package.json +++ b/sdk/devcenter/arm-devcenter/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/devcenter/developer-devcenter-rest/package.json b/sdk/devcenter/developer-devcenter-rest/package.json index b84d2b6e8786..c3b63dd65fd2 100644 --- a/sdk/devcenter/developer-devcenter-rest/package.json +++ b/sdk/devcenter/developer-devcenter-rest/package.json @@ -78,7 +78,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "scripts": { diff --git a/sdk/devcenter/developer-devcenter-rest/samples/v1-beta/typescript/package.json b/sdk/devcenter/developer-devcenter-rest/samples/v1-beta/typescript/package.json index 71ab8fabe495..050457dd5a21 100644 --- a/sdk/devcenter/developer-devcenter-rest/samples/v1-beta/typescript/package.json +++ b/sdk/devcenter/developer-devcenter-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/devcenter/developer-devcenter-rest/samples/v1/typescript/package.json b/sdk/devcenter/developer-devcenter-rest/samples/v1/typescript/package.json index ce39b126ddbb..a37ca5dbeaca 100644 --- a/sdk/devcenter/developer-devcenter-rest/samples/v1/typescript/package.json +++ b/sdk/devcenter/developer-devcenter-rest/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/devhub/arm-devhub/package.json b/sdk/devhub/arm-devhub/package.json index c20ba21764dc..3af5c000d4ac 100644 --- a/sdk/devhub/arm-devhub/package.json +++ b/sdk/devhub/arm-devhub/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/devhub/arm-devhub/samples/v1-beta/typescript/package.json b/sdk/devhub/arm-devhub/samples/v1-beta/typescript/package.json index abb864d2bc87..4bd842c044d6 100644 --- a/sdk/devhub/arm-devhub/samples/v1-beta/typescript/package.json +++ b/sdk/devhub/arm-devhub/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json index 8b6fae841e1e..d2c41b25564d 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/samples/v5/typescript/package.json b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/samples/v5/typescript/package.json index 948c54528ee7..4978167468a6 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/samples/v5/typescript/package.json +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/samples/v6-beta/typescript/package.json b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/samples/v6-beta/typescript/package.json index c4304c9c411d..00dec19b5f24 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/samples/v6-beta/typescript/package.json +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/samples/v6-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/deviceregistry/arm-deviceregistry/package.json b/sdk/deviceregistry/arm-deviceregistry/package.json index bd719446a60a..d043095db8f8 100644 --- a/sdk/deviceregistry/arm-deviceregistry/package.json +++ b/sdk/deviceregistry/arm-deviceregistry/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/package.json b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/package.json index a27fd3093f6b..5b4de3351c5a 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/package.json +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/deviceupdate/arm-deviceupdate/package.json b/sdk/deviceupdate/arm-deviceupdate/package.json index 6a141439cbb5..0e08d7bf2a49 100644 --- a/sdk/deviceupdate/arm-deviceupdate/package.json +++ b/sdk/deviceupdate/arm-deviceupdate/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/deviceupdate/arm-deviceupdate/samples/v1/typescript/package.json b/sdk/deviceupdate/arm-deviceupdate/samples/v1/typescript/package.json index 40f88f5a5440..eb1e80af19e8 100644 --- a/sdk/deviceupdate/arm-deviceupdate/samples/v1/typescript/package.json +++ b/sdk/deviceupdate/arm-deviceupdate/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/deviceupdate/iot-device-update-rest/package.json b/sdk/deviceupdate/iot-device-update-rest/package.json index 48d8e088c094..dd3df1ba5eb4 100644 --- a/sdk/deviceupdate/iot-device-update-rest/package.json +++ b/sdk/deviceupdate/iot-device-update-rest/package.json @@ -98,7 +98,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "type": "module", diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/package.json b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/package.json index 149d0f6f1607..64e594b679f4 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/package.json +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@types/uuid": "^8.0.0", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/devopsinfrastructure/arm-devopsinfrastructure/package.json b/sdk/devopsinfrastructure/arm-devopsinfrastructure/package.json index c842c7c1b6cb..e3883098ae40 100644 --- a/sdk/devopsinfrastructure/arm-devopsinfrastructure/package.json +++ b/sdk/devopsinfrastructure/arm-devopsinfrastructure/package.json @@ -72,7 +72,7 @@ "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", "eslint": "^8.55.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "tshy": "^2.0.0", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", diff --git a/sdk/devopsinfrastructure/arm-devopsinfrastructure/samples/v1/typescript/package.json b/sdk/devopsinfrastructure/arm-devopsinfrastructure/samples/v1/typescript/package.json index 677f0ba8dc42..cf221cfcbba0 100644 --- a/sdk/devopsinfrastructure/arm-devopsinfrastructure/samples/v1/typescript/package.json +++ b/sdk/devopsinfrastructure/arm-devopsinfrastructure/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/devspaces/arm-devspaces/package.json b/sdk/devspaces/arm-devspaces/package.json index 938f10cdd67e..cf87b17cc6e2 100644 --- a/sdk/devspaces/arm-devspaces/package.json +++ b/sdk/devspaces/arm-devspaces/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devspaces/arm-devspaces", "repository": { diff --git a/sdk/devspaces/arm-devspaces/samples/v2/typescript/package.json b/sdk/devspaces/arm-devspaces/samples/v2/typescript/package.json index ce0a1ef50cd3..ec04ae3f18d1 100644 --- a/sdk/devspaces/arm-devspaces/samples/v2/typescript/package.json +++ b/sdk/devspaces/arm-devspaces/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/devtestlabs/arm-devtestlabs/package.json b/sdk/devtestlabs/arm-devtestlabs/package.json index 0f784c50ac19..458156f07470 100644 --- a/sdk/devtestlabs/arm-devtestlabs/package.json +++ b/sdk/devtestlabs/arm-devtestlabs/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devtestlabs/arm-devtestlabs", "repository": { diff --git a/sdk/devtestlabs/arm-devtestlabs/samples/v4/typescript/package.json b/sdk/devtestlabs/arm-devtestlabs/samples/v4/typescript/package.json index 0c37beb3560f..93c3ece843a3 100644 --- a/sdk/devtestlabs/arm-devtestlabs/samples/v4/typescript/package.json +++ b/sdk/devtestlabs/arm-devtestlabs/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/digitaltwins/arm-digitaltwins/package.json b/sdk/digitaltwins/arm-digitaltwins/package.json index ddd84d201cc7..d3c9aa62eef1 100644 --- a/sdk/digitaltwins/arm-digitaltwins/package.json +++ b/sdk/digitaltwins/arm-digitaltwins/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/digitaltwins/arm-digitaltwins/samples/v3/typescript/package.json b/sdk/digitaltwins/arm-digitaltwins/samples/v3/typescript/package.json index c25ceced7fd8..78d99d43b788 100644 --- a/sdk/digitaltwins/arm-digitaltwins/samples/v3/typescript/package.json +++ b/sdk/digitaltwins/arm-digitaltwins/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/digitaltwins/digital-twins-core/package.json b/sdk/digitaltwins/digital-twins-core/package.json index 62cbd0e2e7e9..cab4fc194f34 100644 --- a/sdk/digitaltwins/digital-twins-core/package.json +++ b/sdk/digitaltwins/digital-twins-core/package.json @@ -79,7 +79,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "sideEffects": false, diff --git a/sdk/digitaltwins/digital-twins-core/samples/v1/typescript/package.json b/sdk/digitaltwins/digital-twins-core/samples/v1/typescript/package.json index f6f8e8f7d918..72e91701b220 100644 --- a/sdk/digitaltwins/digital-twins-core/samples/v1/typescript/package.json +++ b/sdk/digitaltwins/digital-twins-core/samples/v1/typescript/package.json @@ -39,7 +39,7 @@ "uuid": "^8.3.0" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/digitaltwins/digital-twins-core/samples/v2/typescript/package.json b/sdk/digitaltwins/digital-twins-core/samples/v2/typescript/package.json index 8284ccdc8cd5..1d597c0c4752 100644 --- a/sdk/digitaltwins/digital-twins-core/samples/v2/typescript/package.json +++ b/sdk/digitaltwins/digital-twins-core/samples/v2/typescript/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@types/uuid": "^8.0.0", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/dns/arm-dns-profile-2020-09-01-hybrid/package.json b/sdk/dns/arm-dns-profile-2020-09-01-hybrid/package.json index b97bb8e72287..1abf6178d6fb 100644 --- a/sdk/dns/arm-dns-profile-2020-09-01-hybrid/package.json +++ b/sdk/dns/arm-dns-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/dns/arm-dns/package.json b/sdk/dns/arm-dns/package.json index 08365e355d89..388395592f54 100644 --- a/sdk/dns/arm-dns/package.json +++ b/sdk/dns/arm-dns/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-dns.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/dns/arm-dns/samples/v5-beta/typescript/package.json b/sdk/dns/arm-dns/samples/v5-beta/typescript/package.json index 6bcd00becee3..dc3739dc0e73 100644 --- a/sdk/dns/arm-dns/samples/v5-beta/typescript/package.json +++ b/sdk/dns/arm-dns/samples/v5-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/dnsresolver/arm-dnsresolver/package.json b/sdk/dnsresolver/arm-dnsresolver/package.json index bc47838ea563..15c1ef9ecb05 100644 --- a/sdk/dnsresolver/arm-dnsresolver/package.json +++ b/sdk/dnsresolver/arm-dnsresolver/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-dnsresolver.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/dnsresolver/arm-dnsresolver/samples/v1-beta/typescript/package.json b/sdk/dnsresolver/arm-dnsresolver/samples/v1-beta/typescript/package.json index ea36a8aea398..86475a662dd8 100644 --- a/sdk/dnsresolver/arm-dnsresolver/samples/v1-beta/typescript/package.json +++ b/sdk/dnsresolver/arm-dnsresolver/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/documentintelligence/ai-document-intelligence-rest/samples/v1/typescript/package.json b/sdk/documentintelligence/ai-document-intelligence-rest/samples/v1/typescript/package.json index 1fa565eddd7a..14f2b688cf87 100644 --- a/sdk/documentintelligence/ai-document-intelligence-rest/samples/v1/typescript/package.json +++ b/sdk/documentintelligence/ai-document-intelligence-rest/samples/v1/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/documenttranslator/ai-document-translator-rest/package.json b/sdk/documenttranslator/ai-document-translator-rest/package.json index 2970b0ce7909..a3005c879571 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/package.json +++ b/sdk/documenttranslator/ai-document-translator-rest/package.json @@ -101,7 +101,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "type": "module", diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1/typescript/package.json b/sdk/documenttranslator/ai-document-translator-rest/samples/v1/typescript/package.json index 8014ff3694e9..b209d7a24565 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/samples/v1/typescript/package.json +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1/typescript/package.json @@ -34,7 +34,7 @@ "dotenv": "latest" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/domainservices/arm-domainservices/package.json b/sdk/domainservices/arm-domainservices/package.json index c1948c3cd0f3..50f199a95c2e 100644 --- a/sdk/domainservices/arm-domainservices/package.json +++ b/sdk/domainservices/arm-domainservices/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/domainservices/arm-domainservices", "repository": { diff --git a/sdk/domainservices/arm-domainservices/samples/v4/typescript/package.json b/sdk/domainservices/arm-domainservices/samples/v4/typescript/package.json index 9f1734b66d1e..9616b09a1396 100644 --- a/sdk/domainservices/arm-domainservices/samples/v4/typescript/package.json +++ b/sdk/domainservices/arm-domainservices/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/dynatrace/arm-dynatrace/package.json b/sdk/dynatrace/arm-dynatrace/package.json index 15bae1c8b25d..1a81dd567133 100644 --- a/sdk/dynatrace/arm-dynatrace/package.json +++ b/sdk/dynatrace/arm-dynatrace/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/dynatrace/arm-dynatrace/samples/v2/typescript/package.json b/sdk/dynatrace/arm-dynatrace/samples/v2/typescript/package.json index 6256f8c46636..1b692832cbe5 100644 --- a/sdk/dynatrace/arm-dynatrace/samples/v2/typescript/package.json +++ b/sdk/dynatrace/arm-dynatrace/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/easm/defender-easm-rest/package.json b/sdk/easm/defender-easm-rest/package.json index 2f28388f8548..a0e2c9896b51 100644 --- a/sdk/easm/defender-easm-rest/package.json +++ b/sdk/easm/defender-easm-rest/package.json @@ -77,7 +77,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.6" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/easm/defender-easm-rest/README.md", diff --git a/sdk/easm/defender-easm-rest/samples/v1-beta/typescript/package.json b/sdk/easm/defender-easm-rest/samples/v1-beta/typescript/package.json index 30d8a4b0cf5b..ef312f6399c8 100644 --- a/sdk/easm/defender-easm-rest/samples/v1-beta/typescript/package.json +++ b/sdk/easm/defender-easm-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^14.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/edgezones/arm-edgezones/package.json b/sdk/edgezones/arm-edgezones/package.json index 1f8c15e36419..8e4c088a6123 100644 --- a/sdk/edgezones/arm-edgezones/package.json +++ b/sdk/edgezones/arm-edgezones/package.json @@ -69,7 +69,7 @@ "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "tshy": "^2.0.0", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", diff --git a/sdk/education/arm-education/package.json b/sdk/education/arm-education/package.json index 5a98b786971c..2442b58fb891 100644 --- a/sdk/education/arm-education/package.json +++ b/sdk/education/arm-education/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/education/arm-education/samples/v1-beta/typescript/package.json b/sdk/education/arm-education/samples/v1-beta/typescript/package.json index c49a80085747..69a6b2a151f6 100644 --- a/sdk/education/arm-education/samples/v1-beta/typescript/package.json +++ b/sdk/education/arm-education/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/elastic/arm-elastic/package.json b/sdk/elastic/arm-elastic/package.json index 35c5593dfbf9..dd7833ceb9b7 100644 --- a/sdk/elastic/arm-elastic/package.json +++ b/sdk/elastic/arm-elastic/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-elastic.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/elastic/arm-elastic/samples/v1/typescript/package.json b/sdk/elastic/arm-elastic/samples/v1/typescript/package.json index 6860ccfed362..f3c1108b7554 100644 --- a/sdk/elastic/arm-elastic/samples/v1/typescript/package.json +++ b/sdk/elastic/arm-elastic/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/elasticsans/arm-elasticsan/package.json b/sdk/elasticsans/arm-elasticsan/package.json index a7f753d3cd56..25b694e7209b 100644 --- a/sdk/elasticsans/arm-elasticsan/package.json +++ b/sdk/elasticsans/arm-elasticsan/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-elasticsan.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/package.json b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/package.json index 6c33f4fbd489..aaa32af3cd17 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/package.json +++ b/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/elasticsans/arm-elasticsan/samples/v1/typescript/package.json b/sdk/elasticsans/arm-elasticsan/samples/v1/typescript/package.json index d8b231b0cea9..22fff0f1a7a0 100644 --- a/sdk/elasticsans/arm-elasticsan/samples/v1/typescript/package.json +++ b/sdk/elasticsans/arm-elasticsan/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/entra/functions-authentication-events/package.json b/sdk/entra/functions-authentication-events/package.json index e4b8cb5378de..f2e45fb522a1 100644 --- a/sdk/entra/functions-authentication-events/package.json +++ b/sdk/entra/functions-authentication-events/package.json @@ -71,7 +71,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "//sampleConfiguration": { diff --git a/sdk/eventgrid/arm-eventgrid/package.json b/sdk/eventgrid/arm-eventgrid/package.json index e17c3fd5d3a8..44f1b82ff1ef 100644 --- a/sdk/eventgrid/arm-eventgrid/package.json +++ b/sdk/eventgrid/arm-eventgrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/package.json b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/package.json index 1f0f9058fdad..0d5388427e17 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/package.json +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventgrid/eventgrid-namespaces/package.json b/sdk/eventgrid/eventgrid-namespaces/package.json index c09f5914bfc9..ee864b90b21e 100644 --- a/sdk/eventgrid/eventgrid-namespaces/package.json +++ b/sdk/eventgrid/eventgrid-namespaces/package.json @@ -91,7 +91,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.6" }, "type": "module", diff --git a/sdk/eventgrid/eventgrid-namespaces/samples/v1-beta/typescript/package.json b/sdk/eventgrid/eventgrid-namespaces/samples/v1-beta/typescript/package.json index 3aef208e0c33..3d1ea157ddc0 100644 --- a/sdk/eventgrid/eventgrid-namespaces/samples/v1-beta/typescript/package.json +++ b/sdk/eventgrid/eventgrid-namespaces/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventgrid/eventgrid-namespaces/samples/v1/typescript/package.json b/sdk/eventgrid/eventgrid-namespaces/samples/v1/typescript/package.json index 0c81a9b40596..0e9bc138144f 100644 --- a/sdk/eventgrid/eventgrid-namespaces/samples/v1/typescript/package.json +++ b/sdk/eventgrid/eventgrid-namespaces/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventgrid/eventgrid-system-events/package.json b/sdk/eventgrid/eventgrid-system-events/package.json index 8df115c7c453..468e27026a15 100644 --- a/sdk/eventgrid/eventgrid-system-events/package.json +++ b/sdk/eventgrid/eventgrid-system-events/package.json @@ -72,7 +72,7 @@ "@vitest/coverage-istanbul": "^2.1.6", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.6" }, "type": "module", diff --git a/sdk/eventgrid/eventgrid/package.json b/sdk/eventgrid/eventgrid/package.json index 4bc60aa29dcd..fe6ed41820e3 100644 --- a/sdk/eventgrid/eventgrid/package.json +++ b/sdk/eventgrid/eventgrid/package.json @@ -106,7 +106,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.6" }, "type": "module", diff --git a/sdk/eventgrid/eventgrid/samples/v4/typescript/package.json b/sdk/eventgrid/eventgrid/samples/v4/typescript/package.json index 1b2d628cdbde..962c60d8ad21 100644 --- a/sdk/eventgrid/eventgrid/samples/v4/typescript/package.json +++ b/sdk/eventgrid/eventgrid/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ "@azure/service-bus": "^7.0.0" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventgrid/perf-tests/eventgrid/package.json b/sdk/eventgrid/perf-tests/eventgrid/package.json index e152703273e1..f06e6d030a13 100644 --- a/sdk/eventgrid/perf-tests/eventgrid/package.json +++ b/sdk/eventgrid/perf-tests/eventgrid/package.json @@ -18,7 +18,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid/package.json b/sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid/package.json index 436ae7c323e8..9ff2870e756e 100644 --- a/sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid/package.json +++ b/sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index e9808950dfcb..decb1dc9904c 100644 --- a/sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventhub/arm-eventhub/package.json b/sdk/eventhub/arm-eventhub/package.json index 186bb5bfb6af..bdac996e676a 100644 --- a/sdk/eventhub/arm-eventhub/package.json +++ b/sdk/eventhub/arm-eventhub/package.json @@ -42,7 +42,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/eventhub/arm-eventhub/samples/v5/typescript/package.json b/sdk/eventhub/arm-eventhub/samples/v5/typescript/package.json index 152f7722a0ef..53f6073e3811 100644 --- a/sdk/eventhub/arm-eventhub/samples/v5/typescript/package.json +++ b/sdk/eventhub/arm-eventhub/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventhub/event-hubs/package.json b/sdk/eventhub/event-hubs/package.json index 6828f378e188..b626a4dbdb55 100644 --- a/sdk/eventhub/event-hubs/package.json +++ b/sdk/eventhub/event-hubs/package.json @@ -140,7 +140,7 @@ "https-proxy-agent": "^7.0.0", "playwright": "^1.45.3", "tsx": "^4.16.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5", "ws": "^8.2.0" }, diff --git a/sdk/eventhub/event-hubs/samples-express/package.json b/sdk/eventhub/event-hubs/samples-express/package.json index 6ad0e0401fa8..d2fb752680cd 100644 --- a/sdk/eventhub/event-hubs/samples-express/package.json +++ b/sdk/eventhub/event-hubs/samples-express/package.json @@ -41,6 +41,6 @@ "@types/express": "^4.17.21", "@types/node": "^18.0.0", "rimraf": "^5.0.5", - "typescript": "~5.6.2" + "typescript": "~5.7.2" } } diff --git a/sdk/eventhub/event-hubs/samples/v5-beta/express/package.json b/sdk/eventhub/event-hubs/samples/v5-beta/express/package.json index b339f1ceda53..19f3b3f3c759 100644 --- a/sdk/eventhub/event-hubs/samples/v5-beta/express/package.json +++ b/sdk/eventhub/event-hubs/samples/v5-beta/express/package.json @@ -40,6 +40,6 @@ "@types/express": "^4.17.21", "@types/node": "^18.0.0", "rimraf": "^5.0.5", - "typescript": "~5.6.2" + "typescript": "~5.7.2" } } diff --git a/sdk/eventhub/event-hubs/samples/v5-beta/typescript/package.json b/sdk/eventhub/event-hubs/samples/v5-beta/typescript/package.json index 003dbfd75146..f4f7c1cc1335 100644 --- a/sdk/eventhub/event-hubs/samples/v5-beta/typescript/package.json +++ b/sdk/eventhub/event-hubs/samples/v5-beta/typescript/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@types/ws": "^7.2.4", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventhub/event-hubs/samples/v5/express/package.json b/sdk/eventhub/event-hubs/samples/v5/express/package.json index 6ad0e0401fa8..d2fb752680cd 100644 --- a/sdk/eventhub/event-hubs/samples/v5/express/package.json +++ b/sdk/eventhub/event-hubs/samples/v5/express/package.json @@ -41,6 +41,6 @@ "@types/express": "^4.17.21", "@types/node": "^18.0.0", "rimraf": "^5.0.5", - "typescript": "~5.6.2" + "typescript": "~5.7.2" } } diff --git a/sdk/eventhub/event-hubs/samples/v5/typescript/package.json b/sdk/eventhub/event-hubs/samples/v5/typescript/package.json index 5db5c075afae..0aef5891184f 100644 --- a/sdk/eventhub/event-hubs/samples/v5/typescript/package.json +++ b/sdk/eventhub/event-hubs/samples/v5/typescript/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@types/ws": "^7.2.4", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventhub/event-hubs/test/stress/app/package.json b/sdk/eventhub/event-hubs/test/stress/app/package.json index b96516bb70be..4fc0e3a1802c 100644 --- a/sdk/eventhub/event-hubs/test/stress/app/package.json +++ b/sdk/eventhub/event-hubs/test/stress/app/package.json @@ -24,6 +24,6 @@ "@types/minimist": "^1.2.1", "@types/node": "^18.0.0", "@types/uuid": "^8.3.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" } } diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/package.json b/sdk/eventhub/eventhubs-checkpointstore-blob/package.json index 73ceb82d6f3a..656e461c71a7 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/package.json +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/package.json @@ -102,7 +102,7 @@ "process": "^0.11.10", "stream": "^0.0.3", "tsx": "^4.16.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//sampleConfiguration": { diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/v1-beta/typescript/package.json b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/v1-beta/typescript/package.json index e1446b8850aa..10a9d5a4abc6 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/v1-beta/typescript/package.json +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/v1/typescript/package.json b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/v1/typescript/package.json index 12267d23547b..de8d4446b2ce 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/samples/v1/typescript/package.json +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventhub/eventhubs-checkpointstore-table/package.json b/sdk/eventhub/eventhubs-checkpointstore-table/package.json index eb59d0264148..a4fe15e5bf71 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-table/package.json +++ b/sdk/eventhub/eventhubs-checkpointstore-table/package.json @@ -98,7 +98,7 @@ "playwright": "^1.45.3", "process": "^0.11.10", "stream": "^0.0.3", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//sampleConfiguration": { diff --git a/sdk/eventhub/mock-hub/package.json b/sdk/eventhub/mock-hub/package.json index f6b0b553dd5f..f2aeeece5ee8 100644 --- a/sdk/eventhub/mock-hub/package.json +++ b/sdk/eventhub/mock-hub/package.json @@ -68,7 +68,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.45.3", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "dependencies": { diff --git a/sdk/eventhub/mock-hub/samples/v1/typescript/package.json b/sdk/eventhub/mock-hub/samples/v1/typescript/package.json index 3f9a4a0e2490..c0490be7b3de 100644 --- a/sdk/eventhub/mock-hub/samples/v1/typescript/package.json +++ b/sdk/eventhub/mock-hub/samples/v1/typescript/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/eventhub/perf-tests/event-hubs-track-1/package.json b/sdk/eventhub/perf-tests/event-hubs-track-1/package.json index e5f73c1833fc..98fcc1bebceb 100644 --- a/sdk/eventhub/perf-tests/event-hubs-track-1/package.json +++ b/sdk/eventhub/perf-tests/event-hubs-track-1/package.json @@ -21,7 +21,7 @@ "eslint": "^9.9.0", "ts-node": "^8.3.0", "tslib": "^2.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/eventhub/perf-tests/event-hubs/package.json b/sdk/eventhub/perf-tests/event-hubs/package.json index ccbfcf86593f..82ab3dd3d7d6 100644 --- a/sdk/eventhub/perf-tests/event-hubs/package.json +++ b/sdk/eventhub/perf-tests/event-hubs/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "private": true, diff --git a/sdk/extendedlocation/arm-extendedlocation/package.json b/sdk/extendedlocation/arm-extendedlocation/package.json index 21d4a052d726..c16f548db3c5 100644 --- a/sdk/extendedlocation/arm-extendedlocation/package.json +++ b/sdk/extendedlocation/arm-extendedlocation/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/extendedlocation/arm-extendedlocation/samples/v1-beta/typescript/package.json b/sdk/extendedlocation/arm-extendedlocation/samples/v1-beta/typescript/package.json index 48730d3d3921..ccec10a0d7b2 100644 --- a/sdk/extendedlocation/arm-extendedlocation/samples/v1-beta/typescript/package.json +++ b/sdk/extendedlocation/arm-extendedlocation/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/fabric/arm-fabric/package.json b/sdk/fabric/arm-fabric/package.json index 808b9768105e..68c8fc67f7eb 100644 --- a/sdk/fabric/arm-fabric/package.json +++ b/sdk/fabric/arm-fabric/package.json @@ -71,7 +71,7 @@ "@types/node": "^18.0.0", "eslint": "^9.9.0", "prettier": "^3.2.5", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", "@vitest/coverage-istanbul": "^2.0.5", diff --git a/sdk/fabric/arm-fabric/samples/v1-beta/typescript/package.json b/sdk/fabric/arm-fabric/samples/v1-beta/typescript/package.json index 15a914c0dc52..724a118dbdbd 100644 --- a/sdk/fabric/arm-fabric/samples/v1-beta/typescript/package.json +++ b/sdk/fabric/arm-fabric/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/fabric/arm-fabric/samples/v1/typescript/package.json b/sdk/fabric/arm-fabric/samples/v1/typescript/package.json index 2149ef8e2037..4e15d5585864 100644 --- a/sdk/fabric/arm-fabric/samples/v1/typescript/package.json +++ b/sdk/fabric/arm-fabric/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/face/ai-vision-face-rest/package.json b/sdk/face/ai-vision-face-rest/package.json index b1abe641de03..e6f81fea967a 100644 --- a/sdk/face/ai-vision-face-rest/package.json +++ b/sdk/face/ai-vision-face-rest/package.json @@ -70,7 +70,7 @@ "@types/node": "^18.0.0", "eslint": "^9.9.0", "prettier": "^3.2.5", - "typescript": "~5.6.3", + "typescript": "~5.7.2", "tshy": "^1.11.1", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", diff --git a/sdk/face/ai-vision-face-rest/samples/v1-beta/typescript/package.json b/sdk/face/ai-vision-face-rest/samples/v1-beta/typescript/package.json index 0f1ed1a6b0d3..9b75deaecde8 100644 --- a/sdk/face/ai-vision-face-rest/samples/v1-beta/typescript/package.json +++ b/sdk/face/ai-vision-face-rest/samples/v1-beta/typescript/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/features/arm-features/package.json b/sdk/features/arm-features/package.json index fbc5ff19a90f..5719430ccce8 100644 --- a/sdk/features/arm-features/package.json +++ b/sdk/features/arm-features/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/features/arm-features", "repository": { diff --git a/sdk/features/arm-features/samples/v3/typescript/package.json b/sdk/features/arm-features/samples/v3/typescript/package.json index 7781da4f26ee..6eea03d620d3 100644 --- a/sdk/features/arm-features/samples/v3/typescript/package.json +++ b/sdk/features/arm-features/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/fluidrelay/arm-fluidrelay/package.json b/sdk/fluidrelay/arm-fluidrelay/package.json index 92a71d500e18..17b85aec0bad 100644 --- a/sdk/fluidrelay/arm-fluidrelay/package.json +++ b/sdk/fluidrelay/arm-fluidrelay/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/fluidrelay/arm-fluidrelay/samples/v1/typescript/package.json b/sdk/fluidrelay/arm-fluidrelay/samples/v1/typescript/package.json index db4e60a3ec35..fb548d0eb936 100644 --- a/sdk/fluidrelay/arm-fluidrelay/samples/v1/typescript/package.json +++ b/sdk/fluidrelay/arm-fluidrelay/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/formrecognizer/ai-form-recognizer/package.json b/sdk/formrecognizer/ai-form-recognizer/package.json index a2eade8722b6..27425d1d2371 100644 --- a/sdk/formrecognizer/ai-form-recognizer/package.json +++ b/sdk/formrecognizer/ai-form-recognizer/package.json @@ -101,7 +101,7 @@ "playwright": "^1.49.0", "prettier": "^3.3.3", "rollup": "^4.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.6" }, "//sampleConfiguration": { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/v3/typescript/package.json b/sdk/formrecognizer/ai-form-recognizer/samples/v3/typescript/package.json index 7d03b3962e74..df7f68694e55 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/v3/typescript/package.json +++ b/sdk/formrecognizer/ai-form-recognizer/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ "@azure/identity": "^4.2.1" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/v4-beta/typescript/package.json b/sdk/formrecognizer/ai-form-recognizer/samples/v4-beta/typescript/package.json index 58ee2c823954..b18fd38e5e01 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/v4-beta/typescript/package.json +++ b/sdk/formrecognizer/ai-form-recognizer/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/v4/typescript/package.json b/sdk/formrecognizer/ai-form-recognizer/samples/v4/typescript/package.json index d1de070d8f49..2e0f13b40ad0 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/v4/typescript/package.json +++ b/sdk/formrecognizer/ai-form-recognizer/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/v5/typescript/package.json b/sdk/formrecognizer/ai-form-recognizer/samples/v5/typescript/package.json index 36d29239d56c..68603d352fd3 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/v5/typescript/package.json +++ b/sdk/formrecognizer/ai-form-recognizer/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/formrecognizer/perf-tests/ai-form-recognizer/package.json b/sdk/formrecognizer/perf-tests/ai-form-recognizer/package.json index f12feac5329d..8045a665925b 100644 --- a/sdk/formrecognizer/perf-tests/ai-form-recognizer/package.json +++ b/sdk/formrecognizer/perf-tests/ai-form-recognizer/package.json @@ -20,7 +20,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "scripts": { "build": "npm run clean && dev-tool run build-package", diff --git a/sdk/frontdoor/arm-frontdoor/package.json b/sdk/frontdoor/arm-frontdoor/package.json index 246ccefbf615..0bf85ba3240c 100644 --- a/sdk/frontdoor/arm-frontdoor/package.json +++ b/sdk/frontdoor/arm-frontdoor/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/frontdoor/arm-frontdoor/samples/v5/typescript/package.json b/sdk/frontdoor/arm-frontdoor/samples/v5/typescript/package.json index 849a8730bed2..3eda53cc2fd5 100644 --- a/sdk/frontdoor/arm-frontdoor/samples/v5/typescript/package.json +++ b/sdk/frontdoor/arm-frontdoor/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/graphservices/arm-graphservices/package.json b/sdk/graphservices/arm-graphservices/package.json index fbc19db906aa..9de1918fedc2 100644 --- a/sdk/graphservices/arm-graphservices/package.json +++ b/sdk/graphservices/arm-graphservices/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/graphservices/arm-graphservices/samples/v1/typescript/package.json b/sdk/graphservices/arm-graphservices/samples/v1/typescript/package.json index d0b1b5ac36dd..d07b2a7a297e 100644 --- a/sdk/graphservices/arm-graphservices/samples/v1/typescript/package.json +++ b/sdk/graphservices/arm-graphservices/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/guestconfiguration/arm-guestconfiguration/package.json b/sdk/guestconfiguration/arm-guestconfiguration/package.json index e6c364c1b67b..7bf65b6dd506 100644 --- a/sdk/guestconfiguration/arm-guestconfiguration/package.json +++ b/sdk/guestconfiguration/arm-guestconfiguration/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/guestconfiguration/arm-guestconfiguration/samples/v1-beta/typescript/package.json b/sdk/guestconfiguration/arm-guestconfiguration/samples/v1-beta/typescript/package.json index a2ab12ea3776..2115b1f998aa 100644 --- a/sdk/guestconfiguration/arm-guestconfiguration/samples/v1-beta/typescript/package.json +++ b/sdk/guestconfiguration/arm-guestconfiguration/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/hanaonazure/arm-hanaonazure/package.json b/sdk/hanaonazure/arm-hanaonazure/package.json index 564673c01c78..080c8eb7e156 100644 --- a/sdk/hanaonazure/arm-hanaonazure/package.json +++ b/sdk/hanaonazure/arm-hanaonazure/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hanaonazure/arm-hanaonazure", "repository": { diff --git a/sdk/hanaonazure/arm-hanaonazure/samples/v4-beta/typescript/package.json b/sdk/hanaonazure/arm-hanaonazure/samples/v4-beta/typescript/package.json index bd14bf420ae7..7822a7f2134e 100644 --- a/sdk/hanaonazure/arm-hanaonazure/samples/v4-beta/typescript/package.json +++ b/sdk/hanaonazure/arm-hanaonazure/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/hardwaresecuritymodules/arm-hardwaresecuritymodules/package.json b/sdk/hardwaresecuritymodules/arm-hardwaresecuritymodules/package.json index d5bd36175d8c..954979c92c59 100644 --- a/sdk/hardwaresecuritymodules/arm-hardwaresecuritymodules/package.json +++ b/sdk/hardwaresecuritymodules/arm-hardwaresecuritymodules/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@microsoft/api-extractor": "^7.31.1", "mkdirp": "^3.0.1", - "typescript": "~5.5.3", + "typescript": "~5.7.2", "uglify-js": "^3.4.9", "rimraf": "^5.0.0", "dotenv": "^16.0.0", diff --git a/sdk/hardwaresecuritymodules/arm-hardwaresecuritymodules/samples/v2-beta/typescript/package.json b/sdk/hardwaresecuritymodules/arm-hardwaresecuritymodules/samples/v2-beta/typescript/package.json index 713af94afd3f..9a890bcfe303 100644 --- a/sdk/hardwaresecuritymodules/arm-hardwaresecuritymodules/samples/v2-beta/typescript/package.json +++ b/sdk/hardwaresecuritymodules/arm-hardwaresecuritymodules/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/hdinsight/arm-hdinsight/package.json b/sdk/hdinsight/arm-hdinsight/package.json index 858da4bd5873..677e0045a530 100644 --- a/sdk/hdinsight/arm-hdinsight/package.json +++ b/sdk/hdinsight/arm-hdinsight/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/hdinsight/arm-hdinsight/samples/v1-beta/typescript/package.json b/sdk/hdinsight/arm-hdinsight/samples/v1-beta/typescript/package.json index fafef3346b4d..3d4b2cbab3aa 100644 --- a/sdk/hdinsight/arm-hdinsight/samples/v1-beta/typescript/package.json +++ b/sdk/hdinsight/arm-hdinsight/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/hdinsight/arm-hdinsightcontainers/package.json b/sdk/hdinsight/arm-hdinsightcontainers/package.json index 6ed6dfd1aee3..c61b81116612 100644 --- a/sdk/hdinsight/arm-hdinsightcontainers/package.json +++ b/sdk/hdinsight/arm-hdinsightcontainers/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/package.json b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/package.json index a4b0a9fb8f23..64db0a0df3d2 100644 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/package.json +++ b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/healthbot/arm-healthbot/package.json b/sdk/healthbot/arm-healthbot/package.json index ce06eb179252..e3fe6d3666ad 100644 --- a/sdk/healthbot/arm-healthbot/package.json +++ b/sdk/healthbot/arm-healthbot/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthbot/arm-healthbot", "repository": { diff --git a/sdk/healthbot/arm-healthbot/samples/v2/typescript/package.json b/sdk/healthbot/arm-healthbot/samples/v2/typescript/package.json index 61a49c8a7f2d..6d398eeeea9b 100644 --- a/sdk/healthbot/arm-healthbot/samples/v2/typescript/package.json +++ b/sdk/healthbot/arm-healthbot/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/healthcareapis/arm-healthcareapis/package.json b/sdk/healthcareapis/arm-healthcareapis/package.json index 1911a4b487ac..3307de5735a7 100644 --- a/sdk/healthcareapis/arm-healthcareapis/package.json +++ b/sdk/healthcareapis/arm-healthcareapis/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/healthcareapis/arm-healthcareapis/samples/v3/typescript/package.json b/sdk/healthcareapis/arm-healthcareapis/samples/v3/typescript/package.json index c0825ed7d7af..f8e0fab35e0c 100644 --- a/sdk/healthcareapis/arm-healthcareapis/samples/v3/typescript/package.json +++ b/sdk/healthcareapis/arm-healthcareapis/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/healthdataaiservices/arm-healthdataaiservices/package.json b/sdk/healthdataaiservices/arm-healthdataaiservices/package.json index 0f2dec60df3f..9df80898263d 100644 --- a/sdk/healthdataaiservices/arm-healthdataaiservices/package.json +++ b/sdk/healthdataaiservices/arm-healthdataaiservices/package.json @@ -72,7 +72,7 @@ "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", "eslint": "^8.55.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "tshy": "^2.0.0", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", diff --git a/sdk/healthdataaiservices/arm-healthdataaiservices/samples/v1/typescript/package.json b/sdk/healthdataaiservices/arm-healthdataaiservices/samples/v1/typescript/package.json index 898f07e1f302..1d15e6248783 100644 --- a/sdk/healthdataaiservices/arm-healthdataaiservices/samples/v1/typescript/package.json +++ b/sdk/healthdataaiservices/arm-healthdataaiservices/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/healthdataaiservices/azure-health-deidentification/package.json b/sdk/healthdataaiservices/azure-health-deidentification/package.json index c5d755bc58a8..83ab10ffad05 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/package.json +++ b/sdk/healthdataaiservices/azure-health-deidentification/package.json @@ -89,7 +89,7 @@ "eslint": "^9.9.0", "loupe": "~3.1.1", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "scripts": { diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/v1-beta/typescript/package.json b/sdk/healthdataaiservices/azure-health-deidentification/samples/v1-beta/typescript/package.json index cf24dbdfb56c..fc1ef53485fd 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/v1-beta/typescript/package.json +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/healthinsights/health-insights-cancerprofiling-rest/package.json b/sdk/healthinsights/health-insights-cancerprofiling-rest/package.json index faceda2434ae..3b61e81a5faa 100644 --- a/sdk/healthinsights/health-insights-cancerprofiling-rest/package.json +++ b/sdk/healthinsights/health-insights-cancerprofiling-rest/package.json @@ -80,7 +80,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-cancerprofiling-rest/README.md", diff --git a/sdk/healthinsights/health-insights-cancerprofiling-rest/samples/v1-beta/typescript/package.json b/sdk/healthinsights/health-insights-cancerprofiling-rest/samples/v1-beta/typescript/package.json index 6c2e999d6041..4f52d7adfd30 100644 --- a/sdk/healthinsights/health-insights-cancerprofiling-rest/samples/v1-beta/typescript/package.json +++ b/sdk/healthinsights/health-insights-cancerprofiling-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/healthinsights/health-insights-clinicalmatching-rest/package.json b/sdk/healthinsights/health-insights-clinicalmatching-rest/package.json index 754fd0c3bbab..695e7eabbbca 100644 --- a/sdk/healthinsights/health-insights-clinicalmatching-rest/package.json +++ b/sdk/healthinsights/health-insights-clinicalmatching-rest/package.json @@ -80,7 +80,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-clinicalmatching-rest/README.md", diff --git a/sdk/healthinsights/health-insights-clinicalmatching-rest/samples/v1-beta/typescript/package.json b/sdk/healthinsights/health-insights-clinicalmatching-rest/samples/v1-beta/typescript/package.json index f15d4e5532ef..5d0cebc02b54 100644 --- a/sdk/healthinsights/health-insights-clinicalmatching-rest/samples/v1-beta/typescript/package.json +++ b/sdk/healthinsights/health-insights-clinicalmatching-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/healthinsights/health-insights-radiologyinsights-rest/package.json b/sdk/healthinsights/health-insights-radiologyinsights-rest/package.json index 7a286ab4f0fc..fab74bc2105d 100644 --- a/sdk/healthinsights/health-insights-radiologyinsights-rest/package.json +++ b/sdk/healthinsights/health-insights-radiologyinsights-rest/package.json @@ -80,7 +80,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-radiologyinsights-rest/README.md", diff --git a/sdk/healthinsights/health-insights-radiologyinsights-rest/samples/v1/typescript/package.json b/sdk/healthinsights/health-insights-radiologyinsights-rest/samples/v1/typescript/package.json index aac37c2ffd32..c211450faedc 100644 --- a/sdk/healthinsights/health-insights-radiologyinsights-rest/samples/v1/typescript/package.json +++ b/sdk/healthinsights/health-insights-radiologyinsights-rest/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/hybridcompute/arm-hybridcompute/package.json b/sdk/hybridcompute/arm-hybridcompute/package.json index efa7dfe084d4..05f9f7bb9a33 100644 --- a/sdk/hybridcompute/arm-hybridcompute/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/package.json @@ -29,7 +29,7 @@ "types": "./types/arm-hybridcompute.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/package.json b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/package.json index a1db4d982a7b..a4bef268efb5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/hybridconnectivity/arm-hybridconnectivity/package.json b/sdk/hybridconnectivity/arm-hybridconnectivity/package.json index 94678db9ee1e..0595a857e5d7 100644 --- a/sdk/hybridconnectivity/arm-hybridconnectivity/package.json +++ b/sdk/hybridconnectivity/arm-hybridconnectivity/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/hybridconnectivity/arm-hybridconnectivity/samples/v1/typescript/package.json b/sdk/hybridconnectivity/arm-hybridconnectivity/samples/v1/typescript/package.json index cdea3bbcfb73..47959d5506f1 100644 --- a/sdk/hybridconnectivity/arm-hybridconnectivity/samples/v1/typescript/package.json +++ b/sdk/hybridconnectivity/arm-hybridconnectivity/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/package.json b/sdk/hybridcontainerservice/arm-hybridcontainerservice/package.json index 3975316ee185..ef9d93cb3503 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/package.json +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1/typescript/package.json b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1/typescript/package.json index 8eed8e1051c2..8c518b7eb847 100644 --- a/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1/typescript/package.json +++ b/sdk/hybridcontainerservice/arm-hybridcontainerservice/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/hybridkubernetes/arm-hybridkubernetes/package.json b/sdk/hybridkubernetes/arm-hybridkubernetes/package.json index 468ec4889c00..5ae4e9dc6ce5 100644 --- a/sdk/hybridkubernetes/arm-hybridkubernetes/package.json +++ b/sdk/hybridkubernetes/arm-hybridkubernetes/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridkubernetes/arm-hybridkubernetes", "repository": { diff --git a/sdk/hybridkubernetes/arm-hybridkubernetes/samples/v2/typescript/package.json b/sdk/hybridkubernetes/arm-hybridkubernetes/samples/v2/typescript/package.json index 0793ff21e237..ddff7ac924d0 100644 --- a/sdk/hybridkubernetes/arm-hybridkubernetes/samples/v2/typescript/package.json +++ b/sdk/hybridkubernetes/arm-hybridkubernetes/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/hybridnetwork/arm-hybridnetwork/package.json b/sdk/hybridnetwork/arm-hybridnetwork/package.json index fa3b7def10b9..609b2b31da1c 100644 --- a/sdk/hybridnetwork/arm-hybridnetwork/package.json +++ b/sdk/hybridnetwork/arm-hybridnetwork/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/hybridnetwork/arm-hybridnetwork/samples/v1-beta/typescript/package.json b/sdk/hybridnetwork/arm-hybridnetwork/samples/v1-beta/typescript/package.json index 973904ee2a2b..57b007868f7d 100644 --- a/sdk/hybridnetwork/arm-hybridnetwork/samples/v1-beta/typescript/package.json +++ b/sdk/hybridnetwork/arm-hybridnetwork/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/identity/identity-broker/package.json b/sdk/identity/identity-broker/package.json index 6e539bc8a04e..ee24088fcab3 100644 --- a/sdk/identity/identity-broker/package.json +++ b/sdk/identity/identity-broker/package.json @@ -76,7 +76,7 @@ "@vitest/coverage-istanbul": "^2.1.4", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//sampleConfiguration": { diff --git a/sdk/identity/identity-broker/samples/v1/typescript/package.json b/sdk/identity/identity-broker/samples/v1/typescript/package.json index aff32c0bdfb3..573d340dd86b 100644 --- a/sdk/identity/identity-broker/samples/v1/typescript/package.json +++ b/sdk/identity/identity-broker/samples/v1/typescript/package.json @@ -38,7 +38,7 @@ "@eslint/js": "^9.9.0", "eslint": "^9.9.0", "typescript-eslint": "~8.16.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "^5.0.0" } } diff --git a/sdk/identity/identity-cache-persistence/package.json b/sdk/identity/identity-cache-persistence/package.json index 684935c60079..5d98d7d1b6b0 100644 --- a/sdk/identity/identity-cache-persistence/package.json +++ b/sdk/identity/identity-cache-persistence/package.json @@ -76,7 +76,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "type": "module", diff --git a/sdk/identity/identity-vscode/package.json b/sdk/identity/identity-vscode/package.json index 707360351349..fdc7e9f0df60 100644 --- a/sdk/identity/identity-vscode/package.json +++ b/sdk/identity/identity-vscode/package.json @@ -71,7 +71,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "type": "module", diff --git a/sdk/identity/identity/integration/AzureFunctions/RunTest/package.json b/sdk/identity/identity/integration/AzureFunctions/RunTest/package.json index 0a2b2e3a03e2..33c315aeca35 100644 --- a/sdk/identity/identity/integration/AzureFunctions/RunTest/package.json +++ b/sdk/identity/identity/integration/AzureFunctions/RunTest/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "npm-run-all": "^4.1.5", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "^5.0.5" } } diff --git a/sdk/identity/identity/integration/AzureWebApps/package.json b/sdk/identity/identity/integration/AzureWebApps/package.json index d93ea4f93cb9..67a1c59851d6 100644 --- a/sdk/identity/identity/integration/AzureWebApps/package.json +++ b/sdk/identity/identity/integration/AzureWebApps/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "npm-run-all": "^4.1.5", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "@types/express": "^4.17.21", "dotenv": "16.4.4", "rimraf": "^5.0.5" diff --git a/sdk/identity/identity/package.json b/sdk/identity/identity/package.json index 3410d347ff38..21e6528a461b 100644 --- a/sdk/identity/identity/package.json +++ b/sdk/identity/identity/package.json @@ -113,7 +113,7 @@ "jsonwebtoken": "^9.0.0", "ms": "^2.1.3", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1", "vitest": "^2.1.4" }, diff --git a/sdk/identity/identity/samples/v2/typescript/package.json b/sdk/identity/identity/samples/v2/typescript/package.json index dacf5acfebe5..63458e797815 100644 --- a/sdk/identity/identity/samples/v2/typescript/package.json +++ b/sdk/identity/identity/samples/v2/typescript/package.json @@ -38,7 +38,7 @@ "@azure/keyvault-keys": "^4.2.0" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/identity/identity/samples/v3/typescript/package.json b/sdk/identity/identity/samples/v3/typescript/package.json index 41e587dff61e..ce531af75a1a 100644 --- a/sdk/identity/identity/samples/v3/typescript/package.json +++ b/sdk/identity/identity/samples/v3/typescript/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/identity/identity/samples/v4/typescript/package.json b/sdk/identity/identity/samples/v4/typescript/package.json index 6ced639573e5..50f433ef100f 100644 --- a/sdk/identity/identity/samples/v4/typescript/package.json +++ b/sdk/identity/identity/samples/v4/typescript/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/identity/identity/test/manual-integration/DevToolsTest/package.json b/sdk/identity/identity/test/manual-integration/DevToolsTest/package.json index 5e415c8560fa..d084fe89e2e0 100644 --- a/sdk/identity/identity/test/manual-integration/DevToolsTest/package.json +++ b/sdk/identity/identity/test/manual-integration/DevToolsTest/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/node": "^14.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/identity/identity/test/manual/interactive-browser-credential/package.json b/sdk/identity/identity/test/manual/interactive-browser-credential/package.json index 691617f059ab..51cd5590c926 100644 --- a/sdk/identity/identity/test/manual/interactive-browser-credential/package.json +++ b/sdk/identity/identity/test/manual/interactive-browser-credential/package.json @@ -31,7 +31,7 @@ "dotenv": "^16.4.7", "os-browserify": "^0.3.0", "ts-loader": "^9.5.1", - "typescript": "^5.7.2", + "typescript": "~5.7.2", "path-browserify": "^1.0.1", "process": "^0.11.10", "webpack": "^5.97.1", diff --git a/sdk/identity/perf-tests/identity/package.json b/sdk/identity/perf-tests/identity/package.json index 044c43a0bd65..3b1cc302f55b 100644 --- a/sdk/identity/perf-tests/identity/package.json +++ b/sdk/identity/perf-tests/identity/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/imagebuilder/arm-imagebuilder/package.json b/sdk/imagebuilder/arm-imagebuilder/package.json index 70a31c66f99f..dca6289ebf65 100644 --- a/sdk/imagebuilder/arm-imagebuilder/package.json +++ b/sdk/imagebuilder/arm-imagebuilder/package.json @@ -42,7 +42,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/imagebuilder/arm-imagebuilder/samples/v4/typescript/package.json b/sdk/imagebuilder/arm-imagebuilder/samples/v4/typescript/package.json index 4dd747050a2b..b8c894b3e9ae 100644 --- a/sdk/imagebuilder/arm-imagebuilder/samples/v4/typescript/package.json +++ b/sdk/imagebuilder/arm-imagebuilder/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/informatica/arm-informaticadatamanagement/package.json b/sdk/informatica/arm-informaticadatamanagement/package.json index ee0db3e079e8..378d32349dda 100644 --- a/sdk/informatica/arm-informaticadatamanagement/package.json +++ b/sdk/informatica/arm-informaticadatamanagement/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/informatica/arm-informaticadatamanagement/samples/v1/typescript/package.json b/sdk/informatica/arm-informaticadatamanagement/samples/v1/typescript/package.json index 893e70a33262..41d61c812894 100644 --- a/sdk/informatica/arm-informaticadatamanagement/samples/v1/typescript/package.json +++ b/sdk/informatica/arm-informaticadatamanagement/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/instrumentation/opentelemetry-instrumentation-azure-sdk/package.json b/sdk/instrumentation/opentelemetry-instrumentation-azure-sdk/package.json index d99b738f64a9..e854f1760d6d 100644 --- a/sdk/instrumentation/opentelemetry-instrumentation-azure-sdk/package.json +++ b/sdk/instrumentation/opentelemetry-instrumentation-azure-sdk/package.json @@ -84,7 +84,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.47.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.1" }, "//sampleConfiguration": { diff --git a/sdk/iot/iot-modelsrepository/package.json b/sdk/iot/iot-modelsrepository/package.json index e3174ae0f8ff..ddb66e3b3a62 100644 --- a/sdk/iot/iot-modelsrepository/package.json +++ b/sdk/iot/iot-modelsrepository/package.json @@ -74,7 +74,7 @@ "@vitest/coverage-istanbul": "^2.1.5", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "standard": { diff --git a/sdk/iot/iot-modelsrepository/samples/v1/typescript/package.json b/sdk/iot/iot-modelsrepository/samples/v1/typescript/package.json index 44cc807239b0..ef5d0ff2673c 100644 --- a/sdk/iot/iot-modelsrepository/samples/v1/typescript/package.json +++ b/sdk/iot/iot-modelsrepository/samples/v1/typescript/package.json @@ -31,7 +31,7 @@ "dotenv": "latest" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/iotcentral/arm-iotcentral/package.json b/sdk/iotcentral/arm-iotcentral/package.json index e586e3cb7017..9c1b144673ba 100644 --- a/sdk/iotcentral/arm-iotcentral/package.json +++ b/sdk/iotcentral/arm-iotcentral/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral", "repository": { diff --git a/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/package.json b/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/package.json index 2e2dd20ff4cb..f8e18c7dbae7 100644 --- a/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/package.json +++ b/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/package.json b/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/package.json index 1cfff5809af1..9378e845bb02 100644 --- a/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/package.json +++ b/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/package.json b/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/package.json index 27c82d3cbf7e..9cc6eff377c4 100644 --- a/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/package.json +++ b/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/package.json b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/package.json index 704e2fce92b1..c6b6ec016751 100644 --- a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/package.json +++ b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index b348e82f05fa..308d8814e64a 100644 --- a/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/iothub/arm-iothub-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/iothub/arm-iothub/package.json b/sdk/iothub/arm-iothub/package.json index 30a27fde3182..91a7ae6ac938 100644 --- a/sdk/iothub/arm-iothub/package.json +++ b/sdk/iothub/arm-iothub/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/iothub/arm-iothub/samples/v6/typescript/package.json b/sdk/iothub/arm-iothub/samples/v6/typescript/package.json index d3c08ce4e299..3a61613b4a3a 100644 --- a/sdk/iothub/arm-iothub/samples/v6/typescript/package.json +++ b/sdk/iothub/arm-iothub/samples/v6/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/iotoperations/arm-iotoperations/package.json b/sdk/iotoperations/arm-iotoperations/package.json index f52cae46cd79..b67fe5d82232 100644 --- a/sdk/iotoperations/arm-iotoperations/package.json +++ b/sdk/iotoperations/arm-iotoperations/package.json @@ -70,7 +70,7 @@ "dotenv": "^16.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", "@vitest/coverage-istanbul": "^2.0.5", diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/package.json b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/package.json index 63e512764eca..62af05572cfc 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/package.json +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/package.json b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/package.json index 29e07875c1ee..d1aa30ec34d7 100644 --- a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/package.json +++ b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index 50b184d905e6..cbf59c17db64 100644 --- a/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/keyvault/arm-keyvault-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/keyvault/arm-keyvault/package.json b/sdk/keyvault/arm-keyvault/package.json index 3f08d6e304ab..f31940386b4f 100644 --- a/sdk/keyvault/arm-keyvault/package.json +++ b/sdk/keyvault/arm-keyvault/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/keyvault/arm-keyvault/samples/v3/typescript/package.json b/sdk/keyvault/arm-keyvault/samples/v3/typescript/package.json index 526567f5aafc..75c9f0cf24bc 100644 --- a/sdk/keyvault/arm-keyvault/samples/v3/typescript/package.json +++ b/sdk/keyvault/arm-keyvault/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/keyvault/keyvault-admin/package.json b/sdk/keyvault/keyvault-admin/package.json index 6bc0fff9d36e..c754c519ec26 100644 --- a/sdk/keyvault/keyvault-admin/package.json +++ b/sdk/keyvault/keyvault-admin/package.json @@ -116,7 +116,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.46.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "type": "module", diff --git a/sdk/keyvault/keyvault-admin/samples/v4-beta/typescript/package.json b/sdk/keyvault/keyvault-admin/samples/v4-beta/typescript/package.json index 11579144dc2f..4f9d9c930f63 100644 --- a/sdk/keyvault/keyvault-admin/samples/v4-beta/typescript/package.json +++ b/sdk/keyvault/keyvault-admin/samples/v4-beta/typescript/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@types/uuid": "^8.0.0", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/keyvault/keyvault-admin/samples/v4/typescript/package.json b/sdk/keyvault/keyvault-admin/samples/v4/typescript/package.json index b81569f8dfc9..4775cc4fd626 100644 --- a/sdk/keyvault/keyvault-admin/samples/v4/typescript/package.json +++ b/sdk/keyvault/keyvault-admin/samples/v4/typescript/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@types/uuid": "^8.0.0", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/keyvault/keyvault-certificates/package.json b/sdk/keyvault/keyvault-certificates/package.json index 0d5bd734a933..8dead23c5ebd 100644 --- a/sdk/keyvault/keyvault-certificates/package.json +++ b/sdk/keyvault/keyvault-certificates/package.json @@ -120,7 +120,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.46.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "type": "module", diff --git a/sdk/keyvault/keyvault-certificates/samples/v4/typescript/package.json b/sdk/keyvault/keyvault-certificates/samples/v4/typescript/package.json index db4840d176ad..aed0ebdabd8b 100644 --- a/sdk/keyvault/keyvault-certificates/samples/v4/typescript/package.json +++ b/sdk/keyvault/keyvault-certificates/samples/v4/typescript/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/keyvault/keyvault-common/package.json b/sdk/keyvault/keyvault-common/package.json index 91a48c580099..a02799e078d2 100644 --- a/sdk/keyvault/keyvault-common/package.json +++ b/sdk/keyvault/keyvault-common/package.json @@ -71,7 +71,7 @@ "@vitest/coverage-istanbul": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.46.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "type": "module", diff --git a/sdk/keyvault/keyvault-keys/package.json b/sdk/keyvault/keyvault-keys/package.json index 529e51ddd8af..bd7efe0d2545 100644 --- a/sdk/keyvault/keyvault-keys/package.json +++ b/sdk/keyvault/keyvault-keys/package.json @@ -113,7 +113,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.47.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.2" }, "type": "module", diff --git a/sdk/keyvault/keyvault-keys/samples/v4/typescript/package.json b/sdk/keyvault/keyvault-keys/samples/v4/typescript/package.json index 1f8a94886d41..9284f4ad96b9 100644 --- a/sdk/keyvault/keyvault-keys/samples/v4/typescript/package.json +++ b/sdk/keyvault/keyvault-keys/samples/v4/typescript/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/keyvault/keyvault-secrets/package.json b/sdk/keyvault/keyvault-secrets/package.json index d99b8051e92e..168824070385 100644 --- a/sdk/keyvault/keyvault-secrets/package.json +++ b/sdk/keyvault/keyvault-secrets/package.json @@ -117,7 +117,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.47.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.1" }, "type": "module", diff --git a/sdk/keyvault/keyvault-secrets/samples/v4/typescript/package.json b/sdk/keyvault/keyvault-secrets/samples/v4/typescript/package.json index 429f298f487d..0fae4745f91d 100644 --- a/sdk/keyvault/keyvault-secrets/samples/v4/typescript/package.json +++ b/sdk/keyvault/keyvault-secrets/samples/v4/typescript/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/keyvault/perf-tests/keyvault-certificates/package.json b/sdk/keyvault/perf-tests/keyvault-certificates/package.json index afc70bcb0f37..6874851639ff 100644 --- a/sdk/keyvault/perf-tests/keyvault-certificates/package.json +++ b/sdk/keyvault/perf-tests/keyvault-certificates/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/keyvault/perf-tests/keyvault-keys/package.json b/sdk/keyvault/perf-tests/keyvault-keys/package.json index 8c00fd106752..971e43eb1bb7 100644 --- a/sdk/keyvault/perf-tests/keyvault-keys/package.json +++ b/sdk/keyvault/perf-tests/keyvault-keys/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/keyvault/perf-tests/keyvault-secrets/package.json b/sdk/keyvault/perf-tests/keyvault-secrets/package.json index 2eda19d8a74d..2e3670d556f9 100644 --- a/sdk/keyvault/perf-tests/keyvault-secrets/package.json +++ b/sdk/keyvault/perf-tests/keyvault-secrets/package.json @@ -18,7 +18,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json index 32be60e8aa14..fc3bfdcb4826 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/samples/v6/typescript/package.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/samples/v6/typescript/package.json index 0b355d817d13..afce9f61bd1b 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/samples/v6/typescript/package.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/samples/v6/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/kubernetesruntime/arm-containerorchestratorruntime/package.json b/sdk/kubernetesruntime/arm-containerorchestratorruntime/package.json index f42caedab7ce..893582e66d44 100644 --- a/sdk/kubernetesruntime/arm-containerorchestratorruntime/package.json +++ b/sdk/kubernetesruntime/arm-containerorchestratorruntime/package.json @@ -70,7 +70,7 @@ "dotenv": "^16.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", "@vitest/coverage-istanbul": "^2.0.5", diff --git a/sdk/kubernetesruntime/arm-containerorchestratorruntime/samples/v1-beta/typescript/package.json b/sdk/kubernetesruntime/arm-containerorchestratorruntime/samples/v1-beta/typescript/package.json index 3cf7c1c346d9..0a521208f7e2 100644 --- a/sdk/kubernetesruntime/arm-containerorchestratorruntime/samples/v1-beta/typescript/package.json +++ b/sdk/kubernetesruntime/arm-containerorchestratorruntime/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/kusto/arm-kusto/package.json b/sdk/kusto/arm-kusto/package.json index 881d56f9c998..2a2285aad5dc 100644 --- a/sdk/kusto/arm-kusto/package.json +++ b/sdk/kusto/arm-kusto/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/kusto/arm-kusto/samples/v7/typescript/package.json b/sdk/kusto/arm-kusto/samples/v7/typescript/package.json index e85e5754f1fe..95126e6df6d6 100644 --- a/sdk/kusto/arm-kusto/samples/v7/typescript/package.json +++ b/sdk/kusto/arm-kusto/samples/v7/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/kusto/arm-kusto/samples/v8/typescript/package.json b/sdk/kusto/arm-kusto/samples/v8/typescript/package.json index e85e5754f1fe..95126e6df6d6 100644 --- a/sdk/kusto/arm-kusto/samples/v8/typescript/package.json +++ b/sdk/kusto/arm-kusto/samples/v8/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/labservices/arm-labservices/package.json b/sdk/labservices/arm-labservices/package.json index 5ae40f3fa8f2..a728ffbf494c 100644 --- a/sdk/labservices/arm-labservices/package.json +++ b/sdk/labservices/arm-labservices/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/labservices/arm-labservices/samples/v3/typescript/package.json b/sdk/labservices/arm-labservices/samples/v3/typescript/package.json index e11d4a92b601..4104f4222312 100644 --- a/sdk/labservices/arm-labservices/samples/v3/typescript/package.json +++ b/sdk/labservices/arm-labservices/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/largeinstance/arm-largeinstance/package.json b/sdk/largeinstance/arm-largeinstance/package.json index a0c15a3a5d4c..7e9b2b5b7540 100644 --- a/sdk/largeinstance/arm-largeinstance/package.json +++ b/sdk/largeinstance/arm-largeinstance/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/largeinstance/arm-largeinstance/samples/v1-beta/typescript/package.json b/sdk/largeinstance/arm-largeinstance/samples/v1-beta/typescript/package.json index 2d742ee3bdf2..0db86aede320 100644 --- a/sdk/largeinstance/arm-largeinstance/samples/v1-beta/typescript/package.json +++ b/sdk/largeinstance/arm-largeinstance/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/liftrqumulo/arm-qumulo/package.json b/sdk/liftrqumulo/arm-qumulo/package.json index 9c549b0a9d2b..85e44d1484e3 100644 --- a/sdk/liftrqumulo/arm-qumulo/package.json +++ b/sdk/liftrqumulo/arm-qumulo/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/liftrqumulo/arm-qumulo/samples/v1/typescript/package.json b/sdk/liftrqumulo/arm-qumulo/samples/v1/typescript/package.json index 300d4e134506..a7ea211f1507 100644 --- a/sdk/liftrqumulo/arm-qumulo/samples/v1/typescript/package.json +++ b/sdk/liftrqumulo/arm-qumulo/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/liftrqumulo/arm-qumulo/samples/v2/typescript/package.json b/sdk/liftrqumulo/arm-qumulo/samples/v2/typescript/package.json index 4cf6c6ed9f8b..a521c75679a2 100644 --- a/sdk/liftrqumulo/arm-qumulo/samples/v2/typescript/package.json +++ b/sdk/liftrqumulo/arm-qumulo/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/links/arm-links/package.json b/sdk/links/arm-links/package.json index d5a32afbb347..58fa74ff842b 100644 --- a/sdk/links/arm-links/package.json +++ b/sdk/links/arm-links/package.json @@ -37,7 +37,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/links/arm-links", "repository": { diff --git a/sdk/loadtesting/arm-loadtesting/package.json b/sdk/loadtesting/arm-loadtesting/package.json index 26aa1f76945e..cdd939f0dca5 100644 --- a/sdk/loadtesting/arm-loadtesting/package.json +++ b/sdk/loadtesting/arm-loadtesting/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/package.json b/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/package.json index 90f959a55bcf..23db9cb256e4 100644 --- a/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/package.json +++ b/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/loadtesting/load-testing-rest/package.json b/sdk/loadtesting/load-testing-rest/package.json index 7ebab05e9556..324dba2f1ee3 100644 --- a/sdk/loadtesting/load-testing-rest/package.json +++ b/sdk/loadtesting/load-testing-rest/package.json @@ -91,7 +91,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/load-testing-rest/README.md", diff --git a/sdk/loadtesting/load-testing-rest/samples/v1-beta/typescript/package.json b/sdk/loadtesting/load-testing-rest/samples/v1-beta/typescript/package.json index 84781fc5b445..86549bf6d807 100644 --- a/sdk/loadtesting/load-testing-rest/samples/v1-beta/typescript/package.json +++ b/sdk/loadtesting/load-testing-rest/samples/v1-beta/typescript/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@types/uuid": "^8.3.4", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/loadtesting/load-testing-rest/samples/v1/typescript/package.json b/sdk/loadtesting/load-testing-rest/samples/v1/typescript/package.json index 8fe4eaa2e944..c915d1efa319 100644 --- a/sdk/loadtesting/load-testing-rest/samples/v1/typescript/package.json +++ b/sdk/loadtesting/load-testing-rest/samples/v1/typescript/package.json @@ -38,7 +38,7 @@ "devDependencies": { "@types/uuid": "^8.3.4", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/package.json b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/package.json index 3ee1291509fa..badf5237445a 100644 --- a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/package.json +++ b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index 18832da16915..4320b6db578e 100644 --- a/sdk/locks/arm-locks-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/locks/arm-locks-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/locks/arm-locks/package.json b/sdk/locks/arm-locks/package.json index 9d912236ad20..614979e53311 100644 --- a/sdk/locks/arm-locks/package.json +++ b/sdk/locks/arm-locks/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/locks/arm-locks", "repository": { diff --git a/sdk/locks/arm-locks/samples/v2/typescript/package.json b/sdk/locks/arm-locks/samples/v2/typescript/package.json index 7959f6b2c853..999ca116d6bd 100644 --- a/sdk/locks/arm-locks/samples/v2/typescript/package.json +++ b/sdk/locks/arm-locks/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/logic/arm-logic/package.json b/sdk/logic/arm-logic/package.json index a2b477d75c23..6b7fe70db3bd 100644 --- a/sdk/logic/arm-logic/package.json +++ b/sdk/logic/arm-logic/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/logic/arm-logic/samples/v8/typescript/package.json b/sdk/logic/arm-logic/samples/v8/typescript/package.json index 76be46e5b9ce..19c2c900012e 100644 --- a/sdk/logic/arm-logic/samples/v8/typescript/package.json +++ b/sdk/logic/arm-logic/samples/v8/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/machinelearning/arm-commitmentplans/package.json b/sdk/machinelearning/arm-commitmentplans/package.json index a076db539ba6..3f4f13a68d1f 100644 --- a/sdk/machinelearning/arm-commitmentplans/package.json +++ b/sdk/machinelearning/arm-commitmentplans/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-commitmentplans", "repository": { diff --git a/sdk/machinelearning/arm-machinelearning/package.json b/sdk/machinelearning/arm-machinelearning/package.json index 788f76bc1288..e13e218b5fa1 100644 --- a/sdk/machinelearning/arm-machinelearning/package.json +++ b/sdk/machinelearning/arm-machinelearning/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/machinelearning/arm-machinelearning/samples/v3/typescript/package.json b/sdk/machinelearning/arm-machinelearning/samples/v3/typescript/package.json index b62ebc0366de..111e75ff4dc8 100644 --- a/sdk/machinelearning/arm-machinelearning/samples/v3/typescript/package.json +++ b/sdk/machinelearning/arm-machinelearning/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/machinelearning/arm-webservices/package.json b/sdk/machinelearning/arm-webservices/package.json index b03a31219489..ec60993f604f 100644 --- a/sdk/machinelearning/arm-webservices/package.json +++ b/sdk/machinelearning/arm-webservices/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-webservices", "repository": { diff --git a/sdk/machinelearning/arm-webservices/samples/v1/typescript/package.json b/sdk/machinelearning/arm-webservices/samples/v1/typescript/package.json index d7f81e4174d7..784f345fb71d 100644 --- a/sdk/machinelearning/arm-webservices/samples/v1/typescript/package.json +++ b/sdk/machinelearning/arm-webservices/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/machinelearning/arm-workspaces/package.json b/sdk/machinelearning/arm-workspaces/package.json index bc7d4a887511..e77a38be9b64 100644 --- a/sdk/machinelearning/arm-workspaces/package.json +++ b/sdk/machinelearning/arm-workspaces/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-workspaces", "repository": { diff --git a/sdk/machinelearning/arm-workspaces/samples/v1/typescript/package.json b/sdk/machinelearning/arm-workspaces/samples/v1/typescript/package.json index 0c6ab1fdfa53..98d0f2a6f115 100644 --- a/sdk/machinelearning/arm-workspaces/samples/v1/typescript/package.json +++ b/sdk/machinelearning/arm-workspaces/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/machinelearningcompute/arm-machinelearningcompute/package.json b/sdk/machinelearningcompute/arm-machinelearningcompute/package.json index e6deb2d6f97b..395254418fc6 100644 --- a/sdk/machinelearningcompute/arm-machinelearningcompute/package.json +++ b/sdk/machinelearningcompute/arm-machinelearningcompute/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearningcompute/arm-machinelearningcompute", "repository": { diff --git a/sdk/machinelearningcompute/arm-machinelearningcompute/samples/v3-beta/typescript/package.json b/sdk/machinelearningcompute/arm-machinelearningcompute/samples/v3-beta/typescript/package.json index b6035cebc827..aa822cf8c3a7 100644 --- a/sdk/machinelearningcompute/arm-machinelearningcompute/samples/v3-beta/typescript/package.json +++ b/sdk/machinelearningcompute/arm-machinelearningcompute/samples/v3-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/package.json b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/package.json index 1595eda8983c..1de97255fc5c 100644 --- a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/package.json +++ b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/samples/v2-beta/typescript/package.json b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/samples/v2-beta/typescript/package.json index c7e8b4d87626..2db501d39f77 100644 --- a/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/samples/v2-beta/typescript/package.json +++ b/sdk/machinelearningexperimentation/arm-machinelearningexperimentation/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/maintenance/arm-maintenance/package.json b/sdk/maintenance/arm-maintenance/package.json index 9ce6f8b2ef3d..738c87bf3039 100644 --- a/sdk/maintenance/arm-maintenance/package.json +++ b/sdk/maintenance/arm-maintenance/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/maintenance/arm-maintenance/samples/v1-beta/typescript/package.json b/sdk/maintenance/arm-maintenance/samples/v1-beta/typescript/package.json index 9c9105df7934..bd286a8e660f 100644 --- a/sdk/maintenance/arm-maintenance/samples/v1-beta/typescript/package.json +++ b/sdk/maintenance/arm-maintenance/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/managedapplications/arm-managedapplications/package.json b/sdk/managedapplications/arm-managedapplications/package.json index 0b4032294c01..e91c59b82613 100644 --- a/sdk/managedapplications/arm-managedapplications/package.json +++ b/sdk/managedapplications/arm-managedapplications/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/managedapplications/arm-managedapplications/samples/v3/typescript/package.json b/sdk/managedapplications/arm-managedapplications/samples/v3/typescript/package.json index 78506df982a2..567142d68021 100644 --- a/sdk/managedapplications/arm-managedapplications/samples/v3/typescript/package.json +++ b/sdk/managedapplications/arm-managedapplications/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/package.json b/sdk/managednetworkfabric/arm-managednetworkfabric/package.json index b77a345ab53c..8d154413c6bc 100644 --- a/sdk/managednetworkfabric/arm-managednetworkfabric/package.json +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1/typescript/package.json b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1/typescript/package.json index 3908bb22b0fe..9ff464d55245 100644 --- a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1/typescript/package.json +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/managementgroups/arm-managementgroups/package.json b/sdk/managementgroups/arm-managementgroups/package.json index c3ac67570ce0..ff6a2e153240 100644 --- a/sdk/managementgroups/arm-managementgroups/package.json +++ b/sdk/managementgroups/arm-managementgroups/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managementgroups/arm-managementgroups", "repository": { diff --git a/sdk/managementgroups/arm-managementgroups/samples/v2/typescript/package.json b/sdk/managementgroups/arm-managementgroups/samples/v2/typescript/package.json index 366f542eeef9..89d663b91aa5 100644 --- a/sdk/managementgroups/arm-managementgroups/samples/v2/typescript/package.json +++ b/sdk/managementgroups/arm-managementgroups/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/managementpartner/arm-managementpartner/package.json b/sdk/managementpartner/arm-managementpartner/package.json index 8cc26b8d483c..acbcdffd7802 100644 --- a/sdk/managementpartner/arm-managementpartner/package.json +++ b/sdk/managementpartner/arm-managementpartner/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/managementpartner/arm-managementpartner/samples/v3/typescript/package.json b/sdk/managementpartner/arm-managementpartner/samples/v3/typescript/package.json index 8406e01b848e..53d0923ef36d 100644 --- a/sdk/managementpartner/arm-managementpartner/samples/v3/typescript/package.json +++ b/sdk/managementpartner/arm-managementpartner/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/maps/arm-maps/package.json b/sdk/maps/arm-maps/package.json index 9cc126d8364e..60ddedec8156 100644 --- a/sdk/maps/arm-maps/package.json +++ b/sdk/maps/arm-maps/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/maps/arm-maps/samples/v3-beta/typescript/package.json b/sdk/maps/arm-maps/samples/v3-beta/typescript/package.json index 22f2a628c87c..047f2312d8ba 100644 --- a/sdk/maps/arm-maps/samples/v3-beta/typescript/package.json +++ b/sdk/maps/arm-maps/samples/v3-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/maps/arm-maps/samples/v3/typescript/package.json b/sdk/maps/arm-maps/samples/v3/typescript/package.json index 17ccd0d78e6a..56dd9fa76b01 100644 --- a/sdk/maps/arm-maps/samples/v3/typescript/package.json +++ b/sdk/maps/arm-maps/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/maps/maps-common/package.json b/sdk/maps/maps-common/package.json index ba37b56c4ff7..1fe882236899 100644 --- a/sdk/maps/maps-common/package.json +++ b/sdk/maps/maps-common/package.json @@ -73,7 +73,7 @@ "@vitest/coverage-istanbul": "^2.1.3", "eslint": "^9.9.0", "playwright": "^1.48.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.3" }, "type": "module", diff --git a/sdk/maps/maps-geolocation-rest/package.json b/sdk/maps/maps-geolocation-rest/package.json index e015807c43bb..7123153c46b3 100644 --- a/sdk/maps/maps-geolocation-rest/package.json +++ b/sdk/maps/maps-geolocation-rest/package.json @@ -77,7 +77,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/maps/maps-geolocation-rest/README.md", diff --git a/sdk/maps/maps-geolocation-rest/samples/v1-beta/typescript/package.json b/sdk/maps/maps-geolocation-rest/samples/v1-beta/typescript/package.json index f8a8d5b9e2f2..8359b751250b 100644 --- a/sdk/maps/maps-geolocation-rest/samples/v1-beta/typescript/package.json +++ b/sdk/maps/maps-geolocation-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/maps/maps-render-rest/package.json b/sdk/maps/maps-render-rest/package.json index 4bdb6db4c51c..2a76bd11d5f2 100644 --- a/sdk/maps/maps-render-rest/package.json +++ b/sdk/maps/maps-render-rest/package.json @@ -80,7 +80,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/maps/maps-render-rest/README.md", diff --git a/sdk/maps/maps-render-rest/samples/v2-beta/typescript/package.json b/sdk/maps/maps-render-rest/samples/v2-beta/typescript/package.json index 3551a6e1e4e3..a057cedc5e4a 100644 --- a/sdk/maps/maps-render-rest/samples/v2-beta/typescript/package.json +++ b/sdk/maps/maps-render-rest/samples/v2-beta/typescript/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/maps/maps-route-rest/package.json b/sdk/maps/maps-route-rest/package.json index 80abe567024c..f47ec75a7a2c 100644 --- a/sdk/maps/maps-route-rest/package.json +++ b/sdk/maps/maps-route-rest/package.json @@ -104,7 +104,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "browser": "./dist/browser/index.js", diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/package.json b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/package.json index b301333592a4..dd6403bfbb4b 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/package.json +++ b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/maps/maps-search-rest/package.json b/sdk/maps/maps-search-rest/package.json index d22341a3b97f..82903387b4e8 100644 --- a/sdk/maps/maps-search-rest/package.json +++ b/sdk/maps/maps-search-rest/package.json @@ -81,7 +81,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/maps/maps-search-rest/README.md", diff --git a/sdk/maps/maps-search-rest/samples/v2-beta/typescript/package.json b/sdk/maps/maps-search-rest/samples/v2-beta/typescript/package.json index 636cfe034cef..58d7a1065282 100644 --- a/sdk/maps/maps-search-rest/samples/v2-beta/typescript/package.json +++ b/sdk/maps/maps-search-rest/samples/v2-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/maps/maps-timezone-rest/package.json b/sdk/maps/maps-timezone-rest/package.json index 41234f179798..b8477fbf17d2 100644 --- a/sdk/maps/maps-timezone-rest/package.json +++ b/sdk/maps/maps-timezone-rest/package.json @@ -80,7 +80,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/maps/maps-timezone-rest/README.md", diff --git a/sdk/mariadb/arm-mariadb/package.json b/sdk/mariadb/arm-mariadb/package.json index 828c3725fa3f..b02f6811cad4 100644 --- a/sdk/mariadb/arm-mariadb/package.json +++ b/sdk/mariadb/arm-mariadb/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mariadb/arm-mariadb", "repository": { diff --git a/sdk/mariadb/arm-mariadb/samples/v2/typescript/package.json b/sdk/mariadb/arm-mariadb/samples/v2/typescript/package.json index 1ef0af81d3d1..af479d724779 100644 --- a/sdk/mariadb/arm-mariadb/samples/v2/typescript/package.json +++ b/sdk/mariadb/arm-mariadb/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/marketplaceordering/arm-marketplaceordering/package.json b/sdk/marketplaceordering/arm-marketplaceordering/package.json index 3e2a30034740..501a595b9b0c 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/package.json +++ b/sdk/marketplaceordering/arm-marketplaceordering/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/marketplaceordering/arm-marketplaceordering/samples/v3/typescript/package.json b/sdk/marketplaceordering/arm-marketplaceordering/samples/v3/typescript/package.json index 3f309a81d497..3c704b78e1e4 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/samples/v3/typescript/package.json +++ b/sdk/marketplaceordering/arm-marketplaceordering/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/mediaservices/arm-mediaservices/package.json b/sdk/mediaservices/arm-mediaservices/package.json index 8dc0802b6de7..8bb46a75f80d 100644 --- a/sdk/mediaservices/arm-mediaservices/package.json +++ b/sdk/mediaservices/arm-mediaservices/package.json @@ -40,7 +40,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/mediaservices/arm-mediaservices/samples/v13/typescript/package.json b/sdk/mediaservices/arm-mediaservices/samples/v13/typescript/package.json index 23e4d9a78822..4bd33121e912 100644 --- a/sdk/mediaservices/arm-mediaservices/samples/v13/typescript/package.json +++ b/sdk/mediaservices/arm-mediaservices/samples/v13/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/metricsadvisor/ai-metrics-advisor/package.json b/sdk/metricsadvisor/ai-metrics-advisor/package.json index 93b259b66fe0..4eb91abeeab6 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/package.json +++ b/sdk/metricsadvisor/ai-metrics-advisor/package.json @@ -99,7 +99,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "//sampleConfiguration": { diff --git a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/package.json b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/package.json index c704a7a9bf2f..71b5341360e0 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/package.json +++ b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/package.json @@ -34,7 +34,7 @@ "dotenv": "latest" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/package.json b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/package.json index 3a8db78a3e96..5ca66bf59ff7 100644 --- a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/package.json +++ b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/package.json @@ -17,7 +17,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/migrate/arm-migrate/package.json b/sdk/migrate/arm-migrate/package.json index dca2e844d9b4..4700f61b8c5b 100644 --- a/sdk/migrate/arm-migrate/package.json +++ b/sdk/migrate/arm-migrate/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/package.json b/sdk/migrate/arm-migrate/samples/v2/typescript/package.json index 635f0b552938..02ca810d2946 100644 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/package.json +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/migrationdiscovery/arm-migrationdiscoverysap/package.json b/sdk/migrationdiscovery/arm-migrationdiscoverysap/package.json index 22fe6c5bfde2..ab615babefee 100644 --- a/sdk/migrationdiscovery/arm-migrationdiscoverysap/package.json +++ b/sdk/migrationdiscovery/arm-migrationdiscoverysap/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/migrationdiscovery/arm-migrationdiscoverysap/samples/v1-beta/typescript/package.json b/sdk/migrationdiscovery/arm-migrationdiscoverysap/samples/v1-beta/typescript/package.json index 2780d46b9bc3..588e942c6f7d 100644 --- a/sdk/migrationdiscovery/arm-migrationdiscoverysap/samples/v1-beta/typescript/package.json +++ b/sdk/migrationdiscovery/arm-migrationdiscoverysap/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/mixedreality/arm-mixedreality/package.json b/sdk/mixedreality/arm-mixedreality/package.json index f9824cd29053..13c39fa7e57a 100644 --- a/sdk/mixedreality/arm-mixedreality/package.json +++ b/sdk/mixedreality/arm-mixedreality/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mixedreality/arm-mixedreality", "repository": { diff --git a/sdk/mixedreality/arm-mixedreality/samples/v4-beta/typescript/package.json b/sdk/mixedreality/arm-mixedreality/samples/v4-beta/typescript/package.json index 484d4873ea2d..129ae7b08aa5 100644 --- a/sdk/mixedreality/arm-mixedreality/samples/v4-beta/typescript/package.json +++ b/sdk/mixedreality/arm-mixedreality/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/mixedreality/mixed-reality-authentication/package.json b/sdk/mixedreality/mixed-reality-authentication/package.json index 667cdd93cfa5..d9101355e56b 100644 --- a/sdk/mixedreality/mixed-reality-authentication/package.json +++ b/sdk/mixedreality/mixed-reality-authentication/package.json @@ -76,7 +76,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "//metadata": { diff --git a/sdk/mixedreality/mixed-reality-authentication/samples/v1/typescript/package.json b/sdk/mixedreality/mixed-reality-authentication/samples/v1/typescript/package.json index 50d4ab163646..4921d96a0f0f 100644 --- a/sdk/mixedreality/mixed-reality-authentication/samples/v1/typescript/package.json +++ b/sdk/mixedreality/mixed-reality-authentication/samples/v1/typescript/package.json @@ -33,7 +33,7 @@ "@azure/core-auth": "^1.3.0" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/package.json b/sdk/mobilenetwork/arm-mobilenetwork/package.json index fd2417d06780..db998d6f43f1 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/package.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v6/typescript/package.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v6/typescript/package.json index 1e1108a5e9fb..a221943a51ed 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v6/typescript/package.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/samples/v6/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/mongocluster/arm-mongocluster/package.json b/sdk/mongocluster/arm-mongocluster/package.json index 68c8d61bfc2f..c402af899cdd 100644 --- a/sdk/mongocluster/arm-mongocluster/package.json +++ b/sdk/mongocluster/arm-mongocluster/package.json @@ -80,7 +80,7 @@ "eslint": "^9.9.0", "playwright": "^1.41.2", "prettier": "^3.2.5", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "scripts": { diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1/typescript/package.json b/sdk/mongocluster/arm-mongocluster/samples/v1/typescript/package.json index 4c61430a123e..4d1af77e4c17 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1/typescript/package.json +++ b/sdk/mongocluster/arm-mongocluster/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/package.json b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/package.json index fb9482c4c3a3..05f20f94472e 100644 --- a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/package.json +++ b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index c5e5db838d01..20c3111647d0 100644 --- a/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/monitor/arm-monitor-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/monitor/arm-monitor/package.json b/sdk/monitor/arm-monitor/package.json index 8fd8abe248b5..96c97d0e7774 100644 --- a/sdk/monitor/arm-monitor/package.json +++ b/sdk/monitor/arm-monitor/package.json @@ -43,7 +43,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/package.json b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/package.json index aea5524017f5..da19f1fed971 100644 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/package.json +++ b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/monitor/monitor-ingestion/package.json b/sdk/monitor/monitor-ingestion/package.json index 30a5c41da86b..12c97ad9ead3 100644 --- a/sdk/monitor/monitor-ingestion/package.json +++ b/sdk/monitor/monitor-ingestion/package.json @@ -98,7 +98,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//sampleConfiguration": { diff --git a/sdk/monitor/monitor-ingestion/samples/v1/typescript/package.json b/sdk/monitor/monitor-ingestion/samples/v1/typescript/package.json index bfa14e83d652..3b2d40f0b9f6 100644 --- a/sdk/monitor/monitor-ingestion/samples/v1/typescript/package.json +++ b/sdk/monitor/monitor-ingestion/samples/v1/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/monitor/monitor-opentelemetry-exporter/package.json b/sdk/monitor/monitor-opentelemetry-exporter/package.json index 1bfc912348ea..caaf89a868c3 100644 --- a/sdk/monitor/monitor-opentelemetry-exporter/package.json +++ b/sdk/monitor/monitor-opentelemetry-exporter/package.json @@ -88,7 +88,7 @@ "eslint": "^9.9.0", "nock": "^13.5.4", "playwright": "^1.48.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "dependencies": { diff --git a/sdk/monitor/monitor-opentelemetry-exporter/samples/v1-beta/typescript/package.json b/sdk/monitor/monitor-opentelemetry-exporter/samples/v1-beta/typescript/package.json index 839c53533ae9..dac4d35e8ea1 100644 --- a/sdk/monitor/monitor-opentelemetry-exporter/samples/v1-beta/typescript/package.json +++ b/sdk/monitor/monitor-opentelemetry-exporter/samples/v1-beta/typescript/package.json @@ -45,7 +45,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/monitor/monitor-opentelemetry-exporter/samples/v1/typescript/package.json b/sdk/monitor/monitor-opentelemetry-exporter/samples/v1/typescript/package.json index 9db33d4653f0..779c064dea6c 100644 --- a/sdk/monitor/monitor-opentelemetry-exporter/samples/v1/typescript/package.json +++ b/sdk/monitor/monitor-opentelemetry-exporter/samples/v1/typescript/package.json @@ -43,7 +43,7 @@ "@opentelemetry/instrumentation-http": "^0.53.0" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/monitor/monitor-opentelemetry/package.json b/sdk/monitor/monitor-opentelemetry/package.json index 737fa661c5dd..16cb3d3cba7e 100644 --- a/sdk/monitor/monitor-opentelemetry/package.json +++ b/sdk/monitor/monitor-opentelemetry/package.json @@ -78,7 +78,7 @@ "nyc": "^17.0.0", "sinon": "^17.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "dependencies": { "@azure/core-auth": "^1.3.0", diff --git a/sdk/monitor/monitor-query/package.json b/sdk/monitor/monitor-query/package.json index b837f2c4db74..e1efaf79805f 100644 --- a/sdk/monitor/monitor-query/package.json +++ b/sdk/monitor/monitor-query/package.json @@ -112,7 +112,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.48.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.4" }, "//sampleConfiguration": { diff --git a/sdk/monitor/monitor-query/samples/v1/typescript/package.json b/sdk/monitor/monitor-query/samples/v1/typescript/package.json index 070594ca2e01..300c7fa19d62 100644 --- a/sdk/monitor/monitor-query/samples/v1/typescript/package.json +++ b/sdk/monitor/monitor-query/samples/v1/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/monitor/perf-tests/monitor-ingestion/package.json b/sdk/monitor/perf-tests/monitor-ingestion/package.json index 25f515a1e8b2..0da5ec087d7a 100644 --- a/sdk/monitor/perf-tests/monitor-ingestion/package.json +++ b/sdk/monitor/perf-tests/monitor-ingestion/package.json @@ -20,7 +20,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/monitor/perf-tests/monitor-opentelemetry/package.json b/sdk/monitor/perf-tests/monitor-opentelemetry/package.json index 1ce36c0e1729..a7a1e57bf177 100644 --- a/sdk/monitor/perf-tests/monitor-opentelemetry/package.json +++ b/sdk/monitor/perf-tests/monitor-opentelemetry/package.json @@ -22,7 +22,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/monitor/perf-tests/monitor-query/package.json b/sdk/monitor/perf-tests/monitor-query/package.json index 336ce64f5ec9..322dac882d4d 100644 --- a/sdk/monitor/perf-tests/monitor-query/package.json +++ b/sdk/monitor/perf-tests/monitor-query/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/msi/arm-msi/package.json b/sdk/msi/arm-msi/package.json index 244298ac701c..b3e45af00a7f 100644 --- a/sdk/msi/arm-msi/package.json +++ b/sdk/msi/arm-msi/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/msi/arm-msi/samples/v2-beta/typescript/package.json b/sdk/msi/arm-msi/samples/v2-beta/typescript/package.json index ac6f4af2790e..adbccdda7fb3 100644 --- a/sdk/msi/arm-msi/samples/v2-beta/typescript/package.json +++ b/sdk/msi/arm-msi/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/msi/arm-msi/samples/v2/typescript/package.json b/sdk/msi/arm-msi/samples/v2/typescript/package.json index e3b7da60ce9f..fe31b92ad1a4 100644 --- a/sdk/msi/arm-msi/samples/v2/typescript/package.json +++ b/sdk/msi/arm-msi/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/mysql/arm-mysql-flexible/package.json b/sdk/mysql/arm-mysql-flexible/package.json index d1a7d9fa730b..48e67d5694ae 100644 --- a/sdk/mysql/arm-mysql-flexible/package.json +++ b/sdk/mysql/arm-mysql-flexible/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/mysql/arm-mysql-flexible/samples/v4-beta/typescript/package.json b/sdk/mysql/arm-mysql-flexible/samples/v4-beta/typescript/package.json index 7de0ae209a61..d8726a54e540 100644 --- a/sdk/mysql/arm-mysql-flexible/samples/v4-beta/typescript/package.json +++ b/sdk/mysql/arm-mysql-flexible/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/mysql/arm-mysql/package.json b/sdk/mysql/arm-mysql/package.json index d70958b071fc..ddd91c26ec6c 100644 --- a/sdk/mysql/arm-mysql/package.json +++ b/sdk/mysql/arm-mysql/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mysql/arm-mysql", "repository": { diff --git a/sdk/mysql/arm-mysql/samples/v5/typescript/package.json b/sdk/mysql/arm-mysql/samples/v5/typescript/package.json index 8b9891bd7a51..9a954d5ece44 100644 --- a/sdk/mysql/arm-mysql/samples/v5/typescript/package.json +++ b/sdk/mysql/arm-mysql/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/neonpostgres/arm-neonpostgres/package.json b/sdk/neonpostgres/arm-neonpostgres/package.json index d11a1e3caf65..17f51f31145b 100644 --- a/sdk/neonpostgres/arm-neonpostgres/package.json +++ b/sdk/neonpostgres/arm-neonpostgres/package.json @@ -72,7 +72,7 @@ "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", "eslint": "^8.55.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "tshy": "^2.0.0", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", diff --git a/sdk/neonpostgres/arm-neonpostgres/samples/v1-beta/typescript/package.json b/sdk/neonpostgres/arm-neonpostgres/samples/v1-beta/typescript/package.json index 89a5fc7b4e48..2a0d3502b1f0 100644 --- a/sdk/neonpostgres/arm-neonpostgres/samples/v1-beta/typescript/package.json +++ b/sdk/neonpostgres/arm-neonpostgres/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/netapp/arm-netapp/package.json b/sdk/netapp/arm-netapp/package.json index 8913930509ee..7e3b46458e4a 100644 --- a/sdk/netapp/arm-netapp/package.json +++ b/sdk/netapp/arm-netapp/package.json @@ -29,7 +29,7 @@ "types": "./types/arm-netapp.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/netapp/arm-netapp/samples/v21-beta/typescript/package.json b/sdk/netapp/arm-netapp/samples/v21-beta/typescript/package.json index e5b9526aacb3..0e7ae0028eae 100644 --- a/sdk/netapp/arm-netapp/samples/v21-beta/typescript/package.json +++ b/sdk/netapp/arm-netapp/samples/v21-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/network/arm-network-profile-2020-09-01-hybrid/package.json b/sdk/network/arm-network-profile-2020-09-01-hybrid/package.json index 096a479aacf7..9c83b9a50b93 100644 --- a/sdk/network/arm-network-profile-2020-09-01-hybrid/package.json +++ b/sdk/network/arm-network-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/network/arm-network-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/network/arm-network-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index 44723ee5c9e5..51e031057dec 100644 --- a/sdk/network/arm-network-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/network/arm-network-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/network/arm-network-rest/package.json b/sdk/network/arm-network-rest/package.json index 8520df42cf41..5fdb4ebdb3a6 100644 --- a/sdk/network/arm-network-rest/package.json +++ b/sdk/network/arm-network-rest/package.json @@ -96,7 +96,7 @@ "nyc": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network-rest/README.md", "//metadata": { diff --git a/sdk/network/arm-network-rest/samples/v1-beta/typescript/package.json b/sdk/network/arm-network-rest/samples/v1-beta/typescript/package.json index 0742fcc98951..bf1ab1838de3 100644 --- a/sdk/network/arm-network-rest/samples/v1-beta/typescript/package.json +++ b/sdk/network/arm-network-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index 77e32236f4b6..67bbedcc473f 100644 --- a/sdk/network/arm-network/package.json +++ b/sdk/network/arm-network/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/network/arm-network/samples/v33/typescript/package.json b/sdk/network/arm-network/samples/v33/typescript/package.json index d4afbf57417c..957a49997450 100644 --- a/sdk/network/arm-network/samples/v33/typescript/package.json +++ b/sdk/network/arm-network/samples/v33/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/networkanalytics/arm-networkanalytics/package.json b/sdk/networkanalytics/arm-networkanalytics/package.json index dff9b87955fb..cec30e4ac1a3 100644 --- a/sdk/networkanalytics/arm-networkanalytics/package.json +++ b/sdk/networkanalytics/arm-networkanalytics/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/networkanalytics/arm-networkanalytics/samples/v1/typescript/package.json b/sdk/networkanalytics/arm-networkanalytics/samples/v1/typescript/package.json index ff61650b7be7..7350418d9374 100644 --- a/sdk/networkanalytics/arm-networkanalytics/samples/v1/typescript/package.json +++ b/sdk/networkanalytics/arm-networkanalytics/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/networkcloud/arm-networkcloud/package.json b/sdk/networkcloud/arm-networkcloud/package.json index 037474e110e7..aac6c56f1d64 100644 --- a/sdk/networkcloud/arm-networkcloud/package.json +++ b/sdk/networkcloud/arm-networkcloud/package.json @@ -29,7 +29,7 @@ "types": "./types/arm-networkcloud.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json index 58587b85baba..4da147110d4a 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/networkfunction/arm-networkfunction/package.json b/sdk/networkfunction/arm-networkfunction/package.json index d9ef017014ed..ef272b8775c8 100644 --- a/sdk/networkfunction/arm-networkfunction/package.json +++ b/sdk/networkfunction/arm-networkfunction/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkfunction/arm-networkfunction", "repository": { diff --git a/sdk/networkfunction/arm-networkfunction/samples/v2/typescript/package.json b/sdk/networkfunction/arm-networkfunction/samples/v2/typescript/package.json index 3ab5a3eecf14..d9f989e5eca8 100644 --- a/sdk/networkfunction/arm-networkfunction/samples/v2/typescript/package.json +++ b/sdk/networkfunction/arm-networkfunction/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/newrelicobservability/arm-newrelicobservability/package.json b/sdk/newrelicobservability/arm-newrelicobservability/package.json index ee818e942f0f..4248351d43e0 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/package.json +++ b/sdk/newrelicobservability/arm-newrelicobservability/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/package.json b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/package.json index 17b598d41392..9b78627ff3cf 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/package.json +++ b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/nginx/arm-nginx/package.json b/sdk/nginx/arm-nginx/package.json index 764b790fc83a..dfc8dc81130a 100644 --- a/sdk/nginx/arm-nginx/package.json +++ b/sdk/nginx/arm-nginx/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/nginx/arm-nginx/samples/v3/typescript/package.json b/sdk/nginx/arm-nginx/samples/v3/typescript/package.json index ccb2c468b32e..4d988ff52ab9 100644 --- a/sdk/nginx/arm-nginx/samples/v3/typescript/package.json +++ b/sdk/nginx/arm-nginx/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/nginx/arm-nginx/samples/v4-beta/typescript/package.json b/sdk/nginx/arm-nginx/samples/v4-beta/typescript/package.json index 99920e1627bc..cd3d10bf61c6 100644 --- a/sdk/nginx/arm-nginx/samples/v4-beta/typescript/package.json +++ b/sdk/nginx/arm-nginx/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/notificationhubs/arm-notificationhubs/samples/v3-beta/typescript/package.json b/sdk/notificationhubs/arm-notificationhubs/samples/v3-beta/typescript/package.json index f98a551a0ac7..c436390261eb 100644 --- a/sdk/notificationhubs/arm-notificationhubs/samples/v3-beta/typescript/package.json +++ b/sdk/notificationhubs/arm-notificationhubs/samples/v3-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/oep/arm-oep/package.json b/sdk/oep/arm-oep/package.json index 81485bf37342..15a4d7dbf0e5 100644 --- a/sdk/oep/arm-oep/package.json +++ b/sdk/oep/arm-oep/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/oep/arm-oep", "repository": { diff --git a/sdk/oep/arm-oep/samples/v1-beta/typescript/package.json b/sdk/oep/arm-oep/samples/v1-beta/typescript/package.json index cd7838c0c602..1ffaa3f99d1a 100644 --- a/sdk/oep/arm-oep/samples/v1-beta/typescript/package.json +++ b/sdk/oep/arm-oep/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/openai/openai/package.json b/sdk/openai/openai/package.json index a0a54e49f540..bce4b7f5dce9 100644 --- a/sdk/openai/openai/package.json +++ b/sdk/openai/openai/package.json @@ -121,7 +121,7 @@ "eslint": "^9.9.0", "openai": "^4.47.2", "playwright": "^1.45.3", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.4" }, "dependencies": { diff --git a/sdk/openai/openai/samples/v2-beta/typescript/package.json b/sdk/openai/openai/samples/v2-beta/typescript/package.json index 595f23440ca9..2eefadcf49da 100644 --- a/sdk/openai/openai/samples/v2-beta/typescript/package.json +++ b/sdk/openai/openai/samples/v2-beta/typescript/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/openai/openai/samples/v2/typescript/package.json b/sdk/openai/openai/samples/v2/typescript/package.json index c0cc9221374d..dc03c8bc4f39 100644 --- a/sdk/openai/openai/samples/v2/typescript/package.json +++ b/sdk/openai/openai/samples/v2/typescript/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/operationalinsights/arm-operationalinsights/package.json b/sdk/operationalinsights/arm-operationalinsights/package.json index 65a8b641ec80..85fdcf0d2b21 100644 --- a/sdk/operationalinsights/arm-operationalinsights/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9/typescript/package.json b/sdk/operationalinsights/arm-operationalinsights/samples/v9/typescript/package.json index 0ce6084fe573..b2f0e29098a1 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v9/typescript/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/operationsmanagement/arm-operations/package.json b/sdk/operationsmanagement/arm-operations/package.json index bccaa6e7067d..b920b3250a8f 100644 --- a/sdk/operationsmanagement/arm-operations/package.json +++ b/sdk/operationsmanagement/arm-operations/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationsmanagement/arm-operations", "repository": { diff --git a/sdk/operationsmanagement/arm-operations/samples/v4-beta/typescript/package.json b/sdk/operationsmanagement/arm-operations/samples/v4-beta/typescript/package.json index f886151f6c7b..3c03fa4f3948 100644 --- a/sdk/operationsmanagement/arm-operations/samples/v4-beta/typescript/package.json +++ b/sdk/operationsmanagement/arm-operations/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/oracledatabase/arm-oracledatabase/package.json b/sdk/oracledatabase/arm-oracledatabase/package.json index f2005c87e010..0cf315703a91 100644 --- a/sdk/oracledatabase/arm-oracledatabase/package.json +++ b/sdk/oracledatabase/arm-oracledatabase/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/oracledatabase/arm-oracledatabase/samples/v1/typescript/package.json b/sdk/oracledatabase/arm-oracledatabase/samples/v1/typescript/package.json index bbd843001d2d..2cfbf72fde7d 100644 --- a/sdk/oracledatabase/arm-oracledatabase/samples/v1/typescript/package.json +++ b/sdk/oracledatabase/arm-oracledatabase/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/orbital/arm-orbital/package.json b/sdk/orbital/arm-orbital/package.json index 35fcab326f54..98759d5f8f26 100644 --- a/sdk/orbital/arm-orbital/package.json +++ b/sdk/orbital/arm-orbital/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/orbital/arm-orbital/samples/v2/typescript/package.json b/sdk/orbital/arm-orbital/samples/v2/typescript/package.json index 85488af97688..6add9020b156 100644 --- a/sdk/orbital/arm-orbital/samples/v2/typescript/package.json +++ b/sdk/orbital/arm-orbital/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/package.json b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/package.json index d1b3f0aaf9a3..0ebdb425fae0 100644 --- a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/package.json +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/samples/v1/typescript/package.json b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/samples/v1/typescript/package.json index 48a36812b8f4..8e64c82c5caf 100644 --- a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/samples/v1/typescript/package.json +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/peering/arm-peering/package.json b/sdk/peering/arm-peering/package.json index 7a44f3f0e7e4..5276e68ae598 100644 --- a/sdk/peering/arm-peering/package.json +++ b/sdk/peering/arm-peering/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/peering/arm-peering", "repository": { diff --git a/sdk/peering/arm-peering/samples/v2/typescript/package.json b/sdk/peering/arm-peering/samples/v2/typescript/package.json index 0c86de6544c9..059dd0fc5bb0 100644 --- a/sdk/peering/arm-peering/samples/v2/typescript/package.json +++ b/sdk/peering/arm-peering/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/package.json b/sdk/playwrighttesting/arm-playwrighttesting/package.json index aa49e338db37..97489c4f0d9d 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/package.json +++ b/sdk/playwrighttesting/arm-playwrighttesting/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/package.json b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/package.json index 28495c14c127..58b277c4bb7d 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/package.json +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/playwrighttesting/create-microsoft-playwright-testing/package.json b/sdk/playwrighttesting/create-microsoft-playwright-testing/package.json index 411124d51291..36aa6e08cd30 100644 --- a/sdk/playwrighttesting/create-microsoft-playwright-testing/package.json +++ b/sdk/playwrighttesting/create-microsoft-playwright-testing/package.json @@ -70,7 +70,7 @@ "@types/prompts": "^2.4.9", "@vitest/coverage-istanbul": "^2.1.2", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.2" }, "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", diff --git a/sdk/playwrighttesting/microsoft-playwright-testing/package.json b/sdk/playwrighttesting/microsoft-playwright-testing/package.json index caa0e3b94dc6..1f6abb6361c4 100644 --- a/sdk/playwrighttesting/microsoft-playwright-testing/package.json +++ b/sdk/playwrighttesting/microsoft-playwright-testing/package.json @@ -86,7 +86,7 @@ "eslint": "^9.9.0", "mocha": "^11.0.2", "sinon": "^17.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "peerDependencies": { "@playwright/test": "^1.43.1" diff --git a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/package.json b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/package.json index a392849a2005..523b116e35c8 100644 --- a/sdk/policy/arm-policy-profile-2020-09-01-hybrid/package.json +++ b/sdk/policy/arm-policy-profile-2020-09-01-hybrid/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/policy/arm-policy/package.json b/sdk/policy/arm-policy/package.json index 21ff20fff93a..cccc36ac70c7 100644 --- a/sdk/policy/arm-policy/package.json +++ b/sdk/policy/arm-policy/package.json @@ -38,7 +38,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/policy/arm-policy/samples/v5/typescript/package.json b/sdk/policy/arm-policy/samples/v5/typescript/package.json index 33630a3e8023..426cda3bedf3 100644 --- a/sdk/policy/arm-policy/samples/v5/typescript/package.json +++ b/sdk/policy/arm-policy/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/policyinsights/arm-policyinsights/package.json b/sdk/policyinsights/arm-policyinsights/package.json index 0aaa72267eb1..e6a80d70fadb 100644 --- a/sdk/policyinsights/arm-policyinsights/package.json +++ b/sdk/policyinsights/arm-policyinsights/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/policyinsights/arm-policyinsights/samples/v6-beta/typescript/package.json b/sdk/policyinsights/arm-policyinsights/samples/v6-beta/typescript/package.json index e8e7046109a4..1e1942ffc785 100644 --- a/sdk/policyinsights/arm-policyinsights/samples/v6-beta/typescript/package.json +++ b/sdk/policyinsights/arm-policyinsights/samples/v6-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/portal/arm-portal/package.json b/sdk/portal/arm-portal/package.json index 936445c97507..7bcf67c8d9fd 100644 --- a/sdk/portal/arm-portal/package.json +++ b/sdk/portal/arm-portal/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/portal/arm-portal/samples/v1-beta/typescript/package.json b/sdk/portal/arm-portal/samples/v1-beta/typescript/package.json index 82178d8e58fa..dfb6d6d7d153 100644 --- a/sdk/portal/arm-portal/samples/v1-beta/typescript/package.json +++ b/sdk/portal/arm-portal/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/postgresql/arm-postgresql-flexible/package.json b/sdk/postgresql/arm-postgresql-flexible/package.json index 84b0696b4d59..0525639537e6 100644 --- a/sdk/postgresql/arm-postgresql-flexible/package.json +++ b/sdk/postgresql/arm-postgresql-flexible/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/postgresql/arm-postgresql-flexible/samples/v8-beta/typescript/package.json b/sdk/postgresql/arm-postgresql-flexible/samples/v8-beta/typescript/package.json index b49d4e686a43..f17074eecc7c 100644 --- a/sdk/postgresql/arm-postgresql-flexible/samples/v8-beta/typescript/package.json +++ b/sdk/postgresql/arm-postgresql-flexible/samples/v8-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/postgresql/arm-postgresql/package.json b/sdk/postgresql/arm-postgresql/package.json index f4a47ca19c4e..a211e100aa6d 100644 --- a/sdk/postgresql/arm-postgresql/package.json +++ b/sdk/postgresql/arm-postgresql/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/postgresql/arm-postgresql", "repository": { diff --git a/sdk/postgresql/arm-postgresql/samples/v6/typescript/package.json b/sdk/postgresql/arm-postgresql/samples/v6/typescript/package.json index bbec03d0ddbe..9442c23f7b33 100644 --- a/sdk/postgresql/arm-postgresql/samples/v6/typescript/package.json +++ b/sdk/postgresql/arm-postgresql/samples/v6/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/powerbidedicated/arm-powerbidedicated/package.json b/sdk/powerbidedicated/arm-powerbidedicated/package.json index 3e46a925f465..72a974ee3a81 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/package.json +++ b/sdk/powerbidedicated/arm-powerbidedicated/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/powerbidedicated/arm-powerbidedicated/samples/v4/typescript/package.json b/sdk/powerbidedicated/arm-powerbidedicated/samples/v4/typescript/package.json index 9c6e9f990764..da8e9e6a559b 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/samples/v4/typescript/package.json +++ b/sdk/powerbidedicated/arm-powerbidedicated/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/powerbiembedded/arm-powerbiembedded/package.json b/sdk/powerbiembedded/arm-powerbiembedded/package.json index 977b948f06f1..18149fb6c61d 100644 --- a/sdk/powerbiembedded/arm-powerbiembedded/package.json +++ b/sdk/powerbiembedded/arm-powerbiembedded/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/powerbiembedded/arm-powerbiembedded", "repository": { diff --git a/sdk/privatedns/arm-privatedns/package.json b/sdk/privatedns/arm-privatedns/package.json index b65651da807d..3dd1d82cb5e1 100644 --- a/sdk/privatedns/arm-privatedns/package.json +++ b/sdk/privatedns/arm-privatedns/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/privatedns/arm-privatedns/samples/v3/typescript/package.json b/sdk/privatedns/arm-privatedns/samples/v3/typescript/package.json index 3ca8a80428b3..aec0a454a4e1 100644 --- a/sdk/privatedns/arm-privatedns/samples/v3/typescript/package.json +++ b/sdk/privatedns/arm-privatedns/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/purview/arm-purview/package.json b/sdk/purview/arm-purview/package.json index 6afacec0d9f7..2bcb44d9bd50 100644 --- a/sdk/purview/arm-purview/package.json +++ b/sdk/purview/arm-purview/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/arm-purview", "repository": { diff --git a/sdk/purview/arm-purview/samples/v1/typescript/package.json b/sdk/purview/arm-purview/samples/v1/typescript/package.json index a53be2455efa..e88b3c38a2f8 100644 --- a/sdk/purview/arm-purview/samples/v1/typescript/package.json +++ b/sdk/purview/arm-purview/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/purview/purview-administration-rest/package.json b/sdk/purview/purview-administration-rest/package.json index ac73df384de0..e5fd51704d88 100644 --- a/sdk/purview/purview-administration-rest/package.json +++ b/sdk/purview/purview-administration-rest/package.json @@ -98,7 +98,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "type": "module", diff --git a/sdk/purview/purview-administration-rest/samples/v1/typescript/package.json b/sdk/purview/purview-administration-rest/samples/v1/typescript/package.json index 0ccca24da495..b40bae869275 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/typescript/package.json +++ b/sdk/purview/purview-administration-rest/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ "@azure/identity": "^4.2.1" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/purview/purview-catalog-rest/package.json b/sdk/purview/purview-catalog-rest/package.json index cd3ede492810..24a1ef50fa14 100644 --- a/sdk/purview/purview-catalog-rest/package.json +++ b/sdk/purview/purview-catalog-rest/package.json @@ -99,7 +99,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "type": "module", diff --git a/sdk/purview/purview-catalog-rest/samples/v1-beta/typescript/package.json b/sdk/purview/purview-catalog-rest/samples/v1-beta/typescript/package.json index 99b6f3008867..f92a10a3c811 100644 --- a/sdk/purview/purview-catalog-rest/samples/v1-beta/typescript/package.json +++ b/sdk/purview/purview-catalog-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/purview/purview-datamap-rest/package.json b/sdk/purview/purview-datamap-rest/package.json index b3aaafd98326..3d2ea3ceec2a 100644 --- a/sdk/purview/purview-datamap-rest/package.json +++ b/sdk/purview/purview-datamap-rest/package.json @@ -78,7 +78,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest/README.md", diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/package.json b/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/package.json index d7d0feb550f7..abbcd21aa124 100644 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/package.json +++ b/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/purview/purview-scanning-rest/package.json b/sdk/purview/purview-scanning-rest/package.json index 4c720bde7a04..999a078a0d26 100644 --- a/sdk/purview/purview-scanning-rest/package.json +++ b/sdk/purview/purview-scanning-rest/package.json @@ -98,7 +98,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "type": "module", diff --git a/sdk/purview/purview-scanning-rest/samples/v1-beta/typescript/package.json b/sdk/purview/purview-scanning-rest/samples/v1-beta/typescript/package.json index 527c9061b9ef..72a5d6e54405 100644 --- a/sdk/purview/purview-scanning-rest/samples/v1-beta/typescript/package.json +++ b/sdk/purview/purview-scanning-rest/samples/v1-beta/typescript/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/purview/purview-sharing-rest/package.json b/sdk/purview/purview-sharing-rest/package.json index 957700a06eca..d19efb6722db 100644 --- a/sdk/purview/purview-sharing-rest/package.json +++ b/sdk/purview/purview-sharing-rest/package.json @@ -81,7 +81,7 @@ "dotenv": "^16.0.3", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-sharing-rest/README.md", diff --git a/sdk/purview/purview-sharing-rest/samples/v1-beta/typescript/package.json b/sdk/purview/purview-sharing-rest/samples/v1-beta/typescript/package.json index 7d8c9a3d8228..dd0165f1492a 100644 --- a/sdk/purview/purview-sharing-rest/samples/v1-beta/typescript/package.json +++ b/sdk/purview/purview-sharing-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/purview/purview-workflow-rest/package.json b/sdk/purview/purview-workflow-rest/package.json index 8e0d2c350514..fa880c571a47 100644 --- a/sdk/purview/purview-workflow-rest/package.json +++ b/sdk/purview/purview-workflow-rest/package.json @@ -79,7 +79,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-workflow-rest/README.md", diff --git a/sdk/purview/purview-workflow-rest/samples/v1-beta/typescript/package.json b/sdk/purview/purview-workflow-rest/samples/v1-beta/typescript/package.json index f64dac2306ed..d3090940b50f 100644 --- a/sdk/purview/purview-workflow-rest/samples/v1-beta/typescript/package.json +++ b/sdk/purview/purview-workflow-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/quantum/arm-quantum/package.json b/sdk/quantum/arm-quantum/package.json index 3b39abb7060c..67f39412ddf4 100644 --- a/sdk/quantum/arm-quantum/package.json +++ b/sdk/quantum/arm-quantum/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/quantum/arm-quantum/samples/v1-beta/typescript/package.json b/sdk/quantum/arm-quantum/samples/v1-beta/typescript/package.json index b1f01291ca8c..4d4c330e2bb8 100644 --- a/sdk/quantum/arm-quantum/samples/v1-beta/typescript/package.json +++ b/sdk/quantum/arm-quantum/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/quantum/quantum-jobs/package.json b/sdk/quantum/quantum-jobs/package.json index 1a0d4faa51ba..b38d8b9eefb2 100644 --- a/sdk/quantum/quantum-jobs/package.json +++ b/sdk/quantum/quantum-jobs/package.json @@ -79,7 +79,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "sideEffects": false, diff --git a/sdk/quota/arm-quota/package.json b/sdk/quota/arm-quota/package.json index 8779a2875878..c0e4fa826dfe 100644 --- a/sdk/quota/arm-quota/package.json +++ b/sdk/quota/arm-quota/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/quota/arm-quota/samples/v1-beta/typescript/package.json b/sdk/quota/arm-quota/samples/v1-beta/typescript/package.json index 48f354d45a4a..c81abc1c4235 100644 --- a/sdk/quota/arm-quota/samples/v1-beta/typescript/package.json +++ b/sdk/quota/arm-quota/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/recoveryservices/arm-recoveryservices/package.json b/sdk/recoveryservices/arm-recoveryservices/package.json index 6b14d1bbb2cd..870ee4765b56 100644 --- a/sdk/recoveryservices/arm-recoveryservices/package.json +++ b/sdk/recoveryservices/arm-recoveryservices/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/recoveryservices/arm-recoveryservices/samples/v6/typescript/package.json b/sdk/recoveryservices/arm-recoveryservices/samples/v6/typescript/package.json index 1d9ad647827f..629576947f1f 100644 --- a/sdk/recoveryservices/arm-recoveryservices/samples/v6/typescript/package.json +++ b/sdk/recoveryservices/arm-recoveryservices/samples/v6/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json index af7d3297c0a3..d4ae83478bb5 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json @@ -40,7 +40,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v13/typescript/package.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v13/typescript/package.json index 9453c44ef175..37cd2912c8af 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v13/typescript/package.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v13/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/package.json b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/package.json index e5671420c764..6e8ebe247636 100644 --- a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/package.json +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/samples/v1-beta/typescript/package.json b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/samples/v1-beta/typescript/package.json index 3ac279a10f5c..aa5228c0d322 100644 --- a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/samples/v1-beta/typescript/package.json +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^14.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json index 55aa1001a201..a91768ca8f84 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/samples/v5/typescript/package.json b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/samples/v5/typescript/package.json index b519f14efe52..253574d0e20c 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/samples/v5/typescript/package.json +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/redhatopenshift/arm-redhatopenshift/package.json b/sdk/redhatopenshift/arm-redhatopenshift/package.json index 709dd477e009..345cf2a8e818 100644 --- a/sdk/redhatopenshift/arm-redhatopenshift/package.json +++ b/sdk/redhatopenshift/arm-redhatopenshift/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/redhatopenshift/arm-redhatopenshift/samples/v1-beta/typescript/package.json b/sdk/redhatopenshift/arm-redhatopenshift/samples/v1-beta/typescript/package.json index 470ee17926a5..18c3b878e13f 100644 --- a/sdk/redhatopenshift/arm-redhatopenshift/samples/v1-beta/typescript/package.json +++ b/sdk/redhatopenshift/arm-redhatopenshift/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/redis/arm-rediscache/package.json b/sdk/redis/arm-rediscache/package.json index 6be5a9ad1371..6825b6dce9a5 100644 --- a/sdk/redis/arm-rediscache/package.json +++ b/sdk/redis/arm-rediscache/package.json @@ -41,7 +41,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/redis/arm-rediscache/samples/v8/typescript/package.json b/sdk/redis/arm-rediscache/samples/v8/typescript/package.json index 483ab3fafeef..30dc3d03845d 100644 --- a/sdk/redis/arm-rediscache/samples/v8/typescript/package.json +++ b/sdk/redis/arm-rediscache/samples/v8/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/redisenterprise/arm-redisenterprisecache/package.json b/sdk/redisenterprise/arm-redisenterprisecache/package.json index f601e11e39f9..e19eec437540 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/package.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/package.json b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/package.json index 6c7cfafa5c87..c98b4f9634a1 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/package.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/relay/arm-relay/package.json b/sdk/relay/arm-relay/package.json index 3bcddfdf35bb..4294da60db8f 100644 --- a/sdk/relay/arm-relay/package.json +++ b/sdk/relay/arm-relay/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/relay/arm-relay/samples/v3/typescript/package.json b/sdk/relay/arm-relay/samples/v3/typescript/package.json index 06e8bc9f1602..0113bdb8ee52 100644 --- a/sdk/relay/arm-relay/samples/v3/typescript/package.json +++ b/sdk/relay/arm-relay/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/remoterendering/mixed-reality-remote-rendering/package.json b/sdk/remoterendering/mixed-reality-remote-rendering/package.json index 5d4a8e1ec024..a63aee686a87 100644 --- a/sdk/remoterendering/mixed-reality-remote-rendering/package.json +++ b/sdk/remoterendering/mixed-reality-remote-rendering/package.json @@ -94,7 +94,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "//sampleConfiguration": { diff --git a/sdk/reservations/arm-reservations/package.json b/sdk/reservations/arm-reservations/package.json index 5a70f8190579..a906c0a01617 100644 --- a/sdk/reservations/arm-reservations/package.json +++ b/sdk/reservations/arm-reservations/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/reservations/arm-reservations/samples/v9/typescript/package.json b/sdk/reservations/arm-reservations/samples/v9/typescript/package.json index d7764af1ec4a..20a72359580a 100644 --- a/sdk/reservations/arm-reservations/samples/v9/typescript/package.json +++ b/sdk/reservations/arm-reservations/samples/v9/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/resourceconnector/arm-resourceconnector/package.json b/sdk/resourceconnector/arm-resourceconnector/package.json index b90f721f69e3..d2860592ab8b 100644 --- a/sdk/resourceconnector/arm-resourceconnector/package.json +++ b/sdk/resourceconnector/arm-resourceconnector/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1/typescript/package.json b/sdk/resourceconnector/arm-resourceconnector/samples/v1/typescript/package.json index 91d3690e9555..79446dd408ee 100644 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1/typescript/package.json +++ b/sdk/resourceconnector/arm-resourceconnector/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/resourcegraph/arm-resourcegraph/package.json b/sdk/resourcegraph/arm-resourcegraph/package.json index 9db9aa40a9cf..4b9e5d529afe 100644 --- a/sdk/resourcegraph/arm-resourcegraph/package.json +++ b/sdk/resourcegraph/arm-resourcegraph/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourcegraph/arm-resourcegraph", "repository": { diff --git a/sdk/resourcegraph/arm-resourcegraph/samples/v5-beta/typescript/package.json b/sdk/resourcegraph/arm-resourcegraph/samples/v5-beta/typescript/package.json index 0afb27b67f06..10b509ac0ab5 100644 --- a/sdk/resourcegraph/arm-resourcegraph/samples/v5-beta/typescript/package.json +++ b/sdk/resourcegraph/arm-resourcegraph/samples/v5-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/resourcehealth/arm-resourcehealth/package.json b/sdk/resourcehealth/arm-resourcehealth/package.json index 098e4ad64ce1..3024179a6e53 100644 --- a/sdk/resourcehealth/arm-resourcehealth/package.json +++ b/sdk/resourcehealth/arm-resourcehealth/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/resourcehealth/arm-resourcehealth/samples/v4-beta/typescript/package.json b/sdk/resourcehealth/arm-resourcehealth/samples/v4-beta/typescript/package.json index bd135b609724..5705e2c8c27d 100644 --- a/sdk/resourcehealth/arm-resourcehealth/samples/v4-beta/typescript/package.json +++ b/sdk/resourcehealth/arm-resourcehealth/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/resourcehealth/arm-resourcehealth/samples/v4/typescript/package.json b/sdk/resourcehealth/arm-resourcehealth/samples/v4/typescript/package.json index d68d69bb0b42..7bec4ecd493c 100644 --- a/sdk/resourcehealth/arm-resourcehealth/samples/v4/typescript/package.json +++ b/sdk/resourcehealth/arm-resourcehealth/samples/v4/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/resourcemover/arm-resourcemover/package.json b/sdk/resourcemover/arm-resourcemover/package.json index 2e88f5b68631..3c5350b4a37a 100644 --- a/sdk/resourcemover/arm-resourcemover/package.json +++ b/sdk/resourcemover/arm-resourcemover/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/resourcemover/arm-resourcemover/samples/v2/typescript/package.json b/sdk/resourcemover/arm-resourcemover/samples/v2/typescript/package.json index 61b07df567fd..da0e28281da7 100644 --- a/sdk/resourcemover/arm-resourcemover/samples/v2/typescript/package.json +++ b/sdk/resourcemover/arm-resourcemover/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/package.json b/sdk/resources-subscriptions/arm-resources-subscriptions/package.json index 83f82bb492cc..2e965b42fb67 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/package.json +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/samples/v2/typescript/package.json b/sdk/resources-subscriptions/arm-resources-subscriptions/samples/v2/typescript/package.json index 9bceaf958fc7..523da1acbb35 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/samples/v2/typescript/package.json +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/package.json b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/package.json index 538aa02b38f8..b952452f4643 100644 --- a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/package.json +++ b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index c8c60d742ac2..7d2240250efa 100644 --- a/sdk/resources/arm-resources-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/resources/arm-resources-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/resources/arm-resources/package.json b/sdk/resources/arm-resources/package.json index d9aa909beb48..443e77a891a7 100644 --- a/sdk/resources/arm-resources/package.json +++ b/sdk/resources/arm-resources/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/resources/arm-resources/samples/v5/typescript/package.json b/sdk/resources/arm-resources/samples/v5/typescript/package.json index b09c290378b2..b5d3fa107317 100644 --- a/sdk/resources/arm-resources/samples/v5/typescript/package.json +++ b/sdk/resources/arm-resources/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/resourcesdeploymentstacks/arm-resourcesdeploymentstacks/package.json b/sdk/resourcesdeploymentstacks/arm-resourcesdeploymentstacks/package.json index 2b19fa14e783..a4848916fff1 100644 --- a/sdk/resourcesdeploymentstacks/arm-resourcesdeploymentstacks/package.json +++ b/sdk/resourcesdeploymentstacks/arm-resourcesdeploymentstacks/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/resourcesdeploymentstacks/arm-resourcesdeploymentstacks/samples/v1/typescript/package.json b/sdk/resourcesdeploymentstacks/arm-resourcesdeploymentstacks/samples/v1/typescript/package.json index 171a05f81ca8..744b160ad101 100644 --- a/sdk/resourcesdeploymentstacks/arm-resourcesdeploymentstacks/samples/v1/typescript/package.json +++ b/sdk/resourcesdeploymentstacks/arm-resourcesdeploymentstacks/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/schemaregistry/perf-tests/schema-registry-avro/package.json b/sdk/schemaregistry/perf-tests/schema-registry-avro/package.json index d62c5d29aabd..ba315bf00dca 100644 --- a/sdk/schemaregistry/perf-tests/schema-registry-avro/package.json +++ b/sdk/schemaregistry/perf-tests/schema-registry-avro/package.json @@ -20,7 +20,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/schemaregistry/schema-registry-avro/package.json b/sdk/schemaregistry/schema-registry-avro/package.json index db2dc1832530..68796db7e9c6 100644 --- a/sdk/schemaregistry/schema-registry-avro/package.json +++ b/sdk/schemaregistry/schema-registry-avro/package.json @@ -93,7 +93,7 @@ "playwright": "^1.47.1", "process": "^0.11.10", "stream": "^0.0.3", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "uuid": "^8.3.0", "vitest": "^2.1.1" }, diff --git a/sdk/schemaregistry/schema-registry-avro/samples/v1-beta/typescript/package.json b/sdk/schemaregistry/schema-registry-avro/samples/v1-beta/typescript/package.json index 8494d3e06d1e..ee5aa7ae1956 100644 --- a/sdk/schemaregistry/schema-registry-avro/samples/v1-beta/typescript/package.json +++ b/sdk/schemaregistry/schema-registry-avro/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/package.json b/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/package.json index 08a4d0982c95..b9b5ac15501e 100644 --- a/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/package.json +++ b/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/schemaregistry/schema-registry-json/package.json b/sdk/schemaregistry/schema-registry-json/package.json index 3a1dde9032ce..a000421ecccf 100644 --- a/sdk/schemaregistry/schema-registry-json/package.json +++ b/sdk/schemaregistry/schema-registry-json/package.json @@ -90,7 +90,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "type": "module", diff --git a/sdk/schemaregistry/schema-registry-json/samples/v1-beta/typescript/package.json b/sdk/schemaregistry/schema-registry-json/samples/v1-beta/typescript/package.json index 20328bee42dc..898092a7396b 100644 --- a/sdk/schemaregistry/schema-registry-json/samples/v1-beta/typescript/package.json +++ b/sdk/schemaregistry/schema-registry-json/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/schemaregistry/schema-registry-json/samples/v1/typescript/package.json b/sdk/schemaregistry/schema-registry-json/samples/v1/typescript/package.json index 9cede8d5b62f..8a32e822d16d 100644 --- a/sdk/schemaregistry/schema-registry-json/samples/v1/typescript/package.json +++ b/sdk/schemaregistry/schema-registry-json/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/schemaregistry/schema-registry/package.json b/sdk/schemaregistry/schema-registry/package.json index b9ebad5efa6d..646d681d4de4 100644 --- a/sdk/schemaregistry/schema-registry/package.json +++ b/sdk/schemaregistry/schema-registry/package.json @@ -93,7 +93,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "type": "module", diff --git a/sdk/schemaregistry/schema-registry/samples/v1-beta/typescript/package.json b/sdk/schemaregistry/schema-registry/samples/v1-beta/typescript/package.json index c07a0e0dde3a..791a2f60564e 100644 --- a/sdk/schemaregistry/schema-registry/samples/v1-beta/typescript/package.json +++ b/sdk/schemaregistry/schema-registry/samples/v1-beta/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/schemaregistry/schema-registry/samples/v1/typescript/package.json b/sdk/schemaregistry/schema-registry/samples/v1/typescript/package.json index 5790f733d3e9..a764a718de07 100644 --- a/sdk/schemaregistry/schema-registry/samples/v1/typescript/package.json +++ b/sdk/schemaregistry/schema-registry/samples/v1/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/scvmm/arm-scvmm/package.json b/sdk/scvmm/arm-scvmm/package.json index 44182b32b5db..cc095373f15b 100644 --- a/sdk/scvmm/arm-scvmm/package.json +++ b/sdk/scvmm/arm-scvmm/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/scvmm/arm-scvmm/samples/v1/typescript/package.json b/sdk/scvmm/arm-scvmm/samples/v1/typescript/package.json index f3808d8460c7..5c3eeb1b3794 100644 --- a/sdk/scvmm/arm-scvmm/samples/v1/typescript/package.json +++ b/sdk/scvmm/arm-scvmm/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/search/arm-search/package.json b/sdk/search/arm-search/package.json index 7b9c413662f8..2b5ae0ce300f 100644 --- a/sdk/search/arm-search/package.json +++ b/sdk/search/arm-search/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/search/arm-search/samples/v4-beta/typescript/package.json b/sdk/search/arm-search/samples/v4-beta/typescript/package.json index 4b3a9002c88d..31be861d85b1 100644 --- a/sdk/search/arm-search/samples/v4-beta/typescript/package.json +++ b/sdk/search/arm-search/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/search/perf-tests/search-documents/package.json b/sdk/search/perf-tests/search-documents/package.json index a65d79a01acf..4ff0f37fbb31 100644 --- a/sdk/search/perf-tests/search-documents/package.json +++ b/sdk/search/perf-tests/search-documents/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/search/search-documents/package.json b/sdk/search/search-documents/package.json index f3226e218afd..2cb48b1cd567 100644 --- a/sdk/search/search-documents/package.json +++ b/sdk/search/search-documents/package.json @@ -105,7 +105,7 @@ "eslint": "^9.9.0", "playwright": "^1.49.0", "type-plus": "^7.6.2", - "typescript": "~5.3.3", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "//sampleConfiguration": { diff --git a/sdk/search/search-documents/samples/v11/typescript/package.json b/sdk/search/search-documents/samples/v11/typescript/package.json index df9222d4e089..0fcd5ed99a93 100644 --- a/sdk/search/search-documents/samples/v11/typescript/package.json +++ b/sdk/search/search-documents/samples/v11/typescript/package.json @@ -30,7 +30,7 @@ "dotenv": "latest" }, "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/search/search-documents/samples/v12-beta/typescript/package.json b/sdk/search/search-documents/samples/v12-beta/typescript/package.json index adf29c5acb21..e101f5d7e30c 100644 --- a/sdk/search/search-documents/samples/v12-beta/typescript/package.json +++ b/sdk/search/search-documents/samples/v12-beta/typescript/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/search/search-documents/samples/v12/typescript/package.json b/sdk/search/search-documents/samples/v12/typescript/package.json index 8ce82e464b44..9aa547f6f5bd 100644 --- a/sdk/search/search-documents/samples/v12/typescript/package.json +++ b/sdk/search/search-documents/samples/v12/typescript/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json index 08ec1c896ff7..a8b40cc35f27 100644 --- a/sdk/security/arm-security/package.json +++ b/sdk/security/arm-security/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/security/arm-security/samples/v6-beta/typescript/package.json b/sdk/security/arm-security/samples/v6-beta/typescript/package.json index 240bbdca847b..0ec5f621d214 100644 --- a/sdk/security/arm-security/samples/v6-beta/typescript/package.json +++ b/sdk/security/arm-security/samples/v6-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/securitydevops/arm-securitydevops/package.json b/sdk/securitydevops/arm-securitydevops/package.json index bfe85bd99f51..2ad2f6f05432 100644 --- a/sdk/securitydevops/arm-securitydevops/package.json +++ b/sdk/securitydevops/arm-securitydevops/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/securitydevops/arm-securitydevops/samples/v1-beta/typescript/package.json b/sdk/securitydevops/arm-securitydevops/samples/v1-beta/typescript/package.json index 0acb0e7dccd2..aaa8d0547ca7 100644 --- a/sdk/securitydevops/arm-securitydevops/samples/v1-beta/typescript/package.json +++ b/sdk/securitydevops/arm-securitydevops/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/securityinsight/arm-securityinsight/package.json b/sdk/securityinsight/arm-securityinsight/package.json index 865351ac2be3..c197286c5dd4 100644 --- a/sdk/securityinsight/arm-securityinsight/package.json +++ b/sdk/securityinsight/arm-securityinsight/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/securityinsight/arm-securityinsight/samples/v1-beta/typescript/package.json b/sdk/securityinsight/arm-securityinsight/samples/v1-beta/typescript/package.json index 3b61a044779d..ef51f4c42853 100644 --- a/sdk/securityinsight/arm-securityinsight/samples/v1-beta/typescript/package.json +++ b/sdk/securityinsight/arm-securityinsight/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/selfhelp/arm-selfhelp/package.json b/sdk/selfhelp/arm-selfhelp/package.json index a82a48e765d6..d94ef395a47d 100644 --- a/sdk/selfhelp/arm-selfhelp/package.json +++ b/sdk/selfhelp/arm-selfhelp/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/selfhelp/arm-selfhelp/samples/v2-beta/typescript/package.json b/sdk/selfhelp/arm-selfhelp/samples/v2-beta/typescript/package.json index 3458c4cd61f2..c4fa774bee97 100644 --- a/sdk/selfhelp/arm-selfhelp/samples/v2-beta/typescript/package.json +++ b/sdk/selfhelp/arm-selfhelp/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/serialconsole/arm-serialconsole/package.json b/sdk/serialconsole/arm-serialconsole/package.json index a924030c6afa..9908247dac36 100644 --- a/sdk/serialconsole/arm-serialconsole/package.json +++ b/sdk/serialconsole/arm-serialconsole/package.json @@ -35,7 +35,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/serialconsole/arm-serialconsole", "repository": { diff --git a/sdk/serialconsole/arm-serialconsole/samples/v2/typescript/package.json b/sdk/serialconsole/arm-serialconsole/samples/v2/typescript/package.json index 213f57128887..e98ca3fda680 100644 --- a/sdk/serialconsole/arm-serialconsole/samples/v2/typescript/package.json +++ b/sdk/serialconsole/arm-serialconsole/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/service-map/arm-servicemap/package.json b/sdk/service-map/arm-servicemap/package.json index 45e4d5d58731..ab00a46c3560 100644 --- a/sdk/service-map/arm-servicemap/package.json +++ b/sdk/service-map/arm-servicemap/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/service-map/arm-servicemap/samples/v3-beta/typescript/package.json b/sdk/service-map/arm-servicemap/samples/v3-beta/typescript/package.json index 2232195d3e79..b72a2c927b4c 100644 --- a/sdk/service-map/arm-servicemap/samples/v3-beta/typescript/package.json +++ b/sdk/service-map/arm-servicemap/samples/v3-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicebus/arm-servicebus/package.json b/sdk/servicebus/arm-servicebus/package.json index fdc21a83eb52..539b6d9ac2bf 100644 --- a/sdk/servicebus/arm-servicebus/package.json +++ b/sdk/servicebus/arm-servicebus/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/servicebus/arm-servicebus/samples/v6-beta/typescript/package.json b/sdk/servicebus/arm-servicebus/samples/v6-beta/typescript/package.json index c790903af4cc..00f4150b506e 100644 --- a/sdk/servicebus/arm-servicebus/samples/v6-beta/typescript/package.json +++ b/sdk/servicebus/arm-servicebus/samples/v6-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicebus/perf-tests/service-bus-track-1/package.json b/sdk/servicebus/perf-tests/service-bus-track-1/package.json index 0dee24d03810..68662576a5c6 100644 --- a/sdk/servicebus/perf-tests/service-bus-track-1/package.json +++ b/sdk/servicebus/perf-tests/service-bus-track-1/package.json @@ -20,7 +20,7 @@ "eslint": "^9.9.0", "ts-node": "^8.3.0", "tslib": "^2.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/servicebus/perf-tests/service-bus/package.json b/sdk/servicebus/perf-tests/service-bus/package.json index 43ab0b1d7c86..7e2722d53f8b 100644 --- a/sdk/servicebus/perf-tests/service-bus/package.json +++ b/sdk/servicebus/perf-tests/service-bus/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/servicebus/service-bus/package.json b/sdk/servicebus/service-bus/package.json index bec97a08eef9..5d6279ad0c36 100644 --- a/sdk/servicebus/service-bus/package.json +++ b/sdk/servicebus/service-bus/package.json @@ -130,7 +130,7 @@ "events": "^3.0.0", "https-proxy-agent": "^7.0.0", "playwright": "^1.46.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "uuid": "^8.3.0", "vitest": "^2.1.2", "ws": "^8.0.0" diff --git a/sdk/servicebus/service-bus/samples/v7-beta/typescript/package.json b/sdk/servicebus/service-bus/samples/v7-beta/typescript/package.json index 5d9c5751da30..d665d4d2030f 100644 --- a/sdk/servicebus/service-bus/samples/v7-beta/typescript/package.json +++ b/sdk/servicebus/service-bus/samples/v7-beta/typescript/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@types/ws": "^7.2.4", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicebus/service-bus/samples/v7/typescript/package.json b/sdk/servicebus/service-bus/samples/v7/typescript/package.json index 3bf95e1fe010..9e8f8f59c1cc 100644 --- a/sdk/servicebus/service-bus/samples/v7/typescript/package.json +++ b/sdk/servicebus/service-bus/samples/v7/typescript/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@types/ws": "^7.2.4", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicebus/service-bus/test/stress/app/package.json b/sdk/servicebus/service-bus/test/stress/app/package.json index 0fe8cf27cd12..77c59139687c 100644 --- a/sdk/servicebus/service-bus/test/stress/app/package.json +++ b/sdk/servicebus/service-bus/test/stress/app/package.json @@ -21,6 +21,6 @@ "@types/minimist": "^1.2.1", "@types/node": "^18.0.0", "@types/uuid": "^8.3.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" } } diff --git a/sdk/servicefabric/arm-servicefabric-rest/package.json b/sdk/servicefabric/arm-servicefabric-rest/package.json index 93b7ab839d8c..07cf2b41308a 100644 --- a/sdk/servicefabric/arm-servicefabric-rest/package.json +++ b/sdk/servicefabric/arm-servicefabric-rest/package.json @@ -105,7 +105,7 @@ "nyc": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "browser": { "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js" diff --git a/sdk/servicefabric/arm-servicefabric-rest/samples/v1-beta/typescript/package.json b/sdk/servicefabric/arm-servicefabric-rest/samples/v1-beta/typescript/package.json index f3dec044c026..0165f85e5833 100644 --- a/sdk/servicefabric/arm-servicefabric-rest/samples/v1-beta/typescript/package.json +++ b/sdk/servicefabric/arm-servicefabric-rest/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicefabric/arm-servicefabric/package.json b/sdk/servicefabric/arm-servicefabric/package.json index 64d8c15cad8d..fc16ca6871bb 100644 --- a/sdk/servicefabric/arm-servicefabric/package.json +++ b/sdk/servicefabric/arm-servicefabric/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/servicefabric/arm-servicefabric/samples/v3/typescript/package.json b/sdk/servicefabric/arm-servicefabric/samples/v3/typescript/package.json index 0839c6cfbd9f..0f9dcb3d0d53 100644 --- a/sdk/servicefabric/arm-servicefabric/samples/v3/typescript/package.json +++ b/sdk/servicefabric/arm-servicefabric/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json index 5370d0ad8bf8..da9b75af049e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-servicefabricmanagedclusters.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json index 0a9bb4cb1de0..1431aad39bd0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicefabricmesh/arm-servicefabricmesh/package.json b/sdk/servicefabricmesh/arm-servicefabricmesh/package.json index d9e26c7086b3..9d6b7f20a6c9 100644 --- a/sdk/servicefabricmesh/arm-servicefabricmesh/package.json +++ b/sdk/servicefabricmesh/arm-servicefabricmesh/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/servicefabricmesh/arm-servicefabricmesh/samples/v3-beta/typescript/package.json b/sdk/servicefabricmesh/arm-servicefabricmesh/samples/v3-beta/typescript/package.json index 423b9b5a62e7..8441502017a8 100644 --- a/sdk/servicefabricmesh/arm-servicefabricmesh/samples/v3-beta/typescript/package.json +++ b/sdk/servicefabricmesh/arm-servicefabricmesh/samples/v3-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicelinker/arm-servicelinker/package.json b/sdk/servicelinker/arm-servicelinker/package.json index 5952105f6e83..4ade7f302bba 100644 --- a/sdk/servicelinker/arm-servicelinker/package.json +++ b/sdk/servicelinker/arm-servicelinker/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-servicelinker.d.ts", "devDependencies": { - "typescript": "~5.6.2", + "typescript": "~5.7.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", diff --git a/sdk/servicelinker/arm-servicelinker/samples/v2-beta/typescript/package.json b/sdk/servicelinker/arm-servicelinker/samples/v2-beta/typescript/package.json index 14c3482dde8f..256092ed8157 100644 --- a/sdk/servicelinker/arm-servicelinker/samples/v2-beta/typescript/package.json +++ b/sdk/servicelinker/arm-servicelinker/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicenetworking/arm-servicenetworking/package.json b/sdk/servicenetworking/arm-servicenetworking/package.json index b7785514db7f..a58cad4de2fd 100644 --- a/sdk/servicenetworking/arm-servicenetworking/package.json +++ b/sdk/servicenetworking/arm-servicenetworking/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/servicenetworking/arm-servicenetworking/samples/v1-beta/typescript/package.json b/sdk/servicenetworking/arm-servicenetworking/samples/v1-beta/typescript/package.json index 87a4436fa548..1d5d3534c896 100644 --- a/sdk/servicenetworking/arm-servicenetworking/samples/v1-beta/typescript/package.json +++ b/sdk/servicenetworking/arm-servicenetworking/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/servicenetworking/arm-servicenetworking/samples/v1/typescript/package.json b/sdk/servicenetworking/arm-servicenetworking/samples/v1/typescript/package.json index bd0816ee8394..0633d92c1bbf 100644 --- a/sdk/servicenetworking/arm-servicenetworking/samples/v1/typescript/package.json +++ b/sdk/servicenetworking/arm-servicenetworking/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/signalr/arm-signalr/package.json b/sdk/signalr/arm-signalr/package.json index cf25fdfc8f93..41e0af0c2b40 100644 --- a/sdk/signalr/arm-signalr/package.json +++ b/sdk/signalr/arm-signalr/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/signalr/arm-signalr/samples/v5/typescript/package.json b/sdk/signalr/arm-signalr/samples/v5/typescript/package.json index 49ea04ac9897..53432aff53ff 100644 --- a/sdk/signalr/arm-signalr/samples/v5/typescript/package.json +++ b/sdk/signalr/arm-signalr/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/signalr/arm-signalr/samples/v6-beta/typescript/package.json b/sdk/signalr/arm-signalr/samples/v6-beta/typescript/package.json index 91dcc5c9e385..737a338f0130 100644 --- a/sdk/signalr/arm-signalr/samples/v6-beta/typescript/package.json +++ b/sdk/signalr/arm-signalr/samples/v6-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/sphere/arm-sphere/package.json b/sdk/sphere/arm-sphere/package.json index a6af11629d17..26801347ea42 100644 --- a/sdk/sphere/arm-sphere/package.json +++ b/sdk/sphere/arm-sphere/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/sphere/arm-sphere/samples/v1/typescript/package.json b/sdk/sphere/arm-sphere/samples/v1/typescript/package.json index 7361936cf79d..74a82c58ab8e 100644 --- a/sdk/sphere/arm-sphere/samples/v1/typescript/package.json +++ b/sdk/sphere/arm-sphere/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/springappdiscovery/arm-springappdiscovery/package.json b/sdk/springappdiscovery/arm-springappdiscovery/package.json index 1c1217eef0c1..612be4f29ae4 100644 --- a/sdk/springappdiscovery/arm-springappdiscovery/package.json +++ b/sdk/springappdiscovery/arm-springappdiscovery/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/springappdiscovery/arm-springappdiscovery/samples/v1-beta/typescript/package.json b/sdk/springappdiscovery/arm-springappdiscovery/samples/v1-beta/typescript/package.json index 3ae942d39444..48e680d4fee8 100644 --- a/sdk/springappdiscovery/arm-springappdiscovery/samples/v1-beta/typescript/package.json +++ b/sdk/springappdiscovery/arm-springappdiscovery/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/sql/arm-sql/package.json b/sdk/sql/arm-sql/package.json index 16b3abb7a092..118a49ed00ac 100644 --- a/sdk/sql/arm-sql/package.json +++ b/sdk/sql/arm-sql/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/sql/arm-sql/samples/v11-beta/typescript/package.json b/sdk/sql/arm-sql/samples/v11-beta/typescript/package.json index 3ca85fccb2c8..c091cfada437 100644 --- a/sdk/sql/arm-sql/samples/v11-beta/typescript/package.json +++ b/sdk/sql/arm-sql/samples/v11-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/package.json b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/package.json index 9e0ed870ca87..7415c057db58 100644 --- a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/package.json +++ b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/samples/v5-beta/typescript/package.json b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/samples/v5-beta/typescript/package.json index 8518787bc732..cf9308b4687a 100644 --- a/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/samples/v5-beta/typescript/package.json +++ b/sdk/sqlvirtualmachine/arm-sqlvirtualmachine/samples/v5-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/standbypool/arm-standbypool/package.json b/sdk/standbypool/arm-standbypool/package.json index 182a7a56962b..73f6e1e61738 100644 --- a/sdk/standbypool/arm-standbypool/package.json +++ b/sdk/standbypool/arm-standbypool/package.json @@ -79,7 +79,7 @@ "eslint": "^9.9.0", "playwright": "^1.41.2", "prettier": "^3.2.5", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "scripts": { diff --git a/sdk/standbypool/arm-standbypool/samples/v1/typescript/package.json b/sdk/standbypool/arm-standbypool/samples/v1/typescript/package.json index 2eaad5074105..43ed3561a058 100644 --- a/sdk/standbypool/arm-standbypool/samples/v1/typescript/package.json +++ b/sdk/standbypool/arm-standbypool/samples/v1/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/package.json b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/package.json index 2d6192f48132..e90d51f3522e 100644 --- a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/package.json +++ b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index 16c697aa9245..7227ccf761f5 100644 --- a/sdk/storage/arm-storage-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/storage/arm-storage-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storage/arm-storage/package.json b/sdk/storage/arm-storage/package.json index b4a14a52e204..bcb6bb662b30 100644 --- a/sdk/storage/arm-storage/package.json +++ b/sdk/storage/arm-storage/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/storage/arm-storage/samples/v18/typescript/package.json b/sdk/storage/arm-storage/samples/v18/typescript/package.json index 2e0a6cc3d54a..f04e8032737e 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/package.json +++ b/sdk/storage/arm-storage/samples/v18/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storage/perf-tests/storage-blob-track-1/package.json b/sdk/storage/perf-tests/storage-blob-track-1/package.json index d9804bdd3474..3f765ec0b358 100644 --- a/sdk/storage/perf-tests/storage-blob-track-1/package.json +++ b/sdk/storage/perf-tests/storage-blob-track-1/package.json @@ -16,7 +16,7 @@ "tslib": "^2.0.0", "rimraf": "^5.0.5", "ts-node": "^8.3.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/storage/perf-tests/storage-blob/package.json b/sdk/storage/perf-tests/storage-blob/package.json index 78d5b45df57b..405ec69ec126 100644 --- a/sdk/storage/perf-tests/storage-blob/package.json +++ b/sdk/storage/perf-tests/storage-blob/package.json @@ -20,7 +20,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/storage/perf-tests/storage-file-datalake/package.json b/sdk/storage/perf-tests/storage-file-datalake/package.json index eecc46585a0f..bd2018d051c3 100644 --- a/sdk/storage/perf-tests/storage-file-datalake/package.json +++ b/sdk/storage/perf-tests/storage-file-datalake/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/storage/perf-tests/storage-file-share-track-1/package.json b/sdk/storage/perf-tests/storage-file-share-track-1/package.json index ebf93741f50d..dfb35f62f5be 100644 --- a/sdk/storage/perf-tests/storage-file-share-track-1/package.json +++ b/sdk/storage/perf-tests/storage-file-share-track-1/package.json @@ -16,7 +16,7 @@ "rimraf": "3.0.2", "tslib": "^2.0.0", "ts-node": "^8.3.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/storage/perf-tests/storage-file-share/package.json b/sdk/storage/perf-tests/storage-file-share/package.json index d2b7094e8768..edb8d0ff2587 100644 --- a/sdk/storage/perf-tests/storage-file-share/package.json +++ b/sdk/storage/perf-tests/storage-file-share/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/storage/storage-blob-changefeed/package.json b/sdk/storage/storage-blob-changefeed/package.json index 670b4d092bc6..e8c1d6f76418 100644 --- a/sdk/storage/storage-blob-changefeed/package.json +++ b/sdk/storage/storage-blob-changefeed/package.json @@ -125,7 +125,7 @@ "sinon": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1" }, "//sampleConfiguration": { diff --git a/sdk/storage/storage-blob-changefeed/samples/v12-beta/typescript/package.json b/sdk/storage/storage-blob-changefeed/samples/v12-beta/typescript/package.json index 9a6f50c0e2af..3d8ea8705bfa 100644 --- a/sdk/storage/storage-blob-changefeed/samples/v12-beta/typescript/package.json +++ b/sdk/storage/storage-blob-changefeed/samples/v12-beta/typescript/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storage/storage-blob/package.json b/sdk/storage/storage-blob/package.json index 39581dd240ce..79658b411560 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -168,7 +168,7 @@ "puppeteer": "^23.0.2", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1" } } diff --git a/sdk/storage/storage-blob/samples/v12/typescript/package.json b/sdk/storage/storage-blob/samples/v12/typescript/package.json index cb371fcaf21f..0749b12adb8f 100644 --- a/sdk/storage/storage-blob/samples/v12/typescript/package.json +++ b/sdk/storage/storage-blob/samples/v12/typescript/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storage/storage-blob/src/utils/utils.node.ts b/sdk/storage/storage-blob/src/utils/utils.node.ts index 2bb64f0b6bff..2ae4186f0c32 100644 --- a/sdk/storage/storage-blob/src/utils/utils.node.ts +++ b/sdk/storage/storage-blob/src/utils/utils.node.ts @@ -129,7 +129,7 @@ export async function streamToBuffer3( return new Promise((resolve, reject) => { const chunks: Buffer[] = []; readableStream.on("data", (data: Buffer | string) => { - chunks.push(data instanceof Buffer ? data : Buffer.from(data, encoding)); + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); }); readableStream.on("end", () => { resolve(Buffer.concat(chunks)); diff --git a/sdk/storage/storage-blob/test/utils/index.ts b/sdk/storage/storage-blob/test/utils/index.ts index ea37a6650b51..cd706199577b 100644 --- a/sdk/storage/storage-blob/test/utils/index.ts +++ b/sdk/storage/storage-blob/test/utils/index.ts @@ -235,8 +235,8 @@ export async function createRandomLocalFile( const ws = fs.createWriteStream(destFile); let offsetInMB = 0; - function randomValueHex(blockIndex: number) { - if (blockSizeOrContent instanceof Buffer) { + function randomValueHex(blockIndex: number): string | Buffer { + if (typeof blockSizeOrContent !== "number") { return blockSizeOrContent; } diff --git a/sdk/storage/storage-file-datalake/package.json b/sdk/storage/storage-file-datalake/package.json index 8515ffc96461..6f749f9714d6 100644 --- a/sdk/storage/storage-file-datalake/package.json +++ b/sdk/storage/storage-file-datalake/package.json @@ -163,7 +163,7 @@ "sinon": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1" } } diff --git a/sdk/storage/storage-file-datalake/samples/v12/typescript/package.json b/sdk/storage/storage-file-datalake/samples/v12/typescript/package.json index 9fd168a617f9..30c49e0e81a5 100644 --- a/sdk/storage/storage-file-datalake/samples/v12/typescript/package.json +++ b/sdk/storage/storage-file-datalake/samples/v12/typescript/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storage/storage-file-datalake/test/browser/highlevel.browser.spec.ts b/sdk/storage/storage-file-datalake/test/browser/highlevel.browser.spec.ts index 0f8d153c4592..ade2b9569e99 100644 --- a/sdk/storage/storage-file-datalake/test/browser/highlevel.browser.spec.ts +++ b/sdk/storage/storage-file-datalake/test/browser/highlevel.browser.spec.ts @@ -167,7 +167,7 @@ describe("Highlevel browser only", () => { const uint8ArrayPartial = new Uint8Array(arrayBuf, 1, 3); await fileClient.upload(uint8ArrayPartial); const downloadedBlob2 = await (await fileClient.read()).contentAsBlob!; - assert.ok(arrayBufferEqual(await downloadedBlob2.arrayBuffer(), uint8ArrayPartial)); + assert.ok(arrayBufferEqual(await downloadedBlob2.arrayBuffer(), uint8ArrayPartial.buffer)); const uint16Array = new Uint16Array(arrayBuf, 4, 2); await fileClient.upload(uint16Array); @@ -175,7 +175,7 @@ describe("Highlevel browser only", () => { assert.ok( arrayBufferEqual( await downloadedBlob3.arrayBuffer(), - new Uint8Array(uint16Array.buffer, uint16Array.byteOffset, uint16Array.byteLength), + new Uint8Array(uint16Array.buffer, uint16Array.byteOffset, uint16Array.byteLength).buffer, ), ); }); diff --git a/sdk/storage/storage-file-share/package.json b/sdk/storage/storage-file-share/package.json index 894a9ddc044b..f29d07caed49 100644 --- a/sdk/storage/storage-file-share/package.json +++ b/sdk/storage/storage-file-share/package.json @@ -161,7 +161,7 @@ "sinon": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1" } } diff --git a/sdk/storage/storage-file-share/samples/v12/typescript/package.json b/sdk/storage/storage-file-share/samples/v12/typescript/package.json index 65eee84117a6..f9d4ec1379fc 100644 --- a/sdk/storage/storage-file-share/samples/v12/typescript/package.json +++ b/sdk/storage/storage-file-share/samples/v12/typescript/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storage/storage-internal-avro/package.json b/sdk/storage/storage-internal-avro/package.json index 7c32349bbce3..bccb632dd831 100644 --- a/sdk/storage/storage-internal-avro/package.json +++ b/sdk/storage/storage-internal-avro/package.json @@ -91,7 +91,7 @@ "puppeteer": "^23.0.2", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1" } } diff --git a/sdk/storage/storage-queue/package.json b/sdk/storage/storage-queue/package.json index 1f37d6458281..acfde3ed5bc6 100644 --- a/sdk/storage/storage-queue/package.json +++ b/sdk/storage/storage-queue/package.json @@ -152,7 +152,7 @@ "puppeteer": "^23.0.2", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "util": "^0.12.1" } } diff --git a/sdk/storage/storage-queue/samples/v12/typescript/package.json b/sdk/storage/storage-queue/samples/v12/typescript/package.json index b8d71795e6f7..33c30039b264 100644 --- a/sdk/storage/storage-queue/samples/v12/typescript/package.json +++ b/sdk/storage/storage-queue/samples/v12/typescript/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storageactions/arm-storageactions/package.json b/sdk/storageactions/arm-storageactions/package.json index b33bc6565634..f9ba4137f803 100644 --- a/sdk/storageactions/arm-storageactions/package.json +++ b/sdk/storageactions/arm-storageactions/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/storageactions/arm-storageactions/samples/v1-beta/typescript/package.json b/sdk/storageactions/arm-storageactions/samples/v1-beta/typescript/package.json index de6d333d725e..f97351ede9ce 100644 --- a/sdk/storageactions/arm-storageactions/samples/v1-beta/typescript/package.json +++ b/sdk/storageactions/arm-storageactions/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storagecache/arm-storagecache/package.json b/sdk/storagecache/arm-storagecache/package.json index 3db9beb3d19f..489a502c6eda 100644 --- a/sdk/storagecache/arm-storagecache/package.json +++ b/sdk/storagecache/arm-storagecache/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/storagecache/arm-storagecache/samples/v8/typescript/package.json b/sdk/storagecache/arm-storagecache/samples/v8/typescript/package.json index d4a40a397a06..80ce6aefbe10 100644 --- a/sdk/storagecache/arm-storagecache/samples/v8/typescript/package.json +++ b/sdk/storagecache/arm-storagecache/samples/v8/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storageimportexport/arm-storageimportexport/package.json b/sdk/storageimportexport/arm-storageimportexport/package.json index dbd024ac06c6..b252b2e50323 100644 --- a/sdk/storageimportexport/arm-storageimportexport/package.json +++ b/sdk/storageimportexport/arm-storageimportexport/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/storageimportexport/arm-storageimportexport/samples/v2/typescript/package.json b/sdk/storageimportexport/arm-storageimportexport/samples/v2/typescript/package.json index cf15237e16d9..193ec238d5ed 100644 --- a/sdk/storageimportexport/arm-storageimportexport/samples/v2/typescript/package.json +++ b/sdk/storageimportexport/arm-storageimportexport/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storagemover/arm-storagemover/package.json b/sdk/storagemover/arm-storagemover/package.json index 6f5cbd5808f7..7c931d099e2e 100644 --- a/sdk/storagemover/arm-storagemover/package.json +++ b/sdk/storagemover/arm-storagemover/package.json @@ -40,7 +40,7 @@ "mocha": "^11.0.2", "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/storagemover/arm-storagemover/samples/v2/typescript/package.json b/sdk/storagemover/arm-storagemover/samples/v2/typescript/package.json index b6fba6ae8b21..358bcab2c022 100644 --- a/sdk/storagemover/arm-storagemover/samples/v2/typescript/package.json +++ b/sdk/storagemover/arm-storagemover/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storagesync/arm-storagesync/package.json b/sdk/storagesync/arm-storagesync/package.json index 186e657d13e5..c477135a8bd2 100644 --- a/sdk/storagesync/arm-storagesync/package.json +++ b/sdk/storagesync/arm-storagesync/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagesync/arm-storagesync", "repository": { diff --git a/sdk/storagesync/arm-storagesync/samples/v9/typescript/package.json b/sdk/storagesync/arm-storagesync/samples/v9/typescript/package.json index 19d6c57de495..eaf250c995ec 100644 --- a/sdk/storagesync/arm-storagesync/samples/v9/typescript/package.json +++ b/sdk/storagesync/arm-storagesync/samples/v9/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storsimple1200series/arm-storsimple1200series/package.json b/sdk/storsimple1200series/arm-storsimple1200series/package.json index 9418cae9e631..6bce4d1200e3 100644 --- a/sdk/storsimple1200series/arm-storsimple1200series/package.json +++ b/sdk/storsimple1200series/arm-storsimple1200series/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storsimple1200series/arm-storsimple1200series", "repository": { diff --git a/sdk/storsimple1200series/arm-storsimple1200series/samples/v2/typescript/package.json b/sdk/storsimple1200series/arm-storsimple1200series/samples/v2/typescript/package.json index 18147bbd7ab9..ad8de77459f0 100644 --- a/sdk/storsimple1200series/arm-storsimple1200series/samples/v2/typescript/package.json +++ b/sdk/storsimple1200series/arm-storsimple1200series/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/storsimple8000series/arm-storsimple8000series/package.json b/sdk/storsimple8000series/arm-storsimple8000series/package.json index 58883001ba38..3fb554e12518 100644 --- a/sdk/storsimple8000series/arm-storsimple8000series/package.json +++ b/sdk/storsimple8000series/arm-storsimple8000series/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storsimple8000series/arm-storsimple8000series", "repository": { diff --git a/sdk/storsimple8000series/arm-storsimple8000series/samples/v2/typescript/package.json b/sdk/storsimple8000series/arm-storsimple8000series/samples/v2/typescript/package.json index 5238c05ae515..53bb7301f875 100644 --- a/sdk/storsimple8000series/arm-storsimple8000series/samples/v2/typescript/package.json +++ b/sdk/storsimple8000series/arm-storsimple8000series/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/streamanalytics/arm-streamanalytics/package.json b/sdk/streamanalytics/arm-streamanalytics/package.json index 400994dbf99b..2903b96fa85e 100644 --- a/sdk/streamanalytics/arm-streamanalytics/package.json +++ b/sdk/streamanalytics/arm-streamanalytics/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/streamanalytics/arm-streamanalytics/samples/v5-beta/typescript/package.json b/sdk/streamanalytics/arm-streamanalytics/samples/v5-beta/typescript/package.json index e7805af284dd..686cf6848396 100644 --- a/sdk/streamanalytics/arm-streamanalytics/samples/v5-beta/typescript/package.json +++ b/sdk/streamanalytics/arm-streamanalytics/samples/v5-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/package.json b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/package.json index af20703b4cc0..0d56ded958bd 100644 --- a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/package.json +++ b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/samples/v2/typescript/package.json b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/samples/v2/typescript/package.json index b54f9faf3965..e2042493aeaa 100644 --- a/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/samples/v2/typescript/package.json +++ b/sdk/subscription/arm-subscriptions-profile-2020-09-01-hybrid/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/subscription/arm-subscriptions/package.json b/sdk/subscription/arm-subscriptions/package.json index e7497584b076..b50470770a94 100644 --- a/sdk/subscription/arm-subscriptions/package.json +++ b/sdk/subscription/arm-subscriptions/package.json @@ -38,7 +38,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/subscription/arm-subscriptions", "repository": { diff --git a/sdk/subscription/arm-subscriptions/samples/v5/typescript/package.json b/sdk/subscription/arm-subscriptions/samples/v5/typescript/package.json index 8fbdd27dbb9b..870af10ec082 100644 --- a/sdk/subscription/arm-subscriptions/samples/v5/typescript/package.json +++ b/sdk/subscription/arm-subscriptions/samples/v5/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/support/arm-support/package.json b/sdk/support/arm-support/package.json index da2c343c626b..e7efa5ada645 100644 --- a/sdk/support/arm-support/package.json +++ b/sdk/support/arm-support/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/support/arm-support/samples/v3/typescript/package.json b/sdk/support/arm-support/samples/v3/typescript/package.json index c8a194e85def..ea06f6de098d 100644 --- a/sdk/support/arm-support/samples/v3/typescript/package.json +++ b/sdk/support/arm-support/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/synapse/arm-synapse/package.json b/sdk/synapse/arm-synapse/package.json index 053a7e6ff2e8..2ea35e0646d5 100644 --- a/sdk/synapse/arm-synapse/package.json +++ b/sdk/synapse/arm-synapse/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/synapse/arm-synapse/samples/v9-beta/typescript/package.json b/sdk/synapse/arm-synapse/samples/v9-beta/typescript/package.json index 59899bc9a8f7..1582e2dc30ba 100644 --- a/sdk/synapse/arm-synapse/samples/v9-beta/typescript/package.json +++ b/sdk/synapse/arm-synapse/samples/v9-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/synapse/synapse-access-control-rest/package.json b/sdk/synapse/synapse-access-control-rest/package.json index 2f096c8cd462..973b70c5b66b 100644 --- a/sdk/synapse/synapse-access-control-rest/package.json +++ b/sdk/synapse/synapse-access-control-rest/package.json @@ -51,7 +51,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "bugs": { diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1-beta/typescript/package.json b/sdk/synapse/synapse-access-control-rest/samples/v1-beta/typescript/package.json index d23a5389c45d..e9b6d2999843 100644 --- a/sdk/synapse/synapse-access-control-rest/samples/v1-beta/typescript/package.json +++ b/sdk/synapse/synapse-access-control-rest/samples/v1-beta/typescript/package.json @@ -38,7 +38,7 @@ "devDependencies": { "@types/uuid": "^8.0.0", "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/synapse/synapse-access-control/package.json b/sdk/synapse/synapse-access-control/package.json index 4e8a0a7f0814..c6703c56b7c8 100644 --- a/sdk/synapse/synapse-access-control/package.json +++ b/sdk/synapse/synapse-access-control/package.json @@ -54,7 +54,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "bugs": { diff --git a/sdk/synapse/synapse-artifacts/package.json b/sdk/synapse/synapse-artifacts/package.json index 9bc75161aef2..9a39d89781a7 100644 --- a/sdk/synapse/synapse-artifacts/package.json +++ b/sdk/synapse/synapse-artifacts/package.json @@ -44,7 +44,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "bugs": { diff --git a/sdk/synapse/synapse-managed-private-endpoints/package.json b/sdk/synapse/synapse-managed-private-endpoints/package.json index e6aa4ed11109..5b63d4626a84 100644 --- a/sdk/synapse/synapse-managed-private-endpoints/package.json +++ b/sdk/synapse/synapse-managed-private-endpoints/package.json @@ -54,7 +54,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "bugs": { diff --git a/sdk/synapse/synapse-monitoring/package.json b/sdk/synapse/synapse-monitoring/package.json index 7421793a44da..2d527a4554fa 100644 --- a/sdk/synapse/synapse-monitoring/package.json +++ b/sdk/synapse/synapse-monitoring/package.json @@ -39,7 +39,7 @@ "@vitest/coverage-istanbul": "^2.1.5", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "bugs": { diff --git a/sdk/synapse/synapse-spark/package.json b/sdk/synapse/synapse-spark/package.json index 849f6a210617..3f8f5a28e5ee 100644 --- a/sdk/synapse/synapse-spark/package.json +++ b/sdk/synapse/synapse-spark/package.json @@ -40,7 +40,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "//metadata": { diff --git a/sdk/tables/data-tables/package.json b/sdk/tables/data-tables/package.json index 1fa5f9ea3770..24660647e206 100644 --- a/sdk/tables/data-tables/package.json +++ b/sdk/tables/data-tables/package.json @@ -78,7 +78,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.6" }, "//sampleConfiguration": { diff --git a/sdk/tables/data-tables/samples/v12/typescript/package.json b/sdk/tables/data-tables/samples/v12/typescript/package.json index 508c483a4999..16a381eb49b1 100644 --- a/sdk/tables/data-tables/samples/v12/typescript/package.json +++ b/sdk/tables/data-tables/samples/v12/typescript/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "@types/uuid": "^8.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/tables/data-tables/samples/v13/typescript/package.json b/sdk/tables/data-tables/samples/v13/typescript/package.json index 508c483a4999..16a381eb49b1 100644 --- a/sdk/tables/data-tables/samples/v13/typescript/package.json +++ b/sdk/tables/data-tables/samples/v13/typescript/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "@types/uuid": "^8.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/tables/perf-tests/data-tables/package.json b/sdk/tables/perf-tests/data-tables/package.json index 3a14aed80428..7534cd0ec5b8 100644 --- a/sdk/tables/perf-tests/data-tables/package.json +++ b/sdk/tables/perf-tests/data-tables/package.json @@ -19,7 +19,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/template/perf-tests/template/package.json b/sdk/template/perf-tests/template/package.json index de5c6d86a4e6..bbbed33ccefe 100644 --- a/sdk/template/perf-tests/template/package.json +++ b/sdk/template/perf-tests/template/package.json @@ -21,7 +21,7 @@ "@types/node": "^18.0.0", "eslint": "^9.9.0", "tslib": "^2.8.1", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/template/template-dpg/package.json b/sdk/template/template-dpg/package.json index 66db34848efb..bd069c4568b2 100644 --- a/sdk/template/template-dpg/package.json +++ b/sdk/template/template-dpg/package.json @@ -123,7 +123,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "dependencies": { diff --git a/sdk/template/template/package.json b/sdk/template/template/package.json index e6feeec8e807..dca57c361eb0 100644 --- a/sdk/template/template/package.json +++ b/sdk/template/template/package.json @@ -102,7 +102,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.6" }, "tshy": { diff --git a/sdk/template/template/samples/v1-beta/typescript/package.json b/sdk/template/template/samples/v1-beta/typescript/package.json index 36a82f8fb321..e9f1f37b8f65 100644 --- a/sdk/template/template/samples/v1-beta/typescript/package.json +++ b/sdk/template/template/samples/v1-beta/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/templatespecs/arm-templatespecs/package.json b/sdk/templatespecs/arm-templatespecs/package.json index d868df048f49..1250ed368ff5 100644 --- a/sdk/templatespecs/arm-templatespecs/package.json +++ b/sdk/templatespecs/arm-templatespecs/package.json @@ -36,7 +36,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/templatespecs/arm-templatespecs", "repository": { diff --git a/sdk/templatespecs/arm-templatespecs/samples/v2/typescript/package.json b/sdk/templatespecs/arm-templatespecs/samples/v2/typescript/package.json index 0579df71498f..5344604e5951 100644 --- a/sdk/templatespecs/arm-templatespecs/samples/v2/typescript/package.json +++ b/sdk/templatespecs/arm-templatespecs/samples/v2/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/terraform/arm-terraform/package.json b/sdk/terraform/arm-terraform/package.json index 971bdf13debe..f71868f7b2a8 100644 --- a/sdk/terraform/arm-terraform/package.json +++ b/sdk/terraform/arm-terraform/package.json @@ -71,7 +71,7 @@ "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "tshy": "^2.0.0", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", diff --git a/sdk/terraform/arm-terraform/samples/v1-beta/typescript/package.json b/sdk/terraform/arm-terraform/samples/v1-beta/typescript/package.json index 373bdf80cac9..bc31a893699e 100644 --- a/sdk/terraform/arm-terraform/samples/v1-beta/typescript/package.json +++ b/sdk/terraform/arm-terraform/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/test-utils/perf/package.json b/sdk/test-utils/perf/package.json index 59e4e94e4e95..69c19973c5c9 100644 --- a/sdk/test-utils/perf/package.json +++ b/sdk/test-utils/perf/package.json @@ -70,7 +70,7 @@ "@types/fs-extra": "^11.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "type": "module", "tshy": { diff --git a/sdk/test-utils/recorder/package.json b/sdk/test-utils/recorder/package.json index e374d24a9bf8..2688fa1a3a16 100644 --- a/sdk/test-utils/recorder/package.json +++ b/sdk/test-utils/recorder/package.json @@ -74,7 +74,7 @@ "express": "^4.19.2", "playwright": "^1.41.2", "tslib": "^2.6.2", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "tshy": { diff --git a/sdk/test-utils/test-credential/package.json b/sdk/test-utils/test-credential/package.json index 6b6efd0e70dd..842418ebac3f 100644 --- a/sdk/test-utils/test-credential/package.json +++ b/sdk/test-utils/test-credential/package.json @@ -66,7 +66,7 @@ "@vitest/coverage-istanbul": "^2.1.8", "eslint": "^9.9.0", "playwright": "^1.49.1", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "type": "module", diff --git a/sdk/test-utils/test-utils-vitest/package.json b/sdk/test-utils/test-utils-vitest/package.json index d38662a55aaa..d42137e1a978 100644 --- a/sdk/test-utils/test-utils-vitest/package.json +++ b/sdk/test-utils/test-utils-vitest/package.json @@ -65,7 +65,7 @@ "@vitest/expect": "^2.0.5", "eslint": "^9.9.0", "playwright": "^1.46.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "tshy": { "exports": { diff --git a/sdk/test-utils/test-utils/package.json b/sdk/test-utils/test-utils/package.json index 3b35c5f8d377..c35f6e50acdc 100644 --- a/sdk/test-utils/test-utils/package.json +++ b/sdk/test-utils/test-utils/package.json @@ -72,7 +72,7 @@ "eslint": "^9.9.0", "sinon": "^19.0.2", "ts-node": "^10.9.2", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "type": "module", "tshy": { diff --git a/sdk/textanalytics/ai-text-analytics/package.json b/sdk/textanalytics/ai-text-analytics/package.json index 032ac26270fe..e6059401ae2d 100644 --- a/sdk/textanalytics/ai-text-analytics/package.json +++ b/sdk/textanalytics/ai-text-analytics/package.json @@ -109,7 +109,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "type": "module", diff --git a/sdk/textanalytics/ai-text-analytics/samples/v5/typescript/package.json b/sdk/textanalytics/ai-text-analytics/samples/v5/typescript/package.json index ee3bb207bac9..1517575e7131 100644 --- a/sdk/textanalytics/ai-text-analytics/samples/v5/typescript/package.json +++ b/sdk/textanalytics/ai-text-analytics/samples/v5/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/textanalytics/perf-tests/ai-text-analytics/package.json b/sdk/textanalytics/perf-tests/ai-text-analytics/package.json index deec99959204..e0ca5d71bd8a 100644 --- a/sdk/textanalytics/perf-tests/ai-text-analytics/package.json +++ b/sdk/textanalytics/perf-tests/ai-text-analytics/package.json @@ -20,7 +20,7 @@ "@azure/dev-tool": "^1.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "private": true, "scripts": { diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/package.json b/sdk/timeseriesinsights/arm-timeseriesinsights/package.json index 32639971b6d8..28ed671390e6 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/package.json +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/timeseriesinsights/arm-timeseriesinsights", "repository": { diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/samples/v2-beta/typescript/package.json b/sdk/timeseriesinsights/arm-timeseriesinsights/samples/v2-beta/typescript/package.json index 13803816a96b..d887cb6bd46a 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/samples/v2-beta/typescript/package.json +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/trafficmanager/arm-trafficmanager/package.json b/sdk/trafficmanager/arm-trafficmanager/package.json index 3360b4073241..01cb0abdf78f 100644 --- a/sdk/trafficmanager/arm-trafficmanager/package.json +++ b/sdk/trafficmanager/arm-trafficmanager/package.json @@ -37,7 +37,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/trafficmanager/arm-trafficmanager/samples/v6/typescript/package.json b/sdk/trafficmanager/arm-trafficmanager/samples/v6/typescript/package.json index 189c5179d450..b787df04424a 100644 --- a/sdk/trafficmanager/arm-trafficmanager/samples/v6/typescript/package.json +++ b/sdk/trafficmanager/arm-trafficmanager/samples/v6/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/translation/ai-translation-document-rest/package.json b/sdk/translation/ai-translation-document-rest/package.json index 05dc0e882c76..68b689977ffb 100644 --- a/sdk/translation/ai-translation-document-rest/package.json +++ b/sdk/translation/ai-translation-document-rest/package.json @@ -83,7 +83,7 @@ "nyc": "^17.0.0", "source-map-support": "^0.5.9", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "scripts": { "build": "npm run clean && tsc -p . && dev-tool run bundle && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", diff --git a/sdk/translation/ai-translation-document-rest/samples/v1-beta/typescript/package.json b/sdk/translation/ai-translation-document-rest/samples/v1-beta/typescript/package.json index 6b293931abe9..148d096a2da6 100644 --- a/sdk/translation/ai-translation-document-rest/samples/v1-beta/typescript/package.json +++ b/sdk/translation/ai-translation-document-rest/samples/v1-beta/typescript/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/translation/ai-translation-text-rest/package.json b/sdk/translation/ai-translation-text-rest/package.json index 6d7b111f051c..1c6d50f44a97 100644 --- a/sdk/translation/ai-translation-text-rest/package.json +++ b/sdk/translation/ai-translation-text-rest/package.json @@ -92,7 +92,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "//metadata": { diff --git a/sdk/translation/ai-translation-text-rest/samples/v1-beta/typescript/package.json b/sdk/translation/ai-translation-text-rest/samples/v1-beta/typescript/package.json index dfd37950f266..58510e251823 100644 --- a/sdk/translation/ai-translation-text-rest/samples/v1-beta/typescript/package.json +++ b/sdk/translation/ai-translation-text-rest/samples/v1-beta/typescript/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/trustedsigning/arm-trustedsigning/package.json b/sdk/trustedsigning/arm-trustedsigning/package.json index dbf1f37a90a0..46724ebd72e4 100644 --- a/sdk/trustedsigning/arm-trustedsigning/package.json +++ b/sdk/trustedsigning/arm-trustedsigning/package.json @@ -70,7 +70,7 @@ "dotenv": "^16.0.0", "@types/node": "^18.0.0", "eslint": "^9.9.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", "@vitest/coverage-istanbul": "^2.0.5", diff --git a/sdk/trustedsigning/arm-trustedsigning/samples/v1-beta/typescript/package.json b/sdk/trustedsigning/arm-trustedsigning/samples/v1-beta/typescript/package.json index 1a9c0953a4eb..a0dc1d2e1606 100644 --- a/sdk/trustedsigning/arm-trustedsigning/samples/v1-beta/typescript/package.json +++ b/sdk/trustedsigning/arm-trustedsigning/samples/v1-beta/typescript/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/vision/ai-vision-image-analysis-rest/package.json b/sdk/vision/ai-vision-image-analysis-rest/package.json index 839d97a562b9..09996b94aba1 100644 --- a/sdk/vision/ai-vision-image-analysis-rest/package.json +++ b/sdk/vision/ai-vision-image-analysis-rest/package.json @@ -79,7 +79,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5" }, "//metadata": { diff --git a/sdk/visualstudio/arm-visualstudio/package.json b/sdk/visualstudio/arm-visualstudio/package.json index 33de4db856b1..7c13ddef1769 100644 --- a/sdk/visualstudio/arm-visualstudio/package.json +++ b/sdk/visualstudio/arm-visualstudio/package.json @@ -37,7 +37,7 @@ "chai": "^4.2.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/visualstudio/arm-visualstudio", "repository": { diff --git a/sdk/visualstudio/arm-visualstudio/samples/v4-beta/typescript/package.json b/sdk/visualstudio/arm-visualstudio/samples/v4-beta/typescript/package.json index d5232d0a0327..19f94c2bb3fb 100644 --- a/sdk/visualstudio/arm-visualstudio/samples/v4-beta/typescript/package.json +++ b/sdk/visualstudio/arm-visualstudio/samples/v4-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json index b2aaa06b313b..ac19333e58c6 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/samples/v3/typescript/package.json b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/samples/v3/typescript/package.json index 22bbe06aa11a..e4e435fb4f73 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/samples/v3/typescript/package.json +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/samples/v3/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/voiceservices/arm-voiceservices/package.json b/sdk/voiceservices/arm-voiceservices/package.json index bece41f8b047..2eaa2c7d9a4c 100644 --- a/sdk/voiceservices/arm-voiceservices/package.json +++ b/sdk/voiceservices/arm-voiceservices/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/voiceservices/arm-voiceservices/samples/v1/typescript/package.json b/sdk/voiceservices/arm-voiceservices/samples/v1/typescript/package.json index f12ad27cbe3c..9290bd7fc9a2 100644 --- a/sdk/voiceservices/arm-voiceservices/samples/v1/typescript/package.json +++ b/sdk/voiceservices/arm-voiceservices/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/web-pubsub/arm-webpubsub/package.json b/sdk/web-pubsub/arm-webpubsub/package.json index a4ae91a45ce1..6b2d0d1bcb98 100644 --- a/sdk/web-pubsub/arm-webpubsub/package.json +++ b/sdk/web-pubsub/arm-webpubsub/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/web-pubsub/arm-webpubsub/samples/v1/typescript/package.json b/sdk/web-pubsub/arm-webpubsub/samples/v1/typescript/package.json index 373b90b9d561..002230d47cf7 100644 --- a/sdk/web-pubsub/arm-webpubsub/samples/v1/typescript/package.json +++ b/sdk/web-pubsub/arm-webpubsub/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/web-pubsub/web-pubsub-client-protobuf/package.json b/sdk/web-pubsub/web-pubsub-client-protobuf/package.json index a46ce8437bc5..5fe991792977 100644 --- a/sdk/web-pubsub/web-pubsub-client-protobuf/package.json +++ b/sdk/web-pubsub/web-pubsub-client-protobuf/package.json @@ -82,7 +82,7 @@ "eslint": "^9.9.0", "move-file-cli": "^3.0.0", "protobufjs-cli": "^1.1.3", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//sampleConfiguration": { diff --git a/sdk/web-pubsub/web-pubsub-client-protobuf/samples/v1-beta/typescript/package.json b/sdk/web-pubsub/web-pubsub-client-protobuf/samples/v1-beta/typescript/package.json index 15cffd22c644..61af5bc92dcd 100644 --- a/sdk/web-pubsub/web-pubsub-client-protobuf/samples/v1-beta/typescript/package.json +++ b/sdk/web-pubsub/web-pubsub-client-protobuf/samples/v1-beta/typescript/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/web-pubsub/web-pubsub-client/package.json b/sdk/web-pubsub/web-pubsub-client/package.json index 9fdfdf3cead8..15d3436dca7c 100644 --- a/sdk/web-pubsub/web-pubsub-client/package.json +++ b/sdk/web-pubsub/web-pubsub-client/package.json @@ -73,7 +73,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.8" }, "//sampleConfiguration": { diff --git a/sdk/web-pubsub/web-pubsub-client/samples/v1/typescript/package.json b/sdk/web-pubsub/web-pubsub-client/samples/v1/typescript/package.json index b32441566489..7ad11598e890 100644 --- a/sdk/web-pubsub/web-pubsub-client/samples/v1/typescript/package.json +++ b/sdk/web-pubsub/web-pubsub-client/samples/v1/typescript/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/web-pubsub/web-pubsub-express/package.json b/sdk/web-pubsub/web-pubsub-express/package.json index 579f87e57264..d91d88610bc3 100644 --- a/sdk/web-pubsub/web-pubsub-express/package.json +++ b/sdk/web-pubsub/web-pubsub-express/package.json @@ -64,7 +64,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "express": "^4.16.3", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.0.5" }, "//sampleConfiguration": { diff --git a/sdk/web-pubsub/web-pubsub-express/samples/v1/typescript/package.json b/sdk/web-pubsub/web-pubsub-express/samples/v1/typescript/package.json index 78d6671f47d4..221cc4bdbf9a 100644 --- a/sdk/web-pubsub/web-pubsub-express/samples/v1/typescript/package.json +++ b/sdk/web-pubsub/web-pubsub-express/samples/v1/typescript/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@types/express": "^4.16.0", "express": "^4.16.3", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/web-pubsub/web-pubsub/package.json b/sdk/web-pubsub/web-pubsub/package.json index 1b1e2fbc95b9..3ba778d1142c 100644 --- a/sdk/web-pubsub/web-pubsub/package.json +++ b/sdk/web-pubsub/web-pubsub/package.json @@ -85,7 +85,7 @@ "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "vitest": "^2.1.5", "ws": "^8.18.0" }, diff --git a/sdk/web-pubsub/web-pubsub/samples/v1/typescript/package.json b/sdk/web-pubsub/web-pubsub/samples/v1/typescript/package.json index 7cff922f63ca..4ba0abd51a2b 100644 --- a/sdk/web-pubsub/web-pubsub/samples/v1/typescript/package.json +++ b/sdk/web-pubsub/web-pubsub/samples/v1/typescript/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/workloads/arm-workloads/package.json b/sdk/workloads/arm-workloads/package.json index d3be2c4c34e1..d36a9f3029f1 100644 --- a/sdk/workloads/arm-workloads/package.json +++ b/sdk/workloads/arm-workloads/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/workloads/arm-workloads/samples/v1/typescript/package.json b/sdk/workloads/arm-workloads/samples/v1/typescript/package.json index c83259646f34..3cfcf42c86ee 100644 --- a/sdk/workloads/arm-workloads/samples/v1/typescript/package.json +++ b/sdk/workloads/arm-workloads/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/package.json b/sdk/workloads/arm-workloadssapvirtualinstance/package.json index 7ecf1d6f1079..3e7c2a65c444 100644 --- a/sdk/workloads/arm-workloadssapvirtualinstance/package.json +++ b/sdk/workloads/arm-workloadssapvirtualinstance/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.0.0", "mocha": "^11.0.2", "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "repository": { "type": "git", diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/package.json b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/package.json index 8fe6c1a8dc72..4dad0e1f42f1 100644 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/package.json +++ b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.6.2", + "typescript": "~5.7.2", "rimraf": "latest" } } From 25f960a898ae560811a34ec2e5f3da9543df9641 Mon Sep 17 00:00:00 2001 From: Matthew Podwysocki Date: Wed, 18 Dec 2024 18:15:21 -0500 Subject: [PATCH 05/55] [advisor] Migrate @azure/arm-advisor with @azure/dev-tool additions (#32283) ### Packages impacted by this PR - @azure/dev-tool - @azure/arm-advisor - @azure/arm-agrifood - @azure/arm-apicenter ### Issues associated with this PR - https://github.com/Azure/azure-sdk-for-js/issues/31338 ### Describe the problem that is addressed by this PR Migrates @azure/arm-advisor to ESM/vitest via @azure/dev-tool and adds fixes such as `vi.fn()` support and `import "dotenv/config";` Also adds support for ESM testing and type testing. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary) --------- Co-authored-by: Jeremy Meng Co-authored-by: Deyaaeldeen Almahallawi --- common/config/rush/pnpm-lock.yaml | 129 +- .../src/commands/admin/migrate-package.ts | 158 +- .../migrate-package/codemods/fixSourceFile.ts | 8 + .../codemods/replaceChaiAsPromised.ts | 2 +- .../codemods/replaceSinonStubs.ts | 148 +- sdk/advisor/arm-advisor/_meta.json | 2 +- sdk/advisor/arm-advisor/api-extractor.json | 6 +- sdk/advisor/arm-advisor/package.json | 84 +- ...nfigurationsCreateInResourceGroupSample.ts | 19 +- ...onfigurationsCreateInSubscriptionSample.ts | 19 +- ...configurationsListByResourceGroupSample.ts | 13 +- .../configurationsListBySubscriptionSample.ts | 9 +- .../recommendationMetadataGetSample.ts | 6 +- .../recommendationMetadataListSample.ts | 6 +- .../recommendationsGenerateSample.ts | 9 +- .../recommendationsGetGenerateStatusSample.ts | 9 +- .../samples-dev/recommendationsGetSample.ts | 11 +- .../samples-dev/recommendationsListSample.ts | 14 +- .../samples-dev/suppressionsCreateSample.ts | 13 +- .../samples-dev/suppressionsDeleteSample.ts | 12 +- .../samples-dev/suppressionsGetSample.ts | 12 +- .../samples-dev/suppressionsListSample.ts | 9 +- .../src/advisorManagementClient.ts | 54 +- sdk/advisor/arm-advisor/src/index.ts | 8 +- sdk/advisor/arm-advisor/src/models/index.ts | 59 +- sdk/advisor/arm-advisor/src/models/mappers.ts | 456 +- .../arm-advisor/src/models/parameters.ts | 100 +- .../src/operations/configurations.ts | 136 +- .../arm-advisor/src/operations/index.ts | 10 +- .../arm-advisor/src/operations/operations.ts | 51 +- .../src/operations/recommendationMetadata.ts | 64 +- .../src/operations/recommendations.ts | 118 +- .../src/operations/suppressions.ts | 117 +- .../operationsInterfaces/configurations.ts | 12 +- .../src/operationsInterfaces/index.ts | 10 +- .../src/operationsInterfaces/operations.ts | 6 +- .../recommendationMetadata.ts | 8 +- .../operationsInterfaces/recommendations.ts | 12 +- .../src/operationsInterfaces/suppressions.ts | 14 +- sdk/advisor/arm-advisor/src/pagingHelper.ts | 5 +- .../test/advisor_operations_test.spec.ts | 44 +- sdk/advisor/arm-advisor/tsconfig.json | 40 +- sdk/advisor/arm-advisor/tsconfig.samples.json | 8 + sdk/advisor/arm-advisor/tsconfig.src.json | 3 + sdk/advisor/arm-advisor/tsconfig.test.json | 3 + sdk/advisor/arm-advisor/vitest.config.ts | 15 + sdk/advisor/arm-advisor/vitest.esm.config.ts | 11 + sdk/agrifood/arm-agrifood/api-extractor.json | 6 +- sdk/agrifood/arm-agrifood/package.json | 92 +- .../arm-agrifood/src/agriFoodMgmtClient.ts | 6 +- sdk/agrifood/arm-agrifood/src/index.ts | 8 +- .../arm-agrifood/src/models/parameters.ts | 2 +- .../arm-agrifood/src/operations/extensions.ts | 12 +- .../src/operations/farmBeatsExtensions.ts | 12 +- .../src/operations/farmBeatsModels.ts | 14 +- .../arm-agrifood/src/operations/index.ts | 14 +- .../arm-agrifood/src/operations/locations.ts | 10 +- .../arm-agrifood/src/operations/operations.ts | 12 +- .../operations/privateEndpointConnections.ts | 12 +- .../src/operations/privateLinkResources.ts | 10 +- .../src/operationsInterfaces/extensions.ts | 2 +- .../farmBeatsExtensions.ts | 2 +- .../operationsInterfaces/farmBeatsModels.ts | 2 +- .../src/operationsInterfaces/index.ts | 14 +- .../src/operationsInterfaces/locations.ts | 2 +- .../src/operationsInterfaces/operations.ts | 2 +- .../privateEndpointConnections.ts | 2 +- .../privateLinkResources.ts | 2 +- .../test/{sampleTest.ts => sample.spec.ts} | 21 +- sdk/agrifood/arm-agrifood/tsconfig.json | 40 +- .../arm-agrifood/tsconfig.samples.json | 10 + sdk/agrifood/arm-agrifood/tsconfig.src.json | 3 + sdk/agrifood/arm-agrifood/tsconfig.test.json | 6 + sdk/agrifood/arm-agrifood/vitest.config.ts | 8 + .../arm-agrifood/vitest.esm.config.ts | 12 + .../arm-apicenter/api-extractor.json | 6 +- sdk/apicenter/arm-apicenter/package.json | 90 +- .../apiDefinitionsCreateOrUpdateSample.ts | 4 +- .../samples-dev/apiDefinitionsDeleteSample.ts | 4 +- ...apiDefinitionsExportSpecificationSample.ts | 4 +- .../samples-dev/apiDefinitionsGetSample.ts | 4 +- .../samples-dev/apiDefinitionsHeadSample.ts | 4 +- ...apiDefinitionsImportSpecificationSample.ts | 4 +- .../samples-dev/apiDefinitionsListSample.ts | 4 +- .../apiVersionsCreateOrUpdateSample.ts | 4 +- .../samples-dev/apiVersionsDeleteSample.ts | 4 +- .../samples-dev/apiVersionsGetSample.ts | 4 +- .../samples-dev/apiVersionsHeadSample.ts | 4 +- .../samples-dev/apiVersionsListSample.ts | 4 +- .../samples-dev/apisCreateOrUpdateSample.ts | 4 +- .../samples-dev/apisDeleteSample.ts | 4 +- .../samples-dev/apisGetSample.ts | 4 +- .../samples-dev/apisHeadSample.ts | 4 +- .../samples-dev/apisListSample.ts | 4 +- .../deploymentsCreateOrUpdateSample.ts | 4 +- .../samples-dev/deploymentsDeleteSample.ts | 4 +- .../samples-dev/deploymentsGetSample.ts | 4 +- .../samples-dev/deploymentsHeadSample.ts | 4 +- .../samples-dev/deploymentsListSample.ts | 4 +- .../environmentsCreateOrUpdateSample.ts | 4 +- .../samples-dev/environmentsDeleteSample.ts | 4 +- .../samples-dev/environmentsGetSample.ts | 4 +- .../samples-dev/environmentsHeadSample.ts | 4 +- .../samples-dev/environmentsListSample.ts | 4 +- .../metadataSchemasCreateOrUpdateSample.ts | 4 +- .../metadataSchemasDeleteSample.ts | 4 +- .../samples-dev/metadataSchemasGetSample.ts | 4 +- .../samples-dev/metadataSchemasHeadSample.ts | 4 +- .../samples-dev/metadataSchemasListSample.ts | 4 +- .../samples-dev/operationsListSample.ts | 4 +- .../servicesCreateOrUpdateSample.ts | 4 +- .../samples-dev/servicesDeleteSample.ts | 4 +- .../servicesExportMetadataSchemaSample.ts | 4 +- .../samples-dev/servicesGetSample.ts | 4 +- .../servicesListByResourceGroupSample.ts | 4 +- .../servicesListBySubscriptionSample.ts | 4 +- .../samples-dev/servicesUpdateSample.ts | 4 +- .../workspacesCreateOrUpdateSample.ts | 4 +- .../samples-dev/workspacesDeleteSample.ts | 4 +- .../samples-dev/workspacesGetSample.ts | 4 +- .../samples-dev/workspacesHeadSample.ts | 4 +- .../samples-dev/workspacesListSample.ts | 4 +- .../src/apiDefinitionsCreateOrUpdateSample.ts | 4 +- .../src/apiDefinitionsDeleteSample.ts | 4 +- ...apiDefinitionsExportSpecificationSample.ts | 4 +- .../typescript/src/apiDefinitionsGetSample.ts | 4 +- .../src/apiDefinitionsHeadSample.ts | 4 +- ...apiDefinitionsImportSpecificationSample.ts | 4 +- .../src/apiDefinitionsListSample.ts | 4 +- .../src/apiVersionsCreateOrUpdateSample.ts | 4 +- .../typescript/src/apiVersionsDeleteSample.ts | 4 +- .../v1/typescript/src/apiVersionsGetSample.ts | 4 +- .../typescript/src/apiVersionsHeadSample.ts | 4 +- .../typescript/src/apiVersionsListSample.ts | 4 +- .../src/apisCreateOrUpdateSample.ts | 4 +- .../v1/typescript/src/apisDeleteSample.ts | 4 +- .../v1/typescript/src/apisGetSample.ts | 4 +- .../v1/typescript/src/apisHeadSample.ts | 4 +- .../v1/typescript/src/apisListSample.ts | 4 +- .../src/deploymentsCreateOrUpdateSample.ts | 4 +- .../typescript/src/deploymentsDeleteSample.ts | 4 +- .../v1/typescript/src/deploymentsGetSample.ts | 4 +- .../typescript/src/deploymentsHeadSample.ts | 4 +- .../typescript/src/deploymentsListSample.ts | 4 +- .../src/environmentsCreateOrUpdateSample.ts | 4 +- .../src/environmentsDeleteSample.ts | 4 +- .../typescript/src/environmentsGetSample.ts | 4 +- .../typescript/src/environmentsHeadSample.ts | 4 +- .../typescript/src/environmentsListSample.ts | 4 +- .../metadataSchemasCreateOrUpdateSample.ts | 4 +- .../src/metadataSchemasDeleteSample.ts | 4 +- .../src/metadataSchemasGetSample.ts | 4 +- .../src/metadataSchemasHeadSample.ts | 4 +- .../src/metadataSchemasListSample.ts | 4 +- .../v1/typescript/src/operationsListSample.ts | 4 +- .../src/servicesCreateOrUpdateSample.ts | 4 +- .../v1/typescript/src/servicesDeleteSample.ts | 4 +- .../src/servicesExportMetadataSchemaSample.ts | 4 +- .../v1/typescript/src/servicesGetSample.ts | 4 +- .../src/servicesListByResourceGroupSample.ts | 4 +- .../src/servicesListBySubscriptionSample.ts | 4 +- .../v1/typescript/src/servicesUpdateSample.ts | 4 +- .../src/workspacesCreateOrUpdateSample.ts | 4 +- .../typescript/src/workspacesDeleteSample.ts | 4 +- .../v1/typescript/src/workspacesGetSample.ts | 4 +- .../v1/typescript/src/workspacesHeadSample.ts | 4 +- .../v1/typescript/src/workspacesListSample.ts | 4 +- .../arm-apicenter/src/azureAPICenter.ts | 6 +- sdk/apicenter/arm-apicenter/src/index.ts | 8 +- .../arm-apicenter/src/models/parameters.ts | 2 +- .../src/operations/apiDefinitions.ts | 14 +- .../src/operations/apiVersions.ts | 12 +- .../arm-apicenter/src/operations/apis.ts | 12 +- .../src/operations/deployments.ts | 12 +- .../src/operations/environments.ts | 12 +- .../arm-apicenter/src/operations/index.ts | 18 +- .../src/operations/metadataSchemas.ts | 12 +- .../src/operations/operations.ts | 12 +- .../arm-apicenter/src/operations/services.ts | 14 +- .../src/operations/workspaces.ts | 12 +- .../operationsInterfaces/apiDefinitions.ts | 2 +- .../src/operationsInterfaces/apiVersions.ts | 2 +- .../src/operationsInterfaces/apis.ts | 2 +- .../src/operationsInterfaces/deployments.ts | 2 +- .../src/operationsInterfaces/environments.ts | 2 +- .../src/operationsInterfaces/index.ts | 18 +- .../operationsInterfaces/metadataSchemas.ts | 2 +- .../src/operationsInterfaces/operations.ts | 2 +- .../src/operationsInterfaces/services.ts | 2 +- .../src/operationsInterfaces/workspaces.ts | 2 +- .../test/apicenter_operations_test.spec.ts | 34 +- sdk/apicenter/arm-apicenter/tsconfig.json | 40 +- .../arm-apicenter/tsconfig.samples.json | 10 + sdk/apicenter/arm-apicenter/tsconfig.src.json | 3 + .../arm-apicenter/tsconfig.test.json | 6 + sdk/apicenter/arm-apicenter/vitest.config.ts | 15 + .../arm-apicenter/vitest.esm.config.ts | 12 + .../arm-apimanagement/api-extractor.json | 6 +- .../arm-apimanagement/package.json | 88 +- .../samples-dev/apiCreateOrUpdateSample.ts | 856 +- .../samples-dev/apiDeleteSample.ts | 38 +- .../apiDiagnosticCreateOrUpdateSample.ts | 70 +- .../samples-dev/apiDiagnosticDeleteSample.ts | 42 +- .../apiDiagnosticGetEntityTagSample.ts | 38 +- .../samples-dev/apiDiagnosticGetSample.ts | 38 +- .../apiDiagnosticListByServiceSample.ts | 40 +- .../samples-dev/apiDiagnosticUpdateSample.ts | 74 +- .../samples-dev/apiExportGetSample.ts | 80 +- .../samples-dev/apiGetEntityTagSample.ts | 34 +- .../samples-dev/apiGetSample.ts | 48 +- .../apiIssueAttachmentCreateOrUpdateSample.ts | 58 +- .../apiIssueAttachmentDeleteSample.ts | 46 +- .../apiIssueAttachmentGetEntityTagSample.ts | 42 +- .../apiIssueAttachmentGetSample.ts | 42 +- .../apiIssueAttachmentListByServiceSample.ts | 44 +- .../apiIssueCommentCreateOrUpdateSample.ts | 60 +- .../apiIssueCommentDeleteSample.ts | 46 +- .../apiIssueCommentGetEntityTagSample.ts | 42 +- .../samples-dev/apiIssueCommentGetSample.ts | 42 +- .../apiIssueCommentListByServiceSample.ts | 44 +- .../apiIssueCreateOrUpdateSample.ts | 58 +- .../samples-dev/apiIssueDeleteSample.ts | 42 +- .../samples-dev/apiIssueGetEntityTagSample.ts | 38 +- .../samples-dev/apiIssueGetSample.ts | 38 +- .../apiIssueListByServiceSample.ts | 40 +- .../samples-dev/apiIssueUpdateSample.ts | 50 +- .../samples-dev/apiListByServiceSample.ts | 36 +- .../samples-dev/apiListByTagsSample.ts | 36 +- .../apiManagementOperationsListSample.ts | 20 +- ...eApplyNetworkConfigurationUpdatesSample.ts | 50 +- .../apiManagementServiceBackupSample.ts | 132 +- ...ementServiceCheckNameAvailabilitySample.ts | 32 +- ...piManagementServiceCreateOrUpdateSample.ts | 602 +- .../apiManagementServiceDeleteSample.ts | 30 +- ...rviceGetDomainOwnershipIdentifierSample.ts | 18 +- .../apiManagementServiceGetSample.ts | 82 +- .../apiManagementServiceGetSsoTokenSample.ts | 30 +- ...agementServiceListByResourceGroupSample.ts | 32 +- .../apiManagementServiceListSample.ts | 24 +- ...apiManagementServiceMigrateToStv2Sample.ts | 30 +- .../apiManagementServiceRestoreSample.ts | 50 +- ...rviceSkusListAvailableServiceSkusSample.ts | 68 +- .../apiManagementServiceUpdateSample.ts | 148 +- .../apiManagementSkusListSample.ts | 24 +- .../apiOperationCreateOrUpdateSample.ts | 104 +- .../samples-dev/apiOperationDeleteSample.ts | 42 +- .../apiOperationGetEntityTagSample.ts | 38 +- .../samples-dev/apiOperationGetSample.ts | 72 +- .../apiOperationListByApiSample.ts | 40 +- .../apiOperationPolicyCreateOrUpdateSample.ts | 66 +- .../apiOperationPolicyDeleteSample.ts | 46 +- .../apiOperationPolicyGetEntityTagSample.ts | 42 +- .../apiOperationPolicyGetSample.ts | 42 +- ...apiOperationPolicyListByOperationSample.ts | 38 +- .../samples-dev/apiOperationUpdateSample.ts | 114 +- .../apiPolicyCreateOrUpdateSample.ts | 114 +- .../samples-dev/apiPolicyDeleteSample.ts | 42 +- .../apiPolicyGetEntityTagSample.ts | 38 +- .../samples-dev/apiPolicyGetSample.ts | 38 +- .../samples-dev/apiPolicyListByApiSample.ts | 34 +- .../samples-dev/apiProductListByApisSample.ts | 40 +- .../apiReleaseCreateOrUpdateSample.ts | 54 +- .../samples-dev/apiReleaseDeleteSample.ts | 42 +- .../apiReleaseGetEntityTagSample.ts | 38 +- .../samples-dev/apiReleaseGetSample.ts | 38 +- .../apiReleaseListByServiceSample.ts | 40 +- .../samples-dev/apiReleaseUpdateSample.ts | 58 +- .../apiRevisionListByServiceSample.ts | 40 +- .../apiSchemaCreateOrUpdateSample.ts | 52 +- .../samples-dev/apiSchemaDeleteSample.ts | 42 +- .../apiSchemaGetEntityTagSample.ts | 38 +- .../samples-dev/apiSchemaGetSample.ts | 38 +- .../samples-dev/apiSchemaListByApiSample.ts | 40 +- .../apiTagDescriptionCreateOrUpdateSample.ts | 56 +- .../apiTagDescriptionDeleteSample.ts | 42 +- .../apiTagDescriptionGetEntityTagSample.ts | 38 +- .../samples-dev/apiTagDescriptionGetSample.ts | 38 +- .../apiTagDescriptionListByServiceSample.ts | 40 +- .../samples-dev/apiUpdateSample.ts | 54 +- .../apiVersionSetCreateOrUpdateSample.ts | 50 +- .../samples-dev/apiVersionSetDeleteSample.ts | 38 +- .../apiVersionSetGetEntityTagSample.ts | 34 +- .../samples-dev/apiVersionSetGetSample.ts | 34 +- .../apiVersionSetListByServiceSample.ts | 36 +- .../samples-dev/apiVersionSetUpdateSample.ts | 54 +- .../apiWikiCreateOrUpdateSample.ts | 44 +- .../samples-dev/apiWikiDeleteSample.ts | 38 +- .../samples-dev/apiWikiGetEntityTagSample.ts | 34 +- .../samples-dev/apiWikiGetSample.ts | 34 +- .../samples-dev/apiWikiUpdateSample.ts | 50 +- .../samples-dev/apiWikisListSample.ts | 40 +- ...izationAccessPolicyCreateOrUpdateSample.ts | 56 +- .../authorizationAccessPolicyDeleteSample.ts | 46 +- .../authorizationAccessPolicyGetSample.ts | 42 +- ...onAccessPolicyListByAuthorizationSample.ts | 44 +- .../authorizationConfirmConsentCodeSample.ts | 50 +- .../authorizationCreateOrUpdateSample.ts | 104 +- .../samples-dev/authorizationDeleteSample.ts | 42 +- .../samples-dev/authorizationGetSample.ts | 38 +- ...zationListByAuthorizationProviderSample.ts | 76 +- .../authorizationLoginLinksPostSample.ts | 50 +- ...thorizationProviderCreateOrUpdateSample.ts | 256 +- .../authorizationProviderDeleteSample.ts | 38 +- .../authorizationProviderGetSample.ts | 34 +- ...uthorizationProviderListByServiceSample.ts | 36 +- ...authorizationServerCreateOrUpdateSample.ts | 76 +- .../authorizationServerDeleteSample.ts | 38 +- .../authorizationServerGetEntityTagSample.ts | 34 +- .../authorizationServerGetSample.ts | 34 +- .../authorizationServerListByServiceSample.ts | 36 +- .../authorizationServerListSecretsSample.ts | 34 +- .../authorizationServerUpdateSample.ts | 56 +- .../backendCreateOrUpdateSample.ts | 140 +- .../samples-dev/backendDeleteSample.ts | 38 +- .../samples-dev/backendGetEntityTagSample.ts | 34 +- .../samples-dev/backendGetSample.ts | 34 +- .../samples-dev/backendListByServiceSample.ts | 36 +- .../samples-dev/backendReconnectSample.ts | 46 +- .../samples-dev/backendUpdateSample.ts | 52 +- .../samples-dev/cacheCreateOrUpdateSample.ts | 54 +- .../samples-dev/cacheDeleteSample.ts | 38 +- .../samples-dev/cacheGetEntityTagSample.ts | 34 +- .../samples-dev/cacheGetSample.ts | 34 +- .../samples-dev/cacheListByServiceSample.ts | 36 +- .../samples-dev/cacheUpdateSample.ts | 46 +- .../certificateCreateOrUpdateSample.ts | 96 +- .../samples-dev/certificateDeleteSample.ts | 38 +- .../certificateGetEntityTagSample.ts | 34 +- .../samples-dev/certificateGetSample.ts | 64 +- .../certificateListByServiceSample.ts | 36 +- .../certificateRefreshSecretSample.ts | 34 +- .../contentItemCreateOrUpdateSample.ts | 68 +- .../samples-dev/contentItemDeleteSample.ts | 42 +- .../contentItemGetEntityTagSample.ts | 38 +- .../samples-dev/contentItemGetSample.ts | 38 +- .../contentItemListByServiceSample.ts | 40 +- .../contentTypeCreateOrUpdateSample.ts | 136 +- .../samples-dev/contentTypeDeleteSample.ts | 38 +- .../samples-dev/contentTypeGetSample.ts | 34 +- .../contentTypeListByServiceSample.ts | 36 +- .../delegationSettingsCreateOrUpdateSample.ts | 56 +- .../delegationSettingsGetEntityTagSample.ts | 30 +- .../delegationSettingsGetSample.ts | 30 +- .../delegationSettingsListSecretsSample.ts | 30 +- .../delegationSettingsUpdateSample.ts | 52 +- .../deletedServicesGetByNameSample.ts | 22 +- ...deletedServicesListBySubscriptionSample.ts | 24 +- .../samples-dev/deletedServicesPurgeSample.ts | 28 +- .../diagnosticCreateOrUpdateSample.ts | 66 +- .../samples-dev/diagnosticDeleteSample.ts | 38 +- .../diagnosticGetEntityTagSample.ts | 34 +- .../samples-dev/diagnosticGetSample.ts | 34 +- .../diagnosticListByServiceSample.ts | 36 +- .../samples-dev/diagnosticUpdateSample.ts | 70 +- .../documentationCreateOrUpdateSample.ts | 48 +- .../samples-dev/documentationDeleteSample.ts | 38 +- .../documentationGetEntityTagSample.ts | 34 +- .../samples-dev/documentationGetSample.ts | 34 +- .../documentationListByServiceSample.ts | 36 +- .../samples-dev/documentationUpdateSample.ts | 52 +- .../emailTemplateCreateOrUpdateSample.ts | 46 +- .../samples-dev/emailTemplateDeleteSample.ts | 38 +- .../emailTemplateGetEntityTagSample.ts | 34 +- .../samples-dev/emailTemplateGetSample.ts | 34 +- .../emailTemplateListByServiceSample.ts | 36 +- .../samples-dev/emailTemplateUpdateSample.ts | 54 +- .../gatewayApiCreateOrUpdateSample.ts | 50 +- .../samples-dev/gatewayApiDeleteSample.ts | 38 +- .../gatewayApiGetEntityTagSample.ts | 38 +- .../gatewayApiListByServiceSample.ts | 40 +- ...ertificateAuthorityCreateOrUpdateSample.ts | 46 +- ...gatewayCertificateAuthorityDeleteSample.ts | 42 +- ...yCertificateAuthorityGetEntityTagSample.ts | 38 +- .../gatewayCertificateAuthorityGetSample.ts | 38 +- ...CertificateAuthorityListByServiceSample.ts | 40 +- .../gatewayCreateOrUpdateSample.ts | 46 +- .../samples-dev/gatewayDeleteSample.ts | 38 +- .../samples-dev/gatewayGenerateTokenSample.ts | 48 +- .../samples-dev/gatewayGetEntityTagSample.ts | 34 +- .../samples-dev/gatewayGetSample.ts | 34 +- ...stnameConfigurationCreateOrUpdateSample.ts | 62 +- ...atewayHostnameConfigurationDeleteSample.ts | 42 +- ...HostnameConfigurationGetEntityTagSample.ts | 38 +- .../gatewayHostnameConfigurationGetSample.ts | 38 +- ...ostnameConfigurationListByServiceSample.ts | 40 +- .../samples-dev/gatewayListByServiceSample.ts | 36 +- .../samples-dev/gatewayListKeysSample.ts | 34 +- .../samples-dev/gatewayRegenerateKeySample.ts | 46 +- .../samples-dev/gatewayUpdateSample.ts | 50 +- .../globalSchemaCreateOrUpdateSample.ts | 122 +- .../samples-dev/globalSchemaDeleteSample.ts | 38 +- .../globalSchemaGetEntityTagSample.ts | 34 +- .../samples-dev/globalSchemaGetSample.ts | 64 +- .../globalSchemaListByServiceSample.ts | 36 +- .../graphQlApiResolverCreateOrUpdateSample.ts | 54 +- .../graphQlApiResolverDeleteSample.ts | 42 +- .../graphQlApiResolverGetEntityTagSample.ts | 38 +- .../graphQlApiResolverGetSample.ts | 38 +- .../graphQlApiResolverListByApiSample.ts | 40 +- ...QlApiResolverPolicyCreateOrUpdateSample.ts | 70 +- .../graphQlApiResolverPolicyDeleteSample.ts | 46 +- ...phQlApiResolverPolicyGetEntityTagSample.ts | 42 +- .../graphQlApiResolverPolicyGetSample.ts | 42 +- ...QlApiResolverPolicyListByResolverSample.ts | 44 +- .../graphQlApiResolverUpdateSample.ts | 58 +- .../samples-dev/groupCreateOrUpdateSample.ts | 88 +- .../samples-dev/groupDeleteSample.ts | 38 +- .../samples-dev/groupGetEntityTagSample.ts | 34 +- .../samples-dev/groupGetSample.ts | 34 +- .../samples-dev/groupListByServiceSample.ts | 36 +- .../samples-dev/groupUpdateSample.ts | 46 +- .../groupUserCheckEntityExistsSample.ts | 38 +- .../samples-dev/groupUserCreateSample.ts | 38 +- .../samples-dev/groupUserDeleteSample.ts | 38 +- .../samples-dev/groupUserListSample.ts | 40 +- .../identityProviderCreateOrUpdateSample.ts | 48 +- .../identityProviderDeleteSample.ts | 38 +- .../identityProviderGetEntityTagSample.ts | 34 +- .../samples-dev/identityProviderGetSample.ts | 34 +- .../identityProviderListByServiceSample.ts | 36 +- .../identityProviderListSecretsSample.ts | 34 +- .../identityProviderUpdateSample.ts | 52 +- .../samples-dev/issueGetSample.ts | 34 +- .../samples-dev/issueListByServiceSample.ts | 36 +- .../samples-dev/loggerCreateOrUpdateSample.ts | 98 +- .../samples-dev/loggerDeleteSample.ts | 38 +- .../samples-dev/loggerGetEntityTagSample.ts | 34 +- .../samples-dev/loggerGetSample.ts | 34 +- .../samples-dev/loggerListByServiceSample.ts | 36 +- .../samples-dev/loggerUpdateSample.ts | 52 +- .../namedValueCreateOrUpdateSample.ts | 102 +- .../samples-dev/namedValueDeleteSample.ts | 38 +- .../namedValueGetEntityTagSample.ts | 34 +- .../samples-dev/namedValueGetSample.ts | 64 +- .../namedValueListByServiceSample.ts | 36 +- .../samples-dev/namedValueListValueSample.ts | 34 +- .../namedValueRefreshSecretSample.ts | 34 +- .../samples-dev/namedValueUpdateSample.ts | 56 +- .../networkStatusListByLocationSample.ts | 34 +- .../networkStatusListByServiceSample.ts | 30 +- .../notificationCreateOrUpdateSample.ts | 34 +- .../samples-dev/notificationGetSample.ts | 34 +- .../notificationListByServiceSample.ts | 36 +- ...onRecipientEmailCheckEntityExistsSample.ts | 38 +- ...ationRecipientEmailCreateOrUpdateSample.ts | 38 +- .../notificationRecipientEmailDeleteSample.ts | 38 +- ...nRecipientEmailListByNotificationSample.ts | 34 +- ...ionRecipientUserCheckEntityExistsSample.ts | 38 +- ...cationRecipientUserCreateOrUpdateSample.ts | 38 +- .../notificationRecipientUserDeleteSample.ts | 38 +- ...onRecipientUserListByNotificationSample.ts | 34 +- ...enIdConnectProviderCreateOrUpdateSample.ts | 56 +- .../openIdConnectProviderDeleteSample.ts | 38 +- ...openIdConnectProviderGetEntityTagSample.ts | 34 +- .../openIdConnectProviderGetSample.ts | 34 +- ...penIdConnectProviderListByServiceSample.ts | 36 +- .../openIdConnectProviderListSecretsSample.ts | 34 +- .../openIdConnectProviderUpdateSample.ts | 54 +- .../samples-dev/operationListByTagsSample.ts | 40 +- ...ependenciesEndpointsListByServiceSample.ts | 30 +- .../performConnectivityCheckAsyncSample.ts | 98 +- .../samples-dev/policyCreateOrUpdateSample.ts | 48 +- .../samples-dev/policyDeleteSample.ts | 38 +- .../policyDescriptionListByServiceSample.ts | 40 +- .../policyFragmentCreateOrUpdateSample.ts | 52 +- .../samples-dev/policyFragmentDeleteSample.ts | 38 +- .../policyFragmentGetEntityTagSample.ts | 34 +- .../samples-dev/policyFragmentGetSample.ts | 74 +- .../policyFragmentListByServiceSample.ts | 30 +- .../policyFragmentListReferencesSample.ts | 34 +- .../samples-dev/policyGetEntityTagSample.ts | 34 +- .../samples-dev/policyGetSample.ts | 74 +- .../samples-dev/policyListByServiceSample.ts | 30 +- .../portalConfigCreateOrUpdateSample.ts | 88 +- .../portalConfigGetEntityTagSample.ts | 34 +- .../samples-dev/portalConfigGetSample.ts | 34 +- .../portalConfigListByServiceSample.ts | 30 +- .../samples-dev/portalConfigUpdateSample.ts | 88 +- .../portalRevisionCreateOrUpdateSample.ts | 48 +- .../portalRevisionGetEntityTagSample.ts | 34 +- .../samples-dev/portalRevisionGetSample.ts | 34 +- .../portalRevisionListByServiceSample.ts | 36 +- .../samples-dev/portalRevisionUpdateSample.ts | 52 +- .../portalSettingsListByServiceSample.ts | 30 +- ...eEndpointConnectionCreateOrUpdateSample.ts | 60 +- .../privateEndpointConnectionDeleteSample.ts | 34 +- ...rivateEndpointConnectionGetByNameSample.ts | 34 +- ...tConnectionGetPrivateLinkResourceSample.ts | 34 +- ...teEndpointConnectionListByServiceSample.ts | 36 +- ...onnectionListPrivateLinkResourcesSample.ts | 30 +- .../productApiCheckEntityExistsSample.ts | 38 +- .../productApiCreateOrUpdateSample.ts | 38 +- .../samples-dev/productApiDeleteSample.ts | 38 +- .../productApiListByProductSample.ts | 40 +- .../productCreateOrUpdateSample.ts | 44 +- .../samples-dev/productDeleteSample.ts | 48 +- .../samples-dev/productGetEntityTagSample.ts | 34 +- .../samples-dev/productGetSample.ts | 34 +- .../productGroupCheckEntityExistsSample.ts | 38 +- .../productGroupCreateOrUpdateSample.ts | 38 +- .../samples-dev/productGroupDeleteSample.ts | 38 +- .../productGroupListByProductSample.ts | 40 +- .../samples-dev/productListByServiceSample.ts | 36 +- .../samples-dev/productListByTagsSample.ts | 36 +- .../productPolicyCreateOrUpdateSample.ts | 52 +- .../samples-dev/productPolicyDeleteSample.ts | 42 +- .../productPolicyGetEntityTagSample.ts | 38 +- .../samples-dev/productPolicyGetSample.ts | 38 +- .../productPolicyListByProductSample.ts | 34 +- .../productSubscriptionsListSample.ts | 40 +- .../samples-dev/productUpdateSample.ts | 50 +- .../productWikiCreateOrUpdateSample.ts | 44 +- .../samples-dev/productWikiDeleteSample.ts | 38 +- .../productWikiGetEntityTagSample.ts | 34 +- .../samples-dev/productWikiGetSample.ts | 34 +- .../samples-dev/productWikiUpdateSample.ts | 50 +- .../samples-dev/productWikisListSample.ts | 40 +- .../quotaByCounterKeysListByServiceSample.ts | 34 +- .../quotaByCounterKeysUpdateSample.ts | 48 +- .../samples-dev/quotaByPeriodKeysGetSample.ts | 38 +- .../quotaByPeriodKeysUpdateSample.ts | 52 +- .../samples-dev/regionListByServiceSample.ts | 36 +- .../samples-dev/reportsListByApiSample.ts | 42 +- .../samples-dev/reportsListByGeoSample.ts | 42 +- .../reportsListByOperationSample.ts | 42 +- .../samples-dev/reportsListByProductSample.ts | 42 +- .../samples-dev/reportsListByRequestSample.ts | 42 +- .../reportsListBySubscriptionSample.ts | 42 +- .../samples-dev/reportsListByTimeSample.ts | 46 +- .../samples-dev/reportsListByUserSample.ts | 42 +- .../signInSettingsCreateOrUpdateSample.ts | 46 +- .../signInSettingsGetEntityTagSample.ts | 30 +- .../samples-dev/signInSettingsGetSample.ts | 30 +- .../samples-dev/signInSettingsUpdateSample.ts | 42 +- .../signUpSettingsCreateOrUpdateSample.ts | 60 +- .../signUpSettingsGetEntityTagSample.ts | 30 +- .../samples-dev/signUpSettingsGetSample.ts | 30 +- .../samples-dev/signUpSettingsUpdateSample.ts | 56 +- .../subscriptionCreateOrUpdateSample.ts | 54 +- .../samples-dev/subscriptionDeleteSample.ts | 38 +- .../subscriptionGetEntityTagSample.ts | 34 +- .../samples-dev/subscriptionGetSample.ts | 34 +- .../samples-dev/subscriptionListSample.ts | 36 +- .../subscriptionListSecretsSample.ts | 34 +- .../subscriptionRegeneratePrimaryKeySample.ts | 34 +- ...ubscriptionRegenerateSecondaryKeySample.ts | 34 +- .../samples-dev/subscriptionUpdateSample.ts | 46 +- .../samples-dev/tagAssignToApiSample.ts | 38 +- .../samples-dev/tagAssignToOperationSample.ts | 42 +- .../samples-dev/tagAssignToProductSample.ts | 38 +- .../samples-dev/tagCreateOrUpdateSample.ts | 42 +- .../samples-dev/tagDeleteSample.ts | 38 +- .../samples-dev/tagDetachFromApiSample.ts | 38 +- .../tagDetachFromOperationSample.ts | 42 +- .../samples-dev/tagDetachFromProductSample.ts | 38 +- .../samples-dev/tagGetByApiSample.ts | 38 +- .../samples-dev/tagGetByOperationSample.ts | 42 +- .../samples-dev/tagGetByProductSample.ts | 38 +- .../tagGetEntityStateByApiSample.ts | 38 +- .../tagGetEntityStateByOperationSample.ts | 42 +- .../tagGetEntityStateByProductSample.ts | 38 +- .../samples-dev/tagGetEntityStateSample.ts | 34 +- .../samples-dev/tagGetSample.ts | 26 +- .../samples-dev/tagListByApiSample.ts | 40 +- .../samples-dev/tagListByOperationSample.ts | 44 +- .../samples-dev/tagListByProductSample.ts | 40 +- .../samples-dev/tagListByServiceSample.ts | 36 +- .../tagResourceListByServiceSample.ts | 36 +- .../samples-dev/tagUpdateSample.ts | 46 +- .../samples-dev/tenantAccessCreateSample.ts | 46 +- .../tenantAccessGetEntityTagSample.ts | 34 +- .../samples-dev/tenantAccessGetSample.ts | 64 +- ...nantAccessGitRegeneratePrimaryKeySample.ts | 34 +- ...ntAccessGitRegenerateSecondaryKeySample.ts | 34 +- .../tenantAccessListByServiceSample.ts | 36 +- .../tenantAccessListSecretsSample.ts | 34 +- .../tenantAccessRegeneratePrimaryKeySample.ts | 34 +- ...enantAccessRegenerateSecondaryKeySample.ts | 34 +- .../samples-dev/tenantAccessUpdateSample.ts | 46 +- .../tenantConfigurationDeploySample.ts | 42 +- .../tenantConfigurationGetSyncStateSample.ts | 34 +- .../tenantConfigurationSaveSample.ts | 42 +- .../tenantConfigurationValidateSample.ts | 42 +- .../samples-dev/tenantSettingsGetSample.ts | 34 +- .../tenantSettingsListByServiceSample.ts | 36 +- .../userConfirmationPasswordSendSample.ts | 34 +- .../samples-dev/userCreateOrUpdateSample.ts | 52 +- .../samples-dev/userDeleteSample.ts | 38 +- .../samples-dev/userGenerateSsoUrlSample.ts | 34 +- .../samples-dev/userGetEntityTagSample.ts | 34 +- .../samples-dev/userGetSample.ts | 26 +- .../userGetSharedAccessTokenSample.ts | 48 +- .../samples-dev/userGroupListSample.ts | 40 +- .../samples-dev/userIdentitiesListSample.ts | 40 +- .../samples-dev/userListByServiceSample.ts | 36 +- .../samples-dev/userSubscriptionGetSample.ts | 38 +- .../samples-dev/userSubscriptionListSample.ts | 40 +- .../samples-dev/userUpdateSample.ts | 54 +- .../typescript/src/apiCreateOrUpdateSample.ts | 856 +- .../v9/typescript/src/apiDeleteSample.ts | 38 +- .../src/apiDiagnosticCreateOrUpdateSample.ts | 70 +- .../src/apiDiagnosticDeleteSample.ts | 42 +- .../src/apiDiagnosticGetEntityTagSample.ts | 38 +- .../typescript/src/apiDiagnosticGetSample.ts | 38 +- .../src/apiDiagnosticListByServiceSample.ts | 40 +- .../src/apiDiagnosticUpdateSample.ts | 74 +- .../v9/typescript/src/apiExportGetSample.ts | 80 +- .../typescript/src/apiGetEntityTagSample.ts | 34 +- .../samples/v9/typescript/src/apiGetSample.ts | 48 +- .../apiIssueAttachmentCreateOrUpdateSample.ts | 58 +- .../src/apiIssueAttachmentDeleteSample.ts | 46 +- .../apiIssueAttachmentGetEntityTagSample.ts | 42 +- .../src/apiIssueAttachmentGetSample.ts | 42 +- .../apiIssueAttachmentListByServiceSample.ts | 44 +- .../apiIssueCommentCreateOrUpdateSample.ts | 60 +- .../src/apiIssueCommentDeleteSample.ts | 46 +- .../src/apiIssueCommentGetEntityTagSample.ts | 42 +- .../src/apiIssueCommentGetSample.ts | 42 +- .../src/apiIssueCommentListByServiceSample.ts | 44 +- .../src/apiIssueCreateOrUpdateSample.ts | 58 +- .../v9/typescript/src/apiIssueDeleteSample.ts | 42 +- .../src/apiIssueGetEntityTagSample.ts | 38 +- .../v9/typescript/src/apiIssueGetSample.ts | 38 +- .../src/apiIssueListByServiceSample.ts | 40 +- .../v9/typescript/src/apiIssueUpdateSample.ts | 50 +- .../typescript/src/apiListByServiceSample.ts | 36 +- .../v9/typescript/src/apiListByTagsSample.ts | 36 +- .../src/apiManagementOperationsListSample.ts | 20 +- ...eApplyNetworkConfigurationUpdatesSample.ts | 50 +- .../src/apiManagementServiceBackupSample.ts | 132 +- ...ementServiceCheckNameAvailabilitySample.ts | 32 +- ...piManagementServiceCreateOrUpdateSample.ts | 602 +- .../src/apiManagementServiceDeleteSample.ts | 30 +- ...rviceGetDomainOwnershipIdentifierSample.ts | 18 +- .../src/apiManagementServiceGetSample.ts | 82 +- .../apiManagementServiceGetSsoTokenSample.ts | 30 +- ...agementServiceListByResourceGroupSample.ts | 32 +- .../src/apiManagementServiceListSample.ts | 24 +- ...apiManagementServiceMigrateToStv2Sample.ts | 30 +- .../src/apiManagementServiceRestoreSample.ts | 50 +- ...rviceSkusListAvailableServiceSkusSample.ts | 68 +- .../src/apiManagementServiceUpdateSample.ts | 148 +- .../src/apiManagementSkusListSample.ts | 24 +- .../src/apiOperationCreateOrUpdateSample.ts | 104 +- .../src/apiOperationDeleteSample.ts | 42 +- .../src/apiOperationGetEntityTagSample.ts | 38 +- .../typescript/src/apiOperationGetSample.ts | 72 +- .../src/apiOperationListByApiSample.ts | 40 +- .../apiOperationPolicyCreateOrUpdateSample.ts | 66 +- .../src/apiOperationPolicyDeleteSample.ts | 46 +- .../apiOperationPolicyGetEntityTagSample.ts | 42 +- .../src/apiOperationPolicyGetSample.ts | 42 +- ...apiOperationPolicyListByOperationSample.ts | 38 +- .../src/apiOperationUpdateSample.ts | 114 +- .../src/apiPolicyCreateOrUpdateSample.ts | 114 +- .../typescript/src/apiPolicyDeleteSample.ts | 42 +- .../src/apiPolicyGetEntityTagSample.ts | 38 +- .../v9/typescript/src/apiPolicyGetSample.ts | 38 +- .../src/apiPolicyListByApiSample.ts | 34 +- .../src/apiProductListByApisSample.ts | 40 +- .../src/apiReleaseCreateOrUpdateSample.ts | 54 +- .../typescript/src/apiReleaseDeleteSample.ts | 42 +- .../src/apiReleaseGetEntityTagSample.ts | 38 +- .../v9/typescript/src/apiReleaseGetSample.ts | 38 +- .../src/apiReleaseListByServiceSample.ts | 40 +- .../typescript/src/apiReleaseUpdateSample.ts | 58 +- .../src/apiRevisionListByServiceSample.ts | 40 +- .../src/apiSchemaCreateOrUpdateSample.ts | 52 +- .../typescript/src/apiSchemaDeleteSample.ts | 42 +- .../src/apiSchemaGetEntityTagSample.ts | 38 +- .../v9/typescript/src/apiSchemaGetSample.ts | 38 +- .../src/apiSchemaListByApiSample.ts | 40 +- .../apiTagDescriptionCreateOrUpdateSample.ts | 56 +- .../src/apiTagDescriptionDeleteSample.ts | 42 +- .../apiTagDescriptionGetEntityTagSample.ts | 38 +- .../src/apiTagDescriptionGetSample.ts | 38 +- .../apiTagDescriptionListByServiceSample.ts | 40 +- .../v9/typescript/src/apiUpdateSample.ts | 54 +- .../src/apiVersionSetCreateOrUpdateSample.ts | 50 +- .../src/apiVersionSetDeleteSample.ts | 38 +- .../src/apiVersionSetGetEntityTagSample.ts | 34 +- .../typescript/src/apiVersionSetGetSample.ts | 34 +- .../src/apiVersionSetListByServiceSample.ts | 36 +- .../src/apiVersionSetUpdateSample.ts | 54 +- .../src/apiWikiCreateOrUpdateSample.ts | 44 +- .../v9/typescript/src/apiWikiDeleteSample.ts | 38 +- .../src/apiWikiGetEntityTagSample.ts | 34 +- .../v9/typescript/src/apiWikiGetSample.ts | 34 +- .../v9/typescript/src/apiWikiUpdateSample.ts | 50 +- .../v9/typescript/src/apiWikisListSample.ts | 40 +- ...izationAccessPolicyCreateOrUpdateSample.ts | 56 +- .../authorizationAccessPolicyDeleteSample.ts | 46 +- .../src/authorizationAccessPolicyGetSample.ts | 42 +- ...onAccessPolicyListByAuthorizationSample.ts | 44 +- .../authorizationConfirmConsentCodeSample.ts | 50 +- .../src/authorizationCreateOrUpdateSample.ts | 104 +- .../src/authorizationDeleteSample.ts | 42 +- .../typescript/src/authorizationGetSample.ts | 38 +- ...zationListByAuthorizationProviderSample.ts | 4 +- .../src/authorizationLoginLinksPostSample.ts | 4 +- ...thorizationProviderCreateOrUpdateSample.ts | 4 +- .../src/authorizationProviderDeleteSample.ts | 4 +- .../src/authorizationProviderGetSample.ts | 4 +- ...uthorizationProviderListByServiceSample.ts | 4 +- ...authorizationServerCreateOrUpdateSample.ts | 4 +- .../src/authorizationServerDeleteSample.ts | 4 +- .../authorizationServerGetEntityTagSample.ts | 4 +- .../src/authorizationServerGetSample.ts | 4 +- .../authorizationServerListByServiceSample.ts | 4 +- .../authorizationServerListSecretsSample.ts | 4 +- .../src/authorizationServerUpdateSample.ts | 4 +- .../src/backendCreateOrUpdateSample.ts | 4 +- .../v9/typescript/src/backendDeleteSample.ts | 4 +- .../src/backendGetEntityTagSample.ts | 4 +- .../v9/typescript/src/backendGetSample.ts | 4 +- .../src/backendListByServiceSample.ts | 4 +- .../typescript/src/backendReconnectSample.ts | 4 +- .../v9/typescript/src/backendUpdateSample.ts | 4 +- .../src/cacheCreateOrUpdateSample.ts | 4 +- .../v9/typescript/src/cacheDeleteSample.ts | 4 +- .../typescript/src/cacheGetEntityTagSample.ts | 4 +- .../v9/typescript/src/cacheGetSample.ts | 4 +- .../src/cacheListByServiceSample.ts | 4 +- .../v9/typescript/src/cacheUpdateSample.ts | 4 +- .../src/certificateCreateOrUpdateSample.ts | 4 +- .../typescript/src/certificateDeleteSample.ts | 4 +- .../src/certificateGetEntityTagSample.ts | 4 +- .../v9/typescript/src/certificateGetSample.ts | 4 +- .../src/certificateListByServiceSample.ts | 4 +- .../src/certificateRefreshSecretSample.ts | 4 +- .../src/contentItemCreateOrUpdateSample.ts | 4 +- .../typescript/src/contentItemDeleteSample.ts | 4 +- .../src/contentItemGetEntityTagSample.ts | 4 +- .../v9/typescript/src/contentItemGetSample.ts | 4 +- .../src/contentItemListByServiceSample.ts | 4 +- .../src/contentTypeCreateOrUpdateSample.ts | 4 +- .../typescript/src/contentTypeDeleteSample.ts | 4 +- .../v9/typescript/src/contentTypeGetSample.ts | 4 +- .../src/contentTypeListByServiceSample.ts | 4 +- .../delegationSettingsCreateOrUpdateSample.ts | 4 +- .../delegationSettingsGetEntityTagSample.ts | 4 +- .../src/delegationSettingsGetSample.ts | 4 +- .../delegationSettingsListSecretsSample.ts | 4 +- .../src/delegationSettingsUpdateSample.ts | 4 +- .../src/deletedServicesGetByNameSample.ts | 4 +- ...deletedServicesListBySubscriptionSample.ts | 4 +- .../src/deletedServicesPurgeSample.ts | 4 +- .../src/diagnosticCreateOrUpdateSample.ts | 4 +- .../typescript/src/diagnosticDeleteSample.ts | 4 +- .../src/diagnosticGetEntityTagSample.ts | 4 +- .../v9/typescript/src/diagnosticGetSample.ts | 4 +- .../src/diagnosticListByServiceSample.ts | 4 +- .../typescript/src/diagnosticUpdateSample.ts | 4 +- .../src/documentationCreateOrUpdateSample.ts | 4 +- .../src/documentationDeleteSample.ts | 4 +- .../src/documentationGetEntityTagSample.ts | 4 +- .../typescript/src/documentationGetSample.ts | 4 +- .../src/documentationListByServiceSample.ts | 4 +- .../src/documentationUpdateSample.ts | 4 +- .../src/emailTemplateCreateOrUpdateSample.ts | 4 +- .../src/emailTemplateDeleteSample.ts | 4 +- .../src/emailTemplateGetEntityTagSample.ts | 4 +- .../typescript/src/emailTemplateGetSample.ts | 4 +- .../src/emailTemplateListByServiceSample.ts | 4 +- .../src/emailTemplateUpdateSample.ts | 4 +- .../src/gatewayApiCreateOrUpdateSample.ts | 4 +- .../typescript/src/gatewayApiDeleteSample.ts | 4 +- .../src/gatewayApiGetEntityTagSample.ts | 4 +- .../src/gatewayApiListByServiceSample.ts | 4 +- ...ertificateAuthorityCreateOrUpdateSample.ts | 4 +- ...gatewayCertificateAuthorityDeleteSample.ts | 4 +- ...yCertificateAuthorityGetEntityTagSample.ts | 4 +- .../gatewayCertificateAuthorityGetSample.ts | 4 +- ...CertificateAuthorityListByServiceSample.ts | 4 +- .../src/gatewayCreateOrUpdateSample.ts | 4 +- .../v9/typescript/src/gatewayDeleteSample.ts | 4 +- .../src/gatewayGenerateTokenSample.ts | 4 +- .../src/gatewayGetEntityTagSample.ts | 4 +- .../v9/typescript/src/gatewayGetSample.ts | 4 +- ...stnameConfigurationCreateOrUpdateSample.ts | 4 +- ...atewayHostnameConfigurationDeleteSample.ts | 4 +- ...HostnameConfigurationGetEntityTagSample.ts | 4 +- .../gatewayHostnameConfigurationGetSample.ts | 4 +- ...ostnameConfigurationListByServiceSample.ts | 4 +- .../src/gatewayListByServiceSample.ts | 4 +- .../typescript/src/gatewayListKeysSample.ts | 4 +- .../src/gatewayRegenerateKeySample.ts | 4 +- .../v9/typescript/src/gatewayUpdateSample.ts | 4 +- .../src/globalSchemaCreateOrUpdateSample.ts | 4 +- .../src/globalSchemaDeleteSample.ts | 4 +- .../src/globalSchemaGetEntityTagSample.ts | 4 +- .../typescript/src/globalSchemaGetSample.ts | 4 +- .../src/globalSchemaListByServiceSample.ts | 4 +- .../graphQlApiResolverCreateOrUpdateSample.ts | 4 +- .../src/graphQlApiResolverDeleteSample.ts | 4 +- .../graphQlApiResolverGetEntityTagSample.ts | 4 +- .../src/graphQlApiResolverGetSample.ts | 4 +- .../src/graphQlApiResolverListByApiSample.ts | 4 +- ...QlApiResolverPolicyCreateOrUpdateSample.ts | 4 +- .../graphQlApiResolverPolicyDeleteSample.ts | 4 +- ...phQlApiResolverPolicyGetEntityTagSample.ts | 4 +- .../src/graphQlApiResolverPolicyGetSample.ts | 4 +- ...QlApiResolverPolicyListByResolverSample.ts | 4 +- .../src/graphQlApiResolverUpdateSample.ts | 4 +- .../src/groupCreateOrUpdateSample.ts | 4 +- .../v9/typescript/src/groupDeleteSample.ts | 4 +- .../typescript/src/groupGetEntityTagSample.ts | 4 +- .../v9/typescript/src/groupGetSample.ts | 4 +- .../src/groupListByServiceSample.ts | 4 +- .../v9/typescript/src/groupUpdateSample.ts | 4 +- .../src/groupUserCheckEntityExistsSample.ts | 4 +- .../typescript/src/groupUserCreateSample.ts | 4 +- .../typescript/src/groupUserDeleteSample.ts | 4 +- .../v9/typescript/src/groupUserListSample.ts | 4 +- .../identityProviderCreateOrUpdateSample.ts | 4 +- .../src/identityProviderDeleteSample.ts | 4 +- .../src/identityProviderGetEntityTagSample.ts | 4 +- .../src/identityProviderGetSample.ts | 4 +- .../identityProviderListByServiceSample.ts | 4 +- .../src/identityProviderListSecretsSample.ts | 4 +- .../src/identityProviderUpdateSample.ts | 4 +- .../v9/typescript/src/issueGetSample.ts | 4 +- .../src/issueListByServiceSample.ts | 4 +- .../src/loggerCreateOrUpdateSample.ts | 4 +- .../v9/typescript/src/loggerDeleteSample.ts | 4 +- .../src/loggerGetEntityTagSample.ts | 4 +- .../v9/typescript/src/loggerGetSample.ts | 4 +- .../src/loggerListByServiceSample.ts | 4 +- .../v9/typescript/src/loggerUpdateSample.ts | 4 +- .../src/namedValueCreateOrUpdateSample.ts | 4 +- .../typescript/src/namedValueDeleteSample.ts | 4 +- .../src/namedValueGetEntityTagSample.ts | 4 +- .../v9/typescript/src/namedValueGetSample.ts | 4 +- .../src/namedValueListByServiceSample.ts | 4 +- .../src/namedValueListValueSample.ts | 4 +- .../src/namedValueRefreshSecretSample.ts | 4 +- .../typescript/src/namedValueUpdateSample.ts | 4 +- .../src/networkStatusListByLocationSample.ts | 4 +- .../src/networkStatusListByServiceSample.ts | 4 +- .../src/notificationCreateOrUpdateSample.ts | 4 +- .../typescript/src/notificationGetSample.ts | 4 +- .../src/notificationListByServiceSample.ts | 4 +- ...onRecipientEmailCheckEntityExistsSample.ts | 4 +- ...ationRecipientEmailCreateOrUpdateSample.ts | 4 +- .../notificationRecipientEmailDeleteSample.ts | 4 +- ...nRecipientEmailListByNotificationSample.ts | 4 +- ...ionRecipientUserCheckEntityExistsSample.ts | 4 +- ...cationRecipientUserCreateOrUpdateSample.ts | 4 +- .../notificationRecipientUserDeleteSample.ts | 4 +- ...onRecipientUserListByNotificationSample.ts | 4 +- ...enIdConnectProviderCreateOrUpdateSample.ts | 4 +- .../src/openIdConnectProviderDeleteSample.ts | 4 +- ...openIdConnectProviderGetEntityTagSample.ts | 4 +- .../src/openIdConnectProviderGetSample.ts | 4 +- ...penIdConnectProviderListByServiceSample.ts | 4 +- .../openIdConnectProviderListSecretsSample.ts | 4 +- .../src/openIdConnectProviderUpdateSample.ts | 4 +- .../src/operationListByTagsSample.ts | 4 +- ...ependenciesEndpointsListByServiceSample.ts | 4 +- .../performConnectivityCheckAsyncSample.ts | 4 +- .../src/policyCreateOrUpdateSample.ts | 4 +- .../v9/typescript/src/policyDeleteSample.ts | 4 +- .../policyDescriptionListByServiceSample.ts | 4 +- .../src/policyFragmentCreateOrUpdateSample.ts | 4 +- .../src/policyFragmentDeleteSample.ts | 4 +- .../src/policyFragmentGetEntityTagSample.ts | 4 +- .../typescript/src/policyFragmentGetSample.ts | 4 +- .../src/policyFragmentListByServiceSample.ts | 4 +- .../src/policyFragmentListReferencesSample.ts | 4 +- .../src/policyGetEntityTagSample.ts | 4 +- .../v9/typescript/src/policyGetSample.ts | 4 +- .../src/policyListByServiceSample.ts | 4 +- .../src/portalConfigCreateOrUpdateSample.ts | 4 +- .../src/portalConfigGetEntityTagSample.ts | 4 +- .../typescript/src/portalConfigGetSample.ts | 4 +- .../src/portalConfigListByServiceSample.ts | 4 +- .../src/portalConfigUpdateSample.ts | 4 +- .../src/portalRevisionCreateOrUpdateSample.ts | 4 +- .../src/portalRevisionGetEntityTagSample.ts | 4 +- .../typescript/src/portalRevisionGetSample.ts | 4 +- .../src/portalRevisionListByServiceSample.ts | 4 +- .../src/portalRevisionUpdateSample.ts | 4 +- .../src/portalSettingsListByServiceSample.ts | 4 +- ...eEndpointConnectionCreateOrUpdateSample.ts | 4 +- .../privateEndpointConnectionDeleteSample.ts | 4 +- ...rivateEndpointConnectionGetByNameSample.ts | 4 +- ...tConnectionGetPrivateLinkResourceSample.ts | 4 +- ...teEndpointConnectionListByServiceSample.ts | 4 +- ...onnectionListPrivateLinkResourcesSample.ts | 4 +- .../src/productApiCheckEntityExistsSample.ts | 4 +- .../src/productApiCreateOrUpdateSample.ts | 4 +- .../typescript/src/productApiDeleteSample.ts | 4 +- .../src/productApiListByProductSample.ts | 4 +- .../src/productCreateOrUpdateSample.ts | 4 +- .../v9/typescript/src/productDeleteSample.ts | 4 +- .../src/productGetEntityTagSample.ts | 4 +- .../v9/typescript/src/productGetSample.ts | 4 +- .../productGroupCheckEntityExistsSample.ts | 4 +- .../src/productGroupCreateOrUpdateSample.ts | 4 +- .../src/productGroupDeleteSample.ts | 4 +- .../src/productGroupListByProductSample.ts | 4 +- .../src/productListByServiceSample.ts | 4 +- .../typescript/src/productListByTagsSample.ts | 4 +- .../src/productPolicyCreateOrUpdateSample.ts | 4 +- .../src/productPolicyDeleteSample.ts | 4 +- .../src/productPolicyGetEntityTagSample.ts | 4 +- .../typescript/src/productPolicyGetSample.ts | 4 +- .../src/productPolicyListByProductSample.ts | 4 +- .../src/productSubscriptionsListSample.ts | 4 +- .../v9/typescript/src/productUpdateSample.ts | 4 +- .../src/productWikiCreateOrUpdateSample.ts | 4 +- .../typescript/src/productWikiDeleteSample.ts | 4 +- .../src/productWikiGetEntityTagSample.ts | 4 +- .../v9/typescript/src/productWikiGetSample.ts | 4 +- .../typescript/src/productWikiUpdateSample.ts | 4 +- .../typescript/src/productWikisListSample.ts | 4 +- .../quotaByCounterKeysListByServiceSample.ts | 4 +- .../src/quotaByCounterKeysUpdateSample.ts | 4 +- .../src/quotaByPeriodKeysGetSample.ts | 4 +- .../src/quotaByPeriodKeysUpdateSample.ts | 4 +- .../src/regionListByServiceSample.ts | 4 +- .../typescript/src/reportsListByApiSample.ts | 4 +- .../typescript/src/reportsListByGeoSample.ts | 4 +- .../src/reportsListByOperationSample.ts | 4 +- .../src/reportsListByProductSample.ts | 4 +- .../src/reportsListByRequestSample.ts | 4 +- .../src/reportsListBySubscriptionSample.ts | 4 +- .../typescript/src/reportsListByTimeSample.ts | 4 +- .../typescript/src/reportsListByUserSample.ts | 4 +- .../src/signInSettingsCreateOrUpdateSample.ts | 4 +- .../src/signInSettingsGetEntityTagSample.ts | 4 +- .../typescript/src/signInSettingsGetSample.ts | 4 +- .../src/signInSettingsUpdateSample.ts | 4 +- .../src/signUpSettingsCreateOrUpdateSample.ts | 4 +- .../src/signUpSettingsGetEntityTagSample.ts | 4 +- .../typescript/src/signUpSettingsGetSample.ts | 4 +- .../src/signUpSettingsUpdateSample.ts | 4 +- .../src/subscriptionCreateOrUpdateSample.ts | 4 +- .../src/subscriptionDeleteSample.ts | 4 +- .../src/subscriptionGetEntityTagSample.ts | 4 +- .../typescript/src/subscriptionGetSample.ts | 4 +- .../typescript/src/subscriptionListSample.ts | 4 +- .../src/subscriptionListSecretsSample.ts | 4 +- .../subscriptionRegeneratePrimaryKeySample.ts | 4 +- ...ubscriptionRegenerateSecondaryKeySample.ts | 4 +- .../src/subscriptionUpdateSample.ts | 4 +- .../v9/typescript/src/tagAssignToApiSample.ts | 4 +- .../src/tagAssignToOperationSample.ts | 4 +- .../src/tagAssignToProductSample.ts | 4 +- .../typescript/src/tagCreateOrUpdateSample.ts | 4 +- .../v9/typescript/src/tagDeleteSample.ts | 4 +- .../typescript/src/tagDetachFromApiSample.ts | 4 +- .../src/tagDetachFromOperationSample.ts | 4 +- .../src/tagDetachFromProductSample.ts | 4 +- .../v9/typescript/src/tagGetByApiSample.ts | 4 +- .../typescript/src/tagGetByOperationSample.ts | 4 +- .../typescript/src/tagGetByProductSample.ts | 4 +- .../src/tagGetEntityStateByApiSample.ts | 4 +- .../src/tagGetEntityStateByOperationSample.ts | 4 +- .../src/tagGetEntityStateByProductSample.ts | 4 +- .../typescript/src/tagGetEntityStateSample.ts | 4 +- .../samples/v9/typescript/src/tagGetSample.ts | 4 +- .../v9/typescript/src/tagListByApiSample.ts | 4 +- .../src/tagListByOperationSample.ts | 4 +- .../typescript/src/tagListByProductSample.ts | 4 +- .../typescript/src/tagListByServiceSample.ts | 4 +- .../src/tagResourceListByServiceSample.ts | 4 +- .../v9/typescript/src/tagUpdateSample.ts | 4 +- .../src/tenantAccessCreateSample.ts | 4 +- .../src/tenantAccessGetEntityTagSample.ts | 4 +- .../typescript/src/tenantAccessGetSample.ts | 4 +- ...nantAccessGitRegeneratePrimaryKeySample.ts | 4 +- ...ntAccessGitRegenerateSecondaryKeySample.ts | 4 +- .../src/tenantAccessListByServiceSample.ts | 4 +- .../src/tenantAccessListSecretsSample.ts | 4 +- .../tenantAccessRegeneratePrimaryKeySample.ts | 4 +- ...enantAccessRegenerateSecondaryKeySample.ts | 4 +- .../src/tenantAccessUpdateSample.ts | 4 +- .../src/tenantConfigurationDeploySample.ts | 4 +- .../tenantConfigurationGetSyncStateSample.ts | 4 +- .../src/tenantConfigurationSaveSample.ts | 4 +- .../src/tenantConfigurationValidateSample.ts | 4 +- .../typescript/src/tenantSettingsGetSample.ts | 4 +- .../src/tenantSettingsListByServiceSample.ts | 4 +- .../src/userConfirmationPasswordSendSample.ts | 4 +- .../src/userCreateOrUpdateSample.ts | 4 +- .../v9/typescript/src/userDeleteSample.ts | 4 +- .../src/userGenerateSsoUrlSample.ts | 4 +- .../typescript/src/userGetEntityTagSample.ts | 4 +- .../v9/typescript/src/userGetSample.ts | 4 +- .../src/userGetSharedAccessTokenSample.ts | 4 +- .../v9/typescript/src/userGroupListSample.ts | 4 +- .../src/userIdentitiesListSample.ts | 4 +- .../typescript/src/userListByServiceSample.ts | 4 +- .../src/userSubscriptionGetSample.ts | 4 +- .../src/userSubscriptionListSample.ts | 4 +- .../v9/typescript/src/userUpdateSample.ts | 4 +- .../src/apiManagementClient.ts | 1256 +- .../arm-apimanagement/src/index.ts | 8 +- .../arm-apimanagement/src/lroImpl.ts | 50 +- .../arm-apimanagement/src/models/index.ts | 11070 +++--- .../arm-apimanagement/src/models/mappers.ts | 32914 ++++++++-------- .../src/models/parameters.ts | 2174 +- .../arm-apimanagement/src/operations/api.ts | 1316 +- .../src/operations/apiDiagnostic.ts | 904 +- .../src/operations/apiExport.ts | 132 +- .../src/operations/apiIssue.ts | 890 +- .../src/operations/apiIssueAttachment.ts | 840 +- .../src/operations/apiIssueComment.ts | 840 +- .../src/operations/apiManagementOperations.ts | 234 +- .../src/operations/apiManagementService.ts | 2500 +- .../operations/apiManagementServiceSkus.ts | 340 +- .../src/operations/apiManagementSkus.ts | 244 +- .../src/operations/apiOperation.ts | 924 +- .../src/operations/apiOperationPolicy.ts | 568 +- .../src/operations/apiPolicy.ts | 496 +- .../src/operations/apiProduct.ts | 378 +- .../src/operations/apiRelease.ts | 898 +- .../src/operations/apiRevision.ts | 378 +- .../src/operations/apiSchema.ts | 970 +- .../src/operations/apiTagDescription.ts | 810 +- .../src/operations/apiVersionSet.ts | 830 +- .../src/operations/apiWiki.ts | 486 +- .../src/operations/apiWikis.ts | 368 +- .../src/operations/authorization.ts | 832 +- .../operations/authorizationAccessPolicy.ts | 790 +- .../src/operations/authorizationLoginLinks.ts | 138 +- .../src/operations/authorizationProvider.ts | 644 +- .../src/operations/authorizationServer.ts | 888 +- .../src/operations/backend.ts | 914 +- .../arm-apimanagement/src/operations/cache.ts | 806 +- .../src/operations/certificate.ts | 796 +- .../src/operations/contentItem.ts | 774 +- .../src/operations/contentType.ts | 624 +- .../src/operations/delegationSettings.ts | 434 +- .../src/operations/deletedServices.ts | 528 +- .../src/operations/diagnostic.ts | 828 +- .../src/operations/documentation.ts | 830 +- .../src/operations/emailTemplate.ts | 818 +- .../src/operations/gateway.ts | 1092 +- .../src/operations/gatewayApi.ts | 656 +- .../operations/gatewayCertificateAuthority.ts | 806 +- .../gatewayHostnameConfiguration.ts | 780 +- .../src/operations/globalSchema.ts | 880 +- .../src/operations/graphQLApiResolver.ts | 922 +- .../operations/graphQLApiResolverPolicy.ts | 860 +- .../arm-apimanagement/src/operations/group.ts | 808 +- .../src/operations/groupUser.ts | 640 +- .../src/operations/identityProvider.ts | 920 +- .../arm-apimanagement/src/operations/index.ts | 176 +- .../arm-apimanagement/src/operations/issue.ts | 430 +- .../src/operations/logger.ts | 820 +- .../src/operations/namedValue.ts | 1542 +- .../src/operations/networkStatus.ts | 202 +- .../src/operations/notification.ts | 500 +- .../operations/notificationRecipientEmail.ts | 372 +- .../operations/notificationRecipientUser.ts | 372 +- .../src/operations/openIdConnectProvider.ts | 888 +- .../src/operations/operationOperations.ts | 386 +- .../outboundNetworkDependenciesEndpoints.ts | 102 +- .../src/operations/policy.ts | 456 +- .../src/operations/policyDescription.ts | 100 +- .../src/operations/policyFragment.ts | 726 +- .../src/operations/portalConfig.ts | 496 +- .../src/operations/portalRevision.ts | 1122 +- .../src/operations/portalSettings.ts | 100 +- .../privateEndpointConnectionOperations.ts | 970 +- .../src/operations/product.ts | 1136 +- .../src/operations/productApi.ts | 644 +- .../src/operations/productGroup.ts | 638 +- .../src/operations/productPolicy.ts | 500 +- .../src/operations/productSubscriptions.ts | 378 +- .../src/operations/productWiki.ts | 500 +- .../src/operations/productWikis.ts | 382 +- .../src/operations/quotaByCounterKeys.ts | 212 +- .../src/operations/quotaByPeriodKeys.ts | 248 +- .../src/operations/region.ts | 338 +- .../src/operations/reports.ts | 2938 +- .../src/operations/signInSettings.ts | 360 +- .../src/operations/signUpSettings.ts | 360 +- .../src/operations/subscription.ts | 1060 +- .../arm-apimanagement/src/operations/tag.ts | 2996 +- .../src/operations/tagResource.ts | 348 +- .../src/operations/tenantAccess.ts | 976 +- .../src/operations/tenantAccessGit.ts | 180 +- .../src/operations/tenantConfiguration.ts | 956 +- .../src/operations/tenantSettings.ts | 422 +- .../arm-apimanagement/src/operations/user.ts | 992 +- .../operations/userConfirmationPassword.ts | 100 +- .../src/operations/userGroup.ts | 378 +- .../src/operations/userIdentities.ts | 368 +- .../src/operations/userSubscription.ts | 468 +- .../src/operationsInterfaces/api.ts | 280 +- .../src/operationsInterfaces/apiDiagnostic.ts | 230 +- .../src/operationsInterfaces/apiExport.ts | 50 +- .../src/operationsInterfaces/apiIssue.ts | 222 +- .../apiIssueAttachment.ts | 196 +- .../operationsInterfaces/apiIssueComment.ts | 196 +- .../apiManagementOperations.ts | 20 +- .../apiManagementService.ts | 598 +- .../apiManagementServiceSkus.ts | 28 +- .../operationsInterfaces/apiManagementSkus.ts | 20 +- .../src/operationsInterfaces/apiOperation.ts | 244 +- .../apiOperationPolicy.ts | 220 +- .../src/operationsInterfaces/apiPolicy.ts | 190 +- .../src/operationsInterfaces/apiProduct.ts | 28 +- .../src/operationsInterfaces/apiRelease.ts | 234 +- .../src/operationsInterfaces/apiRevision.ts | 32 +- .../src/operationsInterfaces/apiSchema.ts | 234 +- .../operationsInterfaces/apiTagDescription.ts | 198 +- .../src/operationsInterfaces/apiVersionSet.ts | 208 +- .../src/operationsInterfaces/apiWiki.ts | 174 +- .../src/operationsInterfaces/apiWikis.ts | 28 +- .../src/operationsInterfaces/authorization.ts | 182 +- .../authorizationAccessPolicy.ts | 158 +- .../authorizationLoginLinks.ts | 42 +- .../authorizationProvider.ts | 126 +- .../authorizationServer.ts | 228 +- .../src/operationsInterfaces/backend.ts | 240 +- .../src/operationsInterfaces/cache.ts | 208 +- .../src/operationsInterfaces/certificate.ts | 198 +- .../src/operationsInterfaces/contentItem.ts | 178 +- .../src/operationsInterfaces/contentType.ts | 138 +- .../delegationSettings.ts | 146 +- .../operationsInterfaces/deletedServices.ts | 94 +- .../src/operationsInterfaces/diagnostic.ts | 206 +- .../src/operationsInterfaces/documentation.ts | 208 +- .../src/operationsInterfaces/emailTemplate.ts | 200 +- .../src/operationsInterfaces/gateway.ts | 312 +- .../src/operationsInterfaces/gatewayApi.ts | 140 +- .../gatewayCertificateAuthority.ts | 194 +- .../gatewayHostnameConfiguration.ts | 196 +- .../src/operationsInterfaces/globalSchema.ts | 198 +- .../graphQLApiResolver.ts | 244 +- .../graphQLApiResolverPolicy.ts | 218 +- .../src/operationsInterfaces/group.ts | 200 +- .../src/operationsInterfaces/groupUser.ts | 132 +- .../operationsInterfaces/identityProvider.ts | 232 +- .../src/operationsInterfaces/index.ts | 176 +- .../src/operationsInterfaces/issue.ts | 58 +- .../src/operationsInterfaces/logger.ts | 198 +- .../src/operationsInterfaces/namedValue.ts | 384 +- .../src/operationsInterfaces/networkStatus.ts | 64 +- .../src/operationsInterfaces/notification.ts | 90 +- .../notificationRecipientEmail.ts | 134 +- .../notificationRecipientUser.ts | 134 +- .../openIdConnectProvider.ts | 228 +- .../operationOperations.ts | 34 +- .../outboundNetworkDependenciesEndpoints.ts | 28 +- .../src/operationsInterfaces/policy.ts | 160 +- .../operationsInterfaces/policyDescription.ts | 28 +- .../operationsInterfaces/policyFragment.ts | 230 +- .../src/operationsInterfaces/portalConfig.ts | 170 +- .../operationsInterfaces/portalRevision.ts | 266 +- .../operationsInterfaces/portalSettings.ts | 28 +- .../privateEndpointConnectionOperations.ts | 246 +- .../src/operationsInterfaces/product.ts | 224 +- .../src/operationsInterfaces/productApi.ts | 138 +- .../src/operationsInterfaces/productGroup.ts | 132 +- .../src/operationsInterfaces/productPolicy.ts | 180 +- .../productSubscriptions.ts | 32 +- .../src/operationsInterfaces/productWiki.ts | 174 +- .../src/operationsInterfaces/productWikis.ts | 28 +- .../quotaByCounterKeys.ts | 84 +- .../operationsInterfaces/quotaByPeriodKeys.ts | 90 +- .../src/operationsInterfaces/region.ts | 24 +- .../src/operationsInterfaces/reports.ts | 380 +- .../operationsInterfaces/signInSettings.ts | 120 +- .../operationsInterfaces/signUpSettings.ts | 120 +- .../src/operationsInterfaces/subscription.ts | 302 +- .../src/operationsInterfaces/tag.ts | 734 +- .../src/operationsInterfaces/tagResource.ts | 28 +- .../src/operationsInterfaces/tenantAccess.ts | 260 +- .../operationsInterfaces/tenantAccessGit.ts | 60 +- .../tenantConfiguration.ts | 276 +- .../operationsInterfaces/tenantSettings.ts | 60 +- .../src/operationsInterfaces/user.ts | 268 +- .../userConfirmationPassword.ts | 28 +- .../src/operationsInterfaces/userGroup.ts | 28 +- .../operationsInterfaces/userIdentities.ts | 32 +- .../operationsInterfaces/userSubscription.ts | 68 +- .../arm-apimanagement/src/pagingHelper.ts | 26 +- ...ples.ts => apimanagement_examples.spec.ts} | 138 +- .../arm-apimanagement/tsconfig.json | 40 +- .../arm-apimanagement/tsconfig.samples.json | 10 + .../arm-apimanagement/tsconfig.src.json | 3 + .../arm-apimanagement/tsconfig.test.json | 6 + .../arm-apimanagement/vitest.config.ts | 15 + .../arm-apimanagement/vitest.esm.config.ts | 12 + 1189 files changed, 76263 insertions(+), 77953 deletions(-) create mode 100644 sdk/advisor/arm-advisor/tsconfig.samples.json create mode 100644 sdk/advisor/arm-advisor/tsconfig.src.json create mode 100644 sdk/advisor/arm-advisor/tsconfig.test.json create mode 100644 sdk/advisor/arm-advisor/vitest.config.ts create mode 100644 sdk/advisor/arm-advisor/vitest.esm.config.ts rename sdk/agrifood/arm-agrifood/test/{sampleTest.ts => sample.spec.ts} (69%) create mode 100644 sdk/agrifood/arm-agrifood/tsconfig.samples.json create mode 100644 sdk/agrifood/arm-agrifood/tsconfig.src.json create mode 100644 sdk/agrifood/arm-agrifood/tsconfig.test.json create mode 100644 sdk/agrifood/arm-agrifood/vitest.config.ts create mode 100644 sdk/agrifood/arm-agrifood/vitest.esm.config.ts create mode 100644 sdk/apicenter/arm-apicenter/tsconfig.samples.json create mode 100644 sdk/apicenter/arm-apicenter/tsconfig.src.json create mode 100644 sdk/apicenter/arm-apicenter/tsconfig.test.json create mode 100644 sdk/apicenter/arm-apicenter/vitest.config.ts create mode 100644 sdk/apicenter/arm-apicenter/vitest.esm.config.ts rename sdk/apimanagement/arm-apimanagement/test/{apimanagement_examples.ts => apimanagement_examples.spec.ts} (56%) create mode 100644 sdk/apimanagement/arm-apimanagement/tsconfig.samples.json create mode 100644 sdk/apimanagement/arm-apimanagement/tsconfig.src.json create mode 100644 sdk/apimanagement/arm-apimanagement/tsconfig.test.json create mode 100644 sdk/apimanagement/arm-apimanagement/vitest.config.ts create mode 100644 sdk/apimanagement/arm-apimanagement/vitest.esm.config.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 2a21ccf9010c..68be1681fb6b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -72,19 +72,19 @@ importers: version: file:projects/app-configuration.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-advisor': specifier: file:./projects/arm-advisor.tgz - version: file:projects/arm-advisor.tgz + version: file:projects/arm-advisor.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-agrifood': specifier: file:./projects/arm-agrifood.tgz - version: file:projects/arm-agrifood.tgz + version: file:projects/arm-agrifood.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) '@rush-temp/arm-analysisservices': specifier: file:./projects/arm-analysisservices.tgz version: file:projects/arm-analysisservices.tgz '@rush-temp/arm-apicenter': specifier: file:./projects/arm-apicenter.tgz - version: file:projects/arm-apicenter.tgz + version: file:projects/arm-apicenter.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) '@rush-temp/arm-apimanagement': specifier: file:./projects/arm-apimanagement.tgz - version: file:projects/arm-apimanagement.tgz + version: file:projects/arm-apimanagement.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) '@rush-temp/arm-appcomplianceautomation': specifier: file:./projects/arm-appcomplianceautomation.tgz version: file:projects/arm-appcomplianceautomation.tgz @@ -2516,11 +2516,11 @@ packages: version: 0.0.0 '@rush-temp/arm-advisor@file:projects/arm-advisor.tgz': - resolution: {integrity: sha512-xSYl+4IYPWIxFqAyION4BRsWO/OfSl2l0qETNmvz9LyfTDY36sw6tcqvzk0CVGp1M6rfzSFpkqqVhr2sTLqyLw==, tarball: file:projects/arm-advisor.tgz} + resolution: {integrity: sha512-DSmDhGai4HPlrXuT+XuOo23UXk5rGNWK6MYU2DasODsLUEbzpyHacsH3vempWORzjXJ8/BQipeCTBg2AOReE0g==, tarball: file:projects/arm-advisor.tgz} version: 0.0.0 '@rush-temp/arm-agrifood@file:projects/arm-agrifood.tgz': - resolution: {integrity: sha512-faqvQ6Yfe9K1eDj3m5YlpfAgE2vZXU3ERmbD9+npJdRhxEvazTNlKt6rMGCDkT6hb20CU8qO7eNpUx6ht//OeQ==, tarball: file:projects/arm-agrifood.tgz} + resolution: {integrity: sha512-Kv3K2J9hLs9u3a7bAIHg32VOovsjFMkNX4YyPdtzl8nvbJDbkWbgJMldGePCsVfQT/gKt9rb4FjQkuaEOnoXAg==, tarball: file:projects/arm-agrifood.tgz} version: 0.0.0 '@rush-temp/arm-analysisservices@file:projects/arm-analysisservices.tgz': @@ -2528,11 +2528,11 @@ packages: version: 0.0.0 '@rush-temp/arm-apicenter@file:projects/arm-apicenter.tgz': - resolution: {integrity: sha512-7XnNlP+0iJQNJDlkcWeF5p2VfK3WokuFIR9TTVcsKp+HLFux7NxRLmJWOc0MHY+xCRInmoQGDWvIP7iyrvXKlw==, tarball: file:projects/arm-apicenter.tgz} + resolution: {integrity: sha512-15A5ivtSWTZ75Ev16QNA4jGVSb8pv3EZ4jif8RhfShiTAn8EK4S6fVqB3C0254Yv05PAqqjqspplpLWHqkVZfg==, tarball: file:projects/arm-apicenter.tgz} version: 0.0.0 '@rush-temp/arm-apimanagement@file:projects/arm-apimanagement.tgz': - resolution: {integrity: sha512-00aKO8kZKXmEPx1Dk6WJaNWTZlkf8a/ACSgfzO3KJl+ajhHz6esxJiUXzr8JD946eXlxiEJ1HelJpeZKJQWMxg==, tarball: file:projects/arm-apimanagement.tgz} + resolution: {integrity: sha512-21fUiCFQejze8e2l3PwTiHFc8KDuj3L8nXnEeFExNELM/nS+iCf6rEih+d5pe0+O6rQ3camxDNAA223kC/eBCA==, tarball: file:projects/arm-apimanagement.tgz} version: 0.0.0 '@rush-temp/arm-appcomplianceautomation@file:projects/arm-appcomplianceautomation.tgz': @@ -10369,42 +10369,59 @@ snapshots: - vite - webdriverio - '@rush-temp/arm-advisor@file:projects/arm-advisor.tgz': + '@rush-temp/arm-advisor@file:projects/arm-advisor.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio - '@rush-temp/arm-agrifood@file:projects/arm-agrifood.tgz': + '@rush-temp/arm-agrifood@file:projects/arm-agrifood.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.68 - chai: 4.5.0 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jsdom + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser '@rush-temp/arm-analysisservices@file:projects/arm-analysisservices.tgz': dependencies: @@ -10425,45 +10442,55 @@ snapshots: - '@swc/wasm' - supports-color - '@rush-temp/arm-apicenter@file:projects/arm-apicenter.tgz': + '@rush-temp/arm-apicenter@file:projects/arm-apicenter.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jsdom + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser - '@rush-temp/arm-apimanagement@file:projects/arm-apimanagement.tgz': + '@rush-temp/arm-apimanagement@file:projects/arm-apimanagement.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jsdom + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser '@rush-temp/arm-appcomplianceautomation@file:projects/arm-appcomplianceautomation.tgz': dependencies: diff --git a/common/tools/dev-tool/src/commands/admin/migrate-package.ts b/common/tools/dev-tool/src/commands/admin/migrate-package.ts index 0625101e82a6..b38b7b080520 100644 --- a/common/tools/dev-tool/src/commands/admin/migrate-package.ts +++ b/common/tools/dev-tool/src/commands/admin/migrate-package.ts @@ -100,7 +100,7 @@ export default leafCommand(commandInfo, async ({ "package-name": packageName, br async function prepareFiles(projectFolder: string, options: { browser: boolean }): Promise { log.info("Migrating package.json, tsconfig.json, and api-extractor.json"); - await upgradePackageJson(projectFolder, resolve(projectFolder, "package.json")); + await upgradePackageJson(projectFolder, resolve(projectFolder, "package.json"), options); await upgradeTypeScriptConfig(resolve(projectFolder, "tsconfig.json")); await fixApiExtractorConfig(resolve(projectFolder, "api-extractor.json")); await commitChanges(projectFolder, "Update package.json, tsconfig.json, and api-extractor.json"); @@ -110,6 +110,7 @@ async function prepareFiles(projectFolder: string, options: { browser: boolean } await writeBrowserTestConfig(projectFolder); await writeFile(resolve(projectFolder, "vitest.browser.config.ts"), VITEST_BROWSER_CONFIG); } + await writeFile(resolve(projectFolder, "vitest.esm.config.ts"), VITEST_ESM_CONFIG); await writeFile(resolve(projectFolder, "vitest.config.ts"), VITEST_CONFIG); await commitChanges(projectFolder, "Update test config"); @@ -121,13 +122,24 @@ async function prepareFiles(projectFolder: string, options: { browser: boolean } async function applyCodemods(projectFolder: string): Promise { const project = new Project({ tsConfigFilePath: resolve(projectFolder, "tsconfig.json") }); + const skipPatterns = [/^vitest.*\.config\.ts$/]; + // Apply the codemods, one at a time, to all source files in the project. // Commit the changes after each codemod is applied for ease of reviewing. // For more information on the codemods and how to contribute, see the `codemods` directory. for (const mod of codemods) { log.info(`Applying codemod: ${mod.name}`); for (const sourceFile of project.getSourceFiles()) { + // Skip config files + if (skipPatterns.some((pattern) => pattern.test(sourceFile.getBaseName()))) { + continue; + } + mod(sourceFile); + + // Clean up source file after applying the codemod + sourceFile.fixUnusedIdentifiers(); + await sourceFile.save(); } await commitChanges(projectFolder, `Apply codemod: "${mod.name}"`); @@ -138,17 +150,9 @@ const VITEST_CONFIG = ` // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { defineConfig, mergeConfig } from "vitest/config"; import viteConfig from "../../../vitest.shared.config.ts"; -export default mergeConfig( - viteConfig, - defineConfig({ - test: { - include: ["test/**/*.spec.ts"], - }, - }), -); +export default viteConfig; `; const VITEST_BROWSER_CONFIG = ` @@ -170,6 +174,20 @@ export default mergeConfig( ); `; +const VITEST_ESM_CONFIG = ` +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); +`; + async function writeBrowserTestConfig(packageFolder: string): Promise { const testConfig = { extends: "./.tshy/build.json", @@ -217,30 +235,55 @@ async function cleanupFiles(projectFolder: string): Promise { } async function upgradeTypeScriptConfig(tsconfigPath: string): Promise { - const tsConfig = JSON.parse(await readFile(tsconfigPath, "utf-8")); - - // Set module resolution - tsConfig.compilerOptions.module = "NodeNext"; - tsConfig.compilerOptions.moduleResolution = "NodeNext"; - tsConfig.compilerOptions.rootDir = "."; - tsConfig.include = [ - "src/**/*.ts", - "src/**/*.mts", - "src/**/*.cts", - "samples-dev/**/*.ts", // TODO: Check if samples-dev is needed - "test/**/*.ts", - "test/**/*.mts", - "test/**/*.cts", - ]; + const packageJson = JSON.parse( + await readFile(resolve(dirname(tsconfigPath), "package.json"), "utf-8"), + ); - // Remove old options - delete tsConfig.compilerOptions.outDir; - delete tsConfig.compilerOptions.declarationDir; + const tsConfig = { + references: [ + { + path: "./tsconfig.src.json", + }, + { + path: "./tsconfig.samples.json", + }, + { + path: "./tsconfig.test.json", + }, + ], + }; await saveJson(tsconfigPath, tsConfig); + + const tsSamplesConfig = { + extends: "../../../tsconfig.samples.base.json", + compilerOptions: { + paths: { + [`${packageJson.name}`]: ["./dist/esm"], + }, + }, + }; + + await saveJson(resolve(dirname(tsconfigPath), "tsconfig.samples.json"), tsSamplesConfig); + + const tsConfigSrc = { + extends: "../../../tsconfig.lib.json", + }; + + await saveJson(resolve(dirname(tsconfigPath), "tsconfig.src.json"), tsConfigSrc); + + const tsConfigTest = { + extends: ["./tsconfig.src.json", "../../../tsconfig.test.base.json"], + }; + + await saveJson(resolve(dirname(tsconfigPath), "tsconfig.test.json"), tsConfigTest); } -async function upgradePackageJson(projectFolder: string, packageJsonPath: string): Promise { +async function upgradePackageJson( + projectFolder: string, + packageJsonPath: string, + options: { browser: boolean }, +): Promise { const packageJson = JSON.parse(await readFile(packageJsonPath, "utf-8")); // Change the module type to ESM @@ -250,37 +293,56 @@ async function upgradePackageJson(projectFolder: string, packageJsonPath: string removeLegacyPackages(packageJson); // Add the new packages - await addNewPackages(packageJson); + await addNewPackages(packageJson, options); // Sort the devDependencies sortPackage(packageJson); // Add tshy - addTypeScriptHybridizer(packageJson); + addTypeScriptHybridizer(packageJson, options); // Set files setFilesSection(packageJson); // Set scripts - setScriptsSection(packageJson.scripts); + setScriptsSection(packageJson.scripts, { + ...options, + isArm: packageJson.name.includes("@azure/arm-"), + }); // Rename files and rewrite browser field await renameFieldFiles("browser", "browser", projectFolder, packageJson); await renameFieldFiles("react-native", "native", projectFolder, packageJson); packageJson.browser = "./dist/browser/index.js"; - delete packageJson["react-native"]; + packageJson["react-native"] = "./dist/react-native/index.js"; + + if (!options.browser) { + packageJson.browser = undefined; + packageJson["react-native"] = undefined; + } // Save the updated package.json await saveJson(packageJsonPath, packageJson); } -function setScriptsSection(scripts: PackageJson["scripts"]): void { - scripts["build"] = "npm run clean && dev-tool run build-package && dev-tool run extract-api"; +function setScriptsSection( + scripts: PackageJson["scripts"], + options: { browser: boolean; isArm: boolean }, +): void { + scripts["build"] = + "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api"; + + if (options.browser) { + scripts["unit-test:browser"] = + "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser"; + } - scripts["unit-test:browser"] = - "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser"; scripts["unit-test:node"] = "dev-tool run test:vitest"; + if (options.isArm) { + scripts["integration-test:node"] = "dev-tool run test:vitest --esm"; + } + for (const script of Object.keys(scripts)) { if (scripts[script].includes("tsc -p .")) { log.info(`Replacing usage of "tsc -p ." with "dev-tool run build-package" in ${script}`); @@ -292,11 +354,15 @@ function setScriptsSection(scripts: PackageJson["scripts"]): void { // eslint-disable-next-line @typescript-eslint/no-explicit-any function setFilesSection(packageJson: any): void { packageJson.files = ["dist/", "README.md", "LICENSE"]; + if (packageJson.name.includes("@azure/arm-")) { + packageJson.files.push("review/", "CHANGELOG.md"); + } } // eslint-disable-next-line @typescript-eslint/no-explicit-any -function addTypeScriptHybridizer(packageJson: any): void { +function addTypeScriptHybridizer(packageJson: any, options: { browser: boolean }): void { packageJson["tshy"] = { + project: "./tsconfig.src.json", exports: { "./package.json": "./package.json", ".": "./src/index.ts", @@ -306,6 +372,11 @@ function addTypeScriptHybridizer(packageJson: any): void { selfLink: false, }; + // Remove the esmDialects for arm packages since we don't support ARM in the browser + if (!options.browser) { + delete packageJson["tshy"].esmDialects; + } + // Check if there are subpath exports if (packageJson.exports) { for (const key of Object.keys(packageJson.exports)) { @@ -318,15 +389,18 @@ function addTypeScriptHybridizer(packageJson: any): void { } // eslint-disable-next-line @typescript-eslint/no-explicit-any -async function addNewPackages(packageJson: any): Promise { - const newPackages = { +async function addNewPackages(packageJson: any, options: { browser: boolean }): Promise { + const newPackages: Record = { "@azure-tools/test-utils-vitest": "1.0.0", - "@vitest/browser": undefined, "@vitest/coverage-istanbul": undefined, - playwright: undefined, vitest: undefined, }; + if (options.browser) { + newPackages["@vitest/browser"] = undefined; + newPackages["playwright"] = undefined; + } + for (const [newPackage, desiredMinVersion] of Object.entries(newPackages)) { let latestVersion = desiredMinVersion; if (!latestVersion) { diff --git a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/fixSourceFile.ts b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/fixSourceFile.ts index d613bcb1c539..1d645f559aea 100644 --- a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/fixSourceFile.ts +++ b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/fixSourceFile.ts @@ -8,6 +8,7 @@ export default function fixSourceFile(sourceFile: SourceFile): void { "chai.use(chaiAsPromised);", "chai.use(chaiExclude);", "const expect = chai.expect;", + "dotenv.config();", ]; // Iterate over all the statements in the source file for (const statement of sourceFile.getStatements()) { @@ -17,12 +18,19 @@ export default function fixSourceFile(sourceFile: SourceFile): void { statement.remove(); } } + } + for (const statement of sourceFile.getStatements()) { const patternsToReplace = [ + { pattern: /\(this: Suite\)/g, replace: "(ctx)" }, { pattern: /\(this: Context\)/g, replace: "(ctx)" }, { pattern: /\(this\.currentTest\)/g, replace: "(ctx)" }, { pattern: /\(!this\.currentTest\?\.isPending\(\)\)/g, replace: "(!ctx.task.pending)" }, { pattern: /this\.skip\(\);/g, replace: "ctx.skip();" }, + { + pattern: /import\s+(?:\*\s+as\s+dotenv|dotenv)\s+from\s+"dotenv";/g, + replace: 'import "dotenv/config";', + }, ]; // Replace the patterns in the source file diff --git a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceChaiAsPromised.ts b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceChaiAsPromised.ts index 258311506c87..f8ac3242c46d 100644 --- a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceChaiAsPromised.ts +++ b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceChaiAsPromised.ts @@ -1,5 +1,5 @@ import { SourceFile, SyntaxKind, Node } from "ts-morph"; -import * as ts from "typescript"; // For using TypeScript factory methods +import ts from "typescript"; // For using TypeScript factory methods /** * Converts usages of `assert.isRejected` from chai-as-promised to `expect(...).rejects.toThrow(...)` diff --git a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceSinonStubs.ts b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceSinonStubs.ts index d8998176b779..ad8f5b7ea979 100644 --- a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceSinonStubs.ts +++ b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceSinonStubs.ts @@ -1,5 +1,100 @@ -import { SourceFile, SyntaxKind, Node } from "ts-morph"; -import * as ts from "typescript"; // For using TypeScript factory methods +import { SourceFile, SyntaxKind, Node, ForEachDescendantTraversalControl } from "ts-morph"; +import ts from "typescript"; // For using TypeScript factory methods + +function replaceWithViFn(node: Node, traversal: ForEachDescendantTraversalControl) { + const parent = node.getParentIfKind(SyntaxKind.PropertyAccessExpression); + const methodNameAfterStub = parent?.getName(); + + if (methodNameAfterStub === "returns" || methodNameAfterStub === "resolves") { + const returnsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); + if (returnsCall && returnsCall.getArguments().length > 0) { + const returnValue = returnsCall.getArguments()[0].getText(); // Extract the text + const vitestMethod = + methodNameAfterStub === "returns" ? "mockReturnValue" : "mockResolvedValue"; + + // Replace the entire call chain (stub + returns) with spyOn + mockReturnValue + // or spyOn + mockResolvedValue depending on the method name + returnsCall.replaceWithText(` + vi.fn() + .${vitestMethod}(${returnValue}) + `); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } + } else if (methodNameAfterStub === "throwsException") { + const throwsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); + if (throwsCall && throwsCall.getArguments().length > 0) { + const errorValue = throwsCall.getArguments()[0].getText(); // Extract the text + + // Replace the entire call chain (stub + throwsException) with spyOn + mockRejectedValue + throwsCall.replaceWithText(` + vi.fn() + .mockRejectedValue(${errorValue}) + `); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } + } else if (methodNameAfterStub === undefined) { + // Replace the entire call chain (sinon.stub) with spyOn + node.replaceWithText(`vi.fn()`); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } +} + +function replaceWithViSpyOn( + node: Node, + traversal: ForEachDescendantTraversalControl, + args: Node[], +) { + const obj = args[0].getText(); // Extract text before replacing the node + const methodName = args[1].getText(); // Extract text before replacing the node + + const parent = node.getParentIfKind(SyntaxKind.PropertyAccessExpression); + const methodNameAfterStub = parent?.getName(); + + if (methodNameAfterStub === "returns" || methodNameAfterStub === "resolves") { + const returnsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); + if (returnsCall && returnsCall.getArguments().length > 0) { + const returnValue = returnsCall.getArguments()[0].getText(); // Extract the text + const vitestMethod = + methodNameAfterStub === "returns" ? "mockReturnValue" : "mockResolvedValue"; + + // Replace the entire call chain (stub + returns) with spyOn + mockReturnValue + // or spyOn + mockResolvedValue depending on the method name + returnsCall.replaceWithText(` + vi.spyOn(${obj}, ${methodName}) + .${vitestMethod}(${returnValue}) + `); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } + } else if (methodNameAfterStub === "throwsException") { + const throwsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); + if (throwsCall && throwsCall.getArguments().length > 0) { + const errorValue = throwsCall.getArguments()[0].getText(); // Extract the text + + // Replace the entire call chain (stub + throwsException) with spyOn + mockRejectedValue + throwsCall.replaceWithText(` + vi.spyOn(${obj}, ${methodName}) + .mockRejectedValue(${errorValue}) + `); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } + } else if (methodNameAfterStub === undefined) { + // Replace the entire call chain (sinon.stub) with spyOn + node.replaceWithText(`vi.spyOn(${obj}, ${methodName})`); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } +} /** * Replaces usages of `sinon.stub` with `vi.spyOn` and `sinon.restore` with `vi.restoreAllMocks` @@ -11,6 +106,7 @@ import * as ts from "typescript"; // For using TypeScript factory methods * 3. sinon.stub(obj, "methodName").throwsException(someError) => vi.spyOn(obj, "methodName").mockRejectedValue(someError) * 4. sinon.restore() => vi.restoreAllMocks() * 5. sandbox.restore() => vi.restoreAllMocks() + * 6. sinon.stub() => vi.fn() */ export default function replaceSinonStub(sourceFile: SourceFile) { // Helper function to perform a case-insensitive check for the 'sinon' identifier @@ -30,51 +126,11 @@ export default function replaceSinonStub(sourceFile: SourceFile) { callee.getName() === "stub" ) { const args = node.getArguments(); - if (args.length < 2) return; // Ensure we have enough arguments - - const obj = args[0].getText(); // Extract text before replacing the node - const methodName = args[1].getText(); // Extract text before replacing the node - - const parent = node.getParentIfKind(SyntaxKind.PropertyAccessExpression); - const methodNameAfterStub = parent?.getName(); - - if (methodNameAfterStub === "returns" || methodNameAfterStub === "resolves") { - const returnsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); - if (returnsCall && returnsCall.getArguments().length > 0) { - const returnValue = returnsCall.getArguments()[0].getText(); // Extract the text - const vitestMethod = - methodNameAfterStub === "returns" ? "mockReturnValue" : "mockResolvedValue"; - - // Replace the entire call chain (stub + returns) with spyOn + mockReturnValue - // or spyOn + mockResolvedValue depending on the method name - returnsCall.replaceWithText(` - vi.spyOn(${obj}, ${methodName}) - .${vitestMethod}(${returnValue}) - `); - - // Skip all children of the current node as it was already transformed - traversal.skip(); - } - } else if (methodNameAfterStub === "throwsException") { - const throwsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); - if (throwsCall && throwsCall.getArguments().length > 0) { - const errorValue = throwsCall.getArguments()[0].getText(); // Extract the text - - // Replace the entire call chain (stub + throwsException) with spyOn + mockRejectedValue - throwsCall.replaceWithText(` - vi.spyOn(${obj}, ${methodName}) - .mockRejectedValue(${errorValue}) - `); - - // Skip all children of the current node as it was already transformed - traversal.skip(); - } - } else if (methodNameAfterStub === undefined) { - // Replace the entire call chain (sinon.stub) with spyOn - node.replaceWithText(`vi.spyOn(${obj}, ${methodName})`); - // Skip all children of the current node as it was already transformed - traversal.skip(); + if (args.length === 0) { + replaceWithViFn(node, traversal); + } else if (args.length >= 2) { + replaceWithViSpyOn(node, traversal, args); } } else if ( ts.isPropertyAccessExpression(callee.compilerNode) && diff --git a/sdk/advisor/arm-advisor/_meta.json b/sdk/advisor/arm-advisor/_meta.json index 4b4bad644990..ce11f5e46b86 100644 --- a/sdk/advisor/arm-advisor/_meta.json +++ b/sdk/advisor/arm-advisor/_meta.json @@ -5,4 +5,4 @@ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", "use": "@autorest/typescript@6.0.5" -} \ No newline at end of file +} diff --git a/sdk/advisor/arm-advisor/api-extractor.json b/sdk/advisor/arm-advisor/api-extractor.json index 5b9d5e7e4360..5992db77be9e 100644 --- a/sdk/advisor/arm-advisor/api-extractor.json +++ b/sdk/advisor/arm-advisor/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-advisor.d.ts" + "publicTrimmedFilePath": "dist/arm-advisor.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/advisor/arm-advisor/package.json b/sdk/advisor/arm-advisor/package.json index 86ed016aa23a..c8f2adba53fa 100644 --- a/sdk/advisor/arm-advisor/package.json +++ b/sdk/advisor/arm-advisor/package.json @@ -8,11 +8,11 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.7.0", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.8.0", - "tslib": "^2.2.0" + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.18.0", + "tslib": "^2.8.1" }, "keywords": [ "node", @@ -22,22 +22,22 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-advisor.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "playwright": "^1.49.1", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "repository": { "type": "git", @@ -47,36 +47,26 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", "build:test": "echo skipped", - "check-format": "echo skipped", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"samples-dev/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", "extract-api": "dev-tool run extract-api", - "format": "echo skipped", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", @@ -86,7 +76,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -107,5 +97,31 @@ ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-advisor?view=azure-node-preview" + }, + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "selfLink": false + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } } diff --git a/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInResourceGroupSample.ts b/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInResourceGroupSample.ts index f4d384684b82..6b2663954bf8 100644 --- a/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInResourceGroupSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ConfigData, AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create/Overwrite Azure Advisor configuration. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json */ async function putConfigurations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const configurationName = "default"; const resourceGroup = "resourceGroup"; const configContract: ConfigData = { @@ -36,27 +33,27 @@ async function putConfigurations() { "Security", "Performance", "Cost", - "OperationalExcellence" + "OperationalExcellence", ], frequency: 30, state: "Active", - language: "en" - } + language: "en", + }, ], exclude: true, - lowCpuThreshold: "5" + lowCpuThreshold: "5", }; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const result = await client.configurations.createInResourceGroup( configurationName, resourceGroup, - configContract + configContract, ); console.log(result); } -async function main() { +async function main(): Promise { putConfigurations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInSubscriptionSample.ts b/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInSubscriptionSample.ts index d831aaeb211f..8d317f6e52cf 100644 --- a/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInSubscriptionSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInSubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ConfigData, AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create/Overwrite Azure Advisor configuration and also delete all configurations of contained resource groups. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json */ async function putConfigurations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const configurationName = "default"; const configContract: ConfigData = { digests: [ @@ -35,26 +32,26 @@ async function putConfigurations() { "Security", "Performance", "Cost", - "OperationalExcellence" + "OperationalExcellence", ], frequency: 30, state: "Active", - language: "en" - } + language: "en", + }, ], exclude: true, - lowCpuThreshold: "5" + lowCpuThreshold: "5", }; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const result = await client.configurations.createInSubscription( configurationName, - configContract + configContract, ); console.log(result); } -async function main() { +async function main(): Promise { putConfigurations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/configurationsListByResourceGroupSample.ts b/sdk/advisor/arm-advisor/samples-dev/configurationsListByResourceGroupSample.ts index 4d0c4bb3aa49..a08e2b94be04 100644 --- a/sdk/advisor/arm-advisor/samples-dev/configurationsListByResourceGroupSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/configurationsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieve Azure Advisor configurations. @@ -21,21 +19,18 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json */ async function getConfigurations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const resourceGroup = "resourceGroup"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.configurations.listByResourceGroup( - resourceGroup - )) { + for await (let item of client.configurations.listByResourceGroup(resourceGroup)) { resArray.push(item); } console.log(resArray); } -async function main() { +async function main(): Promise { getConfigurations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/configurationsListBySubscriptionSample.ts b/sdk/advisor/arm-advisor/samples-dev/configurationsListBySubscriptionSample.ts index 88ba94296258..9cdab732b93a 100644 --- a/sdk/advisor/arm-advisor/samples-dev/configurationsListBySubscriptionSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/configurationsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json */ async function getConfigurations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const resArray = new Array(); @@ -32,7 +29,7 @@ async function getConfigurations() { console.log(resArray); } -async function main() { +async function main(): Promise { getConfigurations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataGetSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataGetSample.ts index 2dd6575e121d..774cc17524c4 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataGetSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the metadata entity. @@ -28,7 +26,7 @@ async function getMetadata() { console.log(result); } -async function main() { +async function main(): Promise { getMetadata(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataListSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataListSample.ts index 4e11deec80e0..298f38acb43e 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataListSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of metadata entities. @@ -30,7 +28,7 @@ async function getMetadata() { console.log(resArray); } -async function main() { +async function main(): Promise { getMetadata(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationsGenerateSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationsGenerateSample.ts index 94d53c05e932..983a730b0e45 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationsGenerateSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationsGenerateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service. @@ -21,15 +19,14 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/GenerateRecommendations.json */ async function generateRecommendations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const result = await client.recommendations.generate(); console.log(result); } -async function main() { +async function main(): Promise { generateRecommendations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationsGetGenerateStatusSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationsGetGenerateStatusSample.ts index 45039d31c025..0b3e09a34efa 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationsGetGenerateStatusSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationsGetGenerateStatusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/EmptyResponse.json */ async function getGenerateStatus() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const operationId = "operationGUID"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); @@ -30,7 +27,7 @@ async function getGenerateStatus() { console.log(result); } -async function main() { +async function main(): Promise { getGenerateStatus(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationsGetSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationsGetSample.ts index 5dab4d0e9900..283c7b7ee4c1 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationsGetSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Obtains details of a cached recommendation. @@ -25,14 +23,11 @@ async function getRecommendationDetail() { const recommendationId = "recommendationId"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential); - const result = await client.recommendations.get( - resourceUri, - recommendationId - ); + const result = await client.recommendations.get(resourceUri, recommendationId); console.log(result); } -async function main() { +async function main(): Promise { getRecommendationDetail(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationsListSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationsListSample.ts index a31b8cfff9fb..cac103482dba 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationsListSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationsListSample.ts @@ -8,14 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - RecommendationsListOptionalParams, - AdvisorManagementClient -} from "@azure/arm-advisor"; +import { RecommendationsListOptionalParams, AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations. @@ -24,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListRecommendations.json */ async function listRecommendations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const top = 10; const options: RecommendationsListOptionalParams = { top }; const credential = new DefaultAzureCredential(); @@ -37,7 +31,7 @@ async function listRecommendations() { console.log(resArray); } -async function main() { +async function main(): Promise { listRecommendations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/suppressionsCreateSample.ts b/sdk/advisor/arm-advisor/samples-dev/suppressionsCreateSample.ts index e6b9c7d4e41d..0b0a6a295e4e 100644 --- a/sdk/advisor/arm-advisor/samples-dev/suppressionsCreateSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/suppressionsCreateSample.ts @@ -8,14 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - SuppressionContract, - AdvisorManagementClient -} from "@azure/arm-advisor"; +import { SuppressionContract, AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation. @@ -34,12 +29,12 @@ async function createSuppression() { resourceUri, recommendationId, name, - suppressionContract + suppressionContract, ); console.log(result); } -async function main() { +async function main(): Promise { createSuppression(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/suppressionsDeleteSample.ts b/sdk/advisor/arm-advisor/samples-dev/suppressionsDeleteSample.ts index 5d6929396d07..60acadc2203b 100644 --- a/sdk/advisor/arm-advisor/samples-dev/suppressionsDeleteSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/suppressionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression. @@ -26,15 +24,11 @@ async function deleteSuppression() { const name = "suppressionName1"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential); - const result = await client.suppressions.delete( - resourceUri, - recommendationId, - name - ); + const result = await client.suppressions.delete(resourceUri, recommendationId, name); console.log(result); } -async function main() { +async function main(): Promise { deleteSuppression(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/suppressionsGetSample.ts b/sdk/advisor/arm-advisor/samples-dev/suppressionsGetSample.ts index 95f84bd2f7e4..e1c22b87d631 100644 --- a/sdk/advisor/arm-advisor/samples-dev/suppressionsGetSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/suppressionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Obtains the details of a suppression. @@ -26,15 +24,11 @@ async function getSuppressionDetail() { const name = "suppressionName1"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential); - const result = await client.suppressions.get( - resourceUri, - recommendationId, - name - ); + const result = await client.suppressions.get(resourceUri, recommendationId, name); console.log(result); } -async function main() { +async function main(): Promise { getSuppressionDetail(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/suppressionsListSample.ts b/sdk/advisor/arm-advisor/samples-dev/suppressionsListSample.ts index 359104e30b77..bb3696e9d435 100644 --- a/sdk/advisor/arm-advisor/samples-dev/suppressionsListSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/suppressionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListSuppressions.json */ async function listSuppressions() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId1"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId1"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const resArray = new Array(); @@ -32,7 +29,7 @@ async function listSuppressions() { console.log(resArray); } -async function main() { +async function main(): Promise { listSuppressions(); } diff --git a/sdk/advisor/arm-advisor/src/advisorManagementClient.ts b/sdk/advisor/arm-advisor/src/advisorManagementClient.ts index b75c87872067..14e77a8b147d 100644 --- a/sdk/advisor/arm-advisor/src/advisorManagementClient.ts +++ b/sdk/advisor/arm-advisor/src/advisorManagementClient.ts @@ -8,27 +8,23 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest -} from "@azure/core-rest-pipeline"; +import { PipelineRequest, PipelineResponse, SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { RecommendationMetadataImpl, ConfigurationsImpl, RecommendationsImpl, OperationsImpl, - SuppressionsImpl -} from "./operations"; + SuppressionsImpl, +} from "./operations/index.js"; import { RecommendationMetadata, Configurations, Recommendations, Operations, - Suppressions -} from "./operationsInterfaces"; -import { AdvisorManagementClientOptionalParams } from "./models"; + Suppressions, +} from "./operationsInterfaces/index.js"; +import { AdvisorManagementClientOptionalParams } from "./models/index.js"; export class AdvisorManagementClient extends coreClient.ServiceClient { $host: string; @@ -44,16 +40,16 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: AdvisorManagementClientOptionalParams + options?: AdvisorManagementClientOptionalParams, ); constructor( credentials: coreAuth.TokenCredential, - options?: AdvisorManagementClientOptionalParams + options?: AdvisorManagementClientOptionalParams, ); constructor( credentials: coreAuth.TokenCredential, subscriptionIdOrOptions?: AdvisorManagementClientOptionalParams | string, - options?: AdvisorManagementClientOptionalParams + options?: AdvisorManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -73,7 +69,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { } const defaults: AdvisorManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; const packageDetails = `azsdk-js-arm-advisor/3.2.0`; @@ -86,20 +82,19 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -109,19 +104,17 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ credential: credentials, scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, + optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -145,10 +138,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { } const apiVersionPolicy = { name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest - ): Promise { + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { const param = request.url.split("?"); if (param.length > 1) { const newParams = param[1].split("&").map((item) => { @@ -161,7 +151,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } diff --git a/sdk/advisor/arm-advisor/src/index.ts b/sdk/advisor/arm-advisor/src/index.ts index fb2b88124318..fc690e352ce1 100644 --- a/sdk/advisor/arm-advisor/src/index.ts +++ b/sdk/advisor/arm-advisor/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { AdvisorManagementClient } from "./advisorManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { AdvisorManagementClient } from "./advisorManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/advisor/arm-advisor/src/models/index.ts b/sdk/advisor/arm-advisor/src/models/index.ts index 8d7bcd4b406e..64c877e788aa 100644 --- a/sdk/advisor/arm-advisor/src/models/index.ts +++ b/sdk/advisor/arm-advisor/src/models/index.ts @@ -242,7 +242,7 @@ export interface RecommendationsGenerateHeaders { /** Known values of {@link Scenario} that the service accepts. */ export enum KnownScenario { /** Alerts */ - Alerts = "Alerts" + Alerts = "Alerts", } /** @@ -263,7 +263,7 @@ export enum KnownCpuThreshold { /** Fifteen */ Fifteen = "15", /** Twenty */ - Twenty = "20" + Twenty = "20", } /** @@ -289,7 +289,7 @@ export enum KnownCategory { /** Cost */ Cost = "Cost", /** OperationalExcellence */ - OperationalExcellence = "OperationalExcellence" + OperationalExcellence = "OperationalExcellence", } /** @@ -310,7 +310,7 @@ export enum KnownDigestConfigState { /** Active */ Active = "Active", /** Disabled */ - Disabled = "Disabled" + Disabled = "Disabled", } /** @@ -326,7 +326,7 @@ export type DigestConfigState = string; /** Known values of {@link ConfigurationName} that the service accepts. */ export enum KnownConfigurationName { /** Default */ - Default = "default" + Default = "default", } /** @@ -345,7 +345,7 @@ export enum KnownImpact { /** Medium */ Medium = "Medium", /** Low */ - Low = "Low" + Low = "Low", } /** @@ -366,7 +366,7 @@ export enum KnownRisk { /** Warning */ Warning = "Warning", /** None */ - None = "None" + None = "None", } /** @@ -381,22 +381,19 @@ export enum KnownRisk { export type Risk = string; /** Optional parameters. */ -export interface RecommendationMetadataGetOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationMetadataGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type RecommendationMetadataGetResponse = MetadataEntity; /** Optional parameters. */ -export interface RecommendationMetadataListOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationMetadataListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type RecommendationMetadataListResponse = MetadataEntityListResult; /** Optional parameters. */ -export interface RecommendationMetadataListNextOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationMetadataListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type RecommendationMetadataListNextResponse = MetadataEntityListResult; @@ -437,8 +434,7 @@ export interface ConfigurationsListBySubscriptionNextOptionalParams export type ConfigurationsListBySubscriptionNextResponse = ConfigurationListResult; /** Optional parameters. */ -export interface RecommendationsGenerateOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationsGenerateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the generate operation. */ export type RecommendationsGenerateResponse = RecommendationsGenerateHeaders; @@ -448,8 +444,7 @@ export interface RecommendationsGetGenerateStatusOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface RecommendationsListOptionalParams - extends coreClient.OperationOptions { +export interface RecommendationsListOptionalParams extends coreClient.OperationOptions { /** The filter to apply to the recommendations.
Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)'] with operators ['eq', 'and', 'or'].
Example:
- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup' */ filter?: string; /** The number of recommendations per page if a paged version of this API is being used. */ @@ -462,54 +457,46 @@ export interface RecommendationsListOptionalParams export type RecommendationsListResponse = ResourceRecommendationBaseListResult; /** Optional parameters. */ -export interface RecommendationsGetOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type RecommendationsGetResponse = ResourceRecommendationBase; /** Optional parameters. */ -export interface RecommendationsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type RecommendationsListNextResponse = ResourceRecommendationBaseListResult; /** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} +export interface OperationsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type OperationsListResponse = OperationEntityListResult; /** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationEntityListResult; /** Optional parameters. */ -export interface SuppressionsGetOptionalParams - extends coreClient.OperationOptions {} +export interface SuppressionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type SuppressionsGetResponse = SuppressionContract; /** Optional parameters. */ -export interface SuppressionsCreateOptionalParams - extends coreClient.OperationOptions {} +export interface SuppressionsCreateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the create operation. */ export type SuppressionsCreateResponse = SuppressionContract; /** Optional parameters. */ -export interface SuppressionsDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface SuppressionsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface SuppressionsListOptionalParams - extends coreClient.OperationOptions { +export interface SuppressionsListOptionalParams extends coreClient.OperationOptions { /** The number of suppressions per page if a paged version of this API is being used. */ top?: number; /** The page-continuation token to use with a paged version of this API. */ @@ -520,15 +507,13 @@ export interface SuppressionsListOptionalParams export type SuppressionsListResponse = SuppressionContractListResult; /** Optional parameters. */ -export interface SuppressionsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface SuppressionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type SuppressionsListNextResponse = SuppressionContractListResult; /** Optional parameters. */ -export interface AdvisorManagementClientOptionalParams - extends coreClient.ServiceClientOptions { +export interface AdvisorManagementClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; /** Api Version */ diff --git a/sdk/advisor/arm-advisor/src/models/mappers.ts b/sdk/advisor/arm-advisor/src/models/mappers.ts index 50740e96e076..a841fea34aa9 100644 --- a/sdk/advisor/arm-advisor/src/models/mappers.ts +++ b/sdk/advisor/arm-advisor/src/models/mappers.ts @@ -16,26 +16,26 @@ export const MetadataEntity: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "properties.displayName", type: { - name: "String" - } + name: "String", + }, }, dependsOn: { serializedName: "properties.dependsOn", @@ -43,10 +43,10 @@ export const MetadataEntity: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, applicableScenarios: { serializedName: "properties.applicableScenarios", @@ -54,10 +54,10 @@ export const MetadataEntity: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, supportedValues: { serializedName: "properties.supportedValues", @@ -66,13 +66,13 @@ export const MetadataEntity: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "MetadataSupportedValueDetail" - } - } - } - } - } - } + className: "MetadataSupportedValueDetail", + }, + }, + }, + }, + }, + }, }; export const MetadataSupportedValueDetail: coreClient.CompositeMapper = { @@ -83,17 +83,17 @@ export const MetadataSupportedValueDetail: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "displayName", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ARMErrorResponseBody: coreClient.CompositeMapper = { @@ -104,17 +104,17 @@ export const ARMErrorResponseBody: coreClient.CompositeMapper = { message: { serializedName: "message", type: { - name: "String" - } + name: "String", + }, }, code: { serializedName: "code", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ArmErrorResponse: coreClient.CompositeMapper = { @@ -126,11 +126,11 @@ export const ArmErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ARMErrorResponseBody" - } - } - } - } + className: "ARMErrorResponseBody", + }, + }, + }, + }, }; export const MetadataEntityListResult: coreClient.CompositeMapper = { @@ -145,19 +145,19 @@ export const MetadataEntityListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "MetadataEntity" - } - } - } + className: "MetadataEntity", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ConfigurationListResult: coreClient.CompositeMapper = { @@ -172,19 +172,19 @@ export const ConfigurationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ConfigData" - } - } - } + className: "ConfigData", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const DigestConfig: coreClient.CompositeMapper = { @@ -195,20 +195,20 @@ export const DigestConfig: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, actionGroupResourceId: { serializedName: "actionGroupResourceId", type: { - name: "String" - } + name: "String", + }, }, frequency: { serializedName: "frequency", type: { - name: "Number" - } + name: "Number", + }, }, categories: { serializedName: "categories", @@ -216,25 +216,25 @@ export const DigestConfig: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, language: { serializedName: "language", type: { - name: "String" - } + name: "String", + }, }, state: { serializedName: "state", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Resource: coreClient.CompositeMapper = { @@ -246,25 +246,25 @@ export const Resource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceRecommendationBaseListResult: coreClient.CompositeMapper = { @@ -275,8 +275,8 @@ export const ResourceRecommendationBaseListResult: coreClient.CompositeMapper = nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -285,13 +285,13 @@ export const ResourceRecommendationBaseListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "ResourceRecommendationBase" - } - } - } - } - } - } + className: "ResourceRecommendationBase", + }, + }, + }, + }, + }, + }, }; export const ShortDescription: coreClient.CompositeMapper = { @@ -302,17 +302,17 @@ export const ShortDescription: coreClient.CompositeMapper = { problem: { serializedName: "problem", type: { - name: "String" - } + name: "String", + }, }, solution: { serializedName: "solution", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceMetadata: coreClient.CompositeMapper = { @@ -323,38 +323,38 @@ export const ResourceMetadata: coreClient.CompositeMapper = { resourceId: { serializedName: "resourceId", type: { - name: "String" - } + name: "String", + }, }, source: { serializedName: "source", type: { - name: "String" - } + name: "String", + }, }, action: { serializedName: "action", type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, }, singular: { serializedName: "singular", type: { - name: "String" - } + name: "String", + }, }, plural: { serializedName: "plural", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationEntityListResult: coreClient.CompositeMapper = { @@ -365,8 +365,8 @@ export const OperationEntityListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -375,13 +375,13 @@ export const OperationEntityListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "OperationEntity" - } - } - } - } - } - } + className: "OperationEntity", + }, + }, + }, + }, + }, + }, }; export const OperationEntity: coreClient.CompositeMapper = { @@ -392,18 +392,18 @@ export const OperationEntity: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplayInfo" - } - } - } - } + className: "OperationDisplayInfo", + }, + }, + }, + }, }; export const OperationDisplayInfo: coreClient.CompositeMapper = { @@ -414,29 +414,29 @@ export const OperationDisplayInfo: coreClient.CompositeMapper = { description: { serializedName: "description", type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", type: { - name: "String" - } + name: "String", + }, }, provider: { serializedName: "provider", type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SuppressionContractListResult: coreClient.CompositeMapper = { @@ -447,8 +447,8 @@ export const SuppressionContractListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -457,13 +457,13 @@ export const SuppressionContractListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SuppressionContract" - } - } - } - } - } - } + className: "SuppressionContract", + }, + }, + }, + }, + }, + }, }; export const ConfigData: coreClient.CompositeMapper = { @@ -475,14 +475,14 @@ export const ConfigData: coreClient.CompositeMapper = { exclude: { serializedName: "properties.exclude", type: { - name: "Boolean" - } + name: "Boolean", + }, }, lowCpuThreshold: { serializedName: "properties.lowCpuThreshold", type: { - name: "String" - } + name: "String", + }, }, digests: { serializedName: "properties.digests", @@ -491,13 +491,13 @@ export const ConfigData: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DigestConfig" - } - } - } - } - } - } + className: "DigestConfig", + }, + }, + }, + }, + }, + }, }; export const ResourceRecommendationBase: coreClient.CompositeMapper = { @@ -509,60 +509,60 @@ export const ResourceRecommendationBase: coreClient.CompositeMapper = { category: { serializedName: "properties.category", type: { - name: "String" - } + name: "String", + }, }, impact: { serializedName: "properties.impact", type: { - name: "String" - } + name: "String", + }, }, impactedField: { serializedName: "properties.impactedField", type: { - name: "String" - } + name: "String", + }, }, impactedValue: { serializedName: "properties.impactedValue", type: { - name: "String" - } + name: "String", + }, }, lastUpdated: { serializedName: "properties.lastUpdated", type: { - name: "DateTime" - } + name: "DateTime", + }, }, metadata: { serializedName: "properties.metadata", type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, }, recommendationTypeId: { serializedName: "properties.recommendationTypeId", type: { - name: "String" - } + name: "String", + }, }, risk: { serializedName: "properties.risk", type: { - name: "String" - } + name: "String", + }, }, shortDescription: { serializedName: "properties.shortDescription", type: { name: "Composite", - className: "ShortDescription" - } + className: "ShortDescription", + }, }, suppressionIds: { serializedName: "properties.suppressionIds", @@ -570,48 +570,48 @@ export const ResourceRecommendationBase: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "Uuid" - } - } - } + name: "Uuid", + }, + }, + }, }, extendedProperties: { serializedName: "properties.extendedProperties", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, resourceMetadata: { serializedName: "properties.resourceMetadata", type: { name: "Composite", - className: "ResourceMetadata" - } + className: "ResourceMetadata", + }, }, description: { serializedName: "properties.description", type: { - name: "String" - } + name: "String", + }, }, label: { serializedName: "properties.label", type: { - name: "String" - } + name: "String", + }, }, learnMoreLink: { serializedName: "properties.learnMoreLink", type: { - name: "String" - } + name: "String", + }, }, potentialBenefits: { serializedName: "properties.potentialBenefits", type: { - name: "String" - } + name: "String", + }, }, actions: { serializedName: "properties.actions", @@ -621,32 +621,32 @@ export const ResourceRecommendationBase: coreClient.CompositeMapper = { type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, + }, + }, }, remediation: { serializedName: "properties.remediation", type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, }, exposedMetadataProperties: { serializedName: "properties.exposedMetadataProperties", type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } - } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, + }, + }, + }, }; export const SuppressionContract: coreClient.CompositeMapper = { @@ -658,24 +658,24 @@ export const SuppressionContract: coreClient.CompositeMapper = { suppressionId: { serializedName: "properties.suppressionId", type: { - name: "String" - } + name: "String", + }, }, ttl: { serializedName: "properties.ttl", type: { - name: "String" - } + name: "String", + }, }, expirationTimeStamp: { serializedName: "properties.expirationTimeStamp", readOnly: true, type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; export const RecommendationsGenerateHeaders: coreClient.CompositeMapper = { @@ -686,15 +686,15 @@ export const RecommendationsGenerateHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, retryAfter: { serializedName: "retry-after", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; diff --git a/sdk/advisor/arm-advisor/src/models/parameters.ts b/sdk/advisor/arm-advisor/src/models/parameters.ts index 3dbd23be6ada..3e8f56f67a4b 100644 --- a/sdk/advisor/arm-advisor/src/models/parameters.ts +++ b/sdk/advisor/arm-advisor/src/models/parameters.ts @@ -9,12 +9,12 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { ConfigData as ConfigDataMapper, - SuppressionContract as SuppressionContractMapper -} from "../models/mappers"; + SuppressionContract as SuppressionContractMapper, +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", @@ -23,9 +23,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -34,10 +34,10 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const name: OperationURLParameter = { @@ -46,9 +46,9 @@ export const name: OperationURLParameter = { serializedName: "name", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const apiVersion: OperationQueryParameter = { @@ -58,9 +58,9 @@ export const apiVersion: OperationQueryParameter = { isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const nextLink: OperationURLParameter = { @@ -69,10 +69,10 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const subscriptionId: OperationURLParameter = { @@ -81,9 +81,9 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const contentType: OperationParameter = { @@ -93,14 +93,14 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const configContract: OperationParameter = { parameterPath: "configContract", - mapper: ConfigDataMapper + mapper: ConfigDataMapper, }; export const configurationName: OperationURLParameter = { @@ -109,9 +109,9 @@ export const configurationName: OperationURLParameter = { serializedName: "configurationName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const resourceGroup: OperationURLParameter = { @@ -120,9 +120,9 @@ export const resourceGroup: OperationURLParameter = { serializedName: "resourceGroup", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const operationId: OperationURLParameter = { @@ -131,9 +131,9 @@ export const operationId: OperationURLParameter = { serializedName: "operationId", required: true, type: { - name: "Uuid" - } - } + name: "Uuid", + }, + }, }; export const filter: OperationQueryParameter = { @@ -141,9 +141,9 @@ export const filter: OperationQueryParameter = { mapper: { serializedName: "$filter", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const top: OperationQueryParameter = { @@ -151,9 +151,9 @@ export const top: OperationQueryParameter = { mapper: { serializedName: "$top", type: { - name: "Number" - } - } + name: "Number", + }, + }, }; export const skipToken: OperationQueryParameter = { @@ -161,9 +161,9 @@ export const skipToken: OperationQueryParameter = { mapper: { serializedName: "$skipToken", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const resourceUri: OperationURLParameter = { @@ -172,9 +172,9 @@ export const resourceUri: OperationURLParameter = { serializedName: "resourceUri", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const recommendationId: OperationURLParameter = { @@ -183,12 +183,12 @@ export const recommendationId: OperationURLParameter = { serializedName: "recommendationId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const suppressionContract: OperationParameter = { parameterPath: "suppressionContract", - mapper: SuppressionContractMapper + mapper: SuppressionContractMapper, }; diff --git a/sdk/advisor/arm-advisor/src/operations/configurations.ts b/sdk/advisor/arm-advisor/src/operations/configurations.ts index 4ffa9c9d4b15..82b2bada8e1a 100644 --- a/sdk/advisor/arm-advisor/src/operations/configurations.ts +++ b/sdk/advisor/arm-advisor/src/operations/configurations.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Configurations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Configurations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { ConfigData, ConfigurationsListBySubscriptionNextOptionalParams, @@ -25,8 +25,8 @@ import { ConfigurationsCreateInSubscriptionResponse, ConfigurationsCreateInResourceGroupOptionalParams, ConfigurationsCreateInResourceGroupResponse, - ConfigurationsListBySubscriptionNextResponse -} from "../models"; + ConfigurationsListBySubscriptionNextResponse, +} from "../models/index.js"; /// /** Class containing Configurations operations. */ @@ -46,7 +46,7 @@ export class ConfigurationsImpl implements Configurations { * @param options The options parameters. */ public listBySubscription( - options?: ConfigurationsListBySubscriptionOptionalParams + options?: ConfigurationsListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listBySubscriptionPagingAll(options); return { @@ -61,13 +61,13 @@ export class ConfigurationsImpl implements Configurations { throw new Error("maxPageSize is not supported by this operation."); } return this.listBySubscriptionPagingPage(options, settings); - } + }, }; } private async *listBySubscriptionPagingPage( options?: ConfigurationsListBySubscriptionOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ConfigurationsListBySubscriptionResponse; let continuationToken = settings?.continuationToken; @@ -88,7 +88,7 @@ export class ConfigurationsImpl implements Configurations { } private async *listBySubscriptionPagingAll( - options?: ConfigurationsListBySubscriptionOptionalParams + options?: ConfigurationsListBySubscriptionOptionalParams, ): AsyncIterableIterator { for await (const page of this.listBySubscriptionPagingPage(options)) { yield* page; @@ -102,7 +102,7 @@ export class ConfigurationsImpl implements Configurations { */ public listByResourceGroup( resourceGroup: string, - options?: ConfigurationsListByResourceGroupOptionalParams + options?: ConfigurationsListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroup, options); return { @@ -116,19 +116,15 @@ export class ConfigurationsImpl implements Configurations { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByResourceGroupPagingPage( - resourceGroup, - options, - settings - ); - } + return this.listByResourceGroupPagingPage(resourceGroup, options, settings); + }, }; } private async *listByResourceGroupPagingPage( resourceGroup: string, options?: ConfigurationsListByResourceGroupOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: ConfigurationsListByResourceGroupResponse; result = await this._listByResourceGroup(resourceGroup, options); @@ -137,12 +133,9 @@ export class ConfigurationsImpl implements Configurations { private async *listByResourceGroupPagingAll( resourceGroup: string, - options?: ConfigurationsListByResourceGroupOptionalParams + options?: ConfigurationsListByResourceGroupOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroup, - options - )) { + for await (const page of this.listByResourceGroupPagingPage(resourceGroup, options)) { yield* page; } } @@ -152,12 +145,9 @@ export class ConfigurationsImpl implements Configurations { * @param options The options parameters. */ private _listBySubscription( - options?: ConfigurationsListBySubscriptionOptionalParams + options?: ConfigurationsListBySubscriptionOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); + return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); } /** @@ -170,11 +160,11 @@ export class ConfigurationsImpl implements Configurations { createInSubscription( configurationName: ConfigurationName, configContract: ConfigData, - options?: ConfigurationsCreateInSubscriptionOptionalParams + options?: ConfigurationsCreateInSubscriptionOptionalParams, ): Promise { return this.client.sendOperationRequest( { configurationName, configContract, options }, - createInSubscriptionOperationSpec + createInSubscriptionOperationSpec, ); } @@ -185,11 +175,11 @@ export class ConfigurationsImpl implements Configurations { */ private _listByResourceGroup( resourceGroup: string, - options?: ConfigurationsListByResourceGroupOptionalParams + options?: ConfigurationsListByResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroup, options }, - listByResourceGroupOperationSpec + listByResourceGroupOperationSpec, ); } @@ -204,11 +194,11 @@ export class ConfigurationsImpl implements Configurations { configurationName: ConfigurationName, resourceGroup: string, configContract: ConfigData, - options?: ConfigurationsCreateInResourceGroupOptionalParams + options?: ConfigurationsCreateInResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { configurationName, resourceGroup, configContract, options }, - createInResourceGroupOperationSpec + createInResourceGroupOperationSpec, ); } @@ -219,11 +209,11 @@ export class ConfigurationsImpl implements Configurations { */ private _listBySubscriptionNext( nextLink: string, - options?: ConfigurationsListBySubscriptionNextOptionalParams + options?: ConfigurationsListBySubscriptionNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listBySubscriptionNextOperationSpec + listBySubscriptionNextOperationSpec, ); } } @@ -231,77 +221,65 @@ export class ConfigurationsImpl implements Configurations { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationListResult + bodyMapper: Mappers.ConfigurationListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const createInSubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ConfigData + bodyMapper: Mappers.ConfigData, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, requestBody: Parameters.configContract, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.configurationName - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.configurationName], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationListResult + bodyMapper: Mappers.ConfigurationListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroup - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroup], headerParameters: [Parameters.accept], - serializer + serializer, }; const createInResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ConfigData + bodyMapper: Mappers.ConfigData, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, requestBody: Parameters.configContract, queryParameters: [Parameters.apiVersion], @@ -309,28 +287,24 @@ const createInResourceGroupOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.configurationName, - Parameters.resourceGroup + Parameters.resourceGroup, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationListResult + bodyMapper: Mappers.ConfigurationListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId - ], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operations/index.ts b/sdk/advisor/arm-advisor/src/operations/index.ts index 9bb829013597..e1c83e6278f2 100644 --- a/sdk/advisor/arm-advisor/src/operations/index.ts +++ b/sdk/advisor/arm-advisor/src/operations/index.ts @@ -6,8 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./recommendationMetadata"; -export * from "./configurations"; -export * from "./recommendations"; -export * from "./operations"; -export * from "./suppressions"; +export * from "./recommendationMetadata.js"; +export * from "./configurations.js"; +export * from "./recommendations.js"; +export * from "./operations.js"; +export * from "./suppressions.js"; diff --git a/sdk/advisor/arm-advisor/src/operations/operations.ts b/sdk/advisor/arm-advisor/src/operations/operations.ts index 72da2ab84d67..728de7862368 100644 --- a/sdk/advisor/arm-advisor/src/operations/operations.ts +++ b/sdk/advisor/arm-advisor/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { OperationEntity, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse -} from "../models"; + OperationsListNextResponse, +} from "../models/index.js"; /// /** Class containing Operations operations. */ @@ -38,9 +38,7 @@ export class OperationsImpl implements Operations { * Lists all the available Advisor REST API operations. * @param options The options parameters. */ - public list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator { + public list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -54,13 +52,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +79,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -92,9 +90,7 @@ export class OperationsImpl implements Operations { * Lists all the available Advisor REST API operations. * @param options The options parameters. */ - private _list( - options?: OperationsListOptionalParams - ): Promise { + private _list(options?: OperationsListOptionalParams): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,12 +101,9 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications @@ -121,29 +114,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationEntityListResult + bodyMapper: Mappers.OperationEntityListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationEntityListResult + bodyMapper: Mappers.OperationEntityListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts b/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts index f4f78ffad8e8..8333a6bb4b7e 100644 --- a/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts +++ b/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { RecommendationMetadata } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { RecommendationMetadata } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { MetadataEntity, RecommendationMetadataListNextOptionalParams, @@ -20,8 +20,8 @@ import { RecommendationMetadataListResponse, RecommendationMetadataGetOptionalParams, RecommendationMetadataGetResponse, - RecommendationMetadataListNextResponse -} from "../models"; + RecommendationMetadataListNextResponse, +} from "../models/index.js"; /// /** Class containing RecommendationMetadata operations. */ @@ -41,7 +41,7 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { * @param options The options parameters. */ public list( - options?: RecommendationMetadataListOptionalParams + options?: RecommendationMetadataListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -56,13 +56,13 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: RecommendationMetadataListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: RecommendationMetadataListResponse; let continuationToken = settings?.continuationToken; @@ -83,7 +83,7 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { } private async *listPagingAll( - options?: RecommendationMetadataListOptionalParams + options?: RecommendationMetadataListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -97,12 +97,9 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { */ get( name: string, - options?: RecommendationMetadataGetOptionalParams + options?: RecommendationMetadataGetOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { name, options }, - getOperationSpec - ); + return this.client.sendOperationRequest({ name, options }, getOperationSpec); } /** @@ -110,7 +107,7 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { * @param options The options parameters. */ private _list( - options?: RecommendationMetadataListOptionalParams + options?: RecommendationMetadataListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -122,12 +119,9 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { */ private _listNext( nextLink: string, - options?: RecommendationMetadataListNextOptionalParams + options?: RecommendationMetadataListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications @@ -138,49 +132,49 @@ const getOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.MetadataEntity + bodyMapper: Mappers.MetadataEntity, }, 404: { bodyMapper: Mappers.ARMErrorResponseBody, - isError: true + isError: true, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.name], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { path: "/providers/Microsoft.Advisor/metadata", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.MetadataEntityListResult + bodyMapper: Mappers.MetadataEntityListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.MetadataEntityListResult + bodyMapper: Mappers.MetadataEntityListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operations/recommendations.ts b/sdk/advisor/arm-advisor/src/operations/recommendations.ts index 40cf166ca9f1..33e0f9e8553f 100644 --- a/sdk/advisor/arm-advisor/src/operations/recommendations.ts +++ b/sdk/advisor/arm-advisor/src/operations/recommendations.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Recommendations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Recommendations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { ResourceRecommendationBase, RecommendationsListNextOptionalParams, @@ -23,8 +23,8 @@ import { RecommendationsGetGenerateStatusOptionalParams, RecommendationsGetOptionalParams, RecommendationsGetResponse, - RecommendationsListNextResponse -} from "../models"; + RecommendationsListNextResponse, +} from "../models/index.js"; /// /** Class containing Recommendations operations. */ @@ -45,7 +45,7 @@ export class RecommendationsImpl implements Recommendations { * @param options The options parameters. */ public list( - options?: RecommendationsListOptionalParams + options?: RecommendationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -60,13 +60,13 @@ export class RecommendationsImpl implements Recommendations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: RecommendationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: RecommendationsListResponse; let continuationToken = settings?.continuationToken; @@ -87,7 +87,7 @@ export class RecommendationsImpl implements Recommendations { } private async *listPagingAll( - options?: RecommendationsListOptionalParams + options?: RecommendationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -100,7 +100,7 @@ export class RecommendationsImpl implements Recommendations { * @param options The options parameters. */ generate( - options?: RecommendationsGenerateOptionalParams + options?: RecommendationsGenerateOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, generateOperationSpec); } @@ -115,11 +115,11 @@ export class RecommendationsImpl implements Recommendations { */ getGenerateStatus( operationId: string, - options?: RecommendationsGetGenerateStatusOptionalParams + options?: RecommendationsGetGenerateStatusOptionalParams, ): Promise { return this.client.sendOperationRequest( { operationId, options }, - getGenerateStatusOperationSpec + getGenerateStatusOperationSpec, ); } @@ -128,9 +128,7 @@ export class RecommendationsImpl implements Recommendations { * invoking generateRecommendations. * @param options The options parameters. */ - private _list( - options?: RecommendationsListOptionalParams - ): Promise { + private _list(options?: RecommendationsListOptionalParams): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -144,11 +142,11 @@ export class RecommendationsImpl implements Recommendations { get( resourceUri: string, recommendationId: string, - options?: RecommendationsGetOptionalParams + options?: RecommendationsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, recommendationId, options }, - getOperationSpec + getOperationSpec, ); } @@ -159,113 +157,89 @@ export class RecommendationsImpl implements Recommendations { */ private _listNext( nextLink: string, - options?: RecommendationsListNextOptionalParams + options?: RecommendationsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const generateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations", httpMethod: "POST", responses: { 202: { - headersMapper: Mappers.RecommendationsGenerateHeaders + headersMapper: Mappers.RecommendationsGenerateHeaders, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const getGenerateStatusOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations/{operationId}", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations/{operationId}", httpMethod: "GET", responses: { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.operationId - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.operationId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/recommendations", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/recommendations", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceRecommendationBaseListResult + bodyMapper: Mappers.ResourceRecommendationBaseListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skipToken - ], + queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top, Parameters.skipToken], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}", + path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceRecommendationBase + bodyMapper: Mappers.ResourceRecommendationBase, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.recommendationId - ], + urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.recommendationId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceRecommendationBaseListResult + bodyMapper: Mappers.ResourceRecommendationBaseListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId - ], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operations/suppressions.ts b/sdk/advisor/arm-advisor/src/operations/suppressions.ts index 464c5d42dd1a..e23f5bae5630 100644 --- a/sdk/advisor/arm-advisor/src/operations/suppressions.ts +++ b/sdk/advisor/arm-advisor/src/operations/suppressions.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Suppressions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Suppressions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { SuppressionContract, SuppressionsListNextOptionalParams, @@ -23,8 +23,8 @@ import { SuppressionsCreateOptionalParams, SuppressionsCreateResponse, SuppressionsDeleteOptionalParams, - SuppressionsListNextResponse -} from "../models"; + SuppressionsListNextResponse, +} from "../models/index.js"; /// /** Class containing Suppressions operations. */ @@ -45,7 +45,7 @@ export class SuppressionsImpl implements Suppressions { * @param options The options parameters. */ public list( - options?: SuppressionsListOptionalParams + options?: SuppressionsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -60,13 +60,13 @@ export class SuppressionsImpl implements Suppressions { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: SuppressionsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: SuppressionsListResponse; let continuationToken = settings?.continuationToken; @@ -87,7 +87,7 @@ export class SuppressionsImpl implements Suppressions { } private async *listPagingAll( - options?: SuppressionsListOptionalParams + options?: SuppressionsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -106,11 +106,11 @@ export class SuppressionsImpl implements Suppressions { resourceUri: string, recommendationId: string, name: string, - options?: SuppressionsGetOptionalParams + options?: SuppressionsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, recommendationId, name, options }, - getOperationSpec + getOperationSpec, ); } @@ -130,11 +130,11 @@ export class SuppressionsImpl implements Suppressions { recommendationId: string, name: string, suppressionContract: SuppressionContract, - options?: SuppressionsCreateOptionalParams + options?: SuppressionsCreateOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, recommendationId, name, suppressionContract, options }, - createOperationSpec + createOperationSpec, ); } @@ -151,11 +151,11 @@ export class SuppressionsImpl implements Suppressions { resourceUri: string, recommendationId: string, name: string, - options?: SuppressionsDeleteOptionalParams + options?: SuppressionsDeleteOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, recommendationId, name, options }, - deleteOperationSpec + deleteOperationSpec, ); } @@ -164,9 +164,7 @@ export class SuppressionsImpl implements Suppressions { * attribute of a recommendation is referred to as a suppression. * @param options The options parameters. */ - private _list( - options?: SuppressionsListOptionalParams - ): Promise { + private _list(options?: SuppressionsListOptionalParams): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -177,58 +175,53 @@ export class SuppressionsImpl implements Suppressions { */ private _listNext( nextLink: string, - options?: SuppressionsListNextOptionalParams + options?: SuppressionsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", + path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SuppressionContract + bodyMapper: Mappers.SuppressionContract, }, 404: { bodyMapper: Mappers.ArmErrorResponse, - isError: true + isError: true, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.name, Parameters.resourceUri, - Parameters.recommendationId + Parameters.recommendationId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", + path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.SuppressionContract + bodyMapper: Mappers.SuppressionContract, }, 404: { bodyMapper: Mappers.ArmErrorResponse, - isError: true + isError: true, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, requestBody: Parameters.suppressionContract, queryParameters: [Parameters.apiVersion], @@ -236,69 +229,59 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.name, Parameters.resourceUri, - Parameters.recommendationId + Parameters.recommendationId, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", + path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", httpMethod: "DELETE", responses: { 204: {}, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.name, Parameters.resourceUri, - Parameters.recommendationId + Parameters.recommendationId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/suppressions", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/suppressions", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SuppressionContractListResult + bodyMapper: Mappers.SuppressionContractListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skipToken - ], + queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SuppressionContractListResult + bodyMapper: Mappers.SuppressionContractListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId - ], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/configurations.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/configurations.ts index 6348b04fa796..f090206fed67 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/configurations.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/configurations.ts @@ -15,8 +15,8 @@ import { ConfigurationsCreateInSubscriptionOptionalParams, ConfigurationsCreateInSubscriptionResponse, ConfigurationsCreateInResourceGroupOptionalParams, - ConfigurationsCreateInResourceGroupResponse -} from "../models"; + ConfigurationsCreateInResourceGroupResponse, +} from "../models/index.js"; /// /** Interface representing a Configurations. */ @@ -26,7 +26,7 @@ export interface Configurations { * @param options The options parameters. */ listBySubscription( - options?: ConfigurationsListBySubscriptionOptionalParams + options?: ConfigurationsListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator; /** * Retrieve Azure Advisor configurations. @@ -35,7 +35,7 @@ export interface Configurations { */ listByResourceGroup( resourceGroup: string, - options?: ConfigurationsListByResourceGroupOptionalParams + options?: ConfigurationsListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Create/Overwrite Azure Advisor configuration and also delete all configurations of contained @@ -47,7 +47,7 @@ export interface Configurations { createInSubscription( configurationName: ConfigurationName, configContract: ConfigData, - options?: ConfigurationsCreateInSubscriptionOptionalParams + options?: ConfigurationsCreateInSubscriptionOptionalParams, ): Promise; /** * Create/Overwrite Azure Advisor configuration. @@ -60,6 +60,6 @@ export interface Configurations { configurationName: ConfigurationName, resourceGroup: string, configContract: ConfigData, - options?: ConfigurationsCreateInResourceGroupOptionalParams + options?: ConfigurationsCreateInResourceGroupOptionalParams, ): Promise; } diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/index.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/index.ts index 9bb829013597..e1c83e6278f2 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/index.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/index.ts @@ -6,8 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./recommendationMetadata"; -export * from "./configurations"; -export * from "./recommendations"; -export * from "./operations"; -export * from "./suppressions"; +export * from "./recommendationMetadata.js"; +export * from "./configurations.js"; +export * from "./recommendations.js"; +export * from "./operations.js"; +export * from "./suppressions.js"; diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/operations.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/operations.ts index fc17cdc3730d..83ea6289c6c1 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/operations.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { OperationEntity, OperationsListOptionalParams } from "../models"; +import { OperationEntity, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ @@ -16,7 +16,5 @@ export interface Operations { * Lists all the available Advisor REST API operations. * @param options The options parameters. */ - list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator; + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; } diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendationMetadata.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendationMetadata.ts index 25f10223c816..e5b1b31c9bc6 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendationMetadata.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendationMetadata.ts @@ -11,8 +11,8 @@ import { MetadataEntity, RecommendationMetadataListOptionalParams, RecommendationMetadataGetOptionalParams, - RecommendationMetadataGetResponse -} from "../models"; + RecommendationMetadataGetResponse, +} from "../models/index.js"; /// /** Interface representing a RecommendationMetadata. */ @@ -22,7 +22,7 @@ export interface RecommendationMetadata { * @param options The options parameters. */ list( - options?: RecommendationMetadataListOptionalParams + options?: RecommendationMetadataListOptionalParams, ): PagedAsyncIterableIterator; /** * Gets the metadata entity. @@ -31,6 +31,6 @@ export interface RecommendationMetadata { */ get( name: string, - options?: RecommendationMetadataGetOptionalParams + options?: RecommendationMetadataGetOptionalParams, ): Promise; } diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendations.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendations.ts index 6a3311d189d0..185e896dc2ba 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendations.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendations.ts @@ -14,8 +14,8 @@ import { RecommendationsGenerateResponse, RecommendationsGetGenerateStatusOptionalParams, RecommendationsGetOptionalParams, - RecommendationsGetResponse -} from "../models"; + RecommendationsGetResponse, +} from "../models/index.js"; /// /** Interface representing a Recommendations. */ @@ -26,7 +26,7 @@ export interface Recommendations { * @param options The options parameters. */ list( - options?: RecommendationsListOptionalParams + options?: RecommendationsListOptionalParams, ): PagedAsyncIterableIterator; /** * Initiates the recommendation generation or computation process for a subscription. This operation is @@ -34,7 +34,7 @@ export interface Recommendations { * @param options The options parameters. */ generate( - options?: RecommendationsGenerateOptionalParams + options?: RecommendationsGenerateOptionalParams, ): Promise; /** * Retrieves the status of the recommendation computation or generation process. Invoke this API after @@ -46,7 +46,7 @@ export interface Recommendations { */ getGenerateStatus( operationId: string, - options?: RecommendationsGetGenerateStatusOptionalParams + options?: RecommendationsGetGenerateStatusOptionalParams, ): Promise; /** * Obtains details of a cached recommendation. @@ -58,6 +58,6 @@ export interface Recommendations { get( resourceUri: string, recommendationId: string, - options?: RecommendationsGetOptionalParams + options?: RecommendationsGetOptionalParams, ): Promise; } diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/suppressions.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/suppressions.ts index f2f0bae319d1..21fab729e75d 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/suppressions.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/suppressions.ts @@ -14,8 +14,8 @@ import { SuppressionsGetResponse, SuppressionsCreateOptionalParams, SuppressionsCreateResponse, - SuppressionsDeleteOptionalParams -} from "../models"; + SuppressionsDeleteOptionalParams, +} from "../models/index.js"; /// /** Interface representing a Suppressions. */ @@ -25,9 +25,7 @@ export interface Suppressions { * attribute of a recommendation is referred to as a suppression. * @param options The options parameters. */ - list( - options?: SuppressionsListOptionalParams - ): PagedAsyncIterableIterator; + list(options?: SuppressionsListOptionalParams): PagedAsyncIterableIterator; /** * Obtains the details of a suppression. * @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which @@ -40,7 +38,7 @@ export interface Suppressions { resourceUri: string, recommendationId: string, name: string, - options?: SuppressionsGetOptionalParams + options?: SuppressionsGetOptionalParams, ): Promise; /** * Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute @@ -58,7 +56,7 @@ export interface Suppressions { recommendationId: string, name: string, suppressionContract: SuppressionContract, - options?: SuppressionsCreateOptionalParams + options?: SuppressionsCreateOptionalParams, ): Promise; /** * Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute @@ -73,6 +71,6 @@ export interface Suppressions { resourceUri: string, recommendationId: string, name: string, - options?: SuppressionsDeleteOptionalParams + options?: SuppressionsDeleteOptionalParams, ): Promise; } diff --git a/sdk/advisor/arm-advisor/src/pagingHelper.ts b/sdk/advisor/arm-advisor/src/pagingHelper.ts index 269a2b9814b5..e362819bdfc4 100644 --- a/sdk/advisor/arm-advisor/src/pagingHelper.ts +++ b/sdk/advisor/arm-advisor/src/pagingHelper.ts @@ -26,10 +26,7 @@ export function getContinuationToken(page: unknown): string | undefined { return pageMap.get(page)?.continuationToken; } -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined -): void { +export function setContinuationToken(page: unknown, continuationToken: string | undefined): void { if (typeof page !== "object" || page === null || !continuationToken) { return; } diff --git a/sdk/advisor/arm-advisor/test/advisor_operations_test.spec.ts b/sdk/advisor/arm-advisor/test/advisor_operations_test.spec.ts index 7d68a77df32f..5da0d6004696 100644 --- a/sdk/advisor/arm-advisor/test/advisor_operations_test.spec.ts +++ b/sdk/advisor/arm-advisor/test/advisor_operations_test.spec.ts @@ -6,24 +6,17 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; +import { env, Recorder, RecorderStartOptions, isPlaybackMode } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { AdvisorManagementClient } from "../src/advisorManagementClient"; -import { RecommendationsListOptionalParams } from "../src/models"; +import { AdvisorManagementClient } from "../src/advisorManagementClient.js"; +import { RecommendationsListOptionalParams } from "../src/models/index.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", AZURE_CLIENT_SECRET: "azure_client_secret", AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { @@ -42,33 +35,32 @@ describe("Advisor test", () => { let recorder: Recorder; let subscriptionId: string; let client: AdvisorManagementClient; - let location: string; - let resourceGroup: string; - let resourcename: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; + subscriptionId = env.SUBSCRIPTION_ID || ""; // This is an example of how the environment variables are used const credential = createTestCredential(); - client = new AdvisorManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - + client = new AdvisorManagementClient( + credential, + subscriptionId, + recorder.configureClientOptions({}), + ); }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - it("recommendations list test", async function () { + it("recommendations list test", async () => { const top = 5; const options: RecommendationsListOptionalParams = { top }; const resArray = new Array(); for await (let item of client.recommendations.list(options)) { resArray.push(item); } + + assert(resArray.length > 0); }); -}) +}); diff --git a/sdk/advisor/arm-advisor/tsconfig.json b/sdk/advisor/arm-advisor/tsconfig.json index 35219d45119e..19ceb382b521 100644 --- a/sdk/advisor/arm-advisor/tsconfig.json +++ b/sdk/advisor/arm-advisor/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-advisor": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/advisor/arm-advisor/tsconfig.samples.json b/sdk/advisor/arm-advisor/tsconfig.samples.json new file mode 100644 index 000000000000..a768f339a987 --- /dev/null +++ b/sdk/advisor/arm-advisor/tsconfig.samples.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-advisor": ["./dist/esm"] + } + } +} diff --git a/sdk/advisor/arm-advisor/tsconfig.src.json b/sdk/advisor/arm-advisor/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/advisor/arm-advisor/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/advisor/arm-advisor/tsconfig.test.json b/sdk/advisor/arm-advisor/tsconfig.test.json new file mode 100644 index 000000000000..290ca214aebc --- /dev/null +++ b/sdk/advisor/arm-advisor/tsconfig.test.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] +} diff --git a/sdk/advisor/arm-advisor/vitest.config.ts b/sdk/advisor/arm-advisor/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/advisor/arm-advisor/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/advisor/arm-advisor/vitest.esm.config.ts b/sdk/advisor/arm-advisor/vitest.esm.config.ts new file mode 100644 index 000000000000..2f6e757a54f7 --- /dev/null +++ b/sdk/advisor/arm-advisor/vitest.esm.config.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/agrifood/arm-agrifood/api-extractor.json b/sdk/agrifood/arm-agrifood/api-extractor.json index 42728bb72003..769055baa8bf 100644 --- a/sdk/agrifood/arm-agrifood/api-extractor.json +++ b/sdk/agrifood/arm-agrifood/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-agrifood.d.ts" + "publicTrimmedFilePath": "dist/arm-agrifood.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/agrifood/arm-agrifood/package.json b/sdk/agrifood/arm-agrifood/package.json index f3bc5ccadd0f..d21252b679e7 100644 --- a/sdk/agrifood/arm-agrifood/package.json +++ b/sdk/agrifood/arm-agrifood/package.json @@ -8,65 +8,51 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.6.1", - "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.8.0", - "tslib": "^2.2.0" + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", + "@azure/core-lro": "^2.7.2", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.18.0", + "tslib": "^2.8.1" }, "keywords": [ "node", "azure", "typescript", "browser", - "isomorphic" + "isomorphic", + "cloud" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-agrifood.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", + "@azure/identity": "^4.5.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "@vitest/coverage-istanbul": "^2.1.8", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/agrifood/arm-agrifood", - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, + "repository": "github:Azure/azure-sdk-for-js", "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +64,7 @@ "format": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", @@ -88,7 +74,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -108,5 +94,31 @@ ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-agrifood?view=azure-node-preview" + }, + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "selfLink": false + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } } diff --git a/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts b/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts index 0b06709a1d0d..7cded6dfbdf7 100644 --- a/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts +++ b/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts @@ -22,7 +22,7 @@ import { OperationsImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl -} from "./operations"; +} from "./operations/index.js"; import { Extensions, FarmBeatsExtensions, @@ -31,8 +31,8 @@ import { Operations, PrivateEndpointConnections, PrivateLinkResources -} from "./operationsInterfaces"; -import { AgriFoodMgmtClientOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { AgriFoodMgmtClientOptionalParams } from "./models/index.js"; export class AgriFoodMgmtClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/agrifood/arm-agrifood/src/index.ts b/sdk/agrifood/arm-agrifood/src/index.ts index 5b895ab1b95a..89d006ca8e0f 100644 --- a/sdk/agrifood/arm-agrifood/src/index.ts +++ b/sdk/agrifood/arm-agrifood/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { AgriFoodMgmtClient } from "./agriFoodMgmtClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { AgriFoodMgmtClient } from "./agriFoodMgmtClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/agrifood/arm-agrifood/src/models/parameters.ts b/sdk/agrifood/arm-agrifood/src/models/parameters.ts index 70661aac7c42..6b9751fc40fa 100644 --- a/sdk/agrifood/arm-agrifood/src/models/parameters.ts +++ b/sdk/agrifood/arm-agrifood/src/models/parameters.ts @@ -16,7 +16,7 @@ import { FarmBeatsUpdateRequestModel as FarmBeatsUpdateRequestModelMapper, CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/agrifood/arm-agrifood/src/operations/extensions.ts b/sdk/agrifood/arm-agrifood/src/operations/extensions.ts index fae4ddfd71b0..18952523ec76 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/extensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/extensions.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Extensions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Extensions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { Extension, ExtensionsListByFarmBeatsNextOptionalParams, @@ -26,7 +26,7 @@ import { ExtensionsUpdateResponse, ExtensionsDeleteOptionalParams, ExtensionsListByFarmBeatsNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Extensions operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts b/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts index 21fd45a22a6d..015013a981be 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { FarmBeatsExtensions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { FarmBeatsExtensions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { FarmBeatsExtension, FarmBeatsExtensionsListNextOptionalParams, @@ -21,7 +21,7 @@ import { FarmBeatsExtensionsGetOptionalParams, FarmBeatsExtensionsGetResponse, FarmBeatsExtensionsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing FarmBeatsExtensions operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts b/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts index f0e4e6f98508..0d16d12ab256 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { FarmBeatsModels } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { FarmBeatsModels } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { FarmBeats, FarmBeatsModelsListBySubscriptionNextOptionalParams, @@ -35,7 +35,7 @@ import { FarmBeatsModelsGetOperationResultResponse, FarmBeatsModelsListBySubscriptionNextResponse, FarmBeatsModelsListByResourceGroupNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing FarmBeatsModels operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/index.ts b/sdk/agrifood/arm-agrifood/src/operations/index.ts index a08b7e34e1dd..9da4e40e6d66 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/index.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/index.ts @@ -6,10 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./extensions"; -export * from "./farmBeatsExtensions"; -export * from "./farmBeatsModels"; -export * from "./locations"; -export * from "./operations"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; +export * from "./extensions.js"; +export * from "./farmBeatsExtensions.js"; +export * from "./farmBeatsModels.js"; +export * from "./locations.js"; +export * from "./operations.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; diff --git a/sdk/agrifood/arm-agrifood/src/operations/locations.ts b/sdk/agrifood/arm-agrifood/src/operations/locations.ts index 3d24e5b732b9..c2a367458761 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/locations.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/locations.ts @@ -6,16 +6,16 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Locations } from "../operationsInterfaces"; +import { Locations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { CheckNameAvailabilityRequest, LocationsCheckNameAvailabilityOptionalParams, LocationsCheckNameAvailabilityResponse -} from "../models"; +} from "../models/index.js"; /** Class containing Locations operations. */ export class LocationsImpl implements Locations { diff --git a/sdk/agrifood/arm-agrifood/src/operations/operations.ts b/sdk/agrifood/arm-agrifood/src/operations/operations.ts index f63b79ac1d80..f72cfcc6db4e 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/operations.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts b/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts index 41581045d45d..ece79b38ea82 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts @@ -7,13 +7,13 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateEndpointConnections } from "../operationsInterfaces"; +import { PrivateEndpointConnections } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByResourceOptionalParams, @@ -23,7 +23,7 @@ import { PrivateEndpointConnectionsGetOptionalParams, PrivateEndpointConnectionsGetResponse, PrivateEndpointConnectionsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateEndpointConnections operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts b/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts index 2696b45ffd3f..ca1090f28aa6 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateLinkResources } from "../operationsInterfaces"; +import { PrivateLinkResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { PrivateLinkResource, PrivateLinkResourcesListByResourceOptionalParams, PrivateLinkResourcesListByResourceResponse, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateLinkResources operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts index 985a7ed1eb1c..00fc50dd86c5 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts @@ -17,7 +17,7 @@ import { ExtensionsUpdateOptionalParams, ExtensionsUpdateResponse, ExtensionsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Extensions. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts index 297061be8aa3..0f2da9f0b8b4 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts @@ -12,7 +12,7 @@ import { FarmBeatsExtensionsListOptionalParams, FarmBeatsExtensionsGetOptionalParams, FarmBeatsExtensionsGetResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a FarmBeatsExtensions. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts index c23cb34a6ed6..ac1fd68a2bd4 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts @@ -22,7 +22,7 @@ import { FarmBeatsModelsDeleteOptionalParams, FarmBeatsModelsGetOperationResultOptionalParams, FarmBeatsModelsGetOperationResultResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a FarmBeatsModels. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts index a08b7e34e1dd..9da4e40e6d66 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts @@ -6,10 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./extensions"; -export * from "./farmBeatsExtensions"; -export * from "./farmBeatsModels"; -export * from "./locations"; -export * from "./operations"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; +export * from "./extensions.js"; +export * from "./farmBeatsExtensions.js"; +export * from "./farmBeatsModels.js"; +export * from "./locations.js"; +export * from "./operations.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts index 37298457c7c5..328d6332c1c2 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts @@ -10,7 +10,7 @@ import { CheckNameAvailabilityRequest, LocationsCheckNameAvailabilityOptionalParams, LocationsCheckNameAvailabilityResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a Locations. */ export interface Locations { diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts index 59cc6551a887..f5fb6402431c 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts index bafe92b91a36..ef6c9ba51ea0 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts @@ -16,7 +16,7 @@ import { PrivateEndpointConnectionsGetOptionalParams, PrivateEndpointConnectionsGetResponse, PrivateEndpointConnectionsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateEndpointConnections. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts index 1aa8e6a22d38..f483b5766a0b 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts @@ -12,7 +12,7 @@ import { PrivateLinkResourcesListByResourceOptionalParams, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateLinkResources. */ diff --git a/sdk/agrifood/arm-agrifood/test/sampleTest.ts b/sdk/agrifood/arm-agrifood/test/sample.spec.ts similarity index 69% rename from sdk/agrifood/arm-agrifood/test/sampleTest.ts rename to sdk/agrifood/arm-agrifood/test/sample.spec.ts index 8ff7deb0acbe..a9efe7d1f051 100644 --- a/sdk/agrifood/arm-agrifood/test/sampleTest.ts +++ b/sdk/agrifood/arm-agrifood/test/sample.spec.ts @@ -6,19 +6,14 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { - Recorder, - RecorderStartOptions, - env -} from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { Context } from "mocha"; +import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", AZURE_CLIENT_SECRET: "azure_client_secret", AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { @@ -32,16 +27,16 @@ const recorderOptions: RecorderStartOptions = { describe("My test", () => { let recorder: Recorder; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - it("sample test", async function () { - console.log("Hi, I'm a test!"); + it("sample test", async () => { + assert.isTrue(true); }); }); diff --git a/sdk/agrifood/arm-agrifood/tsconfig.json b/sdk/agrifood/arm-agrifood/tsconfig.json index 67feca918942..19ceb382b521 100644 --- a/sdk/agrifood/arm-agrifood/tsconfig.json +++ b/sdk/agrifood/arm-agrifood/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-agrifood": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/agrifood/arm-agrifood/tsconfig.samples.json b/sdk/agrifood/arm-agrifood/tsconfig.samples.json new file mode 100644 index 000000000000..a2661ae2e9b7 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-agrifood": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/agrifood/arm-agrifood/tsconfig.src.json b/sdk/agrifood/arm-agrifood/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/agrifood/arm-agrifood/tsconfig.test.json b/sdk/agrifood/arm-agrifood/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/agrifood/arm-agrifood/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/agrifood/arm-agrifood/vitest.config.ts b/sdk/agrifood/arm-agrifood/vitest.config.ts new file mode 100644 index 000000000000..5c472252eb10 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/vitest.config.ts @@ -0,0 +1,8 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default viteConfig; diff --git a/sdk/agrifood/arm-agrifood/vitest.esm.config.ts b/sdk/agrifood/arm-agrifood/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/apicenter/arm-apicenter/api-extractor.json b/sdk/apicenter/arm-apicenter/api-extractor.json index fca682f902c1..6794589f524a 100644 --- a/sdk/apicenter/arm-apicenter/api-extractor.json +++ b/sdk/apicenter/arm-apicenter/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-apicenter.d.ts" + "publicTrimmedFilePath": "dist/arm-apicenter.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/apicenter/arm-apicenter/package.json b/sdk/apicenter/arm-apicenter/package.json index 50ec8d23d84e..a5875d01363c 100644 --- a/sdk/apicenter/arm-apicenter/package.json +++ b/sdk/apicenter/arm-apicenter/package.json @@ -8,65 +8,51 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.14.0", - "tslib": "^2.2.0" + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", + "@azure/core-lro": "^2.7.2", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.18.0", + "tslib": "^2.8.1" }, "keywords": [ "node", "azure", "typescript", "browser", - "isomorphic" + "isomorphic", + "cloud" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-apicenter.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, + "repository": "github:Azure/azure-sdk-for-js", "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +64,7 @@ "format": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", @@ -88,7 +74,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -109,5 +95,31 @@ ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-apicenter?view=azure-node-preview" + }, + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "selfLink": false + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } } diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsCreateOrUpdateSample.ts index 3e89e8040c69..f4b8f1db3e77 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiDefinition, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API definition. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsDeleteSample.ts index d0361c8e588f..0b729dcccc99 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API definition. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsExportSpecificationSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsExportSpecificationSample.ts index e1c91fe356c4..6a6476554eb1 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsExportSpecificationSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsExportSpecificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Exports the API specification. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsGetSample.ts index 6199e54e8dfe..d2056b8bcead 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API definition. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsHeadSample.ts index d014c7e9a8d4..7cd16e0a6bc2 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API definition exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsImportSpecificationSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsImportSpecificationSample.ts index fc567ffa33be..fc804bb79909 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsImportSpecificationSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsImportSpecificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiSpecImportRequest, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Imports the API specification. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsListSample.ts index e8066da018ba..fe0a7bad26cd 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API definitions. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsCreateOrUpdateSample.ts index 9c84e4291442..f813db74f40c 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiVersion, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API version. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsDeleteSample.ts index 9412384352fa..ffe84896554d 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API version diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsGetSample.ts index 5694f6db9eb0..6bd7ab01b255 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API version. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsHeadSample.ts index 7538acd58b40..1daa4195ec03 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API version exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsListSample.ts index c393477562d7..fc32ebc757e7 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API versions. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisCreateOrUpdateSample.ts index 1f5c19d9a29e..f2c5d69c19da 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Api, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisDeleteSample.ts index ee22556ff44f..5ce9d73bbbb9 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisGetSample.ts index 5c2db2b4fad1..21d4217b4fde 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisHeadSample.ts index 7f549409f3a0..899fe046e057 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisListSample.ts index 31a190f9cdd3..865cb108e7c3 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of APIs. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsCreateOrUpdateSample.ts index d83e7ab6b6af..482742c3cdd2 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Deployment, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsDeleteSample.ts index 2572624f23c5..48eb8fbdd58a 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsGetSample.ts index 575fecbc86bc..1566840f8f93 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsHeadSample.ts index 1f6699897e4c..f653b974ac3b 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API deployment exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsListSample.ts index d6ae6fe864be..c3a23c1d8be8 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API deployments. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsCreateOrUpdateSample.ts index b4f4b0f06a9f..2753948bbe36 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Environment, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing environment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsDeleteSample.ts index a27a1c0287fc..158fbc2e3d8c 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the environment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsGetSample.ts index 5f6bab887bb5..b85682427673 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the environment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsHeadSample.ts index 2ba2b773a739..c247eba70681 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified environment exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsListSample.ts index fc12b27787e4..c71cbb28e649 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of environments. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasCreateOrUpdateSample.ts index 18e2feb922d3..f20345d1664e 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { MetadataSchema, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasDeleteSample.ts index 58d4d5ea5e58..ef8e4bec2438 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasGetSample.ts index 65e6b6b16b31..03a19d26bd13 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasHeadSample.ts index d9a81348f9bd..153765d5782e 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified metadata schema exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasListSample.ts index 82e0a19a0b16..39773473c257 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of metadata schemas. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/operationsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/operationsListSample.ts index 5f803fc8cf69..be6dc856cc4d 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/operationsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the operations for the provider diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesCreateOrUpdateSample.ts index 6beb806c4132..1021e5963648 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Service, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesDeleteSample.ts index fd0e9db80952..bc03c349f0c4 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified service. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesExportMetadataSchemaSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesExportMetadataSchemaSample.ts index 83a925c0b89b..d2728a33a41a 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesExportMetadataSchemaSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesExportMetadataSchemaSample.ts @@ -13,9 +13,7 @@ import { AzureAPICenter, } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Exports the effective metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesGetSample.ts index 10a1d59c0657..0a752a3d6e22 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the service. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesListByResourceGroupSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesListByResourceGroupSample.ts index d451367d5583..09e7ae897f5c 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesListByResourceGroupSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of services within the resource group. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesListBySubscriptionSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesListBySubscriptionSample.ts index 362997b90367..7e9c4170093a 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesListBySubscriptionSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists services within an Azure subscription. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesUpdateSample.ts index 6b5cb7cd6ec9..162cf97d87d9 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ServiceUpdate, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates existing service. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesCreateOrUpdateSample.ts index 29d05183737e..6531e717a0bf 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Workspace, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing workspace. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesDeleteSample.ts index 24299d53e653..947d7e136b07 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified workspace. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesGetSample.ts index f805ce803bee..59cc48e2ac42 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the workspace. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesHeadSample.ts index 93fd47657be5..b0b5b1c19e4b 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified workspace exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesListSample.ts index 5246d1e6cea9..c2b074210c57 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of workspaces. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsCreateOrUpdateSample.ts index 3e89e8040c69..f4b8f1db3e77 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiDefinition, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API definition. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsDeleteSample.ts index d0361c8e588f..0b729dcccc99 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API definition. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsExportSpecificationSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsExportSpecificationSample.ts index e1c91fe356c4..6a6476554eb1 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsExportSpecificationSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsExportSpecificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Exports the API specification. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsGetSample.ts index 6199e54e8dfe..d2056b8bcead 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API definition. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsHeadSample.ts index d014c7e9a8d4..7cd16e0a6bc2 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API definition exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsImportSpecificationSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsImportSpecificationSample.ts index fc567ffa33be..fc804bb79909 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsImportSpecificationSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsImportSpecificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiSpecImportRequest, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Imports the API specification. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsListSample.ts index e8066da018ba..fe0a7bad26cd 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API definitions. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsCreateOrUpdateSample.ts index 9c84e4291442..f813db74f40c 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiVersion, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API version. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsDeleteSample.ts index 9412384352fa..ffe84896554d 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API version diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsGetSample.ts index 5694f6db9eb0..6bd7ab01b255 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API version. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsHeadSample.ts index 7538acd58b40..1daa4195ec03 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API version exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsListSample.ts index c393477562d7..fc32ebc757e7 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API versions. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisCreateOrUpdateSample.ts index 1f5c19d9a29e..f2c5d69c19da 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Api, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisDeleteSample.ts index ee22556ff44f..5ce9d73bbbb9 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisGetSample.ts index 5c2db2b4fad1..21d4217b4fde 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisHeadSample.ts index 7f549409f3a0..899fe046e057 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisListSample.ts index 31a190f9cdd3..865cb108e7c3 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of APIs. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsCreateOrUpdateSample.ts index d83e7ab6b6af..482742c3cdd2 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Deployment, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsDeleteSample.ts index 2572624f23c5..48eb8fbdd58a 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsGetSample.ts index 575fecbc86bc..1566840f8f93 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsHeadSample.ts index 1f6699897e4c..f653b974ac3b 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API deployment exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsListSample.ts index d6ae6fe864be..c3a23c1d8be8 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API deployments. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsCreateOrUpdateSample.ts index b4f4b0f06a9f..2753948bbe36 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Environment, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing environment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsDeleteSample.ts index a27a1c0287fc..158fbc2e3d8c 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the environment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsGetSample.ts index 5f6bab887bb5..b85682427673 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the environment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsHeadSample.ts index 2ba2b773a739..c247eba70681 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified environment exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsListSample.ts index fc12b27787e4..c71cbb28e649 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of environments. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasCreateOrUpdateSample.ts index 18e2feb922d3..f20345d1664e 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { MetadataSchema, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasDeleteSample.ts index 58d4d5ea5e58..ef8e4bec2438 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasGetSample.ts index 65e6b6b16b31..03a19d26bd13 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasHeadSample.ts index d9a81348f9bd..153765d5782e 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified metadata schema exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasListSample.ts index 82e0a19a0b16..39773473c257 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of metadata schemas. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/operationsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/operationsListSample.ts index 5f803fc8cf69..be6dc856cc4d 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/operationsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the operations for the provider diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts index 6beb806c4132..1021e5963648 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Service, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesDeleteSample.ts index fd0e9db80952..bc03c349f0c4 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified service. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesExportMetadataSchemaSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesExportMetadataSchemaSample.ts index 83a925c0b89b..d2728a33a41a 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesExportMetadataSchemaSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesExportMetadataSchemaSample.ts @@ -13,9 +13,7 @@ import { AzureAPICenter, } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Exports the effective metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesGetSample.ts index 10a1d59c0657..0a752a3d6e22 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the service. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListByResourceGroupSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListByResourceGroupSample.ts index d451367d5583..09e7ae897f5c 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListByResourceGroupSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of services within the resource group. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListBySubscriptionSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListBySubscriptionSample.ts index 362997b90367..7e9c4170093a 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListBySubscriptionSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists services within an Azure subscription. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesUpdateSample.ts index 6b5cb7cd6ec9..162cf97d87d9 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ServiceUpdate, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates existing service. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesCreateOrUpdateSample.ts index 29d05183737e..6531e717a0bf 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Workspace, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing workspace. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesDeleteSample.ts index 24299d53e653..947d7e136b07 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified workspace. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesGetSample.ts index f805ce803bee..59cc48e2ac42 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the workspace. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesHeadSample.ts index 93fd47657be5..b0b5b1c19e4b 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified workspace exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesListSample.ts index 5246d1e6cea9..c2b074210c57 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of workspaces. diff --git a/sdk/apicenter/arm-apicenter/src/azureAPICenter.ts b/sdk/apicenter/arm-apicenter/src/azureAPICenter.ts index 31380fdbb025..e5afaf2febd8 100644 --- a/sdk/apicenter/arm-apicenter/src/azureAPICenter.ts +++ b/sdk/apicenter/arm-apicenter/src/azureAPICenter.ts @@ -24,7 +24,7 @@ import { ApiVersionsImpl, ApiDefinitionsImpl, EnvironmentsImpl, -} from "./operations"; +} from "./operations/index.js"; import { Operations, Services, @@ -35,8 +35,8 @@ import { ApiVersions, ApiDefinitions, Environments, -} from "./operationsInterfaces"; -import { AzureAPICenterOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { AzureAPICenterOptionalParams } from "./models/index.js"; export class AzureAPICenter extends coreClient.ServiceClient { $host: string; diff --git a/sdk/apicenter/arm-apicenter/src/index.ts b/sdk/apicenter/arm-apicenter/src/index.ts index ca750c4b6fb8..1c5421b6e2c7 100644 --- a/sdk/apicenter/arm-apicenter/src/index.ts +++ b/sdk/apicenter/arm-apicenter/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { AzureAPICenter } from "./azureAPICenter"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { AzureAPICenter } from "./azureAPICenter.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/apicenter/arm-apicenter/src/models/parameters.ts b/sdk/apicenter/arm-apicenter/src/models/parameters.ts index c5247cbf1ceb..7af92ace7c2b 100644 --- a/sdk/apicenter/arm-apicenter/src/models/parameters.ts +++ b/sdk/apicenter/arm-apicenter/src/models/parameters.ts @@ -23,7 +23,7 @@ import { ApiDefinition as ApiDefinitionMapper, ApiSpecImportRequest as ApiSpecImportRequestMapper, Environment as EnvironmentMapper, -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/apicenter/arm-apicenter/src/operations/apiDefinitions.ts b/sdk/apicenter/arm-apicenter/src/operations/apiDefinitions.ts index c8fa6d6f226c..a625f038d8cd 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/apiDefinitions.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/apiDefinitions.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiDefinitions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ApiDefinitions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { ApiDefinition, ApiDefinitionsListNextOptionalParams, @@ -36,7 +36,7 @@ import { ApiSpecImportRequest, ApiDefinitionsImportSpecificationOptionalParams, ApiDefinitionsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing ApiDefinitions operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/apiVersions.ts b/sdk/apicenter/arm-apicenter/src/operations/apiVersions.ts index 9fa03e395cf6..0afe0f4fae48 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/apiVersions.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/apiVersions.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiVersions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ApiVersions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { ApiVersion, ApiVersionsListNextOptionalParams, @@ -26,7 +26,7 @@ import { ApiVersionsHeadOptionalParams, ApiVersionsHeadResponse, ApiVersionsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing ApiVersions operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/apis.ts b/sdk/apicenter/arm-apicenter/src/operations/apis.ts index 05b709da7673..0e3eb1849358 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/apis.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/apis.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Apis } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Apis } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Api, ApisListNextOptionalParams, @@ -26,7 +26,7 @@ import { ApisHeadOptionalParams, ApisHeadResponse, ApisListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Apis operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/deployments.ts b/sdk/apicenter/arm-apicenter/src/operations/deployments.ts index e404f5acef63..d563f42e5837 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/deployments.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/deployments.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Deployments } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Deployments } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Deployment, DeploymentsListNextOptionalParams, @@ -26,7 +26,7 @@ import { DeploymentsHeadOptionalParams, DeploymentsHeadResponse, DeploymentsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Deployments operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/environments.ts b/sdk/apicenter/arm-apicenter/src/operations/environments.ts index 1937d82a3119..590dcd6bde3b 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/environments.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/environments.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Environments } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Environments } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Environment, EnvironmentsListNextOptionalParams, @@ -26,7 +26,7 @@ import { EnvironmentsHeadOptionalParams, EnvironmentsHeadResponse, EnvironmentsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Environments operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/index.ts b/sdk/apicenter/arm-apicenter/src/operations/index.ts index d3ec5b9576fd..b3f11a7a6334 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/index.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/index.ts @@ -6,12 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./services"; -export * from "./metadataSchemas"; -export * from "./workspaces"; -export * from "./apis"; -export * from "./deployments"; -export * from "./apiVersions"; -export * from "./apiDefinitions"; -export * from "./environments"; +export * from "./operations.js"; +export * from "./services.js"; +export * from "./metadataSchemas.js"; +export * from "./workspaces.js"; +export * from "./apis.js"; +export * from "./deployments.js"; +export * from "./apiVersions.js"; +export * from "./apiDefinitions.js"; +export * from "./environments.js"; diff --git a/sdk/apicenter/arm-apicenter/src/operations/metadataSchemas.ts b/sdk/apicenter/arm-apicenter/src/operations/metadataSchemas.ts index abc38c9e8b5c..e34352aa0c5e 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/metadataSchemas.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/metadataSchemas.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { MetadataSchemas } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { MetadataSchemas } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { MetadataSchema, MetadataSchemasListNextOptionalParams, @@ -26,7 +26,7 @@ import { MetadataSchemasHeadOptionalParams, MetadataSchemasHeadResponse, MetadataSchemasListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing MetadataSchemas operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/operations.ts b/sdk/apicenter/arm-apicenter/src/operations/operations.ts index 4801fd38a4c9..182dd81b11de 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/operations.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/services.ts b/sdk/apicenter/arm-apicenter/src/operations/services.ts index 986ca1d1b638..09ffbeac31a6 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/services.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/services.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Services } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Services } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Service, ServicesListBySubscriptionNextOptionalParams, @@ -40,7 +40,7 @@ import { ServicesExportMetadataSchemaResponse, ServicesListBySubscriptionNextResponse, ServicesListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Services operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/workspaces.ts b/sdk/apicenter/arm-apicenter/src/operations/workspaces.ts index d4c0a2158345..63d790849654 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/workspaces.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/workspaces.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Workspaces } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Workspaces } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Workspace, WorkspacesListNextOptionalParams, @@ -26,7 +26,7 @@ import { WorkspacesHeadOptionalParams, WorkspacesHeadResponse, WorkspacesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Workspaces operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiDefinitions.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiDefinitions.ts index da016ff84dd6..4a83a469a40d 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiDefinitions.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiDefinitions.ts @@ -22,7 +22,7 @@ import { ApiDefinitionsExportSpecificationResponse, ApiSpecImportRequest, ApiDefinitionsImportSpecificationOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a ApiDefinitions. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiVersions.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiVersions.ts index 856749554457..1351572b0f5b 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiVersions.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiVersions.ts @@ -17,7 +17,7 @@ import { ApiVersionsDeleteOptionalParams, ApiVersionsHeadOptionalParams, ApiVersionsHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a ApiVersions. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apis.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apis.ts index 8c4a30bf1d0b..e886211f3bf8 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apis.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apis.ts @@ -17,7 +17,7 @@ import { ApisDeleteOptionalParams, ApisHeadOptionalParams, ApisHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Apis. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/deployments.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/deployments.ts index f12fe072e83d..bf1824e88b61 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/deployments.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/deployments.ts @@ -17,7 +17,7 @@ import { DeploymentsDeleteOptionalParams, DeploymentsHeadOptionalParams, DeploymentsHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Deployments. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/environments.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/environments.ts index b9529ae8d1da..acb6c364fd53 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/environments.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/environments.ts @@ -17,7 +17,7 @@ import { EnvironmentsDeleteOptionalParams, EnvironmentsHeadOptionalParams, EnvironmentsHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Environments. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/index.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/index.ts index d3ec5b9576fd..b3f11a7a6334 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/index.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/index.ts @@ -6,12 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./services"; -export * from "./metadataSchemas"; -export * from "./workspaces"; -export * from "./apis"; -export * from "./deployments"; -export * from "./apiVersions"; -export * from "./apiDefinitions"; -export * from "./environments"; +export * from "./operations.js"; +export * from "./services.js"; +export * from "./metadataSchemas.js"; +export * from "./workspaces.js"; +export * from "./apis.js"; +export * from "./deployments.js"; +export * from "./apiVersions.js"; +export * from "./apiDefinitions.js"; +export * from "./environments.js"; diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/metadataSchemas.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/metadataSchemas.ts index 747d25df8ea0..9dde55f8a445 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/metadataSchemas.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/metadataSchemas.ts @@ -17,7 +17,7 @@ import { MetadataSchemasDeleteOptionalParams, MetadataSchemasHeadOptionalParams, MetadataSchemasHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a MetadataSchemas. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/operations.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/operations.ts index 251f5f582e64..2c280c7eb723 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/operations.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/services.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/services.ts index dd3836d522c8..b939a18861b2 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/services.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/services.ts @@ -23,7 +23,7 @@ import { MetadataSchemaExportRequest, ServicesExportMetadataSchemaOptionalParams, ServicesExportMetadataSchemaResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Services. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/workspaces.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/workspaces.ts index d6407dce0ed1..c95bc51dbfe0 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/workspaces.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/workspaces.ts @@ -17,7 +17,7 @@ import { WorkspacesDeleteOptionalParams, WorkspacesHeadOptionalParams, WorkspacesHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Workspaces. */ diff --git a/sdk/apicenter/arm-apicenter/test/apicenter_operations_test.spec.ts b/sdk/apicenter/arm-apicenter/test/apicenter_operations_test.spec.ts index 793b026b43a8..762833bf1d61 100644 --- a/sdk/apicenter/arm-apicenter/test/apicenter_operations_test.spec.ts +++ b/sdk/apicenter/arm-apicenter/test/apicenter_operations_test.spec.ts @@ -6,23 +6,16 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; +import { env, Recorder, RecorderStartOptions, isPlaybackMode } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { AzureAPICenter } from "../src/azureAPICenter"; +import { AzureAPICenter } from "../src/azureAPICenter.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", AZURE_CLIENT_SECRET: "azure_client_secret", AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { @@ -41,30 +34,25 @@ describe("AzureAPICenter test", () => { let recorder: Recorder; let subscriptionId: string; let client: AzureAPICenter; - let location: string; - let resourceGroup: string; - let resourceName: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; + subscriptionId = env.SUBSCRIPTION_ID || ""; // This is an example of how the environment variables are used const credential = createTestCredential(); client = new AzureAPICenter(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourceName = "testresource" }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - it("operation list test", async function () { + it("operation list test", async () => { const resArray = new Array(); for await (let item of client.operations.list()) { resArray.push(item); } + assert(resArray.length > 0); }); -}) +}); diff --git a/sdk/apicenter/arm-apicenter/tsconfig.json b/sdk/apicenter/arm-apicenter/tsconfig.json index eb48a45d313a..19ceb382b521 100644 --- a/sdk/apicenter/arm-apicenter/tsconfig.json +++ b/sdk/apicenter/arm-apicenter/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-apicenter": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/apicenter/arm-apicenter/tsconfig.samples.json b/sdk/apicenter/arm-apicenter/tsconfig.samples.json new file mode 100644 index 000000000000..f2ed1c498167 --- /dev/null +++ b/sdk/apicenter/arm-apicenter/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-apicenter": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/apicenter/arm-apicenter/tsconfig.src.json b/sdk/apicenter/arm-apicenter/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/apicenter/arm-apicenter/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/apicenter/arm-apicenter/tsconfig.test.json b/sdk/apicenter/arm-apicenter/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/apicenter/arm-apicenter/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/apicenter/arm-apicenter/vitest.config.ts b/sdk/apicenter/arm-apicenter/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/apicenter/arm-apicenter/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/apicenter/arm-apicenter/vitest.esm.config.ts b/sdk/apicenter/arm-apicenter/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/apicenter/arm-apicenter/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/apimanagement/arm-apimanagement/api-extractor.json b/sdk/apimanagement/arm-apimanagement/api-extractor.json index 467fe61534d0..8e3b67d9e17e 100644 --- a/sdk/apimanagement/arm-apimanagement/api-extractor.json +++ b/sdk/apimanagement/arm-apimanagement/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-apimanagement.d.ts" + "publicTrimmedFilePath": "dist/arm-apimanagement.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/apimanagement/arm-apimanagement/package.json b/sdk/apimanagement/arm-apimanagement/package.json index 4f1cc02ebab2..77f0e7d86123 100644 --- a/sdk/apimanagement/arm-apimanagement/package.json +++ b/sdk/apimanagement/arm-apimanagement/package.json @@ -8,12 +8,12 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.12.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", + "@azure/core-lro": "^2.7.2", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.18.0", "tslib": "^2.2.0" }, "keywords": [ @@ -21,52 +21,38 @@ "azure", "typescript", "browser", - "isomorphic" + "isomorphic", + "cloud" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-apimanagement.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, + "repository": "github:Azure/azure-sdk-for-js", "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +64,7 @@ "format": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", @@ -88,7 +74,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -109,5 +95,31 @@ ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-apimanagement?view=azure-node-preview" + }, + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "selfLink": false + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts index c925ab438886..ecc4eb4dabc3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiCreateOrUpdateParameter, - ApiManagementClient + ApiCreateOrUpdateParameter, + ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApi.json */ async function apiManagementCreateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580" - } - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2: { + authorizationServerId: "authorizationServerId2283", + scope: "oauth2scope2580" + } + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -62,32 +60,32 @@ async function apiManagementCreateApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiClone.json */ async function apiManagementCreateApiClone() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api2"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: "Copy of Existing Echo Api including Operations.", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", - subscriptionRequired: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api2"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo2", + description: "Copy of Existing Echo Api including Operations.", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", + subscriptionRequired: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -97,36 +95,36 @@ async function apiManagementCreateApiClone() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json */ async function apiManagementCreateApiNewVersionUsingExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echoapiv3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: - "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", - apiVersion: "v4", - apiVersionSetId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", - subscriptionRequired: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echoapiv3"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo2", + description: + "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + apiVersion: "v4", + apiVersionSetId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", + subscriptionRequired: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -136,28 +134,28 @@ async function apiManagementCreateApiNewVersionUsingExistingApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json */ async function apiManagementCreateApiRevisionFromExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo", - apiRevisionDescription: "Creating a Revision of an existing API", - serviceUrl: "http://echoapi.cloudapp.net/apiv3", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api;rev=3"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo", + apiRevisionDescription: "Creating a Revision of an existing API", + serviceUrl: "http://echoapi.cloudapp.net/apiv3", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -167,27 +165,27 @@ async function apiManagementCreateApiRevisionFromExistingApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json */ async function apiManagementCreateApiUsingImportOverrideServiceUrl() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "apidocs"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link", - path: "petstoreapi123", - serviceUrl: "http://petstore.swagger.wordnik.com/api", - value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "apidocs"; + const parameters: ApiCreateOrUpdateParameter = { + format: "swagger-link", + path: "petstoreapi123", + serviceUrl: "http://petstore.swagger.wordnik.com/api", + value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -197,27 +195,27 @@ async function apiManagementCreateApiUsingImportOverrideServiceUrl() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3Import.json */ async function apiManagementCreateApiUsingOai3Import() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "openapi-link", + path: "petstore", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -227,28 +225,28 @@ async function apiManagementCreateApiUsingOai3Import() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json */ async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - translateRequiredQueryParametersConduct: "template", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "openapi-link", + path: "petstore", + translateRequiredQueryParametersConduct: "template", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -258,26 +256,26 @@ async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryPa * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingSwaggerImport.json */ async function apiManagementCreateApiUsingSwaggerImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link-json", - path: "petstore", - value: "http://petstore.swagger.io/v2/swagger.json" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "swagger-link-json", + path: "petstore", + value: "http://petstore.swagger.io/v2/swagger.json" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -287,27 +285,27 @@ async function apiManagementCreateApiUsingSwaggerImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingWadlImport.json */ async function apiManagementCreateApiUsingWadlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wadl-link-json", - path: "collector", - value: - "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wadl-link-json", + path: "collector", + value: + "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -317,41 +315,41 @@ async function apiManagementCreateApiUsingWadlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json */ async function apiManagementCreateApiWithMultipleAuthServers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2AuthenticationSettings: [ - { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2AuthenticationSettings: [ + { + authorizationServerId: "authorizationServerId2283", + scope: "oauth2scope2580" + }, + { + authorizationServerId: "authorizationServerId2284", + scope: "oauth2scope2581" + } + ] }, - { - authorizationServerId: "authorizationServerId2284", - scope: "oauth2scope2581" - } - ] - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -361,41 +359,41 @@ async function apiManagementCreateApiWithMultipleAuthServers() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json */ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - openidAuthenticationSettings: [ - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2283" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + openidAuthenticationSettings: [ + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2283" + }, + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2284" + } + ] }, - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2284" - } - ] - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -405,39 +403,39 @@ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithOpenIdConnect.json */ async function apiManagementCreateApiWithOpenIdConnect() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "petstore", - description: - "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - authenticationSettings: { - openid: { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "testopenid" - } - }, - displayName: "Swagger Petstore", - protocols: ["https"], - serviceUrl: "http://petstore.swagger.io/v2", - subscriptionKeyParameterNames: { - header: "Ocp-Apim-Subscription-Key", - query: "subscription-key" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "petstore", + description: + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + authenticationSettings: { + openid: { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "testopenid" + } + }, + displayName: "Swagger Petstore", + protocols: ["https"], + serviceUrl: "http://petstore.swagger.io/v2", + subscriptionKeyParameterNames: { + header: "Ocp-Apim-Subscription-Key", + query: "subscription-key" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -447,29 +445,29 @@ async function apiManagementCreateApiWithOpenIdConnect() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApi.json */ async function apiManagementCreateGraphQlApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "graphql", - path: "graphql-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["http", "https"], - serviceUrl: "https://api.spacex.land/graphql" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + apiType: "graphql", + path: "graphql-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["http", "https"], + serviceUrl: "https://api.spacex.land/graphql" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -479,31 +477,31 @@ async function apiManagementCreateGraphQlApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json */ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - soapApiType: "soap", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "soapApi"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wsdl-link", + path: "currency", + soapApiType: "soap", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -513,30 +511,30 @@ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json */ async function apiManagementCreateSoapToRestApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "soapApi"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wsdl-link", + path: "currency", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -546,48 +544,48 @@ async function apiManagementCreateSoapToRestApiUsingWsdlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateWebsocketApi.json */ async function apiManagementCreateWebSocketApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "websocket", - path: "newapiPath", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["wss", "ws"], - serviceUrl: "wss://echo.websocket.org" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + apiType: "websocket", + path: "newapiPath", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["wss", "ws"], + serviceUrl: "wss://echo.websocket.org" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApi(); - apiManagementCreateApiClone(); - apiManagementCreateApiNewVersionUsingExistingApi(); - apiManagementCreateApiRevisionFromExistingApi(); - apiManagementCreateApiUsingImportOverrideServiceUrl(); - apiManagementCreateApiUsingOai3Import(); - apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); - apiManagementCreateApiUsingSwaggerImport(); - apiManagementCreateApiUsingWadlImport(); - apiManagementCreateApiWithMultipleAuthServers(); - apiManagementCreateApiWithMultipleOpenIdConnectProviders(); - apiManagementCreateApiWithOpenIdConnect(); - apiManagementCreateGraphQlApi(); - apiManagementCreateSoapPassThroughApiUsingWsdlImport(); - apiManagementCreateSoapToRestApiUsingWsdlImport(); - apiManagementCreateWebSocketApi(); + apiManagementCreateApi(); + apiManagementCreateApiClone(); + apiManagementCreateApiNewVersionUsingExistingApi(); + apiManagementCreateApiRevisionFromExistingApi(); + apiManagementCreateApiUsingImportOverrideServiceUrl(); + apiManagementCreateApiUsingOai3Import(); + apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); + apiManagementCreateApiUsingSwaggerImport(); + apiManagementCreateApiUsingWadlImport(); + apiManagementCreateApiWithMultipleAuthServers(); + apiManagementCreateApiWithMultipleOpenIdConnectProviders(); + apiManagementCreateApiWithOpenIdConnect(); + apiManagementCreateGraphQlApi(); + apiManagementCreateSoapPassThroughApiUsingWsdlImport(); + apiManagementCreateSoapToRestApiUsingWsdlImport(); + apiManagementCreateWebSocketApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts index bce9734c0807..06ddce3a973e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApi.json */ async function apiManagementDeleteApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.delete( + resourceGroupName, + serviceName, + apiId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApi(); + apiManagementDeleteApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts index bb786b3e0770..26c439d90060 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. @@ -24,40 +22,40 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiDiagnostic.json */ async function apiManagementCreateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiDiagnostic(); + apiManagementCreateApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts index 3c10221ab17f..aa8a5f161fad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Diagnostic from an API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiDiagnostic.json */ async function apiManagementDeleteApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.delete( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.delete( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiDiagnostic(); + apiManagementDeleteApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts index fee3ff7ccecc..bf58d09ae1c5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiDiagnostic.json */ async function apiManagementHeadApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - apiId, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.getEntityTag( + resourceGroupName, + serviceName, + apiId, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementHeadApiDiagnostic(); + apiManagementHeadApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts index b7c47ea2ae7a..958454537dbf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json */ async function apiManagementGetApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.get( - resourceGroupName, - serviceName, - apiId, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.get( + resourceGroupName, + serviceName, + apiId, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementGetApiDiagnostic(); + apiManagementGetApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts index 1e3cf1eb81f3..4ea53d829c79 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all diagnostics of an API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiDiagnostics.json */ async function apiManagementListApiDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiDiagnostic.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiDiagnostic.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiDiagnostics(); + apiManagementListApiDiagnostics(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts index 98db9f1389bd..29c842a7dc5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. @@ -24,42 +22,42 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiDiagnostic.json */ async function apiManagementUpdateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.update( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.update( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiDiagnostic(); + apiManagementUpdateApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts index 0bc983750541..baff554b9c6b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json */ async function apiManagementGetApiExportInOpenApi2Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const format = "swagger-link"; + const exportParam = "true"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + resourceGroupName, + serviceName, + apiId, + format, + exportParam + ); + console.log(result); } /** @@ -48,29 +46,29 @@ async function apiManagementGetApiExportInOpenApi2Dot0() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi3dot0.json */ async function apiManagementGetApiExportInOpenApi3Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "aid9676"; + const format = "openapi-link"; + const exportParam = "true"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + resourceGroupName, + serviceName, + apiId, + format, + exportParam + ); + console.log(result); } async function main() { - apiManagementGetApiExportInOpenApi2Dot0(); - apiManagementGetApiExportInOpenApi3Dot0(); + apiManagementGetApiExportInOpenApi2Dot0(); + apiManagementGetApiExportInOpenApi3Dot0(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts index 2b95bbce1f20..b9f0cee28c4e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApi.json */ async function apiManagementHeadApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.getEntityTag( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.getEntityTag( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadApi(); + apiManagementHeadApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts index 6be69f527b3f..d07bec76b215 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API specified by its identifier. @@ -21,16 +19,16 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json */ async function apiManagementGetApiContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get(resourceGroupName, serviceName, apiId); + console.log(result); } /** @@ -40,21 +38,21 @@ async function apiManagementGetApiContract() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json */ async function apiManagementGetApiRevisionContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api;rev=3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get(resourceGroupName, serviceName, apiId); + console.log(result); } async function main() { - apiManagementGetApiContract(); - apiManagementGetApiRevisionContract(); + apiManagementGetApiContract(); + apiManagementGetApiRevisionContract(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts index cbe5617fbf06..5457d216d7f0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueAttachmentContract, - ApiManagementClient + ApiManagementClient, + IssueAttachmentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Attachment for the Issue in an API or updates an existing one. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueAttachment.json */ async function apiManagementCreateApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const parameters: IssueAttachmentContract = { - content: "IEJhc2U2NA==", - contentFormat: "image/jpeg", - title: "Issue attachment." - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const parameters: IssueAttachmentContract = { + content: "IEJhc2U2NA==", + contentFormat: "image/jpeg", + title: "Issue attachment." + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssueAttachment(); + apiManagementCreateApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts index fbfe39d80766..2a892d115020 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified comment from an Issue. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueAttachment.json */ async function apiManagementDeleteApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssueAttachment(); + apiManagementDeleteApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts index 2c4e90eb568f..ae5a940bee71 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueAttachment.json */ async function apiManagementHeadApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssueAttachment(); + apiManagementHeadApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts index 0d908d111952..899219feb7c3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the issue Attachment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json */ async function apiManagementGetApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.get( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId + ); + console.log(result); } async function main() { - apiManagementGetApiIssueAttachment(); + apiManagementGetApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts index ee061f31375f..ad0012d54651 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all attachments for the Issue associated with the specified API. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueAttachments.json */ async function apiManagementListApiIssueAttachments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssueAttachment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssueAttachment.listByService( + resourceGroupName, + serviceName, + apiId, + issueId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssueAttachments(); + apiManagementListApiIssueAttachments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts index 32936cb7b1cc..1682afae2437 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueCommentContract, - ApiManagementClient + ApiManagementClient, + IssueCommentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Comment for the Issue in an API or updates an existing one. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueComment.json */ async function apiManagementCreateApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const parameters: IssueCommentContract = { - createdDate: new Date("2018-02-01T22:21:20.467Z"), - text: "Issue comment.", - userId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const parameters: IssueCommentContract = { + createdDate: new Date("2018-02-01T22:21:20.467Z"), + text: "Issue comment.", + userId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssueComment(); + apiManagementCreateApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts index 834fcd9846b3..94e1240c3e35 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified comment from an Issue. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueComment.json */ async function apiManagementDeleteApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssueComment(); + apiManagementDeleteApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts index cf361ab2bf4a..0e07c75463ed 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueComment.json */ async function apiManagementHeadApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssueComment(); + apiManagementHeadApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts index a653c91031fc..acbc31fbb053 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the issue Comment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json */ async function apiManagementGetApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.get( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId + ); + console.log(result); } async function main() { - apiManagementGetApiIssueComment(); + apiManagementGetApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts index 0f707b25fdc6..f61d5a58bda5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all comments for the Issue associated with the specified API. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueComments.json */ async function apiManagementListApiIssueComments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssueComment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssueComment.listByService( + resourceGroupName, + serviceName, + apiId, + issueId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssueComments(); + apiManagementListApiIssueComments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts index 17118262adfb..c1656d0d4144 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { IssueContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, IssueContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Issue for an API or updates an existing one. @@ -21,35 +19,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssue.json */ async function apiManagementCreateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const parameters: IssueContract = { - description: "New API issue description", - createdDate: new Date("2018-02-01T22:21:20.467Z"), - state: "open", - title: "New API issue", - userId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const parameters: IssueContract = { + description: "New API issue description", + createdDate: new Date("2018-02-01T22:21:20.467Z"), + state: "open", + title: "New API issue", + userId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssue(); + apiManagementCreateApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts index 62947660fdae..7638e5ff53b2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Issue from an API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssue.json */ async function apiManagementDeleteApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssue(); + apiManagementDeleteApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts index 9a4b143c4da3..21c8fba6ffdb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Issue for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssue.json */ async function apiManagementHeadApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssue(); + apiManagementHeadApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts index b806298655a6..37158457ff78 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Issue for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json */ async function apiManagementGetApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.get( - resourceGroupName, - serviceName, - apiId, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.get( + resourceGroupName, + serviceName, + apiId, + issueId + ); + console.log(result); } async function main() { - apiManagementGetApiIssue(); + apiManagementGetApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts index e40ae7fd2e07..65f0b8edcc6f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all issues associated with the specified API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssues.json */ async function apiManagementListApiIssues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssue.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssue.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssues(); + apiManagementListApiIssues(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts index 25a011cbee75..6665ab334d43 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueUpdateContract, - ApiManagementClient + ApiManagementClient, + IssueUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing issue for an API. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiIssue.json */ async function apiManagementUpdateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const parameters: IssueUpdateContract = { state: "closed" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.update( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const parameters: IssueUpdateContract = { state: "closed" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.update( + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiIssue(); + apiManagementUpdateApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts index e1d94d424419..76669128b1cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all APIs of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApis.json */ async function apiManagementListApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.api.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.api.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApis(); + apiManagementListApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts index 8a067b4d7eff..e850100bb822 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of apis associated with tags. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApisByTags.json */ async function apiManagementListApisByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.api.listByTags( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.api.listByTags( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApisByTags(); + apiManagementListApisByTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts index 75c47d43d0ff..59541db1b3e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.ApiManagement provider. @@ -21,17 +19,17 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOperations.json */ async function apiManagementListOperations() { - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential); - const resArray = new Array(); - for await (let item of client.apiManagementOperations.list()) { - resArray.push(item); - } - console.log(resArray); + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential); + const resArray = new Array(); + for await (let item of client.apiManagementOperations.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListOperations(); + apiManagementListOperations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts index dfd4316b30c0..b56e46ebb737 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceApplyNetworkConfigurationParameters, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceApplyNetworkConfigurationParameters, + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. @@ -25,29 +23,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json */ async function apiManagementApplyNetworkConfigurationUpdates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { - location: "west us" - }; - const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { - parameters - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName, - serviceName, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { + location: "west us" + }; + const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { + parameters + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( + resourceGroupName, + serviceName, + options + ); + console.log(result); } async function main() { - apiManagementApplyNetworkConfigurationUpdates(); + apiManagementApplyNetworkConfigurationUpdates(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts index b03c356fdfc1..80209b4270df 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceBackupRestoreParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json */ async function apiManagementBackupWithAccessKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -53,25 +51,25 @@ async function apiManagementBackupWithAccessKey() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json */ async function apiManagementBackupWithSystemManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "SystemAssignedManagedIdentity", - backupName: "backup5", - containerName: "apim-backups", - storageAccount: "contosorpstorage" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessType: "SystemAssignedManagedIdentity", + backupName: "backup5", + containerName: "apim-backups", + storageAccount: "contosorpstorage" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -81,32 +79,32 @@ async function apiManagementBackupWithSystemManagedIdentity() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json */ async function apiManagementBackupWithUserAssignedManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "UserAssignedManagedIdentity", - backupName: "backup5", - clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", - containerName: "apim-backups", - storageAccount: "contosorpstorage" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessType: "UserAssignedManagedIdentity", + backupName: "backup5", + clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", + containerName: "apim-backups", + storageAccount: "contosorpstorage" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementBackupWithAccessKey(); - apiManagementBackupWithSystemManagedIdentity(); - apiManagementBackupWithUserAssignedManagedIdentity(); + apiManagementBackupWithAccessKey(); + apiManagementBackupWithSystemManagedIdentity(); + apiManagementBackupWithUserAssignedManagedIdentity(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts index 1a25f9a44a64..3b03fe23aa8f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceCheckNameAvailabilityParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability and correctness of a name for an API Management service. @@ -24,21 +22,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceCheckNameAvailability.json */ async function apiManagementServiceCheckNameAvailability() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { - name: "apimService1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.checkNameAvailability( - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { + name: "apimService1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.checkNameAvailability( + parameters + ); + console.log(result); } async function main() { - apiManagementServiceCheckNameAvailability(); + apiManagementServiceCheckNameAvailability(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts index 5f7ab735d7d9..1542c0c35733 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceResource, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceResource } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. @@ -24,56 +22,56 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json */ async function apiManagementCreateMultiRegionServiceWithCustomHostname() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - additionalLocations: [ - { - disableGateway: true, - location: "East US", - sku: { name: "Premium", capacity: 1 } - } - ], - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - certificatePassword: "Password", - defaultSslBinding: true, - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "gateway1.msitesting.net" - }, - { - type: "Management", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "mgmt.msitesting.net" - }, - { - type: "Portal", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "portal1.msitesting.net" - } - ], - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + additionalLocations: [ + { + disableGateway: true, + location: "East US", + sku: { name: "Premium", capacity: 1 } + } + ], + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + certificatePassword: "Password", + defaultSslBinding: true, + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "gateway1.msitesting.net" + }, + { + type: "Management", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "mgmt.msitesting.net" + }, + { + type: "Portal", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "portal1.msitesting.net" + } + ], + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkType: "None" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -83,26 +81,26 @@ async function apiManagementCreateMultiRegionServiceWithCustomHostname() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateService.json */ async function apiManagementCreateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + sku: { name: "Developer", capacity: 1 }, + tags: { name: "Contoso", test: "User" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -112,27 +110,27 @@ async function apiManagementCreateService() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceHavingMsi.json */ async function apiManagementCreateServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { type: "SystemAssigned" }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + identity: { type: "SystemAssigned" }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -142,34 +140,34 @@ async function apiManagementCreateServiceHavingMsi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json */ async function apiManagementCreateServiceInVnetWithPublicIP() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US 2 EUAP", - publicIpAddressId: - "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" - }, - virtualNetworkType: "External", - zones: ["1", "2"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "East US 2 EUAP", + publicIpAddressId: + "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + virtualNetworkType: "External", + zones: ["1", "2"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -179,27 +177,27 @@ async function apiManagementCreateServiceInVnetWithPublicIP() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInZones.json */ async function apiManagementCreateServiceInZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "North europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - zones: ["1", "2"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "North europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + zones: ["1", "2"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -209,58 +207,58 @@ async function apiManagementCreateServiceInZones() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json */ async function apiManagementCreateServiceWithCustomHostnameKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - defaultSslBinding: true, - hostName: "gateway1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - }, - { - type: "Management", - hostName: "mgmt.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - }, - { - type: "Portal", - hostName: "portal1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - } - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": {} - } - }, - location: "North Europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + defaultSslBinding: true, + hostName: "gateway1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + type: "Management", + hostName: "mgmt.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + type: "Portal", + hostName: "portal1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + } + ], + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": {} + } + }, + location: "North Europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkType: "None" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -270,27 +268,27 @@ async function apiManagementCreateServiceWithCustomHostnameKeyVault() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json */ async function apiManagementCreateServiceWithNatGatewayEnabled() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US", - natGatewayState: "Enabled", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "East US", + natGatewayState: "Enabled", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -300,34 +298,34 @@ async function apiManagementCreateServiceWithNatGatewayEnabled() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithSystemCertificates.json */ async function apiManagementCreateServiceWithSystemCertificates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - certificates: [ - { - certificatePassword: "Password", - encodedCertificate: - "*******Base64 encoded Certificate******************", - storeName: "CertificateAuthority" - } - ], - location: "Central US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Basic", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + certificates: [ + { + certificatePassword: "Password", + encodedCertificate: + "*******Base64 encoded Certificate******************", + storeName: "CertificateAuthority" + } + ], + location: "Central US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Basic", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -337,32 +335,32 @@ async function apiManagementCreateServiceWithSystemCertificates() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json */ async function apiManagementCreateServiceWithUserAssignedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": {} - } - }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": {} + } + }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -372,39 +370,39 @@ async function apiManagementCreateServiceWithUserAssignedIdentity() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUndelete.json */ async function apiManagementUndelete() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - restore: true, - sku: { name: "Developer", capacity: 1 } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + restore: true, + sku: { name: "Developer", capacity: 1 } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateMultiRegionServiceWithCustomHostname(); - apiManagementCreateService(); - apiManagementCreateServiceHavingMsi(); - apiManagementCreateServiceInVnetWithPublicIP(); - apiManagementCreateServiceInZones(); - apiManagementCreateServiceWithCustomHostnameKeyVault(); - apiManagementCreateServiceWithNatGatewayEnabled(); - apiManagementCreateServiceWithSystemCertificates(); - apiManagementCreateServiceWithUserAssignedIdentity(); - apiManagementUndelete(); + apiManagementCreateMultiRegionServiceWithCustomHostname(); + apiManagementCreateService(); + apiManagementCreateServiceHavingMsi(); + apiManagementCreateServiceInVnetWithPublicIP(); + apiManagementCreateServiceInZones(); + apiManagementCreateServiceWithCustomHostnameKeyVault(); + apiManagementCreateServiceWithNatGatewayEnabled(); + apiManagementCreateServiceWithSystemCertificates(); + apiManagementCreateServiceWithUserAssignedIdentity(); + apiManagementUndelete(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts index dfd1f991b2c0..e8c94d35e97d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing API Management service. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceDeleteService.json */ async function apiManagementServiceDeleteService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginDeleteAndWait( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginDeleteAndWait( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceDeleteService(); + apiManagementServiceDeleteService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts index 8397ca8c3e72..f0f8d220e5d1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the custom domain ownership identifier for an API Management service. @@ -21,16 +19,16 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json */ async function apiManagementServiceGetDomainOwnershipIdentifier() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getDomainOwnershipIdentifier(); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getDomainOwnershipIdentifier(); + console.log(result); } async function main() { - apiManagementServiceGetDomainOwnershipIdentifier(); + apiManagementServiceGetDomainOwnershipIdentifier(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts index 7163797c6d8d..2441ddb4d138 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets an API Management service resource description. @@ -21,18 +19,18 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json */ async function apiManagementServiceGetMultiRegionInternalVnet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } /** @@ -42,18 +40,18 @@ async function apiManagementServiceGetMultiRegionInternalVnet() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json */ async function apiManagementServiceGetService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } /** @@ -63,24 +61,24 @@ async function apiManagementServiceGetService() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json */ async function apiManagementServiceGetServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetMultiRegionInternalVnet(); - apiManagementServiceGetService(); - apiManagementServiceGetServiceHavingMsi(); + apiManagementServiceGetMultiRegionInternalVnet(); + apiManagementServiceGetService(); + apiManagementServiceGetServiceHavingMsi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts index 5b7a9b85fd34..9fcb0310a374 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetSsoToken.json */ async function apiManagementServiceGetSsoToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getSsoToken( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getSsoToken( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetSsoToken(); + apiManagementServiceGetSsoToken(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts index 68347b154435..d8cfdb77b689 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all API Management services within a resource group. @@ -21,23 +19,23 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json */ async function apiManagementListServiceBySubscriptionAndResourceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementService.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementService.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListServiceBySubscriptionAndResourceGroup(); + apiManagementListServiceBySubscriptionAndResourceGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts index dae98cd98de7..b1b37bc3392a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all API Management services within an Azure subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscription.json */ async function apiManagementListServiceBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementService.list()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementService.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListServiceBySubscription(); + apiManagementListServiceBySubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts index 12b4f998926b..ade1818aa1f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceMigrateToStv2.json */ async function apiManagementMigrateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginMigrateToStv2AndWait( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginMigrateToStv2AndWait( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementMigrateService(); + apiManagementMigrateService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts index d74b73856aad..192343606f8a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceBackupRestoreParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRestoreWithAccessKey.json */ async function apiManagementRestoreService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginRestoreAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginRestoreAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementRestoreService(); + apiManagementRestoreService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts index 7e0ad8f9d06f..d50bfe252c7a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all available SKU for a given API Management service @@ -21,21 +19,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Consumption.json */ async function apiManagementListSkUsConsumption() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } /** @@ -45,26 +43,26 @@ async function apiManagementListSkUsConsumption() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Dedicated.json */ async function apiManagementListSkUsDedicated() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListSkUsConsumption(); - apiManagementListSkUsDedicated(); + apiManagementListSkUsConsumption(); + apiManagementListSkUsDedicated(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts index ea2ec6b8aad9..42ca5995a30d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceUpdateParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing API Management service. @@ -24,24 +22,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceDisableTls10.json */ async function apiManagementUpdateServiceDisableTls10() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - customProperties: { - microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + customProperties: { + microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -51,23 +49,23 @@ async function apiManagementUpdateServiceDisableTls10() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServicePublisherDetails.json */ async function apiManagementUpdateServicePublisherDetails() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - publisherEmail: "foobar@live.com", - publisherName: "Contoso Vnext" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + publisherEmail: "foobar@live.com", + publisherName: "Contoso Vnext" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -77,49 +75,49 @@ async function apiManagementUpdateServicePublisherDetails() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json */ async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - additionalLocations: [ - { - location: "Australia East", + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + additionalLocations: [ + { + location: "Australia East", + publicIpAddressId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + sku: { name: "Premium", capacity: 3 }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + }, + zones: ["1", "2", "3"] + } + ], publicIpAddressId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", sku: { name: "Premium", capacity: 3 }, virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + subnetResourceId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" }, + virtualNetworkType: "External", zones: ["1", "2", "3"] - } - ], - publicIpAddressId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", - sku: { name: "Premium", capacity: 3 }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" - }, - virtualNetworkType: "External", - zones: ["1", "2", "3"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateServiceDisableTls10(); - apiManagementUpdateServicePublisherDetails(); - apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); + apiManagementUpdateServiceDisableTls10(); + apiManagementUpdateServicePublisherDetails(); + apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts index 7e31e185e783..f6760b07e8c2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSku.json */ async function listsAllAvailableResourceSkUs() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementSkus.list()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementSkus.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - listsAllAvailableResourceSkUs(); + listsAllAvailableResourceSkUs(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts index 57ddd217eb6b..e91d9872911e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OperationContract, - ApiManagementClient + ApiManagementClient, + OperationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new operation in the API or updates an existing one. @@ -24,57 +22,57 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperation.json */ async function apiManagementCreateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters: OperationContract = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User" - } - ] - }, - responses: [ - { - description: "successful operation", - headers: [], - representations: [ - { contentType: "application/xml" }, - { contentType: "application/json" } - ], - statusCode: 200 - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "PetStoreTemplate2"; + const operationId = "newoperations"; + const parameters: OperationContract = { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", + headers: [], + queryParameters: [], + representations: [ + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User" + } + ] + }, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" } + ], + statusCode: 200 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + operationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiOperation(); + apiManagementCreateApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts index d414082a183c..92fe8fc6b30c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified operation in the API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperation.json */ async function apiManagementDeleteApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.delete( + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperation(); + apiManagementDeleteApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts index 3cebed551155..05c267acae11 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperation.json */ async function apiManagementHeadApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.getEntityTag( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperation(); + apiManagementHeadApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts index 10b16a1eceeb..c8cef3845950 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json */ async function apiManagementGetApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } /** @@ -46,27 +44,27 @@ async function apiManagementGetApiOperation() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json */ async function apiManagementGetApiOperationPetStore() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "swagger-petstore"; - const operationId = "loginUser"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "swagger-petstore"; + const operationId = "loginUser"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementGetApiOperation(); - apiManagementGetApiOperationPetStore(); + apiManagementGetApiOperation(); + apiManagementGetApiOperationPetStore(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts index 67fec5856be7..acfbebdfc843 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the operations for the specified API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperations.json */ async function apiManagementListApiOperations() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiOperation.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiOperation.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiOperations(); + apiManagementListApiOperations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts index 97461f9f8ac8..6cd9f3b7f173 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiOperationPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. @@ -25,37 +23,37 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationPolicy.json */ async function apiManagementCreateApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " " - }; - const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const operationId = "5600b57e7e8880006a080001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + " " + }; + const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateApiOperationPolicy(); + apiManagementCreateApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts index 4478ff0fa99a..c810922ed199 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Api Operation. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationPolicy.json */ async function apiManagementDeleteApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "testapi"; + const operationId = "testoperation"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.delete( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperationPolicy(); + apiManagementDeleteApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts index 5bc3e6ddd58e..8fde1fa291df 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationPolicy.json */ async function apiManagementHeadApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const operationId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperationPolicy(); + apiManagementHeadApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts index cab61e48b966..d7b2c3bbcc12 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API Operation level. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json */ async function apiManagementGetApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.get( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const operationId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.get( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetApiOperationPolicy(); + apiManagementGetApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts index aa843602a285..17f947b56216 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the list of policy configuration at the API Operation level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationPolicies.json */ async function apiManagementListApiOperationPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "599e2953193c3c0bd0b3e2fa"; + const operationId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.listByOperation( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementListApiOperationPolicies(); + apiManagementListApiOperationPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts index 0f79451fcfb9..beb38dd57c47 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OperationUpdateContract, - ApiManagementClient + ApiManagementClient, + OperationUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. @@ -24,62 +22,62 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiOperation.json */ async function apiManagementUpdateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters: OperationUpdateContract = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ - { - name: "param1", - type: "string", - description: - 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"] - } - ] - }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200 - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500 - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.update( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const operationId = "operationId"; + const ifMatch = "*"; + const parameters: OperationUpdateContract = { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: + 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"] + } + ] + }, + responses: [ + { + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200 + }, + { + description: "Server Error.", + headers: [], + representations: [], + statusCode: 500 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.update( + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiOperation(); + apiManagementUpdateApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts index fa605ca9b679..04aecfe419bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the API. @@ -25,31 +23,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicy.json */ async function apiManagementCreateApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " " - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + " " + }; + const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + policyId, + parameters, + options + ); + console.log(result); } /** @@ -59,36 +57,36 @@ async function apiManagementCreateApiPolicy() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json */ async function apiManagementCreateApiPolicyNonXmlEncoded() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ' - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ' + }; + const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateApiPolicy(); - apiManagementCreateApiPolicyNonXmlEncoded(); + apiManagementCreateApiPolicy(); + apiManagementCreateApiPolicyNonXmlEncoded(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts index d129e7c63897..b8fc907fc1e5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiPolicy.json */ async function apiManagementDeleteApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.delete( - resourceGroupName, - serviceName, - apiId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "loggerId"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.delete( + resourceGroupName, + serviceName, + apiId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiPolicy(); + apiManagementDeleteApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts index 65d78626c8c0..1cb14c5148db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiPolicy.json */ async function apiManagementHeadApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadApiPolicy(); + apiManagementHeadApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts index 144ec3c40c84..a0607e87cb7c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json */ async function apiManagementGetApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.get( - resourceGroupName, - serviceName, - apiId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b59475ff190048040001"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.get( + resourceGroupName, + serviceName, + apiId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetApiPolicy(); + apiManagementGetApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts index 288412e2c710..7b478adfc0e8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API level. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiPolicies.json */ async function apiManagementListApiPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.listByApi( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b59475ff190048040001"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.listByApi( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementListApiPolicies(); + apiManagementListApiPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts index d318b1473b02..0070ec9cab90 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Products, which the API is part of. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiProducts.json */ async function apiManagementListApiProducts() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiProduct.listByApis( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiProduct.listByApis( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiProducts(); + apiManagementListApiProducts(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts index cb79c7d8ac65..73d39ee9612c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiReleaseContract, - ApiManagementClient + ApiManagementClient, + ApiReleaseContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Release for the API. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRelease.json */ async function apiManagementCreateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - releaseId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "testrev"; + const parameters: ApiReleaseContract = { + apiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + releaseId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiRelease(); + apiManagementCreateApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts index 5632e6d7ca5f..c336777b384b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified release in the API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiRelease.json */ async function apiManagementDeleteApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.delete( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5a5fcc09124a7fa9b89f2f1d"; + const releaseId = "testrev"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.delete( + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiRelease(); + apiManagementDeleteApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts index 22a8e6432079..a82d98e30885 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the etag of an API release. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiRelease.json */ async function apiManagementHeadApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.getEntityTag( - resourceGroupName, - serviceName, - apiId, - releaseId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "5a7cb545298324c53224a799"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.getEntityTag( + resourceGroupName, + serviceName, + apiId, + releaseId + ); + console.log(result); } async function main() { - apiManagementHeadApiRelease(); + apiManagementHeadApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts index 910b9cc7aa94..fd9b137f6bd4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the details of an API release. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json */ async function apiManagementGetApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.get( - resourceGroupName, - serviceName, - apiId, - releaseId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "5a7cb545298324c53224a799"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.get( + resourceGroupName, + serviceName, + apiId, + releaseId + ); + console.log(result); } async function main() { - apiManagementGetApiRelease(); + apiManagementGetApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts index 8d7992118402..64127e944b8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiReleases.json */ async function apiManagementListApiReleases() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiRelease.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiRelease.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiReleases(); + apiManagementListApiReleases(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts index 36d6b1ea7b60..2ce58ccc3844 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiReleaseContract, - ApiManagementClient + ApiManagementClient, + ApiReleaseContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiRelease.json */ async function apiManagementUpdateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.update( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "testrev"; + const ifMatch = "*"; + const parameters: ApiReleaseContract = { + apiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.update( + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiRelease(); + apiManagementUpdateApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts index 369b6861fae5..576b24fb92ad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all revisions of an API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiRevisions.json */ async function apiManagementListApiRevisions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiRevision.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiRevision.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiRevisions(); + apiManagementListApiRevisions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts index e83665edc36a..41be2f7461da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SchemaContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, SchemaContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates schema configuration for the API. @@ -21,32 +19,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiSchema.json */ async function apiManagementCreateApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters: SchemaContract = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const parameters: SchemaContract = { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiSchema(); + apiManagementCreateApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts index e3295239b6d1..713facf24838 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the schema configuration at the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiSchema.json */ async function apiManagementDeleteApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.delete( - resourceGroupName, - serviceName, - apiId, - schemaId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const schemaId = "59d5b28e1f7fab116402044e"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.delete( + resourceGroupName, + serviceName, + apiId, + schemaId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiSchema(); + apiManagementDeleteApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts index 152d4181d025..2aedc068386e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiSchema.json */ async function apiManagementHeadApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.getEntityTag( - resourceGroupName, - serviceName, - apiId, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.getEntityTag( + resourceGroupName, + serviceName, + apiId, + schemaId + ); + console.log(result); } async function main() { - apiManagementHeadApiSchema(); + apiManagementHeadApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts index 0c9e2208fe4e..40781462ab34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the schema configuration at the API level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json */ async function apiManagementGetApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.get( - resourceGroupName, - serviceName, - apiId, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.get( + resourceGroupName, + serviceName, + apiId, + schemaId + ); + console.log(result); } async function main() { - apiManagementGetApiSchema(); + apiManagementGetApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts index b82721c480f1..5b592fd0ac0b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the schema configuration at the API level. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiSchemas.json */ async function apiManagementListApiSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiSchema.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiSchema.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiSchemas(); + apiManagementListApiSchemas(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts index a47471031228..a684f521a1fb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - TagDescriptionCreateParameters, - ApiManagementClient + ApiManagementClient, + TagDescriptionCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create/Update tag description in scope of the Api. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTagDescription.json */ async function apiManagementCreateApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagDescriptionId = "tagId1"; - const parameters: TagDescriptionCreateParameters = { - description: - "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", - externalDocsDescription: "Description of the external docs resource", - externalDocsUrl: "http://some.url/additionaldoc" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5931a75ae4bbd512a88c680b"; + const tagDescriptionId = "tagId1"; + const parameters: TagDescriptionCreateParameters = { + description: + "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + externalDocsDescription: "Description of the external docs resource", + externalDocsUrl: "http://some.url/additionaldoc" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiTagDescription(); + apiManagementCreateApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts index bb648aafb5be..c89fd8aa72e9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete tag description for the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTagDescription.json */ async function apiManagementDeleteApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagDescriptionId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.delete( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const tagDescriptionId = "59d5b28e1f7fab116402044e"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.delete( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiTagDescription(); + apiManagementDeleteApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts index da9fc62a5c2a..0507a111064c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTagDescription.json */ async function apiManagementHeadApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.getEntityTag( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.getEntityTag( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId + ); + console.log(result); } async function main() { - apiManagementHeadApiTagDescription(); + apiManagementHeadApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts index afe59cf901ea..f65ddc6b08a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Tag description in scope of API @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json */ async function apiManagementGetApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.get( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.get( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId + ); + console.log(result); } async function main() { - apiManagementGetApiTagDescription(); + apiManagementGetApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts index 87dc8f957b82..fe39c620a5c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTagDescriptions.json */ async function apiManagementListApiTagDescriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiTagDescription.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiTagDescription.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiTagDescriptions(); + apiManagementListApiTagDescriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts index 452f2a8c93fc..c1bd6c38b496 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiUpdateContract, - ApiManagementClient + ApiManagementClient, + ApiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specified API of the API Management service instance. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApi.json */ async function apiManagementUpdateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters: ApiUpdateContract = { - path: "newecho", - displayName: "Echo API New", - serviceUrl: "http://echoapi.cloudapp.net/api2" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const ifMatch = "*"; + const parameters: ApiUpdateContract = { + path: "newecho", + displayName: "Echo API New", + serviceUrl: "http://echoapi.cloudapp.net/api2" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.update( + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApi(); + apiManagementUpdateApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts index e99607ed0708..cdf359c7a089 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiVersionSetContract, - ApiManagementClient + ApiManagementClient, + ApiVersionSetContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a Api Version Set. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiVersionSet.json */ async function apiManagementCreateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "api1"; - const parameters: ApiVersionSetContract = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - versionSetId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "api1"; + const parameters: ApiVersionSetContract = { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.createOrUpdate( + resourceGroupName, + serviceName, + versionSetId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiVersionSet(); + apiManagementCreateApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts index 1b5131200550..2536236caf34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Api Version Set. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiVersionSet.json */ async function apiManagementDeleteApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "a1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.delete( - resourceGroupName, - serviceName, - versionSetId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "a1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.delete( + resourceGroupName, + serviceName, + versionSetId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiVersionSet(); + apiManagementDeleteApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts index a13138798b8a..d9293aa44755 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiVersionSet.json */ async function apiManagementHeadApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - versionSetId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.getEntityTag( + resourceGroupName, + serviceName, + versionSetId + ); + console.log(result); } async function main() { - apiManagementHeadApiVersionSet(); + apiManagementHeadApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts index 3c18cf6498b8..2a4661ef56bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json */ async function apiManagementGetApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.get( - resourceGroupName, - serviceName, - versionSetId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.get( + resourceGroupName, + serviceName, + versionSetId + ); + console.log(result); } async function main() { - apiManagementGetApiVersionSet(); + apiManagementGetApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts index e69cc77fbc18..1be2c7635edc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of API Version Sets in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiVersionSets.json */ async function apiManagementListApiVersionSets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiVersionSet.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiVersionSet.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiVersionSets(); + apiManagementListApiVersionSets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts index f24581aaafc9..5e435142f803 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiVersionSetUpdateParameters, - ApiManagementClient + ApiManagementClient, + ApiVersionSetUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiVersionSet.json */ async function apiManagementUpdateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters: ApiVersionSetUpdateParameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.update( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const ifMatch = "*"; + const parameters: ApiVersionSetUpdateParameters = { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.update( + resourceGroupName, + serviceName, + versionSetId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiVersionSet(); + apiManagementUpdateApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts index ff3225655428..d388065c605f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, WikiContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Wiki for an API or updates an existing one. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWiki.json */ async function apiManagementCreateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const parameters: WikiContract = { + documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiWiki(); + apiManagementCreateApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts index 6264ade4faf7..2f9eb975013e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Wiki from an API. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiWiki.json */ async function apiManagementDeleteApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.delete( + resourceGroupName, + serviceName, + apiId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiWiki(); + apiManagementDeleteApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts index 0357a5166461..7cadca565ddf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiWiki.json */ async function apiManagementHeadApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.getEntityTag( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.getEntityTag( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadApiWiki(); + apiManagementHeadApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts index 359249679756..e1ebfee205c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for an API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiWiki.json */ async function apiManagementGetApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.get( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.get( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementGetApiWiki(); + apiManagementGetApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts index 0e9975b5e0ed..6a334372a2ec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - WikiUpdateContract, - ApiManagementClient + ApiManagementClient, + WikiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Wiki for an API specified by its identifier. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiWiki.json */ async function apiManagementUpdateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const parameters: WikiUpdateContract = { + documents: [{ documentationId: "docId1" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.update( + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiWiki(); + apiManagementUpdateApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts index 8fabc4f2fdfc..103a943a3408 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the wikis for an API specified by its identifier. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiWikis.json */ async function apiManagementListApiWikis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiWikis.list( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiWikis.list( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiWikis(); + apiManagementListApiWikis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts index bbad6c195ebc..6ca83513025b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationAccessPolicyContract, - ApiManagementClient + ApiManagementClient, + AuthorizationAccessPolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates Authorization Access Policy. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json */ async function apiManagementCreateAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const parameters: AuthorizationAccessPolicyContract = { - objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", - tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const parameters: AuthorizationAccessPolicyContract = { + objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationAccessPolicy(); + apiManagementCreateAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts index 96e976d1186f..5c6a74192fe1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific access policy from the Authorization. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json */ async function apiManagementDeleteAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorizationAccessPolicy(); + apiManagementDeleteAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts index fe3c3e9890dd..907ba43ff887 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization access policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json */ async function apiManagementGetAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.get( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationAccessPolicy(); + apiManagementGetAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts index c09bd1ad1709..e093bea742ca 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization access policy defined within a authorization. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationAccessPolicies.json */ async function apiManagementListAuthorizationAccessPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizationAccessPolicy.listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorizationAccessPolicy.listByAuthorization( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationAccessPolicies(); + apiManagementListAuthorizationAccessPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts index 547d469315fa..02e3c9430ee1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationConfirmConsentCodeRequestContract, - ApiManagementClient + ApiManagementClient, + AuthorizationConfirmConsentCodeRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Confirm valid consent code to suppress Authorizations anti-phishing page. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json */ async function apiManagementPostAuthorizationConfirmConsentCodeRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationConfirmConsentCodeRequestContract = { - consentCode: "theconsentcode" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.confirmConsentCode( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const parameters: AuthorizationConfirmConsentCodeRequestContract = { + consentCode: "theconsentcode" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.confirmConsentCode( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementPostAuthorizationConfirmConsentCodeRequest(); + apiManagementPostAuthorizationConfirmConsentCodeRequest(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts index 1a82f36465af..a60e56983ca4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationContract, - ApiManagementClient + ApiManagementClient, + AuthorizationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates authorization. @@ -24,27 +22,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json */ async function apiManagementCreateAuthorizationAadAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz2"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz2"; + const parameters: AuthorizationContract = { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } /** @@ -54,36 +52,36 @@ async function apiManagementCreateAuthorizationAadAuthCode() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADClientCred.json */ async function apiManagementCreateAuthorizationAadClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const authorizationId = "authz1"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - parameters: { - clientId: "", - clientSecret: "" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithclientcred"; + const authorizationId = "authz1"; + const parameters: AuthorizationContract = { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode", + parameters: { + clientId: "", + clientSecret: "" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationAadAuthCode(); - apiManagementCreateAuthorizationAadClientCred(); + apiManagementCreateAuthorizationAadAuthCode(); + apiManagementCreateAuthorizationAadClientCred(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts index f049fbee5467..6fa94c732ec6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Authorization from the Authorization provider. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorization.json */ async function apiManagementDeleteAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorization(); + apiManagementDeleteAuthorization(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts index be32aa09673c..378f747c27e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json */ async function apiManagementGetAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.get( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId + ); + console.log(result); } async function main() { - apiManagementGetAuthorization(); + apiManagementGetAuthorization(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts index 18367a048a92..7856e4f84086 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. @@ -21,23 +19,23 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsAuthCode.json */ async function apiManagementListAuthorizationsAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorization.listByAuthorizationProvider( + resourceGroupName, + serviceName, + authorizationProviderId + )) { + resArray.push(item); + } + console.log(resArray); } /** @@ -47,28 +45,28 @@ async function apiManagementListAuthorizationsAuthCode() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsClientCred.json */ async function apiManagementListAuthorizationsClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithclientcred"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorization.listByAuthorizationProvider( + resourceGroupName, + serviceName, + authorizationProviderId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationsAuthCode(); - apiManagementListAuthorizationsClientCred(); + apiManagementListAuthorizationsAuthCode(); + apiManagementListAuthorizationsClientCred(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts index d82ee1d5c076..15f209913903 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationLoginRequestContract, - ApiManagementClient + ApiManagementClient, + AuthorizationLoginRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets authorization login links. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationLoginRequest.json */ async function apiManagementGetAuthorizationLoginRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationLoginRequestContract = { - postLoginRedirectUrl: "https://www.bing.com/" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationLoginLinks.post( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const parameters: AuthorizationLoginRequestContract = { + postLoginRedirectUrl: "https://www.bing.com/" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationLoginLinks.post( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationLoginRequest(); + apiManagementGetAuthorizationLoginRequest(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts index 82b92215f73d..ebcf96cdfbe7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationProviderContract, - ApiManagementClient + ApiManagementClient, + AuthorizationProviderContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates authorization provider. @@ -24,37 +22,37 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json */ async function apiManagementCreateAuthorizationProviderAadAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const parameters: AuthorizationProviderContract = { - displayName: "aadwithauthcode", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: "", - clientSecret: "", - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const parameters: AuthorizationProviderContract = { + displayName: "aadwithauthcode", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "", + clientSecret: "", + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All" + } + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" } - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + parameters + ); + console.log(result); } /** @@ -64,35 +62,35 @@ async function apiManagementCreateAuthorizationProviderAadAuthCode() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json */ async function apiManagementCreateAuthorizationProviderAadClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const parameters: AuthorizationProviderContract = { - displayName: "aadwithclientcred", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithclientcred"; + const parameters: AuthorizationProviderContract = { + displayName: "aadwithclientcred", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All" + } + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" } - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + parameters + ); + console.log(result); } /** @@ -102,39 +100,39 @@ async function apiManagementCreateAuthorizationProviderAadClientCred() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json */ async function apiManagementCreateAuthorizationProviderGenericOAuth2() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "eventbrite"; - const parameters: AuthorizationProviderContract = { - displayName: "eventbrite", - identityProvider: "oauth2", - oauth2: { - grantTypes: { - authorizationCode: { - authorizationUrl: "https://www.eventbrite.com/oauth/authorize", - clientId: "", - clientSecret: "", - refreshUrl: "https://www.eventbrite.com/oauth/token", - scopes: "", - tokenUrl: "https://www.eventbrite.com/oauth/token" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "eventbrite"; + const parameters: AuthorizationProviderContract = { + displayName: "eventbrite", + identityProvider: "oauth2", + oauth2: { + grantTypes: { + authorizationCode: { + authorizationUrl: "https://www.eventbrite.com/oauth/authorize", + clientId: "", + clientSecret: "", + refreshUrl: "https://www.eventbrite.com/oauth/token", + scopes: "", + tokenUrl: "https://www.eventbrite.com/oauth/token" + } + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" } - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + parameters + ); + console.log(result); } /** @@ -144,44 +142,44 @@ async function apiManagementCreateAuthorizationProviderGenericOAuth2() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json */ async function apiManagementCreateAuthorizationProviderOobGoogle() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "google"; - const parameters: AuthorizationProviderContract = { - displayName: "google", - identityProvider: "google", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: "", - clientSecret: "", - scopes: - "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "google"; + const parameters: AuthorizationProviderContract = { + displayName: "google", + identityProvider: "google", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "", + clientSecret: "", + scopes: + "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email" + } + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" } - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationProviderAadAuthCode(); - apiManagementCreateAuthorizationProviderAadClientCred(); - apiManagementCreateAuthorizationProviderGenericOAuth2(); - apiManagementCreateAuthorizationProviderOobGoogle(); + apiManagementCreateAuthorizationProviderAadAuthCode(); + apiManagementCreateAuthorizationProviderAadClientCred(); + apiManagementCreateAuthorizationProviderGenericOAuth2(); + apiManagementCreateAuthorizationProviderOobGoogle(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts index 07df09fdf5d7..89eff2c3929a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific authorization provider from the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationProvider.json */ async function apiManagementDeleteAuthorizationProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorizationProvider(); + apiManagementDeleteAuthorizationProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts index 50b24da54c3c..cb16b9f99b14 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization provider specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json */ async function apiManagementGetAuthorizationProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.get( - resourceGroupName, - serviceName, - authorizationProviderId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.get( + resourceGroupName, + serviceName, + authorizationProviderId + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationProvider(); + apiManagementGetAuthorizationProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts index 8e52e14dc82e..eae039a5b2c9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization providers defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationProviders.json */ async function apiManagementListAuthorizationProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizationProvider.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorizationProvider.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationProviders(); + apiManagementListAuthorizationProviders(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts index bbfb1a8599c5..760a3328fff0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationServerContract, - ApiManagementClient + ApiManagementClient, + AuthorizationServerContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new authorization server or updates an existing authorization server. @@ -24,43 +22,43 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationServer.json */ async function apiManagementCreateAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const parameters: AuthorizationServerContract = { - description: "test server", - authorizationEndpoint: "https://www.contoso.com/oauth2/auth", - authorizationMethods: ["GET"], - bearerTokenSendingMethods: ["authorizationHeader"], - clientId: "1", - clientRegistrationEndpoint: "https://www.contoso.com/apps", - clientSecret: "2", - defaultScope: "read write", - displayName: "test2", - grantTypes: ["authorizationCode", "implicit"], - resourceOwnerPassword: "pwd", - resourceOwnerUsername: "un", - supportState: true, - tokenEndpoint: "https://www.contoso.com/oauth2/token", - useInApiDocumentation: true, - useInTestConsole: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.createOrUpdate( - resourceGroupName, - serviceName, - authsid, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer"; + const parameters: AuthorizationServerContract = { + description: "test server", + authorizationEndpoint: "https://www.contoso.com/oauth2/auth", + authorizationMethods: ["GET"], + bearerTokenSendingMethods: ["authorizationHeader"], + clientId: "1", + clientRegistrationEndpoint: "https://www.contoso.com/apps", + clientSecret: "2", + defaultScope: "read write", + displayName: "test2", + grantTypes: ["authorizationCode", "implicit"], + resourceOwnerPassword: "pwd", + resourceOwnerUsername: "un", + supportState: true, + tokenEndpoint: "https://www.contoso.com/oauth2/token", + useInApiDocumentation: true, + useInTestConsole: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.createOrUpdate( + resourceGroupName, + serviceName, + authsid, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationServer(); + apiManagementCreateAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts index 3ead60ddd985..3bc6abba1f8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific authorization server instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationServer.json */ async function apiManagementDeleteAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.delete( - resourceGroupName, - serviceName, - authsid, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer2"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.delete( + resourceGroupName, + serviceName, + authsid, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorizationServer(); + apiManagementDeleteAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts index 959f296d1087..4e9d14a9468d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the authorizationServer specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadAuthorizationServer.json */ async function apiManagementHeadAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.getEntityTag( - resourceGroupName, - serviceName, - authsid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.getEntityTag( + resourceGroupName, + serviceName, + authsid + ); + console.log(result); } async function main() { - apiManagementHeadAuthorizationServer(); + apiManagementHeadAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts index 322be95d80db..cf2ad60b97e0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization server specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json */ async function apiManagementGetAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.get( - resourceGroupName, - serviceName, - authsid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.get( + resourceGroupName, + serviceName, + authsid + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationServer(); + apiManagementGetAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts index 56d4ccf2e5e3..0f0f6f7c9529 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization servers defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationServers.json */ async function apiManagementListAuthorizationServers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizationServer.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorizationServer.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationServers(); + apiManagementListAuthorizationServers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts index 6d2fbddadcee..40abf158aa0b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the authorization server. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementAuthorizationServerListSecrets.json */ async function apiManagementAuthorizationServerListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.listSecrets( - resourceGroupName, - serviceName, - authsid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.listSecrets( + resourceGroupName, + serviceName, + authsid + ); + console.log(result); } async function main() { - apiManagementAuthorizationServerListSecrets(); + apiManagementAuthorizationServerListSecrets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts index 24b94f08763c..65c70bda6ea6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationServerUpdateContract, - ApiManagementClient + ApiManagementClient, + AuthorizationServerUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the authorization server specified by its identifier. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateAuthorizationServer.json */ async function apiManagementUpdateAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const ifMatch = "*"; - const parameters: AuthorizationServerUpdateContract = { - clientId: "update", - clientSecret: "updated", - useInApiDocumentation: true, - useInTestConsole: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.update( - resourceGroupName, - serviceName, - authsid, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer"; + const ifMatch = "*"; + const parameters: AuthorizationServerUpdateContract = { + clientId: "update", + clientSecret: "updated", + useInApiDocumentation: true, + useInTestConsole: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.update( + resourceGroupName, + serviceName, + authsid, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateAuthorizationServer(); + apiManagementUpdateAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts index c962b8e6b75f..d27cccafbd51 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { BackendContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, BackendContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a backend. @@ -21,37 +19,37 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendProxyBackend.json */ async function apiManagementCreateBackendProxyBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters: BackendContract = { - description: "description5308", - credentials: { - authorization: { parameter: "opensesma", scheme: "Basic" }, - header: { xMy1: ["val1", "val2"] }, - query: { sv: ["xx", "bb", "cc"] } - }, - proxy: { - password: "", - url: "http://192.168.1.1:8080", - username: "Contoso\\admin" - }, - tls: { validateCertificateChain: true, validateCertificateName: true }, - url: "https://backendname2644/", - protocol: "http" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "proxybackend"; + const parameters: BackendContract = { + description: "description5308", + credentials: { + authorization: { parameter: "opensesma", scheme: "Basic" }, + header: { xMy1: ["val1", "val2"] }, + query: { sv: ["xx", "bb", "cc"] } + }, + proxy: { + password: "", + url: "http://192.168.1.1:8080", + username: "Contoso\\admin" + }, + tls: { validateCertificateChain: true, validateCertificateName: true }, + url: "https://backendname2644/", + protocol: "http" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + resourceGroupName, + serviceName, + backendId, + parameters + ); + console.log(result); } /** @@ -61,45 +59,45 @@ async function apiManagementCreateBackendProxyBackend() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendServiceFabric.json */ async function apiManagementCreateBackendServiceFabric() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const parameters: BackendContract = { - description: "Service Fabric Test App 1", - properties: { - serviceFabricCluster: { - clientCertificateId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", - managementEndpoints: ["https://somecluster.com"], - maxPartitionResolutionRetries: 5, - serverX509Names: [ - { - name: "ServerCommonName1", - issuerCertificateThumbprint: "IssuerCertificateThumbprint1" - } - ] - } - }, - url: "fabric:/mytestapp/mytestservice", - protocol: "http" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "sfbackend"; + const parameters: BackendContract = { + description: "Service Fabric Test App 1", + properties: { + serviceFabricCluster: { + clientCertificateId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + managementEndpoints: ["https://somecluster.com"], + maxPartitionResolutionRetries: 5, + serverX509Names: [ + { + name: "ServerCommonName1", + issuerCertificateThumbprint: "IssuerCertificateThumbprint1" + } + ] + } + }, + url: "fabric:/mytestapp/mytestservice", + protocol: "http" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + resourceGroupName, + serviceName, + backendId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateBackendProxyBackend(); - apiManagementCreateBackendServiceFabric(); + apiManagementCreateBackendProxyBackend(); + apiManagementCreateBackendServiceFabric(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts index 89e8c3271c29..ebd1024c5261 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified backend. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteBackend.json */ async function apiManagementDeleteBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.delete( - resourceGroupName, - serviceName, - backendId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "sfbackend"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.delete( + resourceGroupName, + serviceName, + backendId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteBackend(); + apiManagementDeleteBackend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts index 06cc146efc13..14744af4708b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadBackend.json */ async function apiManagementHeadBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.getEntityTag( - resourceGroupName, - serviceName, - backendId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "sfbackend"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.getEntityTag( + resourceGroupName, + serviceName, + backendId + ); + console.log(result); } async function main() { - apiManagementHeadBackend(); + apiManagementHeadBackend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts index c2d4ae96f020..15a4960f27e4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the backend specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json */ async function apiManagementGetBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.get( - resourceGroupName, - serviceName, - backendId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "sfbackend"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.get( + resourceGroupName, + serviceName, + backendId + ); + console.log(result); } async function main() { - apiManagementGetBackend(); + apiManagementGetBackend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts index 0ea9b79265ac..0c48ac50e91c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of backends in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListBackends.json */ async function apiManagementListBackends() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.backend.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.backend.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListBackends(); + apiManagementListBackends(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts index a60be7c63a0d..1b3404f4e8bf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - BackendReconnectContract, - BackendReconnectOptionalParams, - ApiManagementClient + ApiManagementClient, + BackendReconnectContract, + BackendReconnectOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. @@ -25,27 +23,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackendReconnect.json */ async function apiManagementBackendReconnect() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters: BackendReconnectContract = { after: "PT3S" }; - const options: BackendReconnectOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.reconnect( - resourceGroupName, - serviceName, - backendId, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "proxybackend"; + const parameters: BackendReconnectContract = { after: "PT3S" }; + const options: BackendReconnectOptionalParams = { parameters }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.reconnect( + resourceGroupName, + serviceName, + backendId, + options + ); + console.log(result); } async function main() { - apiManagementBackendReconnect(); + apiManagementBackendReconnect(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts index 164258fb978d..c174bbbc427e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - BackendUpdateParameters, - ApiManagementClient + ApiManagementClient, + BackendUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing backend. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateBackend.json */ async function apiManagementUpdateBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const ifMatch = "*"; - const parameters: BackendUpdateParameters = { - description: "description5308", - tls: { validateCertificateChain: false, validateCertificateName: true } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.update( - resourceGroupName, - serviceName, - backendId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "proxybackend"; + const ifMatch = "*"; + const parameters: BackendUpdateParameters = { + description: "description5308", + tls: { validateCertificateChain: false, validateCertificateName: true } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.update( + resourceGroupName, + serviceName, + backendId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateBackend(); + apiManagementUpdateBackend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts index 7fa6eb6b20b2..c6152331b76c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { CacheContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, CacheContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an External Cache to be used in Api Management instance. @@ -21,33 +19,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCache.json */ async function apiManagementCreateCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const parameters: CacheContract = { - description: "Redis cache instances in West India", - connectionString: - "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", - resourceId: - "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", - useFromLocation: "default" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.createOrUpdate( - resourceGroupName, - serviceName, - cacheId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "c1"; + const parameters: CacheContract = { + description: "Redis cache instances in West India", + connectionString: + "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", + resourceId: + "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + useFromLocation: "default" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.createOrUpdate( + resourceGroupName, + serviceName, + cacheId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateCache(); + apiManagementCreateCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts index 80b4454d8db3..4e80b216d29a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Cache. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCache.json */ async function apiManagementDeleteCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "southindia"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.delete( - resourceGroupName, - serviceName, - cacheId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "southindia"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.delete( + resourceGroupName, + serviceName, + cacheId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteCache(); + apiManagementDeleteCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts index 777ee99d6b6a..28702256b198 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Cache specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCache.json */ async function apiManagementHeadCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.getEntityTag( - resourceGroupName, - serviceName, - cacheId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.getEntityTag( + resourceGroupName, + serviceName, + cacheId + ); + console.log(result); } async function main() { - apiManagementHeadCache(); + apiManagementHeadCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts index df653474196e..970727924135 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Cache specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json */ async function apiManagementGetCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.get( - resourceGroupName, - serviceName, - cacheId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "c1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.get( + resourceGroupName, + serviceName, + cacheId + ); + console.log(result); } async function main() { - apiManagementGetCache(); + apiManagementGetCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts index 655ecf451ab5..0ce37d5e1283 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of all external Caches in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCaches.json */ async function apiManagementListCaches() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cache.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cache.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListCaches(); + apiManagementListCaches(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts index 72414be63f55..1904fe056059 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - CacheUpdateParameters, - ApiManagementClient + ApiManagementClient, + CacheUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the cache specified by its identifier. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateCache.json */ async function apiManagementUpdateCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const ifMatch = "*"; - const parameters: CacheUpdateParameters = { useFromLocation: "westindia" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.update( - resourceGroupName, - serviceName, - cacheId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "c1"; + const ifMatch = "*"; + const parameters: CacheUpdateParameters = { useFromLocation: "westindia" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.update( + resourceGroupName, + serviceName, + cacheId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateCache(); + apiManagementUpdateCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts index 39f489f9dc7f..4f055c8b11b5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - CertificateCreateOrUpdateParameters, - ApiManagementClient + ApiManagementClient, + CertificateCreateOrUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificate.json */ async function apiManagementCreateCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const parameters: CertificateCreateOrUpdateParameters = { - data: - "****************Base 64 Encoded Certificate *******************************", - password: "****Certificate Password******" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "tempcert"; + const parameters: CertificateCreateOrUpdateParameters = { + data: + "****************Base 64 Encoded Certificate *******************************", + password: "****Certificate Password******" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.createOrUpdate( + resourceGroupName, + serviceName, + certificateId, + parameters + ); + console.log(result); } /** @@ -53,33 +51,33 @@ async function apiManagementCreateCertificate() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json */ async function apiManagementCreateCertificateWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const parameters: CertificateCreateOrUpdateParameters = { - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: - "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCertkv"; + const parameters: CertificateCreateOrUpdateParameters = { + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: + "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.createOrUpdate( + resourceGroupName, + serviceName, + certificateId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateCertificate(); - apiManagementCreateCertificateWithKeyVault(); + apiManagementCreateCertificate(); + apiManagementCreateCertificateWithKeyVault(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts index 6a9d5dd55b4d..fb50c83faca2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific certificate. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCertificate.json */ async function apiManagementDeleteCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.delete( - resourceGroupName, - serviceName, - certificateId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "tempcert"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.delete( + resourceGroupName, + serviceName, + certificateId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteCertificate(); + apiManagementDeleteCertificate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts index a10bcb576854..67cd13b609bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCertificate.json */ async function apiManagementHeadCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.getEntityTag( - resourceGroupName, - serviceName, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCert1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.getEntityTag( + resourceGroupName, + serviceName, + certificateId + ); + console.log(result); } async function main() { - apiManagementHeadCertificate(); + apiManagementHeadCertificate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts index ae96d2c19d89..7ee5367ad2bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the certificate specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json */ async function apiManagementGetCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get( - resourceGroupName, - serviceName, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCert1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.get( + resourceGroupName, + serviceName, + certificateId + ); + console.log(result); } /** @@ -44,25 +42,25 @@ async function apiManagementGetCertificate() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json */ async function apiManagementGetCertificateWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get( - resourceGroupName, - serviceName, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCertkv"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.get( + resourceGroupName, + serviceName, + certificateId + ); + console.log(result); } async function main() { - apiManagementGetCertificate(); - apiManagementGetCertificateWithKeyVault(); + apiManagementGetCertificate(); + apiManagementGetCertificateWithKeyVault(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts index 3f53047c01a7..3ecb6a5c034f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of all certificates in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCertificates.json */ async function apiManagementListCertificates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificate.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.certificate.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListCertificates(); + apiManagementListCertificates(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts index 2df0975cf3d9..2407b20cbe08 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshCertificate.json */ async function apiManagementRefreshCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.refreshSecret( - resourceGroupName, - serviceName, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCertkv"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.refreshSecret( + resourceGroupName, + serviceName, + certificateId + ); + console.log(result); } async function main() { - apiManagementRefreshCertificate(); + apiManagementRefreshCertificate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts index e650e8e1978c..5048318d732e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ContentItemContract, - ApiManagementClient + ApiManagementClient, + ContentItemContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new developer portal's content item specified by the provided content type. @@ -24,39 +22,39 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentTypeContentItem.json */ async function apiManagementCreateContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const parameters: ContentItemContract = { - properties: { - enUs: { - description: "Short story about the company.", - documentId: - "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", - keywords: "company, about", - permalink: "/about", - title: "About" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; + const parameters: ContentItemContract = { + properties: { + enUs: { + description: "Short story about the company.", + documentId: + "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + keywords: "company, about", + permalink: "/about", + title: "About" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.createOrUpdate( + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateContentTypeContentItem(); + apiManagementCreateContentTypeContentItem(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts index 11087f6fc4f8..21b7bce13dec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the specified developer portal's content item. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentTypeContentItem.json */ async function apiManagementDeleteContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.delete( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.delete( + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteContentTypeContentItem(); + apiManagementDeleteContentTypeContentItem(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts index ff7b36dcc8fc..2dbf3b05e36e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadContentTypeContentItem.json */ async function apiManagementHeadContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.getEntityTag( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.getEntityTag( + resourceGroupName, + serviceName, + contentTypeId, + contentItemId + ); + console.log(result); } async function main() { - apiManagementHeadContentTypeContentItem(); + apiManagementHeadContentTypeContentItem(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts index 968f7c3e2f59..78578d698704 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the developer portal's content item specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentTypeContentItem.json */ async function apiManagementGetContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.get( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.get( + resourceGroupName, + serviceName, + contentTypeId, + contentItemId + ); + console.log(result); } async function main() { - apiManagementGetContentTypeContentItem(); + apiManagementGetContentTypeContentItem(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts index d5684141c4f0..80b6eafdb3a6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists developer portal's content items specified by the provided content type. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypeContentItems.json */ async function apiManagementListContentTypeContentItems() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.contentItem.listByService( - resourceGroupName, - serviceName, - contentTypeId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.contentItem.listByService( + resourceGroupName, + serviceName, + contentTypeId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListContentTypeContentItems(); + apiManagementListContentTypeContentItems(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts index 1bd7e4b5480e..e90c8403ff70 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ContentTypeContract, - ApiManagementClient + ApiManagementClient, + ContentTypeContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. @@ -24,74 +22,74 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentType.json */ async function apiManagementCreateContentType() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const parameters: ContentTypeContract = { - namePropertiesName: "Page", - schema: { - additionalProperties: false, - properties: { - en_us: { - type: "object", - additionalProperties: false, - properties: { - description: { - type: "string", - description: - "Page description. This property gets included in SEO attributes.", - indexed: true, - title: "Description" - }, - documentId: { - type: "string", - description: "Reference to page content document.", - title: "Document ID" - }, - keywords: { - type: "string", - description: - "Page keywords. This property gets included in SEO attributes.", - indexed: true, - title: "Keywords" - }, - permalink: { - type: "string", - description: "Page permalink, e.g. '/about'.", - indexed: true, - title: "Permalink" - }, - title: { - type: "string", - description: - "Page title. This property gets included in SEO attributes.", - indexed: true, - title: "Title" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const parameters: ContentTypeContract = { + namePropertiesName: "Page", + schema: { + additionalProperties: false, + properties: { + en_us: { + type: "object", + additionalProperties: false, + properties: { + description: { + type: "string", + description: + "Page description. This property gets included in SEO attributes.", + indexed: true, + title: "Description" + }, + documentId: { + type: "string", + description: "Reference to page content document.", + title: "Document ID" + }, + keywords: { + type: "string", + description: + "Page keywords. This property gets included in SEO attributes.", + indexed: true, + title: "Keywords" + }, + permalink: { + type: "string", + description: "Page permalink, e.g. '/about'.", + indexed: true, + title: "Permalink" + }, + title: { + type: "string", + description: + "Page title. This property gets included in SEO attributes.", + indexed: true, + title: "Title" + } + }, + required: ["title", "permalink", "documentId"] + } } - }, - required: ["title", "permalink", "documentId"] - } - } - }, - description: "A regular page", - version: "1.0.0" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - parameters - ); - console.log(result); + }, + description: "A regular page", + version: "1.0.0" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.createOrUpdate( + resourceGroupName, + serviceName, + contentTypeId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateContentType(); + apiManagementCreateContentType(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts index 06a31ac831f8..b78a3b974709 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentType.json */ async function apiManagementDeleteContentType() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.delete( - resourceGroupName, - serviceName, - contentTypeId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.delete( + resourceGroupName, + serviceName, + contentTypeId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteContentType(); + apiManagementDeleteContentType(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts index 704be3e32425..f10d53d36989 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentType.json */ async function apiManagementGetContentType() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.get( - resourceGroupName, - serviceName, - contentTypeId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.get( + resourceGroupName, + serviceName, + contentTypeId + ); + console.log(result); } async function main() { - apiManagementGetContentType(); + apiManagementGetContentType(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts index bfa265259683..2b3000b24950 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypes.json */ async function apiManagementListContentTypes() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.contentType.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.contentType.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListContentTypes(); + apiManagementListContentTypes(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts index fc1b1af5df15..d380f16234de 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalDelegationSettings, - DelegationSettingsCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + DelegationSettingsCreateOrUpdateOptionalParams, + PortalDelegationSettings } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Delegation settings. @@ -25,32 +23,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutDelegation.json */ async function apiManagementPortalSettingsUpdateDelegation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalDelegationSettings = { - subscriptions: { enabled: true }, - url: "http://contoso.com/delegation", - userRegistration: { enabled: true }, - validationKey: "" - }; - const options: DelegationSettingsCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalDelegationSettings = { + subscriptions: { enabled: true }, + url: "http://contoso.com/delegation", + userRegistration: { enabled: true }, + validationKey: "" + }; + const options: DelegationSettingsCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.createOrUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateDelegation(); + apiManagementPortalSettingsUpdateDelegation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts index b475a59e8cae..129b73975d6e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the DelegationSettings. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDelegationSettings.json */ async function apiManagementHeadDelegationSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.getEntityTag( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.getEntityTag( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementHeadDelegationSettings(); + apiManagementHeadDelegationSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts index 75b202cf5f2d..2adbcd6b1339 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Delegation Settings for the Portal. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetDelegation.json */ async function apiManagementPortalSettingsGetDelegation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementPortalSettingsGetDelegation(); + apiManagementPortalSettingsGetDelegation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts index e25d4dbb0799..aba969b4175d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the secret validation key of the DelegationSettings. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json */ async function apiManagementListSecretsPortalSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.listSecrets( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.listSecrets( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListSecretsPortalSettings(); + apiManagementListSecretsPortalSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts index 7b55289658ab..ebce71d5b438 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalDelegationSettings, - ApiManagementClient + ApiManagementClient, + PortalDelegationSettings } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Delegation settings. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateDelegation.json */ async function apiManagementPortalSettingsUpdateDelegation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalDelegationSettings = { - subscriptions: { enabled: true }, - url: "http://contoso.com/delegation", - userRegistration: { enabled: true }, - validationKey: "" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalDelegationSettings = { + subscriptions: { enabled: true }, + url: "http://contoso.com/delegation", + userRegistration: { enabled: true }, + validationKey: "" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.update( + resourceGroupName, + serviceName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateDelegation(); + apiManagementPortalSettingsUpdateDelegation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts index 337137849a4c..415b8e715ad6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get soft-deleted Api Management Service by name. @@ -21,18 +19,18 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json */ async function apiManagementGetDeletedServiceByName() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const serviceName = "apimService3"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.getByName(serviceName, location); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const serviceName = "apimService3"; + const location = "westus"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.deletedServices.getByName(serviceName, location); + console.log(result); } async function main() { - apiManagementGetDeletedServiceByName(); + apiManagementGetDeletedServiceByName(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts index 5eeb2e8df550..704e451971f8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all soft-deleted services available for undelete for the given subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesListBySubscription.json */ async function apiManagementDeletedServicesListBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.deletedServices.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.deletedServices.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementDeletedServicesListBySubscription(); + apiManagementDeletedServicesListBySubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts index a94e70bc93a6..51dd10773a74 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Purges Api Management Service (deletes it with no option to undelete). @@ -21,21 +19,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesPurge.json */ async function apiManagementDeletedServicesPurge() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const serviceName = "apimService3"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.beginPurgeAndWait( - serviceName, - location - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const serviceName = "apimService3"; + const location = "westus"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.deletedServices.beginPurgeAndWait( + serviceName, + location + ); + console.log(result); } async function main() { - apiManagementDeletedServicesPurge(); + apiManagementDeletedServicesPurge(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts index 70a9099bd2df..62fda80fc456 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. @@ -24,38 +22,38 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDiagnostic.json */ async function apiManagementCreateDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/azuremonitor", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.createOrUpdate( - resourceGroupName, - serviceName, - diagnosticId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/azuremonitor", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.createOrUpdate( + resourceGroupName, + serviceName, + diagnosticId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateDiagnostic(); + apiManagementCreateDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts index bf4f61249fba..87adb331142c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Diagnostic. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDiagnostic.json */ async function apiManagementDeleteDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.delete( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.delete( + resourceGroupName, + serviceName, + diagnosticId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteDiagnostic(); + apiManagementDeleteDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts index bf02e420f049..0f48b1f994a1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDiagnostic.json */ async function apiManagementHeadDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.getEntityTag( - resourceGroupName, - serviceName, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.getEntityTag( + resourceGroupName, + serviceName, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementHeadDiagnostic(); + apiManagementHeadDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts index 2f03f3c2761e..dfb1958cab7e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json */ async function apiManagementGetDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.get( - resourceGroupName, - serviceName, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.get( + resourceGroupName, + serviceName, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementGetDiagnostic(); + apiManagementGetDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts index af3227d1b4ee..b25f71632ba7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all diagnostics of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDiagnostics.json */ async function apiManagementListDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnostic.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.diagnostic.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListDiagnostics(); + apiManagementListDiagnostics(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts index 25129fa4da7f..93451744909c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. @@ -24,40 +22,40 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDiagnostic.json */ async function apiManagementUpdateDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.update( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.update( + resourceGroupName, + serviceName, + diagnosticId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateDiagnostic(); + apiManagementUpdateDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts index c93160bb7a2a..a602836a4d6e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DocumentationContract, - ApiManagementClient + ApiManagementClient, + DocumentationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Documentation or updates an existing one. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDocumentation.json */ async function apiManagementCreateDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const parameters: DocumentationContract = { - content: "content", - title: "Title" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.createOrUpdate( - resourceGroupName, - serviceName, - documentationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const parameters: DocumentationContract = { + content: "content", + title: "Title" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.createOrUpdate( + resourceGroupName, + serviceName, + documentationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateDocumentation(); + apiManagementCreateDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts index 53e3bffd4cf8..5032a6d02acd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Documentation from an API. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDocumentation.json */ async function apiManagementDeleteDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.delete( - resourceGroupName, - serviceName, - documentationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.delete( + resourceGroupName, + serviceName, + documentationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteDocumentation(); + apiManagementDeleteDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts index 759b162c1923..6af5542c3867 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Documentation by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDocumentation.json */ async function apiManagementHeadDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.getEntityTag( - resourceGroupName, - serviceName, - documentationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.getEntityTag( + resourceGroupName, + serviceName, + documentationId + ); + console.log(result); } async function main() { - apiManagementHeadDocumentation(); + apiManagementHeadDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts index 36c1dee0d237..564a20f12673 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Documentation specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json */ async function apiManagementGetDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.get( - resourceGroupName, - serviceName, - documentationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.get( + resourceGroupName, + serviceName, + documentationId + ); + console.log(result); } async function main() { - apiManagementGetDocumentation(); + apiManagementGetDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts index 81d580cba1c0..554dd0ed3057 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Documentations of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDocumentations.json */ async function apiManagementListApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.documentation.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.documentation.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApis(); + apiManagementListApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts index 75c50bab8387..9c90dd81c90a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DocumentationUpdateContract, - ApiManagementClient + ApiManagementClient, + DocumentationUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Documentation for an API specified by its identifier. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDocumentation.json */ async function apiManagementUpdateDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: DocumentationUpdateContract = { - content: "content updated", - title: "Title updated" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.update( - resourceGroupName, - serviceName, - documentationId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const parameters: DocumentationUpdateContract = { + content: "content updated", + title: "Title updated" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.update( + resourceGroupName, + serviceName, + documentationId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateDocumentation(); + apiManagementUpdateDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts index 7728b147c808..dfdf69296881 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - EmailTemplateUpdateParameters, - ApiManagementClient + ApiManagementClient, + EmailTemplateUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an Email Template. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTemplate.json */ async function apiManagementCreateTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const parameters: EmailTemplateUpdateParameters = { - subject: "Your request for $IssueName was successfully received." - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.createOrUpdate( - resourceGroupName, - serviceName, - templateName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const parameters: EmailTemplateUpdateParameters = { + subject: "Your request for $IssueName was successfully received." + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.createOrUpdate( + resourceGroupName, + serviceName, + templateName, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateTemplate(); + apiManagementCreateTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts index b71dcb4448f2..f59e61e61901 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Reset the Email Template to default template provided by the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTemplate.json */ async function apiManagementDeleteTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.delete( - resourceGroupName, - serviceName, - templateName, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.delete( + resourceGroupName, + serviceName, + templateName, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteTemplate(); + apiManagementDeleteTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts index 16ef6774de91..7395a67ea5ab 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the email template specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadEmailTemplate.json */ async function apiManagementHeadEmailTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.getEntityTag( - resourceGroupName, - serviceName, - templateName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.getEntityTag( + resourceGroupName, + serviceName, + templateName + ); + console.log(result); } async function main() { - apiManagementHeadEmailTemplate(); + apiManagementHeadEmailTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts index aeca9f9c866f..708654cb5232 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the email template specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json */ async function apiManagementGetTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.get( - resourceGroupName, - serviceName, - templateName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.get( + resourceGroupName, + serviceName, + templateName + ); + console.log(result); } async function main() { - apiManagementGetTemplate(); + apiManagementGetTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts index 63bc176c0c17..1b51d61e52dd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all email templates @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTemplates.json */ async function apiManagementListTemplates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.emailTemplate.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.emailTemplate.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTemplates(); + apiManagementListTemplates(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts index 8d8bc4674f2a..8e2ec3a44b2c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - EmailTemplateUpdateParameters, - ApiManagementClient + ApiManagementClient, + EmailTemplateUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates API Management email template @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTemplate.json */ async function apiManagementUpdateTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; - const parameters: EmailTemplateUpdateParameters = { - body: - '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

\r\n We are happy to let you know that your request to publish the $AppName application in the gallery has been approved. Your application has been published and can be viewed here.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', - subject: "Your request $IssueName was received" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.update( - resourceGroupName, - serviceName, - templateName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const ifMatch = "*"; + const parameters: EmailTemplateUpdateParameters = { + body: + '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

\r\n We are happy to let you know that your request to publish the $AppName application in the gallery has been approved. Your application has been published and can be viewed here.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', + subject: "Your request $IssueName was received" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.update( + resourceGroupName, + serviceName, + templateName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateTemplate(); + apiManagementUpdateTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts index 18d91215c721..03b8a90c03db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AssociationContract, - GatewayApiCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + AssociationContract, + GatewayApiCreateOrUpdateOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds an API to the specified Gateway. @@ -25,29 +23,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayApi.json */ async function apiManagementCreateGatewayApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; - const parameters: AssociationContract = { provisioningState: "created" }; - const options: GatewayApiCreateOrUpdateOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - apiId, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const apiId = "echo-api"; + const parameters: AssociationContract = { provisioningState: "created" }; + const options: GatewayApiCreateOrUpdateOptionalParams = { parameters }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayApi.createOrUpdate( + resourceGroupName, + serviceName, + gatewayId, + apiId, + options + ); + console.log(result); } async function main() { - apiManagementCreateGatewayApi(); + apiManagementCreateGatewayApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts index 545a5fb3fa6c..dcb5d6aeabb1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API from the specified Gateway. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayApi.json */ async function apiManagementDeleteGatewayApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.delete( - resourceGroupName, - serviceName, - gatewayId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayApi.delete( + resourceGroupName, + serviceName, + gatewayId, + apiId + ); + console.log(result); } async function main() { - apiManagementDeleteGatewayApi(); + apiManagementDeleteGatewayApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts index c76d571bda2b..2dd9a8cd645c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Gateway entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayApi.json */ async function apiManagementHeadGatewayApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "api1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const apiId = "api1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayApi.getEntityTag( + resourceGroupName, + serviceName, + gatewayId, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadGatewayApi(); + apiManagementHeadGatewayApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts index 219156cf842f..da92a5697bea 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the APIs associated with a gateway. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayApis.json */ async function apiManagementListGatewayApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.gatewayApi.listByService( - resourceGroupName, - serviceName, - gatewayId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gatewayApi.listByService( + resourceGroupName, + serviceName, + gatewayId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGatewayApis(); + apiManagementListGatewayApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts index 7f02030ccead..cccafedf4a55 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GatewayCertificateAuthorityContract, - ApiManagementClient + ApiManagementClient, + GatewayCertificateAuthorityContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign Certificate entity to Gateway entity as Certificate Authority. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json */ async function apiManagementCreateGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const parameters: GatewayCertificateAuthorityContract = { isTrusted: false }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const certificateId = "cert1"; + const parameters: GatewayCertificateAuthorityContract = { isTrusted: false }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.createOrUpdate( + resourceGroupName, + serviceName, + gatewayId, + certificateId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGatewayCertificateAuthority(); + apiManagementCreateGatewayCertificateAuthority(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts index 64119cc426fe..08a6fc2c1ee7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Remove relationship between Certificate Authority and Gateway entity. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json */ async function apiManagementDeleteGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "default"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.delete( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const certificateId = "default"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.delete( + resourceGroupName, + serviceName, + gatewayId, + certificateId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGatewayCertificateAuthority(); + apiManagementDeleteGatewayCertificateAuthority(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts index ad89c233c59d..17ca36839d5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayCertificateAuthority.json */ async function apiManagementHeadGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const certificateId = "cert1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.getEntityTag( + resourceGroupName, + serviceName, + gatewayId, + certificateId + ); + console.log(result); } async function main() { - apiManagementHeadGatewayCertificateAuthority(); + apiManagementHeadGatewayCertificateAuthority(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts index 91b55f332cfd..cf3b4570889f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get assigned Gateway Certificate Authority details. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json */ async function apiManagementGetGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.get( - resourceGroupName, - serviceName, - gatewayId, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const certificateId = "cert1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.get( + resourceGroupName, + serviceName, + gatewayId, + certificateId + ); + console.log(result); } async function main() { - apiManagementGetGatewayCertificateAuthority(); + apiManagementGetGatewayCertificateAuthority(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts index 46ca481ae49a..839c905cf29e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of Certificate Authorities for the specified Gateway entity. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayCertificateAuthorities.json */ async function apiManagementListGatewaycertificateAuthorities() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.gatewayCertificateAuthority.listByService( - resourceGroupName, - serviceName, - gatewayId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gatewayCertificateAuthority.listByService( + resourceGroupName, + serviceName, + gatewayId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGatewaycertificateAuthorities(); + apiManagementListGatewaycertificateAuthorities(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts index f9591b69eda0..fbab656e2a12 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, GatewayContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates a Gateway to be used in Api Management instance. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGateway.json */ async function apiManagementCreateGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayContract = { - description: "my gateway 1", - locationData: { name: "my location" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const parameters: GatewayContract = { + description: "my gateway 1", + locationData: { name: "my location" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.createOrUpdate( + resourceGroupName, + serviceName, + gatewayId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGateway(); + apiManagementCreateGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts index 1bea683bd048..0de14e313b2a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Gateway. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGateway.json */ async function apiManagementDeleteGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.delete( - resourceGroupName, - serviceName, - gatewayId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.delete( + resourceGroupName, + serviceName, + gatewayId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGateway(); + apiManagementDeleteGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts index 80a2efeba293..79c937d79485 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GatewayTokenRequestContract, - ApiManagementClient + ApiManagementClient, + GatewayTokenRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Shared Access Authorization Token for the gateway. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayGenerateToken.json */ async function apiManagementGatewayGenerateToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayTokenRequestContract = { - expiry: new Date("2020-04-21T00:44:24.2845269Z"), - keyType: "primary" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.generateToken( - resourceGroupName, - serviceName, - gatewayId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const parameters: GatewayTokenRequestContract = { + expiry: new Date("2020-04-21T00:44:24.2845269Z"), + keyType: "primary" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.generateToken( + resourceGroupName, + serviceName, + gatewayId, + parameters + ); + console.log(result); } async function main() { - apiManagementGatewayGenerateToken(); + apiManagementGatewayGenerateToken(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts index 0f48e7d8330d..709fc18b16a8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Gateway specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGateway.json */ async function apiManagementHeadGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "mygateway"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.getEntityTag( - resourceGroupName, - serviceName, - gatewayId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "mygateway"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.getEntityTag( + resourceGroupName, + serviceName, + gatewayId + ); + console.log(result); } async function main() { - apiManagementHeadGateway(); + apiManagementHeadGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts index c1bdd463a2c0..600f88baaa34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Gateway specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json */ async function apiManagementGetGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.get( - resourceGroupName, - serviceName, - gatewayId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.get( + resourceGroupName, + serviceName, + gatewayId + ); + console.log(result); } async function main() { - apiManagementGetGateway(); + apiManagementGetGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts index 1639e06ed352..a31c62e9a795 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GatewayHostnameConfigurationContract, - ApiManagementClient + ApiManagementClient, + GatewayHostnameConfigurationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates of updates hostname configuration for a Gateway. @@ -24,36 +22,36 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json */ async function apiManagementCreateGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const parameters: GatewayHostnameConfigurationContract = { - certificateId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", - hostname: "*", - http2Enabled: true, - negotiateClientCertificate: false, - tls10Enabled: false, - tls11Enabled: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - hcId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const hcId = "default"; + const parameters: GatewayHostnameConfigurationContract = { + certificateId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + hostname: "*", + http2Enabled: true, + negotiateClientCertificate: false, + tls10Enabled: false, + tls11Enabled: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.createOrUpdate( + resourceGroupName, + serviceName, + gatewayId, + hcId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGatewayHostnameConfiguration(); + apiManagementCreateGatewayHostnameConfiguration(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts index 54c551d5ca3f..605f4dd2e01b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified hostname configuration from the specified Gateway. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json */ async function apiManagementDeleteGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.delete( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const hcId = "default"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.delete( + resourceGroupName, + serviceName, + gatewayId, + hcId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGatewayHostnameConfiguration(); + apiManagementDeleteGatewayHostnameConfiguration(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts index 3b69b1ded4ac..4d8614c156c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json */ async function apiManagementHeadGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - hcId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const hcId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.getEntityTag( + resourceGroupName, + serviceName, + gatewayId, + hcId + ); + console.log(result); } async function main() { - apiManagementHeadGatewayHostnameConfiguration(); + apiManagementHeadGatewayHostnameConfiguration(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts index 5d4c94cf881c..819b7e39a380 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get details of a hostname configuration @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json */ async function apiManagementGetGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.get( - resourceGroupName, - serviceName, - gatewayId, - hcId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const hcId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.get( + resourceGroupName, + serviceName, + gatewayId, + hcId + ); + console.log(result); } async function main() { - apiManagementGetGatewayHostnameConfiguration(); + apiManagementGetGatewayHostnameConfiguration(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts index 601b7cdf9380..5ac2e5ae07c9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of hostname configurations for the specified gateway. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayHostnameConfigurations.json */ async function apiManagementListGatewayHostnameConfigurations() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.gatewayHostnameConfiguration.listByService( - resourceGroupName, - serviceName, - gatewayId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gatewayHostnameConfiguration.listByService( + resourceGroupName, + serviceName, + gatewayId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGatewayHostnameConfigurations(); + apiManagementListGatewayHostnameConfigurations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts index c46a48468460..4e60fdffb44f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of gateways registered with service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGateways.json */ async function apiManagementListGateways() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.gateway.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gateway.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGateways(); + apiManagementListGateways(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts index 5336e78a40e4..9a32dcf7b7dd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves gateway keys. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayListKeys.json */ async function apiManagementGatewayListKeys() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listKeys( - resourceGroupName, - serviceName, - gatewayId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.listKeys( + resourceGroupName, + serviceName, + gatewayId + ); + console.log(result); } async function main() { - apiManagementGatewayListKeys(); + apiManagementGatewayListKeys(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts index b926cf8923ca..efd6f9a35965 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GatewayKeyRegenerationRequestContract, - ApiManagementClient + ApiManagementClient, + GatewayKeyRegenerationRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates specified gateway key invalidating any tokens created with it. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayRegenerateKey.json */ async function apiManagementGatewayRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gwId"; - const parameters: GatewayKeyRegenerationRequestContract = { - keyType: "primary" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.regenerateKey( - resourceGroupName, - serviceName, - gatewayId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gwId"; + const parameters: GatewayKeyRegenerationRequestContract = { + keyType: "primary" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.regenerateKey( + resourceGroupName, + serviceName, + gatewayId, + parameters + ); + console.log(result); } async function main() { - apiManagementGatewayRegenerateKey(); + apiManagementGatewayRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts index 42aac3e1f49b..8d787eeb54ca 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, GatewayContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the gateway specified by its identifier. @@ -21,31 +19,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGateway.json */ async function apiManagementUpdateGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; - const parameters: GatewayContract = { - description: "my gateway 1", - locationData: { name: "my location" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.update( - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const ifMatch = "*"; + const parameters: GatewayContract = { + description: "my gateway 1", + locationData: { name: "my location" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.update( + resourceGroupName, + serviceName, + gatewayId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateGateway(); + apiManagementUpdateGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts index 32ac578cfd09..18330a36f124 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GlobalSchemaContract, - ApiManagementClient + ApiManagementClient, + GlobalSchemaContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. @@ -24,27 +22,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema1.json */ async function apiManagementCreateSchema1() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { - description: "sample schema description", - schemaType: "xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema1"; + const parameters: GlobalSchemaContract = { + description: "sample schema description", + schemaType: "xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + schemaId, + parameters + ); + console.log(result); } /** @@ -54,46 +52,46 @@ async function apiManagementCreateSchema1() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema2.json */ async function apiManagementCreateSchema2() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { - description: "sample schema description", - document: { - type: "object", - $id: "https://example.com/person.schema.json", - $schema: "https://json-schema.org/draft/2020-12/schema", - properties: { - age: { - type: "integer", - description: - "Age in years which must be equal to or greater than zero.", - minimum: 0 + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema1"; + const parameters: GlobalSchemaContract = { + description: "sample schema description", + document: { + type: "object", + $id: "https://example.com/person.schema.json", + $schema: "https://json-schema.org/draft/2020-12/schema", + properties: { + age: { + type: "integer", + description: + "Age in years which must be equal to or greater than zero.", + minimum: 0 + }, + firstName: { type: "string", description: "The person's first name." }, + lastName: { type: "string", description: "The person's last name." } + }, + title: "Person" }, - firstName: { type: "string", description: "The person's first name." }, - lastName: { type: "string", description: "The person's last name." } - }, - title: "Person" - }, - schemaType: "json" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters - ); - console.log(result); + schemaType: "json" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + schemaId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateSchema1(); - apiManagementCreateSchema2(); + apiManagementCreateSchema1(); + apiManagementCreateSchema2(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts index 5dbe2be68ada..25a5e7d0b6b3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Schema. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGlobalSchema.json */ async function apiManagementDeleteSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.delete( - resourceGroupName, - serviceName, - schemaId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.delete( + resourceGroupName, + serviceName, + schemaId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteSchema(); + apiManagementDeleteSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts index 2a51c0f0c444..a8985608c553 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGlobalSchema.json */ async function apiManagementHeadApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "myschema"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.getEntityTag( - resourceGroupName, - serviceName, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "myschema"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.getEntityTag( + resourceGroupName, + serviceName, + schemaId + ); + console.log(result); } async function main() { - apiManagementHeadApi(); + apiManagementHeadApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts index 42db81867552..b351b86e5827 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Schema specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json */ async function apiManagementGetSchema1() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get( - resourceGroupName, - serviceName, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.get( + resourceGroupName, + serviceName, + schemaId + ); + console.log(result); } /** @@ -44,25 +42,25 @@ async function apiManagementGetSchema1() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json */ async function apiManagementGetSchema2() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get( - resourceGroupName, - serviceName, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.get( + resourceGroupName, + serviceName, + schemaId + ); + console.log(result); } async function main() { - apiManagementGetSchema1(); - apiManagementGetSchema2(); + apiManagementGetSchema1(); + apiManagementGetSchema2(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts index ccf80484dc1b..0eb8472e9d54 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of schemas registered with service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGlobalSchemas.json */ async function apiManagementListSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.globalSchema.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.globalSchema.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListSchemas(); + apiManagementListSchemas(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts index 0be021db2d26..edaa4ae10615 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ResolverContract, - ApiManagementClient + ApiManagementClient, + ResolverContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new resolver in the GraphQL API or updates an existing one. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolver.json */ async function apiManagementCreateGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "someAPI"; - const resolverId = "newResolver"; - const parameters: ResolverContract = { - path: "Query/users", - description: "A GraphQL Resolver example", - displayName: "Query Users" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "someAPI"; + const resolverId = "newResolver"; + const parameters: ResolverContract = { + path: "Query/users", + description: "A GraphQL Resolver example", + displayName: "Query Users" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + resolverId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGraphQlApiResolver(); + apiManagementCreateGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts index 1245129ed7b1..1b9bc62badce 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified resolver in the GraphQL API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolver.json */ async function apiManagementDeleteGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const resolverId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.delete( + resourceGroupName, + serviceName, + apiId, + resolverId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGraphQlApiResolver(); + apiManagementDeleteGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts index b731793feb11..b48ca61698d2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolver.json */ async function apiManagementHeadGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const resolverId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.getEntityTag( + resourceGroupName, + serviceName, + apiId, + resolverId + ); + console.log(result); } async function main() { - apiManagementHeadGraphQlApiResolver(); + apiManagementHeadGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts index 465795df47aa..52775601a59c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the GraphQL API Resolver specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json */ async function apiManagementGetGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.get( - resourceGroupName, - serviceName, - apiId, - resolverId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const resolverId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.get( + resourceGroupName, + serviceName, + apiId, + resolverId + ); + console.log(result); } async function main() { - apiManagementGetGraphQlApiResolver(); + apiManagementGetGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts index 214ff987de36..a2275abefd88 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the resolvers for the specified GraphQL API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolvers.json */ async function apiManagementListGraphQlApiResolvers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.graphQLApiResolver.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.graphQLApiResolver.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGraphQlApiResolvers(); + apiManagementListGraphQlApiResolvers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts index a5d83821ea5a..f935e1d885bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the GraphQL API Resolver level. @@ -25,39 +23,39 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json */ async function apiManagementCreateGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const resolverId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - 'GET/api/users' - }; - const options: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams = { - ifMatch - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const resolverId = "5600b57e7e8880006a080001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + 'GET/api/users' + }; + const options: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams = { + ifMatch + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateGraphQlApiResolverPolicy(); + apiManagementCreateGraphQlApiResolverPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts index 8d1d88254c10..c008ddf275d5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the GraphQL Api Resolver. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json */ async function apiManagementDeleteGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const resolverId = "testResolver"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "testapi"; + const resolverId = "testResolver"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.delete( + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGraphQlApiResolverPolicy(); + apiManagementDeleteGraphQlApiResolverPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts index 9833f1305764..132e4e42a0d1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json */ async function apiManagementHeadGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const resolverId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadGraphQlApiResolverPolicy(); + apiManagementHeadGraphQlApiResolverPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts index 97caed6b595f..1009e6732d6c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the GraphQL API Resolver level. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json */ async function apiManagementGetGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.get( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const resolverId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.get( + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetGraphQlApiResolverPolicy(); + apiManagementGetGraphQlApiResolverPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts index d5197b45a4a2..c0cd57b20e7b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the list of policy configuration at the GraphQL API Resolver level. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolverPolicies.json */ async function apiManagementListGraphQlApiResolverPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const resolverId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.graphQLApiResolverPolicy.listByResolver( - resourceGroupName, - serviceName, - apiId, - resolverId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "599e2953193c3c0bd0b3e2fa"; + const resolverId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.graphQLApiResolverPolicy.listByResolver( + resourceGroupName, + serviceName, + apiId, + resolverId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGraphQlApiResolverPolicies(); + apiManagementListGraphQlApiResolverPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts index 8f314c52b3b0..daa4d9f2b8a3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ResolverUpdateContract, - ApiManagementClient + ApiManagementClient, + ResolverUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the resolver in the GraphQL API specified by its identifier. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGraphQLApiResolver.json */ async function apiManagementUpdateGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const resolverId = "resolverId"; - const ifMatch = "*"; - const parameters: ResolverUpdateContract = { - path: "Query/adminUsers", - description: "A GraphQL Resolver example", - displayName: "Query AdminUsers" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.update( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const resolverId = "resolverId"; + const ifMatch = "*"; + const parameters: ResolverUpdateContract = { + path: "Query/adminUsers", + description: "A GraphQL Resolver example", + displayName: "Query AdminUsers" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.update( + resourceGroupName, + serviceName, + apiId, + resolverId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateGraphQlApiResolver(); + apiManagementUpdateGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts index 9f2b325d87e5..6c172c1f05e8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GroupCreateParameters, - ApiManagementClient + ApiManagementClient, + GroupCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a group. @@ -24,22 +22,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroup.json */ async function apiManagementCreateGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const parameters: GroupCreateParameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "tempgroup"; + const parameters: GroupCreateParameters = { displayName: "temp group" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.createOrUpdate( + resourceGroupName, + serviceName, + groupId, + parameters + ); + console.log(result); } /** @@ -49,33 +47,33 @@ async function apiManagementCreateGroup() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupExternal.json */ async function apiManagementCreateGroupExternal() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const parameters: GroupCreateParameters = { - type: "external", - description: "new group to test", - displayName: "NewGroup (samiraad.onmicrosoft.com)", - externalId: - "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "aadGroup"; + const parameters: GroupCreateParameters = { + type: "external", + description: "new group to test", + displayName: "NewGroup (samiraad.onmicrosoft.com)", + externalId: + "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.createOrUpdate( + resourceGroupName, + serviceName, + groupId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGroup(); - apiManagementCreateGroupExternal(); + apiManagementCreateGroup(); + apiManagementCreateGroupExternal(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts index 48247657e14d..0dbc9e93ac37 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific group of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroup.json */ async function apiManagementDeleteGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.delete( - resourceGroupName, - serviceName, - groupId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "aadGroup"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.delete( + resourceGroupName, + serviceName, + groupId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGroup(); + apiManagementDeleteGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts index a68c30cc8bfa..2a928af3a011 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroup.json */ async function apiManagementHeadGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.getEntityTag( - resourceGroupName, - serviceName, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.getEntityTag( + resourceGroupName, + serviceName, + groupId + ); + console.log(result); } async function main() { - apiManagementHeadGroup(); + apiManagementHeadGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts index 954018f98006..2514d2935698 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the group specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json */ async function apiManagementGetGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.get( - resourceGroupName, - serviceName, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.get( + resourceGroupName, + serviceName, + groupId + ); + console.log(result); } async function main() { - apiManagementGetGroup(); + apiManagementGetGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts index 898b9bd81891..e0e07c28be7e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of groups defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroups.json */ async function apiManagementListGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.group.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.group.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGroups(); + apiManagementListGroups(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts index 0b10d48bb5f0..84c36923ea92 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GroupUpdateParameters, - ApiManagementClient + ApiManagementClient, + GroupUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the group specified by its identifier. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGroup.json */ async function apiManagementUpdateGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const ifMatch = "*"; - const parameters: GroupUpdateParameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.update( - resourceGroupName, - serviceName, - groupId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "tempgroup"; + const ifMatch = "*"; + const parameters: GroupUpdateParameters = { displayName: "temp group" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.update( + resourceGroupName, + serviceName, + groupId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateGroup(); + apiManagementUpdateGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts index 80e1301ef726..e2adcd467b1f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroupUser.json */ async function apiManagementHeadGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.checkEntityExists( - resourceGroupName, - serviceName, - groupId, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "59306a29e4bbd510dc24e5f9"; + const userId = "5931a75ae4bbd512a88c680b"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.groupUser.checkEntityExists( + resourceGroupName, + serviceName, + groupId, + userId + ); + console.log(result); } async function main() { - apiManagementHeadGroupUser(); + apiManagementHeadGroupUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts index 478e1258ad62..9a8ce2443238 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Add existing user to existing group @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupUser.json */ async function apiManagementCreateGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.create( - resourceGroupName, - serviceName, - groupId, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "tempgroup"; + const userId = "59307d350af58404d8a26300"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.groupUser.create( + resourceGroupName, + serviceName, + groupId, + userId + ); + console.log(result); } async function main() { - apiManagementCreateGroupUser(); + apiManagementCreateGroupUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts index 0eaf12e68670..a281041716f7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Remove existing user from existing group. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroupUser.json */ async function apiManagementDeleteGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "templategroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.delete( - resourceGroupName, - serviceName, - groupId, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "templategroup"; + const userId = "59307d350af58404d8a26300"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.groupUser.delete( + resourceGroupName, + serviceName, + groupId, + userId + ); + console.log(result); } async function main() { - apiManagementDeleteGroupUser(); + apiManagementDeleteGroupUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts index fd400a0f3b46..e994361dc1fd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of user entities associated with the group. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroupUsers.json */ async function apiManagementListGroupUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.groupUser.list( - resourceGroupName, - serviceName, - groupId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.groupUser.list( + resourceGroupName, + serviceName, + groupId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGroupUsers(); + apiManagementListGroupUsers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts index ecfeceb3981f..97ab9676ff0c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IdentityProviderCreateContract, - ApiManagementClient + ApiManagementClient, + IdentityProviderCreateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates the IdentityProvider configuration. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateIdentityProvider.json */ async function apiManagementCreateIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const parameters: IdentityProviderCreateContract = { - clientId: "facebookid", - clientSecret: "facebookapplicationsecret" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.createOrUpdate( - resourceGroupName, - serviceName, - identityProviderName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "facebook"; + const parameters: IdentityProviderCreateContract = { + clientId: "facebookid", + clientSecret: "facebookapplicationsecret" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.createOrUpdate( + resourceGroupName, + serviceName, + identityProviderName, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateIdentityProvider(); + apiManagementCreateIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts index 71a8daa2cbde..7b77aaa72089 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified identity provider configuration. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteIdentityProvider.json */ async function apiManagementDeleteIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aad"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.delete( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "aad"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.delete( + resourceGroupName, + serviceName, + identityProviderName, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteIdentityProvider(); + apiManagementDeleteIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts index 09632aa479ab..608737f7fe00 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the identityProvider specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadIdentityProvider.json */ async function apiManagementHeadIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.getEntityTag( - resourceGroupName, - serviceName, - identityProviderName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "aadB2C"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.getEntityTag( + resourceGroupName, + serviceName, + identityProviderName + ); + console.log(result); } async function main() { - apiManagementHeadIdentityProvider(); + apiManagementHeadIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts index 8b752758b132..72caa0f963f7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the configuration details of the identity Provider configured in specified service instance. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json */ async function apiManagementGetIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.get( - resourceGroupName, - serviceName, - identityProviderName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "aadB2C"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.get( + resourceGroupName, + serviceName, + identityProviderName + ); + console.log(result); } async function main() { - apiManagementGetIdentityProvider(); + apiManagementGetIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts index 5bb324ed67cf..b7ce25de18fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of Identity Provider configured in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIdentityProviders.json */ async function apiManagementListIdentityProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.identityProvider.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.identityProvider.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListIdentityProviders(); + apiManagementListIdentityProviders(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts index 70a322ad24bf..694c3524ed93 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the Identity Provider. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementIdentityProviderListSecrets.json */ async function apiManagementIdentityProviderListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.listSecrets( - resourceGroupName, - serviceName, - identityProviderName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "aadB2C"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.listSecrets( + resourceGroupName, + serviceName, + identityProviderName + ); + console.log(result); } async function main() { - apiManagementIdentityProviderListSecrets(); + apiManagementIdentityProviderListSecrets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts index 0baf25c1a6bb..852d94346ff6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IdentityProviderUpdateParameters, - ApiManagementClient + ApiManagementClient, + IdentityProviderUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing IdentityProvider configuration. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateIdentityProvider.json */ async function apiManagementUpdateIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const ifMatch = "*"; - const parameters: IdentityProviderUpdateParameters = { - clientId: "updatedfacebookid", - clientSecret: "updatedfacebooksecret" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.update( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "facebook"; + const ifMatch = "*"; + const parameters: IdentityProviderUpdateParameters = { + clientId: "updatedfacebookid", + clientSecret: "updatedfacebooksecret" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.update( + resourceGroupName, + serviceName, + identityProviderName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateIdentityProvider(); + apiManagementUpdateIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts index 9402037685c9..1de2e06c98dc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets API Management issue details @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json */ async function apiManagementGetIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.issue.get( - resourceGroupName, - serviceName, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.issue.get( + resourceGroupName, + serviceName, + issueId + ); + console.log(result); } async function main() { - apiManagementGetIssue(); + apiManagementGetIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts index e03dde4ead14..392e59822662 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of issues in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIssues.json */ async function apiManagementListIssues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.issue.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.issue.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListIssues(); + apiManagementListIssues(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts index c3c5cb5ef180..eb78000d52fc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { LoggerContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, LoggerContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a logger. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAILogger.json */ async function apiManagementCreateAiLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const parameters: LoggerContract = { - description: "adding a new logger", - credentials: { instrumentationKey: "11................a1" }, - loggerType: "applicationInsights" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "loggerId"; + const parameters: LoggerContract = { + description: "adding a new logger", + credentials: { instrumentationKey: "11................a1" }, + loggerType: "applicationInsights" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate( + resourceGroupName, + serviceName, + loggerId, + parameters + ); + console.log(result); } /** @@ -50,35 +48,35 @@ async function apiManagementCreateAiLogger() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateEHLogger.json */ async function apiManagementCreateEhLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const parameters: LoggerContract = { - description: "adding a new logger", - credentials: { - name: "hydraeventhub", - connectionString: - "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=" - }, - loggerType: "azureEventHub" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "eh1"; + const parameters: LoggerContract = { + description: "adding a new logger", + credentials: { + name: "hydraeventhub", + connectionString: + "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=" + }, + loggerType: "azureEventHub" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate( + resourceGroupName, + serviceName, + loggerId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAiLogger(); - apiManagementCreateEhLogger(); + apiManagementCreateAiLogger(); + apiManagementCreateEhLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts index 14c89372bfbb..737d1be913e6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified logger. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteLogger.json */ async function apiManagementDeleteLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.delete( - resourceGroupName, - serviceName, - loggerId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "loggerId"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.delete( + resourceGroupName, + serviceName, + loggerId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteLogger(); + apiManagementDeleteLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts index c2efb9adfe7f..db93db4e2683 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadLogger.json */ async function apiManagementHeadLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.getEntityTag( - resourceGroupName, - serviceName, - loggerId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "templateLogger"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.getEntityTag( + resourceGroupName, + serviceName, + loggerId + ); + console.log(result); } async function main() { - apiManagementHeadLogger(); + apiManagementHeadLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts index 319d80a96ad3..898d846846b3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the logger specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json */ async function apiManagementGetLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.get( - resourceGroupName, - serviceName, - loggerId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "templateLogger"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.get( + resourceGroupName, + serviceName, + loggerId + ); + console.log(result); } async function main() { - apiManagementGetLogger(); + apiManagementGetLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts index 8e8d29247d7d..05562b8132fa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of loggers in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListLoggers.json */ async function apiManagementListLoggers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.logger.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.logger.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListLoggers(); + apiManagementListLoggers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts index 7bec1a7e2aed..2fd80f8530f7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - LoggerUpdateContract, - ApiManagementClient + ApiManagementClient, + LoggerUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing logger. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateLogger.json */ async function apiManagementUpdateLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const ifMatch = "*"; - const parameters: LoggerUpdateContract = { - description: "updating description", - loggerType: "azureEventHub" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.update( - resourceGroupName, - serviceName, - loggerId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "eh1"; + const ifMatch = "*"; + const parameters: LoggerUpdateContract = { + description: "updating description", + loggerType: "azureEventHub" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.update( + resourceGroupName, + serviceName, + loggerId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateLogger(); + apiManagementUpdateLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts index b664bf11298b..857f544ebf90 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - NamedValueCreateContract, - ApiManagementClient + ApiManagementClient, + NamedValueCreateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates named value. @@ -24,27 +22,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValue.json */ async function apiManagementCreateNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const parameters: NamedValueCreateContract = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar"], - value: "propValue" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop2"; + const parameters: NamedValueCreateContract = { + displayName: "prop3name", + secret: false, + tags: ["foo", "bar"], + value: "propValue" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + namedValueId, + parameters + ); + console.log(result); } /** @@ -54,35 +52,35 @@ async function apiManagementCreateNamedValue() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValueWithKeyVault.json */ async function apiManagementCreateNamedValueWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; - const parameters: NamedValueCreateContract = { - displayName: "prop6namekv", - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret" - }, - secret: true, - tags: ["foo", "bar"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop6"; + const parameters: NamedValueCreateContract = { + displayName: "prop6namekv", + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret" + }, + secret: true, + tags: ["foo", "bar"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + namedValueId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateNamedValue(); - apiManagementCreateNamedValueWithKeyVault(); + apiManagementCreateNamedValue(); + apiManagementCreateNamedValueWithKeyVault(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts index c912a4917fb8..4e7dde7462c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific named value from the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNamedValue.json */ async function apiManagementDeleteNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.delete( - resourceGroupName, - serviceName, - namedValueId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop2"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.delete( + resourceGroupName, + serviceName, + namedValueId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteNamedValue(); + apiManagementDeleteNamedValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts index 684c6668907c..c06dfb552dc6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNamedValue.json */ async function apiManagementHeadNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.getEntityTag( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testarmTemplateproperties2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.getEntityTag( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } async function main() { - apiManagementHeadNamedValue(); + apiManagementHeadNamedValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts index 5d09d87343c4..5101b22fa34c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the named value specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json */ async function apiManagementGetNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testarmTemplateproperties2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.get( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } /** @@ -44,25 +42,25 @@ async function apiManagementGetNamedValue() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json */ async function apiManagementGetNamedValueWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop6"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.get( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } async function main() { - apiManagementGetNamedValue(); - apiManagementGetNamedValueWithKeyVault(); + apiManagementGetNamedValue(); + apiManagementGetNamedValueWithKeyVault(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts index e05a515d0cd9..0cc93ee74850 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of named values defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNamedValues.json */ async function apiManagementListNamedValues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.namedValue.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.namedValue.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListNamedValues(); + apiManagementListNamedValues(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts index 7315ca2e36fd..413affbf42e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the secret of the named value specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementNamedValueListValue.json */ async function apiManagementNamedValueListValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.listValue( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testarmTemplateproperties2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.listValue( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } async function main() { - apiManagementNamedValueListValue(); + apiManagementNamedValueListValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts index d8b65d0629f4..9765d1f0bc08 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshNamedValue.json */ async function apiManagementRefreshNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginRefreshSecretAndWait( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.beginRefreshSecretAndWait( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } async function main() { - apiManagementRefreshNamedValue(); + apiManagementRefreshNamedValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts index 9fd0bbc236ff..4c0db3b69c8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - NamedValueUpdateParameters, - ApiManagementClient + ApiManagementClient, + NamedValueUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specific named value. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateNamedValue.json */ async function apiManagementUpdateNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const parameters: NamedValueUpdateParameters = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar2"], - value: "propValue" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop2"; + const ifMatch = "*"; + const parameters: NamedValueUpdateParameters = { + displayName: "prop3name", + secret: false, + tags: ["foo", "bar2"], + value: "propValue" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.beginUpdateAndWait( + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateNamedValue(); + apiManagementUpdateNamedValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts index dcbf086b6585..e886a47bcf8b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json */ async function apiManagementServiceGetNetworkStatusByLocation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const locationName = "North Central US"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.networkStatus.listByLocation( - resourceGroupName, - serviceName, - locationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const locationName = "North Central US"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.networkStatus.listByLocation( + resourceGroupName, + serviceName, + locationName + ); + console.log(result); } async function main() { - apiManagementServiceGetNetworkStatusByLocation(); + apiManagementServiceGetNetworkStatusByLocation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts index 48fb6a23d155..1f3be805dcbb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatus.json */ async function apiManagementServiceGetNetworkStatus() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.networkStatus.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.networkStatus.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetNetworkStatus(); + apiManagementServiceGetNetworkStatus(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts index 95fa2dd5381c..ee7ebba9db67 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update API Management publisher notification. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotification.json */ async function apiManagementCreateNotification() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notification.createOrUpdate( - resourceGroupName, - serviceName, - notificationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notification.createOrUpdate( + resourceGroupName, + serviceName, + notificationName + ); + console.log(result); } async function main() { - apiManagementCreateNotification(); + apiManagementCreateNotification(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts index 2a08272429b9..576796025da6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Notification specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json */ async function apiManagementGetNotification() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notification.get( - resourceGroupName, - serviceName, - notificationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notification.get( + resourceGroupName, + serviceName, + notificationName + ); + console.log(result); } async function main() { - apiManagementGetNotification(); + apiManagementGetNotification(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts index 95e627c3ccee..a018938d3112 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of properties defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotifications.json */ async function apiManagementListNotifications() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.notification.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.notification.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListNotifications(); + apiManagementListNotifications(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts index 4441a393355a..9a214db8833e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientEmail.json */ async function apiManagementHeadNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - email - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const email = "contoso@live.com"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.checkEntityExists( + resourceGroupName, + serviceName, + notificationName, + email + ); + console.log(result); } async function main() { - apiManagementHeadNotificationRecipientEmail(); + apiManagementHeadNotificationRecipientEmail(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts index 023934f6b822..dc7406a4a48c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientEmail.json */ async function apiManagementCreateNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "foobar@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - email - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const email = "foobar@live.com"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.createOrUpdate( + resourceGroupName, + serviceName, + notificationName, + email + ); + console.log(result); } async function main() { - apiManagementCreateNotificationRecipientEmail(); + apiManagementCreateNotificationRecipientEmail(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts index 50dfa04d1459..7ee3a5319a4d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the email from the list of Notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientEmail.json */ async function apiManagementDeleteNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.delete( - resourceGroupName, - serviceName, - notificationName, - email - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const email = "contoso@live.com"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.delete( + resourceGroupName, + serviceName, + notificationName, + email + ); + console.log(result); } async function main() { - apiManagementDeleteNotificationRecipientEmail(); + apiManagementDeleteNotificationRecipientEmail(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts index 9fff72cb91b0..ed238365d6e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientEmails.json */ async function apiManagementListNotificationRecipientEmails() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.listByNotification( - resourceGroupName, - serviceName, - notificationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.listByNotification( + resourceGroupName, + serviceName, + notificationName + ); + console.log(result); } async function main() { - apiManagementListNotificationRecipientEmails(); + apiManagementListNotificationRecipientEmails(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts index bb3198fff996..b084c3c76077 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientUser.json */ async function apiManagementHeadNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const userId = "576823d0a40f7e74ec07d642"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.checkEntityExists( + resourceGroupName, + serviceName, + notificationName, + userId + ); + console.log(result); } async function main() { - apiManagementHeadNotificationRecipientUser(); + apiManagementHeadNotificationRecipientUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts index ecd636d6d144..6e503a485e02 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientUser.json */ async function apiManagementCreateNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const userId = "576823d0a40f7e74ec07d642"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.createOrUpdate( + resourceGroupName, + serviceName, + notificationName, + userId + ); + console.log(result); } async function main() { - apiManagementCreateNotificationRecipientUser(); + apiManagementCreateNotificationRecipientUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts index 4b9a9cffdc73..12c02278e707 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the API Management user from the list of Notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientUser.json */ async function apiManagementDeleteNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.delete( - resourceGroupName, - serviceName, - notificationName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const userId = "576823d0a40f7e74ec07d642"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.delete( + resourceGroupName, + serviceName, + notificationName, + userId + ); + console.log(result); } async function main() { - apiManagementDeleteNotificationRecipientUser(); + apiManagementDeleteNotificationRecipientUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts index 896b3fa1229d..f2e06208652b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientUsers.json */ async function apiManagementListNotificationRecipientUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.listByNotification( - resourceGroupName, - serviceName, - notificationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.listByNotification( + resourceGroupName, + serviceName, + notificationName + ); + console.log(result); } async function main() { - apiManagementListNotificationRecipientUsers(); + apiManagementListNotificationRecipientUsers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts index d3b7b73512a3..dfd42088f4be 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OpenidConnectProviderContract, - ApiManagementClient + ApiManagementClient, + OpenidConnectProviderContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the OpenID Connect Provider. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateOpenIdConnectProvider.json */ async function apiManagementCreateOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const parameters: OpenidConnectProviderContract = { - clientId: "oidprovidertemplate3", - clientSecret: "x", - displayName: "templateoidprovider3", - metadataEndpoint: "https://oidprovider-template3.net", - useInApiDocumentation: true, - useInTestConsole: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.createOrUpdate( - resourceGroupName, - serviceName, - opid, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect3"; + const parameters: OpenidConnectProviderContract = { + clientId: "oidprovidertemplate3", + clientSecret: "x", + displayName: "templateoidprovider3", + metadataEndpoint: "https://oidprovider-template3.net", + useInApiDocumentation: true, + useInTestConsole: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.createOrUpdate( + resourceGroupName, + serviceName, + opid, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateOpenIdConnectProvider(); + apiManagementCreateOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts index 851ef6e96bae..682318708865 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific OpenID Connect Provider of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteOpenIdConnectProvider.json */ async function apiManagementDeleteOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.delete( - resourceGroupName, - serviceName, - opid, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect3"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.delete( + resourceGroupName, + serviceName, + opid, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteOpenIdConnectProvider(); + apiManagementDeleteOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts index 3fad780de809..cd4c39000143 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadOpenIdConnectProvider.json */ async function apiManagementHeadOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.getEntityTag( - resourceGroupName, - serviceName, - opid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.getEntityTag( + resourceGroupName, + serviceName, + opid + ); + console.log(result); } async function main() { - apiManagementHeadOpenIdConnectProvider(); + apiManagementHeadOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts index d5b66b9273cf..0661b2eb43bb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets specific OpenID Connect Provider without secrets. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json */ async function apiManagementGetOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.get( - resourceGroupName, - serviceName, - opid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.get( + resourceGroupName, + serviceName, + opid + ); + console.log(result); } async function main() { - apiManagementGetOpenIdConnectProvider(); + apiManagementGetOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts index 12ffc8b82acb..97147ee4145d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists of all the OpenId Connect Providers. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOpenIdConnectProviders.json */ async function apiManagementListOpenIdConnectProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.openIdConnectProvider.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.openIdConnectProvider.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListOpenIdConnectProviders(); + apiManagementListOpenIdConnectProviders(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts index d95e052fdf92..b2528e2925b4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the OpenID Connect Provider. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementOpenidConnectProviderListSecrets.json */ async function apiManagementOpenidConnectProviderListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.listSecrets( - resourceGroupName, - serviceName, - opid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.listSecrets( + resourceGroupName, + serviceName, + opid + ); + console.log(result); } async function main() { - apiManagementOpenidConnectProviderListSecrets(); + apiManagementOpenidConnectProviderListSecrets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts index fd234805fd9b..e22cc390e0fc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OpenidConnectProviderUpdateContract, - ApiManagementClient + ApiManagementClient, + OpenidConnectProviderUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specific OpenID Connect Provider. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateOpenIdConnectProvider.json */ async function apiManagementUpdateOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const ifMatch = "*"; - const parameters: OpenidConnectProviderUpdateContract = { - clientSecret: "updatedsecret", - useInApiDocumentation: true, - useInTestConsole: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.update( - resourceGroupName, - serviceName, - opid, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect2"; + const ifMatch = "*"; + const parameters: OpenidConnectProviderUpdateContract = { + clientSecret: "updatedsecret", + useInApiDocumentation: true, + useInTestConsole: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.update( + resourceGroupName, + serviceName, + opid, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateOpenIdConnectProvider(); + apiManagementUpdateOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts index dc1f21a02321..00a4c1fb98d4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of operations associated with tags. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationsByTags.json */ async function apiManagementListApiOperationsByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operationOperations.listByTags( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operationOperations.listByTags( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiOperationsByTags(); + apiManagementListApiOperationsByTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts index 7898f0ffe380..4fa310ba6646 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the network endpoints of all outbound dependencies of a ApiManagement service. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json */ async function apiManagementServiceGetOutboundNetworkDependenciesEndpoints() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.outboundNetworkDependenciesEndpoints.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.outboundNetworkDependenciesEndpoints.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetOutboundNetworkDependenciesEndpoints(); + apiManagementServiceGetOutboundNetworkDependenciesEndpoints(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts index 76d71f8fae04..86432bf43022 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ConnectivityCheckRequest, - ApiManagementClient + ApiManagementClient, + ConnectivityCheckRequest } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json */ async function httpConnectivityCheck() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams: ConnectivityCheckRequest = { - destination: { address: "https://microsoft.com", port: 3306 }, - protocolConfiguration: { - httpConfiguration: { - method: "GET", - headers: [{ name: "Authorization", value: "******" }], - validStatusCodes: [200, 204] - } - }, - source: { region: "northeurope" }, - protocol: "HTTPS" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const connectivityCheckRequestParams: ConnectivityCheckRequest = { + destination: { address: "https://microsoft.com", port: 3306 }, + protocolConfiguration: { + httpConfiguration: { + method: "GET", + headers: [{ name: "Authorization", value: "******" }], + validStatusCodes: [200, 204] + } + }, + source: { region: "northeurope" }, + protocol: "HTTPS" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.beginPerformConnectivityCheckAsyncAndWait( + resourceGroupName, + serviceName, + connectivityCheckRequestParams + ); + console.log(result); } /** @@ -58,29 +56,29 @@ async function httpConnectivityCheck() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheck.json */ async function tcpConnectivityCheck() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams: ConnectivityCheckRequest = { - destination: { address: "8.8.8.8", port: 53 }, - preferredIPVersion: "IPv4", - source: { region: "northeurope" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const connectivityCheckRequestParams: ConnectivityCheckRequest = { + destination: { address: "8.8.8.8", port: 53 }, + preferredIPVersion: "IPv4", + source: { region: "northeurope" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.beginPerformConnectivityCheckAsyncAndWait( + resourceGroupName, + serviceName, + connectivityCheckRequestParams + ); + console.log(result); } async function main() { - httpConnectivityCheck(); - tcpConnectivityCheck(); + httpConnectivityCheck(); + tcpConnectivityCheck(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts index f625c32d2ff8..7b3a61be14a8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the global policy configuration of the Api Management service. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicy.json */ async function apiManagementCreatePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const parameters: PolicyContract = { - format: "xml", - value: - "\r\n \r\n \r\n \r\n \r\n \r\n" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.createOrUpdate( - resourceGroupName, - serviceName, - policyId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const parameters: PolicyContract = { + format: "xml", + value: + "\r\n \r\n \r\n \r\n \r\n \r\n" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.createOrUpdate( + resourceGroupName, + serviceName, + policyId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreatePolicy(); + apiManagementCreatePolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts index 69985f3c563d..f79c89ab0bee 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the global policy configuration of the Api Management Service. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicy.json */ async function apiManagementDeletePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.delete( - resourceGroupName, - serviceName, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.delete( + resourceGroupName, + serviceName, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeletePolicy(); + apiManagementDeletePolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts index 4ae78b0f8e5b..674f904f93d9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyDescriptionListByServiceOptionalParams, - ApiManagementClient + ApiManagementClient, + PolicyDescriptionListByServiceOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all policy descriptions. @@ -24,25 +22,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyDescriptions.json */ async function apiManagementListPolicyDescriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const scope = "Api"; - const options: PolicyDescriptionListByServiceOptionalParams = { scope }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyDescription.listByService( - resourceGroupName, - serviceName, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const scope = "Api"; + const options: PolicyDescriptionListByServiceOptionalParams = { scope }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyDescription.listByService( + resourceGroupName, + serviceName, + options + ); + console.log(result); } async function main() { - apiManagementListPolicyDescriptions(); + apiManagementListPolicyDescriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts index d703b1724e37..abf8dbcf25bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyFragmentContract, - ApiManagementClient + ApiManagementClient, + PolicyFragmentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates a policy fragment. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicyFragment.json */ async function apiManagementCreatePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const parameters: PolicyFragmentContract = { - format: "xml", - description: "A policy fragment example", - value: - '' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - id, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const parameters: PolicyFragmentContract = { + format: "xml", + description: "A policy fragment example", + value: + '' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + id, + parameters + ); + console.log(result); } async function main() { - apiManagementCreatePolicy(); + apiManagementCreatePolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts index 8f6a6cdd6606..362cd6601fcb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a policy fragment. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicyFragment.json */ async function apiManagementDeletePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.delete( - resourceGroupName, - serviceName, - id, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.delete( + resourceGroupName, + serviceName, + id, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeletePolicy(); + apiManagementDeletePolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts index cdc2c3e3c213..50e58078467d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicyFragment.json */ async function apiManagementHeadPolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.getEntityTag( - resourceGroupName, - serviceName, - id - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.getEntityTag( + resourceGroupName, + serviceName, + id + ); + console.log(result); } async function main() { - apiManagementHeadPolicyFragment(); + apiManagementHeadPolicyFragment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts index 19083d34fdcc..dd2d30cbc7ad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyFragmentGetOptionalParams, - ApiManagementClient + ApiManagementClient, + PolicyFragmentGetOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a policy fragment. @@ -24,20 +22,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json */ async function apiManagementGetPolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get( - resourceGroupName, - serviceName, - id - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.get( + resourceGroupName, + serviceName, + id + ); + console.log(result); } /** @@ -47,28 +45,28 @@ async function apiManagementGetPolicyFragment() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json */ async function apiManagementGetPolicyFragmentFormat() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const format = "rawxml"; - const options: PolicyFragmentGetOptionalParams = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get( - resourceGroupName, - serviceName, - id, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const format = "rawxml"; + const options: PolicyFragmentGetOptionalParams = { format }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.get( + resourceGroupName, + serviceName, + id, + options + ); + console.log(result); } async function main() { - apiManagementGetPolicyFragment(); - apiManagementGetPolicyFragmentFormat(); + apiManagementGetPolicyFragment(); + apiManagementGetPolicyFragmentFormat(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts index 353baac0c7c2..b5461cfcdf16 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all policy fragments. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragments.json */ async function apiManagementListPolicyFragments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPolicyFragments(); + apiManagementListPolicyFragments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts index 2915136023ac..b3098acf63fd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists policy resources that reference the policy fragment. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragmentReferences.json */ async function apiManagementListPolicyFragmentReferences() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.listReferences( - resourceGroupName, - serviceName, - id - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.listReferences( + resourceGroupName, + serviceName, + id + ); + console.log(result); } async function main() { - apiManagementListPolicyFragmentReferences(); + apiManagementListPolicyFragmentReferences(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts index 9db6f475ac6c..b9741d434253 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Global policy definition in the Api Management service. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicy.json */ async function apiManagementHeadPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.getEntityTag( - resourceGroupName, - serviceName, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.getEntityTag( + resourceGroupName, + serviceName, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadPolicy(); + apiManagementHeadPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts index 7d7a1ace58ce..86ca99661b65 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyGetOptionalParams, - ApiManagementClient + ApiManagementClient, + PolicyGetOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the Global policy definition of the Api Management service. @@ -24,20 +22,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json */ async function apiManagementGetPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get( - resourceGroupName, - serviceName, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.get( + resourceGroupName, + serviceName, + policyId + ); + console.log(result); } /** @@ -47,28 +45,28 @@ async function apiManagementGetPolicy() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json */ async function apiManagementGetPolicyFormat() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const format = "rawxml"; - const options: PolicyGetOptionalParams = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get( - resourceGroupName, - serviceName, - policyId, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const format = "rawxml"; + const options: PolicyGetOptionalParams = { format }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.get( + resourceGroupName, + serviceName, + policyId, + options + ); + console.log(result); } async function main() { - apiManagementGetPolicy(); - apiManagementGetPolicyFormat(); + apiManagementGetPolicy(); + apiManagementGetPolicyFormat(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts index 8d8b7608c482..3c8c39bdedbb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the Global Policy definitions of the Api Management service. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicies.json */ async function apiManagementListPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPolicies(); + apiManagementListPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts index 4f96bd2686ef..098fdc1abbe6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalConfigContract, - ApiManagementClient + ApiManagementClient, + PortalConfigContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update the developer portal configuration. @@ -24,49 +22,49 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalConfig.json */ async function apiManagementCreatePortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters: PortalConfigContract = { - cors: { allowedOrigins: ["https://contoso.com"] }, - csp: { - allowedSources: ["*.contoso.com"], - mode: "reportOnly", - reportUri: ["https://report.contoso.com"] - }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined - }, - enableBasicAuth: true, - signin: { require: false }, - signup: { - termsOfService: { - requireConsent: false, - text: "I agree to the service terms and conditions." - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.createOrUpdate( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalConfigId = "default"; + const ifMatch = "*"; + const parameters: PortalConfigContract = { + cors: { allowedOrigins: ["https://contoso.com"] }, + csp: { + allowedSources: ["*.contoso.com"], + mode: "reportOnly", + reportUri: ["https://report.contoso.com"] + }, + delegation: { + delegateRegistration: false, + delegateSubscription: false, + delegationUrl: undefined, + validationKey: undefined + }, + enableBasicAuth: true, + signin: { require: false }, + signup: { + termsOfService: { + requireConsent: false, + text: "I agree to the service terms and conditions." + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.createOrUpdate( + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementCreatePortalConfig(); + apiManagementCreatePortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts index ce2436ba1b65..80faeb2f4d8e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the developer portal configuration. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalConfig.json */ async function apiManagementHeadPortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.getEntityTag( - resourceGroupName, - serviceName, - portalConfigId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalConfigId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.getEntityTag( + resourceGroupName, + serviceName, + portalConfigId + ); + console.log(result); } async function main() { - apiManagementHeadPortalConfig(); + apiManagementHeadPortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts index 5463fc5e330b..1df7b9c62951 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the developer portal configuration. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json */ async function apiManagementPortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.get( - resourceGroupName, - serviceName, - portalConfigId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalConfigId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.get( + resourceGroupName, + serviceName, + portalConfigId + ); + console.log(result); } async function main() { - apiManagementPortalConfig(); + apiManagementPortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts index 39148724a093..198e5c5922e6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the developer portal configurations. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalConfig.json */ async function apiManagementListPortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPortalConfig(); + apiManagementListPortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts index f46de1dcd5d3..f2f6a967d6cb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalConfigContract, - ApiManagementClient + ApiManagementClient, + PortalConfigContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update the developer portal configuration. @@ -24,49 +22,49 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalConfig.json */ async function apiManagementUpdatePortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters: PortalConfigContract = { - cors: { allowedOrigins: ["https://contoso.com"] }, - csp: { - allowedSources: ["*.contoso.com"], - mode: "reportOnly", - reportUri: ["https://report.contoso.com"] - }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined - }, - enableBasicAuth: true, - signin: { require: false }, - signup: { - termsOfService: { - requireConsent: false, - text: "I agree to the service terms and conditions." - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.update( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalConfigId = "default"; + const ifMatch = "*"; + const parameters: PortalConfigContract = { + cors: { allowedOrigins: ["https://contoso.com"] }, + csp: { + allowedSources: ["*.contoso.com"], + mode: "reportOnly", + reportUri: ["https://report.contoso.com"] + }, + delegation: { + delegateRegistration: false, + delegateSubscription: false, + delegationUrl: undefined, + validationKey: undefined + }, + enableBasicAuth: true, + signin: { require: false }, + signup: { + termsOfService: { + requireConsent: false, + text: "I agree to the service terms and conditions." + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.update( + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdatePortalConfig(); + apiManagementUpdatePortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts index 0246e008cac5..0f16bacfedfd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalRevisionContract, - ApiManagementClient + ApiManagementClient, + PortalRevisionContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalRevision.json */ async function apiManagementCreatePortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const parameters: PortalRevisionContract = { - description: "portal revision 1", - isCurrent: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalRevisionId = "20201112101010"; + const parameters: PortalRevisionContract = { + description: "portal revision 1", + isCurrent: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + portalRevisionId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreatePortalRevision(); + apiManagementCreatePortalRevision(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts index c731ded35a84..59dc37fe2138 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the developer portal revision specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalRevision.json */ async function apiManagementHeadPortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.getEntityTag( - resourceGroupName, - serviceName, - portalRevisionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalRevisionId = "20201112101010"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.getEntityTag( + resourceGroupName, + serviceName, + portalRevisionId + ); + console.log(result); } async function main() { - apiManagementHeadPortalRevision(); + apiManagementHeadPortalRevision(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts index 90ec6a242e8a..a90256803ed9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the developer portal's revision specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json */ async function apiManagementGetPortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.get( - resourceGroupName, - serviceName, - portalRevisionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalRevisionId = "20201112101010"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.get( + resourceGroupName, + serviceName, + portalRevisionId + ); + console.log(result); } async function main() { - apiManagementGetPortalRevision(); + apiManagementGetPortalRevision(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts index 8cf1e88339e6..53bc30849e42 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists developer portal's revisions. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalRevisions.json */ async function apiManagementListPortalRevisions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.portalRevision.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.portalRevision.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListPortalRevisions(); + apiManagementListPortalRevisions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts index 7e31dbff5bdf..9a58667c8a85 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalRevisionContract, - ApiManagementClient + ApiManagementClient, + PortalRevisionContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the description of specified portal revision or makes it current. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalRevision.json */ async function apiManagementUpdatePortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const ifMatch = "*"; - const parameters: PortalRevisionContract = { - description: "portal revision update", - isCurrent: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalRevisionId = "20201112101010"; + const ifMatch = "*"; + const parameters: PortalRevisionContract = { + description: "portal revision update", + isCurrent: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.beginUpdateAndWait( + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdatePortalRevision(); + apiManagementUpdatePortalRevision(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts index b16d6107ba68..681faa397c26 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of portalsettings defined within a service instance.. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalSettings.json */ async function apiManagementListPortalSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalSettings.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalSettings.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPortalSettings(); + apiManagementListPortalSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts index 808909204a6f..38bd884dd0f0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PrivateEndpointConnectionRequest, - ApiManagementClient + ApiManagementClient, + PrivateEndpointConnectionRequest } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Private Endpoint Connection or updates an existing one. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json */ async function apiManagementApproveOrRejectPrivateEndpointConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const privateEndpointConnectionRequest: PrivateEndpointConnectionRequest = { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", - properties: { - privateLinkServiceConnectionState: { - description: "The Private Endpoint Connection is approved.", - status: "Approved" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const privateEndpointConnectionName = "privateEndpointConnectionName"; + const privateEndpointConnectionRequest: PrivateEndpointConnectionRequest = { + id: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", + properties: { + privateLinkServiceConnectionState: { + description: "The Private Endpoint Connection is approved.", + status: "Approved" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest + ); + console.log(result); } async function main() { - apiManagementApproveOrRejectPrivateEndpointConnection(); + apiManagementApproveOrRejectPrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts index a0cc9313d7b5..4b204b2f160e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Private Endpoint Connection. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePrivateEndpointConnection.json */ async function apiManagementDeletePrivateEndpointConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.beginDeleteAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const privateEndpointConnectionName = "privateEndpointConnectionName"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.beginDeleteAndWait( + resourceGroupName, + serviceName, + privateEndpointConnectionName + ); + console.log(result); } async function main() { - apiManagementDeletePrivateEndpointConnection(); + apiManagementDeletePrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts index ed705263e493..88bd99ce9d93 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Private Endpoint Connection specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json */ async function apiManagementGetPrivateEndpointConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.getByName( - resourceGroupName, - serviceName, - privateEndpointConnectionName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const privateEndpointConnectionName = "privateEndpointConnectionName"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.getByName( + resourceGroupName, + serviceName, + privateEndpointConnectionName + ); + console.log(result); } async function main() { - apiManagementGetPrivateEndpointConnection(); + apiManagementGetPrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts index 10b6a4e2a268..dab9b8911de2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json */ async function apiManagementGetPrivateLinkGroupResource() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateLinkSubResourceName = "privateLinkSubResourceName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.getPrivateLinkResource( - resourceGroupName, - serviceName, - privateLinkSubResourceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const privateLinkSubResourceName = "privateLinkSubResourceName"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.getPrivateLinkResource( + resourceGroupName, + serviceName, + privateLinkSubResourceName + ); + console.log(result); } async function main() { - apiManagementGetPrivateLinkGroupResource(); + apiManagementGetPrivateLinkGroupResource(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts index 6527fddd32b9..6af25d653f5b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all private endpoint connections of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateEndpointConnections.json */ async function apiManagementListPrivateEndpointConnections() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateEndpointConnectionOperations.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndpointConnectionOperations.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListPrivateEndpointConnections(); + apiManagementListPrivateEndpointConnections(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts index 50bed1bc390c..cf5baff8dade 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateLinkGroupResources.json */ async function apiManagementListPrivateLinkGroupResources() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.listPrivateLinkResources( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.listPrivateLinkResources( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPrivateLinkGroupResources(); + apiManagementListPrivateLinkGroupResources(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts index 7e70371099cc..f7fbe62c05dc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Product entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductApi.json */ async function apiManagementHeadProductApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const apiId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.checkEntityExists( - resourceGroupName, - serviceName, - productId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5931a75ae4bbd512a88c680b"; + const apiId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApi.checkEntityExists( + resourceGroupName, + serviceName, + productId, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadProductApi(); + apiManagementHeadProductApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts index 9e15389960c7..f08981649173 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds an API to the specified product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductApi.json */ async function apiManagementCreateProductApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.createOrUpdate( - resourceGroupName, - serviceName, - productId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApi.createOrUpdate( + resourceGroupName, + serviceName, + productId, + apiId + ); + console.log(result); } async function main() { - apiManagementCreateProductApi(); + apiManagementCreateProductApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts index d404bc767db3..d1e7d0f043f2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API from the specified product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductApi.json */ async function apiManagementDeleteProductApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.delete( - resourceGroupName, - serviceName, - productId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApi.delete( + resourceGroupName, + serviceName, + productId, + apiId + ); + console.log(result); } async function main() { - apiManagementDeleteProductApi(); + apiManagementDeleteProductApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts index 53b66522bb8d..97a7b993d77a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the APIs associated with a product. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductApis.json */ async function apiManagementListProductApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5768181ea40f7eb6c49f6ac7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.productApi.listByProduct( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5768181ea40f7eb6c49f6ac7"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.productApi.listByProduct( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductApis(); + apiManagementListProductApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts index 6232d0b6ba2c..b04cd27d92ed 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ProductContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, ProductContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a product. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProduct.json */ async function apiManagementCreateProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const parameters: ProductContract = { - displayName: "Test Template ProductName 4" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const parameters: ProductContract = { + displayName: "Test Template ProductName 4" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.createOrUpdate( + resourceGroupName, + serviceName, + productId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateProduct(); + apiManagementCreateProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts index 241c237c9a47..43f4cf001843 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ProductDeleteOptionalParams, - ApiManagementClient + ApiManagementClient, + ProductDeleteOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete product. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProduct.json */ async function apiManagementDeleteProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const deleteSubscriptions = true; - const options: ProductDeleteOptionalParams = { deleteSubscriptions }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.delete( - resourceGroupName, - serviceName, - productId, - ifMatch, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const ifMatch = "*"; + const deleteSubscriptions = true; + const options: ProductDeleteOptionalParams = { deleteSubscriptions }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.delete( + resourceGroupName, + serviceName, + productId, + ifMatch, + options + ); + console.log(result); } async function main() { - apiManagementDeleteProduct(); + apiManagementDeleteProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts index b615b809896e..6746d41d8989 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProduct.json */ async function apiManagementHeadProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.getEntityTag( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "unlimited"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.getEntityTag( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementHeadProduct(); + apiManagementHeadProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts index 4ec43bce9e7b..08e184238869 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the product specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json */ async function apiManagementGetProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.get( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "unlimited"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.get( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementGetProduct(); + apiManagementGetProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts index 16437f00cc40..e9f142355267 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that Group entity specified by identifier is associated with the Product entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductGroup.json */ async function apiManagementHeadProductGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.checkEntityExists( - resourceGroupName, - serviceName, - productId, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5931a75ae4bbd512a88c680b"; + const groupId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroup.checkEntityExists( + resourceGroupName, + serviceName, + productId, + groupId + ); + console.log(result); } async function main() { - apiManagementHeadProductGroup(); + apiManagementHeadProductGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts index 5ddd2bd110d7..bc456ae547bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the association between the specified developer group with the specified product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductGroup.json */ async function apiManagementCreateProductGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.createOrUpdate( - resourceGroupName, - serviceName, - productId, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const groupId = "templateGroup"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroup.createOrUpdate( + resourceGroupName, + serviceName, + productId, + groupId + ); + console.log(result); } async function main() { - apiManagementCreateProductGroup(); + apiManagementCreateProductGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts index 94c45c59a732..a225ef93ec37 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the association between the specified group and product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductGroup.json */ async function apiManagementDeleteProductGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.delete( - resourceGroupName, - serviceName, - productId, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const groupId = "templateGroup"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroup.delete( + resourceGroupName, + serviceName, + productId, + groupId + ); + console.log(result); } async function main() { - apiManagementDeleteProductGroup(); + apiManagementDeleteProductGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts index bc88afdb591e..1a06b83022ed 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of developer groups associated with the specified product. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductGroups.json */ async function apiManagementListProductGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.productGroup.listByProduct( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5600b57e7e8880006a060002"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.productGroup.listByProduct( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductGroups(); + apiManagementListProductGroups(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts index ae381908848f..06a04a8808f1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of products in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProducts.json */ async function apiManagementListProducts() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.product.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.product.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProducts(); + apiManagementListProducts(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts index d8274ee2a74b..ff0076b364b4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of products associated with tags. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductsByTags.json */ async function apiManagementListProductsByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.product.listByTags( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.product.listByTags( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductsByTags(); + apiManagementListProductsByTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts index 0f73b1c7dec0..f54711c75dac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the Product. @@ -21,32 +19,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductPolicy.json */ async function apiManagementCreateProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5702e97e5157a50f48dce801"; - const policyId = "policy"; - const parameters: PolicyContract = { - format: "xml", - value: - '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.createOrUpdate( - resourceGroupName, - serviceName, - productId, - policyId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5702e97e5157a50f48dce801"; + const policyId = "policy"; + const parameters: PolicyContract = { + format: "xml", + value: + '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.createOrUpdate( + resourceGroupName, + serviceName, + productId, + policyId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateProductPolicy(); + apiManagementCreateProductPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts index ddd21565a8ec..d07aca9426bf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Product. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductPolicy.json */ async function apiManagementDeleteProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.delete( - resourceGroupName, - serviceName, - productId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.delete( + resourceGroupName, + serviceName, + productId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteProductPolicy(); + apiManagementDeleteProductPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts index 583cd01a7292..4e11f550b7eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductPolicy.json */ async function apiManagementHeadProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.getEntityTag( - resourceGroupName, - serviceName, - productId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "unlimited"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.getEntityTag( + resourceGroupName, + serviceName, + productId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadProductPolicy(); + apiManagementHeadProductPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts index 8591ab0faa18..b5468cb8fa8e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the Product level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json */ async function apiManagementGetProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "kjoshiarmTemplateProduct4"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.get( - resourceGroupName, - serviceName, - productId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "kjoshiarmTemplateProduct4"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.get( + resourceGroupName, + serviceName, + productId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetProductPolicy(); + apiManagementGetProductPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts index 592a208c2a38..f256628caacf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the Product level. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductPolicies.json */ async function apiManagementListProductPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "armTemplateProduct4"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.listByProduct( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "armTemplateProduct4"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.listByProduct( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementListProductPolicies(); + apiManagementListProductPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts index 92a57cc82332..784fd76e549d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of subscriptions to the specified product. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductSubscriptions.json */ async function apiManagementListProductSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.productSubscriptions.list( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5600b57e7e8880006a060002"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.productSubscriptions.list( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductSubscriptions(); + apiManagementListProductSubscriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts index 108231efc6eb..28d95030d0cb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ProductUpdateParameters, - ApiManagementClient + ApiManagementClient, + ProductUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update existing product details. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProduct.json */ async function apiManagementUpdateProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const parameters: ProductUpdateParameters = { - displayName: "Test Template ProductName 4" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const ifMatch = "*"; + const parameters: ProductUpdateParameters = { + displayName: "Test Template ProductName 4" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.update( + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateProduct(); + apiManagementUpdateProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts index 62626d52456d..97c9228244dd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, WikiContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Wiki for a Product or updates an existing one. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductWiki.json */ async function apiManagementCreateProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const parameters: WikiContract = { + documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.createOrUpdate( + resourceGroupName, + serviceName, + productId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateProductWiki(); + apiManagementCreateProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts index c6a47ccec611..961313b9362d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Wiki from a Product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductWiki.json */ async function apiManagementDeleteProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.delete( - resourceGroupName, - serviceName, - productId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.delete( + resourceGroupName, + serviceName, + productId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteProductWiki(); + apiManagementDeleteProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts index a038f7af6758..472703ed2201 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductWiki.json */ async function apiManagementHeadProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.getEntityTag( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.getEntityTag( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementHeadProductWiki(); + apiManagementHeadProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts index 813b2cf26058..645be9fd1f14 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductWiki.json */ async function apiManagementGetProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.get( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.get( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementGetProductWiki(); + apiManagementGetProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts index 9b7c4f9d648f..da6915e678c2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - WikiUpdateContract, - ApiManagementClient + ApiManagementClient, + WikiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Wiki for a Product specified by its identifier. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProductWiki.json */ async function apiManagementUpdateProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const parameters: WikiUpdateContract = { + documents: [{ documentationId: "docId1" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.update( + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateProductWiki(); + apiManagementUpdateProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts index eae0b06af239..dbb7da3d6ca9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductWikis.json */ async function apiManagementGetApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.productWikis.list( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.productWikis.list( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetApiWiki(); + apiManagementGetApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts index e30cd43ebd6b..7fb5f6019181 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeys.json */ async function apiManagementGetQuotaCounterKeys() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.listByService( - resourceGroupName, - serviceName, - quotaCounterKey - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const quotaCounterKey = "ba"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByCounterKeys.listByService( + resourceGroupName, + serviceName, + quotaCounterKey + ); + console.log(result); } async function main() { - apiManagementGetQuotaCounterKeys(); + apiManagementGetQuotaCounterKeys(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts index 915cac0059d3..459690947e2a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - QuotaCounterValueUpdateContract, - ApiManagementClient + ApiManagementClient, + QuotaCounterValueUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKey.json */ async function apiManagementUpdateQuotaCounterKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const parameters: QuotaCounterValueUpdateContract = { - callsCount: 0, - kbTransferred: 2.5630078125 - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const quotaCounterKey = "ba"; + const parameters: QuotaCounterValueUpdateContract = { + callsCount: 0, + kbTransferred: 2.5630078125 + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByCounterKeys.update( + resourceGroupName, + serviceName, + quotaCounterKey, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateQuotaCounterKey(); + apiManagementUpdateQuotaCounterKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts index e6c9445e5125..312297da9317 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json */ async function apiManagementGetQuotaCounterKeysByQuotaPeriod() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByPeriodKeys.get( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const quotaCounterKey = "ba"; + const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByPeriodKeys.get( + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey + ); + console.log(result); } async function main() { - apiManagementGetQuotaCounterKeysByQuotaPeriod(); + apiManagementGetQuotaCounterKeysByQuotaPeriod(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts index 2a5951cdc029..983955d88310 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - QuotaCounterValueUpdateContract, - ApiManagementClient + ApiManagementClient, + QuotaCounterValueUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing quota counter value in the specified service instance. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json */ async function apiManagementUpdateQuotaCounterKeyByQuotaPeriod() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; - const parameters: QuotaCounterValueUpdateContract = { - callsCount: 0, - kbTransferred: 0 - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByPeriodKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const quotaCounterKey = "ba"; + const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; + const parameters: QuotaCounterValueUpdateContract = { + callsCount: 0, + kbTransferred: 0 + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByPeriodKeys.update( + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateQuotaCounterKeyByQuotaPeriod(); + apiManagementUpdateQuotaCounterKeyByQuotaPeriod(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts index efd5680f27b7..9d3c6aea102a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all azure regions in which the service exists. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListRegions.json */ async function apiManagementListRegions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.region.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.region.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListRegions(); + apiManagementListRegions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts index 2c79ef784584..d0e598c4b9eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByApi.json */ async function apiManagementGetReportsByApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByApi( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByApi( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByApi(); + apiManagementGetReportsByApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts index 09abd47808a9..f5cbcd543793 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by geography. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByGeo.json */ async function apiManagementGetReportsByGeo() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByGeo( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByGeo( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByGeo(); + apiManagementGetReportsByGeo(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts index cf11ce2a1a6d..e20e20dee361 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by API Operations. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByOperation.json */ async function apiManagementGetReportsByOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByOperation( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByOperation( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByOperation(); + apiManagementGetReportsByOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts index ba62392350d4..2ab51f424d6c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Product. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByProduct.json */ async function apiManagementGetReportsByProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByProduct( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByProduct( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByProduct(); + apiManagementGetReportsByProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts index 1e164289dd9c..4acb17e29dc9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Request. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByRequest.json */ async function apiManagementGetReportsByRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByRequest( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByRequest( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByRequest(); + apiManagementGetReportsByRequest(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts index 6de51ec97e0f..b5846c1f4c82 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by subscription. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsBySubscription.json */ async function apiManagementGetReportsBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listBySubscription( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listBySubscription( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsBySubscription(); + apiManagementGetReportsBySubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts index 181ea10ce899..3a26df04327b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Time. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByTime.json */ async function apiManagementGetReportsByTime() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const interval = "PT15M"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByTime( - resourceGroupName, - serviceName, - filter, - interval - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const interval = "PT15M"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByTime( + resourceGroupName, + serviceName, + filter, + interval + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByTime(); + apiManagementGetReportsByTime(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts index 4291513d0653..6311abbe2c75 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by User. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByUser.json */ async function apiManagementGetReportsByUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByUser( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByUser( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByUser(); + apiManagementGetReportsByUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts index f266ccfc4c65..04e38c0908fb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalSigninSettings, - SignInSettingsCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + PortalSigninSettings, + SignInSettingsCreateOrUpdateOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Sign-In settings. @@ -25,27 +23,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignIn.json */ async function apiManagementPortalSettingsUpdateSignIn() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSigninSettings = { enabled: true }; - const options: SignInSettingsCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalSigninSettings = { enabled: true }; + const options: SignInSettingsCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.createOrUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateSignIn(); + apiManagementPortalSettingsUpdateSignIn(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts index 2c52470d5ce3..da6b00504df6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the SignInSettings. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignInSettings.json */ async function apiManagementHeadSignInSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.getEntityTag( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.getEntityTag( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementHeadSignInSettings(); + apiManagementHeadSignInSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts index 28f28743a6c1..3de888ce280e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Sign In Settings for the Portal @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignIn.json */ async function apiManagementPortalSettingsGetSignIn() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementPortalSettingsGetSignIn(); + apiManagementPortalSettingsGetSignIn(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts index c89f5a49379b..2009c6c7b0c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalSigninSettings, - ApiManagementClient + ApiManagementClient, + PortalSigninSettings } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Sign-In settings. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignIn.json */ async function apiManagementPortalSettingsUpdateSignIn() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSigninSettings = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalSigninSettings = { enabled: true }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.update( + resourceGroupName, + serviceName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateSignIn(); + apiManagementPortalSettingsUpdateSignIn(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts index ad1197c5fffd..dcfa74188daa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalSignupSettings, - SignUpSettingsCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + PortalSignupSettings, + SignUpSettingsCreateOrUpdateOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Sign-Up settings. @@ -25,34 +23,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignUp.json */ async function apiManagementPortalSettingsUpdateSignUp() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSignupSettings = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text." - } - }; - const options: SignUpSettingsCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalSignupSettings = { + enabled: true, + termsOfService: { + consentRequired: true, + enabled: true, + text: "Terms of service text." + } + }; + const options: SignUpSettingsCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.createOrUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateSignUp(); + apiManagementPortalSettingsUpdateSignUp(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts index 9143fe8bdcf0..eae8af0dc3c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the SignUpSettings. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignUpSettings.json */ async function apiManagementHeadSignUpSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.getEntityTag( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.getEntityTag( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementHeadSignUpSettings(); + apiManagementHeadSignUpSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts index 319a4b7bd46f..d0c880d09b3a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Sign Up Settings for the Portal @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignUp.json */ async function apiManagementPortalSettingsGetSignUp() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementPortalSettingsGetSignUp(); + apiManagementPortalSettingsGetSignUp(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts index 7741a12efa7e..d34a45085089 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalSignupSettings, - ApiManagementClient + ApiManagementClient, + PortalSignupSettings } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Sign-Up settings. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignUp.json */ async function apiManagementPortalSettingsUpdateSignUp() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSignupSettings = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text." - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalSignupSettings = { + enabled: true, + termsOfService: { + consentRequired: true, + enabled: true, + text: "Terms of service text." + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.update( + resourceGroupName, + serviceName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateSignUp(); + apiManagementPortalSettingsUpdateSignUp(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts index 05e275c85dc4..e1377a92bd0f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - SubscriptionCreateParameters, - ApiManagementClient + ApiManagementClient, + SubscriptionCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSubscription.json */ async function apiManagementCreateSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const parameters: SubscriptionCreateParameters = { - displayName: "testsub", - ownerId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", - scope: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.createOrUpdate( - resourceGroupName, - serviceName, - sid, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const parameters: SubscriptionCreateParameters = { + displayName: "testsub", + ownerId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + scope: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.createOrUpdate( + resourceGroupName, + serviceName, + sid, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateSubscription(); + apiManagementCreateSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts index 67f671d3a2e2..d949a3a3bc32 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified subscription. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteSubscription.json */ async function apiManagementDeleteSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.delete( - resourceGroupName, - serviceName, - sid, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.delete( + resourceGroupName, + serviceName, + sid, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteSubscription(); + apiManagementDeleteSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts index 99b2bf3acad1..d83ba59e14c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSubscription.json */ async function apiManagementHeadSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.getEntityTag( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "5931a769d8d14f0ad8ce13b8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.getEntityTag( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementHeadSubscription(); + apiManagementHeadSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts index 59dd2b118352..98ec6daccb46 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription entity. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json */ async function apiManagementGetSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.get( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "5931a769d8d14f0ad8ce13b8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.get( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementGetSubscription(); + apiManagementGetSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts index 29b594046e65..d3f7d493d476 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all subscriptions of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSubscriptions.json */ async function apiManagementListSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.subscription.list( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.subscription.list( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListSubscriptions(); + apiManagementListSubscriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts index 5965ee649a51..0b3cfa100073 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription keys. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionListSecrets.json */ async function apiManagementSubscriptionListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.listSecrets( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "5931a769d8d14f0ad8ce13b8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.listSecrets( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementSubscriptionListSecrets(); + apiManagementSubscriptionListSecrets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts index 28088928c4d8..9c030fa59018 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates primary key of existing subscription of the API Management service instance. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json */ async function apiManagementSubscriptionRegeneratePrimaryKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regeneratePrimaryKey( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.regeneratePrimaryKey( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementSubscriptionRegeneratePrimaryKey(); + apiManagementSubscriptionRegeneratePrimaryKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts index 575f32f09ce0..833df231056e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates secondary key of existing subscription of the API Management service instance. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json */ async function apiManagementSubscriptionRegenerateSecondaryKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regenerateSecondaryKey( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.regenerateSecondaryKey( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementSubscriptionRegenerateSecondaryKey(); + apiManagementSubscriptionRegenerateSecondaryKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts index dcfdc0e6e6da..84a124fd08d7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - SubscriptionUpdateParameters, - ApiManagementClient + ApiManagementClient, + SubscriptionUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of a subscription specified by its identifier. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateSubscription.json */ async function apiManagementUpdateSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; - const parameters: SubscriptionUpdateParameters = { displayName: "testsub" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.update( - resourceGroupName, - serviceName, - sid, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const ifMatch = "*"; + const parameters: SubscriptionUpdateParameters = { displayName: "testsub" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.update( + resourceGroupName, + serviceName, + sid, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateSubscription(); + apiManagementUpdateSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts index 52aa8cbe6993..852fd960a3c4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Api. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTag.json */ async function apiManagementCreateApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToApi( - resourceGroupName, - serviceName, - apiId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5931a75ae4bbd512a88c680b"; + const tagId = "tagId1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToApi( + resourceGroupName, + serviceName, + apiId, + tagId + ); + console.log(result); } async function main() { - apiManagementCreateApiTag(); + apiManagementCreateApiTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts index 720adf7c4489..6c45f7cf18e9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Operation. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationTag.json */ async function apiManagementCreateApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const operationId = "5931a75ae4bbd512a88c680a"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5931a75ae4bbd512a88c680b"; + const operationId = "5931a75ae4bbd512a88c680a"; + const tagId = "tagId1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + tagId + ); + console.log(result); } async function main() { - apiManagementCreateApiOperationTag(); + apiManagementCreateApiOperationTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts index e7327d91cf64..594fafdb2b72 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductTag.json */ async function apiManagementCreateProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToProduct( - resourceGroupName, - serviceName, - productId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5931a75ae4bbd512a88c680b"; + const tagId = "tagId1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToProduct( + resourceGroupName, + serviceName, + productId, + tagId + ); + console.log(result); } async function main() { - apiManagementCreateProductTag(); + apiManagementCreateProductTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts index 95a59272991c..65344fc9cb26 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - TagCreateUpdateParameters, - ApiManagementClient + ApiManagementClient, + TagCreateUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a tag. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTag.json */ async function apiManagementCreateTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const parameters: TagCreateUpdateParameters = { displayName: "tag1" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "tagId1"; + const parameters: TagCreateUpdateParameters = { displayName: "tag1" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.createOrUpdate( + resourceGroupName, + serviceName, + tagId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateTag(); + apiManagementCreateTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts index ed2af0a78357..e4e46f22bbef 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific tag of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTag.json */ async function apiManagementDeleteTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.delete( - resourceGroupName, - serviceName, - tagId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "tagId1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.delete( + resourceGroupName, + serviceName, + tagId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteTag(); + apiManagementDeleteTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts index adeb2e1c6ea6..99a0f0749817 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Api. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTag.json */ async function apiManagementDeleteApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromApi( - resourceGroupName, - serviceName, - apiId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const tagId = "59d5b28e1f7fab116402044e"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.detachFromApi( + resourceGroupName, + serviceName, + apiId, + tagId + ); + console.log(result); } async function main() { - apiManagementDeleteApiTag(); + apiManagementDeleteApiTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts index 55ec990815ff..4213d50306db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Operation. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationTag.json */ async function apiManagementDeleteApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const operationId = "59d5b28d1f7fab116c282651"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const operationId = "59d5b28d1f7fab116c282651"; + const tagId = "59d5b28e1f7fab116402044e"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.detachFromOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + tagId + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperationTag(); + apiManagementDeleteApiOperationTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts index cc92c57bdf3b..351d5ea1bb2f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductTag.json */ async function apiManagementDeleteProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromProduct( - resourceGroupName, - serviceName, - productId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "59d5b28d1f7fab116c282650"; + const tagId = "59d5b28e1f7fab116402044e"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.detachFromProduct( + resourceGroupName, + serviceName, + productId, + tagId + ); + console.log(result); } async function main() { - apiManagementDeleteProductTag(); + apiManagementDeleteProductTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts index e1f4ad9b464f..032d15abdb67 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the API. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json */ async function apiManagementGetApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByApi( - resourceGroupName, - serviceName, - apiId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByApi( + resourceGroupName, + serviceName, + apiId, + tagId + ); + console.log(result); } async function main() { - apiManagementGetApiTag(); + apiManagementGetApiTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts index b500b22c44c0..aa39c7978abb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the Operation. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json */ async function apiManagementGetApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const operationId = "59d6bb8f1f7fab13dc67ec9a"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + tagId + ); + console.log(result); } async function main() { - apiManagementGetApiOperationTag(); + apiManagementGetApiOperationTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts index ed0443df7ae3..52e2a6a6b244 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the Product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json */ async function apiManagementGetProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByProduct( - resourceGroupName, - serviceName, - productId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "59d6bb8f1f7fab13dc67ec9b"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByProduct( + resourceGroupName, + serviceName, + productId, + tagId + ); + console.log(result); } async function main() { - apiManagementGetProductTag(); + apiManagementGetProductTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts index f412d5d3df32..91a60e7e4977 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTag.json */ async function apiManagementHeadApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByApi( - resourceGroupName, - serviceName, - apiId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getEntityStateByApi( + resourceGroupName, + serviceName, + apiId, + tagId + ); + console.log(result); } async function main() { - apiManagementHeadApiTag(); + apiManagementHeadApiTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts index d6d7ecab6aee..f967bec8eaca 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationTag.json */ async function apiManagementHeadApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const operationId = "59d6bb8f1f7fab13dc67ec9a"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getEntityStateByOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + tagId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperationTag(); + apiManagementHeadApiOperationTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts index b411670bbc87..4ad25b94901c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductTag.json */ async function apiManagementHeadProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59306a29e4bbd510dc24e5f8"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByProduct( - resourceGroupName, - serviceName, - productId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "59306a29e4bbd510dc24e5f8"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getEntityStateByProduct( + resourceGroupName, + serviceName, + productId, + tagId + ); + console.log(result); } async function main() { - apiManagementHeadProductTag(); + apiManagementHeadProductTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts index efab0cd07fa9..71592f6c5204 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTag.json */ async function apiManagementHeadTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityState( - resourceGroupName, - serviceName, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getEntityState( + resourceGroupName, + serviceName, + tagId + ); + console.log(result); } async function main() { - apiManagementHeadTag(); + apiManagementHeadTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts index a76bd73c4d04..abc604ef9ae3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the tag specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json */ async function apiManagementGetTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.get(resourceGroupName, serviceName, tagId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.get(resourceGroupName, serviceName, tagId); + console.log(result); } async function main() { - apiManagementGetTag(); + apiManagementGetTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts index d602d51dfd99..609d64d32ac0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTags.json */ async function apiManagementListApiTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tag.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tag.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiTags(); + apiManagementListApiTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts index d5314d8a8c8e..6e14150696fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the Operation. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationTags.json */ async function apiManagementListApiOperationTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0888cba3f6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tag.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0888cba3f6"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tag.listByOperation( + resourceGroupName, + serviceName, + apiId, + operationId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiOperationTags(); + apiManagementListApiOperationTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts index e5f974185617..724f69ac8865 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the Product. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductTags.json */ async function apiManagementListProductTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d2ef278aa04f0888cba3f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tag.listByProduct( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d2ef278aa04f0888cba3f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tag.listByProduct( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductTags(); + apiManagementListProductTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts index 1590eb84e906..fa345f2d5bc3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of tags defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTags.json */ async function apiManagementListTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tag.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tag.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTags(); + apiManagementListTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts index 7e4fdbdb908a..5d696438034b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of resources associated with tags. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTagResources.json */ async function apiManagementListTagResources() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tagResource.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tagResource.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTagResources(); + apiManagementListTagResources(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts index c9cf0351412d..4e044c92d442 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - TagCreateUpdateParameters, - ApiManagementClient + ApiManagementClient, + TagCreateUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the tag specified by its identifier. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTag.json */ async function apiManagementUpdateTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "temptag"; - const ifMatch = "*"; - const parameters: TagCreateUpdateParameters = { displayName: "temp tag" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.update( - resourceGroupName, - serviceName, - tagId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "temptag"; + const ifMatch = "*"; + const parameters: TagCreateUpdateParameters = { displayName: "temp tag" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.update( + resourceGroupName, + serviceName, + tagId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateTag(); + apiManagementUpdateTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts index 5980978da091..a62743907745 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AccessInformationCreateParameters, - ApiManagementClient + AccessInformationCreateParameters, + ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update tenant access information details. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTenantAccess.json */ async function apiManagementCreateTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters: AccessInformationCreateParameters = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.create( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const ifMatch = "*"; + const parameters: AccessInformationCreateParameters = { enabled: true }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.create( + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateTenantAccess(); + apiManagementCreateTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts index 4ad470bacf74..3076be123026 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Tenant access metadata @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTenantAccess.json */ async function apiManagementHeadTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.getEntityTag( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.getEntityTag( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementHeadTenantAccess(); + apiManagementHeadTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts index 89a00b00a34c..bd58c0f7dc7d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant access information details without secrets. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json */ async function apiManagementGetTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.get( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } /** @@ -44,25 +42,25 @@ async function apiManagementGetTenantAccess() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json */ async function apiManagementGetTenantGitAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "gitAccess"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "gitAccess"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.get( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementGetTenantAccess(); - apiManagementGetTenantGitAccess(); + apiManagementGetTenantAccess(); + apiManagementGetTenantGitAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts index b0ebbca83394..3704f35af038 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate primary access key for GIT. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json */ async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccessGit.regeneratePrimaryKey( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementTenantAccessRegenerateKey(); + apiManagementTenantAccessRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts index 237541c234c1..fa87c05fe262 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate secondary access key for GIT. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json */ async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccessGit.regenerateSecondaryKey( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementTenantAccessRegenerateKey(); + apiManagementTenantAccessRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts index b639a89e236d..3851da486a0c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns list of access infos - for Git and Management endpoints. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantAccess.json */ async function apiManagementListTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantAccess.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tenantAccess.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTenantAccess(); + apiManagementListTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts index 084ace7979c0..60d9eb7902c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant access information details. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsTenantAccess.json */ async function apiManagementListSecretsTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.listSecrets( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.listSecrets( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementListSecretsTenantAccess(); + apiManagementListSecretsTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts index ba54ff5d6c7f..56d976c279da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate primary access key @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json */ async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.regeneratePrimaryKey( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementTenantAccessRegenerateKey(); + apiManagementTenantAccessRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts index 5bf80798e4e1..9c6294e1b4a4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate secondary access key @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json */ async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.regenerateSecondaryKey( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementTenantAccessRegenerateKey(); + apiManagementTenantAccessRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts index 0a45399af35d..38ec405587f3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AccessInformationUpdateParameters, - ApiManagementClient + AccessInformationUpdateParameters, + ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update tenant access information details. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTenantAccess.json */ async function apiManagementUpdateTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters: AccessInformationUpdateParameters = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.update( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const ifMatch = "*"; + const parameters: AccessInformationUpdateParameters = { enabled: true }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.update( + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateTenantAccess(); + apiManagementUpdateTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts index 30a6f486f333..1fe3ebb45959 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DeployConfigurationParameters, - ApiManagementClient + ApiManagementClient, + DeployConfigurationParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationDeploy.json */ async function apiManagementTenantConfigurationDeploy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: DeployConfigurationParameters = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginDeployAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const configurationName = "configuration"; + const parameters: DeployConfigurationParameters = { branch: "master" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.beginDeployAndWait( + resourceGroupName, + serviceName, + configurationName, + parameters + ); + console.log(result); } async function main() { - apiManagementTenantConfigurationDeploy(); + apiManagementTenantConfigurationDeploy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts index 183413c070e7..b307c0a9d642 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the status of the most recent synchronization between the configuration database and the Git repository. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessSyncState.json */ async function apiManagementTenantAccessSyncState() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.getSyncState( - resourceGroupName, - serviceName, - configurationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const configurationName = "configuration"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.getSyncState( + resourceGroupName, + serviceName, + configurationName + ); + console.log(result); } async function main() { - apiManagementTenantAccessSyncState(); + apiManagementTenantAccessSyncState(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts index 339b7d8e350b..bc78d11946bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - SaveConfigurationParameter, - ApiManagementClient + ApiManagementClient, + SaveConfigurationParameter } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationSave.json */ async function apiManagementTenantConfigurationSave() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: SaveConfigurationParameter = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginSaveAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const configurationName = "configuration"; + const parameters: SaveConfigurationParameter = { branch: "master" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.beginSaveAndWait( + resourceGroupName, + serviceName, + configurationName, + parameters + ); + console.log(result); } async function main() { - apiManagementTenantConfigurationSave(); + apiManagementTenantConfigurationSave(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts index 593245c52c97..78f312d6617d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DeployConfigurationParameters, - ApiManagementClient + ApiManagementClient, + DeployConfigurationParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationValidate.json */ async function apiManagementTenantConfigurationValidate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: DeployConfigurationParameters = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginValidateAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const configurationName = "configuration"; + const parameters: DeployConfigurationParameters = { branch: "master" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.beginValidateAndWait( + resourceGroupName, + serviceName, + configurationName, + parameters + ); + console.log(result); } async function main() { - apiManagementTenantConfigurationValidate(); + apiManagementTenantConfigurationValidate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts index 62f39d5d4132..dcf2b013c5a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant settings. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json */ async function apiManagementGetTenantSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const settingsType = "public"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantSettings.get( - resourceGroupName, - serviceName, - settingsType - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const settingsType = "public"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantSettings.get( + resourceGroupName, + serviceName, + settingsType + ); + console.log(result); } async function main() { - apiManagementGetTenantSettings(); + apiManagementGetTenantSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts index bee5b4a6d6fd..bd1370baed7e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Public settings. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantSettings.json */ async function apiManagementListTenantSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantSettings.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tenantSettings.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTenantSettings(); + apiManagementListTenantSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts index fbab7fc3a2cb..24c9757e7a4b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Sends confirmation @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserConfirmationPasswordSend.json */ async function apiManagementUserConfirmationPasswordSend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.userConfirmationPassword.send( - resourceGroupName, - serviceName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57127d485157a511ace86ae7"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.userConfirmationPassword.send( + resourceGroupName, + serviceName, + userId + ); + console.log(result); } async function main() { - apiManagementUserConfirmationPasswordSend(); + apiManagementUserConfirmationPasswordSend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts index f21acf2952a6..ad8367f5294e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - UserCreateParameters, - ApiManagementClient + ApiManagementClient, + UserCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a user. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateUser.json */ async function apiManagementCreateUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const parameters: UserCreateParameters = { - confirmation: "signup", - email: "foobar@outlook.com", - firstName: "foo", - lastName: "bar" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.createOrUpdate( - resourceGroupName, - serviceName, - userId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512288c680b"; + const parameters: UserCreateParameters = { + confirmation: "signup", + email: "foobar@outlook.com", + firstName: "foo", + lastName: "bar" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.createOrUpdate( + resourceGroupName, + serviceName, + userId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateUser(); + apiManagementCreateUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts index b07039d2c5ab..e7716f68fac4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific user. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteUser.json */ async function apiManagementDeleteUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.delete( - resourceGroupName, - serviceName, - userId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512288c680b"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.delete( + resourceGroupName, + serviceName, + userId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteUser(); + apiManagementDeleteUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts index f1e39fe5ea16..ed1cef401bdc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserGenerateSsoUrl.json */ async function apiManagementUserGenerateSsoUrl() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.generateSsoUrl( - resourceGroupName, - serviceName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57127d485157a511ace86ae7"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.generateSsoUrl( + resourceGroupName, + serviceName, + userId + ); + console.log(result); } async function main() { - apiManagementUserGenerateSsoUrl(); + apiManagementUserGenerateSsoUrl(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts index a8d971057e1e..2e195ef7229e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the user specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadUser.json */ async function apiManagementHeadUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getEntityTag( - resourceGroupName, - serviceName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512a88c680b"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.getEntityTag( + resourceGroupName, + serviceName, + userId + ); + console.log(result); } async function main() { - apiManagementHeadUser(); + apiManagementHeadUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts index af21ca84b0c8..b1e1afda4b3d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the user specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json */ async function apiManagementGetUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.get(resourceGroupName, serviceName, userId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512a88c680b"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.get(resourceGroupName, serviceName, userId); + console.log(result); } async function main() { - apiManagementGetUser(); + apiManagementGetUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts index dae88fd58203..433daa3e6b32 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - UserTokenParameters, - ApiManagementClient + ApiManagementClient, + UserTokenParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Shared Access Authorization Token for the User. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserToken.json */ async function apiManagementUserToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "userId1718"; - const parameters: UserTokenParameters = { - expiry: new Date("2019-04-21T00:44:24.2845269Z"), - keyType: "primary" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getSharedAccessToken( - resourceGroupName, - serviceName, - userId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "userId1718"; + const parameters: UserTokenParameters = { + expiry: new Date("2019-04-21T00:44:24.2845269Z"), + keyType: "primary" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.getSharedAccessToken( + resourceGroupName, + serviceName, + userId, + parameters + ); + console.log(result); } async function main() { - apiManagementUserToken(); + apiManagementUserToken(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts index 633fea2229a3..c46113c78d7b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all user groups. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserGroups.json */ async function apiManagementListUserGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.userGroup.list( - resourceGroupName, - serviceName, - userId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57681833a40f7eb6c49f6acf"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.userGroup.list( + resourceGroupName, + serviceName, + userId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListUserGroups(); + apiManagementListUserGroups(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts index 0e7f010d6fcf..5c078c68b991 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List of all user identities. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserIdentities.json */ async function apiManagementListUserIdentities() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57f2af53bb17172280f44057"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.userIdentities.list( - resourceGroupName, - serviceName, - userId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57f2af53bb17172280f44057"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.userIdentities.list( + resourceGroupName, + serviceName, + userId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListUserIdentities(); + apiManagementListUserIdentities(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts index b212a1781a0b..cda945594de8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of registered users in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUsers.json */ async function apiManagementListUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.user.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.user.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListUsers(); + apiManagementListUsers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts index d64b3f87dfc2..ad802c7097fd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription entity associated with a particular user. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json */ async function apiManagementGetUserSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "1"; - const sid = "5fa9b096f3df14003c070001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.userSubscription.get( - resourceGroupName, - serviceName, - userId, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "1"; + const sid = "5fa9b096f3df14003c070001"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.userSubscription.get( + resourceGroupName, + serviceName, + userId, + sid + ); + console.log(result); } async function main() { - apiManagementGetUserSubscription(); + apiManagementGetUserSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts index 47fe92e03081..7d554166fb28 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of subscriptions of the specified user. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserSubscriptions.json */ async function apiManagementListUserSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.userSubscription.list( - resourceGroupName, - serviceName, - userId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57681833a40f7eb6c49f6acf"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.userSubscription.list( + resourceGroupName, + serviceName, + userId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListUserSubscriptions(); + apiManagementListUserSubscriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts index 17b2ed83fcea..a8bb1143bce1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - UserUpdateParameters, - ApiManagementClient + ApiManagementClient, + UserUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the user specified by its identifier. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateUser.json */ async function apiManagementUpdateUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const ifMatch = "*"; - const parameters: UserUpdateParameters = { - email: "foobar@outlook.com", - firstName: "foo", - lastName: "bar" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.update( - resourceGroupName, - serviceName, - userId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512a88c680b"; + const ifMatch = "*"; + const parameters: UserUpdateParameters = { + email: "foobar@outlook.com", + firstName: "foo", + lastName: "bar" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.update( + resourceGroupName, + serviceName, + userId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateUser(); + apiManagementUpdateUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiCreateOrUpdateSample.ts index c925ab438886..ecc4eb4dabc3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiCreateOrUpdateParameter, - ApiManagementClient + ApiCreateOrUpdateParameter, + ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApi.json */ async function apiManagementCreateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580" - } - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2: { + authorizationServerId: "authorizationServerId2283", + scope: "oauth2scope2580" + } + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -62,32 +60,32 @@ async function apiManagementCreateApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiClone.json */ async function apiManagementCreateApiClone() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api2"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: "Copy of Existing Echo Api including Operations.", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", - subscriptionRequired: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api2"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo2", + description: "Copy of Existing Echo Api including Operations.", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", + subscriptionRequired: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -97,36 +95,36 @@ async function apiManagementCreateApiClone() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json */ async function apiManagementCreateApiNewVersionUsingExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echoapiv3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: - "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", - apiVersion: "v4", - apiVersionSetId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", - subscriptionRequired: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echoapiv3"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo2", + description: + "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + apiVersion: "v4", + apiVersionSetId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", + subscriptionRequired: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -136,28 +134,28 @@ async function apiManagementCreateApiNewVersionUsingExistingApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json */ async function apiManagementCreateApiRevisionFromExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo", - apiRevisionDescription: "Creating a Revision of an existing API", - serviceUrl: "http://echoapi.cloudapp.net/apiv3", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api;rev=3"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo", + apiRevisionDescription: "Creating a Revision of an existing API", + serviceUrl: "http://echoapi.cloudapp.net/apiv3", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -167,27 +165,27 @@ async function apiManagementCreateApiRevisionFromExistingApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json */ async function apiManagementCreateApiUsingImportOverrideServiceUrl() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "apidocs"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link", - path: "petstoreapi123", - serviceUrl: "http://petstore.swagger.wordnik.com/api", - value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "apidocs"; + const parameters: ApiCreateOrUpdateParameter = { + format: "swagger-link", + path: "petstoreapi123", + serviceUrl: "http://petstore.swagger.wordnik.com/api", + value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -197,27 +195,27 @@ async function apiManagementCreateApiUsingImportOverrideServiceUrl() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3Import.json */ async function apiManagementCreateApiUsingOai3Import() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "openapi-link", + path: "petstore", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -227,28 +225,28 @@ async function apiManagementCreateApiUsingOai3Import() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json */ async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - translateRequiredQueryParametersConduct: "template", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "openapi-link", + path: "petstore", + translateRequiredQueryParametersConduct: "template", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -258,26 +256,26 @@ async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryPa * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingSwaggerImport.json */ async function apiManagementCreateApiUsingSwaggerImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link-json", - path: "petstore", - value: "http://petstore.swagger.io/v2/swagger.json" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "swagger-link-json", + path: "petstore", + value: "http://petstore.swagger.io/v2/swagger.json" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -287,27 +285,27 @@ async function apiManagementCreateApiUsingSwaggerImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingWadlImport.json */ async function apiManagementCreateApiUsingWadlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wadl-link-json", - path: "collector", - value: - "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wadl-link-json", + path: "collector", + value: + "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -317,41 +315,41 @@ async function apiManagementCreateApiUsingWadlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json */ async function apiManagementCreateApiWithMultipleAuthServers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2AuthenticationSettings: [ - { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2AuthenticationSettings: [ + { + authorizationServerId: "authorizationServerId2283", + scope: "oauth2scope2580" + }, + { + authorizationServerId: "authorizationServerId2284", + scope: "oauth2scope2581" + } + ] }, - { - authorizationServerId: "authorizationServerId2284", - scope: "oauth2scope2581" - } - ] - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -361,41 +359,41 @@ async function apiManagementCreateApiWithMultipleAuthServers() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json */ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - openidAuthenticationSettings: [ - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2283" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + openidAuthenticationSettings: [ + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2283" + }, + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2284" + } + ] }, - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2284" - } - ] - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -405,39 +403,39 @@ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithOpenIdConnect.json */ async function apiManagementCreateApiWithOpenIdConnect() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "petstore", - description: - "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - authenticationSettings: { - openid: { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "testopenid" - } - }, - displayName: "Swagger Petstore", - protocols: ["https"], - serviceUrl: "http://petstore.swagger.io/v2", - subscriptionKeyParameterNames: { - header: "Ocp-Apim-Subscription-Key", - query: "subscription-key" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "petstore", + description: + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + authenticationSettings: { + openid: { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "testopenid" + } + }, + displayName: "Swagger Petstore", + protocols: ["https"], + serviceUrl: "http://petstore.swagger.io/v2", + subscriptionKeyParameterNames: { + header: "Ocp-Apim-Subscription-Key", + query: "subscription-key" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -447,29 +445,29 @@ async function apiManagementCreateApiWithOpenIdConnect() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApi.json */ async function apiManagementCreateGraphQlApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "graphql", - path: "graphql-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["http", "https"], - serviceUrl: "https://api.spacex.land/graphql" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + apiType: "graphql", + path: "graphql-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["http", "https"], + serviceUrl: "https://api.spacex.land/graphql" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -479,31 +477,31 @@ async function apiManagementCreateGraphQlApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json */ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - soapApiType: "soap", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "soapApi"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wsdl-link", + path: "currency", + soapApiType: "soap", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -513,30 +511,30 @@ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json */ async function apiManagementCreateSoapToRestApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "soapApi"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wsdl-link", + path: "currency", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -546,48 +544,48 @@ async function apiManagementCreateSoapToRestApiUsingWsdlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateWebsocketApi.json */ async function apiManagementCreateWebSocketApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "websocket", - path: "newapiPath", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["wss", "ws"], - serviceUrl: "wss://echo.websocket.org" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + apiType: "websocket", + path: "newapiPath", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["wss", "ws"], + serviceUrl: "wss://echo.websocket.org" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApi(); - apiManagementCreateApiClone(); - apiManagementCreateApiNewVersionUsingExistingApi(); - apiManagementCreateApiRevisionFromExistingApi(); - apiManagementCreateApiUsingImportOverrideServiceUrl(); - apiManagementCreateApiUsingOai3Import(); - apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); - apiManagementCreateApiUsingSwaggerImport(); - apiManagementCreateApiUsingWadlImport(); - apiManagementCreateApiWithMultipleAuthServers(); - apiManagementCreateApiWithMultipleOpenIdConnectProviders(); - apiManagementCreateApiWithOpenIdConnect(); - apiManagementCreateGraphQlApi(); - apiManagementCreateSoapPassThroughApiUsingWsdlImport(); - apiManagementCreateSoapToRestApiUsingWsdlImport(); - apiManagementCreateWebSocketApi(); + apiManagementCreateApi(); + apiManagementCreateApiClone(); + apiManagementCreateApiNewVersionUsingExistingApi(); + apiManagementCreateApiRevisionFromExistingApi(); + apiManagementCreateApiUsingImportOverrideServiceUrl(); + apiManagementCreateApiUsingOai3Import(); + apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); + apiManagementCreateApiUsingSwaggerImport(); + apiManagementCreateApiUsingWadlImport(); + apiManagementCreateApiWithMultipleAuthServers(); + apiManagementCreateApiWithMultipleOpenIdConnectProviders(); + apiManagementCreateApiWithOpenIdConnect(); + apiManagementCreateGraphQlApi(); + apiManagementCreateSoapPassThroughApiUsingWsdlImport(); + apiManagementCreateSoapToRestApiUsingWsdlImport(); + apiManagementCreateWebSocketApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDeleteSample.ts index bce9734c0807..06ddce3a973e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApi.json */ async function apiManagementDeleteApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.delete( + resourceGroupName, + serviceName, + apiId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApi(); + apiManagementDeleteApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticCreateOrUpdateSample.ts index bb786b3e0770..26c439d90060 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. @@ -24,40 +22,40 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiDiagnostic.json */ async function apiManagementCreateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiDiagnostic(); + apiManagementCreateApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticDeleteSample.ts index 3c10221ab17f..aa8a5f161fad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Diagnostic from an API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiDiagnostic.json */ async function apiManagementDeleteApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.delete( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.delete( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiDiagnostic(); + apiManagementDeleteApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetEntityTagSample.ts index fee3ff7ccecc..bf58d09ae1c5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiDiagnostic.json */ async function apiManagementHeadApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - apiId, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.getEntityTag( + resourceGroupName, + serviceName, + apiId, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementHeadApiDiagnostic(); + apiManagementHeadApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetSample.ts index b7c47ea2ae7a..958454537dbf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json */ async function apiManagementGetApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.get( - resourceGroupName, - serviceName, - apiId, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.get( + resourceGroupName, + serviceName, + apiId, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementGetApiDiagnostic(); + apiManagementGetApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticListByServiceSample.ts index 1e3cf1eb81f3..4ea53d829c79 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all diagnostics of an API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiDiagnostics.json */ async function apiManagementListApiDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiDiagnostic.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiDiagnostic.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiDiagnostics(); + apiManagementListApiDiagnostics(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticUpdateSample.ts index 98db9f1389bd..29c842a7dc5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. @@ -24,42 +22,42 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiDiagnostic.json */ async function apiManagementUpdateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.update( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.update( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiDiagnostic(); + apiManagementUpdateApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiExportGetSample.ts index 0bc983750541..baff554b9c6b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiExportGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiExportGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json */ async function apiManagementGetApiExportInOpenApi2Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const format = "swagger-link"; + const exportParam = "true"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + resourceGroupName, + serviceName, + apiId, + format, + exportParam + ); + console.log(result); } /** @@ -48,29 +46,29 @@ async function apiManagementGetApiExportInOpenApi2Dot0() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi3dot0.json */ async function apiManagementGetApiExportInOpenApi3Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "aid9676"; + const format = "openapi-link"; + const exportParam = "true"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + resourceGroupName, + serviceName, + apiId, + format, + exportParam + ); + console.log(result); } async function main() { - apiManagementGetApiExportInOpenApi2Dot0(); - apiManagementGetApiExportInOpenApi3Dot0(); + apiManagementGetApiExportInOpenApi2Dot0(); + apiManagementGetApiExportInOpenApi3Dot0(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetEntityTagSample.ts index 2b95bbce1f20..b9f0cee28c4e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApi.json */ async function apiManagementHeadApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.getEntityTag( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.getEntityTag( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadApi(); + apiManagementHeadApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetSample.ts index 6be69f527b3f..d07bec76b215 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API specified by its identifier. @@ -21,16 +19,16 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json */ async function apiManagementGetApiContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get(resourceGroupName, serviceName, apiId); + console.log(result); } /** @@ -40,21 +38,21 @@ async function apiManagementGetApiContract() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json */ async function apiManagementGetApiRevisionContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api;rev=3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get(resourceGroupName, serviceName, apiId); + console.log(result); } async function main() { - apiManagementGetApiContract(); - apiManagementGetApiRevisionContract(); + apiManagementGetApiContract(); + apiManagementGetApiRevisionContract(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts index cbe5617fbf06..5457d216d7f0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueAttachmentContract, - ApiManagementClient + ApiManagementClient, + IssueAttachmentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Attachment for the Issue in an API or updates an existing one. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueAttachment.json */ async function apiManagementCreateApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const parameters: IssueAttachmentContract = { - content: "IEJhc2U2NA==", - contentFormat: "image/jpeg", - title: "Issue attachment." - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const parameters: IssueAttachmentContract = { + content: "IEJhc2U2NA==", + contentFormat: "image/jpeg", + title: "Issue attachment." + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssueAttachment(); + apiManagementCreateApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentDeleteSample.ts index fbfe39d80766..2a892d115020 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified comment from an Issue. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueAttachment.json */ async function apiManagementDeleteApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssueAttachment(); + apiManagementDeleteApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetEntityTagSample.ts index 2c4e90eb568f..ae5a940bee71 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueAttachment.json */ async function apiManagementHeadApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssueAttachment(); + apiManagementHeadApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetSample.ts index 0d908d111952..899219feb7c3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the issue Attachment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json */ async function apiManagementGetApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.get( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId + ); + console.log(result); } async function main() { - apiManagementGetApiIssueAttachment(); + apiManagementGetApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentListByServiceSample.ts index ee061f31375f..ad0012d54651 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all attachments for the Issue associated with the specified API. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueAttachments.json */ async function apiManagementListApiIssueAttachments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssueAttachment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssueAttachment.listByService( + resourceGroupName, + serviceName, + apiId, + issueId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssueAttachments(); + apiManagementListApiIssueAttachments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentCreateOrUpdateSample.ts index 32936cb7b1cc..1682afae2437 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueCommentContract, - ApiManagementClient + ApiManagementClient, + IssueCommentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Comment for the Issue in an API or updates an existing one. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueComment.json */ async function apiManagementCreateApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const parameters: IssueCommentContract = { - createdDate: new Date("2018-02-01T22:21:20.467Z"), - text: "Issue comment.", - userId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const parameters: IssueCommentContract = { + createdDate: new Date("2018-02-01T22:21:20.467Z"), + text: "Issue comment.", + userId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssueComment(); + apiManagementCreateApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentDeleteSample.ts index 834fcd9846b3..94e1240c3e35 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified comment from an Issue. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueComment.json */ async function apiManagementDeleteApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssueComment(); + apiManagementDeleteApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetEntityTagSample.ts index cf361ab2bf4a..0e07c75463ed 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueComment.json */ async function apiManagementHeadApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssueComment(); + apiManagementHeadApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetSample.ts index a653c91031fc..acbc31fbb053 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the issue Comment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json */ async function apiManagementGetApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.get( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId + ); + console.log(result); } async function main() { - apiManagementGetApiIssueComment(); + apiManagementGetApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentListByServiceSample.ts index 0f707b25fdc6..f61d5a58bda5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all comments for the Issue associated with the specified API. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueComments.json */ async function apiManagementListApiIssueComments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssueComment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssueComment.listByService( + resourceGroupName, + serviceName, + apiId, + issueId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssueComments(); + apiManagementListApiIssueComments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCreateOrUpdateSample.ts index 17118262adfb..c1656d0d4144 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { IssueContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, IssueContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Issue for an API or updates an existing one. @@ -21,35 +19,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssue.json */ async function apiManagementCreateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const parameters: IssueContract = { - description: "New API issue description", - createdDate: new Date("2018-02-01T22:21:20.467Z"), - state: "open", - title: "New API issue", - userId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const parameters: IssueContract = { + description: "New API issue description", + createdDate: new Date("2018-02-01T22:21:20.467Z"), + state: "open", + title: "New API issue", + userId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssue(); + apiManagementCreateApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueDeleteSample.ts index 62947660fdae..7638e5ff53b2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Issue from an API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssue.json */ async function apiManagementDeleteApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssue(); + apiManagementDeleteApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetEntityTagSample.ts index 9a4b143c4da3..21c8fba6ffdb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Issue for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssue.json */ async function apiManagementHeadApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssue(); + apiManagementHeadApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetSample.ts index b806298655a6..37158457ff78 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Issue for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json */ async function apiManagementGetApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.get( - resourceGroupName, - serviceName, - apiId, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.get( + resourceGroupName, + serviceName, + apiId, + issueId + ); + console.log(result); } async function main() { - apiManagementGetApiIssue(); + apiManagementGetApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueListByServiceSample.ts index e40ae7fd2e07..65f0b8edcc6f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all issues associated with the specified API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssues.json */ async function apiManagementListApiIssues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssue.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssue.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssues(); + apiManagementListApiIssues(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueUpdateSample.ts index 25a011cbee75..6665ab334d43 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueUpdateContract, - ApiManagementClient + ApiManagementClient, + IssueUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing issue for an API. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiIssue.json */ async function apiManagementUpdateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const parameters: IssueUpdateContract = { state: "closed" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.update( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const parameters: IssueUpdateContract = { state: "closed" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.update( + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiIssue(); + apiManagementUpdateApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByServiceSample.ts index e1d94d424419..76669128b1cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all APIs of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApis.json */ async function apiManagementListApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.api.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.api.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApis(); + apiManagementListApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByTagsSample.ts index 8a067b4d7eff..e850100bb822 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of apis associated with tags. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApisByTags.json */ async function apiManagementListApisByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.api.listByTags( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.api.listByTags( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApisByTags(); + apiManagementListApisByTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementOperationsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementOperationsListSample.ts index 75c47d43d0ff..59541db1b3e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementOperationsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementOperationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.ApiManagement provider. @@ -21,17 +19,17 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOperations.json */ async function apiManagementListOperations() { - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential); - const resArray = new Array(); - for await (let item of client.apiManagementOperations.list()) { - resArray.push(item); - } - console.log(resArray); + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential); + const resArray = new Array(); + for await (let item of client.apiManagementOperations.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListOperations(); + apiManagementListOperations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts index dfd4316b30c0..b56e46ebb737 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceApplyNetworkConfigurationParameters, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceApplyNetworkConfigurationParameters, + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. @@ -25,29 +23,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json */ async function apiManagementApplyNetworkConfigurationUpdates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { - location: "west us" - }; - const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { - parameters - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName, - serviceName, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { + location: "west us" + }; + const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { + parameters + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( + resourceGroupName, + serviceName, + options + ); + console.log(result); } async function main() { - apiManagementApplyNetworkConfigurationUpdates(); + apiManagementApplyNetworkConfigurationUpdates(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceBackupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceBackupSample.ts index b03c356fdfc1..80209b4270df 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceBackupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceBackupSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceBackupRestoreParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json */ async function apiManagementBackupWithAccessKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -53,25 +51,25 @@ async function apiManagementBackupWithAccessKey() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json */ async function apiManagementBackupWithSystemManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "SystemAssignedManagedIdentity", - backupName: "backup5", - containerName: "apim-backups", - storageAccount: "contosorpstorage" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessType: "SystemAssignedManagedIdentity", + backupName: "backup5", + containerName: "apim-backups", + storageAccount: "contosorpstorage" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -81,32 +79,32 @@ async function apiManagementBackupWithSystemManagedIdentity() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json */ async function apiManagementBackupWithUserAssignedManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "UserAssignedManagedIdentity", - backupName: "backup5", - clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", - containerName: "apim-backups", - storageAccount: "contosorpstorage" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessType: "UserAssignedManagedIdentity", + backupName: "backup5", + clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", + containerName: "apim-backups", + storageAccount: "contosorpstorage" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementBackupWithAccessKey(); - apiManagementBackupWithSystemManagedIdentity(); - apiManagementBackupWithUserAssignedManagedIdentity(); + apiManagementBackupWithAccessKey(); + apiManagementBackupWithSystemManagedIdentity(); + apiManagementBackupWithUserAssignedManagedIdentity(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts index 1a25f9a44a64..3b03fe23aa8f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceCheckNameAvailabilityParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability and correctness of a name for an API Management service. @@ -24,21 +22,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceCheckNameAvailability.json */ async function apiManagementServiceCheckNameAvailability() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { - name: "apimService1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.checkNameAvailability( - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { + name: "apimService1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.checkNameAvailability( + parameters + ); + console.log(result); } async function main() { - apiManagementServiceCheckNameAvailability(); + apiManagementServiceCheckNameAvailability(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCreateOrUpdateSample.ts index 5f7ab735d7d9..1542c0c35733 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceResource, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceResource } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. @@ -24,56 +22,56 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json */ async function apiManagementCreateMultiRegionServiceWithCustomHostname() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - additionalLocations: [ - { - disableGateway: true, - location: "East US", - sku: { name: "Premium", capacity: 1 } - } - ], - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - certificatePassword: "Password", - defaultSslBinding: true, - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "gateway1.msitesting.net" - }, - { - type: "Management", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "mgmt.msitesting.net" - }, - { - type: "Portal", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "portal1.msitesting.net" - } - ], - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + additionalLocations: [ + { + disableGateway: true, + location: "East US", + sku: { name: "Premium", capacity: 1 } + } + ], + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + certificatePassword: "Password", + defaultSslBinding: true, + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "gateway1.msitesting.net" + }, + { + type: "Management", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "mgmt.msitesting.net" + }, + { + type: "Portal", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "portal1.msitesting.net" + } + ], + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkType: "None" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -83,26 +81,26 @@ async function apiManagementCreateMultiRegionServiceWithCustomHostname() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateService.json */ async function apiManagementCreateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + sku: { name: "Developer", capacity: 1 }, + tags: { name: "Contoso", test: "User" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -112,27 +110,27 @@ async function apiManagementCreateService() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceHavingMsi.json */ async function apiManagementCreateServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { type: "SystemAssigned" }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + identity: { type: "SystemAssigned" }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -142,34 +140,34 @@ async function apiManagementCreateServiceHavingMsi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json */ async function apiManagementCreateServiceInVnetWithPublicIP() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US 2 EUAP", - publicIpAddressId: - "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" - }, - virtualNetworkType: "External", - zones: ["1", "2"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "East US 2 EUAP", + publicIpAddressId: + "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + virtualNetworkType: "External", + zones: ["1", "2"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -179,27 +177,27 @@ async function apiManagementCreateServiceInVnetWithPublicIP() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInZones.json */ async function apiManagementCreateServiceInZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "North europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - zones: ["1", "2"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "North europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + zones: ["1", "2"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -209,58 +207,58 @@ async function apiManagementCreateServiceInZones() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json */ async function apiManagementCreateServiceWithCustomHostnameKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - defaultSslBinding: true, - hostName: "gateway1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - }, - { - type: "Management", - hostName: "mgmt.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - }, - { - type: "Portal", - hostName: "portal1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - } - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": {} - } - }, - location: "North Europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + defaultSslBinding: true, + hostName: "gateway1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + type: "Management", + hostName: "mgmt.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + type: "Portal", + hostName: "portal1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + } + ], + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": {} + } + }, + location: "North Europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkType: "None" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -270,27 +268,27 @@ async function apiManagementCreateServiceWithCustomHostnameKeyVault() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json */ async function apiManagementCreateServiceWithNatGatewayEnabled() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US", - natGatewayState: "Enabled", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "East US", + natGatewayState: "Enabled", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -300,34 +298,34 @@ async function apiManagementCreateServiceWithNatGatewayEnabled() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithSystemCertificates.json */ async function apiManagementCreateServiceWithSystemCertificates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - certificates: [ - { - certificatePassword: "Password", - encodedCertificate: - "*******Base64 encoded Certificate******************", - storeName: "CertificateAuthority" - } - ], - location: "Central US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Basic", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + certificates: [ + { + certificatePassword: "Password", + encodedCertificate: + "*******Base64 encoded Certificate******************", + storeName: "CertificateAuthority" + } + ], + location: "Central US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Basic", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -337,32 +335,32 @@ async function apiManagementCreateServiceWithSystemCertificates() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json */ async function apiManagementCreateServiceWithUserAssignedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": {} - } - }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": {} + } + }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -372,39 +370,39 @@ async function apiManagementCreateServiceWithUserAssignedIdentity() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUndelete.json */ async function apiManagementUndelete() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - restore: true, - sku: { name: "Developer", capacity: 1 } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + restore: true, + sku: { name: "Developer", capacity: 1 } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateMultiRegionServiceWithCustomHostname(); - apiManagementCreateService(); - apiManagementCreateServiceHavingMsi(); - apiManagementCreateServiceInVnetWithPublicIP(); - apiManagementCreateServiceInZones(); - apiManagementCreateServiceWithCustomHostnameKeyVault(); - apiManagementCreateServiceWithNatGatewayEnabled(); - apiManagementCreateServiceWithSystemCertificates(); - apiManagementCreateServiceWithUserAssignedIdentity(); - apiManagementUndelete(); + apiManagementCreateMultiRegionServiceWithCustomHostname(); + apiManagementCreateService(); + apiManagementCreateServiceHavingMsi(); + apiManagementCreateServiceInVnetWithPublicIP(); + apiManagementCreateServiceInZones(); + apiManagementCreateServiceWithCustomHostnameKeyVault(); + apiManagementCreateServiceWithNatGatewayEnabled(); + apiManagementCreateServiceWithSystemCertificates(); + apiManagementCreateServiceWithUserAssignedIdentity(); + apiManagementUndelete(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceDeleteSample.ts index dfd1f991b2c0..e8c94d35e97d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing API Management service. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceDeleteService.json */ async function apiManagementServiceDeleteService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginDeleteAndWait( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginDeleteAndWait( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceDeleteService(); + apiManagementServiceDeleteService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts index 8397ca8c3e72..f0f8d220e5d1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the custom domain ownership identifier for an API Management service. @@ -21,16 +19,16 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json */ async function apiManagementServiceGetDomainOwnershipIdentifier() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getDomainOwnershipIdentifier(); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getDomainOwnershipIdentifier(); + console.log(result); } async function main() { - apiManagementServiceGetDomainOwnershipIdentifier(); + apiManagementServiceGetDomainOwnershipIdentifier(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSample.ts index 7163797c6d8d..2441ddb4d138 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets an API Management service resource description. @@ -21,18 +19,18 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json */ async function apiManagementServiceGetMultiRegionInternalVnet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } /** @@ -42,18 +40,18 @@ async function apiManagementServiceGetMultiRegionInternalVnet() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json */ async function apiManagementServiceGetService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } /** @@ -63,24 +61,24 @@ async function apiManagementServiceGetService() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json */ async function apiManagementServiceGetServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetMultiRegionInternalVnet(); - apiManagementServiceGetService(); - apiManagementServiceGetServiceHavingMsi(); + apiManagementServiceGetMultiRegionInternalVnet(); + apiManagementServiceGetService(); + apiManagementServiceGetServiceHavingMsi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSsoTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSsoTokenSample.ts index 5b7a9b85fd34..9fcb0310a374 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSsoTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSsoTokenSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetSsoToken.json */ async function apiManagementServiceGetSsoToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getSsoToken( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getSsoToken( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetSsoToken(); + apiManagementServiceGetSsoToken(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListByResourceGroupSample.ts index 68347b154435..d8cfdb77b689 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListByResourceGroupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all API Management services within a resource group. @@ -21,23 +19,23 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json */ async function apiManagementListServiceBySubscriptionAndResourceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementService.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementService.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListServiceBySubscriptionAndResourceGroup(); + apiManagementListServiceBySubscriptionAndResourceGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListSample.ts index dae98cd98de7..b1b37bc3392a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all API Management services within an Azure subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscription.json */ async function apiManagementListServiceBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementService.list()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementService.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListServiceBySubscription(); + apiManagementListServiceBySubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceMigrateToStv2Sample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceMigrateToStv2Sample.ts index 12b4f998926b..ade1818aa1f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceMigrateToStv2Sample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceMigrateToStv2Sample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceMigrateToStv2.json */ async function apiManagementMigrateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginMigrateToStv2AndWait( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginMigrateToStv2AndWait( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementMigrateService(); + apiManagementMigrateService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceRestoreSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceRestoreSample.ts index d74b73856aad..192343606f8a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceRestoreSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceRestoreSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceBackupRestoreParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRestoreWithAccessKey.json */ async function apiManagementRestoreService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginRestoreAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginRestoreAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementRestoreService(); + apiManagementRestoreService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts index 7e0ad8f9d06f..d50bfe252c7a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all available SKU for a given API Management service @@ -21,21 +19,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Consumption.json */ async function apiManagementListSkUsConsumption() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } /** @@ -45,26 +43,26 @@ async function apiManagementListSkUsConsumption() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Dedicated.json */ async function apiManagementListSkUsDedicated() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListSkUsConsumption(); - apiManagementListSkUsDedicated(); + apiManagementListSkUsConsumption(); + apiManagementListSkUsDedicated(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceUpdateSample.ts index ea2ec6b8aad9..42ca5995a30d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceUpdateParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing API Management service. @@ -24,24 +22,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceDisableTls10.json */ async function apiManagementUpdateServiceDisableTls10() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - customProperties: { - microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + customProperties: { + microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -51,23 +49,23 @@ async function apiManagementUpdateServiceDisableTls10() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServicePublisherDetails.json */ async function apiManagementUpdateServicePublisherDetails() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - publisherEmail: "foobar@live.com", - publisherName: "Contoso Vnext" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + publisherEmail: "foobar@live.com", + publisherName: "Contoso Vnext" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -77,49 +75,49 @@ async function apiManagementUpdateServicePublisherDetails() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json */ async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - additionalLocations: [ - { - location: "Australia East", + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + additionalLocations: [ + { + location: "Australia East", + publicIpAddressId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + sku: { name: "Premium", capacity: 3 }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + }, + zones: ["1", "2", "3"] + } + ], publicIpAddressId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", sku: { name: "Premium", capacity: 3 }, virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + subnetResourceId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" }, + virtualNetworkType: "External", zones: ["1", "2", "3"] - } - ], - publicIpAddressId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", - sku: { name: "Premium", capacity: 3 }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" - }, - virtualNetworkType: "External", - zones: ["1", "2", "3"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateServiceDisableTls10(); - apiManagementUpdateServicePublisherDetails(); - apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); + apiManagementUpdateServiceDisableTls10(); + apiManagementUpdateServicePublisherDetails(); + apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementSkusListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementSkusListSample.ts index 7e31e185e783..f6760b07e8c2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementSkusListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementSkusListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSku.json */ async function listsAllAvailableResourceSkUs() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementSkus.list()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementSkus.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - listsAllAvailableResourceSkUs(); + listsAllAvailableResourceSkUs(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationCreateOrUpdateSample.ts index 57ddd217eb6b..e91d9872911e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OperationContract, - ApiManagementClient + ApiManagementClient, + OperationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new operation in the API or updates an existing one. @@ -24,57 +22,57 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperation.json */ async function apiManagementCreateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters: OperationContract = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User" - } - ] - }, - responses: [ - { - description: "successful operation", - headers: [], - representations: [ - { contentType: "application/xml" }, - { contentType: "application/json" } - ], - statusCode: 200 - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "PetStoreTemplate2"; + const operationId = "newoperations"; + const parameters: OperationContract = { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", + headers: [], + queryParameters: [], + representations: [ + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User" + } + ] + }, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" } + ], + statusCode: 200 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + operationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiOperation(); + apiManagementCreateApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationDeleteSample.ts index d414082a183c..92fe8fc6b30c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified operation in the API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperation.json */ async function apiManagementDeleteApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.delete( + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperation(); + apiManagementDeleteApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetEntityTagSample.ts index 3cebed551155..05c267acae11 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperation.json */ async function apiManagementHeadApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.getEntityTag( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperation(); + apiManagementHeadApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetSample.ts index 10b16a1eceeb..c8cef3845950 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json */ async function apiManagementGetApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } /** @@ -46,27 +44,27 @@ async function apiManagementGetApiOperation() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json */ async function apiManagementGetApiOperationPetStore() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "swagger-petstore"; - const operationId = "loginUser"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "swagger-petstore"; + const operationId = "loginUser"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementGetApiOperation(); - apiManagementGetApiOperationPetStore(); + apiManagementGetApiOperation(); + apiManagementGetApiOperationPetStore(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationListByApiSample.ts index 67fec5856be7..acfbebdfc843 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the operations for the specified API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperations.json */ async function apiManagementListApiOperations() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiOperation.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiOperation.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiOperations(); + apiManagementListApiOperations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts index 97461f9f8ac8..6cd9f3b7f173 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiOperationPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. @@ -25,37 +23,37 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationPolicy.json */ async function apiManagementCreateApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " " - }; - const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const operationId = "5600b57e7e8880006a080001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + " " + }; + const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateApiOperationPolicy(); + apiManagementCreateApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyDeleteSample.ts index 4478ff0fa99a..c810922ed199 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Api Operation. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationPolicy.json */ async function apiManagementDeleteApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "testapi"; + const operationId = "testoperation"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.delete( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperationPolicy(); + apiManagementDeleteApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetEntityTagSample.ts index 5bc3e6ddd58e..8fde1fa291df 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationPolicy.json */ async function apiManagementHeadApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const operationId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperationPolicy(); + apiManagementHeadApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetSample.ts index cab61e48b966..d7b2c3bbcc12 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API Operation level. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json */ async function apiManagementGetApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.get( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const operationId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.get( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetApiOperationPolicy(); + apiManagementGetApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyListByOperationSample.ts index aa843602a285..17f947b56216 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the list of policy configuration at the API Operation level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationPolicies.json */ async function apiManagementListApiOperationPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "599e2953193c3c0bd0b3e2fa"; + const operationId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.listByOperation( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementListApiOperationPolicies(); + apiManagementListApiOperationPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationUpdateSample.ts index 0f79451fcfb9..beb38dd57c47 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OperationUpdateContract, - ApiManagementClient + ApiManagementClient, + OperationUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. @@ -24,62 +22,62 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiOperation.json */ async function apiManagementUpdateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters: OperationUpdateContract = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ - { - name: "param1", - type: "string", - description: - 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"] - } - ] - }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200 - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500 - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.update( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const operationId = "operationId"; + const ifMatch = "*"; + const parameters: OperationUpdateContract = { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: + 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"] + } + ] + }, + responses: [ + { + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200 + }, + { + description: "Server Error.", + headers: [], + representations: [], + statusCode: 500 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.update( + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiOperation(); + apiManagementUpdateApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyCreateOrUpdateSample.ts index fa605ca9b679..04aecfe419bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the API. @@ -25,31 +23,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicy.json */ async function apiManagementCreateApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " " - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + " " + }; + const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + policyId, + parameters, + options + ); + console.log(result); } /** @@ -59,36 +57,36 @@ async function apiManagementCreateApiPolicy() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json */ async function apiManagementCreateApiPolicyNonXmlEncoded() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ' - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ' + }; + const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateApiPolicy(); - apiManagementCreateApiPolicyNonXmlEncoded(); + apiManagementCreateApiPolicy(); + apiManagementCreateApiPolicyNonXmlEncoded(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyDeleteSample.ts index d129e7c63897..b8fc907fc1e5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiPolicy.json */ async function apiManagementDeleteApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.delete( - resourceGroupName, - serviceName, - apiId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "loggerId"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.delete( + resourceGroupName, + serviceName, + apiId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiPolicy(); + apiManagementDeleteApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetEntityTagSample.ts index 65d78626c8c0..1cb14c5148db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiPolicy.json */ async function apiManagementHeadApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadApiPolicy(); + apiManagementHeadApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetSample.ts index 144ec3c40c84..a0607e87cb7c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json */ async function apiManagementGetApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.get( - resourceGroupName, - serviceName, - apiId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b59475ff190048040001"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.get( + resourceGroupName, + serviceName, + apiId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetApiPolicy(); + apiManagementGetApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyListByApiSample.ts index 288412e2c710..7b478adfc0e8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API level. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiPolicies.json */ async function apiManagementListApiPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.listByApi( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b59475ff190048040001"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.listByApi( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementListApiPolicies(); + apiManagementListApiPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiProductListByApisSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiProductListByApisSample.ts index d318b1473b02..0070ec9cab90 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiProductListByApisSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiProductListByApisSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Products, which the API is part of. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiProducts.json */ async function apiManagementListApiProducts() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiProduct.listByApis( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiProduct.listByApis( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiProducts(); + apiManagementListApiProducts(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseCreateOrUpdateSample.ts index cb79c7d8ac65..73d39ee9612c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiReleaseContract, - ApiManagementClient + ApiManagementClient, + ApiReleaseContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Release for the API. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRelease.json */ async function apiManagementCreateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - releaseId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "testrev"; + const parameters: ApiReleaseContract = { + apiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + releaseId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiRelease(); + apiManagementCreateApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseDeleteSample.ts index 5632e6d7ca5f..c336777b384b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified release in the API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiRelease.json */ async function apiManagementDeleteApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.delete( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5a5fcc09124a7fa9b89f2f1d"; + const releaseId = "testrev"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.delete( + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiRelease(); + apiManagementDeleteApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetEntityTagSample.ts index 22a8e6432079..a82d98e30885 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the etag of an API release. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiRelease.json */ async function apiManagementHeadApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.getEntityTag( - resourceGroupName, - serviceName, - apiId, - releaseId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "5a7cb545298324c53224a799"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.getEntityTag( + resourceGroupName, + serviceName, + apiId, + releaseId + ); + console.log(result); } async function main() { - apiManagementHeadApiRelease(); + apiManagementHeadApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetSample.ts index 910b9cc7aa94..fd9b137f6bd4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the details of an API release. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json */ async function apiManagementGetApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.get( - resourceGroupName, - serviceName, - apiId, - releaseId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "5a7cb545298324c53224a799"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.get( + resourceGroupName, + serviceName, + apiId, + releaseId + ); + console.log(result); } async function main() { - apiManagementGetApiRelease(); + apiManagementGetApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseListByServiceSample.ts index 8d7992118402..64127e944b8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiReleases.json */ async function apiManagementListApiReleases() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiRelease.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiRelease.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiReleases(); + apiManagementListApiReleases(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseUpdateSample.ts index 36d6b1ea7b60..2ce58ccc3844 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiReleaseContract, - ApiManagementClient + ApiManagementClient, + ApiReleaseContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiRelease.json */ async function apiManagementUpdateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.update( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "testrev"; + const ifMatch = "*"; + const parameters: ApiReleaseContract = { + apiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.update( + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiRelease(); + apiManagementUpdateApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiRevisionListByServiceSample.ts index 369b6861fae5..576b24fb92ad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiRevisionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all revisions of an API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiRevisions.json */ async function apiManagementListApiRevisions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiRevision.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiRevision.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiRevisions(); + apiManagementListApiRevisions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaCreateOrUpdateSample.ts index e83665edc36a..41be2f7461da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SchemaContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, SchemaContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates schema configuration for the API. @@ -21,32 +19,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiSchema.json */ async function apiManagementCreateApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters: SchemaContract = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const parameters: SchemaContract = { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiSchema(); + apiManagementCreateApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaDeleteSample.ts index e3295239b6d1..713facf24838 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the schema configuration at the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiSchema.json */ async function apiManagementDeleteApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.delete( - resourceGroupName, - serviceName, - apiId, - schemaId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const schemaId = "59d5b28e1f7fab116402044e"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.delete( + resourceGroupName, + serviceName, + apiId, + schemaId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiSchema(); + apiManagementDeleteApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetEntityTagSample.ts index 152d4181d025..2aedc068386e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiSchema.json */ async function apiManagementHeadApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.getEntityTag( - resourceGroupName, - serviceName, - apiId, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.getEntityTag( + resourceGroupName, + serviceName, + apiId, + schemaId + ); + console.log(result); } async function main() { - apiManagementHeadApiSchema(); + apiManagementHeadApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetSample.ts index 0c9e2208fe4e..40781462ab34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the schema configuration at the API level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json */ async function apiManagementGetApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.get( - resourceGroupName, - serviceName, - apiId, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.get( + resourceGroupName, + serviceName, + apiId, + schemaId + ); + console.log(result); } async function main() { - apiManagementGetApiSchema(); + apiManagementGetApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaListByApiSample.ts index b82721c480f1..5b592fd0ac0b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the schema configuration at the API level. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiSchemas.json */ async function apiManagementListApiSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiSchema.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiSchema.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiSchemas(); + apiManagementListApiSchemas(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts index a47471031228..a684f521a1fb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - TagDescriptionCreateParameters, - ApiManagementClient + ApiManagementClient, + TagDescriptionCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create/Update tag description in scope of the Api. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTagDescription.json */ async function apiManagementCreateApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagDescriptionId = "tagId1"; - const parameters: TagDescriptionCreateParameters = { - description: - "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", - externalDocsDescription: "Description of the external docs resource", - externalDocsUrl: "http://some.url/additionaldoc" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5931a75ae4bbd512a88c680b"; + const tagDescriptionId = "tagId1"; + const parameters: TagDescriptionCreateParameters = { + description: + "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + externalDocsDescription: "Description of the external docs resource", + externalDocsUrl: "http://some.url/additionaldoc" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiTagDescription(); + apiManagementCreateApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionDeleteSample.ts index bb648aafb5be..c89fd8aa72e9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete tag description for the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTagDescription.json */ async function apiManagementDeleteApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagDescriptionId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.delete( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const tagDescriptionId = "59d5b28e1f7fab116402044e"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.delete( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiTagDescription(); + apiManagementDeleteApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetEntityTagSample.ts index da9fc62a5c2a..0507a111064c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTagDescription.json */ async function apiManagementHeadApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.getEntityTag( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.getEntityTag( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId + ); + console.log(result); } async function main() { - apiManagementHeadApiTagDescription(); + apiManagementHeadApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetSample.ts index afe59cf901ea..f65ddc6b08a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Tag description in scope of API @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json */ async function apiManagementGetApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.get( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.get( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId + ); + console.log(result); } async function main() { - apiManagementGetApiTagDescription(); + apiManagementGetApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionListByServiceSample.ts index 87dc8f957b82..fe39c620a5c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTagDescriptions.json */ async function apiManagementListApiTagDescriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiTagDescription.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiTagDescription.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiTagDescriptions(); + apiManagementListApiTagDescriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiUpdateSample.ts index 452f2a8c93fc..c1bd6c38b496 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiUpdateContract, - ApiManagementClient + ApiManagementClient, + ApiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specified API of the API Management service instance. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApi.json */ async function apiManagementUpdateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters: ApiUpdateContract = { - path: "newecho", - displayName: "Echo API New", - serviceUrl: "http://echoapi.cloudapp.net/api2" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const ifMatch = "*"; + const parameters: ApiUpdateContract = { + path: "newecho", + displayName: "Echo API New", + serviceUrl: "http://echoapi.cloudapp.net/api2" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.update( + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApi(); + apiManagementUpdateApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetCreateOrUpdateSample.ts index e99607ed0708..cdf359c7a089 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiVersionSetContract, - ApiManagementClient + ApiManagementClient, + ApiVersionSetContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a Api Version Set. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiVersionSet.json */ async function apiManagementCreateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "api1"; - const parameters: ApiVersionSetContract = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - versionSetId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "api1"; + const parameters: ApiVersionSetContract = { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.createOrUpdate( + resourceGroupName, + serviceName, + versionSetId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiVersionSet(); + apiManagementCreateApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetDeleteSample.ts index 1b5131200550..2536236caf34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Api Version Set. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiVersionSet.json */ async function apiManagementDeleteApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "a1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.delete( - resourceGroupName, - serviceName, - versionSetId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "a1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.delete( + resourceGroupName, + serviceName, + versionSetId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiVersionSet(); + apiManagementDeleteApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetEntityTagSample.ts index a13138798b8a..d9293aa44755 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiVersionSet.json */ async function apiManagementHeadApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - versionSetId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.getEntityTag( + resourceGroupName, + serviceName, + versionSetId + ); + console.log(result); } async function main() { - apiManagementHeadApiVersionSet(); + apiManagementHeadApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetSample.ts index 3c18cf6498b8..2a4661ef56bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json */ async function apiManagementGetApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.get( - resourceGroupName, - serviceName, - versionSetId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.get( + resourceGroupName, + serviceName, + versionSetId + ); + console.log(result); } async function main() { - apiManagementGetApiVersionSet(); + apiManagementGetApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetListByServiceSample.ts index e69cc77fbc18..1be2c7635edc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of API Version Sets in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiVersionSets.json */ async function apiManagementListApiVersionSets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiVersionSet.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiVersionSet.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiVersionSets(); + apiManagementListApiVersionSets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetUpdateSample.ts index f24581aaafc9..5e435142f803 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiVersionSetUpdateParameters, - ApiManagementClient + ApiManagementClient, + ApiVersionSetUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiVersionSet.json */ async function apiManagementUpdateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters: ApiVersionSetUpdateParameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.update( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const ifMatch = "*"; + const parameters: ApiVersionSetUpdateParameters = { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.update( + resourceGroupName, + serviceName, + versionSetId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiVersionSet(); + apiManagementUpdateApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiCreateOrUpdateSample.ts index ff3225655428..d388065c605f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, WikiContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Wiki for an API or updates an existing one. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWiki.json */ async function apiManagementCreateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const parameters: WikiContract = { + documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiWiki(); + apiManagementCreateApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiDeleteSample.ts index 6264ade4faf7..2f9eb975013e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Wiki from an API. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiWiki.json */ async function apiManagementDeleteApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.delete( + resourceGroupName, + serviceName, + apiId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiWiki(); + apiManagementDeleteApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetEntityTagSample.ts index 0357a5166461..7cadca565ddf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiWiki.json */ async function apiManagementHeadApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.getEntityTag( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.getEntityTag( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadApiWiki(); + apiManagementHeadApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetSample.ts index 359249679756..e1ebfee205c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for an API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiWiki.json */ async function apiManagementGetApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.get( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.get( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementGetApiWiki(); + apiManagementGetApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiUpdateSample.ts index 0e9975b5e0ed..6a334372a2ec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - WikiUpdateContract, - ApiManagementClient + ApiManagementClient, + WikiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Wiki for an API specified by its identifier. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiWiki.json */ async function apiManagementUpdateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const parameters: WikiUpdateContract = { + documents: [{ documentationId: "docId1" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.update( + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiWiki(); + apiManagementUpdateApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikisListSample.ts index 8fabc4f2fdfc..103a943a3408 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the wikis for an API specified by its identifier. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiWikis.json */ async function apiManagementListApiWikis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiWikis.list( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiWikis.list( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiWikis(); + apiManagementListApiWikis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts index bbad6c195ebc..6ca83513025b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationAccessPolicyContract, - ApiManagementClient + ApiManagementClient, + AuthorizationAccessPolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates Authorization Access Policy. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json */ async function apiManagementCreateAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const parameters: AuthorizationAccessPolicyContract = { - objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", - tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const parameters: AuthorizationAccessPolicyContract = { + objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationAccessPolicy(); + apiManagementCreateAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyDeleteSample.ts index 96e976d1186f..5c6a74192fe1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific access policy from the Authorization. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json */ async function apiManagementDeleteAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorizationAccessPolicy(); + apiManagementDeleteAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyGetSample.ts index fe3c3e9890dd..907ba43ff887 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization access policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json */ async function apiManagementGetAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.get( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationAccessPolicy(); + apiManagementGetAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts index c09bd1ad1709..e093bea742ca 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization access policy defined within a authorization. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationAccessPolicies.json */ async function apiManagementListAuthorizationAccessPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizationAccessPolicy.listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorizationAccessPolicy.listByAuthorization( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationAccessPolicies(); + apiManagementListAuthorizationAccessPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationConfirmConsentCodeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationConfirmConsentCodeSample.ts index 547d469315fa..02e3c9430ee1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationConfirmConsentCodeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationConfirmConsentCodeSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationConfirmConsentCodeRequestContract, - ApiManagementClient + ApiManagementClient, + AuthorizationConfirmConsentCodeRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Confirm valid consent code to suppress Authorizations anti-phishing page. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json */ async function apiManagementPostAuthorizationConfirmConsentCodeRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationConfirmConsentCodeRequestContract = { - consentCode: "theconsentcode" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.confirmConsentCode( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const parameters: AuthorizationConfirmConsentCodeRequestContract = { + consentCode: "theconsentcode" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.confirmConsentCode( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementPostAuthorizationConfirmConsentCodeRequest(); + apiManagementPostAuthorizationConfirmConsentCodeRequest(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationCreateOrUpdateSample.ts index 1a82f36465af..a60e56983ca4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationContract, - ApiManagementClient + ApiManagementClient, + AuthorizationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates authorization. @@ -24,27 +22,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json */ async function apiManagementCreateAuthorizationAadAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz2"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz2"; + const parameters: AuthorizationContract = { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } /** @@ -54,36 +52,36 @@ async function apiManagementCreateAuthorizationAadAuthCode() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADClientCred.json */ async function apiManagementCreateAuthorizationAadClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const authorizationId = "authz1"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - parameters: { - clientId: "", - clientSecret: "" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithclientcred"; + const authorizationId = "authz1"; + const parameters: AuthorizationContract = { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode", + parameters: { + clientId: "", + clientSecret: "" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationAadAuthCode(); - apiManagementCreateAuthorizationAadClientCred(); + apiManagementCreateAuthorizationAadAuthCode(); + apiManagementCreateAuthorizationAadClientCred(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationDeleteSample.ts index f049fbee5467..6fa94c732ec6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Authorization from the Authorization provider. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorization.json */ async function apiManagementDeleteAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorization(); + apiManagementDeleteAuthorization(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationGetSample.ts index be32aa09673c..378f747c27e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json */ async function apiManagementGetAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.get( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId + ); + console.log(result); } async function main() { - apiManagementGetAuthorization(); + apiManagementGetAuthorization(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationListByAuthorizationProviderSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationListByAuthorizationProviderSample.ts index 18367a048a92..ae80b4300efb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationListByAuthorizationProviderSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationListByAuthorizationProviderSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationLoginLinksPostSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationLoginLinksPostSample.ts index d82ee1d5c076..1f49c6e178ea 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationLoginLinksPostSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationLoginLinksPostSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets authorization login links. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderCreateOrUpdateSample.ts index 82b92215f73d..97e851aea9bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates authorization provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderDeleteSample.ts index 07df09fdf5d7..8babd107bee7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific authorization provider from the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderGetSample.ts index 50b24da54c3c..f4890a98db67 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization provider specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderListByServiceSample.ts index 8e52e14dc82e..3f9cb3add92d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization providers defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerCreateOrUpdateSample.ts index bbfb1a8599c5..82ba32e4e78a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new authorization server or updates an existing authorization server. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerDeleteSample.ts index 3ead60ddd985..55d9eea9a140 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific authorization server instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetEntityTagSample.ts index 959f296d1087..1e358dd47774 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the authorizationServer specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetSample.ts index 322be95d80db..465e8b1cbb15 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization server specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListByServiceSample.ts index 56d4ccf2e5e3..93274758d873 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization servers defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListSecretsSample.ts index 6d2fbddadcee..8ca131687223 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the authorization server. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerUpdateSample.ts index 24b94f08763c..05d323bd2aec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the authorization server specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendCreateOrUpdateSample.ts index c962b8e6b75f..0ab8b09e56a7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { BackendContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendDeleteSample.ts index 89e8c3271c29..02e67bc34530 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetEntityTagSample.ts index 06cc146efc13..2bd014746f3a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetSample.ts index c2d4ae96f020..ed7237aa6df4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the backend specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendListByServiceSample.ts index 0ea9b79265ac..ab8918109117 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of backends in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendReconnectSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendReconnectSample.ts index a60be7c63a0d..8e00c30f54f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendReconnectSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendReconnectSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendUpdateSample.ts index 164258fb978d..0f7328aeeb25 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheCreateOrUpdateSample.ts index 7fa6eb6b20b2..7d56fe384d86 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CacheContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an External Cache to be used in Api Management instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheDeleteSample.ts index 80b4454d8db3..e768c682e6ea 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Cache. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetEntityTagSample.ts index 777ee99d6b6a..134e0b75a023 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Cache specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetSample.ts index df653474196e..b09a9ca84840 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Cache specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheListByServiceSample.ts index 655ecf451ab5..881da8a2c120 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of all external Caches in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheUpdateSample.ts index 72414be63f55..5312f34386a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the cache specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateCreateOrUpdateSample.ts index 39f489f9dc7f..8972ef317f2d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateDeleteSample.ts index 6a9d5dd55b4d..e9cfdd16ed7c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific certificate. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetEntityTagSample.ts index a10bcb576854..cda6e2f48f3d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetSample.ts index ae96d2c19d89..3ec4aef0c177 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the certificate specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateListByServiceSample.ts index 3f53047c01a7..91b6095dc55a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of all certificates in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateRefreshSecretSample.ts index 2df0975cf3d9..7f1c43b2771c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateRefreshSecretSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemCreateOrUpdateSample.ts index e650e8e1978c..9567a195ed67 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new developer portal's content item specified by the provided content type. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemDeleteSample.ts index 11087f6fc4f8..fcd96517a5b9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the specified developer portal's content item. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetEntityTagSample.ts index ff7b36dcc8fc..1511c36041bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetSample.ts index 968f7c3e2f59..cc5a8fcc8fbf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the developer portal's content item specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemListByServiceSample.ts index d5684141c4f0..d42de360250d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists developer portal's content items specified by the provided content type. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeCreateOrUpdateSample.ts index 1bd7e4b5480e..7f668c610449 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeDeleteSample.ts index 06a31ac831f8..3b0ab0755877 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeGetSample.ts index 704be3e32425..0009abcfe9a1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeListByServiceSample.ts index bfa265259683..fe5ba00fd77d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsCreateOrUpdateSample.ts index fc1b1af5df15..24ec62bacc00 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Delegation settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetEntityTagSample.ts index b475a59e8cae..983dc92bd49b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the DelegationSettings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetSample.ts index 75b202cf5f2d..f38d5aea198a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Delegation Settings for the Portal. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsListSecretsSample.ts index e25d4dbb0799..39ce5a4d6c17 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the secret validation key of the DelegationSettings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsUpdateSample.ts index 7b55289658ab..4dd5090b9661 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Delegation settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesGetByNameSample.ts index 337137849a4c..cddd5476b1c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesGetByNameSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get soft-deleted Api Management Service by name. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesListBySubscriptionSample.ts index 5eeb2e8df550..517c8131c05b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all soft-deleted services available for undelete for the given subscription. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesPurgeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesPurgeSample.ts index a94e70bc93a6..4eb15012f767 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesPurgeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesPurgeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Purges Api Management Service (deletes it with no option to undelete). diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticCreateOrUpdateSample.ts index 70a9099bd2df..11b9025b2480 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticDeleteSample.ts index bf4f61249fba..25fc2a67bfe9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Diagnostic. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetEntityTagSample.ts index bf02e420f049..9b260be4bb7a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetSample.ts index 2f03f3c2761e..a9b9e39e99bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticListByServiceSample.ts index af3227d1b4ee..56dcf18ed0ac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all diagnostics of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticUpdateSample.ts index 25129fa4da7f..564e09d884c4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationCreateOrUpdateSample.ts index c93160bb7a2a..5be833175b70 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Documentation or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationDeleteSample.ts index 53e3bffd4cf8..8f1cdd504653 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Documentation from an API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetEntityTagSample.ts index 759b162c1923..48ef3304d283 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Documentation by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetSample.ts index 36c1dee0d237..5937e2d7f329 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Documentation specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationListByServiceSample.ts index 81d580cba1c0..29d44b6b200b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Documentations of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationUpdateSample.ts index 75c50bab8387..59835430916b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Documentation for an API specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateCreateOrUpdateSample.ts index 7728b147c808..a3d1c6b184fd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an Email Template. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateDeleteSample.ts index b71dcb4448f2..05bb3f200a8b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Reset the Email Template to default template provided by the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetEntityTagSample.ts index 16ef6774de91..0e7bd779cd4b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the email template specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetSample.ts index aeca9f9c866f..51ab3196c3d3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the email template specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateListByServiceSample.ts index 63bc176c0c17..e88513f46a8a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all email templates diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateUpdateSample.ts index 8d8bc4674f2a..429944876a41 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates API Management email template diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiCreateOrUpdateSample.ts index 18d91215c721..89967a0a7f92 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds an API to the specified Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiDeleteSample.ts index 545a5fb3fa6c..87b8e5142545 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API from the specified Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiGetEntityTagSample.ts index c76d571bda2b..d8ebc50ec920 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Gateway entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiListByServiceSample.ts index 219156cf842f..6c8b96d2c049 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the APIs associated with a gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts index 7f02030ccead..21bed98fe1b6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign Certificate entity to Gateway entity as Certificate Authority. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityDeleteSample.ts index 64119cc426fe..13992f1570e5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Remove relationship between Certificate Authority and Gateway entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts index ad89c233c59d..cd0fd26077cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetSample.ts index 91b55f332cfd..4d74ef3c5467 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get assigned Gateway Certificate Authority details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts index 46ca481ae49a..232560e95569 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of Certificate Authorities for the specified Gateway entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCreateOrUpdateSample.ts index f9591b69eda0..8156b32b1f68 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates a Gateway to be used in Api Management instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayDeleteSample.ts index 1bea683bd048..0f9ba3c2f500 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGenerateTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGenerateTokenSample.ts index 80a2efeba293..b058f9c07649 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGenerateTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGenerateTokenSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Shared Access Authorization Token for the gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetEntityTagSample.ts index 0f48e7d8330d..f14638bd080e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Gateway specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetSample.ts index c1bdd463a2c0..517c95230b48 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Gateway specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts index 1639e06ed352..63f9197c9dc5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates of updates hostname configuration for a Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationDeleteSample.ts index 54c551d5ca3f..160f54ca3315 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified hostname configuration from the specified Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts index 3b69b1ded4ac..4610849de011 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetSample.ts index 5d4c94cf881c..4d146ac98e63 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get details of a hostname configuration diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts index 601b7cdf9380..f3c1bac39066 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of hostname configurations for the specified gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListByServiceSample.ts index c46a48468460..cc948b6565f7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of gateways registered with service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListKeysSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListKeysSample.ts index 5336e78a40e4..e3e7a5e3f3fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListKeysSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves gateway keys. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayRegenerateKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayRegenerateKeySample.ts index b926cf8923ca..de5fc2ff0b7d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayRegenerateKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates specified gateway key invalidating any tokens created with it. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayUpdateSample.ts index 42aac3e1f49b..303c6ac71355 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the gateway specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaCreateOrUpdateSample.ts index 32ac578cfd09..882311e80753 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaDeleteSample.ts index 5dbe2be68ada..8ed564ec1429 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Schema. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetEntityTagSample.ts index 2a51c0f0c444..aae11a93d9bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetSample.ts index 42db81867552..7ed30bce35a9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Schema specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaListByServiceSample.ts index ccf80484dc1b..c2819bce284a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of schemas registered with service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts index 0be021db2d26..9bae6f1a0749 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new resolver in the GraphQL API or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverDeleteSample.ts index 1245129ed7b1..050dfeff5017 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified resolver in the GraphQL API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetEntityTagSample.ts index b731793feb11..b5317efbe374 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetSample.ts index 465795df47aa..0f6f1c67902a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the GraphQL API Resolver specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverListByApiSample.ts index 214ff987de36..f908800da504 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the resolvers for the specified GraphQL API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts index a5d83821ea5a..437d10cb8a23 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the GraphQL API Resolver level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyDeleteSample.ts index 8d1d88254c10..2f971f02062b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the GraphQL Api Resolver. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts index 9833f1305764..bd95f809b803 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetSample.ts index 97caed6b595f..a6fb07c32ef9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the GraphQL API Resolver level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts index d5197b45a4a2..4fac6ebf97a1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the list of policy configuration at the GraphQL API Resolver level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverUpdateSample.ts index 8f314c52b3b0..4550e1c09757 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the resolver in the GraphQL API specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupCreateOrUpdateSample.ts index 9f2b325d87e5..640e56f60b73 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a group. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupDeleteSample.ts index 48247657e14d..6eb414b51dce 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific group of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetEntityTagSample.ts index a68c30cc8bfa..cf90c6e1d0a3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetSample.ts index 954018f98006..a056d0ed6180 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the group specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupListByServiceSample.ts index 898b9bd81891..f6b0e017a27b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of groups defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUpdateSample.ts index 0b10d48bb5f0..d55efe893709 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the group specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCheckEntityExistsSample.ts index 80e1301ef726..d0b673d74844 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCreateSample.ts index 478e1258ad62..6621c84864e0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCreateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Add existing user to existing group diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserDeleteSample.ts index 0eaf12e68670..d09862ffd1f6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Remove existing user from existing group. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserListSample.ts index fd400a0f3b46..718370543fd6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of user entities associated with the group. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderCreateOrUpdateSample.ts index ecfeceb3981f..745850d75956 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates the IdentityProvider configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderDeleteSample.ts index 71a8daa2cbde..68b1727ed567 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified identity provider configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetEntityTagSample.ts index 09632aa479ab..dbff02cfe4a5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the identityProvider specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetSample.ts index 8b752758b132..411a8de1d914 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the configuration details of the identity Provider configured in specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListByServiceSample.ts index 5bb324ed67cf..8497615c8772 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of Identity Provider configured in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListSecretsSample.ts index 70a322ad24bf..01c8c6623602 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the Identity Provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderUpdateSample.ts index 0baf25c1a6bb..70b5c8c6ec97 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing IdentityProvider configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueGetSample.ts index 9402037685c9..eade92bfce5c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets API Management issue details diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueListByServiceSample.ts index e03dde4ead14..edc74dd9be21 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of issues in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerCreateOrUpdateSample.ts index c3c5cb5ef180..545059b4c223 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { LoggerContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a logger. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerDeleteSample.ts index 14c89372bfbb..d0847ef4c91b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified logger. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetEntityTagSample.ts index c2efb9adfe7f..179ebf9e871f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetSample.ts index 319d80a96ad3..9c2cbaab4ed2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the logger specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerListByServiceSample.ts index 8e8d29247d7d..54a55b5a833b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of loggers in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerUpdateSample.ts index 7bec1a7e2aed..1bd1aa43678b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing logger. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueCreateOrUpdateSample.ts index b664bf11298b..907796b53a20 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates named value. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueDeleteSample.ts index c912a4917fb8..3159d1fb0484 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific named value from the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetEntityTagSample.ts index 684c6668907c..701f919fb60a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetSample.ts index 5d09d87343c4..35e9a9720f20 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the named value specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListByServiceSample.ts index e05a515d0cd9..75464bbb5059 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of named values defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListValueSample.ts index 7315ca2e36fd..beb822110aec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListValueSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListValueSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the secret of the named value specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueRefreshSecretSample.ts index d8b65d0629f4..18346a0fda99 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueRefreshSecretSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueUpdateSample.ts index 9fd0bbc236ff..812dbaf00c4d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specific named value. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByLocationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByLocationSample.ts index dcbf086b6585..f9d0e620bafb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByLocationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByLocationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByServiceSample.ts index 48fb6a23d155..5a262d87487e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationCreateOrUpdateSample.ts index 95fa2dd5381c..d25f79fd103c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update API Management publisher notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationGetSample.ts index 2a08272429b9..85b395b01f3e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Notification specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationListByServiceSample.ts index 95e627c3ccee..5fa4ed071c24 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of properties defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts index 4441a393355a..db6e289cbb39 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts index 023934f6b822..4a9ca9a70999 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailDeleteSample.ts index 50dfa04d1459..e69289d02ec8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the email from the list of Notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailListByNotificationSample.ts index 9fff72cb91b0..010262b100d2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailListByNotificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts index bb3198fff996..d99b6b9ec0e7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts index ecd636d6d144..e899940f7f07 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserDeleteSample.ts index 4b9a9cffdc73..9eb3af39d600 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the API Management user from the list of Notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserListByNotificationSample.ts index 896b3fa1229d..92c5fc09af82 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserListByNotificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts index d3b7b73512a3..a855b84c8668 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the OpenID Connect Provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderDeleteSample.ts index 851ef6e96bae..29e30e4c81a0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific OpenID Connect Provider of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetEntityTagSample.ts index 3fad780de809..846243b8d5cb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetSample.ts index d5b66b9273cf..d35771eb4ee6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets specific OpenID Connect Provider without secrets. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListByServiceSample.ts index 12ffc8b82acb..b8b29fde367f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists of all the OpenId Connect Providers. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListSecretsSample.ts index d95e052fdf92..ef33b29baa4e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the OpenID Connect Provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderUpdateSample.ts index fd234805fd9b..24a281a155e7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specific OpenID Connect Provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/operationListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/operationListByTagsSample.ts index dc1f21a02321..2c8012c91e9c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/operationListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/operationListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of operations associated with tags. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts index 7898f0ffe380..d22de2c19e9d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the network endpoints of all outbound dependencies of a ApiManagement service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/performConnectivityCheckAsyncSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/performConnectivityCheckAsyncSample.ts index 76d71f8fae04..43dc71f71905 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/performConnectivityCheckAsyncSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/performConnectivityCheckAsyncSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyCreateOrUpdateSample.ts index f625c32d2ff8..51e919ed3c08 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the global policy configuration of the Api Management service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDeleteSample.ts index 69985f3c563d..87c5caf13d8c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the global policy configuration of the Api Management Service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDescriptionListByServiceSample.ts index 4ae78b0f8e5b..259703059d2f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDescriptionListByServiceSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all policy descriptions. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentCreateOrUpdateSample.ts index d703b1724e37..1b294b70238f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates a policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentDeleteSample.ts index 8f6a6cdd6606..6bfba4b8d33c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetEntityTagSample.ts index cdc2c3e3c213..905eb582f49a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetSample.ts index 19083d34fdcc..20e083624ee0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListByServiceSample.ts index 353baac0c7c2..984bc8d44803 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all policy fragments. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListReferencesSample.ts index 2915136023ac..b3b6c6cd87a8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListReferencesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListReferencesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists policy resources that reference the policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetEntityTagSample.ts index 9db6f475ac6c..c0ae8ca5385a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Global policy definition in the Api Management service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetSample.ts index 7d7a1ace58ce..9ca6bbca25ac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the Global policy definition of the Api Management service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyListByServiceSample.ts index 8d8b7608c482..653cc575caf7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the Global Policy definitions of the Api Management service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigCreateOrUpdateSample.ts index 4f96bd2686ef..947982c3e13e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update the developer portal configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetEntityTagSample.ts index ce2436ba1b65..a0e2753146eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the developer portal configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetSample.ts index 5463fc5e330b..db1f42783f24 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the developer portal configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigListByServiceSample.ts index 39148724a093..3db3ce793971 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the developer portal configurations. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigUpdateSample.ts index f46de1dcd5d3..f4e6988009be 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update the developer portal configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionCreateOrUpdateSample.ts index 0246e008cac5..20b8697a8ad3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetEntityTagSample.ts index c731ded35a84..59b05472112c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the developer portal revision specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetSample.ts index 90ec6a242e8a..64bbf5a0fa5e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the developer portal's revision specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionListByServiceSample.ts index 8cf1e88339e6..5229be59f098 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists developer portal's revisions. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionUpdateSample.ts index 7e31dbff5bdf..af5fcf434671 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the description of specified portal revision or makes it current. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalSettingsListByServiceSample.ts index b16d6107ba68..94696a61b2b9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalSettingsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of portalsettings defined within a service instance.. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts index 808909204a6f..c0eaf6b89f04 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Private Endpoint Connection or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionDeleteSample.ts index a0cc9313d7b5..da453578a39f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Private Endpoint Connection. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetByNameSample.ts index ed705263e493..fe4a629d5d8c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetByNameSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Private Endpoint Connection specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts index 10b6a4e2a268..f118c2b14288 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListByServiceSample.ts index 6527fddd32b9..89de1f8143bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all private endpoint connections of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts index 50bed1bc390c..4fdad9396bbd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCheckEntityExistsSample.ts index 7e70371099cc..80cbeb29f1c4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Product entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCreateOrUpdateSample.ts index 9e15389960c7..fc2b8e1a37f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds an API to the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiDeleteSample.ts index d404bc767db3..9702dd8ceafb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API from the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiListByProductSample.ts index 53b66522bb8d..230aa0761421 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the APIs associated with a product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productCreateOrUpdateSample.ts index 6232d0b6ba2c..02b038ec3487 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ProductContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productDeleteSample.ts index 241c237c9a47..5564bcd7203c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productDeleteSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetEntityTagSample.ts index b615b809896e..59c744b9baa3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetSample.ts index 4ec43bce9e7b..761d0c2ac66e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCheckEntityExistsSample.ts index 16437f00cc40..70c014b2dd35 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that Group entity specified by identifier is associated with the Product entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCreateOrUpdateSample.ts index 5ddd2bd110d7..b023171ebd98 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the association between the specified developer group with the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupDeleteSample.ts index 94c45c59a732..2c7ee9ca361f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the association between the specified group and product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupListByProductSample.ts index bc88afdb591e..3314fab08dce 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of developer groups associated with the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByServiceSample.ts index ae381908848f..10db0392ecd5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of products in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByTagsSample.ts index d8274ee2a74b..23590851bdd6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of products associated with tags. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyCreateOrUpdateSample.ts index 0f73b1c7dec0..544bdfa438f2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyDeleteSample.ts index ddd21565a8ec..ade367012b0c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetEntityTagSample.ts index 583cd01a7292..72b58d825b56 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetSample.ts index 8591ab0faa18..b978b18f8a5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the Product level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyListByProductSample.ts index 592a208c2a38..a11e9557372d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the Product level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productSubscriptionsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productSubscriptionsListSample.ts index 92a57cc82332..fae76e7157fa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productSubscriptionsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of subscriptions to the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productUpdateSample.ts index 108231efc6eb..37c20095eaab 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update existing product details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiCreateOrUpdateSample.ts index 62626d52456d..e9d41e0dd367 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Wiki for a Product or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiDeleteSample.ts index c6a47ccec611..d3eea3eb0f0f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Wiki from a Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetEntityTagSample.ts index a038f7af6758..b6f6c26115b9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetSample.ts index 813b2cf26058..055b98ae692a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiUpdateSample.ts index 9b7c4f9d648f..07e305a909d6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Wiki for a Product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikisListSample.ts index eae0b06af239..eca421cb8ec6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysListByServiceSample.ts index e30cd43ebd6b..27f49c34e32c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysUpdateSample.ts index 915cac0059d3..85a4429e9a54 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysGetSample.ts index e6c9445e5125..b65f03337bd5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysUpdateSample.ts index 2a5951cdc029..4fa2acfc3c0f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing quota counter value in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/regionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/regionListByServiceSample.ts index efd5680f27b7..b0c32ff87f2f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/regionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/regionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all azure regions in which the service exists. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByApiSample.ts index 2c79ef784584..6da489169eaa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByGeoSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByGeoSample.ts index 09abd47808a9..891c3b1f8ad3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByGeoSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByGeoSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by geography. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByOperationSample.ts index cf11ce2a1a6d..24bd7cf5544f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by API Operations. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByProductSample.ts index ba62392350d4..9aaeed4b0d54 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByRequestSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByRequestSample.ts index 1e164289dd9c..12d5b2ed421e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByRequestSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByRequestSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Request. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListBySubscriptionSample.ts index 6de51ec97e0f..565745332baf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by subscription. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByTimeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByTimeSample.ts index 181ea10ce899..bf087208f9a6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByTimeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByTimeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Time. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByUserSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByUserSample.ts index 4291513d0653..7c75b2c478fa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByUserSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByUserSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by User. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsCreateOrUpdateSample.ts index f266ccfc4c65..c15bedec0200 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Sign-In settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetEntityTagSample.ts index 2c52470d5ce3..db685bb518ec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the SignInSettings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetSample.ts index 28f28743a6c1..8c49ada03d78 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Sign In Settings for the Portal diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsUpdateSample.ts index c89f5a49379b..d9d5b2a146fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Sign-In settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsCreateOrUpdateSample.ts index ad1197c5fffd..5b12deca4e31 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Sign-Up settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetEntityTagSample.ts index 9143fe8bdcf0..484d69254188 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the SignUpSettings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetSample.ts index 319a4b7bd46f..437390c8fecf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Sign Up Settings for the Portal diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsUpdateSample.ts index 7741a12efa7e..c8cd2e80070c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Sign-Up settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionCreateOrUpdateSample.ts index 05e275c85dc4..a40b33c0aaf1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionDeleteSample.ts index 67f671d3a2e2..197324b0aa15 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified subscription. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetEntityTagSample.ts index 99b2bf3acad1..5a86cfb1ce51 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetSample.ts index 59dd2b118352..a2f425019ba1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSample.ts index 29b594046e65..41dc28ffebb9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all subscriptions of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSecretsSample.ts index 5965ee649a51..c58c432edc20 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription keys. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegeneratePrimaryKeySample.ts index 28088928c4d8..fc3b464e0b30 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates primary key of existing subscription of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegenerateSecondaryKeySample.ts index 575f32f09ce0..8dfe6bfe8bda 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates secondary key of existing subscription of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionUpdateSample.ts index dcfdc0e6e6da..325f2f3eac84 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of a subscription specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToApiSample.ts index 52aa8cbe6993..006208b07baf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Api. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToOperationSample.ts index 720adf7c4489..1b3ca7357ed8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Operation. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToProductSample.ts index e7327d91cf64..380d56b34279 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagCreateOrUpdateSample.ts index 95a59272991c..907d113a31de 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a tag. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDeleteSample.ts index ed2af0a78357..b269a87cfe43 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific tag of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromApiSample.ts index adeb2e1c6ea6..1c51028e27c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Api. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromOperationSample.ts index 55ec990815ff..93f87e9af452 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Operation. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromProductSample.ts index cc92c57bdf3b..82f23db9b587 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByApiSample.ts index e1f4ad9b464f..1103c5796ac6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByOperationSample.ts index b500b22c44c0..5809e66ef253 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the Operation. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByProductSample.ts index ed0443df7ae3..b695c52cdf49 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByApiSample.ts index f412d5d3df32..1661a79ad6eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByOperationSample.ts index d6d7ecab6aee..cd29001a72c4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByProductSample.ts index b411670bbc87..77aee85764e5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateSample.ts index efab0cd07fa9..65520811f18a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetSample.ts index a76bd73c4d04..45a9a8b9363c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByApiSample.ts index d602d51dfd99..8675ab2e16ad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByOperationSample.ts index d5314d8a8c8e..84e3c69f0d8e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the Operation. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByProductSample.ts index e5f974185617..cae156b7934c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByServiceSample.ts index 1590eb84e906..276fe33ed6fb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of tags defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagResourceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagResourceListByServiceSample.ts index 7e4fdbdb908a..3d26894624d2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagResourceListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagResourceListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of resources associated with tags. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagUpdateSample.ts index c9cf0351412d..9043d1210efb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessCreateSample.ts index 5980978da091..a0868d196221 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessCreateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update tenant access information details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetEntityTagSample.ts index 4ad470bacf74..91c023234f72 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Tenant access metadata diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetSample.ts index 89a00b00a34c..1b3949396a90 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant access information details without secrets. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts index b0ebbca83394..2d99e6785773 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate primary access key for GIT. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts index 237541c234c1..22536970f9cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate secondary access key for GIT. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListByServiceSample.ts index b639a89e236d..277ae7d8bce9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns list of access infos - for Git and Management endpoints. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListSecretsSample.ts index 084ace7979c0..116f0acde92f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant access information details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts index ba54ff5d6c7f..7ab4b6f26d50 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate primary access key diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts index 5bf80798e4e1..124c0b54920c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate secondary access key diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessUpdateSample.ts index 0a45399af35d..219f1c3d3b76 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update tenant access information details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationDeploySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationDeploySample.ts index 30a6f486f333..c3caecd37e1c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationDeploySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationDeploySample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationGetSyncStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationGetSyncStateSample.ts index 183413c070e7..7ac5b0151e33 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationGetSyncStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationGetSyncStateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the status of the most recent synchronization between the configuration database and the Git repository. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationSaveSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationSaveSample.ts index 339b7d8e350b..77dbf47a9eb4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationSaveSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationSaveSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationValidateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationValidateSample.ts index 593245c52c97..14248e195d62 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationValidateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationValidateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsGetSample.ts index 62f39d5d4132..2aaededecf22 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsListByServiceSample.ts index bee5b4a6d6fd..c86b0e1ec470 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Public settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userConfirmationPasswordSendSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userConfirmationPasswordSendSample.ts index fbab7fc3a2cb..722d51a0109a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userConfirmationPasswordSendSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userConfirmationPasswordSendSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Sends confirmation diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userCreateOrUpdateSample.ts index f21acf2952a6..20038dcb3857 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a user. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userDeleteSample.ts index b07039d2c5ab..f5170516fe8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific user. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGenerateSsoUrlSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGenerateSsoUrlSample.ts index f1e39fe5ea16..9089389b1fa4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGenerateSsoUrlSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGenerateSsoUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetEntityTagSample.ts index a8d971057e1e..046323699bc0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the user specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSample.ts index af21ca84b0c8..e9ef37369214 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the user specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSharedAccessTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSharedAccessTokenSample.ts index dae88fd58203..a20d7aa4d3f4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSharedAccessTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSharedAccessTokenSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Shared Access Authorization Token for the User. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGroupListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGroupListSample.ts index 633fea2229a3..824c9dab7c5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGroupListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGroupListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all user groups. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userIdentitiesListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userIdentitiesListSample.ts index 0e7f010d6fcf..776ba0a53d1c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userIdentitiesListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userIdentitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List of all user identities. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userListByServiceSample.ts index b212a1781a0b..b23973d3c4ac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of registered users in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionGetSample.ts index d64b3f87dfc2..887f4122002b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription entity associated with a particular user. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionListSample.ts index 47fe92e03081..1247ccbc3509 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of subscriptions of the specified user. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userUpdateSample.ts index 17b2ed83fcea..b138c244766f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the user specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts b/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts index efdc68f7b9fb..eb66dbfe1014 100644 --- a/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts +++ b/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts @@ -6,661 +6,661 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import * as coreAuth from "@azure/core-auth"; import * as coreClient from "@azure/core-client"; +import { + OperationState, + SimplePollerLike, + createHttpPoller +} from "@azure/core-lro"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { - PipelineRequest, - PipelineResponse, - SendRequest + PipelineRequest, + PipelineResponse, + SendRequest } from "@azure/core-rest-pipeline"; -import * as coreAuth from "@azure/core-auth"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "./lroImpl"; +import { createLroSpec } from "./lroImpl.js"; import { - ApiImpl, - ApiRevisionImpl, - ApiReleaseImpl, - ApiOperationImpl, - ApiOperationPolicyImpl, - TagImpl, - GraphQLApiResolverImpl, - GraphQLApiResolverPolicyImpl, - ApiProductImpl, - ApiPolicyImpl, - ApiSchemaImpl, - ApiDiagnosticImpl, - ApiIssueImpl, - ApiIssueCommentImpl, - ApiIssueAttachmentImpl, - ApiTagDescriptionImpl, - OperationOperationsImpl, - ApiWikiImpl, - ApiWikisImpl, - ApiExportImpl, - ApiVersionSetImpl, - AuthorizationServerImpl, - AuthorizationProviderImpl, - AuthorizationImpl, - AuthorizationLoginLinksImpl, - AuthorizationAccessPolicyImpl, - BackendImpl, - CacheImpl, - CertificateImpl, - ContentTypeImpl, - ContentItemImpl, - DeletedServicesImpl, - ApiManagementOperationsImpl, - ApiManagementServiceSkusImpl, - ApiManagementServiceImpl, - DiagnosticImpl, - EmailTemplateImpl, - GatewayImpl, - GatewayHostnameConfigurationImpl, - GatewayApiImpl, - GatewayCertificateAuthorityImpl, - GroupImpl, - GroupUserImpl, - IdentityProviderImpl, - IssueImpl, - LoggerImpl, - NamedValueImpl, - NetworkStatusImpl, - NotificationImpl, - NotificationRecipientUserImpl, - NotificationRecipientEmailImpl, - OpenIdConnectProviderImpl, - OutboundNetworkDependenciesEndpointsImpl, - PolicyImpl, - PolicyDescriptionImpl, - PolicyFragmentImpl, - PortalConfigImpl, - PortalRevisionImpl, - PortalSettingsImpl, - SignInSettingsImpl, - SignUpSettingsImpl, - DelegationSettingsImpl, - PrivateEndpointConnectionOperationsImpl, - ProductImpl, - ProductApiImpl, - ProductGroupImpl, - ProductSubscriptionsImpl, - ProductPolicyImpl, - ProductWikiImpl, - ProductWikisImpl, - QuotaByCounterKeysImpl, - QuotaByPeriodKeysImpl, - RegionImpl, - ReportsImpl, - GlobalSchemaImpl, - TenantSettingsImpl, - ApiManagementSkusImpl, - SubscriptionImpl, - TagResourceImpl, - TenantAccessImpl, - TenantAccessGitImpl, - TenantConfigurationImpl, - UserImpl, - UserGroupImpl, - UserSubscriptionImpl, - UserIdentitiesImpl, - UserConfirmationPasswordImpl, - DocumentationImpl -} from "./operations"; + ApiManagementClientOptionalParams, + ConnectivityCheckRequest, + PerformConnectivityCheckAsyncOptionalParams, + PerformConnectivityCheckAsyncResponse +} from "./models/index.js"; +import * as Mappers from "./models/mappers.js"; +import * as Parameters from "./models/parameters.js"; import { - Api, - ApiRevision, - ApiRelease, - ApiOperation, - ApiOperationPolicy, - Tag, - GraphQLApiResolver, - GraphQLApiResolverPolicy, - ApiProduct, - ApiPolicy, - ApiSchema, - ApiDiagnostic, - ApiIssue, - ApiIssueComment, - ApiIssueAttachment, - ApiTagDescription, - OperationOperations, - ApiWiki, - ApiWikis, - ApiExport, - ApiVersionSet, - AuthorizationServer, - AuthorizationProvider, - Authorization, - AuthorizationLoginLinks, - AuthorizationAccessPolicy, - Backend, - Cache, - Certificate, - ContentType, - ContentItem, - DeletedServices, - ApiManagementOperations, - ApiManagementServiceSkus, - ApiManagementService, - Diagnostic, - EmailTemplate, - Gateway, - GatewayHostnameConfiguration, - GatewayApi, - GatewayCertificateAuthority, - Group, - GroupUser, - IdentityProvider, - Issue, - Logger, - NamedValue, - NetworkStatus, - Notification, - NotificationRecipientUser, - NotificationRecipientEmail, - OpenIdConnectProvider, - OutboundNetworkDependenciesEndpoints, - Policy, - PolicyDescription, - PolicyFragment, - PortalConfig, - PortalRevision, - PortalSettings, - SignInSettings, - SignUpSettings, - DelegationSettings, - PrivateEndpointConnectionOperations, - Product, - ProductApi, - ProductGroup, - ProductSubscriptions, - ProductPolicy, - ProductWiki, - ProductWikis, - QuotaByCounterKeys, - QuotaByPeriodKeys, - Region, - Reports, - GlobalSchema, - TenantSettings, - ApiManagementSkus, - Subscription, - TagResource, - TenantAccess, - TenantAccessGit, - TenantConfiguration, - User, - UserGroup, - UserSubscription, - UserIdentities, - UserConfirmationPassword, - Documentation -} from "./operationsInterfaces"; -import * as Parameters from "./models/parameters"; -import * as Mappers from "./models/mappers"; + ApiDiagnosticImpl, + ApiExportImpl, + ApiImpl, + ApiIssueAttachmentImpl, + ApiIssueCommentImpl, + ApiIssueImpl, + ApiManagementOperationsImpl, + ApiManagementServiceImpl, + ApiManagementServiceSkusImpl, + ApiManagementSkusImpl, + ApiOperationImpl, + ApiOperationPolicyImpl, + ApiPolicyImpl, + ApiProductImpl, + ApiReleaseImpl, + ApiRevisionImpl, + ApiSchemaImpl, + ApiTagDescriptionImpl, + ApiVersionSetImpl, + ApiWikiImpl, + ApiWikisImpl, + AuthorizationAccessPolicyImpl, + AuthorizationImpl, + AuthorizationLoginLinksImpl, + AuthorizationProviderImpl, + AuthorizationServerImpl, + BackendImpl, + CacheImpl, + CertificateImpl, + ContentItemImpl, + ContentTypeImpl, + DelegationSettingsImpl, + DeletedServicesImpl, + DiagnosticImpl, + DocumentationImpl, + EmailTemplateImpl, + GatewayApiImpl, + GatewayCertificateAuthorityImpl, + GatewayHostnameConfigurationImpl, + GatewayImpl, + GlobalSchemaImpl, + GraphQLApiResolverImpl, + GraphQLApiResolverPolicyImpl, + GroupImpl, + GroupUserImpl, + IdentityProviderImpl, + IssueImpl, + LoggerImpl, + NamedValueImpl, + NetworkStatusImpl, + NotificationImpl, + NotificationRecipientEmailImpl, + NotificationRecipientUserImpl, + OpenIdConnectProviderImpl, + OperationOperationsImpl, + OutboundNetworkDependenciesEndpointsImpl, + PolicyDescriptionImpl, + PolicyFragmentImpl, + PolicyImpl, + PortalConfigImpl, + PortalRevisionImpl, + PortalSettingsImpl, + PrivateEndpointConnectionOperationsImpl, + ProductApiImpl, + ProductGroupImpl, + ProductImpl, + ProductPolicyImpl, + ProductSubscriptionsImpl, + ProductWikiImpl, + ProductWikisImpl, + QuotaByCounterKeysImpl, + QuotaByPeriodKeysImpl, + RegionImpl, + ReportsImpl, + SignInSettingsImpl, + SignUpSettingsImpl, + SubscriptionImpl, + TagImpl, + TagResourceImpl, + TenantAccessGitImpl, + TenantAccessImpl, + TenantConfigurationImpl, + TenantSettingsImpl, + UserConfirmationPasswordImpl, + UserGroupImpl, + UserIdentitiesImpl, + UserImpl, + UserSubscriptionImpl +} from "./operations/index.js"; import { - ApiManagementClientOptionalParams, - ConnectivityCheckRequest, - PerformConnectivityCheckAsyncOptionalParams, - PerformConnectivityCheckAsyncResponse -} from "./models"; + Api, + ApiDiagnostic, + ApiExport, + ApiIssue, + ApiIssueAttachment, + ApiIssueComment, + ApiManagementOperations, + ApiManagementService, + ApiManagementServiceSkus, + ApiManagementSkus, + ApiOperation, + ApiOperationPolicy, + ApiPolicy, + ApiProduct, + ApiRelease, + ApiRevision, + ApiSchema, + ApiTagDescription, + ApiVersionSet, + ApiWiki, + ApiWikis, + Authorization, + AuthorizationAccessPolicy, + AuthorizationLoginLinks, + AuthorizationProvider, + AuthorizationServer, + Backend, + Cache, + Certificate, + ContentItem, + ContentType, + DelegationSettings, + DeletedServices, + Diagnostic, + Documentation, + EmailTemplate, + Gateway, + GatewayApi, + GatewayCertificateAuthority, + GatewayHostnameConfiguration, + GlobalSchema, + GraphQLApiResolver, + GraphQLApiResolverPolicy, + Group, + GroupUser, + IdentityProvider, + Issue, + Logger, + NamedValue, + NetworkStatus, + Notification, + NotificationRecipientEmail, + NotificationRecipientUser, + OpenIdConnectProvider, + OperationOperations, + OutboundNetworkDependenciesEndpoints, + Policy, + PolicyDescription, + PolicyFragment, + PortalConfig, + PortalRevision, + PortalSettings, + PrivateEndpointConnectionOperations, + Product, + ProductApi, + ProductGroup, + ProductPolicy, + ProductSubscriptions, + ProductWiki, + ProductWikis, + QuotaByCounterKeys, + QuotaByPeriodKeys, + Region, + Reports, + SignInSettings, + SignUpSettings, + Subscription, + Tag, + TagResource, + TenantAccess, + TenantAccessGit, + TenantConfiguration, + TenantSettings, + User, + UserConfirmationPassword, + UserGroup, + UserIdentities, + UserSubscription +} from "./operationsInterfaces/index.js"; export class ApiManagementClient extends coreClient.ServiceClient { - $host: string; - apiVersion: string; - subscriptionId?: string; - - /** - * Initializes a new instance of the ApiManagementClient class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. - * @param options The parameter options - */ - constructor( - credentials: coreAuth.TokenCredential, - subscriptionId: string, - options?: ApiManagementClientOptionalParams - ); - constructor( - credentials: coreAuth.TokenCredential, - options?: ApiManagementClientOptionalParams - ); - constructor( - credentials: coreAuth.TokenCredential, - subscriptionIdOrOptions?: ApiManagementClientOptionalParams | string, - options?: ApiManagementClientOptionalParams - ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } + $host: string; + apiVersion: string; + subscriptionId?: string; - let subscriptionId: string | undefined; + /** + * Initializes a new instance of the ApiManagementClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: ApiManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: ApiManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: ApiManagementClientOptionalParams | string, + options?: ApiManagementClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } - if (typeof subscriptionIdOrOptions === "string") { - subscriptionId = subscriptionIdOrOptions; - } else if (typeof subscriptionIdOrOptions === "object") { - options = subscriptionIdOrOptions; - } + let subscriptionId: string | undefined; - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: ApiManagementClientOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials - }; + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; + } - const packageDetails = `azsdk-js-arm-apimanagement/9.2.1`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: ApiManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; - const optionsWithDefaults = { - ...defaults, - ...options, - userAgentOptions: { - userAgentPrefix - }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" - }; - super(optionsWithDefaults); + const packageDetails = `azsdk-js-arm-apimanagement/9.2.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; - let bearerTokenAuthenticationPolicyFound: boolean = false; - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName - ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } - // Parameter assignments - this.subscriptionId = subscriptionId; + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: + options.endpoint ?? options.baseUri ?? "https://management.azure.com" + }; + super(optionsWithDefaults); - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-08-01"; - this.api = new ApiImpl(this); - this.apiRevision = new ApiRevisionImpl(this); - this.apiRelease = new ApiReleaseImpl(this); - this.apiOperation = new ApiOperationImpl(this); - this.apiOperationPolicy = new ApiOperationPolicyImpl(this); - this.tag = new TagImpl(this); - this.graphQLApiResolver = new GraphQLApiResolverImpl(this); - this.graphQLApiResolverPolicy = new GraphQLApiResolverPolicyImpl(this); - this.apiProduct = new ApiProductImpl(this); - this.apiPolicy = new ApiPolicyImpl(this); - this.apiSchema = new ApiSchemaImpl(this); - this.apiDiagnostic = new ApiDiagnosticImpl(this); - this.apiIssue = new ApiIssueImpl(this); - this.apiIssueComment = new ApiIssueCommentImpl(this); - this.apiIssueAttachment = new ApiIssueAttachmentImpl(this); - this.apiTagDescription = new ApiTagDescriptionImpl(this); - this.operationOperations = new OperationOperationsImpl(this); - this.apiWiki = new ApiWikiImpl(this); - this.apiWikis = new ApiWikisImpl(this); - this.apiExport = new ApiExportImpl(this); - this.apiVersionSet = new ApiVersionSetImpl(this); - this.authorizationServer = new AuthorizationServerImpl(this); - this.authorizationProvider = new AuthorizationProviderImpl(this); - this.authorization = new AuthorizationImpl(this); - this.authorizationLoginLinks = new AuthorizationLoginLinksImpl(this); - this.authorizationAccessPolicy = new AuthorizationAccessPolicyImpl(this); - this.backend = new BackendImpl(this); - this.cache = new CacheImpl(this); - this.certificate = new CertificateImpl(this); - this.contentType = new ContentTypeImpl(this); - this.contentItem = new ContentItemImpl(this); - this.deletedServices = new DeletedServicesImpl(this); - this.apiManagementOperations = new ApiManagementOperationsImpl(this); - this.apiManagementServiceSkus = new ApiManagementServiceSkusImpl(this); - this.apiManagementService = new ApiManagementServiceImpl(this); - this.diagnostic = new DiagnosticImpl(this); - this.emailTemplate = new EmailTemplateImpl(this); - this.gateway = new GatewayImpl(this); - this.gatewayHostnameConfiguration = new GatewayHostnameConfigurationImpl( - this - ); - this.gatewayApi = new GatewayApiImpl(this); - this.gatewayCertificateAuthority = new GatewayCertificateAuthorityImpl( - this - ); - this.group = new GroupImpl(this); - this.groupUser = new GroupUserImpl(this); - this.identityProvider = new IdentityProviderImpl(this); - this.issue = new IssueImpl(this); - this.logger = new LoggerImpl(this); - this.namedValue = new NamedValueImpl(this); - this.networkStatus = new NetworkStatusImpl(this); - this.notification = new NotificationImpl(this); - this.notificationRecipientUser = new NotificationRecipientUserImpl(this); - this.notificationRecipientEmail = new NotificationRecipientEmailImpl(this); - this.openIdConnectProvider = new OpenIdConnectProviderImpl(this); - this.outboundNetworkDependenciesEndpoints = new OutboundNetworkDependenciesEndpointsImpl( - this - ); - this.policy = new PolicyImpl(this); - this.policyDescription = new PolicyDescriptionImpl(this); - this.policyFragment = new PolicyFragmentImpl(this); - this.portalConfig = new PortalConfigImpl(this); - this.portalRevision = new PortalRevisionImpl(this); - this.portalSettings = new PortalSettingsImpl(this); - this.signInSettings = new SignInSettingsImpl(this); - this.signUpSettings = new SignUpSettingsImpl(this); - this.delegationSettings = new DelegationSettingsImpl(this); - this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsImpl( - this - ); - this.product = new ProductImpl(this); - this.productApi = new ProductApiImpl(this); - this.productGroup = new ProductGroupImpl(this); - this.productSubscriptions = new ProductSubscriptionsImpl(this); - this.productPolicy = new ProductPolicyImpl(this); - this.productWiki = new ProductWikiImpl(this); - this.productWikis = new ProductWikisImpl(this); - this.quotaByCounterKeys = new QuotaByCounterKeysImpl(this); - this.quotaByPeriodKeys = new QuotaByPeriodKeysImpl(this); - this.region = new RegionImpl(this); - this.reports = new ReportsImpl(this); - this.globalSchema = new GlobalSchemaImpl(this); - this.tenantSettings = new TenantSettingsImpl(this); - this.apiManagementSkus = new ApiManagementSkusImpl(this); - this.subscription = new SubscriptionImpl(this); - this.tagResource = new TagResourceImpl(this); - this.tenantAccess = new TenantAccessImpl(this); - this.tenantAccessGit = new TenantAccessGitImpl(this); - this.tenantConfiguration = new TenantConfigurationImpl(this); - this.user = new UserImpl(this); - this.userGroup = new UserGroupImpl(this); - this.userSubscription = new UserSubscriptionImpl(this); - this.userIdentities = new UserIdentitiesImpl(this); - this.userConfirmationPassword = new UserConfirmationPasswordImpl(this); - this.documentation = new DocumentationImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } + let bearerTokenAuthenticationPolicyFound: boolean = false; + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + // Parameter assignments + this.subscriptionId = subscriptionId; - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2022-08-01"; + this.api = new ApiImpl(this); + this.apiRevision = new ApiRevisionImpl(this); + this.apiRelease = new ApiReleaseImpl(this); + this.apiOperation = new ApiOperationImpl(this); + this.apiOperationPolicy = new ApiOperationPolicyImpl(this); + this.tag = new TagImpl(this); + this.graphQLApiResolver = new GraphQLApiResolverImpl(this); + this.graphQLApiResolverPolicy = new GraphQLApiResolverPolicyImpl(this); + this.apiProduct = new ApiProductImpl(this); + this.apiPolicy = new ApiPolicyImpl(this); + this.apiSchema = new ApiSchemaImpl(this); + this.apiDiagnostic = new ApiDiagnosticImpl(this); + this.apiIssue = new ApiIssueImpl(this); + this.apiIssueComment = new ApiIssueCommentImpl(this); + this.apiIssueAttachment = new ApiIssueAttachmentImpl(this); + this.apiTagDescription = new ApiTagDescriptionImpl(this); + this.operationOperations = new OperationOperationsImpl(this); + this.apiWiki = new ApiWikiImpl(this); + this.apiWikis = new ApiWikisImpl(this); + this.apiExport = new ApiExportImpl(this); + this.apiVersionSet = new ApiVersionSetImpl(this); + this.authorizationServer = new AuthorizationServerImpl(this); + this.authorizationProvider = new AuthorizationProviderImpl(this); + this.authorization = new AuthorizationImpl(this); + this.authorizationLoginLinks = new AuthorizationLoginLinksImpl(this); + this.authorizationAccessPolicy = new AuthorizationAccessPolicyImpl(this); + this.backend = new BackendImpl(this); + this.cache = new CacheImpl(this); + this.certificate = new CertificateImpl(this); + this.contentType = new ContentTypeImpl(this); + this.contentItem = new ContentItemImpl(this); + this.deletedServices = new DeletedServicesImpl(this); + this.apiManagementOperations = new ApiManagementOperationsImpl(this); + this.apiManagementServiceSkus = new ApiManagementServiceSkusImpl(this); + this.apiManagementService = new ApiManagementServiceImpl(this); + this.diagnostic = new DiagnosticImpl(this); + this.emailTemplate = new EmailTemplateImpl(this); + this.gateway = new GatewayImpl(this); + this.gatewayHostnameConfiguration = new GatewayHostnameConfigurationImpl( + this + ); + this.gatewayApi = new GatewayApiImpl(this); + this.gatewayCertificateAuthority = new GatewayCertificateAuthorityImpl( + this + ); + this.group = new GroupImpl(this); + this.groupUser = new GroupUserImpl(this); + this.identityProvider = new IdentityProviderImpl(this); + this.issue = new IssueImpl(this); + this.logger = new LoggerImpl(this); + this.namedValue = new NamedValueImpl(this); + this.networkStatus = new NetworkStatusImpl(this); + this.notification = new NotificationImpl(this); + this.notificationRecipientUser = new NotificationRecipientUserImpl(this); + this.notificationRecipientEmail = new NotificationRecipientEmailImpl(this); + this.openIdConnectProvider = new OpenIdConnectProviderImpl(this); + this.outboundNetworkDependenciesEndpoints = new OutboundNetworkDependenciesEndpointsImpl( + this + ); + this.policy = new PolicyImpl(this); + this.policyDescription = new PolicyDescriptionImpl(this); + this.policyFragment = new PolicyFragmentImpl(this); + this.portalConfig = new PortalConfigImpl(this); + this.portalRevision = new PortalRevisionImpl(this); + this.portalSettings = new PortalSettingsImpl(this); + this.signInSettings = new SignInSettingsImpl(this); + this.signUpSettings = new SignUpSettingsImpl(this); + this.delegationSettings = new DelegationSettingsImpl(this); + this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsImpl( + this + ); + this.product = new ProductImpl(this); + this.productApi = new ProductApiImpl(this); + this.productGroup = new ProductGroupImpl(this); + this.productSubscriptions = new ProductSubscriptionsImpl(this); + this.productPolicy = new ProductPolicyImpl(this); + this.productWiki = new ProductWikiImpl(this); + this.productWikis = new ProductWikisImpl(this); + this.quotaByCounterKeys = new QuotaByCounterKeysImpl(this); + this.quotaByPeriodKeys = new QuotaByPeriodKeysImpl(this); + this.region = new RegionImpl(this); + this.reports = new ReportsImpl(this); + this.globalSchema = new GlobalSchemaImpl(this); + this.tenantSettings = new TenantSettingsImpl(this); + this.apiManagementSkus = new ApiManagementSkusImpl(this); + this.subscription = new SubscriptionImpl(this); + this.tagResource = new TagResourceImpl(this); + this.tenantAccess = new TenantAccessImpl(this); + this.tenantAccessGit = new TenantAccessGitImpl(this); + this.tenantConfiguration = new TenantConfigurationImpl(this); + this.user = new UserImpl(this); + this.userGroup = new UserGroupImpl(this); + this.userSubscription = new UserSubscriptionImpl(this); + this.userIdentities = new UserIdentitiesImpl(this); + this.userConfirmationPassword = new UserConfirmationPasswordImpl(this); + this.documentation = new DocumentationImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest - ): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - } - }; - this.pipeline.addPolicy(apiVersionPolicy); - } - /** - * Performs a connectivity check between the API Management service and a given destination, and - * returns metrics for the connection, as well as errors encountered while trying to establish it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param connectivityCheckRequestParams Connectivity Check request parameters. - * @param options The options parameters. - */ - async beginPerformConnectivityCheckAsync( - resourceGroupName: string, - serviceName: string, - connectivityCheckRequestParams: ConnectivityCheckRequest, - options?: PerformConnectivityCheckAsyncOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PerformConnectivityCheckAsyncResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; } - }; - }; + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); + } - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - options - }, - spec: performConnectivityCheckAsyncOperationSpec - }); - const poller = await createHttpPoller< - PerformConnectivityCheckAsyncResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + /** + * Performs a connectivity check between the API Management service and a given destination, and + * returns metrics for the connection, as well as errors encountered while trying to establish it. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param connectivityCheckRequestParams Connectivity Check request parameters. + * @param options The options parameters. + */ + async beginPerformConnectivityCheckAsync( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: PerformConnectivityCheckAsyncOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PerformConnectivityCheckAsyncResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Performs a connectivity check between the API Management service and a given destination, and - * returns metrics for the connection, as well as errors encountered while trying to establish it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param connectivityCheckRequestParams Connectivity Check request parameters. - * @param options The options parameters. - */ - async beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName: string, - serviceName: string, - connectivityCheckRequestParams: ConnectivityCheckRequest, - options?: PerformConnectivityCheckAsyncOptionalParams - ): Promise { - const poller = await this.beginPerformConnectivityCheckAsync( - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - options - ); - return poller.pollUntilDone(); - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + connectivityCheckRequestParams, + options + }, + spec: performConnectivityCheckAsyncOperationSpec + }); + const poller = await createHttpPoller< + PerformConnectivityCheckAsyncResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - api: Api; - apiRevision: ApiRevision; - apiRelease: ApiRelease; - apiOperation: ApiOperation; - apiOperationPolicy: ApiOperationPolicy; - tag: Tag; - graphQLApiResolver: GraphQLApiResolver; - graphQLApiResolverPolicy: GraphQLApiResolverPolicy; - apiProduct: ApiProduct; - apiPolicy: ApiPolicy; - apiSchema: ApiSchema; - apiDiagnostic: ApiDiagnostic; - apiIssue: ApiIssue; - apiIssueComment: ApiIssueComment; - apiIssueAttachment: ApiIssueAttachment; - apiTagDescription: ApiTagDescription; - operationOperations: OperationOperations; - apiWiki: ApiWiki; - apiWikis: ApiWikis; - apiExport: ApiExport; - apiVersionSet: ApiVersionSet; - authorizationServer: AuthorizationServer; - authorizationProvider: AuthorizationProvider; - authorization: Authorization; - authorizationLoginLinks: AuthorizationLoginLinks; - authorizationAccessPolicy: AuthorizationAccessPolicy; - backend: Backend; - cache: Cache; - certificate: Certificate; - contentType: ContentType; - contentItem: ContentItem; - deletedServices: DeletedServices; - apiManagementOperations: ApiManagementOperations; - apiManagementServiceSkus: ApiManagementServiceSkus; - apiManagementService: ApiManagementService; - diagnostic: Diagnostic; - emailTemplate: EmailTemplate; - gateway: Gateway; - gatewayHostnameConfiguration: GatewayHostnameConfiguration; - gatewayApi: GatewayApi; - gatewayCertificateAuthority: GatewayCertificateAuthority; - group: Group; - groupUser: GroupUser; - identityProvider: IdentityProvider; - issue: Issue; - logger: Logger; - namedValue: NamedValue; - networkStatus: NetworkStatus; - notification: Notification; - notificationRecipientUser: NotificationRecipientUser; - notificationRecipientEmail: NotificationRecipientEmail; - openIdConnectProvider: OpenIdConnectProvider; - outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpoints; - policy: Policy; - policyDescription: PolicyDescription; - policyFragment: PolicyFragment; - portalConfig: PortalConfig; - portalRevision: PortalRevision; - portalSettings: PortalSettings; - signInSettings: SignInSettings; - signUpSettings: SignUpSettings; - delegationSettings: DelegationSettings; - privateEndpointConnectionOperations: PrivateEndpointConnectionOperations; - product: Product; - productApi: ProductApi; - productGroup: ProductGroup; - productSubscriptions: ProductSubscriptions; - productPolicy: ProductPolicy; - productWiki: ProductWiki; - productWikis: ProductWikis; - quotaByCounterKeys: QuotaByCounterKeys; - quotaByPeriodKeys: QuotaByPeriodKeys; - region: Region; - reports: Reports; - globalSchema: GlobalSchema; - tenantSettings: TenantSettings; - apiManagementSkus: ApiManagementSkus; - subscription: Subscription; - tagResource: TagResource; - tenantAccess: TenantAccess; - tenantAccessGit: TenantAccessGit; - tenantConfiguration: TenantConfiguration; - user: User; - userGroup: UserGroup; - userSubscription: UserSubscription; - userIdentities: UserIdentities; - userConfirmationPassword: UserConfirmationPassword; - documentation: Documentation; + /** + * Performs a connectivity check between the API Management service and a given destination, and + * returns metrics for the connection, as well as errors encountered while trying to establish it. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param connectivityCheckRequestParams Connectivity Check request parameters. + * @param options The options parameters. + */ + async beginPerformConnectivityCheckAsyncAndWait( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: PerformConnectivityCheckAsyncOptionalParams + ): Promise { + const poller = await this.beginPerformConnectivityCheckAsync( + resourceGroupName, + serviceName, + connectivityCheckRequestParams, + options + ); + return poller.pollUntilDone(); + } + + api: Api; + apiRevision: ApiRevision; + apiRelease: ApiRelease; + apiOperation: ApiOperation; + apiOperationPolicy: ApiOperationPolicy; + tag: Tag; + graphQLApiResolver: GraphQLApiResolver; + graphQLApiResolverPolicy: GraphQLApiResolverPolicy; + apiProduct: ApiProduct; + apiPolicy: ApiPolicy; + apiSchema: ApiSchema; + apiDiagnostic: ApiDiagnostic; + apiIssue: ApiIssue; + apiIssueComment: ApiIssueComment; + apiIssueAttachment: ApiIssueAttachment; + apiTagDescription: ApiTagDescription; + operationOperations: OperationOperations; + apiWiki: ApiWiki; + apiWikis: ApiWikis; + apiExport: ApiExport; + apiVersionSet: ApiVersionSet; + authorizationServer: AuthorizationServer; + authorizationProvider: AuthorizationProvider; + authorization: Authorization; + authorizationLoginLinks: AuthorizationLoginLinks; + authorizationAccessPolicy: AuthorizationAccessPolicy; + backend: Backend; + cache: Cache; + certificate: Certificate; + contentType: ContentType; + contentItem: ContentItem; + deletedServices: DeletedServices; + apiManagementOperations: ApiManagementOperations; + apiManagementServiceSkus: ApiManagementServiceSkus; + apiManagementService: ApiManagementService; + diagnostic: Diagnostic; + emailTemplate: EmailTemplate; + gateway: Gateway; + gatewayHostnameConfiguration: GatewayHostnameConfiguration; + gatewayApi: GatewayApi; + gatewayCertificateAuthority: GatewayCertificateAuthority; + group: Group; + groupUser: GroupUser; + identityProvider: IdentityProvider; + issue: Issue; + logger: Logger; + namedValue: NamedValue; + networkStatus: NetworkStatus; + notification: Notification; + notificationRecipientUser: NotificationRecipientUser; + notificationRecipientEmail: NotificationRecipientEmail; + openIdConnectProvider: OpenIdConnectProvider; + outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpoints; + policy: Policy; + policyDescription: PolicyDescription; + policyFragment: PolicyFragment; + portalConfig: PortalConfig; + portalRevision: PortalRevision; + portalSettings: PortalSettings; + signInSettings: SignInSettings; + signUpSettings: SignUpSettings; + delegationSettings: DelegationSettings; + privateEndpointConnectionOperations: PrivateEndpointConnectionOperations; + product: Product; + productApi: ProductApi; + productGroup: ProductGroup; + productSubscriptions: ProductSubscriptions; + productPolicy: ProductPolicy; + productWiki: ProductWiki; + productWikis: ProductWikis; + quotaByCounterKeys: QuotaByCounterKeys; + quotaByPeriodKeys: QuotaByPeriodKeys; + region: Region; + reports: Reports; + globalSchema: GlobalSchema; + tenantSettings: TenantSettings; + apiManagementSkus: ApiManagementSkus; + subscription: Subscription; + tagResource: TagResource; + tenantAccess: TenantAccess; + tenantAccessGit: TenantAccessGit; + tenantConfiguration: TenantConfiguration; + user: User; + userGroup: UserGroup; + userSubscription: UserSubscription; + userIdentities: UserIdentities; + userConfirmationPassword: UserConfirmationPassword; + documentation: Documentation; } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const performConnectivityCheckAsyncOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ConnectivityCheckResponse - }, - 201: { - bodyMapper: Mappers.ConnectivityCheckResponse - }, - 202: { - bodyMapper: Mappers.ConnectivityCheckResponse - }, - 204: { - bodyMapper: Mappers.ConnectivityCheckResponse + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ConnectivityCheckResponse + }, + 201: { + bodyMapper: Mappers.ConnectivityCheckResponse + }, + 202: { + bodyMapper: Mappers.ConnectivityCheckResponse + }, + 204: { + bodyMapper: Mappers.ConnectivityCheckResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.connectivityCheckRequestParams, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.connectivityCheckRequestParams, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/index.ts b/sdk/apimanagement/arm-apimanagement/src/index.ts index 0ed3812dab81..54a2cedd4a7c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { ApiManagementClient } from "./apiManagementClient"; -export * from "./operationsInterfaces"; +export { ApiManagementClient } from "./apiManagementClient.js"; +export * from "./models/index.js"; +export * from "./operationsInterfaces/index.js"; +export { getContinuationToken } from "./pagingHelper.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts b/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts index 52f6eaacfb83..2be96362d231 100644 --- a/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts +++ b/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts @@ -13,30 +13,30 @@ import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; export function createLroSpec(inputs: { - sendOperationFn: (args: any, spec: any) => Promise>; - args: Record; - spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record; + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; }): LongRunningOperation { - const { args, spec, sendOperationFn } = inputs; - return { - requestMethod: spec.httpMethod, - requestPath: spec.path!, - sendInitialRequest: () => sendOperationFn(args, spec), - sendPollRequest: ( - path: string, - options?: { abortSignal?: AbortSignalLike } - ) => { - const { requestBody, ...restSpec } = spec; - return sendOperationFn(args, { - ...restSpec, - httpMethod: "GET", - path, - abortSignal: options?.abortSignal - }); - } - }; + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/apimanagement/arm-apimanagement/src/models/index.ts b/sdk/apimanagement/arm-apimanagement/src/models/index.ts index 4e69c371d1f3..8d6d436923f5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/index.ts @@ -10,5963 +10,5963 @@ import * as coreClient from "@azure/core-client"; /** Paged API list representation. */ export interface ApiCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ApiContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** An API Version Set contains the common configuration for a set of API Versions relating */ export interface ApiVersionSetContractDetails { - /** Identifier for existing API Version Set. Omit this value to create a new Version Set. */ - id?: string; - /** The display Name of the API Version Set. */ - name?: string; - /** Description of API Version Set. */ - description?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: ApiVersionSetContractDetailsVersioningScheme; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; + /** Identifier for existing API Version Set. Omit this value to create a new Version Set. */ + id?: string; + /** The display Name of the API Version Set. */ + name?: string; + /** Description of API Version Set. */ + description?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: ApiVersionSetContractDetailsVersioningScheme; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; } /** API base contract details. */ export interface ApiEntityBaseContract { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; } /** API Authentication Settings. */ export interface AuthenticationSettingsContract { - /** OAuth2 Authentication settings */ - oAuth2?: OAuth2AuthenticationSettingsContract; - /** OpenID Connect Authentication Settings */ - openid?: OpenIdAuthenticationSettingsContract; - /** Collection of OAuth2 authentication settings included into this API. */ - oAuth2AuthenticationSettings?: OAuth2AuthenticationSettingsContract[]; - /** Collection of Open ID Connect authentication settings included into this API. */ - openidAuthenticationSettings?: OpenIdAuthenticationSettingsContract[]; + /** OAuth2 Authentication settings */ + oAuth2?: OAuth2AuthenticationSettingsContract; + /** OpenID Connect Authentication Settings */ + openid?: OpenIdAuthenticationSettingsContract; + /** Collection of OAuth2 authentication settings included into this API. */ + oAuth2AuthenticationSettings?: OAuth2AuthenticationSettingsContract[]; + /** Collection of Open ID Connect authentication settings included into this API. */ + openidAuthenticationSettings?: OpenIdAuthenticationSettingsContract[]; } /** API OAuth2 Authentication settings details. */ export interface OAuth2AuthenticationSettingsContract { - /** OAuth authorization server identifier. */ - authorizationServerId?: string; - /** operations scope. */ - scope?: string; + /** OAuth authorization server identifier. */ + authorizationServerId?: string; + /** operations scope. */ + scope?: string; } /** API OAuth2 Authentication settings details. */ export interface OpenIdAuthenticationSettingsContract { - /** OAuth authorization server identifier. */ - openidProviderId?: string; - /** How to send token to the server. */ - bearerTokenSendingMethods?: BearerTokenSendingMethods[]; + /** OAuth authorization server identifier. */ + openidProviderId?: string; + /** How to send token to the server. */ + bearerTokenSendingMethods?: BearerTokenSendingMethods[]; } /** Subscription key parameter names details. */ export interface SubscriptionKeyParameterNamesContract { - /** Subscription key header name. */ - header?: string; - /** Subscription key query string parameter name. */ - query?: string; + /** Subscription key header name. */ + header?: string; + /** Subscription key query string parameter name. */ + query?: string; } /** API contact information */ export interface ApiContactInformation { - /** The identifying name of the contact person/organization */ - name?: string; - /** The URL pointing to the contact information. MUST be in the format of a URL */ - url?: string; - /** The email address of the contact person/organization. MUST be in the format of an email address */ - email?: string; + /** The identifying name of the contact person/organization */ + name?: string; + /** The URL pointing to the contact information. MUST be in the format of a URL */ + url?: string; + /** The email address of the contact person/organization. MUST be in the format of an email address */ + email?: string; } /** API license information */ export interface ApiLicenseInformation { - /** The license name used for the API */ - name?: string; - /** A URL to the license used for the API. MUST be in the format of a URL */ - url?: string; + /** The license name used for the API */ + name?: string; + /** A URL to the license used for the API. MUST be in the format of a URL */ + url?: string; } /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; } /** Error Response. */ export interface ErrorResponse { - /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ - code?: string; - /** Human-readable representation of the error. */ - message?: string; - /** The list of invalid fields send in request, in case of validation error. */ - details?: ErrorFieldContract[]; + /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ + code?: string; + /** Human-readable representation of the error. */ + message?: string; + /** The list of invalid fields send in request, in case of validation error. */ + details?: ErrorFieldContract[]; } /** Error Body contract. */ export interface ErrorResponseBody { - /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ - code?: string; - /** Human-readable representation of the error. */ - message?: string; - /** The list of invalid fields send in request, in case of validation error. */ - details?: ErrorFieldContract[]; + /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ + code?: string; + /** Human-readable representation of the error. */ + message?: string; + /** The list of invalid fields send in request, in case of validation error. */ + details?: ErrorFieldContract[]; } /** Error Field contract. */ export interface ErrorFieldContract { - /** Property level error code. */ - code?: string; - /** Human-readable representation of property-level error. */ - message?: string; - /** Property name. */ - target?: string; + /** Property level error code. */ + code?: string; + /** Human-readable representation of property-level error. */ + message?: string; + /** Property name. */ + target?: string; } /** API Create or Update Parameters. */ export interface ApiCreateOrUpdateParameter { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; - /** API identifier of the source API. */ - sourceApiId?: string; - /** API name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; - /** Content value when Importing an API. */ - value?: string; - /** Format of the Content in which the API is getting imported. */ - format?: ContentFormat; - /** Criteria to limit import of WSDL to a subset of the document. */ - wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; - /** - * Type of API to create. - * * `http` creates a REST API - * * `soap` creates a SOAP pass-through API - * * `websocket` creates websocket API - * * `graphql` creates GraphQL API. - */ - soapApiType?: SoapApiType; - /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ - translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** API identifier of the source API. */ + sourceApiId?: string; + /** API name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; + /** Content value when Importing an API. */ + value?: string; + /** Format of the Content in which the API is getting imported. */ + format?: ContentFormat; + /** Criteria to limit import of WSDL to a subset of the document. */ + wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; + /** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + */ + soapApiType?: SoapApiType; + /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ + translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; } /** Criteria to limit import of WSDL to a subset of the document. */ export interface ApiCreateOrUpdatePropertiesWsdlSelector { - /** Name of service to import from WSDL */ - wsdlServiceName?: string; - /** Name of endpoint(port) to import from WSDL */ - wsdlEndpointName?: string; + /** Name of service to import from WSDL */ + wsdlServiceName?: string; + /** Name of endpoint(port) to import from WSDL */ + wsdlEndpointName?: string; } /** API update contract details. */ export interface ApiUpdateContract { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; - /** API name. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** API name. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; } /** Paged API Revision list representation. */ export interface ApiRevisionCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiRevisionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ApiRevisionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Summary of revision metadata. */ export interface ApiRevisionContract { - /** - * Identifier of the API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiId?: string; - /** - * Revision number of API. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiRevision?: string; - /** - * The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedDateTime?: Date; - /** - * Description of the API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * Gateway URL for accessing the non-current API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateUrl?: string; - /** - * Indicates if API revision is the current api revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isCurrent?: boolean; + /** + * Identifier of the API Revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiId?: string; + /** + * Revision number of API. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiRevision?: string; + /** + * The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdDateTime?: Date; + /** + * The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updatedDateTime?: Date; + /** + * Description of the API Revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Gateway URL for accessing the non-current API Revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateUrl?: string; + /** + * Indicates if API revision is the current api revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isCurrent?: boolean; } /** Paged ApiRelease list representation. */ export interface ApiReleaseCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiReleaseContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ApiReleaseContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Operation list representation. */ export interface OperationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: OperationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: OperationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** API Operation Entity Base Contract details. */ export interface OperationEntityBaseContract { - /** Collection of URL template parameters. */ - templateParameters?: ParameterContract[]; - /** Description of the operation. May include HTML formatting tags. */ - description?: string; - /** An entity containing request details. */ - request?: RequestContract; - /** Array of Operation responses. */ - responses?: ResponseContract[]; - /** Operation Policies */ - policies?: string; + /** Collection of URL template parameters. */ + templateParameters?: ParameterContract[]; + /** Description of the operation. May include HTML formatting tags. */ + description?: string; + /** An entity containing request details. */ + request?: RequestContract; + /** Array of Operation responses. */ + responses?: ResponseContract[]; + /** Operation Policies */ + policies?: string; } /** Operation parameters details. */ export interface ParameterContract { - /** Parameter name. */ - name: string; - /** Parameter description. */ - description?: string; - /** Parameter type. */ - type: string; - /** Default parameter value. */ - defaultValue?: string; - /** Specifies whether parameter is required or not. */ - required?: boolean; - /** Parameter values. */ - values?: string[]; - /** Schema identifier. */ - schemaId?: string; - /** Type name defined by the schema. */ - typeName?: string; - /** Exampled defined for the parameter. */ - examples?: { [propertyName: string]: ParameterExampleContract }; + /** Parameter name. */ + name: string; + /** Parameter description. */ + description?: string; + /** Parameter type. */ + type: string; + /** Default parameter value. */ + defaultValue?: string; + /** Specifies whether parameter is required or not. */ + required?: boolean; + /** Parameter values. */ + values?: string[]; + /** Schema identifier. */ + schemaId?: string; + /** Type name defined by the schema. */ + typeName?: string; + /** Exampled defined for the parameter. */ + examples?: { [propertyName: string]: ParameterExampleContract }; } /** Parameter example. */ export interface ParameterExampleContract { - /** Short description for the example */ - summary?: string; - /** Long description for the example */ - description?: string; - /** Example value. May be a primitive value, or an object. */ - value?: any; - /** A URL that points to the literal example */ - externalValue?: string; + /** Short description for the example */ + summary?: string; + /** Long description for the example */ + description?: string; + /** Example value. May be a primitive value, or an object. */ + value?: any; + /** A URL that points to the literal example */ + externalValue?: string; } /** Operation request details. */ export interface RequestContract { - /** Operation request description. */ - description?: string; - /** Collection of operation request query parameters. */ - queryParameters?: ParameterContract[]; - /** Collection of operation request headers. */ - headers?: ParameterContract[]; - /** Collection of operation request representations. */ - representations?: RepresentationContract[]; + /** Operation request description. */ + description?: string; + /** Collection of operation request query parameters. */ + queryParameters?: ParameterContract[]; + /** Collection of operation request headers. */ + headers?: ParameterContract[]; + /** Collection of operation request representations. */ + representations?: RepresentationContract[]; } /** Operation request/response representation details. */ export interface RepresentationContract { - /** Specifies a registered or custom content type for this representation, e.g. application/xml. */ - contentType: string; - /** Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ - schemaId?: string; - /** Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ - typeName?: string; - /** Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. */ - formParameters?: ParameterContract[]; - /** Exampled defined for the representation. */ - examples?: { [propertyName: string]: ParameterExampleContract }; + /** Specifies a registered or custom content type for this representation, e.g. application/xml. */ + contentType: string; + /** Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ + schemaId?: string; + /** Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ + typeName?: string; + /** Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. */ + formParameters?: ParameterContract[]; + /** Exampled defined for the representation. */ + examples?: { [propertyName: string]: ParameterExampleContract }; } /** Operation response details. */ export interface ResponseContract { - /** Operation response HTTP status code. */ - statusCode: number; - /** Operation response description. */ - description?: string; - /** Collection of operation response representations. */ - representations?: RepresentationContract[]; - /** Collection of operation response headers. */ - headers?: ParameterContract[]; + /** Operation response HTTP status code. */ + statusCode: number; + /** Operation response description. */ + description?: string; + /** Collection of operation response representations. */ + representations?: RepresentationContract[]; + /** Collection of operation response headers. */ + headers?: ParameterContract[]; } /** API Operation Update Contract details. */ export interface OperationUpdateContract { - /** Collection of URL template parameters. */ - templateParameters?: ParameterContract[]; - /** Description of the operation. May include HTML formatting tags. */ - description?: string; - /** An entity containing request details. */ - request?: RequestContract; - /** Array of Operation responses. */ - responses?: ResponseContract[]; - /** Operation Policies */ - policies?: string; - /** Operation Name. */ - displayName?: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method?: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate?: string; + /** Collection of URL template parameters. */ + templateParameters?: ParameterContract[]; + /** Description of the operation. May include HTML formatting tags. */ + description?: string; + /** An entity containing request details. */ + request?: RequestContract; + /** Array of Operation responses. */ + responses?: ResponseContract[]; + /** Operation Policies */ + policies?: string; + /** Operation Name. */ + displayName?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate?: string; } /** The response of the list policy operation. */ export interface PolicyCollection { - /** Policy Contract value. */ - value?: PolicyContract[]; - /** Total record count number. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Policy Contract value. */ + value?: PolicyContract[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Tag list representation. */ export interface TagCollection { - /** Page values. */ - value?: TagContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: TagContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Resolver list representation. */ export interface ResolverCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ResolverContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ResolverContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** GraphQL API Resolver Update Contract details. */ export interface ResolverUpdateContract { - /** Resolver Name. */ - displayName?: string; - /** Path is type/field being resolved. */ - path?: string; - /** Description of the resolver. May include HTML formatting tags. */ - description?: string; + /** Resolver Name. */ + displayName?: string; + /** Path is type/field being resolved. */ + path?: string; + /** Description of the resolver. May include HTML formatting tags. */ + description?: string; } /** Paged Products list representation. */ export interface ProductCollection { - /** Page values. */ - value?: ProductContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: ProductContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Product Entity Base Parameters */ export interface ProductEntityBaseParameters { - /** Product description. May include HTML formatting tags. */ - description?: string; - /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ - terms?: string; - /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - subscriptionRequired?: boolean; - /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - approvalRequired?: boolean; - /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ - subscriptionsLimit?: number; - /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ - state?: ProductState; + /** Product description. May include HTML formatting tags. */ + description?: string; + /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ + terms?: string; + /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ + subscriptionRequired?: boolean; + /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ + approvalRequired?: boolean; + /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ + subscriptionsLimit?: number; + /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ + state?: ProductState; } /** The response of the list schema operation. */ export interface SchemaCollection { - /** - * API Schema Contract value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: SchemaContract[]; - /** Total record count number. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * API Schema Contract value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: SchemaContract[]; + /** Total record count number. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Diagnostic list representation. */ export interface DiagnosticCollection { - /** Page values. */ - value?: DiagnosticContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: DiagnosticContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Sampling settings for Diagnostic. */ export interface SamplingSettings { - /** Sampling type. */ - samplingType?: SamplingType; - /** Rate of sampling for fixed-rate sampling. */ - percentage?: number; + /** Sampling type. */ + samplingType?: SamplingType; + /** Rate of sampling for fixed-rate sampling. */ + percentage?: number; } /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ export interface PipelineDiagnosticSettings { - /** Diagnostic settings for request. */ - request?: HttpMessageDiagnostic; - /** Diagnostic settings for response. */ - response?: HttpMessageDiagnostic; + /** Diagnostic settings for request. */ + request?: HttpMessageDiagnostic; + /** Diagnostic settings for response. */ + response?: HttpMessageDiagnostic; } /** Http message diagnostic settings. */ export interface HttpMessageDiagnostic { - /** Array of HTTP Headers to log. */ - headers?: string[]; - /** Body logging settings. */ - body?: BodyDiagnosticSettings; - /** Data masking settings. */ - dataMasking?: DataMasking; + /** Array of HTTP Headers to log. */ + headers?: string[]; + /** Body logging settings. */ + body?: BodyDiagnosticSettings; + /** Data masking settings. */ + dataMasking?: DataMasking; } /** Body logging settings. */ export interface BodyDiagnosticSettings { - /** Number of request body bytes to log. */ - bytes?: number; + /** Number of request body bytes to log. */ + bytes?: number; } export interface DataMasking { - /** Masking settings for Url query parameters */ - queryParams?: DataMaskingEntity[]; - /** Masking settings for headers */ - headers?: DataMaskingEntity[]; + /** Masking settings for Url query parameters */ + queryParams?: DataMaskingEntity[]; + /** Masking settings for headers */ + headers?: DataMaskingEntity[]; } export interface DataMaskingEntity { - /** The name of an entity to mask (e.g. a name of a header or a query parameter). */ - value?: string; - /** Data masking mode. */ - mode?: DataMaskingMode; + /** The name of an entity to mask (e.g. a name of a header or a query parameter). */ + value?: string; + /** Data masking mode. */ + mode?: DataMaskingMode; } /** Paged Issue list representation. */ export interface IssueCollection { - /** - * Issue values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: IssueContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Issue values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: IssueContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Issue contract Base Properties. */ export interface IssueContractBaseProperties { - /** Date and time when the issue was created. */ - createdDate?: Date; - /** Status of the issue. */ - state?: State; - /** A resource identifier for the API the issue was created for. */ - apiId?: string; + /** Date and time when the issue was created. */ + createdDate?: Date; + /** Status of the issue. */ + state?: State; + /** A resource identifier for the API the issue was created for. */ + apiId?: string; } /** Issue update Parameters. */ export interface IssueUpdateContract { - /** Date and time when the issue was created. */ - createdDate?: Date; - /** Status of the issue. */ - state?: State; - /** A resource identifier for the API the issue was created for. */ - apiId?: string; - /** The issue title. */ - title?: string; - /** Text describing the issue. */ - description?: string; - /** A resource identifier for the user created the issue. */ - userId?: string; + /** Date and time when the issue was created. */ + createdDate?: Date; + /** Status of the issue. */ + state?: State; + /** A resource identifier for the API the issue was created for. */ + apiId?: string; + /** The issue title. */ + title?: string; + /** Text describing the issue. */ + description?: string; + /** A resource identifier for the user created the issue. */ + userId?: string; } /** Paged Issue Comment list representation. */ export interface IssueCommentCollection { - /** - * Issue Comment values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: IssueCommentContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Issue Comment values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: IssueCommentContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Issue Attachment list representation. */ export interface IssueAttachmentCollection { - /** - * Issue Attachment values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: IssueAttachmentContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Issue Attachment values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: IssueAttachmentContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged TagDescription list representation. */ export interface TagDescriptionCollection { - /** Page values. */ - value?: TagDescriptionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: TagDescriptionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Parameters supplied to the Create TagDescription operation. */ export interface TagDescriptionBaseProperties { - /** Description of the Tag. */ - description?: string; - /** Absolute URL of external resources describing the tag. */ - externalDocsUrl?: string; - /** Description of the external resources describing the tag. */ - externalDocsDescription?: string; + /** Description of the Tag. */ + description?: string; + /** Absolute URL of external resources describing the tag. */ + externalDocsUrl?: string; + /** Description of the external resources describing the tag. */ + externalDocsDescription?: string; } /** Parameters supplied to the Create TagDescription operation. */ export interface TagDescriptionCreateParameters { - /** Description of the Tag. */ - description?: string; - /** Absolute URL of external resources describing the tag. */ - externalDocsUrl?: string; - /** Description of the external resources describing the tag. */ - externalDocsDescription?: string; + /** Description of the Tag. */ + description?: string; + /** Absolute URL of external resources describing the tag. */ + externalDocsUrl?: string; + /** Description of the external resources describing the tag. */ + externalDocsDescription?: string; } /** Paged Tag list representation. */ export interface TagResourceCollection { - /** Page values. */ - value?: TagResourceContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: TagResourceContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** TagResource contract properties. */ export interface TagResourceContract { - /** Tag associated with the resource. */ - tag: TagResourceContractProperties; - /** API associated with the tag. */ - api?: ApiTagResourceContractProperties; - /** Operation associated with the tag. */ - operation?: OperationTagResourceContractProperties; - /** Product associated with the tag. */ - product?: ProductTagResourceContractProperties; + /** Tag associated with the resource. */ + tag: TagResourceContractProperties; + /** API associated with the tag. */ + api?: ApiTagResourceContractProperties; + /** Operation associated with the tag. */ + operation?: OperationTagResourceContractProperties; + /** Product associated with the tag. */ + product?: ProductTagResourceContractProperties; } /** Contract defining the Tag property in the Tag Resource Contract */ export interface TagResourceContractProperties { - /** Tag identifier */ - id?: string; - /** Tag Name */ - name?: string; + /** Tag identifier */ + id?: string; + /** Tag Name */ + name?: string; } /** Operation Entity contract Properties. */ export interface OperationTagResourceContractProperties { - /** Identifier of the operation in form /operations/{operationId}. */ - id?: string; - /** - * Operation name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * API Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiName?: string; - /** - * API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiRevision?: string; - /** - * API Version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiVersion?: string; - /** - * Operation Description. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly method?: string; - /** - * Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly urlTemplate?: string; + /** Identifier of the operation in form /operations/{operationId}. */ + id?: string; + /** + * Operation name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * API Name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiName?: string; + /** + * API Revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiRevision?: string; + /** + * API Version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiVersion?: string; + /** + * Operation Description. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly method?: string; + /** + * Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly urlTemplate?: string; } /** Wiki documentation details. */ export interface WikiDocumentationContract { - /** Documentation Identifier */ - documentationId?: string; + /** Documentation Identifier */ + documentationId?: string; } /** Wiki update contract details. */ export interface WikiUpdateContract { - /** Collection wiki documents included into this wiki. */ - documents?: WikiDocumentationContract[]; + /** Collection wiki documents included into this wiki. */ + documents?: WikiDocumentationContract[]; } /** Paged Wiki list representation. */ export interface WikiCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: WikiContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: WikiContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** API Export result. */ export interface ApiExportResult { - /** ResourceId of the API which was exported. */ - id?: string; - /** Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. */ - exportResultFormat?: ExportResultFormat; - /** The object defining the schema of the exported API Detail */ - value?: ApiExportResultValue; + /** ResourceId of the API which was exported. */ + id?: string; + /** Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. */ + exportResultFormat?: ExportResultFormat; + /** The object defining the schema of the exported API Detail */ + value?: ApiExportResultValue; } /** The object defining the schema of the exported API Detail */ export interface ApiExportResultValue { - /** Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. */ - link?: string; + /** Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. */ + link?: string; } /** Paged API Version Set list representation. */ export interface ApiVersionSetCollection { - /** Page values. */ - value?: ApiVersionSetContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: ApiVersionSetContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** API Version set base parameters */ export interface ApiVersionSetEntityBase { - /** Description of API Version Set. */ - description?: string; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; + /** Description of API Version Set. */ + description?: string; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; } /** Parameters to update or create an API Version Set Contract. */ export interface ApiVersionSetUpdateParameters { - /** Description of API Version Set. */ - description?: string; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; - /** Name of API Version Set */ - displayName?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: VersioningScheme; + /** Description of API Version Set. */ + description?: string; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; + /** Name of API Version Set */ + displayName?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; } /** Paged OAuth2 Authorization Servers list representation. */ export interface AuthorizationServerCollection { - /** Page values. */ - value?: AuthorizationServerContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: AuthorizationServerContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** External OAuth authorization server Update settings contract. */ export interface AuthorizationServerContractBaseProperties { - /** Description of the authorization server. Can contain HTML formatting tags. */ - description?: string; - /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ - authorizationMethods?: AuthorizationMethod[]; - /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ - tokenBodyParameters?: TokenBodyParameterContract[]; - /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ - tokenEndpoint?: string; - /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - supportState?: boolean; - /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ - defaultScope?: string; - /** Specifies the mechanism by which access token is passed to the API. */ - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; + /** Description of the authorization server. Can contain HTML formatting tags. */ + description?: string; + /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ + authorizationMethods?: AuthorizationMethod[]; + /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ + tokenBodyParameters?: TokenBodyParameterContract[]; + /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ + tokenEndpoint?: string; + /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ + supportState?: boolean; + /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ + defaultScope?: string; + /** Specifies the mechanism by which access token is passed to the API. */ + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; } /** OAuth acquire token request body parameter (www-url-form-encoded). */ export interface TokenBodyParameterContract { - /** body parameter name. */ - name: string; - /** body parameter value. */ - value: string; + /** body parameter name. */ + name: string; + /** body parameter value. */ + value: string; } /** OAuth Server Secrets Contract. */ export interface AuthorizationServerSecretsContract { - /** oAuth Authorization Server Secrets. */ - clientSecret?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; + /** oAuth Authorization Server Secrets. */ + clientSecret?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; } /** Paged Authorization Provider list representation. */ export interface AuthorizationProviderCollection { - /** Page values. */ - value?: AuthorizationProviderContract[]; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: AuthorizationProviderContract[]; + /** Next page link if any. */ + nextLink?: string; } /** OAuth2 settings details */ export interface AuthorizationProviderOAuth2Settings { - /** Redirect URL to be set in the OAuth application. */ - redirectUrl?: string; - /** OAuth2 settings */ - grantTypes?: AuthorizationProviderOAuth2GrantTypes; + /** Redirect URL to be set in the OAuth application. */ + redirectUrl?: string; + /** OAuth2 settings */ + grantTypes?: AuthorizationProviderOAuth2GrantTypes; } /** Authorization Provider oauth2 grant types settings */ export interface AuthorizationProviderOAuth2GrantTypes { - /** OAuth2 authorization code grant parameters */ - authorizationCode?: { [propertyName: string]: string }; - /** OAuth2 client credential grant parameters */ - clientCredentials?: { [propertyName: string]: string }; + /** OAuth2 authorization code grant parameters */ + authorizationCode?: { [propertyName: string]: string }; + /** OAuth2 client credential grant parameters */ + clientCredentials?: { [propertyName: string]: string }; } /** Paged Authorization list representation. */ export interface AuthorizationCollection { - /** Page values. */ - value?: AuthorizationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: AuthorizationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Authorization error details. */ export interface AuthorizationError { - /** Error code */ - code?: string; - /** Error message */ - message?: string; + /** Error code */ + code?: string; + /** Error message */ + message?: string; } /** Authorization login request contract. */ export interface AuthorizationLoginRequestContract { - /** The redirect URL after login has completed. */ - postLoginRedirectUrl?: string; + /** The redirect URL after login has completed. */ + postLoginRedirectUrl?: string; } /** Authorization login response contract. */ export interface AuthorizationLoginResponseContract { - /** The login link */ - loginLink?: string; + /** The login link */ + loginLink?: string; } /** Authorization confirm consent code request contract. */ export interface AuthorizationConfirmConsentCodeRequestContract { - /** The consent code from the authorization server after authorizing and consenting. */ - consentCode?: string; + /** The consent code from the authorization server after authorizing and consenting. */ + consentCode?: string; } /** Paged Authorization Access Policy list representation. */ export interface AuthorizationAccessPolicyCollection { - /** Page values. */ - value?: AuthorizationAccessPolicyContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: AuthorizationAccessPolicyContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Backend list representation. */ export interface BackendCollection { - /** Backend values. */ - value?: BackendContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Backend values. */ + value?: BackendContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Backend entity base Parameter set. */ export interface BackendBaseParameters { - /** Backend Title. */ - title?: string; - /** Backend Description. */ - description?: string; - /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ - resourceId?: string; - /** Backend Properties contract */ - properties?: BackendProperties; - /** Backend Credentials Contract Properties */ - credentials?: BackendCredentialsContract; - /** Backend gateway Contract Properties */ - proxy?: BackendProxyContract; - /** Backend TLS Properties */ - tls?: BackendTlsProperties; + /** Backend Title. */ + title?: string; + /** Backend Description. */ + description?: string; + /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ + resourceId?: string; + /** Backend Properties contract */ + properties?: BackendProperties; + /** Backend Credentials Contract Properties */ + credentials?: BackendCredentialsContract; + /** Backend gateway Contract Properties */ + proxy?: BackendProxyContract; + /** Backend TLS Properties */ + tls?: BackendTlsProperties; } /** Properties specific to the Backend Type. */ export interface BackendProperties { - /** Backend Service Fabric Cluster Properties */ - serviceFabricCluster?: BackendServiceFabricClusterProperties; + /** Backend Service Fabric Cluster Properties */ + serviceFabricCluster?: BackendServiceFabricClusterProperties; } /** Properties of the Service Fabric Type Backend. */ export interface BackendServiceFabricClusterProperties { - /** The client certificate id for the management endpoint. */ - clientCertificateId?: string; - /** The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided */ - clientCertificatethumbprint?: string; - /** Maximum number of retries while attempting resolve the partition. */ - maxPartitionResolutionRetries?: number; - /** The cluster management endpoint. */ - managementEndpoints: string[]; - /** Thumbprints of certificates cluster management service uses for tls communication */ - serverCertificateThumbprints?: string[]; - /** Server X509 Certificate Names Collection */ - serverX509Names?: X509CertificateName[]; + /** The client certificate id for the management endpoint. */ + clientCertificateId?: string; + /** The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided */ + clientCertificatethumbprint?: string; + /** Maximum number of retries while attempting resolve the partition. */ + maxPartitionResolutionRetries?: number; + /** The cluster management endpoint. */ + managementEndpoints: string[]; + /** Thumbprints of certificates cluster management service uses for tls communication */ + serverCertificateThumbprints?: string[]; + /** Server X509 Certificate Names Collection */ + serverX509Names?: X509CertificateName[]; } /** Properties of server X509Names. */ export interface X509CertificateName { - /** Common Name of the Certificate. */ - name?: string; - /** Thumbprint for the Issuer of the Certificate. */ - issuerCertificateThumbprint?: string; + /** Common Name of the Certificate. */ + name?: string; + /** Thumbprint for the Issuer of the Certificate. */ + issuerCertificateThumbprint?: string; } /** Details of the Credentials used to connect to Backend. */ export interface BackendCredentialsContract { - /** List of Client Certificate Ids. */ - certificateIds?: string[]; - /** List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. */ - certificate?: string[]; - /** Query Parameter description. */ - query?: { [propertyName: string]: string[] }; - /** Header Parameter description. */ - header?: { [propertyName: string]: string[] }; - /** Authorization header authentication */ - authorization?: BackendAuthorizationHeaderCredentials; + /** List of Client Certificate Ids. */ + certificateIds?: string[]; + /** List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. */ + certificate?: string[]; + /** Query Parameter description. */ + query?: { [propertyName: string]: string[] }; + /** Header Parameter description. */ + header?: { [propertyName: string]: string[] }; + /** Authorization header authentication */ + authorization?: BackendAuthorizationHeaderCredentials; } /** Authorization header information. */ export interface BackendAuthorizationHeaderCredentials { - /** Authentication Scheme name. */ - scheme: string; - /** Authentication Parameter value. */ - parameter: string; + /** Authentication Scheme name. */ + scheme: string; + /** Authentication Parameter value. */ + parameter: string; } /** Details of the Backend WebProxy Server to use in the Request to Backend. */ export interface BackendProxyContract { - /** WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. */ - url: string; - /** Username to connect to the WebProxy server */ - username?: string; - /** Password to connect to the WebProxy Server */ - password?: string; + /** WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. */ + url: string; + /** Username to connect to the WebProxy server */ + username?: string; + /** Password to connect to the WebProxy Server */ + password?: string; } /** Properties controlling TLS Certificate Validation. */ export interface BackendTlsProperties { - /** Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. */ - validateCertificateChain?: boolean; - /** Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. */ - validateCertificateName?: boolean; + /** Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. */ + validateCertificateChain?: boolean; + /** Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. */ + validateCertificateName?: boolean; } /** Backend update parameters. */ export interface BackendUpdateParameters { - /** Backend Title. */ - title?: string; - /** Backend Description. */ - description?: string; - /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ - resourceId?: string; - /** Backend Properties contract */ - properties?: BackendProperties; - /** Backend Credentials Contract Properties */ - credentials?: BackendCredentialsContract; - /** Backend gateway Contract Properties */ - proxy?: BackendProxyContract; - /** Backend TLS Properties */ - tls?: BackendTlsProperties; - /** Runtime Url of the Backend. */ - url?: string; - /** Backend communication protocol. */ - protocol?: BackendProtocol; + /** Backend Title. */ + title?: string; + /** Backend Description. */ + description?: string; + /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ + resourceId?: string; + /** Backend Properties contract */ + properties?: BackendProperties; + /** Backend Credentials Contract Properties */ + credentials?: BackendCredentialsContract; + /** Backend gateway Contract Properties */ + proxy?: BackendProxyContract; + /** Backend TLS Properties */ + tls?: BackendTlsProperties; + /** Runtime Url of the Backend. */ + url?: string; + /** Backend communication protocol. */ + protocol?: BackendProtocol; } /** Paged Caches list representation. */ export interface CacheCollection { - /** Page values. */ - value?: CacheContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: CacheContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Cache update details. */ export interface CacheUpdateParameters { - /** Cache description */ - description?: string; - /** Runtime connection string to cache */ - connectionString?: string; - /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ - useFromLocation?: string; - /** Original uri of entity in external system cache points to */ - resourceId?: string; + /** Cache description */ + description?: string; + /** Runtime connection string to cache */ + connectionString?: string; + /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ + useFromLocation?: string; + /** Original uri of entity in external system cache points to */ + resourceId?: string; } /** Paged Certificates list representation. */ export interface CertificateCollection { - /** Page values. */ - value?: CertificateContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: CertificateContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Issue contract Update Properties. */ export interface KeyVaultLastAccessStatusContractProperties { - /** Last status code for sync and refresh of secret from key vault. */ - code?: string; - /** Details of the error else empty. */ - message?: string; - /** - * Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - timeStampUtc?: Date; + /** Last status code for sync and refresh of secret from key vault. */ + code?: string; + /** Details of the error else empty. */ + message?: string; + /** + * Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + timeStampUtc?: Date; } /** Create keyVault contract details. */ export interface KeyVaultContractCreateProperties { - /** Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi */ - secretIdentifier?: string; - /** Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. */ - identityClientId?: string; + /** Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi */ + secretIdentifier?: string; + /** Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. */ + identityClientId?: string; } /** Certificate create or update details. */ export interface CertificateCreateOrUpdateParameters { - /** Base 64 encoded certificate using the application/x-pkcs12 representation. */ - data?: string; - /** Password for the Certificate */ - password?: string; - /** KeyVault location details of the certificate. */ - keyVault?: KeyVaultContractCreateProperties; + /** Base 64 encoded certificate using the application/x-pkcs12 representation. */ + data?: string; + /** Password for the Certificate */ + password?: string; + /** KeyVault location details of the certificate. */ + keyVault?: KeyVaultContractCreateProperties; } /** A request to perform the connectivity check operation on a API Management service. */ export interface ConnectivityCheckRequest { - /** Definitions about the connectivity check origin. */ - source: ConnectivityCheckRequestSource; - /** The connectivity check operation destination. */ - destination: ConnectivityCheckRequestDestination; - /** The IP version to be used. Only IPv4 is supported for now. */ - preferredIPVersion?: PreferredIPVersion; - /** The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. */ - protocol?: ConnectivityCheckProtocol; - /** Protocol-specific configuration. */ - protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; + /** Definitions about the connectivity check origin. */ + source: ConnectivityCheckRequestSource; + /** The connectivity check operation destination. */ + destination: ConnectivityCheckRequestDestination; + /** The IP version to be used. Only IPv4 is supported for now. */ + preferredIPVersion?: PreferredIPVersion; + /** The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. */ + protocol?: ConnectivityCheckProtocol; + /** Protocol-specific configuration. */ + protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; } /** Definitions about the connectivity check origin. */ export interface ConnectivityCheckRequestSource { - /** The API Management service region from where to start the connectivity check operation. */ - region: string; - /** The particular VMSS instance from which to fire the request. */ - instance?: number; + /** The API Management service region from where to start the connectivity check operation. */ + region: string; + /** The particular VMSS instance from which to fire the request. */ + instance?: number; } /** The connectivity check operation destination. */ export interface ConnectivityCheckRequestDestination { - /** Destination address. Can either be an IP address or a FQDN. */ - address: string; - /** Destination port. */ - port: number; + /** Destination address. Can either be an IP address or a FQDN. */ + address: string; + /** Destination port. */ + port: number; } /** Protocol-specific configuration. */ export interface ConnectivityCheckRequestProtocolConfiguration { - /** Configuration for HTTP or HTTPS requests. */ - httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; + /** Configuration for HTTP or HTTPS requests. */ + httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; } /** Configuration for HTTP or HTTPS requests. */ export interface ConnectivityCheckRequestProtocolConfigurationHttpConfiguration { - /** The HTTP method to be used. */ - method?: Method; - /** List of HTTP status codes considered valid for the request response. */ - validStatusCodes?: number[]; - /** List of headers to be included in the request. */ - headers?: HttpHeader[]; + /** The HTTP method to be used. */ + method?: Method; + /** List of HTTP status codes considered valid for the request response. */ + validStatusCodes?: number[]; + /** List of headers to be included in the request. */ + headers?: HttpHeader[]; } /** HTTP header and it's value. */ export interface HttpHeader { - /** Header name. */ - name: string; - /** Header value. */ - value: string; + /** Header name. */ + name: string; + /** Header value. */ + value: string; } /** Information on the connectivity status. */ export interface ConnectivityCheckResponse { - /** - * List of hops between the source and the destination. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hops?: ConnectivityHop[]; - /** - * The connection status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: ConnectionStatus; - /** - * Average latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly avgLatencyInMs?: number; - /** - * Minimum latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minLatencyInMs?: number; - /** - * Maximum latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxLatencyInMs?: number; - /** - * Total number of probes sent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly probesSent?: number; - /** - * Number of failed probes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly probesFailed?: number; + /** + * List of hops between the source and the destination. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hops?: ConnectivityHop[]; + /** + * The connection status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectionStatus?: ConnectionStatus; + /** + * Average latency in milliseconds. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly avgLatencyInMs?: number; + /** + * Minimum latency in milliseconds. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minLatencyInMs?: number; + /** + * Maximum latency in milliseconds. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxLatencyInMs?: number; + /** + * Total number of probes sent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly probesSent?: number; + /** + * Number of failed probes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly probesFailed?: number; } /** Information about a hop between the source and the destination. */ export interface ConnectivityHop { - /** - * The type of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The ID of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The IP address of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly address?: string; - /** - * The ID of the resource corresponding to this hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; - /** - * List of next hop identifiers. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextHopIds?: string[]; - /** - * List of issues. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly issues?: ConnectivityIssue[]; + /** + * The type of the hop. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The ID of the hop. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The IP address of the hop. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly address?: string; + /** + * The ID of the resource corresponding to this hop. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceId?: string; + /** + * List of next hop identifiers. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextHopIds?: string[]; + /** + * List of issues. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issues?: ConnectivityIssue[]; } /** Information about an issue encountered in the process of checking for connectivity. */ export interface ConnectivityIssue { - /** - * The origin of the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * The severity of the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly severity?: Severity; - /** - * The type of issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: IssueType; - /** - * Provides additional context on the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly context?: { [propertyName: string]: string }[]; + /** + * The origin of the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * The severity of the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly severity?: Severity; + /** + * The type of issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: IssueType; + /** + * Provides additional context on the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly context?: { [propertyName: string]: string }[]; } /** Paged list of content types. */ export interface ContentTypeCollection { - /** - * Collection of content types. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ContentTypeContract[]; - /** - * Next page link, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Collection of content types. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ContentTypeContract[]; + /** + * Next page link, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged list of content items. */ export interface ContentItemCollection { - /** - * Collection of content items. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ContentItemContract[]; - /** - * Next page link, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Collection of content items. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ContentItemContract[]; + /** + * Next page link, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged deleted API Management Services List Representation. */ export interface DeletedServicesCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: DeletedServiceContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DeletedServiceContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results. */ export interface OperationListResult { - /** List of operations supported by the resource provider. */ - value?: Operation[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; + /** List of operations supported by the resource provider. */ + value?: Operation[]; + /** URL to get the next set of operation list results if there are any. */ + nextLink?: string; } /** REST API operation */ export interface Operation { - /** Operation name: {provider}/{resource}/{operation} */ - name?: string; - /** The object that describes the operation. */ - display?: OperationDisplay; - /** The operation origin. */ - origin?: string; - /** The operation properties. */ - properties?: Record; + /** Operation name: {provider}/{resource}/{operation} */ + name?: string; + /** The object that describes the operation. */ + display?: OperationDisplay; + /** The operation origin. */ + origin?: string; + /** The operation properties. */ + properties?: Record; } /** The object that describes the operation. */ export interface OperationDisplay { - /** Friendly name of the resource provider */ - provider?: string; - /** Operation type: read, write, delete, listKeys/action, etc. */ - operation?: string; - /** Resource type on which the operation is performed. */ - resource?: string; - /** Friendly name of the operation */ - description?: string; + /** Friendly name of the resource provider */ + provider?: string; + /** Operation type: read, write, delete, listKeys/action, etc. */ + operation?: string; + /** Resource type on which the operation is performed. */ + resource?: string; + /** Friendly name of the operation */ + description?: string; } /** The API Management service SKUs operation response. */ export interface ResourceSkuResults { - /** The list of skus available for the service. */ - value: ResourceSkuResult[]; - /** The uri to fetch the next page of API Management service Skus. */ - nextLink?: string; + /** The list of skus available for the service. */ + value: ResourceSkuResult[]; + /** The uri to fetch the next page of API Management service Skus. */ + nextLink?: string; } /** Describes an available API Management service SKU. */ export interface ResourceSkuResult { - /** - * The type of resource the SKU applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * Specifies API Management SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sku?: ResourceSku; - /** - * Specifies the number of API Management units. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: ResourceSkuCapacity; + /** + * The type of resource the SKU applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; + /** + * Specifies API Management SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sku?: ResourceSku; + /** + * Specifies the number of API Management units. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacity?: ResourceSkuCapacity; } /** Describes an available API Management SKU. */ export interface ResourceSku { - /** Name of the Sku. */ - name?: SkuType; + /** Name of the Sku. */ + name?: SkuType; } /** Describes scaling information of a SKU. */ export interface ResourceSkuCapacity { - /** - * The minimum capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minimum?: number; - /** - * The maximum capacity that can be set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maximum?: number; - /** - * The default capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly default?: number; - /** - * The scale type applicable to the sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scaleType?: ResourceSkuCapacityScaleType; + /** + * The minimum capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minimum?: number; + /** + * The maximum capacity that can be set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maximum?: number; + /** + * The default capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly default?: number; + /** + * The scale type applicable to the sku. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scaleType?: ResourceSkuCapacityScaleType; } /** Parameters supplied to the Backup/Restore of an API Management service operation. */ export interface ApiManagementServiceBackupRestoreParameters { - /** The name of the Azure storage account (used to place/retrieve the backup). */ - storageAccount: string; - /** The name of the blob container (used to place/retrieve the backup). */ - containerName: string; - /** The name of the backup file to create/retrieve. */ - backupName: string; - /** The type of access to be used for the storage account. */ - accessType?: AccessType; - /** Storage account access key. Required only if `accessType` is set to `AccessKey`. */ - accessKey?: string; - /** The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`. */ - clientId?: string; + /** The name of the Azure storage account (used to place/retrieve the backup). */ + storageAccount: string; + /** The name of the blob container (used to place/retrieve the backup). */ + containerName: string; + /** The name of the backup file to create/retrieve. */ + backupName: string; + /** The type of access to be used for the storage account. */ + accessType?: AccessType; + /** Storage account access key. Required only if `accessType` is set to `AccessKey`. */ + accessKey?: string; + /** The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`. */ + clientId?: string; } /** Base Properties of an API Management service resource description. */ export interface ApiManagementServiceBaseProperties { - /** Email address from which the notification will be sent. */ - notificationSenderEmail?: string; - /** - * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** - * Gateway URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayUrl?: string; - /** - * Gateway URL of the API Management service in the Default Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** - * Publisher portal endpoint Url of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portalUrl?: string; - /** - * Management API endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementApiUrl?: string; - /** - * SCM endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scmUrl?: string; - /** - * DEveloper Portal endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly developerPortalUrl?: string; - /** Custom hostname configuration of the API Management service. */ - hostnameConfigurations?: HostnameConfiguration[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ - publicNetworkAccess?: PublicNetworkAccess; - /** Virtual network configuration of the API Management service. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** Additional datacenter locations of the API Management service. */ - additionalLocations?: AdditionalLocation[]; - /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ - customProperties?: { [propertyName: string]: string }; - /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ - certificates?: CertificateConfiguration[]; - /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ - enableClientCertificate?: boolean; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ - disableGateway?: boolean; - /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ - virtualNetworkType?: VirtualNetworkType; - /** Control Plane Apis version constraint for the API Management service. */ - apiVersionConstraint?: ApiVersionConstraint; - /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ - restore?: boolean; - /** List of Private Endpoint Connections of this service. */ - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - /** - * Compute Platform Version running the service in this location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; + /** Email address from which the notification will be sent. */ + notificationSenderEmail?: string; + /** + * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetProvisioningState?: string; + /** + * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdAtUtc?: Date; + /** + * Gateway URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayUrl?: string; + /** + * Gateway URL of the API Management service in the Default Region. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayRegionalUrl?: string; + /** + * Publisher portal endpoint Url of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly portalUrl?: string; + /** + * Management API endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managementApiUrl?: string; + /** + * SCM endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scmUrl?: string; + /** + * DEveloper Portal endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly developerPortalUrl?: string; + /** Custom hostname configuration of the API Management service. */ + hostnameConfigurations?: HostnameConfiguration[]; + /** + * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicIPAddresses?: string[]; + /** + * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** Virtual network configuration of the API Management service. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Additional datacenter locations of the API Management service. */ + additionalLocations?: AdditionalLocation[]; + /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + customProperties?: { [propertyName: string]: string }; + /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ + certificates?: CertificateConfiguration[]; + /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ + enableClientCertificate?: boolean; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** + * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ + disableGateway?: boolean; + /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ + virtualNetworkType?: VirtualNetworkType; + /** Control Plane Apis version constraint for the API Management service. */ + apiVersionConstraint?: ApiVersionConstraint; + /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ + restore?: boolean; + /** List of Private Endpoint Connections of this service. */ + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + /** + * Compute Platform Version running the service in this location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly platformVersion?: PlatformVersion; } /** Custom hostname configuration. */ export interface HostnameConfiguration { - /** Hostname type. */ - type: HostnameType; - /** Hostname to configure on the Api Management service. */ - hostName: string; - /** Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12* */ - keyVaultId?: string; - /** System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. */ - identityClientId?: string; - /** Base64 Encoded certificate. */ - encodedCertificate?: string; - /** Certificate Password. */ - certificatePassword?: string; - /** Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. */ - defaultSslBinding?: boolean; - /** Specify true to always negotiate client certificate on the hostname. Default Value is false. */ - negotiateClientCertificate?: boolean; - /** Certificate information. */ - certificate?: CertificateInformation; - /** Certificate Source. */ - certificateSource?: CertificateSource; - /** Certificate Status. */ - certificateStatus?: CertificateStatus; + /** Hostname type. */ + type: HostnameType; + /** Hostname to configure on the Api Management service. */ + hostName: string; + /** Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12* */ + keyVaultId?: string; + /** System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. */ + identityClientId?: string; + /** Base64 Encoded certificate. */ + encodedCertificate?: string; + /** Certificate Password. */ + certificatePassword?: string; + /** Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. */ + defaultSslBinding?: boolean; + /** Specify true to always negotiate client certificate on the hostname. Default Value is false. */ + negotiateClientCertificate?: boolean; + /** Certificate information. */ + certificate?: CertificateInformation; + /** Certificate Source. */ + certificateSource?: CertificateSource; + /** Certificate Status. */ + certificateStatus?: CertificateStatus; } /** SSL certificate information. */ export interface CertificateInformation { - /** Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ - expiry: Date; - /** Thumbprint of the certificate. */ - thumbprint: string; - /** Subject of the certificate. */ - subject: string; + /** Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expiry: Date; + /** Thumbprint of the certificate. */ + thumbprint: string; + /** Subject of the certificate. */ + subject: string; } /** Configuration of a virtual network to which API Management service is deployed. */ export interface VirtualNetworkConfiguration { - /** - * The virtual network ID. This is typically a GUID. Expect a null GUID by default. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vnetid?: string; - /** - * The name of the subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnetname?: string; - /** The full resource ID of a subnet in a virtual network to deploy the API Management service in. */ - subnetResourceId?: string; + /** + * The virtual network ID. This is typically a GUID. Expect a null GUID by default. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vnetid?: string; + /** + * The name of the subnet. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subnetname?: string; + /** The full resource ID of a subnet in a virtual network to deploy the API Management service in. */ + subnetResourceId?: string; } /** Description of an additional API Management resource location. */ export interface AdditionalLocation { - /** The location name of the additional region among Azure Data center regions. */ - location: string; - /** SKU properties of the API Management service. */ - sku: ApiManagementServiceSkuProperties; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Virtual network configuration for the location. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** - * Gateway URL of the API Management service in the Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. */ - disableGateway?: boolean; - /** - * Compute Platform Version running the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; + /** The location name of the additional region among Azure Data center regions. */ + location: string; + /** SKU properties of the API Management service. */ + sku: ApiManagementServiceSkuProperties; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** + * Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicIPAddresses?: string[]; + /** + * Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Virtual network configuration for the location. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** + * Gateway URL of the API Management service in the Region. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayRegionalUrl?: string; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** + * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. */ + disableGateway?: boolean; + /** + * Compute Platform Version running the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly platformVersion?: PlatformVersion; } /** API Management service resource SKU properties. */ export interface ApiManagementServiceSkuProperties { - /** Name of the Sku. */ - name: SkuType; - /** Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. */ - capacity: number; + /** Name of the Sku. */ + name: SkuType; + /** Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. */ + capacity: number; } /** Certificate configuration which consist of non-trusted intermediates and root certificates. */ export interface CertificateConfiguration { - /** Base64 Encoded certificate. */ - encodedCertificate?: string; - /** Certificate Password. */ - certificatePassword?: string; - /** The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. */ - storeName: CertificateConfigurationStoreName; - /** Certificate information. */ - certificate?: CertificateInformation; + /** Base64 Encoded certificate. */ + encodedCertificate?: string; + /** Certificate Password. */ + certificatePassword?: string; + /** The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. */ + storeName: CertificateConfigurationStoreName; + /** Certificate information. */ + certificate?: CertificateInformation; } /** Control Plane Apis version constraint for the API Management service. */ export interface ApiVersionConstraint { - /** Limit control plane API calls to API Management service with version equal to or newer than this value. */ - minApiVersion?: string; + /** Limit control plane API calls to API Management service with version equal to or newer than this value. */ + minApiVersion?: string; } /** Remote Private Endpoint Connection resource. */ export interface RemotePrivateEndpointConnectionWrapper { - /** Private Endpoint connection resource id */ - id?: string; - /** Private Endpoint Connection Name */ - name?: string; - /** Private Endpoint Connection Resource Type */ - type?: string; - /** The resource of private end point. */ - privateEndpoint?: ArmIdWrapper; - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the private endpoint connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * All the Group ids. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupIds?: string[]; + /** Private Endpoint connection resource id */ + id?: string; + /** Private Endpoint Connection Name */ + name?: string; + /** Private Endpoint Connection Resource Type */ + type?: string; + /** The resource of private end point. */ + privateEndpoint?: ArmIdWrapper; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * All the Group ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupIds?: string[]; } /** A wrapper for an ARM resource id */ export interface ArmIdWrapper { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly id?: string; } /** A collection of information about the state of the connection between service consumer and provider. */ export interface PrivateLinkServiceConnectionState { - /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ - status?: PrivateEndpointServiceConnectionStatus; - /** The reason for approval/rejection of the connection. */ - description?: string; - /** A message indicating if changes on the service provider require any updates on the consumer. */ - actionsRequired?: string; + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; } /** Identity properties of the Api Management service resource. */ export interface ApiManagementServiceIdentity { - /** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ - type: ApimIdentityType; - /** - * The principal id of the identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client tenant id of the identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** - * The list of user identities associated with the resource. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - */ - userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; + /** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ + type: ApimIdentityType; + /** + * The principal id of the identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client tenant id of the identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** + * The list of user identities associated with the resource. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; } export interface UserIdentityProperties { - /** The principal id of user assigned identity. */ - principalId?: string; - /** The client id of user assigned identity. */ - clientId?: string; + /** The principal id of user assigned identity. */ + principalId?: string; + /** The client id of user assigned identity. */ + clientId?: string; } /** Metadata pertaining to creation and last modification of the resource. */ export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } /** The Resource definition. */ export interface ApimResource { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type for API Management resource is set to Microsoft.ApiManagement. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; + /** + * Resource ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Resource type for API Management resource is set to Microsoft.ApiManagement. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; } /** The response of the List API Management services operation. */ export interface ApiManagementServiceListResult { - /** Result of the List API Management services operation. */ - value: ApiManagementServiceResource[]; - /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ - nextLink?: string; + /** Result of the List API Management services operation. */ + value: ApiManagementServiceResource[]; + /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ + nextLink?: string; } /** The response of the GetSsoToken operation. */ export interface ApiManagementServiceGetSsoTokenResult { - /** Redirect URL to the Publisher Portal containing the SSO token. */ - redirectUri?: string; + /** Redirect URL to the Publisher Portal containing the SSO token. */ + redirectUri?: string; } /** Parameters supplied to the CheckNameAvailability operation. */ export interface ApiManagementServiceCheckNameAvailabilityParameters { - /** The name to check for availability. */ - name: string; + /** The name to check for availability. */ + name: string; } /** Response of the CheckNameAvailability operation. */ export interface ApiManagementServiceNameAvailabilityResult { - /** - * True if the name is available and can be used to create a new API Management service; otherwise false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nameAvailable?: boolean; - /** - * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. */ - reason?: NameAvailabilityReason; + /** + * True if the name is available and can be used to create a new API Management service; otherwise false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nameAvailable?: boolean; + /** + * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. */ + reason?: NameAvailabilityReason; } /** Response of the GetDomainOwnershipIdentifier operation. */ export interface ApiManagementServiceGetDomainOwnershipIdentifierResult { - /** - * The domain ownership identifier value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly domainOwnershipIdentifier?: string; + /** + * The domain ownership identifier value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly domainOwnershipIdentifier?: string; } /** Parameter supplied to the Apply Network configuration operation. */ export interface ApiManagementServiceApplyNetworkConfigurationParameters { - /** Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. */ - location?: string; + /** Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. */ + location?: string; } /** Paged email template list representation. */ export interface EmailTemplateCollection { - /** Page values. */ - value?: EmailTemplateContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: EmailTemplateContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Email Template Parameter contract. */ export interface EmailTemplateParametersContractProperties { - /** Template parameter name. */ - name?: string; - /** Template parameter title. */ - title?: string; - /** Template parameter description. */ - description?: string; + /** Template parameter name. */ + name?: string; + /** Template parameter title. */ + title?: string; + /** Template parameter description. */ + description?: string; } /** Email Template update Parameters. */ export interface EmailTemplateUpdateParameters { - /** Subject of the Template. */ - subject?: string; - /** Title of the Template. */ - title?: string; - /** Description of the Email Template. */ - description?: string; - /** Email Template Body. This should be a valid XDocument */ - body?: string; - /** Email Template Parameter values. */ - parameters?: EmailTemplateParametersContractProperties[]; + /** Subject of the Template. */ + subject?: string; + /** Title of the Template. */ + title?: string; + /** Description of the Email Template. */ + description?: string; + /** Email Template Body. This should be a valid XDocument */ + body?: string; + /** Email Template Parameter values. */ + parameters?: EmailTemplateParametersContractProperties[]; } /** Paged Gateway list representation. */ export interface GatewayCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GatewayContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GatewayContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Resource location data properties. */ export interface ResourceLocationDataContract { - /** A canonical name for the geographic or physical location. */ - name: string; - /** The city or locality where the resource is located. */ - city?: string; - /** The district, state, or province where the resource is located. */ - district?: string; - /** The country or region where the resource is located. */ - countryOrRegion?: string; + /** A canonical name for the geographic or physical location. */ + name: string; + /** The city or locality where the resource is located. */ + city?: string; + /** The district, state, or province where the resource is located. */ + district?: string; + /** The country or region where the resource is located. */ + countryOrRegion?: string; } /** Gateway authentication keys. */ export interface GatewayKeysContract { - /** Primary gateway key. */ - primary?: string; - /** Secondary gateway key. */ - secondary?: string; + /** Primary gateway key. */ + primary?: string; + /** Secondary gateway key. */ + secondary?: string; } /** Gateway key regeneration request contract properties. */ export interface GatewayKeyRegenerationRequestContract { - /** The Key being regenerated. */ - keyType: KeyType; + /** The Key being regenerated. */ + keyType: KeyType; } /** Gateway token request contract properties. */ export interface GatewayTokenRequestContract { - /** The Key to be used to generate gateway token. */ - keyType: KeyType; - /** - * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expiry: Date; + /** The Key to be used to generate gateway token. */ + keyType: KeyType; + /** + * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + expiry: Date; } /** Gateway access token. */ export interface GatewayTokenContract { - /** Shared Access Authentication token value for the Gateway. */ - value?: string; + /** Shared Access Authentication token value for the Gateway. */ + value?: string; } /** Paged Gateway hostname configuration list representation. */ export interface GatewayHostnameConfigurationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GatewayHostnameConfigurationContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GatewayHostnameConfigurationContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Gateway certificate authority list representation. */ export interface GatewayCertificateAuthorityCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GatewayCertificateAuthorityContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GatewayCertificateAuthorityContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Group list representation. */ export interface GroupCollection { - /** Page values. */ - value?: GroupContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: GroupContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Group contract Properties. */ export interface GroupContractProperties { - /** Group name. */ - displayName: string; - /** Group description. Can contain HTML formatting tags. */ - description?: string; - /** - * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly builtIn?: boolean; - /** Group type. */ - type?: GroupType; - /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; + /** Group name. */ + displayName: string; + /** Group description. Can contain HTML formatting tags. */ + description?: string; + /** + * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly builtIn?: boolean; + /** Group type. */ + type?: GroupType; + /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; } /** Parameters supplied to the Create Group operation. */ export interface GroupCreateParameters { - /** Group name. */ - displayName?: string; - /** Group description. */ - description?: string; - /** Group type. */ - type?: GroupType; - /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; + /** Group name. */ + displayName?: string; + /** Group description. */ + description?: string; + /** Group type. */ + type?: GroupType; + /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; } /** Parameters supplied to the Update Group operation. */ export interface GroupUpdateParameters { - /** Group name. */ - displayName?: string; - /** Group description. */ - description?: string; - /** Group type. */ - type?: GroupType; - /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; + /** Group name. */ + displayName?: string; + /** Group description. */ + description?: string; + /** Group type. */ + type?: GroupType; + /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; } /** Paged Users list representation. */ export interface UserCollection { - /** Page values. */ - value?: UserContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: UserContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** User Entity Base Parameters set. */ export interface UserEntityBaseParameters { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; } /** User identity details. */ export interface UserIdentityContract { - /** Identity provider name. */ - provider?: string; - /** Identifier value within provider. */ - id?: string; + /** Identity provider name. */ + provider?: string; + /** Identifier value within provider. */ + id?: string; } /** List of all the Identity Providers configured on the service instance. */ export interface IdentityProviderList { - /** Identity Provider configuration values. */ - value?: IdentityProviderContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Identity Provider configuration values. */ + value?: IdentityProviderContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Identity Provider Base Parameter Properties. */ export interface IdentityProviderBaseParameters { - /** Identity Provider Type identifier. */ - type?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; + /** Identity Provider Type identifier. */ + type?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; } /** Parameters supplied to update Identity Provider */ export interface IdentityProviderUpdateParameters { - /** Identity Provider Type identifier. */ - type?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ - clientSecret?: string; + /** Identity Provider Type identifier. */ + type?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ + clientSecret?: string; } /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ export interface ClientSecretContract { - /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ - clientSecret?: string; + /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ + clientSecret?: string; } /** Paged Logger list representation. */ export interface LoggerCollection { - /** Logger values. */ - value?: LoggerContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Logger values. */ + value?: LoggerContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Logger update contract. */ export interface LoggerUpdateContract { - /** Logger type. */ - loggerType?: LoggerType; - /** Logger description. */ - description?: string; - /** Logger credentials. */ - credentials?: { [propertyName: string]: string }; - /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ - isBuffered?: boolean; + /** Logger type. */ + loggerType?: LoggerType; + /** Logger description. */ + description?: string; + /** Logger credentials. */ + credentials?: { [propertyName: string]: string }; + /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ + isBuffered?: boolean; } /** Paged NamedValue list representation. */ export interface NamedValueCollection { - /** Page values. */ - value?: NamedValueContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: NamedValueContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** NamedValue Entity Base Parameters set. */ export interface NamedValueEntityBaseParameters { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; } /** NamedValue update Parameters. */ export interface NamedValueUpdateParameters { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; } /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ export interface NamedValueSecretContract { - /** This is secret value of the NamedValue entity. */ - value?: string; + /** This is secret value of the NamedValue entity. */ + value?: string; } /** Network Status in the Location */ export interface NetworkStatusContractByLocation { - /** Location of service */ - location?: string; - /** Network status in Location */ - networkStatus?: NetworkStatusContract; + /** Location of service */ + location?: string; + /** Network status in Location */ + networkStatus?: NetworkStatusContract; } /** Network Status details. */ export interface NetworkStatusContract { - /** Gets the list of DNS servers IPV4 addresses. */ - dnsServers: string[]; - /** Gets the list of Connectivity Status to the Resources on which the service depends upon. */ - connectivityStatus: ConnectivityStatusContract[]; + /** Gets the list of DNS servers IPV4 addresses. */ + dnsServers: string[]; + /** Gets the list of Connectivity Status to the Resources on which the service depends upon. */ + connectivityStatus: ConnectivityStatusContract[]; } /** Details about connectivity to a resource. */ export interface ConnectivityStatusContract { - /** The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. */ - name: string; - /** Resource Connectivity Status Type identifier. */ - status: ConnectivityStatusType; - /** Error details of the connectivity to the resource. */ - error?: string; - /** - * The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - lastUpdated: Date; - /** - * The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - lastStatusChange: Date; - /** Resource Type. */ - resourceType: string; - /** Whether this is optional. */ - isOptional: boolean; + /** The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. */ + name: string; + /** Resource Connectivity Status Type identifier. */ + status: ConnectivityStatusType; + /** Error details of the connectivity to the resource. */ + error?: string; + /** + * The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + lastUpdated: Date; + /** + * The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + lastStatusChange: Date; + /** Resource Type. */ + resourceType: string; + /** Whether this is optional. */ + isOptional: boolean; } /** Paged Notification list representation. */ export interface NotificationCollection { - /** Page values. */ - value?: NotificationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: NotificationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Notification Parameter contract. */ export interface RecipientsContractProperties { - /** List of Emails subscribed for the notification. */ - emails?: string[]; - /** List of Users subscribed for the notification. */ - users?: string[]; + /** List of Emails subscribed for the notification. */ + emails?: string[]; + /** List of Users subscribed for the notification. */ + users?: string[]; } /** Paged Recipient User list representation. */ export interface RecipientUserCollection { - /** Page values. */ - value?: RecipientUserContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: RecipientUserContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Recipient User list representation. */ export interface RecipientEmailCollection { - /** Page values. */ - value?: RecipientEmailContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: RecipientEmailContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged OpenIdProviders list representation. */ export interface OpenIdConnectProviderCollection { - /** Page values. */ - value?: OpenidConnectProviderContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: OpenidConnectProviderContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Parameters supplied to the Update OpenID Connect Provider operation. */ export interface OpenidConnectProviderUpdateContract { - /** User-friendly OpenID Connect Provider name. */ - displayName?: string; - /** User-friendly description of OpenID Connect Provider. */ - description?: string; - /** Metadata endpoint URI. */ - metadataEndpoint?: string; - /** Client ID of developer console which is the client application. */ - clientId?: string; - /** Client Secret of developer console which is the client application. */ - clientSecret?: string; - /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; + /** User-friendly OpenID Connect Provider name. */ + displayName?: string; + /** User-friendly description of OpenID Connect Provider. */ + description?: string; + /** Metadata endpoint URI. */ + metadataEndpoint?: string; + /** Client ID of developer console which is the client application. */ + clientId?: string; + /** Client Secret of developer console which is the client application. */ + clientSecret?: string; + /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; } /** Collection of Outbound Environment Endpoints */ export interface OutboundEnvironmentEndpointList { - /** Collection of resources. */ - value: OutboundEnvironmentEndpoint[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** Collection of resources. */ + value: OutboundEnvironmentEndpoint[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to. */ export interface OutboundEnvironmentEndpoint { - /** The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. */ - category?: string; - /** The endpoints that the Api Management Service reaches the service at. */ - endpoints?: EndpointDependency[]; + /** The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. */ + category?: string; + /** The endpoints that the Api Management Service reaches the service at. */ + endpoints?: EndpointDependency[]; } /** A domain name that a service is reached at. */ export interface EndpointDependency { - /** The domain name of the dependency. */ - domainName?: string; - /** The Ports used when connecting to DomainName. */ - endpointDetails?: EndpointDetail[]; + /** The domain name of the dependency. */ + domainName?: string; + /** The Ports used when connecting to DomainName. */ + endpointDetails?: EndpointDetail[]; } /** Current TCP connectivity information from the Api Management Service to a single endpoint. */ export interface EndpointDetail { - /** The port an endpoint is connected to. */ - port?: number; - /** The region of the dependency. */ - region?: string; + /** The port an endpoint is connected to. */ + port?: number; + /** The region of the dependency. */ + region?: string; } /** Descriptions of API Management policies. */ export interface PolicyDescriptionCollection { - /** Descriptions of API Management policies. */ - value?: PolicyDescriptionContract[]; - /** Total record count number. */ - count?: number; + /** Descriptions of API Management policies. */ + value?: PolicyDescriptionContract[]; + /** Total record count number. */ + count?: number; } /** The response of the get policy fragments operation. */ export interface PolicyFragmentCollection { - /** Policy fragment contract value. */ - value?: PolicyFragmentContract[]; - /** Total record count number. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Policy fragment contract value. */ + value?: PolicyFragmentContract[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** A collection of resources. */ export interface ResourceCollection { - /** A collection of resources. */ - value?: ResourceCollectionValueItem[]; - /** Total record count number. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** A collection of resources. */ + value?: ResourceCollectionValueItem[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** The collection of the developer portal configurations. */ export interface PortalConfigCollection { - /** The developer portal configurations. */ - value?: PortalConfigContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** The developer portal configurations. */ + value?: PortalConfigContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } export interface PortalConfigPropertiesSignin { - /** Redirect anonymous users to the sign-in page. */ - require?: boolean; + /** Redirect anonymous users to the sign-in page. */ + require?: boolean; } export interface PortalConfigPropertiesSignup { - /** Terms of service settings. */ - termsOfService?: PortalConfigTermsOfServiceProperties; + /** Terms of service settings. */ + termsOfService?: PortalConfigTermsOfServiceProperties; } /** Terms of service contract properties. */ export interface PortalConfigTermsOfServiceProperties { - /** A terms of service text. */ - text?: string; - /** Ask user for consent to the terms of service. */ - requireConsent?: boolean; + /** A terms of service text. */ + text?: string; + /** Ask user for consent to the terms of service. */ + requireConsent?: boolean; } export interface PortalConfigDelegationProperties { - /** Enable or disable delegation for user registration. */ - delegateRegistration?: boolean; - /** Enable or disable delegation for product subscriptions. */ - delegateSubscription?: boolean; - /** A delegation endpoint URL. */ - delegationUrl?: string; - /** A base64-encoded validation key to ensure requests originate from Azure API Management service. */ - validationKey?: string; + /** Enable or disable delegation for user registration. */ + delegateRegistration?: boolean; + /** Enable or disable delegation for product subscriptions. */ + delegateSubscription?: boolean; + /** A delegation endpoint URL. */ + delegationUrl?: string; + /** A base64-encoded validation key to ensure requests originate from Azure API Management service. */ + validationKey?: string; } /** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ export interface PortalConfigCorsProperties { - /** Allowed origins, e.g. `https://trusted.com`. */ - allowedOrigins?: string[]; + /** Allowed origins, e.g. `https://trusted.com`. */ + allowedOrigins?: string[]; } /** The developer portal Content Security Policy (CSP) settings. */ export interface PortalConfigCspProperties { - /** The mode of the developer portal Content Security Policy (CSP). */ - mode?: PortalSettingsCspMode; - /** The URLs used by the browser to report CSP violations. */ - reportUri?: string[]; - /** Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. */ - allowedSources?: string[]; + /** The mode of the developer portal Content Security Policy (CSP). */ + mode?: PortalSettingsCspMode; + /** The URLs used by the browser to report CSP violations. */ + reportUri?: string[]; + /** Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. */ + allowedSources?: string[]; } /** Paged list of portal revisions. */ export interface PortalRevisionCollection { - /** - * Collection of portal revisions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: PortalRevisionContract[]; - /** - * Next page link, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Collection of portal revisions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: PortalRevisionContract[]; + /** + * Next page link, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Descriptions of API Management policies. */ export interface PortalSettingsCollection { - /** Descriptions of API Management policies. */ - value?: PortalSettingsContract[]; - /** Total record count number. */ - count?: number; + /** Descriptions of API Management policies. */ + value?: PortalSettingsContract[]; + /** Total record count number. */ + count?: number; } /** Subscriptions delegation settings properties. */ export interface SubscriptionsDelegationSettingsProperties { - /** Enable or disable delegation for subscriptions. */ - enabled?: boolean; + /** Enable or disable delegation for subscriptions. */ + enabled?: boolean; } /** User registration delegation settings properties. */ export interface RegistrationDelegationSettingsProperties { - /** Enable or disable delegation for user registration. */ - enabled?: boolean; + /** Enable or disable delegation for user registration. */ + enabled?: boolean; } /** Terms of service contract properties. */ export interface TermsOfServiceProperties { - /** A terms of service text. */ - text?: string; - /** Display terms of service during a sign-up process. */ - enabled?: boolean; - /** Ask user for consent to the terms of service. */ - consentRequired?: boolean; + /** A terms of service text. */ + text?: string; + /** Display terms of service during a sign-up process. */ + enabled?: boolean; + /** Ask user for consent to the terms of service. */ + consentRequired?: boolean; } /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ export interface PortalSettingValidationKeyContract { - /** This is secret value of the validation key in portal settings. */ - validationKey?: string; + /** This is secret value of the validation key in portal settings. */ + validationKey?: string; } /** List of private endpoint connection associated with the specified storage account */ export interface PrivateEndpointConnectionListResult { - /** Array of private endpoint connections */ - value?: PrivateEndpointConnection[]; + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; } /** The Private Endpoint resource. */ export interface PrivateEndpoint { - /** - * The ARM identifier for Private Endpoint - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; + /** + * The ARM identifier for Private Endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; } /** A request to approve or reject a private endpoint connection */ export interface PrivateEndpointConnectionRequest { - /** Private Endpoint Connection Resource Id. */ - id?: string; - /** The connection state of the private endpoint connection. */ - properties?: PrivateEndpointConnectionRequestProperties; + /** Private Endpoint Connection Resource Id. */ + id?: string; + /** The connection state of the private endpoint connection. */ + properties?: PrivateEndpointConnectionRequestProperties; } /** The connection state of the private endpoint connection. */ export interface PrivateEndpointConnectionRequestProperties { - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; } /** A list of private link resources */ export interface PrivateLinkResourceListResult { - /** Array of private link resources */ - value?: PrivateLinkResource[]; + /** Array of private link resources */ + value?: PrivateLinkResource[]; } /** Product Update parameters. */ export interface ProductUpdateParameters { - /** Product description. May include HTML formatting tags. */ - description?: string; - /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ - terms?: string; - /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - subscriptionRequired?: boolean; - /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - approvalRequired?: boolean; - /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ - subscriptionsLimit?: number; - /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ - state?: ProductState; - /** Product name. */ - displayName?: string; + /** Product description. May include HTML formatting tags. */ + description?: string; + /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ + terms?: string; + /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ + subscriptionRequired?: boolean; + /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ + approvalRequired?: boolean; + /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ + subscriptionsLimit?: number; + /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ + state?: ProductState; + /** Product name. */ + displayName?: string; } /** Paged Subscriptions list representation. */ export interface SubscriptionCollection { - /** Page values. */ - value?: SubscriptionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: SubscriptionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Quota Counter list representation. */ export interface QuotaCounterCollection { - /** Quota counter values. */ - value?: QuotaCounterContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Quota counter values. */ + value?: QuotaCounterContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Quota counter details. */ export interface QuotaCounterContract { - /** The Key value of the Counter. Must not be empty. */ - counterKey: string; - /** Identifier of the Period for which the counter was collected. Must not be empty. */ - periodKey: string; - /** - * The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - periodStartTime: Date; - /** - * The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - periodEndTime: Date; - /** Quota Value Properties */ - value?: QuotaCounterValueContractProperties; + /** The Key value of the Counter. Must not be empty. */ + counterKey: string; + /** Identifier of the Period for which the counter was collected. Must not be empty. */ + periodKey: string; + /** + * The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + periodStartTime: Date; + /** + * The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + periodEndTime: Date; + /** Quota Value Properties */ + value?: QuotaCounterValueContractProperties; } /** Quota counter value details. */ export interface QuotaCounterValueContractProperties { - /** Number of times Counter was called. */ - callsCount?: number; - /** Data Transferred in KiloBytes. */ - kbTransferred?: number; + /** Number of times Counter was called. */ + callsCount?: number; + /** Data Transferred in KiloBytes. */ + kbTransferred?: number; } /** Quota counter value details. */ export interface QuotaCounterValueUpdateContract { - /** Number of times Counter was called. */ - callsCount?: number; - /** Data Transferred in KiloBytes. */ - kbTransferred?: number; + /** Number of times Counter was called. */ + callsCount?: number; + /** Data Transferred in KiloBytes. */ + kbTransferred?: number; } /** Lists Regions operation response details. */ export interface RegionListResult { - /** Lists of Regions. */ - value?: RegionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Lists of Regions. */ + value?: RegionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Region profile. */ export interface RegionContract { - /** - * Region name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** whether Region is the master region. */ - isMasterRegion?: boolean; - /** whether Region is deleted. */ - isDeleted?: boolean; + /** + * Region name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** whether Region is the master region. */ + isMasterRegion?: boolean; + /** whether Region is deleted. */ + isDeleted?: boolean; } /** Paged Report records list representation. */ export interface ReportCollection { - /** Page values. */ - value?: ReportRecordContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: ReportRecordContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Report data. */ export interface ReportRecordContract { - /** Name depending on report endpoint specifies product, API, operation or developer name. */ - name?: string; - /** - * Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - timestamp?: Date; - /** Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). */ - interval?: string; - /** Country to which this record data is related. */ - country?: string; - /** Country region to which this record data is related. */ - region?: string; - /** Zip code to which this record data is related. */ - zip?: string; - /** - * User identifier path. /users/{userId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userId?: string; - /** - * Product identifier path. /products/{productId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly productId?: string; - /** API identifier path. /apis/{apiId} */ - apiId?: string; - /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ - operationId?: string; - /** API region identifier. */ - apiRegion?: string; - /** Subscription identifier path. /subscriptions/{subscriptionId} */ - subscriptionId?: string; - /** Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect */ - callCountSuccess?: number; - /** Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests */ - callCountBlocked?: number; - /** Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 */ - callCountFailed?: number; - /** Number of other calls. */ - callCountOther?: number; - /** Total number of calls. */ - callCountTotal?: number; - /** Bandwidth consumed. */ - bandwidth?: number; - /** Number of times when content was served from cache policy. */ - cacheHitCount?: number; - /** Number of times content was fetched from backend. */ - cacheMissCount?: number; - /** Average time it took to process request. */ - apiTimeAvg?: number; - /** Minimum time it took to process request. */ - apiTimeMin?: number; - /** Maximum time it took to process request. */ - apiTimeMax?: number; - /** Average time it took to process request on backend. */ - serviceTimeAvg?: number; - /** Minimum time it took to process request on backend. */ - serviceTimeMin?: number; - /** Maximum time it took to process request on backend. */ - serviceTimeMax?: number; + /** Name depending on report endpoint specifies product, API, operation or developer name. */ + name?: string; + /** + * Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + timestamp?: Date; + /** Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). */ + interval?: string; + /** Country to which this record data is related. */ + country?: string; + /** Country region to which this record data is related. */ + region?: string; + /** Zip code to which this record data is related. */ + zip?: string; + /** + * User identifier path. /users/{userId} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly userId?: string; + /** + * Product identifier path. /products/{productId} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly productId?: string; + /** API identifier path. /apis/{apiId} */ + apiId?: string; + /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ + operationId?: string; + /** API region identifier. */ + apiRegion?: string; + /** Subscription identifier path. /subscriptions/{subscriptionId} */ + subscriptionId?: string; + /** Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect */ + callCountSuccess?: number; + /** Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests */ + callCountBlocked?: number; + /** Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 */ + callCountFailed?: number; + /** Number of other calls. */ + callCountOther?: number; + /** Total number of calls. */ + callCountTotal?: number; + /** Bandwidth consumed. */ + bandwidth?: number; + /** Number of times when content was served from cache policy. */ + cacheHitCount?: number; + /** Number of times content was fetched from backend. */ + cacheMissCount?: number; + /** Average time it took to process request. */ + apiTimeAvg?: number; + /** Minimum time it took to process request. */ + apiTimeMin?: number; + /** Maximum time it took to process request. */ + apiTimeMax?: number; + /** Average time it took to process request on backend. */ + serviceTimeAvg?: number; + /** Minimum time it took to process request on backend. */ + serviceTimeMin?: number; + /** Maximum time it took to process request on backend. */ + serviceTimeMax?: number; } /** Paged Report records list representation. */ export interface RequestReportCollection { - /** Page values. */ - value?: RequestReportRecordContract[]; - /** Total record count number across all pages. */ - count?: number; + /** Page values. */ + value?: RequestReportRecordContract[]; + /** Total record count number across all pages. */ + count?: number; } /** Request Report data. */ export interface RequestReportRecordContract { - /** API identifier path. /apis/{apiId} */ - apiId?: string; - /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ - operationId?: string; - /** - * Product identifier path. /products/{productId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly productId?: string; - /** - * User identifier path. /users/{userId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userId?: string; - /** The HTTP method associated with this request.. */ - method?: string; - /** The full URL associated with this request. */ - url?: string; - /** The client IP address associated with this request. */ - ipAddress?: string; - /** The HTTP status code received by the gateway as a result of forwarding this request to the backend. */ - backendResponseCode?: string; - /** The HTTP status code returned by the gateway. */ - responseCode?: number; - /** The size of the response returned by the gateway. */ - responseSize?: number; - /** The date and time when this request was received by the gateway in ISO 8601 format. */ - timestamp?: Date; - /** Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. */ - cache?: string; - /** The total time it took to process this request. */ - apiTime?: number; - /** he time it took to forward this request to the backend and get the response back. */ - serviceTime?: number; - /** Azure region where the gateway that processed this request is located. */ - apiRegion?: string; - /** Subscription identifier path. /subscriptions/{subscriptionId} */ - subscriptionId?: string; - /** Request Identifier. */ - requestId?: string; - /** The size of this request.. */ - requestSize?: number; + /** API identifier path. /apis/{apiId} */ + apiId?: string; + /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ + operationId?: string; + /** + * Product identifier path. /products/{productId} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly productId?: string; + /** + * User identifier path. /users/{userId} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly userId?: string; + /** The HTTP method associated with this request.. */ + method?: string; + /** The full URL associated with this request. */ + url?: string; + /** The client IP address associated with this request. */ + ipAddress?: string; + /** The HTTP status code received by the gateway as a result of forwarding this request to the backend. */ + backendResponseCode?: string; + /** The HTTP status code returned by the gateway. */ + responseCode?: number; + /** The size of the response returned by the gateway. */ + responseSize?: number; + /** The date and time when this request was received by the gateway in ISO 8601 format. */ + timestamp?: Date; + /** Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. */ + cache?: string; + /** The total time it took to process this request. */ + apiTime?: number; + /** he time it took to forward this request to the backend and get the response back. */ + serviceTime?: number; + /** Azure region where the gateway that processed this request is located. */ + apiRegion?: string; + /** Subscription identifier path. /subscriptions/{subscriptionId} */ + subscriptionId?: string; + /** Request Identifier. */ + requestId?: string; + /** The size of this request.. */ + requestSize?: number; } /** The response of the list schema operation. */ export interface GlobalSchemaCollection { - /** - * Global Schema Contract value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GlobalSchemaContract[]; - /** Total record count number. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Global Schema Contract value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GlobalSchemaContract[]; + /** Total record count number. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged AccessInformation list representation. */ export interface TenantSettingsCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: TenantSettingsContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: TenantSettingsContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** The List Resource Skus operation response. */ export interface ApiManagementSkusResult { - /** The list of skus available for the subscription. */ - value: ApiManagementSku[]; - /** - * The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** The list of skus available for the subscription. */ + value: ApiManagementSku[]; + /** + * The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Describes an available ApiManagement SKU. */ export interface ApiManagementSku { - /** - * The type of resource the SKU applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * The name of SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tier?: string; - /** - * The Size of the SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly size?: string; - /** - * The Family of this particular SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly family?: string; - /** - * The Kind of resources that are supported in this SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; - /** - * Specifies the number of virtual machines in the scale set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: ApiManagementSkuCapacity; - /** - * The set of locations that the SKU is available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locations?: string[]; - /** - * A list of locations and availability zones in those locations where the SKU is available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locationInfo?: ApiManagementSkuLocationInfo[]; - /** - * The api versions that support this SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiVersions?: string[]; - /** - * Metadata for retrieving price info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly costs?: ApiManagementSkuCosts[]; - /** - * A name value pair to describe the capability. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capabilities?: ApiManagementSkuCapabilities[]; - /** - * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly restrictions?: ApiManagementSkuRestrictions[]; + /** + * The type of resource the SKU applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; + /** + * The name of SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tier?: string; + /** + * The Size of the SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly size?: string; + /** + * The Family of this particular SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly family?: string; + /** + * The Kind of resources that are supported in this SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kind?: string; + /** + * Specifies the number of virtual machines in the scale set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacity?: ApiManagementSkuCapacity; + /** + * The set of locations that the SKU is available. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: string[]; + /** + * A list of locations and availability zones in those locations where the SKU is available. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locationInfo?: ApiManagementSkuLocationInfo[]; + /** + * The api versions that support this SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiVersions?: string[]; + /** + * Metadata for retrieving price info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly costs?: ApiManagementSkuCosts[]; + /** + * A name value pair to describe the capability. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capabilities?: ApiManagementSkuCapabilities[]; + /** + * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly restrictions?: ApiManagementSkuRestrictions[]; } /** Describes scaling information of a SKU. */ export interface ApiManagementSkuCapacity { - /** - * The minimum capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minimum?: number; - /** - * The maximum capacity that can be set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maximum?: number; - /** - * The default capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly default?: number; - /** - * The scale type applicable to the sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scaleType?: ApiManagementSkuCapacityScaleType; + /** + * The minimum capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minimum?: number; + /** + * The maximum capacity that can be set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maximum?: number; + /** + * The default capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly default?: number; + /** + * The scale type applicable to the sku. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scaleType?: ApiManagementSkuCapacityScaleType; } export interface ApiManagementSkuLocationInfo { - /** - * Location of the SKU - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly location?: string; - /** - * List of availability zones where the SKU is supported. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zones?: string[]; - /** - * Details of capabilities available to a SKU in specific zones. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zoneDetails?: ApiManagementSkuZoneDetails[]; + /** + * Location of the SKU + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; + /** + * List of availability zones where the SKU is supported. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zones?: string[]; + /** + * Details of capabilities available to a SKU in specific zones. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zoneDetails?: ApiManagementSkuZoneDetails[]; } /** Describes The zonal capabilities of a SKU. */ export interface ApiManagementSkuZoneDetails { - /** - * The set of zones that the SKU is available in with the specified capabilities. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string[]; - /** - * A list of capabilities that are available for the SKU in the specified list of zones. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capabilities?: ApiManagementSkuCapabilities[]; + /** + * The set of zones that the SKU is available in with the specified capabilities. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string[]; + /** + * A list of capabilities that are available for the SKU in the specified list of zones. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capabilities?: ApiManagementSkuCapabilities[]; } /** Describes The SKU capabilities object. */ export interface ApiManagementSkuCapabilities { - /** - * An invariant to describe the feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * An invariant if the feature is measured by quantity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: string; + /** + * An invariant to describe the feature. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * An invariant if the feature is measured by quantity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: string; } /** Describes metadata for retrieving price info. */ export interface ApiManagementSkuCosts { - /** - * Used for querying price from commerce. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly meterID?: string; - /** - * The multiplier is needed to extend the base metered cost. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly quantity?: number; - /** - * An invariant to show the extended unit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly extendedUnit?: string; + /** + * Used for querying price from commerce. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly meterID?: string; + /** + * The multiplier is needed to extend the base metered cost. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly quantity?: number; + /** + * An invariant to show the extended unit. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly extendedUnit?: string; } /** Describes scaling information of a SKU. */ export interface ApiManagementSkuRestrictions { - /** - * The type of restrictions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: ApiManagementSkuRestrictionsType; - /** - * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly values?: string[]; - /** - * The information about the restriction where the SKU cannot be used. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly restrictionInfo?: ApiManagementSkuRestrictionInfo; - /** - * The reason for restriction. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reasonCode?: ApiManagementSkuRestrictionsReasonCode; + /** + * The type of restrictions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: ApiManagementSkuRestrictionsType; + /** + * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly values?: string[]; + /** + * The information about the restriction where the SKU cannot be used. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly restrictionInfo?: ApiManagementSkuRestrictionInfo; + /** + * The reason for restriction. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reasonCode?: ApiManagementSkuRestrictionsReasonCode; } export interface ApiManagementSkuRestrictionInfo { - /** - * Locations where the SKU is restricted - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locations?: string[]; - /** - * List of availability zones where the SKU is restricted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zones?: string[]; + /** + * Locations where the SKU is restricted + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: string[]; + /** + * List of availability zones where the SKU is restricted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zones?: string[]; } /** Subscription create details. */ export interface SubscriptionCreateParameters { - /** User (user id path) for whom subscription is being created in form /users/{userId} */ - ownerId?: string; - /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ - scope?: string; - /** Subscription name. */ - displayName?: string; - /** Primary subscription key. If not specified during request key will be generated automatically. */ - primaryKey?: string; - /** Secondary subscription key. If not specified during request key will be generated automatically. */ - secondaryKey?: string; - /** Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ - state?: SubscriptionState; - /** Determines whether tracing can be enabled */ - allowTracing?: boolean; + /** User (user id path) for whom subscription is being created in form /users/{userId} */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ + scope?: string; + /** Subscription name. */ + displayName?: string; + /** Primary subscription key. If not specified during request key will be generated automatically. */ + primaryKey?: string; + /** Secondary subscription key. If not specified during request key will be generated automatically. */ + secondaryKey?: string; + /** Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** Determines whether tracing can be enabled */ + allowTracing?: boolean; } /** Subscription update details. */ export interface SubscriptionUpdateParameters { - /** User identifier path: /users/{userId} */ - ownerId?: string; - /** Scope like /products/{productId} or /apis or /apis/{apiId} */ - scope?: string; - /** Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ - expirationDate?: Date; - /** Subscription name. */ - displayName?: string; - /** Primary subscription key. */ - primaryKey?: string; - /** Secondary subscription key. */ - secondaryKey?: string; - /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ - state?: SubscriptionState; - /** Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. */ - stateComment?: string; - /** Determines whether tracing can be enabled */ - allowTracing?: boolean; + /** User identifier path: /users/{userId} */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId} */ + scope?: string; + /** Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expirationDate?: Date; + /** Subscription name. */ + displayName?: string; + /** Primary subscription key. */ + primaryKey?: string; + /** Secondary subscription key. */ + secondaryKey?: string; + /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. */ + stateComment?: string; + /** Determines whether tracing can be enabled */ + allowTracing?: boolean; } /** Subscription keys. */ export interface SubscriptionKeysContract { - /** Subscription primary key. */ - primaryKey?: string; - /** Subscription secondary key. */ - secondaryKey?: string; + /** Subscription primary key. */ + primaryKey?: string; + /** Subscription secondary key. */ + secondaryKey?: string; } /** Parameters supplied to Create/Update Tag operations. */ export interface TagCreateUpdateParameters { - /** Tag name. */ - displayName?: string; + /** Tag name. */ + displayName?: string; } /** Paged AccessInformation list representation. */ export interface AccessInformationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: AccessInformationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: AccessInformationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Tenant access information update parameters. */ export interface AccessInformationCreateParameters { - /** Principal (User) Identifier. */ - principalId?: string; - /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - primaryKey?: string; - /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - secondaryKey?: string; - /** Determines whether direct access is enabled. */ - enabled?: boolean; + /** Principal (User) Identifier. */ + principalId?: string; + /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; } /** Tenant access information update parameters. */ export interface AccessInformationUpdateParameters { - /** Determines whether direct access is enabled. */ - enabled?: boolean; + /** Determines whether direct access is enabled. */ + enabled?: boolean; } /** Tenant access information contract of the API Management service. */ export interface AccessInformationSecretsContract { - /** Access Information type ('access' or 'gitAccess') */ - id?: string; - /** Principal (User) Identifier. */ - principalId?: string; - /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - primaryKey?: string; - /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - secondaryKey?: string; - /** Determines whether direct access is enabled. */ - enabled?: boolean; + /** Access Information type ('access' or 'gitAccess') */ + id?: string; + /** Principal (User) Identifier. */ + principalId?: string; + /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; } /** Deploy Tenant Configuration Contract. */ export interface DeployConfigurationParameters { - /** The name of the Git branch from which the configuration is to be deployed to the configuration database. */ - branch?: string; - /** The value enforcing deleting subscriptions to products that are deleted in this update. */ - force?: boolean; + /** The name of the Git branch from which the configuration is to be deployed to the configuration database. */ + branch?: string; + /** The value enforcing deleting subscriptions to products that are deleted in this update. */ + force?: boolean; } /** Log of the entity being created, updated or deleted. */ export interface OperationResultLogItemContract { - /** The type of entity contract. */ - objectType?: string; - /** Action like create/update/delete. */ - action?: string; - /** Identifier of the entity being created/updated/deleted. */ - objectKey?: string; + /** The type of entity contract. */ + objectType?: string; + /** Action like create/update/delete. */ + action?: string; + /** Identifier of the entity being created/updated/deleted. */ + objectKey?: string; } /** Save Tenant Configuration Contract details. */ export interface SaveConfigurationParameter { - /** The name of the Git branch in which to commit the current configuration snapshot. */ - branch?: string; - /** The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. */ - force?: boolean; + /** The name of the Git branch in which to commit the current configuration snapshot. */ + branch?: string; + /** The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. */ + force?: boolean; } /** User create details. */ export interface UserCreateParameters { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; - /** Email address. Must not be empty and must be unique within the service instance. */ - email?: string; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; - /** User Password. If no value is provided, a default password is generated. */ - password?: string; - /** Determines the type of application which send the create user request. Default is legacy portal. */ - appType?: AppType; - /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ - confirmation?: Confirmation; + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; + /** Email address. Must not be empty and must be unique within the service instance. */ + email?: string; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; + /** User Password. If no value is provided, a default password is generated. */ + password?: string; + /** Determines the type of application which send the create user request. Default is legacy portal. */ + appType?: AppType; + /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ + confirmation?: Confirmation; } /** User update parameters. */ export interface UserUpdateParameters { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; - /** Email address. Must not be empty and must be unique within the service instance. */ - email?: string; - /** User Password. */ - password?: string; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; + /** Email address. Must not be empty and must be unique within the service instance. */ + email?: string; + /** User Password. */ + password?: string; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; } /** Generate SSO Url operations response details. */ export interface GenerateSsoUrlResult { - /** Redirect Url containing the SSO URL value. */ - value?: string; + /** Redirect Url containing the SSO URL value. */ + value?: string; } /** List of Users Identity list representation. */ export interface UserIdentityCollection { - /** User Identity values. */ - value?: UserIdentityContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** User Identity values. */ + value?: UserIdentityContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Get User Token parameters. */ export interface UserTokenParameters { - /** The Key to be used to generate token for user. */ - keyType?: KeyType; - /** - * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expiry?: Date; + /** The Key to be used to generate token for user. */ + keyType?: KeyType; + /** + * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + expiry?: Date; } /** Get User Token response details. */ export interface UserTokenResult { - /** Shared Access Authorization token for the User. */ - value?: string; + /** Shared Access Authorization token for the User. */ + value?: string; } /** Paged Documentation list representation. */ export interface DocumentationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: DocumentationContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DocumentationContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Documentation update contract details. */ export interface DocumentationUpdateContract { - /** documentation title. */ - title?: string; - /** Markdown documentation content. */ - content?: string; + /** documentation title. */ + title?: string; + /** Markdown documentation content. */ + content?: string; } /** Object used to create an API Revision or Version based on an existing API Revision */ export interface ApiRevisionInfoContract { - /** Resource identifier of API to be used to create the revision from. */ - sourceApiId?: string; - /** Version identifier for the new API Version. */ - apiVersionName?: string; - /** Description of new API Revision. */ - apiRevisionDescription?: string; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; + /** Resource identifier of API to be used to create the revision from. */ + sourceApiId?: string; + /** Version identifier for the new API Version. */ + apiVersionName?: string; + /** Description of new API Revision. */ + apiRevisionDescription?: string; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; } /** Quota counter value details. */ export interface QuotaCounterValueContract { - /** Number of times Counter was called. */ - callsCount?: number; - /** Data Transferred in KiloBytes. */ - kbTransferred?: number; + /** Number of times Counter was called. */ + callsCount?: number; + /** Data Transferred in KiloBytes. */ + kbTransferred?: number; } /** Log of the entity being created, updated or deleted. */ export interface ResolverResultLogItemContract { - /** The type of entity contract. */ - objectType?: string; - /** Action like create/update/delete. */ - action?: string; - /** Identifier of the entity being created/updated/deleted. */ - objectKey?: string; + /** The type of entity contract. */ + objectType?: string; + /** Action like create/update/delete. */ + action?: string; + /** Identifier of the entity being created/updated/deleted. */ + objectKey?: string; } /** API Entity Properties */ export interface ApiContractProperties extends ApiEntityBaseContract { - /** API identifier of the source API. */ - sourceApiId?: string; - /** API name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; + /** API identifier of the source API. */ + sourceApiId?: string; + /** API name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; } /** API update contract properties. */ export interface ApiContractUpdateProperties extends ApiEntityBaseContract { - /** API name. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; + /** API name. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; } /** API contract properties for the Tag Resources. */ export interface ApiTagResourceContractProperties - extends ApiEntityBaseContract { - /** API identifier in the form /apis/{apiId}. */ - id?: string; - /** API name. */ - name?: string; - /** Absolute URL of the backend service implementing this API. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; + extends ApiEntityBaseContract { + /** API identifier in the form /apis/{apiId}. */ + id?: string; + /** API name. */ + name?: string; + /** Absolute URL of the backend service implementing this API. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; } /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} +export interface ProxyResource extends Resource { } /** The Private Endpoint Connection resource. */ export interface PrivateEndpointConnection extends Resource { - /** The resource of private end point. */ - privateEndpoint?: PrivateEndpoint; - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the private endpoint connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: PrivateEndpointConnectionProvisioningState; + /** The resource of private end point. */ + privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; } /** A private link resource */ export interface PrivateLinkResource extends Resource { - /** - * The private link resource group id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupId?: string; - /** - * The private link resource required member names. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredMembers?: string[]; - /** The private link resource Private link DNS zone name. */ - requiredZoneNames?: string[]; + /** + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredMembers?: string[]; + /** The private link resource Private link DNS zone name. */ + requiredZoneNames?: string[]; } /** Operation Contract Properties */ export interface OperationContractProperties - extends OperationEntityBaseContract { - /** Operation Name. */ - displayName: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate: string; + extends OperationEntityBaseContract { + /** Operation Name. */ + displayName: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate: string; } /** Operation Update Contract Properties. */ export interface OperationUpdateContractProperties - extends OperationEntityBaseContract { - /** Operation Name. */ - displayName?: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method?: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate?: string; + extends OperationEntityBaseContract { + /** Operation Name. */ + displayName?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate?: string; } /** Product profile. */ export interface ProductContractProperties extends ProductEntityBaseParameters { - /** Product name. */ - displayName: string; + /** Product name. */ + displayName: string; } /** Product profile. */ export interface ProductTagResourceContractProperties - extends ProductEntityBaseParameters { - /** Identifier of the product in the form of /products/{productId} */ - id?: string; - /** Product name. */ - name: string; + extends ProductEntityBaseParameters { + /** Identifier of the product in the form of /products/{productId} */ + id?: string; + /** Product name. */ + name: string; } /** Parameters supplied to the Update Product operation. */ export interface ProductUpdateProperties extends ProductEntityBaseParameters { - /** Product name. */ - displayName?: string; + /** Product name. */ + displayName?: string; } /** Issue contract Properties. */ export interface IssueContractProperties extends IssueContractBaseProperties { - /** The issue title. */ - title: string; - /** Text describing the issue. */ - description: string; - /** A resource identifier for the user created the issue. */ - userId: string; + /** The issue title. */ + title: string; + /** Text describing the issue. */ + description: string; + /** A resource identifier for the user created the issue. */ + userId: string; } /** Issue contract Update Properties. */ export interface IssueUpdateContractProperties - extends IssueContractBaseProperties { - /** The issue title. */ - title?: string; - /** Text describing the issue. */ - description?: string; - /** A resource identifier for the user created the issue. */ - userId?: string; + extends IssueContractBaseProperties { + /** The issue title. */ + title?: string; + /** Text describing the issue. */ + description?: string; + /** A resource identifier for the user created the issue. */ + userId?: string; } /** TagDescription contract Properties. */ export interface TagDescriptionContractProperties - extends TagDescriptionBaseProperties { - /** Identifier of the tag in the form of /tags/{tagId} */ - tagId?: string; - /** Tag name. */ - displayName?: string; + extends TagDescriptionBaseProperties { + /** Identifier of the tag in the form of /tags/{tagId} */ + tagId?: string; + /** Tag name. */ + displayName?: string; } /** Properties of an API Version Set. */ export interface ApiVersionSetContractProperties - extends ApiVersionSetEntityBase { - /** Name of API Version Set */ - displayName: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme: VersioningScheme; + extends ApiVersionSetEntityBase { + /** Name of API Version Set */ + displayName: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme: VersioningScheme; } /** Properties used to create or update an API Version Set. */ export interface ApiVersionSetUpdateParametersProperties - extends ApiVersionSetEntityBase { - /** Name of API Version Set */ - displayName?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: VersioningScheme; + extends ApiVersionSetEntityBase { + /** Name of API Version Set */ + displayName?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; } /** External OAuth authorization server settings Properties. */ export interface AuthorizationServerContractProperties - extends AuthorizationServerContractBaseProperties { - /** User-friendly authorization server name. */ - displayName: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + extends AuthorizationServerContractBaseProperties { + /** User-friendly authorization server name. */ + displayName: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** External OAuth authorization server Update settings contract. */ export interface AuthorizationServerUpdateContractProperties - extends AuthorizationServerContractBaseProperties { - /** User-friendly authorization server name. */ - displayName?: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint?: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint?: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes?: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId?: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + extends AuthorizationServerContractBaseProperties { + /** User-friendly authorization server name. */ + displayName?: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint?: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint?: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes?: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId?: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** Parameters supplied to the Create Backend operation. */ export interface BackendContractProperties extends BackendBaseParameters { - /** Runtime Url of the Backend. */ - url: string; - /** Backend communication protocol. */ - protocol: BackendProtocol; + /** Runtime Url of the Backend. */ + url: string; + /** Backend communication protocol. */ + protocol: BackendProtocol; } /** Parameters supplied to the Update Backend operation. */ export interface BackendUpdateParameterProperties - extends BackendBaseParameters { - /** Runtime Url of the Backend. */ - url?: string; - /** Backend communication protocol. */ - protocol?: BackendProtocol; + extends BackendBaseParameters { + /** Runtime Url of the Backend. */ + url?: string; + /** Backend communication protocol. */ + protocol?: BackendProtocol; } /** KeyVault contract details. */ export interface KeyVaultContractProperties - extends KeyVaultContractCreateProperties { - /** Last time sync and refresh status of secret from key vault. */ - lastStatus?: KeyVaultLastAccessStatusContractProperties; + extends KeyVaultContractCreateProperties { + /** Last time sync and refresh status of secret from key vault. */ + lastStatus?: KeyVaultLastAccessStatusContractProperties; } /** Properties of an API Management service resource description. */ export interface ApiManagementServiceProperties - extends ApiManagementServiceBaseProperties { - /** Publisher email. */ - publisherEmail: string; - /** Publisher name. */ - publisherName: string; + extends ApiManagementServiceBaseProperties { + /** Publisher email. */ + publisherEmail: string; + /** Publisher name. */ + publisherName: string; } /** Properties of an API Management service resource description. */ export interface ApiManagementServiceUpdateProperties - extends ApiManagementServiceBaseProperties { - /** Publisher email. */ - publisherEmail?: string; - /** Publisher name. */ - publisherName?: string; + extends ApiManagementServiceBaseProperties { + /** Publisher email. */ + publisherEmail?: string; + /** Publisher name. */ + publisherName?: string; } /** A single API Management service resource in List or Get response. */ export interface ApiManagementServiceResource extends ApimResource { - /** SKU properties of the API Management service. */ - sku: ApiManagementServiceSkuProperties; - /** Managed service identity of the Api Management service. */ - identity?: ApiManagementServiceIdentity; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Resource location. */ - location: string; - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** Email address from which the notification will be sent. */ - notificationSenderEmail?: string; - /** - * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** - * Gateway URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayUrl?: string; - /** - * Gateway URL of the API Management service in the Default Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** - * Publisher portal endpoint Url of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portalUrl?: string; - /** - * Management API endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementApiUrl?: string; - /** - * SCM endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scmUrl?: string; - /** - * DEveloper Portal endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly developerPortalUrl?: string; - /** Custom hostname configuration of the API Management service. */ - hostnameConfigurations?: HostnameConfiguration[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ - publicNetworkAccess?: PublicNetworkAccess; - /** Virtual network configuration of the API Management service. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** Additional datacenter locations of the API Management service. */ - additionalLocations?: AdditionalLocation[]; - /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ - customProperties?: { [propertyName: string]: string }; - /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ - certificates?: CertificateConfiguration[]; - /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ - enableClientCertificate?: boolean; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ - disableGateway?: boolean; - /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ - virtualNetworkType?: VirtualNetworkType; - /** Control Plane Apis version constraint for the API Management service. */ - apiVersionConstraint?: ApiVersionConstraint; - /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ - restore?: boolean; - /** List of Private Endpoint Connections of this service. */ - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - /** - * Compute Platform Version running the service in this location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; - /** Publisher email. */ - publisherEmail: string; - /** Publisher name. */ - publisherName: string; + /** SKU properties of the API Management service. */ + sku: ApiManagementServiceSkuProperties; + /** Managed service identity of the Api Management service. */ + identity?: ApiManagementServiceIdentity; + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Resource location. */ + location: string; + /** + * ETag of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** Email address from which the notification will be sent. */ + notificationSenderEmail?: string; + /** + * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetProvisioningState?: string; + /** + * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdAtUtc?: Date; + /** + * Gateway URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayUrl?: string; + /** + * Gateway URL of the API Management service in the Default Region. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayRegionalUrl?: string; + /** + * Publisher portal endpoint Url of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly portalUrl?: string; + /** + * Management API endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managementApiUrl?: string; + /** + * SCM endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scmUrl?: string; + /** + * DEveloper Portal endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly developerPortalUrl?: string; + /** Custom hostname configuration of the API Management service. */ + hostnameConfigurations?: HostnameConfiguration[]; + /** + * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicIPAddresses?: string[]; + /** + * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** Virtual network configuration of the API Management service. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Additional datacenter locations of the API Management service. */ + additionalLocations?: AdditionalLocation[]; + /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + customProperties?: { [propertyName: string]: string }; + /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ + certificates?: CertificateConfiguration[]; + /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ + enableClientCertificate?: boolean; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** + * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ + disableGateway?: boolean; + /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ + virtualNetworkType?: VirtualNetworkType; + /** Control Plane Apis version constraint for the API Management service. */ + apiVersionConstraint?: ApiVersionConstraint; + /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ + restore?: boolean; + /** List of Private Endpoint Connections of this service. */ + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + /** + * Compute Platform Version running the service in this location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly platformVersion?: PlatformVersion; + /** Publisher email. */ + publisherEmail: string; + /** Publisher name. */ + publisherName: string; } /** Parameter supplied to Update Api Management Service. */ export interface ApiManagementServiceUpdateParameters extends ApimResource { - /** SKU properties of the API Management service. */ - sku?: ApiManagementServiceSkuProperties; - /** Managed service identity of the Api Management service. */ - identity?: ApiManagementServiceIdentity; - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** Email address from which the notification will be sent. */ - notificationSenderEmail?: string; - /** - * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** - * Gateway URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayUrl?: string; - /** - * Gateway URL of the API Management service in the Default Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** - * Publisher portal endpoint Url of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portalUrl?: string; - /** - * Management API endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementApiUrl?: string; - /** - * SCM endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scmUrl?: string; - /** - * DEveloper Portal endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly developerPortalUrl?: string; - /** Custom hostname configuration of the API Management service. */ - hostnameConfigurations?: HostnameConfiguration[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ - publicNetworkAccess?: PublicNetworkAccess; - /** Virtual network configuration of the API Management service. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** Additional datacenter locations of the API Management service. */ - additionalLocations?: AdditionalLocation[]; - /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ - customProperties?: { [propertyName: string]: string }; - /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ - certificates?: CertificateConfiguration[]; - /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ - enableClientCertificate?: boolean; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ - disableGateway?: boolean; - /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ - virtualNetworkType?: VirtualNetworkType; - /** Control Plane Apis version constraint for the API Management service. */ - apiVersionConstraint?: ApiVersionConstraint; - /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ - restore?: boolean; - /** List of Private Endpoint Connections of this service. */ - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - /** - * Compute Platform Version running the service in this location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; - /** Publisher email. */ - publisherEmail?: string; - /** Publisher name. */ - publisherName?: string; + /** SKU properties of the API Management service. */ + sku?: ApiManagementServiceSkuProperties; + /** Managed service identity of the Api Management service. */ + identity?: ApiManagementServiceIdentity; + /** + * ETag of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** Email address from which the notification will be sent. */ + notificationSenderEmail?: string; + /** + * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetProvisioningState?: string; + /** + * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdAtUtc?: Date; + /** + * Gateway URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayUrl?: string; + /** + * Gateway URL of the API Management service in the Default Region. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayRegionalUrl?: string; + /** + * Publisher portal endpoint Url of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly portalUrl?: string; + /** + * Management API endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managementApiUrl?: string; + /** + * SCM endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scmUrl?: string; + /** + * DEveloper Portal endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly developerPortalUrl?: string; + /** Custom hostname configuration of the API Management service. */ + hostnameConfigurations?: HostnameConfiguration[]; + /** + * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicIPAddresses?: string[]; + /** + * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** Virtual network configuration of the API Management service. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Additional datacenter locations of the API Management service. */ + additionalLocations?: AdditionalLocation[]; + /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + customProperties?: { [propertyName: string]: string }; + /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ + certificates?: CertificateConfiguration[]; + /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ + enableClientCertificate?: boolean; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** + * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ + disableGateway?: boolean; + /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ + virtualNetworkType?: VirtualNetworkType; + /** Control Plane Apis version constraint for the API Management service. */ + apiVersionConstraint?: ApiVersionConstraint; + /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ + restore?: boolean; + /** List of Private Endpoint Connections of this service. */ + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + /** + * Compute Platform Version running the service in this location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly platformVersion?: PlatformVersion; + /** Publisher email. */ + publisherEmail?: string; + /** Publisher name. */ + publisherName?: string; } /** User profile. */ export interface UserContractProperties extends UserEntityBaseParameters { - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; - /** Email address. */ - email?: string; - /** - * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - registrationDate?: Date; - /** - * Collection of groups user is part of. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groups?: GroupContractProperties[]; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; + /** Email address. */ + email?: string; + /** + * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + registrationDate?: Date; + /** + * Collection of groups user is part of. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groups?: GroupContractProperties[]; } /** Parameters supplied to the Create User operation. */ export interface UserCreateParameterProperties - extends UserEntityBaseParameters { - /** Email address. Must not be empty and must be unique within the service instance. */ - email: string; - /** First name. */ - firstName: string; - /** Last name. */ - lastName: string; - /** User Password. If no value is provided, a default password is generated. */ - password?: string; - /** Determines the type of application which send the create user request. Default is legacy portal. */ - appType?: AppType; - /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ - confirmation?: Confirmation; + extends UserEntityBaseParameters { + /** Email address. Must not be empty and must be unique within the service instance. */ + email: string; + /** First name. */ + firstName: string; + /** Last name. */ + lastName: string; + /** User Password. If no value is provided, a default password is generated. */ + password?: string; + /** Determines the type of application which send the create user request. Default is legacy portal. */ + appType?: AppType; + /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ + confirmation?: Confirmation; } /** Parameters supplied to the Update User operation. */ export interface UserUpdateParametersProperties - extends UserEntityBaseParameters { - /** Email address. Must not be empty and must be unique within the service instance. */ - email?: string; - /** User Password. */ - password?: string; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; + extends UserEntityBaseParameters { + /** Email address. Must not be empty and must be unique within the service instance. */ + email?: string; + /** User Password. */ + password?: string; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; } /** The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. */ export interface IdentityProviderContractProperties - extends IdentityProviderBaseParameters { - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + extends IdentityProviderBaseParameters { + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. */ export interface IdentityProviderCreateContractProperties - extends IdentityProviderBaseParameters { - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret: string; + extends IdentityProviderBaseParameters { + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret: string; } /** Parameters supplied to the Update Identity Provider operation. */ export interface IdentityProviderUpdateProperties - extends IdentityProviderBaseParameters { - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ - clientSecret?: string; + extends IdentityProviderBaseParameters { + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ + clientSecret?: string; } /** NamedValue Contract properties. */ export interface NamedValueContractProperties - extends NamedValueEntityBaseParameters { - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractProperties; + extends NamedValueEntityBaseParameters { + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractProperties; } /** NamedValue Contract properties. */ export interface NamedValueCreateContractProperties - extends NamedValueEntityBaseParameters { - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; + extends NamedValueEntityBaseParameters { + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; } /** NamedValue Contract properties. */ export interface NamedValueUpdateParameterProperties - extends NamedValueEntityBaseParameters { - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; + extends NamedValueEntityBaseParameters { + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; } /** API Create or Update Properties. */ export interface ApiCreateOrUpdateProperties extends ApiContractProperties { - /** Content value when Importing an API. */ - value?: string; - /** Format of the Content in which the API is getting imported. */ - format?: ContentFormat; - /** Criteria to limit import of WSDL to a subset of the document. */ - wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; - /** - * Type of API to create. - * * `http` creates a REST API - * * `soap` creates a SOAP pass-through API - * * `websocket` creates websocket API - * * `graphql` creates GraphQL API. - */ - soapApiType?: SoapApiType; - /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ - translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; + /** Content value when Importing an API. */ + value?: string; + /** Format of the Content in which the API is getting imported. */ + format?: ContentFormat; + /** Criteria to limit import of WSDL to a subset of the document. */ + wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; + /** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + */ + soapApiType?: SoapApiType; + /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ + translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; } /** API details. */ export interface ApiContract extends ProxyResource { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; - /** API identifier of the source API. */ - sourceApiId?: string; - /** API name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** API identifier of the source API. */ + sourceApiId?: string; + /** API name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; } /** ApiRelease details. */ export interface ApiReleaseContract extends ProxyResource { - /** Identifier of the API the release belongs to. */ - apiId?: string; - /** - * The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * The time the API release was updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedDateTime?: Date; - /** Release Notes */ - notes?: string; + /** Identifier of the API the release belongs to. */ + apiId?: string; + /** + * The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdDateTime?: Date; + /** + * The time the API release was updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updatedDateTime?: Date; + /** Release Notes */ + notes?: string; } /** API Operation details. */ export interface OperationContract extends ProxyResource { - /** Collection of URL template parameters. */ - templateParameters?: ParameterContract[]; - /** Description of the operation. May include HTML formatting tags. */ - description?: string; - /** An entity containing request details. */ - request?: RequestContract; - /** Array of Operation responses. */ - responses?: ResponseContract[]; - /** Operation Policies */ - policies?: string; - /** Operation Name. */ - displayName?: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method?: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate?: string; + /** Collection of URL template parameters. */ + templateParameters?: ParameterContract[]; + /** Description of the operation. May include HTML formatting tags. */ + description?: string; + /** An entity containing request details. */ + request?: RequestContract; + /** Array of Operation responses. */ + responses?: ResponseContract[]; + /** Operation Policies */ + policies?: string; + /** Operation Name. */ + displayName?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate?: string; } /** Policy Contract details. */ export interface PolicyContract extends ProxyResource { - /** Contents of the Policy as defined by the format. */ - value?: string; - /** Format of the policyContent. */ - format?: PolicyContentFormat; + /** Contents of the Policy as defined by the format. */ + value?: string; + /** Format of the policyContent. */ + format?: PolicyContentFormat; } /** Tag Contract details. */ export interface TagContract extends ProxyResource { - /** Tag name. */ - displayName?: string; + /** Tag name. */ + displayName?: string; } /** GraphQL API Resolver details. */ export interface ResolverContract extends ProxyResource { - /** Resolver Name. */ - displayName?: string; - /** Path is type/field being resolved. */ - path?: string; - /** Description of the resolver. May include HTML formatting tags. */ - description?: string; + /** Resolver Name. */ + displayName?: string; + /** Path is type/field being resolved. */ + path?: string; + /** Description of the resolver. May include HTML formatting tags. */ + description?: string; } /** Product details. */ export interface ProductContract extends ProxyResource { - /** Product description. May include HTML formatting tags. */ - description?: string; - /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ - terms?: string; - /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - subscriptionRequired?: boolean; - /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - approvalRequired?: boolean; - /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ - subscriptionsLimit?: number; - /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ - state?: ProductState; - /** Product name. */ - displayName?: string; + /** Product description. May include HTML formatting tags. */ + description?: string; + /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ + terms?: string; + /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ + subscriptionRequired?: boolean; + /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ + approvalRequired?: boolean; + /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ + subscriptionsLimit?: number; + /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ + state?: ProductState; + /** Product name. */ + displayName?: string; } /** API Schema Contract details. */ export interface SchemaContract extends ProxyResource { - /** Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. */ - contentType?: string; - /** Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. */ - value?: string; - /** Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. */ - definitions?: Record; - /** Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. */ - components?: Record; + /** Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. */ + contentType?: string; + /** Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. */ + value?: string; + /** Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. */ + definitions?: Record; + /** Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. */ + components?: Record; } /** Diagnostic details. */ export interface DiagnosticContract extends ProxyResource { - /** Specifies for what type of messages sampling settings should not apply. */ - alwaysLog?: AlwaysLog; - /** Resource Id of a target logger. */ - loggerId?: string; - /** Sampling settings for Diagnostic. */ - sampling?: SamplingSettings; - /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ - frontend?: PipelineDiagnosticSettings; - /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ - backend?: PipelineDiagnosticSettings; - /** Log the ClientIP. Default is false. */ - logClientIp?: boolean; - /** Sets correlation protocol to use for Application Insights diagnostics. */ - httpCorrelationProtocol?: HttpCorrelationProtocol; - /** The verbosity level applied to traces emitted by trace policies. */ - verbosity?: Verbosity; - /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ - operationNameFormat?: OperationNameFormat; - /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ - metrics?: boolean; + /** Specifies for what type of messages sampling settings should not apply. */ + alwaysLog?: AlwaysLog; + /** Resource Id of a target logger. */ + loggerId?: string; + /** Sampling settings for Diagnostic. */ + sampling?: SamplingSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ + frontend?: PipelineDiagnosticSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ + backend?: PipelineDiagnosticSettings; + /** Log the ClientIP. Default is false. */ + logClientIp?: boolean; + /** Sets correlation protocol to use for Application Insights diagnostics. */ + httpCorrelationProtocol?: HttpCorrelationProtocol; + /** The verbosity level applied to traces emitted by trace policies. */ + verbosity?: Verbosity; + /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ + operationNameFormat?: OperationNameFormat; + /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ + metrics?: boolean; } /** Issue Contract details. */ export interface IssueContract extends ProxyResource { - /** Date and time when the issue was created. */ - createdDate?: Date; - /** Status of the issue. */ - state?: State; - /** A resource identifier for the API the issue was created for. */ - apiId?: string; - /** The issue title. */ - title?: string; - /** Text describing the issue. */ - description?: string; - /** A resource identifier for the user created the issue. */ - userId?: string; + /** Date and time when the issue was created. */ + createdDate?: Date; + /** Status of the issue. */ + state?: State; + /** A resource identifier for the API the issue was created for. */ + apiId?: string; + /** The issue title. */ + title?: string; + /** Text describing the issue. */ + description?: string; + /** A resource identifier for the user created the issue. */ + userId?: string; } /** Issue Comment Contract details. */ export interface IssueCommentContract extends ProxyResource { - /** Comment text. */ - text?: string; - /** Date and time when the comment was created. */ - createdDate?: Date; - /** A resource identifier for the user who left the comment. */ - userId?: string; + /** Comment text. */ + text?: string; + /** Date and time when the comment was created. */ + createdDate?: Date; + /** A resource identifier for the user who left the comment. */ + userId?: string; } /** Issue Attachment Contract details. */ export interface IssueAttachmentContract extends ProxyResource { - /** Filename by which the binary data will be saved. */ - title?: string; - /** Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. */ - contentFormat?: string; - /** An HTTP link or Base64-encoded binary data. */ - content?: string; + /** Filename by which the binary data will be saved. */ + title?: string; + /** Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. */ + contentFormat?: string; + /** An HTTP link or Base64-encoded binary data. */ + content?: string; } /** Contract details. */ export interface TagDescriptionContract extends ProxyResource { - /** Description of the Tag. */ - description?: string; - /** Absolute URL of external resources describing the tag. */ - externalDocsUrl?: string; - /** Description of the external resources describing the tag. */ - externalDocsDescription?: string; - /** Identifier of the tag in the form of /tags/{tagId} */ - tagId?: string; - /** Tag name. */ - displayName?: string; + /** Description of the Tag. */ + description?: string; + /** Absolute URL of external resources describing the tag. */ + externalDocsUrl?: string; + /** Description of the external resources describing the tag. */ + externalDocsDescription?: string; + /** Identifier of the tag in the form of /tags/{tagId} */ + tagId?: string; + /** Tag name. */ + displayName?: string; } /** Wiki properties */ export interface WikiContract extends ProxyResource { - /** Collection wiki documents included into this wiki. */ - documents?: WikiDocumentationContract[]; + /** Collection wiki documents included into this wiki. */ + documents?: WikiDocumentationContract[]; } /** API Version Set Contract details. */ export interface ApiVersionSetContract extends ProxyResource { - /** Description of API Version Set. */ - description?: string; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; - /** Name of API Version Set */ - displayName?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: VersioningScheme; + /** Description of API Version Set. */ + description?: string; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; + /** Name of API Version Set */ + displayName?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; } /** External OAuth authorization server settings. */ export interface AuthorizationServerContract extends ProxyResource { - /** Description of the authorization server. Can contain HTML formatting tags. */ - description?: string; - /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ - authorizationMethods?: AuthorizationMethod[]; - /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ - tokenBodyParameters?: TokenBodyParameterContract[]; - /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ - tokenEndpoint?: string; - /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - supportState?: boolean; - /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ - defaultScope?: string; - /** Specifies the mechanism by which access token is passed to the API. */ - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; - /** User-friendly authorization server name. */ - displayName?: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint?: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint?: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes?: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId?: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + /** Description of the authorization server. Can contain HTML formatting tags. */ + description?: string; + /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ + authorizationMethods?: AuthorizationMethod[]; + /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ + tokenBodyParameters?: TokenBodyParameterContract[]; + /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ + tokenEndpoint?: string; + /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ + supportState?: boolean; + /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ + defaultScope?: string; + /** Specifies the mechanism by which access token is passed to the API. */ + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; + /** User-friendly authorization server name. */ + displayName?: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint?: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint?: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes?: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId?: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** External OAuth authorization server settings. */ export interface AuthorizationServerUpdateContract extends ProxyResource { - /** Description of the authorization server. Can contain HTML formatting tags. */ - description?: string; - /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ - authorizationMethods?: AuthorizationMethod[]; - /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ - tokenBodyParameters?: TokenBodyParameterContract[]; - /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ - tokenEndpoint?: string; - /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - supportState?: boolean; - /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ - defaultScope?: string; - /** Specifies the mechanism by which access token is passed to the API. */ - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; - /** User-friendly authorization server name. */ - displayName?: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint?: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint?: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes?: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId?: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + /** Description of the authorization server. Can contain HTML formatting tags. */ + description?: string; + /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ + authorizationMethods?: AuthorizationMethod[]; + /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ + tokenBodyParameters?: TokenBodyParameterContract[]; + /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ + tokenEndpoint?: string; + /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ + supportState?: boolean; + /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ + defaultScope?: string; + /** Specifies the mechanism by which access token is passed to the API. */ + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; + /** User-friendly authorization server name. */ + displayName?: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint?: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint?: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes?: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId?: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** Authorization Provider contract. */ export interface AuthorizationProviderContract extends ProxyResource { - /** Authorization Provider name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Identity provider name. Must be 1 to 300 characters long. */ - identityProvider?: string; - /** OAuth2 settings */ - oauth2?: AuthorizationProviderOAuth2Settings; + /** Authorization Provider name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Identity provider name. Must be 1 to 300 characters long. */ + identityProvider?: string; + /** OAuth2 settings */ + oauth2?: AuthorizationProviderOAuth2Settings; } /** Authorization contract. */ export interface AuthorizationContract extends ProxyResource { - /** Authorization type options */ - authorizationType?: AuthorizationType; - /** OAuth2 grant type options */ - oAuth2GrantType?: OAuth2GrantType; - /** Authorization parameters */ - parameters?: { [propertyName: string]: string }; - /** Authorization error details. */ - error?: AuthorizationError; - /** Status of the Authorization */ - status?: string; + /** Authorization type options */ + authorizationType?: AuthorizationType; + /** OAuth2 grant type options */ + oAuth2GrantType?: OAuth2GrantType; + /** Authorization parameters */ + parameters?: { [propertyName: string]: string }; + /** Authorization error details. */ + error?: AuthorizationError; + /** Status of the Authorization */ + status?: string; } /** Authorization access policy contract. */ export interface AuthorizationAccessPolicyContract extends ProxyResource { - /** The Tenant Id */ - tenantId?: string; - /** The Object Id */ - objectId?: string; + /** The Tenant Id */ + tenantId?: string; + /** The Object Id */ + objectId?: string; } /** Backend details. */ export interface BackendContract extends ProxyResource { - /** Backend Title. */ - title?: string; - /** Backend Description. */ - description?: string; - /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ - resourceId?: string; - /** Backend Properties contract */ - properties?: BackendProperties; - /** Backend Credentials Contract Properties */ - credentials?: BackendCredentialsContract; - /** Backend gateway Contract Properties */ - proxy?: BackendProxyContract; - /** Backend TLS Properties */ - tls?: BackendTlsProperties; - /** Runtime Url of the Backend. */ - url?: string; - /** Backend communication protocol. */ - protocol?: BackendProtocol; + /** Backend Title. */ + title?: string; + /** Backend Description. */ + description?: string; + /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ + resourceId?: string; + /** Backend Properties contract */ + properties?: BackendProperties; + /** Backend Credentials Contract Properties */ + credentials?: BackendCredentialsContract; + /** Backend gateway Contract Properties */ + proxy?: BackendProxyContract; + /** Backend TLS Properties */ + tls?: BackendTlsProperties; + /** Runtime Url of the Backend. */ + url?: string; + /** Backend communication protocol. */ + protocol?: BackendProtocol; } /** Reconnect request parameters. */ export interface BackendReconnectContract extends ProxyResource { - /** Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. */ - after?: string; + /** Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. */ + after?: string; } /** Cache details. */ export interface CacheContract extends ProxyResource { - /** Cache description */ - description?: string; - /** Runtime connection string to cache */ - connectionString?: string; - /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ - useFromLocation?: string; - /** Original uri of entity in external system cache points to */ - resourceId?: string; + /** Cache description */ + description?: string; + /** Runtime connection string to cache */ + connectionString?: string; + /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ + useFromLocation?: string; + /** Original uri of entity in external system cache points to */ + resourceId?: string; } /** Certificate details. */ export interface CertificateContract extends ProxyResource { - /** Subject attribute of the certificate. */ - subject?: string; - /** Thumbprint of the certificate. */ - thumbprint?: string; - /** - * Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expirationDate?: Date; - /** KeyVault location details of the certificate. */ - keyVault?: KeyVaultContractProperties; + /** Subject attribute of the certificate. */ + subject?: string; + /** Thumbprint of the certificate. */ + thumbprint?: string; + /** + * Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + expirationDate?: Date; + /** KeyVault location details of the certificate. */ + keyVault?: KeyVaultContractProperties; } /** Content type contract details. */ export interface ContentTypeContract extends ProxyResource { - /** Content type identifier */ - idPropertiesId?: string; - /** Content type name. Must be 1 to 250 characters long. */ - namePropertiesName?: string; - /** Content type description. */ - description?: string; - /** Content type schema. */ - schema?: Record; - /** Content type version. */ - version?: string; + /** Content type identifier */ + idPropertiesId?: string; + /** Content type name. Must be 1 to 250 characters long. */ + namePropertiesName?: string; + /** Content type description. */ + description?: string; + /** Content type schema. */ + schema?: Record; + /** Content type version. */ + version?: string; } /** Content type contract details. */ export interface ContentItemContract extends ProxyResource { - /** Properties of the content item. */ - properties?: { [propertyName: string]: any }; + /** Properties of the content item. */ + properties?: { [propertyName: string]: any }; } /** Deleted API Management Service information. */ export interface DeletedServiceContract extends ProxyResource { - /** - * API Management Service Master Location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly location?: string; - /** Fully-qualified API Management Service Resource ID */ - serviceId?: string; - /** UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ - scheduledPurgeDate?: Date; - /** UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ - deletionDate?: Date; + /** + * API Management Service Master Location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; + /** Fully-qualified API Management Service Resource ID */ + serviceId?: string; + /** UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + scheduledPurgeDate?: Date; + /** UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + deletionDate?: Date; } /** Email Template details. */ export interface EmailTemplateContract extends ProxyResource { - /** Subject of the Template. */ - subject?: string; - /** Email Template Body. This should be a valid XDocument */ - body?: string; - /** Title of the Template. */ - title?: string; - /** Description of the Email Template. */ - description?: string; - /** - * Whether the template is the default template provided by API Management or has been edited. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDefault?: boolean; - /** Email Template Parameter values. */ - parameters?: EmailTemplateParametersContractProperties[]; + /** Subject of the Template. */ + subject?: string; + /** Email Template Body. This should be a valid XDocument */ + body?: string; + /** Title of the Template. */ + title?: string; + /** Description of the Email Template. */ + description?: string; + /** + * Whether the template is the default template provided by API Management or has been edited. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDefault?: boolean; + /** Email Template Parameter values. */ + parameters?: EmailTemplateParametersContractProperties[]; } /** Gateway details. */ export interface GatewayContract extends ProxyResource { - /** Gateway location. */ - locationData?: ResourceLocationDataContract; - /** Gateway description */ - description?: string; + /** Gateway location. */ + locationData?: ResourceLocationDataContract; + /** Gateway description */ + description?: string; } /** Gateway hostname configuration details. */ export interface GatewayHostnameConfigurationContract extends ProxyResource { - /** Hostname value. Supports valid domain name, partial or full wildcard */ - hostname?: string; - /** Identifier of Certificate entity that will be used for TLS connection establishment */ - certificateId?: string; - /** Determines whether gateway requests client certificate */ - negotiateClientCertificate?: boolean; - /** Specifies if TLS 1.0 is supported */ - tls10Enabled?: boolean; - /** Specifies if TLS 1.1 is supported */ - tls11Enabled?: boolean; - /** Specifies if HTTP/2.0 is supported */ - http2Enabled?: boolean; + /** Hostname value. Supports valid domain name, partial or full wildcard */ + hostname?: string; + /** Identifier of Certificate entity that will be used for TLS connection establishment */ + certificateId?: string; + /** Determines whether gateway requests client certificate */ + negotiateClientCertificate?: boolean; + /** Specifies if TLS 1.0 is supported */ + tls10Enabled?: boolean; + /** Specifies if TLS 1.1 is supported */ + tls11Enabled?: boolean; + /** Specifies if HTTP/2.0 is supported */ + http2Enabled?: boolean; } /** Association entity details. */ export interface AssociationContract extends ProxyResource { - /** Provisioning state. */ - provisioningState?: "created"; + /** Provisioning state. */ + provisioningState?: "created"; } /** Gateway certificate authority details. */ export interface GatewayCertificateAuthorityContract extends ProxyResource { - /** Determines whether certificate authority is trusted. */ - isTrusted?: boolean; + /** Determines whether certificate authority is trusted. */ + isTrusted?: boolean; } /** Contract details. */ export interface GroupContract extends ProxyResource { - /** Group name. */ - displayName?: string; - /** Group description. Can contain HTML formatting tags. */ - description?: string; - /** - * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly builtIn?: boolean; - /** Group type. */ - typePropertiesType?: GroupType; - /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; + /** Group name. */ + displayName?: string; + /** Group description. Can contain HTML formatting tags. */ + description?: string; + /** + * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly builtIn?: boolean; + /** Group type. */ + typePropertiesType?: GroupType; + /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; } /** User details. */ export interface UserContract extends ProxyResource { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; - /** Email address. */ - email?: string; - /** - * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - registrationDate?: Date; - /** - * Collection of groups user is part of. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groups?: GroupContractProperties[]; + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; + /** Email address. */ + email?: string; + /** + * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + registrationDate?: Date; + /** + * Collection of groups user is part of. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groups?: GroupContractProperties[]; } /** Identity Provider details. */ export interface IdentityProviderContract extends ProxyResource { - /** Identity Provider Type identifier. */ - typePropertiesType?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + /** Identity Provider Type identifier. */ + typePropertiesType?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** Identity Provider details. */ export interface IdentityProviderCreateContract extends ProxyResource { - /** Identity Provider Type identifier. */ - typePropertiesType?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + /** Identity Provider Type identifier. */ + typePropertiesType?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** Logger details. */ export interface LoggerContract extends ProxyResource { - /** Logger type. */ - loggerType?: LoggerType; - /** Logger description. */ - description?: string; - /** - * The name and SendRule connection string of the event hub for azureEventHub logger. - * Instrumentation key for applicationInsights logger. - */ - credentials?: { [propertyName: string]: string }; - /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ - isBuffered?: boolean; - /** Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). */ - resourceId?: string; + /** Logger type. */ + loggerType?: LoggerType; + /** Logger description. */ + description?: string; + /** + * The name and SendRule connection string of the event hub for azureEventHub logger. + * Instrumentation key for applicationInsights logger. + */ + credentials?: { [propertyName: string]: string }; + /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ + isBuffered?: boolean; + /** Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). */ + resourceId?: string; } /** NamedValue details. */ export interface NamedValueContract extends ProxyResource { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractProperties; + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractProperties; } /** NamedValue details. */ export interface NamedValueCreateContract extends ProxyResource { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; } /** Notification details. */ export interface NotificationContract extends ProxyResource { - /** Title of the Notification. */ - title?: string; - /** Description of the Notification. */ - description?: string; - /** Recipient Parameter values. */ - recipients?: RecipientsContractProperties; + /** Title of the Notification. */ + title?: string; + /** Description of the Notification. */ + description?: string; + /** Recipient Parameter values. */ + recipients?: RecipientsContractProperties; } /** Recipient User details. */ export interface RecipientUserContract extends ProxyResource { - /** API Management UserId subscribed to notification. */ - userId?: string; + /** API Management UserId subscribed to notification. */ + userId?: string; } /** Recipient Email details. */ export interface RecipientEmailContract extends ProxyResource { - /** User Email subscribed to notification. */ - email?: string; + /** User Email subscribed to notification. */ + email?: string; } /** OpenId Connect Provider details. */ export interface OpenidConnectProviderContract extends ProxyResource { - /** User-friendly OpenID Connect Provider name. */ - displayName?: string; - /** User-friendly description of OpenID Connect Provider. */ - description?: string; - /** Metadata endpoint URI. */ - metadataEndpoint?: string; - /** Client ID of developer console which is the client application. */ - clientId?: string; - /** Client Secret of developer console which is the client application. */ - clientSecret?: string; - /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; + /** User-friendly OpenID Connect Provider name. */ + displayName?: string; + /** User-friendly description of OpenID Connect Provider. */ + description?: string; + /** Metadata endpoint URI. */ + metadataEndpoint?: string; + /** Client ID of developer console which is the client application. */ + clientId?: string; + /** Client Secret of developer console which is the client application. */ + clientSecret?: string; + /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; } /** Policy description details. */ export interface PolicyDescriptionContract extends ProxyResource { - /** - * Policy description. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * Binary OR value of the Snippet scope. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scope?: number; + /** + * Policy description. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Binary OR value of the Snippet scope. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scope?: number; } /** Policy fragment contract details. */ export interface PolicyFragmentContract extends ProxyResource { - /** Contents of the policy fragment. */ - value?: string; - /** Policy fragment description. */ - description?: string; - /** Format of the policy fragment content. */ - format?: PolicyFragmentContentFormat; + /** Contents of the policy fragment. */ + value?: string; + /** Policy fragment description. */ + description?: string; + /** Format of the policy fragment content. */ + format?: PolicyFragmentContentFormat; } -export interface ResourceCollectionValueItem extends ProxyResource {} +export interface ResourceCollectionValueItem extends ProxyResource { } /** The developer portal configuration contract. */ export interface PortalConfigContract extends ProxyResource { - /** Enable or disable Basic authentication method. */ - enableBasicAuth?: boolean; - signin?: PortalConfigPropertiesSignin; - signup?: PortalConfigPropertiesSignup; - /** The developer portal delegation settings. */ - delegation?: PortalConfigDelegationProperties; - /** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ - cors?: PortalConfigCorsProperties; - /** The developer portal Content Security Policy (CSP) settings. */ - csp?: PortalConfigCspProperties; + /** Enable or disable Basic authentication method. */ + enableBasicAuth?: boolean; + signin?: PortalConfigPropertiesSignin; + signup?: PortalConfigPropertiesSignup; + /** The developer portal delegation settings. */ + delegation?: PortalConfigDelegationProperties; + /** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ + cors?: PortalConfigCorsProperties; + /** The developer portal Content Security Policy (CSP) settings. */ + csp?: PortalConfigCspProperties; } /** Portal Revision's contract details. */ export interface PortalRevisionContract extends ProxyResource { - /** Portal revision description. */ - description?: string; - /** - * Portal revision publishing status details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statusDetails?: string; - /** - * Status of the portal's revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: PortalRevisionStatus; - /** Indicates if the portal's revision is public. */ - isCurrent?: boolean; - /** - * Portal's revision creation date and time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * Last updated date and time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedDateTime?: Date; + /** Portal revision description. */ + description?: string; + /** + * Portal revision publishing status details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statusDetails?: string; + /** + * Status of the portal's revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: PortalRevisionStatus; + /** Indicates if the portal's revision is public. */ + isCurrent?: boolean; + /** + * Portal's revision creation date and time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdDateTime?: Date; + /** + * Last updated date and time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updatedDateTime?: Date; } /** Portal Settings for the Developer Portal. */ export interface PortalSettingsContract extends ProxyResource { - /** A delegation Url. */ - url?: string; - /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ - validationKey?: string; - /** Subscriptions delegation settings. */ - subscriptions?: SubscriptionsDelegationSettingsProperties; - /** User registration delegation settings. */ - userRegistration?: RegistrationDelegationSettingsProperties; - /** Redirect Anonymous users to the Sign-In page. */ - enabled?: boolean; - /** Terms of service contract properties. */ - termsOfService?: TermsOfServiceProperties; + /** A delegation Url. */ + url?: string; + /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ + validationKey?: string; + /** Subscriptions delegation settings. */ + subscriptions?: SubscriptionsDelegationSettingsProperties; + /** User registration delegation settings. */ + userRegistration?: RegistrationDelegationSettingsProperties; + /** Redirect Anonymous users to the Sign-In page. */ + enabled?: boolean; + /** Terms of service contract properties. */ + termsOfService?: TermsOfServiceProperties; } /** Sign-In settings for the Developer Portal. */ export interface PortalSigninSettings extends ProxyResource { - /** Redirect Anonymous users to the Sign-In page. */ - enabled?: boolean; + /** Redirect Anonymous users to the Sign-In page. */ + enabled?: boolean; } /** Sign-Up settings for a developer portal. */ export interface PortalSignupSettings extends ProxyResource { - /** Allow users to sign up on a developer portal. */ - enabled?: boolean; - /** Terms of service contract properties. */ - termsOfService?: TermsOfServiceProperties; + /** Allow users to sign up on a developer portal. */ + enabled?: boolean; + /** Terms of service contract properties. */ + termsOfService?: TermsOfServiceProperties; } /** Delegation settings for a developer portal. */ export interface PortalDelegationSettings extends ProxyResource { - /** A delegation Url. */ - url?: string; - /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ - validationKey?: string; - /** Subscriptions delegation settings. */ - subscriptions?: SubscriptionsDelegationSettingsProperties; - /** User registration delegation settings. */ - userRegistration?: RegistrationDelegationSettingsProperties; + /** A delegation Url. */ + url?: string; + /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ + validationKey?: string; + /** Subscriptions delegation settings. */ + subscriptions?: SubscriptionsDelegationSettingsProperties; + /** User registration delegation settings. */ + userRegistration?: RegistrationDelegationSettingsProperties; } /** Subscription details. */ export interface SubscriptionContract extends ProxyResource { - /** The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. */ - ownerId?: string; - /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ - scope?: string; - /** The name of the subscription, or null if the subscription has no name. */ - displayName?: string; - /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ - state?: SubscriptionState; - /** - * Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDate?: Date; - /** - * Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - startDate?: Date; - /** - * Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expirationDate?: Date; - /** - * Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - endDate?: Date; - /** - * Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - notificationDate?: Date; - /** Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - primaryKey?: string; - /** Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - secondaryKey?: string; - /** Optional subscription comment added by an administrator when the state is changed to the 'rejected'. */ - stateComment?: string; - /** Determines whether tracing is enabled */ - allowTracing?: boolean; + /** The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ + scope?: string; + /** The name of the subscription, or null if the subscription has no name. */ + displayName?: string; + /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** + * Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdDate?: Date; + /** + * Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + startDate?: Date; + /** + * Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + expirationDate?: Date; + /** + * Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + endDate?: Date; + /** + * Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + notificationDate?: Date; + /** Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Optional subscription comment added by an administrator when the state is changed to the 'rejected'. */ + stateComment?: string; + /** Determines whether tracing is enabled */ + allowTracing?: boolean; } /** Global Schema Contract details. */ export interface GlobalSchemaContract extends ProxyResource { - /** Schema Type. Immutable. */ - schemaType?: SchemaType; - /** Free-form schema entity description. */ - description?: string; - /** Json-encoded string for non json-based schema. */ - value?: any; - /** Global Schema document object for json-based schema formats(e.g. json schema). */ - document?: Record; + /** Schema Type. Immutable. */ + schemaType?: SchemaType; + /** Free-form schema entity description. */ + description?: string; + /** Json-encoded string for non json-based schema. */ + value?: any; + /** Global Schema document object for json-based schema formats(e.g. json schema). */ + document?: Record; } /** Tenant Settings. */ export interface TenantSettingsContract extends ProxyResource { - /** Tenant settings */ - settings?: { [propertyName: string]: string }; + /** Tenant settings */ + settings?: { [propertyName: string]: string }; } /** Tenant Settings. */ export interface AccessInformationContract extends ProxyResource { - /** Access Information type ('access' or 'gitAccess') */ - idPropertiesId?: string; - /** Principal (User) Identifier. */ - principalId?: string; - /** Determines whether direct access is enabled. */ - enabled?: boolean; + /** Access Information type ('access' or 'gitAccess') */ + idPropertiesId?: string; + /** Principal (User) Identifier. */ + principalId?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; } /** Long Running Git Operation Results. */ export interface OperationResultContract extends ProxyResource { - /** Operation result identifier. */ - idPropertiesId?: string; - /** Status of an async operation. */ - status?: AsyncOperationStatus; - /** - * Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - started?: Date; - /** - * Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - updated?: Date; - /** Optional result info. */ - resultInfo?: string; - /** Error Body Contract */ - error?: ErrorResponseBody; - /** - * This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionLog?: OperationResultLogItemContract[]; + /** Operation result identifier. */ + idPropertiesId?: string; + /** Status of an async operation. */ + status?: AsyncOperationStatus; + /** + * Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + started?: Date; + /** + * Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + updated?: Date; + /** Optional result info. */ + resultInfo?: string; + /** Error Body Contract */ + error?: ErrorResponseBody; + /** + * This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionLog?: OperationResultLogItemContract[]; } /** Result of Tenant Configuration Sync State. */ export interface TenantConfigurationSyncStateContract extends ProxyResource { - /** The name of Git branch. */ - branch?: string; - /** The latest commit Id. */ - commitId?: string; - /** value indicating if last sync was save (true) or deploy (false) operation. */ - isExport?: boolean; - /** value indicating if last synchronization was later than the configuration change. */ - isSynced?: boolean; - /** value indicating whether Git configuration access is enabled. */ - isGitEnabled?: boolean; - /** - * The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - syncDate?: Date; - /** - * The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - configurationChangeDate?: Date; - /** Most recent tenant configuration operation identifier */ - lastOperationId?: string; + /** The name of Git branch. */ + branch?: string; + /** The latest commit Id. */ + commitId?: string; + /** value indicating if last sync was save (true) or deploy (false) operation. */ + isExport?: boolean; + /** value indicating if last synchronization was later than the configuration change. */ + isSynced?: boolean; + /** value indicating whether Git configuration access is enabled. */ + isGitEnabled?: boolean; + /** + * The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + syncDate?: Date; + /** + * The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + configurationChangeDate?: Date; + /** Most recent tenant configuration operation identifier */ + lastOperationId?: string; } /** Markdown documentation details. */ export interface DocumentationContract extends ProxyResource { - /** documentation title. */ - title?: string; - /** Markdown documentation content. */ - content?: string; + /** documentation title. */ + title?: string; + /** Markdown documentation content. */ + content?: string; } /** Long Running Git Resolver Results. */ export interface ResolverResultContract extends ProxyResource { - /** Resolver result identifier. */ - idPropertiesId?: string; - /** Status of an async resolver. */ - status?: AsyncResolverStatus; - /** - * Start time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - started?: Date; - /** - * Last update time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - updated?: Date; - /** Optional result info. */ - resultInfo?: string; - /** Error Body Contract */ - error?: ErrorResponseBody; - /** - * This property if only provided as part of the TenantConfiguration_Validate resolver. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy resolver. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionLog?: ResolverResultLogItemContract[]; + /** Resolver result identifier. */ + idPropertiesId?: string; + /** Status of an async resolver. */ + status?: AsyncResolverStatus; + /** + * Start time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + started?: Date; + /** + * Last update time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + updated?: Date; + /** Optional result info. */ + resultInfo?: string; + /** Error Body Contract */ + error?: ErrorResponseBody; + /** + * This property if only provided as part of the TenantConfiguration_Validate resolver. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy resolver. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionLog?: ResolverResultLogItemContract[]; } /** Defines headers for Api_getEntityTag operation. */ export interface ApiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Api_get operation. */ export interface ApiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Api_createOrUpdate operation. */ export interface ApiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Api_update operation. */ export interface ApiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiRelease_getEntityTag operation. */ export interface ApiReleaseGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiRelease_get operation. */ export interface ApiReleaseGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiRelease_createOrUpdate operation. */ export interface ApiReleaseCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiRelease_update operation. */ export interface ApiReleaseUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperation_getEntityTag operation. */ export interface ApiOperationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperation_get operation. */ export interface ApiOperationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperation_createOrUpdate operation. */ export interface ApiOperationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperation_update operation. */ export interface ApiOperationUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperationPolicy_getEntityTag operation. */ export interface ApiOperationPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperationPolicy_get operation. */ export interface ApiOperationPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperationPolicy_createOrUpdate operation. */ export interface ApiOperationPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getEntityStateByOperation operation. */ export interface TagGetEntityStateByOperationHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getByOperation operation. */ export interface TagGetByOperationHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getEntityStateByApi operation. */ export interface TagGetEntityStateByApiHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getByApi operation. */ export interface TagGetByApiHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_assignToApi operation. */ export interface TagAssignToApiHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getEntityStateByProduct operation. */ export interface TagGetEntityStateByProductHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getByProduct operation. */ export interface TagGetByProductHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getEntityState operation. */ export interface TagGetEntityStateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_get operation. */ export interface TagGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_createOrUpdate operation. */ export interface TagCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_update operation. */ export interface TagUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolver_getEntityTag operation. */ export interface GraphQLApiResolverGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolver_get operation. */ export interface GraphQLApiResolverGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolver_createOrUpdate operation. */ export interface GraphQLApiResolverCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolver_update operation. */ export interface GraphQLApiResolverUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolverPolicy_getEntityTag operation. */ export interface GraphQLApiResolverPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolverPolicy_get operation. */ export interface GraphQLApiResolverPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolverPolicy_createOrUpdate operation. */ export interface GraphQLApiResolverPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiPolicy_getEntityTag operation. */ export interface ApiPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiPolicy_get operation. */ export interface ApiPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiPolicy_createOrUpdate operation. */ export interface ApiPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiSchema_getEntityTag operation. */ export interface ApiSchemaGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiSchema_get operation. */ export interface ApiSchemaGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiSchema_createOrUpdate operation. */ export interface ApiSchemaCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiDiagnostic_getEntityTag operation. */ export interface ApiDiagnosticGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiDiagnostic_get operation. */ export interface ApiDiagnosticGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiDiagnostic_createOrUpdate operation. */ export interface ApiDiagnosticCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiDiagnostic_update operation. */ export interface ApiDiagnosticUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssue_getEntityTag operation. */ export interface ApiIssueGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssue_get operation. */ export interface ApiIssueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssue_createOrUpdate operation. */ export interface ApiIssueCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssue_update operation. */ export interface ApiIssueUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueComment_getEntityTag operation. */ export interface ApiIssueCommentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueComment_get operation. */ export interface ApiIssueCommentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueComment_createOrUpdate operation. */ export interface ApiIssueCommentCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueAttachment_getEntityTag operation. */ export interface ApiIssueAttachmentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueAttachment_get operation. */ export interface ApiIssueAttachmentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueAttachment_createOrUpdate operation. */ export interface ApiIssueAttachmentCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiTagDescription_getEntityTag operation. */ export interface ApiTagDescriptionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiTagDescription_get operation. */ export interface ApiTagDescriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiTagDescription_createOrUpdate operation. */ export interface ApiTagDescriptionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiWiki_getEntityTag operation. */ export interface ApiWikiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiWiki_get operation. */ export interface ApiWikiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiWiki_createOrUpdate operation. */ export interface ApiWikiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiWiki_update operation. */ export interface ApiWikiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiVersionSet_getEntityTag operation. */ export interface ApiVersionSetGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiVersionSet_get operation. */ export interface ApiVersionSetGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiVersionSet_createOrUpdate operation. */ export interface ApiVersionSetCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiVersionSet_update operation. */ export interface ApiVersionSetUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_getEntityTag operation. */ export interface AuthorizationServerGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_get operation. */ export interface AuthorizationServerGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_createOrUpdate operation. */ export interface AuthorizationServerCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_update operation. */ export interface AuthorizationServerUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_listSecrets operation. */ export interface AuthorizationServerListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationProvider_get operation. */ export interface AuthorizationProviderGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationProvider_createOrUpdate operation. */ export interface AuthorizationProviderCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Authorization_get operation. */ export interface AuthorizationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Authorization_createOrUpdate operation. */ export interface AuthorizationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Authorization_confirmConsentCode operation. */ export interface AuthorizationConfirmConsentCodeHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationLoginLinks_post operation. */ export interface AuthorizationLoginLinksPostHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationAccessPolicy_get operation. */ export interface AuthorizationAccessPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationAccessPolicy_createOrUpdate operation. */ export interface AuthorizationAccessPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Backend_getEntityTag operation. */ export interface BackendGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Backend_get operation. */ export interface BackendGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Backend_createOrUpdate operation. */ export interface BackendCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Backend_update operation. */ export interface BackendUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Cache_getEntityTag operation. */ export interface CacheGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Cache_get operation. */ export interface CacheGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Cache_createOrUpdate operation. */ export interface CacheCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Cache_update operation. */ export interface CacheUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Certificate_getEntityTag operation. */ export interface CertificateGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Certificate_get operation. */ export interface CertificateGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Certificate_createOrUpdate operation. */ export interface CertificateCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Certificate_refreshSecret operation. */ export interface CertificateRefreshSecretHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentType_get operation. */ export interface ContentTypeGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentType_createOrUpdate operation. */ export interface ContentTypeCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentItem_getEntityTag operation. */ export interface ContentItemGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentItem_get operation. */ export interface ContentItemGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentItem_createOrUpdate operation. */ export interface ContentItemCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for DeletedServices_purge operation. */ export interface DeletedServicesPurgeHeaders { - location?: string; + location?: string; } /** Defines headers for ApiManagementService_restore operation. */ export interface ApiManagementServiceRestoreHeaders { - location?: string; + location?: string; } /** Defines headers for ApiManagementService_backup operation. */ export interface ApiManagementServiceBackupHeaders { - location?: string; + location?: string; } /** Defines headers for ApiManagementService_migrateToStv2 operation. */ export interface ApiManagementServiceMigrateToStv2Headers { - location?: string; + location?: string; } /** Defines headers for ApiManagementService_applyNetworkConfigurationUpdates operation. */ export interface ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders { - location?: string; + location?: string; } /** Defines headers for Diagnostic_getEntityTag operation. */ export interface DiagnosticGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Diagnostic_get operation. */ export interface DiagnosticGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Diagnostic_createOrUpdate operation. */ export interface DiagnosticCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Diagnostic_update operation. */ export interface DiagnosticUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for EmailTemplate_getEntityTag operation. */ export interface EmailTemplateGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for EmailTemplate_get operation. */ export interface EmailTemplateGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for EmailTemplate_update operation. */ export interface EmailTemplateUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_getEntityTag operation. */ export interface GatewayGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_get operation. */ export interface GatewayGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_createOrUpdate operation. */ export interface GatewayCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_update operation. */ export interface GatewayUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_listKeys operation. */ export interface GatewayListKeysHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayHostnameConfiguration_getEntityTag operation. */ export interface GatewayHostnameConfigurationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayHostnameConfiguration_get operation. */ export interface GatewayHostnameConfigurationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayHostnameConfiguration_createOrUpdate operation. */ export interface GatewayHostnameConfigurationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayApi_getEntityTag operation. */ export interface GatewayApiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayCertificateAuthority_getEntityTag operation. */ export interface GatewayCertificateAuthorityGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayCertificateAuthority_get operation. */ export interface GatewayCertificateAuthorityGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayCertificateAuthority_createOrUpdate operation. */ export interface GatewayCertificateAuthorityCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Group_getEntityTag operation. */ export interface GroupGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Group_get operation. */ export interface GroupGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Group_createOrUpdate operation. */ export interface GroupCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Group_update operation. */ export interface GroupUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_getEntityTag operation. */ export interface IdentityProviderGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_get operation. */ export interface IdentityProviderGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_createOrUpdate operation. */ export interface IdentityProviderCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_update operation. */ export interface IdentityProviderUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_listSecrets operation. */ export interface IdentityProviderListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Issue_get operation. */ export interface IssueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Logger_getEntityTag operation. */ export interface LoggerGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Logger_get operation. */ export interface LoggerGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Logger_createOrUpdate operation. */ export interface LoggerCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Logger_update operation. */ export interface LoggerUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_getEntityTag operation. */ export interface NamedValueGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_get operation. */ export interface NamedValueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_createOrUpdate operation. */ export interface NamedValueCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_update operation. */ export interface NamedValueUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_listValue operation. */ export interface NamedValueListValueHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_refreshSecret operation. */ export interface NamedValueRefreshSecretHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_getEntityTag operation. */ export interface OpenIdConnectProviderGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_get operation. */ export interface OpenIdConnectProviderGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_createOrUpdate operation. */ export interface OpenIdConnectProviderCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_update operation. */ export interface OpenIdConnectProviderUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_listSecrets operation. */ export interface OpenIdConnectProviderListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Policy_getEntityTag operation. */ export interface PolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Policy_get operation. */ export interface PolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Policy_createOrUpdate operation. */ export interface PolicyCreateOrUpdateHeaders { - /** Current entity state version */ - eTag?: string; + /** Current entity state version */ + eTag?: string; } /** Defines headers for PolicyFragment_getEntityTag operation. */ export interface PolicyFragmentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PolicyFragment_get operation. */ export interface PolicyFragmentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PolicyFragment_createOrUpdate operation. */ export interface PolicyFragmentCreateOrUpdateHeaders { - /** Current entity state version */ - eTag?: string; + /** Current entity state version */ + eTag?: string; } /** Defines headers for PortalConfig_getEntityTag operation. */ export interface PortalConfigGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalConfig_get operation. */ export interface PortalConfigGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalRevision_getEntityTag operation. */ export interface PortalRevisionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalRevision_get operation. */ export interface PortalRevisionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalRevision_createOrUpdate operation. */ export interface PortalRevisionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalRevision_update operation. */ export interface PortalRevisionUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for SignInSettings_getEntityTag operation. */ export interface SignInSettingsGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for SignInSettings_get operation. */ export interface SignInSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for SignUpSettings_getEntityTag operation. */ export interface SignUpSettingsGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for SignUpSettings_get operation. */ export interface SignUpSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for DelegationSettings_getEntityTag operation. */ export interface DelegationSettingsGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for DelegationSettings_get operation. */ export interface DelegationSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Product_getEntityTag operation. */ export interface ProductGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Product_get operation. */ export interface ProductGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Product_createOrUpdate operation. */ export interface ProductCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Product_update operation. */ export interface ProductUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductPolicy_getEntityTag operation. */ export interface ProductPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductPolicy_get operation. */ export interface ProductPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductPolicy_createOrUpdate operation. */ export interface ProductPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWiki_getEntityTag operation. */ export interface ProductWikiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWiki_get operation. */ export interface ProductWikiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWiki_createOrUpdate operation. */ export interface ProductWikiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWiki_update operation. */ export interface ProductWikiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWikis_list operation. */ export interface ProductWikisListHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWikis_listNext operation. */ export interface ProductWikisListNextHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GlobalSchema_getEntityTag operation. */ export interface GlobalSchemaGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GlobalSchema_get operation. */ export interface GlobalSchemaGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GlobalSchema_createOrUpdate operation. */ export interface GlobalSchemaCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantSettings_get operation. */ export interface TenantSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_getEntityTag operation. */ export interface SubscriptionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_get operation. */ export interface SubscriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_createOrUpdate operation. */ export interface SubscriptionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_update operation. */ export interface SubscriptionUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_listSecrets operation. */ export interface SubscriptionListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_getEntityTag operation. */ export interface TenantAccessGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_get operation. */ export interface TenantAccessGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_create operation. */ export interface TenantAccessCreateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_update operation. */ export interface TenantAccessUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_listSecrets operation. */ export interface TenantAccessListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for User_getEntityTag operation. */ export interface UserGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for User_get operation. */ export interface UserGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for User_createOrUpdate operation. */ export interface UserCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for User_update operation. */ export interface UserUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for UserSubscription_get operation. */ export interface UserSubscriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Documentation_getEntityTag operation. */ export interface DocumentationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Documentation_get operation. */ export interface DocumentationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Documentation_createOrUpdate operation. */ export interface DocumentationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Documentation_update operation. */ export interface DocumentationUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Known values of {@link Protocol} that the service accepts. */ export enum KnownProtocol { - /** Http */ - Http = "http", - /** Https */ - Https = "https", - /** Ws */ - Ws = "ws", - /** Wss */ - Wss = "wss" + /** Http */ + Http = "http", + /** Https */ + Https = "https", + /** Ws */ + Ws = "ws", + /** Wss */ + Wss = "wss" } /** @@ -5983,12 +5983,12 @@ export type Protocol = string; /** Known values of {@link ApiVersionSetContractDetailsVersioningScheme} that the service accepts. */ export enum KnownApiVersionSetContractDetailsVersioningScheme { - /** The API Version is passed in a path segment. */ - Segment = "Segment", - /** The API Version is passed in a query parameter. */ - Query = "Query", - /** The API Version is passed in a HTTP header. */ - Header = "Header" + /** The API Version is passed in a path segment. */ + Segment = "Segment", + /** The API Version is passed in a query parameter. */ + Query = "Query", + /** The API Version is passed in a HTTP header. */ + Header = "Header" } /** @@ -6004,10 +6004,10 @@ export type ApiVersionSetContractDetailsVersioningScheme = string; /** Known values of {@link BearerTokenSendingMethods} that the service accepts. */ export enum KnownBearerTokenSendingMethods { - /** Access token will be transmitted in the Authorization header using Bearer schema */ - AuthorizationHeader = "authorizationHeader", - /** Access token will be transmitted as query parameters. */ - Query = "query" + /** Access token will be transmitted in the Authorization header using Bearer schema */ + AuthorizationHeader = "authorizationHeader", + /** Access token will be transmitted as query parameters. */ + Query = "query" } /** @@ -6022,14 +6022,14 @@ export type BearerTokenSendingMethods = string; /** Known values of {@link ApiType} that the service accepts. */ export enum KnownApiType { - /** Http */ - Http = "http", - /** Soap */ - Soap = "soap", - /** Websocket */ - Websocket = "websocket", - /** Graphql */ - Graphql = "graphql" + /** Http */ + Http = "http", + /** Soap */ + Soap = "soap", + /** Websocket */ + Websocket = "websocket", + /** Graphql */ + Graphql = "graphql" } /** @@ -6046,28 +6046,28 @@ export type ApiType = string; /** Known values of {@link ContentFormat} that the service accepts. */ export enum KnownContentFormat { - /** The contents are inline and Content type is a WADL document. */ - WadlXml = "wadl-xml", - /** The WADL document is hosted on a publicly accessible internet address. */ - WadlLinkJson = "wadl-link-json", - /** The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. */ - SwaggerJson = "swagger-json", - /** The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. */ - SwaggerLinkJson = "swagger-link-json", - /** The contents are inline and the document is a WSDL\/Soap document. */ - Wsdl = "wsdl", - /** The WSDL document is hosted on a publicly accessible internet address. */ - WsdlLink = "wsdl-link", - /** The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. */ - Openapi = "openapi", - /** The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. */ - OpenapiJson = "openapi+json", - /** The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. */ - OpenapiLink = "openapi-link", - /** The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. */ - OpenapiJsonLink = "openapi+json-link", - /** The GraphQL API endpoint hosted on a publicly accessible internet address. */ - GraphqlLink = "graphql-link" + /** The contents are inline and Content type is a WADL document. */ + WadlXml = "wadl-xml", + /** The WADL document is hosted on a publicly accessible internet address. */ + WadlLinkJson = "wadl-link-json", + /** The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. */ + SwaggerJson = "swagger-json", + /** The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. */ + SwaggerLinkJson = "swagger-link-json", + /** The contents are inline and the document is a WSDL\/Soap document. */ + Wsdl = "wsdl", + /** The WSDL document is hosted on a publicly accessible internet address. */ + WsdlLink = "wsdl-link", + /** The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. */ + Openapi = "openapi", + /** The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. */ + OpenapiJson = "openapi+json", + /** The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. */ + OpenapiLink = "openapi-link", + /** The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. */ + OpenapiJsonLink = "openapi+json-link", + /** The GraphQL API endpoint hosted on a publicly accessible internet address. */ + GraphqlLink = "graphql-link" } /** @@ -6091,14 +6091,14 @@ export type ContentFormat = string; /** Known values of {@link SoapApiType} that the service accepts. */ export enum KnownSoapApiType { - /** Imports a SOAP API having a RESTful front end. */ - SoapToRest = "http", - /** Imports the SOAP API having a SOAP front end. */ - SoapPassThrough = "soap", - /** Imports the API having a Websocket front end. */ - WebSocket = "websocket", - /** Imports the API having a GraphQL front end. */ - GraphQL = "graphql" + /** Imports a SOAP API having a RESTful front end. */ + SoapToRest = "http", + /** Imports the SOAP API having a SOAP front end. */ + SoapPassThrough = "soap", + /** Imports the API having a Websocket front end. */ + WebSocket = "websocket", + /** Imports the API having a GraphQL front end. */ + GraphQL = "graphql" } /** @@ -6115,10 +6115,10 @@ export type SoapApiType = string; /** Known values of {@link TranslateRequiredQueryParametersConduct} that the service accepts. */ export enum KnownTranslateRequiredQueryParametersConduct { - /** Translates required query parameters to template ones. Is a default value */ - Template = "template", - /** Leaves required query parameters as they are (no translation done). */ - Query = "query" + /** Translates required query parameters to template ones. Is a default value */ + Template = "template", + /** Leaves required query parameters as they are (no translation done). */ + Query = "query" } /** @@ -6133,14 +6133,14 @@ export type TranslateRequiredQueryParametersConduct = string; /** Known values of {@link PolicyContentFormat} that the service accepts. */ export enum KnownPolicyContentFormat { - /** The contents are inline and Content type is an XML document. */ - Xml = "xml", - /** The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. */ - XmlLink = "xml-link", - /** The contents are inline and Content type is a non XML encoded policy document. */ - Rawxml = "rawxml", - /** The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. */ - RawxmlLink = "rawxml-link" + /** The contents are inline and Content type is an XML document. */ + Xml = "xml", + /** The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. */ + XmlLink = "xml-link", + /** The contents are inline and Content type is a non XML encoded policy document. */ + Rawxml = "rawxml", + /** The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. */ + RawxmlLink = "rawxml-link" } /** @@ -6157,8 +6157,8 @@ export type PolicyContentFormat = string; /** Known values of {@link PolicyIdName} that the service accepts. */ export enum KnownPolicyIdName { - /** Policy */ - Policy = "policy" + /** Policy */ + Policy = "policy" } /** @@ -6172,10 +6172,10 @@ export type PolicyIdName = string; /** Known values of {@link PolicyExportFormat} that the service accepts. */ export enum KnownPolicyExportFormat { - /** The contents are inline and Content type is an XML document. */ - Xml = "xml", - /** The contents are inline and Content type is a non XML encoded policy document. */ - Rawxml = "rawxml" + /** The contents are inline and Content type is an XML document. */ + Xml = "xml", + /** The contents are inline and Content type is a non XML encoded policy document. */ + Rawxml = "rawxml" } /** @@ -6190,8 +6190,8 @@ export type PolicyExportFormat = string; /** Known values of {@link AlwaysLog} that the service accepts. */ export enum KnownAlwaysLog { - /** Always log all erroneous request regardless of sampling settings. */ - AllErrors = "allErrors" + /** Always log all erroneous request regardless of sampling settings. */ + AllErrors = "allErrors" } /** @@ -6205,8 +6205,8 @@ export type AlwaysLog = string; /** Known values of {@link SamplingType} that the service accepts. */ export enum KnownSamplingType { - /** Fixed-rate sampling. */ - Fixed = "fixed" + /** Fixed-rate sampling. */ + Fixed = "fixed" } /** @@ -6220,10 +6220,10 @@ export type SamplingType = string; /** Known values of {@link DataMaskingMode} that the service accepts. */ export enum KnownDataMaskingMode { - /** Mask the value of an entity. */ - Mask = "Mask", - /** Hide the presence of an entity. */ - Hide = "Hide" + /** Mask the value of an entity. */ + Mask = "Mask", + /** Hide the presence of an entity. */ + Hide = "Hide" } /** @@ -6238,12 +6238,12 @@ export type DataMaskingMode = string; /** Known values of {@link HttpCorrelationProtocol} that the service accepts. */ export enum KnownHttpCorrelationProtocol { - /** Do not read and inject correlation headers. */ - None = "None", - /** Inject Request-Id and Request-Context headers with request correlation data. See https:\//github.com\/dotnet\/corefx\/blob\/master\/src\/System.Diagnostics.DiagnosticSource\/src\/HttpCorrelationProtocol.md. */ - Legacy = "Legacy", - /** Inject Trace Context headers. See https:\//w3c.github.io\/trace-context. */ - W3C = "W3C" + /** Do not read and inject correlation headers. */ + None = "None", + /** Inject Request-Id and Request-Context headers with request correlation data. See https:\//github.com\/dotnet\/corefx\/blob\/master\/src\/System.Diagnostics.DiagnosticSource\/src\/HttpCorrelationProtocol.md. */ + Legacy = "Legacy", + /** Inject Trace Context headers. See https:\//w3c.github.io\/trace-context. */ + W3C = "W3C" } /** @@ -6259,12 +6259,12 @@ export type HttpCorrelationProtocol = string; /** Known values of {@link Verbosity} that the service accepts. */ export enum KnownVerbosity { - /** All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. */ - Verbose = "verbose", - /** Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. */ - Information = "information", - /** Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. */ - Error = "error" + /** All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. */ + Verbose = "verbose", + /** Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. */ + Information = "information", + /** Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. */ + Error = "error" } /** @@ -6280,10 +6280,10 @@ export type Verbosity = string; /** Known values of {@link OperationNameFormat} that the service accepts. */ export enum KnownOperationNameFormat { - /** API_NAME;rev=API_REVISION - OPERATION_NAME */ - Name = "Name", - /** HTTP_VERB URL */ - Url = "Url" + /** API_NAME;rev=API_REVISION - OPERATION_NAME */ + Name = "Name", + /** HTTP_VERB URL */ + Url = "Url" } /** @@ -6298,16 +6298,16 @@ export type OperationNameFormat = string; /** Known values of {@link State} that the service accepts. */ export enum KnownState { - /** The issue is proposed. */ - Proposed = "proposed", - /** The issue is opened. */ - Open = "open", - /** The issue was removed. */ - Removed = "removed", - /** The issue is now resolved. */ - Resolved = "resolved", - /** The issue was closed. */ - Closed = "closed" + /** The issue is proposed. */ + Proposed = "proposed", + /** The issue is opened. */ + Open = "open", + /** The issue was removed. */ + Removed = "removed", + /** The issue is now resolved. */ + Resolved = "resolved", + /** The issue was closed. */ + Closed = "closed" } /** @@ -6325,16 +6325,16 @@ export type State = string; /** Known values of {@link ExportFormat} that the service accepts. */ export enum KnownExportFormat { - /** Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. */ - Swagger = "swagger-link", - /** Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ - Wsdl = "wsdl-link", - /** Export the Api Definition in WADL Schema to Storage Blob. */ - Wadl = "wadl-link", - /** Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. */ - Openapi = "openapi-link", - /** Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. */ - OpenapiJson = "openapi+json-link" + /** Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. */ + Swagger = "swagger-link", + /** Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ + Wsdl = "wsdl-link", + /** Export the Api Definition in WADL Schema to Storage Blob. */ + Wadl = "wadl-link", + /** Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. */ + Openapi = "openapi-link", + /** Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. */ + OpenapiJson = "openapi+json-link" } /** @@ -6352,8 +6352,8 @@ export type ExportFormat = string; /** Known values of {@link ExportApi} that the service accepts. */ export enum KnownExportApi { - /** True */ - True = "true" + /** True */ + True = "true" } /** @@ -6367,14 +6367,14 @@ export type ExportApi = string; /** Known values of {@link ExportResultFormat} that the service accepts. */ export enum KnownExportResultFormat { - /** The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. */ - Swagger = "swagger-link-json", - /** The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ - Wsdl = "wsdl-link+xml", - /** Export the API Definition in WADL Schema to Storage Blob. */ - Wadl = "wadl-link-json", - /** Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. */ - OpenApi = "openapi-link" + /** The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. */ + Swagger = "swagger-link-json", + /** The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ + Wsdl = "wsdl-link+xml", + /** Export the API Definition in WADL Schema to Storage Blob. */ + Wadl = "wadl-link-json", + /** Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. */ + OpenApi = "openapi-link" } /** @@ -6391,12 +6391,12 @@ export type ExportResultFormat = string; /** Known values of {@link VersioningScheme} that the service accepts. */ export enum KnownVersioningScheme { - /** The API Version is passed in a path segment. */ - Segment = "Segment", - /** The API Version is passed in a query parameter. */ - Query = "Query", - /** The API Version is passed in a HTTP header. */ - Header = "Header" + /** The API Version is passed in a path segment. */ + Segment = "Segment", + /** The API Version is passed in a query parameter. */ + Query = "Query", + /** The API Version is passed in a HTTP header. */ + Header = "Header" } /** @@ -6412,14 +6412,14 @@ export type VersioningScheme = string; /** Known values of {@link GrantType} that the service accepts. */ export enum KnownGrantType { - /** Authorization Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.1. */ - AuthorizationCode = "authorizationCode", - /** Implicit Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.2. */ - Implicit = "implicit", - /** Resource Owner Password Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.3. */ - ResourceOwnerPassword = "resourceOwnerPassword", - /** Client Credentials Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.4. */ - ClientCredentials = "clientCredentials" + /** Authorization Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.1. */ + AuthorizationCode = "authorizationCode", + /** Implicit Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.2. */ + Implicit = "implicit", + /** Resource Owner Password Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.3. */ + ResourceOwnerPassword = "resourceOwnerPassword", + /** Client Credentials Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.4. */ + ClientCredentials = "clientCredentials" } /** @@ -6436,10 +6436,10 @@ export type GrantType = string; /** Known values of {@link ClientAuthenticationMethod} that the service accepts. */ export enum KnownClientAuthenticationMethod { - /** Basic Client Authentication method. */ - Basic = "Basic", - /** Body based Authentication method. */ - Body = "Body" + /** Basic Client Authentication method. */ + Basic = "Basic", + /** Body based Authentication method. */ + Body = "Body" } /** @@ -6454,10 +6454,10 @@ export type ClientAuthenticationMethod = string; /** Known values of {@link BearerTokenSendingMethod} that the service accepts. */ export enum KnownBearerTokenSendingMethod { - /** AuthorizationHeader */ - AuthorizationHeader = "authorizationHeader", - /** Query */ - Query = "query" + /** AuthorizationHeader */ + AuthorizationHeader = "authorizationHeader", + /** Query */ + Query = "query" } /** @@ -6472,8 +6472,8 @@ export type BearerTokenSendingMethod = string; /** Known values of {@link AuthorizationType} that the service accepts. */ export enum KnownAuthorizationType { - /** OAuth2 authorization type */ - OAuth2 = "OAuth2" + /** OAuth2 authorization type */ + OAuth2 = "OAuth2" } /** @@ -6487,10 +6487,10 @@ export type AuthorizationType = string; /** Known values of {@link OAuth2GrantType} that the service accepts. */ export enum KnownOAuth2GrantType { - /** Authorization Code grant */ - AuthorizationCode = "AuthorizationCode", - /** Client Credential grant */ - ClientCredentials = "ClientCredentials" + /** Authorization Code grant */ + AuthorizationCode = "AuthorizationCode", + /** Client Credential grant */ + ClientCredentials = "ClientCredentials" } /** @@ -6505,10 +6505,10 @@ export type OAuth2GrantType = string; /** Known values of {@link BackendProtocol} that the service accepts. */ export enum KnownBackendProtocol { - /** The Backend is a RESTful service. */ - Http = "http", - /** The Backend is a SOAP service. */ - Soap = "soap" + /** The Backend is a RESTful service. */ + Http = "http", + /** The Backend is a SOAP service. */ + Soap = "soap" } /** @@ -6523,8 +6523,8 @@ export type BackendProtocol = string; /** Known values of {@link PreferredIPVersion} that the service accepts. */ export enum KnownPreferredIPVersion { - /** IPv4 */ - IPv4 = "IPv4" + /** IPv4 */ + IPv4 = "IPv4" } /** @@ -6538,12 +6538,12 @@ export type PreferredIPVersion = string; /** Known values of {@link ConnectivityCheckProtocol} that the service accepts. */ export enum KnownConnectivityCheckProtocol { - /** TCP */ - TCP = "TCP", - /** Http */ - Http = "HTTP", - /** Https */ - Https = "HTTPS" + /** TCP */ + TCP = "TCP", + /** Http */ + Http = "HTTP", + /** Https */ + Https = "HTTPS" } /** @@ -6559,10 +6559,10 @@ export type ConnectivityCheckProtocol = string; /** Known values of {@link Method} that the service accepts. */ export enum KnownMethod { - /** GET */ - GET = "GET", - /** Post */ - Post = "POST" + /** GET */ + GET = "GET", + /** Post */ + Post = "POST" } /** @@ -6577,12 +6577,12 @@ export type Method = string; /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { - /** Local */ - Local = "Local", - /** Inbound */ - Inbound = "Inbound", - /** Outbound */ - Outbound = "Outbound" + /** Local */ + Local = "Local", + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound" } /** @@ -6598,10 +6598,10 @@ export type Origin = string; /** Known values of {@link Severity} that the service accepts. */ export enum KnownSeverity { - /** Error */ - Error = "Error", - /** Warning */ - Warning = "Warning" + /** Error */ + Error = "Error", + /** Warning */ + Warning = "Warning" } /** @@ -6616,24 +6616,24 @@ export type Severity = string; /** Known values of {@link IssueType} that the service accepts. */ export enum KnownIssueType { - /** Unknown */ - Unknown = "Unknown", - /** AgentStopped */ - AgentStopped = "AgentStopped", - /** GuestFirewall */ - GuestFirewall = "GuestFirewall", - /** DnsResolution */ - DnsResolution = "DnsResolution", - /** SocketBind */ - SocketBind = "SocketBind", - /** NetworkSecurityRule */ - NetworkSecurityRule = "NetworkSecurityRule", - /** UserDefinedRoute */ - UserDefinedRoute = "UserDefinedRoute", - /** PortThrottled */ - PortThrottled = "PortThrottled", - /** Platform */ - Platform = "Platform" + /** Unknown */ + Unknown = "Unknown", + /** AgentStopped */ + AgentStopped = "AgentStopped", + /** GuestFirewall */ + GuestFirewall = "GuestFirewall", + /** DnsResolution */ + DnsResolution = "DnsResolution", + /** SocketBind */ + SocketBind = "SocketBind", + /** NetworkSecurityRule */ + NetworkSecurityRule = "NetworkSecurityRule", + /** UserDefinedRoute */ + UserDefinedRoute = "UserDefinedRoute", + /** PortThrottled */ + PortThrottled = "PortThrottled", + /** Platform */ + Platform = "Platform" } /** @@ -6655,14 +6655,14 @@ export type IssueType = string; /** Known values of {@link ConnectionStatus} that the service accepts. */ export enum KnownConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Degraded */ - Degraded = "Degraded" + /** Unknown */ + Unknown = "Unknown", + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected", + /** Degraded */ + Degraded = "Degraded" } /** @@ -6679,18 +6679,18 @@ export type ConnectionStatus = string; /** Known values of {@link SkuType} that the service accepts. */ export enum KnownSkuType { - /** Developer SKU of Api Management. */ - Developer = "Developer", - /** Standard SKU of Api Management. */ - Standard = "Standard", - /** Premium SKU of Api Management. */ - Premium = "Premium", - /** Basic SKU of Api Management. */ - Basic = "Basic", - /** Consumption SKU of Api Management. */ - Consumption = "Consumption", - /** Isolated SKU of Api Management. */ - Isolated = "Isolated" + /** Developer SKU of Api Management. */ + Developer = "Developer", + /** Standard SKU of Api Management. */ + Standard = "Standard", + /** Premium SKU of Api Management. */ + Premium = "Premium", + /** Basic SKU of Api Management. */ + Basic = "Basic", + /** Consumption SKU of Api Management. */ + Consumption = "Consumption", + /** Isolated SKU of Api Management. */ + Isolated = "Isolated" } /** @@ -6709,12 +6709,12 @@ export type SkuType = string; /** Known values of {@link ResourceSkuCapacityScaleType} that the service accepts. */ export enum KnownResourceSkuCapacityScaleType { - /** Supported scale type automatic. */ - Automatic = "automatic", - /** Supported scale type manual. */ - Manual = "manual", - /** Scaling not supported. */ - None = "none" + /** Supported scale type automatic. */ + Automatic = "automatic", + /** Supported scale type manual. */ + Manual = "manual", + /** Scaling not supported. */ + None = "none" } /** @@ -6730,12 +6730,12 @@ export type ResourceSkuCapacityScaleType = string; /** Known values of {@link AccessType} that the service accepts. */ export enum KnownAccessType { - /** Use access key. */ - AccessKey = "AccessKey", - /** Use system assigned managed identity. */ - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - /** Use user assigned managed identity. */ - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" + /** Use access key. */ + AccessKey = "AccessKey", + /** Use system assigned managed identity. */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** Use user assigned managed identity. */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" } /** @@ -6751,16 +6751,16 @@ export type AccessType = string; /** Known values of {@link HostnameType} that the service accepts. */ export enum KnownHostnameType { - /** Proxy */ - Proxy = "Proxy", - /** Portal */ - Portal = "Portal", - /** Management */ - Management = "Management", - /** Scm */ - Scm = "Scm", - /** DeveloperPortal */ - DeveloperPortal = "DeveloperPortal" + /** Proxy */ + Proxy = "Proxy", + /** Portal */ + Portal = "Portal", + /** Management */ + Management = "Management", + /** Scm */ + Scm = "Scm", + /** DeveloperPortal */ + DeveloperPortal = "DeveloperPortal" } /** @@ -6778,14 +6778,14 @@ export type HostnameType = string; /** Known values of {@link CertificateSource} that the service accepts. */ export enum KnownCertificateSource { - /** Managed */ - Managed = "Managed", - /** KeyVault */ - KeyVault = "KeyVault", - /** Custom */ - Custom = "Custom", - /** BuiltIn */ - BuiltIn = "BuiltIn" + /** Managed */ + Managed = "Managed", + /** KeyVault */ + KeyVault = "KeyVault", + /** Custom */ + Custom = "Custom", + /** BuiltIn */ + BuiltIn = "BuiltIn" } /** @@ -6802,12 +6802,12 @@ export type CertificateSource = string; /** Known values of {@link CertificateStatus} that the service accepts. */ export enum KnownCertificateStatus { - /** Completed */ - Completed = "Completed", - /** Failed */ - Failed = "Failed", - /** InProgress */ - InProgress = "InProgress" + /** Completed */ + Completed = "Completed", + /** Failed */ + Failed = "Failed", + /** InProgress */ + InProgress = "InProgress" } /** @@ -6823,10 +6823,10 @@ export type CertificateStatus = string; /** Known values of {@link PublicNetworkAccess} that the service accepts. */ export enum KnownPublicNetworkAccess { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled" + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" } /** @@ -6841,10 +6841,10 @@ export type PublicNetworkAccess = string; /** Known values of {@link NatGatewayState} that the service accepts. */ export enum KnownNatGatewayState { - /** Nat Gateway is enabled for the service. */ - Enabled = "Enabled", - /** Nat Gateway is disabled for the service. */ - Disabled = "Disabled" + /** Nat Gateway is enabled for the service. */ + Enabled = "Enabled", + /** Nat Gateway is disabled for the service. */ + Disabled = "Disabled" } /** @@ -6859,14 +6859,14 @@ export type NatGatewayState = string; /** Known values of {@link PlatformVersion} that the service accepts. */ export enum KnownPlatformVersion { - /** Platform version cannot be determined, as compute platform is not deployed. */ - Undetermined = "undetermined", - /** Platform running the service on Single Tenant V1 platform. */ - Stv1 = "stv1", - /** Platform running the service on Single Tenant V2 platform. */ - Stv2 = "stv2", - /** Platform running the service on Multi Tenant V1 platform. */ - Mtv1 = "mtv1" + /** Platform version cannot be determined, as compute platform is not deployed. */ + Undetermined = "undetermined", + /** Platform running the service on Single Tenant V1 platform. */ + Stv1 = "stv1", + /** Platform running the service on Single Tenant V2 platform. */ + Stv2 = "stv2", + /** Platform running the service on Multi Tenant V1 platform. */ + Mtv1 = "mtv1" } /** @@ -6883,10 +6883,10 @@ export type PlatformVersion = string; /** Known values of {@link CertificateConfigurationStoreName} that the service accepts. */ export enum KnownCertificateConfigurationStoreName { - /** CertificateAuthority */ - CertificateAuthority = "CertificateAuthority", - /** Root */ - Root = "Root" + /** CertificateAuthority */ + CertificateAuthority = "CertificateAuthority", + /** Root */ + Root = "Root" } /** @@ -6901,12 +6901,12 @@ export type CertificateConfigurationStoreName = string; /** Known values of {@link VirtualNetworkType} that the service accepts. */ export enum KnownVirtualNetworkType { - /** The service is not part of any Virtual Network. */ - None = "None", - /** The service is part of Virtual Network and it is accessible from Internet. */ - External = "External", - /** The service is part of Virtual Network and it is only accessible from within the virtual network. */ - Internal = "Internal" + /** The service is not part of any Virtual Network. */ + None = "None", + /** The service is part of Virtual Network and it is accessible from Internet. */ + External = "External", + /** The service is part of Virtual Network and it is only accessible from within the virtual network. */ + Internal = "Internal" } /** @@ -6922,12 +6922,12 @@ export type VirtualNetworkType = string; /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ export enum KnownPrivateEndpointServiceConnectionStatus { - /** Pending */ - Pending = "Pending", - /** Approved */ - Approved = "Approved", - /** Rejected */ - Rejected = "Rejected" + /** Pending */ + Pending = "Pending", + /** Approved */ + Approved = "Approved", + /** Rejected */ + Rejected = "Rejected" } /** @@ -6943,14 +6943,14 @@ export type PrivateEndpointServiceConnectionStatus = string; /** Known values of {@link ApimIdentityType} that the service accepts. */ export enum KnownApimIdentityType { - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", - /** None */ - None = "None" + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", + /** None */ + None = "None" } /** @@ -6967,14 +6967,14 @@ export type ApimIdentityType = string; /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" } /** @@ -6991,34 +6991,34 @@ export type CreatedByType = string; /** Known values of {@link TemplateName} that the service accepts. */ export enum KnownTemplateName { - /** ApplicationApprovedNotificationMessage */ - ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage", - /** AccountClosedDeveloper */ - AccountClosedDeveloper = "accountClosedDeveloper", - /** QuotaLimitApproachingDeveloperNotificationMessage */ - QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage", - /** NewDeveloperNotificationMessage */ - NewDeveloperNotificationMessage = "newDeveloperNotificationMessage", - /** EmailChangeIdentityDefault */ - EmailChangeIdentityDefault = "emailChangeIdentityDefault", - /** InviteUserNotificationMessage */ - InviteUserNotificationMessage = "inviteUserNotificationMessage", - /** NewCommentNotificationMessage */ - NewCommentNotificationMessage = "newCommentNotificationMessage", - /** ConfirmSignUpIdentityDefault */ - ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault", - /** NewIssueNotificationMessage */ - NewIssueNotificationMessage = "newIssueNotificationMessage", - /** PurchaseDeveloperNotificationMessage */ - PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage", - /** PasswordResetIdentityDefault */ - PasswordResetIdentityDefault = "passwordResetIdentityDefault", - /** PasswordResetByAdminNotificationMessage */ - PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage", - /** RejectDeveloperNotificationMessage */ - RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage", - /** RequestDeveloperNotificationMessage */ - RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage" + /** ApplicationApprovedNotificationMessage */ + ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage", + /** AccountClosedDeveloper */ + AccountClosedDeveloper = "accountClosedDeveloper", + /** QuotaLimitApproachingDeveloperNotificationMessage */ + QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage", + /** NewDeveloperNotificationMessage */ + NewDeveloperNotificationMessage = "newDeveloperNotificationMessage", + /** EmailChangeIdentityDefault */ + EmailChangeIdentityDefault = "emailChangeIdentityDefault", + /** InviteUserNotificationMessage */ + InviteUserNotificationMessage = "inviteUserNotificationMessage", + /** NewCommentNotificationMessage */ + NewCommentNotificationMessage = "newCommentNotificationMessage", + /** ConfirmSignUpIdentityDefault */ + ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault", + /** NewIssueNotificationMessage */ + NewIssueNotificationMessage = "newIssueNotificationMessage", + /** PurchaseDeveloperNotificationMessage */ + PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage", + /** PasswordResetIdentityDefault */ + PasswordResetIdentityDefault = "passwordResetIdentityDefault", + /** PasswordResetByAdminNotificationMessage */ + PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage", + /** RejectDeveloperNotificationMessage */ + RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage", + /** RequestDeveloperNotificationMessage */ + RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage" } /** @@ -7045,14 +7045,14 @@ export type TemplateName = string; /** Known values of {@link UserState} that the service accepts. */ export enum KnownUserState { - /** User state is active. */ - Active = "active", - /** User is blocked. Blocked users cannot authenticate at developer portal or call API. */ - Blocked = "blocked", - /** User account is pending. Requires identity confirmation before it can be made active. */ - Pending = "pending", - /** User account is closed. All identities and related entities are removed. */ - Deleted = "deleted" + /** User state is active. */ + Active = "active", + /** User is blocked. Blocked users cannot authenticate at developer portal or call API. */ + Blocked = "blocked", + /** User account is pending. Requires identity confirmation before it can be made active. */ + Pending = "pending", + /** User account is closed. All identities and related entities are removed. */ + Deleted = "deleted" } /** @@ -7069,18 +7069,18 @@ export type UserState = string; /** Known values of {@link IdentityProviderType} that the service accepts. */ export enum KnownIdentityProviderType { - /** Facebook as Identity provider. */ - Facebook = "facebook", - /** Google as Identity provider. */ - Google = "google", - /** Microsoft Live as Identity provider. */ - Microsoft = "microsoft", - /** Twitter as Identity provider. */ - Twitter = "twitter", - /** Azure Active Directory as Identity provider. */ - Aad = "aad", - /** Azure Active Directory B2C as Identity provider. */ - AadB2C = "aadB2C" + /** Facebook as Identity provider. */ + Facebook = "facebook", + /** Google as Identity provider. */ + Google = "google", + /** Microsoft Live as Identity provider. */ + Microsoft = "microsoft", + /** Twitter as Identity provider. */ + Twitter = "twitter", + /** Azure Active Directory as Identity provider. */ + Aad = "aad", + /** Azure Active Directory B2C as Identity provider. */ + AadB2C = "aadB2C" } /** @@ -7099,12 +7099,12 @@ export type IdentityProviderType = string; /** Known values of {@link LoggerType} that the service accepts. */ export enum KnownLoggerType { - /** Azure Event Hub as log destination. */ - AzureEventHub = "azureEventHub", - /** Azure Application Insights as log destination. */ - ApplicationInsights = "applicationInsights", - /** Azure Monitor */ - AzureMonitor = "azureMonitor" + /** Azure Event Hub as log destination. */ + AzureEventHub = "azureEventHub", + /** Azure Application Insights as log destination. */ + ApplicationInsights = "applicationInsights", + /** Azure Monitor */ + AzureMonitor = "azureMonitor" } /** @@ -7120,12 +7120,12 @@ export type LoggerType = string; /** Known values of {@link ConnectivityStatusType} that the service accepts. */ export enum KnownConnectivityStatusType { - /** Initializing */ - Initializing = "initializing", - /** Success */ - Success = "success", - /** Failure */ - Failure = "failure" + /** Initializing */ + Initializing = "initializing", + /** Success */ + Success = "success", + /** Failure */ + Failure = "failure" } /** @@ -7141,20 +7141,20 @@ export type ConnectivityStatusType = string; /** Known values of {@link NotificationName} that the service accepts. */ export enum KnownNotificationName { - /** The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. */ - RequestPublisherNotificationMessage = "RequestPublisherNotificationMessage", - /** The following email recipients and users will receive email notifications about new API product subscriptions. */ - PurchasePublisherNotificationMessage = "PurchasePublisherNotificationMessage", - /** The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. */ - NewApplicationNotificationMessage = "NewApplicationNotificationMessage", - /** The following recipients will receive blind carbon copies of all emails sent to developers. */ - BCC = "BCC", - /** The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. */ - NewIssuePublisherNotificationMessage = "NewIssuePublisherNotificationMessage", - /** The following email recipients and users will receive email notifications when developer closes his account. */ - AccountClosedPublisher = "AccountClosedPublisher", - /** The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. */ - QuotaLimitApproachingPublisherNotificationMessage = "QuotaLimitApproachingPublisherNotificationMessage" + /** The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. */ + RequestPublisherNotificationMessage = "RequestPublisherNotificationMessage", + /** The following email recipients and users will receive email notifications about new API product subscriptions. */ + PurchasePublisherNotificationMessage = "PurchasePublisherNotificationMessage", + /** The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. */ + NewApplicationNotificationMessage = "NewApplicationNotificationMessage", + /** The following recipients will receive blind carbon copies of all emails sent to developers. */ + BCC = "BCC", + /** The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. */ + NewIssuePublisherNotificationMessage = "NewIssuePublisherNotificationMessage", + /** The following email recipients and users will receive email notifications when developer closes his account. */ + AccountClosedPublisher = "AccountClosedPublisher", + /** The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. */ + QuotaLimitApproachingPublisherNotificationMessage = "QuotaLimitApproachingPublisherNotificationMessage" } /** @@ -7174,10 +7174,10 @@ export type NotificationName = string; /** Known values of {@link PolicyFragmentContentFormat} that the service accepts. */ export enum KnownPolicyFragmentContentFormat { - /** The contents are inline and Content type is an XML document. */ - Xml = "xml", - /** The contents are inline and Content type is a non XML encoded policy document. */ - Rawxml = "rawxml" + /** The contents are inline and Content type is an XML document. */ + Xml = "xml", + /** The contents are inline and Content type is a non XML encoded policy document. */ + Rawxml = "rawxml" } /** @@ -7192,12 +7192,12 @@ export type PolicyFragmentContentFormat = string; /** Known values of {@link PortalSettingsCspMode} that the service accepts. */ export enum KnownPortalSettingsCspMode { - /** The browser will block requests not matching allowed origins. */ - Enabled = "enabled", - /** The browser will not apply the origin restrictions. */ - Disabled = "disabled", - /** The browser will report requests not matching allowed origins without blocking them. */ - ReportOnly = "reportOnly" + /** The browser will block requests not matching allowed origins. */ + Enabled = "enabled", + /** The browser will not apply the origin restrictions. */ + Disabled = "disabled", + /** The browser will report requests not matching allowed origins without blocking them. */ + ReportOnly = "reportOnly" } /** @@ -7213,14 +7213,14 @@ export type PortalSettingsCspMode = string; /** Known values of {@link PortalRevisionStatus} that the service accepts. */ export enum KnownPortalRevisionStatus { - /** Portal's revision has been queued. */ - Pending = "pending", - /** Portal's revision is being published. */ - Publishing = "publishing", - /** Portal's revision publishing completed. */ - Completed = "completed", - /** Portal's revision publishing failed. */ - Failed = "failed" + /** Portal's revision has been queued. */ + Pending = "pending", + /** Portal's revision is being published. */ + Publishing = "publishing", + /** Portal's revision publishing completed. */ + Completed = "completed", + /** Portal's revision publishing failed. */ + Failed = "failed" } /** @@ -7237,14 +7237,14 @@ export type PortalRevisionStatus = string; /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ export enum KnownPrivateEndpointConnectionProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Creating */ - Creating = "Creating", - /** Deleting */ - Deleting = "Deleting", - /** Failed */ - Failed = "Failed" + /** Succeeded */ + Succeeded = "Succeeded", + /** Creating */ + Creating = "Creating", + /** Deleting */ + Deleting = "Deleting", + /** Failed */ + Failed = "Failed" } /** @@ -7261,10 +7261,10 @@ export type PrivateEndpointConnectionProvisioningState = string; /** Known values of {@link SchemaType} that the service accepts. */ export enum KnownSchemaType { - /** XML schema type. */ - Xml = "xml", - /** Json schema type. */ - Json = "json" + /** XML schema type. */ + Xml = "xml", + /** Json schema type. */ + Json = "json" } /** @@ -7279,8 +7279,8 @@ export type SchemaType = string; /** Known values of {@link SettingsTypeName} that the service accepts. */ export enum KnownSettingsTypeName { - /** Public */ - Public = "public" + /** Public */ + Public = "public" } /** @@ -7294,10 +7294,10 @@ export type SettingsTypeName = string; /** Known values of {@link AppType} that the service accepts. */ export enum KnownAppType { - /** User create request was sent by legacy developer portal. */ - Portal = "portal", - /** User create request was sent by new developer portal. */ - DeveloperPortal = "developerPortal" + /** User create request was sent by legacy developer portal. */ + Portal = "portal", + /** User create request was sent by new developer portal. */ + DeveloperPortal = "developerPortal" } /** @@ -7312,10 +7312,10 @@ export type AppType = string; /** Known values of {@link AccessIdName} that the service accepts. */ export enum KnownAccessIdName { - /** Access */ - Access = "access", - /** GitAccess */ - GitAccess = "gitAccess" + /** Access */ + Access = "access", + /** GitAccess */ + GitAccess = "gitAccess" } /** @@ -7330,8 +7330,8 @@ export type AccessIdName = string; /** Known values of {@link ConfigurationIdName} that the service accepts. */ export enum KnownConfigurationIdName { - /** Configuration */ - Configuration = "configuration" + /** Configuration */ + Configuration = "configuration" } /** @@ -7345,10 +7345,10 @@ export type ConfigurationIdName = string; /** Known values of {@link Confirmation} that the service accepts. */ export enum KnownConfirmation { - /** Send an e-mail to the user confirming they have successfully signed up. */ - Signup = "signup", - /** Send an e-mail inviting the user to sign-up and complete registration. */ - Invite = "invite" + /** Send an e-mail to the user confirming they have successfully signed up. */ + Signup = "signup", + /** Send an e-mail inviting the user to sign-up and complete registration. */ + Invite = "invite" } /** @@ -7364,14 +7364,14 @@ export type Confirmation = string; export type ProductState = "notPublished" | "published"; /** Defines values for AuthorizationMethod. */ export type AuthorizationMethod = - | "HEAD" - | "OPTIONS" - | "TRACE" - | "GET" - | "POST" - | "PUT" - | "PATCH" - | "DELETE"; + | "HEAD" + | "OPTIONS" + | "TRACE" + | "GET" + | "POST" + | "PUT" + | "PATCH" + | "DELETE"; /** Defines values for NameAvailabilityReason. */ export type NameAvailabilityReason = "Valid" | "Invalid" | "AlreadyExists"; /** Defines values for KeyType. */ @@ -7380,53 +7380,53 @@ export type KeyType = "primary" | "secondary"; export type GroupType = "custom" | "system" | "external"; /** Defines values for PolicyScopeContract. */ export type PolicyScopeContract = - | "Tenant" - | "Product" - | "Api" - | "Operation" - | "All"; + | "Tenant" + | "Product" + | "Api" + | "Operation" + | "All"; /** Defines values for SubscriptionState. */ export type SubscriptionState = - | "suspended" - | "active" - | "expired" - | "submitted" - | "rejected" - | "cancelled"; + | "suspended" + | "active" + | "expired" + | "submitted" + | "rejected" + | "cancelled"; /** Defines values for ApiManagementSkuCapacityScaleType. */ export type ApiManagementSkuCapacityScaleType = "Automatic" | "Manual" | "None"; /** Defines values for ApiManagementSkuRestrictionsType. */ export type ApiManagementSkuRestrictionsType = "Location" | "Zone"; /** Defines values for ApiManagementSkuRestrictionsReasonCode. */ export type ApiManagementSkuRestrictionsReasonCode = - | "QuotaId" - | "NotAvailableForSubscription"; + | "QuotaId" + | "NotAvailableForSubscription"; /** Defines values for AsyncOperationStatus. */ export type AsyncOperationStatus = - | "Started" - | "InProgress" - | "Succeeded" - | "Failed"; + | "Started" + | "InProgress" + | "Succeeded" + | "Failed"; /** Defines values for AsyncResolverStatus. */ export type AsyncResolverStatus = - | "Started" - | "InProgress" - | "Succeeded" - | "Failed"; + | "Started" + | "InProgress" + | "Succeeded" + | "Failed"; /** Optional parameters. */ export interface ApiListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include tags in the response. */ - tags?: string; - /** Include full ApiVersionSet resource in response */ - expandApiVersionSet?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include tags in the response. */ + tags?: string; + /** Include full ApiVersionSet resource in response */ + expandApiVersionSet?: boolean; } /** Contains response data for the listByService operation. */ @@ -7434,54 +7434,54 @@ export type ApiListByServiceResponse = ApiCollection; /** Optional parameters. */ export interface ApiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiGetEntityTagResponse = ApiGetEntityTagHeaders; /** Optional parameters. */ -export interface ApiGetOptionalParams extends coreClient.OperationOptions {} +export interface ApiGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiGetResponse = ApiGetHeaders & ApiContract; /** Optional parameters. */ export interface ApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiCreateOrUpdateResponse = ApiCreateOrUpdateHeaders & ApiContract; /** Optional parameters. */ -export interface ApiUpdateOptionalParams extends coreClient.OperationOptions {} +export interface ApiUpdateOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiUpdateResponse = ApiUpdateHeaders & ApiContract; /** Optional parameters. */ export interface ApiDeleteOptionalParams extends coreClient.OperationOptions { - /** Delete all revisions of the Api. */ - deleteRevisions?: boolean; + /** Delete all revisions of the Api. */ + deleteRevisions?: boolean; } /** Optional parameters. */ export interface ApiListByTagsOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include not tagged APIs. */ - includeNotTaggedApis?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include not tagged APIs. */ + includeNotTaggedApis?: boolean; } /** Contains response data for the listByTags operation. */ @@ -7489,27 +7489,27 @@ export type ApiListByTagsResponse = TagResourceCollection; /** Optional parameters. */ export interface ApiListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiListByServiceNextResponse = ApiCollection; /** Optional parameters. */ export interface ApiListByTagsNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByTagsNext operation. */ export type ApiListByTagsNextResponse = TagResourceCollection; /** Optional parameters. */ export interface ApiRevisionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -7517,20 +7517,20 @@ export type ApiRevisionListByServiceResponse = ApiRevisionCollection; /** Optional parameters. */ export interface ApiRevisionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiRevisionListByServiceNextResponse = ApiRevisionCollection; /** Optional parameters. */ export interface ApiReleaseListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -7538,59 +7538,59 @@ export type ApiReleaseListByServiceResponse = ApiReleaseCollection; /** Optional parameters. */ export interface ApiReleaseGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiReleaseGetEntityTagResponse = ApiReleaseGetEntityTagHeaders; /** Optional parameters. */ export interface ApiReleaseGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiReleaseGetResponse = ApiReleaseGetHeaders & ApiReleaseContract; /** Optional parameters. */ export interface ApiReleaseCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiReleaseCreateOrUpdateResponse = ApiReleaseCreateOrUpdateHeaders & - ApiReleaseContract; + ApiReleaseContract; /** Optional parameters. */ export interface ApiReleaseUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiReleaseUpdateResponse = ApiReleaseUpdateHeaders & - ApiReleaseContract; + ApiReleaseContract; /** Optional parameters. */ export interface ApiReleaseDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiReleaseListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiReleaseListByServiceNextResponse = ApiReleaseCollection; /** Optional parameters. */ export interface ApiOperationListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include tags in the response. */ - tags?: string; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include tags in the response. */ + tags?: string; } /** Contains response data for the listByApi operation. */ @@ -7598,98 +7598,98 @@ export type ApiOperationListByApiResponse = OperationCollection; /** Optional parameters. */ export interface ApiOperationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiOperationGetEntityTagResponse = ApiOperationGetEntityTagHeaders; /** Optional parameters. */ export interface ApiOperationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiOperationGetResponse = ApiOperationGetHeaders & - OperationContract; + OperationContract; /** Optional parameters. */ export interface ApiOperationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiOperationCreateOrUpdateResponse = ApiOperationCreateOrUpdateHeaders & - OperationContract; + OperationContract; /** Optional parameters. */ export interface ApiOperationUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiOperationUpdateResponse = ApiOperationUpdateHeaders & - OperationContract; + OperationContract; /** Optional parameters. */ export interface ApiOperationDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiOperationListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type ApiOperationListByApiNextResponse = OperationCollection; /** Optional parameters. */ export interface ApiOperationPolicyListByOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByOperation operation. */ export type ApiOperationPolicyListByOperationResponse = PolicyCollection; /** Optional parameters. */ export interface ApiOperationPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiOperationPolicyGetEntityTagResponse = ApiOperationPolicyGetEntityTagHeaders; /** Optional parameters. */ export interface ApiOperationPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + extends coreClient.OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ export type ApiOperationPolicyGetResponse = ApiOperationPolicyGetHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface ApiOperationPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiOperationPolicyCreateOrUpdateResponse = ApiOperationPolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface ApiOperationPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByOperationOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByOperation operation. */ @@ -7697,38 +7697,38 @@ export type TagListByOperationResponse = TagCollection; /** Optional parameters. */ export interface TagGetEntityStateByOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityStateByOperation operation. */ export type TagGetEntityStateByOperationResponse = TagGetEntityStateByOperationHeaders; /** Optional parameters. */ export interface TagGetByOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByOperation operation. */ export type TagGetByOperationResponse = TagGetByOperationHeaders & TagContract; /** Optional parameters. */ export interface TagAssignToOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the assignToOperation operation. */ export type TagAssignToOperationResponse = TagContract; /** Optional parameters. */ export interface TagDetachFromOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByApi operation. */ @@ -7736,38 +7736,38 @@ export type TagListByApiResponse = TagCollection; /** Optional parameters. */ export interface TagGetEntityStateByApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityStateByApi operation. */ export type TagGetEntityStateByApiResponse = TagGetEntityStateByApiHeaders; /** Optional parameters. */ export interface TagGetByApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByApi operation. */ export type TagGetByApiResponse = TagGetByApiHeaders & TagContract; /** Optional parameters. */ export interface TagAssignToApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the assignToApi operation. */ export type TagAssignToApiResponse = TagAssignToApiHeaders & TagContract; /** Optional parameters. */ export interface TagDetachFromApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByProduct operation. */ @@ -7775,40 +7775,40 @@ export type TagListByProductResponse = TagCollection; /** Optional parameters. */ export interface TagGetEntityStateByProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityStateByProduct operation. */ export type TagGetEntityStateByProductResponse = TagGetEntityStateByProductHeaders; /** Optional parameters. */ export interface TagGetByProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByProduct operation. */ export type TagGetByProductResponse = TagGetByProductHeaders & TagContract; /** Optional parameters. */ export interface TagAssignToProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the assignToProduct operation. */ export type TagAssignToProductResponse = TagContract; /** Optional parameters. */ export interface TagDetachFromProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Scope like 'apis', 'products' or 'apis/{apiId} */ - scope?: string; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Scope like 'apis', 'products' or 'apis/{apiId} */ + scope?: string; } /** Contains response data for the listByService operation. */ @@ -7816,73 +7816,73 @@ export type TagListByServiceResponse = TagCollection; /** Optional parameters. */ export interface TagGetEntityStateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityState operation. */ export type TagGetEntityStateResponse = TagGetEntityStateHeaders; /** Optional parameters. */ -export interface TagGetOptionalParams extends coreClient.OperationOptions {} +export interface TagGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type TagGetResponse = TagGetHeaders & TagContract; /** Optional parameters. */ export interface TagCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type TagCreateOrUpdateResponse = TagCreateOrUpdateHeaders & TagContract; /** Optional parameters. */ -export interface TagUpdateOptionalParams extends coreClient.OperationOptions {} +export interface TagUpdateOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type TagUpdateResponse = TagUpdateHeaders & TagContract; /** Optional parameters. */ -export interface TagDeleteOptionalParams extends coreClient.OperationOptions {} +export interface TagDeleteOptionalParams extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByOperationNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByOperationNext operation. */ export type TagListByOperationNextResponse = TagCollection; /** Optional parameters. */ export interface TagListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type TagListByApiNextResponse = TagCollection; /** Optional parameters. */ export interface TagListByProductNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProductNext operation. */ export type TagListByProductNextResponse = TagCollection; /** Optional parameters. */ export interface TagListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type TagListByServiceNextResponse = TagCollection; /** Optional parameters. */ export interface GraphQLApiResolverListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByApi operation. */ @@ -7890,105 +7890,105 @@ export type GraphQLApiResolverListByApiResponse = ResolverCollection; /** Optional parameters. */ export interface GraphQLApiResolverGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GraphQLApiResolverGetEntityTagResponse = GraphQLApiResolverGetEntityTagHeaders; /** Optional parameters. */ export interface GraphQLApiResolverGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GraphQLApiResolverGetResponse = GraphQLApiResolverGetHeaders & - ResolverContract; + ResolverContract; /** Optional parameters. */ export interface GraphQLApiResolverCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GraphQLApiResolverCreateOrUpdateResponse = GraphQLApiResolverCreateOrUpdateHeaders & - ResolverContract; + ResolverContract; /** Optional parameters. */ export interface GraphQLApiResolverUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type GraphQLApiResolverUpdateResponse = GraphQLApiResolverUpdateHeaders & - ResolverContract; + ResolverContract; /** Optional parameters. */ export interface GraphQLApiResolverDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GraphQLApiResolverListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type GraphQLApiResolverListByApiNextResponse = ResolverCollection; /** Optional parameters. */ export interface GraphQLApiResolverPolicyListByResolverOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByResolver operation. */ export type GraphQLApiResolverPolicyListByResolverResponse = PolicyCollection; /** Optional parameters. */ export interface GraphQLApiResolverPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GraphQLApiResolverPolicyGetEntityTagResponse = GraphQLApiResolverPolicyGetEntityTagHeaders; /** Optional parameters. */ export interface GraphQLApiResolverPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + extends coreClient.OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ export type GraphQLApiResolverPolicyGetResponse = GraphQLApiResolverPolicyGetHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface GraphQLApiResolverPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GraphQLApiResolverPolicyCreateOrUpdateResponse = GraphQLApiResolverPolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface GraphQLApiResolverPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GraphQLApiResolverPolicyListByResolverNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByResolverNext operation. */ export type GraphQLApiResolverPolicyListByResolverNextResponse = PolicyCollection; /** Optional parameters. */ export interface ApiProductListByApisOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByApis operation. */ @@ -7996,30 +7996,30 @@ export type ApiProductListByApisResponse = ProductCollection; /** Optional parameters. */ export interface ApiProductListByApisNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApisNext operation. */ export type ApiProductListByApisNextResponse = ProductCollection; /** Optional parameters. */ export interface ApiPolicyListByApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApi operation. */ export type ApiPolicyListByApiResponse = PolicyCollection; /** Optional parameters. */ export interface ApiPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiPolicyGetEntityTagResponse = ApiPolicyGetEntityTagHeaders; /** Optional parameters. */ export interface ApiPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + extends coreClient.OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ @@ -8027,28 +8027,28 @@ export type ApiPolicyGetResponse = ApiPolicyGetHeaders & PolicyContract; /** Optional parameters. */ export interface ApiPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiPolicyCreateOrUpdateResponse = ApiPolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface ApiPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiSchemaListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByApi operation. */ @@ -8056,56 +8056,56 @@ export type ApiSchemaListByApiResponse = SchemaCollection; /** Optional parameters. */ export interface ApiSchemaGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiSchemaGetEntityTagResponse = ApiSchemaGetEntityTagHeaders; /** Optional parameters. */ export interface ApiSchemaGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiSchemaGetResponse = ApiSchemaGetHeaders & SchemaContract; /** Optional parameters. */ export interface ApiSchemaCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiSchemaCreateOrUpdateResponse = ApiSchemaCreateOrUpdateHeaders & - SchemaContract; + SchemaContract; /** Optional parameters. */ export interface ApiSchemaDeleteOptionalParams - extends coreClient.OperationOptions { - /** If true removes all references to the schema before deleting it. */ - force?: boolean; + extends coreClient.OperationOptions { + /** If true removes all references to the schema before deleting it. */ + force?: boolean; } /** Optional parameters. */ export interface ApiSchemaListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type ApiSchemaListByApiNextResponse = SchemaCollection; /** Optional parameters. */ export interface ApiDiagnosticListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8113,60 +8113,60 @@ export type ApiDiagnosticListByServiceResponse = DiagnosticCollection; /** Optional parameters. */ export interface ApiDiagnosticGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiDiagnosticGetEntityTagResponse = ApiDiagnosticGetEntityTagHeaders; /** Optional parameters. */ export interface ApiDiagnosticGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiDiagnosticGetResponse = ApiDiagnosticGetHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface ApiDiagnosticCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiDiagnosticCreateOrUpdateResponse = ApiDiagnosticCreateOrUpdateHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface ApiDiagnosticUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiDiagnosticUpdateResponse = ApiDiagnosticUpdateHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface ApiDiagnosticDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiDiagnosticListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiDiagnosticListByServiceNextResponse = DiagnosticCollection; /** Optional parameters. */ export interface ApiIssueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Expand the comment attachments. */ - expandCommentsAttachments?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Expand the comment attachments. */ + expandCommentsAttachments?: boolean; } /** Contains response data for the listByService operation. */ @@ -8174,15 +8174,15 @@ export type ApiIssueListByServiceResponse = IssueCollection; /** Optional parameters. */ export interface ApiIssueGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiIssueGetEntityTagResponse = ApiIssueGetEntityTagHeaders; /** Optional parameters. */ export interface ApiIssueGetOptionalParams extends coreClient.OperationOptions { - /** Expand the comment attachments. */ - expandCommentsAttachments?: boolean; + /** Expand the comment attachments. */ + expandCommentsAttachments?: boolean; } /** Contains response data for the get operation. */ @@ -8190,42 +8190,42 @@ export type ApiIssueGetResponse = ApiIssueGetHeaders & IssueContract; /** Optional parameters. */ export interface ApiIssueCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiIssueCreateOrUpdateResponse = ApiIssueCreateOrUpdateHeaders & - IssueContract; + IssueContract; /** Optional parameters. */ export interface ApiIssueUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiIssueUpdateResponse = ApiIssueUpdateHeaders & IssueContract; /** Optional parameters. */ export interface ApiIssueDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiIssueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiIssueListByServiceNextResponse = IssueCollection; /** Optional parameters. */ export interface ApiIssueCommentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8233,50 +8233,50 @@ export type ApiIssueCommentListByServiceResponse = IssueCommentCollection; /** Optional parameters. */ export interface ApiIssueCommentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiIssueCommentGetEntityTagResponse = ApiIssueCommentGetEntityTagHeaders; /** Optional parameters. */ export interface ApiIssueCommentGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiIssueCommentGetResponse = ApiIssueCommentGetHeaders & - IssueCommentContract; + IssueCommentContract; /** Optional parameters. */ export interface ApiIssueCommentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiIssueCommentCreateOrUpdateResponse = ApiIssueCommentCreateOrUpdateHeaders & - IssueCommentContract; + IssueCommentContract; /** Optional parameters. */ export interface ApiIssueCommentDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiIssueCommentListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiIssueCommentListByServiceNextResponse = IssueCommentCollection; /** Optional parameters. */ export interface ApiIssueAttachmentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8284,50 +8284,50 @@ export type ApiIssueAttachmentListByServiceResponse = IssueAttachmentCollection; /** Optional parameters. */ export interface ApiIssueAttachmentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiIssueAttachmentGetEntityTagResponse = ApiIssueAttachmentGetEntityTagHeaders; /** Optional parameters. */ export interface ApiIssueAttachmentGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiIssueAttachmentGetResponse = ApiIssueAttachmentGetHeaders & - IssueAttachmentContract; + IssueAttachmentContract; /** Optional parameters. */ export interface ApiIssueAttachmentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiIssueAttachmentCreateOrUpdateResponse = ApiIssueAttachmentCreateOrUpdateHeaders & - IssueAttachmentContract; + IssueAttachmentContract; /** Optional parameters. */ export interface ApiIssueAttachmentDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiIssueAttachmentListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiIssueAttachmentListByServiceNextResponse = IssueAttachmentCollection; /** Optional parameters. */ export interface ApiTagDescriptionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8335,52 +8335,52 @@ export type ApiTagDescriptionListByServiceResponse = TagDescriptionCollection; /** Optional parameters. */ export interface ApiTagDescriptionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiTagDescriptionGetEntityTagResponse = ApiTagDescriptionGetEntityTagHeaders; /** Optional parameters. */ export interface ApiTagDescriptionGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiTagDescriptionGetResponse = ApiTagDescriptionGetHeaders & - TagDescriptionContract; + TagDescriptionContract; /** Optional parameters. */ export interface ApiTagDescriptionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiTagDescriptionCreateOrUpdateResponse = ApiTagDescriptionCreateOrUpdateHeaders & - TagDescriptionContract; + TagDescriptionContract; /** Optional parameters. */ export interface ApiTagDescriptionDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiTagDescriptionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiTagDescriptionListByServiceNextResponse = TagDescriptionCollection; /** Optional parameters. */ export interface OperationListByTagsOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include not tagged Operations. */ - includeNotTaggedOperations?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include not tagged Operations. */ + includeNotTaggedOperations?: boolean; } /** Contains response data for the listByTags operation. */ @@ -8388,55 +8388,55 @@ export type OperationListByTagsResponse = TagResourceCollection; /** Optional parameters. */ export interface OperationListByTagsNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByTagsNext operation. */ export type OperationListByTagsNextResponse = TagResourceCollection; /** Optional parameters. */ export interface ApiWikiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiWikiGetEntityTagResponse = ApiWikiGetEntityTagHeaders; /** Optional parameters. */ -export interface ApiWikiGetOptionalParams extends coreClient.OperationOptions {} +export interface ApiWikiGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiWikiGetResponse = ApiWikiGetHeaders & WikiContract; /** Optional parameters. */ export interface ApiWikiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiWikiCreateOrUpdateResponse = ApiWikiCreateOrUpdateHeaders & - WikiContract; + WikiContract; /** Optional parameters. */ export interface ApiWikiUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiWikiUpdateResponse = ApiWikiUpdateHeaders & WikiContract; /** Optional parameters. */ export interface ApiWikiDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiWikisListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -8444,27 +8444,27 @@ export type ApiWikisListResponse = WikiCollection; /** Optional parameters. */ export interface ApiWikisListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ApiWikisListNextResponse = WikiCollection; /** Optional parameters. */ export interface ApiExportGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiExportGetResponse = ApiExportResult; /** Optional parameters. */ export interface ApiVersionSetListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8472,58 +8472,58 @@ export type ApiVersionSetListByServiceResponse = ApiVersionSetCollection; /** Optional parameters. */ export interface ApiVersionSetGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiVersionSetGetEntityTagResponse = ApiVersionSetGetEntityTagHeaders; /** Optional parameters. */ export interface ApiVersionSetGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiVersionSetGetResponse = ApiVersionSetGetHeaders & - ApiVersionSetContract; + ApiVersionSetContract; /** Optional parameters. */ export interface ApiVersionSetCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiVersionSetCreateOrUpdateResponse = ApiVersionSetCreateOrUpdateHeaders & - ApiVersionSetContract; + ApiVersionSetContract; /** Optional parameters. */ export interface ApiVersionSetUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiVersionSetUpdateResponse = ApiVersionSetUpdateHeaders & - ApiVersionSetContract; + ApiVersionSetContract; /** Optional parameters. */ export interface ApiVersionSetDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiVersionSetListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiVersionSetListByServiceNextResponse = ApiVersionSetCollection; /** Optional parameters. */ export interface AuthorizationServerListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8531,66 +8531,66 @@ export type AuthorizationServerListByServiceResponse = AuthorizationServerCollec /** Optional parameters. */ export interface AuthorizationServerGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type AuthorizationServerGetEntityTagResponse = AuthorizationServerGetEntityTagHeaders; /** Optional parameters. */ export interface AuthorizationServerGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type AuthorizationServerGetResponse = AuthorizationServerGetHeaders & - AuthorizationServerContract; + AuthorizationServerContract; /** Optional parameters. */ export interface AuthorizationServerCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type AuthorizationServerCreateOrUpdateResponse = AuthorizationServerCreateOrUpdateHeaders & - AuthorizationServerContract; + AuthorizationServerContract; /** Optional parameters. */ export interface AuthorizationServerUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type AuthorizationServerUpdateResponse = AuthorizationServerUpdateHeaders & - AuthorizationServerContract; + AuthorizationServerContract; /** Optional parameters. */ export interface AuthorizationServerDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface AuthorizationServerListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type AuthorizationServerListSecretsResponse = AuthorizationServerListSecretsHeaders & - AuthorizationServerSecretsContract; + AuthorizationServerSecretsContract; /** Optional parameters. */ export interface AuthorizationServerListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type AuthorizationServerListByServiceNextResponse = AuthorizationServerCollection; /** Optional parameters. */ export interface AuthorizationProviderListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8598,43 +8598,43 @@ export type AuthorizationProviderListByServiceResponse = AuthorizationProviderCo /** Optional parameters. */ export interface AuthorizationProviderGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type AuthorizationProviderGetResponse = AuthorizationProviderGetHeaders & - AuthorizationProviderContract; + AuthorizationProviderContract; /** Optional parameters. */ export interface AuthorizationProviderCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type AuthorizationProviderCreateOrUpdateResponse = AuthorizationProviderCreateOrUpdateHeaders & - AuthorizationProviderContract; + AuthorizationProviderContract; /** Optional parameters. */ export interface AuthorizationProviderDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface AuthorizationProviderListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type AuthorizationProviderListByServiceNextResponse = AuthorizationProviderCollection; /** Optional parameters. */ export interface AuthorizationListByAuthorizationProviderOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByAuthorizationProvider operation. */ @@ -8642,58 +8642,58 @@ export type AuthorizationListByAuthorizationProviderResponse = AuthorizationColl /** Optional parameters. */ export interface AuthorizationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type AuthorizationGetResponse = AuthorizationGetHeaders & - AuthorizationContract; + AuthorizationContract; /** Optional parameters. */ export interface AuthorizationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type AuthorizationCreateOrUpdateResponse = AuthorizationCreateOrUpdateHeaders & - AuthorizationContract; + AuthorizationContract; /** Optional parameters. */ export interface AuthorizationDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface AuthorizationConfirmConsentCodeOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the confirmConsentCode operation. */ export type AuthorizationConfirmConsentCodeResponse = AuthorizationConfirmConsentCodeHeaders; /** Optional parameters. */ export interface AuthorizationListByAuthorizationProviderNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByAuthorizationProviderNext operation. */ export type AuthorizationListByAuthorizationProviderNextResponse = AuthorizationCollection; /** Optional parameters. */ export interface AuthorizationLoginLinksPostOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the post operation. */ export type AuthorizationLoginLinksPostResponse = AuthorizationLoginLinksPostHeaders & - AuthorizationLoginResponseContract; + AuthorizationLoginResponseContract; /** Optional parameters. */ export interface AuthorizationAccessPolicyListByAuthorizationOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByAuthorization operation. */ @@ -8701,43 +8701,43 @@ export type AuthorizationAccessPolicyListByAuthorizationResponse = Authorization /** Optional parameters. */ export interface AuthorizationAccessPolicyGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type AuthorizationAccessPolicyGetResponse = AuthorizationAccessPolicyGetHeaders & - AuthorizationAccessPolicyContract; + AuthorizationAccessPolicyContract; /** Optional parameters. */ export interface AuthorizationAccessPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type AuthorizationAccessPolicyCreateOrUpdateResponse = AuthorizationAccessPolicyCreateOrUpdateHeaders & - AuthorizationAccessPolicyContract; + AuthorizationAccessPolicyContract; /** Optional parameters. */ export interface AuthorizationAccessPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface AuthorizationAccessPolicyListByAuthorizationNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByAuthorizationNext operation. */ export type AuthorizationAccessPolicyListByAuthorizationNextResponse = AuthorizationAccessPolicyCollection; /** Optional parameters. */ export interface BackendListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8745,60 +8745,60 @@ export type BackendListByServiceResponse = BackendCollection; /** Optional parameters. */ export interface BackendGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type BackendGetEntityTagResponse = BackendGetEntityTagHeaders; /** Optional parameters. */ -export interface BackendGetOptionalParams extends coreClient.OperationOptions {} +export interface BackendGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type BackendGetResponse = BackendGetHeaders & BackendContract; /** Optional parameters. */ export interface BackendCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type BackendCreateOrUpdateResponse = BackendCreateOrUpdateHeaders & - BackendContract; + BackendContract; /** Optional parameters. */ export interface BackendUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type BackendUpdateResponse = BackendUpdateHeaders & BackendContract; /** Optional parameters. */ export interface BackendDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface BackendReconnectOptionalParams - extends coreClient.OperationOptions { - /** Reconnect request parameters. */ - parameters?: BackendReconnectContract; + extends coreClient.OperationOptions { + /** Reconnect request parameters. */ + parameters?: BackendReconnectContract; } /** Optional parameters. */ export interface BackendListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type BackendListByServiceNextResponse = BackendCollection; /** Optional parameters. */ export interface CacheListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8806,57 +8806,57 @@ export type CacheListByServiceResponse = CacheCollection; /** Optional parameters. */ export interface CacheGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type CacheGetEntityTagResponse = CacheGetEntityTagHeaders; /** Optional parameters. */ -export interface CacheGetOptionalParams extends coreClient.OperationOptions {} +export interface CacheGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type CacheGetResponse = CacheGetHeaders & CacheContract; /** Optional parameters. */ export interface CacheCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type CacheCreateOrUpdateResponse = CacheCreateOrUpdateHeaders & - CacheContract; + CacheContract; /** Optional parameters. */ export interface CacheUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type CacheUpdateResponse = CacheUpdateHeaders & CacheContract; /** Optional parameters. */ export interface CacheDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface CacheListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type CacheListByServiceNextResponse = CacheCollection; /** Optional parameters. */ export interface CertificateListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** When set to true, the response contains only certificates entities which failed refresh. */ - isKeyVaultRefreshFailed?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** When set to true, the response contains only certificates entities which failed refresh. */ + isKeyVaultRefreshFailed?: boolean; } /** Contains response data for the listByService operation. */ @@ -8864,56 +8864,56 @@ export type CertificateListByServiceResponse = CertificateCollection; /** Optional parameters. */ export interface CertificateGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type CertificateGetEntityTagResponse = CertificateGetEntityTagHeaders; /** Optional parameters. */ export interface CertificateGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type CertificateGetResponse = CertificateGetHeaders & - CertificateContract; + CertificateContract; /** Optional parameters. */ export interface CertificateCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type CertificateCreateOrUpdateResponse = CertificateCreateOrUpdateHeaders & - CertificateContract; + CertificateContract; /** Optional parameters. */ export interface CertificateDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface CertificateRefreshSecretOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the refreshSecret operation. */ export type CertificateRefreshSecretResponse = CertificateRefreshSecretHeaders & - CertificateContract; + CertificateContract; /** Optional parameters. */ export interface CertificateListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type CertificateListByServiceNextResponse = CertificateCollection; /** Optional parameters. */ export interface PerformConnectivityCheckAsyncOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the performConnectivityCheckAsync operation. */ @@ -8921,150 +8921,150 @@ export type PerformConnectivityCheckAsyncResponse = ConnectivityCheckResponse; /** Optional parameters. */ export interface ContentTypeListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type ContentTypeListByServiceResponse = ContentTypeCollection; /** Optional parameters. */ export interface ContentTypeGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ContentTypeGetResponse = ContentTypeGetHeaders & - ContentTypeContract; + ContentTypeContract; /** Optional parameters. */ export interface ContentTypeCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ContentTypeCreateOrUpdateResponse = ContentTypeCreateOrUpdateHeaders & - ContentTypeContract; + ContentTypeContract; /** Optional parameters. */ export interface ContentTypeDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ContentTypeListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ContentTypeListByServiceNextResponse = ContentTypeCollection; /** Optional parameters. */ export interface ContentItemListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type ContentItemListByServiceResponse = ContentItemCollection; /** Optional parameters. */ export interface ContentItemGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ContentItemGetEntityTagResponse = ContentItemGetEntityTagHeaders; /** Optional parameters. */ export interface ContentItemGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ContentItemGetResponse = ContentItemGetHeaders & - ContentItemContract; + ContentItemContract; /** Optional parameters. */ export interface ContentItemCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ContentItemCreateOrUpdateResponse = ContentItemCreateOrUpdateHeaders & - ContentItemContract; + ContentItemContract; /** Optional parameters. */ export interface ContentItemDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ContentItemListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ContentItemListByServiceNextResponse = ContentItemCollection; /** Optional parameters. */ export interface DeletedServicesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listBySubscription operation. */ export type DeletedServicesListBySubscriptionResponse = DeletedServicesCollection; /** Optional parameters. */ export interface DeletedServicesGetByNameOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByName operation. */ export type DeletedServicesGetByNameResponse = DeletedServiceContract; /** Optional parameters. */ export interface DeletedServicesPurgeOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Optional parameters. */ export interface DeletedServicesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listBySubscriptionNext operation. */ export type DeletedServicesListBySubscriptionNextResponse = DeletedServicesCollection; /** Optional parameters. */ export interface ApiManagementOperationsListOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the list operation. */ export type ApiManagementOperationsListResponse = OperationListResult; /** Optional parameters. */ export interface ApiManagementOperationsListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ApiManagementOperationsListNextResponse = OperationListResult; /** Optional parameters. */ export interface ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listAvailableServiceSkus operation. */ export type ApiManagementServiceSkusListAvailableServiceSkusResponse = ResourceSkuResults; /** Optional parameters. */ export interface ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listAvailableServiceSkusNext operation. */ export type ApiManagementServiceSkusListAvailableServiceSkusNextResponse = ResourceSkuResults; /** Optional parameters. */ export interface ApiManagementServiceRestoreOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the restore operation. */ @@ -9072,11 +9072,11 @@ export type ApiManagementServiceRestoreResponse = ApiManagementServiceResource; /** Optional parameters. */ export interface ApiManagementServiceBackupOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the backup operation. */ @@ -9084,11 +9084,11 @@ export type ApiManagementServiceBackupResponse = ApiManagementServiceResource; /** Optional parameters. */ export interface ApiManagementServiceCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -9096,11 +9096,11 @@ export type ApiManagementServiceCreateOrUpdateResponse = ApiManagementServiceRes /** Optional parameters. */ export interface ApiManagementServiceUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the update operation. */ @@ -9108,27 +9108,27 @@ export type ApiManagementServiceUpdateResponse = ApiManagementServiceResource; /** Optional parameters. */ export interface ApiManagementServiceGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiManagementServiceGetResponse = ApiManagementServiceResource; /** Optional parameters. */ export interface ApiManagementServiceDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Optional parameters. */ export interface ApiManagementServiceMigrateToStv2OptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the migrateToStv2 operation. */ @@ -9136,48 +9136,48 @@ export type ApiManagementServiceMigrateToStv2Response = ApiManagementServiceReso /** Optional parameters. */ export interface ApiManagementServiceListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByResourceGroup operation. */ export type ApiManagementServiceListByResourceGroupResponse = ApiManagementServiceListResult; /** Optional parameters. */ export interface ApiManagementServiceListOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the list operation. */ export type ApiManagementServiceListResponse = ApiManagementServiceListResult; /** Optional parameters. */ export interface ApiManagementServiceGetSsoTokenOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getSsoToken operation. */ export type ApiManagementServiceGetSsoTokenResponse = ApiManagementServiceGetSsoTokenResult; /** Optional parameters. */ export interface ApiManagementServiceCheckNameAvailabilityOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkNameAvailability operation. */ export type ApiManagementServiceCheckNameAvailabilityResponse = ApiManagementServiceNameAvailabilityResult; /** Optional parameters. */ export interface ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getDomainOwnershipIdentifier operation. */ export type ApiManagementServiceGetDomainOwnershipIdentifierResponse = ApiManagementServiceGetDomainOwnershipIdentifierResult; /** Optional parameters. */ export interface ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - extends coreClient.OperationOptions { - /** Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. */ - parameters?: ApiManagementServiceApplyNetworkConfigurationParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. */ + parameters?: ApiManagementServiceApplyNetworkConfigurationParameters; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the applyNetworkConfigurationUpdates operation. */ @@ -9185,27 +9185,27 @@ export type ApiManagementServiceApplyNetworkConfigurationUpdatesResponse = ApiMa /** Optional parameters. */ export interface ApiManagementServiceListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByResourceGroupNext operation. */ export type ApiManagementServiceListByResourceGroupNextResponse = ApiManagementServiceListResult; /** Optional parameters. */ export interface ApiManagementServiceListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ApiManagementServiceListNextResponse = ApiManagementServiceListResult; /** Optional parameters. */ export interface DiagnosticListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9213,57 +9213,57 @@ export type DiagnosticListByServiceResponse = DiagnosticCollection; /** Optional parameters. */ export interface DiagnosticGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type DiagnosticGetEntityTagResponse = DiagnosticGetEntityTagHeaders; /** Optional parameters. */ export interface DiagnosticGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type DiagnosticGetResponse = DiagnosticGetHeaders & DiagnosticContract; /** Optional parameters. */ export interface DiagnosticCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type DiagnosticCreateOrUpdateResponse = DiagnosticCreateOrUpdateHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface DiagnosticUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type DiagnosticUpdateResponse = DiagnosticUpdateHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface DiagnosticDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface DiagnosticListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type DiagnosticListByServiceNextResponse = DiagnosticCollection; /** Optional parameters. */ export interface EmailTemplateListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9271,24 +9271,24 @@ export type EmailTemplateListByServiceResponse = EmailTemplateCollection; /** Optional parameters. */ export interface EmailTemplateGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type EmailTemplateGetEntityTagResponse = EmailTemplateGetEntityTagHeaders; /** Optional parameters. */ export interface EmailTemplateGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type EmailTemplateGetResponse = EmailTemplateGetHeaders & - EmailTemplateContract; + EmailTemplateContract; /** Optional parameters. */ export interface EmailTemplateCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -9296,32 +9296,32 @@ export type EmailTemplateCreateOrUpdateResponse = EmailTemplateContract; /** Optional parameters. */ export interface EmailTemplateUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type EmailTemplateUpdateResponse = EmailTemplateUpdateHeaders & - EmailTemplateContract; + EmailTemplateContract; /** Optional parameters. */ export interface EmailTemplateDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface EmailTemplateListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type EmailTemplateListByServiceNextResponse = EmailTemplateCollection; /** Optional parameters. */ export interface GatewayListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9329,74 +9329,74 @@ export type GatewayListByServiceResponse = GatewayCollection; /** Optional parameters. */ export interface GatewayGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GatewayGetEntityTagResponse = GatewayGetEntityTagHeaders; /** Optional parameters. */ -export interface GatewayGetOptionalParams extends coreClient.OperationOptions {} +export interface GatewayGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GatewayGetResponse = GatewayGetHeaders & GatewayContract; /** Optional parameters. */ export interface GatewayCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GatewayCreateOrUpdateResponse = GatewayCreateOrUpdateHeaders & - GatewayContract; + GatewayContract; /** Optional parameters. */ export interface GatewayUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type GatewayUpdateResponse = GatewayUpdateHeaders & GatewayContract; /** Optional parameters. */ export interface GatewayDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayListKeysOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listKeys operation. */ export type GatewayListKeysResponse = GatewayListKeysHeaders & - GatewayKeysContract; + GatewayKeysContract; /** Optional parameters. */ export interface GatewayRegenerateKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayGenerateTokenOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the generateToken operation. */ export type GatewayGenerateTokenResponse = GatewayTokenContract; /** Optional parameters. */ export interface GatewayListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GatewayListByServiceNextResponse = GatewayCollection; /** Optional parameters. */ export interface GatewayHostnameConfigurationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9404,50 +9404,50 @@ export type GatewayHostnameConfigurationListByServiceResponse = GatewayHostnameC /** Optional parameters. */ export interface GatewayHostnameConfigurationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GatewayHostnameConfigurationGetEntityTagResponse = GatewayHostnameConfigurationGetEntityTagHeaders; /** Optional parameters. */ export interface GatewayHostnameConfigurationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GatewayHostnameConfigurationGetResponse = GatewayHostnameConfigurationGetHeaders & - GatewayHostnameConfigurationContract; + GatewayHostnameConfigurationContract; /** Optional parameters. */ export interface GatewayHostnameConfigurationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GatewayHostnameConfigurationCreateOrUpdateResponse = GatewayHostnameConfigurationCreateOrUpdateHeaders & - GatewayHostnameConfigurationContract; + GatewayHostnameConfigurationContract; /** Optional parameters. */ export interface GatewayHostnameConfigurationDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayHostnameConfigurationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GatewayHostnameConfigurationListByServiceNextResponse = GatewayHostnameConfigurationCollection; /** Optional parameters. */ export interface GatewayApiListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9455,16 +9455,16 @@ export type GatewayApiListByServiceResponse = ApiCollection; /** Optional parameters. */ export interface GatewayApiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GatewayApiGetEntityTagResponse = GatewayApiGetEntityTagHeaders; /** Optional parameters. */ export interface GatewayApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Association entity details. */ - parameters?: AssociationContract; + extends coreClient.OperationOptions { + /** Association entity details. */ + parameters?: AssociationContract; } /** Contains response data for the createOrUpdate operation. */ @@ -9472,24 +9472,24 @@ export type GatewayApiCreateOrUpdateResponse = ApiContract; /** Optional parameters. */ export interface GatewayApiDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayApiListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GatewayApiListByServiceNextResponse = ApiCollection; /** Optional parameters. */ export interface GatewayCertificateAuthorityListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9497,50 +9497,50 @@ export type GatewayCertificateAuthorityListByServiceResponse = GatewayCertificat /** Optional parameters. */ export interface GatewayCertificateAuthorityGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GatewayCertificateAuthorityGetEntityTagResponse = GatewayCertificateAuthorityGetEntityTagHeaders; /** Optional parameters. */ export interface GatewayCertificateAuthorityGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GatewayCertificateAuthorityGetResponse = GatewayCertificateAuthorityGetHeaders & - GatewayCertificateAuthorityContract; + GatewayCertificateAuthorityContract; /** Optional parameters. */ export interface GatewayCertificateAuthorityCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GatewayCertificateAuthorityCreateOrUpdateResponse = GatewayCertificateAuthorityCreateOrUpdateHeaders & - GatewayCertificateAuthorityContract; + GatewayCertificateAuthorityContract; /** Optional parameters. */ export interface GatewayCertificateAuthorityDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayCertificateAuthorityListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GatewayCertificateAuthorityListByServiceNextResponse = GatewayCertificateAuthorityCollection; /** Optional parameters. */ export interface GroupListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| externalId | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| externalId | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9548,55 +9548,55 @@ export type GroupListByServiceResponse = GroupCollection; /** Optional parameters. */ export interface GroupGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GroupGetEntityTagResponse = GroupGetEntityTagHeaders; /** Optional parameters. */ -export interface GroupGetOptionalParams extends coreClient.OperationOptions {} +export interface GroupGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GroupGetResponse = GroupGetHeaders & GroupContract; /** Optional parameters. */ export interface GroupCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GroupCreateOrUpdateResponse = GroupCreateOrUpdateHeaders & - GroupContract; + GroupContract; /** Optional parameters. */ export interface GroupUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type GroupUpdateResponse = GroupUpdateHeaders & GroupContract; /** Optional parameters. */ export interface GroupDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GroupListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GroupListByServiceNextResponse = GroupCollection; /** Optional parameters. */ export interface GroupUserListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -9604,127 +9604,127 @@ export type GroupUserListResponse = UserCollection; /** Optional parameters. */ export interface GroupUserCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type GroupUserCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface GroupUserCreateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the create operation. */ export type GroupUserCreateResponse = UserContract; /** Optional parameters. */ export interface GroupUserDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GroupUserListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type GroupUserListNextResponse = UserCollection; /** Optional parameters. */ export interface IdentityProviderListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type IdentityProviderListByServiceResponse = IdentityProviderList; /** Optional parameters. */ export interface IdentityProviderGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type IdentityProviderGetEntityTagResponse = IdentityProviderGetEntityTagHeaders; /** Optional parameters. */ export interface IdentityProviderGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type IdentityProviderGetResponse = IdentityProviderGetHeaders & - IdentityProviderContract; + IdentityProviderContract; /** Optional parameters. */ export interface IdentityProviderCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type IdentityProviderCreateOrUpdateResponse = IdentityProviderCreateOrUpdateHeaders & - IdentityProviderContract; + IdentityProviderContract; /** Optional parameters. */ export interface IdentityProviderUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type IdentityProviderUpdateResponse = IdentityProviderUpdateHeaders & - IdentityProviderContract; + IdentityProviderContract; /** Optional parameters. */ export interface IdentityProviderDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface IdentityProviderListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type IdentityProviderListSecretsResponse = IdentityProviderListSecretsHeaders & - ClientSecretContract; + ClientSecretContract; /** Optional parameters. */ export interface IdentityProviderListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type IdentityProviderListByServiceNextResponse = IdentityProviderList; /** Optional parameters. */ export interface IssueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ export type IssueListByServiceResponse = IssueCollection; /** Optional parameters. */ -export interface IssueGetOptionalParams extends coreClient.OperationOptions {} +export interface IssueGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type IssueGetResponse = IssueGetHeaders & IssueContract; /** Optional parameters. */ export interface IssueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type IssueListByServiceNextResponse = IssueCollection; /** Optional parameters. */ export interface LoggerListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9732,57 +9732,57 @@ export type LoggerListByServiceResponse = LoggerCollection; /** Optional parameters. */ export interface LoggerGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type LoggerGetEntityTagResponse = LoggerGetEntityTagHeaders; /** Optional parameters. */ -export interface LoggerGetOptionalParams extends coreClient.OperationOptions {} +export interface LoggerGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type LoggerGetResponse = LoggerGetHeaders & LoggerContract; /** Optional parameters. */ export interface LoggerCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type LoggerCreateOrUpdateResponse = LoggerCreateOrUpdateHeaders & - LoggerContract; + LoggerContract; /** Optional parameters. */ export interface LoggerUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type LoggerUpdateResponse = LoggerUpdateHeaders & LoggerContract; /** Optional parameters. */ export interface LoggerDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface LoggerListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type LoggerListByServiceNextResponse = LoggerCollection; /** Optional parameters. */ export interface NamedValueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** When set to true, the response contains only named value entities which failed refresh. */ - isKeyVaultRefreshFailed?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** When set to true, the response contains only named value entities which failed refresh. */ + isKeyVaultRefreshFailed?: boolean; } /** Contains response data for the listByService operation. */ @@ -9790,99 +9790,99 @@ export type NamedValueListByServiceResponse = NamedValueCollection; /** Optional parameters. */ export interface NamedValueGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type NamedValueGetEntityTagResponse = NamedValueGetEntityTagHeaders; /** Optional parameters. */ export interface NamedValueGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type NamedValueGetResponse = NamedValueGetHeaders & NamedValueContract; /** Optional parameters. */ export interface NamedValueCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the createOrUpdate operation. */ export type NamedValueCreateOrUpdateResponse = NamedValueCreateOrUpdateHeaders & - NamedValueContract; + NamedValueContract; /** Optional parameters. */ export interface NamedValueUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the update operation. */ export type NamedValueUpdateResponse = NamedValueUpdateHeaders & - NamedValueContract; + NamedValueContract; /** Optional parameters. */ export interface NamedValueDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface NamedValueListValueOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listValue operation. */ export type NamedValueListValueResponse = NamedValueListValueHeaders & - NamedValueSecretContract; + NamedValueSecretContract; /** Optional parameters. */ export interface NamedValueRefreshSecretOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the refreshSecret operation. */ export type NamedValueRefreshSecretResponse = NamedValueRefreshSecretHeaders & - NamedValueContract; + NamedValueContract; /** Optional parameters. */ export interface NamedValueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type NamedValueListByServiceNextResponse = NamedValueCollection; /** Optional parameters. */ export interface NetworkStatusListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type NetworkStatusListByServiceResponse = NetworkStatusContractByLocation[]; /** Optional parameters. */ export interface NetworkStatusListByLocationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByLocation operation. */ export type NetworkStatusListByLocationResponse = NetworkStatusContract; /** Optional parameters. */ export interface NotificationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9890,16 +9890,16 @@ export type NotificationListByServiceResponse = NotificationCollection; /** Optional parameters. */ export interface NotificationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type NotificationGetResponse = NotificationContract; /** Optional parameters. */ export interface NotificationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -9907,74 +9907,74 @@ export type NotificationCreateOrUpdateResponse = NotificationContract; /** Optional parameters. */ export interface NotificationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type NotificationListByServiceNextResponse = NotificationCollection; /** Optional parameters. */ export interface NotificationRecipientUserListByNotificationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByNotification operation. */ export type NotificationRecipientUserListByNotificationResponse = RecipientUserCollection; /** Optional parameters. */ export interface NotificationRecipientUserCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type NotificationRecipientUserCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface NotificationRecipientUserCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type NotificationRecipientUserCreateOrUpdateResponse = RecipientUserContract; /** Optional parameters. */ export interface NotificationRecipientUserDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface NotificationRecipientEmailListByNotificationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByNotification operation. */ export type NotificationRecipientEmailListByNotificationResponse = RecipientEmailCollection; /** Optional parameters. */ export interface NotificationRecipientEmailCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type NotificationRecipientEmailCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface NotificationRecipientEmailCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type NotificationRecipientEmailCreateOrUpdateResponse = RecipientEmailContract; /** Optional parameters. */ export interface NotificationRecipientEmailDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface OpenIdConnectProviderListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9982,82 +9982,82 @@ export type OpenIdConnectProviderListByServiceResponse = OpenIdConnectProviderCo /** Optional parameters. */ export interface OpenIdConnectProviderGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type OpenIdConnectProviderGetEntityTagResponse = OpenIdConnectProviderGetEntityTagHeaders; /** Optional parameters. */ export interface OpenIdConnectProviderGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type OpenIdConnectProviderGetResponse = OpenIdConnectProviderGetHeaders & - OpenidConnectProviderContract; + OpenidConnectProviderContract; /** Optional parameters. */ export interface OpenIdConnectProviderCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type OpenIdConnectProviderCreateOrUpdateResponse = OpenIdConnectProviderCreateOrUpdateHeaders & - OpenidConnectProviderContract; + OpenidConnectProviderContract; /** Optional parameters. */ export interface OpenIdConnectProviderUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type OpenIdConnectProviderUpdateResponse = OpenIdConnectProviderUpdateHeaders & - OpenidConnectProviderContract; + OpenidConnectProviderContract; /** Optional parameters. */ export interface OpenIdConnectProviderDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface OpenIdConnectProviderListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type OpenIdConnectProviderListSecretsResponse = OpenIdConnectProviderListSecretsHeaders & - ClientSecretContract; + ClientSecretContract; /** Optional parameters. */ export interface OpenIdConnectProviderListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type OpenIdConnectProviderListByServiceNextResponse = OpenIdConnectProviderCollection; /** Optional parameters. */ export interface OutboundNetworkDependenciesEndpointsListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type OutboundNetworkDependenciesEndpointsListByServiceResponse = OutboundEnvironmentEndpointList; /** Optional parameters. */ export interface PolicyListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type PolicyListByServiceResponse = PolicyCollection; /** Optional parameters. */ export interface PolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type PolicyGetEntityTagResponse = PolicyGetEntityTagHeaders; /** Optional parameters. */ export interface PolicyGetOptionalParams extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ @@ -10065,24 +10065,24 @@ export type PolicyGetResponse = PolicyGetHeaders & PolicyContract; /** Optional parameters. */ export interface PolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type PolicyCreateOrUpdateResponse = PolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface PolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface PolicyDescriptionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Policy scope. */ - scope?: PolicyScopeContract; + extends coreClient.OperationOptions { + /** Policy scope. */ + scope?: PolicyScopeContract; } /** Contains response data for the listByService operation. */ @@ -10090,15 +10090,15 @@ export type PolicyDescriptionListByServiceResponse = PolicyDescriptionCollection /** Optional parameters. */ export interface PolicyFragmentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByService operation. */ @@ -10106,48 +10106,48 @@ export type PolicyFragmentListByServiceResponse = PolicyFragmentCollection; /** Optional parameters. */ export interface PolicyFragmentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type PolicyFragmentGetEntityTagResponse = PolicyFragmentGetEntityTagHeaders; /** Optional parameters. */ export interface PolicyFragmentGetOptionalParams - extends coreClient.OperationOptions { - /** Policy fragment content format. */ - format?: PolicyFragmentContentFormat; + extends coreClient.OperationOptions { + /** Policy fragment content format. */ + format?: PolicyFragmentContentFormat; } /** Contains response data for the get operation. */ export type PolicyFragmentGetResponse = PolicyFragmentGetHeaders & - PolicyFragmentContract; + PolicyFragmentContract; /** Optional parameters. */ export interface PolicyFragmentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the createOrUpdate operation. */ export type PolicyFragmentCreateOrUpdateResponse = PolicyFragmentCreateOrUpdateHeaders & - PolicyFragmentContract; + PolicyFragmentContract; /** Optional parameters. */ export interface PolicyFragmentDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface PolicyFragmentListReferencesOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listReferences operation. */ @@ -10155,57 +10155,57 @@ export type PolicyFragmentListReferencesResponse = ResourceCollection; /** Optional parameters. */ export interface PortalConfigListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type PortalConfigListByServiceResponse = PortalConfigCollection; /** Optional parameters. */ export interface PortalConfigGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type PortalConfigGetEntityTagResponse = PortalConfigGetEntityTagHeaders; /** Optional parameters. */ export interface PortalConfigGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type PortalConfigGetResponse = PortalConfigGetHeaders & - PortalConfigContract; + PortalConfigContract; /** Optional parameters. */ export interface PortalConfigUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type PortalConfigUpdateResponse = PortalConfigContract; /** Optional parameters. */ export interface PortalConfigCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type PortalConfigCreateOrUpdateResponse = PortalConfigContract; /** Optional parameters. */ export interface PortalRevisionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** - * | Field | Supported operators | Supported functions | - * |-------------|------------------------|-----------------------------------| - * - * |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * |isCurrent | eq, ne | | - * - */ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** + * | Field | Supported operators | Supported functions | + * |-------------|------------------------|-----------------------------------| + * + * |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + * |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + * |isCurrent | eq, ne | | + * + */ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -10213,83 +10213,83 @@ export type PortalRevisionListByServiceResponse = PortalRevisionCollection; /** Optional parameters. */ export interface PortalRevisionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type PortalRevisionGetEntityTagResponse = PortalRevisionGetEntityTagHeaders; /** Optional parameters. */ export interface PortalRevisionGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type PortalRevisionGetResponse = PortalRevisionGetHeaders & - PortalRevisionContract; + PortalRevisionContract; /** Optional parameters. */ export interface PortalRevisionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the createOrUpdate operation. */ export type PortalRevisionCreateOrUpdateResponse = PortalRevisionCreateOrUpdateHeaders & - PortalRevisionContract; + PortalRevisionContract; /** Optional parameters. */ export interface PortalRevisionUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the update operation. */ export type PortalRevisionUpdateResponse = PortalRevisionUpdateHeaders & - PortalRevisionContract; + PortalRevisionContract; /** Optional parameters. */ export interface PortalRevisionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type PortalRevisionListByServiceNextResponse = PortalRevisionCollection; /** Optional parameters. */ export interface PortalSettingsListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type PortalSettingsListByServiceResponse = PortalSettingsCollection; /** Optional parameters. */ export interface SignInSettingsGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type SignInSettingsGetEntityTagResponse = SignInSettingsGetEntityTagHeaders; /** Optional parameters. */ export interface SignInSettingsGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type SignInSettingsGetResponse = SignInSettingsGetHeaders & - PortalSigninSettings; + PortalSigninSettings; /** Optional parameters. */ export interface SignInSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SignInSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -10297,28 +10297,28 @@ export type SignInSettingsCreateOrUpdateResponse = PortalSigninSettings; /** Optional parameters. */ export interface SignUpSettingsGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type SignUpSettingsGetEntityTagResponse = SignUpSettingsGetEntityTagHeaders; /** Optional parameters. */ export interface SignUpSettingsGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type SignUpSettingsGetResponse = SignUpSettingsGetHeaders & - PortalSignupSettings; + PortalSignupSettings; /** Optional parameters. */ export interface SignUpSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SignUpSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -10326,28 +10326,28 @@ export type SignUpSettingsCreateOrUpdateResponse = PortalSignupSettings; /** Optional parameters. */ export interface DelegationSettingsGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type DelegationSettingsGetEntityTagResponse = DelegationSettingsGetEntityTagHeaders; /** Optional parameters. */ export interface DelegationSettingsGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type DelegationSettingsGetResponse = DelegationSettingsGetHeaders & - PortalDelegationSettings; + PortalDelegationSettings; /** Optional parameters. */ export interface DelegationSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface DelegationSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -10355,32 +10355,32 @@ export type DelegationSettingsCreateOrUpdateResponse = PortalDelegationSettings; /** Optional parameters. */ export interface DelegationSettingsListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type DelegationSettingsListSecretsResponse = PortalSettingValidationKeyContract; /** Optional parameters. */ export interface PrivateEndpointConnectionListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type PrivateEndpointConnectionListByServiceResponse = PrivateEndpointConnectionListResult; /** Optional parameters. */ export interface PrivateEndpointConnectionGetByNameOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByName operation. */ export type PrivateEndpointConnectionGetByNameResponse = PrivateEndpointConnection; /** Optional parameters. */ export interface PrivateEndpointConnectionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -10388,40 +10388,40 @@ export type PrivateEndpointConnectionCreateOrUpdateResponse = PrivateEndpointCon /** Optional parameters. */ export interface PrivateEndpointConnectionDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Optional parameters. */ export interface PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listPrivateLinkResources operation. */ export type PrivateEndpointConnectionListPrivateLinkResourcesResponse = PrivateLinkResourceListResult; /** Optional parameters. */ export interface PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getPrivateLinkResource operation. */ export type PrivateEndpointConnectionGetPrivateLinkResourceResponse = PrivateLinkResource; /** Optional parameters. */ export interface ProductListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| groups | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Products which are part of a specific tag. */ - tags?: string; - /** When set to true, the response contains an array of groups that have visibility to the product. The default is false. */ - expandGroups?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| groups | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Products which are part of a specific tag. */ + tags?: string; + /** When set to true, the response contains an array of groups that have visibility to the product. The default is false. */ + expandGroups?: boolean; } /** Contains response data for the listByService operation. */ @@ -10429,53 +10429,53 @@ export type ProductListByServiceResponse = ProductCollection; /** Optional parameters. */ export interface ProductGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ProductGetEntityTagResponse = ProductGetEntityTagHeaders; /** Optional parameters. */ -export interface ProductGetOptionalParams extends coreClient.OperationOptions {} +export interface ProductGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ProductGetResponse = ProductGetHeaders & ProductContract; /** Optional parameters. */ export interface ProductCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ProductCreateOrUpdateResponse = ProductCreateOrUpdateHeaders & - ProductContract; + ProductContract; /** Optional parameters. */ export interface ProductUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ProductUpdateResponse = ProductUpdateHeaders & ProductContract; /** Optional parameters. */ export interface ProductDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delete existing subscriptions associated with the product or not. */ - deleteSubscriptions?: boolean; + extends coreClient.OperationOptions { + /** Delete existing subscriptions associated with the product or not. */ + deleteSubscriptions?: boolean; } /** Optional parameters. */ export interface ProductListByTagsOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include not tagged Products. */ - includeNotTaggedProducts?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include not tagged Products. */ + includeNotTaggedProducts?: boolean; } /** Contains response data for the listByTags operation. */ @@ -10483,27 +10483,27 @@ export type ProductListByTagsResponse = TagResourceCollection; /** Optional parameters. */ export interface ProductListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ProductListByServiceNextResponse = ProductCollection; /** Optional parameters. */ export interface ProductListByTagsNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByTagsNext operation. */ export type ProductListByTagsNextResponse = TagResourceCollection; /** Optional parameters. */ export interface ProductApiListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByProduct operation. */ @@ -10511,40 +10511,40 @@ export type ProductApiListByProductResponse = ApiCollection; /** Optional parameters. */ export interface ProductApiCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type ProductApiCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface ProductApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type ProductApiCreateOrUpdateResponse = ApiContract; /** Optional parameters. */ export interface ProductApiDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ProductApiListByProductNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProductNext operation. */ export type ProductApiListByProductNextResponse = ApiCollection; /** Optional parameters. */ export interface ProductGroupListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| description | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| description | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByProduct operation. */ @@ -10552,40 +10552,40 @@ export type ProductGroupListByProductResponse = GroupCollection; /** Optional parameters. */ export interface ProductGroupCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type ProductGroupCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface ProductGroupCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type ProductGroupCreateOrUpdateResponse = GroupContract; /** Optional parameters. */ export interface ProductGroupDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ProductGroupListByProductNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProductNext operation. */ export type ProductGroupListByProductNextResponse = GroupCollection; /** Optional parameters. */ export interface ProductSubscriptionsListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -10593,30 +10593,30 @@ export type ProductSubscriptionsListResponse = SubscriptionCollection; /** Optional parameters. */ export interface ProductSubscriptionsListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ProductSubscriptionsListNextResponse = SubscriptionCollection; /** Optional parameters. */ export interface ProductPolicyListByProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProduct operation. */ export type ProductPolicyListByProductResponse = PolicyCollection; /** Optional parameters. */ export interface ProductPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ProductPolicyGetEntityTagResponse = ProductPolicyGetEntityTagHeaders; /** Optional parameters. */ export interface ProductPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + extends coreClient.OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ @@ -10624,64 +10624,64 @@ export type ProductPolicyGetResponse = ProductPolicyGetHeaders & PolicyContract; /** Optional parameters. */ export interface ProductPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ProductPolicyCreateOrUpdateResponse = ProductPolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface ProductPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ProductWikiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ProductWikiGetEntityTagResponse = ProductWikiGetEntityTagHeaders; /** Optional parameters. */ export interface ProductWikiGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ProductWikiGetResponse = ProductWikiGetHeaders & WikiContract; /** Optional parameters. */ export interface ProductWikiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ProductWikiCreateOrUpdateResponse = ProductWikiCreateOrUpdateHeaders & - WikiContract; + WikiContract; /** Optional parameters. */ export interface ProductWikiUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ProductWikiUpdateResponse = ProductWikiUpdateHeaders & WikiContract; /** Optional parameters. */ export interface ProductWikiDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ProductWikisListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -10689,63 +10689,63 @@ export type ProductWikisListResponse = ProductWikisListHeaders & WikiCollection; /** Optional parameters. */ export interface ProductWikisListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ProductWikisListNextResponse = ProductWikisListNextHeaders & - WikiCollection; + WikiCollection; /** Optional parameters. */ export interface QuotaByCounterKeysListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type QuotaByCounterKeysListByServiceResponse = QuotaCounterCollection; /** Optional parameters. */ export interface QuotaByCounterKeysUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type QuotaByCounterKeysUpdateResponse = QuotaCounterCollection; /** Optional parameters. */ export interface QuotaByPeriodKeysGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type QuotaByPeriodKeysGetResponse = QuotaCounterContract; /** Optional parameters. */ export interface QuotaByPeriodKeysUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type QuotaByPeriodKeysUpdateResponse = QuotaCounterContract; /** Optional parameters. */ export interface RegionListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type RegionListByServiceResponse = RegionListResult; /** Optional parameters. */ export interface RegionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type RegionListByServiceNextResponse = RegionListResult; /** Optional parameters. */ export interface ReportsListByApiOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByApi operation. */ @@ -10753,13 +10753,13 @@ export type ReportsListByApiResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByUserOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByUser operation. */ @@ -10767,13 +10767,13 @@ export type ReportsListByUserResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByOperationOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByOperation operation. */ @@ -10781,13 +10781,13 @@ export type ReportsListByOperationResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByProductOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByProduct operation. */ @@ -10795,11 +10795,11 @@ export type ReportsListByProductResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByGeoOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByGeo operation. */ @@ -10807,13 +10807,13 @@ export type ReportsListByGeoResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listBySubscription operation. */ @@ -10821,13 +10821,13 @@ export type ReportsListBySubscriptionResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByTimeOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByTime operation. */ @@ -10835,11 +10835,11 @@ export type ReportsListByTimeResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByRequestOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByRequest operation. */ @@ -10847,62 +10847,62 @@ export type ReportsListByRequestResponse = RequestReportCollection; /** Optional parameters. */ export interface ReportsListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type ReportsListByApiNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByUserNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByUserNext operation. */ export type ReportsListByUserNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByOperationNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByOperationNext operation. */ export type ReportsListByOperationNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByProductNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProductNext operation. */ export type ReportsListByProductNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByGeoNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByGeoNext operation. */ export type ReportsListByGeoNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listBySubscriptionNext operation. */ export type ReportsListBySubscriptionNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByTimeNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByTimeNext operation. */ export type ReportsListByTimeNextResponse = ReportCollection; /** Optional parameters. */ export interface GlobalSchemaListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -10910,50 +10910,50 @@ export type GlobalSchemaListByServiceResponse = GlobalSchemaCollection; /** Optional parameters. */ export interface GlobalSchemaGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GlobalSchemaGetEntityTagResponse = GlobalSchemaGetEntityTagHeaders; /** Optional parameters. */ export interface GlobalSchemaGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GlobalSchemaGetResponse = GlobalSchemaGetHeaders & - GlobalSchemaContract; + GlobalSchemaContract; /** Optional parameters. */ export interface GlobalSchemaCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the createOrUpdate operation. */ export type GlobalSchemaCreateOrUpdateResponse = GlobalSchemaCreateOrUpdateHeaders & - GlobalSchemaContract; + GlobalSchemaContract; /** Optional parameters. */ export interface GlobalSchemaDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GlobalSchemaListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GlobalSchemaListByServiceNextResponse = GlobalSchemaCollection; /** Optional parameters. */ export interface TenantSettingsListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Not used */ - filter?: string; + extends coreClient.OperationOptions { + /** Not used */ + filter?: string; } /** Contains response data for the listByService operation. */ @@ -10961,42 +10961,42 @@ export type TenantSettingsListByServiceResponse = TenantSettingsCollection; /** Optional parameters. */ export interface TenantSettingsGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type TenantSettingsGetResponse = TenantSettingsGetHeaders & - TenantSettingsContract; + TenantSettingsContract; /** Optional parameters. */ export interface TenantSettingsListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type TenantSettingsListByServiceNextResponse = TenantSettingsCollection; /** Optional parameters. */ export interface ApiManagementSkusListOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the list operation. */ export type ApiManagementSkusListResponse = ApiManagementSkusResult; /** Optional parameters. */ export interface ApiManagementSkusListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ApiManagementSkusListNextResponse = ApiManagementSkusResult; /** Optional parameters. */ export interface SubscriptionListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -11004,91 +11004,91 @@ export type SubscriptionListResponse = SubscriptionCollection; /** Optional parameters. */ export interface SubscriptionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type SubscriptionGetEntityTagResponse = SubscriptionGetEntityTagHeaders; /** Optional parameters. */ export interface SubscriptionGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type SubscriptionGetResponse = SubscriptionGetHeaders & - SubscriptionContract; + SubscriptionContract; /** Optional parameters. */ export interface SubscriptionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** - * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription - */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ + notify?: boolean; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; } /** Contains response data for the createOrUpdate operation. */ export type SubscriptionCreateOrUpdateResponse = SubscriptionCreateOrUpdateHeaders & - SubscriptionContract; + SubscriptionContract; /** Optional parameters. */ export interface SubscriptionUpdateOptionalParams - extends coreClient.OperationOptions { - /** - * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription - */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; + extends coreClient.OperationOptions { + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ + notify?: boolean; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; } /** Contains response data for the update operation. */ export type SubscriptionUpdateResponse = SubscriptionUpdateHeaders & - SubscriptionContract; + SubscriptionContract; /** Optional parameters. */ export interface SubscriptionDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SubscriptionRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SubscriptionRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SubscriptionListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type SubscriptionListSecretsResponse = SubscriptionListSecretsHeaders & - SubscriptionKeysContract; + SubscriptionKeysContract; /** Optional parameters. */ export interface SubscriptionListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type SubscriptionListNextResponse = SubscriptionCollection; /** Optional parameters. */ export interface TagResourceListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -11096,16 +11096,16 @@ export type TagResourceListByServiceResponse = TagResourceCollection; /** Optional parameters. */ export interface TagResourceListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type TagResourceListByServiceNextResponse = TagResourceCollection; /** Optional parameters. */ export interface TenantAccessListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Not used */ - filter?: string; + extends coreClient.OperationOptions { + /** Not used */ + filter?: string; } /** Contains response data for the listByService operation. */ @@ -11113,73 +11113,73 @@ export type TenantAccessListByServiceResponse = AccessInformationCollection; /** Optional parameters. */ export interface TenantAccessGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type TenantAccessGetEntityTagResponse = TenantAccessGetEntityTagHeaders; /** Optional parameters. */ export interface TenantAccessGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type TenantAccessGetResponse = TenantAccessGetHeaders & - AccessInformationContract; + AccessInformationContract; /** Optional parameters. */ export interface TenantAccessCreateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the create operation. */ export type TenantAccessCreateResponse = TenantAccessCreateHeaders & - AccessInformationContract; + AccessInformationContract; /** Optional parameters. */ export interface TenantAccessUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type TenantAccessUpdateResponse = TenantAccessUpdateHeaders & - AccessInformationContract; + AccessInformationContract; /** Optional parameters. */ export interface TenantAccessRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TenantAccessRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TenantAccessListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type TenantAccessListSecretsResponse = TenantAccessListSecretsHeaders & - AccessInformationSecretsContract; + AccessInformationSecretsContract; /** Optional parameters. */ export interface TenantAccessListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type TenantAccessListByServiceNextResponse = AccessInformationCollection; /** Optional parameters. */ export interface TenantAccessGitRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TenantAccessGitRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TenantConfigurationDeployOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the deploy operation. */ @@ -11187,11 +11187,11 @@ export type TenantConfigurationDeployResponse = OperationResultContract; /** Optional parameters. */ export interface TenantConfigurationSaveOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the save operation. */ @@ -11199,11 +11199,11 @@ export type TenantConfigurationSaveResponse = OperationResultContract; /** Optional parameters. */ export interface TenantConfigurationValidateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the validate operation. */ @@ -11211,22 +11211,22 @@ export type TenantConfigurationValidateResponse = OperationResultContract; /** Optional parameters. */ export interface TenantConfigurationGetSyncStateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getSyncState operation. */ export type TenantConfigurationGetSyncStateResponse = TenantConfigurationSyncStateContract; /** Optional parameters. */ export interface UserListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| groups | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Detailed Group in response. */ - expandGroups?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| groups | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Detailed Group in response. */ + expandGroups?: boolean; } /** Contains response data for the listByService operation. */ @@ -11234,76 +11234,76 @@ export type UserListByServiceResponse = UserCollection; /** Optional parameters. */ export interface UserGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type UserGetEntityTagResponse = UserGetEntityTagHeaders; /** Optional parameters. */ -export interface UserGetOptionalParams extends coreClient.OperationOptions {} +export interface UserGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type UserGetResponse = UserGetHeaders & UserContract; /** Optional parameters. */ export interface UserCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Send an Email notification to the User. */ - notify?: boolean; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Send an Email notification to the User. */ + notify?: boolean; } /** Contains response data for the createOrUpdate operation. */ export type UserCreateOrUpdateResponse = UserCreateOrUpdateHeaders & - UserContract; + UserContract; /** Optional parameters. */ -export interface UserUpdateOptionalParams extends coreClient.OperationOptions {} +export interface UserUpdateOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type UserUpdateResponse = UserUpdateHeaders & UserContract; /** Optional parameters. */ export interface UserDeleteOptionalParams extends coreClient.OperationOptions { - /** Whether to delete user's subscription or not. */ - deleteSubscriptions?: boolean; - /** Send an Account Closed Email notification to the User. */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; + /** Whether to delete user's subscription or not. */ + deleteSubscriptions?: boolean; + /** Send an Account Closed Email notification to the User. */ + notify?: boolean; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; } /** Optional parameters. */ export interface UserGenerateSsoUrlOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the generateSsoUrl operation. */ export type UserGenerateSsoUrlResponse = GenerateSsoUrlResult; /** Optional parameters. */ export interface UserGetSharedAccessTokenOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getSharedAccessToken operation. */ export type UserGetSharedAccessTokenResponse = UserTokenResult; /** Optional parameters. */ export interface UserListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type UserListByServiceNextResponse = UserCollection; /** Optional parameters. */ export interface UserGroupListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -11311,20 +11311,20 @@ export type UserGroupListResponse = GroupCollection; /** Optional parameters. */ export interface UserGroupListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type UserGroupListNextResponse = GroupCollection; /** Optional parameters. */ export interface UserSubscriptionListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -11332,49 +11332,49 @@ export type UserSubscriptionListResponse = SubscriptionCollection; /** Optional parameters. */ export interface UserSubscriptionGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type UserSubscriptionGetResponse = UserSubscriptionGetHeaders & - SubscriptionContract; + SubscriptionContract; /** Optional parameters. */ export interface UserSubscriptionListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type UserSubscriptionListNextResponse = SubscriptionCollection; /** Optional parameters. */ export interface UserIdentitiesListOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the list operation. */ export type UserIdentitiesListResponse = UserIdentityCollection; /** Optional parameters. */ export interface UserIdentitiesListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type UserIdentitiesListNextResponse = UserIdentityCollection; /** Optional parameters. */ export interface UserConfirmationPasswordSendOptionalParams - extends coreClient.OperationOptions { - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; + extends coreClient.OperationOptions { + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; } /** Optional parameters. */ export interface DocumentationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -11382,56 +11382,56 @@ export type DocumentationListByServiceResponse = DocumentationCollection; /** Optional parameters. */ export interface DocumentationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type DocumentationGetEntityTagResponse = DocumentationGetEntityTagHeaders; /** Optional parameters. */ export interface DocumentationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type DocumentationGetResponse = DocumentationGetHeaders & - DocumentationContract; + DocumentationContract; /** Optional parameters. */ export interface DocumentationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type DocumentationCreateOrUpdateResponse = DocumentationCreateOrUpdateHeaders & - DocumentationContract; + DocumentationContract; /** Optional parameters. */ export interface DocumentationUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type DocumentationUpdateResponse = DocumentationUpdateHeaders & - DocumentationContract; + DocumentationContract; /** Optional parameters. */ export interface DocumentationDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface DocumentationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type DocumentationListByServiceNextResponse = DocumentationCollection; /** Optional parameters. */ export interface ApiManagementClientOptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; } diff --git a/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts b/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts index 8234e98b768a..90c58923a17d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts @@ -9,18900 +9,18900 @@ import * as coreClient from "@azure/core-client"; export const ApiCollection: coreClient.CompositeMapper = { - serializedName: "ApiCollection", - type: { - name: "Composite", - className: "ApiCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ApiContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiContract" + serializedName: "ApiCollection", + type: { + name: "Composite", + className: "ApiCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ApiContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ApiVersionSetContractDetails: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetContractDetails", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "versioningScheme", - xmlName: "versioningScheme", - type: { - name: "String" - } - }, - versionQueryName: { - serializedName: "versionQueryName", - xmlName: "versionQueryName", - type: { - name: "String" - } - }, - versionHeaderName: { - serializedName: "versionHeaderName", - xmlName: "versionHeaderName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetContractDetails", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "versioningScheme", + xmlName: "versioningScheme", + type: { + name: "String" + } + }, + versionQueryName: { + serializedName: "versionQueryName", + xmlName: "versionQueryName", + type: { + name: "String" + } + }, + versionHeaderName: { + serializedName: "versionHeaderName", + xmlName: "versionHeaderName", + type: { + name: "String" + } + } + } + } }; export const ApiEntityBaseContract: coreClient.CompositeMapper = { - serializedName: "ApiEntityBaseContract", - type: { - name: "Composite", - className: "ApiEntityBaseContract", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - authenticationSettings: { - serializedName: "authenticationSettings", - xmlName: "authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract" - } - }, - subscriptionKeyParameterNames: { - serializedName: "subscriptionKeyParameterNames", - xmlName: "subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract" - } - }, - apiType: { - serializedName: "type", - xmlName: "type", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "apiRevision", - xmlName: "apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - constraints: { - MaxLength: 100 - }, - serializedName: "apiVersion", - xmlName: "apiVersion", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "isCurrent", - xmlName: "isCurrent", - type: { - name: "Boolean" - } - }, - isOnline: { - serializedName: "isOnline", - readOnly: true, - xmlName: "isOnline", - type: { - name: "Boolean" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "apiRevisionDescription", - xmlName: "apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "apiVersionDescription", - xmlName: "apiVersionDescription", - type: { - name: "String" - } - }, - apiVersionSetId: { - serializedName: "apiVersionSetId", - xmlName: "apiVersionSetId", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "subscriptionRequired", - xmlName: "subscriptionRequired", - type: { - name: "Boolean" - } - }, - termsOfServiceUrl: { - serializedName: "termsOfServiceUrl", - xmlName: "termsOfServiceUrl", - type: { - name: "String" - } - }, - contact: { - serializedName: "contact", - xmlName: "contact", - type: { - name: "Composite", - className: "ApiContactInformation" - } - }, - license: { - serializedName: "license", - xmlName: "license", - type: { - name: "Composite", - className: "ApiLicenseInformation" - } - } - } - } + serializedName: "ApiEntityBaseContract", + type: { + name: "Composite", + className: "ApiEntityBaseContract", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + authenticationSettings: { + serializedName: "authenticationSettings", + xmlName: "authenticationSettings", + type: { + name: "Composite", + className: "AuthenticationSettingsContract" + } + }, + subscriptionKeyParameterNames: { + serializedName: "subscriptionKeyParameterNames", + xmlName: "subscriptionKeyParameterNames", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract" + } + }, + apiType: { + serializedName: "type", + xmlName: "type", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "apiRevision", + xmlName: "apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + constraints: { + MaxLength: 100 + }, + serializedName: "apiVersion", + xmlName: "apiVersion", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "isCurrent", + xmlName: "isCurrent", + type: { + name: "Boolean" + } + }, + isOnline: { + serializedName: "isOnline", + readOnly: true, + xmlName: "isOnline", + type: { + name: "Boolean" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "apiRevisionDescription", + xmlName: "apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "apiVersionDescription", + xmlName: "apiVersionDescription", + type: { + name: "String" + } + }, + apiVersionSetId: { + serializedName: "apiVersionSetId", + xmlName: "apiVersionSetId", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "subscriptionRequired", + xmlName: "subscriptionRequired", + type: { + name: "Boolean" + } + }, + termsOfServiceUrl: { + serializedName: "termsOfServiceUrl", + xmlName: "termsOfServiceUrl", + type: { + name: "String" + } + }, + contact: { + serializedName: "contact", + xmlName: "contact", + type: { + name: "Composite", + className: "ApiContactInformation" + } + }, + license: { + serializedName: "license", + xmlName: "license", + type: { + name: "Composite", + className: "ApiLicenseInformation" + } + } + } + } }; export const AuthenticationSettingsContract: coreClient.CompositeMapper = { - serializedName: "AuthenticationSettingsContract", - type: { - name: "Composite", - className: "AuthenticationSettingsContract", - modelProperties: { - oAuth2: { - serializedName: "oAuth2", - xmlName: "oAuth2", - type: { - name: "Composite", - className: "OAuth2AuthenticationSettingsContract" - } - }, - openid: { - serializedName: "openid", - xmlName: "openid", - type: { - name: "Composite", - className: "OpenIdAuthenticationSettingsContract" - } - }, - oAuth2AuthenticationSettings: { - serializedName: "oAuth2AuthenticationSettings", - xmlName: "oAuth2AuthenticationSettings", - xmlElementName: "OAuth2AuthenticationSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OAuth2AuthenticationSettingsContract" - } - } - } - }, - openidAuthenticationSettings: { - serializedName: "openidAuthenticationSettings", - xmlName: "openidAuthenticationSettings", - xmlElementName: "OpenIdAuthenticationSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OpenIdAuthenticationSettingsContract" + serializedName: "AuthenticationSettingsContract", + type: { + name: "Composite", + className: "AuthenticationSettingsContract", + modelProperties: { + oAuth2: { + serializedName: "oAuth2", + xmlName: "oAuth2", + type: { + name: "Composite", + className: "OAuth2AuthenticationSettingsContract" + } + }, + openid: { + serializedName: "openid", + xmlName: "openid", + type: { + name: "Composite", + className: "OpenIdAuthenticationSettingsContract" + } + }, + oAuth2AuthenticationSettings: { + serializedName: "oAuth2AuthenticationSettings", + xmlName: "oAuth2AuthenticationSettings", + xmlElementName: "OAuth2AuthenticationSettingsContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OAuth2AuthenticationSettingsContract" + } + } + } + }, + openidAuthenticationSettings: { + serializedName: "openidAuthenticationSettings", + xmlName: "openidAuthenticationSettings", + xmlElementName: "OpenIdAuthenticationSettingsContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OpenIdAuthenticationSettingsContract" + } + } + } } - } } - } } - } }; export const OAuth2AuthenticationSettingsContract: coreClient.CompositeMapper = { - serializedName: "OAuth2AuthenticationSettingsContract", - type: { - name: "Composite", - className: "OAuth2AuthenticationSettingsContract", - modelProperties: { - authorizationServerId: { - serializedName: "authorizationServerId", - xmlName: "authorizationServerId", - type: { - name: "String" - } - }, - scope: { - serializedName: "scope", - xmlName: "scope", - type: { - name: "String" + serializedName: "OAuth2AuthenticationSettingsContract", + type: { + name: "Composite", + className: "OAuth2AuthenticationSettingsContract", + modelProperties: { + authorizationServerId: { + serializedName: "authorizationServerId", + xmlName: "authorizationServerId", + type: { + name: "String" + } + }, + scope: { + serializedName: "scope", + xmlName: "scope", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdAuthenticationSettingsContract: coreClient.CompositeMapper = { - serializedName: "OpenIdAuthenticationSettingsContract", - type: { - name: "Composite", - className: "OpenIdAuthenticationSettingsContract", - modelProperties: { - openidProviderId: { - serializedName: "openidProviderId", - xmlName: "openidProviderId", - type: { - name: "String" - } - }, - bearerTokenSendingMethods: { - serializedName: "bearerTokenSendingMethods", - xmlName: "bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethods", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "OpenIdAuthenticationSettingsContract", + type: { + name: "Composite", + className: "OpenIdAuthenticationSettingsContract", + modelProperties: { + openidProviderId: { + serializedName: "openidProviderId", + xmlName: "openidProviderId", + type: { + name: "String" + } + }, + bearerTokenSendingMethods: { + serializedName: "bearerTokenSendingMethods", + xmlName: "bearerTokenSendingMethods", + xmlElementName: "BearerTokenSendingMethods", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const SubscriptionKeyParameterNamesContract: coreClient.CompositeMapper = { - serializedName: "SubscriptionKeyParameterNamesContract", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract", - modelProperties: { - header: { - serializedName: "header", - xmlName: "header", - type: { - name: "String" - } - }, - query: { - serializedName: "query", - xmlName: "query", - type: { - name: "String" + serializedName: "SubscriptionKeyParameterNamesContract", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract", + modelProperties: { + header: { + serializedName: "header", + xmlName: "header", + type: { + name: "String" + } + }, + query: { + serializedName: "query", + xmlName: "query", + type: { + name: "String" + } + } } - } } - } }; export const ApiContactInformation: coreClient.CompositeMapper = { - serializedName: "ApiContactInformation", - type: { - name: "Composite", - className: "ApiContactInformation", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - url: { - serializedName: "url", - xmlName: "url", - type: { - name: "String" - } - }, - email: { - serializedName: "email", - xmlName: "email", - type: { - name: "String" - } - } - } - } + serializedName: "ApiContactInformation", + type: { + name: "Composite", + className: "ApiContactInformation", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + xmlName: "url", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + xmlName: "email", + type: { + name: "String" + } + } + } + } }; export const ApiLicenseInformation: coreClient.CompositeMapper = { - serializedName: "ApiLicenseInformation", - type: { - name: "Composite", - className: "ApiLicenseInformation", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - url: { - serializedName: "url", - xmlName: "url", - type: { - name: "String" + serializedName: "ApiLicenseInformation", + type: { + name: "Composite", + className: "ApiLicenseInformation", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + xmlName: "url", + type: { + name: "String" + } + } } - } } - } }; export const Resource: coreClient.CompositeMapper = { - serializedName: "Resource", - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String" - } - } - } - } + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "String" + } + } + } + } }; export const ErrorResponse: coreClient.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - serializedName: "error.code", - xmlName: "error.code", - type: { - name: "String" - } - }, - message: { - serializedName: "error.message", - xmlName: "error.message", - type: { - name: "String" - } - }, - details: { - serializedName: "error.details", - xmlName: "error.details", - xmlElementName: "ErrorFieldContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorFieldContract" + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "error.code", + xmlName: "error.code", + type: { + name: "String" + } + }, + message: { + serializedName: "error.message", + xmlName: "error.message", + type: { + name: "String" + } + }, + details: { + serializedName: "error.details", + xmlName: "error.details", + xmlElementName: "ErrorFieldContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorFieldContract" + } + } + } } - } } - } } - } }; export const ErrorResponseBody: coreClient.CompositeMapper = { - serializedName: "ErrorResponseBody", - type: { - name: "Composite", - className: "ErrorResponseBody", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String" - } - }, - details: { - serializedName: "details", - xmlName: "details", - xmlElementName: "ErrorFieldContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorFieldContract" + serializedName: "ErrorResponseBody", + type: { + name: "Composite", + className: "ErrorResponseBody", + modelProperties: { + code: { + serializedName: "code", + xmlName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + xmlName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + xmlName: "details", + xmlElementName: "ErrorFieldContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorFieldContract" + } + } + } } - } } - } } - } }; export const ErrorFieldContract: coreClient.CompositeMapper = { - serializedName: "ErrorFieldContract", - type: { - name: "Composite", - className: "ErrorFieldContract", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String" - } - }, - target: { - serializedName: "target", - xmlName: "target", - type: { - name: "String" - } - } - } - } + serializedName: "ErrorFieldContract", + type: { + name: "Composite", + className: "ErrorFieldContract", + modelProperties: { + code: { + serializedName: "code", + xmlName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + xmlName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + xmlName: "target", + type: { + name: "String" + } + } + } + } }; export const ApiCreateOrUpdateParameter: coreClient.CompositeMapper = { - serializedName: "ApiCreateOrUpdateParameter", - type: { - name: "Composite", - className: "ApiCreateOrUpdateParameter", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authenticationSettings: { - serializedName: "properties.authenticationSettings", - xmlName: "properties.authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract" - } - }, - subscriptionKeyParameterNames: { - serializedName: "properties.subscriptionKeyParameterNames", - xmlName: "properties.subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract" - } - }, - apiType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.apiRevision", - xmlName: "properties.apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.apiVersion", - xmlName: "properties.apiVersion", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean" - } - }, - isOnline: { - serializedName: "properties.isOnline", - readOnly: true, - xmlName: "properties.isOnline", - type: { - name: "Boolean" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiRevisionDescription", - xmlName: "properties.apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiVersionDescription", - xmlName: "properties.apiVersionDescription", - type: { - name: "String" - } - }, - apiVersionSetId: { - serializedName: "properties.apiVersionSetId", - xmlName: "properties.apiVersionSetId", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - termsOfServiceUrl: { - serializedName: "properties.termsOfServiceUrl", - xmlName: "properties.termsOfServiceUrl", - type: { - name: "String" - } - }, - contact: { - serializedName: "properties.contact", - xmlName: "properties.contact", - type: { - name: "Composite", - className: "ApiContactInformation" - } - }, - license: { - serializedName: "properties.license", - xmlName: "properties.license", - type: { - name: "Composite", - className: "ApiLicenseInformation" - } - }, - sourceApiId: { - serializedName: "properties.sourceApiId", - xmlName: "properties.sourceApiId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.serviceUrl", - xmlName: "properties.serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "properties.protocols", - xmlName: "properties.protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - apiVersionSet: { - serializedName: "properties.apiVersionSet", - xmlName: "properties.apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails" - } - }, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - format: { - serializedName: "properties.format", - xmlName: "properties.format", - type: { - name: "String" - } - }, - wsdlSelector: { - serializedName: "properties.wsdlSelector", - xmlName: "properties.wsdlSelector", - type: { - name: "Composite", - className: "ApiCreateOrUpdatePropertiesWsdlSelector" - } - }, - soapApiType: { - serializedName: "properties.apiType", - xmlName: "properties.apiType", - type: { - name: "String" - } - }, - translateRequiredQueryParametersConduct: { - serializedName: "properties.translateRequiredQueryParameters", - xmlName: "properties.translateRequiredQueryParameters", - type: { - name: "String" - } - } - } - } + serializedName: "ApiCreateOrUpdateParameter", + type: { + name: "Composite", + className: "ApiCreateOrUpdateParameter", + modelProperties: { + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authenticationSettings: { + serializedName: "properties.authenticationSettings", + xmlName: "properties.authenticationSettings", + type: { + name: "Composite", + className: "AuthenticationSettingsContract" + } + }, + subscriptionKeyParameterNames: { + serializedName: "properties.subscriptionKeyParameterNames", + xmlName: "properties.subscriptionKeyParameterNames", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract" + } + }, + apiType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.apiRevision", + xmlName: "properties.apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.apiVersion", + xmlName: "properties.apiVersion", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "properties.isCurrent", + xmlName: "properties.isCurrent", + type: { + name: "Boolean" + } + }, + isOnline: { + serializedName: "properties.isOnline", + readOnly: true, + xmlName: "properties.isOnline", + type: { + name: "Boolean" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiRevisionDescription", + xmlName: "properties.apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiVersionDescription", + xmlName: "properties.apiVersionDescription", + type: { + name: "String" + } + }, + apiVersionSetId: { + serializedName: "properties.apiVersionSetId", + xmlName: "properties.apiVersionSetId", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + termsOfServiceUrl: { + serializedName: "properties.termsOfServiceUrl", + xmlName: "properties.termsOfServiceUrl", + type: { + name: "String" + } + }, + contact: { + serializedName: "properties.contact", + xmlName: "properties.contact", + type: { + name: "Composite", + className: "ApiContactInformation" + } + }, + license: { + serializedName: "properties.license", + xmlName: "properties.license", + type: { + name: "Composite", + className: "ApiLicenseInformation" + } + }, + sourceApiId: { + serializedName: "properties.sourceApiId", + xmlName: "properties.sourceApiId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.serviceUrl", + xmlName: "properties.serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "properties.protocols", + xmlName: "properties.protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + apiVersionSet: { + serializedName: "properties.apiVersionSet", + xmlName: "properties.apiVersionSet", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails" + } + }, + value: { + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + format: { + serializedName: "properties.format", + xmlName: "properties.format", + type: { + name: "String" + } + }, + wsdlSelector: { + serializedName: "properties.wsdlSelector", + xmlName: "properties.wsdlSelector", + type: { + name: "Composite", + className: "ApiCreateOrUpdatePropertiesWsdlSelector" + } + }, + soapApiType: { + serializedName: "properties.apiType", + xmlName: "properties.apiType", + type: { + name: "String" + } + }, + translateRequiredQueryParametersConduct: { + serializedName: "properties.translateRequiredQueryParameters", + xmlName: "properties.translateRequiredQueryParameters", + type: { + name: "String" + } + } + } + } }; export const ApiCreateOrUpdatePropertiesWsdlSelector: coreClient.CompositeMapper = { - serializedName: "ApiCreateOrUpdatePropertiesWsdlSelector", - type: { - name: "Composite", - className: "ApiCreateOrUpdatePropertiesWsdlSelector", - modelProperties: { - wsdlServiceName: { - serializedName: "wsdlServiceName", - xmlName: "wsdlServiceName", - type: { - name: "String" - } - }, - wsdlEndpointName: { - serializedName: "wsdlEndpointName", - xmlName: "wsdlEndpointName", - type: { - name: "String" + serializedName: "ApiCreateOrUpdatePropertiesWsdlSelector", + type: { + name: "Composite", + className: "ApiCreateOrUpdatePropertiesWsdlSelector", + modelProperties: { + wsdlServiceName: { + serializedName: "wsdlServiceName", + xmlName: "wsdlServiceName", + type: { + name: "String" + } + }, + wsdlEndpointName: { + serializedName: "wsdlEndpointName", + xmlName: "wsdlEndpointName", + type: { + name: "String" + } + } } - } } - } }; export const ApiUpdateContract: coreClient.CompositeMapper = { - serializedName: "ApiUpdateContract", - type: { - name: "Composite", - className: "ApiUpdateContract", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authenticationSettings: { - serializedName: "properties.authenticationSettings", - xmlName: "properties.authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract" - } - }, - subscriptionKeyParameterNames: { - serializedName: "properties.subscriptionKeyParameterNames", - xmlName: "properties.subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract" - } - }, - apiType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.apiRevision", - xmlName: "properties.apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.apiVersion", - xmlName: "properties.apiVersion", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean" - } - }, - isOnline: { - serializedName: "properties.isOnline", - readOnly: true, - xmlName: "properties.isOnline", - type: { - name: "Boolean" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiRevisionDescription", - xmlName: "properties.apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiVersionDescription", - xmlName: "properties.apiVersionDescription", - type: { - name: "String" - } - }, - apiVersionSetId: { - serializedName: "properties.apiVersionSetId", - xmlName: "properties.apiVersionSetId", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - termsOfServiceUrl: { - serializedName: "properties.termsOfServiceUrl", - xmlName: "properties.termsOfServiceUrl", - type: { - name: "String" - } - }, - contact: { - serializedName: "properties.contact", - xmlName: "properties.contact", - type: { - name: "Composite", - className: "ApiContactInformation" - } - }, - license: { - serializedName: "properties.license", - xmlName: "properties.license", - type: { - name: "Composite", - className: "ApiLicenseInformation" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.serviceUrl", - xmlName: "properties.serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "properties.protocols", - xmlName: "properties.protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiUpdateContract", + type: { + name: "Composite", + className: "ApiUpdateContract", + modelProperties: { + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authenticationSettings: { + serializedName: "properties.authenticationSettings", + xmlName: "properties.authenticationSettings", + type: { + name: "Composite", + className: "AuthenticationSettingsContract" + } + }, + subscriptionKeyParameterNames: { + serializedName: "properties.subscriptionKeyParameterNames", + xmlName: "properties.subscriptionKeyParameterNames", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract" + } + }, + apiType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.apiRevision", + xmlName: "properties.apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.apiVersion", + xmlName: "properties.apiVersion", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "properties.isCurrent", + xmlName: "properties.isCurrent", + type: { + name: "Boolean" + } + }, + isOnline: { + serializedName: "properties.isOnline", + readOnly: true, + xmlName: "properties.isOnline", + type: { + name: "Boolean" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiRevisionDescription", + xmlName: "properties.apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiVersionDescription", + xmlName: "properties.apiVersionDescription", + type: { + name: "String" + } + }, + apiVersionSetId: { + serializedName: "properties.apiVersionSetId", + xmlName: "properties.apiVersionSetId", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + termsOfServiceUrl: { + serializedName: "properties.termsOfServiceUrl", + xmlName: "properties.termsOfServiceUrl", + type: { + name: "String" + } + }, + contact: { + serializedName: "properties.contact", + xmlName: "properties.contact", + type: { + name: "Composite", + className: "ApiContactInformation" + } + }, + license: { + serializedName: "properties.license", + xmlName: "properties.license", + type: { + name: "Composite", + className: "ApiLicenseInformation" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.serviceUrl", + xmlName: "properties.serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "properties.protocols", + xmlName: "properties.protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const ApiRevisionCollection: coreClient.CompositeMapper = { - serializedName: "ApiRevisionCollection", - type: { - name: "Composite", - className: "ApiRevisionCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ApiRevisionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiRevisionContract" + serializedName: "ApiRevisionCollection", + type: { + name: "Composite", + className: "ApiRevisionCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ApiRevisionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiRevisionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ApiRevisionContract: coreClient.CompositeMapper = { - serializedName: "ApiRevisionContract", - type: { - name: "Composite", - className: "ApiRevisionContract", - modelProperties: { - apiId: { - serializedName: "apiId", - readOnly: true, - xmlName: "apiId", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "apiRevision", - readOnly: true, - xmlName: "apiRevision", - type: { - name: "String" - } - }, - createdDateTime: { - serializedName: "createdDateTime", - readOnly: true, - xmlName: "createdDateTime", - type: { - name: "DateTime" - } - }, - updatedDateTime: { - serializedName: "updatedDateTime", - readOnly: true, - xmlName: "updatedDateTime", - type: { - name: "DateTime" - } - }, - description: { - constraints: { - MaxLength: 256 - }, - serializedName: "description", - readOnly: true, - xmlName: "description", - type: { - name: "String" - } - }, - privateUrl: { - serializedName: "privateUrl", - readOnly: true, - xmlName: "privateUrl", - type: { - name: "String" - } - }, - isOnline: { - serializedName: "isOnline", - readOnly: true, - xmlName: "isOnline", - type: { - name: "Boolean" - } - }, - isCurrent: { - serializedName: "isCurrent", - readOnly: true, - xmlName: "isCurrent", - type: { - name: "Boolean" - } - } - } - } + serializedName: "ApiRevisionContract", + type: { + name: "Composite", + className: "ApiRevisionContract", + modelProperties: { + apiId: { + serializedName: "apiId", + readOnly: true, + xmlName: "apiId", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "apiRevision", + readOnly: true, + xmlName: "apiRevision", + type: { + name: "String" + } + }, + createdDateTime: { + serializedName: "createdDateTime", + readOnly: true, + xmlName: "createdDateTime", + type: { + name: "DateTime" + } + }, + updatedDateTime: { + serializedName: "updatedDateTime", + readOnly: true, + xmlName: "updatedDateTime", + type: { + name: "DateTime" + } + }, + description: { + constraints: { + MaxLength: 256 + }, + serializedName: "description", + readOnly: true, + xmlName: "description", + type: { + name: "String" + } + }, + privateUrl: { + serializedName: "privateUrl", + readOnly: true, + xmlName: "privateUrl", + type: { + name: "String" + } + }, + isOnline: { + serializedName: "isOnline", + readOnly: true, + xmlName: "isOnline", + type: { + name: "Boolean" + } + }, + isCurrent: { + serializedName: "isCurrent", + readOnly: true, + xmlName: "isCurrent", + type: { + name: "Boolean" + } + } + } + } }; export const ApiReleaseCollection: coreClient.CompositeMapper = { - serializedName: "ApiReleaseCollection", - type: { - name: "Composite", - className: "ApiReleaseCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ApiReleaseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiReleaseContract" + serializedName: "ApiReleaseCollection", + type: { + name: "Composite", + className: "ApiReleaseCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ApiReleaseContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiReleaseContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OperationCollection: coreClient.CompositeMapper = { - serializedName: "OperationCollection", - type: { - name: "Composite", - className: "OperationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "OperationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationContract" + serializedName: "OperationCollection", + type: { + name: "Composite", + className: "OperationCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "OperationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OperationEntityBaseContract: coreClient.CompositeMapper = { - serializedName: "OperationEntityBaseContract", - type: { - name: "Composite", - className: "OperationEntityBaseContract", - modelProperties: { - templateParameters: { - serializedName: "templateParameters", - xmlName: "templateParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - request: { - serializedName: "request", - xmlName: "request", - type: { - name: "Composite", - className: "RequestContract" - } - }, - responses: { - serializedName: "responses", - xmlName: "responses", - xmlElementName: "ResponseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResponseContract" + serializedName: "OperationEntityBaseContract", + type: { + name: "Composite", + className: "OperationEntityBaseContract", + modelProperties: { + templateParameters: { + serializedName: "templateParameters", + xmlName: "templateParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + request: { + serializedName: "request", + xmlName: "request", + type: { + name: "Composite", + className: "RequestContract" + } + }, + responses: { + serializedName: "responses", + xmlName: "responses", + xmlElementName: "ResponseContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResponseContract" + } + } + } + }, + policies: { + serializedName: "policies", + xmlName: "policies", + type: { + name: "String" + } } - } - } - }, - policies: { - serializedName: "policies", - xmlName: "policies", - type: { - name: "String" } - } } - } }; export const ParameterContract: coreClient.CompositeMapper = { - serializedName: "ParameterContract", - type: { - name: "Composite", - className: "ParameterContract", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, - xmlName: "type", - type: { - name: "String" - } - }, - defaultValue: { - serializedName: "defaultValue", - xmlName: "defaultValue", - type: { - name: "String" - } - }, - required: { - serializedName: "required", - xmlName: "required", - type: { - name: "Boolean" - } - }, - values: { - serializedName: "values", - xmlName: "values", - xmlElementName: "ParameterContractValuesItem", - type: { - name: "Sequence", - element: { + serializedName: "ParameterContract", + type: { + name: "Composite", + className: "ParameterContract", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, type: { - name: "String" + serializedName: "type", + required: true, + xmlName: "type", + type: { + name: "String" + } + }, + defaultValue: { + serializedName: "defaultValue", + xmlName: "defaultValue", + type: { + name: "String" + } + }, + required: { + serializedName: "required", + xmlName: "required", + type: { + name: "Boolean" + } + }, + values: { + serializedName: "values", + xmlName: "values", + xmlElementName: "ParameterContractValuesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + schemaId: { + serializedName: "schemaId", + xmlName: "schemaId", + type: { + name: "String" + } + }, + typeName: { + serializedName: "typeName", + xmlName: "typeName", + type: { + name: "String" + } + }, + examples: { + serializedName: "examples", + xmlName: "examples", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "ParameterExampleContract" } + } + } } - } } - }, - schemaId: { - serializedName: "schemaId", - xmlName: "schemaId", - type: { - name: "String" - } - }, - typeName: { - serializedName: "typeName", - xmlName: "typeName", - type: { - name: "String" - } - }, - examples: { - serializedName: "examples", - xmlName: "examples", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ParameterExampleContract" } - } - } - } } - } }; export const ParameterExampleContract: coreClient.CompositeMapper = { - serializedName: "ParameterExampleContract", - type: { - name: "Composite", - className: "ParameterExampleContract", - modelProperties: { - summary: { - serializedName: "summary", - xmlName: "summary", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "any" - } - }, - externalValue: { - serializedName: "externalValue", - xmlName: "externalValue", - type: { - name: "String" - } - } - } - } + serializedName: "ParameterExampleContract", + type: { + name: "Composite", + className: "ParameterExampleContract", + modelProperties: { + summary: { + serializedName: "summary", + xmlName: "summary", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "any" + } + }, + externalValue: { + serializedName: "externalValue", + xmlName: "externalValue", + type: { + name: "String" + } + } + } + } }; export const RequestContract: coreClient.CompositeMapper = { - serializedName: "RequestContract", - type: { - name: "Composite", - className: "RequestContract", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - queryParameters: { - serializedName: "queryParameters", - xmlName: "queryParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - representations: { - serializedName: "representations", - xmlName: "representations", - xmlElementName: "RepresentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RepresentationContract" + serializedName: "RequestContract", + type: { + name: "Composite", + className: "RequestContract", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + queryParameters: { + serializedName: "queryParameters", + xmlName: "queryParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + representations: { + serializedName: "representations", + xmlName: "representations", + xmlElementName: "RepresentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RepresentationContract" + } + } + } } - } } - } } - } }; export const RepresentationContract: coreClient.CompositeMapper = { - serializedName: "RepresentationContract", - type: { - name: "Composite", - className: "RepresentationContract", - modelProperties: { - contentType: { - serializedName: "contentType", - required: true, - xmlName: "contentType", - type: { - name: "String" - } - }, - schemaId: { - serializedName: "schemaId", - xmlName: "schemaId", - type: { - name: "String" - } - }, - typeName: { - serializedName: "typeName", - xmlName: "typeName", - type: { - name: "String" - } - }, - formParameters: { - serializedName: "formParameters", - xmlName: "formParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" + serializedName: "RepresentationContract", + type: { + name: "Composite", + className: "RepresentationContract", + modelProperties: { + contentType: { + serializedName: "contentType", + required: true, + xmlName: "contentType", + type: { + name: "String" + } + }, + schemaId: { + serializedName: "schemaId", + xmlName: "schemaId", + type: { + name: "String" + } + }, + typeName: { + serializedName: "typeName", + xmlName: "typeName", + type: { + name: "String" + } + }, + formParameters: { + serializedName: "formParameters", + xmlName: "formParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + examples: { + serializedName: "examples", + xmlName: "examples", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "ParameterExampleContract" } + } + } } - } } - }, - examples: { - serializedName: "examples", - xmlName: "examples", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ParameterExampleContract" } - } - } - } } - } }; export const ResponseContract: coreClient.CompositeMapper = { - serializedName: "ResponseContract", - type: { - name: "Composite", - className: "ResponseContract", - modelProperties: { - statusCode: { - serializedName: "statusCode", - required: true, - xmlName: "statusCode", - type: { - name: "Number" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - representations: { - serializedName: "representations", - xmlName: "representations", - xmlElementName: "RepresentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RepresentationContract" - } - } - } - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" + serializedName: "ResponseContract", + type: { + name: "Composite", + className: "ResponseContract", + modelProperties: { + statusCode: { + serializedName: "statusCode", + required: true, + xmlName: "statusCode", + type: { + name: "Number" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + representations: { + serializedName: "representations", + xmlName: "representations", + xmlElementName: "RepresentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RepresentationContract" + } + } + } + }, + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } } - } } - } } - } }; export const OperationUpdateContract: coreClient.CompositeMapper = { - serializedName: "OperationUpdateContract", - type: { - name: "Composite", - className: "OperationUpdateContract", - modelProperties: { - templateParameters: { - serializedName: "properties.templateParameters", - xmlName: "properties.templateParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - request: { - serializedName: "properties.request", - xmlName: "properties.request", - type: { - name: "Composite", - className: "RequestContract" - } - }, - responses: { - serializedName: "properties.responses", - xmlName: "properties.responses", - xmlElementName: "ResponseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResponseContract" - } - } - } - }, - policies: { - serializedName: "properties.policies", - xmlName: "properties.policies", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - method: { - serializedName: "properties.method", - xmlName: "properties.method", - type: { - name: "String" - } - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.urlTemplate", - xmlName: "properties.urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationUpdateContract", + type: { + name: "Composite", + className: "OperationUpdateContract", + modelProperties: { + templateParameters: { + serializedName: "properties.templateParameters", + xmlName: "properties.templateParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + request: { + serializedName: "properties.request", + xmlName: "properties.request", + type: { + name: "Composite", + className: "RequestContract" + } + }, + responses: { + serializedName: "properties.responses", + xmlName: "properties.responses", + xmlElementName: "ResponseContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResponseContract" + } + } + } + }, + policies: { + serializedName: "properties.policies", + xmlName: "properties.policies", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + method: { + serializedName: "properties.method", + xmlName: "properties.method", + type: { + name: "String" + } + }, + urlTemplate: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.urlTemplate", + xmlName: "properties.urlTemplate", + type: { + name: "String" + } + } + } + } }; export const PolicyCollection: coreClient.CompositeMapper = { - serializedName: "PolicyCollection", - type: { - name: "Composite", - className: "PolicyCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyContract" + serializedName: "PolicyCollection", + type: { + name: "Composite", + className: "PolicyCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PolicyContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PolicyContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const TagCollection: coreClient.CompositeMapper = { - serializedName: "TagCollection", - type: { - name: "Composite", - className: "TagCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagContract" + serializedName: "TagCollection", + type: { + name: "Composite", + className: "TagCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "TagContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ResolverCollection: coreClient.CompositeMapper = { - serializedName: "ResolverCollection", - type: { - name: "Composite", - className: "ResolverCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ResolverContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResolverContract" + serializedName: "ResolverCollection", + type: { + name: "Composite", + className: "ResolverCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ResolverContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResolverContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ResolverUpdateContract: coreClient.CompositeMapper = { - serializedName: "ResolverUpdateContract", - type: { - name: "Composite", - className: "ResolverUpdateContract", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - } - } - } + serializedName: "ResolverUpdateContract", + type: { + name: "Composite", + className: "ResolverUpdateContract", + modelProperties: { + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + } + } + } }; export const ProductCollection: coreClient.CompositeMapper = { - serializedName: "ProductCollection", - type: { - name: "Composite", - className: "ProductCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ProductContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ProductContract" + serializedName: "ProductCollection", + type: { + name: "Composite", + className: "ProductCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "ProductContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProductContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ProductEntityBaseParameters: coreClient.CompositeMapper = { - serializedName: "ProductEntityBaseParameters", - type: { - name: "Composite", - className: "ProductEntityBaseParameters", - modelProperties: { - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - terms: { - serializedName: "terms", - xmlName: "terms", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "subscriptionRequired", - xmlName: "subscriptionRequired", - type: { - name: "Boolean" - } - }, - approvalRequired: { - serializedName: "approvalRequired", - xmlName: "approvalRequired", - type: { - name: "Boolean" - } - }, - subscriptionsLimit: { - serializedName: "subscriptionsLimit", - xmlName: "subscriptionsLimit", - type: { - name: "Number" - } - }, - state: { - serializedName: "state", - xmlName: "state", - type: { - name: "Enum", - allowedValues: ["notPublished", "published"] - } - } - } - } + serializedName: "ProductEntityBaseParameters", + type: { + name: "Composite", + className: "ProductEntityBaseParameters", + modelProperties: { + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + terms: { + serializedName: "terms", + xmlName: "terms", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "subscriptionRequired", + xmlName: "subscriptionRequired", + type: { + name: "Boolean" + } + }, + approvalRequired: { + serializedName: "approvalRequired", + xmlName: "approvalRequired", + type: { + name: "Boolean" + } + }, + subscriptionsLimit: { + serializedName: "subscriptionsLimit", + xmlName: "subscriptionsLimit", + type: { + name: "Number" + } + }, + state: { + serializedName: "state", + xmlName: "state", + type: { + name: "Enum", + allowedValues: ["notPublished", "published"] + } + } + } + } }; export const SchemaCollection: coreClient.CompositeMapper = { - serializedName: "SchemaCollection", - type: { - name: "Composite", - className: "SchemaCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "SchemaContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SchemaContract" + serializedName: "SchemaCollection", + type: { + name: "Composite", + className: "SchemaCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "SchemaContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SchemaContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const DiagnosticCollection: coreClient.CompositeMapper = { - serializedName: "DiagnosticCollection", - type: { - name: "Composite", - className: "DiagnosticCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "DiagnosticContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticContract" + serializedName: "DiagnosticCollection", + type: { + name: "Composite", + className: "DiagnosticCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "DiagnosticContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const SamplingSettings: coreClient.CompositeMapper = { - serializedName: "SamplingSettings", - type: { - name: "Composite", - className: "SamplingSettings", - modelProperties: { - samplingType: { - serializedName: "samplingType", - xmlName: "samplingType", - type: { - name: "String" - } - }, - percentage: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 - }, - serializedName: "percentage", - xmlName: "percentage", - type: { - name: "Number" - } - } - } - } + serializedName: "SamplingSettings", + type: { + name: "Composite", + className: "SamplingSettings", + modelProperties: { + samplingType: { + serializedName: "samplingType", + xmlName: "samplingType", + type: { + name: "String" + } + }, + percentage: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "percentage", + xmlName: "percentage", + type: { + name: "Number" + } + } + } + } }; export const PipelineDiagnosticSettings: coreClient.CompositeMapper = { - serializedName: "PipelineDiagnosticSettings", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings", - modelProperties: { - request: { - serializedName: "request", - xmlName: "request", - type: { - name: "Composite", - className: "HttpMessageDiagnostic" - } - }, - response: { - serializedName: "response", - xmlName: "response", - type: { - name: "Composite", - className: "HttpMessageDiagnostic" - } - } - } - } + serializedName: "PipelineDiagnosticSettings", + type: { + name: "Composite", + className: "PipelineDiagnosticSettings", + modelProperties: { + request: { + serializedName: "request", + xmlName: "request", + type: { + name: "Composite", + className: "HttpMessageDiagnostic" + } + }, + response: { + serializedName: "response", + xmlName: "response", + type: { + name: "Composite", + className: "HttpMessageDiagnostic" + } + } + } + } }; export const HttpMessageDiagnostic: coreClient.CompositeMapper = { - serializedName: "HttpMessageDiagnostic", - type: { - name: "Composite", - className: "HttpMessageDiagnostic", - modelProperties: { - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "HttpMessageDiagnosticHeadersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "HttpMessageDiagnostic", + type: { + name: "Composite", + className: "HttpMessageDiagnostic", + modelProperties: { + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "HttpMessageDiagnosticHeadersItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + body: { + serializedName: "body", + xmlName: "body", + type: { + name: "Composite", + className: "BodyDiagnosticSettings" + } + }, + dataMasking: { + serializedName: "dataMasking", + xmlName: "dataMasking", + type: { + name: "Composite", + className: "DataMasking" + } } - } - } - }, - body: { - serializedName: "body", - xmlName: "body", - type: { - name: "Composite", - className: "BodyDiagnosticSettings" } - }, - dataMasking: { - serializedName: "dataMasking", - xmlName: "dataMasking", - type: { - name: "Composite", - className: "DataMasking" - } - } } - } }; export const BodyDiagnosticSettings: coreClient.CompositeMapper = { - serializedName: "BodyDiagnosticSettings", - type: { - name: "Composite", - className: "BodyDiagnosticSettings", - modelProperties: { - bytes: { - constraints: { - InclusiveMaximum: 8192 - }, - serializedName: "bytes", - xmlName: "bytes", - type: { - name: "Number" + serializedName: "BodyDiagnosticSettings", + type: { + name: "Composite", + className: "BodyDiagnosticSettings", + modelProperties: { + bytes: { + constraints: { + InclusiveMaximum: 8192 + }, + serializedName: "bytes", + xmlName: "bytes", + type: { + name: "Number" + } + } } - } } - } }; export const DataMasking: coreClient.CompositeMapper = { - serializedName: "DataMasking", - type: { - name: "Composite", - className: "DataMasking", - modelProperties: { - queryParams: { - serializedName: "queryParams", - xmlName: "queryParams", - xmlElementName: "DataMaskingEntity", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataMaskingEntity" - } - } - } - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "DataMaskingEntity", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataMaskingEntity" + serializedName: "DataMasking", + type: { + name: "Composite", + className: "DataMasking", + modelProperties: { + queryParams: { + serializedName: "queryParams", + xmlName: "queryParams", + xmlElementName: "DataMaskingEntity", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataMaskingEntity" + } + } + } + }, + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "DataMaskingEntity", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataMaskingEntity" + } + } + } } - } } - } } - } }; export const DataMaskingEntity: coreClient.CompositeMapper = { - serializedName: "DataMaskingEntity", - type: { - name: "Composite", - className: "DataMaskingEntity", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - mode: { - serializedName: "mode", - xmlName: "mode", - type: { - name: "String" + serializedName: "DataMaskingEntity", + type: { + name: "Composite", + className: "DataMaskingEntity", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + mode: { + serializedName: "mode", + xmlName: "mode", + type: { + name: "String" + } + } } - } } - } }; export const IssueCollection: coreClient.CompositeMapper = { - serializedName: "IssueCollection", - type: { - name: "Composite", - className: "IssueCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "IssueContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IssueContract" + serializedName: "IssueCollection", + type: { + name: "Composite", + className: "IssueCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "IssueContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IssueContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const IssueContractBaseProperties: coreClient.CompositeMapper = { - serializedName: "IssueContractBaseProperties", - type: { - name: "Composite", - className: "IssueContractBaseProperties", - modelProperties: { - createdDate: { - serializedName: "createdDate", - xmlName: "createdDate", - type: { - name: "DateTime" - } - }, - state: { - serializedName: "state", - xmlName: "state", - type: { - name: "String" - } - }, - apiId: { - serializedName: "apiId", - xmlName: "apiId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueContractBaseProperties", + type: { + name: "Composite", + className: "IssueContractBaseProperties", + modelProperties: { + createdDate: { + serializedName: "createdDate", + xmlName: "createdDate", + type: { + name: "DateTime" + } + }, + state: { + serializedName: "state", + xmlName: "state", + type: { + name: "String" + } + }, + apiId: { + serializedName: "apiId", + xmlName: "apiId", + type: { + name: "String" + } + } + } + } }; export const IssueUpdateContract: coreClient.CompositeMapper = { - serializedName: "IssueUpdateContract", - type: { - name: "Composite", - className: "IssueUpdateContract", - modelProperties: { - createdDate: { - serializedName: "properties.createdDate", - xmlName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String" - } - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueUpdateContract", + type: { + name: "Composite", + className: "IssueUpdateContract", + modelProperties: { + createdDate: { + serializedName: "properties.createdDate", + xmlName: "properties.createdDate", + type: { + name: "DateTime" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + apiId: { + serializedName: "properties.apiId", + xmlName: "properties.apiId", + type: { + name: "String" + } + }, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + userId: { + serializedName: "properties.userId", + xmlName: "properties.userId", + type: { + name: "String" + } + } + } + } }; export const IssueCommentCollection: coreClient.CompositeMapper = { - serializedName: "IssueCommentCollection", - type: { - name: "Composite", - className: "IssueCommentCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "IssueCommentContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IssueCommentContract" + serializedName: "IssueCommentCollection", + type: { + name: "Composite", + className: "IssueCommentCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "IssueCommentContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IssueCommentContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const IssueAttachmentCollection: coreClient.CompositeMapper = { - serializedName: "IssueAttachmentCollection", - type: { - name: "Composite", - className: "IssueAttachmentCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "IssueAttachmentContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IssueAttachmentContract" + serializedName: "IssueAttachmentCollection", + type: { + name: "Composite", + className: "IssueAttachmentCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "IssueAttachmentContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IssueAttachmentContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const TagDescriptionCollection: coreClient.CompositeMapper = { - serializedName: "TagDescriptionCollection", - type: { - name: "Composite", - className: "TagDescriptionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagDescriptionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagDescriptionContract" + serializedName: "TagDescriptionCollection", + type: { + name: "Composite", + className: "TagDescriptionCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "TagDescriptionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagDescriptionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const TagDescriptionBaseProperties: coreClient.CompositeMapper = { - serializedName: "TagDescriptionBaseProperties", - type: { - name: "Composite", - className: "TagDescriptionBaseProperties", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - externalDocsUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "externalDocsUrl", - xmlName: "externalDocsUrl", - type: { - name: "String" - } - }, - externalDocsDescription: { - serializedName: "externalDocsDescription", - xmlName: "externalDocsDescription", - type: { - name: "String" - } - } - } - } + serializedName: "TagDescriptionBaseProperties", + type: { + name: "Composite", + className: "TagDescriptionBaseProperties", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + externalDocsUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "externalDocsUrl", + xmlName: "externalDocsUrl", + type: { + name: "String" + } + }, + externalDocsDescription: { + serializedName: "externalDocsDescription", + xmlName: "externalDocsDescription", + type: { + name: "String" + } + } + } + } }; export const TagDescriptionCreateParameters: coreClient.CompositeMapper = { - serializedName: "TagDescriptionCreateParameters", - type: { - name: "Composite", - className: "TagDescriptionCreateParameters", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - externalDocsUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.externalDocsUrl", - xmlName: "properties.externalDocsUrl", - type: { - name: "String" - } - }, - externalDocsDescription: { - serializedName: "properties.externalDocsDescription", - xmlName: "properties.externalDocsDescription", - type: { - name: "String" - } - } - } - } + serializedName: "TagDescriptionCreateParameters", + type: { + name: "Composite", + className: "TagDescriptionCreateParameters", + modelProperties: { + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + externalDocsUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.externalDocsUrl", + xmlName: "properties.externalDocsUrl", + type: { + name: "String" + } + }, + externalDocsDescription: { + serializedName: "properties.externalDocsDescription", + xmlName: "properties.externalDocsDescription", + type: { + name: "String" + } + } + } + } }; export const TagResourceCollection: coreClient.CompositeMapper = { - serializedName: "TagResourceCollection", - type: { - name: "Composite", - className: "TagResourceCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagResourceContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagResourceContract" + serializedName: "TagResourceCollection", + type: { + name: "Composite", + className: "TagResourceCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "TagResourceContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagResourceContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const TagResourceContract: coreClient.CompositeMapper = { - serializedName: "TagResourceContract", - type: { - name: "Composite", - className: "TagResourceContract", - modelProperties: { - tag: { - serializedName: "tag", - xmlName: "tag", - type: { - name: "Composite", - className: "TagResourceContractProperties" - } - }, - api: { - serializedName: "api", - xmlName: "api", - type: { - name: "Composite", - className: "ApiTagResourceContractProperties" - } - }, - operation: { - serializedName: "operation", - xmlName: "operation", - type: { - name: "Composite", - className: "OperationTagResourceContractProperties" - } - }, - product: { - serializedName: "product", - xmlName: "product", - type: { - name: "Composite", - className: "ProductTagResourceContractProperties" - } - } - } - } + serializedName: "TagResourceContract", + type: { + name: "Composite", + className: "TagResourceContract", + modelProperties: { + tag: { + serializedName: "tag", + xmlName: "tag", + type: { + name: "Composite", + className: "TagResourceContractProperties" + } + }, + api: { + serializedName: "api", + xmlName: "api", + type: { + name: "Composite", + className: "ApiTagResourceContractProperties" + } + }, + operation: { + serializedName: "operation", + xmlName: "operation", + type: { + name: "Composite", + className: "OperationTagResourceContractProperties" + } + }, + product: { + serializedName: "product", + xmlName: "product", + type: { + name: "Composite", + className: "ProductTagResourceContractProperties" + } + } + } + } }; export const TagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "TagResourceContractProperties", - type: { - name: "Composite", - className: "TagResourceContractProperties", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - } - } - } + serializedName: "TagResourceContractProperties", + type: { + name: "Composite", + className: "TagResourceContractProperties", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + } + } + } }; export const OperationTagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "OperationTagResourceContractProperties", - type: { - name: "Composite", - className: "OperationTagResourceContractProperties", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - apiName: { - serializedName: "apiName", - readOnly: true, - xmlName: "apiName", - type: { - name: "String" - } - }, - apiRevision: { - serializedName: "apiRevision", - readOnly: true, - xmlName: "apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - serializedName: "apiVersion", - readOnly: true, - xmlName: "apiVersion", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - xmlName: "description", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - readOnly: true, - xmlName: "method", - type: { - name: "String" - } - }, - urlTemplate: { - serializedName: "urlTemplate", - readOnly: true, - xmlName: "urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationTagResourceContractProperties", + type: { + name: "Composite", + className: "OperationTagResourceContractProperties", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + apiName: { + serializedName: "apiName", + readOnly: true, + xmlName: "apiName", + type: { + name: "String" + } + }, + apiRevision: { + serializedName: "apiRevision", + readOnly: true, + xmlName: "apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + serializedName: "apiVersion", + readOnly: true, + xmlName: "apiVersion", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + xmlName: "description", + type: { + name: "String" + } + }, + method: { + serializedName: "method", + readOnly: true, + xmlName: "method", + type: { + name: "String" + } + }, + urlTemplate: { + serializedName: "urlTemplate", + readOnly: true, + xmlName: "urlTemplate", + type: { + name: "String" + } + } + } + } }; export const WikiDocumentationContract: coreClient.CompositeMapper = { - serializedName: "WikiDocumentationContract", - type: { - name: "Composite", - className: "WikiDocumentationContract", - modelProperties: { - documentationId: { - serializedName: "documentationId", - xmlName: "documentationId", - type: { - name: "String" + serializedName: "WikiDocumentationContract", + type: { + name: "Composite", + className: "WikiDocumentationContract", + modelProperties: { + documentationId: { + serializedName: "documentationId", + xmlName: "documentationId", + type: { + name: "String" + } + } } - } } - } }; export const WikiUpdateContract: coreClient.CompositeMapper = { - serializedName: "WikiUpdateContract", - type: { - name: "Composite", - className: "WikiUpdateContract", - modelProperties: { - documents: { - serializedName: "properties.documents", - xmlName: "properties.documents", - xmlElementName: "WikiDocumentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WikiDocumentationContract" + serializedName: "WikiUpdateContract", + type: { + name: "Composite", + className: "WikiUpdateContract", + modelProperties: { + documents: { + serializedName: "properties.documents", + xmlName: "properties.documents", + xmlElementName: "WikiDocumentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WikiDocumentationContract" + } + } + } } - } } - } } - } }; export const WikiCollection: coreClient.CompositeMapper = { - serializedName: "WikiCollection", - type: { - name: "Composite", - className: "WikiCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "WikiContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WikiContract" + serializedName: "WikiCollection", + type: { + name: "Composite", + className: "WikiCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "WikiContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WikiContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ApiExportResult: coreClient.CompositeMapper = { - serializedName: "ApiExportResult", - type: { - name: "Composite", - className: "ApiExportResult", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - exportResultFormat: { - serializedName: "format", - xmlName: "format", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "Composite", - className: "ApiExportResultValue" - } - } - } - } + serializedName: "ApiExportResult", + type: { + name: "Composite", + className: "ApiExportResult", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + exportResultFormat: { + serializedName: "format", + xmlName: "format", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "Composite", + className: "ApiExportResultValue" + } + } + } + } }; export const ApiExportResultValue: coreClient.CompositeMapper = { - serializedName: "ApiExportResultValue", - type: { - name: "Composite", - className: "ApiExportResultValue", - modelProperties: { - link: { - serializedName: "link", - xmlName: "link", - type: { - name: "String" + serializedName: "ApiExportResultValue", + type: { + name: "Composite", + className: "ApiExportResultValue", + modelProperties: { + link: { + serializedName: "link", + xmlName: "link", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetCollection: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetCollection", - type: { - name: "Composite", - className: "ApiVersionSetCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ApiVersionSetContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiVersionSetContract" + serializedName: "ApiVersionSetCollection", + type: { + name: "Composite", + className: "ApiVersionSetCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "ApiVersionSetContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiVersionSetContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ApiVersionSetEntityBase: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetEntityBase", - type: { - name: "Composite", - className: "ApiVersionSetEntityBase", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - versionQueryName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "versionQueryName", - xmlName: "versionQueryName", - type: { - name: "String" - } - }, - versionHeaderName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "versionHeaderName", - xmlName: "versionHeaderName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetEntityBase", + type: { + name: "Composite", + className: "ApiVersionSetEntityBase", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + versionQueryName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "versionQueryName", + xmlName: "versionQueryName", + type: { + name: "String" + } + }, + versionHeaderName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "versionHeaderName", + xmlName: "versionHeaderName", + type: { + name: "String" + } + } + } + } }; export const ApiVersionSetUpdateParameters: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetUpdateParameters", - type: { - name: "Composite", - className: "ApiVersionSetUpdateParameters", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - versionQueryName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.versionQueryName", - xmlName: "properties.versionQueryName", - type: { - name: "String" - } - }, - versionHeaderName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.versionHeaderName", - xmlName: "properties.versionHeaderName", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "properties.versioningScheme", - xmlName: "properties.versioningScheme", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetUpdateParameters", + type: { + name: "Composite", + className: "ApiVersionSetUpdateParameters", + modelProperties: { + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + versionQueryName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.versionQueryName", + xmlName: "properties.versionQueryName", + type: { + name: "String" + } + }, + versionHeaderName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.versionHeaderName", + xmlName: "properties.versionHeaderName", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "properties.versioningScheme", + xmlName: "properties.versioningScheme", + type: { + name: "String" + } + } + } + } }; export const AuthorizationServerCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerCollection", - type: { - name: "Composite", - className: "AuthorizationServerCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationServerContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationServerContract" + serializedName: "AuthorizationServerCollection", + type: { + name: "Composite", + className: "AuthorizationServerCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "AuthorizationServerContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthorizationServerContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const AuthorizationServerContractBaseProperties: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerContractBaseProperties", - type: { - name: "Composite", - className: "AuthorizationServerContractBaseProperties", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - authorizationMethods: { - serializedName: "authorizationMethods", - xmlName: "authorizationMethods", - xmlElementName: "AuthorizationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "HEAD", - "OPTIONS", - "TRACE", - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - } - } - } - }, - clientAuthenticationMethod: { - serializedName: "clientAuthenticationMethod", - xmlName: "clientAuthenticationMethod", - xmlElementName: "ClientAuthenticationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - tokenBodyParameters: { - serializedName: "tokenBodyParameters", - xmlName: "tokenBodyParameters", - xmlElementName: "TokenBodyParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenBodyParameterContract" - } - } - } - }, - tokenEndpoint: { - serializedName: "tokenEndpoint", - xmlName: "tokenEndpoint", - type: { - name: "String" - } - }, - supportState: { - serializedName: "supportState", - xmlName: "supportState", - type: { - name: "Boolean" - } - }, - defaultScope: { - serializedName: "defaultScope", - xmlName: "defaultScope", - type: { - name: "String" - } - }, - bearerTokenSendingMethods: { - serializedName: "bearerTokenSendingMethods", - xmlName: "bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerContractBaseProperties", + type: { + name: "Composite", + className: "AuthorizationServerContractBaseProperties", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + authorizationMethods: { + serializedName: "authorizationMethods", + xmlName: "authorizationMethods", + xmlElementName: "AuthorizationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "HEAD", + "OPTIONS", + "TRACE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + } + } + } + }, + clientAuthenticationMethod: { + serializedName: "clientAuthenticationMethod", + xmlName: "clientAuthenticationMethod", + xmlElementName: "ClientAuthenticationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tokenBodyParameters: { + serializedName: "tokenBodyParameters", + xmlName: "tokenBodyParameters", + xmlElementName: "TokenBodyParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TokenBodyParameterContract" + } + } + } + }, + tokenEndpoint: { + serializedName: "tokenEndpoint", + xmlName: "tokenEndpoint", + type: { + name: "String" + } + }, + supportState: { + serializedName: "supportState", + xmlName: "supportState", + type: { + name: "Boolean" + } + }, + defaultScope: { + serializedName: "defaultScope", + xmlName: "defaultScope", + type: { + name: "String" + } + }, + bearerTokenSendingMethods: { + serializedName: "bearerTokenSendingMethods", + xmlName: "bearerTokenSendingMethods", + xmlElementName: "BearerTokenSendingMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resourceOwnerUsername: { + serializedName: "resourceOwnerUsername", + xmlName: "resourceOwnerUsername", + type: { + name: "String" + } + }, + resourceOwnerPassword: { + serializedName: "resourceOwnerPassword", + xmlName: "resourceOwnerPassword", + type: { + name: "String" + } } - } } - }, - resourceOwnerUsername: { - serializedName: "resourceOwnerUsername", - xmlName: "resourceOwnerUsername", - type: { - name: "String" - } - }, - resourceOwnerPassword: { - serializedName: "resourceOwnerPassword", - xmlName: "resourceOwnerPassword", - type: { - name: "String" - } - } } - } }; export const TokenBodyParameterContract: coreClient.CompositeMapper = { - serializedName: "TokenBodyParameterContract", - type: { - name: "Composite", - className: "TokenBodyParameterContract", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, - xmlName: "value", - type: { - name: "String" - } - } - } - } + serializedName: "TokenBodyParameterContract", + type: { + name: "Composite", + className: "TokenBodyParameterContract", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + xmlName: "value", + type: { + name: "String" + } + } + } + } }; export const AuthorizationServerSecretsContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerSecretsContract", - type: { - name: "Composite", - className: "AuthorizationServerSecretsContract", - modelProperties: { - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - }, - resourceOwnerUsername: { - serializedName: "resourceOwnerUsername", - xmlName: "resourceOwnerUsername", - type: { - name: "String" - } - }, - resourceOwnerPassword: { - serializedName: "resourceOwnerPassword", - xmlName: "resourceOwnerPassword", - type: { - name: "String" - } - } - } - } + serializedName: "AuthorizationServerSecretsContract", + type: { + name: "Composite", + className: "AuthorizationServerSecretsContract", + modelProperties: { + clientSecret: { + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } + }, + resourceOwnerUsername: { + serializedName: "resourceOwnerUsername", + xmlName: "resourceOwnerUsername", + type: { + name: "String" + } + }, + resourceOwnerPassword: { + serializedName: "resourceOwnerPassword", + xmlName: "resourceOwnerPassword", + type: { + name: "String" + } + } + } + } }; export const AuthorizationProviderCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderCollection", - type: { - name: "Composite", - className: "AuthorizationProviderCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationProviderContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationProviderContract" + serializedName: "AuthorizationProviderCollection", + type: { + name: "Composite", + className: "AuthorizationProviderCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "AuthorizationProviderContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthorizationProviderContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const AuthorizationProviderOAuth2Settings: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderOAuth2Settings", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2Settings", - modelProperties: { - redirectUrl: { - serializedName: "redirectUrl", - xmlName: "redirectUrl", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "grantTypes", - xmlName: "grantTypes", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2GrantTypes" - } - } - } - } + serializedName: "AuthorizationProviderOAuth2Settings", + type: { + name: "Composite", + className: "AuthorizationProviderOAuth2Settings", + modelProperties: { + redirectUrl: { + serializedName: "redirectUrl", + xmlName: "redirectUrl", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "grantTypes", + xmlName: "grantTypes", + type: { + name: "Composite", + className: "AuthorizationProviderOAuth2GrantTypes" + } + } + } + } }; export const AuthorizationProviderOAuth2GrantTypes: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderOAuth2GrantTypes", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2GrantTypes", - modelProperties: { - authorizationCode: { - serializedName: "authorizationCode", - xmlName: "authorizationCode", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - clientCredentials: { - serializedName: "clientCredentials", - xmlName: "clientCredentials", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + serializedName: "AuthorizationProviderOAuth2GrantTypes", + type: { + name: "Composite", + className: "AuthorizationProviderOAuth2GrantTypes", + modelProperties: { + authorizationCode: { + serializedName: "authorizationCode", + xmlName: "authorizationCode", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + clientCredentials: { + serializedName: "clientCredentials", + xmlName: "clientCredentials", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } }; export const AuthorizationCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationCollection", - type: { - name: "Composite", - className: "AuthorizationCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationContract" + serializedName: "AuthorizationCollection", + type: { + name: "Composite", + className: "AuthorizationCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "AuthorizationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthorizationContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const AuthorizationError: coreClient.CompositeMapper = { - serializedName: "AuthorizationError", - type: { - name: "Composite", - className: "AuthorizationError", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String" + serializedName: "AuthorizationError", + type: { + name: "Composite", + className: "AuthorizationError", + modelProperties: { + code: { + serializedName: "code", + xmlName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + xmlName: "message", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationLoginRequestContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationLoginRequestContract", - type: { - name: "Composite", - className: "AuthorizationLoginRequestContract", - modelProperties: { - postLoginRedirectUrl: { - serializedName: "postLoginRedirectUrl", - xmlName: "postLoginRedirectUrl", - type: { - name: "String" + serializedName: "AuthorizationLoginRequestContract", + type: { + name: "Composite", + className: "AuthorizationLoginRequestContract", + modelProperties: { + postLoginRedirectUrl: { + serializedName: "postLoginRedirectUrl", + xmlName: "postLoginRedirectUrl", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationLoginResponseContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationLoginResponseContract", - type: { - name: "Composite", - className: "AuthorizationLoginResponseContract", - modelProperties: { - loginLink: { - serializedName: "loginLink", - xmlName: "loginLink", - type: { - name: "String" + serializedName: "AuthorizationLoginResponseContract", + type: { + name: "Composite", + className: "AuthorizationLoginResponseContract", + modelProperties: { + loginLink: { + serializedName: "loginLink", + xmlName: "loginLink", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationConfirmConsentCodeRequestContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationConfirmConsentCodeRequestContract", - type: { - name: "Composite", - className: "AuthorizationConfirmConsentCodeRequestContract", - modelProperties: { - consentCode: { - serializedName: "consentCode", - xmlName: "consentCode", - type: { - name: "String" + serializedName: "AuthorizationConfirmConsentCodeRequestContract", + type: { + name: "Composite", + className: "AuthorizationConfirmConsentCodeRequestContract", + modelProperties: { + consentCode: { + serializedName: "consentCode", + xmlName: "consentCode", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationAccessPolicyCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicyCollection", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationAccessPolicyContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationAccessPolicyContract" + serializedName: "AuthorizationAccessPolicyCollection", + type: { + name: "Composite", + className: "AuthorizationAccessPolicyCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "AuthorizationAccessPolicyContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthorizationAccessPolicyContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const BackendCollection: coreClient.CompositeMapper = { - serializedName: "BackendCollection", - type: { - name: "Composite", - className: "BackendCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "BackendContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BackendContract" + serializedName: "BackendCollection", + type: { + name: "Composite", + className: "BackendCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "BackendContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackendContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const BackendBaseParameters: coreClient.CompositeMapper = { - serializedName: "BackendBaseParameters", - type: { - name: "Composite", - className: "BackendBaseParameters", - modelProperties: { - title: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "title", - xmlName: "title", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "resourceId", - xmlName: "resourceId", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Composite", - className: "BackendProperties" - } - }, - credentials: { - serializedName: "credentials", - xmlName: "credentials", - type: { - name: "Composite", - className: "BackendCredentialsContract" - } - }, - proxy: { - serializedName: "proxy", - xmlName: "proxy", - type: { - name: "Composite", - className: "BackendProxyContract" - } - }, - tls: { - serializedName: "tls", - xmlName: "tls", - type: { - name: "Composite", - className: "BackendTlsProperties" - } - } - } - } + serializedName: "BackendBaseParameters", + type: { + name: "Composite", + className: "BackendBaseParameters", + modelProperties: { + title: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "title", + xmlName: "title", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "resourceId", + xmlName: "resourceId", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + xmlName: "properties", + type: { + name: "Composite", + className: "BackendProperties" + } + }, + credentials: { + serializedName: "credentials", + xmlName: "credentials", + type: { + name: "Composite", + className: "BackendCredentialsContract" + } + }, + proxy: { + serializedName: "proxy", + xmlName: "proxy", + type: { + name: "Composite", + className: "BackendProxyContract" + } + }, + tls: { + serializedName: "tls", + xmlName: "tls", + type: { + name: "Composite", + className: "BackendTlsProperties" + } + } + } + } }; export const BackendProperties: coreClient.CompositeMapper = { - serializedName: "BackendProperties", - type: { - name: "Composite", - className: "BackendProperties", - modelProperties: { - serviceFabricCluster: { - serializedName: "serviceFabricCluster", - xmlName: "serviceFabricCluster", - type: { - name: "Composite", - className: "BackendServiceFabricClusterProperties" + serializedName: "BackendProperties", + type: { + name: "Composite", + className: "BackendProperties", + modelProperties: { + serviceFabricCluster: { + serializedName: "serviceFabricCluster", + xmlName: "serviceFabricCluster", + type: { + name: "Composite", + className: "BackendServiceFabricClusterProperties" + } + } } - } } - } }; export const BackendServiceFabricClusterProperties: coreClient.CompositeMapper = { - serializedName: "BackendServiceFabricClusterProperties", - type: { - name: "Composite", - className: "BackendServiceFabricClusterProperties", - modelProperties: { - clientCertificateId: { - serializedName: "clientCertificateId", - xmlName: "clientCertificateId", - type: { - name: "String" - } - }, - clientCertificatethumbprint: { - serializedName: "clientCertificatethumbprint", - xmlName: "clientCertificatethumbprint", - type: { - name: "String" - } - }, - maxPartitionResolutionRetries: { - serializedName: "maxPartitionResolutionRetries", - xmlName: "maxPartitionResolutionRetries", - type: { - name: "Number" - } - }, - managementEndpoints: { - serializedName: "managementEndpoints", - required: true, - xmlName: "managementEndpoints", - xmlElementName: - "BackendServiceFabricClusterPropertiesManagementEndpointsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - serverCertificateThumbprints: { - serializedName: "serverCertificateThumbprints", - xmlName: "serverCertificateThumbprints", - xmlElementName: - "BackendServiceFabricClusterPropertiesServerCertificateThumbprintsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - serverX509Names: { - serializedName: "serverX509Names", - xmlName: "serverX509Names", - xmlElementName: "X509CertificateName", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "X509CertificateName" + serializedName: "BackendServiceFabricClusterProperties", + type: { + name: "Composite", + className: "BackendServiceFabricClusterProperties", + modelProperties: { + clientCertificateId: { + serializedName: "clientCertificateId", + xmlName: "clientCertificateId", + type: { + name: "String" + } + }, + clientCertificatethumbprint: { + serializedName: "clientCertificatethumbprint", + xmlName: "clientCertificatethumbprint", + type: { + name: "String" + } + }, + maxPartitionResolutionRetries: { + serializedName: "maxPartitionResolutionRetries", + xmlName: "maxPartitionResolutionRetries", + type: { + name: "Number" + } + }, + managementEndpoints: { + serializedName: "managementEndpoints", + required: true, + xmlName: "managementEndpoints", + xmlElementName: + "BackendServiceFabricClusterPropertiesManagementEndpointsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + serverCertificateThumbprints: { + serializedName: "serverCertificateThumbprints", + xmlName: "serverCertificateThumbprints", + xmlElementName: + "BackendServiceFabricClusterPropertiesServerCertificateThumbprintsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + serverX509Names: { + serializedName: "serverX509Names", + xmlName: "serverX509Names", + xmlElementName: "X509CertificateName", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "X509CertificateName" + } + } + } } - } } - } } - } }; export const X509CertificateName: coreClient.CompositeMapper = { - serializedName: "X509CertificateName", - type: { - name: "Composite", - className: "X509CertificateName", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - issuerCertificateThumbprint: { - serializedName: "issuerCertificateThumbprint", - xmlName: "issuerCertificateThumbprint", - type: { - name: "String" + serializedName: "X509CertificateName", + type: { + name: "Composite", + className: "X509CertificateName", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + issuerCertificateThumbprint: { + serializedName: "issuerCertificateThumbprint", + xmlName: "issuerCertificateThumbprint", + type: { + name: "String" + } + } } - } } - } }; export const BackendCredentialsContract: coreClient.CompositeMapper = { - serializedName: "BackendCredentialsContract", - type: { - name: "Composite", - className: "BackendCredentialsContract", - modelProperties: { - certificateIds: { - constraints: { - MaxItems: 32 - }, - serializedName: "certificateIds", - xmlName: "certificateIds", - xmlElementName: "BackendCredentialsContractCertificateIdsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - certificate: { - constraints: { - MaxItems: 32 - }, - serializedName: "certificate", - xmlName: "certificate", - xmlElementName: "BackendCredentialsContractCertificateItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - query: { - serializedName: "query", - xmlName: "query", - type: { - name: "Dictionary", - value: { - type: { name: "Sequence", element: { type: { name: "String" } } } - } - } - }, - header: { - serializedName: "header", - xmlName: "header", - type: { - name: "Dictionary", - value: { - type: { name: "Sequence", element: { type: { name: "String" } } } - } - } - }, - authorization: { - serializedName: "authorization", - xmlName: "authorization", - type: { - name: "Composite", - className: "BackendAuthorizationHeaderCredentials" - } - } - } - } + serializedName: "BackendCredentialsContract", + type: { + name: "Composite", + className: "BackendCredentialsContract", + modelProperties: { + certificateIds: { + constraints: { + MaxItems: 32 + }, + serializedName: "certificateIds", + xmlName: "certificateIds", + xmlElementName: "BackendCredentialsContractCertificateIdsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + certificate: { + constraints: { + MaxItems: 32 + }, + serializedName: "certificate", + xmlName: "certificate", + xmlElementName: "BackendCredentialsContractCertificateItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + query: { + serializedName: "query", + xmlName: "query", + type: { + name: "Dictionary", + value: { + type: { name: "Sequence", element: { type: { name: "String" } } } + } + } + }, + header: { + serializedName: "header", + xmlName: "header", + type: { + name: "Dictionary", + value: { + type: { name: "Sequence", element: { type: { name: "String" } } } + } + } + }, + authorization: { + serializedName: "authorization", + xmlName: "authorization", + type: { + name: "Composite", + className: "BackendAuthorizationHeaderCredentials" + } + } + } + } }; export const BackendAuthorizationHeaderCredentials: coreClient.CompositeMapper = { - serializedName: "BackendAuthorizationHeaderCredentials", - type: { - name: "Composite", - className: "BackendAuthorizationHeaderCredentials", - modelProperties: { - scheme: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "scheme", - required: true, - xmlName: "scheme", - type: { - name: "String" - } - }, - parameter: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "parameter", - required: true, - xmlName: "parameter", - type: { - name: "String" - } - } - } - } + serializedName: "BackendAuthorizationHeaderCredentials", + type: { + name: "Composite", + className: "BackendAuthorizationHeaderCredentials", + modelProperties: { + scheme: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "scheme", + required: true, + xmlName: "scheme", + type: { + name: "String" + } + }, + parameter: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "parameter", + required: true, + xmlName: "parameter", + type: { + name: "String" + } + } + } + } }; export const BackendProxyContract: coreClient.CompositeMapper = { - serializedName: "BackendProxyContract", - type: { - name: "Composite", - className: "BackendProxyContract", - modelProperties: { - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "url", - required: true, - xmlName: "url", - type: { - name: "String" - } - }, - username: { - serializedName: "username", - xmlName: "username", - type: { - name: "String" - } - }, - password: { - serializedName: "password", - xmlName: "password", - type: { - name: "String" - } - } - } - } + serializedName: "BackendProxyContract", + type: { + name: "Composite", + className: "BackendProxyContract", + modelProperties: { + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "url", + required: true, + xmlName: "url", + type: { + name: "String" + } + }, + username: { + serializedName: "username", + xmlName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + xmlName: "password", + type: { + name: "String" + } + } + } + } }; export const BackendTlsProperties: coreClient.CompositeMapper = { - serializedName: "BackendTlsProperties", - type: { - name: "Composite", - className: "BackendTlsProperties", - modelProperties: { - validateCertificateChain: { - defaultValue: true, - serializedName: "validateCertificateChain", - xmlName: "validateCertificateChain", - type: { - name: "Boolean" - } - }, - validateCertificateName: { - defaultValue: true, - serializedName: "validateCertificateName", - xmlName: "validateCertificateName", - type: { - name: "Boolean" - } - } - } - } + serializedName: "BackendTlsProperties", + type: { + name: "Composite", + className: "BackendTlsProperties", + modelProperties: { + validateCertificateChain: { + defaultValue: true, + serializedName: "validateCertificateChain", + xmlName: "validateCertificateChain", + type: { + name: "Boolean" + } + }, + validateCertificateName: { + defaultValue: true, + serializedName: "validateCertificateName", + xmlName: "validateCertificateName", + type: { + name: "Boolean" + } + } + } + } }; export const BackendUpdateParameters: coreClient.CompositeMapper = { - serializedName: "BackendUpdateParameters", - type: { - name: "Composite", - className: "BackendUpdateParameters", - modelProperties: { - title: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties.properties", - xmlName: "properties.properties", - type: { - name: "Composite", - className: "BackendProperties" - } - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Composite", - className: "BackendCredentialsContract" - } - }, - proxy: { - serializedName: "properties.proxy", - xmlName: "properties.proxy", - type: { - name: "Composite", - className: "BackendProxyContract" - } - }, - tls: { - serializedName: "properties.tls", - xmlName: "properties.tls", - type: { - name: "Composite", - className: "BackendTlsProperties" - } - }, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String" - } - }, - protocol: { - serializedName: "properties.protocol", - xmlName: "properties.protocol", - type: { - name: "String" - } - } - } - } + serializedName: "BackendUpdateParameters", + type: { + name: "Composite", + className: "BackendUpdateParameters", + modelProperties: { + title: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties.properties", + xmlName: "properties.properties", + type: { + name: "Composite", + className: "BackendProperties" + } + }, + credentials: { + serializedName: "properties.credentials", + xmlName: "properties.credentials", + type: { + name: "Composite", + className: "BackendCredentialsContract" + } + }, + proxy: { + serializedName: "properties.proxy", + xmlName: "properties.proxy", + type: { + name: "Composite", + className: "BackendProxyContract" + } + }, + tls: { + serializedName: "properties.tls", + xmlName: "properties.tls", + type: { + name: "Composite", + className: "BackendTlsProperties" + } + }, + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.url", + xmlName: "properties.url", + type: { + name: "String" + } + }, + protocol: { + serializedName: "properties.protocol", + xmlName: "properties.protocol", + type: { + name: "String" + } + } + } + } }; export const CacheCollection: coreClient.CompositeMapper = { - serializedName: "CacheCollection", - type: { - name: "Composite", - className: "CacheCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "CacheContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CacheContract" + serializedName: "CacheCollection", + type: { + name: "Composite", + className: "CacheCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "CacheContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CacheContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const CacheUpdateParameters: coreClient.CompositeMapper = { - serializedName: "CacheUpdateParameters", - type: { - name: "Composite", - className: "CacheUpdateParameters", - modelProperties: { - description: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - connectionString: { - constraints: { - MaxLength: 300 - }, - serializedName: "properties.connectionString", - xmlName: "properties.connectionString", - type: { - name: "String" - } - }, - useFromLocation: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.useFromLocation", - xmlName: "properties.useFromLocation", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - } - } - } + serializedName: "CacheUpdateParameters", + type: { + name: "Composite", + className: "CacheUpdateParameters", + modelProperties: { + description: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + connectionString: { + constraints: { + MaxLength: 300 + }, + serializedName: "properties.connectionString", + xmlName: "properties.connectionString", + type: { + name: "String" + } + }, + useFromLocation: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.useFromLocation", + xmlName: "properties.useFromLocation", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + } + } + } }; export const CertificateCollection: coreClient.CompositeMapper = { - serializedName: "CertificateCollection", - type: { - name: "Composite", - className: "CertificateCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "CertificateContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateContract" + serializedName: "CertificateCollection", + type: { + name: "Composite", + className: "CertificateCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "CertificateContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const KeyVaultLastAccessStatusContractProperties: coreClient.CompositeMapper = { - serializedName: "KeyVaultLastAccessStatusContractProperties", - type: { - name: "Composite", - className: "KeyVaultLastAccessStatusContractProperties", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String" - } - }, - timeStampUtc: { - serializedName: "timeStampUtc", - xmlName: "timeStampUtc", - type: { - name: "DateTime" - } - } - } - } + serializedName: "KeyVaultLastAccessStatusContractProperties", + type: { + name: "Composite", + className: "KeyVaultLastAccessStatusContractProperties", + modelProperties: { + code: { + serializedName: "code", + xmlName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + xmlName: "message", + type: { + name: "String" + } + }, + timeStampUtc: { + serializedName: "timeStampUtc", + xmlName: "timeStampUtc", + type: { + name: "DateTime" + } + } + } + } }; export const KeyVaultContractCreateProperties: coreClient.CompositeMapper = { - serializedName: "KeyVaultContractCreateProperties", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties", - modelProperties: { - secretIdentifier: { - serializedName: "secretIdentifier", - xmlName: "secretIdentifier", - type: { - name: "String" - } - }, - identityClientId: { - serializedName: "identityClientId", - xmlName: "identityClientId", - type: { - name: "String" + serializedName: "KeyVaultContractCreateProperties", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties", + modelProperties: { + secretIdentifier: { + serializedName: "secretIdentifier", + xmlName: "secretIdentifier", + type: { + name: "String" + } + }, + identityClientId: { + serializedName: "identityClientId", + xmlName: "identityClientId", + type: { + name: "String" + } + } } - } } - } }; export const CertificateCreateOrUpdateParameters: coreClient.CompositeMapper = { - serializedName: "CertificateCreateOrUpdateParameters", - type: { - name: "Composite", - className: "CertificateCreateOrUpdateParameters", - modelProperties: { - data: { - serializedName: "properties.data", - xmlName: "properties.data", - type: { - name: "String" - } - }, - password: { - serializedName: "properties.password", - xmlName: "properties.password", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "CertificateCreateOrUpdateParameters", + type: { + name: "Composite", + className: "CertificateCreateOrUpdateParameters", + modelProperties: { + data: { + serializedName: "properties.data", + xmlName: "properties.data", + type: { + name: "String" + } + }, + password: { + serializedName: "properties.password", + xmlName: "properties.password", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const ConnectivityCheckRequest: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequest", - type: { - name: "Composite", - className: "ConnectivityCheckRequest", - modelProperties: { - source: { - serializedName: "source", - xmlName: "source", - type: { - name: "Composite", - className: "ConnectivityCheckRequestSource" - } - }, - destination: { - serializedName: "destination", - xmlName: "destination", - type: { - name: "Composite", - className: "ConnectivityCheckRequestDestination" - } - }, - preferredIPVersion: { - serializedName: "preferredIPVersion", - xmlName: "preferredIPVersion", - type: { - name: "String" - } - }, - protocol: { - serializedName: "protocol", - xmlName: "protocol", - type: { - name: "String" - } - }, - protocolConfiguration: { - serializedName: "protocolConfiguration", - xmlName: "protocolConfiguration", - type: { - name: "Composite", - className: "ConnectivityCheckRequestProtocolConfiguration" - } - } - } - } + serializedName: "ConnectivityCheckRequest", + type: { + name: "Composite", + className: "ConnectivityCheckRequest", + modelProperties: { + source: { + serializedName: "source", + xmlName: "source", + type: { + name: "Composite", + className: "ConnectivityCheckRequestSource" + } + }, + destination: { + serializedName: "destination", + xmlName: "destination", + type: { + name: "Composite", + className: "ConnectivityCheckRequestDestination" + } + }, + preferredIPVersion: { + serializedName: "preferredIPVersion", + xmlName: "preferredIPVersion", + type: { + name: "String" + } + }, + protocol: { + serializedName: "protocol", + xmlName: "protocol", + type: { + name: "String" + } + }, + protocolConfiguration: { + serializedName: "protocolConfiguration", + xmlName: "protocolConfiguration", + type: { + name: "Composite", + className: "ConnectivityCheckRequestProtocolConfiguration" + } + } + } + } }; export const ConnectivityCheckRequestSource: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequestSource", - type: { - name: "Composite", - className: "ConnectivityCheckRequestSource", - modelProperties: { - region: { - serializedName: "region", - required: true, - xmlName: "region", - type: { - name: "String" - } - }, - instance: { - serializedName: "instance", - xmlName: "instance", - type: { - name: "Number" - } - } - } - } + serializedName: "ConnectivityCheckRequestSource", + type: { + name: "Composite", + className: "ConnectivityCheckRequestSource", + modelProperties: { + region: { + serializedName: "region", + required: true, + xmlName: "region", + type: { + name: "String" + } + }, + instance: { + serializedName: "instance", + xmlName: "instance", + type: { + name: "Number" + } + } + } + } }; export const ConnectivityCheckRequestDestination: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequestDestination", - type: { - name: "Composite", - className: "ConnectivityCheckRequestDestination", - modelProperties: { - address: { - serializedName: "address", - required: true, - xmlName: "address", - type: { - name: "String" - } - }, - port: { - serializedName: "port", - required: true, - xmlName: "port", - type: { - name: "Number" - } - } - } - } + serializedName: "ConnectivityCheckRequestDestination", + type: { + name: "Composite", + className: "ConnectivityCheckRequestDestination", + modelProperties: { + address: { + serializedName: "address", + required: true, + xmlName: "address", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + required: true, + xmlName: "port", + type: { + name: "Number" + } + } + } + } }; export const ConnectivityCheckRequestProtocolConfiguration: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequestProtocolConfiguration", - type: { - name: "Composite", - className: "ConnectivityCheckRequestProtocolConfiguration", - modelProperties: { - httpConfiguration: { - serializedName: "HTTPConfiguration", - xmlName: "HTTPConfiguration", - type: { - name: "Composite", - className: - "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration" + serializedName: "ConnectivityCheckRequestProtocolConfiguration", + type: { + name: "Composite", + className: "ConnectivityCheckRequestProtocolConfiguration", + modelProperties: { + httpConfiguration: { + serializedName: "HTTPConfiguration", + xmlName: "HTTPConfiguration", + type: { + name: "Composite", + className: + "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration" + } + } } - } } - } }; export const ConnectivityCheckRequestProtocolConfigurationHttpConfiguration: coreClient.CompositeMapper = { - serializedName: - "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", - type: { - name: "Composite", - className: "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", - modelProperties: { - method: { - serializedName: "method", - xmlName: "method", - type: { - name: "String" - } - }, - validStatusCodes: { - serializedName: "validStatusCodes", - xmlName: "validStatusCodes", - xmlElementName: "ArrayItemschema", - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "HttpHeader", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HttpHeader" + serializedName: + "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", + type: { + name: "Composite", + className: "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", + modelProperties: { + method: { + serializedName: "method", + xmlName: "method", + type: { + name: "String" + } + }, + validStatusCodes: { + serializedName: "validStatusCodes", + xmlName: "validStatusCodes", + xmlElementName: "ArrayItemschema", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "HttpHeader", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HttpHeader" + } + } + } } - } } - } } - } }; export const HttpHeader: coreClient.CompositeMapper = { - serializedName: "HttpHeader", - type: { - name: "Composite", - className: "HttpHeader", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, - xmlName: "value", - type: { - name: "String" - } - } - } - } + serializedName: "HttpHeader", + type: { + name: "Composite", + className: "HttpHeader", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + xmlName: "value", + type: { + name: "String" + } + } + } + } }; export const ConnectivityCheckResponse: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckResponse", - type: { - name: "Composite", - className: "ConnectivityCheckResponse", - modelProperties: { - hops: { - serializedName: "hops", - readOnly: true, - xmlName: "hops", - xmlElementName: "ConnectivityHop", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityHop" - } - } - } - }, - connectionStatus: { - serializedName: "connectionStatus", - readOnly: true, - xmlName: "connectionStatus", - type: { - name: "String" - } - }, - avgLatencyInMs: { - serializedName: "avgLatencyInMs", - readOnly: true, - xmlName: "avgLatencyInMs", - type: { - name: "Number" - } - }, - minLatencyInMs: { - serializedName: "minLatencyInMs", - readOnly: true, - xmlName: "minLatencyInMs", - type: { - name: "Number" - } - }, - maxLatencyInMs: { - serializedName: "maxLatencyInMs", - readOnly: true, - xmlName: "maxLatencyInMs", - type: { - name: "Number" - } - }, - probesSent: { - serializedName: "probesSent", - readOnly: true, - xmlName: "probesSent", - type: { - name: "Number" - } - }, - probesFailed: { - serializedName: "probesFailed", - readOnly: true, - xmlName: "probesFailed", - type: { - name: "Number" - } - } - } - } + serializedName: "ConnectivityCheckResponse", + type: { + name: "Composite", + className: "ConnectivityCheckResponse", + modelProperties: { + hops: { + serializedName: "hops", + readOnly: true, + xmlName: "hops", + xmlElementName: "ConnectivityHop", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectivityHop" + } + } + } + }, + connectionStatus: { + serializedName: "connectionStatus", + readOnly: true, + xmlName: "connectionStatus", + type: { + name: "String" + } + }, + avgLatencyInMs: { + serializedName: "avgLatencyInMs", + readOnly: true, + xmlName: "avgLatencyInMs", + type: { + name: "Number" + } + }, + minLatencyInMs: { + serializedName: "minLatencyInMs", + readOnly: true, + xmlName: "minLatencyInMs", + type: { + name: "Number" + } + }, + maxLatencyInMs: { + serializedName: "maxLatencyInMs", + readOnly: true, + xmlName: "maxLatencyInMs", + type: { + name: "Number" + } + }, + probesSent: { + serializedName: "probesSent", + readOnly: true, + xmlName: "probesSent", + type: { + name: "Number" + } + }, + probesFailed: { + serializedName: "probesFailed", + readOnly: true, + xmlName: "probesFailed", + type: { + name: "Number" + } + } + } + } }; export const ConnectivityHop: coreClient.CompositeMapper = { - serializedName: "ConnectivityHop", - type: { - name: "Composite", - className: "ConnectivityHop", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" - } - }, - address: { - serializedName: "address", - readOnly: true, - xmlName: "address", - type: { - name: "String" - } - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - xmlName: "resourceId", - type: { - name: "String" - } - }, - nextHopIds: { - serializedName: "nextHopIds", - readOnly: true, - xmlName: "nextHopIds", - xmlElementName: "ConnectivityHopNextHopIdsItem", - type: { - name: "Sequence", - element: { + serializedName: "ConnectivityHop", + type: { + name: "Composite", + className: "ConnectivityHop", + modelProperties: { type: { - name: "String" - } - } - } - }, - issues: { - serializedName: "issues", - readOnly: true, - xmlName: "issues", - xmlElementName: "ConnectivityIssue", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityIssue" + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + readOnly: true, + xmlName: "address", + type: { + name: "String" + } + }, + resourceId: { + serializedName: "resourceId", + readOnly: true, + xmlName: "resourceId", + type: { + name: "String" + } + }, + nextHopIds: { + serializedName: "nextHopIds", + readOnly: true, + xmlName: "nextHopIds", + xmlElementName: "ConnectivityHopNextHopIdsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + issues: { + serializedName: "issues", + readOnly: true, + xmlName: "issues", + xmlElementName: "ConnectivityIssue", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectivityIssue" + } + } + } } - } } - } } - } }; export const ConnectivityIssue: coreClient.CompositeMapper = { - serializedName: "ConnectivityIssue", - type: { - name: "Composite", - className: "ConnectivityIssue", - modelProperties: { - origin: { - serializedName: "origin", - readOnly: true, - xmlName: "origin", - type: { - name: "String" - } - }, - severity: { - serializedName: "severity", - readOnly: true, - xmlName: "severity", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String" - } - }, - context: { - serializedName: "context", - readOnly: true, - xmlName: "context", - xmlElementName: "IssueContext", - type: { - name: "Sequence", - element: { + serializedName: "ConnectivityIssue", + type: { + name: "Composite", + className: "ConnectivityIssue", + modelProperties: { + origin: { + serializedName: "origin", + readOnly: true, + xmlName: "origin", + type: { + name: "String" + } + }, + severity: { + serializedName: "severity", + readOnly: true, + xmlName: "severity", + type: { + name: "String" + } + }, type: { - name: "Dictionary", - value: { type: { name: "String" } } + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "String" + } + }, + context: { + serializedName: "context", + readOnly: true, + xmlName: "context", + xmlElementName: "IssueContext", + type: { + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } } - } } - } } - } }; export const ContentTypeCollection: coreClient.CompositeMapper = { - serializedName: "ContentTypeCollection", - type: { - name: "Composite", - className: "ContentTypeCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ContentTypeContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContentTypeContract" + serializedName: "ContentTypeCollection", + type: { + name: "Composite", + className: "ContentTypeCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ContentTypeContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentTypeContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ContentItemCollection: coreClient.CompositeMapper = { - serializedName: "ContentItemCollection", - type: { - name: "Composite", - className: "ContentItemCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ContentItemContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContentItemContract" + serializedName: "ContentItemCollection", + type: { + name: "Composite", + className: "ContentItemCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ContentItemContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentItemContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const DeletedServicesCollection: coreClient.CompositeMapper = { - serializedName: "DeletedServicesCollection", - type: { - name: "Composite", - className: "DeletedServicesCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "DeletedServiceContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedServiceContract" + serializedName: "DeletedServicesCollection", + type: { + name: "Composite", + className: "DeletedServicesCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "DeletedServiceContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeletedServiceContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OperationListResult: coreClient.CompositeMapper = { - serializedName: "OperationListResult", - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "Operation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "Operation", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const Operation: coreClient.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", - xmlName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - }, - origin: { - serializedName: "origin", - xmlName: "origin", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + xmlName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + xmlName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + xmlName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } }; export const OperationDisplay: coreClient.CompositeMapper = { - serializedName: "OperationDisplay", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - xmlName: "provider", - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - xmlName: "operation", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - xmlName: "resource", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - } - } - } + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + xmlName: "provider", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + xmlName: "operation", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + xmlName: "resource", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + } + } + } }; export const ResourceSkuResults: coreClient.CompositeMapper = { - serializedName: "ResourceSkuResults", - type: { - name: "Composite", - className: "ResourceSkuResults", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ResourceSkuResult", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceSkuResult" + serializedName: "ResourceSkuResults", + type: { + name: "Composite", + className: "ResourceSkuResults", + modelProperties: { + value: { + serializedName: "value", + required: true, + xmlName: "value", + xmlElementName: "ResourceSkuResult", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuResult" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ResourceSkuResult: coreClient.CompositeMapper = { - serializedName: "ResourceSkuResult", - type: { - name: "Composite", - className: "ResourceSkuResult", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - xmlName: "resourceType", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ResourceSku" - } - }, - capacity: { - serializedName: "capacity", - xmlName: "capacity", - type: { - name: "Composite", - className: "ResourceSkuCapacity" - } - } - } - } + serializedName: "ResourceSkuResult", + type: { + name: "Composite", + className: "ResourceSkuResult", + modelProperties: { + resourceType: { + serializedName: "resourceType", + readOnly: true, + xmlName: "resourceType", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + xmlName: "sku", + type: { + name: "Composite", + className: "ResourceSku" + } + }, + capacity: { + serializedName: "capacity", + xmlName: "capacity", + type: { + name: "Composite", + className: "ResourceSkuCapacity" + } + } + } + } }; export const ResourceSku: coreClient.CompositeMapper = { - serializedName: "ResourceSku", - type: { - name: "Composite", - className: "ResourceSku", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" + serializedName: "ResourceSku", + type: { + name: "Composite", + className: "ResourceSku", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + } } - } } - } }; export const ResourceSkuCapacity: coreClient.CompositeMapper = { - serializedName: "ResourceSkuCapacity", - type: { - name: "Composite", - className: "ResourceSkuCapacity", - modelProperties: { - minimum: { - serializedName: "minimum", - readOnly: true, - xmlName: "minimum", - type: { - name: "Number" - } - }, - maximum: { - serializedName: "maximum", - readOnly: true, - xmlName: "maximum", - type: { - name: "Number" - } - }, - default: { - serializedName: "default", - readOnly: true, - xmlName: "default", - type: { - name: "Number" - } - }, - scaleType: { - serializedName: "scaleType", - readOnly: true, - xmlName: "scaleType", - type: { - name: "String" - } - } - } - } + serializedName: "ResourceSkuCapacity", + type: { + name: "Composite", + className: "ResourceSkuCapacity", + modelProperties: { + minimum: { + serializedName: "minimum", + readOnly: true, + xmlName: "minimum", + type: { + name: "Number" + } + }, + maximum: { + serializedName: "maximum", + readOnly: true, + xmlName: "maximum", + type: { + name: "Number" + } + }, + default: { + serializedName: "default", + readOnly: true, + xmlName: "default", + type: { + name: "Number" + } + }, + scaleType: { + serializedName: "scaleType", + readOnly: true, + xmlName: "scaleType", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceBackupRestoreParameters: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceBackupRestoreParameters", - type: { - name: "Composite", - className: "ApiManagementServiceBackupRestoreParameters", - modelProperties: { - storageAccount: { - serializedName: "storageAccount", - required: true, - xmlName: "storageAccount", - type: { - name: "String" - } - }, - containerName: { - serializedName: "containerName", - required: true, - xmlName: "containerName", - type: { - name: "String" - } - }, - backupName: { - serializedName: "backupName", - required: true, - xmlName: "backupName", - type: { - name: "String" - } - }, - accessType: { - defaultValue: "AccessKey", - serializedName: "accessType", - xmlName: "accessType", - type: { - name: "String" - } - }, - accessKey: { - serializedName: "accessKey", - xmlName: "accessKey", - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceBackupRestoreParameters", + type: { + name: "Composite", + className: "ApiManagementServiceBackupRestoreParameters", + modelProperties: { + storageAccount: { + serializedName: "storageAccount", + required: true, + xmlName: "storageAccount", + type: { + name: "String" + } + }, + containerName: { + serializedName: "containerName", + required: true, + xmlName: "containerName", + type: { + name: "String" + } + }, + backupName: { + serializedName: "backupName", + required: true, + xmlName: "backupName", + type: { + name: "String" + } + }, + accessType: { + defaultValue: "AccessKey", + serializedName: "accessType", + xmlName: "accessType", + type: { + name: "String" + } + }, + accessKey: { + serializedName: "accessKey", + xmlName: "accessKey", + type: { + name: "String" + } + }, + clientId: { + serializedName: "clientId", + xmlName: "clientId", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceBaseProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceBaseProperties", - type: { - name: "Composite", - className: "ApiManagementServiceBaseProperties", - modelProperties: { - notificationSenderEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "notificationSenderEmail", - xmlName: "notificationSenderEmail", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - xmlName: "provisioningState", - type: { - name: "String" - } - }, - targetProvisioningState: { - serializedName: "targetProvisioningState", - readOnly: true, - xmlName: "targetProvisioningState", - type: { - name: "String" - } - }, - createdAtUtc: { - serializedName: "createdAtUtc", - readOnly: true, - xmlName: "createdAtUtc", - type: { - name: "DateTime" - } - }, - gatewayUrl: { - serializedName: "gatewayUrl", - readOnly: true, - xmlName: "gatewayUrl", - type: { - name: "String" - } - }, - gatewayRegionalUrl: { - serializedName: "gatewayRegionalUrl", - readOnly: true, - xmlName: "gatewayRegionalUrl", - type: { - name: "String" - } - }, - portalUrl: { - serializedName: "portalUrl", - readOnly: true, - xmlName: "portalUrl", - type: { - name: "String" - } - }, - managementApiUrl: { - serializedName: "managementApiUrl", - readOnly: true, - xmlName: "managementApiUrl", - type: { - name: "String" - } - }, - scmUrl: { - serializedName: "scmUrl", - readOnly: true, - xmlName: "scmUrl", - type: { - name: "String" - } - }, - developerPortalUrl: { - serializedName: "developerPortalUrl", - readOnly: true, - xmlName: "developerPortalUrl", - type: { - name: "String" - } - }, - hostnameConfigurations: { - serializedName: "hostnameConfigurations", - xmlName: "hostnameConfigurations", - xmlElementName: "HostnameConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HostnameConfiguration" - } - } - } - }, - publicIPAddresses: { - serializedName: "publicIPAddresses", - readOnly: true, - xmlName: "publicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - privateIPAddresses: { - serializedName: "privateIPAddresses", - readOnly: true, - xmlName: "privateIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIpAddressId: { - serializedName: "publicIpAddressId", - xmlName: "publicIpAddressId", - type: { - name: "String" - } - }, - publicNetworkAccess: { - serializedName: "publicNetworkAccess", - xmlName: "publicNetworkAccess", - type: { - name: "String" - } - }, - virtualNetworkConfiguration: { - serializedName: "virtualNetworkConfiguration", - xmlName: "virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration" - } - }, - additionalLocations: { - serializedName: "additionalLocations", - xmlName: "additionalLocations", - xmlElementName: "AdditionalLocation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalLocation" - } - } - } - }, - customProperties: { - serializedName: "customProperties", - xmlName: "customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - certificates: { - serializedName: "certificates", - xmlName: "certificates", - xmlElementName: "CertificateConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateConfiguration" - } - } - } - }, - enableClientCertificate: { - defaultValue: false, - serializedName: "enableClientCertificate", - xmlName: "enableClientCertificate", - type: { - name: "Boolean" - } - }, - natGatewayState: { - serializedName: "natGatewayState", - xmlName: "natGatewayState", - type: { - name: "String" - } - }, - outboundPublicIPAddresses: { - serializedName: "outboundPublicIPAddresses", - readOnly: true, - xmlName: "outboundPublicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - disableGateway: { - defaultValue: false, - serializedName: "disableGateway", - xmlName: "disableGateway", - type: { - name: "Boolean" - } - }, - virtualNetworkType: { - defaultValue: "None", - serializedName: "virtualNetworkType", - xmlName: "virtualNetworkType", - type: { - name: "String" - } - }, - apiVersionConstraint: { - serializedName: "apiVersionConstraint", - xmlName: "apiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint" - } - }, - restore: { - defaultValue: false, - serializedName: "restore", - xmlName: "restore", - type: { - name: "Boolean" - } - }, - privateEndpointConnections: { - serializedName: "privateEndpointConnections", - xmlName: "privateEndpointConnections", - xmlElementName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper" + serializedName: "ApiManagementServiceBaseProperties", + type: { + name: "Composite", + className: "ApiManagementServiceBaseProperties", + modelProperties: { + notificationSenderEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "notificationSenderEmail", + xmlName: "notificationSenderEmail", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + xmlName: "provisioningState", + type: { + name: "String" + } + }, + targetProvisioningState: { + serializedName: "targetProvisioningState", + readOnly: true, + xmlName: "targetProvisioningState", + type: { + name: "String" + } + }, + createdAtUtc: { + serializedName: "createdAtUtc", + readOnly: true, + xmlName: "createdAtUtc", + type: { + name: "DateTime" + } + }, + gatewayUrl: { + serializedName: "gatewayUrl", + readOnly: true, + xmlName: "gatewayUrl", + type: { + name: "String" + } + }, + gatewayRegionalUrl: { + serializedName: "gatewayRegionalUrl", + readOnly: true, + xmlName: "gatewayRegionalUrl", + type: { + name: "String" + } + }, + portalUrl: { + serializedName: "portalUrl", + readOnly: true, + xmlName: "portalUrl", + type: { + name: "String" + } + }, + managementApiUrl: { + serializedName: "managementApiUrl", + readOnly: true, + xmlName: "managementApiUrl", + type: { + name: "String" + } + }, + scmUrl: { + serializedName: "scmUrl", + readOnly: true, + xmlName: "scmUrl", + type: { + name: "String" + } + }, + developerPortalUrl: { + serializedName: "developerPortalUrl", + readOnly: true, + xmlName: "developerPortalUrl", + type: { + name: "String" + } + }, + hostnameConfigurations: { + serializedName: "hostnameConfigurations", + xmlName: "hostnameConfigurations", + xmlElementName: "HostnameConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HostnameConfiguration" + } + } + } + }, + publicIPAddresses: { + serializedName: "publicIPAddresses", + readOnly: true, + xmlName: "publicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateIPAddresses: { + serializedName: "privateIPAddresses", + readOnly: true, + xmlName: "privateIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIpAddressId: { + serializedName: "publicIpAddressId", + xmlName: "publicIpAddressId", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + xmlName: "publicNetworkAccess", + type: { + name: "String" + } + }, + virtualNetworkConfiguration: { + serializedName: "virtualNetworkConfiguration", + xmlName: "virtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration" + } + }, + additionalLocations: { + serializedName: "additionalLocations", + xmlName: "additionalLocations", + xmlElementName: "AdditionalLocation", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalLocation" + } + } + } + }, + customProperties: { + serializedName: "customProperties", + xmlName: "customProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + certificates: { + serializedName: "certificates", + xmlName: "certificates", + xmlElementName: "CertificateConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateConfiguration" + } + } + } + }, + enableClientCertificate: { + defaultValue: false, + serializedName: "enableClientCertificate", + xmlName: "enableClientCertificate", + type: { + name: "Boolean" + } + }, + natGatewayState: { + serializedName: "natGatewayState", + xmlName: "natGatewayState", + type: { + name: "String" + } + }, + outboundPublicIPAddresses: { + serializedName: "outboundPublicIPAddresses", + readOnly: true, + xmlName: "outboundPublicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disableGateway: { + defaultValue: false, + serializedName: "disableGateway", + xmlName: "disableGateway", + type: { + name: "Boolean" + } + }, + virtualNetworkType: { + defaultValue: "None", + serializedName: "virtualNetworkType", + xmlName: "virtualNetworkType", + type: { + name: "String" + } + }, + apiVersionConstraint: { + serializedName: "apiVersionConstraint", + xmlName: "apiVersionConstraint", + type: { + name: "Composite", + className: "ApiVersionConstraint" + } + }, + restore: { + defaultValue: false, + serializedName: "restore", + xmlName: "restore", + type: { + name: "Boolean" + } + }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + xmlName: "privateEndpointConnections", + xmlElementName: "RemotePrivateEndpointConnectionWrapper", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RemotePrivateEndpointConnectionWrapper" + } + } + } + }, + platformVersion: { + serializedName: "platformVersion", + readOnly: true, + xmlName: "platformVersion", + type: { + name: "String" + } } - } } - }, - platformVersion: { - serializedName: "platformVersion", - readOnly: true, - xmlName: "platformVersion", - type: { - name: "String" - } - } } - } }; export const HostnameConfiguration: coreClient.CompositeMapper = { - serializedName: "HostnameConfiguration", - type: { - name: "Composite", - className: "HostnameConfiguration", - modelProperties: { - type: { - serializedName: "type", - required: true, - xmlName: "type", - type: { - name: "String" - } - }, - hostName: { - serializedName: "hostName", - required: true, - xmlName: "hostName", - type: { - name: "String" - } - }, - keyVaultId: { - serializedName: "keyVaultId", - xmlName: "keyVaultId", - type: { - name: "String" - } - }, - identityClientId: { - serializedName: "identityClientId", - xmlName: "identityClientId", - type: { - name: "String" - } - }, - encodedCertificate: { - serializedName: "encodedCertificate", - xmlName: "encodedCertificate", - type: { - name: "String" - } - }, - certificatePassword: { - serializedName: "certificatePassword", - xmlName: "certificatePassword", - type: { - name: "String" - } - }, - defaultSslBinding: { - defaultValue: false, - serializedName: "defaultSslBinding", - xmlName: "defaultSslBinding", - type: { - name: "Boolean" - } - }, - negotiateClientCertificate: { - defaultValue: false, - serializedName: "negotiateClientCertificate", - xmlName: "negotiateClientCertificate", - type: { - name: "Boolean" - } - }, - certificate: { - serializedName: "certificate", - xmlName: "certificate", - type: { - name: "Composite", - className: "CertificateInformation" - } - }, - certificateSource: { - serializedName: "certificateSource", - xmlName: "certificateSource", - type: { - name: "String" - } - }, - certificateStatus: { - serializedName: "certificateStatus", - xmlName: "certificateStatus", - type: { - name: "String" - } - } - } - } + serializedName: "HostnameConfiguration", + type: { + name: "Composite", + className: "HostnameConfiguration", + modelProperties: { + type: { + serializedName: "type", + required: true, + xmlName: "type", + type: { + name: "String" + } + }, + hostName: { + serializedName: "hostName", + required: true, + xmlName: "hostName", + type: { + name: "String" + } + }, + keyVaultId: { + serializedName: "keyVaultId", + xmlName: "keyVaultId", + type: { + name: "String" + } + }, + identityClientId: { + serializedName: "identityClientId", + xmlName: "identityClientId", + type: { + name: "String" + } + }, + encodedCertificate: { + serializedName: "encodedCertificate", + xmlName: "encodedCertificate", + type: { + name: "String" + } + }, + certificatePassword: { + serializedName: "certificatePassword", + xmlName: "certificatePassword", + type: { + name: "String" + } + }, + defaultSslBinding: { + defaultValue: false, + serializedName: "defaultSslBinding", + xmlName: "defaultSslBinding", + type: { + name: "Boolean" + } + }, + negotiateClientCertificate: { + defaultValue: false, + serializedName: "negotiateClientCertificate", + xmlName: "negotiateClientCertificate", + type: { + name: "Boolean" + } + }, + certificate: { + serializedName: "certificate", + xmlName: "certificate", + type: { + name: "Composite", + className: "CertificateInformation" + } + }, + certificateSource: { + serializedName: "certificateSource", + xmlName: "certificateSource", + type: { + name: "String" + } + }, + certificateStatus: { + serializedName: "certificateStatus", + xmlName: "certificateStatus", + type: { + name: "String" + } + } + } + } }; export const CertificateInformation: coreClient.CompositeMapper = { - serializedName: "CertificateInformation", - type: { - name: "Composite", - className: "CertificateInformation", - modelProperties: { - expiry: { - serializedName: "expiry", - required: true, - xmlName: "expiry", - type: { - name: "DateTime" - } - }, - thumbprint: { - serializedName: "thumbprint", - required: true, - xmlName: "thumbprint", - type: { - name: "String" - } - }, - subject: { - serializedName: "subject", - required: true, - xmlName: "subject", - type: { - name: "String" - } - } - } - } + serializedName: "CertificateInformation", + type: { + name: "Composite", + className: "CertificateInformation", + modelProperties: { + expiry: { + serializedName: "expiry", + required: true, + xmlName: "expiry", + type: { + name: "DateTime" + } + }, + thumbprint: { + serializedName: "thumbprint", + required: true, + xmlName: "thumbprint", + type: { + name: "String" + } + }, + subject: { + serializedName: "subject", + required: true, + xmlName: "subject", + type: { + name: "String" + } + } + } + } }; export const VirtualNetworkConfiguration: coreClient.CompositeMapper = { - serializedName: "VirtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration", - modelProperties: { - vnetid: { - serializedName: "vnetid", - readOnly: true, - xmlName: "vnetid", - type: { - name: "String" - } - }, - subnetname: { - serializedName: "subnetname", - readOnly: true, - xmlName: "subnetname", - type: { - name: "String" - } - }, - subnetResourceId: { - constraints: { - Pattern: new RegExp( - "^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$" - ) - }, - serializedName: "subnetResourceId", - xmlName: "subnetResourceId", - type: { - name: "String" - } - } - } - } + serializedName: "VirtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration", + modelProperties: { + vnetid: { + serializedName: "vnetid", + readOnly: true, + xmlName: "vnetid", + type: { + name: "String" + } + }, + subnetname: { + serializedName: "subnetname", + readOnly: true, + xmlName: "subnetname", + type: { + name: "String" + } + }, + subnetResourceId: { + constraints: { + Pattern: new RegExp( + "^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$" + ) + }, + serializedName: "subnetResourceId", + xmlName: "subnetResourceId", + type: { + name: "String" + } + } + } + } }; export const AdditionalLocation: coreClient.CompositeMapper = { - serializedName: "AdditionalLocation", - type: { - name: "Composite", - className: "AdditionalLocation", - modelProperties: { - location: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties" - } - }, - zones: { - serializedName: "zones", - xmlName: "zones", - xmlElementName: "AdditionalLocationZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIPAddresses: { - serializedName: "publicIPAddresses", - readOnly: true, - xmlName: "publicIPAddresses", - xmlElementName: "AdditionalLocationPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - privateIPAddresses: { - serializedName: "privateIPAddresses", - readOnly: true, - xmlName: "privateIPAddresses", - xmlElementName: "AdditionalLocationPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIpAddressId: { - serializedName: "publicIpAddressId", - xmlName: "publicIpAddressId", - type: { - name: "String" - } - }, - virtualNetworkConfiguration: { - serializedName: "virtualNetworkConfiguration", - xmlName: "virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration" - } - }, - gatewayRegionalUrl: { - serializedName: "gatewayRegionalUrl", - readOnly: true, - xmlName: "gatewayRegionalUrl", - type: { - name: "String" - } - }, - natGatewayState: { - serializedName: "natGatewayState", - xmlName: "natGatewayState", - type: { - name: "String" - } - }, - outboundPublicIPAddresses: { - serializedName: "outboundPublicIPAddresses", - readOnly: true, - xmlName: "outboundPublicIPAddresses", - xmlElementName: "AdditionalLocationOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AdditionalLocation", + type: { + name: "Composite", + className: "AdditionalLocation", + modelProperties: { + location: { + serializedName: "location", + required: true, + xmlName: "location", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + xmlName: "sku", + type: { + name: "Composite", + className: "ApiManagementServiceSkuProperties" + } + }, + zones: { + serializedName: "zones", + xmlName: "zones", + xmlElementName: "AdditionalLocationZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIPAddresses: { + serializedName: "publicIPAddresses", + readOnly: true, + xmlName: "publicIPAddresses", + xmlElementName: "AdditionalLocationPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateIPAddresses: { + serializedName: "privateIPAddresses", + readOnly: true, + xmlName: "privateIPAddresses", + xmlElementName: "AdditionalLocationPrivateIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIpAddressId: { + serializedName: "publicIpAddressId", + xmlName: "publicIpAddressId", + type: { + name: "String" + } + }, + virtualNetworkConfiguration: { + serializedName: "virtualNetworkConfiguration", + xmlName: "virtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration" + } + }, + gatewayRegionalUrl: { + serializedName: "gatewayRegionalUrl", + readOnly: true, + xmlName: "gatewayRegionalUrl", + type: { + name: "String" + } + }, + natGatewayState: { + serializedName: "natGatewayState", + xmlName: "natGatewayState", + type: { + name: "String" + } + }, + outboundPublicIPAddresses: { + serializedName: "outboundPublicIPAddresses", + readOnly: true, + xmlName: "outboundPublicIPAddresses", + xmlElementName: "AdditionalLocationOutboundPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disableGateway: { + defaultValue: false, + serializedName: "disableGateway", + xmlName: "disableGateway", + type: { + name: "Boolean" + } + }, + platformVersion: { + serializedName: "platformVersion", + readOnly: true, + xmlName: "platformVersion", + type: { + name: "String" + } } - } - } - }, - disableGateway: { - defaultValue: false, - serializedName: "disableGateway", - xmlName: "disableGateway", - type: { - name: "Boolean" } - }, - platformVersion: { - serializedName: "platformVersion", - readOnly: true, - xmlName: "platformVersion", - type: { - name: "String" - } - } } - } }; export const ApiManagementServiceSkuProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceSkuProperties", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - capacity: { - serializedName: "capacity", - required: true, - xmlName: "capacity", - type: { - name: "Number" - } - } - } - } + serializedName: "ApiManagementServiceSkuProperties", + type: { + name: "Composite", + className: "ApiManagementServiceSkuProperties", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + required: true, + xmlName: "capacity", + type: { + name: "Number" + } + } + } + } }; export const CertificateConfiguration: coreClient.CompositeMapper = { - serializedName: "CertificateConfiguration", - type: { - name: "Composite", - className: "CertificateConfiguration", - modelProperties: { - encodedCertificate: { - serializedName: "encodedCertificate", - xmlName: "encodedCertificate", - type: { - name: "String" - } - }, - certificatePassword: { - serializedName: "certificatePassword", - xmlName: "certificatePassword", - type: { - name: "String" - } - }, - storeName: { - serializedName: "storeName", - required: true, - xmlName: "storeName", - type: { - name: "String" - } - }, - certificate: { - serializedName: "certificate", - xmlName: "certificate", - type: { - name: "Composite", - className: "CertificateInformation" - } - } - } - } + serializedName: "CertificateConfiguration", + type: { + name: "Composite", + className: "CertificateConfiguration", + modelProperties: { + encodedCertificate: { + serializedName: "encodedCertificate", + xmlName: "encodedCertificate", + type: { + name: "String" + } + }, + certificatePassword: { + serializedName: "certificatePassword", + xmlName: "certificatePassword", + type: { + name: "String" + } + }, + storeName: { + serializedName: "storeName", + required: true, + xmlName: "storeName", + type: { + name: "String" + } + }, + certificate: { + serializedName: "certificate", + xmlName: "certificate", + type: { + name: "Composite", + className: "CertificateInformation" + } + } + } + } }; export const ApiVersionConstraint: coreClient.CompositeMapper = { - serializedName: "ApiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint", - modelProperties: { - minApiVersion: { - serializedName: "minApiVersion", - xmlName: "minApiVersion", - type: { - name: "String" + serializedName: "ApiVersionConstraint", + type: { + name: "Composite", + className: "ApiVersionConstraint", + modelProperties: { + minApiVersion: { + serializedName: "minApiVersion", + xmlName: "minApiVersion", + type: { + name: "String" + } + } } - } } - } }; export const RemotePrivateEndpointConnectionWrapper: coreClient.CompositeMapper = { - serializedName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "String" - } - }, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - xmlName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "ArmIdWrapper" - } - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - xmlName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String" - } - }, - groupIds: { - serializedName: "properties.groupIds", - readOnly: true, - xmlName: "properties.groupIds", - xmlElementName: - "PrivateEndpointConnectionWrapperPropertiesGroupIdsItem", - type: { - name: "Sequence", - element: { + serializedName: "RemotePrivateEndpointConnectionWrapper", + type: { + name: "Composite", + className: "RemotePrivateEndpointConnectionWrapper", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, type: { - name: "String" + serializedName: "type", + xmlName: "type", + type: { + name: "String" + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + xmlName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "ArmIdWrapper" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + xmlName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + xmlName: "properties.provisioningState", + type: { + name: "String" + } + }, + groupIds: { + serializedName: "properties.groupIds", + readOnly: true, + xmlName: "properties.groupIds", + xmlElementName: + "PrivateEndpointConnectionWrapperPropertiesGroupIdsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const ArmIdWrapper: coreClient.CompositeMapper = { - serializedName: "ArmIdWrapper", - type: { - name: "Composite", - className: "ArmIdWrapper", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" + serializedName: "ArmIdWrapper", + type: { + name: "Composite", + className: "ArmIdWrapper", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + } } - } } - } }; export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { - serializedName: "PrivateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - modelProperties: { - status: { - serializedName: "status", - xmlName: "status", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - actionsRequired: { - serializedName: "actionsRequired", - xmlName: "actionsRequired", - type: { - name: "String" - } - } - } - } + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + xmlName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + xmlName: "actionsRequired", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceIdentity: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceIdentity", - type: { - name: "Composite", - className: "ApiManagementServiceIdentity", - modelProperties: { - type: { - serializedName: "type", - required: true, - xmlName: "type", - type: { - name: "String" - } - }, - principalId: { - serializedName: "principalId", - readOnly: true, - xmlName: "principalId", - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - xmlName: "tenantId", - type: { - name: "Uuid" - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - xmlName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserIdentityProperties" } - } - } - } - } - } + serializedName: "ApiManagementServiceIdentity", + type: { + name: "Composite", + className: "ApiManagementServiceIdentity", + modelProperties: { + type: { + serializedName: "type", + required: true, + xmlName: "type", + type: { + name: "String" + } + }, + principalId: { + serializedName: "principalId", + readOnly: true, + xmlName: "principalId", + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + xmlName: "tenantId", + type: { + name: "Uuid" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + xmlName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserIdentityProperties" } + } + } + } + } + } }; export const UserIdentityProperties: coreClient.CompositeMapper = { - serializedName: "UserIdentityProperties", - type: { - name: "Composite", - className: "UserIdentityProperties", - modelProperties: { - principalId: { - serializedName: "principalId", - xmlName: "principalId", - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String" + serializedName: "UserIdentityProperties", + type: { + name: "Composite", + className: "UserIdentityProperties", + modelProperties: { + principalId: { + serializedName: "principalId", + xmlName: "principalId", + type: { + name: "String" + } + }, + clientId: { + serializedName: "clientId", + xmlName: "clientId", + type: { + name: "String" + } + } } - } } - } }; export const SystemData: coreClient.CompositeMapper = { - serializedName: "SystemData", - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - xmlName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - xmlName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - xmlName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - xmlName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - xmlName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - xmlName: "lastModifiedAt", - type: { - name: "DateTime" - } - } - } - } + serializedName: "SystemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + xmlName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + xmlName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + xmlName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + xmlName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + xmlName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + xmlName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } }; export const ApimResource: coreClient.CompositeMapper = { - serializedName: "ApimResource", - type: { - name: "Composite", - className: "ApimResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - xmlName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + serializedName: "ApimResource", + type: { + name: "Composite", + className: "ApimResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + xmlName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } }; export const ApiManagementServiceListResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceListResult", - type: { - name: "Composite", - className: "ApiManagementServiceListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ApiManagementServiceResource", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementServiceResource" + serializedName: "ApiManagementServiceListResult", + type: { + name: "Composite", + className: "ApiManagementServiceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + xmlName: "value", + xmlElementName: "ApiManagementServiceResource", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementServiceResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ApiManagementServiceGetSsoTokenResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceGetSsoTokenResult", - type: { - name: "Composite", - className: "ApiManagementServiceGetSsoTokenResult", - modelProperties: { - redirectUri: { - serializedName: "redirectUri", - xmlName: "redirectUri", - type: { - name: "String" + serializedName: "ApiManagementServiceGetSsoTokenResult", + type: { + name: "Composite", + className: "ApiManagementServiceGetSsoTokenResult", + modelProperties: { + redirectUri: { + serializedName: "redirectUri", + xmlName: "redirectUri", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceCheckNameAvailabilityParameters: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceCheckNameAvailabilityParameters", - type: { - name: "Composite", - className: "ApiManagementServiceCheckNameAvailabilityParameters", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" + serializedName: "ApiManagementServiceCheckNameAvailabilityParameters", + type: { + name: "Composite", + className: "ApiManagementServiceCheckNameAvailabilityParameters", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceNameAvailabilityResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceNameAvailabilityResult", - type: { - name: "Composite", - className: "ApiManagementServiceNameAvailabilityResult", - modelProperties: { - nameAvailable: { - serializedName: "nameAvailable", - readOnly: true, - xmlName: "nameAvailable", - type: { - name: "Boolean" - } - }, - message: { - serializedName: "message", - readOnly: true, - xmlName: "message", - type: { - name: "String" - } - }, - reason: { - serializedName: "reason", - xmlName: "reason", - type: { - name: "Enum", - allowedValues: ["Valid", "Invalid", "AlreadyExists"] - } - } - } - } + serializedName: "ApiManagementServiceNameAvailabilityResult", + type: { + name: "Composite", + className: "ApiManagementServiceNameAvailabilityResult", + modelProperties: { + nameAvailable: { + serializedName: "nameAvailable", + readOnly: true, + xmlName: "nameAvailable", + type: { + name: "Boolean" + } + }, + message: { + serializedName: "message", + readOnly: true, + xmlName: "message", + type: { + name: "String" + } + }, + reason: { + serializedName: "reason", + xmlName: "reason", + type: { + name: "Enum", + allowedValues: ["Valid", "Invalid", "AlreadyExists"] + } + } + } + } }; export const ApiManagementServiceGetDomainOwnershipIdentifierResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceGetDomainOwnershipIdentifierResult", - type: { - name: "Composite", - className: "ApiManagementServiceGetDomainOwnershipIdentifierResult", - modelProperties: { - domainOwnershipIdentifier: { - serializedName: "domainOwnershipIdentifier", - readOnly: true, - xmlName: "domainOwnershipIdentifier", - type: { - name: "String" + serializedName: "ApiManagementServiceGetDomainOwnershipIdentifierResult", + type: { + name: "Composite", + className: "ApiManagementServiceGetDomainOwnershipIdentifierResult", + modelProperties: { + domainOwnershipIdentifier: { + serializedName: "domainOwnershipIdentifier", + readOnly: true, + xmlName: "domainOwnershipIdentifier", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceApplyNetworkConfigurationParameters: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceApplyNetworkConfigurationParameters", - type: { - name: "Composite", - className: "ApiManagementServiceApplyNetworkConfigurationParameters", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "ApiManagementServiceApplyNetworkConfigurationParameters", + type: { + name: "Composite", + className: "ApiManagementServiceApplyNetworkConfigurationParameters", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const EmailTemplateCollection: coreClient.CompositeMapper = { - serializedName: "EmailTemplateCollection", - type: { - name: "Composite", - className: "EmailTemplateCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "EmailTemplateContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailTemplateContract" + serializedName: "EmailTemplateCollection", + type: { + name: "Composite", + className: "EmailTemplateCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "EmailTemplateContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EmailTemplateContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const EmailTemplateParametersContractProperties: coreClient.CompositeMapper = { - serializedName: "EmailTemplateParametersContractProperties", - type: { - name: "Composite", - className: "EmailTemplateParametersContractProperties", - modelProperties: { - name: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - title: { - constraints: { - MaxLength: 4096, - MinLength: 1 - }, - serializedName: "title", - xmlName: "title", - type: { - name: "String" - } - }, - description: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - } - } - } + serializedName: "EmailTemplateParametersContractProperties", + type: { + name: "Composite", + className: "EmailTemplateParametersContractProperties", + modelProperties: { + name: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + title: { + constraints: { + MaxLength: 4096, + MinLength: 1 + }, + serializedName: "title", + xmlName: "title", + type: { + name: "String" + } + }, + description: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + } + } + } }; export const EmailTemplateUpdateParameters: coreClient.CompositeMapper = { - serializedName: "EmailTemplateUpdateParameters", - type: { - name: "Composite", - className: "EmailTemplateUpdateParameters", - modelProperties: { - subject: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.subject", - xmlName: "properties.subject", - type: { - name: "String" - } - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - body: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.body", - xmlName: "properties.body", - type: { - name: "String" - } - }, - parameters: { - serializedName: "properties.parameters", - xmlName: "properties.parameters", - xmlElementName: "EmailTemplateParametersContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailTemplateParametersContractProperties" + serializedName: "EmailTemplateUpdateParameters", + type: { + name: "Composite", + className: "EmailTemplateUpdateParameters", + modelProperties: { + subject: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.subject", + xmlName: "properties.subject", + type: { + name: "String" + } + }, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + body: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.body", + xmlName: "properties.body", + type: { + name: "String" + } + }, + parameters: { + serializedName: "properties.parameters", + xmlName: "properties.parameters", + xmlElementName: "EmailTemplateParametersContractProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EmailTemplateParametersContractProperties" + } + } + } } - } } - } } - } }; export const GatewayCollection: coreClient.CompositeMapper = { - serializedName: "GatewayCollection", - type: { - name: "Composite", - className: "GatewayCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GatewayContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayContract" + serializedName: "GatewayCollection", + type: { + name: "Composite", + className: "GatewayCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "GatewayContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GatewayContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ResourceLocationDataContract: coreClient.CompositeMapper = { - serializedName: "ResourceLocationDataContract", - type: { - name: "Composite", - className: "ResourceLocationDataContract", - modelProperties: { - name: { - constraints: { - MaxLength: 256 - }, - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - city: { - constraints: { - MaxLength: 256 - }, - serializedName: "city", - xmlName: "city", - type: { - name: "String" - } - }, - district: { - constraints: { - MaxLength: 256 - }, - serializedName: "district", - xmlName: "district", - type: { - name: "String" - } - }, - countryOrRegion: { - constraints: { - MaxLength: 256 - }, - serializedName: "countryOrRegion", - xmlName: "countryOrRegion", - type: { - name: "String" - } - } - } - } + serializedName: "ResourceLocationDataContract", + type: { + name: "Composite", + className: "ResourceLocationDataContract", + modelProperties: { + name: { + constraints: { + MaxLength: 256 + }, + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + city: { + constraints: { + MaxLength: 256 + }, + serializedName: "city", + xmlName: "city", + type: { + name: "String" + } + }, + district: { + constraints: { + MaxLength: 256 + }, + serializedName: "district", + xmlName: "district", + type: { + name: "String" + } + }, + countryOrRegion: { + constraints: { + MaxLength: 256 + }, + serializedName: "countryOrRegion", + xmlName: "countryOrRegion", + type: { + name: "String" + } + } + } + } }; export const GatewayKeysContract: coreClient.CompositeMapper = { - serializedName: "GatewayKeysContract", - type: { - name: "Composite", - className: "GatewayKeysContract", - modelProperties: { - primary: { - serializedName: "primary", - xmlName: "primary", - type: { - name: "String" - } - }, - secondary: { - serializedName: "secondary", - xmlName: "secondary", - type: { - name: "String" + serializedName: "GatewayKeysContract", + type: { + name: "Composite", + className: "GatewayKeysContract", + modelProperties: { + primary: { + serializedName: "primary", + xmlName: "primary", + type: { + name: "String" + } + }, + secondary: { + serializedName: "secondary", + xmlName: "secondary", + type: { + name: "String" + } + } } - } } - } }; export const GatewayKeyRegenerationRequestContract: coreClient.CompositeMapper = { - serializedName: "GatewayKeyRegenerationRequestContract", - type: { - name: "Composite", - className: "GatewayKeyRegenerationRequestContract", - modelProperties: { - keyType: { - serializedName: "keyType", - required: true, - xmlName: "keyType", - type: { - name: "Enum", - allowedValues: ["primary", "secondary"] + serializedName: "GatewayKeyRegenerationRequestContract", + type: { + name: "Composite", + className: "GatewayKeyRegenerationRequestContract", + modelProperties: { + keyType: { + serializedName: "keyType", + required: true, + xmlName: "keyType", + type: { + name: "Enum", + allowedValues: ["primary", "secondary"] + } + } } - } } - } }; export const GatewayTokenRequestContract: coreClient.CompositeMapper = { - serializedName: "GatewayTokenRequestContract", - type: { - name: "Composite", - className: "GatewayTokenRequestContract", - modelProperties: { - keyType: { - serializedName: "keyType", - required: true, - xmlName: "keyType", - type: { - name: "Enum", - allowedValues: ["primary", "secondary"] - } - }, - expiry: { - serializedName: "expiry", - required: true, - xmlName: "expiry", - type: { - name: "DateTime" - } - } - } - } + serializedName: "GatewayTokenRequestContract", + type: { + name: "Composite", + className: "GatewayTokenRequestContract", + modelProperties: { + keyType: { + serializedName: "keyType", + required: true, + xmlName: "keyType", + type: { + name: "Enum", + allowedValues: ["primary", "secondary"] + } + }, + expiry: { + serializedName: "expiry", + required: true, + xmlName: "expiry", + type: { + name: "DateTime" + } + } + } + } }; export const GatewayTokenContract: coreClient.CompositeMapper = { - serializedName: "GatewayTokenContract", - type: { - name: "Composite", - className: "GatewayTokenContract", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" + serializedName: "GatewayTokenContract", + type: { + name: "Composite", + className: "GatewayTokenContract", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + } } - } } - } }; export const GatewayHostnameConfigurationCollection: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfigurationCollection", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GatewayHostnameConfigurationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayHostnameConfigurationContract" + serializedName: "GatewayHostnameConfigurationCollection", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "GatewayHostnameConfigurationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GatewayHostnameConfigurationContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const GatewayCertificateAuthorityCollection: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthorityCollection", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GatewayCertificateAuthorityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayCertificateAuthorityContract" + serializedName: "GatewayCertificateAuthorityCollection", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "GatewayCertificateAuthorityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GatewayCertificateAuthorityContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const GroupCollection: coreClient.CompositeMapper = { - serializedName: "GroupCollection", - type: { - name: "Composite", - className: "GroupCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "GroupContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupContract" + serializedName: "GroupCollection", + type: { + name: "Composite", + className: "GroupCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "GroupContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const GroupContractProperties: coreClient.CompositeMapper = { - serializedName: "GroupContractProperties", - type: { - name: "Composite", - className: "GroupContractProperties", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - builtIn: { - serializedName: "builtIn", - readOnly: true, - xmlName: "builtIn", - type: { - name: "Boolean" - } - }, - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"] - } - }, - externalId: { - serializedName: "externalId", - xmlName: "externalId", - type: { - name: "String" - } - } - } - } + serializedName: "GroupContractProperties", + type: { + name: "Composite", + className: "GroupContractProperties", + modelProperties: { + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + builtIn: { + serializedName: "builtIn", + readOnly: true, + xmlName: "builtIn", + type: { + name: "Boolean" + } + }, + type: { + serializedName: "type", + xmlName: "type", + type: { + name: "Enum", + allowedValues: ["custom", "system", "external"] + } + }, + externalId: { + serializedName: "externalId", + xmlName: "externalId", + type: { + name: "String" + } + } + } + } }; export const GroupCreateParameters: coreClient.CompositeMapper = { - serializedName: "GroupCreateParameters", - type: { - name: "Composite", - className: "GroupCreateParameters", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"] - } - }, - externalId: { - serializedName: "properties.externalId", - xmlName: "properties.externalId", - type: { - name: "String" - } - } - } - } + serializedName: "GroupCreateParameters", + type: { + name: "Composite", + className: "GroupCreateParameters", + modelProperties: { + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "Enum", + allowedValues: ["custom", "system", "external"] + } + }, + externalId: { + serializedName: "properties.externalId", + xmlName: "properties.externalId", + type: { + name: "String" + } + } + } + } }; export const GroupUpdateParameters: coreClient.CompositeMapper = { - serializedName: "GroupUpdateParameters", - type: { - name: "Composite", - className: "GroupUpdateParameters", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"] - } - }, - externalId: { - serializedName: "properties.externalId", - xmlName: "properties.externalId", - type: { - name: "String" - } - } - } - } + serializedName: "GroupUpdateParameters", + type: { + name: "Composite", + className: "GroupUpdateParameters", + modelProperties: { + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "Enum", + allowedValues: ["custom", "system", "external"] + } + }, + externalId: { + serializedName: "properties.externalId", + xmlName: "properties.externalId", + type: { + name: "String" + } + } + } + } }; export const UserCollection: coreClient.CompositeMapper = { - serializedName: "UserCollection", - type: { - name: "Composite", - className: "UserCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "UserContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserContract" + serializedName: "UserCollection", + type: { + name: "Composite", + className: "UserCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "UserContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const UserEntityBaseParameters: coreClient.CompositeMapper = { - serializedName: "UserEntityBaseParameters", - type: { - name: "Composite", - className: "UserEntityBaseParameters", - modelProperties: { - state: { - defaultValue: "active", - serializedName: "state", - xmlName: "state", - type: { - name: "String" - } - }, - note: { - serializedName: "note", - xmlName: "note", - type: { - name: "String" - } - }, - identities: { - serializedName: "identities", - xmlName: "identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" + serializedName: "UserEntityBaseParameters", + type: { + name: "Composite", + className: "UserEntityBaseParameters", + modelProperties: { + state: { + defaultValue: "active", + serializedName: "state", + xmlName: "state", + type: { + name: "String" + } + }, + note: { + serializedName: "note", + xmlName: "note", + type: { + name: "String" + } + }, + identities: { + serializedName: "identities", + xmlName: "identities", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } } - } } - } } - } }; export const UserIdentityContract: coreClient.CompositeMapper = { - serializedName: "UserIdentityContract", - type: { - name: "Composite", - className: "UserIdentityContract", - modelProperties: { - provider: { - serializedName: "provider", - xmlName: "provider", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" + serializedName: "UserIdentityContract", + type: { + name: "Composite", + className: "UserIdentityContract", + modelProperties: { + provider: { + serializedName: "provider", + xmlName: "provider", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderList: coreClient.CompositeMapper = { - serializedName: "IdentityProviderList", - type: { - name: "Composite", - className: "IdentityProviderList", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "IdentityProviderContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IdentityProviderContract" + serializedName: "IdentityProviderList", + type: { + name: "Composite", + className: "IdentityProviderList", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "IdentityProviderContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IdentityProviderContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const IdentityProviderBaseParameters: coreClient.CompositeMapper = { - serializedName: "IdentityProviderBaseParameters", - type: { - name: "Composite", - className: "IdentityProviderBaseParameters", - modelProperties: { - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "String" - } - }, - signinTenant: { - serializedName: "signinTenant", - xmlName: "signinTenant", - type: { - name: "String" - } - }, - allowedTenants: { - constraints: { - MaxItems: 32 - }, - serializedName: "allowedTenants", - xmlName: "allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { + serializedName: "IdentityProviderBaseParameters", + type: { + name: "Composite", + className: "IdentityProviderBaseParameters", + modelProperties: { type: { - name: "String" - } - } - } - }, - authority: { - serializedName: "authority", - xmlName: "authority", - type: { - name: "String" - } - }, - signupPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "signupPolicyName", - xmlName: "signupPolicyName", - type: { - name: "String" - } - }, - signinPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "signinPolicyName", - xmlName: "signinPolicyName", - type: { - name: "String" - } - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "profileEditingPolicyName", - xmlName: "profileEditingPolicyName", - type: { - name: "String" - } - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "passwordResetPolicyName", - xmlName: "passwordResetPolicyName", - type: { - name: "String" - } - }, - clientLibrary: { - constraints: { - MaxLength: 16 - }, - serializedName: "clientLibrary", - xmlName: "clientLibrary", - type: { - name: "String" - } - } - } - } + serializedName: "type", + xmlName: "type", + type: { + name: "String" + } + }, + signinTenant: { + serializedName: "signinTenant", + xmlName: "signinTenant", + type: { + name: "String" + } + }, + allowedTenants: { + constraints: { + MaxItems: 32 + }, + serializedName: "allowedTenants", + xmlName: "allowedTenants", + xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + authority: { + serializedName: "authority", + xmlName: "authority", + type: { + name: "String" + } + }, + signupPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "signupPolicyName", + xmlName: "signupPolicyName", + type: { + name: "String" + } + }, + signinPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "signinPolicyName", + xmlName: "signinPolicyName", + type: { + name: "String" + } + }, + profileEditingPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "profileEditingPolicyName", + xmlName: "profileEditingPolicyName", + type: { + name: "String" + } + }, + passwordResetPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "passwordResetPolicyName", + xmlName: "passwordResetPolicyName", + type: { + name: "String" + } + }, + clientLibrary: { + constraints: { + MaxLength: 16 + }, + serializedName: "clientLibrary", + xmlName: "clientLibrary", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderUpdateParameters: coreClient.CompositeMapper = { - serializedName: "IdentityProviderUpdateParameters", - type: { - name: "Composite", - className: "IdentityProviderUpdateParameters", - modelProperties: { - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - signinTenant: { - serializedName: "properties.signinTenant", - xmlName: "properties.signinTenant", - type: { - name: "String" - } - }, - allowedTenants: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.allowedTenants", - xmlName: "properties.allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { + serializedName: "IdentityProviderUpdateParameters", + type: { + name: "Composite", + className: "IdentityProviderUpdateParameters", + modelProperties: { type: { - name: "String" - } - } - } - }, - authority: { - serializedName: "properties.authority", - xmlName: "properties.authority", - type: { - name: "String" - } - }, - signupPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signupPolicyName", - xmlName: "properties.signupPolicyName", - type: { - name: "String" - } - }, - signinPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signinPolicyName", - xmlName: "properties.signinPolicyName", - type: { - name: "String" - } - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.profileEditingPolicyName", - xmlName: "properties.profileEditingPolicyName", - type: { - name: "String" - } - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.passwordResetPolicyName", - xmlName: "properties.passwordResetPolicyName", - type: { - name: "String" - } - }, - clientLibrary: { - constraints: { - MaxLength: 16 - }, - serializedName: "properties.clientLibrary", - xmlName: "properties.clientLibrary", - type: { - name: "String" - } - }, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + signinTenant: { + serializedName: "properties.signinTenant", + xmlName: "properties.signinTenant", + type: { + name: "String" + } + }, + allowedTenants: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.allowedTenants", + xmlName: "properties.allowedTenants", + xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + authority: { + serializedName: "properties.authority", + xmlName: "properties.authority", + type: { + name: "String" + } + }, + signupPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signupPolicyName", + xmlName: "properties.signupPolicyName", + type: { + name: "String" + } + }, + signinPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signinPolicyName", + xmlName: "properties.signinPolicyName", + type: { + name: "String" + } + }, + profileEditingPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.profileEditingPolicyName", + xmlName: "properties.profileEditingPolicyName", + type: { + name: "String" + } + }, + passwordResetPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.passwordResetPolicyName", + xmlName: "properties.passwordResetPolicyName", + type: { + name: "String" + } + }, + clientLibrary: { + constraints: { + MaxLength: 16 + }, + serializedName: "properties.clientLibrary", + xmlName: "properties.clientLibrary", + type: { + name: "String" + } + }, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + } + } + } }; export const ClientSecretContract: coreClient.CompositeMapper = { - serializedName: "ClientSecretContract", - type: { - name: "Composite", - className: "ClientSecretContract", - modelProperties: { - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" + serializedName: "ClientSecretContract", + type: { + name: "Composite", + className: "ClientSecretContract", + modelProperties: { + clientSecret: { + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } + } } - } } - } }; export const LoggerCollection: coreClient.CompositeMapper = { - serializedName: "LoggerCollection", - type: { - name: "Composite", - className: "LoggerCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "LoggerContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoggerContract" + serializedName: "LoggerCollection", + type: { + name: "Composite", + className: "LoggerCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "LoggerContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LoggerContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const LoggerUpdateContract: coreClient.CompositeMapper = { - serializedName: "LoggerUpdateContract", - type: { - name: "Composite", - className: "LoggerUpdateContract", - modelProperties: { - loggerType: { - serializedName: "properties.loggerType", - xmlName: "properties.loggerType", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - isBuffered: { - serializedName: "properties.isBuffered", - xmlName: "properties.isBuffered", - type: { - name: "Boolean" - } - } - } - } + serializedName: "LoggerUpdateContract", + type: { + name: "Composite", + className: "LoggerUpdateContract", + modelProperties: { + loggerType: { + serializedName: "properties.loggerType", + xmlName: "properties.loggerType", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + credentials: { + serializedName: "properties.credentials", + xmlName: "properties.credentials", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + isBuffered: { + serializedName: "properties.isBuffered", + xmlName: "properties.isBuffered", + type: { + name: "Boolean" + } + } + } + } }; export const NamedValueCollection: coreClient.CompositeMapper = { - serializedName: "NamedValueCollection", - type: { - name: "Composite", - className: "NamedValueCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "NamedValueContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NamedValueContract" + serializedName: "NamedValueCollection", + type: { + name: "Composite", + className: "NamedValueCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "NamedValueContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NamedValueContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const NamedValueEntityBaseParameters: coreClient.CompositeMapper = { - serializedName: "NamedValueEntityBaseParameters", - type: { - name: "Composite", - className: "NamedValueEntityBaseParameters", - modelProperties: { - tags: { - constraints: { - MaxItems: 32 - }, - serializedName: "tags", - xmlName: "tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "NamedValueEntityBaseParameters", + type: { + name: "Composite", + className: "NamedValueEntityBaseParameters", + modelProperties: { + tags: { + constraints: { + MaxItems: 32 + }, + serializedName: "tags", + xmlName: "tags", + xmlElementName: "NamedValueEntityBaseParametersTagsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secret: { + serializedName: "secret", + xmlName: "secret", + type: { + name: "Boolean" + } } - } - } - }, - secret: { - serializedName: "secret", - xmlName: "secret", - type: { - name: "Boolean" } - } } - } }; export const NamedValueUpdateParameters: coreClient.CompositeMapper = { - serializedName: "NamedValueUpdateParameters", - type: { - name: "Composite", - className: "NamedValueUpdateParameters", - modelProperties: { - tags: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.tags", - xmlName: "properties.tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - secret: { - serializedName: "properties.secret", - xmlName: "properties.secret", - type: { - name: "Boolean" - } - }, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096, - MinLength: 1 - }, - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "NamedValueUpdateParameters", + type: { + name: "Composite", + className: "NamedValueUpdateParameters", + modelProperties: { + tags: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.tags", + xmlName: "properties.tags", + xmlElementName: "NamedValueEntityBaseParametersTagsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secret: { + serializedName: "properties.secret", + xmlName: "properties.secret", + type: { + name: "Boolean" + } + }, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096, + MinLength: 1 + }, + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const NamedValueSecretContract: coreClient.CompositeMapper = { - serializedName: "NamedValueSecretContract", - type: { - name: "Composite", - className: "NamedValueSecretContract", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" + serializedName: "NamedValueSecretContract", + type: { + name: "Composite", + className: "NamedValueSecretContract", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + } } - } } - } }; export const NetworkStatusContractByLocation: coreClient.CompositeMapper = { - serializedName: "NetworkStatusContractByLocation", - type: { - name: "Composite", - className: "NetworkStatusContractByLocation", - modelProperties: { - location: { - constraints: { - MinLength: 1 - }, - serializedName: "location", - xmlName: "location", - type: { - name: "String" - } - }, - networkStatus: { - serializedName: "networkStatus", - xmlName: "networkStatus", - type: { - name: "Composite", - className: "NetworkStatusContract" - } - } - } - } + serializedName: "NetworkStatusContractByLocation", + type: { + name: "Composite", + className: "NetworkStatusContractByLocation", + modelProperties: { + location: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + }, + networkStatus: { + serializedName: "networkStatus", + xmlName: "networkStatus", + type: { + name: "Composite", + className: "NetworkStatusContract" + } + } + } + } }; export const NetworkStatusContract: coreClient.CompositeMapper = { - serializedName: "NetworkStatusContract", - type: { - name: "Composite", - className: "NetworkStatusContract", - modelProperties: { - dnsServers: { - serializedName: "dnsServers", - required: true, - xmlName: "dnsServers", - xmlElementName: "NetworkStatusContractDnsServersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - connectivityStatus: { - serializedName: "connectivityStatus", - required: true, - xmlName: "connectivityStatus", - xmlElementName: "ConnectivityStatusContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityStatusContract" + serializedName: "NetworkStatusContract", + type: { + name: "Composite", + className: "NetworkStatusContract", + modelProperties: { + dnsServers: { + serializedName: "dnsServers", + required: true, + xmlName: "dnsServers", + xmlElementName: "NetworkStatusContractDnsServersItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + connectivityStatus: { + serializedName: "connectivityStatus", + required: true, + xmlName: "connectivityStatus", + xmlElementName: "ConnectivityStatusContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectivityStatusContract" + } + } + } } - } } - } } - } }; export const ConnectivityStatusContract: coreClient.CompositeMapper = { - serializedName: "ConnectivityStatusContract", - type: { - name: "Composite", - className: "ConnectivityStatusContract", - modelProperties: { - name: { - constraints: { - MinLength: 1 - }, - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - status: { - serializedName: "status", - required: true, - xmlName: "status", - type: { - name: "String" - } - }, - error: { - serializedName: "error", - xmlName: "error", - type: { - name: "String" - } - }, - lastUpdated: { - serializedName: "lastUpdated", - required: true, - xmlName: "lastUpdated", - type: { - name: "DateTime" - } - }, - lastStatusChange: { - serializedName: "lastStatusChange", - required: true, - xmlName: "lastStatusChange", - type: { - name: "DateTime" - } - }, - resourceType: { - serializedName: "resourceType", - required: true, - xmlName: "resourceType", - type: { - name: "String" - } - }, - isOptional: { - serializedName: "isOptional", - required: true, - xmlName: "isOptional", - type: { - name: "Boolean" - } - } - } - } + serializedName: "ConnectivityStatusContract", + type: { + name: "Composite", + className: "ConnectivityStatusContract", + modelProperties: { + name: { + constraints: { + MinLength: 1 + }, + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + required: true, + xmlName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + xmlName: "error", + type: { + name: "String" + } + }, + lastUpdated: { + serializedName: "lastUpdated", + required: true, + xmlName: "lastUpdated", + type: { + name: "DateTime" + } + }, + lastStatusChange: { + serializedName: "lastStatusChange", + required: true, + xmlName: "lastStatusChange", + type: { + name: "DateTime" + } + }, + resourceType: { + serializedName: "resourceType", + required: true, + xmlName: "resourceType", + type: { + name: "String" + } + }, + isOptional: { + serializedName: "isOptional", + required: true, + xmlName: "isOptional", + type: { + name: "Boolean" + } + } + } + } }; export const NotificationCollection: coreClient.CompositeMapper = { - serializedName: "NotificationCollection", - type: { - name: "Composite", - className: "NotificationCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "NotificationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NotificationContract" + serializedName: "NotificationCollection", + type: { + name: "Composite", + className: "NotificationCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "NotificationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NotificationContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const RecipientsContractProperties: coreClient.CompositeMapper = { - serializedName: "RecipientsContractProperties", - type: { - name: "Composite", - className: "RecipientsContractProperties", - modelProperties: { - emails: { - serializedName: "emails", - xmlName: "emails", - xmlElementName: "RecipientsContractPropertiesEmailsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - users: { - serializedName: "users", - xmlName: "users", - xmlElementName: "RecipientsContractPropertiesUsersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "RecipientsContractProperties", + type: { + name: "Composite", + className: "RecipientsContractProperties", + modelProperties: { + emails: { + serializedName: "emails", + xmlName: "emails", + xmlElementName: "RecipientsContractPropertiesEmailsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + users: { + serializedName: "users", + xmlName: "users", + xmlElementName: "RecipientsContractPropertiesUsersItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const RecipientUserCollection: coreClient.CompositeMapper = { - serializedName: "RecipientUserCollection", - type: { - name: "Composite", - className: "RecipientUserCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RecipientUserContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecipientUserContract" + serializedName: "RecipientUserCollection", + type: { + name: "Composite", + className: "RecipientUserCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "RecipientUserContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecipientUserContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const RecipientEmailCollection: coreClient.CompositeMapper = { - serializedName: "RecipientEmailCollection", - type: { - name: "Composite", - className: "RecipientEmailCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RecipientEmailContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecipientEmailContract" + serializedName: "RecipientEmailCollection", + type: { + name: "Composite", + className: "RecipientEmailCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "RecipientEmailContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecipientEmailContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OpenIdConnectProviderCollection: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProviderCollection", - type: { - name: "Composite", - className: "OpenIdConnectProviderCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "OpenidConnectProviderContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OpenidConnectProviderContract" + serializedName: "OpenIdConnectProviderCollection", + type: { + name: "Composite", + className: "OpenIdConnectProviderCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "OpenidConnectProviderContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OpenidConnectProviderContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OpenidConnectProviderUpdateContract: coreClient.CompositeMapper = { - serializedName: "OpenidConnectProviderUpdateContract", - type: { - name: "Composite", - className: "OpenidConnectProviderUpdateContract", - modelProperties: { - displayName: { - constraints: { - MaxLength: 50 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - metadataEndpoint: { - serializedName: "properties.metadataEndpoint", - xmlName: "properties.metadataEndpoint", - type: { - name: "String" - } - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean" - } - } - } - } + serializedName: "OpenidConnectProviderUpdateContract", + type: { + name: "Composite", + className: "OpenidConnectProviderUpdateContract", + modelProperties: { + displayName: { + constraints: { + MaxLength: 50 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + metadataEndpoint: { + serializedName: "properties.metadataEndpoint", + xmlName: "properties.metadataEndpoint", + type: { + name: "String" + } + }, + clientId: { + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "properties.useInTestConsole", + xmlName: "properties.useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "properties.useInApiDocumentation", + xmlName: "properties.useInApiDocumentation", + type: { + name: "Boolean" + } + } + } + } }; export const OutboundEnvironmentEndpointList: coreClient.CompositeMapper = { - serializedName: "OutboundEnvironmentEndpointList", - type: { - name: "Composite", - className: "OutboundEnvironmentEndpointList", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "OutboundEnvironmentEndpoint", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OutboundEnvironmentEndpoint" + serializedName: "OutboundEnvironmentEndpointList", + type: { + name: "Composite", + className: "OutboundEnvironmentEndpointList", + modelProperties: { + value: { + serializedName: "value", + required: true, + xmlName: "value", + xmlElementName: "OutboundEnvironmentEndpoint", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { - serializedName: "OutboundEnvironmentEndpoint", - type: { - name: "Composite", - className: "OutboundEnvironmentEndpoint", - modelProperties: { - category: { - serializedName: "category", - xmlName: "category", - type: { - name: "String" - } - }, - endpoints: { - serializedName: "endpoints", - xmlName: "endpoints", - xmlElementName: "EndpointDependency", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EndpointDependency" + serializedName: "OutboundEnvironmentEndpoint", + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint", + modelProperties: { + category: { + serializedName: "category", + xmlName: "category", + type: { + name: "String" + } + }, + endpoints: { + serializedName: "endpoints", + xmlName: "endpoints", + xmlElementName: "EndpointDependency", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDependency" + } + } + } } - } } - } } - } }; export const EndpointDependency: coreClient.CompositeMapper = { - serializedName: "EndpointDependency", - type: { - name: "Composite", - className: "EndpointDependency", - modelProperties: { - domainName: { - serializedName: "domainName", - xmlName: "domainName", - type: { - name: "String" - } - }, - endpointDetails: { - serializedName: "endpointDetails", - xmlName: "endpointDetails", - xmlElementName: "EndpointDetail", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EndpointDetail" + serializedName: "EndpointDependency", + type: { + name: "Composite", + className: "EndpointDependency", + modelProperties: { + domainName: { + serializedName: "domainName", + xmlName: "domainName", + type: { + name: "String" + } + }, + endpointDetails: { + serializedName: "endpointDetails", + xmlName: "endpointDetails", + xmlElementName: "EndpointDetail", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDetail" + } + } + } } - } } - } } - } }; export const EndpointDetail: coreClient.CompositeMapper = { - serializedName: "EndpointDetail", - type: { - name: "Composite", - className: "EndpointDetail", - modelProperties: { - port: { - serializedName: "port", - xmlName: "port", - type: { - name: "Number" - } - }, - region: { - serializedName: "region", - xmlName: "region", - type: { - name: "String" + serializedName: "EndpointDetail", + type: { + name: "Composite", + className: "EndpointDetail", + modelProperties: { + port: { + serializedName: "port", + xmlName: "port", + type: { + name: "Number" + } + }, + region: { + serializedName: "region", + xmlName: "region", + type: { + name: "String" + } + } } - } } - } }; export const PolicyDescriptionCollection: coreClient.CompositeMapper = { - serializedName: "PolicyDescriptionCollection", - type: { - name: "Composite", - className: "PolicyDescriptionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyDescriptionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyDescriptionContract" + serializedName: "PolicyDescriptionCollection", + type: { + name: "Composite", + className: "PolicyDescriptionCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PolicyDescriptionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PolicyDescriptionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - } } - } }; export const PolicyFragmentCollection: coreClient.CompositeMapper = { - serializedName: "PolicyFragmentCollection", - type: { - name: "Composite", - className: "PolicyFragmentCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyFragmentContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyFragmentContract" + serializedName: "PolicyFragmentCollection", + type: { + name: "Composite", + className: "PolicyFragmentCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PolicyFragmentContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PolicyFragmentContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ResourceCollection: coreClient.CompositeMapper = { - serializedName: "ResourceCollection", - type: { - name: "Composite", - className: "ResourceCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ResourceCollectionValueItem", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceCollectionValueItem" + serializedName: "ResourceCollection", + type: { + name: "Composite", + className: "ResourceCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "ResourceCollectionValueItem", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceCollectionValueItem" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const PortalConfigCollection: coreClient.CompositeMapper = { - serializedName: "PortalConfigCollection", - type: { - name: "Composite", - className: "PortalConfigCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PortalConfigContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PortalConfigContract" + serializedName: "PortalConfigCollection", + type: { + name: "Composite", + className: "PortalConfigCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PortalConfigContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PortalConfigContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const PortalConfigPropertiesSignin: coreClient.CompositeMapper = { - serializedName: "PortalConfigPropertiesSignin", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignin", - modelProperties: { - require: { - defaultValue: false, - serializedName: "require", - xmlName: "require", - type: { - name: "Boolean" + serializedName: "PortalConfigPropertiesSignin", + type: { + name: "Composite", + className: "PortalConfigPropertiesSignin", + modelProperties: { + require: { + defaultValue: false, + serializedName: "require", + xmlName: "require", + type: { + name: "Boolean" + } + } } - } } - } }; export const PortalConfigPropertiesSignup: coreClient.CompositeMapper = { - serializedName: "PortalConfigPropertiesSignup", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignup", - modelProperties: { - termsOfService: { - serializedName: "termsOfService", - xmlName: "termsOfService", - type: { - name: "Composite", - className: "PortalConfigTermsOfServiceProperties" + serializedName: "PortalConfigPropertiesSignup", + type: { + name: "Composite", + className: "PortalConfigPropertiesSignup", + modelProperties: { + termsOfService: { + serializedName: "termsOfService", + xmlName: "termsOfService", + type: { + name: "Composite", + className: "PortalConfigTermsOfServiceProperties" + } + } } - } } - } }; export const PortalConfigTermsOfServiceProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigTermsOfServiceProperties", - type: { - name: "Composite", - className: "PortalConfigTermsOfServiceProperties", - modelProperties: { - text: { - serializedName: "text", - xmlName: "text", - type: { - name: "String" - } - }, - requireConsent: { - defaultValue: false, - serializedName: "requireConsent", - xmlName: "requireConsent", - type: { - name: "Boolean" - } - } - } - } + serializedName: "PortalConfigTermsOfServiceProperties", + type: { + name: "Composite", + className: "PortalConfigTermsOfServiceProperties", + modelProperties: { + text: { + serializedName: "text", + xmlName: "text", + type: { + name: "String" + } + }, + requireConsent: { + defaultValue: false, + serializedName: "requireConsent", + xmlName: "requireConsent", + type: { + name: "Boolean" + } + } + } + } }; export const PortalConfigDelegationProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigDelegationProperties", - type: { - name: "Composite", - className: "PortalConfigDelegationProperties", - modelProperties: { - delegateRegistration: { - defaultValue: false, - serializedName: "delegateRegistration", - xmlName: "delegateRegistration", - type: { - name: "Boolean" - } - }, - delegateSubscription: { - defaultValue: false, - serializedName: "delegateSubscription", - xmlName: "delegateSubscription", - type: { - name: "Boolean" - } - }, - delegationUrl: { - serializedName: "delegationUrl", - xmlName: "delegationUrl", - type: { - name: "String" - } - }, - validationKey: { - serializedName: "validationKey", - xmlName: "validationKey", - type: { - name: "String" - } - } - } - } + serializedName: "PortalConfigDelegationProperties", + type: { + name: "Composite", + className: "PortalConfigDelegationProperties", + modelProperties: { + delegateRegistration: { + defaultValue: false, + serializedName: "delegateRegistration", + xmlName: "delegateRegistration", + type: { + name: "Boolean" + } + }, + delegateSubscription: { + defaultValue: false, + serializedName: "delegateSubscription", + xmlName: "delegateSubscription", + type: { + name: "Boolean" + } + }, + delegationUrl: { + serializedName: "delegationUrl", + xmlName: "delegationUrl", + type: { + name: "String" + } + }, + validationKey: { + serializedName: "validationKey", + xmlName: "validationKey", + type: { + name: "String" + } + } + } + } }; export const PortalConfigCorsProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigCorsProperties", - type: { - name: "Composite", - className: "PortalConfigCorsProperties", - modelProperties: { - allowedOrigins: { - serializedName: "allowedOrigins", - xmlName: "allowedOrigins", - xmlElementName: "PortalConfigCorsPropertiesAllowedOriginsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "PortalConfigCorsProperties", + type: { + name: "Composite", + className: "PortalConfigCorsProperties", + modelProperties: { + allowedOrigins: { + serializedName: "allowedOrigins", + xmlName: "allowedOrigins", + xmlElementName: "PortalConfigCorsPropertiesAllowedOriginsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const PortalConfigCspProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigCspProperties", - type: { - name: "Composite", - className: "PortalConfigCspProperties", - modelProperties: { - mode: { - defaultValue: "disabled", - serializedName: "mode", - xmlName: "mode", - type: { - name: "String" - } - }, - reportUri: { - serializedName: "reportUri", - xmlName: "reportUri", - xmlElementName: "PortalConfigCspPropertiesReportUriItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - allowedSources: { - serializedName: "allowedSources", - xmlName: "allowedSources", - xmlElementName: "PortalConfigCspPropertiesAllowedSourcesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "PortalConfigCspProperties", + type: { + name: "Composite", + className: "PortalConfigCspProperties", + modelProperties: { + mode: { + defaultValue: "disabled", + serializedName: "mode", + xmlName: "mode", + type: { + name: "String" + } + }, + reportUri: { + serializedName: "reportUri", + xmlName: "reportUri", + xmlElementName: "PortalConfigCspPropertiesReportUriItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + allowedSources: { + serializedName: "allowedSources", + xmlName: "allowedSources", + xmlElementName: "PortalConfigCspPropertiesAllowedSourcesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const PortalRevisionCollection: coreClient.CompositeMapper = { - serializedName: "PortalRevisionCollection", - type: { - name: "Composite", - className: "PortalRevisionCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "PortalRevisionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PortalRevisionContract" + serializedName: "PortalRevisionCollection", + type: { + name: "Composite", + className: "PortalRevisionCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "PortalRevisionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PortalRevisionContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const PortalSettingsCollection: coreClient.CompositeMapper = { - serializedName: "PortalSettingsCollection", - type: { - name: "Composite", - className: "PortalSettingsCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PortalSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PortalSettingsContract" + serializedName: "PortalSettingsCollection", + type: { + name: "Composite", + className: "PortalSettingsCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PortalSettingsContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PortalSettingsContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - } } - } }; export const SubscriptionsDelegationSettingsProperties: coreClient.CompositeMapper = { - serializedName: "SubscriptionsDelegationSettingsProperties", - type: { - name: "Composite", - className: "SubscriptionsDelegationSettingsProperties", - modelProperties: { - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean" + serializedName: "SubscriptionsDelegationSettingsProperties", + type: { + name: "Composite", + className: "SubscriptionsDelegationSettingsProperties", + modelProperties: { + enabled: { + serializedName: "enabled", + xmlName: "enabled", + type: { + name: "Boolean" + } + } } - } } - } }; export const RegistrationDelegationSettingsProperties: coreClient.CompositeMapper = { - serializedName: "RegistrationDelegationSettingsProperties", - type: { - name: "Composite", - className: "RegistrationDelegationSettingsProperties", - modelProperties: { - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean" + serializedName: "RegistrationDelegationSettingsProperties", + type: { + name: "Composite", + className: "RegistrationDelegationSettingsProperties", + modelProperties: { + enabled: { + serializedName: "enabled", + xmlName: "enabled", + type: { + name: "Boolean" + } + } } - } } - } }; export const TermsOfServiceProperties: coreClient.CompositeMapper = { - serializedName: "TermsOfServiceProperties", - type: { - name: "Composite", - className: "TermsOfServiceProperties", - modelProperties: { - text: { - serializedName: "text", - xmlName: "text", - type: { - name: "String" - } - }, - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean" - } - }, - consentRequired: { - serializedName: "consentRequired", - xmlName: "consentRequired", - type: { - name: "Boolean" - } - } - } - } + serializedName: "TermsOfServiceProperties", + type: { + name: "Composite", + className: "TermsOfServiceProperties", + modelProperties: { + text: { + serializedName: "text", + xmlName: "text", + type: { + name: "String" + } + }, + enabled: { + serializedName: "enabled", + xmlName: "enabled", + type: { + name: "Boolean" + } + }, + consentRequired: { + serializedName: "consentRequired", + xmlName: "consentRequired", + type: { + name: "Boolean" + } + } + } + } }; export const PortalSettingValidationKeyContract: coreClient.CompositeMapper = { - serializedName: "PortalSettingValidationKeyContract", - type: { - name: "Composite", - className: "PortalSettingValidationKeyContract", - modelProperties: { - validationKey: { - serializedName: "validationKey", - xmlName: "validationKey", - type: { - name: "String" + serializedName: "PortalSettingValidationKeyContract", + type: { + name: "Composite", + className: "PortalSettingValidationKeyContract", + modelProperties: { + validationKey: { + serializedName: "validationKey", + xmlName: "validationKey", + type: { + name: "String" + } + } } - } } - } }; export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnectionListResult", - type: { - name: "Composite", - className: "PrivateEndpointConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PrivateEndpointConnection", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PrivateEndpointConnection", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } } - } } - } } - } }; export const PrivateEndpoint: coreClient.CompositeMapper = { - serializedName: "PrivateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + } } - } } - } }; export const PrivateEndpointConnectionRequest: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnectionRequest", - type: { - name: "Composite", - className: "PrivateEndpointConnectionRequest", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Composite", - className: "PrivateEndpointConnectionRequestProperties" - } - } - } - } + serializedName: "PrivateEndpointConnectionRequest", + type: { + name: "Composite", + className: "PrivateEndpointConnectionRequest", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + xmlName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionRequestProperties" + } + } + } + } }; export const PrivateEndpointConnectionRequestProperties: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnectionRequestProperties", - type: { - name: "Composite", - className: "PrivateEndpointConnectionRequestProperties", - modelProperties: { - privateLinkServiceConnectionState: { - serializedName: "privateLinkServiceConnectionState", - xmlName: "privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState" + serializedName: "PrivateEndpointConnectionRequestProperties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionRequestProperties", + modelProperties: { + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", + xmlName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + } } - } } - } }; export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { - serializedName: "PrivateLinkResourceListResult", - type: { - name: "Composite", - className: "PrivateLinkResourceListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PrivateLinkResource", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource" + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PrivateLinkResource", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } } - } } - } } - } }; export const ProductUpdateParameters: coreClient.CompositeMapper = { - serializedName: "ProductUpdateParameters", - type: { - name: "Composite", - className: "ProductUpdateParameters", - modelProperties: { - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - terms: { - serializedName: "properties.terms", - xmlName: "properties.terms", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - approvalRequired: { - serializedName: "properties.approvalRequired", - xmlName: "properties.approvalRequired", - type: { - name: "Boolean" - } - }, - subscriptionsLimit: { - serializedName: "properties.subscriptionsLimit", - xmlName: "properties.subscriptionsLimit", - type: { - name: "Number" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: ["notPublished", "published"] - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "ProductUpdateParameters", + type: { + name: "Composite", + className: "ProductUpdateParameters", + modelProperties: { + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + terms: { + serializedName: "properties.terms", + xmlName: "properties.terms", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + approvalRequired: { + serializedName: "properties.approvalRequired", + xmlName: "properties.approvalRequired", + type: { + name: "Boolean" + } + }, + subscriptionsLimit: { + serializedName: "properties.subscriptionsLimit", + xmlName: "properties.subscriptionsLimit", + type: { + name: "Number" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: ["notPublished", "published"] + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const SubscriptionCollection: coreClient.CompositeMapper = { - serializedName: "SubscriptionCollection", - type: { - name: "Composite", - className: "SubscriptionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "SubscriptionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubscriptionContract" + serializedName: "SubscriptionCollection", + type: { + name: "Composite", + className: "SubscriptionCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "SubscriptionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubscriptionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const QuotaCounterCollection: coreClient.CompositeMapper = { - serializedName: "QuotaCounterCollection", - type: { - name: "Composite", - className: "QuotaCounterCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "QuotaCounterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QuotaCounterContract" + serializedName: "QuotaCounterCollection", + type: { + name: "Composite", + className: "QuotaCounterCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "QuotaCounterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QuotaCounterContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const QuotaCounterContract: coreClient.CompositeMapper = { - serializedName: "QuotaCounterContract", - type: { - name: "Composite", - className: "QuotaCounterContract", - modelProperties: { - counterKey: { - constraints: { - MinLength: 1 - }, - serializedName: "counterKey", - required: true, - xmlName: "counterKey", - type: { - name: "String" - } - }, - periodKey: { - constraints: { - MinLength: 1 - }, - serializedName: "periodKey", - required: true, - xmlName: "periodKey", - type: { - name: "String" - } - }, - periodStartTime: { - serializedName: "periodStartTime", - required: true, - xmlName: "periodStartTime", - type: { - name: "DateTime" - } - }, - periodEndTime: { - serializedName: "periodEndTime", - required: true, - xmlName: "periodEndTime", - type: { - name: "DateTime" - } - }, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "Composite", - className: "QuotaCounterValueContractProperties" - } - } - } - } + serializedName: "QuotaCounterContract", + type: { + name: "Composite", + className: "QuotaCounterContract", + modelProperties: { + counterKey: { + constraints: { + MinLength: 1 + }, + serializedName: "counterKey", + required: true, + xmlName: "counterKey", + type: { + name: "String" + } + }, + periodKey: { + constraints: { + MinLength: 1 + }, + serializedName: "periodKey", + required: true, + xmlName: "periodKey", + type: { + name: "String" + } + }, + periodStartTime: { + serializedName: "periodStartTime", + required: true, + xmlName: "periodStartTime", + type: { + name: "DateTime" + } + }, + periodEndTime: { + serializedName: "periodEndTime", + required: true, + xmlName: "periodEndTime", + type: { + name: "DateTime" + } + }, + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "Composite", + className: "QuotaCounterValueContractProperties" + } + } + } + } }; export const QuotaCounterValueContractProperties: coreClient.CompositeMapper = { - serializedName: "QuotaCounterValueContractProperties", - type: { - name: "Composite", - className: "QuotaCounterValueContractProperties", - modelProperties: { - callsCount: { - serializedName: "callsCount", - xmlName: "callsCount", - type: { - name: "Number" - } - }, - kbTransferred: { - serializedName: "kbTransferred", - xmlName: "kbTransferred", - type: { - name: "Number" + serializedName: "QuotaCounterValueContractProperties", + type: { + name: "Composite", + className: "QuotaCounterValueContractProperties", + modelProperties: { + callsCount: { + serializedName: "callsCount", + xmlName: "callsCount", + type: { + name: "Number" + } + }, + kbTransferred: { + serializedName: "kbTransferred", + xmlName: "kbTransferred", + type: { + name: "Number" + } + } } - } } - } }; export const QuotaCounterValueUpdateContract: coreClient.CompositeMapper = { - serializedName: "QuotaCounterValueUpdateContract", - type: { - name: "Composite", - className: "QuotaCounterValueUpdateContract", - modelProperties: { - callsCount: { - serializedName: "properties.callsCount", - xmlName: "properties.callsCount", - type: { - name: "Number" - } - }, - kbTransferred: { - serializedName: "properties.kbTransferred", - xmlName: "properties.kbTransferred", - type: { - name: "Number" + serializedName: "QuotaCounterValueUpdateContract", + type: { + name: "Composite", + className: "QuotaCounterValueUpdateContract", + modelProperties: { + callsCount: { + serializedName: "properties.callsCount", + xmlName: "properties.callsCount", + type: { + name: "Number" + } + }, + kbTransferred: { + serializedName: "properties.kbTransferred", + xmlName: "properties.kbTransferred", + type: { + name: "Number" + } + } } - } } - } }; export const RegionListResult: coreClient.CompositeMapper = { - serializedName: "RegionListResult", - type: { - name: "Composite", - className: "RegionListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RegionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegionContract" + serializedName: "RegionListResult", + type: { + name: "Composite", + className: "RegionListResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "RegionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const RegionContract: coreClient.CompositeMapper = { - serializedName: "RegionContract", - type: { - name: "Composite", - className: "RegionContract", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - isMasterRegion: { - serializedName: "isMasterRegion", - xmlName: "isMasterRegion", - type: { - name: "Boolean" - } - }, - isDeleted: { - serializedName: "isDeleted", - xmlName: "isDeleted", - type: { - name: "Boolean" - } - } - } - } + serializedName: "RegionContract", + type: { + name: "Composite", + className: "RegionContract", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + isMasterRegion: { + serializedName: "isMasterRegion", + xmlName: "isMasterRegion", + type: { + name: "Boolean" + } + }, + isDeleted: { + serializedName: "isDeleted", + xmlName: "isDeleted", + type: { + name: "Boolean" + } + } + } + } }; export const ReportCollection: coreClient.CompositeMapper = { - serializedName: "ReportCollection", - type: { - name: "Composite", - className: "ReportCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ReportRecordContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReportRecordContract" + serializedName: "ReportCollection", + type: { + name: "Composite", + className: "ReportCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "ReportRecordContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportRecordContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ReportRecordContract: coreClient.CompositeMapper = { - serializedName: "ReportRecordContract", - type: { - name: "Composite", - className: "ReportRecordContract", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - timestamp: { - serializedName: "timestamp", - xmlName: "timestamp", - type: { - name: "DateTime" - } - }, - interval: { - serializedName: "interval", - xmlName: "interval", - type: { - name: "String" - } - }, - country: { - serializedName: "country", - xmlName: "country", - type: { - name: "String" - } - }, - region: { - serializedName: "region", - xmlName: "region", - type: { - name: "String" - } - }, - zip: { - serializedName: "zip", - xmlName: "zip", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - readOnly: true, - xmlName: "userId", - type: { - name: "String" - } - }, - productId: { - serializedName: "productId", - readOnly: true, - xmlName: "productId", - type: { - name: "String" - } - }, - apiId: { - serializedName: "apiId", - xmlName: "apiId", - type: { - name: "String" - } - }, - operationId: { - serializedName: "operationId", - xmlName: "operationId", - type: { - name: "String" - } - }, - apiRegion: { - serializedName: "apiRegion", - xmlName: "apiRegion", - type: { - name: "String" - } - }, - subscriptionId: { - serializedName: "subscriptionId", - xmlName: "subscriptionId", - type: { - name: "String" - } - }, - callCountSuccess: { - serializedName: "callCountSuccess", - xmlName: "callCountSuccess", - type: { - name: "Number" - } - }, - callCountBlocked: { - serializedName: "callCountBlocked", - xmlName: "callCountBlocked", - type: { - name: "Number" - } - }, - callCountFailed: { - serializedName: "callCountFailed", - xmlName: "callCountFailed", - type: { - name: "Number" - } - }, - callCountOther: { - serializedName: "callCountOther", - xmlName: "callCountOther", - type: { - name: "Number" - } - }, - callCountTotal: { - serializedName: "callCountTotal", - xmlName: "callCountTotal", - type: { - name: "Number" - } - }, - bandwidth: { - serializedName: "bandwidth", - xmlName: "bandwidth", - type: { - name: "Number" - } - }, - cacheHitCount: { - serializedName: "cacheHitCount", - xmlName: "cacheHitCount", - type: { - name: "Number" - } - }, - cacheMissCount: { - serializedName: "cacheMissCount", - xmlName: "cacheMissCount", - type: { - name: "Number" - } - }, - apiTimeAvg: { - serializedName: "apiTimeAvg", - xmlName: "apiTimeAvg", - type: { - name: "Number" - } - }, - apiTimeMin: { - serializedName: "apiTimeMin", - xmlName: "apiTimeMin", - type: { - name: "Number" - } - }, - apiTimeMax: { - serializedName: "apiTimeMax", - xmlName: "apiTimeMax", - type: { - name: "Number" - } - }, - serviceTimeAvg: { - serializedName: "serviceTimeAvg", - xmlName: "serviceTimeAvg", - type: { - name: "Number" - } - }, - serviceTimeMin: { - serializedName: "serviceTimeMin", - xmlName: "serviceTimeMin", - type: { - name: "Number" - } - }, - serviceTimeMax: { - serializedName: "serviceTimeMax", - xmlName: "serviceTimeMax", - type: { - name: "Number" - } - } - } - } + serializedName: "ReportRecordContract", + type: { + name: "Composite", + className: "ReportRecordContract", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + timestamp: { + serializedName: "timestamp", + xmlName: "timestamp", + type: { + name: "DateTime" + } + }, + interval: { + serializedName: "interval", + xmlName: "interval", + type: { + name: "String" + } + }, + country: { + serializedName: "country", + xmlName: "country", + type: { + name: "String" + } + }, + region: { + serializedName: "region", + xmlName: "region", + type: { + name: "String" + } + }, + zip: { + serializedName: "zip", + xmlName: "zip", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + readOnly: true, + xmlName: "userId", + type: { + name: "String" + } + }, + productId: { + serializedName: "productId", + readOnly: true, + xmlName: "productId", + type: { + name: "String" + } + }, + apiId: { + serializedName: "apiId", + xmlName: "apiId", + type: { + name: "String" + } + }, + operationId: { + serializedName: "operationId", + xmlName: "operationId", + type: { + name: "String" + } + }, + apiRegion: { + serializedName: "apiRegion", + xmlName: "apiRegion", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + xmlName: "subscriptionId", + type: { + name: "String" + } + }, + callCountSuccess: { + serializedName: "callCountSuccess", + xmlName: "callCountSuccess", + type: { + name: "Number" + } + }, + callCountBlocked: { + serializedName: "callCountBlocked", + xmlName: "callCountBlocked", + type: { + name: "Number" + } + }, + callCountFailed: { + serializedName: "callCountFailed", + xmlName: "callCountFailed", + type: { + name: "Number" + } + }, + callCountOther: { + serializedName: "callCountOther", + xmlName: "callCountOther", + type: { + name: "Number" + } + }, + callCountTotal: { + serializedName: "callCountTotal", + xmlName: "callCountTotal", + type: { + name: "Number" + } + }, + bandwidth: { + serializedName: "bandwidth", + xmlName: "bandwidth", + type: { + name: "Number" + } + }, + cacheHitCount: { + serializedName: "cacheHitCount", + xmlName: "cacheHitCount", + type: { + name: "Number" + } + }, + cacheMissCount: { + serializedName: "cacheMissCount", + xmlName: "cacheMissCount", + type: { + name: "Number" + } + }, + apiTimeAvg: { + serializedName: "apiTimeAvg", + xmlName: "apiTimeAvg", + type: { + name: "Number" + } + }, + apiTimeMin: { + serializedName: "apiTimeMin", + xmlName: "apiTimeMin", + type: { + name: "Number" + } + }, + apiTimeMax: { + serializedName: "apiTimeMax", + xmlName: "apiTimeMax", + type: { + name: "Number" + } + }, + serviceTimeAvg: { + serializedName: "serviceTimeAvg", + xmlName: "serviceTimeAvg", + type: { + name: "Number" + } + }, + serviceTimeMin: { + serializedName: "serviceTimeMin", + xmlName: "serviceTimeMin", + type: { + name: "Number" + } + }, + serviceTimeMax: { + serializedName: "serviceTimeMax", + xmlName: "serviceTimeMax", + type: { + name: "Number" + } + } + } + } }; export const RequestReportCollection: coreClient.CompositeMapper = { - serializedName: "RequestReportCollection", - type: { - name: "Composite", - className: "RequestReportCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RequestReportRecordContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RequestReportRecordContract" + serializedName: "RequestReportCollection", + type: { + name: "Composite", + className: "RequestReportCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "RequestReportRecordContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RequestReportRecordContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - } } - } }; export const RequestReportRecordContract: coreClient.CompositeMapper = { - serializedName: "RequestReportRecordContract", - type: { - name: "Composite", - className: "RequestReportRecordContract", - modelProperties: { - apiId: { - serializedName: "apiId", - xmlName: "apiId", - type: { - name: "String" - } - }, - operationId: { - serializedName: "operationId", - xmlName: "operationId", - type: { - name: "String" - } - }, - productId: { - serializedName: "productId", - readOnly: true, - xmlName: "productId", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - readOnly: true, - xmlName: "userId", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - xmlName: "method", - type: { - name: "String" - } - }, - url: { - serializedName: "url", - xmlName: "url", - type: { - name: "String" - } - }, - ipAddress: { - serializedName: "ipAddress", - xmlName: "ipAddress", - type: { - name: "String" - } - }, - backendResponseCode: { - serializedName: "backendResponseCode", - xmlName: "backendResponseCode", - type: { - name: "String" - } - }, - responseCode: { - serializedName: "responseCode", - xmlName: "responseCode", - type: { - name: "Number" - } - }, - responseSize: { - serializedName: "responseSize", - xmlName: "responseSize", - type: { - name: "Number" - } - }, - timestamp: { - serializedName: "timestamp", - xmlName: "timestamp", - type: { - name: "DateTime" - } - }, - cache: { - serializedName: "cache", - xmlName: "cache", - type: { - name: "String" - } - }, - apiTime: { - serializedName: "apiTime", - xmlName: "apiTime", - type: { - name: "Number" - } - }, - serviceTime: { - serializedName: "serviceTime", - xmlName: "serviceTime", - type: { - name: "Number" - } - }, - apiRegion: { - serializedName: "apiRegion", - xmlName: "apiRegion", - type: { - name: "String" - } - }, - subscriptionId: { - serializedName: "subscriptionId", - xmlName: "subscriptionId", - type: { - name: "String" - } - }, - requestId: { - serializedName: "requestId", - xmlName: "requestId", - type: { - name: "String" - } - }, - requestSize: { - serializedName: "requestSize", - xmlName: "requestSize", - type: { - name: "Number" - } - } - } - } + serializedName: "RequestReportRecordContract", + type: { + name: "Composite", + className: "RequestReportRecordContract", + modelProperties: { + apiId: { + serializedName: "apiId", + xmlName: "apiId", + type: { + name: "String" + } + }, + operationId: { + serializedName: "operationId", + xmlName: "operationId", + type: { + name: "String" + } + }, + productId: { + serializedName: "productId", + readOnly: true, + xmlName: "productId", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + readOnly: true, + xmlName: "userId", + type: { + name: "String" + } + }, + method: { + serializedName: "method", + xmlName: "method", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + xmlName: "url", + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "ipAddress", + xmlName: "ipAddress", + type: { + name: "String" + } + }, + backendResponseCode: { + serializedName: "backendResponseCode", + xmlName: "backendResponseCode", + type: { + name: "String" + } + }, + responseCode: { + serializedName: "responseCode", + xmlName: "responseCode", + type: { + name: "Number" + } + }, + responseSize: { + serializedName: "responseSize", + xmlName: "responseSize", + type: { + name: "Number" + } + }, + timestamp: { + serializedName: "timestamp", + xmlName: "timestamp", + type: { + name: "DateTime" + } + }, + cache: { + serializedName: "cache", + xmlName: "cache", + type: { + name: "String" + } + }, + apiTime: { + serializedName: "apiTime", + xmlName: "apiTime", + type: { + name: "Number" + } + }, + serviceTime: { + serializedName: "serviceTime", + xmlName: "serviceTime", + type: { + name: "Number" + } + }, + apiRegion: { + serializedName: "apiRegion", + xmlName: "apiRegion", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + xmlName: "subscriptionId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + xmlName: "requestId", + type: { + name: "String" + } + }, + requestSize: { + serializedName: "requestSize", + xmlName: "requestSize", + type: { + name: "Number" + } + } + } + } }; export const GlobalSchemaCollection: coreClient.CompositeMapper = { - serializedName: "GlobalSchemaCollection", - type: { - name: "Composite", - className: "GlobalSchemaCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GlobalSchemaContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GlobalSchemaContract" + serializedName: "GlobalSchemaCollection", + type: { + name: "Composite", + className: "GlobalSchemaCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "GlobalSchemaContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GlobalSchemaContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const TenantSettingsCollection: coreClient.CompositeMapper = { - serializedName: "TenantSettingsCollection", - type: { - name: "Composite", - className: "TenantSettingsCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "TenantSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TenantSettingsContract" + serializedName: "TenantSettingsCollection", + type: { + name: "Composite", + className: "TenantSettingsCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "TenantSettingsContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TenantSettingsContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ApiManagementSkusResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkusResult", - type: { - name: "Composite", - className: "ApiManagementSkusResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ApiManagementSku", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSku" + serializedName: "ApiManagementSkusResult", + type: { + name: "Composite", + className: "ApiManagementSkusResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + xmlName: "value", + xmlElementName: "ApiManagementSku", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ApiManagementSku: coreClient.CompositeMapper = { - serializedName: "ApiManagementSku", - type: { - name: "Composite", - className: "ApiManagementSku", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - xmlName: "resourceType", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - tier: { - serializedName: "tier", - readOnly: true, - xmlName: "tier", - type: { - name: "String" - } - }, - size: { - serializedName: "size", - readOnly: true, - xmlName: "size", - type: { - name: "String" - } - }, - family: { - serializedName: "family", - readOnly: true, - xmlName: "family", - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - readOnly: true, - xmlName: "kind", - type: { - name: "String" - } - }, - capacity: { - serializedName: "capacity", - xmlName: "capacity", - type: { - name: "Composite", - className: "ApiManagementSkuCapacity" - } - }, - locations: { - serializedName: "locations", - readOnly: true, - xmlName: "locations", - xmlElementName: "ApiManagementSkuLocationsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - locationInfo: { - serializedName: "locationInfo", - readOnly: true, - xmlName: "locationInfo", - xmlElementName: "ApiManagementSkuLocationInfo", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuLocationInfo" - } - } - } - }, - apiVersions: { - serializedName: "apiVersions", - readOnly: true, - xmlName: "apiVersions", - xmlElementName: "ApiManagementSkuApiVersionsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - costs: { - serializedName: "costs", - readOnly: true, - xmlName: "costs", - xmlElementName: "ApiManagementSkuCosts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuCosts" - } - } - } - }, - capabilities: { - serializedName: "capabilities", - readOnly: true, - xmlName: "capabilities", - xmlElementName: "ApiManagementSkuCapabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuCapabilities" - } - } - } - }, - restrictions: { - serializedName: "restrictions", - readOnly: true, - xmlName: "restrictions", - xmlElementName: "ApiManagementSkuRestrictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuRestrictions" + serializedName: "ApiManagementSku", + type: { + name: "Composite", + className: "ApiManagementSku", + modelProperties: { + resourceType: { + serializedName: "resourceType", + readOnly: true, + xmlName: "resourceType", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + readOnly: true, + xmlName: "tier", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + readOnly: true, + xmlName: "size", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + readOnly: true, + xmlName: "family", + type: { + name: "String" + } + }, + kind: { + serializedName: "kind", + readOnly: true, + xmlName: "kind", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + xmlName: "capacity", + type: { + name: "Composite", + className: "ApiManagementSkuCapacity" + } + }, + locations: { + serializedName: "locations", + readOnly: true, + xmlName: "locations", + xmlElementName: "ApiManagementSkuLocationsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + locationInfo: { + serializedName: "locationInfo", + readOnly: true, + xmlName: "locationInfo", + xmlElementName: "ApiManagementSkuLocationInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuLocationInfo" + } + } + } + }, + apiVersions: { + serializedName: "apiVersions", + readOnly: true, + xmlName: "apiVersions", + xmlElementName: "ApiManagementSkuApiVersionsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + costs: { + serializedName: "costs", + readOnly: true, + xmlName: "costs", + xmlElementName: "ApiManagementSkuCosts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuCosts" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + readOnly: true, + xmlName: "capabilities", + xmlElementName: "ApiManagementSkuCapabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuCapabilities" + } + } + } + }, + restrictions: { + serializedName: "restrictions", + readOnly: true, + xmlName: "restrictions", + xmlElementName: "ApiManagementSkuRestrictions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuRestrictions" + } + } + } } - } } - } } - } }; export const ApiManagementSkuCapacity: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuCapacity", - type: { - name: "Composite", - className: "ApiManagementSkuCapacity", - modelProperties: { - minimum: { - serializedName: "minimum", - readOnly: true, - xmlName: "minimum", - type: { - name: "Number" - } - }, - maximum: { - serializedName: "maximum", - readOnly: true, - xmlName: "maximum", - type: { - name: "Number" - } - }, - default: { - serializedName: "default", - readOnly: true, - xmlName: "default", - type: { - name: "Number" - } - }, - scaleType: { - serializedName: "scaleType", - readOnly: true, - xmlName: "scaleType", - type: { - name: "Enum", - allowedValues: ["Automatic", "Manual", "None"] - } - } - } - } + serializedName: "ApiManagementSkuCapacity", + type: { + name: "Composite", + className: "ApiManagementSkuCapacity", + modelProperties: { + minimum: { + serializedName: "minimum", + readOnly: true, + xmlName: "minimum", + type: { + name: "Number" + } + }, + maximum: { + serializedName: "maximum", + readOnly: true, + xmlName: "maximum", + type: { + name: "Number" + } + }, + default: { + serializedName: "default", + readOnly: true, + xmlName: "default", + type: { + name: "Number" + } + }, + scaleType: { + serializedName: "scaleType", + readOnly: true, + xmlName: "scaleType", + type: { + name: "Enum", + allowedValues: ["Automatic", "Manual", "None"] + } + } + } + } }; export const ApiManagementSkuLocationInfo: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuLocationInfo", - type: { - name: "Composite", - className: "ApiManagementSkuLocationInfo", - modelProperties: { - location: { - serializedName: "location", - readOnly: true, - xmlName: "location", - type: { - name: "String" - } - }, - zones: { - serializedName: "zones", - readOnly: true, - xmlName: "zones", - xmlElementName: "ApiManagementSkuLocationInfoZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - zoneDetails: { - serializedName: "zoneDetails", - readOnly: true, - xmlName: "zoneDetails", - xmlElementName: "ApiManagementSkuZoneDetails", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuZoneDetails" + serializedName: "ApiManagementSkuLocationInfo", + type: { + name: "Composite", + className: "ApiManagementSkuLocationInfo", + modelProperties: { + location: { + serializedName: "location", + readOnly: true, + xmlName: "location", + type: { + name: "String" + } + }, + zones: { + serializedName: "zones", + readOnly: true, + xmlName: "zones", + xmlElementName: "ApiManagementSkuLocationInfoZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + zoneDetails: { + serializedName: "zoneDetails", + readOnly: true, + xmlName: "zoneDetails", + xmlElementName: "ApiManagementSkuZoneDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuZoneDetails" + } + } + } } - } } - } } - } }; export const ApiManagementSkuZoneDetails: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuZoneDetails", - type: { - name: "Composite", - className: "ApiManagementSkuZoneDetails", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - xmlElementName: "ApiManagementSkuZoneDetailsNameItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - capabilities: { - serializedName: "capabilities", - readOnly: true, - xmlName: "capabilities", - xmlElementName: "ApiManagementSkuCapabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuCapabilities" + serializedName: "ApiManagementSkuZoneDetails", + type: { + name: "Composite", + className: "ApiManagementSkuZoneDetails", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + xmlElementName: "ApiManagementSkuZoneDetailsNameItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + readOnly: true, + xmlName: "capabilities", + xmlElementName: "ApiManagementSkuCapabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuCapabilities" + } + } + } } - } } - } } - } }; export const ApiManagementSkuCapabilities: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuCapabilities", - type: { - name: "Composite", - className: "ApiManagementSkuCapabilities", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementSkuCapabilities", + type: { + name: "Composite", + className: "ApiManagementSkuCapabilities", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + type: { + name: "String" + } + } + } + } }; export const ApiManagementSkuCosts: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuCosts", - type: { - name: "Composite", - className: "ApiManagementSkuCosts", - modelProperties: { - meterID: { - serializedName: "meterID", - readOnly: true, - xmlName: "meterID", - type: { - name: "String" - } - }, - quantity: { - serializedName: "quantity", - readOnly: true, - xmlName: "quantity", - type: { - name: "Number" - } - }, - extendedUnit: { - serializedName: "extendedUnit", - readOnly: true, - xmlName: "extendedUnit", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementSkuCosts", + type: { + name: "Composite", + className: "ApiManagementSkuCosts", + modelProperties: { + meterID: { + serializedName: "meterID", + readOnly: true, + xmlName: "meterID", + type: { + name: "String" + } + }, + quantity: { + serializedName: "quantity", + readOnly: true, + xmlName: "quantity", + type: { + name: "Number" + } + }, + extendedUnit: { + serializedName: "extendedUnit", + readOnly: true, + xmlName: "extendedUnit", + type: { + name: "String" + } + } + } + } }; export const ApiManagementSkuRestrictions: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuRestrictions", - type: { - name: "Composite", - className: "ApiManagementSkuRestrictions", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "Enum", - allowedValues: ["Location", "Zone"] - } - }, - values: { - serializedName: "values", - readOnly: true, - xmlName: "values", - xmlElementName: "ApiManagementSkuRestrictionsValuesItem", - type: { - name: "Sequence", - element: { + serializedName: "ApiManagementSkuRestrictions", + type: { + name: "Composite", + className: "ApiManagementSkuRestrictions", + modelProperties: { type: { - name: "String" + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "Enum", + allowedValues: ["Location", "Zone"] + } + }, + values: { + serializedName: "values", + readOnly: true, + xmlName: "values", + xmlElementName: "ApiManagementSkuRestrictionsValuesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + restrictionInfo: { + serializedName: "restrictionInfo", + xmlName: "restrictionInfo", + type: { + name: "Composite", + className: "ApiManagementSkuRestrictionInfo" + } + }, + reasonCode: { + serializedName: "reasonCode", + readOnly: true, + xmlName: "reasonCode", + type: { + name: "Enum", + allowedValues: ["QuotaId", "NotAvailableForSubscription"] + } } - } - } - }, - restrictionInfo: { - serializedName: "restrictionInfo", - xmlName: "restrictionInfo", - type: { - name: "Composite", - className: "ApiManagementSkuRestrictionInfo" - } - }, - reasonCode: { - serializedName: "reasonCode", - readOnly: true, - xmlName: "reasonCode", - type: { - name: "Enum", - allowedValues: ["QuotaId", "NotAvailableForSubscription"] } - } } - } }; export const ApiManagementSkuRestrictionInfo: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuRestrictionInfo", - type: { - name: "Composite", - className: "ApiManagementSkuRestrictionInfo", - modelProperties: { - locations: { - serializedName: "locations", - readOnly: true, - xmlName: "locations", - xmlElementName: "ApiManagementSkuRestrictionInfoLocationsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - zones: { - serializedName: "zones", - readOnly: true, - xmlName: "zones", - xmlElementName: "ApiManagementSkuRestrictionInfoZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiManagementSkuRestrictionInfo", + type: { + name: "Composite", + className: "ApiManagementSkuRestrictionInfo", + modelProperties: { + locations: { + serializedName: "locations", + readOnly: true, + xmlName: "locations", + xmlElementName: "ApiManagementSkuRestrictionInfoLocationsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + zones: { + serializedName: "zones", + readOnly: true, + xmlName: "zones", + xmlElementName: "ApiManagementSkuRestrictionInfoZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const SubscriptionCreateParameters: coreClient.CompositeMapper = { - serializedName: "SubscriptionCreateParameters", - type: { - name: "Composite", - className: "SubscriptionCreateParameters", - modelProperties: { - ownerId: { - serializedName: "properties.ownerId", - xmlName: "properties.ownerId", - type: { - name: "String" - } - }, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "suspended", - "active", - "expired", - "submitted", - "rejected", - "cancelled" - ] - } - }, - allowTracing: { - serializedName: "properties.allowTracing", - xmlName: "properties.allowTracing", - type: { - name: "Boolean" - } - } - } - } + serializedName: "SubscriptionCreateParameters", + type: { + name: "Composite", + className: "SubscriptionCreateParameters", + modelProperties: { + ownerId: { + serializedName: "properties.ownerId", + xmlName: "properties.ownerId", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + xmlName: "properties.scope", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + primaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.primaryKey", + xmlName: "properties.primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.secondaryKey", + xmlName: "properties.secondaryKey", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "suspended", + "active", + "expired", + "submitted", + "rejected", + "cancelled" + ] + } + }, + allowTracing: { + serializedName: "properties.allowTracing", + xmlName: "properties.allowTracing", + type: { + name: "Boolean" + } + } + } + } }; export const SubscriptionUpdateParameters: coreClient.CompositeMapper = { - serializedName: "SubscriptionUpdateParameters", - type: { - name: "Composite", - className: "SubscriptionUpdateParameters", - modelProperties: { - ownerId: { - serializedName: "properties.ownerId", - xmlName: "properties.ownerId", - type: { - name: "String" - } - }, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String" - } - }, - expirationDate: { - serializedName: "properties.expirationDate", - xmlName: "properties.expirationDate", - type: { - name: "DateTime" - } - }, - displayName: { - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "suspended", - "active", - "expired", - "submitted", - "rejected", - "cancelled" - ] - } - }, - stateComment: { - serializedName: "properties.stateComment", - xmlName: "properties.stateComment", - type: { - name: "String" - } - }, - allowTracing: { - serializedName: "properties.allowTracing", - xmlName: "properties.allowTracing", - type: { - name: "Boolean" - } - } - } - } + serializedName: "SubscriptionUpdateParameters", + type: { + name: "Composite", + className: "SubscriptionUpdateParameters", + modelProperties: { + ownerId: { + serializedName: "properties.ownerId", + xmlName: "properties.ownerId", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + xmlName: "properties.scope", + type: { + name: "String" + } + }, + expirationDate: { + serializedName: "properties.expirationDate", + xmlName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + displayName: { + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + primaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.primaryKey", + xmlName: "properties.primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.secondaryKey", + xmlName: "properties.secondaryKey", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "suspended", + "active", + "expired", + "submitted", + "rejected", + "cancelled" + ] + } + }, + stateComment: { + serializedName: "properties.stateComment", + xmlName: "properties.stateComment", + type: { + name: "String" + } + }, + allowTracing: { + serializedName: "properties.allowTracing", + xmlName: "properties.allowTracing", + type: { + name: "Boolean" + } + } + } + } }; export const SubscriptionKeysContract: coreClient.CompositeMapper = { - serializedName: "SubscriptionKeysContract", - type: { - name: "Composite", - className: "SubscriptionKeysContract", - modelProperties: { - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "primaryKey", - xmlName: "primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "secondaryKey", - xmlName: "secondaryKey", - type: { - name: "String" - } - } - } - } + serializedName: "SubscriptionKeysContract", + type: { + name: "Composite", + className: "SubscriptionKeysContract", + modelProperties: { + primaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "primaryKey", + xmlName: "primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "secondaryKey", + xmlName: "secondaryKey", + type: { + name: "String" + } + } + } + } }; export const TagCreateUpdateParameters: coreClient.CompositeMapper = { - serializedName: "TagCreateUpdateParameters", - type: { - name: "Composite", - className: "TagCreateUpdateParameters", - modelProperties: { - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "TagCreateUpdateParameters", + type: { + name: "Composite", + className: "TagCreateUpdateParameters", + modelProperties: { + displayName: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const AccessInformationCollection: coreClient.CompositeMapper = { - serializedName: "AccessInformationCollection", - type: { - name: "Composite", - className: "AccessInformationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "AccessInformationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AccessInformationContract" + serializedName: "AccessInformationCollection", + type: { + name: "Composite", + className: "AccessInformationCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "AccessInformationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessInformationContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const AccessInformationCreateParameters: coreClient.CompositeMapper = { - serializedName: "AccessInformationCreateParameters", - type: { - name: "Composite", - className: "AccessInformationCreateParameters", - modelProperties: { - principalId: { - serializedName: "properties.principalId", - xmlName: "properties.principalId", - type: { - name: "String" - } - }, - primaryKey: { - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String" - } - }, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" - } - } - } - } + serializedName: "AccessInformationCreateParameters", + type: { + name: "Composite", + className: "AccessInformationCreateParameters", + modelProperties: { + principalId: { + serializedName: "properties.principalId", + xmlName: "properties.principalId", + type: { + name: "String" + } + }, + primaryKey: { + serializedName: "properties.primaryKey", + xmlName: "properties.primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + serializedName: "properties.secondaryKey", + xmlName: "properties.secondaryKey", + type: { + name: "String" + } + }, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + } + } + } }; export const AccessInformationUpdateParameters: coreClient.CompositeMapper = { - serializedName: "AccessInformationUpdateParameters", - type: { - name: "Composite", - className: "AccessInformationUpdateParameters", - modelProperties: { - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" + serializedName: "AccessInformationUpdateParameters", + type: { + name: "Composite", + className: "AccessInformationUpdateParameters", + modelProperties: { + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + } } - } } - } }; export const AccessInformationSecretsContract: coreClient.CompositeMapper = { - serializedName: "AccessInformationSecretsContract", - type: { - name: "Composite", - className: "AccessInformationSecretsContract", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - principalId: { - serializedName: "principalId", - xmlName: "principalId", - type: { - name: "String" - } - }, - primaryKey: { - serializedName: "primaryKey", - xmlName: "primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - serializedName: "secondaryKey", - xmlName: "secondaryKey", - type: { - name: "String" - } - }, - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean" - } - } - } - } + serializedName: "AccessInformationSecretsContract", + type: { + name: "Composite", + className: "AccessInformationSecretsContract", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + principalId: { + serializedName: "principalId", + xmlName: "principalId", + type: { + name: "String" + } + }, + primaryKey: { + serializedName: "primaryKey", + xmlName: "primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + serializedName: "secondaryKey", + xmlName: "secondaryKey", + type: { + name: "String" + } + }, + enabled: { + serializedName: "enabled", + xmlName: "enabled", + type: { + name: "Boolean" + } + } + } + } }; export const DeployConfigurationParameters: coreClient.CompositeMapper = { - serializedName: "DeployConfigurationParameters", - type: { - name: "Composite", - className: "DeployConfigurationParameters", - modelProperties: { - branch: { - serializedName: "properties.branch", - xmlName: "properties.branch", - type: { - name: "String" - } - }, - force: { - serializedName: "properties.force", - xmlName: "properties.force", - type: { - name: "Boolean" + serializedName: "DeployConfigurationParameters", + type: { + name: "Composite", + className: "DeployConfigurationParameters", + modelProperties: { + branch: { + serializedName: "properties.branch", + xmlName: "properties.branch", + type: { + name: "String" + } + }, + force: { + serializedName: "properties.force", + xmlName: "properties.force", + type: { + name: "Boolean" + } + } } - } } - } }; export const OperationResultLogItemContract: coreClient.CompositeMapper = { - serializedName: "OperationResultLogItemContract", - type: { - name: "Composite", - className: "OperationResultLogItemContract", - modelProperties: { - objectType: { - serializedName: "objectType", - xmlName: "objectType", - type: { - name: "String" - } - }, - action: { - serializedName: "action", - xmlName: "action", - type: { - name: "String" - } - }, - objectKey: { - serializedName: "objectKey", - xmlName: "objectKey", - type: { - name: "String" - } - } - } - } + serializedName: "OperationResultLogItemContract", + type: { + name: "Composite", + className: "OperationResultLogItemContract", + modelProperties: { + objectType: { + serializedName: "objectType", + xmlName: "objectType", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + xmlName: "action", + type: { + name: "String" + } + }, + objectKey: { + serializedName: "objectKey", + xmlName: "objectKey", + type: { + name: "String" + } + } + } + } }; export const SaveConfigurationParameter: coreClient.CompositeMapper = { - serializedName: "SaveConfigurationParameter", - type: { - name: "Composite", - className: "SaveConfigurationParameter", - modelProperties: { - branch: { - serializedName: "properties.branch", - xmlName: "properties.branch", - type: { - name: "String" - } - }, - force: { - serializedName: "properties.force", - xmlName: "properties.force", - type: { - name: "Boolean" + serializedName: "SaveConfigurationParameter", + type: { + name: "Composite", + className: "SaveConfigurationParameter", + modelProperties: { + branch: { + serializedName: "properties.branch", + xmlName: "properties.branch", + type: { + name: "String" + } + }, + force: { + serializedName: "properties.force", + xmlName: "properties.force", + type: { + name: "Boolean" + } + } } - } } - } }; export const UserCreateParameters: coreClient.CompositeMapper = { - serializedName: "UserCreateParameters", - type: { - name: "Composite", - className: "UserCreateParameters", - modelProperties: { - state: { - defaultValue: "active", - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - note: { - serializedName: "properties.note", - xmlName: "properties.note", - type: { - name: "String" - } - }, - identities: { - serializedName: "properties.identities", - xmlName: "properties.identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" - } - } - } - }, - email: { - constraints: { - MaxLength: 254, - MinLength: 1 - }, - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String" - } - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.firstName", - xmlName: "properties.firstName", - type: { - name: "String" - } - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.lastName", - xmlName: "properties.lastName", - type: { - name: "String" - } - }, - password: { - serializedName: "properties.password", - xmlName: "properties.password", - type: { - name: "String" - } - }, - appType: { - serializedName: "properties.appType", - xmlName: "properties.appType", - type: { - name: "String" - } - }, - confirmation: { - serializedName: "properties.confirmation", - xmlName: "properties.confirmation", - type: { - name: "String" - } - } - } - } + serializedName: "UserCreateParameters", + type: { + name: "Composite", + className: "UserCreateParameters", + modelProperties: { + state: { + defaultValue: "active", + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + note: { + serializedName: "properties.note", + xmlName: "properties.note", + type: { + name: "String" + } + }, + identities: { + serializedName: "properties.identities", + xmlName: "properties.identities", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } + }, + email: { + constraints: { + MaxLength: 254, + MinLength: 1 + }, + serializedName: "properties.email", + xmlName: "properties.email", + type: { + name: "String" + } + }, + firstName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.firstName", + xmlName: "properties.firstName", + type: { + name: "String" + } + }, + lastName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.lastName", + xmlName: "properties.lastName", + type: { + name: "String" + } + }, + password: { + serializedName: "properties.password", + xmlName: "properties.password", + type: { + name: "String" + } + }, + appType: { + serializedName: "properties.appType", + xmlName: "properties.appType", + type: { + name: "String" + } + }, + confirmation: { + serializedName: "properties.confirmation", + xmlName: "properties.confirmation", + type: { + name: "String" + } + } + } + } }; export const UserUpdateParameters: coreClient.CompositeMapper = { - serializedName: "UserUpdateParameters", - type: { - name: "Composite", - className: "UserUpdateParameters", - modelProperties: { - state: { - defaultValue: "active", - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - note: { - serializedName: "properties.note", - xmlName: "properties.note", - type: { - name: "String" - } - }, - identities: { - serializedName: "properties.identities", - xmlName: "properties.identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" - } - } - } - }, - email: { - constraints: { - MaxLength: 254, - MinLength: 1 - }, - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String" - } - }, - password: { - serializedName: "properties.password", - xmlName: "properties.password", - type: { - name: "String" - } - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.firstName", - xmlName: "properties.firstName", - type: { - name: "String" - } - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.lastName", - xmlName: "properties.lastName", - type: { - name: "String" - } - } - } - } + serializedName: "UserUpdateParameters", + type: { + name: "Composite", + className: "UserUpdateParameters", + modelProperties: { + state: { + defaultValue: "active", + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + note: { + serializedName: "properties.note", + xmlName: "properties.note", + type: { + name: "String" + } + }, + identities: { + serializedName: "properties.identities", + xmlName: "properties.identities", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } + }, + email: { + constraints: { + MaxLength: 254, + MinLength: 1 + }, + serializedName: "properties.email", + xmlName: "properties.email", + type: { + name: "String" + } + }, + password: { + serializedName: "properties.password", + xmlName: "properties.password", + type: { + name: "String" + } + }, + firstName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.firstName", + xmlName: "properties.firstName", + type: { + name: "String" + } + }, + lastName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.lastName", + xmlName: "properties.lastName", + type: { + name: "String" + } + } + } + } }; export const GenerateSsoUrlResult: coreClient.CompositeMapper = { - serializedName: "GenerateSsoUrlResult", - type: { - name: "Composite", - className: "GenerateSsoUrlResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" + serializedName: "GenerateSsoUrlResult", + type: { + name: "Composite", + className: "GenerateSsoUrlResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + } } - } } - } }; export const UserIdentityCollection: coreClient.CompositeMapper = { - serializedName: "UserIdentityCollection", - type: { - name: "Composite", - className: "UserIdentityCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" + serializedName: "UserIdentityCollection", + type: { + name: "Composite", + className: "UserIdentityCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const UserTokenParameters: coreClient.CompositeMapper = { - serializedName: "UserTokenParameters", - type: { - name: "Composite", - className: "UserTokenParameters", - modelProperties: { - keyType: { - serializedName: "properties.keyType", - xmlName: "properties.keyType", - type: { - name: "Enum", - allowedValues: ["primary", "secondary"] - } - }, - expiry: { - serializedName: "properties.expiry", - xmlName: "properties.expiry", - type: { - name: "DateTime" - } - } - } - } + serializedName: "UserTokenParameters", + type: { + name: "Composite", + className: "UserTokenParameters", + modelProperties: { + keyType: { + serializedName: "properties.keyType", + xmlName: "properties.keyType", + type: { + name: "Enum", + allowedValues: ["primary", "secondary"] + } + }, + expiry: { + serializedName: "properties.expiry", + xmlName: "properties.expiry", + type: { + name: "DateTime" + } + } + } + } }; export const UserTokenResult: coreClient.CompositeMapper = { - serializedName: "UserTokenResult", - type: { - name: "Composite", - className: "UserTokenResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" + serializedName: "UserTokenResult", + type: { + name: "Composite", + className: "UserTokenResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationCollection: coreClient.CompositeMapper = { - serializedName: "DocumentationCollection", - type: { - name: "Composite", - className: "DocumentationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "DocumentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DocumentationContract" + serializedName: "DocumentationCollection", + type: { + name: "Composite", + className: "DocumentationCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "DocumentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DocumentationContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const DocumentationUpdateContract: coreClient.CompositeMapper = { - serializedName: "DocumentationUpdateContract", - type: { - name: "Composite", - className: "DocumentationUpdateContract", - modelProperties: { - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - content: { - serializedName: "properties.content", - xmlName: "properties.content", - type: { - name: "String" + serializedName: "DocumentationUpdateContract", + type: { + name: "Composite", + className: "DocumentationUpdateContract", + modelProperties: { + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + content: { + serializedName: "properties.content", + xmlName: "properties.content", + type: { + name: "String" + } + } } - } } - } }; export const ApiRevisionInfoContract: coreClient.CompositeMapper = { - serializedName: "ApiRevisionInfoContract", - type: { - name: "Composite", - className: "ApiRevisionInfoContract", - modelProperties: { - sourceApiId: { - serializedName: "sourceApiId", - xmlName: "sourceApiId", - type: { - name: "String" - } - }, - apiVersionName: { - constraints: { - MaxLength: 100 - }, - serializedName: "apiVersionName", - xmlName: "apiVersionName", - type: { - name: "String" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "apiRevisionDescription", - xmlName: "apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionSet: { - serializedName: "apiVersionSet", - xmlName: "apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails" - } - } - } - } + serializedName: "ApiRevisionInfoContract", + type: { + name: "Composite", + className: "ApiRevisionInfoContract", + modelProperties: { + sourceApiId: { + serializedName: "sourceApiId", + xmlName: "sourceApiId", + type: { + name: "String" + } + }, + apiVersionName: { + constraints: { + MaxLength: 100 + }, + serializedName: "apiVersionName", + xmlName: "apiVersionName", + type: { + name: "String" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "apiRevisionDescription", + xmlName: "apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionSet: { + serializedName: "apiVersionSet", + xmlName: "apiVersionSet", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails" + } + } + } + } }; export const QuotaCounterValueContract: coreClient.CompositeMapper = { - serializedName: "QuotaCounterValueContract", - type: { - name: "Composite", - className: "QuotaCounterValueContract", - modelProperties: { - callsCount: { - serializedName: "value.callsCount", - xmlName: "value.callsCount", - type: { - name: "Number" - } - }, - kbTransferred: { - serializedName: "value.kbTransferred", - xmlName: "value.kbTransferred", - type: { - name: "Number" + serializedName: "QuotaCounterValueContract", + type: { + name: "Composite", + className: "QuotaCounterValueContract", + modelProperties: { + callsCount: { + serializedName: "value.callsCount", + xmlName: "value.callsCount", + type: { + name: "Number" + } + }, + kbTransferred: { + serializedName: "value.kbTransferred", + xmlName: "value.kbTransferred", + type: { + name: "Number" + } + } } - } } - } }; export const ResolverResultLogItemContract: coreClient.CompositeMapper = { - serializedName: "ResolverResultLogItemContract", - type: { - name: "Composite", - className: "ResolverResultLogItemContract", - modelProperties: { - objectType: { - serializedName: "objectType", - xmlName: "objectType", - type: { - name: "String" - } - }, - action: { - serializedName: "action", - xmlName: "action", - type: { - name: "String" - } - }, - objectKey: { - serializedName: "objectKey", - xmlName: "objectKey", - type: { - name: "String" - } - } - } - } + serializedName: "ResolverResultLogItemContract", + type: { + name: "Composite", + className: "ResolverResultLogItemContract", + modelProperties: { + objectType: { + serializedName: "objectType", + xmlName: "objectType", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + xmlName: "action", + type: { + name: "String" + } + }, + objectKey: { + serializedName: "objectKey", + xmlName: "objectKey", + type: { + name: "String" + } + } + } + } }; export const ApiContractProperties: coreClient.CompositeMapper = { - serializedName: "ApiContractProperties", - type: { - name: "Composite", - className: "ApiContractProperties", - modelProperties: { - ...ApiEntityBaseContract.type.modelProperties, - sourceApiId: { - serializedName: "sourceApiId", - xmlName: "sourceApiId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "serviceUrl", - xmlName: "serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "path", - required: true, - xmlName: "path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "protocols", - xmlName: "protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiContractProperties", + type: { + name: "Composite", + className: "ApiContractProperties", + modelProperties: { + ...ApiEntityBaseContract.type.modelProperties, + sourceApiId: { + serializedName: "sourceApiId", + xmlName: "sourceApiId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "serviceUrl", + xmlName: "serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "path", + required: true, + xmlName: "path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "protocols", + xmlName: "protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + apiVersionSet: { + serializedName: "apiVersionSet", + xmlName: "apiVersionSet", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails" + } } - } } - }, - apiVersionSet: { - serializedName: "apiVersionSet", - xmlName: "apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails" - } - } } - } }; export const ApiContractUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ApiContractUpdateProperties", - type: { - name: "Composite", - className: "ApiContractUpdateProperties", - modelProperties: { - ...ApiEntityBaseContract.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "serviceUrl", - xmlName: "serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "path", - xmlName: "path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "protocols", - xmlName: "protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiContractUpdateProperties", + type: { + name: "Composite", + className: "ApiContractUpdateProperties", + modelProperties: { + ...ApiEntityBaseContract.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "serviceUrl", + xmlName: "serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "path", + xmlName: "path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "protocols", + xmlName: "protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const ApiTagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "ApiTagResourceContractProperties", - type: { - name: "Composite", - className: "ApiTagResourceContractProperties", - modelProperties: { - ...ApiEntityBaseContract.type.modelProperties, - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "serviceUrl", - xmlName: "serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "path", - xmlName: "path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "protocols", - xmlName: "protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiTagResourceContractProperties", + type: { + name: "Composite", + className: "ApiTagResourceContractProperties", + modelProperties: { + ...ApiEntityBaseContract.type.modelProperties, + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "serviceUrl", + xmlName: "serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "path", + xmlName: "path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "protocols", + xmlName: "protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const ProxyResource: coreClient.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } } - } }; export const PrivateEndpointConnection: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnection", - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - ...Resource.type.modelProperties, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - xmlName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint" - } - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - xmlName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String" - } - } - } - } + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + xmlName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + xmlName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + xmlName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } }; export const PrivateLinkResource: coreClient.CompositeMapper = { - serializedName: "PrivateLinkResource", - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - ...Resource.type.modelProperties, - groupId: { - serializedName: "properties.groupId", - readOnly: true, - xmlName: "properties.groupId", - type: { - name: "String" - } - }, - requiredMembers: { - serializedName: "properties.requiredMembers", - readOnly: true, - xmlName: "properties.requiredMembers", - xmlElementName: "PrivateLinkResourcePropertiesRequiredMembersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", - xmlName: "properties.requiredZoneNames", - xmlElementName: "PrivateLinkResourcePropertiesRequiredZoneNamesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", + readOnly: true, + xmlName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + readOnly: true, + xmlName: "properties.requiredMembers", + xmlElementName: "PrivateLinkResourcePropertiesRequiredMembersItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + xmlName: "properties.requiredZoneNames", + xmlElementName: "PrivateLinkResourcePropertiesRequiredZoneNamesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const OperationContractProperties: coreClient.CompositeMapper = { - serializedName: "OperationContractProperties", - type: { - name: "Composite", - className: "OperationContractProperties", - modelProperties: { - ...OperationEntityBaseContract.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - required: true, - xmlName: "method", - type: { - name: "String" - } - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "urlTemplate", - required: true, - xmlName: "urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationContractProperties", + type: { + name: "Composite", + className: "OperationContractProperties", + modelProperties: { + ...OperationEntityBaseContract.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + method: { + serializedName: "method", + required: true, + xmlName: "method", + type: { + name: "String" + } + }, + urlTemplate: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "urlTemplate", + required: true, + xmlName: "urlTemplate", + type: { + name: "String" + } + } + } + } }; export const OperationUpdateContractProperties: coreClient.CompositeMapper = { - serializedName: "OperationUpdateContractProperties", - type: { - name: "Composite", - className: "OperationUpdateContractProperties", - modelProperties: { - ...OperationEntityBaseContract.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - xmlName: "method", - type: { - name: "String" - } - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "urlTemplate", - xmlName: "urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationUpdateContractProperties", + type: { + name: "Composite", + className: "OperationUpdateContractProperties", + modelProperties: { + ...OperationEntityBaseContract.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + method: { + serializedName: "method", + xmlName: "method", + type: { + name: "String" + } + }, + urlTemplate: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "urlTemplate", + xmlName: "urlTemplate", + type: { + name: "String" + } + } + } + } }; export const ProductContractProperties: coreClient.CompositeMapper = { - serializedName: "ProductContractProperties", - type: { - name: "Composite", - className: "ProductContractProperties", - modelProperties: { - ...ProductEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - } - } - } + serializedName: "ProductContractProperties", + type: { + name: "Composite", + className: "ProductContractProperties", + modelProperties: { + ...ProductEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + } + } + } }; export const ProductTagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "ProductTagResourceContractProperties", - type: { - name: "Composite", - className: "ProductTagResourceContractProperties", - modelProperties: { - ...ProductEntityBaseParameters.type.modelProperties, - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - } - } - } + serializedName: "ProductTagResourceContractProperties", + type: { + name: "Composite", + className: "ProductTagResourceContractProperties", + modelProperties: { + ...ProductEntityBaseParameters.type.modelProperties, + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + } + } + } }; export const ProductUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ProductUpdateProperties", - type: { - name: "Composite", - className: "ProductUpdateProperties", - modelProperties: { - ...ProductEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - } - } - } + serializedName: "ProductUpdateProperties", + type: { + name: "Composite", + className: "ProductUpdateProperties", + modelProperties: { + ...ProductEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + } + } + } }; export const IssueContractProperties: coreClient.CompositeMapper = { - serializedName: "IssueContractProperties", - type: { - name: "Composite", - className: "IssueContractProperties", - modelProperties: { - ...IssueContractBaseProperties.type.modelProperties, - title: { - serializedName: "title", - required: true, - xmlName: "title", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - required: true, - xmlName: "description", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - required: true, - xmlName: "userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueContractProperties", + type: { + name: "Composite", + className: "IssueContractProperties", + modelProperties: { + ...IssueContractBaseProperties.type.modelProperties, + title: { + serializedName: "title", + required: true, + xmlName: "title", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + required: true, + xmlName: "description", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + required: true, + xmlName: "userId", + type: { + name: "String" + } + } + } + } }; export const IssueUpdateContractProperties: coreClient.CompositeMapper = { - serializedName: "IssueUpdateContractProperties", - type: { - name: "Composite", - className: "IssueUpdateContractProperties", - modelProperties: { - ...IssueContractBaseProperties.type.modelProperties, - title: { - serializedName: "title", - xmlName: "title", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - xmlName: "userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueUpdateContractProperties", + type: { + name: "Composite", + className: "IssueUpdateContractProperties", + modelProperties: { + ...IssueContractBaseProperties.type.modelProperties, + title: { + serializedName: "title", + xmlName: "title", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + xmlName: "userId", + type: { + name: "String" + } + } + } + } }; export const TagDescriptionContractProperties: coreClient.CompositeMapper = { - serializedName: "TagDescriptionContractProperties", - type: { - name: "Composite", - className: "TagDescriptionContractProperties", - modelProperties: { - ...TagDescriptionBaseProperties.type.modelProperties, - tagId: { - serializedName: "tagId", - xmlName: "tagId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - } - } - } + serializedName: "TagDescriptionContractProperties", + type: { + name: "Composite", + className: "TagDescriptionContractProperties", + modelProperties: { + ...TagDescriptionBaseProperties.type.modelProperties, + tagId: { + serializedName: "tagId", + xmlName: "tagId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + } + } + } }; export const ApiVersionSetContractProperties: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetContractProperties", - type: { - name: "Composite", - className: "ApiVersionSetContractProperties", - modelProperties: { - ...ApiVersionSetEntityBase.type.modelProperties, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "versioningScheme", - required: true, - xmlName: "versioningScheme", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetContractProperties", + type: { + name: "Composite", + className: "ApiVersionSetContractProperties", + modelProperties: { + ...ApiVersionSetEntityBase.type.modelProperties, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "versioningScheme", + required: true, + xmlName: "versioningScheme", + type: { + name: "String" + } + } + } + } }; export const ApiVersionSetUpdateParametersProperties: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetUpdateParametersProperties", - type: { - name: "Composite", - className: "ApiVersionSetUpdateParametersProperties", - modelProperties: { - ...ApiVersionSetEntityBase.type.modelProperties, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "versioningScheme", - xmlName: "versioningScheme", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetUpdateParametersProperties", + type: { + name: "Composite", + className: "ApiVersionSetUpdateParametersProperties", + modelProperties: { + ...ApiVersionSetEntityBase.type.modelProperties, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "versioningScheme", + xmlName: "versioningScheme", + type: { + name: "String" + } + } + } + } }; export const AuthorizationServerContractProperties: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerContractProperties", - type: { - name: "Composite", - className: "AuthorizationServerContractProperties", - modelProperties: { - ...AuthorizationServerContractBaseProperties.type.modelProperties, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "useInTestConsole", - xmlName: "useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "useInApiDocumentation", - xmlName: "useInApiDocumentation", - type: { - name: "Boolean" - } - }, - clientRegistrationEndpoint: { - serializedName: "clientRegistrationEndpoint", - required: true, - xmlName: "clientRegistrationEndpoint", - type: { - name: "String" - } - }, - authorizationEndpoint: { - serializedName: "authorizationEndpoint", - required: true, - xmlName: "authorizationEndpoint", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "grantTypes", - required: true, - xmlName: "grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerContractProperties", + type: { + name: "Composite", + className: "AuthorizationServerContractProperties", + modelProperties: { + ...AuthorizationServerContractBaseProperties.type.modelProperties, + displayName: { + constraints: { + MaxLength: 50, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "useInTestConsole", + xmlName: "useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "useInApiDocumentation", + xmlName: "useInApiDocumentation", + type: { + name: "Boolean" + } + }, + clientRegistrationEndpoint: { + serializedName: "clientRegistrationEndpoint", + required: true, + xmlName: "clientRegistrationEndpoint", + type: { + name: "String" + } + }, + authorizationEndpoint: { + serializedName: "authorizationEndpoint", + required: true, + xmlName: "authorizationEndpoint", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "grantTypes", + required: true, + xmlName: "grantTypes", + xmlElementName: "GrantType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clientId: { + serializedName: "clientId", + required: true, + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } } - } - } - }, - clientId: { - serializedName: "clientId", - required: true, - xmlName: "clientId", - type: { - name: "String" } - }, - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - } } - } }; export const AuthorizationServerUpdateContractProperties: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerUpdateContractProperties", - type: { - name: "Composite", - className: "AuthorizationServerUpdateContractProperties", - modelProperties: { - ...AuthorizationServerContractBaseProperties.type.modelProperties, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "useInTestConsole", - xmlName: "useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "useInApiDocumentation", - xmlName: "useInApiDocumentation", - type: { - name: "Boolean" - } - }, - clientRegistrationEndpoint: { - serializedName: "clientRegistrationEndpoint", - xmlName: "clientRegistrationEndpoint", - type: { - name: "String" - } - }, - authorizationEndpoint: { - serializedName: "authorizationEndpoint", - xmlName: "authorizationEndpoint", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "grantTypes", - xmlName: "grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerUpdateContractProperties", + type: { + name: "Composite", + className: "AuthorizationServerUpdateContractProperties", + modelProperties: { + ...AuthorizationServerContractBaseProperties.type.modelProperties, + displayName: { + constraints: { + MaxLength: 50, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "useInTestConsole", + xmlName: "useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "useInApiDocumentation", + xmlName: "useInApiDocumentation", + type: { + name: "Boolean" + } + }, + clientRegistrationEndpoint: { + serializedName: "clientRegistrationEndpoint", + xmlName: "clientRegistrationEndpoint", + type: { + name: "String" + } + }, + authorizationEndpoint: { + serializedName: "authorizationEndpoint", + xmlName: "authorizationEndpoint", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "grantTypes", + xmlName: "grantTypes", + xmlElementName: "GrantType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clientId: { + serializedName: "clientId", + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } } - } } - }, - clientId: { - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - } } - } }; export const BackendContractProperties: coreClient.CompositeMapper = { - serializedName: "BackendContractProperties", - type: { - name: "Composite", - className: "BackendContractProperties", - modelProperties: { - ...BackendBaseParameters.type.modelProperties, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "url", - required: true, - xmlName: "url", - type: { - name: "String" - } - }, - protocol: { - serializedName: "protocol", - required: true, - xmlName: "protocol", - type: { - name: "String" - } - } - } - } + serializedName: "BackendContractProperties", + type: { + name: "Composite", + className: "BackendContractProperties", + modelProperties: { + ...BackendBaseParameters.type.modelProperties, + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "url", + required: true, + xmlName: "url", + type: { + name: "String" + } + }, + protocol: { + serializedName: "protocol", + required: true, + xmlName: "protocol", + type: { + name: "String" + } + } + } + } }; export const BackendUpdateParameterProperties: coreClient.CompositeMapper = { - serializedName: "BackendUpdateParameterProperties", - type: { - name: "Composite", - className: "BackendUpdateParameterProperties", - modelProperties: { - ...BackendBaseParameters.type.modelProperties, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "url", - xmlName: "url", - type: { - name: "String" - } - }, - protocol: { - serializedName: "protocol", - xmlName: "protocol", - type: { - name: "String" - } - } - } - } + serializedName: "BackendUpdateParameterProperties", + type: { + name: "Composite", + className: "BackendUpdateParameterProperties", + modelProperties: { + ...BackendBaseParameters.type.modelProperties, + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "url", + xmlName: "url", + type: { + name: "String" + } + }, + protocol: { + serializedName: "protocol", + xmlName: "protocol", + type: { + name: "String" + } + } + } + } }; export const KeyVaultContractProperties: coreClient.CompositeMapper = { - serializedName: "KeyVaultContractProperties", - type: { - name: "Composite", - className: "KeyVaultContractProperties", - modelProperties: { - ...KeyVaultContractCreateProperties.type.modelProperties, - lastStatus: { - serializedName: "lastStatus", - xmlName: "lastStatus", - type: { - name: "Composite", - className: "KeyVaultLastAccessStatusContractProperties" + serializedName: "KeyVaultContractProperties", + type: { + name: "Composite", + className: "KeyVaultContractProperties", + modelProperties: { + ...KeyVaultContractCreateProperties.type.modelProperties, + lastStatus: { + serializedName: "lastStatus", + xmlName: "lastStatus", + type: { + name: "Composite", + className: "KeyVaultLastAccessStatusContractProperties" + } + } } - } } - } }; export const ApiManagementServiceProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceProperties", - type: { - name: "Composite", - className: "ApiManagementServiceProperties", - modelProperties: { - ...ApiManagementServiceBaseProperties.type.modelProperties, - publisherEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "publisherEmail", - required: true, - xmlName: "publisherEmail", - type: { - name: "String" - } - }, - publisherName: { - constraints: { - MaxLength: 100 - }, - serializedName: "publisherName", - required: true, - xmlName: "publisherName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceProperties", + type: { + name: "Composite", + className: "ApiManagementServiceProperties", + modelProperties: { + ...ApiManagementServiceBaseProperties.type.modelProperties, + publisherEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "publisherEmail", + required: true, + xmlName: "publisherEmail", + type: { + name: "String" + } + }, + publisherName: { + constraints: { + MaxLength: 100 + }, + serializedName: "publisherName", + required: true, + xmlName: "publisherName", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceUpdateProperties", - type: { - name: "Composite", - className: "ApiManagementServiceUpdateProperties", - modelProperties: { - ...ApiManagementServiceBaseProperties.type.modelProperties, - publisherEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "publisherEmail", - xmlName: "publisherEmail", - type: { - name: "String" - } - }, - publisherName: { - constraints: { - MaxLength: 100 - }, - serializedName: "publisherName", - xmlName: "publisherName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceUpdateProperties", + type: { + name: "Composite", + className: "ApiManagementServiceUpdateProperties", + modelProperties: { + ...ApiManagementServiceBaseProperties.type.modelProperties, + publisherEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "publisherEmail", + xmlName: "publisherEmail", + type: { + name: "String" + } + }, + publisherName: { + constraints: { + MaxLength: 100 + }, + serializedName: "publisherName", + xmlName: "publisherName", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceResource: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceResource", - type: { - name: "Composite", - className: "ApiManagementServiceResource", - modelProperties: { - ...ApimResource.type.modelProperties, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties" - } - }, - identity: { - serializedName: "identity", - xmlName: "identity", - type: { - name: "Composite", - className: "ApiManagementServiceIdentity" - } - }, - systemData: { - serializedName: "systemData", - xmlName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - location: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String" - } - }, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String" - } - }, - zones: { - serializedName: "zones", - xmlName: "zones", - xmlElementName: "ApiManagementServiceResourceZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - notificationSenderEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.notificationSenderEmail", - xmlName: "properties.notificationSenderEmail", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String" - } - }, - targetProvisioningState: { - serializedName: "properties.targetProvisioningState", - readOnly: true, - xmlName: "properties.targetProvisioningState", - type: { - name: "String" - } - }, - createdAtUtc: { - serializedName: "properties.createdAtUtc", - readOnly: true, - xmlName: "properties.createdAtUtc", - type: { - name: "DateTime" - } - }, - gatewayUrl: { - serializedName: "properties.gatewayUrl", - readOnly: true, - xmlName: "properties.gatewayUrl", - type: { - name: "String" - } - }, - gatewayRegionalUrl: { - serializedName: "properties.gatewayRegionalUrl", - readOnly: true, - xmlName: "properties.gatewayRegionalUrl", - type: { - name: "String" - } - }, - portalUrl: { - serializedName: "properties.portalUrl", - readOnly: true, - xmlName: "properties.portalUrl", - type: { - name: "String" - } - }, - managementApiUrl: { - serializedName: "properties.managementApiUrl", - readOnly: true, - xmlName: "properties.managementApiUrl", - type: { - name: "String" - } - }, - scmUrl: { - serializedName: "properties.scmUrl", - readOnly: true, - xmlName: "properties.scmUrl", - type: { - name: "String" - } - }, - developerPortalUrl: { - serializedName: "properties.developerPortalUrl", - readOnly: true, - xmlName: "properties.developerPortalUrl", - type: { - name: "String" - } - }, - hostnameConfigurations: { - serializedName: "properties.hostnameConfigurations", - xmlName: "properties.hostnameConfigurations", - xmlElementName: "HostnameConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HostnameConfiguration" - } - } - } - }, - publicIPAddresses: { - serializedName: "properties.publicIPAddresses", - readOnly: true, - xmlName: "properties.publicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - privateIPAddresses: { - serializedName: "properties.privateIPAddresses", - readOnly: true, - xmlName: "properties.privateIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIpAddressId: { - serializedName: "properties.publicIpAddressId", - xmlName: "properties.publicIpAddressId", - type: { - name: "String" - } - }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", - xmlName: "properties.publicNetworkAccess", - type: { - name: "String" - } - }, - virtualNetworkConfiguration: { - serializedName: "properties.virtualNetworkConfiguration", - xmlName: "properties.virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration" - } - }, - additionalLocations: { - serializedName: "properties.additionalLocations", - xmlName: "properties.additionalLocations", - xmlElementName: "AdditionalLocation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalLocation" - } - } - } - }, - customProperties: { - serializedName: "properties.customProperties", - xmlName: "properties.customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - certificates: { - serializedName: "properties.certificates", - xmlName: "properties.certificates", - xmlElementName: "CertificateConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateConfiguration" - } - } - } - }, - enableClientCertificate: { - defaultValue: false, - serializedName: "properties.enableClientCertificate", - xmlName: "properties.enableClientCertificate", - type: { - name: "Boolean" - } - }, - natGatewayState: { - serializedName: "properties.natGatewayState", - xmlName: "properties.natGatewayState", - type: { - name: "String" - } - }, - outboundPublicIPAddresses: { - serializedName: "properties.outboundPublicIPAddresses", - readOnly: true, - xmlName: "properties.outboundPublicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - disableGateway: { - defaultValue: false, - serializedName: "properties.disableGateway", - xmlName: "properties.disableGateway", - type: { - name: "Boolean" - } - }, - virtualNetworkType: { - defaultValue: "None", - serializedName: "properties.virtualNetworkType", - xmlName: "properties.virtualNetworkType", - type: { - name: "String" - } - }, - apiVersionConstraint: { - serializedName: "properties.apiVersionConstraint", - xmlName: "properties.apiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint" - } - }, - restore: { - defaultValue: false, - serializedName: "properties.restore", - xmlName: "properties.restore", - type: { - name: "Boolean" - } - }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - xmlName: "properties.privateEndpointConnections", - xmlElementName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper" - } - } - } - }, - platformVersion: { - serializedName: "properties.platformVersion", - readOnly: true, - xmlName: "properties.platformVersion", - type: { - name: "String" - } - }, - publisherEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.publisherEmail", - required: true, - xmlName: "properties.publisherEmail", - type: { - name: "String" - } - }, - publisherName: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.publisherName", - required: true, - xmlName: "properties.publisherName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceResource", + type: { + name: "Composite", + className: "ApiManagementServiceResource", + modelProperties: { + ...ApimResource.type.modelProperties, + sku: { + serializedName: "sku", + xmlName: "sku", + type: { + name: "Composite", + className: "ApiManagementServiceSkuProperties" + } + }, + identity: { + serializedName: "identity", + xmlName: "identity", + type: { + name: "Composite", + className: "ApiManagementServiceIdentity" + } + }, + systemData: { + serializedName: "systemData", + xmlName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + location: { + serializedName: "location", + required: true, + xmlName: "location", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + xmlName: "etag", + type: { + name: "String" + } + }, + zones: { + serializedName: "zones", + xmlName: "zones", + xmlElementName: "ApiManagementServiceResourceZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notificationSenderEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.notificationSenderEmail", + xmlName: "properties.notificationSenderEmail", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + xmlName: "properties.provisioningState", + type: { + name: "String" + } + }, + targetProvisioningState: { + serializedName: "properties.targetProvisioningState", + readOnly: true, + xmlName: "properties.targetProvisioningState", + type: { + name: "String" + } + }, + createdAtUtc: { + serializedName: "properties.createdAtUtc", + readOnly: true, + xmlName: "properties.createdAtUtc", + type: { + name: "DateTime" + } + }, + gatewayUrl: { + serializedName: "properties.gatewayUrl", + readOnly: true, + xmlName: "properties.gatewayUrl", + type: { + name: "String" + } + }, + gatewayRegionalUrl: { + serializedName: "properties.gatewayRegionalUrl", + readOnly: true, + xmlName: "properties.gatewayRegionalUrl", + type: { + name: "String" + } + }, + portalUrl: { + serializedName: "properties.portalUrl", + readOnly: true, + xmlName: "properties.portalUrl", + type: { + name: "String" + } + }, + managementApiUrl: { + serializedName: "properties.managementApiUrl", + readOnly: true, + xmlName: "properties.managementApiUrl", + type: { + name: "String" + } + }, + scmUrl: { + serializedName: "properties.scmUrl", + readOnly: true, + xmlName: "properties.scmUrl", + type: { + name: "String" + } + }, + developerPortalUrl: { + serializedName: "properties.developerPortalUrl", + readOnly: true, + xmlName: "properties.developerPortalUrl", + type: { + name: "String" + } + }, + hostnameConfigurations: { + serializedName: "properties.hostnameConfigurations", + xmlName: "properties.hostnameConfigurations", + xmlElementName: "HostnameConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HostnameConfiguration" + } + } + } + }, + publicIPAddresses: { + serializedName: "properties.publicIPAddresses", + readOnly: true, + xmlName: "properties.publicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateIPAddresses: { + serializedName: "properties.privateIPAddresses", + readOnly: true, + xmlName: "properties.privateIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIpAddressId: { + serializedName: "properties.publicIpAddressId", + xmlName: "properties.publicIpAddressId", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + xmlName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + virtualNetworkConfiguration: { + serializedName: "properties.virtualNetworkConfiguration", + xmlName: "properties.virtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration" + } + }, + additionalLocations: { + serializedName: "properties.additionalLocations", + xmlName: "properties.additionalLocations", + xmlElementName: "AdditionalLocation", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalLocation" + } + } + } + }, + customProperties: { + serializedName: "properties.customProperties", + xmlName: "properties.customProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + certificates: { + serializedName: "properties.certificates", + xmlName: "properties.certificates", + xmlElementName: "CertificateConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateConfiguration" + } + } + } + }, + enableClientCertificate: { + defaultValue: false, + serializedName: "properties.enableClientCertificate", + xmlName: "properties.enableClientCertificate", + type: { + name: "Boolean" + } + }, + natGatewayState: { + serializedName: "properties.natGatewayState", + xmlName: "properties.natGatewayState", + type: { + name: "String" + } + }, + outboundPublicIPAddresses: { + serializedName: "properties.outboundPublicIPAddresses", + readOnly: true, + xmlName: "properties.outboundPublicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disableGateway: { + defaultValue: false, + serializedName: "properties.disableGateway", + xmlName: "properties.disableGateway", + type: { + name: "Boolean" + } + }, + virtualNetworkType: { + defaultValue: "None", + serializedName: "properties.virtualNetworkType", + xmlName: "properties.virtualNetworkType", + type: { + name: "String" + } + }, + apiVersionConstraint: { + serializedName: "properties.apiVersionConstraint", + xmlName: "properties.apiVersionConstraint", + type: { + name: "Composite", + className: "ApiVersionConstraint" + } + }, + restore: { + defaultValue: false, + serializedName: "properties.restore", + xmlName: "properties.restore", + type: { + name: "Boolean" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + xmlName: "properties.privateEndpointConnections", + xmlElementName: "RemotePrivateEndpointConnectionWrapper", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RemotePrivateEndpointConnectionWrapper" + } + } + } + }, + platformVersion: { + serializedName: "properties.platformVersion", + readOnly: true, + xmlName: "properties.platformVersion", + type: { + name: "String" + } + }, + publisherEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.publisherEmail", + required: true, + xmlName: "properties.publisherEmail", + type: { + name: "String" + } + }, + publisherName: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.publisherName", + required: true, + xmlName: "properties.publisherName", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceUpdateParameters: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceUpdateParameters", - type: { - name: "Composite", - className: "ApiManagementServiceUpdateParameters", - modelProperties: { - ...ApimResource.type.modelProperties, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties" - } - }, - identity: { - serializedName: "identity", - xmlName: "identity", - type: { - name: "Composite", - className: "ApiManagementServiceIdentity" - } - }, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String" - } - }, - zones: { - serializedName: "zones", - xmlName: "zones", - xmlElementName: "ApiManagementServiceUpdateParametersZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - notificationSenderEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.notificationSenderEmail", - xmlName: "properties.notificationSenderEmail", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String" - } - }, - targetProvisioningState: { - serializedName: "properties.targetProvisioningState", - readOnly: true, - xmlName: "properties.targetProvisioningState", - type: { - name: "String" - } - }, - createdAtUtc: { - serializedName: "properties.createdAtUtc", - readOnly: true, - xmlName: "properties.createdAtUtc", - type: { - name: "DateTime" - } - }, - gatewayUrl: { - serializedName: "properties.gatewayUrl", - readOnly: true, - xmlName: "properties.gatewayUrl", - type: { - name: "String" - } - }, - gatewayRegionalUrl: { - serializedName: "properties.gatewayRegionalUrl", - readOnly: true, - xmlName: "properties.gatewayRegionalUrl", - type: { - name: "String" - } - }, - portalUrl: { - serializedName: "properties.portalUrl", - readOnly: true, - xmlName: "properties.portalUrl", - type: { - name: "String" - } - }, - managementApiUrl: { - serializedName: "properties.managementApiUrl", - readOnly: true, - xmlName: "properties.managementApiUrl", - type: { - name: "String" - } - }, - scmUrl: { - serializedName: "properties.scmUrl", - readOnly: true, - xmlName: "properties.scmUrl", - type: { - name: "String" - } - }, - developerPortalUrl: { - serializedName: "properties.developerPortalUrl", - readOnly: true, - xmlName: "properties.developerPortalUrl", - type: { - name: "String" - } - }, - hostnameConfigurations: { - serializedName: "properties.hostnameConfigurations", - xmlName: "properties.hostnameConfigurations", - xmlElementName: "HostnameConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HostnameConfiguration" - } - } - } - }, - publicIPAddresses: { - serializedName: "properties.publicIPAddresses", - readOnly: true, - xmlName: "properties.publicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - privateIPAddresses: { - serializedName: "properties.privateIPAddresses", - readOnly: true, - xmlName: "properties.privateIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIpAddressId: { - serializedName: "properties.publicIpAddressId", - xmlName: "properties.publicIpAddressId", - type: { - name: "String" - } - }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", - xmlName: "properties.publicNetworkAccess", - type: { - name: "String" - } - }, - virtualNetworkConfiguration: { - serializedName: "properties.virtualNetworkConfiguration", - xmlName: "properties.virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration" - } - }, - additionalLocations: { - serializedName: "properties.additionalLocations", - xmlName: "properties.additionalLocations", - xmlElementName: "AdditionalLocation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalLocation" - } - } - } - }, - customProperties: { - serializedName: "properties.customProperties", - xmlName: "properties.customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - certificates: { - serializedName: "properties.certificates", - xmlName: "properties.certificates", - xmlElementName: "CertificateConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateConfiguration" - } - } - } - }, - enableClientCertificate: { - defaultValue: false, - serializedName: "properties.enableClientCertificate", - xmlName: "properties.enableClientCertificate", - type: { - name: "Boolean" - } - }, - natGatewayState: { - serializedName: "properties.natGatewayState", - xmlName: "properties.natGatewayState", - type: { - name: "String" - } - }, - outboundPublicIPAddresses: { - serializedName: "properties.outboundPublicIPAddresses", - readOnly: true, - xmlName: "properties.outboundPublicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - disableGateway: { - defaultValue: false, - serializedName: "properties.disableGateway", - xmlName: "properties.disableGateway", - type: { - name: "Boolean" - } - }, - virtualNetworkType: { - defaultValue: "None", - serializedName: "properties.virtualNetworkType", - xmlName: "properties.virtualNetworkType", - type: { - name: "String" - } - }, - apiVersionConstraint: { - serializedName: "properties.apiVersionConstraint", - xmlName: "properties.apiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint" - } - }, - restore: { - defaultValue: false, - serializedName: "properties.restore", - xmlName: "properties.restore", - type: { - name: "Boolean" - } - }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - xmlName: "properties.privateEndpointConnections", - xmlElementName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper" - } - } - } - }, - platformVersion: { - serializedName: "properties.platformVersion", - readOnly: true, - xmlName: "properties.platformVersion", - type: { - name: "String" - } - }, - publisherEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.publisherEmail", - xmlName: "properties.publisherEmail", - type: { - name: "String" - } - }, - publisherName: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.publisherName", - xmlName: "properties.publisherName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceUpdateParameters", + type: { + name: "Composite", + className: "ApiManagementServiceUpdateParameters", + modelProperties: { + ...ApimResource.type.modelProperties, + sku: { + serializedName: "sku", + xmlName: "sku", + type: { + name: "Composite", + className: "ApiManagementServiceSkuProperties" + } + }, + identity: { + serializedName: "identity", + xmlName: "identity", + type: { + name: "Composite", + className: "ApiManagementServiceIdentity" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + xmlName: "etag", + type: { + name: "String" + } + }, + zones: { + serializedName: "zones", + xmlName: "zones", + xmlElementName: "ApiManagementServiceUpdateParametersZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notificationSenderEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.notificationSenderEmail", + xmlName: "properties.notificationSenderEmail", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + xmlName: "properties.provisioningState", + type: { + name: "String" + } + }, + targetProvisioningState: { + serializedName: "properties.targetProvisioningState", + readOnly: true, + xmlName: "properties.targetProvisioningState", + type: { + name: "String" + } + }, + createdAtUtc: { + serializedName: "properties.createdAtUtc", + readOnly: true, + xmlName: "properties.createdAtUtc", + type: { + name: "DateTime" + } + }, + gatewayUrl: { + serializedName: "properties.gatewayUrl", + readOnly: true, + xmlName: "properties.gatewayUrl", + type: { + name: "String" + } + }, + gatewayRegionalUrl: { + serializedName: "properties.gatewayRegionalUrl", + readOnly: true, + xmlName: "properties.gatewayRegionalUrl", + type: { + name: "String" + } + }, + portalUrl: { + serializedName: "properties.portalUrl", + readOnly: true, + xmlName: "properties.portalUrl", + type: { + name: "String" + } + }, + managementApiUrl: { + serializedName: "properties.managementApiUrl", + readOnly: true, + xmlName: "properties.managementApiUrl", + type: { + name: "String" + } + }, + scmUrl: { + serializedName: "properties.scmUrl", + readOnly: true, + xmlName: "properties.scmUrl", + type: { + name: "String" + } + }, + developerPortalUrl: { + serializedName: "properties.developerPortalUrl", + readOnly: true, + xmlName: "properties.developerPortalUrl", + type: { + name: "String" + } + }, + hostnameConfigurations: { + serializedName: "properties.hostnameConfigurations", + xmlName: "properties.hostnameConfigurations", + xmlElementName: "HostnameConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HostnameConfiguration" + } + } + } + }, + publicIPAddresses: { + serializedName: "properties.publicIPAddresses", + readOnly: true, + xmlName: "properties.publicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateIPAddresses: { + serializedName: "properties.privateIPAddresses", + readOnly: true, + xmlName: "properties.privateIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIpAddressId: { + serializedName: "properties.publicIpAddressId", + xmlName: "properties.publicIpAddressId", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + xmlName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + virtualNetworkConfiguration: { + serializedName: "properties.virtualNetworkConfiguration", + xmlName: "properties.virtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration" + } + }, + additionalLocations: { + serializedName: "properties.additionalLocations", + xmlName: "properties.additionalLocations", + xmlElementName: "AdditionalLocation", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalLocation" + } + } + } + }, + customProperties: { + serializedName: "properties.customProperties", + xmlName: "properties.customProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + certificates: { + serializedName: "properties.certificates", + xmlName: "properties.certificates", + xmlElementName: "CertificateConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateConfiguration" + } + } + } + }, + enableClientCertificate: { + defaultValue: false, + serializedName: "properties.enableClientCertificate", + xmlName: "properties.enableClientCertificate", + type: { + name: "Boolean" + } + }, + natGatewayState: { + serializedName: "properties.natGatewayState", + xmlName: "properties.natGatewayState", + type: { + name: "String" + } + }, + outboundPublicIPAddresses: { + serializedName: "properties.outboundPublicIPAddresses", + readOnly: true, + xmlName: "properties.outboundPublicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disableGateway: { + defaultValue: false, + serializedName: "properties.disableGateway", + xmlName: "properties.disableGateway", + type: { + name: "Boolean" + } + }, + virtualNetworkType: { + defaultValue: "None", + serializedName: "properties.virtualNetworkType", + xmlName: "properties.virtualNetworkType", + type: { + name: "String" + } + }, + apiVersionConstraint: { + serializedName: "properties.apiVersionConstraint", + xmlName: "properties.apiVersionConstraint", + type: { + name: "Composite", + className: "ApiVersionConstraint" + } + }, + restore: { + defaultValue: false, + serializedName: "properties.restore", + xmlName: "properties.restore", + type: { + name: "Boolean" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + xmlName: "properties.privateEndpointConnections", + xmlElementName: "RemotePrivateEndpointConnectionWrapper", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RemotePrivateEndpointConnectionWrapper" + } + } + } + }, + platformVersion: { + serializedName: "properties.platformVersion", + readOnly: true, + xmlName: "properties.platformVersion", + type: { + name: "String" + } + }, + publisherEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.publisherEmail", + xmlName: "properties.publisherEmail", + type: { + name: "String" + } + }, + publisherName: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.publisherName", + xmlName: "properties.publisherName", + type: { + name: "String" + } + } + } + } }; export const UserContractProperties: coreClient.CompositeMapper = { - serializedName: "UserContractProperties", - type: { - name: "Composite", - className: "UserContractProperties", - modelProperties: { - ...UserEntityBaseParameters.type.modelProperties, - firstName: { - serializedName: "firstName", - xmlName: "firstName", - type: { - name: "String" - } - }, - lastName: { - serializedName: "lastName", - xmlName: "lastName", - type: { - name: "String" - } - }, - email: { - serializedName: "email", - xmlName: "email", - type: { - name: "String" - } - }, - registrationDate: { - serializedName: "registrationDate", - xmlName: "registrationDate", - type: { - name: "DateTime" - } - }, - groups: { - serializedName: "groups", - readOnly: true, - xmlName: "groups", - xmlElementName: "GroupContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupContractProperties" + serializedName: "UserContractProperties", + type: { + name: "Composite", + className: "UserContractProperties", + modelProperties: { + ...UserEntityBaseParameters.type.modelProperties, + firstName: { + serializedName: "firstName", + xmlName: "firstName", + type: { + name: "String" + } + }, + lastName: { + serializedName: "lastName", + xmlName: "lastName", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + xmlName: "email", + type: { + name: "String" + } + }, + registrationDate: { + serializedName: "registrationDate", + xmlName: "registrationDate", + type: { + name: "DateTime" + } + }, + groups: { + serializedName: "groups", + readOnly: true, + xmlName: "groups", + xmlElementName: "GroupContractProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupContractProperties" + } + } + } } - } } - } } - } }; export const UserCreateParameterProperties: coreClient.CompositeMapper = { - serializedName: "UserCreateParameterProperties", - type: { - name: "Composite", - className: "UserCreateParameterProperties", - modelProperties: { - ...UserEntityBaseParameters.type.modelProperties, - email: { - constraints: { - MaxLength: 254, - MinLength: 1 - }, - serializedName: "email", - required: true, - xmlName: "email", - type: { - name: "String" - } - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "firstName", - required: true, - xmlName: "firstName", - type: { - name: "String" - } - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "lastName", - required: true, - xmlName: "lastName", - type: { - name: "String" - } - }, - password: { - serializedName: "password", - xmlName: "password", - type: { - name: "String" - } - }, - appType: { - serializedName: "appType", - xmlName: "appType", - type: { - name: "String" - } - }, - confirmation: { - serializedName: "confirmation", - xmlName: "confirmation", - type: { - name: "String" - } - } - } - } + serializedName: "UserCreateParameterProperties", + type: { + name: "Composite", + className: "UserCreateParameterProperties", + modelProperties: { + ...UserEntityBaseParameters.type.modelProperties, + email: { + constraints: { + MaxLength: 254, + MinLength: 1 + }, + serializedName: "email", + required: true, + xmlName: "email", + type: { + name: "String" + } + }, + firstName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "firstName", + required: true, + xmlName: "firstName", + type: { + name: "String" + } + }, + lastName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "lastName", + required: true, + xmlName: "lastName", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + xmlName: "password", + type: { + name: "String" + } + }, + appType: { + serializedName: "appType", + xmlName: "appType", + type: { + name: "String" + } + }, + confirmation: { + serializedName: "confirmation", + xmlName: "confirmation", + type: { + name: "String" + } + } + } + } }; export const UserUpdateParametersProperties: coreClient.CompositeMapper = { - serializedName: "UserUpdateParametersProperties", - type: { - name: "Composite", - className: "UserUpdateParametersProperties", - modelProperties: { - ...UserEntityBaseParameters.type.modelProperties, - email: { - constraints: { - MaxLength: 254, - MinLength: 1 - }, - serializedName: "email", - xmlName: "email", - type: { - name: "String" - } - }, - password: { - serializedName: "password", - xmlName: "password", - type: { - name: "String" - } - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "firstName", - xmlName: "firstName", - type: { - name: "String" - } - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "lastName", - xmlName: "lastName", - type: { - name: "String" - } - } - } - } + serializedName: "UserUpdateParametersProperties", + type: { + name: "Composite", + className: "UserUpdateParametersProperties", + modelProperties: { + ...UserEntityBaseParameters.type.modelProperties, + email: { + constraints: { + MaxLength: 254, + MinLength: 1 + }, + serializedName: "email", + xmlName: "email", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + xmlName: "password", + type: { + name: "String" + } + }, + firstName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "firstName", + xmlName: "firstName", + type: { + name: "String" + } + }, + lastName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "lastName", + xmlName: "lastName", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderContractProperties: coreClient.CompositeMapper = { - serializedName: "IdentityProviderContractProperties", - type: { - name: "Composite", - className: "IdentityProviderContractProperties", - modelProperties: { - ...IdentityProviderBaseParameters.type.modelProperties, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "clientId", - required: true, - xmlName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderContractProperties", + type: { + name: "Composite", + className: "IdentityProviderContractProperties", + modelProperties: { + ...IdentityProviderBaseParameters.type.modelProperties, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "clientId", + required: true, + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderCreateContractProperties: coreClient.CompositeMapper = { - serializedName: "IdentityProviderCreateContractProperties", - type: { - name: "Composite", - className: "IdentityProviderCreateContractProperties", - modelProperties: { - ...IdentityProviderBaseParameters.type.modelProperties, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "clientId", - required: true, - xmlName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "clientSecret", - required: true, - xmlName: "clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderCreateContractProperties", + type: { + name: "Composite", + className: "IdentityProviderCreateContractProperties", + modelProperties: { + ...IdentityProviderBaseParameters.type.modelProperties, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "clientId", + required: true, + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "clientSecret", + required: true, + xmlName: "clientSecret", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderUpdateProperties: coreClient.CompositeMapper = { - serializedName: "IdentityProviderUpdateProperties", - type: { - name: "Composite", - className: "IdentityProviderUpdateProperties", - modelProperties: { - ...IdentityProviderBaseParameters.type.modelProperties, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderUpdateProperties", + type: { + name: "Composite", + className: "IdentityProviderUpdateProperties", + modelProperties: { + ...IdentityProviderBaseParameters.type.modelProperties, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "clientId", + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } + } + } + } }; export const NamedValueContractProperties: coreClient.CompositeMapper = { - serializedName: "NamedValueContractProperties", - type: { - name: "Composite", - className: "NamedValueContractProperties", - modelProperties: { - ...NamedValueEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096 - }, - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "keyVault", - xmlName: "keyVault", - type: { - name: "Composite", - className: "KeyVaultContractProperties" - } - } - } - } + serializedName: "NamedValueContractProperties", + type: { + name: "Composite", + className: "NamedValueContractProperties", + modelProperties: { + ...NamedValueEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096 + }, + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "keyVault", + xmlName: "keyVault", + type: { + name: "Composite", + className: "KeyVaultContractProperties" + } + } + } + } }; export const NamedValueCreateContractProperties: coreClient.CompositeMapper = { - serializedName: "NamedValueCreateContractProperties", - type: { - name: "Composite", - className: "NamedValueCreateContractProperties", - modelProperties: { - ...NamedValueEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096 - }, - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "keyVault", - xmlName: "keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "NamedValueCreateContractProperties", + type: { + name: "Composite", + className: "NamedValueCreateContractProperties", + modelProperties: { + ...NamedValueEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096 + }, + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "keyVault", + xmlName: "keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const NamedValueUpdateParameterProperties: coreClient.CompositeMapper = { - serializedName: "NamedValueUpdateParameterProperties", - type: { - name: "Composite", - className: "NamedValueUpdateParameterProperties", - modelProperties: { - ...NamedValueEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096, - MinLength: 1 - }, - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "keyVault", - xmlName: "keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "NamedValueUpdateParameterProperties", + type: { + name: "Composite", + className: "NamedValueUpdateParameterProperties", + modelProperties: { + ...NamedValueEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096, + MinLength: 1 + }, + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "keyVault", + xmlName: "keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const ApiCreateOrUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ApiCreateOrUpdateProperties", - type: { - name: "Composite", - className: "ApiCreateOrUpdateProperties", - modelProperties: { - ...ApiContractProperties.type.modelProperties, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - format: { - serializedName: "format", - xmlName: "format", - type: { - name: "String" - } - }, - wsdlSelector: { - serializedName: "wsdlSelector", - xmlName: "wsdlSelector", - type: { - name: "Composite", - className: "ApiCreateOrUpdatePropertiesWsdlSelector" - } - }, - soapApiType: { - serializedName: "apiType", - xmlName: "apiType", - type: { - name: "String" - } - }, - translateRequiredQueryParametersConduct: { - serializedName: "translateRequiredQueryParameters", - xmlName: "translateRequiredQueryParameters", - type: { - name: "String" - } - } - } - } + serializedName: "ApiCreateOrUpdateProperties", + type: { + name: "Composite", + className: "ApiCreateOrUpdateProperties", + modelProperties: { + ...ApiContractProperties.type.modelProperties, + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + format: { + serializedName: "format", + xmlName: "format", + type: { + name: "String" + } + }, + wsdlSelector: { + serializedName: "wsdlSelector", + xmlName: "wsdlSelector", + type: { + name: "Composite", + className: "ApiCreateOrUpdatePropertiesWsdlSelector" + } + }, + soapApiType: { + serializedName: "apiType", + xmlName: "apiType", + type: { + name: "String" + } + }, + translateRequiredQueryParametersConduct: { + serializedName: "translateRequiredQueryParameters", + xmlName: "translateRequiredQueryParameters", + type: { + name: "String" + } + } + } + } }; export const ApiContract: coreClient.CompositeMapper = { - serializedName: "ApiContract", - type: { - name: "Composite", - className: "ApiContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authenticationSettings: { - serializedName: "properties.authenticationSettings", - xmlName: "properties.authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract" - } - }, - subscriptionKeyParameterNames: { - serializedName: "properties.subscriptionKeyParameterNames", - xmlName: "properties.subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract" - } - }, - apiType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.apiRevision", - xmlName: "properties.apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.apiVersion", - xmlName: "properties.apiVersion", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean" - } - }, - isOnline: { - serializedName: "properties.isOnline", - readOnly: true, - xmlName: "properties.isOnline", - type: { - name: "Boolean" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiRevisionDescription", - xmlName: "properties.apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiVersionDescription", - xmlName: "properties.apiVersionDescription", - type: { - name: "String" - } - }, - apiVersionSetId: { - serializedName: "properties.apiVersionSetId", - xmlName: "properties.apiVersionSetId", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - termsOfServiceUrl: { - serializedName: "properties.termsOfServiceUrl", - xmlName: "properties.termsOfServiceUrl", - type: { - name: "String" - } - }, - contact: { - serializedName: "properties.contact", - xmlName: "properties.contact", - type: { - name: "Composite", - className: "ApiContactInformation" - } - }, - license: { - serializedName: "properties.license", - xmlName: "properties.license", - type: { - name: "Composite", - className: "ApiLicenseInformation" - } - }, - sourceApiId: { - serializedName: "properties.sourceApiId", - xmlName: "properties.sourceApiId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.serviceUrl", - xmlName: "properties.serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "properties.protocols", - xmlName: "properties.protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiContract", + type: { + name: "Composite", + className: "ApiContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authenticationSettings: { + serializedName: "properties.authenticationSettings", + xmlName: "properties.authenticationSettings", + type: { + name: "Composite", + className: "AuthenticationSettingsContract" + } + }, + subscriptionKeyParameterNames: { + serializedName: "properties.subscriptionKeyParameterNames", + xmlName: "properties.subscriptionKeyParameterNames", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract" + } + }, + apiType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.apiRevision", + xmlName: "properties.apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.apiVersion", + xmlName: "properties.apiVersion", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "properties.isCurrent", + xmlName: "properties.isCurrent", + type: { + name: "Boolean" + } + }, + isOnline: { + serializedName: "properties.isOnline", + readOnly: true, + xmlName: "properties.isOnline", + type: { + name: "Boolean" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiRevisionDescription", + xmlName: "properties.apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiVersionDescription", + xmlName: "properties.apiVersionDescription", + type: { + name: "String" + } + }, + apiVersionSetId: { + serializedName: "properties.apiVersionSetId", + xmlName: "properties.apiVersionSetId", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + termsOfServiceUrl: { + serializedName: "properties.termsOfServiceUrl", + xmlName: "properties.termsOfServiceUrl", + type: { + name: "String" + } + }, + contact: { + serializedName: "properties.contact", + xmlName: "properties.contact", + type: { + name: "Composite", + className: "ApiContactInformation" + } + }, + license: { + serializedName: "properties.license", + xmlName: "properties.license", + type: { + name: "Composite", + className: "ApiLicenseInformation" + } + }, + sourceApiId: { + serializedName: "properties.sourceApiId", + xmlName: "properties.sourceApiId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.serviceUrl", + xmlName: "properties.serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "properties.protocols", + xmlName: "properties.protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + apiVersionSet: { + serializedName: "properties.apiVersionSet", + xmlName: "properties.apiVersionSet", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails" + } } - } } - }, - apiVersionSet: { - serializedName: "properties.apiVersionSet", - xmlName: "properties.apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails" - } - } } - } }; export const ApiReleaseContract: coreClient.CompositeMapper = { - serializedName: "ApiReleaseContract", - type: { - name: "Composite", - className: "ApiReleaseContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String" - } - }, - createdDateTime: { - serializedName: "properties.createdDateTime", - readOnly: true, - xmlName: "properties.createdDateTime", - type: { - name: "DateTime" - } - }, - updatedDateTime: { - serializedName: "properties.updatedDateTime", - readOnly: true, - xmlName: "properties.updatedDateTime", - type: { - name: "DateTime" - } - }, - notes: { - serializedName: "properties.notes", - xmlName: "properties.notes", - type: { - name: "String" - } - } - } - } + serializedName: "ApiReleaseContract", + type: { + name: "Composite", + className: "ApiReleaseContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + apiId: { + serializedName: "properties.apiId", + xmlName: "properties.apiId", + type: { + name: "String" + } + }, + createdDateTime: { + serializedName: "properties.createdDateTime", + readOnly: true, + xmlName: "properties.createdDateTime", + type: { + name: "DateTime" + } + }, + updatedDateTime: { + serializedName: "properties.updatedDateTime", + readOnly: true, + xmlName: "properties.updatedDateTime", + type: { + name: "DateTime" + } + }, + notes: { + serializedName: "properties.notes", + xmlName: "properties.notes", + type: { + name: "String" + } + } + } + } }; export const OperationContract: coreClient.CompositeMapper = { - serializedName: "OperationContract", - type: { - name: "Composite", - className: "OperationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - templateParameters: { - serializedName: "properties.templateParameters", - xmlName: "properties.templateParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - request: { - serializedName: "properties.request", - xmlName: "properties.request", - type: { - name: "Composite", - className: "RequestContract" - } - }, - responses: { - serializedName: "properties.responses", - xmlName: "properties.responses", - xmlElementName: "ResponseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResponseContract" - } - } - } - }, - policies: { - serializedName: "properties.policies", - xmlName: "properties.policies", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - method: { - serializedName: "properties.method", - xmlName: "properties.method", - type: { - name: "String" - } - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.urlTemplate", - xmlName: "properties.urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationContract", + type: { + name: "Composite", + className: "OperationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + templateParameters: { + serializedName: "properties.templateParameters", + xmlName: "properties.templateParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + request: { + serializedName: "properties.request", + xmlName: "properties.request", + type: { + name: "Composite", + className: "RequestContract" + } + }, + responses: { + serializedName: "properties.responses", + xmlName: "properties.responses", + xmlElementName: "ResponseContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResponseContract" + } + } + } + }, + policies: { + serializedName: "properties.policies", + xmlName: "properties.policies", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + method: { + serializedName: "properties.method", + xmlName: "properties.method", + type: { + name: "String" + } + }, + urlTemplate: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.urlTemplate", + xmlName: "properties.urlTemplate", + type: { + name: "String" + } + } + } + } }; export const PolicyContract: coreClient.CompositeMapper = { - serializedName: "PolicyContract", - type: { - name: "Composite", - className: "PolicyContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - format: { - defaultValue: "xml", - serializedName: "properties.format", - xmlName: "properties.format", - type: { - name: "String" - } - } - } - } + serializedName: "PolicyContract", + type: { + name: "Composite", + className: "PolicyContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + value: { + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + format: { + defaultValue: "xml", + serializedName: "properties.format", + xmlName: "properties.format", + type: { + name: "String" + } + } + } + } }; export const TagContract: coreClient.CompositeMapper = { - serializedName: "TagContract", - type: { - name: "Composite", - className: "TagContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "TagContract", + type: { + name: "Composite", + className: "TagContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const ResolverContract: coreClient.CompositeMapper = { - serializedName: "ResolverContract", - type: { - name: "Composite", - className: "ResolverContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - } - } - } + serializedName: "ResolverContract", + type: { + name: "Composite", + className: "ResolverContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + } + } + } }; export const ProductContract: coreClient.CompositeMapper = { - serializedName: "ProductContract", - type: { - name: "Composite", - className: "ProductContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - terms: { - serializedName: "properties.terms", - xmlName: "properties.terms", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - approvalRequired: { - serializedName: "properties.approvalRequired", - xmlName: "properties.approvalRequired", - type: { - name: "Boolean" - } - }, - subscriptionsLimit: { - serializedName: "properties.subscriptionsLimit", - xmlName: "properties.subscriptionsLimit", - type: { - name: "Number" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: ["notPublished", "published"] - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "ProductContract", + type: { + name: "Composite", + className: "ProductContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + terms: { + serializedName: "properties.terms", + xmlName: "properties.terms", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + approvalRequired: { + serializedName: "properties.approvalRequired", + xmlName: "properties.approvalRequired", + type: { + name: "Boolean" + } + }, + subscriptionsLimit: { + serializedName: "properties.subscriptionsLimit", + xmlName: "properties.subscriptionsLimit", + type: { + name: "Number" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: ["notPublished", "published"] + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const SchemaContract: coreClient.CompositeMapper = { - serializedName: "SchemaContract", - type: { - name: "Composite", - className: "SchemaContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - contentType: { - serializedName: "properties.contentType", - xmlName: "properties.contentType", - type: { - name: "String" - } - }, - value: { - serializedName: "properties.document.value", - xmlName: "properties.document.value", - type: { - name: "String" - } - }, - definitions: { - serializedName: "properties.document.definitions", - xmlName: "properties.document.definitions", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - components: { - serializedName: "properties.document.components", - xmlName: "properties.document.components", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + serializedName: "SchemaContract", + type: { + name: "Composite", + className: "SchemaContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + contentType: { + serializedName: "properties.contentType", + xmlName: "properties.contentType", + type: { + name: "String" + } + }, + value: { + serializedName: "properties.document.value", + xmlName: "properties.document.value", + type: { + name: "String" + } + }, + definitions: { + serializedName: "properties.document.definitions", + xmlName: "properties.document.definitions", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + components: { + serializedName: "properties.document.components", + xmlName: "properties.document.components", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } }; export const DiagnosticContract: coreClient.CompositeMapper = { - serializedName: "DiagnosticContract", - type: { - name: "Composite", - className: "DiagnosticContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - alwaysLog: { - serializedName: "properties.alwaysLog", - xmlName: "properties.alwaysLog", - type: { - name: "String" - } - }, - loggerId: { - serializedName: "properties.loggerId", - xmlName: "properties.loggerId", - type: { - name: "String" - } - }, - sampling: { - serializedName: "properties.sampling", - xmlName: "properties.sampling", - type: { - name: "Composite", - className: "SamplingSettings" - } - }, - frontend: { - serializedName: "properties.frontend", - xmlName: "properties.frontend", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings" - } - }, - backend: { - serializedName: "properties.backend", - xmlName: "properties.backend", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings" - } - }, - logClientIp: { - serializedName: "properties.logClientIp", - xmlName: "properties.logClientIp", - type: { - name: "Boolean" - } - }, - httpCorrelationProtocol: { - serializedName: "properties.httpCorrelationProtocol", - xmlName: "properties.httpCorrelationProtocol", - type: { - name: "String" - } - }, - verbosity: { - serializedName: "properties.verbosity", - xmlName: "properties.verbosity", - type: { - name: "String" - } - }, - operationNameFormat: { - serializedName: "properties.operationNameFormat", - xmlName: "properties.operationNameFormat", - type: { - name: "String" - } - }, - metrics: { - serializedName: "properties.metrics", - xmlName: "properties.metrics", - type: { - name: "Boolean" - } - } - } - } + serializedName: "DiagnosticContract", + type: { + name: "Composite", + className: "DiagnosticContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + alwaysLog: { + serializedName: "properties.alwaysLog", + xmlName: "properties.alwaysLog", + type: { + name: "String" + } + }, + loggerId: { + serializedName: "properties.loggerId", + xmlName: "properties.loggerId", + type: { + name: "String" + } + }, + sampling: { + serializedName: "properties.sampling", + xmlName: "properties.sampling", + type: { + name: "Composite", + className: "SamplingSettings" + } + }, + frontend: { + serializedName: "properties.frontend", + xmlName: "properties.frontend", + type: { + name: "Composite", + className: "PipelineDiagnosticSettings" + } + }, + backend: { + serializedName: "properties.backend", + xmlName: "properties.backend", + type: { + name: "Composite", + className: "PipelineDiagnosticSettings" + } + }, + logClientIp: { + serializedName: "properties.logClientIp", + xmlName: "properties.logClientIp", + type: { + name: "Boolean" + } + }, + httpCorrelationProtocol: { + serializedName: "properties.httpCorrelationProtocol", + xmlName: "properties.httpCorrelationProtocol", + type: { + name: "String" + } + }, + verbosity: { + serializedName: "properties.verbosity", + xmlName: "properties.verbosity", + type: { + name: "String" + } + }, + operationNameFormat: { + serializedName: "properties.operationNameFormat", + xmlName: "properties.operationNameFormat", + type: { + name: "String" + } + }, + metrics: { + serializedName: "properties.metrics", + xmlName: "properties.metrics", + type: { + name: "Boolean" + } + } + } + } }; export const IssueContract: coreClient.CompositeMapper = { - serializedName: "IssueContract", - type: { - name: "Composite", - className: "IssueContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - createdDate: { - serializedName: "properties.createdDate", - xmlName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String" - } - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueContract", + type: { + name: "Composite", + className: "IssueContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + createdDate: { + serializedName: "properties.createdDate", + xmlName: "properties.createdDate", + type: { + name: "DateTime" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + apiId: { + serializedName: "properties.apiId", + xmlName: "properties.apiId", + type: { + name: "String" + } + }, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + userId: { + serializedName: "properties.userId", + xmlName: "properties.userId", + type: { + name: "String" + } + } + } + } }; export const IssueCommentContract: coreClient.CompositeMapper = { - serializedName: "IssueCommentContract", - type: { - name: "Composite", - className: "IssueCommentContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - text: { - serializedName: "properties.text", - xmlName: "properties.text", - type: { - name: "String" - } - }, - createdDate: { - serializedName: "properties.createdDate", - xmlName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueCommentContract", + type: { + name: "Composite", + className: "IssueCommentContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + text: { + serializedName: "properties.text", + xmlName: "properties.text", + type: { + name: "String" + } + }, + createdDate: { + serializedName: "properties.createdDate", + xmlName: "properties.createdDate", + type: { + name: "DateTime" + } + }, + userId: { + serializedName: "properties.userId", + xmlName: "properties.userId", + type: { + name: "String" + } + } + } + } }; export const IssueAttachmentContract: coreClient.CompositeMapper = { - serializedName: "IssueAttachmentContract", - type: { - name: "Composite", - className: "IssueAttachmentContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - contentFormat: { - serializedName: "properties.contentFormat", - xmlName: "properties.contentFormat", - type: { - name: "String" - } - }, - content: { - serializedName: "properties.content", - xmlName: "properties.content", - type: { - name: "String" - } - } - } - } + serializedName: "IssueAttachmentContract", + type: { + name: "Composite", + className: "IssueAttachmentContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + contentFormat: { + serializedName: "properties.contentFormat", + xmlName: "properties.contentFormat", + type: { + name: "String" + } + }, + content: { + serializedName: "properties.content", + xmlName: "properties.content", + type: { + name: "String" + } + } + } + } }; export const TagDescriptionContract: coreClient.CompositeMapper = { - serializedName: "TagDescriptionContract", - type: { - name: "Composite", - className: "TagDescriptionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - externalDocsUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.externalDocsUrl", - xmlName: "properties.externalDocsUrl", - type: { - name: "String" - } - }, - externalDocsDescription: { - serializedName: "properties.externalDocsDescription", - xmlName: "properties.externalDocsDescription", - type: { - name: "String" - } - }, - tagId: { - serializedName: "properties.tagId", - xmlName: "properties.tagId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "TagDescriptionContract", + type: { + name: "Composite", + className: "TagDescriptionContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + externalDocsUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.externalDocsUrl", + xmlName: "properties.externalDocsUrl", + type: { + name: "String" + } + }, + externalDocsDescription: { + serializedName: "properties.externalDocsDescription", + xmlName: "properties.externalDocsDescription", + type: { + name: "String" + } + }, + tagId: { + serializedName: "properties.tagId", + xmlName: "properties.tagId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const WikiContract: coreClient.CompositeMapper = { - serializedName: "WikiContract", - type: { - name: "Composite", - className: "WikiContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - documents: { - serializedName: "properties.documents", - xmlName: "properties.documents", - xmlElementName: "WikiDocumentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WikiDocumentationContract" + serializedName: "WikiContract", + type: { + name: "Composite", + className: "WikiContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + documents: { + serializedName: "properties.documents", + xmlName: "properties.documents", + xmlElementName: "WikiDocumentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WikiDocumentationContract" + } + } + } } - } } - } } - } }; export const ApiVersionSetContract: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetContract", - type: { - name: "Composite", - className: "ApiVersionSetContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - versionQueryName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.versionQueryName", - xmlName: "properties.versionQueryName", - type: { - name: "String" - } - }, - versionHeaderName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.versionHeaderName", - xmlName: "properties.versionHeaderName", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "properties.versioningScheme", - xmlName: "properties.versioningScheme", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetContract", + type: { + name: "Composite", + className: "ApiVersionSetContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + versionQueryName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.versionQueryName", + xmlName: "properties.versionQueryName", + type: { + name: "String" + } + }, + versionHeaderName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.versionHeaderName", + xmlName: "properties.versionHeaderName", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "properties.versioningScheme", + xmlName: "properties.versioningScheme", + type: { + name: "String" + } + } + } + } }; export const AuthorizationServerContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerContract", - type: { - name: "Composite", - className: "AuthorizationServerContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authorizationMethods: { - serializedName: "properties.authorizationMethods", - xmlName: "properties.authorizationMethods", - xmlElementName: "AuthorizationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "HEAD", - "OPTIONS", - "TRACE", - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - } - } - } - }, - clientAuthenticationMethod: { - serializedName: "properties.clientAuthenticationMethod", - xmlName: "properties.clientAuthenticationMethod", - xmlElementName: "ClientAuthenticationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - tokenBodyParameters: { - serializedName: "properties.tokenBodyParameters", - xmlName: "properties.tokenBodyParameters", - xmlElementName: "TokenBodyParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenBodyParameterContract" - } - } - } - }, - tokenEndpoint: { - serializedName: "properties.tokenEndpoint", - xmlName: "properties.tokenEndpoint", - type: { - name: "String" - } - }, - supportState: { - serializedName: "properties.supportState", - xmlName: "properties.supportState", - type: { - name: "Boolean" - } - }, - defaultScope: { - serializedName: "properties.defaultScope", - xmlName: "properties.defaultScope", - type: { - name: "String" - } - }, - bearerTokenSendingMethods: { - serializedName: "properties.bearerTokenSendingMethods", - xmlName: "properties.bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - resourceOwnerUsername: { - serializedName: "properties.resourceOwnerUsername", - xmlName: "properties.resourceOwnerUsername", - type: { - name: "String" - } - }, - resourceOwnerPassword: { - serializedName: "properties.resourceOwnerPassword", - xmlName: "properties.resourceOwnerPassword", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean" - } - }, - clientRegistrationEndpoint: { - serializedName: "properties.clientRegistrationEndpoint", - xmlName: "properties.clientRegistrationEndpoint", - type: { - name: "String" - } - }, - authorizationEndpoint: { - serializedName: "properties.authorizationEndpoint", - xmlName: "properties.authorizationEndpoint", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "properties.grantTypes", - xmlName: "properties.grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerContract", + type: { + name: "Composite", + className: "AuthorizationServerContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authorizationMethods: { + serializedName: "properties.authorizationMethods", + xmlName: "properties.authorizationMethods", + xmlElementName: "AuthorizationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "HEAD", + "OPTIONS", + "TRACE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + } + } + } + }, + clientAuthenticationMethod: { + serializedName: "properties.clientAuthenticationMethod", + xmlName: "properties.clientAuthenticationMethod", + xmlElementName: "ClientAuthenticationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tokenBodyParameters: { + serializedName: "properties.tokenBodyParameters", + xmlName: "properties.tokenBodyParameters", + xmlElementName: "TokenBodyParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TokenBodyParameterContract" + } + } + } + }, + tokenEndpoint: { + serializedName: "properties.tokenEndpoint", + xmlName: "properties.tokenEndpoint", + type: { + name: "String" + } + }, + supportState: { + serializedName: "properties.supportState", + xmlName: "properties.supportState", + type: { + name: "Boolean" + } + }, + defaultScope: { + serializedName: "properties.defaultScope", + xmlName: "properties.defaultScope", + type: { + name: "String" + } + }, + bearerTokenSendingMethods: { + serializedName: "properties.bearerTokenSendingMethods", + xmlName: "properties.bearerTokenSendingMethods", + xmlElementName: "BearerTokenSendingMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resourceOwnerUsername: { + serializedName: "properties.resourceOwnerUsername", + xmlName: "properties.resourceOwnerUsername", + type: { + name: "String" + } + }, + resourceOwnerPassword: { + serializedName: "properties.resourceOwnerPassword", + xmlName: "properties.resourceOwnerPassword", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 50, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "properties.useInTestConsole", + xmlName: "properties.useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "properties.useInApiDocumentation", + xmlName: "properties.useInApiDocumentation", + type: { + name: "Boolean" + } + }, + clientRegistrationEndpoint: { + serializedName: "properties.clientRegistrationEndpoint", + xmlName: "properties.clientRegistrationEndpoint", + type: { + name: "String" + } + }, + authorizationEndpoint: { + serializedName: "properties.authorizationEndpoint", + xmlName: "properties.authorizationEndpoint", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "properties.grantTypes", + xmlName: "properties.grantTypes", + xmlElementName: "GrantType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clientId: { + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } } - } - } - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" } - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } } - } }; export const AuthorizationServerUpdateContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerUpdateContract", - type: { - name: "Composite", - className: "AuthorizationServerUpdateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authorizationMethods: { - serializedName: "properties.authorizationMethods", - xmlName: "properties.authorizationMethods", - xmlElementName: "AuthorizationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "HEAD", - "OPTIONS", - "TRACE", - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - } - } - } - }, - clientAuthenticationMethod: { - serializedName: "properties.clientAuthenticationMethod", - xmlName: "properties.clientAuthenticationMethod", - xmlElementName: "ClientAuthenticationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - tokenBodyParameters: { - serializedName: "properties.tokenBodyParameters", - xmlName: "properties.tokenBodyParameters", - xmlElementName: "TokenBodyParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenBodyParameterContract" - } - } - } - }, - tokenEndpoint: { - serializedName: "properties.tokenEndpoint", - xmlName: "properties.tokenEndpoint", - type: { - name: "String" - } - }, - supportState: { - serializedName: "properties.supportState", - xmlName: "properties.supportState", - type: { - name: "Boolean" - } - }, - defaultScope: { - serializedName: "properties.defaultScope", - xmlName: "properties.defaultScope", - type: { - name: "String" - } - }, - bearerTokenSendingMethods: { - serializedName: "properties.bearerTokenSendingMethods", - xmlName: "properties.bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - resourceOwnerUsername: { - serializedName: "properties.resourceOwnerUsername", - xmlName: "properties.resourceOwnerUsername", - type: { - name: "String" - } - }, - resourceOwnerPassword: { - serializedName: "properties.resourceOwnerPassword", - xmlName: "properties.resourceOwnerPassword", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean" - } - }, - clientRegistrationEndpoint: { - serializedName: "properties.clientRegistrationEndpoint", - xmlName: "properties.clientRegistrationEndpoint", - type: { - name: "String" - } - }, - authorizationEndpoint: { - serializedName: "properties.authorizationEndpoint", - xmlName: "properties.authorizationEndpoint", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "properties.grantTypes", - xmlName: "properties.grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerUpdateContract", + type: { + name: "Composite", + className: "AuthorizationServerUpdateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authorizationMethods: { + serializedName: "properties.authorizationMethods", + xmlName: "properties.authorizationMethods", + xmlElementName: "AuthorizationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "HEAD", + "OPTIONS", + "TRACE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + } + } + } + }, + clientAuthenticationMethod: { + serializedName: "properties.clientAuthenticationMethod", + xmlName: "properties.clientAuthenticationMethod", + xmlElementName: "ClientAuthenticationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tokenBodyParameters: { + serializedName: "properties.tokenBodyParameters", + xmlName: "properties.tokenBodyParameters", + xmlElementName: "TokenBodyParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TokenBodyParameterContract" + } + } + } + }, + tokenEndpoint: { + serializedName: "properties.tokenEndpoint", + xmlName: "properties.tokenEndpoint", + type: { + name: "String" + } + }, + supportState: { + serializedName: "properties.supportState", + xmlName: "properties.supportState", + type: { + name: "Boolean" + } + }, + defaultScope: { + serializedName: "properties.defaultScope", + xmlName: "properties.defaultScope", + type: { + name: "String" + } + }, + bearerTokenSendingMethods: { + serializedName: "properties.bearerTokenSendingMethods", + xmlName: "properties.bearerTokenSendingMethods", + xmlElementName: "BearerTokenSendingMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resourceOwnerUsername: { + serializedName: "properties.resourceOwnerUsername", + xmlName: "properties.resourceOwnerUsername", + type: { + name: "String" + } + }, + resourceOwnerPassword: { + serializedName: "properties.resourceOwnerPassword", + xmlName: "properties.resourceOwnerPassword", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 50, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "properties.useInTestConsole", + xmlName: "properties.useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "properties.useInApiDocumentation", + xmlName: "properties.useInApiDocumentation", + type: { + name: "Boolean" + } + }, + clientRegistrationEndpoint: { + serializedName: "properties.clientRegistrationEndpoint", + xmlName: "properties.clientRegistrationEndpoint", + type: { + name: "String" + } + }, + authorizationEndpoint: { + serializedName: "properties.authorizationEndpoint", + xmlName: "properties.authorizationEndpoint", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "properties.grantTypes", + xmlName: "properties.grantTypes", + xmlElementName: "GrantType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clientId: { + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } } - } - } - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" } - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } } - } }; export const AuthorizationProviderContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderContract", - type: { - name: "Composite", - className: "AuthorizationProviderContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - identityProvider: { - serializedName: "properties.identityProvider", - xmlName: "properties.identityProvider", - type: { - name: "String" - } - }, - oauth2: { - serializedName: "properties.oauth2", - xmlName: "properties.oauth2", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2Settings" - } - } - } - } + serializedName: "AuthorizationProviderContract", + type: { + name: "Composite", + className: "AuthorizationProviderContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + identityProvider: { + serializedName: "properties.identityProvider", + xmlName: "properties.identityProvider", + type: { + name: "String" + } + }, + oauth2: { + serializedName: "properties.oauth2", + xmlName: "properties.oauth2", + type: { + name: "Composite", + className: "AuthorizationProviderOAuth2Settings" + } + } + } + } }; export const AuthorizationContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationContract", - type: { - name: "Composite", - className: "AuthorizationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - authorizationType: { - serializedName: "properties.authorizationType", - xmlName: "properties.authorizationType", - type: { - name: "String" - } - }, - oAuth2GrantType: { - serializedName: "properties.oauth2grantType", - xmlName: "properties.oauth2grantType", - type: { - name: "String" - } - }, - parameters: { - serializedName: "properties.parameters", - xmlName: "properties.parameters", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - error: { - serializedName: "properties.error", - xmlName: "properties.error", - type: { - name: "Composite", - className: "AuthorizationError" - } - }, - status: { - serializedName: "properties.status", - xmlName: "properties.status", - type: { - name: "String" - } - } - } - } + serializedName: "AuthorizationContract", + type: { + name: "Composite", + className: "AuthorizationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + authorizationType: { + serializedName: "properties.authorizationType", + xmlName: "properties.authorizationType", + type: { + name: "String" + } + }, + oAuth2GrantType: { + serializedName: "properties.oauth2grantType", + xmlName: "properties.oauth2grantType", + type: { + name: "String" + } + }, + parameters: { + serializedName: "properties.parameters", + xmlName: "properties.parameters", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + error: { + serializedName: "properties.error", + xmlName: "properties.error", + type: { + name: "Composite", + className: "AuthorizationError" + } + }, + status: { + serializedName: "properties.status", + xmlName: "properties.status", + type: { + name: "String" + } + } + } + } }; export const AuthorizationAccessPolicyContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicyContract", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - tenantId: { - serializedName: "properties.tenantId", - xmlName: "properties.tenantId", - type: { - name: "String" - } - }, - objectId: { - serializedName: "properties.objectId", - xmlName: "properties.objectId", - type: { - name: "String" - } - } - } - } + serializedName: "AuthorizationAccessPolicyContract", + type: { + name: "Composite", + className: "AuthorizationAccessPolicyContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + tenantId: { + serializedName: "properties.tenantId", + xmlName: "properties.tenantId", + type: { + name: "String" + } + }, + objectId: { + serializedName: "properties.objectId", + xmlName: "properties.objectId", + type: { + name: "String" + } + } + } + } }; export const BackendContract: coreClient.CompositeMapper = { - serializedName: "BackendContract", - type: { - name: "Composite", - className: "BackendContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties.properties", - xmlName: "properties.properties", - type: { - name: "Composite", - className: "BackendProperties" - } - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Composite", - className: "BackendCredentialsContract" - } - }, - proxy: { - serializedName: "properties.proxy", - xmlName: "properties.proxy", - type: { - name: "Composite", - className: "BackendProxyContract" - } - }, - tls: { - serializedName: "properties.tls", - xmlName: "properties.tls", - type: { - name: "Composite", - className: "BackendTlsProperties" - } - }, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String" - } - }, - protocol: { - serializedName: "properties.protocol", - xmlName: "properties.protocol", - type: { - name: "String" - } - } - } - } + serializedName: "BackendContract", + type: { + name: "Composite", + className: "BackendContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + title: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties.properties", + xmlName: "properties.properties", + type: { + name: "Composite", + className: "BackendProperties" + } + }, + credentials: { + serializedName: "properties.credentials", + xmlName: "properties.credentials", + type: { + name: "Composite", + className: "BackendCredentialsContract" + } + }, + proxy: { + serializedName: "properties.proxy", + xmlName: "properties.proxy", + type: { + name: "Composite", + className: "BackendProxyContract" + } + }, + tls: { + serializedName: "properties.tls", + xmlName: "properties.tls", + type: { + name: "Composite", + className: "BackendTlsProperties" + } + }, + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.url", + xmlName: "properties.url", + type: { + name: "String" + } + }, + protocol: { + serializedName: "properties.protocol", + xmlName: "properties.protocol", + type: { + name: "String" + } + } + } + } }; export const BackendReconnectContract: coreClient.CompositeMapper = { - serializedName: "BackendReconnectContract", - type: { - name: "Composite", - className: "BackendReconnectContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - after: { - serializedName: "properties.after", - xmlName: "properties.after", - type: { - name: "TimeSpan" + serializedName: "BackendReconnectContract", + type: { + name: "Composite", + className: "BackendReconnectContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + after: { + serializedName: "properties.after", + xmlName: "properties.after", + type: { + name: "TimeSpan" + } + } } - } } - } }; export const CacheContract: coreClient.CompositeMapper = { - serializedName: "CacheContract", - type: { - name: "Composite", - className: "CacheContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - connectionString: { - constraints: { - MaxLength: 300 - }, - serializedName: "properties.connectionString", - xmlName: "properties.connectionString", - type: { - name: "String" - } - }, - useFromLocation: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.useFromLocation", - xmlName: "properties.useFromLocation", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - } - } - } + serializedName: "CacheContract", + type: { + name: "Composite", + className: "CacheContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + connectionString: { + constraints: { + MaxLength: 300 + }, + serializedName: "properties.connectionString", + xmlName: "properties.connectionString", + type: { + name: "String" + } + }, + useFromLocation: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.useFromLocation", + xmlName: "properties.useFromLocation", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + } + } + } }; export const CertificateContract: coreClient.CompositeMapper = { - serializedName: "CertificateContract", - type: { - name: "Composite", - className: "CertificateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - subject: { - serializedName: "properties.subject", - xmlName: "properties.subject", - type: { - name: "String" - } - }, - thumbprint: { - serializedName: "properties.thumbprint", - xmlName: "properties.thumbprint", - type: { - name: "String" - } - }, - expirationDate: { - serializedName: "properties.expirationDate", - xmlName: "properties.expirationDate", - type: { - name: "DateTime" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractProperties" - } - } - } - } + serializedName: "CertificateContract", + type: { + name: "Composite", + className: "CertificateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + subject: { + serializedName: "properties.subject", + xmlName: "properties.subject", + type: { + name: "String" + } + }, + thumbprint: { + serializedName: "properties.thumbprint", + xmlName: "properties.thumbprint", + type: { + name: "String" + } + }, + expirationDate: { + serializedName: "properties.expirationDate", + xmlName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractProperties" + } + } + } + } }; export const ContentTypeContract: coreClient.CompositeMapper = { - serializedName: "ContentTypeContract", - type: { - name: "Composite", - className: "ContentTypeContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String" - } - }, - namePropertiesName: { - serializedName: "properties.name", - xmlName: "properties.name", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - schema: { - serializedName: "properties.schema", - xmlName: "properties.schema", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - version: { - serializedName: "properties.version", - xmlName: "properties.version", - type: { - name: "String" - } - } - } - } + serializedName: "ContentTypeContract", + type: { + name: "Composite", + className: "ContentTypeContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + xmlName: "properties.id", + type: { + name: "String" + } + }, + namePropertiesName: { + serializedName: "properties.name", + xmlName: "properties.name", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + schema: { + serializedName: "properties.schema", + xmlName: "properties.schema", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + version: { + serializedName: "properties.version", + xmlName: "properties.version", + type: { + name: "String" + } + } + } + } }; export const ContentItemContract: coreClient.CompositeMapper = { - serializedName: "ContentItemContract", - type: { - name: "Composite", - className: "ContentItemContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } + serializedName: "ContentItemContract", + type: { + name: "Composite", + className: "ContentItemContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + xmlName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } } - } } - } }; export const DeletedServiceContract: coreClient.CompositeMapper = { - serializedName: "DeletedServiceContract", - type: { - name: "Composite", - className: "DeletedServiceContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", - readOnly: true, - xmlName: "location", - type: { - name: "String" - } - }, - serviceId: { - serializedName: "properties.serviceId", - xmlName: "properties.serviceId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - serializedName: "properties.scheduledPurgeDate", - xmlName: "properties.scheduledPurgeDate", - type: { - name: "DateTime" - } - }, - deletionDate: { - serializedName: "properties.deletionDate", - xmlName: "properties.deletionDate", - type: { - name: "DateTime" - } - } - } - } + serializedName: "DeletedServiceContract", + type: { + name: "Composite", + className: "DeletedServiceContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + readOnly: true, + xmlName: "location", + type: { + name: "String" + } + }, + serviceId: { + serializedName: "properties.serviceId", + xmlName: "properties.serviceId", + type: { + name: "String" + } + }, + scheduledPurgeDate: { + serializedName: "properties.scheduledPurgeDate", + xmlName: "properties.scheduledPurgeDate", + type: { + name: "DateTime" + } + }, + deletionDate: { + serializedName: "properties.deletionDate", + xmlName: "properties.deletionDate", + type: { + name: "DateTime" + } + } + } + } }; export const EmailTemplateContract: coreClient.CompositeMapper = { - serializedName: "EmailTemplateContract", - type: { - name: "Composite", - className: "EmailTemplateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - subject: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.subject", - xmlName: "properties.subject", - type: { - name: "String" - } - }, - body: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.body", - xmlName: "properties.body", - type: { - name: "String" - } - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - isDefault: { - serializedName: "properties.isDefault", - readOnly: true, - xmlName: "properties.isDefault", - type: { - name: "Boolean" - } - }, - parameters: { - serializedName: "properties.parameters", - xmlName: "properties.parameters", - xmlElementName: "EmailTemplateParametersContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailTemplateParametersContractProperties" + serializedName: "EmailTemplateContract", + type: { + name: "Composite", + className: "EmailTemplateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + subject: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.subject", + xmlName: "properties.subject", + type: { + name: "String" + } + }, + body: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.body", + xmlName: "properties.body", + type: { + name: "String" + } + }, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + isDefault: { + serializedName: "properties.isDefault", + readOnly: true, + xmlName: "properties.isDefault", + type: { + name: "Boolean" + } + }, + parameters: { + serializedName: "properties.parameters", + xmlName: "properties.parameters", + xmlElementName: "EmailTemplateParametersContractProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EmailTemplateParametersContractProperties" + } + } + } } - } } - } } - } }; export const GatewayContract: coreClient.CompositeMapper = { - serializedName: "GatewayContract", - type: { - name: "Composite", - className: "GatewayContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - locationData: { - serializedName: "properties.locationData", - xmlName: "properties.locationData", - type: { - name: "Composite", - className: "ResourceLocationDataContract" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - } - } - } + serializedName: "GatewayContract", + type: { + name: "Composite", + className: "GatewayContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + locationData: { + serializedName: "properties.locationData", + xmlName: "properties.locationData", + type: { + name: "Composite", + className: "ResourceLocationDataContract" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + } + } + } }; export const GatewayHostnameConfigurationContract: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfigurationContract", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - hostname: { - serializedName: "properties.hostname", - xmlName: "properties.hostname", - type: { - name: "String" - } - }, - certificateId: { - serializedName: "properties.certificateId", - xmlName: "properties.certificateId", - type: { - name: "String" - } - }, - negotiateClientCertificate: { - serializedName: "properties.negotiateClientCertificate", - xmlName: "properties.negotiateClientCertificate", - type: { - name: "Boolean" - } - }, - tls10Enabled: { - serializedName: "properties.tls10Enabled", - xmlName: "properties.tls10Enabled", - type: { - name: "Boolean" - } - }, - tls11Enabled: { - serializedName: "properties.tls11Enabled", - xmlName: "properties.tls11Enabled", - type: { - name: "Boolean" - } - }, - http2Enabled: { - serializedName: "properties.http2Enabled", - xmlName: "properties.http2Enabled", - type: { - name: "Boolean" - } - } - } - } + serializedName: "GatewayHostnameConfigurationContract", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + hostname: { + serializedName: "properties.hostname", + xmlName: "properties.hostname", + type: { + name: "String" + } + }, + certificateId: { + serializedName: "properties.certificateId", + xmlName: "properties.certificateId", + type: { + name: "String" + } + }, + negotiateClientCertificate: { + serializedName: "properties.negotiateClientCertificate", + xmlName: "properties.negotiateClientCertificate", + type: { + name: "Boolean" + } + }, + tls10Enabled: { + serializedName: "properties.tls10Enabled", + xmlName: "properties.tls10Enabled", + type: { + name: "Boolean" + } + }, + tls11Enabled: { + serializedName: "properties.tls11Enabled", + xmlName: "properties.tls11Enabled", + type: { + name: "Boolean" + } + }, + http2Enabled: { + serializedName: "properties.http2Enabled", + xmlName: "properties.http2Enabled", + type: { + name: "Boolean" + } + } + } + } }; export const AssociationContract: coreClient.CompositeMapper = { - serializedName: "AssociationContract", - type: { - name: "Composite", - className: "AssociationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - defaultValue: "created", - isConstant: true, - serializedName: "properties.provisioningState", - type: { - name: "String" + serializedName: "AssociationContract", + type: { + name: "Composite", + className: "AssociationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + defaultValue: "created", + isConstant: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCertificateAuthorityContract: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthorityContract", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - isTrusted: { - serializedName: "properties.isTrusted", - xmlName: "properties.isTrusted", - type: { - name: "Boolean" + serializedName: "GatewayCertificateAuthorityContract", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + isTrusted: { + serializedName: "properties.isTrusted", + xmlName: "properties.isTrusted", + type: { + name: "Boolean" + } + } } - } } - } }; export const GroupContract: coreClient.CompositeMapper = { - serializedName: "GroupContract", - type: { - name: "Composite", - className: "GroupContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - builtIn: { - serializedName: "properties.builtIn", - readOnly: true, - xmlName: "properties.builtIn", - type: { - name: "Boolean" - } - }, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"] - } - }, - externalId: { - serializedName: "properties.externalId", - xmlName: "properties.externalId", - type: { - name: "String" - } - } - } - } + serializedName: "GroupContract", + type: { + name: "Composite", + className: "GroupContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + builtIn: { + serializedName: "properties.builtIn", + readOnly: true, + xmlName: "properties.builtIn", + type: { + name: "Boolean" + } + }, + typePropertiesType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "Enum", + allowedValues: ["custom", "system", "external"] + } + }, + externalId: { + serializedName: "properties.externalId", + xmlName: "properties.externalId", + type: { + name: "String" + } + } + } + } }; export const UserContract: coreClient.CompositeMapper = { - serializedName: "UserContract", - type: { - name: "Composite", - className: "UserContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - state: { - defaultValue: "active", - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - note: { - serializedName: "properties.note", - xmlName: "properties.note", - type: { - name: "String" - } - }, - identities: { - serializedName: "properties.identities", - xmlName: "properties.identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" - } - } - } - }, - firstName: { - serializedName: "properties.firstName", - xmlName: "properties.firstName", - type: { - name: "String" - } - }, - lastName: { - serializedName: "properties.lastName", - xmlName: "properties.lastName", - type: { - name: "String" - } - }, - email: { - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String" - } - }, - registrationDate: { - serializedName: "properties.registrationDate", - xmlName: "properties.registrationDate", - type: { - name: "DateTime" - } - }, - groups: { - serializedName: "properties.groups", - readOnly: true, - xmlName: "properties.groups", - xmlElementName: "GroupContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupContractProperties" + serializedName: "UserContract", + type: { + name: "Composite", + className: "UserContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + defaultValue: "active", + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + note: { + serializedName: "properties.note", + xmlName: "properties.note", + type: { + name: "String" + } + }, + identities: { + serializedName: "properties.identities", + xmlName: "properties.identities", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } + }, + firstName: { + serializedName: "properties.firstName", + xmlName: "properties.firstName", + type: { + name: "String" + } + }, + lastName: { + serializedName: "properties.lastName", + xmlName: "properties.lastName", + type: { + name: "String" + } + }, + email: { + serializedName: "properties.email", + xmlName: "properties.email", + type: { + name: "String" + } + }, + registrationDate: { + serializedName: "properties.registrationDate", + xmlName: "properties.registrationDate", + type: { + name: "DateTime" + } + }, + groups: { + serializedName: "properties.groups", + readOnly: true, + xmlName: "properties.groups", + xmlElementName: "GroupContractProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupContractProperties" + } + } + } } - } } - } } - } }; export const IdentityProviderContract: coreClient.CompositeMapper = { - serializedName: "IdentityProviderContract", - type: { - name: "Composite", - className: "IdentityProviderContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - signinTenant: { - serializedName: "properties.signinTenant", - xmlName: "properties.signinTenant", - type: { - name: "String" - } - }, - allowedTenants: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.allowedTenants", - xmlName: "properties.allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - authority: { - serializedName: "properties.authority", - xmlName: "properties.authority", - type: { - name: "String" - } - }, - signupPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signupPolicyName", - xmlName: "properties.signupPolicyName", - type: { - name: "String" - } - }, - signinPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signinPolicyName", - xmlName: "properties.signinPolicyName", - type: { - name: "String" - } - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.profileEditingPolicyName", - xmlName: "properties.profileEditingPolicyName", - type: { - name: "String" - } - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.passwordResetPolicyName", - xmlName: "properties.passwordResetPolicyName", - type: { - name: "String" - } - }, - clientLibrary: { - constraints: { - MaxLength: 16 - }, - serializedName: "properties.clientLibrary", - xmlName: "properties.clientLibrary", - type: { - name: "String" - } - }, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderContract", + type: { + name: "Composite", + className: "IdentityProviderContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + typePropertiesType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + signinTenant: { + serializedName: "properties.signinTenant", + xmlName: "properties.signinTenant", + type: { + name: "String" + } + }, + allowedTenants: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.allowedTenants", + xmlName: "properties.allowedTenants", + xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + authority: { + serializedName: "properties.authority", + xmlName: "properties.authority", + type: { + name: "String" + } + }, + signupPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signupPolicyName", + xmlName: "properties.signupPolicyName", + type: { + name: "String" + } + }, + signinPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signinPolicyName", + xmlName: "properties.signinPolicyName", + type: { + name: "String" + } + }, + profileEditingPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.profileEditingPolicyName", + xmlName: "properties.profileEditingPolicyName", + type: { + name: "String" + } + }, + passwordResetPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.passwordResetPolicyName", + xmlName: "properties.passwordResetPolicyName", + type: { + name: "String" + } + }, + clientLibrary: { + constraints: { + MaxLength: 16 + }, + serializedName: "properties.clientLibrary", + xmlName: "properties.clientLibrary", + type: { + name: "String" + } + }, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderCreateContract: coreClient.CompositeMapper = { - serializedName: "IdentityProviderCreateContract", - type: { - name: "Composite", - className: "IdentityProviderCreateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - signinTenant: { - serializedName: "properties.signinTenant", - xmlName: "properties.signinTenant", - type: { - name: "String" - } - }, - allowedTenants: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.allowedTenants", - xmlName: "properties.allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - authority: { - serializedName: "properties.authority", - xmlName: "properties.authority", - type: { - name: "String" - } - }, - signupPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signupPolicyName", - xmlName: "properties.signupPolicyName", - type: { - name: "String" - } - }, - signinPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signinPolicyName", - xmlName: "properties.signinPolicyName", - type: { - name: "String" - } - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.profileEditingPolicyName", - xmlName: "properties.profileEditingPolicyName", - type: { - name: "String" - } - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.passwordResetPolicyName", - xmlName: "properties.passwordResetPolicyName", - type: { - name: "String" - } - }, - clientLibrary: { - constraints: { - MaxLength: 16 - }, - serializedName: "properties.clientLibrary", - xmlName: "properties.clientLibrary", - type: { - name: "String" - } - }, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderCreateContract", + type: { + name: "Composite", + className: "IdentityProviderCreateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + typePropertiesType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + signinTenant: { + serializedName: "properties.signinTenant", + xmlName: "properties.signinTenant", + type: { + name: "String" + } + }, + allowedTenants: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.allowedTenants", + xmlName: "properties.allowedTenants", + xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + authority: { + serializedName: "properties.authority", + xmlName: "properties.authority", + type: { + name: "String" + } + }, + signupPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signupPolicyName", + xmlName: "properties.signupPolicyName", + type: { + name: "String" + } + }, + signinPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signinPolicyName", + xmlName: "properties.signinPolicyName", + type: { + name: "String" + } + }, + profileEditingPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.profileEditingPolicyName", + xmlName: "properties.profileEditingPolicyName", + type: { + name: "String" + } + }, + passwordResetPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.passwordResetPolicyName", + xmlName: "properties.passwordResetPolicyName", + type: { + name: "String" + } + }, + clientLibrary: { + constraints: { + MaxLength: 16 + }, + serializedName: "properties.clientLibrary", + xmlName: "properties.clientLibrary", + type: { + name: "String" + } + }, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + } + } + } }; export const LoggerContract: coreClient.CompositeMapper = { - serializedName: "LoggerContract", - type: { - name: "Composite", - className: "LoggerContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - loggerType: { - serializedName: "properties.loggerType", - xmlName: "properties.loggerType", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - isBuffered: { - serializedName: "properties.isBuffered", - xmlName: "properties.isBuffered", - type: { - name: "Boolean" - } - }, - resourceId: { - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - } - } - } + serializedName: "LoggerContract", + type: { + name: "Composite", + className: "LoggerContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + loggerType: { + serializedName: "properties.loggerType", + xmlName: "properties.loggerType", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + credentials: { + serializedName: "properties.credentials", + xmlName: "properties.credentials", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + isBuffered: { + serializedName: "properties.isBuffered", + xmlName: "properties.isBuffered", + type: { + name: "Boolean" + } + }, + resourceId: { + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + } + } + } }; export const NamedValueContract: coreClient.CompositeMapper = { - serializedName: "NamedValueContract", - type: { - name: "Composite", - className: "NamedValueContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.tags", - xmlName: "properties.tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - secret: { - serializedName: "properties.secret", - xmlName: "properties.secret", - type: { - name: "Boolean" - } - }, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096 - }, - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractProperties" - } - } - } - } + serializedName: "NamedValueContract", + type: { + name: "Composite", + className: "NamedValueContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + tags: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.tags", + xmlName: "properties.tags", + xmlElementName: "NamedValueEntityBaseParametersTagsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secret: { + serializedName: "properties.secret", + xmlName: "properties.secret", + type: { + name: "Boolean" + } + }, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096 + }, + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractProperties" + } + } + } + } }; export const NamedValueCreateContract: coreClient.CompositeMapper = { - serializedName: "NamedValueCreateContract", - type: { - name: "Composite", - className: "NamedValueCreateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.tags", - xmlName: "properties.tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - secret: { - serializedName: "properties.secret", - xmlName: "properties.secret", - type: { - name: "Boolean" - } - }, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096 - }, - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "NamedValueCreateContract", + type: { + name: "Composite", + className: "NamedValueCreateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + tags: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.tags", + xmlName: "properties.tags", + xmlElementName: "NamedValueEntityBaseParametersTagsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secret: { + serializedName: "properties.secret", + xmlName: "properties.secret", + type: { + name: "Boolean" + } + }, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096 + }, + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const NotificationContract: coreClient.CompositeMapper = { - serializedName: "NotificationContract", - type: { - name: "Composite", - className: "NotificationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - recipients: { - serializedName: "properties.recipients", - xmlName: "properties.recipients", - type: { - name: "Composite", - className: "RecipientsContractProperties" - } - } - } - } + serializedName: "NotificationContract", + type: { + name: "Composite", + className: "NotificationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + title: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + recipients: { + serializedName: "properties.recipients", + xmlName: "properties.recipients", + type: { + name: "Composite", + className: "RecipientsContractProperties" + } + } + } + } }; export const RecipientUserContract: coreClient.CompositeMapper = { - serializedName: "RecipientUserContract", - type: { - name: "Composite", - className: "RecipientUserContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String" + serializedName: "RecipientUserContract", + type: { + name: "Composite", + className: "RecipientUserContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + userId: { + serializedName: "properties.userId", + xmlName: "properties.userId", + type: { + name: "String" + } + } } - } } - } }; export const RecipientEmailContract: coreClient.CompositeMapper = { - serializedName: "RecipientEmailContract", - type: { - name: "Composite", - className: "RecipientEmailContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - email: { - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String" + serializedName: "RecipientEmailContract", + type: { + name: "Composite", + className: "RecipientEmailContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + email: { + serializedName: "properties.email", + xmlName: "properties.email", + type: { + name: "String" + } + } } - } } - } }; export const OpenidConnectProviderContract: coreClient.CompositeMapper = { - serializedName: "OpenidConnectProviderContract", - type: { - name: "Composite", - className: "OpenidConnectProviderContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 50 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - metadataEndpoint: { - serializedName: "properties.metadataEndpoint", - xmlName: "properties.metadataEndpoint", - type: { - name: "String" - } - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean" - } - } - } - } + serializedName: "OpenidConnectProviderContract", + type: { + name: "Composite", + className: "OpenidConnectProviderContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 50 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + metadataEndpoint: { + serializedName: "properties.metadataEndpoint", + xmlName: "properties.metadataEndpoint", + type: { + name: "String" + } + }, + clientId: { + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "properties.useInTestConsole", + xmlName: "properties.useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "properties.useInApiDocumentation", + xmlName: "properties.useInApiDocumentation", + type: { + name: "Boolean" + } + } + } + } }; export const PolicyDescriptionContract: coreClient.CompositeMapper = { - serializedName: "PolicyDescriptionContract", - type: { - name: "Composite", - className: "PolicyDescriptionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - readOnly: true, - xmlName: "properties.description", - type: { - name: "String" - } - }, - scope: { - serializedName: "properties.scope", - readOnly: true, - xmlName: "properties.scope", - type: { - name: "Number" - } - } - } - } + serializedName: "PolicyDescriptionContract", + type: { + name: "Composite", + className: "PolicyDescriptionContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + readOnly: true, + xmlName: "properties.description", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + readOnly: true, + xmlName: "properties.scope", + type: { + name: "Number" + } + } + } + } }; export const PolicyFragmentContract: coreClient.CompositeMapper = { - serializedName: "PolicyFragmentContract", - type: { - name: "Composite", - className: "PolicyFragmentContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - format: { - serializedName: "properties.format", - xmlName: "properties.format", - type: { - name: "String" - } - } - } - } + serializedName: "PolicyFragmentContract", + type: { + name: "Composite", + className: "PolicyFragmentContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + value: { + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + format: { + serializedName: "properties.format", + xmlName: "properties.format", + type: { + name: "String" + } + } + } + } }; export const ResourceCollectionValueItem: coreClient.CompositeMapper = { - serializedName: "ResourceCollectionValueItem", - type: { - name: "Composite", - className: "ResourceCollectionValueItem", - modelProperties: { - ...ProxyResource.type.modelProperties + serializedName: "ResourceCollectionValueItem", + type: { + name: "Composite", + className: "ResourceCollectionValueItem", + modelProperties: { + ...ProxyResource.type.modelProperties + } } - } }; export const PortalConfigContract: coreClient.CompositeMapper = { - serializedName: "PortalConfigContract", - type: { - name: "Composite", - className: "PortalConfigContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - enableBasicAuth: { - defaultValue: true, - serializedName: "properties.enableBasicAuth", - xmlName: "properties.enableBasicAuth", - type: { - name: "Boolean" - } - }, - signin: { - serializedName: "properties.signin", - xmlName: "properties.signin", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignin" - } - }, - signup: { - serializedName: "properties.signup", - xmlName: "properties.signup", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignup" - } - }, - delegation: { - serializedName: "properties.delegation", - xmlName: "properties.delegation", - type: { - name: "Composite", - className: "PortalConfigDelegationProperties" - } - }, - cors: { - serializedName: "properties.cors", - xmlName: "properties.cors", - type: { - name: "Composite", - className: "PortalConfigCorsProperties" - } - }, - csp: { - serializedName: "properties.csp", - xmlName: "properties.csp", - type: { - name: "Composite", - className: "PortalConfigCspProperties" - } - } - } - } + serializedName: "PortalConfigContract", + type: { + name: "Composite", + className: "PortalConfigContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + enableBasicAuth: { + defaultValue: true, + serializedName: "properties.enableBasicAuth", + xmlName: "properties.enableBasicAuth", + type: { + name: "Boolean" + } + }, + signin: { + serializedName: "properties.signin", + xmlName: "properties.signin", + type: { + name: "Composite", + className: "PortalConfigPropertiesSignin" + } + }, + signup: { + serializedName: "properties.signup", + xmlName: "properties.signup", + type: { + name: "Composite", + className: "PortalConfigPropertiesSignup" + } + }, + delegation: { + serializedName: "properties.delegation", + xmlName: "properties.delegation", + type: { + name: "Composite", + className: "PortalConfigDelegationProperties" + } + }, + cors: { + serializedName: "properties.cors", + xmlName: "properties.cors", + type: { + name: "Composite", + className: "PortalConfigCorsProperties" + } + }, + csp: { + serializedName: "properties.csp", + xmlName: "properties.csp", + type: { + name: "Composite", + className: "PortalConfigCspProperties" + } + } + } + } }; export const PortalRevisionContract: coreClient.CompositeMapper = { - serializedName: "PortalRevisionContract", - type: { - name: "Composite", - className: "PortalRevisionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - statusDetails: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.statusDetails", - readOnly: true, - xmlName: "properties.statusDetails", - type: { - name: "String" - } - }, - status: { - serializedName: "properties.status", - readOnly: true, - xmlName: "properties.status", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean" - } - }, - createdDateTime: { - serializedName: "properties.createdDateTime", - readOnly: true, - xmlName: "properties.createdDateTime", - type: { - name: "DateTime" - } - }, - updatedDateTime: { - serializedName: "properties.updatedDateTime", - readOnly: true, - xmlName: "properties.updatedDateTime", - type: { - name: "DateTime" - } - } - } - } + serializedName: "PortalRevisionContract", + type: { + name: "Composite", + className: "PortalRevisionContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + statusDetails: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.statusDetails", + readOnly: true, + xmlName: "properties.statusDetails", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + xmlName: "properties.status", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "properties.isCurrent", + xmlName: "properties.isCurrent", + type: { + name: "Boolean" + } + }, + createdDateTime: { + serializedName: "properties.createdDateTime", + readOnly: true, + xmlName: "properties.createdDateTime", + type: { + name: "DateTime" + } + }, + updatedDateTime: { + serializedName: "properties.updatedDateTime", + readOnly: true, + xmlName: "properties.updatedDateTime", + type: { + name: "DateTime" + } + } + } + } }; export const PortalSettingsContract: coreClient.CompositeMapper = { - serializedName: "PortalSettingsContract", - type: { - name: "Composite", - className: "PortalSettingsContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - url: { - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String" - } - }, - validationKey: { - serializedName: "properties.validationKey", - xmlName: "properties.validationKey", - type: { - name: "String" - } - }, - subscriptions: { - serializedName: "properties.subscriptions", - xmlName: "properties.subscriptions", - type: { - name: "Composite", - className: "SubscriptionsDelegationSettingsProperties" - } - }, - userRegistration: { - serializedName: "properties.userRegistration", - xmlName: "properties.userRegistration", - type: { - name: "Composite", - className: "RegistrationDelegationSettingsProperties" - } - }, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" - } - }, - termsOfService: { - serializedName: "properties.termsOfService", - xmlName: "properties.termsOfService", - type: { - name: "Composite", - className: "TermsOfServiceProperties" - } - } - } - } + serializedName: "PortalSettingsContract", + type: { + name: "Composite", + className: "PortalSettingsContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + url: { + serializedName: "properties.url", + xmlName: "properties.url", + type: { + name: "String" + } + }, + validationKey: { + serializedName: "properties.validationKey", + xmlName: "properties.validationKey", + type: { + name: "String" + } + }, + subscriptions: { + serializedName: "properties.subscriptions", + xmlName: "properties.subscriptions", + type: { + name: "Composite", + className: "SubscriptionsDelegationSettingsProperties" + } + }, + userRegistration: { + serializedName: "properties.userRegistration", + xmlName: "properties.userRegistration", + type: { + name: "Composite", + className: "RegistrationDelegationSettingsProperties" + } + }, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + }, + termsOfService: { + serializedName: "properties.termsOfService", + xmlName: "properties.termsOfService", + type: { + name: "Composite", + className: "TermsOfServiceProperties" + } + } + } + } }; export const PortalSigninSettings: coreClient.CompositeMapper = { - serializedName: "PortalSigninSettings", - type: { - name: "Composite", - className: "PortalSigninSettings", - modelProperties: { - ...ProxyResource.type.modelProperties, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" + serializedName: "PortalSigninSettings", + type: { + name: "Composite", + className: "PortalSigninSettings", + modelProperties: { + ...ProxyResource.type.modelProperties, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + } } - } } - } }; export const PortalSignupSettings: coreClient.CompositeMapper = { - serializedName: "PortalSignupSettings", - type: { - name: "Composite", - className: "PortalSignupSettings", - modelProperties: { - ...ProxyResource.type.modelProperties, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" - } - }, - termsOfService: { - serializedName: "properties.termsOfService", - xmlName: "properties.termsOfService", - type: { - name: "Composite", - className: "TermsOfServiceProperties" - } - } - } - } + serializedName: "PortalSignupSettings", + type: { + name: "Composite", + className: "PortalSignupSettings", + modelProperties: { + ...ProxyResource.type.modelProperties, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + }, + termsOfService: { + serializedName: "properties.termsOfService", + xmlName: "properties.termsOfService", + type: { + name: "Composite", + className: "TermsOfServiceProperties" + } + } + } + } }; export const PortalDelegationSettings: coreClient.CompositeMapper = { - serializedName: "PortalDelegationSettings", - type: { - name: "Composite", - className: "PortalDelegationSettings", - modelProperties: { - ...ProxyResource.type.modelProperties, - url: { - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String" - } - }, - validationKey: { - serializedName: "properties.validationKey", - xmlName: "properties.validationKey", - type: { - name: "String" - } - }, - subscriptions: { - serializedName: "properties.subscriptions", - xmlName: "properties.subscriptions", - type: { - name: "Composite", - className: "SubscriptionsDelegationSettingsProperties" - } - }, - userRegistration: { - serializedName: "properties.userRegistration", - xmlName: "properties.userRegistration", - type: { - name: "Composite", - className: "RegistrationDelegationSettingsProperties" - } - } - } - } + serializedName: "PortalDelegationSettings", + type: { + name: "Composite", + className: "PortalDelegationSettings", + modelProperties: { + ...ProxyResource.type.modelProperties, + url: { + serializedName: "properties.url", + xmlName: "properties.url", + type: { + name: "String" + } + }, + validationKey: { + serializedName: "properties.validationKey", + xmlName: "properties.validationKey", + type: { + name: "String" + } + }, + subscriptions: { + serializedName: "properties.subscriptions", + xmlName: "properties.subscriptions", + type: { + name: "Composite", + className: "SubscriptionsDelegationSettingsProperties" + } + }, + userRegistration: { + serializedName: "properties.userRegistration", + xmlName: "properties.userRegistration", + type: { + name: "Composite", + className: "RegistrationDelegationSettingsProperties" + } + } + } + } }; export const SubscriptionContract: coreClient.CompositeMapper = { - serializedName: "SubscriptionContract", - type: { - name: "Composite", - className: "SubscriptionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - ownerId: { - serializedName: "properties.ownerId", - xmlName: "properties.ownerId", - type: { - name: "String" - } - }, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "suspended", - "active", - "expired", - "submitted", - "rejected", - "cancelled" - ] - } - }, - createdDate: { - serializedName: "properties.createdDate", - readOnly: true, - xmlName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - startDate: { - serializedName: "properties.startDate", - xmlName: "properties.startDate", - type: { - name: "DateTime" - } - }, - expirationDate: { - serializedName: "properties.expirationDate", - xmlName: "properties.expirationDate", - type: { - name: "DateTime" - } - }, - endDate: { - serializedName: "properties.endDate", - xmlName: "properties.endDate", - type: { - name: "DateTime" - } - }, - notificationDate: { - serializedName: "properties.notificationDate", - xmlName: "properties.notificationDate", - type: { - name: "DateTime" - } - }, - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String" - } - }, - stateComment: { - serializedName: "properties.stateComment", - xmlName: "properties.stateComment", - type: { - name: "String" - } - }, - allowTracing: { - serializedName: "properties.allowTracing", - xmlName: "properties.allowTracing", - type: { - name: "Boolean" - } - } - } - } + serializedName: "SubscriptionContract", + type: { + name: "Composite", + className: "SubscriptionContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + ownerId: { + serializedName: "properties.ownerId", + xmlName: "properties.ownerId", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + xmlName: "properties.scope", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "suspended", + "active", + "expired", + "submitted", + "rejected", + "cancelled" + ] + } + }, + createdDate: { + serializedName: "properties.createdDate", + readOnly: true, + xmlName: "properties.createdDate", + type: { + name: "DateTime" + } + }, + startDate: { + serializedName: "properties.startDate", + xmlName: "properties.startDate", + type: { + name: "DateTime" + } + }, + expirationDate: { + serializedName: "properties.expirationDate", + xmlName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "properties.endDate", + xmlName: "properties.endDate", + type: { + name: "DateTime" + } + }, + notificationDate: { + serializedName: "properties.notificationDate", + xmlName: "properties.notificationDate", + type: { + name: "DateTime" + } + }, + primaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.primaryKey", + xmlName: "properties.primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.secondaryKey", + xmlName: "properties.secondaryKey", + type: { + name: "String" + } + }, + stateComment: { + serializedName: "properties.stateComment", + xmlName: "properties.stateComment", + type: { + name: "String" + } + }, + allowTracing: { + serializedName: "properties.allowTracing", + xmlName: "properties.allowTracing", + type: { + name: "Boolean" + } + } + } + } }; export const GlobalSchemaContract: coreClient.CompositeMapper = { - serializedName: "GlobalSchemaContract", - type: { - name: "Composite", - className: "GlobalSchemaContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - schemaType: { - serializedName: "properties.schemaType", - xmlName: "properties.schemaType", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "any" - } - }, - document: { - serializedName: "properties.document", - xmlName: "properties.document", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + serializedName: "GlobalSchemaContract", + type: { + name: "Composite", + className: "GlobalSchemaContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + schemaType: { + serializedName: "properties.schemaType", + xmlName: "properties.schemaType", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + value: { + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "any" + } + }, + document: { + serializedName: "properties.document", + xmlName: "properties.document", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } }; export const TenantSettingsContract: coreClient.CompositeMapper = { - serializedName: "TenantSettingsContract", - type: { - name: "Composite", - className: "TenantSettingsContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - settings: { - serializedName: "properties.settings", - xmlName: "properties.settings", - type: { - name: "Dictionary", - value: { type: { name: "String" } } + serializedName: "TenantSettingsContract", + type: { + name: "Composite", + className: "TenantSettingsContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + settings: { + serializedName: "properties.settings", + xmlName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } } - } } - } }; export const AccessInformationContract: coreClient.CompositeMapper = { - serializedName: "AccessInformationContract", - type: { - name: "Composite", - className: "AccessInformationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String" - } - }, - principalId: { - serializedName: "properties.principalId", - xmlName: "properties.principalId", - type: { - name: "String" - } - }, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" - } - } - } - } + serializedName: "AccessInformationContract", + type: { + name: "Composite", + className: "AccessInformationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + xmlName: "properties.id", + type: { + name: "String" + } + }, + principalId: { + serializedName: "properties.principalId", + xmlName: "properties.principalId", + type: { + name: "String" + } + }, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + } + } + } }; export const OperationResultContract: coreClient.CompositeMapper = { - serializedName: "OperationResultContract", - type: { - name: "Composite", - className: "OperationResultContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String" - } - }, - status: { - serializedName: "properties.status", - xmlName: "properties.status", - type: { - name: "Enum", - allowedValues: ["Started", "InProgress", "Succeeded", "Failed"] - } - }, - started: { - serializedName: "properties.started", - xmlName: "properties.started", - type: { - name: "DateTime" - } - }, - updated: { - serializedName: "properties.updated", - xmlName: "properties.updated", - type: { - name: "DateTime" - } - }, - resultInfo: { - serializedName: "properties.resultInfo", - xmlName: "properties.resultInfo", - type: { - name: "String" - } - }, - error: { - serializedName: "properties.error", - xmlName: "properties.error", - type: { - name: "Composite", - className: "ErrorResponseBody" - } - }, - actionLog: { - serializedName: "properties.actionLog", - readOnly: true, - xmlName: "properties.actionLog", - xmlElementName: "OperationResultLogItemContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationResultLogItemContract" + serializedName: "OperationResultContract", + type: { + name: "Composite", + className: "OperationResultContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + xmlName: "properties.id", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + xmlName: "properties.status", + type: { + name: "Enum", + allowedValues: ["Started", "InProgress", "Succeeded", "Failed"] + } + }, + started: { + serializedName: "properties.started", + xmlName: "properties.started", + type: { + name: "DateTime" + } + }, + updated: { + serializedName: "properties.updated", + xmlName: "properties.updated", + type: { + name: "DateTime" + } + }, + resultInfo: { + serializedName: "properties.resultInfo", + xmlName: "properties.resultInfo", + type: { + name: "String" + } + }, + error: { + serializedName: "properties.error", + xmlName: "properties.error", + type: { + name: "Composite", + className: "ErrorResponseBody" + } + }, + actionLog: { + serializedName: "properties.actionLog", + readOnly: true, + xmlName: "properties.actionLog", + xmlElementName: "OperationResultLogItemContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationResultLogItemContract" + } + } + } } - } } - } } - } }; export const TenantConfigurationSyncStateContract: coreClient.CompositeMapper = { - serializedName: "TenantConfigurationSyncStateContract", - type: { - name: "Composite", - className: "TenantConfigurationSyncStateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - branch: { - serializedName: "properties.branch", - xmlName: "properties.branch", - type: { - name: "String" - } - }, - commitId: { - serializedName: "properties.commitId", - xmlName: "properties.commitId", - type: { - name: "String" - } - }, - isExport: { - serializedName: "properties.isExport", - xmlName: "properties.isExport", - type: { - name: "Boolean" - } - }, - isSynced: { - serializedName: "properties.isSynced", - xmlName: "properties.isSynced", - type: { - name: "Boolean" - } - }, - isGitEnabled: { - serializedName: "properties.isGitEnabled", - xmlName: "properties.isGitEnabled", - type: { - name: "Boolean" - } - }, - syncDate: { - serializedName: "properties.syncDate", - xmlName: "properties.syncDate", - type: { - name: "DateTime" - } - }, - configurationChangeDate: { - serializedName: "properties.configurationChangeDate", - xmlName: "properties.configurationChangeDate", - type: { - name: "DateTime" - } - }, - lastOperationId: { - serializedName: "properties.lastOperationId", - xmlName: "properties.lastOperationId", - type: { - name: "String" - } - } - } - } + serializedName: "TenantConfigurationSyncStateContract", + type: { + name: "Composite", + className: "TenantConfigurationSyncStateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + branch: { + serializedName: "properties.branch", + xmlName: "properties.branch", + type: { + name: "String" + } + }, + commitId: { + serializedName: "properties.commitId", + xmlName: "properties.commitId", + type: { + name: "String" + } + }, + isExport: { + serializedName: "properties.isExport", + xmlName: "properties.isExport", + type: { + name: "Boolean" + } + }, + isSynced: { + serializedName: "properties.isSynced", + xmlName: "properties.isSynced", + type: { + name: "Boolean" + } + }, + isGitEnabled: { + serializedName: "properties.isGitEnabled", + xmlName: "properties.isGitEnabled", + type: { + name: "Boolean" + } + }, + syncDate: { + serializedName: "properties.syncDate", + xmlName: "properties.syncDate", + type: { + name: "DateTime" + } + }, + configurationChangeDate: { + serializedName: "properties.configurationChangeDate", + xmlName: "properties.configurationChangeDate", + type: { + name: "DateTime" + } + }, + lastOperationId: { + serializedName: "properties.lastOperationId", + xmlName: "properties.lastOperationId", + type: { + name: "String" + } + } + } + } }; export const DocumentationContract: coreClient.CompositeMapper = { - serializedName: "DocumentationContract", - type: { - name: "Composite", - className: "DocumentationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - content: { - serializedName: "properties.content", - xmlName: "properties.content", - type: { - name: "String" - } - } - } - } + serializedName: "DocumentationContract", + type: { + name: "Composite", + className: "DocumentationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + content: { + serializedName: "properties.content", + xmlName: "properties.content", + type: { + name: "String" + } + } + } + } }; export const ResolverResultContract: coreClient.CompositeMapper = { - serializedName: "ResolverResultContract", - type: { - name: "Composite", - className: "ResolverResultContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String" - } - }, - status: { - serializedName: "properties.status", - xmlName: "properties.status", - type: { - name: "Enum", - allowedValues: ["Started", "InProgress", "Succeeded", "Failed"] - } - }, - started: { - serializedName: "properties.started", - xmlName: "properties.started", - type: { - name: "DateTime" - } - }, - updated: { - serializedName: "properties.updated", - xmlName: "properties.updated", - type: { - name: "DateTime" - } - }, - resultInfo: { - serializedName: "properties.resultInfo", - xmlName: "properties.resultInfo", - type: { - name: "String" - } - }, - error: { - serializedName: "properties.error", - xmlName: "properties.error", - type: { - name: "Composite", - className: "ErrorResponseBody" - } - }, - actionLog: { - serializedName: "properties.actionLog", - readOnly: true, - xmlName: "properties.actionLog", - xmlElementName: "ResolverResultLogItemContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResolverResultLogItemContract" + serializedName: "ResolverResultContract", + type: { + name: "Composite", + className: "ResolverResultContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + xmlName: "properties.id", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + xmlName: "properties.status", + type: { + name: "Enum", + allowedValues: ["Started", "InProgress", "Succeeded", "Failed"] + } + }, + started: { + serializedName: "properties.started", + xmlName: "properties.started", + type: { + name: "DateTime" + } + }, + updated: { + serializedName: "properties.updated", + xmlName: "properties.updated", + type: { + name: "DateTime" + } + }, + resultInfo: { + serializedName: "properties.resultInfo", + xmlName: "properties.resultInfo", + type: { + name: "String" + } + }, + error: { + serializedName: "properties.error", + xmlName: "properties.error", + type: { + name: "Composite", + className: "ErrorResponseBody" + } + }, + actionLog: { + serializedName: "properties.actionLog", + readOnly: true, + xmlName: "properties.actionLog", + xmlElementName: "ResolverResultLogItemContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResolverResultLogItemContract" + } + } + } } - } } - } } - } }; export const ApiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Api_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Api_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiGetHeaders: coreClient.CompositeMapper = { - serializedName: "Api_getHeaders", - type: { - name: "Composite", - className: "ApiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Api_getHeaders", + type: { + name: "Composite", + className: "ApiGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Api_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Api_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Api_updateHeaders", - type: { - name: "Composite", - className: "ApiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Api_updateHeaders", + type: { + name: "Composite", + className: "ApiUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiReleaseGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiReleaseGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiRelease_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiReleaseGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiReleaseGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_getHeaders", - type: { - name: "Composite", - className: "ApiReleaseGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiRelease_getHeaders", + type: { + name: "Composite", + className: "ApiReleaseGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiReleaseCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiReleaseCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiRelease_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiReleaseCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiReleaseUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_updateHeaders", - type: { - name: "Composite", - className: "ApiReleaseUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiRelease_updateHeaders", + type: { + name: "Composite", + className: "ApiReleaseUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiOperationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperation_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiOperationGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_getHeaders", - type: { - name: "Composite", - className: "ApiOperationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperation_getHeaders", + type: { + name: "Composite", + className: "ApiOperationGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiOperationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperation_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiOperationCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_updateHeaders", - type: { - name: "Composite", - className: "ApiOperationUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperation_updateHeaders", + type: { + name: "Composite", + className: "ApiOperationUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperationPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiOperationPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperationPolicy_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiOperationPolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperationPolicy_getHeaders", - type: { - name: "Composite", - className: "ApiOperationPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperationPolicy_getHeaders", + type: { + name: "Composite", + className: "ApiOperationPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperationPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiOperationPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperationPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiOperationPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetEntityStateByOperationHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateByOperationHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateByOperationHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getEntityStateByOperationHeaders", + type: { + name: "Composite", + className: "TagGetEntityStateByOperationHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetByOperationHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getByOperationHeaders", - type: { - name: "Composite", - className: "TagGetByOperationHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getByOperationHeaders", + type: { + name: "Composite", + className: "TagGetByOperationHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetEntityStateByApiHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateByApiHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateByApiHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getEntityStateByApiHeaders", + type: { + name: "Composite", + className: "TagGetEntityStateByApiHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetByApiHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getByApiHeaders", - type: { - name: "Composite", - className: "TagGetByApiHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getByApiHeaders", + type: { + name: "Composite", + className: "TagGetByApiHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagAssignToApiHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_assignToApiHeaders", - type: { - name: "Composite", - className: "TagAssignToApiHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_assignToApiHeaders", + type: { + name: "Composite", + className: "TagAssignToApiHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetEntityStateByProductHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateByProductHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateByProductHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getEntityStateByProductHeaders", + type: { + name: "Composite", + className: "TagGetEntityStateByProductHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetByProductHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getByProductHeaders", - type: { - name: "Composite", - className: "TagGetByProductHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getByProductHeaders", + type: { + name: "Composite", + className: "TagGetByProductHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetEntityStateHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getEntityStateHeaders", + type: { + name: "Composite", + className: "TagGetEntityStateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getHeaders", - type: { - name: "Composite", - className: "TagGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getHeaders", + type: { + name: "Composite", + className: "TagGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_createOrUpdateHeaders", - type: { - name: "Composite", - className: "TagCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_createOrUpdateHeaders", + type: { + name: "Composite", + className: "TagCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_updateHeaders", - type: { - name: "Composite", - className: "TagUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_updateHeaders", + type: { + name: "Composite", + className: "TagUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_getEntityTagHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolver_getEntityTagHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverGetHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_getHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolver_getHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolver_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_updateHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolver_updateHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolverPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolverPolicy_getEntityTagHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverPolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolverPolicy_getHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolverPolicy_getHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolverPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolverPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiPolicy_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiPolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiPolicy_getHeaders", - type: { - name: "Composite", - className: "ApiPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiPolicy_getHeaders", + type: { + name: "Composite", + className: "ApiPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiSchemaGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiSchema_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiSchemaGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiSchema_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiSchemaGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiSchemaGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiSchema_getHeaders", - type: { - name: "Composite", - className: "ApiSchemaGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiSchema_getHeaders", + type: { + name: "Composite", + className: "ApiSchemaGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiSchemaCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiSchema_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiSchemaCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiSchema_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiSchemaCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiDiagnosticGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiDiagnostic_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiDiagnosticGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiDiagnosticGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_getHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiDiagnostic_getHeaders", + type: { + name: "Composite", + className: "ApiDiagnosticGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiDiagnosticCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiDiagnostic_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiDiagnosticCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiDiagnosticUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_updateHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiDiagnostic_updateHeaders", + type: { + name: "Composite", + className: "ApiDiagnosticUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiIssueGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssue_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiIssueGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_getHeaders", - type: { - name: "Composite", - className: "ApiIssueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssue_getHeaders", + type: { + name: "Composite", + className: "ApiIssueGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiIssueCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssue_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiIssueCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_updateHeaders", - type: { - name: "Composite", - className: "ApiIssueUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssue_updateHeaders", + type: { + name: "Composite", + className: "ApiIssueUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueCommentGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueComment_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiIssueCommentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueComment_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiIssueCommentGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueCommentGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueComment_getHeaders", - type: { - name: "Composite", - className: "ApiIssueCommentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueComment_getHeaders", + type: { + name: "Composite", + className: "ApiIssueCommentGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueCommentCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueComment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiIssueCommentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueComment_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiIssueCommentCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueAttachmentGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueAttachment_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiIssueAttachmentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueAttachment_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiIssueAttachmentGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueAttachmentGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueAttachment_getHeaders", - type: { - name: "Composite", - className: "ApiIssueAttachmentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueAttachment_getHeaders", + type: { + name: "Composite", + className: "ApiIssueAttachmentGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueAttachmentCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueAttachment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiIssueAttachmentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueAttachment_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiIssueAttachmentCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiTagDescriptionGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiTagDescription_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiTagDescriptionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiTagDescription_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiTagDescriptionGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiTagDescriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiTagDescription_getHeaders", - type: { - name: "Composite", - className: "ApiTagDescriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiTagDescription_getHeaders", + type: { + name: "Composite", + className: "ApiTagDescriptionGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiTagDescriptionCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiTagDescription_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiTagDescriptionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiTagDescription_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiTagDescriptionCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiWikiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiWikiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiWiki_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiWikiGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiWikiGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_getHeaders", - type: { - name: "Composite", - className: "ApiWikiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiWiki_getHeaders", + type: { + name: "Composite", + className: "ApiWikiGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiWikiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiWikiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiWiki_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiWikiCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiWikiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_updateHeaders", - type: { - name: "Composite", - className: "ApiWikiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiWiki_updateHeaders", + type: { + name: "Composite", + className: "ApiWikiUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiVersionSetGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiVersionSet_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiVersionSetGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_getHeaders", - type: { - name: "Composite", - className: "ApiVersionSetGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiVersionSet_getHeaders", + type: { + name: "Composite", + className: "ApiVersionSetGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiVersionSetCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiVersionSet_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiVersionSetCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_updateHeaders", - type: { - name: "Composite", - className: "ApiVersionSetUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiVersionSet_updateHeaders", + type: { + name: "Composite", + className: "ApiVersionSetUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_getEntityTagHeaders", - type: { - name: "Composite", - className: "AuthorizationServerGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_getEntityTagHeaders", + type: { + name: "Composite", + className: "AuthorizationServerGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerGetHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_getHeaders", - type: { - name: "Composite", - className: "AuthorizationServerGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_getHeaders", + type: { + name: "Composite", + className: "AuthorizationServerGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationServerCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_createOrUpdateHeaders", + type: { + name: "Composite", + className: "AuthorizationServerCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_updateHeaders", - type: { - name: "Composite", - className: "AuthorizationServerUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_updateHeaders", + type: { + name: "Composite", + className: "AuthorizationServerUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_listSecretsHeaders", - type: { - name: "Composite", - className: "AuthorizationServerListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_listSecretsHeaders", + type: { + name: "Composite", + className: "AuthorizationServerListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationProviderGetHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationProvider_getHeaders", - type: { - name: "Composite", - className: "AuthorizationProviderGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationProvider_getHeaders", + type: { + name: "Composite", + className: "AuthorizationProviderGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationProviderCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationProvider_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationProviderCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationProvider_createOrUpdateHeaders", + type: { + name: "Composite", + className: "AuthorizationProviderCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationGetHeaders: coreClient.CompositeMapper = { - serializedName: "Authorization_getHeaders", - type: { - name: "Composite", - className: "AuthorizationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Authorization_getHeaders", + type: { + name: "Composite", + className: "AuthorizationGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Authorization_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Authorization_createOrUpdateHeaders", + type: { + name: "Composite", + className: "AuthorizationCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationConfirmConsentCodeHeaders: coreClient.CompositeMapper = { - serializedName: "Authorization_confirmConsentCodeHeaders", - type: { - name: "Composite", - className: "AuthorizationConfirmConsentCodeHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Authorization_confirmConsentCodeHeaders", + type: { + name: "Composite", + className: "AuthorizationConfirmConsentCodeHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationLoginLinksPostHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationLoginLinks_postHeaders", - type: { - name: "Composite", - className: "AuthorizationLoginLinksPostHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationLoginLinks_postHeaders", + type: { + name: "Composite", + className: "AuthorizationLoginLinksPostHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationAccessPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicy_getHeaders", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationAccessPolicy_getHeaders", + type: { + name: "Composite", + className: "AuthorizationAccessPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationAccessPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationAccessPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "AuthorizationAccessPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const BackendGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_getEntityTagHeaders", - type: { - name: "Composite", - className: "BackendGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Backend_getEntityTagHeaders", + type: { + name: "Composite", + className: "BackendGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const BackendGetHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_getHeaders", - type: { - name: "Composite", - className: "BackendGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Backend_getHeaders", + type: { + name: "Composite", + className: "BackendGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const BackendCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_createOrUpdateHeaders", - type: { - name: "Composite", - className: "BackendCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Backend_createOrUpdateHeaders", + type: { + name: "Composite", + className: "BackendCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const BackendUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_updateHeaders", - type: { - name: "Composite", - className: "BackendUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Backend_updateHeaders", + type: { + name: "Composite", + className: "BackendUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CacheGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_getEntityTagHeaders", - type: { - name: "Composite", - className: "CacheGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Cache_getEntityTagHeaders", + type: { + name: "Composite", + className: "CacheGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CacheGetHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_getHeaders", - type: { - name: "Composite", - className: "CacheGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Cache_getHeaders", + type: { + name: "Composite", + className: "CacheGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CacheCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_createOrUpdateHeaders", - type: { - name: "Composite", - className: "CacheCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Cache_createOrUpdateHeaders", + type: { + name: "Composite", + className: "CacheCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CacheUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_updateHeaders", - type: { - name: "Composite", - className: "CacheUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Cache_updateHeaders", + type: { + name: "Composite", + className: "CacheUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CertificateGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_getEntityTagHeaders", - type: { - name: "Composite", - className: "CertificateGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Certificate_getEntityTagHeaders", + type: { + name: "Composite", + className: "CertificateGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CertificateGetHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_getHeaders", - type: { - name: "Composite", - className: "CertificateGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Certificate_getHeaders", + type: { + name: "Composite", + className: "CertificateGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CertificateCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_createOrUpdateHeaders", - type: { - name: "Composite", - className: "CertificateCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Certificate_createOrUpdateHeaders", + type: { + name: "Composite", + className: "CertificateCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CertificateRefreshSecretHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_refreshSecretHeaders", - type: { - name: "Composite", - className: "CertificateRefreshSecretHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Certificate_refreshSecretHeaders", + type: { + name: "Composite", + className: "CertificateRefreshSecretHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentTypeGetHeaders: coreClient.CompositeMapper = { - serializedName: "ContentType_getHeaders", - type: { - name: "Composite", - className: "ContentTypeGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentType_getHeaders", + type: { + name: "Composite", + className: "ContentTypeGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentTypeCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ContentType_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ContentTypeCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentType_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ContentTypeCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentItemGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ContentItem_getEntityTagHeaders", - type: { - name: "Composite", - className: "ContentItemGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentItem_getEntityTagHeaders", + type: { + name: "Composite", + className: "ContentItemGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentItemGetHeaders: coreClient.CompositeMapper = { - serializedName: "ContentItem_getHeaders", - type: { - name: "Composite", - className: "ContentItemGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentItem_getHeaders", + type: { + name: "Composite", + className: "ContentItemGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentItemCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ContentItem_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ContentItemCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentItem_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ContentItemCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DeletedServicesPurgeHeaders: coreClient.CompositeMapper = { - serializedName: "DeletedServices_purgeHeaders", - type: { - name: "Composite", - className: "DeletedServicesPurgeHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "DeletedServices_purgeHeaders", + type: { + name: "Composite", + className: "DeletedServicesPurgeHeaders", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceRestoreHeaders: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_restoreHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceRestoreHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "ApiManagementService_restoreHeaders", + type: { + name: "Composite", + className: "ApiManagementServiceRestoreHeaders", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceBackupHeaders: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_backupHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceBackupHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "ApiManagementService_backupHeaders", + type: { + name: "Composite", + className: "ApiManagementServiceBackupHeaders", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceMigrateToStv2Headers: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_migrateToStv2Headers", - type: { - name: "Composite", - className: "ApiManagementServiceMigrateToStv2Headers", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "ApiManagementService_migrateToStv2Headers", + type: { + name: "Composite", + className: "ApiManagementServiceMigrateToStv2Headers", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders: coreClient.CompositeMapper = { - serializedName: - "ApiManagementService_applyNetworkConfigurationUpdatesHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: + "ApiManagementService_applyNetworkConfigurationUpdatesHeaders", + type: { + name: "Composite", + className: "ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const DiagnosticGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_getEntityTagHeaders", - type: { - name: "Composite", - className: "DiagnosticGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Diagnostic_getEntityTagHeaders", + type: { + name: "Composite", + className: "DiagnosticGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DiagnosticGetHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_getHeaders", - type: { - name: "Composite", - className: "DiagnosticGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Diagnostic_getHeaders", + type: { + name: "Composite", + className: "DiagnosticGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DiagnosticCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_createOrUpdateHeaders", - type: { - name: "Composite", - className: "DiagnosticCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Diagnostic_createOrUpdateHeaders", + type: { + name: "Composite", + className: "DiagnosticCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DiagnosticUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_updateHeaders", - type: { - name: "Composite", - className: "DiagnosticUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Diagnostic_updateHeaders", + type: { + name: "Composite", + className: "DiagnosticUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const EmailTemplateGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "EmailTemplate_getEntityTagHeaders", - type: { - name: "Composite", - className: "EmailTemplateGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "EmailTemplate_getEntityTagHeaders", + type: { + name: "Composite", + className: "EmailTemplateGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const EmailTemplateGetHeaders: coreClient.CompositeMapper = { - serializedName: "EmailTemplate_getHeaders", - type: { - name: "Composite", - className: "EmailTemplateGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "EmailTemplate_getHeaders", + type: { + name: "Composite", + className: "EmailTemplateGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const EmailTemplateUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "EmailTemplate_updateHeaders", - type: { - name: "Composite", - className: "EmailTemplateUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "EmailTemplate_updateHeaders", + type: { + name: "Composite", + className: "EmailTemplateUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_getEntityTagHeaders", + type: { + name: "Composite", + className: "GatewayGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayGetHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_getHeaders", - type: { - name: "Composite", - className: "GatewayGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_getHeaders", + type: { + name: "Composite", + className: "GatewayGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GatewayCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GatewayCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_updateHeaders", - type: { - name: "Composite", - className: "GatewayUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_updateHeaders", + type: { + name: "Composite", + className: "GatewayUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayListKeysHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_listKeysHeaders", - type: { - name: "Composite", - className: "GatewayListKeysHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_listKeysHeaders", + type: { + name: "Composite", + className: "GatewayListKeysHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayHostnameConfigurationGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfiguration_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayHostnameConfiguration_getEntityTagHeaders", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayHostnameConfigurationGetHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfiguration_getHeaders", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayHostnameConfiguration_getHeaders", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayHostnameConfigurationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfiguration_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayHostnameConfiguration_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayApiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayApi_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayApiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayApi_getEntityTagHeaders", + type: { + name: "Composite", + className: "GatewayApiGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCertificateAuthorityGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthority_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayCertificateAuthority_getEntityTagHeaders", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCertificateAuthorityGetHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthority_getHeaders", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayCertificateAuthority_getHeaders", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCertificateAuthorityCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthority_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayCertificateAuthority_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GroupGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Group_getEntityTagHeaders", - type: { - name: "Composite", - className: "GroupGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Group_getEntityTagHeaders", + type: { + name: "Composite", + className: "GroupGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GroupGetHeaders: coreClient.CompositeMapper = { - serializedName: "Group_getHeaders", - type: { - name: "Composite", - className: "GroupGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Group_getHeaders", + type: { + name: "Composite", + className: "GroupGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GroupCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Group_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GroupCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Group_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GroupCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GroupUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Group_updateHeaders", - type: { - name: "Composite", - className: "GroupUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Group_updateHeaders", + type: { + name: "Composite", + className: "GroupUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_getEntityTagHeaders", - type: { - name: "Composite", - className: "IdentityProviderGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_getEntityTagHeaders", + type: { + name: "Composite", + className: "IdentityProviderGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderGetHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_getHeaders", - type: { - name: "Composite", - className: "IdentityProviderGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_getHeaders", + type: { + name: "Composite", + className: "IdentityProviderGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_createOrUpdateHeaders", - type: { - name: "Composite", - className: "IdentityProviderCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_createOrUpdateHeaders", + type: { + name: "Composite", + className: "IdentityProviderCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_updateHeaders", - type: { - name: "Composite", - className: "IdentityProviderUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_updateHeaders", + type: { + name: "Composite", + className: "IdentityProviderUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_listSecretsHeaders", - type: { - name: "Composite", - className: "IdentityProviderListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_listSecretsHeaders", + type: { + name: "Composite", + className: "IdentityProviderListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IssueGetHeaders: coreClient.CompositeMapper = { - serializedName: "Issue_getHeaders", - type: { - name: "Composite", - className: "IssueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Issue_getHeaders", + type: { + name: "Composite", + className: "IssueGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const LoggerGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_getEntityTagHeaders", - type: { - name: "Composite", - className: "LoggerGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Logger_getEntityTagHeaders", + type: { + name: "Composite", + className: "LoggerGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const LoggerGetHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_getHeaders", - type: { - name: "Composite", - className: "LoggerGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Logger_getHeaders", + type: { + name: "Composite", + className: "LoggerGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const LoggerCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_createOrUpdateHeaders", - type: { - name: "Composite", - className: "LoggerCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Logger_createOrUpdateHeaders", + type: { + name: "Composite", + className: "LoggerCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const LoggerUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_updateHeaders", - type: { - name: "Composite", - className: "LoggerUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Logger_updateHeaders", + type: { + name: "Composite", + className: "LoggerUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_getEntityTagHeaders", - type: { - name: "Composite", - className: "NamedValueGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_getEntityTagHeaders", + type: { + name: "Composite", + className: "NamedValueGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueGetHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_getHeaders", - type: { - name: "Composite", - className: "NamedValueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_getHeaders", + type: { + name: "Composite", + className: "NamedValueGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_createOrUpdateHeaders", - type: { - name: "Composite", - className: "NamedValueCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_createOrUpdateHeaders", + type: { + name: "Composite", + className: "NamedValueCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_updateHeaders", - type: { - name: "Composite", - className: "NamedValueUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_updateHeaders", + type: { + name: "Composite", + className: "NamedValueUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueListValueHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_listValueHeaders", - type: { - name: "Composite", - className: "NamedValueListValueHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_listValueHeaders", + type: { + name: "Composite", + className: "NamedValueListValueHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueRefreshSecretHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_refreshSecretHeaders", - type: { - name: "Composite", - className: "NamedValueRefreshSecretHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_refreshSecretHeaders", + type: { + name: "Composite", + className: "NamedValueRefreshSecretHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_getEntityTagHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_getEntityTagHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderGetHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_getHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_getHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_createOrUpdateHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_createOrUpdateHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_updateHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_updateHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_listSecretsHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_listSecretsHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Policy_getEntityTagHeaders", - type: { - name: "Composite", - className: "PolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Policy_getEntityTagHeaders", + type: { + name: "Composite", + className: "PolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "Policy_getHeaders", - type: { - name: "Composite", - className: "PolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Policy_getHeaders", + type: { + name: "Composite", + className: "PolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Policy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Policy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "PolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyFragmentGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyFragment_getEntityTagHeaders", - type: { - name: "Composite", - className: "PolicyFragmentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PolicyFragment_getEntityTagHeaders", + type: { + name: "Composite", + className: "PolicyFragmentGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyFragmentGetHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyFragment_getHeaders", - type: { - name: "Composite", - className: "PolicyFragmentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PolicyFragment_getHeaders", + type: { + name: "Composite", + className: "PolicyFragmentGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyFragmentCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyFragment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PolicyFragmentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PolicyFragment_createOrUpdateHeaders", + type: { + name: "Composite", + className: "PolicyFragmentCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalConfigGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "PortalConfig_getEntityTagHeaders", - type: { - name: "Composite", - className: "PortalConfigGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalConfig_getEntityTagHeaders", + type: { + name: "Composite", + className: "PortalConfigGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalConfigGetHeaders: coreClient.CompositeMapper = { - serializedName: "PortalConfig_getHeaders", - type: { - name: "Composite", - className: "PortalConfigGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalConfig_getHeaders", + type: { + name: "Composite", + className: "PortalConfigGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalRevisionGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_getEntityTagHeaders", - type: { - name: "Composite", - className: "PortalRevisionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalRevision_getEntityTagHeaders", + type: { + name: "Composite", + className: "PortalRevisionGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalRevisionGetHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_getHeaders", - type: { - name: "Composite", - className: "PortalRevisionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalRevision_getHeaders", + type: { + name: "Composite", + className: "PortalRevisionGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalRevisionCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PortalRevisionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalRevision_createOrUpdateHeaders", + type: { + name: "Composite", + className: "PortalRevisionCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalRevisionUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_updateHeaders", - type: { - name: "Composite", - className: "PortalRevisionUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalRevision_updateHeaders", + type: { + name: "Composite", + className: "PortalRevisionUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SignInSettingsGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "SignInSettings_getEntityTagHeaders", - type: { - name: "Composite", - className: "SignInSettingsGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "SignInSettings_getEntityTagHeaders", + type: { + name: "Composite", + className: "SignInSettingsGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SignInSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "SignInSettings_getHeaders", - type: { - name: "Composite", - className: "SignInSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "SignInSettings_getHeaders", + type: { + name: "Composite", + className: "SignInSettingsGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SignUpSettingsGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "SignUpSettings_getEntityTagHeaders", - type: { - name: "Composite", - className: "SignUpSettingsGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "SignUpSettings_getEntityTagHeaders", + type: { + name: "Composite", + className: "SignUpSettingsGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SignUpSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "SignUpSettings_getHeaders", - type: { - name: "Composite", - className: "SignUpSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "SignUpSettings_getHeaders", + type: { + name: "Composite", + className: "SignUpSettingsGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DelegationSettingsGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "DelegationSettings_getEntityTagHeaders", - type: { - name: "Composite", - className: "DelegationSettingsGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "DelegationSettings_getEntityTagHeaders", + type: { + name: "Composite", + className: "DelegationSettingsGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DelegationSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "DelegationSettings_getHeaders", - type: { - name: "Composite", - className: "DelegationSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "DelegationSettings_getHeaders", + type: { + name: "Composite", + className: "DelegationSettingsGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Product_getEntityTagHeaders", - type: { - name: "Composite", - className: "ProductGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Product_getEntityTagHeaders", + type: { + name: "Composite", + className: "ProductGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductGetHeaders: coreClient.CompositeMapper = { - serializedName: "Product_getHeaders", - type: { - name: "Composite", - className: "ProductGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Product_getHeaders", + type: { + name: "Composite", + className: "ProductGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Product_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ProductCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Product_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ProductCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Product_updateHeaders", - type: { - name: "Composite", - className: "ProductUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Product_updateHeaders", + type: { + name: "Composite", + className: "ProductUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ProductPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "ProductPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductPolicy_getEntityTagHeaders", + type: { + name: "Composite", + className: "ProductPolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "ProductPolicy_getHeaders", - type: { - name: "Composite", - className: "ProductPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductPolicy_getHeaders", + type: { + name: "Composite", + className: "ProductPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ProductPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ProductPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ProductPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_getEntityTagHeaders", - type: { - name: "Composite", - className: "ProductWikiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWiki_getEntityTagHeaders", + type: { + name: "Composite", + className: "ProductWikiGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikiGetHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_getHeaders", - type: { - name: "Composite", - className: "ProductWikiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWiki_getHeaders", + type: { + name: "Composite", + className: "ProductWikiGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ProductWikiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWiki_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ProductWikiCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_updateHeaders", - type: { - name: "Composite", - className: "ProductWikiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWiki_updateHeaders", + type: { + name: "Composite", + className: "ProductWikiUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikisListHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWikis_listHeaders", - type: { - name: "Composite", - className: "ProductWikisListHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWikis_listHeaders", + type: { + name: "Composite", + className: "ProductWikisListHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikisListNextHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWikis_listNextHeaders", - type: { - name: "Composite", - className: "ProductWikisListNextHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWikis_listNextHeaders", + type: { + name: "Composite", + className: "ProductWikisListNextHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GlobalSchemaGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GlobalSchema_getEntityTagHeaders", - type: { - name: "Composite", - className: "GlobalSchemaGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GlobalSchema_getEntityTagHeaders", + type: { + name: "Composite", + className: "GlobalSchemaGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GlobalSchemaGetHeaders: coreClient.CompositeMapper = { - serializedName: "GlobalSchema_getHeaders", - type: { - name: "Composite", - className: "GlobalSchemaGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GlobalSchema_getHeaders", + type: { + name: "Composite", + className: "GlobalSchemaGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GlobalSchemaCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GlobalSchema_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GlobalSchemaCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GlobalSchema_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GlobalSchemaCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "TenantSettings_getHeaders", - type: { - name: "Composite", - className: "TenantSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantSettings_getHeaders", + type: { + name: "Composite", + className: "TenantSettingsGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_getEntityTagHeaders", - type: { - name: "Composite", - className: "SubscriptionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_getEntityTagHeaders", + type: { + name: "Composite", + className: "SubscriptionGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_getHeaders", - type: { - name: "Composite", - className: "SubscriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_getHeaders", + type: { + name: "Composite", + className: "SubscriptionGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_createOrUpdateHeaders", - type: { - name: "Composite", - className: "SubscriptionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_createOrUpdateHeaders", + type: { + name: "Composite", + className: "SubscriptionCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_updateHeaders", - type: { - name: "Composite", - className: "SubscriptionUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_updateHeaders", + type: { + name: "Composite", + className: "SubscriptionUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_listSecretsHeaders", - type: { - name: "Composite", - className: "SubscriptionListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_listSecretsHeaders", + type: { + name: "Composite", + className: "SubscriptionListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_getEntityTagHeaders", - type: { - name: "Composite", - className: "TenantAccessGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_getEntityTagHeaders", + type: { + name: "Composite", + className: "TenantAccessGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessGetHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_getHeaders", - type: { - name: "Composite", - className: "TenantAccessGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_getHeaders", + type: { + name: "Composite", + className: "TenantAccessGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessCreateHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_createHeaders", - type: { - name: "Composite", - className: "TenantAccessCreateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_createHeaders", + type: { + name: "Composite", + className: "TenantAccessCreateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_updateHeaders", - type: { - name: "Composite", - className: "TenantAccessUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_updateHeaders", + type: { + name: "Composite", + className: "TenantAccessUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_listSecretsHeaders", - type: { - name: "Composite", - className: "TenantAccessListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_listSecretsHeaders", + type: { + name: "Composite", + className: "TenantAccessListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "User_getEntityTagHeaders", - type: { - name: "Composite", - className: "UserGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "User_getEntityTagHeaders", + type: { + name: "Composite", + className: "UserGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserGetHeaders: coreClient.CompositeMapper = { - serializedName: "User_getHeaders", - type: { - name: "Composite", - className: "UserGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "User_getHeaders", + type: { + name: "Composite", + className: "UserGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "User_createOrUpdateHeaders", - type: { - name: "Composite", - className: "UserCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "User_createOrUpdateHeaders", + type: { + name: "Composite", + className: "UserCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "User_updateHeaders", - type: { - name: "Composite", - className: "UserUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "User_updateHeaders", + type: { + name: "Composite", + className: "UserUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserSubscriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "UserSubscription_getHeaders", - type: { - name: "Composite", - className: "UserSubscriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "UserSubscription_getHeaders", + type: { + name: "Composite", + className: "UserSubscriptionGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_getEntityTagHeaders", - type: { - name: "Composite", - className: "DocumentationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Documentation_getEntityTagHeaders", + type: { + name: "Composite", + className: "DocumentationGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationGetHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_getHeaders", - type: { - name: "Composite", - className: "DocumentationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Documentation_getHeaders", + type: { + name: "Composite", + className: "DocumentationGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_createOrUpdateHeaders", - type: { - name: "Composite", - className: "DocumentationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Documentation_createOrUpdateHeaders", + type: { + name: "Composite", + className: "DocumentationCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_updateHeaders", - type: { - name: "Composite", - className: "DocumentationUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" - } - } - } - } + serializedName: "Documentation_updateHeaders", + type: { + name: "Composite", + className: "DocumentationUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } + } + } }; diff --git a/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts b/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts index 5fbad6e2b16b..ef0cb782a6f1 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts @@ -7,1670 +7,1670 @@ */ import { - OperationParameter, - OperationURLParameter, - OperationQueryParameter + OperationParameter, + OperationQueryParameter, + OperationURLParameter } from "@azure/core-client"; import { - ApiCreateOrUpdateParameter as ApiCreateOrUpdateParameterMapper, - ApiUpdateContract as ApiUpdateContractMapper, - ApiReleaseContract as ApiReleaseContractMapper, - OperationContract as OperationContractMapper, - OperationUpdateContract as OperationUpdateContractMapper, - PolicyContract as PolicyContractMapper, - TagCreateUpdateParameters as TagCreateUpdateParametersMapper, - ResolverContract as ResolverContractMapper, - ResolverUpdateContract as ResolverUpdateContractMapper, - SchemaContract as SchemaContractMapper, - DiagnosticContract as DiagnosticContractMapper, - IssueContract as IssueContractMapper, - IssueUpdateContract as IssueUpdateContractMapper, - IssueCommentContract as IssueCommentContractMapper, - IssueAttachmentContract as IssueAttachmentContractMapper, - TagDescriptionCreateParameters as TagDescriptionCreateParametersMapper, - WikiContract as WikiContractMapper, - WikiUpdateContract as WikiUpdateContractMapper, - ApiVersionSetContract as ApiVersionSetContractMapper, - ApiVersionSetUpdateParameters as ApiVersionSetUpdateParametersMapper, - AuthorizationServerContract as AuthorizationServerContractMapper, - AuthorizationServerUpdateContract as AuthorizationServerUpdateContractMapper, - AuthorizationProviderContract as AuthorizationProviderContractMapper, - AuthorizationContract as AuthorizationContractMapper, - AuthorizationConfirmConsentCodeRequestContract as AuthorizationConfirmConsentCodeRequestContractMapper, - AuthorizationLoginRequestContract as AuthorizationLoginRequestContractMapper, - AuthorizationAccessPolicyContract as AuthorizationAccessPolicyContractMapper, - BackendContract as BackendContractMapper, - BackendUpdateParameters as BackendUpdateParametersMapper, - BackendReconnectContract as BackendReconnectContractMapper, - CacheContract as CacheContractMapper, - CacheUpdateParameters as CacheUpdateParametersMapper, - CertificateCreateOrUpdateParameters as CertificateCreateOrUpdateParametersMapper, - ConnectivityCheckRequest as ConnectivityCheckRequestMapper, - ContentTypeContract as ContentTypeContractMapper, - ContentItemContract as ContentItemContractMapper, - ApiManagementServiceBackupRestoreParameters as ApiManagementServiceBackupRestoreParametersMapper, - ApiManagementServiceResource as ApiManagementServiceResourceMapper, - ApiManagementServiceUpdateParameters as ApiManagementServiceUpdateParametersMapper, - ApiManagementServiceCheckNameAvailabilityParameters as ApiManagementServiceCheckNameAvailabilityParametersMapper, - ApiManagementServiceApplyNetworkConfigurationParameters as ApiManagementServiceApplyNetworkConfigurationParametersMapper, - EmailTemplateUpdateParameters as EmailTemplateUpdateParametersMapper, - GatewayContract as GatewayContractMapper, - GatewayKeyRegenerationRequestContract as GatewayKeyRegenerationRequestContractMapper, - GatewayTokenRequestContract as GatewayTokenRequestContractMapper, - GatewayHostnameConfigurationContract as GatewayHostnameConfigurationContractMapper, - AssociationContract as AssociationContractMapper, - GatewayCertificateAuthorityContract as GatewayCertificateAuthorityContractMapper, - GroupCreateParameters as GroupCreateParametersMapper, - GroupUpdateParameters as GroupUpdateParametersMapper, - IdentityProviderCreateContract as IdentityProviderCreateContractMapper, - IdentityProviderUpdateParameters as IdentityProviderUpdateParametersMapper, - LoggerContract as LoggerContractMapper, - LoggerUpdateContract as LoggerUpdateContractMapper, - NamedValueCreateContract as NamedValueCreateContractMapper, - NamedValueUpdateParameters as NamedValueUpdateParametersMapper, - OpenidConnectProviderContract as OpenidConnectProviderContractMapper, - OpenidConnectProviderUpdateContract as OpenidConnectProviderUpdateContractMapper, - PolicyFragmentContract as PolicyFragmentContractMapper, - PortalConfigContract as PortalConfigContractMapper, - PortalRevisionContract as PortalRevisionContractMapper, - PortalSigninSettings as PortalSigninSettingsMapper, - PortalSignupSettings as PortalSignupSettingsMapper, - PortalDelegationSettings as PortalDelegationSettingsMapper, - PrivateEndpointConnectionRequest as PrivateEndpointConnectionRequestMapper, - ProductContract as ProductContractMapper, - ProductUpdateParameters as ProductUpdateParametersMapper, - QuotaCounterValueUpdateContract as QuotaCounterValueUpdateContractMapper, - GlobalSchemaContract as GlobalSchemaContractMapper, - SubscriptionCreateParameters as SubscriptionCreateParametersMapper, - SubscriptionUpdateParameters as SubscriptionUpdateParametersMapper, - AccessInformationCreateParameters as AccessInformationCreateParametersMapper, - AccessInformationUpdateParameters as AccessInformationUpdateParametersMapper, - DeployConfigurationParameters as DeployConfigurationParametersMapper, - SaveConfigurationParameter as SaveConfigurationParameterMapper, - UserCreateParameters as UserCreateParametersMapper, - UserUpdateParameters as UserUpdateParametersMapper, - UserTokenParameters as UserTokenParametersMapper, - DocumentationContract as DocumentationContractMapper, - DocumentationUpdateContract as DocumentationUpdateContractMapper -} from "../models/mappers"; + AccessInformationCreateParameters as AccessInformationCreateParametersMapper, + AccessInformationUpdateParameters as AccessInformationUpdateParametersMapper, + ApiCreateOrUpdateParameter as ApiCreateOrUpdateParameterMapper, + ApiManagementServiceApplyNetworkConfigurationParameters as ApiManagementServiceApplyNetworkConfigurationParametersMapper, + ApiManagementServiceBackupRestoreParameters as ApiManagementServiceBackupRestoreParametersMapper, + ApiManagementServiceCheckNameAvailabilityParameters as ApiManagementServiceCheckNameAvailabilityParametersMapper, + ApiManagementServiceResource as ApiManagementServiceResourceMapper, + ApiManagementServiceUpdateParameters as ApiManagementServiceUpdateParametersMapper, + ApiReleaseContract as ApiReleaseContractMapper, + ApiUpdateContract as ApiUpdateContractMapper, + ApiVersionSetContract as ApiVersionSetContractMapper, + ApiVersionSetUpdateParameters as ApiVersionSetUpdateParametersMapper, + AssociationContract as AssociationContractMapper, + AuthorizationAccessPolicyContract as AuthorizationAccessPolicyContractMapper, + AuthorizationConfirmConsentCodeRequestContract as AuthorizationConfirmConsentCodeRequestContractMapper, + AuthorizationContract as AuthorizationContractMapper, + AuthorizationLoginRequestContract as AuthorizationLoginRequestContractMapper, + AuthorizationProviderContract as AuthorizationProviderContractMapper, + AuthorizationServerContract as AuthorizationServerContractMapper, + AuthorizationServerUpdateContract as AuthorizationServerUpdateContractMapper, + BackendContract as BackendContractMapper, + BackendReconnectContract as BackendReconnectContractMapper, + BackendUpdateParameters as BackendUpdateParametersMapper, + CacheContract as CacheContractMapper, + CacheUpdateParameters as CacheUpdateParametersMapper, + CertificateCreateOrUpdateParameters as CertificateCreateOrUpdateParametersMapper, + ConnectivityCheckRequest as ConnectivityCheckRequestMapper, + ContentItemContract as ContentItemContractMapper, + ContentTypeContract as ContentTypeContractMapper, + DeployConfigurationParameters as DeployConfigurationParametersMapper, + DiagnosticContract as DiagnosticContractMapper, + DocumentationContract as DocumentationContractMapper, + DocumentationUpdateContract as DocumentationUpdateContractMapper, + EmailTemplateUpdateParameters as EmailTemplateUpdateParametersMapper, + GatewayCertificateAuthorityContract as GatewayCertificateAuthorityContractMapper, + GatewayContract as GatewayContractMapper, + GatewayHostnameConfigurationContract as GatewayHostnameConfigurationContractMapper, + GatewayKeyRegenerationRequestContract as GatewayKeyRegenerationRequestContractMapper, + GatewayTokenRequestContract as GatewayTokenRequestContractMapper, + GlobalSchemaContract as GlobalSchemaContractMapper, + GroupCreateParameters as GroupCreateParametersMapper, + GroupUpdateParameters as GroupUpdateParametersMapper, + IdentityProviderCreateContract as IdentityProviderCreateContractMapper, + IdentityProviderUpdateParameters as IdentityProviderUpdateParametersMapper, + IssueAttachmentContract as IssueAttachmentContractMapper, + IssueCommentContract as IssueCommentContractMapper, + IssueContract as IssueContractMapper, + IssueUpdateContract as IssueUpdateContractMapper, + LoggerContract as LoggerContractMapper, + LoggerUpdateContract as LoggerUpdateContractMapper, + NamedValueCreateContract as NamedValueCreateContractMapper, + NamedValueUpdateParameters as NamedValueUpdateParametersMapper, + OpenidConnectProviderContract as OpenidConnectProviderContractMapper, + OpenidConnectProviderUpdateContract as OpenidConnectProviderUpdateContractMapper, + OperationContract as OperationContractMapper, + OperationUpdateContract as OperationUpdateContractMapper, + PolicyContract as PolicyContractMapper, + PolicyFragmentContract as PolicyFragmentContractMapper, + PortalConfigContract as PortalConfigContractMapper, + PortalDelegationSettings as PortalDelegationSettingsMapper, + PortalRevisionContract as PortalRevisionContractMapper, + PortalSigninSettings as PortalSigninSettingsMapper, + PortalSignupSettings as PortalSignupSettingsMapper, + PrivateEndpointConnectionRequest as PrivateEndpointConnectionRequestMapper, + ProductContract as ProductContractMapper, + ProductUpdateParameters as ProductUpdateParametersMapper, + QuotaCounterValueUpdateContract as QuotaCounterValueUpdateContractMapper, + ResolverContract as ResolverContractMapper, + ResolverUpdateContract as ResolverUpdateContractMapper, + SaveConfigurationParameter as SaveConfigurationParameterMapper, + SchemaContract as SchemaContractMapper, + SubscriptionCreateParameters as SubscriptionCreateParametersMapper, + SubscriptionUpdateParameters as SubscriptionUpdateParametersMapper, + TagCreateUpdateParameters as TagCreateUpdateParametersMapper, + TagDescriptionCreateParameters as TagDescriptionCreateParametersMapper, + UserCreateParameters as UserCreateParametersMapper, + UserTokenParameters as UserTokenParametersMapper, + UserUpdateParameters as UserUpdateParametersMapper, + WikiContract as WikiContractMapper, + WikiUpdateContract as WikiUpdateContractMapper +} from "../models/mappers.js"; export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String" + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } } - } }; export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - xmlName: "$host", - type: { - name: "String" - } - }, - skipEncoding: true + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + xmlName: "$host", + type: { + name: "String" + } + }, + skipEncoding: true }; export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1 - }, - serializedName: "resourceGroupName", - required: true, - xmlName: "resourceGroupName", - type: { - name: "String" + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + xmlName: "resourceGroupName", + type: { + name: "String" + } } - } }; export const serviceName: OperationURLParameter = { - parameterPath: "serviceName", - mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"), - MaxLength: 50, - MinLength: 1 - }, - serializedName: "serviceName", - required: true, - xmlName: "serviceName", - type: { - name: "String" + parameterPath: "serviceName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"), + MaxLength: 50, + MinLength: 1 + }, + serializedName: "serviceName", + required: true, + xmlName: "serviceName", + type: { + name: "String" + } } - } }; export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], - mapper: { - serializedName: "$filter", - xmlName: "$filter", - type: { - name: "String" + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + xmlName: "$filter", + type: { + name: "String" + } } - } }; export const top: OperationQueryParameter = { - parameterPath: ["options", "top"], - mapper: { - constraints: { - InclusiveMinimum: 1 - }, - serializedName: "$top", - xmlName: "$top", - type: { - name: "Number" + parameterPath: ["options", "top"], + mapper: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "$top", + xmlName: "$top", + type: { + name: "Number" + } } - } }; export const skip: OperationQueryParameter = { - parameterPath: ["options", "skip"], - mapper: { - constraints: { - InclusiveMinimum: 0 - }, - serializedName: "$skip", - xmlName: "$skip", - type: { - name: "Number" + parameterPath: ["options", "skip"], + mapper: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "$skip", + xmlName: "$skip", + type: { + name: "Number" + } } - } }; export const tags: OperationQueryParameter = { - parameterPath: ["options", "tags"], - mapper: { - serializedName: "tags", - xmlName: "tags", - type: { - name: "String" + parameterPath: ["options", "tags"], + mapper: { + serializedName: "tags", + xmlName: "tags", + type: { + name: "String" + } } - } }; export const expandApiVersionSet: OperationQueryParameter = { - parameterPath: ["options", "expandApiVersionSet"], - mapper: { - serializedName: "expandApiVersionSet", - xmlName: "expandApiVersionSet", - type: { - name: "Boolean" + parameterPath: ["options", "expandApiVersionSet"], + mapper: { + serializedName: "expandApiVersionSet", + xmlName: "expandApiVersionSet", + type: { + name: "Boolean" + } } - } }; export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2022-08-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-08-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } } - } }; export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "subscriptionId", - required: true, - xmlName: "subscriptionId", - type: { - name: "String" + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + xmlName: "subscriptionId", + type: { + name: "String" + } } - } }; export const apiId: OperationURLParameter = { - parameterPath: "apiId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "apiId", - required: true, - xmlName: "apiId", - type: { - name: "String" + parameterPath: "apiId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "apiId", + required: true, + xmlName: "apiId", + type: { + name: "String" + } } - } }; export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } } - } }; export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: ApiCreateOrUpdateParameterMapper + parameterPath: "parameters", + mapper: ApiCreateOrUpdateParameterMapper }; export const ifMatch: OperationParameter = { - parameterPath: ["options", "ifMatch"], - mapper: { - serializedName: "If-Match", - xmlName: "If-Match", - type: { - name: "String" + parameterPath: ["options", "ifMatch"], + mapper: { + serializedName: "If-Match", + xmlName: "If-Match", + type: { + name: "String" + } } - } }; export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: ApiUpdateContractMapper + parameterPath: "parameters", + mapper: ApiUpdateContractMapper }; export const ifMatch1: OperationParameter = { - parameterPath: "ifMatch", - mapper: { - serializedName: "If-Match", - required: true, - xmlName: "If-Match", - type: { - name: "String" + parameterPath: "ifMatch", + mapper: { + serializedName: "If-Match", + required: true, + xmlName: "If-Match", + type: { + name: "String" + } } - } }; export const deleteRevisions: OperationQueryParameter = { - parameterPath: ["options", "deleteRevisions"], - mapper: { - serializedName: "deleteRevisions", - xmlName: "deleteRevisions", - type: { - name: "Boolean" + parameterPath: ["options", "deleteRevisions"], + mapper: { + serializedName: "deleteRevisions", + xmlName: "deleteRevisions", + type: { + name: "Boolean" + } } - } }; export const includeNotTaggedApis: OperationQueryParameter = { - parameterPath: ["options", "includeNotTaggedApis"], - mapper: { - serializedName: "includeNotTaggedApis", - xmlName: "includeNotTaggedApis", - type: { - name: "Boolean" + parameterPath: ["options", "includeNotTaggedApis"], + mapper: { + serializedName: "includeNotTaggedApis", + xmlName: "includeNotTaggedApis", + type: { + name: "Boolean" + } } - } }; export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - xmlName: "nextLink", - type: { - name: "String" - } - }, - skipEncoding: true + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + xmlName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true }; export const apiId1: OperationURLParameter = { - parameterPath: "apiId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "apiId", - required: true, - xmlName: "apiId", - type: { - name: "String" + parameterPath: "apiId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "apiId", + required: true, + xmlName: "apiId", + type: { + name: "String" + } } - } }; export const releaseId: OperationURLParameter = { - parameterPath: "releaseId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "releaseId", - required: true, - xmlName: "releaseId", - type: { - name: "String" + parameterPath: "releaseId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "releaseId", + required: true, + xmlName: "releaseId", + type: { + name: "String" + } } - } }; export const parameters2: OperationParameter = { - parameterPath: "parameters", - mapper: ApiReleaseContractMapper + parameterPath: "parameters", + mapper: ApiReleaseContractMapper }; export const operationId: OperationURLParameter = { - parameterPath: "operationId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "operationId", - required: true, - xmlName: "operationId", - type: { - name: "String" + parameterPath: "operationId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "operationId", + required: true, + xmlName: "operationId", + type: { + name: "String" + } } - } }; export const parameters3: OperationParameter = { - parameterPath: "parameters", - mapper: OperationContractMapper + parameterPath: "parameters", + mapper: OperationContractMapper }; export const parameters4: OperationParameter = { - parameterPath: "parameters", - mapper: OperationUpdateContractMapper + parameterPath: "parameters", + mapper: OperationUpdateContractMapper }; export const policyId: OperationURLParameter = { - parameterPath: "policyId", - mapper: { - serializedName: "policyId", - required: true, - xmlName: "policyId", - type: { - name: "String" + parameterPath: "policyId", + mapper: { + serializedName: "policyId", + required: true, + xmlName: "policyId", + type: { + name: "String" + } } - } }; export const format: OperationQueryParameter = { - parameterPath: ["options", "format"], - mapper: { - defaultValue: "xml", - serializedName: "format", - xmlName: "format", - type: { - name: "String" + parameterPath: ["options", "format"], + mapper: { + defaultValue: "xml", + serializedName: "format", + xmlName: "format", + type: { + name: "String" + } } - } }; export const parameters5: OperationParameter = { - parameterPath: "parameters", - mapper: PolicyContractMapper + parameterPath: "parameters", + mapper: PolicyContractMapper }; export const tagId: OperationURLParameter = { - parameterPath: "tagId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "tagId", - required: true, - xmlName: "tagId", - type: { - name: "String" + parameterPath: "tagId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "tagId", + required: true, + xmlName: "tagId", + type: { + name: "String" + } } - } }; export const productId: OperationURLParameter = { - parameterPath: "productId", - mapper: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "productId", - required: true, - xmlName: "productId", - type: { - name: "String" + parameterPath: "productId", + mapper: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "productId", + required: true, + xmlName: "productId", + type: { + name: "String" + } } - } }; export const scope: OperationQueryParameter = { - parameterPath: ["options", "scope"], - mapper: { - serializedName: "scope", - xmlName: "scope", - type: { - name: "String" + parameterPath: ["options", "scope"], + mapper: { + serializedName: "scope", + xmlName: "scope", + type: { + name: "String" + } } - } }; export const parameters6: OperationParameter = { - parameterPath: "parameters", - mapper: TagCreateUpdateParametersMapper + parameterPath: "parameters", + mapper: TagCreateUpdateParametersMapper }; export const resolverId: OperationURLParameter = { - parameterPath: "resolverId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "resolverId", - required: true, - xmlName: "resolverId", - type: { - name: "String" + parameterPath: "resolverId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "resolverId", + required: true, + xmlName: "resolverId", + type: { + name: "String" + } } - } }; export const parameters7: OperationParameter = { - parameterPath: "parameters", - mapper: ResolverContractMapper + parameterPath: "parameters", + mapper: ResolverContractMapper }; export const parameters8: OperationParameter = { - parameterPath: "parameters", - mapper: ResolverUpdateContractMapper + parameterPath: "parameters", + mapper: ResolverUpdateContractMapper }; export const accept1: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: - "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml", - isConstant: true, - serializedName: "Accept", - type: { - name: "String" + parameterPath: "accept", + mapper: { + defaultValue: + "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } } - } }; export const schemaId: OperationURLParameter = { - parameterPath: "schemaId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "schemaId", - required: true, - xmlName: "schemaId", - type: { - name: "String" + parameterPath: "schemaId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "schemaId", + required: true, + xmlName: "schemaId", + type: { + name: "String" + } } - } }; export const parameters9: OperationParameter = { - parameterPath: "parameters", - mapper: SchemaContractMapper + parameterPath: "parameters", + mapper: SchemaContractMapper }; export const force: OperationQueryParameter = { - parameterPath: ["options", "force"], - mapper: { - serializedName: "force", - xmlName: "force", - type: { - name: "Boolean" + parameterPath: ["options", "force"], + mapper: { + serializedName: "force", + xmlName: "force", + type: { + name: "Boolean" + } } - } }; export const diagnosticId: OperationURLParameter = { - parameterPath: "diagnosticId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "diagnosticId", - required: true, - xmlName: "diagnosticId", - type: { - name: "String" + parameterPath: "diagnosticId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "diagnosticId", + required: true, + xmlName: "diagnosticId", + type: { + name: "String" + } } - } }; export const parameters10: OperationParameter = { - parameterPath: "parameters", - mapper: DiagnosticContractMapper + parameterPath: "parameters", + mapper: DiagnosticContractMapper }; export const expandCommentsAttachments: OperationQueryParameter = { - parameterPath: ["options", "expandCommentsAttachments"], - mapper: { - serializedName: "expandCommentsAttachments", - xmlName: "expandCommentsAttachments", - type: { - name: "Boolean" + parameterPath: ["options", "expandCommentsAttachments"], + mapper: { + serializedName: "expandCommentsAttachments", + xmlName: "expandCommentsAttachments", + type: { + name: "Boolean" + } } - } }; export const issueId: OperationURLParameter = { - parameterPath: "issueId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "issueId", - required: true, - xmlName: "issueId", - type: { - name: "String" + parameterPath: "issueId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "issueId", + required: true, + xmlName: "issueId", + type: { + name: "String" + } } - } }; export const parameters11: OperationParameter = { - parameterPath: "parameters", - mapper: IssueContractMapper + parameterPath: "parameters", + mapper: IssueContractMapper }; export const parameters12: OperationParameter = { - parameterPath: "parameters", - mapper: IssueUpdateContractMapper + parameterPath: "parameters", + mapper: IssueUpdateContractMapper }; export const commentId: OperationURLParameter = { - parameterPath: "commentId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "commentId", - required: true, - xmlName: "commentId", - type: { - name: "String" + parameterPath: "commentId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "commentId", + required: true, + xmlName: "commentId", + type: { + name: "String" + } } - } }; export const parameters13: OperationParameter = { - parameterPath: "parameters", - mapper: IssueCommentContractMapper + parameterPath: "parameters", + mapper: IssueCommentContractMapper }; export const attachmentId: OperationURLParameter = { - parameterPath: "attachmentId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "attachmentId", - required: true, - xmlName: "attachmentId", - type: { - name: "String" + parameterPath: "attachmentId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "attachmentId", + required: true, + xmlName: "attachmentId", + type: { + name: "String" + } } - } }; export const parameters14: OperationParameter = { - parameterPath: "parameters", - mapper: IssueAttachmentContractMapper + parameterPath: "parameters", + mapper: IssueAttachmentContractMapper }; export const tagDescriptionId: OperationURLParameter = { - parameterPath: "tagDescriptionId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "tagDescriptionId", - required: true, - xmlName: "tagDescriptionId", - type: { - name: "String" + parameterPath: "tagDescriptionId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "tagDescriptionId", + required: true, + xmlName: "tagDescriptionId", + type: { + name: "String" + } } - } }; export const parameters15: OperationParameter = { - parameterPath: "parameters", - mapper: TagDescriptionCreateParametersMapper + parameterPath: "parameters", + mapper: TagDescriptionCreateParametersMapper }; export const includeNotTaggedOperations: OperationQueryParameter = { - parameterPath: ["options", "includeNotTaggedOperations"], - mapper: { - serializedName: "includeNotTaggedOperations", - xmlName: "includeNotTaggedOperations", - type: { - name: "Boolean" + parameterPath: ["options", "includeNotTaggedOperations"], + mapper: { + serializedName: "includeNotTaggedOperations", + xmlName: "includeNotTaggedOperations", + type: { + name: "Boolean" + } } - } }; export const parameters16: OperationParameter = { - parameterPath: "parameters", - mapper: WikiContractMapper + parameterPath: "parameters", + mapper: WikiContractMapper }; export const parameters17: OperationParameter = { - parameterPath: "parameters", - mapper: WikiUpdateContractMapper + parameterPath: "parameters", + mapper: WikiUpdateContractMapper }; export const format1: OperationQueryParameter = { - parameterPath: "format", - mapper: { - serializedName: "format", - required: true, - xmlName: "format", - type: { - name: "String" + parameterPath: "format", + mapper: { + serializedName: "format", + required: true, + xmlName: "format", + type: { + name: "String" + } } - } }; export const exportParam: OperationQueryParameter = { - parameterPath: "exportParam", - mapper: { - serializedName: "export", - required: true, - xmlName: "export", - type: { - name: "String" + parameterPath: "exportParam", + mapper: { + serializedName: "export", + required: true, + xmlName: "export", + type: { + name: "String" + } } - } }; export const versionSetId: OperationURLParameter = { - parameterPath: "versionSetId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "versionSetId", - required: true, - xmlName: "versionSetId", - type: { - name: "String" + parameterPath: "versionSetId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "versionSetId", + required: true, + xmlName: "versionSetId", + type: { + name: "String" + } } - } }; export const parameters18: OperationParameter = { - parameterPath: "parameters", - mapper: ApiVersionSetContractMapper + parameterPath: "parameters", + mapper: ApiVersionSetContractMapper }; export const parameters19: OperationParameter = { - parameterPath: "parameters", - mapper: ApiVersionSetUpdateParametersMapper + parameterPath: "parameters", + mapper: ApiVersionSetUpdateParametersMapper }; export const authsid: OperationURLParameter = { - parameterPath: "authsid", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "authsid", - required: true, - xmlName: "authsid", - type: { - name: "String" + parameterPath: "authsid", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "authsid", + required: true, + xmlName: "authsid", + type: { + name: "String" + } } - } }; export const parameters20: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationServerContractMapper + parameterPath: "parameters", + mapper: AuthorizationServerContractMapper }; export const parameters21: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationServerUpdateContractMapper + parameterPath: "parameters", + mapper: AuthorizationServerUpdateContractMapper }; export const authorizationProviderId: OperationURLParameter = { - parameterPath: "authorizationProviderId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "authorizationProviderId", - required: true, - xmlName: "authorizationProviderId", - type: { - name: "String" + parameterPath: "authorizationProviderId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "authorizationProviderId", + required: true, + xmlName: "authorizationProviderId", + type: { + name: "String" + } } - } }; export const parameters22: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationProviderContractMapper + parameterPath: "parameters", + mapper: AuthorizationProviderContractMapper }; export const authorizationId: OperationURLParameter = { - parameterPath: "authorizationId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "authorizationId", - required: true, - xmlName: "authorizationId", - type: { - name: "String" + parameterPath: "authorizationId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "authorizationId", + required: true, + xmlName: "authorizationId", + type: { + name: "String" + } } - } }; export const parameters23: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationContractMapper + parameterPath: "parameters", + mapper: AuthorizationContractMapper }; export const parameters24: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationConfirmConsentCodeRequestContractMapper + parameterPath: "parameters", + mapper: AuthorizationConfirmConsentCodeRequestContractMapper }; export const parameters25: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationLoginRequestContractMapper + parameterPath: "parameters", + mapper: AuthorizationLoginRequestContractMapper }; export const authorizationAccessPolicyId: OperationURLParameter = { - parameterPath: "authorizationAccessPolicyId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "authorizationAccessPolicyId", - required: true, - xmlName: "authorizationAccessPolicyId", - type: { - name: "String" + parameterPath: "authorizationAccessPolicyId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "authorizationAccessPolicyId", + required: true, + xmlName: "authorizationAccessPolicyId", + type: { + name: "String" + } } - } }; export const parameters26: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationAccessPolicyContractMapper + parameterPath: "parameters", + mapper: AuthorizationAccessPolicyContractMapper }; export const backendId: OperationURLParameter = { - parameterPath: "backendId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "backendId", - required: true, - xmlName: "backendId", - type: { - name: "String" + parameterPath: "backendId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "backendId", + required: true, + xmlName: "backendId", + type: { + name: "String" + } } - } }; export const parameters27: OperationParameter = { - parameterPath: "parameters", - mapper: BackendContractMapper + parameterPath: "parameters", + mapper: BackendContractMapper }; export const parameters28: OperationParameter = { - parameterPath: "parameters", - mapper: BackendUpdateParametersMapper + parameterPath: "parameters", + mapper: BackendUpdateParametersMapper }; export const parameters29: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: BackendReconnectContractMapper + parameterPath: ["options", "parameters"], + mapper: BackendReconnectContractMapper }; export const cacheId: OperationURLParameter = { - parameterPath: "cacheId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "cacheId", - required: true, - xmlName: "cacheId", - type: { - name: "String" + parameterPath: "cacheId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "cacheId", + required: true, + xmlName: "cacheId", + type: { + name: "String" + } } - } }; export const parameters30: OperationParameter = { - parameterPath: "parameters", - mapper: CacheContractMapper + parameterPath: "parameters", + mapper: CacheContractMapper }; export const parameters31: OperationParameter = { - parameterPath: "parameters", - mapper: CacheUpdateParametersMapper + parameterPath: "parameters", + mapper: CacheUpdateParametersMapper }; export const isKeyVaultRefreshFailed: OperationQueryParameter = { - parameterPath: ["options", "isKeyVaultRefreshFailed"], - mapper: { - serializedName: "isKeyVaultRefreshFailed", - xmlName: "isKeyVaultRefreshFailed", - type: { - name: "Boolean" + parameterPath: ["options", "isKeyVaultRefreshFailed"], + mapper: { + serializedName: "isKeyVaultRefreshFailed", + xmlName: "isKeyVaultRefreshFailed", + type: { + name: "Boolean" + } } - } }; export const certificateId: OperationURLParameter = { - parameterPath: "certificateId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "certificateId", - required: true, - xmlName: "certificateId", - type: { - name: "String" + parameterPath: "certificateId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "certificateId", + required: true, + xmlName: "certificateId", + type: { + name: "String" + } } - } }; export const parameters32: OperationParameter = { - parameterPath: "parameters", - mapper: CertificateCreateOrUpdateParametersMapper + parameterPath: "parameters", + mapper: CertificateCreateOrUpdateParametersMapper }; export const connectivityCheckRequestParams: OperationParameter = { - parameterPath: "connectivityCheckRequestParams", - mapper: ConnectivityCheckRequestMapper + parameterPath: "connectivityCheckRequestParams", + mapper: ConnectivityCheckRequestMapper }; export const contentTypeId: OperationURLParameter = { - parameterPath: "contentTypeId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "contentTypeId", - required: true, - xmlName: "contentTypeId", - type: { - name: "String" + parameterPath: "contentTypeId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "contentTypeId", + required: true, + xmlName: "contentTypeId", + type: { + name: "String" + } } - } }; export const parameters33: OperationParameter = { - parameterPath: "parameters", - mapper: ContentTypeContractMapper + parameterPath: "parameters", + mapper: ContentTypeContractMapper }; export const contentItemId: OperationURLParameter = { - parameterPath: "contentItemId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "contentItemId", - required: true, - xmlName: "contentItemId", - type: { - name: "String" + parameterPath: "contentItemId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "contentItemId", + required: true, + xmlName: "contentItemId", + type: { + name: "String" + } } - } }; export const parameters34: OperationParameter = { - parameterPath: "parameters", - mapper: ContentItemContractMapper + parameterPath: "parameters", + mapper: ContentItemContractMapper }; export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String" + parameterPath: "location", + mapper: { + serializedName: "location", + required: true, + xmlName: "location", + type: { + name: "String" + } } - } }; export const parameters35: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceBackupRestoreParametersMapper + parameterPath: "parameters", + mapper: ApiManagementServiceBackupRestoreParametersMapper }; export const parameters36: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceResourceMapper + parameterPath: "parameters", + mapper: ApiManagementServiceResourceMapper }; export const parameters37: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceUpdateParametersMapper + parameterPath: "parameters", + mapper: ApiManagementServiceUpdateParametersMapper }; export const parameters38: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceCheckNameAvailabilityParametersMapper + parameterPath: "parameters", + mapper: ApiManagementServiceCheckNameAvailabilityParametersMapper }; export const parameters39: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: ApiManagementServiceApplyNetworkConfigurationParametersMapper + parameterPath: ["options", "parameters"], + mapper: ApiManagementServiceApplyNetworkConfigurationParametersMapper }; export const templateName: OperationURLParameter = { - parameterPath: "templateName", - mapper: { - serializedName: "templateName", - required: true, - xmlName: "templateName", - type: { - name: "String" + parameterPath: "templateName", + mapper: { + serializedName: "templateName", + required: true, + xmlName: "templateName", + type: { + name: "String" + } } - } }; export const parameters40: OperationParameter = { - parameterPath: "parameters", - mapper: EmailTemplateUpdateParametersMapper + parameterPath: "parameters", + mapper: EmailTemplateUpdateParametersMapper }; export const gatewayId: OperationURLParameter = { - parameterPath: "gatewayId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "gatewayId", - required: true, - xmlName: "gatewayId", - type: { - name: "String" + parameterPath: "gatewayId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "gatewayId", + required: true, + xmlName: "gatewayId", + type: { + name: "String" + } } - } }; export const parameters41: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayContractMapper + parameterPath: "parameters", + mapper: GatewayContractMapper }; export const parameters42: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayKeyRegenerationRequestContractMapper + parameterPath: "parameters", + mapper: GatewayKeyRegenerationRequestContractMapper }; export const parameters43: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayTokenRequestContractMapper + parameterPath: "parameters", + mapper: GatewayTokenRequestContractMapper }; export const hcId: OperationURLParameter = { - parameterPath: "hcId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "hcId", - required: true, - xmlName: "hcId", - type: { - name: "String" + parameterPath: "hcId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "hcId", + required: true, + xmlName: "hcId", + type: { + name: "String" + } } - } }; export const parameters44: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayHostnameConfigurationContractMapper + parameterPath: "parameters", + mapper: GatewayHostnameConfigurationContractMapper }; export const parameters45: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: AssociationContractMapper + parameterPath: ["options", "parameters"], + mapper: AssociationContractMapper }; export const parameters46: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayCertificateAuthorityContractMapper + parameterPath: "parameters", + mapper: GatewayCertificateAuthorityContractMapper }; export const groupId: OperationURLParameter = { - parameterPath: "groupId", - mapper: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "groupId", - required: true, - xmlName: "groupId", - type: { - name: "String" + parameterPath: "groupId", + mapper: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "groupId", + required: true, + xmlName: "groupId", + type: { + name: "String" + } } - } }; export const parameters47: OperationParameter = { - parameterPath: "parameters", - mapper: GroupCreateParametersMapper + parameterPath: "parameters", + mapper: GroupCreateParametersMapper }; export const parameters48: OperationParameter = { - parameterPath: "parameters", - mapper: GroupUpdateParametersMapper + parameterPath: "parameters", + mapper: GroupUpdateParametersMapper }; export const userId: OperationURLParameter = { - parameterPath: "userId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "userId", - required: true, - xmlName: "userId", - type: { - name: "String" + parameterPath: "userId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "userId", + required: true, + xmlName: "userId", + type: { + name: "String" + } } - } }; export const identityProviderName: OperationURLParameter = { - parameterPath: "identityProviderName", - mapper: { - serializedName: "identityProviderName", - required: true, - xmlName: "identityProviderName", - type: { - name: "String" + parameterPath: "identityProviderName", + mapper: { + serializedName: "identityProviderName", + required: true, + xmlName: "identityProviderName", + type: { + name: "String" + } } - } }; export const parameters49: OperationParameter = { - parameterPath: "parameters", - mapper: IdentityProviderCreateContractMapper + parameterPath: "parameters", + mapper: IdentityProviderCreateContractMapper }; export const parameters50: OperationParameter = { - parameterPath: "parameters", - mapper: IdentityProviderUpdateParametersMapper + parameterPath: "parameters", + mapper: IdentityProviderUpdateParametersMapper }; export const loggerId: OperationURLParameter = { - parameterPath: "loggerId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256 - }, - serializedName: "loggerId", - required: true, - xmlName: "loggerId", - type: { - name: "String" + parameterPath: "loggerId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256 + }, + serializedName: "loggerId", + required: true, + xmlName: "loggerId", + type: { + name: "String" + } } - } }; export const parameters51: OperationParameter = { - parameterPath: "parameters", - mapper: LoggerContractMapper + parameterPath: "parameters", + mapper: LoggerContractMapper }; export const parameters52: OperationParameter = { - parameterPath: "parameters", - mapper: LoggerUpdateContractMapper + parameterPath: "parameters", + mapper: LoggerUpdateContractMapper }; export const namedValueId: OperationURLParameter = { - parameterPath: "namedValueId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256 - }, - serializedName: "namedValueId", - required: true, - xmlName: "namedValueId", - type: { - name: "String" + parameterPath: "namedValueId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256 + }, + serializedName: "namedValueId", + required: true, + xmlName: "namedValueId", + type: { + name: "String" + } } - } }; export const parameters53: OperationParameter = { - parameterPath: "parameters", - mapper: NamedValueCreateContractMapper + parameterPath: "parameters", + mapper: NamedValueCreateContractMapper }; export const parameters54: OperationParameter = { - parameterPath: "parameters", - mapper: NamedValueUpdateParametersMapper + parameterPath: "parameters", + mapper: NamedValueUpdateParametersMapper }; export const locationName: OperationURLParameter = { - parameterPath: "locationName", - mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "locationName", - required: true, - xmlName: "locationName", - type: { - name: "String" + parameterPath: "locationName", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "locationName", + required: true, + xmlName: "locationName", + type: { + name: "String" + } } - } }; export const notificationName: OperationURLParameter = { - parameterPath: "notificationName", - mapper: { - serializedName: "notificationName", - required: true, - xmlName: "notificationName", - type: { - name: "String" + parameterPath: "notificationName", + mapper: { + serializedName: "notificationName", + required: true, + xmlName: "notificationName", + type: { + name: "String" + } } - } }; export const email: OperationURLParameter = { - parameterPath: "email", - mapper: { - serializedName: "email", - required: true, - xmlName: "email", - type: { - name: "String" + parameterPath: "email", + mapper: { + serializedName: "email", + required: true, + xmlName: "email", + type: { + name: "String" + } } - } }; export const opid: OperationURLParameter = { - parameterPath: "opid", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256 - }, - serializedName: "opid", - required: true, - xmlName: "opid", - type: { - name: "String" + parameterPath: "opid", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256 + }, + serializedName: "opid", + required: true, + xmlName: "opid", + type: { + name: "String" + } } - } }; export const parameters55: OperationParameter = { - parameterPath: "parameters", - mapper: OpenidConnectProviderContractMapper + parameterPath: "parameters", + mapper: OpenidConnectProviderContractMapper }; export const parameters56: OperationParameter = { - parameterPath: "parameters", - mapper: OpenidConnectProviderUpdateContractMapper + parameterPath: "parameters", + mapper: OpenidConnectProviderUpdateContractMapper }; export const scope1: OperationQueryParameter = { - parameterPath: ["options", "scope"], - mapper: { - serializedName: "scope", - xmlName: "scope", - type: { - name: "Enum", - allowedValues: ["Tenant", "Product", "Api", "Operation", "All"] + parameterPath: ["options", "scope"], + mapper: { + serializedName: "scope", + xmlName: "scope", + type: { + name: "Enum", + allowedValues: ["Tenant", "Product", "Api", "Operation", "All"] + } } - } }; export const orderby: OperationQueryParameter = { - parameterPath: ["options", "orderby"], - mapper: { - serializedName: "$orderby", - xmlName: "$orderby", - type: { - name: "String" + parameterPath: ["options", "orderby"], + mapper: { + serializedName: "$orderby", + xmlName: "$orderby", + type: { + name: "String" + } } - } }; export const id: OperationURLParameter = { - parameterPath: "id", - mapper: { - constraints: { - Pattern: new RegExp("(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "id", - required: true, - xmlName: "id", - type: { - name: "String" + parameterPath: "id", + mapper: { + constraints: { + Pattern: new RegExp("(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "id", + required: true, + xmlName: "id", + type: { + name: "String" + } } - } }; export const format2: OperationQueryParameter = { - parameterPath: ["options", "format"], - mapper: { - serializedName: "format", - xmlName: "format", - type: { - name: "String" + parameterPath: ["options", "format"], + mapper: { + serializedName: "format", + xmlName: "format", + type: { + name: "String" + } } - } }; export const parameters57: OperationParameter = { - parameterPath: "parameters", - mapper: PolicyFragmentContractMapper + parameterPath: "parameters", + mapper: PolicyFragmentContractMapper }; export const portalConfigId: OperationURLParameter = { - parameterPath: "portalConfigId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "portalConfigId", - required: true, - xmlName: "portalConfigId", - type: { - name: "String" + parameterPath: "portalConfigId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "portalConfigId", + required: true, + xmlName: "portalConfigId", + type: { + name: "String" + } } - } }; export const parameters58: OperationParameter = { - parameterPath: "parameters", - mapper: PortalConfigContractMapper + parameterPath: "parameters", + mapper: PortalConfigContractMapper }; export const portalRevisionId: OperationURLParameter = { - parameterPath: "portalRevisionId", - mapper: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "portalRevisionId", - required: true, - xmlName: "portalRevisionId", - type: { - name: "String" + parameterPath: "portalRevisionId", + mapper: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "portalRevisionId", + required: true, + xmlName: "portalRevisionId", + type: { + name: "String" + } } - } }; export const parameters59: OperationParameter = { - parameterPath: "parameters", - mapper: PortalRevisionContractMapper + parameterPath: "parameters", + mapper: PortalRevisionContractMapper }; export const parameters60: OperationParameter = { - parameterPath: "parameters", - mapper: PortalSigninSettingsMapper + parameterPath: "parameters", + mapper: PortalSigninSettingsMapper }; export const parameters61: OperationParameter = { - parameterPath: "parameters", - mapper: PortalSignupSettingsMapper + parameterPath: "parameters", + mapper: PortalSignupSettingsMapper }; export const parameters62: OperationParameter = { - parameterPath: "parameters", - mapper: PortalDelegationSettingsMapper + parameterPath: "parameters", + mapper: PortalDelegationSettingsMapper }; export const privateEndpointConnectionName: OperationURLParameter = { - parameterPath: "privateEndpointConnectionName", - mapper: { - serializedName: "privateEndpointConnectionName", - required: true, - xmlName: "privateEndpointConnectionName", - type: { - name: "String" + parameterPath: "privateEndpointConnectionName", + mapper: { + serializedName: "privateEndpointConnectionName", + required: true, + xmlName: "privateEndpointConnectionName", + type: { + name: "String" + } } - } }; export const privateEndpointConnectionRequest: OperationParameter = { - parameterPath: "privateEndpointConnectionRequest", - mapper: PrivateEndpointConnectionRequestMapper + parameterPath: "privateEndpointConnectionRequest", + mapper: PrivateEndpointConnectionRequestMapper }; export const privateLinkSubResourceName: OperationURLParameter = { - parameterPath: "privateLinkSubResourceName", - mapper: { - serializedName: "privateLinkSubResourceName", - required: true, - xmlName: "privateLinkSubResourceName", - type: { - name: "String" + parameterPath: "privateLinkSubResourceName", + mapper: { + serializedName: "privateLinkSubResourceName", + required: true, + xmlName: "privateLinkSubResourceName", + type: { + name: "String" + } } - } }; export const expandGroups: OperationQueryParameter = { - parameterPath: ["options", "expandGroups"], - mapper: { - serializedName: "expandGroups", - xmlName: "expandGroups", - type: { - name: "Boolean" + parameterPath: ["options", "expandGroups"], + mapper: { + serializedName: "expandGroups", + xmlName: "expandGroups", + type: { + name: "Boolean" + } } - } }; export const parameters63: OperationParameter = { - parameterPath: "parameters", - mapper: ProductContractMapper + parameterPath: "parameters", + mapper: ProductContractMapper }; export const parameters64: OperationParameter = { - parameterPath: "parameters", - mapper: ProductUpdateParametersMapper + parameterPath: "parameters", + mapper: ProductUpdateParametersMapper }; export const deleteSubscriptions: OperationQueryParameter = { - parameterPath: ["options", "deleteSubscriptions"], - mapper: { - serializedName: "deleteSubscriptions", - xmlName: "deleteSubscriptions", - type: { - name: "Boolean" + parameterPath: ["options", "deleteSubscriptions"], + mapper: { + serializedName: "deleteSubscriptions", + xmlName: "deleteSubscriptions", + type: { + name: "Boolean" + } } - } }; export const includeNotTaggedProducts: OperationQueryParameter = { - parameterPath: ["options", "includeNotTaggedProducts"], - mapper: { - serializedName: "includeNotTaggedProducts", - xmlName: "includeNotTaggedProducts", - type: { - name: "Boolean" + parameterPath: ["options", "includeNotTaggedProducts"], + mapper: { + serializedName: "includeNotTaggedProducts", + xmlName: "includeNotTaggedProducts", + type: { + name: "Boolean" + } } - } }; export const quotaCounterKey: OperationURLParameter = { - parameterPath: "quotaCounterKey", - mapper: { - serializedName: "quotaCounterKey", - required: true, - xmlName: "quotaCounterKey", - type: { - name: "String" + parameterPath: "quotaCounterKey", + mapper: { + serializedName: "quotaCounterKey", + required: true, + xmlName: "quotaCounterKey", + type: { + name: "String" + } } - } }; export const parameters65: OperationParameter = { - parameterPath: "parameters", - mapper: QuotaCounterValueUpdateContractMapper + parameterPath: "parameters", + mapper: QuotaCounterValueUpdateContractMapper }; export const quotaPeriodKey: OperationURLParameter = { - parameterPath: "quotaPeriodKey", - mapper: { - serializedName: "quotaPeriodKey", - required: true, - xmlName: "quotaPeriodKey", - type: { - name: "String" + parameterPath: "quotaPeriodKey", + mapper: { + serializedName: "quotaPeriodKey", + required: true, + xmlName: "quotaPeriodKey", + type: { + name: "String" + } } - } }; export const filter1: OperationQueryParameter = { - parameterPath: "filter", - mapper: { - serializedName: "$filter", - required: true, - xmlName: "$filter", - type: { - name: "String" + parameterPath: "filter", + mapper: { + serializedName: "$filter", + required: true, + xmlName: "$filter", + type: { + name: "String" + } } - } }; export const interval: OperationQueryParameter = { - parameterPath: "interval", - mapper: { - serializedName: "interval", - required: true, - xmlName: "interval", - type: { - name: "TimeSpan" + parameterPath: "interval", + mapper: { + serializedName: "interval", + required: true, + xmlName: "interval", + type: { + name: "TimeSpan" + } } - } }; export const parameters66: OperationParameter = { - parameterPath: "parameters", - mapper: GlobalSchemaContractMapper + parameterPath: "parameters", + mapper: GlobalSchemaContractMapper }; export const settingsType: OperationURLParameter = { - parameterPath: "settingsType", - mapper: { - serializedName: "settingsType", - required: true, - xmlName: "settingsType", - type: { - name: "String" + parameterPath: "settingsType", + mapper: { + serializedName: "settingsType", + required: true, + xmlName: "settingsType", + type: { + name: "String" + } } - } }; export const sid: OperationURLParameter = { - parameterPath: "sid", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256 - }, - serializedName: "sid", - required: true, - xmlName: "sid", - type: { - name: "String" + parameterPath: "sid", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256 + }, + serializedName: "sid", + required: true, + xmlName: "sid", + type: { + name: "String" + } } - } }; export const parameters67: OperationParameter = { - parameterPath: "parameters", - mapper: SubscriptionCreateParametersMapper + parameterPath: "parameters", + mapper: SubscriptionCreateParametersMapper }; export const notify: OperationQueryParameter = { - parameterPath: ["options", "notify"], - mapper: { - serializedName: "notify", - xmlName: "notify", - type: { - name: "Boolean" + parameterPath: ["options", "notify"], + mapper: { + serializedName: "notify", + xmlName: "notify", + type: { + name: "Boolean" + } } - } }; export const appType: OperationQueryParameter = { - parameterPath: ["options", "appType"], - mapper: { - serializedName: "appType", - xmlName: "appType", - type: { - name: "String" + parameterPath: ["options", "appType"], + mapper: { + serializedName: "appType", + xmlName: "appType", + type: { + name: "String" + } } - } }; export const parameters68: OperationParameter = { - parameterPath: "parameters", - mapper: SubscriptionUpdateParametersMapper + parameterPath: "parameters", + mapper: SubscriptionUpdateParametersMapper }; export const accessName: OperationURLParameter = { - parameterPath: "accessName", - mapper: { - serializedName: "accessName", - required: true, - xmlName: "accessName", - type: { - name: "String" + parameterPath: "accessName", + mapper: { + serializedName: "accessName", + required: true, + xmlName: "accessName", + type: { + name: "String" + } } - } }; export const parameters69: OperationParameter = { - parameterPath: "parameters", - mapper: AccessInformationCreateParametersMapper + parameterPath: "parameters", + mapper: AccessInformationCreateParametersMapper }; export const parameters70: OperationParameter = { - parameterPath: "parameters", - mapper: AccessInformationUpdateParametersMapper + parameterPath: "parameters", + mapper: AccessInformationUpdateParametersMapper }; export const parameters71: OperationParameter = { - parameterPath: "parameters", - mapper: DeployConfigurationParametersMapper + parameterPath: "parameters", + mapper: DeployConfigurationParametersMapper }; export const configurationName: OperationURLParameter = { - parameterPath: "configurationName", - mapper: { - serializedName: "configurationName", - required: true, - xmlName: "configurationName", - type: { - name: "String" + parameterPath: "configurationName", + mapper: { + serializedName: "configurationName", + required: true, + xmlName: "configurationName", + type: { + name: "String" + } } - } }; export const parameters72: OperationParameter = { - parameterPath: "parameters", - mapper: SaveConfigurationParameterMapper + parameterPath: "parameters", + mapper: SaveConfigurationParameterMapper }; export const parameters73: OperationParameter = { - parameterPath: "parameters", - mapper: UserCreateParametersMapper + parameterPath: "parameters", + mapper: UserCreateParametersMapper }; export const parameters74: OperationParameter = { - parameterPath: "parameters", - mapper: UserUpdateParametersMapper + parameterPath: "parameters", + mapper: UserUpdateParametersMapper }; export const parameters75: OperationParameter = { - parameterPath: "parameters", - mapper: UserTokenParametersMapper + parameterPath: "parameters", + mapper: UserTokenParametersMapper }; export const documentationId: OperationURLParameter = { - parameterPath: "documentationId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "documentationId", - required: true, - xmlName: "documentationId", - type: { - name: "String" + parameterPath: "documentationId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "documentationId", + required: true, + xmlName: "documentationId", + type: { + name: "String" + } } - } }; export const parameters76: OperationParameter = { - parameterPath: "parameters", - mapper: DocumentationContractMapper + parameterPath: "parameters", + mapper: DocumentationContractMapper }; export const parameters77: OperationParameter = { - parameterPath: "parameters", - mapper: DocumentationUpdateContractMapper + parameterPath: "parameters", + mapper: DocumentationUpdateContractMapper }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/api.ts b/sdk/apimanagement/arm-apimanagement/src/operations/api.ts index c1635689c9a8..2330d1933bdc 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/api.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/api.ts @@ -6,723 +6,723 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Api } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - ApiContract, - ApiListByServiceNextOptionalParams, - ApiListByServiceOptionalParams, - ApiListByServiceResponse, - TagResourceContract, - ApiListByTagsNextOptionalParams, - ApiListByTagsOptionalParams, - ApiListByTagsResponse, - ApiGetEntityTagOptionalParams, - ApiGetEntityTagResponse, - ApiGetOptionalParams, - ApiGetResponse, - ApiCreateOrUpdateParameter, - ApiCreateOrUpdateOptionalParams, - ApiCreateOrUpdateResponse, - ApiUpdateContract, - ApiUpdateOptionalParams, - ApiUpdateResponse, - ApiDeleteOptionalParams, - ApiListByServiceNextResponse, - ApiListByTagsNextResponse -} from "../models"; + ApiContract, + ApiCreateOrUpdateOptionalParams, + ApiCreateOrUpdateParameter, + ApiCreateOrUpdateResponse, + ApiDeleteOptionalParams, + ApiGetEntityTagOptionalParams, + ApiGetEntityTagResponse, + ApiGetOptionalParams, + ApiGetResponse, + ApiListByServiceNextOptionalParams, + ApiListByServiceNextResponse, + ApiListByServiceOptionalParams, + ApiListByServiceResponse, + ApiListByTagsNextOptionalParams, + ApiListByTagsNextResponse, + ApiListByTagsOptionalParams, + ApiListByTagsResponse, + ApiUpdateContract, + ApiUpdateOptionalParams, + ApiUpdateResponse, + TagResourceContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Api } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Api operations. */ export class ApiImpl implements Api { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Api class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Api class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all APIs of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all APIs of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists a collection of apis associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByTags( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByTagsPagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; } - return this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options, - settings - ); - } - }; - } + } - private async *listByTagsPagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiListByTagsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTags(resourceGroupName, serviceName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists a collection of apis associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByTags( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTagsPagingAll( + resourceGroupName, + serviceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByTagsPagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByTagsNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByTagsPagingPage( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiListByTagsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTags(resourceGroupName, serviceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTagsNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByTagsPagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByTagsPagingAll( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTagsPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all APIs of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all APIs of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + getOperationSpec + ); + } - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Creates new or updates existing specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, apiId, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - ApiCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, apiId, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApiCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates new or updates existing specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + apiId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Updates the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Update Contract parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: ApiUpdateContract, - options?: ApiUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Update Contract parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options?: ApiUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Lists a collection of apis associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByTags( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByTagsOperationSpec - ); - } + /** + * Lists a collection of apis associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByTags( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByTagsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ApiListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } - /** - * ListByTagsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByTags method. - * @param options The options parameters. - */ - private _listByTagsNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiListByTagsNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByTagsNextOperationSpec - ); - } + /** + * ListByTagsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByTags method. + * @param options The options parameters. + */ + private _listByTagsNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ApiListByTagsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByTagsNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.expandApiVersionSet, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.tags, + Parameters.expandApiVersionSet, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.deleteRevisions], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.deleteRevisions], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByTagsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.includeNotTaggedApis - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.includeNotTaggedApis + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByTagsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts index 7f8a30b7977e..40fcc6dc3719 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts @@ -6,499 +6,499 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiDiagnostic } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - DiagnosticContract, - ApiDiagnosticListByServiceNextOptionalParams, - ApiDiagnosticListByServiceOptionalParams, - ApiDiagnosticListByServiceResponse, - ApiDiagnosticGetEntityTagOptionalParams, - ApiDiagnosticGetEntityTagResponse, - ApiDiagnosticGetOptionalParams, - ApiDiagnosticGetResponse, - ApiDiagnosticCreateOrUpdateOptionalParams, - ApiDiagnosticCreateOrUpdateResponse, - ApiDiagnosticUpdateOptionalParams, - ApiDiagnosticUpdateResponse, - ApiDiagnosticDeleteOptionalParams, - ApiDiagnosticListByServiceNextResponse -} from "../models"; + ApiDiagnosticCreateOrUpdateOptionalParams, + ApiDiagnosticCreateOrUpdateResponse, + ApiDiagnosticDeleteOptionalParams, + ApiDiagnosticGetEntityTagOptionalParams, + ApiDiagnosticGetEntityTagResponse, + ApiDiagnosticGetOptionalParams, + ApiDiagnosticGetResponse, + ApiDiagnosticListByServiceNextOptionalParams, + ApiDiagnosticListByServiceNextResponse, + ApiDiagnosticListByServiceOptionalParams, + ApiDiagnosticListByServiceResponse, + ApiDiagnosticUpdateOptionalParams, + ApiDiagnosticUpdateResponse, + DiagnosticContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiDiagnostic } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiDiagnostic operations. */ export class ApiDiagnosticImpl implements ApiDiagnostic { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiDiagnostic class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiDiagnostic class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all diagnostics of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiDiagnosticListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiDiagnosticListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all diagnostics of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, diagnosticId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, diagnosticId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, diagnosticId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, diagnosticId, options }, + getOperationSpec + ); + } - /** - * Creates a new Diagnostic for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Diagnostic for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + diagnosticId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Diagnostic Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Diagnostic from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - options?: ApiDiagnosticDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Diagnostic from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options?: ApiDiagnosticDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiDiagnosticListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiDiagnosticListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiDiagnosticGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiDiagnosticGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.ApiDiagnosticGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.ApiDiagnosticUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts index c87591913545..675a86c5e2f1 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts @@ -6,83 +6,83 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ApiExport } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ExportFormat, - ExportApi, - ApiExportGetOptionalParams, - ApiExportGetResponse -} from "../models"; + ApiExportGetOptionalParams, + ApiExportGetResponse, + ExportApi, + ExportFormat +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiExport } from "../operationsInterfaces/index.js"; /** Class containing ApiExport operations. */ export class ApiExportImpl implements ApiExport { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiExport class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiExport class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob - * with SAS Key valid for 5 minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 - * minutes. - * @param exportParam Query parameter required to export the API details. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - format: ExportFormat, - exportParam: ExportApi, - options?: ApiExportGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, format, exportParam, options }, - getOperationSpec - ); - } + /** + * Gets the details of the API specified by its identifier in the format specified to the Storage Blob + * with SAS Key valid for 5 minutes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 + * minutes. + * @param exportParam Query parameter required to export the API details. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options?: ApiExportGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, format, exportParam, options }, + getOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiExportResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiExportResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.format1, - Parameters.exportParam - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.apiVersion, + Parameters.format1, + Parameters.exportParam + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts index 527cad10dd31..d2f374389bc7 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts @@ -6,492 +6,492 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiIssue } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IssueContract, - ApiIssueListByServiceNextOptionalParams, - ApiIssueListByServiceOptionalParams, - ApiIssueListByServiceResponse, - ApiIssueGetEntityTagOptionalParams, - ApiIssueGetEntityTagResponse, - ApiIssueGetOptionalParams, - ApiIssueGetResponse, - ApiIssueCreateOrUpdateOptionalParams, - ApiIssueCreateOrUpdateResponse, - IssueUpdateContract, - ApiIssueUpdateOptionalParams, - ApiIssueUpdateResponse, - ApiIssueDeleteOptionalParams, - ApiIssueListByServiceNextResponse -} from "../models"; + ApiIssueCreateOrUpdateOptionalParams, + ApiIssueCreateOrUpdateResponse, + ApiIssueDeleteOptionalParams, + ApiIssueGetEntityTagOptionalParams, + ApiIssueGetEntityTagResponse, + ApiIssueGetOptionalParams, + ApiIssueGetResponse, + ApiIssueListByServiceNextOptionalParams, + ApiIssueListByServiceNextResponse, + ApiIssueListByServiceOptionalParams, + ApiIssueListByServiceResponse, + ApiIssueUpdateOptionalParams, + ApiIssueUpdateResponse, + IssueContract, + IssueUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiIssue } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiIssue operations. */ export class ApiIssueImpl implements ApiIssue { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiIssue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiIssue class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all issues associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all issues associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiIssueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiIssueListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all issues associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all issues associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Issue for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, options }, + getOperationSpec + ); + } - /** - * Creates a new Issue for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - parameters: IssueContract, - options?: ApiIssueCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Issue for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + parameters: IssueContract, + options?: ApiIssueCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates an existing issue for an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - parameters: IssueUpdateContract, - options?: ApiIssueUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing issue for an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + parameters: IssueUpdateContract, + options?: ApiIssueUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Issue from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - options?: ApiIssueDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Issue from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + options?: ApiIssueDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiIssueListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiIssueListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.expandCommentsAttachments - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.expandCommentsAttachments + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiIssueGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiIssueGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.ApiIssueGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.expandCommentsAttachments - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.apiVersion, + Parameters.expandCommentsAttachments + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters11, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.ApiIssueUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters12, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts index b4e477407b59..40c723a37fa2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts @@ -6,463 +6,463 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiIssueAttachment } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IssueAttachmentContract, - ApiIssueAttachmentListByServiceNextOptionalParams, - ApiIssueAttachmentListByServiceOptionalParams, - ApiIssueAttachmentListByServiceResponse, - ApiIssueAttachmentGetEntityTagOptionalParams, - ApiIssueAttachmentGetEntityTagResponse, - ApiIssueAttachmentGetOptionalParams, - ApiIssueAttachmentGetResponse, - ApiIssueAttachmentCreateOrUpdateOptionalParams, - ApiIssueAttachmentCreateOrUpdateResponse, - ApiIssueAttachmentDeleteOptionalParams, - ApiIssueAttachmentListByServiceNextResponse -} from "../models"; + ApiIssueAttachmentCreateOrUpdateOptionalParams, + ApiIssueAttachmentCreateOrUpdateResponse, + ApiIssueAttachmentDeleteOptionalParams, + ApiIssueAttachmentGetEntityTagOptionalParams, + ApiIssueAttachmentGetEntityTagResponse, + ApiIssueAttachmentGetOptionalParams, + ApiIssueAttachmentGetResponse, + ApiIssueAttachmentListByServiceNextOptionalParams, + ApiIssueAttachmentListByServiceNextResponse, + ApiIssueAttachmentListByServiceOptionalParams, + ApiIssueAttachmentListByServiceResponse, + IssueAttachmentContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiIssueAttachment } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiIssueAttachment operations. */ export class ApiIssueAttachmentImpl implements ApiIssueAttachment { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiIssueAttachment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiIssueAttachment class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all attachments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - issueId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - settings + /** + * Lists all attachments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + issueId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiIssueAttachmentListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + issueId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - issueId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiIssueAttachmentListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + issueId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + issueId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + issueId, + options + )) { + yield* page; + } } - } - /** - * Lists all attachments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all attachments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the issue Attachment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, + getOperationSpec + ); + } - /** - * Creates a new Attachment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - parameters: IssueAttachmentContract, - options?: ApiIssueAttachmentCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Attachment for the Issue in an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + parameters: IssueAttachmentContract, + options?: ApiIssueAttachmentCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - ifMatch: string, - options?: ApiIssueAttachmentDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the specified comment from an Issue. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + ifMatch: string, + options?: ApiIssueAttachmentDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - nextLink: string, - options?: ApiIssueAttachmentListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + nextLink: string, + options?: ApiIssueAttachmentListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueAttachmentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiIssueAttachmentGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiIssueAttachmentGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.attachmentId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentContract, - headersMapper: Mappers.ApiIssueAttachmentGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueAttachmentContract, + headersMapper: Mappers.ApiIssueAttachmentGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.attachmentId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentContract, - headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.IssueAttachmentContract, - headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IssueAttachmentContract, + headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.IssueAttachmentContract, + headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters14, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters14, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.attachmentId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.attachmentId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueAttachmentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts index a7449a1a1e67..472cae8e911f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts @@ -6,463 +6,463 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiIssueComment } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IssueCommentContract, - ApiIssueCommentListByServiceNextOptionalParams, - ApiIssueCommentListByServiceOptionalParams, - ApiIssueCommentListByServiceResponse, - ApiIssueCommentGetEntityTagOptionalParams, - ApiIssueCommentGetEntityTagResponse, - ApiIssueCommentGetOptionalParams, - ApiIssueCommentGetResponse, - ApiIssueCommentCreateOrUpdateOptionalParams, - ApiIssueCommentCreateOrUpdateResponse, - ApiIssueCommentDeleteOptionalParams, - ApiIssueCommentListByServiceNextResponse -} from "../models"; + ApiIssueCommentCreateOrUpdateOptionalParams, + ApiIssueCommentCreateOrUpdateResponse, + ApiIssueCommentDeleteOptionalParams, + ApiIssueCommentGetEntityTagOptionalParams, + ApiIssueCommentGetEntityTagResponse, + ApiIssueCommentGetOptionalParams, + ApiIssueCommentGetResponse, + ApiIssueCommentListByServiceNextOptionalParams, + ApiIssueCommentListByServiceNextResponse, + ApiIssueCommentListByServiceOptionalParams, + ApiIssueCommentListByServiceResponse, + IssueCommentContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiIssueComment } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiIssueComment operations. */ export class ApiIssueCommentImpl implements ApiIssueComment { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiIssueComment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiIssueComment class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all comments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - issueId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - settings + /** + * Lists all comments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + issueId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiIssueCommentListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + issueId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - issueId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiIssueCommentListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + issueId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + issueId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + issueId, + options + )) { + yield* page; + } } - } - /** - * Lists all comments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all comments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, commentId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, commentId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, commentId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the issue Comment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, commentId, options }, + getOperationSpec + ); + } - /** - * Creates a new Comment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - parameters: IssueCommentContract, - options?: ApiIssueCommentCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Comment for the Issue in an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + parameters: IssueCommentContract, + options?: ApiIssueCommentCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - ifMatch: string, - options?: ApiIssueCommentDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the specified comment from an Issue. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + ifMatch: string, + options?: ApiIssueCommentDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - nextLink: string, - options?: ApiIssueCommentListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + nextLink: string, + options?: ApiIssueCommentListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCommentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiIssueCommentGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiIssueCommentGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.commentId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentContract, - headersMapper: Mappers.ApiIssueCommentGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCommentContract, + headersMapper: Mappers.ApiIssueCommentGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.commentId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentContract, - headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.IssueCommentContract, - headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IssueCommentContract, + headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.IssueCommentContract, + headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters13, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters13, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.commentId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.commentId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCommentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts index a5f8d7391fd4..f19e0970020a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts @@ -6,144 +6,144 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiManagementOperations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - Operation, - ApiManagementOperationsListNextOptionalParams, - ApiManagementOperationsListOptionalParams, - ApiManagementOperationsListResponse, - ApiManagementOperationsListNextResponse -} from "../models"; + ApiManagementOperationsListNextOptionalParams, + ApiManagementOperationsListNextResponse, + ApiManagementOperationsListOptionalParams, + ApiManagementOperationsListResponse, + Operation +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiManagementOperations } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiManagementOperations operations. */ export class ApiManagementOperationsImpl implements ApiManagementOperations { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiManagementOperations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * @param options The options parameters. - */ - public list( - options?: ApiManagementOperationsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } + /** + * Initialize a new instance of the class ApiManagementOperations class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - private async *listPagingPage( - options?: ApiManagementOperationsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementOperationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * @param options The options parameters. + */ + public list( + options?: ApiManagementOperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + options?: ApiManagementOperationsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementOperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - options?: ApiManagementOperationsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; + private async *listPagingAll( + options?: ApiManagementOperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } - } - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * @param options The options parameters. - */ - private _list( - options?: ApiManagementOperationsListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } + /** + * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * @param options The options parameters. + */ + private _list( + options?: ApiManagementOperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ApiManagementOperationsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ApiManagementOperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.ApiManagement/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult + path: "/providers/Microsoft.ApiManagement/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts index 874d5245fd79..c7cc0ede7af8 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts @@ -6,1350 +6,1350 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiManagementService } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - ApiManagementServiceResource, - ApiManagementServiceListByResourceGroupNextOptionalParams, - ApiManagementServiceListByResourceGroupOptionalParams, - ApiManagementServiceListByResourceGroupResponse, - ApiManagementServiceListNextOptionalParams, - ApiManagementServiceListOptionalParams, - ApiManagementServiceListResponse, - ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceRestoreOptionalParams, - ApiManagementServiceRestoreResponse, - ApiManagementServiceBackupOptionalParams, - ApiManagementServiceBackupResponse, - ApiManagementServiceCreateOrUpdateOptionalParams, - ApiManagementServiceCreateOrUpdateResponse, - ApiManagementServiceUpdateParameters, - ApiManagementServiceUpdateOptionalParams, - ApiManagementServiceUpdateResponse, - ApiManagementServiceGetOptionalParams, - ApiManagementServiceGetResponse, - ApiManagementServiceDeleteOptionalParams, - ApiManagementServiceMigrateToStv2OptionalParams, - ApiManagementServiceMigrateToStv2Response, - ApiManagementServiceGetSsoTokenOptionalParams, - ApiManagementServiceGetSsoTokenResponse, - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementServiceCheckNameAvailabilityOptionalParams, - ApiManagementServiceCheckNameAvailabilityResponse, - ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, - ApiManagementServiceGetDomainOwnershipIdentifierResponse, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, - ApiManagementServiceListByResourceGroupNextResponse, - ApiManagementServiceListNextResponse -} from "../models"; + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, + ApiManagementServiceBackupOptionalParams, + ApiManagementServiceBackupResponse, + ApiManagementServiceBackupRestoreParameters, + ApiManagementServiceCheckNameAvailabilityOptionalParams, + ApiManagementServiceCheckNameAvailabilityParameters, + ApiManagementServiceCheckNameAvailabilityResponse, + ApiManagementServiceCreateOrUpdateOptionalParams, + ApiManagementServiceCreateOrUpdateResponse, + ApiManagementServiceDeleteOptionalParams, + ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ApiManagementServiceGetDomainOwnershipIdentifierResponse, + ApiManagementServiceGetOptionalParams, + ApiManagementServiceGetResponse, + ApiManagementServiceGetSsoTokenOptionalParams, + ApiManagementServiceGetSsoTokenResponse, + ApiManagementServiceListByResourceGroupNextOptionalParams, + ApiManagementServiceListByResourceGroupNextResponse, + ApiManagementServiceListByResourceGroupOptionalParams, + ApiManagementServiceListByResourceGroupResponse, + ApiManagementServiceListNextOptionalParams, + ApiManagementServiceListNextResponse, + ApiManagementServiceListOptionalParams, + ApiManagementServiceListResponse, + ApiManagementServiceMigrateToStv2OptionalParams, + ApiManagementServiceMigrateToStv2Response, + ApiManagementServiceResource, + ApiManagementServiceRestoreOptionalParams, + ApiManagementServiceRestoreResponse, + ApiManagementServiceUpdateOptionalParams, + ApiManagementServiceUpdateParameters, + ApiManagementServiceUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiManagementService } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiManagementService operations. */ export class ApiManagementServiceImpl implements ApiManagementService { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiManagementService class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * List all API Management services within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } + private readonly client: ApiManagementClient; - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementServiceListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Initialize a new instance of the class ApiManagementService class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; + /** + * List all API Management services within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; } - } - /** - * Lists all API Management services within an Azure subscription. - * @param options The options parameters. - */ - public list( - options?: ApiManagementServiceListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementServiceListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: ApiManagementServiceListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementServiceListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } - } - private async *listPagingAll( - options?: ApiManagementServiceListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; + /** + * Lists all API Management services within an Azure subscription. + * @param options The options parameters. + */ + public list( + options?: ApiManagementServiceListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; } - } - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - async beginRestore( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceRestoreResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback + private async *listPagingPage( + options?: ApiManagementServiceListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementServiceListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } - }; - }; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: restoreOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceRestoreResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + private async *listPagingAll( + options?: ApiManagementServiceListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - async beginRestoreAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams - ): Promise { - const poller = await this.beginRestore( - resourceGroupName, - serviceName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Restores a backup of an API Management service created using the ApiManagementService_Backup + * operation on the current service. This is a long running operation and could take several minutes to + * complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the Restore API Management service from backup operation. + * @param options The options parameters. + */ + async beginRestore( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceRestoreResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - async beginBackup( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceBackupResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, parameters, options }, + spec: restoreOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceRestoreResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: backupOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceBackupResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + /** + * Restores a backup of an API Management service created using the ApiManagementService_Backup + * operation on the current service. This is a long running operation and could take several minutes to + * complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the Restore API Management service from backup operation. + * @param options The options parameters. + */ + async beginRestoreAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams + ): Promise { + const poller = await this.beginRestore( + resourceGroupName, + serviceName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - async beginBackupAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams - ): Promise { - const poller = await this.beginBackup( - resourceGroupName, - serviceName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates a backup of the API Management service to the given Azure Storage Account. This is long + * running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the ApiManagementService_Backup operation. + * @param options The options parameters. + */ + async beginBackup( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceBackupResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, parameters, options }, + spec: backupOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceBackupResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + /** + * Creates a backup of the API Management service to the given Azure Storage Account. This is long + * running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the ApiManagementService_Backup operation. + * @param options The options parameters. + */ + async beginBackupAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams + ): Promise { + const poller = await this.beginBackup( + resourceGroupName, + serviceName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates or updates an API Management service. This is long running operation and could take several + * minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + /** + * Creates or updates an API Management service. This is long running operation and could take several + * minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Updates an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Gets an API Management service resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec - ); - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Updates an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + return poller.pollUntilDone(); + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + /** + * Gets an API Management service resource description. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getOperationSpec + ); + } - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - serviceName, - options - ); - return poller.pollUntilDone(); - } + /** + * Deletes an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginMigrateToStv2( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceMigrateToStv2Response - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: migrateToStv2OperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceMigrateToStv2Response, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + /** + * Deletes an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + serviceName, + options + ); + return poller.pollUntilDone(); + } - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginMigrateToStv2AndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams - ): Promise { - const poller = await this.beginMigrateToStv2( - resourceGroupName, - serviceName, - options - ); - return poller.pollUntilDone(); - } + /** + * Upgrades an API Management service to the Stv2 platform. For details refer to + * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and + * could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginMigrateToStv2( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceMigrateToStv2Response + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * List all API Management services within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, options }, + spec: migrateToStv2OperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceMigrateToStv2Response, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Lists all API Management services within an Azure subscription. - * @param options The options parameters. - */ - private _list( - options?: ApiManagementServiceListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } + /** + * Upgrades an API Management service to the Stv2 platform. For details refer to + * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and + * could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginMigrateToStv2AndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams + ): Promise { + const poller = await this.beginMigrateToStv2( + resourceGroupName, + serviceName, + options + ); + return poller.pollUntilDone(); + } - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getSsoToken( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetSsoTokenOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getSsoTokenOperationSpec - ); - } + /** + * List all API Management services within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } - /** - * Checks availability and correctness of a name for an API Management service. - * @param parameters Parameters supplied to the CheckNameAvailability operation. - * @param options The options parameters. - */ - checkNameAvailability( - parameters: ApiManagementServiceCheckNameAvailabilityParameters, - options?: ApiManagementServiceCheckNameAvailabilityOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { parameters, options }, - checkNameAvailabilityOperationSpec - ); - } + /** + * Lists all API Management services within an Azure subscription. + * @param options The options parameters. + */ + private _list( + options?: ApiManagementServiceListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } - /** - * Get the custom domain ownership identifier for an API Management service. - * @param options The options parameters. - */ - getDomainOwnershipIdentifier( - options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - getDomainOwnershipIdentifierOperationSpec - ); - } + /** + * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getSsoToken( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetSsoTokenOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getSsoTokenOperationSpec + ); + } - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginApplyNetworkConfigurationUpdates( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - ): Promise< - SimplePollerLike< - OperationState< - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - >, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Checks availability and correctness of a name for an API Management service. + * @param parameters Parameters supplied to the CheckNameAvailability operation. + * @param options The options parameters. + */ + checkNameAvailability( + parameters: ApiManagementServiceCheckNameAvailabilityParameters, + options?: ApiManagementServiceCheckNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { parameters, options }, + checkNameAvailabilityOperationSpec + ); + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: applyNetworkConfigurationUpdatesOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, - OperationState< - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - > - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + /** + * Get the custom domain ownership identifier for an API Management service. + * @param options The options parameters. + */ + getDomainOwnershipIdentifier( + options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + getDomainOwnershipIdentifierOperationSpec + ); + } - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - ): Promise { - const poller = await this.beginApplyNetworkConfigurationUpdates( - resourceGroupName, - serviceName, - options - ); - return poller.pollUntilDone(); - } + /** + * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS + * changes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginApplyNetworkConfigurationUpdates( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + >, + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ApiManagementServiceListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, options }, + spec: applyNetworkConfigurationUpdatesOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, + OperationState< + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + > + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ApiManagementServiceListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } + /** + * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS + * changes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginApplyNetworkConfigurationUpdatesAndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams + ): Promise { + const poller = await this.beginApplyNetworkConfigurationUpdates( + resourceGroupName, + serviceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ApiManagementServiceListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ApiManagementServiceListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const restoreOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters35, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters35, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const backupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters35, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters35, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters36, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters36, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters37, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters37, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const migrateToStv2OperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer }; const getSsoTokenOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceGetSsoTokenResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceGetSsoTokenResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceNameAvailabilityResult + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceNameAvailabilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters38, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters38, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const getDomainOwnershipIdentifierOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceGetDomainOwnershipIdentifierResult + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceGetDomainOwnershipIdentifierResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer }; const applyNetworkConfigurationUpdatesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters39, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters39, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts index 4c96ac12b9bf..5888d70bd463 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts @@ -6,198 +6,198 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiManagementServiceSkus } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ResourceSkuResult, - ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams, - ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - ApiManagementServiceSkusListAvailableServiceSkusResponse, - ApiManagementServiceSkusListAvailableServiceSkusNextResponse -} from "../models"; + ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams, + ApiManagementServiceSkusListAvailableServiceSkusNextResponse, + ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, + ApiManagementServiceSkusListAvailableServiceSkusResponse, + ResourceSkuResult +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiManagementServiceSkus } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiManagementServiceSkus operations. */ export class ApiManagementServiceSkusImpl implements ApiManagementServiceSkus { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiManagementServiceSkus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiManagementServiceSkus class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets all available SKU for a given API Management service - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listAvailableServiceSkus( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listAvailableServiceSkusPagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAvailableServiceSkusPagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Gets all available SKU for a given API Management service + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listAvailableServiceSkus( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAvailableServiceSkusPagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listAvailableServiceSkusPagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementServiceSkusListAvailableServiceSkusResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAvailableServiceSkus( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listAvailableServiceSkusPagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listAvailableServiceSkusNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listAvailableServiceSkusPagingPage( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementServiceSkusListAvailableServiceSkusResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listAvailableServiceSkus( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listAvailableServiceSkusNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listAvailableServiceSkusPagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listAvailableServiceSkusPagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listAvailableServiceSkusPagingAll( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAvailableServiceSkusPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Gets all available SKU for a given API Management service - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listAvailableServiceSkus( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listAvailableServiceSkusOperationSpec - ); - } + /** + * Gets all available SKU for a given API Management service + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listAvailableServiceSkus( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listAvailableServiceSkusOperationSpec + ); + } - /** - * ListAvailableServiceSkusNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListAvailableServiceSkus - * method. - * @param options The options parameters. - */ - private _listAvailableServiceSkusNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listAvailableServiceSkusNextOperationSpec - ); - } + /** + * ListAvailableServiceSkusNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListAvailableServiceSkus + * method. + * @param options The options parameters. + */ + private _listAvailableServiceSkusNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listAvailableServiceSkusNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listAvailableServiceSkusOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResourceSkuResults + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceSkuResults + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listAvailableServiceSkusNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResourceSkuResults + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceSkuResults + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts index fa148734690f..15c59f8042d0 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts @@ -6,149 +6,149 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiManagementSkus } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiManagementSku, - ApiManagementSkusListNextOptionalParams, - ApiManagementSkusListOptionalParams, - ApiManagementSkusListResponse, - ApiManagementSkusListNextResponse -} from "../models"; + ApiManagementSku, + ApiManagementSkusListNextOptionalParams, + ApiManagementSkusListNextResponse, + ApiManagementSkusListOptionalParams, + ApiManagementSkusListResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiManagementSkus } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiManagementSkus operations. */ export class ApiManagementSkusImpl implements ApiManagementSkus { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiManagementSkus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * @param options The options parameters. - */ - public list( - options?: ApiManagementSkusListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } + /** + * Initialize a new instance of the class ApiManagementSkus class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - private async *listPagingPage( - options?: ApiManagementSkusListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementSkusListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * @param options The options parameters. + */ + public list( + options?: ApiManagementSkusListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + options?: ApiManagementSkusListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementSkusListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - options?: ApiManagementSkusListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; + private async *listPagingAll( + options?: ApiManagementSkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } - } - /** - * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * @param options The options parameters. - */ - private _list( - options?: ApiManagementSkusListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } + /** + * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * @param options The options parameters. + */ + private _list( + options?: ApiManagementSkusListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ApiManagementSkusListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ApiManagementSkusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementSkusResult + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementSkusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementSkusResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementSkusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts index 719e17d32e77..133b04440537 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts @@ -6,509 +6,509 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiOperation } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - OperationContract, - ApiOperationListByApiNextOptionalParams, - ApiOperationListByApiOptionalParams, - ApiOperationListByApiResponse, - ApiOperationGetEntityTagOptionalParams, - ApiOperationGetEntityTagResponse, - ApiOperationGetOptionalParams, - ApiOperationGetResponse, - ApiOperationCreateOrUpdateOptionalParams, - ApiOperationCreateOrUpdateResponse, - OperationUpdateContract, - ApiOperationUpdateOptionalParams, - ApiOperationUpdateResponse, - ApiOperationDeleteOptionalParams, - ApiOperationListByApiNextResponse -} from "../models"; + ApiOperationCreateOrUpdateOptionalParams, + ApiOperationCreateOrUpdateResponse, + ApiOperationDeleteOptionalParams, + ApiOperationGetEntityTagOptionalParams, + ApiOperationGetEntityTagResponse, + ApiOperationGetOptionalParams, + ApiOperationGetResponse, + ApiOperationListByApiNextOptionalParams, + ApiOperationListByApiNextResponse, + ApiOperationListByApiOptionalParams, + ApiOperationListByApiResponse, + ApiOperationUpdateOptionalParams, + ApiOperationUpdateResponse, + OperationContract, + OperationUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiOperation } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiOperation operations. */ export class ApiOperationImpl implements ApiOperation { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiOperation class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiOperation class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists a collection of the operations for the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiOperationListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiOperationListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Lists a collection of the operations for the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the API operation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the API Operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the API Operation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, options }, + getOperationSpec + ); + } - /** - * Creates a new operation in the API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - parameters: OperationContract, - options?: ApiOperationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new operation in the API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options?: ApiOperationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + operationId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the operation in the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Operation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - parameters: OperationUpdateContract, - options?: ApiOperationUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the operation in the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Operation Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options?: ApiOperationUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified operation in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - options?: ApiOperationDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified operation in the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + options?: ApiOperationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiOperationListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiOperationListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApiNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.tags, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiOperationGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiOperationGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationContract, + headersMapper: Mappers.ApiOperationGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.OperationContract, + headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.OperationContract, + headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.OperationContract, + headersMapper: Mappers.ApiOperationUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts index 5bec2b5db52c..4ed114e6493e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts @@ -6,316 +6,316 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ApiOperationPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiOperationPolicyListByOperationOptionalParams, - ApiOperationPolicyListByOperationResponse, - PolicyIdName, - ApiOperationPolicyGetEntityTagOptionalParams, - ApiOperationPolicyGetEntityTagResponse, - ApiOperationPolicyGetOptionalParams, - ApiOperationPolicyGetResponse, - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiOperationPolicyCreateOrUpdateResponse, - ApiOperationPolicyDeleteOptionalParams -} from "../models"; + ApiOperationPolicyCreateOrUpdateOptionalParams, + ApiOperationPolicyCreateOrUpdateResponse, + ApiOperationPolicyDeleteOptionalParams, + ApiOperationPolicyGetEntityTagOptionalParams, + ApiOperationPolicyGetEntityTagResponse, + ApiOperationPolicyGetOptionalParams, + ApiOperationPolicyGetResponse, + ApiOperationPolicyListByOperationOptionalParams, + ApiOperationPolicyListByOperationResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiOperationPolicy } from "../operationsInterfaces/index.js"; /** Class containing ApiOperationPolicy operations. */ export class ApiOperationPolicyImpl implements ApiOperationPolicy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiOperationPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiOperationPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the list of policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationPolicyListByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - listByOperationOperationSpec - ); - } + /** + * Get the list of policy configuration at the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationPolicyListByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, options }, + listByOperationOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the API operation policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, policyId, options }, - getOperationSpec - ); - } + /** + * Get the policy configuration at the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates policy configuration for the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiOperationPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates policy configuration for the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiOperationPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the policy configuration at the Api Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiOperationPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the policy configuration at the Api Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiOperationPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + ifMatch, + options + }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiOperationPolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiOperationPolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiOperationPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiOperationPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.policyId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.policyId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts index 763231e75669..521d78a5f001 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts @@ -6,280 +6,280 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ApiPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiPolicyListByApiOptionalParams, - ApiPolicyListByApiResponse, - PolicyIdName, - ApiPolicyGetEntityTagOptionalParams, - ApiPolicyGetEntityTagResponse, - ApiPolicyGetOptionalParams, - ApiPolicyGetResponse, - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiPolicyCreateOrUpdateResponse, - ApiPolicyDeleteOptionalParams -} from "../models"; + ApiPolicyCreateOrUpdateOptionalParams, + ApiPolicyCreateOrUpdateResponse, + ApiPolicyDeleteOptionalParams, + ApiPolicyGetEntityTagOptionalParams, + ApiPolicyGetEntityTagResponse, + ApiPolicyGetOptionalParams, + ApiPolicyGetResponse, + ApiPolicyListByApiOptionalParams, + ApiPolicyListByApiResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiPolicy } from "../operationsInterfaces/index.js"; /** Class containing ApiPolicy operations. */ export class ApiPolicyImpl implements ApiPolicy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiPolicyListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Get the policy configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiPolicyListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the API policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, options }, - getOperationSpec - ); - } + /** + * Get the policy configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates policy configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates policy configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, policyId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the policy configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the policy configuration at the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, policyId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiPolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiPolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId - ], - headerParameters: [Parameters.accept1], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId + ], + headerParameters: [Parameters.accept1], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts index b9a226a7aadb..78e05b876b86 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts @@ -6,217 +6,217 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiProduct } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ProductContract, - ApiProductListByApisNextOptionalParams, - ApiProductListByApisOptionalParams, - ApiProductListByApisResponse, - ApiProductListByApisNextResponse -} from "../models"; + ApiProductListByApisNextOptionalParams, + ApiProductListByApisNextResponse, + ApiProductListByApisOptionalParams, + ApiProductListByApisResponse, + ProductContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiProduct } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiProduct operations. */ export class ApiProductImpl implements ApiProduct { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiProduct class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiProduct class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all Products, which the API is part of. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByApis( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApisPagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApisPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all Products, which the API is part of. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByApis( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApisPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByApisPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiProductListByApisResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApis( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByApisPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByApisNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByApisPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiProductListByApisResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApis( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApisNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByApisPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApisPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByApisPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApisPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all Products, which the API is part of. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByApis( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApisOperationSpec - ); - } + /** + * Lists all Products, which the API is part of. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByApis( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApisOperationSpec + ); + } - /** - * ListByApisNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByApis method. - * @param options The options parameters. - */ - private _listByApisNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiProductListByApisNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApisNextOperationSpec - ); - } + /** + * ListByApisNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByApis method. + * @param options The options parameters. + */ + private _listByApisNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiProductListByApisNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApisNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApisOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const listByApisNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts index 345185b5a2d9..3a66234b3b4f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts @@ -6,496 +6,496 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiRelease } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiReleaseContract, - ApiReleaseListByServiceNextOptionalParams, - ApiReleaseListByServiceOptionalParams, - ApiReleaseListByServiceResponse, - ApiReleaseGetEntityTagOptionalParams, - ApiReleaseGetEntityTagResponse, - ApiReleaseGetOptionalParams, - ApiReleaseGetResponse, - ApiReleaseCreateOrUpdateOptionalParams, - ApiReleaseCreateOrUpdateResponse, - ApiReleaseUpdateOptionalParams, - ApiReleaseUpdateResponse, - ApiReleaseDeleteOptionalParams, - ApiReleaseListByServiceNextResponse -} from "../models"; + ApiReleaseContract, + ApiReleaseCreateOrUpdateOptionalParams, + ApiReleaseCreateOrUpdateResponse, + ApiReleaseDeleteOptionalParams, + ApiReleaseGetEntityTagOptionalParams, + ApiReleaseGetEntityTagResponse, + ApiReleaseGetOptionalParams, + ApiReleaseGetResponse, + ApiReleaseListByServiceNextOptionalParams, + ApiReleaseListByServiceNextResponse, + ApiReleaseListByServiceOptionalParams, + ApiReleaseListByServiceResponse, + ApiReleaseUpdateOptionalParams, + ApiReleaseUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiRelease } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiRelease operations. */ export class ApiReleaseImpl implements ApiRelease { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiRelease class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiRelease class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all releases of an API. An API release is created when making an API Revision current. + * Releases are also used to rollback to previous revisions. Results will be paged and can be + * constrained by the $top and $skip parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiReleaseListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiReleaseListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all releases of an API. An API release is created when making an API Revision current. + * Releases are also used to rollback to previous revisions. Results will be paged and can be + * constrained by the $top and $skip parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * Returns the etag of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, options }, - getEntityTagOperationSpec - ); - } + /** + * Returns the etag of an API release. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, releaseId, options }, + getEntityTagOperationSpec + ); + } - /** - * Returns the details of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, options }, - getOperationSpec - ); - } + /** + * Returns the details of an API release. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, releaseId, options }, + getOperationSpec + ); + } - /** - * Creates a new Release for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - parameters: ApiReleaseContract, - options?: ApiReleaseCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Release for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options?: ApiReleaseCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, releaseId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the release of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Release Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - parameters: ApiReleaseContract, - options?: ApiReleaseUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the release of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Release Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options?: ApiReleaseUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified release in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - options?: ApiReleaseDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified release in the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + options?: ApiReleaseDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, releaseId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiReleaseListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiReleaseListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiReleaseGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiReleaseGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseContract, + headersMapper: Mappers.ApiReleaseGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseContract, + headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ApiReleaseContract, + headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseContract, + headersMapper: Mappers.ApiReleaseUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts index c76a9aa1f6bf..f7729e1ad17c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts @@ -6,217 +6,217 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiRevision } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiRevisionContract, - ApiRevisionListByServiceNextOptionalParams, - ApiRevisionListByServiceOptionalParams, - ApiRevisionListByServiceResponse, - ApiRevisionListByServiceNextResponse -} from "../models"; + ApiRevisionContract, + ApiRevisionListByServiceNextOptionalParams, + ApiRevisionListByServiceNextResponse, + ApiRevisionListByServiceOptionalParams, + ApiRevisionListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiRevision } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiRevision operations. */ export class ApiRevisionImpl implements ApiRevision { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiRevision class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiRevision class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all revisions of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiRevisionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiRevisionListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all revisions of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiRevisionListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiRevisionListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiRevisionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiRevisionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiRevisionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiRevisionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts index 81cdbcbce722..edf227312235 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts @@ -6,532 +6,532 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiSchema } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - SchemaContract, - ApiSchemaListByApiNextOptionalParams, - ApiSchemaListByApiOptionalParams, - ApiSchemaListByApiResponse, - ApiSchemaGetEntityTagOptionalParams, - ApiSchemaGetEntityTagResponse, - ApiSchemaGetOptionalParams, - ApiSchemaGetResponse, - ApiSchemaCreateOrUpdateOptionalParams, - ApiSchemaCreateOrUpdateResponse, - ApiSchemaDeleteOptionalParams, - ApiSchemaListByApiNextResponse -} from "../models"; + ApiSchemaCreateOrUpdateOptionalParams, + ApiSchemaCreateOrUpdateResponse, + ApiSchemaDeleteOptionalParams, + ApiSchemaGetEntityTagOptionalParams, + ApiSchemaGetEntityTagResponse, + ApiSchemaGetOptionalParams, + ApiSchemaGetResponse, + ApiSchemaListByApiNextOptionalParams, + ApiSchemaListByApiNextResponse, + ApiSchemaListByApiOptionalParams, + ApiSchemaListByApiResponse, + SchemaContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiSchema } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiSchema operations. */ export class ApiSchemaImpl implements ApiSchema { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiSchema class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiSchema class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiSchemaListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiSchemaListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, schemaId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, schemaId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, schemaId, options }, - getOperationSpec - ); - } + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, schemaId, options }, + getOperationSpec + ); + } - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiSchemaCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Creates or updates schema configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters The schema contents to apply. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiSchemaCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - ApiSchemaCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApiSchemaCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates or updates schema configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters The schema contents to apply. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes the schema configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - ifMatch: string, - options?: ApiSchemaDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, schemaId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the schema configuration at the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + ifMatch: string, + options?: ApiSchemaDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, schemaId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiSchemaListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiSchemaListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApiNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiSchemaGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiSchemaGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.schemaId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.schemaId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.force], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts index 34f2b6f132b9..4d89e121872e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts @@ -6,448 +6,448 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiTagDescription } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TagDescriptionContract, - ApiTagDescriptionListByServiceNextOptionalParams, - ApiTagDescriptionListByServiceOptionalParams, - ApiTagDescriptionListByServiceResponse, - ApiTagDescriptionGetEntityTagOptionalParams, - ApiTagDescriptionGetEntityTagResponse, - ApiTagDescriptionGetOptionalParams, - ApiTagDescriptionGetResponse, - TagDescriptionCreateParameters, - ApiTagDescriptionCreateOrUpdateOptionalParams, - ApiTagDescriptionCreateOrUpdateResponse, - ApiTagDescriptionDeleteOptionalParams, - ApiTagDescriptionListByServiceNextResponse -} from "../models"; + ApiTagDescriptionCreateOrUpdateOptionalParams, + ApiTagDescriptionCreateOrUpdateResponse, + ApiTagDescriptionDeleteOptionalParams, + ApiTagDescriptionGetEntityTagOptionalParams, + ApiTagDescriptionGetEntityTagResponse, + ApiTagDescriptionGetOptionalParams, + ApiTagDescriptionGetResponse, + ApiTagDescriptionListByServiceNextOptionalParams, + ApiTagDescriptionListByServiceNextResponse, + ApiTagDescriptionListByServiceOptionalParams, + ApiTagDescriptionListByServiceResponse, + TagDescriptionContract, + TagDescriptionCreateParameters +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiTagDescription } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiTagDescription operations. */ export class ApiTagDescriptionImpl implements ApiTagDescription { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiTagDescription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiTagDescription class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on - * API level but tag may be assigned to the Operations - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on + * API level but tag may be assigned to the Operations + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiTagDescriptionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiTagDescriptionListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on - * API level but tag may be assigned to the Operations - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on + * API level but tag may be assigned to the Operations + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get Tag description in scope of API - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, - getOperationSpec - ); - } + /** + * Get Tag description in scope of API + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, + getOperationSpec + ); + } - /** - * Create/Update tag description in scope of the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - parameters: TagDescriptionCreateParameters, - options?: ApiTagDescriptionCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Create/Update tag description in scope of the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + parameters: TagDescriptionCreateParameters, + options?: ApiTagDescriptionCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Delete tag description for the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - ifMatch: string, - options?: ApiTagDescriptionDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Delete tag description for the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + ifMatch: string, + options?: ApiTagDescriptionDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiTagDescriptionListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiTagDescriptionListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagDescriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiTagDescriptionGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiTagDescriptionGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagDescriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagDescriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionContract, - headersMapper: Mappers.ApiTagDescriptionGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagDescriptionContract, + headersMapper: Mappers.ApiTagDescriptionGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagDescriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagDescriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionContract, - headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.TagDescriptionContract, - headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagDescriptionContract, + headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.TagDescriptionContract, + headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters15, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagDescriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters15, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagDescriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagDescriptionId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagDescriptionId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagDescriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts index 2057a4b4532a..e42bcc3cef21 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts @@ -6,462 +6,462 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiVersionSet } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiVersionSetContract, - ApiVersionSetListByServiceNextOptionalParams, - ApiVersionSetListByServiceOptionalParams, - ApiVersionSetListByServiceResponse, - ApiVersionSetGetEntityTagOptionalParams, - ApiVersionSetGetEntityTagResponse, - ApiVersionSetGetOptionalParams, - ApiVersionSetGetResponse, - ApiVersionSetCreateOrUpdateOptionalParams, - ApiVersionSetCreateOrUpdateResponse, - ApiVersionSetUpdateParameters, - ApiVersionSetUpdateOptionalParams, - ApiVersionSetUpdateResponse, - ApiVersionSetDeleteOptionalParams, - ApiVersionSetListByServiceNextResponse -} from "../models"; + ApiVersionSetContract, + ApiVersionSetCreateOrUpdateOptionalParams, + ApiVersionSetCreateOrUpdateResponse, + ApiVersionSetDeleteOptionalParams, + ApiVersionSetGetEntityTagOptionalParams, + ApiVersionSetGetEntityTagResponse, + ApiVersionSetGetOptionalParams, + ApiVersionSetGetResponse, + ApiVersionSetListByServiceNextOptionalParams, + ApiVersionSetListByServiceNextResponse, + ApiVersionSetListByServiceOptionalParams, + ApiVersionSetListByServiceResponse, + ApiVersionSetUpdateOptionalParams, + ApiVersionSetUpdateParameters, + ApiVersionSetUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiVersionSet } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiVersionSet operations. */ export class ApiVersionSetImpl implements ApiVersionSet { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiVersionSet class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiVersionSet class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of API Version Sets in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of API Version Sets in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiVersionSetListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiVersionSetListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of API Version Sets in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of API Version Sets in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, versionSetId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Api Version Set specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, versionSetId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - parameters: ApiVersionSetContract, - options?: ApiVersionSetCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a Api Version Set. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options?: ApiVersionSetCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, versionSetId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Api VersionSet specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - parameters: ApiVersionSetUpdateParameters, - options?: ApiVersionSetUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Api VersionSet specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options?: ApiVersionSetUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + versionSetId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes specific Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - options?: ApiVersionSetDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific Api Version Set. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + options?: ApiVersionSetDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, versionSetId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiVersionSetListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ApiVersionSetListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiVersionSetGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiVersionSetGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetContract, + headersMapper: Mappers.ApiVersionSetGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetContract, + headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ApiVersionSetContract, + headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters18, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters18, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetContract, + headersMapper: Mappers.ApiVersionSetUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters19, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts index 97883b205cfb..1251b36fb937 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts @@ -6,275 +6,275 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ApiWiki } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiWikiGetEntityTagOptionalParams, - ApiWikiGetEntityTagResponse, - ApiWikiGetOptionalParams, - ApiWikiGetResponse, - WikiContract, - ApiWikiCreateOrUpdateOptionalParams, - ApiWikiCreateOrUpdateResponse, - WikiUpdateContract, - ApiWikiUpdateOptionalParams, - ApiWikiUpdateResponse, - ApiWikiDeleteOptionalParams -} from "../models"; + ApiWikiCreateOrUpdateOptionalParams, + ApiWikiCreateOrUpdateResponse, + ApiWikiDeleteOptionalParams, + ApiWikiGetEntityTagOptionalParams, + ApiWikiGetEntityTagResponse, + ApiWikiGetOptionalParams, + ApiWikiGetResponse, + ApiWikiUpdateOptionalParams, + ApiWikiUpdateResponse, + WikiContract, + WikiUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiWiki } from "../operationsInterfaces/index.js"; /** Class containing ApiWiki operations. */ export class ApiWikiImpl implements ApiWiki { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiWiki class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiWiki class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + getOperationSpec + ); + } - /** - * Creates a new Wiki for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: WikiContract, - options?: ApiWikiCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Wiki for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: WikiContract, + options?: ApiWikiCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ApiWikiUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Wiki Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ApiWikiUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes the specified Wiki from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiWikiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Wiki from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiWikiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiWikiGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiWikiGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ApiWikiGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters16, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ApiWikiUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters17, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters17, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts index d4aeb49360f5..3cc3924d60b7 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts @@ -6,212 +6,212 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiWikis } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - WikiContract, - ApiWikisListNextOptionalParams, - ApiWikisListOptionalParams, - ApiWikisListResponse, - ApiWikisListNextResponse -} from "../models"; + ApiWikisListNextOptionalParams, + ApiWikisListNextResponse, + ApiWikisListOptionalParams, + ApiWikisListResponse, + WikiContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiWikis } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiWikis operations. */ export class ApiWikisImpl implements ApiWikis { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiWikis class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiWikis class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the wikis for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Gets the wikis for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiWikisListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, serviceName, apiId, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiWikisListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, serviceName, apiId, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Gets the wikis for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listOperationSpec - ); - } + /** + * Gets the wikis for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiWikisListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiWikisListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts index c347d55c595e..94c0f12d5b30 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts @@ -6,459 +6,459 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Authorization } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationContract, - AuthorizationListByAuthorizationProviderNextOptionalParams, - AuthorizationListByAuthorizationProviderOptionalParams, - AuthorizationListByAuthorizationProviderResponse, - AuthorizationGetOptionalParams, - AuthorizationGetResponse, - AuthorizationCreateOrUpdateOptionalParams, - AuthorizationCreateOrUpdateResponse, - AuthorizationDeleteOptionalParams, - AuthorizationConfirmConsentCodeRequestContract, - AuthorizationConfirmConsentCodeOptionalParams, - AuthorizationConfirmConsentCodeResponse, - AuthorizationListByAuthorizationProviderNextResponse -} from "../models"; + AuthorizationConfirmConsentCodeOptionalParams, + AuthorizationConfirmConsentCodeRequestContract, + AuthorizationConfirmConsentCodeResponse, + AuthorizationContract, + AuthorizationCreateOrUpdateOptionalParams, + AuthorizationCreateOrUpdateResponse, + AuthorizationDeleteOptionalParams, + AuthorizationGetOptionalParams, + AuthorizationGetResponse, + AuthorizationListByAuthorizationProviderNextOptionalParams, + AuthorizationListByAuthorizationProviderNextResponse, + AuthorizationListByAuthorizationProviderOptionalParams, + AuthorizationListByAuthorizationProviderResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Authorization } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Authorization operations. */ export class AuthorizationImpl implements Authorization { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Authorization class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Authorization class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of authorization providers defined within a authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - public listByAuthorizationProvider( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByAuthorizationProviderPagingAll( - resourceGroupName, - serviceName, - authorizationProviderId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByAuthorizationProviderPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - options, - settings + /** + * Lists a collection of authorization providers defined within a authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + public listByAuthorizationProvider( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByAuthorizationProviderPagingAll( + resourceGroupName, + serviceName, + authorizationProviderId, + options ); - } - }; - } - - private async *listByAuthorizationProviderPagingPage( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AuthorizationListByAuthorizationProviderResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByAuthorizationProviderPagingPage( + resourceGroupName, + serviceName, + authorizationProviderId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByAuthorizationProviderNext( - resourceGroupName, - serviceName, - authorizationProviderId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByAuthorizationProviderPagingPage( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AuthorizationListByAuthorizationProviderResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByAuthorizationProvider( + resourceGroupName, + serviceName, + authorizationProviderId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByAuthorizationProviderNext( + resourceGroupName, + serviceName, + authorizationProviderId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByAuthorizationProviderPagingAll( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByAuthorizationProviderPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - options - )) { - yield* page; + private async *listByAuthorizationProviderPagingAll( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByAuthorizationProviderPagingPage( + resourceGroupName, + serviceName, + authorizationProviderId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of authorization providers defined within a authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - private _listByAuthorizationProvider( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authorizationProviderId, options }, - listByAuthorizationProviderOperationSpec - ); - } + /** + * Lists a collection of authorization providers defined within a authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + private _listByAuthorizationProvider( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authorizationProviderId, options }, + listByAuthorizationProviderOperationSpec + ); + } - /** - * Gets the details of the authorization specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options - }, - getOperationSpec - ); - } + /** + * Gets the details of the authorization specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options + }, + getOperationSpec + ); + } - /** - * Creates or updates authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationContract, - options?: AuthorizationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationContract, + options?: AuthorizationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes specific Authorization from the Authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - ifMatch: string, - options?: AuthorizationDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes specific Authorization from the Authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + ifMatch: string, + options?: AuthorizationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * Confirm valid consent code to suppress Authorizations anti-phishing page. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - confirmConsentCode( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationConfirmConsentCodeRequestContract, - options?: AuthorizationConfirmConsentCodeOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - options - }, - confirmConsentCodeOperationSpec - ); - } + /** + * Confirm valid consent code to suppress Authorizations anti-phishing page. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + confirmConsentCode( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationConfirmConsentCodeRequestContract, + options?: AuthorizationConfirmConsentCodeOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options + }, + confirmConsentCodeOperationSpec + ); + } - /** - * ListByAuthorizationProviderNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param nextLink The nextLink from the previous successful call to the ListByAuthorizationProvider - * method. - * @param options The options parameters. - */ - private _listByAuthorizationProviderNext( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - nextLink: string, - options?: AuthorizationListByAuthorizationProviderNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - nextLink, - options - }, - listByAuthorizationProviderNextOperationSpec - ); - } + /** + * ListByAuthorizationProviderNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param nextLink The nextLink from the previous successful call to the ListByAuthorizationProvider + * method. + * @param options The options parameters. + */ + private _listByAuthorizationProviderNext( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + nextLink: string, + options?: AuthorizationListByAuthorizationProviderNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + nextLink, + options + }, + listByAuthorizationProviderNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByAuthorizationProviderOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationContract, - headersMapper: Mappers.AuthorizationGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationContract, + headersMapper: Mappers.AuthorizationGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationContract, - headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.AuthorizationContract, - headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationContract, + headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AuthorizationContract, + headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters23, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters23, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const confirmConsentCodeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.AuthorizationConfirmConsentCodeHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.AuthorizationConfirmConsentCodeHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters24, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters24, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByAuthorizationProviderNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.authorizationProviderId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.authorizationProviderId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts index 021fe8debd36..54eb8c9b5249 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts @@ -6,434 +6,434 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { AuthorizationAccessPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationAccessPolicyContract, - AuthorizationAccessPolicyListByAuthorizationNextOptionalParams, - AuthorizationAccessPolicyListByAuthorizationOptionalParams, - AuthorizationAccessPolicyListByAuthorizationResponse, - AuthorizationAccessPolicyGetOptionalParams, - AuthorizationAccessPolicyGetResponse, - AuthorizationAccessPolicyCreateOrUpdateOptionalParams, - AuthorizationAccessPolicyCreateOrUpdateResponse, - AuthorizationAccessPolicyDeleteOptionalParams, - AuthorizationAccessPolicyListByAuthorizationNextResponse -} from "../models"; + AuthorizationAccessPolicyContract, + AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + AuthorizationAccessPolicyCreateOrUpdateResponse, + AuthorizationAccessPolicyDeleteOptionalParams, + AuthorizationAccessPolicyGetOptionalParams, + AuthorizationAccessPolicyGetResponse, + AuthorizationAccessPolicyListByAuthorizationNextOptionalParams, + AuthorizationAccessPolicyListByAuthorizationNextResponse, + AuthorizationAccessPolicyListByAuthorizationOptionalParams, + AuthorizationAccessPolicyListByAuthorizationResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AuthorizationAccessPolicy } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing AuthorizationAccessPolicy operations. */ export class AuthorizationAccessPolicyImpl - implements AuthorizationAccessPolicy { - private readonly client: ApiManagementClient; + implements AuthorizationAccessPolicy { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class AuthorizationAccessPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class AuthorizationAccessPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of authorization access policy defined within a authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - public listByAuthorization( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByAuthorizationPagingAll( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByAuthorizationPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options, - settings + /** + * Lists a collection of authorization access policy defined within a authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + public listByAuthorization( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByAuthorizationPagingAll( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options ); - } - }; - } - - private async *listByAuthorizationPagingPage( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AuthorizationAccessPolicyListByAuthorizationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByAuthorizationPagingPage( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByAuthorizationNext( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByAuthorizationPagingPage( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AuthorizationAccessPolicyListByAuthorizationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByAuthorization( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByAuthorizationNext( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByAuthorizationPagingAll( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByAuthorizationPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options - )) { - yield* page; + private async *listByAuthorizationPagingAll( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByAuthorizationPagingPage( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of authorization access policy defined within a authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - private _listByAuthorization( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options - }, - listByAuthorizationOperationSpec - ); - } + /** + * Lists a collection of authorization access policy defined within a authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + private _listByAuthorization( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options + }, + listByAuthorizationOperationSpec + ); + } - /** - * Gets the details of the authorization access policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - options?: AuthorizationAccessPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - options - }, - getOperationSpec - ); - } + /** + * Gets the details of the authorization access policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + options?: AuthorizationAccessPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + options + }, + getOperationSpec + ); + } - /** - * Creates or updates Authorization Access Policy. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - parameters: AuthorizationAccessPolicyContract, - options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates Authorization Access Policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + parameters: AuthorizationAccessPolicyContract, + options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes specific access policy from the Authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - ifMatch: string, - options?: AuthorizationAccessPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes specific access policy from the Authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + ifMatch: string, + options?: AuthorizationAccessPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByAuthorizationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param nextLink The nextLink from the previous successful call to the ListByAuthorization method. - * @param options The options parameters. - */ - private _listByAuthorizationNext( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - nextLink: string, - options?: AuthorizationAccessPolicyListByAuthorizationNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - nextLink, - options - }, - listByAuthorizationNextOperationSpec - ); - } + /** + * ListByAuthorizationNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param nextLink The nextLink from the previous successful call to the ListByAuthorization method. + * @param options The options parameters. + */ + private _listByAuthorizationNext( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + nextLink: string, + options?: AuthorizationAccessPolicyListByAuthorizationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + nextLink, + options + }, + listByAuthorizationNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByAuthorizationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationAccessPolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyContract, - headersMapper: Mappers.AuthorizationAccessPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationAccessPolicyContract, + headersMapper: Mappers.AuthorizationAccessPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId, - Parameters.authorizationAccessPolicyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId, + Parameters.authorizationAccessPolicyId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyContract, - headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.AuthorizationAccessPolicyContract, - headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationAccessPolicyContract, + headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AuthorizationAccessPolicyContract, + headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters26, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId, - Parameters.authorizationAccessPolicyId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters26, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId, + Parameters.authorizationAccessPolicyId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId, - Parameters.authorizationAccessPolicyId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId, + Parameters.authorizationAccessPolicyId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByAuthorizationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationAccessPolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts index 7a86c6edba4f..437574127d9d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts @@ -6,86 +6,86 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { AuthorizationLoginLinks } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationLoginRequestContract, - AuthorizationLoginLinksPostOptionalParams, - AuthorizationLoginLinksPostResponse -} from "../models"; + AuthorizationLoginLinksPostOptionalParams, + AuthorizationLoginLinksPostResponse, + AuthorizationLoginRequestContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AuthorizationLoginLinks } from "../operationsInterfaces/index.js"; /** Class containing AuthorizationLoginLinks operations. */ export class AuthorizationLoginLinksImpl implements AuthorizationLoginLinks { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class AuthorizationLoginLinks class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class AuthorizationLoginLinks class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets authorization login links. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - post( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationLoginRequestContract, - options?: AuthorizationLoginLinksPostOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - options - }, - postOperationSpec - ); - } + /** + * Gets authorization login links. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + post( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationLoginRequestContract, + options?: AuthorizationLoginLinksPostOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options + }, + postOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const postOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationLoginResponseContract, - headersMapper: Mappers.AuthorizationLoginLinksPostHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationLoginResponseContract, + headersMapper: Mappers.AuthorizationLoginLinksPostHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters25, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters25, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts index 603eae55b5fa..567732599a30 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts @@ -6,361 +6,361 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { AuthorizationProvider } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationProviderContract, - AuthorizationProviderListByServiceNextOptionalParams, - AuthorizationProviderListByServiceOptionalParams, - AuthorizationProviderListByServiceResponse, - AuthorizationProviderGetOptionalParams, - AuthorizationProviderGetResponse, - AuthorizationProviderCreateOrUpdateOptionalParams, - AuthorizationProviderCreateOrUpdateResponse, - AuthorizationProviderDeleteOptionalParams, - AuthorizationProviderListByServiceNextResponse -} from "../models"; + AuthorizationProviderContract, + AuthorizationProviderCreateOrUpdateOptionalParams, + AuthorizationProviderCreateOrUpdateResponse, + AuthorizationProviderDeleteOptionalParams, + AuthorizationProviderGetOptionalParams, + AuthorizationProviderGetResponse, + AuthorizationProviderListByServiceNextOptionalParams, + AuthorizationProviderListByServiceNextResponse, + AuthorizationProviderListByServiceOptionalParams, + AuthorizationProviderListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AuthorizationProvider } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing AuthorizationProvider operations. */ export class AuthorizationProviderImpl implements AuthorizationProvider { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class AuthorizationProvider class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class AuthorizationProvider class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of authorization providers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of authorization providers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AuthorizationProviderListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AuthorizationProviderListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of authorization providers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of authorization providers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the details of the authorization provider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationProviderGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authorizationProviderId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the authorization provider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationProviderGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authorizationProviderId, options }, + getOperationSpec + ); + } - /** - * Creates or updates authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - parameters: AuthorizationProviderContract, - options?: AuthorizationProviderCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + parameters: AuthorizationProviderContract, + options?: AuthorizationProviderCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes specific authorization provider from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - ifMatch: string, - options?: AuthorizationProviderDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes specific authorization provider from the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + ifMatch: string, + options?: AuthorizationProviderDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: AuthorizationProviderListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: AuthorizationProviderListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationProviderCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderContract, - headersMapper: Mappers.AuthorizationProviderGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationProviderContract, + headersMapper: Mappers.AuthorizationProviderGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderContract, - headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.AuthorizationProviderContract, - headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationProviderContract, + headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AuthorizationProviderContract, + headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters22, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters22, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationProviderCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts index 99abc294e940..bcecf727ca8a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts @@ -6,495 +6,495 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { AuthorizationServer } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationServerContract, - AuthorizationServerListByServiceNextOptionalParams, - AuthorizationServerListByServiceOptionalParams, - AuthorizationServerListByServiceResponse, - AuthorizationServerGetEntityTagOptionalParams, - AuthorizationServerGetEntityTagResponse, - AuthorizationServerGetOptionalParams, - AuthorizationServerGetResponse, - AuthorizationServerCreateOrUpdateOptionalParams, - AuthorizationServerCreateOrUpdateResponse, - AuthorizationServerUpdateContract, - AuthorizationServerUpdateOptionalParams, - AuthorizationServerUpdateResponse, - AuthorizationServerDeleteOptionalParams, - AuthorizationServerListSecretsOptionalParams, - AuthorizationServerListSecretsResponse, - AuthorizationServerListByServiceNextResponse -} from "../models"; + AuthorizationServerContract, + AuthorizationServerCreateOrUpdateOptionalParams, + AuthorizationServerCreateOrUpdateResponse, + AuthorizationServerDeleteOptionalParams, + AuthorizationServerGetEntityTagOptionalParams, + AuthorizationServerGetEntityTagResponse, + AuthorizationServerGetOptionalParams, + AuthorizationServerGetResponse, + AuthorizationServerListByServiceNextOptionalParams, + AuthorizationServerListByServiceNextResponse, + AuthorizationServerListByServiceOptionalParams, + AuthorizationServerListByServiceResponse, + AuthorizationServerListSecretsOptionalParams, + AuthorizationServerListSecretsResponse, + AuthorizationServerUpdateContract, + AuthorizationServerUpdateOptionalParams, + AuthorizationServerUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AuthorizationServer } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing AuthorizationServer operations. */ export class AuthorizationServerImpl implements AuthorizationServer { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class AuthorizationServer class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class AuthorizationServer class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of authorization servers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of authorization servers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AuthorizationServerListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AuthorizationServerListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of authorization servers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of authorization servers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, options }, - getOperationSpec - ); - } + /** + * Gets the details of the authorization server specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, options }, + getOperationSpec + ); + } - /** - * Creates new authorization server or updates an existing authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authsid: string, - parameters: AuthorizationServerContract, - options?: AuthorizationServerCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates new authorization server or updates an existing authorization server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authsid: string, + parameters: AuthorizationServerContract, + options?: AuthorizationServerCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters OAuth2 Server settings Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - parameters: AuthorizationServerUpdateContract, - options?: AuthorizationServerUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the authorization server specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters OAuth2 Server settings Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + parameters: AuthorizationServerUpdateContract, + options?: AuthorizationServerUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific authorization server instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - options?: AuthorizationServerDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific authorization server instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + options?: AuthorizationServerDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Gets the client secret details of the authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the client secret details of the authorization server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, options }, + listSecretsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: AuthorizationServerListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: AuthorizationServerListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.AuthorizationServerGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.AuthorizationServerGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerContract, + headersMapper: Mappers.AuthorizationServerGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerContract, + headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AuthorizationServerContract, + headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters20, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters20, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerContract, + headersMapper: Mappers.AuthorizationServerUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters21, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters21, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerSecretsContract, - headersMapper: Mappers.AuthorizationServerListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerSecretsContract, + headersMapper: Mappers.AuthorizationServerListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts b/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts index c445f24cedbc..63ab30634221 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts @@ -6,507 +6,507 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Backend } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - BackendContract, - BackendListByServiceNextOptionalParams, - BackendListByServiceOptionalParams, - BackendListByServiceResponse, - BackendGetEntityTagOptionalParams, - BackendGetEntityTagResponse, - BackendGetOptionalParams, - BackendGetResponse, - BackendCreateOrUpdateOptionalParams, - BackendCreateOrUpdateResponse, - BackendUpdateParameters, - BackendUpdateOptionalParams, - BackendUpdateResponse, - BackendDeleteOptionalParams, - BackendReconnectOptionalParams, - BackendListByServiceNextResponse -} from "../models"; + BackendContract, + BackendCreateOrUpdateOptionalParams, + BackendCreateOrUpdateResponse, + BackendDeleteOptionalParams, + BackendGetEntityTagOptionalParams, + BackendGetEntityTagResponse, + BackendGetOptionalParams, + BackendGetResponse, + BackendListByServiceNextOptionalParams, + BackendListByServiceNextResponse, + BackendListByServiceOptionalParams, + BackendListByServiceResponse, + BackendReconnectOptionalParams, + BackendUpdateOptionalParams, + BackendUpdateParameters, + BackendUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Backend } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Backend operations. */ export class BackendImpl implements Backend { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Backend class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Backend class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of backends in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of backends in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: BackendListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BackendListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of backends in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of backends in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the backend specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the backend specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - backendId: string, - parameters: BackendContract, - options?: BackendCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + backendId: string, + parameters: BackendContract, + options?: BackendCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates an existing backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - parameters: BackendUpdateParameters, - options?: BackendUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - backendId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options?: BackendUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + backendId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - options?: BackendDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + options?: BackendDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Notifies the API Management gateway to create a new connection to the backend after the specified - * timeout. If no timeout was specified, timeout of 2 minutes is used. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - reconnect( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendReconnectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, options }, - reconnectOperationSpec - ); - } + /** + * Notifies the API Management gateway to create a new connection to the backend after the specified + * timeout. If no timeout was specified, timeout of 2 minutes is used. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + reconnect( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendReconnectOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, options }, + reconnectOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: BackendListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: BackendListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BackendCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.BackendGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.BackendGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BackendContract, + headersMapper: Mappers.BackendGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.BackendContract, + headersMapper: Mappers.BackendCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.BackendContract, + headersMapper: Mappers.BackendCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters27, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters27, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.BackendContract, + headersMapper: Mappers.BackendUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters28, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters28, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const reconnectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect", - httpMethod: "POST", - responses: { - 202: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters29, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect", + httpMethod: "POST", + responses: { + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters29, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BackendCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts b/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts index 4c8a2d9f2f7c..123bf1c28fde 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts @@ -6,450 +6,450 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Cache } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - CacheContract, - CacheListByServiceNextOptionalParams, - CacheListByServiceOptionalParams, - CacheListByServiceResponse, - CacheGetEntityTagOptionalParams, - CacheGetEntityTagResponse, - CacheGetOptionalParams, - CacheGetResponse, - CacheCreateOrUpdateOptionalParams, - CacheCreateOrUpdateResponse, - CacheUpdateParameters, - CacheUpdateOptionalParams, - CacheUpdateResponse, - CacheDeleteOptionalParams, - CacheListByServiceNextResponse -} from "../models"; + CacheContract, + CacheCreateOrUpdateOptionalParams, + CacheCreateOrUpdateResponse, + CacheDeleteOptionalParams, + CacheGetEntityTagOptionalParams, + CacheGetEntityTagResponse, + CacheGetOptionalParams, + CacheGetResponse, + CacheListByServiceNextOptionalParams, + CacheListByServiceNextResponse, + CacheListByServiceOptionalParams, + CacheListByServiceResponse, + CacheUpdateOptionalParams, + CacheUpdateParameters, + CacheUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Cache } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Cache operations. */ export class CacheImpl implements Cache { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Cache class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Cache class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of all external Caches in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of all external Caches in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: CacheListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CacheListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of all external Caches in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of all external Caches in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, options }, + getOperationSpec + ); + } - /** - * Creates or updates an External Cache to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - cacheId: string, - parameters: CacheContract, - options?: CacheCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates an External Cache to be used in Api Management instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param parameters Create or Update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + cacheId: string, + parameters: CacheContract, + options?: CacheCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - parameters: CacheUpdateParameters, - options?: CacheUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + parameters: CacheUpdateParameters, + options?: CacheUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific Cache. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - options?: CacheDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific Cache. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + options?: CacheDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: CacheListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: CacheListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CacheCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CacheCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.CacheGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.CacheGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CacheContract, + headersMapper: Mappers.CacheGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CacheContract, + headersMapper: Mappers.CacheCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.CacheContract, + headersMapper: Mappers.CacheCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters30, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters30, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.CacheContract, + headersMapper: Mappers.CacheUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters31, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters31, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CacheCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CacheCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts b/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts index e4768349aeb3..f50562b58c12 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts @@ -6,445 +6,445 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Certificate } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - CertificateContract, - CertificateListByServiceNextOptionalParams, - CertificateListByServiceOptionalParams, - CertificateListByServiceResponse, - CertificateGetEntityTagOptionalParams, - CertificateGetEntityTagResponse, - CertificateGetOptionalParams, - CertificateGetResponse, - CertificateCreateOrUpdateParameters, - CertificateCreateOrUpdateOptionalParams, - CertificateCreateOrUpdateResponse, - CertificateDeleteOptionalParams, - CertificateRefreshSecretOptionalParams, - CertificateRefreshSecretResponse, - CertificateListByServiceNextResponse -} from "../models"; + CertificateContract, + CertificateCreateOrUpdateOptionalParams, + CertificateCreateOrUpdateParameters, + CertificateCreateOrUpdateResponse, + CertificateDeleteOptionalParams, + CertificateGetEntityTagOptionalParams, + CertificateGetEntityTagResponse, + CertificateGetOptionalParams, + CertificateGetResponse, + CertificateListByServiceNextOptionalParams, + CertificateListByServiceNextResponse, + CertificateListByServiceOptionalParams, + CertificateListByServiceResponse, + CertificateRefreshSecretOptionalParams, + CertificateRefreshSecretResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Certificate } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Certificate operations. */ export class CertificateImpl implements Certificate { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Certificate class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Certificate class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of all certificates in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of all certificates in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: CertificateListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CertificateListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of all certificates in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of all certificates in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the certificate specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the certificate specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, options }, + getOperationSpec + ); + } - /** - * Creates or updates the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - certificateId: string, - parameters: CertificateCreateOrUpdateParameters, - options?: CertificateCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the certificate being used for authentication with the backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param parameters Create or Update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options?: CertificateCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes specific certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - certificateId: string, - ifMatch: string, - options?: CertificateDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + certificateId: string, + ifMatch: string, + options?: CertificateDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * From KeyVault, Refresh the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - refreshSecret( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateRefreshSecretOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, options }, - refreshSecretOperationSpec - ); - } + /** + * From KeyVault, Refresh the certificate being used for authentication with the backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + refreshSecret( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateRefreshSecretOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, options }, + refreshSecretOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: CertificateListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: CertificateListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.isKeyVaultRefreshFailed - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.isKeyVaultRefreshFailed + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.CertificateGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.CertificateGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateContract, + headersMapper: Mappers.CertificateGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CertificateContract, + headersMapper: Mappers.CertificateCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.CertificateContract, + headersMapper: Mappers.CertificateCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters32, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters32, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const refreshSecretOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateRefreshSecretHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CertificateContract, + headersMapper: Mappers.CertificateRefreshSecretHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts b/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts index 3f3cc3eac3b8..f67986090b58 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts @@ -6,430 +6,430 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ContentItem } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ContentItemContract, - ContentItemListByServiceNextOptionalParams, - ContentItemListByServiceOptionalParams, - ContentItemListByServiceResponse, - ContentItemGetEntityTagOptionalParams, - ContentItemGetEntityTagResponse, - ContentItemGetOptionalParams, - ContentItemGetResponse, - ContentItemCreateOrUpdateOptionalParams, - ContentItemCreateOrUpdateResponse, - ContentItemDeleteOptionalParams, - ContentItemListByServiceNextResponse -} from "../models"; + ContentItemContract, + ContentItemCreateOrUpdateOptionalParams, + ContentItemCreateOrUpdateResponse, + ContentItemDeleteOptionalParams, + ContentItemGetEntityTagOptionalParams, + ContentItemGetEntityTagResponse, + ContentItemGetOptionalParams, + ContentItemGetResponse, + ContentItemListByServiceNextOptionalParams, + ContentItemListByServiceNextResponse, + ContentItemListByServiceOptionalParams, + ContentItemListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ContentItem } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ContentItem operations. */ export class ContentItemImpl implements ContentItem { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ContentItem class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ContentItem class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists developer portal's content items specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - contentTypeId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - contentTypeId, - options, - settings + /** + * Lists developer portal's content items specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + contentTypeId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ContentItemListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - contentTypeId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + contentTypeId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - contentTypeId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ContentItemListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + contentTypeId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + contentTypeId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - contentTypeId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + contentTypeId, + options + )) { + yield* page; + } } - } - /** - * Lists developer portal's content items specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists developer portal's content items specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, options }, + listByServiceOperationSpec + ); + } - /** - * Returns the entity state (ETag) version of the developer portal's content item specified by its - * identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, - getEntityTagOperationSpec - ); - } + /** + * Returns the entity state (ETag) version of the developer portal's content item specified by its + * identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, + getEntityTagOperationSpec + ); + } - /** - * Returns the developer portal's content item specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, - getOperationSpec - ); - } + /** + * Returns the developer portal's content item specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, + getOperationSpec + ); + } - /** - * Creates a new developer portal's content item specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - parameters: ContentItemContract, - options?: ContentItemCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new developer portal's content item specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + parameters: ContentItemContract, + options?: ContentItemCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Removes the specified developer portal's content item. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - ifMatch: string, - options?: ContentItemDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Removes the specified developer portal's content item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + ifMatch: string, + options?: ContentItemDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - nextLink: string, - options?: ContentItemListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + nextLink: string, + options?: ContentItemListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentItemCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentItemCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ContentItemGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ContentItemGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId, - Parameters.contentItemId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId, + Parameters.contentItemId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentItemContract, - headersMapper: Mappers.ContentItemGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentItemContract, + headersMapper: Mappers.ContentItemGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId, - Parameters.contentItemId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId, + Parameters.contentItemId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ContentItemContract, - headersMapper: Mappers.ContentItemCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ContentItemContract, - headersMapper: Mappers.ContentItemCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ContentItemContract, + headersMapper: Mappers.ContentItemCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ContentItemContract, + headersMapper: Mappers.ContentItemCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters34, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId, - Parameters.contentItemId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters34, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId, + Parameters.contentItemId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId, - Parameters.contentItemId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId, + Parameters.contentItemId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentItemCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentItemCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.contentTypeId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.contentTypeId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts b/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts index e9208395eed7..bffde11c2e12 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts @@ -6,351 +6,351 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ContentType } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ContentTypeContract, - ContentTypeListByServiceNextOptionalParams, - ContentTypeListByServiceOptionalParams, - ContentTypeListByServiceResponse, - ContentTypeGetOptionalParams, - ContentTypeGetResponse, - ContentTypeCreateOrUpdateOptionalParams, - ContentTypeCreateOrUpdateResponse, - ContentTypeDeleteOptionalParams, - ContentTypeListByServiceNextResponse -} from "../models"; + ContentTypeContract, + ContentTypeCreateOrUpdateOptionalParams, + ContentTypeCreateOrUpdateResponse, + ContentTypeDeleteOptionalParams, + ContentTypeGetOptionalParams, + ContentTypeGetResponse, + ContentTypeListByServiceNextOptionalParams, + ContentTypeListByServiceNextResponse, + ContentTypeListByServiceOptionalParams, + ContentTypeListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ContentType } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ContentType operations. */ export class ContentTypeImpl implements ContentType { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ContentType class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ContentType class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the developer portal's content types. Content types describe content items' properties, - * validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists the developer portal's content types. Content types describe content items' properties, + * validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ContentTypeListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ContentTypeListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists the developer portal's content types. Content types describe content items' properties, - * validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists the developer portal's content types. Content types describe content items' properties, + * validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the details of the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentTypeGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentTypeGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, options }, + getOperationSpec + ); + } - /** - * Creates or updates the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Custom content types' identifiers need to start with - * the `c-` prefix. Built-in content types can't be modified. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - parameters: ContentTypeContract, - options?: ContentTypeCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. Custom content types' identifiers need to start with + * the `c-` prefix. Built-in content types can't be modified. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + parameters: ContentTypeContract, + options?: ContentTypeCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Removes the specified developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Built-in content types (with identifiers starting - * with the `c-` prefix) can't be removed. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - ifMatch: string, - options?: ContentTypeDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Removes the specified developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. Built-in content types (with identifiers starting + * with the `c-` prefix) can't be removed. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + ifMatch: string, + options?: ContentTypeDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ContentTypeListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ContentTypeListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentTypeCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeContract, - headersMapper: Mappers.ContentTypeGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentTypeContract, + headersMapper: Mappers.ContentTypeGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeContract, - headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ContentTypeContract, - headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ContentTypeContract, + headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ContentTypeContract, + headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters33, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters33, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentTypeCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts index d4a14c240964..6deff74564bc 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts @@ -6,249 +6,249 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { DelegationSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - DelegationSettingsGetEntityTagOptionalParams, - DelegationSettingsGetEntityTagResponse, - DelegationSettingsGetOptionalParams, - DelegationSettingsGetResponse, - PortalDelegationSettings, - DelegationSettingsUpdateOptionalParams, - DelegationSettingsCreateOrUpdateOptionalParams, - DelegationSettingsCreateOrUpdateResponse, - DelegationSettingsListSecretsOptionalParams, - DelegationSettingsListSecretsResponse -} from "../models"; + DelegationSettingsCreateOrUpdateOptionalParams, + DelegationSettingsCreateOrUpdateResponse, + DelegationSettingsGetEntityTagOptionalParams, + DelegationSettingsGetEntityTagResponse, + DelegationSettingsGetOptionalParams, + DelegationSettingsGetResponse, + DelegationSettingsListSecretsOptionalParams, + DelegationSettingsListSecretsResponse, + DelegationSettingsUpdateOptionalParams, + PortalDelegationSettings +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DelegationSettings } from "../operationsInterfaces/index.js"; /** Class containing DelegationSettings operations. */ export class DelegationSettingsImpl implements DelegationSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class DelegationSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class DelegationSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the DelegationSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getEntityTagOperationSpec + ); + } - /** - * Get Delegation Settings for the Portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec - ); - } + /** + * Get Delegation Settings for the Portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getOperationSpec + ); + } - /** - * Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Delegation settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Update Delegation settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Delegation settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Create or Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Create or Update Delegation settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Gets the secret validation key of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the secret validation key of the DelegationSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listSecretsOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.DelegationSettingsGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.DelegationSettingsGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalDelegationSettings, - headersMapper: Mappers.DelegationSettingsGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalDelegationSettings, + headersMapper: Mappers.DelegationSettingsGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "PATCH", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters62, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + httpMethod: "PATCH", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters62, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalDelegationSettings + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalDelegationSettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters62, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters62, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PortalSettingValidationKeyContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PortalSettingValidationKeyContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts b/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts index 8dd8dab2cfc4..e37b328df9e6 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts @@ -6,302 +6,302 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { DeletedServices } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - DeletedServiceContract, - DeletedServicesListBySubscriptionNextOptionalParams, - DeletedServicesListBySubscriptionOptionalParams, - DeletedServicesListBySubscriptionResponse, - DeletedServicesGetByNameOptionalParams, - DeletedServicesGetByNameResponse, - DeletedServicesPurgeOptionalParams, - DeletedServicesListBySubscriptionNextResponse -} from "../models"; + DeletedServiceContract, + DeletedServicesGetByNameOptionalParams, + DeletedServicesGetByNameResponse, + DeletedServicesListBySubscriptionNextOptionalParams, + DeletedServicesListBySubscriptionNextResponse, + DeletedServicesListBySubscriptionOptionalParams, + DeletedServicesListBySubscriptionResponse, + DeletedServicesPurgeOptionalParams +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DeletedServices } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing DeletedServices operations. */ export class DeletedServicesImpl implements DeletedServices { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class DeletedServices class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all soft-deleted services available for undelete for the given subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: DeletedServicesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } + /** + * Initialize a new instance of the class DeletedServices class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - private async *listBySubscriptionPagingPage( - options?: DeletedServicesListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DeletedServicesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists all soft-deleted services available for undelete for the given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: DeletedServicesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listBySubscriptionPagingPage( + options?: DeletedServicesListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DeletedServicesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listBySubscriptionPagingAll( - options?: DeletedServicesListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; + private async *listBySubscriptionPagingAll( + options?: DeletedServicesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } } - } - /** - * Lists all soft-deleted services available for undelete for the given subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: DeletedServicesListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } + /** + * Lists all soft-deleted services available for undelete for the given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: DeletedServicesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } - /** - * Get soft-deleted Api Management Service by name. - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - getByName( - serviceName: string, - location: string, - options?: DeletedServicesGetByNameOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { serviceName, location, options }, - getByNameOperationSpec - ); - } + /** + * Get soft-deleted Api Management Service by name. + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + getByName( + serviceName: string, + location: string, + options?: DeletedServicesGetByNameOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { serviceName, location, options }, + getByNameOperationSpec + ); + } - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - async beginPurge( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Purges Api Management Service (deletes it with no option to undelete). + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + async beginPurge( + serviceName: string, + location: string, + options?: DeletedServicesPurgeOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { serviceName, location, options }, - spec: purgeOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { serviceName, location, options }, + spec: purgeOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - async beginPurgeAndWait( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams - ): Promise { - const poller = await this.beginPurge(serviceName, location, options); - return poller.pollUntilDone(); - } + /** + * Purges Api Management Service (deletes it with no option to undelete). + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + async beginPurgeAndWait( + serviceName: string, + location: string, + options?: DeletedServicesPurgeOptionalParams + ): Promise { + const poller = await this.beginPurge(serviceName, location, options); + return poller.pollUntilDone(); + } - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: DeletedServicesListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: DeletedServicesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DeletedServicesCollection + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeletedServicesCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer }; const getByNameOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DeletedServiceContract + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeletedServiceContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.location - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer }; const purgeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.location - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer }; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DeletedServicesCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeletedServicesCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts index d27a987dc82b..51309967ee74 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts @@ -6,461 +6,461 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Diagnostic } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - DiagnosticContract, - DiagnosticListByServiceNextOptionalParams, - DiagnosticListByServiceOptionalParams, - DiagnosticListByServiceResponse, - DiagnosticGetEntityTagOptionalParams, - DiagnosticGetEntityTagResponse, - DiagnosticGetOptionalParams, - DiagnosticGetResponse, - DiagnosticCreateOrUpdateOptionalParams, - DiagnosticCreateOrUpdateResponse, - DiagnosticUpdateOptionalParams, - DiagnosticUpdateResponse, - DiagnosticDeleteOptionalParams, - DiagnosticListByServiceNextResponse -} from "../models"; + DiagnosticContract, + DiagnosticCreateOrUpdateOptionalParams, + DiagnosticCreateOrUpdateResponse, + DiagnosticDeleteOptionalParams, + DiagnosticGetEntityTagOptionalParams, + DiagnosticGetEntityTagResponse, + DiagnosticGetOptionalParams, + DiagnosticGetResponse, + DiagnosticListByServiceNextOptionalParams, + DiagnosticListByServiceNextResponse, + DiagnosticListByServiceOptionalParams, + DiagnosticListByServiceResponse, + DiagnosticUpdateOptionalParams, + DiagnosticUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Diagnostic } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Diagnostic operations. */ export class DiagnosticImpl implements Diagnostic { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Diagnostic class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Diagnostic class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all diagnostics of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all diagnostics of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DiagnosticListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DiagnosticListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all diagnostics of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all diagnostics of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, diagnosticId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, diagnosticId, options }, + getOperationSpec + ); + } - /** - * Creates a new Diagnostic or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: DiagnosticCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Diagnostic or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: DiagnosticCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, diagnosticId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: DiagnosticUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Diagnostic Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: DiagnosticUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + diagnosticId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Diagnostic. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - options?: DiagnosticDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Diagnostic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + options?: DiagnosticDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, diagnosticId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: DiagnosticListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: DiagnosticListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.DiagnosticGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.DiagnosticGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.DiagnosticGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.DiagnosticUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts b/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts index 7550ac83335b..2fffc59b0677 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts @@ -6,462 +6,462 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Documentation } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - DocumentationContract, - DocumentationListByServiceNextOptionalParams, - DocumentationListByServiceOptionalParams, - DocumentationListByServiceResponse, - DocumentationGetEntityTagOptionalParams, - DocumentationGetEntityTagResponse, - DocumentationGetOptionalParams, - DocumentationGetResponse, - DocumentationCreateOrUpdateOptionalParams, - DocumentationCreateOrUpdateResponse, - DocumentationUpdateContract, - DocumentationUpdateOptionalParams, - DocumentationUpdateResponse, - DocumentationDeleteOptionalParams, - DocumentationListByServiceNextResponse -} from "../models"; + DocumentationContract, + DocumentationCreateOrUpdateOptionalParams, + DocumentationCreateOrUpdateResponse, + DocumentationDeleteOptionalParams, + DocumentationGetEntityTagOptionalParams, + DocumentationGetEntityTagResponse, + DocumentationGetOptionalParams, + DocumentationGetResponse, + DocumentationListByServiceNextOptionalParams, + DocumentationListByServiceNextResponse, + DocumentationListByServiceOptionalParams, + DocumentationListByServiceResponse, + DocumentationUpdateContract, + DocumentationUpdateOptionalParams, + DocumentationUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Documentation } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Documentation operations. */ export class DocumentationImpl implements Documentation { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Documentation class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Documentation class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all Documentations of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all Documentations of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DocumentationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DocumentationListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all Documentations of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all Documentations of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Documentation by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Documentation by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, documentationId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Documentation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Documentation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, documentationId, options }, + getOperationSpec + ); + } - /** - * Creates a new Documentation or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - documentationId: string, - parameters: DocumentationContract, - options?: DocumentationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Documentation or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + documentationId: string, + parameters: DocumentationContract, + options?: DocumentationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, documentationId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Documentation for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Documentation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - parameters: DocumentationUpdateContract, - options?: DocumentationUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - documentationId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Documentation for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Documentation Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + parameters: DocumentationUpdateContract, + options?: DocumentationUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + documentationId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Documentation from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - options?: DocumentationDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Documentation from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + options?: DocumentationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, documentationId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: DocumentationListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: DocumentationListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DocumentationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DocumentationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.DocumentationGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.DocumentationGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DocumentationContract, + headersMapper: Mappers.DocumentationGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DocumentationContract, + headersMapper: Mappers.DocumentationCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.DocumentationContract, + headersMapper: Mappers.DocumentationCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters76, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters76, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DocumentationContract, + headersMapper: Mappers.DocumentationUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters77, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters77, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DocumentationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DocumentationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts b/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts index f718843e6496..cc3814169ca2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts @@ -6,456 +6,456 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { EmailTemplate } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - EmailTemplateContract, - EmailTemplateListByServiceNextOptionalParams, - EmailTemplateListByServiceOptionalParams, - EmailTemplateListByServiceResponse, - TemplateName, - EmailTemplateGetEntityTagOptionalParams, - EmailTemplateGetEntityTagResponse, - EmailTemplateGetOptionalParams, - EmailTemplateGetResponse, - EmailTemplateUpdateParameters, - EmailTemplateCreateOrUpdateOptionalParams, - EmailTemplateCreateOrUpdateResponse, - EmailTemplateUpdateOptionalParams, - EmailTemplateUpdateResponse, - EmailTemplateDeleteOptionalParams, - EmailTemplateListByServiceNextResponse -} from "../models"; + EmailTemplateContract, + EmailTemplateCreateOrUpdateOptionalParams, + EmailTemplateCreateOrUpdateResponse, + EmailTemplateDeleteOptionalParams, + EmailTemplateGetEntityTagOptionalParams, + EmailTemplateGetEntityTagResponse, + EmailTemplateGetOptionalParams, + EmailTemplateGetResponse, + EmailTemplateListByServiceNextOptionalParams, + EmailTemplateListByServiceNextResponse, + EmailTemplateListByServiceOptionalParams, + EmailTemplateListByServiceResponse, + EmailTemplateUpdateOptionalParams, + EmailTemplateUpdateParameters, + EmailTemplateUpdateResponse, + TemplateName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EmailTemplate } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing EmailTemplate operations. */ export class EmailTemplateImpl implements EmailTemplate { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class EmailTemplate class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class EmailTemplate class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets all email templates - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Gets all email templates + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: EmailTemplateListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: EmailTemplateListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Gets all email templates - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Gets all email templates + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the email template specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, templateName, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, options }, - getOperationSpec - ); - } + /** + * Gets the details of the email template specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, templateName, options }, + getOperationSpec + ); + } - /** - * Updates an Email Template. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param parameters Email Template update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Updates an Email Template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param parameters Email Template update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, templateName, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates API Management email template - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - templateName, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates API Management email template + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + templateName, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Reset the Email Template to default template provided by the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - options?: EmailTemplateDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Reset the Email Template to default template provided by the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + options?: EmailTemplateDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, templateName, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: EmailTemplateListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: EmailTemplateListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.EmailTemplateGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.EmailTemplateGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateContract, - headersMapper: Mappers.EmailTemplateGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateContract, + headersMapper: Mappers.EmailTemplateGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateContract - }, - 201: { - bodyMapper: Mappers.EmailTemplateContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateContract + }, + 201: { + bodyMapper: Mappers.EmailTemplateContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters40, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters40, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateContract, - headersMapper: Mappers.EmailTemplateUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateContract, + headersMapper: Mappers.EmailTemplateUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters40, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters40, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts index 490287bf253f..e87908fa3bf2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts @@ -6,604 +6,604 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Gateway } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GatewayContract, - GatewayListByServiceNextOptionalParams, - GatewayListByServiceOptionalParams, - GatewayListByServiceResponse, - GatewayGetEntityTagOptionalParams, - GatewayGetEntityTagResponse, - GatewayGetOptionalParams, - GatewayGetResponse, - GatewayCreateOrUpdateOptionalParams, - GatewayCreateOrUpdateResponse, - GatewayUpdateOptionalParams, - GatewayUpdateResponse, - GatewayDeleteOptionalParams, - GatewayListKeysOptionalParams, - GatewayListKeysResponse, - GatewayKeyRegenerationRequestContract, - GatewayRegenerateKeyOptionalParams, - GatewayTokenRequestContract, - GatewayGenerateTokenOptionalParams, - GatewayGenerateTokenResponse, - GatewayListByServiceNextResponse -} from "../models"; + GatewayContract, + GatewayCreateOrUpdateOptionalParams, + GatewayCreateOrUpdateResponse, + GatewayDeleteOptionalParams, + GatewayGenerateTokenOptionalParams, + GatewayGenerateTokenResponse, + GatewayGetEntityTagOptionalParams, + GatewayGetEntityTagResponse, + GatewayGetOptionalParams, + GatewayGetResponse, + GatewayKeyRegenerationRequestContract, + GatewayListByServiceNextOptionalParams, + GatewayListByServiceNextResponse, + GatewayListByServiceOptionalParams, + GatewayListByServiceResponse, + GatewayListKeysOptionalParams, + GatewayListKeysResponse, + GatewayRegenerateKeyOptionalParams, + GatewayTokenRequestContract, + GatewayUpdateOptionalParams, + GatewayUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Gateway } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Gateway operations. */ export class GatewayImpl implements Gateway { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Gateway class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Gateway class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of gateways registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of gateways registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GatewayListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GatewayListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of gateways registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of gateways registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + getOperationSpec + ); + } - /** - * Creates or updates a Gateway to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayContract, - options?: GatewayCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates a Gateway to be used in Api Management instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayContract, + options?: GatewayCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Gateway details. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - parameters: GatewayContract, - options?: GatewayUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Gateway details. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + parameters: GatewayContract, + options?: GatewayUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + gatewayId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes specific Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - options?: GatewayDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + options?: GatewayDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Retrieves gateway keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listKeys( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayListKeysOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listKeysOperationSpec - ); - } + /** + * Retrieves gateway keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listKeys( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayListKeysOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + listKeysOperationSpec + ); + } - /** - * Regenerates specified gateway key invalidating any tokens created with it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway key regeneration request contract properties. - * @param options The options parameters. - */ - regenerateKey( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayKeyRegenerationRequestContract, - options?: GatewayRegenerateKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - regenerateKeyOperationSpec - ); - } + /** + * Regenerates specified gateway key invalidating any tokens created with it. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway key regeneration request contract properties. + * @param options The options parameters. + */ + regenerateKey( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayKeyRegenerationRequestContract, + options?: GatewayRegenerateKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, parameters, options }, + regenerateKeyOperationSpec + ); + } - /** - * Gets the Shared Access Authorization Token for the gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway token request contract properties. - * @param options The options parameters. - */ - generateToken( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayTokenRequestContract, - options?: GatewayGenerateTokenOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - generateTokenOperationSpec - ); - } + /** + * Gets the Shared Access Authorization Token for the gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway token request contract properties. + * @param options The options parameters. + */ + generateToken( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayTokenRequestContract, + options?: GatewayGenerateTokenOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, parameters, options }, + generateTokenOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: GatewayListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: GatewayListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GatewayGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayContract, + headersMapper: Mappers.GatewayGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GatewayContract, + headersMapper: Mappers.GatewayCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GatewayContract, + headersMapper: Mappers.GatewayCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters41, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters41, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.GatewayContract, + headersMapper: Mappers.GatewayUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters41, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters41, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listKeysOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayKeysContract, - headersMapper: Mappers.GatewayListKeysHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GatewayKeysContract, + headersMapper: Mappers.GatewayListKeysHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const regenerateKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters42, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters42, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const generateTokenOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayTokenContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GatewayTokenContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters43, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters43, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts index b355825a6bfe..add21a6cb2b3 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts @@ -6,367 +6,367 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { GatewayApi } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiContract, - GatewayApiListByServiceNextOptionalParams, - GatewayApiListByServiceOptionalParams, - GatewayApiListByServiceResponse, - GatewayApiGetEntityTagOptionalParams, - GatewayApiGetEntityTagResponse, - GatewayApiCreateOrUpdateOptionalParams, - GatewayApiCreateOrUpdateResponse, - GatewayApiDeleteOptionalParams, - GatewayApiListByServiceNextResponse -} from "../models"; + ApiContract, + GatewayApiCreateOrUpdateOptionalParams, + GatewayApiCreateOrUpdateResponse, + GatewayApiDeleteOptionalParams, + GatewayApiGetEntityTagOptionalParams, + GatewayApiGetEntityTagResponse, + GatewayApiListByServiceNextOptionalParams, + GatewayApiListByServiceNextResponse, + GatewayApiListByServiceOptionalParams, + GatewayApiListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GatewayApi } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GatewayApi operations. */ export class GatewayApiImpl implements GatewayApi { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GatewayApi class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GatewayApi class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of the APIs associated with a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - gatewayId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - settings + /** + * Lists a collection of the APIs associated with a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + gatewayId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GatewayApiListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - gatewayId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - gatewayId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GatewayApiListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + gatewayId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + gatewayId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of the APIs associated with a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of the APIs associated with a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + listByServiceOperationSpec + ); + } - /** - * Checks that API entity specified by identifier is associated with the Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, apiId, options }, - getEntityTagOperationSpec - ); - } + /** + * Checks that API entity specified by identifier is associated with the Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, apiId, options }, + getEntityTagOperationSpec + ); + } - /** - * Adds an API to the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, apiId, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds an API to the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, apiId, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified API from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, apiId, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified API from the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, apiId, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - nextLink: string, - options?: GatewayApiListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + nextLink: string, + options?: GatewayApiListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayApiGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GatewayApiGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract - }, - 201: { - bodyMapper: Mappers.ApiContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiContract + }, + 201: { + bodyMapper: Mappers.ApiContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters45, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters45, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts index bac861289331..eb64476cbd56 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts @@ -6,446 +6,446 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { GatewayCertificateAuthority } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GatewayCertificateAuthorityContract, - GatewayCertificateAuthorityListByServiceNextOptionalParams, - GatewayCertificateAuthorityListByServiceOptionalParams, - GatewayCertificateAuthorityListByServiceResponse, - GatewayCertificateAuthorityGetEntityTagOptionalParams, - GatewayCertificateAuthorityGetEntityTagResponse, - GatewayCertificateAuthorityGetOptionalParams, - GatewayCertificateAuthorityGetResponse, - GatewayCertificateAuthorityCreateOrUpdateOptionalParams, - GatewayCertificateAuthorityCreateOrUpdateResponse, - GatewayCertificateAuthorityDeleteOptionalParams, - GatewayCertificateAuthorityListByServiceNextResponse -} from "../models"; + GatewayCertificateAuthorityContract, + GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + GatewayCertificateAuthorityCreateOrUpdateResponse, + GatewayCertificateAuthorityDeleteOptionalParams, + GatewayCertificateAuthorityGetEntityTagOptionalParams, + GatewayCertificateAuthorityGetEntityTagResponse, + GatewayCertificateAuthorityGetOptionalParams, + GatewayCertificateAuthorityGetResponse, + GatewayCertificateAuthorityListByServiceNextOptionalParams, + GatewayCertificateAuthorityListByServiceNextResponse, + GatewayCertificateAuthorityListByServiceOptionalParams, + GatewayCertificateAuthorityListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GatewayCertificateAuthority } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GatewayCertificateAuthority operations. */ export class GatewayCertificateAuthorityImpl - implements GatewayCertificateAuthority { - private readonly client: ApiManagementClient; + implements GatewayCertificateAuthority { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GatewayCertificateAuthority class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GatewayCertificateAuthority class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of Certificate Authorities for the specified Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - gatewayId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - settings + /** + * Lists the collection of Certificate Authorities for the specified Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + gatewayId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GatewayCertificateAuthorityListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - gatewayId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - gatewayId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GatewayCertificateAuthorityListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + gatewayId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + gatewayId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of Certificate Authorities for the specified Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists the collection of Certificate Authorities for the specified Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + listByServiceOperationSpec + ); + } - /** - * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, certificateId, options }, - getEntityTagOperationSpec - ); - } + /** + * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, certificateId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get assigned Gateway Certificate Authority details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, certificateId, options }, - getOperationSpec - ); - } + /** + * Get assigned Gateway Certificate Authority details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, certificateId, options }, + getOperationSpec + ); + } - /** - * Assign Certificate entity to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Gateway certificate authority details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - parameters: GatewayCertificateAuthorityContract, - options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - gatewayId, - certificateId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Assign Certificate entity to Gateway entity as Certificate Authority. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param parameters Gateway certificate authority details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + parameters: GatewayCertificateAuthorityContract, + options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + gatewayId, + certificateId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Remove relationship between Certificate Authority and Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - ifMatch: string, - options?: GatewayCertificateAuthorityDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Remove relationship between Certificate Authority and Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + ifMatch: string, + options?: GatewayCertificateAuthorityDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + gatewayId, + certificateId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - nextLink: string, - options?: GatewayCertificateAuthorityListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + nextLink: string, + options?: GatewayCertificateAuthorityListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCertificateAuthorityCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayCertificateAuthorityGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GatewayCertificateAuthorityGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityContract, - headersMapper: Mappers.GatewayCertificateAuthorityGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCertificateAuthorityContract, + headersMapper: Mappers.GatewayCertificateAuthorityGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityContract, - headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GatewayCertificateAuthorityContract, - headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GatewayCertificateAuthorityContract, + headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GatewayCertificateAuthorityContract, + headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters46, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId, - Parameters.gatewayId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters46, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId, + Parameters.gatewayId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCertificateAuthorityCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts index c65ce1a26b6b..8fde59764dc9 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts @@ -6,433 +6,433 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { GatewayHostnameConfiguration } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GatewayHostnameConfigurationContract, - GatewayHostnameConfigurationListByServiceNextOptionalParams, - GatewayHostnameConfigurationListByServiceOptionalParams, - GatewayHostnameConfigurationListByServiceResponse, - GatewayHostnameConfigurationGetEntityTagOptionalParams, - GatewayHostnameConfigurationGetEntityTagResponse, - GatewayHostnameConfigurationGetOptionalParams, - GatewayHostnameConfigurationGetResponse, - GatewayHostnameConfigurationCreateOrUpdateOptionalParams, - GatewayHostnameConfigurationCreateOrUpdateResponse, - GatewayHostnameConfigurationDeleteOptionalParams, - GatewayHostnameConfigurationListByServiceNextResponse -} from "../models"; + GatewayHostnameConfigurationContract, + GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + GatewayHostnameConfigurationCreateOrUpdateResponse, + GatewayHostnameConfigurationDeleteOptionalParams, + GatewayHostnameConfigurationGetEntityTagOptionalParams, + GatewayHostnameConfigurationGetEntityTagResponse, + GatewayHostnameConfigurationGetOptionalParams, + GatewayHostnameConfigurationGetResponse, + GatewayHostnameConfigurationListByServiceNextOptionalParams, + GatewayHostnameConfigurationListByServiceNextResponse, + GatewayHostnameConfigurationListByServiceOptionalParams, + GatewayHostnameConfigurationListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GatewayHostnameConfiguration } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GatewayHostnameConfiguration operations. */ export class GatewayHostnameConfigurationImpl - implements GatewayHostnameConfiguration { - private readonly client: ApiManagementClient; + implements GatewayHostnameConfiguration { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GatewayHostnameConfiguration class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GatewayHostnameConfiguration class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of hostname configurations for the specified gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - gatewayId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - settings + /** + * Lists the collection of hostname configurations for the specified gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + gatewayId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GatewayHostnameConfigurationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - gatewayId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - gatewayId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GatewayHostnameConfigurationListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + gatewayId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + gatewayId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of hostname configurations for the specified gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists the collection of hostname configurations for the specified gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + listByServiceOperationSpec + ); + } - /** - * Checks that hostname configuration entity specified by identifier exists for specified Gateway - * entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, options }, - getEntityTagOperationSpec - ); - } + /** + * Checks that hostname configuration entity specified by identifier exists for specified Gateway + * entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, hcId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get details of a hostname configuration - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, options }, - getOperationSpec - ); - } + /** + * Get details of a hostname configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, hcId, options }, + getOperationSpec + ); + } - /** - * Creates of updates hostname configuration for a Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param parameters Gateway hostname configuration details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - parameters: GatewayHostnameConfigurationContract, - options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates of updates hostname configuration for a Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param parameters Gateway hostname configuration details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + parameters: GatewayHostnameConfigurationContract, + options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, hcId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified hostname configuration from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - ifMatch: string, - options?: GatewayHostnameConfigurationDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified hostname configuration from the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + ifMatch: string, + options?: GatewayHostnameConfigurationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, hcId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - nextLink: string, - options?: GatewayHostnameConfigurationListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + nextLink: string, + options?: GatewayHostnameConfigurationListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayHostnameConfigurationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayHostnameConfigurationGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GatewayHostnameConfigurationGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId, - Parameters.hcId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId, + Parameters.hcId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationContract, - headersMapper: Mappers.GatewayHostnameConfigurationGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayHostnameConfigurationContract, + headersMapper: Mappers.GatewayHostnameConfigurationGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId, - Parameters.hcId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId, + Parameters.hcId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationContract, - headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GatewayHostnameConfigurationContract, - headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GatewayHostnameConfigurationContract, + headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GatewayHostnameConfigurationContract, + headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters44, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId, - Parameters.hcId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters44, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId, + Parameters.hcId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId, - Parameters.hcId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId, + Parameters.hcId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayHostnameConfigurationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts index 9081ec027225..ff9d7b6ecf36 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts @@ -6,487 +6,487 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { GlobalSchema } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - GlobalSchemaContract, - GlobalSchemaListByServiceNextOptionalParams, - GlobalSchemaListByServiceOptionalParams, - GlobalSchemaListByServiceResponse, - GlobalSchemaGetEntityTagOptionalParams, - GlobalSchemaGetEntityTagResponse, - GlobalSchemaGetOptionalParams, - GlobalSchemaGetResponse, - GlobalSchemaCreateOrUpdateOptionalParams, - GlobalSchemaCreateOrUpdateResponse, - GlobalSchemaDeleteOptionalParams, - GlobalSchemaListByServiceNextResponse -} from "../models"; + GlobalSchemaContract, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaCreateOrUpdateResponse, + GlobalSchemaDeleteOptionalParams, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetEntityTagResponse, + GlobalSchemaGetOptionalParams, + GlobalSchemaGetResponse, + GlobalSchemaListByServiceNextOptionalParams, + GlobalSchemaListByServiceNextResponse, + GlobalSchemaListByServiceOptionalParams, + GlobalSchemaListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GlobalSchema } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GlobalSchema operations. */ export class GlobalSchemaImpl implements GlobalSchema { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GlobalSchema class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GlobalSchema class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of schemas registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of schemas registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GlobalSchemaListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GlobalSchemaListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of schemas registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of schemas registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, schemaId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, schemaId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, schemaId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, schemaId, options }, + getOperationSpec + ); + } - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - GlobalSchemaCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GlobalSchemaCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, schemaId, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - GlobalSchemaCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, schemaId, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GlobalSchemaCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - schemaId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + schemaId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes specific Schema. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - schemaId: string, - ifMatch: string, - options?: GlobalSchemaDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, schemaId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific Schema. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options?: GlobalSchemaDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, schemaId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: GlobalSchemaListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: GlobalSchemaListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GlobalSchemaGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GlobalSchemaGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters66, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.schemaId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters66, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts index 1d2fa2cedd2a..f6d5f9713d5e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts @@ -6,508 +6,508 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { GraphQLApiResolver } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ResolverContract, - GraphQLApiResolverListByApiNextOptionalParams, - GraphQLApiResolverListByApiOptionalParams, - GraphQLApiResolverListByApiResponse, - GraphQLApiResolverGetEntityTagOptionalParams, - GraphQLApiResolverGetEntityTagResponse, - GraphQLApiResolverGetOptionalParams, - GraphQLApiResolverGetResponse, - GraphQLApiResolverCreateOrUpdateOptionalParams, - GraphQLApiResolverCreateOrUpdateResponse, - ResolverUpdateContract, - GraphQLApiResolverUpdateOptionalParams, - GraphQLApiResolverUpdateResponse, - GraphQLApiResolverDeleteOptionalParams, - GraphQLApiResolverListByApiNextResponse -} from "../models"; + GraphQLApiResolverCreateOrUpdateOptionalParams, + GraphQLApiResolverCreateOrUpdateResponse, + GraphQLApiResolverDeleteOptionalParams, + GraphQLApiResolverGetEntityTagOptionalParams, + GraphQLApiResolverGetEntityTagResponse, + GraphQLApiResolverGetOptionalParams, + GraphQLApiResolverGetResponse, + GraphQLApiResolverListByApiNextOptionalParams, + GraphQLApiResolverListByApiNextResponse, + GraphQLApiResolverListByApiOptionalParams, + GraphQLApiResolverListByApiResponse, + GraphQLApiResolverUpdateOptionalParams, + GraphQLApiResolverUpdateResponse, + ResolverContract, + ResolverUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GraphQLApiResolver } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GraphQLApiResolver operations. */ export class GraphQLApiResolverImpl implements GraphQLApiResolver { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GraphQLApiResolver class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GraphQLApiResolver class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of the resolvers for the specified GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists a collection of the resolvers for the specified GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GraphQLApiResolverListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GraphQLApiResolverListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of the resolvers for the specified GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Lists a collection of the resolvers for the specified GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the GraphQL API Resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the GraphQL API Resolver specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, options }, + getOperationSpec + ); + } - /** - * Creates a new resolver in the GraphQL API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - parameters: ResolverContract, - options?: GraphQLApiResolverCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new resolver in the GraphQL API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + parameters: ResolverContract, + options?: GraphQLApiResolverCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + resolverId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the resolver in the GraphQL API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters GraphQL API Resolver Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - parameters: ResolverUpdateContract, - options?: GraphQLApiResolverUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the resolver in the GraphQL API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters GraphQL API Resolver Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + parameters: ResolverUpdateContract, + options?: GraphQLApiResolverUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + resolverId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified resolver in the GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - options?: GraphQLApiResolverDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified resolver in the GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + options?: GraphQLApiResolverDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: GraphQLApiResolverListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: GraphQLApiResolverListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApiNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResolverCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResolverCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GraphQLApiResolverGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GraphQLApiResolverGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResolverContract, + headersMapper: Mappers.GraphQLApiResolverGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ResolverContract, + headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ResolverContract, + headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ResolverContract, + headersMapper: Mappers.GraphQLApiResolverUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResolverCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResolverCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts index 884fac6979f9..727eeb10bc43 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts @@ -6,473 +6,473 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { GraphQLApiResolverPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PolicyContract, - GraphQLApiResolverPolicyListByResolverNextOptionalParams, - GraphQLApiResolverPolicyListByResolverOptionalParams, - GraphQLApiResolverPolicyListByResolverResponse, - PolicyIdName, - GraphQLApiResolverPolicyGetEntityTagOptionalParams, - GraphQLApiResolverPolicyGetEntityTagResponse, - GraphQLApiResolverPolicyGetOptionalParams, - GraphQLApiResolverPolicyGetResponse, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - GraphQLApiResolverPolicyCreateOrUpdateResponse, - GraphQLApiResolverPolicyDeleteOptionalParams, - GraphQLApiResolverPolicyListByResolverNextResponse -} from "../models"; + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + GraphQLApiResolverPolicyCreateOrUpdateResponse, + GraphQLApiResolverPolicyDeleteOptionalParams, + GraphQLApiResolverPolicyGetEntityTagOptionalParams, + GraphQLApiResolverPolicyGetEntityTagResponse, + GraphQLApiResolverPolicyGetOptionalParams, + GraphQLApiResolverPolicyGetResponse, + GraphQLApiResolverPolicyListByResolverNextOptionalParams, + GraphQLApiResolverPolicyListByResolverNextResponse, + GraphQLApiResolverPolicyListByResolverOptionalParams, + GraphQLApiResolverPolicyListByResolverResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GraphQLApiResolverPolicy } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GraphQLApiResolverPolicy operations. */ export class GraphQLApiResolverPolicyImpl implements GraphQLApiResolverPolicy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GraphQLApiResolverPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GraphQLApiResolverPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the list of policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - public listByResolver( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResolverPagingAll( - resourceGroupName, - serviceName, - apiId, - resolverId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResolverPagingPage( - resourceGroupName, - serviceName, - apiId, - resolverId, - options, - settings + /** + * Get the list of policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + public listByResolver( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResolverPagingAll( + resourceGroupName, + serviceName, + apiId, + resolverId, + options ); - } - }; - } - - private async *listByResolverPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GraphQLApiResolverPolicyListByResolverResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResolver( - resourceGroupName, - serviceName, - apiId, - resolverId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResolverPagingPage( + resourceGroupName, + serviceName, + apiId, + resolverId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByResolverNext( - resourceGroupName, - serviceName, - apiId, - resolverId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByResolverPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GraphQLApiResolverPolicyListByResolverResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResolver( + resourceGroupName, + serviceName, + apiId, + resolverId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResolverNext( + resourceGroupName, + serviceName, + apiId, + resolverId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByResolverPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResolverPagingPage( - resourceGroupName, - serviceName, - apiId, - resolverId, - options - )) { - yield* page; + private async *listByResolverPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResolverPagingPage( + resourceGroupName, + serviceName, + apiId, + resolverId, + options + )) { + yield* page; + } } - } - /** - * Get the list of policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - private _listByResolver( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, options }, - listByResolverOperationSpec - ); - } + /** + * Get the list of policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + private _listByResolver( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, options }, + listByResolverOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, - getOperationSpec - ); - } + /** + * Get the policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates policy configuration for the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates policy configuration for the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the policy configuration at the GraphQL Api Resolver. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: GraphQLApiResolverPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the policy configuration at the GraphQL Api Resolver. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: GraphQLApiResolverPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByResolverNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByResolver method. - * @param options The options parameters. - */ - private _listByResolverNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - nextLink: string, - options?: GraphQLApiResolverPolicyListByResolverNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, nextLink, options }, - listByResolverNextOperationSpec - ); - } + /** + * ListByResolverNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByResolver method. + * @param options The options parameters. + */ + private _listByResolverNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + nextLink: string, + options?: GraphQLApiResolverPolicyListByResolverNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, nextLink, options }, + listByResolverNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByResolverOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GraphQLApiResolverPolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GraphQLApiResolverPolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.GraphQLApiResolverPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.GraphQLApiResolverPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId, + Parameters.resolverId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByResolverNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/group.ts b/sdk/apimanagement/arm-apimanagement/src/operations/group.ts index d2e53a84fd5e..453d9a8f08e2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/group.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/group.ts @@ -6,451 +6,451 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Group } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GroupContract, - GroupListByServiceNextOptionalParams, - GroupListByServiceOptionalParams, - GroupListByServiceResponse, - GroupGetEntityTagOptionalParams, - GroupGetEntityTagResponse, - GroupGetOptionalParams, - GroupGetResponse, - GroupCreateParameters, - GroupCreateOrUpdateOptionalParams, - GroupCreateOrUpdateResponse, - GroupUpdateParameters, - GroupUpdateOptionalParams, - GroupUpdateResponse, - GroupDeleteOptionalParams, - GroupListByServiceNextResponse -} from "../models"; + GroupContract, + GroupCreateOrUpdateOptionalParams, + GroupCreateOrUpdateResponse, + GroupCreateParameters, + GroupDeleteOptionalParams, + GroupGetEntityTagOptionalParams, + GroupGetEntityTagResponse, + GroupGetOptionalParams, + GroupGetResponse, + GroupListByServiceNextOptionalParams, + GroupListByServiceNextResponse, + GroupListByServiceOptionalParams, + GroupListByServiceResponse, + GroupUpdateOptionalParams, + GroupUpdateParameters, + GroupUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Group } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Group operations. */ export class GroupImpl implements Group { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Group class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Group class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of groups defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of groups defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GroupListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GroupListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of groups defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of groups defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - groupId: string, - parameters: GroupCreateParameters, - options?: GroupCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + groupId: string, + parameters: GroupCreateParameters, + options?: GroupCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - parameters: GroupUpdateParameters, - options?: GroupUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options?: GroupUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific group of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - options?: GroupDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific group of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + options?: GroupDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: GroupListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: GroupListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GroupGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GroupGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupContract, + headersMapper: Mappers.GroupGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GroupContract, + headersMapper: Mappers.GroupCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GroupContract, + headersMapper: Mappers.GroupCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters47, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters47, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.GroupContract, + headersMapper: Mappers.GroupUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters48, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters48, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts b/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts index d0e13397ab74..ade4be6fc3f3 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts @@ -6,358 +6,358 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { GroupUser } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - UserContract, - GroupUserListNextOptionalParams, - GroupUserListOptionalParams, - GroupUserListResponse, - GroupUserCheckEntityExistsOptionalParams, - GroupUserCheckEntityExistsResponse, - GroupUserCreateOptionalParams, - GroupUserCreateResponse, - GroupUserDeleteOptionalParams, - GroupUserListNextResponse -} from "../models"; + GroupUserCheckEntityExistsOptionalParams, + GroupUserCheckEntityExistsResponse, + GroupUserCreateOptionalParams, + GroupUserCreateResponse, + GroupUserDeleteOptionalParams, + GroupUserListNextOptionalParams, + GroupUserListNextResponse, + GroupUserListOptionalParams, + GroupUserListResponse, + UserContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GroupUser } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GroupUser operations. */ export class GroupUserImpl implements GroupUser { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GroupUser class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GroupUser class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - groupId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - groupId, - options, - settings + /** + * Lists a collection of user entities associated with the group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + groupId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GroupUserListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - groupId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + serviceName, + groupId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - groupId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GroupUserListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + groupId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + groupId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - groupId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + groupId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, options }, - listOperationSpec - ); - } + /** + * Lists a collection of user entities associated with the group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, options }, + listOperationSpec + ); + } - /** - * Checks that user entity specified by identifier is associated with the group entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, userId, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Checks that user entity specified by identifier is associated with the group entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, userId, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Add existing user to existing group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, userId, options }, - createOperationSpec - ); - } + /** + * Add existing user to existing group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, userId, options }, + createOperationSpec + ); + } - /** - * Remove existing user from existing group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, userId, options }, - deleteOperationSpec - ); - } + /** + * Remove existing user from existing group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, userId, options }, + deleteOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - groupId: string, - nextLink: string, - options?: GroupUserListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + groupId: string, + nextLink: string, + options?: GroupUserListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", + httpMethod: "HEAD", + responses: { + 204: {}, + 404: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.UserContract - }, - 201: { - bodyMapper: Mappers.UserContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.UserContract + }, + 201: { + bodyMapper: Mappers.UserContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts index 7718b64cc6b3..0b3cff6cddc2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts @@ -6,511 +6,511 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { IdentityProvider } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IdentityProviderContract, - IdentityProviderListByServiceNextOptionalParams, - IdentityProviderListByServiceOptionalParams, - IdentityProviderListByServiceResponse, - IdentityProviderType, - IdentityProviderGetEntityTagOptionalParams, - IdentityProviderGetEntityTagResponse, - IdentityProviderGetOptionalParams, - IdentityProviderGetResponse, - IdentityProviderCreateContract, - IdentityProviderCreateOrUpdateOptionalParams, - IdentityProviderCreateOrUpdateResponse, - IdentityProviderUpdateParameters, - IdentityProviderUpdateOptionalParams, - IdentityProviderUpdateResponse, - IdentityProviderDeleteOptionalParams, - IdentityProviderListSecretsOptionalParams, - IdentityProviderListSecretsResponse, - IdentityProviderListByServiceNextResponse -} from "../models"; + IdentityProviderContract, + IdentityProviderCreateContract, + IdentityProviderCreateOrUpdateOptionalParams, + IdentityProviderCreateOrUpdateResponse, + IdentityProviderDeleteOptionalParams, + IdentityProviderGetEntityTagOptionalParams, + IdentityProviderGetEntityTagResponse, + IdentityProviderGetOptionalParams, + IdentityProviderGetResponse, + IdentityProviderListByServiceNextOptionalParams, + IdentityProviderListByServiceNextResponse, + IdentityProviderListByServiceOptionalParams, + IdentityProviderListByServiceResponse, + IdentityProviderListSecretsOptionalParams, + IdentityProviderListSecretsResponse, + IdentityProviderType, + IdentityProviderUpdateOptionalParams, + IdentityProviderUpdateParameters, + IdentityProviderUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { IdentityProvider } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing IdentityProvider operations. */ export class IdentityProviderImpl implements IdentityProvider { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class IdentityProvider class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class IdentityProvider class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of Identity Provider configured in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: IdentityProviderListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IdentityProviderListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of Identity Provider configured in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, identityProviderName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the identityProvider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, identityProviderName, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, identityProviderName, options }, - getOperationSpec - ); - } + /** + * Gets the configuration details of the identity Provider configured in specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, identityProviderName, options }, + getOperationSpec + ); + } - /** - * Creates or Updates the IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - parameters: IdentityProviderCreateContract, - options?: IdentityProviderCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - identityProviderName, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates the IdentityProvider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + parameters: IdentityProviderCreateContract, + options?: IdentityProviderCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + identityProviderName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Updates an existing IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - parameters: IdentityProviderUpdateParameters, - options?: IdentityProviderUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing IdentityProvider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + parameters: IdentityProviderUpdateParameters, + options?: IdentityProviderUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + identityProviderName, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified identity provider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - options?: IdentityProviderDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the specified identity provider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + options?: IdentityProviderDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + identityProviderName, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * Gets the client secret details of the Identity Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, identityProviderName, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the client secret details of the Identity Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, identityProviderName, options }, + listSecretsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: IdentityProviderListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: IdentityProviderListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderList + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.IdentityProviderGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.IdentityProviderGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderContract, + headersMapper: Mappers.IdentityProviderGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderContract, + headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.IdentityProviderContract, + headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters49, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters49, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderContract, + headersMapper: Mappers.IdentityProviderUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters50, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters50, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ClientSecretContract, - headersMapper: Mappers.IdentityProviderListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ClientSecretContract, + headersMapper: Mappers.IdentityProviderListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderList + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/index.ts b/sdk/apimanagement/arm-apimanagement/src/operations/index.ts index 83434e88bcd2..c6971639d6be 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/index.ts @@ -6,91 +6,91 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./api"; -export * from "./apiRevision"; -export * from "./apiRelease"; -export * from "./apiOperation"; -export * from "./apiOperationPolicy"; -export * from "./tag"; -export * from "./graphQLApiResolver"; -export * from "./graphQLApiResolverPolicy"; -export * from "./apiProduct"; -export * from "./apiPolicy"; -export * from "./apiSchema"; -export * from "./apiDiagnostic"; -export * from "./apiIssue"; -export * from "./apiIssueComment"; -export * from "./apiIssueAttachment"; -export * from "./apiTagDescription"; -export * from "./operationOperations"; -export * from "./apiWiki"; -export * from "./apiWikis"; -export * from "./apiExport"; -export * from "./apiVersionSet"; -export * from "./authorizationServer"; -export * from "./authorizationProvider"; -export * from "./authorization"; -export * from "./authorizationLoginLinks"; -export * from "./authorizationAccessPolicy"; -export * from "./backend"; -export * from "./cache"; -export * from "./certificate"; -export * from "./contentType"; -export * from "./contentItem"; -export * from "./deletedServices"; -export * from "./apiManagementOperations"; -export * from "./apiManagementServiceSkus"; -export * from "./apiManagementService"; -export * from "./diagnostic"; -export * from "./emailTemplate"; -export * from "./gateway"; -export * from "./gatewayHostnameConfiguration"; -export * from "./gatewayApi"; -export * from "./gatewayCertificateAuthority"; -export * from "./group"; -export * from "./groupUser"; -export * from "./identityProvider"; -export * from "./issue"; -export * from "./logger"; -export * from "./namedValue"; -export * from "./networkStatus"; -export * from "./notification"; -export * from "./notificationRecipientUser"; -export * from "./notificationRecipientEmail"; -export * from "./openIdConnectProvider"; -export * from "./outboundNetworkDependenciesEndpoints"; -export * from "./policy"; -export * from "./policyDescription"; -export * from "./policyFragment"; -export * from "./portalConfig"; -export * from "./portalRevision"; -export * from "./portalSettings"; -export * from "./signInSettings"; -export * from "./signUpSettings"; -export * from "./delegationSettings"; -export * from "./privateEndpointConnectionOperations"; -export * from "./product"; -export * from "./productApi"; -export * from "./productGroup"; -export * from "./productSubscriptions"; -export * from "./productPolicy"; -export * from "./productWiki"; -export * from "./productWikis"; -export * from "./quotaByCounterKeys"; -export * from "./quotaByPeriodKeys"; -export * from "./region"; -export * from "./reports"; -export * from "./globalSchema"; -export * from "./tenantSettings"; -export * from "./apiManagementSkus"; -export * from "./subscription"; -export * from "./tagResource"; -export * from "./tenantAccess"; -export * from "./tenantAccessGit"; -export * from "./tenantConfiguration"; -export * from "./user"; -export * from "./userGroup"; -export * from "./userSubscription"; -export * from "./userIdentities"; -export * from "./userConfirmationPassword"; -export * from "./documentation"; +export * from "./api.js"; +export * from "./apiDiagnostic.js"; +export * from "./apiExport.js"; +export * from "./apiIssue.js"; +export * from "./apiIssueAttachment.js"; +export * from "./apiIssueComment.js"; +export * from "./apiManagementOperations.js"; +export * from "./apiManagementService.js"; +export * from "./apiManagementServiceSkus.js"; +export * from "./apiManagementSkus.js"; +export * from "./apiOperation.js"; +export * from "./apiOperationPolicy.js"; +export * from "./apiPolicy.js"; +export * from "./apiProduct.js"; +export * from "./apiRelease.js"; +export * from "./apiRevision.js"; +export * from "./apiSchema.js"; +export * from "./apiTagDescription.js"; +export * from "./apiVersionSet.js"; +export * from "./apiWiki.js"; +export * from "./apiWikis.js"; +export * from "./authorization.js"; +export * from "./authorizationAccessPolicy.js"; +export * from "./authorizationLoginLinks.js"; +export * from "./authorizationProvider.js"; +export * from "./authorizationServer.js"; +export * from "./backend.js"; +export * from "./cache.js"; +export * from "./certificate.js"; +export * from "./contentItem.js"; +export * from "./contentType.js"; +export * from "./delegationSettings.js"; +export * from "./deletedServices.js"; +export * from "./diagnostic.js"; +export * from "./documentation.js"; +export * from "./emailTemplate.js"; +export * from "./gateway.js"; +export * from "./gatewayApi.js"; +export * from "./gatewayCertificateAuthority.js"; +export * from "./gatewayHostnameConfiguration.js"; +export * from "./globalSchema.js"; +export * from "./graphQLApiResolver.js"; +export * from "./graphQLApiResolverPolicy.js"; +export * from "./group.js"; +export * from "./groupUser.js"; +export * from "./identityProvider.js"; +export * from "./issue.js"; +export * from "./logger.js"; +export * from "./namedValue.js"; +export * from "./networkStatus.js"; +export * from "./notification.js"; +export * from "./notificationRecipientEmail.js"; +export * from "./notificationRecipientUser.js"; +export * from "./openIdConnectProvider.js"; +export * from "./operationOperations.js"; +export * from "./outboundNetworkDependenciesEndpoints.js"; +export * from "./policy.js"; +export * from "./policyDescription.js"; +export * from "./policyFragment.js"; +export * from "./portalConfig.js"; +export * from "./portalRevision.js"; +export * from "./portalSettings.js"; +export * from "./privateEndpointConnectionOperations.js"; +export * from "./product.js"; +export * from "./productApi.js"; +export * from "./productGroup.js"; +export * from "./productPolicy.js"; +export * from "./productSubscriptions.js"; +export * from "./productWiki.js"; +export * from "./productWikis.js"; +export * from "./quotaByCounterKeys.js"; +export * from "./quotaByPeriodKeys.js"; +export * from "./region.js"; +export * from "./reports.js"; +export * from "./signInSettings.js"; +export * from "./signUpSettings.js"; +export * from "./subscription.js"; +export * from "./tag.js"; +export * from "./tagResource.js"; +export * from "./tenantAccess.js"; +export * from "./tenantAccessGit.js"; +export * from "./tenantConfiguration.js"; +export * from "./tenantSettings.js"; +export * from "./user.js"; +export * from "./userConfirmationPassword.js"; +export * from "./userGroup.js"; +export * from "./userIdentities.js"; +export * from "./userSubscription.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts index 55bf4c71ee76..1373d7d3fe97 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts @@ -6,247 +6,247 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Issue } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IssueContract, - IssueListByServiceNextOptionalParams, - IssueListByServiceOptionalParams, - IssueListByServiceResponse, - IssueGetOptionalParams, - IssueGetResponse, - IssueListByServiceNextResponse -} from "../models"; + IssueContract, + IssueGetOptionalParams, + IssueGetResponse, + IssueListByServiceNextOptionalParams, + IssueListByServiceNextResponse, + IssueListByServiceOptionalParams, + IssueListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Issue } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Issue operations. */ export class IssueImpl implements Issue { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Issue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Issue class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of issues in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of issues in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: IssueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IssueListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of issues in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of issues in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets API Management issue details - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - issueId: string, - options?: IssueGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, issueId, options }, - getOperationSpec - ); - } + /** + * Gets API Management issue details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + issueId: string, + options?: IssueGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, issueId, options }, + getOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: IssueListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: IssueListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.IssueGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.IssueGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts b/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts index 626d49673b05..fb61e9748ded 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts @@ -6,457 +6,457 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Logger } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - LoggerContract, - LoggerListByServiceNextOptionalParams, - LoggerListByServiceOptionalParams, - LoggerListByServiceResponse, - LoggerGetEntityTagOptionalParams, - LoggerGetEntityTagResponse, - LoggerGetOptionalParams, - LoggerGetResponse, - LoggerCreateOrUpdateOptionalParams, - LoggerCreateOrUpdateResponse, - LoggerUpdateContract, - LoggerUpdateOptionalParams, - LoggerUpdateResponse, - LoggerDeleteOptionalParams, - LoggerListByServiceNextResponse -} from "../models"; + LoggerContract, + LoggerCreateOrUpdateOptionalParams, + LoggerCreateOrUpdateResponse, + LoggerDeleteOptionalParams, + LoggerGetEntityTagOptionalParams, + LoggerGetEntityTagResponse, + LoggerGetOptionalParams, + LoggerGetResponse, + LoggerListByServiceNextOptionalParams, + LoggerListByServiceNextResponse, + LoggerListByServiceOptionalParams, + LoggerListByServiceResponse, + LoggerUpdateContract, + LoggerUpdateOptionalParams, + LoggerUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Logger } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Logger operations. */ export class LoggerImpl implements Logger { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Logger class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Logger class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of loggers in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of loggers in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: LoggerListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LoggerListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of loggers in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of loggers in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the logger specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, loggerId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the logger specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, loggerId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - loggerId: string, - parameters: LoggerContract, - options?: LoggerCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + loggerId: string, + parameters: LoggerContract, + options?: LoggerCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, loggerId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates an existing logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - parameters: LoggerUpdateContract, - options?: LoggerUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - loggerId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options?: LoggerUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + loggerId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - options?: LoggerDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + options?: LoggerDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, loggerId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: LoggerListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: LoggerListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoggerCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.LoggerGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.LoggerGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoggerContract, + headersMapper: Mappers.LoggerGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LoggerContract, + headersMapper: Mappers.LoggerCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.LoggerContract, + headersMapper: Mappers.LoggerCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters51, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters51, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.LoggerContract, + headersMapper: Mappers.LoggerUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters52, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters52, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoggerCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts index c15754457817..8db01415f635 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts @@ -6,834 +6,834 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { NamedValue } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - NamedValueContract, - NamedValueListByServiceNextOptionalParams, - NamedValueListByServiceOptionalParams, - NamedValueListByServiceResponse, - NamedValueGetEntityTagOptionalParams, - NamedValueGetEntityTagResponse, - NamedValueGetOptionalParams, - NamedValueGetResponse, - NamedValueCreateContract, - NamedValueCreateOrUpdateOptionalParams, - NamedValueCreateOrUpdateResponse, - NamedValueUpdateParameters, - NamedValueUpdateOptionalParams, - NamedValueUpdateResponse, - NamedValueDeleteOptionalParams, - NamedValueListValueOptionalParams, - NamedValueListValueResponse, - NamedValueRefreshSecretOptionalParams, - NamedValueRefreshSecretResponse, - NamedValueListByServiceNextResponse -} from "../models"; + NamedValueContract, + NamedValueCreateContract, + NamedValueCreateOrUpdateOptionalParams, + NamedValueCreateOrUpdateResponse, + NamedValueDeleteOptionalParams, + NamedValueGetEntityTagOptionalParams, + NamedValueGetEntityTagResponse, + NamedValueGetOptionalParams, + NamedValueGetResponse, + NamedValueListByServiceNextOptionalParams, + NamedValueListByServiceNextResponse, + NamedValueListByServiceOptionalParams, + NamedValueListByServiceResponse, + NamedValueListValueOptionalParams, + NamedValueListValueResponse, + NamedValueRefreshSecretOptionalParams, + NamedValueRefreshSecretResponse, + NamedValueUpdateOptionalParams, + NamedValueUpdateParameters, + NamedValueUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { NamedValue } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing NamedValue operations. */ export class NamedValueImpl implements NamedValue { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class NamedValue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class NamedValue class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of named values defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of named values defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: NamedValueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NamedValueListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of named values defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of named values defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, namedValueId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, namedValueId, options }, + getOperationSpec + ); + } - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Creates or updates named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - namedValueId, - parameters, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - NamedValueCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + namedValueId, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + NamedValueCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - namedValueId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates or updates named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + namedValueId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Updates the specific named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters, - options - }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - NamedValueUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + parameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + NamedValueUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Updates the specific named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes specific named value from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - options?: NamedValueDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific named value from the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + options?: NamedValueDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, namedValueId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Gets the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - listValue( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueListValueOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, options }, - listValueOperationSpec - ); - } + /** + * Gets the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + listValue( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueListValueOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, namedValueId, options }, + listValueOperationSpec + ); + } - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - async beginRefreshSecret( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueRefreshSecretResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Refresh the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + async beginRefreshSecret( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueRefreshSecretResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, namedValueId, options }, - spec: refreshSecretOperationSpec - }); - const poller = await createHttpPoller< - NamedValueRefreshSecretResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, namedValueId, options }, + spec: refreshSecretOperationSpec + }); + const poller = await createHttpPoller< + NamedValueRefreshSecretResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - async beginRefreshSecretAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams - ): Promise { - const poller = await this.beginRefreshSecret( - resourceGroupName, - serviceName, - namedValueId, - options - ); - return poller.pollUntilDone(); - } + /** + * Refresh the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + async beginRefreshSecretAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams + ): Promise { + const poller = await this.beginRefreshSecret( + resourceGroupName, + serviceName, + namedValueId, + options + ); + return poller.pollUntilDone(); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: NamedValueListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: NamedValueListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NamedValueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.isKeyVaultRefreshFailed - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.isKeyVaultRefreshFailed + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.NamedValueGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.NamedValueGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters53, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters53, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueUpdateHeaders + }, + 201: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueUpdateHeaders + }, + 202: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueUpdateHeaders + }, + 204: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters54, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters54, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listValueOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NamedValueSecretContract, - headersMapper: Mappers.NamedValueListValueHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.NamedValueSecretContract, + headersMapper: Mappers.NamedValueListValueHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept], + serializer }; const refreshSecretOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueRefreshSecretHeaders + }, + 201: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueRefreshSecretHeaders + }, + 202: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueRefreshSecretHeaders + }, + 204: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueRefreshSecretHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NamedValueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts index 8f9ab94e7fee..f17d2ee0938f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts @@ -6,124 +6,124 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { NetworkStatus } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - NetworkStatusListByServiceOptionalParams, - NetworkStatusListByServiceResponse, - NetworkStatusListByLocationOptionalParams, - NetworkStatusListByLocationResponse -} from "../models"; + NetworkStatusListByLocationOptionalParams, + NetworkStatusListByLocationResponse, + NetworkStatusListByServiceOptionalParams, + NetworkStatusListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { NetworkStatus } from "../operationsInterfaces/index.js"; /** Class containing NetworkStatus operations. */ export class NetworkStatusImpl implements NetworkStatus { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class NetworkStatus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class NetworkStatus class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NetworkStatusListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends + * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: NetworkStatusListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the - * Azure Regions like West US, East US, South Central US. - * @param options The options parameters. - */ - listByLocation( - resourceGroupName: string, - serviceName: string, - locationName: string, - options?: NetworkStatusListByLocationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, locationName, options }, - listByLocationOperationSpec - ); - } + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends + * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param locationName Location in which the API Management service is deployed. This is one of the + * Azure Regions like West US, East US, South Central US. + * @param options The options parameters. + */ + listByLocation( + resourceGroupName: string, + serviceName: string, + locationName: string, + options?: NetworkStatusListByLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, locationName, options }, + listByLocationOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkStatusContractByLocation" + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkStatusContractByLocation" + } + } + } } - } + }, + default: { + bodyMapper: Mappers.ErrorResponse } - } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByLocationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkStatusContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkStatusContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.locationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.locationName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts b/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts index 330f9607e8cb..bc60fd68156a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts @@ -6,286 +6,286 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Notification } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - NotificationContract, - NotificationListByServiceNextOptionalParams, - NotificationListByServiceOptionalParams, - NotificationListByServiceResponse, - NotificationName, - NotificationGetOptionalParams, - NotificationGetResponse, - NotificationCreateOrUpdateOptionalParams, - NotificationCreateOrUpdateResponse, - NotificationListByServiceNextResponse -} from "../models"; + NotificationContract, + NotificationCreateOrUpdateOptionalParams, + NotificationCreateOrUpdateResponse, + NotificationGetOptionalParams, + NotificationGetResponse, + NotificationListByServiceNextOptionalParams, + NotificationListByServiceNextResponse, + NotificationListByServiceOptionalParams, + NotificationListByServiceResponse, + NotificationName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Notification } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Notification operations. */ export class NotificationImpl implements Notification { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Notification class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Notification class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of properties defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: NotificationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NotificationListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of properties defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the details of the Notification specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Notification specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, options }, + getOperationSpec + ); + } - /** - * Create or Update API Management publisher notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - createOrUpdateOperationSpec - ); - } + /** + * Create or Update API Management publisher notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, options }, + createOrUpdateOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: NotificationListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: NotificationListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NotificationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NotificationContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NotificationContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NotificationContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept, Parameters.ifMatch], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept, Parameters.ifMatch], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NotificationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts index 5532326268f3..82b808a3e38e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts @@ -6,213 +6,213 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { NotificationRecipientEmail } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - NotificationName, - NotificationRecipientEmailListByNotificationOptionalParams, - NotificationRecipientEmailListByNotificationResponse, - NotificationRecipientEmailCheckEntityExistsOptionalParams, - NotificationRecipientEmailCheckEntityExistsResponse, - NotificationRecipientEmailCreateOrUpdateOptionalParams, - NotificationRecipientEmailCreateOrUpdateResponse, - NotificationRecipientEmailDeleteOptionalParams -} from "../models"; + NotificationName, + NotificationRecipientEmailCheckEntityExistsOptionalParams, + NotificationRecipientEmailCheckEntityExistsResponse, + NotificationRecipientEmailCreateOrUpdateOptionalParams, + NotificationRecipientEmailCreateOrUpdateResponse, + NotificationRecipientEmailDeleteOptionalParams, + NotificationRecipientEmailListByNotificationOptionalParams, + NotificationRecipientEmailListByNotificationResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { NotificationRecipientEmail } from "../operationsInterfaces/index.js"; /** Class containing NotificationRecipientEmail operations. */ export class NotificationRecipientEmailImpl - implements NotificationRecipientEmail { - private readonly client: ApiManagementClient; + implements NotificationRecipientEmail { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class NotificationRecipientEmail class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class NotificationRecipientEmail class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientEmailListByNotificationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - listByNotificationOperationSpec - ); - } + /** + * Gets the list of the Notification Recipient Emails subscribed to a notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + listByNotification( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientEmailListByNotificationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, options }, + listByNotificationOperationSpec + ); + } - /** - * Determine if Notification Recipient Email subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, email, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Determine if Notification Recipient Email subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, email, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Adds the Email address to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, email, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds the Email address to the list of Recipients for the Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, email, options }, + createOrUpdateOperationSpec + ); + } - /** - * Removes the email from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, email, options }, - deleteOperationSpec - ); - } + /** + * Removes the email from the list of Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, email, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByNotificationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RecipientEmailCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RecipientEmailCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName, - Parameters.email - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", + httpMethod: "HEAD", + responses: { + 204: {}, + 404: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName, + Parameters.email + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RecipientEmailContract - }, - 201: { - bodyMapper: Mappers.RecipientEmailContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.RecipientEmailContract + }, + 201: { + bodyMapper: Mappers.RecipientEmailContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName, - Parameters.email - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName, + Parameters.email + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName, - Parameters.email - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName, + Parameters.email + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts index ff459bec71fd..7bef593e9429 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts @@ -6,213 +6,213 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { NotificationRecipientUser } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - NotificationName, - NotificationRecipientUserListByNotificationOptionalParams, - NotificationRecipientUserListByNotificationResponse, - NotificationRecipientUserCheckEntityExistsOptionalParams, - NotificationRecipientUserCheckEntityExistsResponse, - NotificationRecipientUserCreateOrUpdateOptionalParams, - NotificationRecipientUserCreateOrUpdateResponse, - NotificationRecipientUserDeleteOptionalParams -} from "../models"; + NotificationName, + NotificationRecipientUserCheckEntityExistsOptionalParams, + NotificationRecipientUserCheckEntityExistsResponse, + NotificationRecipientUserCreateOrUpdateOptionalParams, + NotificationRecipientUserCreateOrUpdateResponse, + NotificationRecipientUserDeleteOptionalParams, + NotificationRecipientUserListByNotificationOptionalParams, + NotificationRecipientUserListByNotificationResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { NotificationRecipientUser } from "../operationsInterfaces/index.js"; /** Class containing NotificationRecipientUser operations. */ export class NotificationRecipientUserImpl - implements NotificationRecipientUser { - private readonly client: ApiManagementClient; + implements NotificationRecipientUser { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class NotificationRecipientUser class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class NotificationRecipientUser class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientUserListByNotificationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - listByNotificationOperationSpec - ); - } + /** + * Gets the list of the Notification Recipient User subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + listByNotification( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientUserListByNotificationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, options }, + listByNotificationOperationSpec + ); + } - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, userId, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Determine if the Notification Recipient User is subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, userId, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Adds the API Management User to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, userId, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds the API Management User to the list of Recipients for the Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, userId, options }, + createOrUpdateOperationSpec + ); + } - /** - * Removes the API Management user from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, userId, options }, - deleteOperationSpec - ); - } + /** + * Removes the API Management user from the list of Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, userId, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByNotificationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RecipientUserCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RecipientUserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", + httpMethod: "HEAD", + responses: { + 204: {}, + 404: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RecipientUserContract - }, - 201: { - bodyMapper: Mappers.RecipientUserContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.RecipientUserContract + }, + 201: { + bodyMapper: Mappers.RecipientUserContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts index 6f214aac252c..b920960541ce 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts @@ -6,495 +6,495 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { OpenIdConnectProvider } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - OpenidConnectProviderContract, - OpenIdConnectProviderListByServiceNextOptionalParams, - OpenIdConnectProviderListByServiceOptionalParams, - OpenIdConnectProviderListByServiceResponse, - OpenIdConnectProviderGetEntityTagOptionalParams, - OpenIdConnectProviderGetEntityTagResponse, - OpenIdConnectProviderGetOptionalParams, - OpenIdConnectProviderGetResponse, - OpenIdConnectProviderCreateOrUpdateOptionalParams, - OpenIdConnectProviderCreateOrUpdateResponse, - OpenidConnectProviderUpdateContract, - OpenIdConnectProviderUpdateOptionalParams, - OpenIdConnectProviderUpdateResponse, - OpenIdConnectProviderDeleteOptionalParams, - OpenIdConnectProviderListSecretsOptionalParams, - OpenIdConnectProviderListSecretsResponse, - OpenIdConnectProviderListByServiceNextResponse -} from "../models"; + OpenidConnectProviderContract, + OpenIdConnectProviderCreateOrUpdateOptionalParams, + OpenIdConnectProviderCreateOrUpdateResponse, + OpenIdConnectProviderDeleteOptionalParams, + OpenIdConnectProviderGetEntityTagOptionalParams, + OpenIdConnectProviderGetEntityTagResponse, + OpenIdConnectProviderGetOptionalParams, + OpenIdConnectProviderGetResponse, + OpenIdConnectProviderListByServiceNextOptionalParams, + OpenIdConnectProviderListByServiceNextResponse, + OpenIdConnectProviderListByServiceOptionalParams, + OpenIdConnectProviderListByServiceResponse, + OpenIdConnectProviderListSecretsOptionalParams, + OpenIdConnectProviderListSecretsResponse, + OpenidConnectProviderUpdateContract, + OpenIdConnectProviderUpdateOptionalParams, + OpenIdConnectProviderUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { OpenIdConnectProvider } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing OpenIdConnectProvider operations. */ export class OpenIdConnectProviderImpl implements OpenIdConnectProvider { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class OpenIdConnectProvider class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class OpenIdConnectProvider class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists of all the OpenId Connect Providers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists of all the OpenId Connect Providers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: OpenIdConnectProviderListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OpenIdConnectProviderListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists of all the OpenId Connect Providers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists of all the OpenId Connect Providers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets specific OpenID Connect Provider without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, options }, - getOperationSpec - ); - } + /** + * Gets specific OpenID Connect Provider without secrets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, options }, + getOperationSpec + ); + } - /** - * Creates or updates the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - opid: string, - parameters: OpenidConnectProviderContract, - options?: OpenIdConnectProviderCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + opid: string, + parameters: OpenidConnectProviderContract, + options?: OpenIdConnectProviderCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the specific OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - parameters: OpenidConnectProviderUpdateContract, - options?: OpenIdConnectProviderUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the specific OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + parameters: OpenidConnectProviderUpdateContract, + options?: OpenIdConnectProviderUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - options?: OpenIdConnectProviderDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific OpenID Connect Provider of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + options?: OpenIdConnectProviderDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Gets the client secret details of the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the client secret details of the OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, options }, + listSecretsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: OpenIdConnectProviderListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: OpenIdConnectProviderListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OpenIdConnectProviderCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OpenIdConnectProviderCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.OpenIdConnectProviderGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.OpenIdConnectProviderGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OpenidConnectProviderContract, + headersMapper: Mappers.OpenIdConnectProviderGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.OpenidConnectProviderContract, + headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.OpenidConnectProviderContract, + headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters55, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters55, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.OpenidConnectProviderContract, + headersMapper: Mappers.OpenIdConnectProviderUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters56, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters56, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ClientSecretContract, - headersMapper: Mappers.OpenIdConnectProviderListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ClientSecretContract, + headersMapper: Mappers.OpenIdConnectProviderListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OpenIdConnectProviderCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OpenIdConnectProviderCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts index 91d1fdf3b4ec..f6dd2ea3f436 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts @@ -6,221 +6,221 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { OperationOperations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TagResourceContract, - OperationListByTagsNextOptionalParams, - OperationListByTagsOptionalParams, - OperationListByTagsResponse, - OperationListByTagsNextResponse -} from "../models"; + OperationListByTagsNextOptionalParams, + OperationListByTagsNextResponse, + OperationListByTagsOptionalParams, + OperationListByTagsResponse, + TagResourceContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { OperationOperations } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing OperationOperations operations. */ export class OperationOperationsImpl implements OperationOperations { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class OperationOperations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class OperationOperations class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of operations associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByTags( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByTagsPagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByTagsPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists a collection of operations associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByTags( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTagsPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByTagsPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: OperationListByTagsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTags( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByTagsPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByTagsNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByTagsPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OperationListByTagsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTags( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTagsNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByTagsPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByTagsPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByTagsPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTagsPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of operations associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByTags( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByTagsOperationSpec - ); - } + /** + * Lists a collection of operations associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByTags( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByTagsOperationSpec + ); + } - /** - * ListByTagsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByTags method. - * @param options The options parameters. - */ - private _listByTagsNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: OperationListByTagsNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByTagsNextOperationSpec - ); - } + /** + * ListByTagsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByTags method. + * @param options The options parameters. + */ + private _listByTagsNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: OperationListByTagsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByTagsNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByTagsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.includeNotTaggedOperations - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.includeNotTaggedOperations + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const listByTagsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts b/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts index 5ac8f335aa65..0fc05ce43598 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts @@ -6,68 +6,68 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { OutboundNetworkDependenciesEndpoints } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, - OutboundNetworkDependenciesEndpointsListByServiceResponse -} from "../models"; + OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, + OutboundNetworkDependenciesEndpointsListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { OutboundNetworkDependenciesEndpoints } from "../operationsInterfaces/index.js"; /** Class containing OutboundNetworkDependenciesEndpoints operations. */ export class OutboundNetworkDependenciesEndpointsImpl - implements OutboundNetworkDependenciesEndpoints { - private readonly client: ApiManagementClient; + implements OutboundNetworkDependenciesEndpoints { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class OutboundNetworkDependenciesEndpoints class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class OutboundNetworkDependenciesEndpoints class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Gets the network endpoints of all outbound dependencies of a ApiManagement service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OutboundEnvironmentEndpointList + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts index d278cdfc55fc..6fd830567cce 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts @@ -6,260 +6,260 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Policy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PolicyListByServiceOptionalParams, - PolicyListByServiceResponse, - PolicyIdName, - PolicyGetEntityTagOptionalParams, - PolicyGetEntityTagResponse, - PolicyGetOptionalParams, - PolicyGetResponse, - PolicyContract, - PolicyCreateOrUpdateOptionalParams, - PolicyCreateOrUpdateResponse, - PolicyDeleteOptionalParams -} from "../models"; + PolicyContract, + PolicyCreateOrUpdateOptionalParams, + PolicyCreateOrUpdateResponse, + PolicyDeleteOptionalParams, + PolicyGetEntityTagOptionalParams, + PolicyGetEntityTagResponse, + PolicyGetOptionalParams, + PolicyGetResponse, + PolicyIdName, + PolicyListByServiceOptionalParams, + PolicyListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Policy } from "../operationsInterfaces/index.js"; /** Class containing Policy operations. */ export class PolicyImpl implements Policy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Policy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Policy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all the Global Policy definitions of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all the Global Policy definitions of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the Global policy definition of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, options }, - getOperationSpec - ); - } + /** + * Get the Global policy definition of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates the global policy configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: PolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the global policy configuration of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: PolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, policyId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the global policy configuration of the Api Management Service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - ifMatch: string, - options?: PolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the global policy configuration of the Api Management Service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + ifMatch: string, + options?: PolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, policyId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.PolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.PolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.PolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.PolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.PolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.PolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.PolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts index 2f563e88f50e..f1ce19fe858a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts @@ -6,67 +6,67 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PolicyDescription } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PolicyDescriptionListByServiceOptionalParams, - PolicyDescriptionListByServiceResponse -} from "../models"; + PolicyDescriptionListByServiceOptionalParams, + PolicyDescriptionListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PolicyDescription } from "../operationsInterfaces/index.js"; /** Class containing PolicyDescription operations. */ export class PolicyDescriptionImpl implements PolicyDescription { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PolicyDescription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PolicyDescription class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all policy descriptions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyDescriptionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all policy descriptions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyDescriptionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyDescriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyDescriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.scope1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.scope1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts index b6d25f5fb6b7..14db9818e03b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts @@ -6,403 +6,403 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PolicyFragment } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + OperationState, + SimplePollerLike, + createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - PolicyFragmentListByServiceOptionalParams, - PolicyFragmentListByServiceResponse, - PolicyFragmentGetEntityTagOptionalParams, - PolicyFragmentGetEntityTagResponse, - PolicyFragmentGetOptionalParams, - PolicyFragmentGetResponse, - PolicyFragmentContract, - PolicyFragmentCreateOrUpdateOptionalParams, - PolicyFragmentCreateOrUpdateResponse, - PolicyFragmentDeleteOptionalParams, - PolicyFragmentListReferencesOptionalParams, - PolicyFragmentListReferencesResponse -} from "../models"; + PolicyFragmentContract, + PolicyFragmentCreateOrUpdateOptionalParams, + PolicyFragmentCreateOrUpdateResponse, + PolicyFragmentDeleteOptionalParams, + PolicyFragmentGetEntityTagOptionalParams, + PolicyFragmentGetEntityTagResponse, + PolicyFragmentGetOptionalParams, + PolicyFragmentGetResponse, + PolicyFragmentListByServiceOptionalParams, + PolicyFragmentListByServiceResponse, + PolicyFragmentListReferencesOptionalParams, + PolicyFragmentListReferencesResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PolicyFragment } from "../operationsInterfaces/index.js"; /** Class containing PolicyFragment operations. */ export class PolicyFragmentImpl implements PolicyFragment { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PolicyFragment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PolicyFragment class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets all policy fragments. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyFragmentListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Gets all policy fragments. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyFragmentListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, id, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, options }, - getOperationSpec - ); - } + /** + * Gets a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, id, options }, + getOperationSpec + ); + } - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PolicyFragmentCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Creates or updates a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param parameters The policy fragment contents to apply. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PolicyFragmentCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, id, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - PolicyFragmentCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, id, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PolicyFragmentCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - id, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates or updates a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param parameters The policy fragment contents to apply. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + id, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - id: string, - ifMatch: string, - options?: PolicyFragmentDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + id: string, + ifMatch: string, + options?: PolicyFragmentDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, id, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Lists policy resources that reference the policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - listReferences( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentListReferencesOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, options }, - listReferencesOperationSpec - ); - } + /** + * Lists policy resources that reference the policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + listReferences( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentListReferencesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, id, options }, + listReferencesOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyFragmentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PolicyFragmentGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.PolicyFragmentGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters57, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters57, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listReferencesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts b/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts index 4c13b4be9ea9..01bce60c1a89 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts @@ -6,281 +6,281 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PortalConfig } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PortalConfigListByServiceOptionalParams, - PortalConfigListByServiceResponse, - PortalConfigGetEntityTagOptionalParams, - PortalConfigGetEntityTagResponse, - PortalConfigGetOptionalParams, - PortalConfigGetResponse, - PortalConfigContract, - PortalConfigUpdateOptionalParams, - PortalConfigUpdateResponse, - PortalConfigCreateOrUpdateOptionalParams, - PortalConfigCreateOrUpdateResponse -} from "../models"; + PortalConfigContract, + PortalConfigCreateOrUpdateOptionalParams, + PortalConfigCreateOrUpdateResponse, + PortalConfigGetEntityTagOptionalParams, + PortalConfigGetEntityTagResponse, + PortalConfigGetOptionalParams, + PortalConfigGetResponse, + PortalConfigListByServiceOptionalParams, + PortalConfigListByServiceResponse, + PortalConfigUpdateOptionalParams, + PortalConfigUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PortalConfig } from "../operationsInterfaces/index.js"; /** Class containing PortalConfig operations. */ export class PortalConfigImpl implements PortalConfig { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PortalConfig class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PortalConfig class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the developer portal configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalConfigListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists the developer portal configurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalConfigListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalConfigId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, portalConfigId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalConfigId, options }, - getOperationSpec - ); - } + /** + * Get the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, portalConfigId, options }, + getOperationSpec + ); + } - /** - * Update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Update the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update the developer portal configuration. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Create or update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Create or update the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update the developer portal configuration. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalConfigCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PortalConfigGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.PortalConfigGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalConfigId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalConfigId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigContract, - headersMapper: Mappers.PortalConfigGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalConfigContract, + headersMapper: Mappers.PortalConfigGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalConfigId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalConfigId + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PortalConfigContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters58, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalConfigId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters58, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalConfigId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalConfigContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters58, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalConfigId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters58, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalConfigId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts index 06c82783efdc..1f900cf4ced6 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts @@ -6,611 +6,611 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PortalRevision } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - PortalRevisionContract, - PortalRevisionListByServiceNextOptionalParams, - PortalRevisionListByServiceOptionalParams, - PortalRevisionListByServiceResponse, - PortalRevisionGetEntityTagOptionalParams, - PortalRevisionGetEntityTagResponse, - PortalRevisionGetOptionalParams, - PortalRevisionGetResponse, - PortalRevisionCreateOrUpdateOptionalParams, - PortalRevisionCreateOrUpdateResponse, - PortalRevisionUpdateOptionalParams, - PortalRevisionUpdateResponse, - PortalRevisionListByServiceNextResponse -} from "../models"; + PortalRevisionContract, + PortalRevisionCreateOrUpdateOptionalParams, + PortalRevisionCreateOrUpdateResponse, + PortalRevisionGetEntityTagOptionalParams, + PortalRevisionGetEntityTagResponse, + PortalRevisionGetOptionalParams, + PortalRevisionGetResponse, + PortalRevisionListByServiceNextOptionalParams, + PortalRevisionListByServiceNextResponse, + PortalRevisionListByServiceOptionalParams, + PortalRevisionListByServiceResponse, + PortalRevisionUpdateOptionalParams, + PortalRevisionUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PortalRevision } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing PortalRevision operations. */ export class PortalRevisionImpl implements PortalRevision { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PortalRevision class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PortalRevision class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists developer portal's revisions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists developer portal's revisions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: PortalRevisionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PortalRevisionListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists developer portal's revisions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists developer portal's revisions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the developer portal revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalRevisionId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the developer portal revision specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, portalRevisionId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the developer portal's revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalRevisionId, options }, - getOperationSpec - ); - } + /** + * Gets the developer portal's revision specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, portalRevisionId, options }, + getOperationSpec + ); + } - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` + * property indicates if the revision is publicly accessible. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PortalRevisionCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - portalRevisionId, - parameters, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - PortalRevisionCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + portalRevisionId, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PortalRevisionCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - portalRevisionId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` + * property indicates if the revision is publicly accessible. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + portalRevisionId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Updates the description of specified portal revision or makes it current. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PortalRevisionUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters, - options - }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - PortalRevisionUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + PortalRevisionUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Updates the description of specified portal revision or makes it current. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: PortalRevisionListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: PortalRevisionListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PortalRevisionGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.PortalRevisionGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalRevisionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalRevisionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalRevisionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalRevisionId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters59, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalRevisionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters59, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalRevisionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders - }, - 202: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders - }, - 204: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionUpdateHeaders + }, + 202: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionUpdateHeaders + }, + 204: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters59, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalRevisionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters59, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalRevisionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts index da437e49d95b..57cce1d876c5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts @@ -6,67 +6,67 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PortalSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PortalSettingsListByServiceOptionalParams, - PortalSettingsListByServiceResponse -} from "../models"; + PortalSettingsListByServiceOptionalParams, + PortalSettingsListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PortalSettings } from "../operationsInterfaces/index.js"; /** Class containing PortalSettings operations. */ export class PortalSettingsImpl implements PortalSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PortalSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PortalSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of portalsettings defined within a service instance.. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalSettingsListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of portalsettings defined within a service instance.. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalSettingsListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalSettingsCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalSettingsCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts index e8e90e2250a0..ddc60f1ee851 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts @@ -6,533 +6,533 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateEndpointConnectionOperations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - PrivateEndpointConnection, - PrivateEndpointConnectionListByServiceOptionalParams, - PrivateEndpointConnectionListByServiceResponse, - PrivateEndpointConnectionGetByNameOptionalParams, - PrivateEndpointConnectionGetByNameResponse, - PrivateEndpointConnectionRequest, - PrivateEndpointConnectionCreateOrUpdateOptionalParams, - PrivateEndpointConnectionCreateOrUpdateResponse, - PrivateEndpointConnectionDeleteOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesResponse, - PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, - PrivateEndpointConnectionGetPrivateLinkResourceResponse -} from "../models"; + PrivateEndpointConnection, + PrivateEndpointConnectionCreateOrUpdateOptionalParams, + PrivateEndpointConnectionCreateOrUpdateResponse, + PrivateEndpointConnectionDeleteOptionalParams, + PrivateEndpointConnectionGetByNameOptionalParams, + PrivateEndpointConnectionGetByNameResponse, + PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + PrivateEndpointConnectionGetPrivateLinkResourceResponse, + PrivateEndpointConnectionListByServiceOptionalParams, + PrivateEndpointConnectionListByServiceResponse, + PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + PrivateEndpointConnectionListPrivateLinkResourcesResponse, + PrivateEndpointConnectionRequest +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PrivateEndpointConnectionOperations } from "../operationsInterfaces/index.js"; /// /** Class containing PrivateEndpointConnectionOperations operations. */ export class PrivateEndpointConnectionOperationsImpl - implements PrivateEndpointConnectionOperations { - private readonly client: ApiManagementClient; + implements PrivateEndpointConnectionOperations { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PrivateEndpointConnectionOperations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PrivateEndpointConnectionOperations class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all private endpoint connections of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all private endpoint connections of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; + } - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: PrivateEndpointConnectionListByServiceResponse; - result = await this._listByService(resourceGroupName, serviceName, options); - yield result.value || []; - } + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: PrivateEndpointConnectionListByServiceResponse; + result = await this._listByService(resourceGroupName, serviceName, options); + yield result.value || []; + } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all private endpoint connections of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all private endpoint connections of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the details of the Private Endpoint Connection specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - getByName( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionGetByNameOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - privateEndpointConnectionName, - options - }, - getByNameOperationSpec - ); - } + /** + * Gets the details of the Private Endpoint Connection specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + getByName( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionGetByNameOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + privateEndpointConnectionName, + options + }, + getByNameOperationSpec + ); + } - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointConnectionCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Creates a new Private Endpoint Connection or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrivateEndpointConnectionCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - PrivateEndpointConnectionCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates a new Private Endpoint Connection or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * Deletes the specified Private Endpoint Connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - privateEndpointConnectionName, - options - }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + privateEndpointConnectionName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - options - ); - return poller.pollUntilDone(); - } + /** + * Deletes the specified Private Endpoint Connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + serviceName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listPrivateLinkResources( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listPrivateLinkResourcesOperationSpec - ); - } + /** + * Gets the private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listPrivateLinkResources( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listPrivateLinkResourcesOperationSpec + ); + } - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateLinkSubResourceName Name of the private link resource. - * @param options The options parameters. - */ - getPrivateLinkResource( - resourceGroupName: string, - serviceName: string, - privateLinkSubResourceName: string, - options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, privateLinkSubResourceName, options }, - getPrivateLinkResourceOperationSpec - ); - } + /** + * Gets the private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateLinkSubResourceName Name of the private link resource. + * @param options The options parameters. + */ + getPrivateLinkResource( + resourceGroupName: string, + serviceName: string, + privateLinkSubResourceName: string, + options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, privateLinkSubResourceName, options }, + getPrivateLinkResourceOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getByNameOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 201: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 202: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 204: { - bodyMapper: Mappers.PrivateEndpointConnection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.privateEndpointConnectionRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.privateEndpointConnectionRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer }; const listPrivateLinkResourcesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getPrivateLinkResourceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.privateLinkSubResourceName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.privateLinkSubResourceName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/product.ts b/sdk/apimanagement/arm-apimanagement/src/operations/product.ts index cd7bdd87c103..0c5481f1d4ee 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/product.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/product.ts @@ -6,629 +6,629 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Product } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ProductContract, - ProductListByServiceNextOptionalParams, - ProductListByServiceOptionalParams, - ProductListByServiceResponse, - TagResourceContract, - ProductListByTagsNextOptionalParams, - ProductListByTagsOptionalParams, - ProductListByTagsResponse, - ProductGetEntityTagOptionalParams, - ProductGetEntityTagResponse, - ProductGetOptionalParams, - ProductGetResponse, - ProductCreateOrUpdateOptionalParams, - ProductCreateOrUpdateResponse, - ProductUpdateParameters, - ProductUpdateOptionalParams, - ProductUpdateResponse, - ProductDeleteOptionalParams, - ProductListByServiceNextResponse, - ProductListByTagsNextResponse -} from "../models"; + ProductContract, + ProductCreateOrUpdateOptionalParams, + ProductCreateOrUpdateResponse, + ProductDeleteOptionalParams, + ProductGetEntityTagOptionalParams, + ProductGetEntityTagResponse, + ProductGetOptionalParams, + ProductGetResponse, + ProductListByServiceNextOptionalParams, + ProductListByServiceNextResponse, + ProductListByServiceOptionalParams, + ProductListByServiceResponse, + ProductListByTagsNextOptionalParams, + ProductListByTagsNextResponse, + ProductListByTagsOptionalParams, + ProductListByTagsResponse, + ProductUpdateOptionalParams, + ProductUpdateParameters, + ProductUpdateResponse, + TagResourceContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Product } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Product operations. */ export class ProductImpl implements Product { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Product class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Product class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of products in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of products in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists a collection of products associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByTags( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByTagsPagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; } - return this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options, - settings - ); - } - }; - } + } - private async *listByTagsPagingPage( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductListByTagsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTags(resourceGroupName, serviceName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists a collection of products associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByTags( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTagsPagingAll( + resourceGroupName, + serviceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByTagsPagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByTagsNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByTagsPagingPage( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductListByTagsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTags(resourceGroupName, serviceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTagsNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByTagsPagingAll( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByTagsPagingAll( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTagsPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of products in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of products in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: ProductContract, - options?: ProductCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: ProductContract, + options?: ProductCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Update existing product details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: ProductUpdateParameters, - options?: ProductUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Update existing product details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options?: ProductUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Delete product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Delete product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Lists a collection of products associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByTags( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByTagsOperationSpec - ); - } + /** + * Lists a collection of products associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByTags( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByTagsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ProductListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ProductListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } - /** - * ListByTagsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByTags method. - * @param options The options parameters. - */ - private _listByTagsNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ProductListByTagsNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByTagsNextOperationSpec - ); - } + /** + * ListByTagsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByTags method. + * @param options The options parameters. + */ + private _listByTagsNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ProductListByTagsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByTagsNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.apiVersion, - Parameters.expandGroups - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.tags, + Parameters.apiVersion, + Parameters.expandGroups + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ProductGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ProductGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductContract, + headersMapper: Mappers.ProductGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ProductContract, + headersMapper: Mappers.ProductCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ProductContract, + headersMapper: Mappers.ProductCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters63, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters63, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ProductContract, + headersMapper: Mappers.ProductUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters64, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters64, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.deleteSubscriptions], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.deleteSubscriptions], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByTagsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.includeNotTaggedProducts - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.includeNotTaggedProducts + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByTagsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts index 46a14b1d5042..29c964ffbbe1 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts @@ -6,360 +6,360 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ProductApi } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiContract, - ProductApiListByProductNextOptionalParams, - ProductApiListByProductOptionalParams, - ProductApiListByProductResponse, - ProductApiCheckEntityExistsOptionalParams, - ProductApiCheckEntityExistsResponse, - ProductApiCreateOrUpdateOptionalParams, - ProductApiCreateOrUpdateResponse, - ProductApiDeleteOptionalParams, - ProductApiListByProductNextResponse -} from "../models"; + ApiContract, + ProductApiCheckEntityExistsOptionalParams, + ProductApiCheckEntityExistsResponse, + ProductApiCreateOrUpdateOptionalParams, + ProductApiCreateOrUpdateResponse, + ProductApiDeleteOptionalParams, + ProductApiListByProductNextOptionalParams, + ProductApiListByProductNextResponse, + ProductApiListByProductOptionalParams, + ProductApiListByProductResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductApi } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ProductApi operations. */ export class ProductApiImpl implements ProductApi { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductApi class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductApi class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of the APIs associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings + /** + * Lists a collection of the APIs associated with a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByProductPagingAll( + resourceGroupName, + serviceName, + productId, + options ); - } - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductApiListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByProductPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductApiListByProductResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByProduct( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByProductNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listByProductPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of the APIs associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec - ); - } + /** + * Lists a collection of the APIs associated with a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listByProductOperationSpec + ); + } - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiId, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Checks that API entity specified by identifier is associated with the Product entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, apiId, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Adds an API to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiId, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds an API to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, apiId, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiId, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified API from the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, apiId, options }, + deleteOperationSpec + ); + } - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductApiListByProductNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec - ); - } + /** + * ListByProductNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByProduct method. + * @param options The options parameters. + */ + private _listByProductNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: ProductApiListByProductNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listByProductNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", + httpMethod: "HEAD", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract - }, - 201: { - bodyMapper: Mappers.ApiContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiContract + }, + 201: { + bodyMapper: Mappers.ApiContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts index 5425cb6d2633..84ea63c6060b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts @@ -6,357 +6,357 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ProductGroup } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GroupContract, - ProductGroupListByProductNextOptionalParams, - ProductGroupListByProductOptionalParams, - ProductGroupListByProductResponse, - ProductGroupCheckEntityExistsOptionalParams, - ProductGroupCheckEntityExistsResponse, - ProductGroupCreateOrUpdateOptionalParams, - ProductGroupCreateOrUpdateResponse, - ProductGroupDeleteOptionalParams, - ProductGroupListByProductNextResponse -} from "../models"; + GroupContract, + ProductGroupCheckEntityExistsOptionalParams, + ProductGroupCheckEntityExistsResponse, + ProductGroupCreateOrUpdateOptionalParams, + ProductGroupCreateOrUpdateResponse, + ProductGroupDeleteOptionalParams, + ProductGroupListByProductNextOptionalParams, + ProductGroupListByProductNextResponse, + ProductGroupListByProductOptionalParams, + ProductGroupListByProductResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductGroup } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ProductGroup operations. */ export class ProductGroupImpl implements ProductGroup { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductGroup class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductGroup class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of developer groups associated with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings + /** + * Lists the collection of developer groups associated with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByProductPagingAll( + resourceGroupName, + serviceName, + productId, + options ); - } - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductGroupListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByProductPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductGroupListByProductResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByProduct( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByProductNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listByProductPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of developer groups associated with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec - ); - } + /** + * Lists the collection of developer groups associated with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listByProductOperationSpec + ); + } - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupId, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Checks that Group entity specified by identifier is associated with the Product entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, groupId, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Adds the association between the specified developer group with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupId, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds the association between the specified developer group with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, groupId, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the association between the specified group and product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupId, options }, - deleteOperationSpec - ); - } + /** + * Deletes the association between the specified group and product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, groupId, options }, + deleteOperationSpec + ); + } - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductGroupListByProductNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec - ); - } + /** + * ListByProductNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByProduct method. + * @param options The options parameters. + */ + private _listByProductNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: ProductGroupListByProductNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listByProductNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - httpMethod: "HEAD", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", + httpMethod: "HEAD", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GroupContract - }, - 201: { - bodyMapper: Mappers.GroupContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GroupContract + }, + 201: { + bodyMapper: Mappers.GroupContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts index 265d5f5708b5..f9cfa18a780e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts @@ -6,282 +6,282 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ProductPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ProductPolicyListByProductOptionalParams, - ProductPolicyListByProductResponse, - PolicyIdName, - ProductPolicyGetEntityTagOptionalParams, - ProductPolicyGetEntityTagResponse, - ProductPolicyGetOptionalParams, - ProductPolicyGetResponse, - PolicyContract, - ProductPolicyCreateOrUpdateOptionalParams, - ProductPolicyCreateOrUpdateResponse, - ProductPolicyDeleteOptionalParams -} from "../models"; + PolicyContract, + PolicyIdName, + ProductPolicyCreateOrUpdateOptionalParams, + ProductPolicyCreateOrUpdateResponse, + ProductPolicyDeleteOptionalParams, + ProductPolicyGetEntityTagOptionalParams, + ProductPolicyGetEntityTagResponse, + ProductPolicyGetOptionalParams, + ProductPolicyGetResponse, + ProductPolicyListByProductOptionalParams, + ProductPolicyListByProductResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductPolicy } from "../operationsInterfaces/index.js"; /** Class containing ProductPolicy operations. */ export class ProductPolicyImpl implements ProductPolicy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductPolicyListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec - ); - } + /** + * Get the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductPolicyListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listByProductOperationSpec + ); + } - /** - * Get the ETag of the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Get the ETag of the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, policyId, options }, - getOperationSpec - ); - } + /** + * Get the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates policy configuration for the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ProductPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - policyId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates policy configuration for the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ProductPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + productId, + policyId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the policy configuration at the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ProductPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, policyId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the policy configuration at the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ProductPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, policyId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ProductPolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ProductPolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ProductPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ProductPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId, - Parameters.productId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId, + Parameters.productId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts index b602e9ea6996..9550a61cd960 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts @@ -6,217 +6,217 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ProductSubscriptions } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SubscriptionContract, - ProductSubscriptionsListNextOptionalParams, - ProductSubscriptionsListOptionalParams, - ProductSubscriptionsListResponse, - ProductSubscriptionsListNextResponse -} from "../models"; + ProductSubscriptionsListNextOptionalParams, + ProductSubscriptionsListNextResponse, + ProductSubscriptionsListOptionalParams, + ProductSubscriptionsListResponse, + SubscriptionContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductSubscriptions } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ProductSubscriptions operations. */ export class ProductSubscriptionsImpl implements ProductSubscriptions { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductSubscriptions class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductSubscriptions class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of subscriptions to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - productId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings + /** + * Lists the collection of subscriptions to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + productId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductSubscriptionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductSubscriptionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of subscriptions to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listOperationSpec - ); - } + /** + * Lists the collection of subscriptions to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductSubscriptionsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: ProductSubscriptionsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts index 48c1fc393861..2f2bd690dbff 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts @@ -6,282 +6,282 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ProductWiki } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ProductWikiGetEntityTagOptionalParams, - ProductWikiGetEntityTagResponse, - ProductWikiGetOptionalParams, - ProductWikiGetResponse, - WikiContract, - ProductWikiCreateOrUpdateOptionalParams, - ProductWikiCreateOrUpdateResponse, - WikiUpdateContract, - ProductWikiUpdateOptionalParams, - ProductWikiUpdateResponse, - ProductWikiDeleteOptionalParams -} from "../models"; + ProductWikiCreateOrUpdateOptionalParams, + ProductWikiCreateOrUpdateResponse, + ProductWikiDeleteOptionalParams, + ProductWikiGetEntityTagOptionalParams, + ProductWikiGetEntityTagResponse, + ProductWikiGetOptionalParams, + ProductWikiGetResponse, + ProductWikiUpdateOptionalParams, + ProductWikiUpdateResponse, + WikiContract, + WikiUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductWiki } from "../operationsInterfaces/index.js"; /** Class containing ProductWiki operations. */ export class ProductWikiImpl implements ProductWiki { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductWiki class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductWiki class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + getOperationSpec + ); + } - /** - * Creates a new Wiki for a Product or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: WikiContract, - options?: ProductWikiCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Wiki for a Product or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: WikiContract, + options?: ProductWikiCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ProductWikiUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Wiki Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ProductWikiUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Wiki from a Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductWikiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Wiki from a Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductWikiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ProductWikiGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ProductWikiGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ProductWikiGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters16, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ProductWikiUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters17, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters17, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts index eb425ad22260..d7fd88b86632 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts @@ -6,219 +6,219 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ProductWikis } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - WikiContract, - ProductWikisListNextOptionalParams, - ProductWikisListOptionalParams, - ProductWikisListResponse, - ProductWikisListNextResponse -} from "../models"; + ProductWikisListNextOptionalParams, + ProductWikisListNextResponse, + ProductWikisListOptionalParams, + ProductWikisListResponse, + WikiContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductWikis } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ProductWikis operations. */ export class ProductWikisImpl implements ProductWikis { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductWikis class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductWikis class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - productId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + productId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductWikisListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductWikisListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; + } } - } - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listOperationSpec - ); - } + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductWikisListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: ProductWikisListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection, - headersMapper: Mappers.ProductWikisListHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiCollection, + headersMapper: Mappers.ProductWikisListHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection, - headersMapper: Mappers.ProductWikisListNextHeaders + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiCollection, + headersMapper: Mappers.ProductWikisListNextHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts index 136caaa802f2..3af153c506ec 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts @@ -6,127 +6,127 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { QuotaByCounterKeys } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - QuotaByCounterKeysListByServiceOptionalParams, - QuotaByCounterKeysListByServiceResponse, - QuotaCounterValueUpdateContract, - QuotaByCounterKeysUpdateOptionalParams, - QuotaByCounterKeysUpdateResponse -} from "../models"; + QuotaByCounterKeysListByServiceOptionalParams, + QuotaByCounterKeysListByServiceResponse, + QuotaByCounterKeysUpdateOptionalParams, + QuotaByCounterKeysUpdateResponse, + QuotaCounterValueUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { QuotaByCounterKeys } from "../operationsInterfaces/index.js"; /** Class containing QuotaByCounterKeys operations. */ export class QuotaByCounterKeysImpl implements QuotaByCounterKeys { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class QuotaByCounterKeys class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class QuotaByCounterKeys class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in - * the policy on the specified service instance. The api does not support paging yet. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - options?: QuotaByCounterKeysListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, quotaCounterKey, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of current quota counter periods associated with the counter-key configured in + * the policy on the specified service instance. The api does not support paging yet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + options?: QuotaByCounterKeysListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, quotaCounterKey, options }, + listByServiceOperationSpec + ); + } - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the - * specified service instance. This should be used for reset of the quota counter values. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByCounterKeysUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, quotaCounterKey, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates all the quota counter values specified with the existing quota counter key to a value in the + * specified service instance. This should be used for reset of the quota counter values. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param parameters The value of the quota counter to be applied to all quota counter periods. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByCounterKeysUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, quotaCounterKey, parameters, options }, + updateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.QuotaCounterCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.quotaCounterKey - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.quotaCounterKey + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.QuotaCounterCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters65, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.quotaCounterKey - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters65, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.quotaCounterKey + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts index bd18bc65745b..7617a3b80c70 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts @@ -6,145 +6,145 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { QuotaByPeriodKeys } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - QuotaByPeriodKeysGetOptionalParams, - QuotaByPeriodKeysGetResponse, - QuotaCounterValueUpdateContract, - QuotaByPeriodKeysUpdateOptionalParams, - QuotaByPeriodKeysUpdateResponse -} from "../models"; + QuotaByPeriodKeysGetOptionalParams, + QuotaByPeriodKeysGetResponse, + QuotaByPeriodKeysUpdateOptionalParams, + QuotaByPeriodKeysUpdateResponse, + QuotaCounterValueUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { QuotaByPeriodKeys } from "../operationsInterfaces/index.js"; /** Class containing QuotaByPeriodKeys operations. */ export class QuotaByPeriodKeysImpl implements QuotaByPeriodKeys { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class QuotaByPeriodKeys class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class QuotaByPeriodKeys class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific - * period in service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - options?: QuotaByPeriodKeysGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - options - }, - getOperationSpec - ); - } + /** + * Gets the value of the quota counter associated with the counter-key in the policy for the specific + * period in service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param quotaPeriodKey Quota period key identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + options?: QuotaByPeriodKeysGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey, + options + }, + getOperationSpec + ); + } - /** - * Updates an existing quota counter value in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByPeriodKeysUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing quota counter value in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param quotaPeriodKey Quota period key identifier. + * @param parameters The value of the Quota counter to be applied on the specified period. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByPeriodKeysUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey, + parameters, + options + }, + updateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.QuotaCounterContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.quotaCounterKey, - Parameters.quotaPeriodKey - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.quotaCounterKey, + Parameters.quotaPeriodKey + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.QuotaCounterContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters65, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.quotaCounterKey, - Parameters.quotaPeriodKey - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters65, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.quotaCounterKey, + Parameters.quotaPeriodKey + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/region.ts b/sdk/apimanagement/arm-apimanagement/src/operations/region.ts index b0ccf6b4bde2..db172c948a07 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/region.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/region.ts @@ -6,197 +6,197 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Region } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - RegionContract, - RegionListByServiceNextOptionalParams, - RegionListByServiceOptionalParams, - RegionListByServiceResponse, - RegionListByServiceNextResponse -} from "../models"; + RegionContract, + RegionListByServiceNextOptionalParams, + RegionListByServiceNextResponse, + RegionListByServiceOptionalParams, + RegionListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Region } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Region operations. */ export class RegionImpl implements Region { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Region class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Region class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all azure regions in which the service exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all azure regions in which the service exists. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: RegionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: RegionListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all azure regions in which the service exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all azure regions in which the service exists. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: RegionListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: RegionListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RegionListResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RegionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RegionListResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RegionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts b/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts index 34ec22b941f4..309a788b2077 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts @@ -6,1590 +6,1590 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Reports } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ReportRecordContract, - ReportsListByApiNextOptionalParams, - ReportsListByApiOptionalParams, - ReportsListByApiResponse, - ReportsListByUserNextOptionalParams, - ReportsListByUserOptionalParams, - ReportsListByUserResponse, - ReportsListByOperationNextOptionalParams, - ReportsListByOperationOptionalParams, - ReportsListByOperationResponse, - ReportsListByProductNextOptionalParams, - ReportsListByProductOptionalParams, - ReportsListByProductResponse, - ReportsListByGeoNextOptionalParams, - ReportsListByGeoOptionalParams, - ReportsListByGeoResponse, - ReportsListBySubscriptionNextOptionalParams, - ReportsListBySubscriptionOptionalParams, - ReportsListBySubscriptionResponse, - ReportsListByTimeNextOptionalParams, - ReportsListByTimeOptionalParams, - ReportsListByTimeResponse, - RequestReportRecordContract, - ReportsListByRequestOptionalParams, - ReportsListByRequestResponse, - ReportsListByApiNextResponse, - ReportsListByUserNextResponse, - ReportsListByOperationNextResponse, - ReportsListByProductNextResponse, - ReportsListByGeoNextResponse, - ReportsListBySubscriptionNextResponse, - ReportsListByTimeNextResponse -} from "../models"; + ReportRecordContract, + ReportsListByApiNextOptionalParams, + ReportsListByApiNextResponse, + ReportsListByApiOptionalParams, + ReportsListByApiResponse, + ReportsListByGeoNextOptionalParams, + ReportsListByGeoNextResponse, + ReportsListByGeoOptionalParams, + ReportsListByGeoResponse, + ReportsListByOperationNextOptionalParams, + ReportsListByOperationNextResponse, + ReportsListByOperationOptionalParams, + ReportsListByOperationResponse, + ReportsListByProductNextOptionalParams, + ReportsListByProductNextResponse, + ReportsListByProductOptionalParams, + ReportsListByProductResponse, + ReportsListByRequestOptionalParams, + ReportsListByRequestResponse, + ReportsListBySubscriptionNextOptionalParams, + ReportsListBySubscriptionNextResponse, + ReportsListBySubscriptionOptionalParams, + ReportsListBySubscriptionResponse, + ReportsListByTimeNextOptionalParams, + ReportsListByTimeNextResponse, + ReportsListByTimeOptionalParams, + ReportsListByTimeResponse, + ReportsListByUserNextOptionalParams, + ReportsListByUserNextResponse, + ReportsListByUserOptionalParams, + ReportsListByUserResponse, + RequestReportRecordContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Reports } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Reports operations. */ export class ReportsImpl implements Reports { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Reports class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Reports class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists report records by API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings + /** + * Lists report records by API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter The filter to apply on the operation. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + filter, + options ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByApiPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists report records by User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | - * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| - * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter - * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | - * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| - * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | - *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| - * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | - * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | - * | |
- * @param options The options parameters. - */ - public listByUser( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByUserPagingAll( - resourceGroupName, - serviceName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; } - return this.listByUserPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings - ); - } - }; - } - - private async *listByUserPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByUserResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByUser( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByUserNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; } - } - private async *listByUserPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByUserPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + /** + * Lists report records by User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | + * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| + * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter + * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | + * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| + * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | + *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| + * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| + * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | + * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | + * | |
+ * @param options The options parameters. + */ + public listByUser( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByUserPagingAll( + resourceGroupName, + serviceName, + filter, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByUserPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - /** - * Lists report records by API Operations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | - * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy - * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, - * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | - * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | - * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | - *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listByOperation( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByOperationPagingAll( - resourceGroupName, - serviceName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByUserPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByUserResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByUser( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByUserNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } - return this.listByOperationPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings - ); - } - }; - } - - private async *listByOperationPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByOperationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByOperation( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByOperationNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; } - } - private async *listByOperationPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByOperationPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByUserPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByUserPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; + } } - } - /** - * Lists report records by Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| - * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | - * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | - * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | - * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | - *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| - * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings + /** + * Lists report records by API Operations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | + * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy + * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, + * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | + * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | + * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | + *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + public listByOperation( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByOperationPagingAll( + resourceGroupName, + serviceName, + filter, + options ); - } - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByOperationPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByOperationPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByOperationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByOperation( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByOperationNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists report records by geography. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| country | select | | |
| region | select | | |
| zip | - * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | - *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | - * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | - * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | - *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg - * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listByGeo( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByGeoPagingAll( - resourceGroupName, - serviceName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByOperationPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByOperationPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; } - return this.listByGeoPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings - ); - } - }; - } - - private async *listByGeoPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByGeoResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByGeo( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; } - while (continuationToken) { - result = await this._listByGeoNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + /** + * Lists report records by Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| + * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | + * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | + * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | + * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | + *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| + * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + public listByProduct( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByProductPagingAll( + resourceGroupName, + serviceName, + filter, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByProductPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - private async *listByGeoPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByGeoPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByProductPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByProductResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByProduct( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByProductNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists report records by subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | - *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | - * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, - * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | - * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, - * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listBySubscription( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll( - resourceGroupName, - serviceName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByProductPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByProductPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; } - return this.listBySubscriptionPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings + } + + /** + * Lists report records by geography. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| country | select | | |
| region | select | | |
| zip | + * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | + *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | + * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | + * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | + *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| + * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg + * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + public listByGeo( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByGeoPagingAll( + resourceGroupName, + serviceName, + filter, + options ); - } - }; - } + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByGeoPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; + } - private async *listBySubscriptionPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + private async *listByGeoPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByGeoResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByGeo( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByGeoNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - while (continuationToken) { - result = await this._listBySubscriptionNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByGeoPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByGeoPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; + } } - } - private async *listBySubscriptionPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + /** + * Lists report records by subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | + *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | + * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, + * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | + * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, + * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + public listBySubscription( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll( + resourceGroupName, + serviceName, + filter, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - /** - * Lists report records by Time. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select - * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | - *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| - * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth - * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | - * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The - * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can - * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, - * minutes, seconds)). - * @param options The options parameters. - */ - public listByTime( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByTimePagingAll( - resourceGroupName, - serviceName, - filter, - interval, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listBySubscriptionPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; } - return this.listByTimePagingPage( - resourceGroupName, - serviceName, - filter, - interval, - options, - settings - ); - } - }; - } + while (continuationToken) { + result = await this._listBySubscriptionNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } - private async *listByTimePagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByTimeResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTime( - resourceGroupName, - serviceName, - filter, - interval, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + private async *listBySubscriptionPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; + } } - while (continuationToken) { - result = await this._listByTimeNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + /** + * Lists report records by Time. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select + * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | + *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| + * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth + * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | + * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The + * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can + * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, + * minutes, seconds)). + * @param options The options parameters. + */ + public listByTime( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTimePagingAll( + resourceGroupName, + serviceName, + filter, + interval, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByTimePagingPage( + resourceGroupName, + serviceName, + filter, + interval, + options, + settings + ); + } + }; } - } - private async *listByTimePagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByTimePagingPage( - resourceGroupName, - serviceName, - filter, - interval, - options - )) { - yield* page; + private async *listByTimePagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByTimeResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTime( + resourceGroupName, + serviceName, + filter, + interval, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTimeNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists report records by Request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId - * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | - *
| subscriptionId | filter | eq | |
- * @param options The options parameters. - */ - public listByRequest( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByRequestPagingAll( - resourceGroupName, - serviceName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByTimePagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTimePagingPage( + resourceGroupName, + serviceName, + filter, + interval, + options + )) { + yield* page; } - return this.listByRequestPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings + } + + /** + * Lists report records by Request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId + * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | + *
| subscriptionId | filter | eq | |
+ * @param options The options parameters. + */ + public listByRequest( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByRequestPagingAll( + resourceGroupName, + serviceName, + filter, + options ); - } - }; - } + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByRequestPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; + } - private async *listByRequestPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByRequestResponse; - result = await this._listByRequest( - resourceGroupName, - serviceName, - filter, - options - ); - yield result.value || []; - } + private async *listByRequestPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByRequestResponse; + result = await this._listByRequest( + resourceGroupName, + serviceName, + filter, + options + ); + yield result.value || []; + } - private async *listByRequestPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByRequestPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByRequestPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByRequestPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; + } } - } - /** - * Lists report records by API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByApiOperationSpec - ); - } + /** + * Lists report records by API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter The filter to apply on the operation. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByApiOperationSpec + ); + } - /** - * Lists report records by User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | - * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| - * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter - * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | - * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| - * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | - *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| - * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | - * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | - * | |
- * @param options The options parameters. - */ - private _listByUser( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByUserOperationSpec - ); - } + /** + * Lists report records by User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | + * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| + * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter + * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | + * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| + * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | + *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| + * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| + * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | + * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | + * | |
+ * @param options The options parameters. + */ + private _listByUser( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByUserOperationSpec + ); + } - /** - * Lists report records by API Operations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | - * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy - * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, - * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | - * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | - * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | - *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listByOperation( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByOperationOperationSpec - ); - } + /** + * Lists report records by API Operations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | + * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy + * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, + * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | + * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | + * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | + *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + private _listByOperation( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByOperationOperationSpec + ); + } - /** - * Lists report records by Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| - * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | - * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | - * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | - * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | - *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| - * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByProductOperationSpec - ); - } + /** + * Lists report records by Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| + * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | + * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | + * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | + * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | + *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| + * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + private _listByProduct( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByProductOperationSpec + ); + } - /** - * Lists report records by geography. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| country | select | | |
| region | select | | |
| zip | - * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | - *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | - * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | - * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | - *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg - * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listByGeo( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByGeoOperationSpec - ); - } + /** + * Lists report records by geography. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| country | select | | |
| region | select | | |
| zip | + * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | + *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | + * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | + * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | + *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| + * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg + * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + private _listByGeo( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByGeoOperationSpec + ); + } - /** - * Lists report records by subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | - *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | - * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, - * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | - * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, - * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listBySubscription( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listBySubscriptionOperationSpec - ); - } + /** + * Lists report records by subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | + *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | + * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, + * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | + * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, + * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + private _listBySubscription( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listBySubscriptionOperationSpec + ); + } - /** - * Lists report records by Time. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select - * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | - *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| - * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth - * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | - * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The - * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can - * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, - * minutes, seconds)). - * @param options The options parameters. - */ - private _listByTime( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, interval, options }, - listByTimeOperationSpec - ); - } + /** + * Lists report records by Time. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select + * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | + *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| + * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth + * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | + * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The + * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can + * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, + * minutes, seconds)). + * @param options The options parameters. + */ + private _listByTime( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, interval, options }, + listByTimeOperationSpec + ); + } - /** - * Lists report records by Request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId - * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | - *
| subscriptionId | filter | eq | |
- * @param options The options parameters. - */ - private _listByRequest( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByRequestOperationSpec - ); - } + /** + * Lists report records by Request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId + * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | + *
| subscriptionId | filter | eq | |
+ * @param options The options parameters. + */ + private _listByRequest( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByRequestOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByApiNextOperationSpec + ); + } - /** - * ListByUserNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByUser method. - * @param options The options parameters. - */ - private _listByUserNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByUserNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByUserNextOperationSpec - ); - } + /** + * ListByUserNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByUser method. + * @param options The options parameters. + */ + private _listByUserNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByUserNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByUserNextOperationSpec + ); + } - /** - * ListByOperationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByOperation method. - * @param options The options parameters. - */ - private _listByOperationNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByOperationNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByOperationNextOperationSpec - ); - } + /** + * ListByOperationNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByOperation method. + * @param options The options parameters. + */ + private _listByOperationNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByOperationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByOperationNextOperationSpec + ); + } - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByProductNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByProductNextOperationSpec - ); - } + /** + * ListByProductNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByProduct method. + * @param options The options parameters. + */ + private _listByProductNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByProductNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByProductNextOperationSpec + ); + } - /** - * ListByGeoNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByGeo method. - * @param options The options parameters. - */ - private _listByGeoNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByGeoNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByGeoNextOperationSpec - ); - } + /** + * ListByGeoNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByGeo method. + * @param options The options parameters. + */ + private _listByGeoNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByGeoNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByGeoNextOperationSpec + ); + } - /** - * ListBySubscriptionNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } + /** + * ListBySubscriptionNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } - /** - * ListByTimeNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByTime method. - * @param options The options parameters. - */ - private _listByTimeNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByTimeNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByTimeNextOperationSpec - ); - } + /** + * ListByTimeNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByTime method. + * @param options The options parameters. + */ + private _listByTimeNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByTimeNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByTimeNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByUserOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByGeoOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByTimeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1, - Parameters.interval - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1, + Parameters.interval + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByRequestOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RequestReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RequestReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByUserNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByOperationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByGeoNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByTimeNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts index 81c16f759dd7..f8863b9324fb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts @@ -6,208 +6,208 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { SignInSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SignInSettingsGetEntityTagOptionalParams, - SignInSettingsGetEntityTagResponse, - SignInSettingsGetOptionalParams, - SignInSettingsGetResponse, - PortalSigninSettings, - SignInSettingsUpdateOptionalParams, - SignInSettingsCreateOrUpdateOptionalParams, - SignInSettingsCreateOrUpdateResponse -} from "../models"; + PortalSigninSettings, + SignInSettingsCreateOrUpdateOptionalParams, + SignInSettingsCreateOrUpdateResponse, + SignInSettingsGetEntityTagOptionalParams, + SignInSettingsGetEntityTagResponse, + SignInSettingsGetOptionalParams, + SignInSettingsGetResponse, + SignInSettingsUpdateOptionalParams +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { SignInSettings } from "../operationsInterfaces/index.js"; /** Class containing SignInSettings operations. */ export class SignInSettingsImpl implements SignInSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class SignInSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class SignInSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the SignInSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the SignInSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getEntityTagOperationSpec + ); + } - /** - * Get Sign In Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec - ); - } + /** + * Get Sign In Settings for the Portal + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getOperationSpec + ); + } - /** - * Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-In settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSigninSettings, - options?: SignInSettingsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Update Sign-In settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Sign-In settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSigninSettings, + options?: SignInSettingsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Create or Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSigninSettings, - options?: SignInSettingsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Create or Update Sign-In settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalSigninSettings, + options?: SignInSettingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, parameters, options }, + createOrUpdateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.SignInSettingsGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.SignInSettingsGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalSigninSettings, - headersMapper: Mappers.SignInSettingsGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalSigninSettings, + headersMapper: Mappers.SignInSettingsGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "PATCH", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters60, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + httpMethod: "PATCH", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters60, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalSigninSettings + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalSigninSettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters60, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters60, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts index fa8160735c81..e46cf5f18d91 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts @@ -6,208 +6,208 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { SignUpSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SignUpSettingsGetEntityTagOptionalParams, - SignUpSettingsGetEntityTagResponse, - SignUpSettingsGetOptionalParams, - SignUpSettingsGetResponse, - PortalSignupSettings, - SignUpSettingsUpdateOptionalParams, - SignUpSettingsCreateOrUpdateOptionalParams, - SignUpSettingsCreateOrUpdateResponse -} from "../models"; + PortalSignupSettings, + SignUpSettingsCreateOrUpdateOptionalParams, + SignUpSettingsCreateOrUpdateResponse, + SignUpSettingsGetEntityTagOptionalParams, + SignUpSettingsGetEntityTagResponse, + SignUpSettingsGetOptionalParams, + SignUpSettingsGetResponse, + SignUpSettingsUpdateOptionalParams +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { SignUpSettings } from "../operationsInterfaces/index.js"; /** Class containing SignUpSettings operations. */ export class SignUpSettingsImpl implements SignUpSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class SignUpSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class SignUpSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the SignUpSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getEntityTagOperationSpec + ); + } - /** - * Get Sign Up Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec - ); - } + /** + * Get Sign Up Settings for the Portal + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getOperationSpec + ); + } - /** - * Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-Up settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Update Sign-Up settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Sign-Up settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Create or Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Create or Update Sign-Up settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, parameters, options }, + createOrUpdateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.SignUpSettingsGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.SignUpSettingsGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalSignupSettings, - headersMapper: Mappers.SignUpSettingsGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalSignupSettings, + headersMapper: Mappers.SignUpSettingsGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "PATCH", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters61, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + httpMethod: "PATCH", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters61, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalSignupSettings + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalSignupSettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters61, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters61, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts index 040781d07df3..f9024812cd17 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts @@ -6,586 +6,586 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Subscription } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SubscriptionContract, - SubscriptionListNextOptionalParams, - SubscriptionListOptionalParams, - SubscriptionListResponse, - SubscriptionGetEntityTagOptionalParams, - SubscriptionGetEntityTagResponse, - SubscriptionGetOptionalParams, - SubscriptionGetResponse, - SubscriptionCreateParameters, - SubscriptionCreateOrUpdateOptionalParams, - SubscriptionCreateOrUpdateResponse, - SubscriptionUpdateParameters, - SubscriptionUpdateOptionalParams, - SubscriptionUpdateResponse, - SubscriptionDeleteOptionalParams, - SubscriptionRegeneratePrimaryKeyOptionalParams, - SubscriptionRegenerateSecondaryKeyOptionalParams, - SubscriptionListSecretsOptionalParams, - SubscriptionListSecretsResponse, - SubscriptionListNextResponse -} from "../models"; + SubscriptionContract, + SubscriptionCreateOrUpdateOptionalParams, + SubscriptionCreateOrUpdateResponse, + SubscriptionCreateParameters, + SubscriptionDeleteOptionalParams, + SubscriptionGetEntityTagOptionalParams, + SubscriptionGetEntityTagResponse, + SubscriptionGetOptionalParams, + SubscriptionGetResponse, + SubscriptionListNextOptionalParams, + SubscriptionListNextResponse, + SubscriptionListOptionalParams, + SubscriptionListResponse, + SubscriptionListSecretsOptionalParams, + SubscriptionListSecretsResponse, + SubscriptionRegeneratePrimaryKeyOptionalParams, + SubscriptionRegenerateSecondaryKeyOptionalParams, + SubscriptionUpdateOptionalParams, + SubscriptionUpdateParameters, + SubscriptionUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Subscription } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Subscription operations. */ export class SubscriptionImpl implements Subscription { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Subscription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all subscriptions of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, serviceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - options, - settings - ); - } - }; - } + /** + * Initialize a new instance of the class Subscription class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: SubscriptionListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, serviceName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists all subscriptions of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, serviceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SubscriptionListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, serviceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all subscriptions of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listOperationSpec - ); - } + /** + * Lists all subscriptions of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the specified Subscription entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - getOperationSpec - ); - } + /** + * Gets the specified Subscription entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + getOperationSpec + ); + } - /** - * Creates or updates the subscription of specified user to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - sid: string, - parameters: SubscriptionCreateParameters, - options?: SubscriptionCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the subscription of specified user to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + sid: string, + parameters: SubscriptionCreateParameters, + options?: SubscriptionCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of a subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - parameters: SubscriptionUpdateParameters, - options?: SubscriptionUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of a subscription specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options?: SubscriptionUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes the specified subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - options?: SubscriptionDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + options?: SubscriptionDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegeneratePrimaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - regeneratePrimaryKeyOperationSpec - ); - } + /** + * Regenerates primary key of existing subscription of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegeneratePrimaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + regeneratePrimaryKeyOperationSpec + ); + } - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegenerateSecondaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - regenerateSecondaryKeyOperationSpec - ); - } + /** + * Regenerates secondary key of existing subscription of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegenerateSecondaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + regenerateSecondaryKeyOperationSpec + ); + } - /** - * Gets the specified Subscription keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the specified Subscription keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + listSecretsOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: SubscriptionListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: SubscriptionListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.SubscriptionGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.SubscriptionGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.SubscriptionGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters67, - queryParameters: [ - Parameters.apiVersion, - Parameters.notify, - Parameters.appType - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters67, + queryParameters: [ + Parameters.apiVersion, + Parameters.notify, + Parameters.appType + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.SubscriptionUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters68, - queryParameters: [ - Parameters.apiVersion, - Parameters.notify, - Parameters.appType - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters68, + queryParameters: [ + Parameters.apiVersion, + Parameters.notify, + Parameters.appType + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionKeysContract, - headersMapper: Mappers.SubscriptionListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionKeysContract, + headersMapper: Mappers.SubscriptionListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts index 1cd000ec1f2f..c8b60a7a6636 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts @@ -6,1632 +6,1632 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Tag } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TagContract, - TagListByOperationNextOptionalParams, - TagListByOperationOptionalParams, - TagListByOperationResponse, - TagListByApiNextOptionalParams, - TagListByApiOptionalParams, - TagListByApiResponse, - TagListByProductNextOptionalParams, - TagListByProductOptionalParams, - TagListByProductResponse, - TagListByServiceNextOptionalParams, - TagListByServiceOptionalParams, - TagListByServiceResponse, - TagGetEntityStateByOperationOptionalParams, - TagGetEntityStateByOperationResponse, - TagGetByOperationOptionalParams, - TagGetByOperationResponse, - TagAssignToOperationOptionalParams, - TagAssignToOperationResponse, - TagDetachFromOperationOptionalParams, - TagGetEntityStateByApiOptionalParams, - TagGetEntityStateByApiResponse, - TagGetByApiOptionalParams, - TagGetByApiResponse, - TagAssignToApiOptionalParams, - TagAssignToApiResponse, - TagDetachFromApiOptionalParams, - TagGetEntityStateByProductOptionalParams, - TagGetEntityStateByProductResponse, - TagGetByProductOptionalParams, - TagGetByProductResponse, - TagAssignToProductOptionalParams, - TagAssignToProductResponse, - TagDetachFromProductOptionalParams, - TagGetEntityStateOptionalParams, - TagGetEntityStateResponse, - TagGetOptionalParams, - TagGetResponse, - TagCreateUpdateParameters, - TagCreateOrUpdateOptionalParams, - TagCreateOrUpdateResponse, - TagUpdateOptionalParams, - TagUpdateResponse, - TagDeleteOptionalParams, - TagListByOperationNextResponse, - TagListByApiNextResponse, - TagListByProductNextResponse, - TagListByServiceNextResponse -} from "../models"; + TagAssignToApiOptionalParams, + TagAssignToApiResponse, + TagAssignToOperationOptionalParams, + TagAssignToOperationResponse, + TagAssignToProductOptionalParams, + TagAssignToProductResponse, + TagContract, + TagCreateOrUpdateOptionalParams, + TagCreateOrUpdateResponse, + TagCreateUpdateParameters, + TagDeleteOptionalParams, + TagDetachFromApiOptionalParams, + TagDetachFromOperationOptionalParams, + TagDetachFromProductOptionalParams, + TagGetByApiOptionalParams, + TagGetByApiResponse, + TagGetByOperationOptionalParams, + TagGetByOperationResponse, + TagGetByProductOptionalParams, + TagGetByProductResponse, + TagGetEntityStateByApiOptionalParams, + TagGetEntityStateByApiResponse, + TagGetEntityStateByOperationOptionalParams, + TagGetEntityStateByOperationResponse, + TagGetEntityStateByProductOptionalParams, + TagGetEntityStateByProductResponse, + TagGetEntityStateOptionalParams, + TagGetEntityStateResponse, + TagGetOptionalParams, + TagGetResponse, + TagListByApiNextOptionalParams, + TagListByApiNextResponse, + TagListByApiOptionalParams, + TagListByApiResponse, + TagListByOperationNextOptionalParams, + TagListByOperationNextResponse, + TagListByOperationOptionalParams, + TagListByOperationResponse, + TagListByProductNextOptionalParams, + TagListByProductNextResponse, + TagListByProductOptionalParams, + TagListByProductResponse, + TagListByServiceNextOptionalParams, + TagListByServiceNextResponse, + TagListByServiceOptionalParams, + TagListByServiceResponse, + TagUpdateOptionalParams, + TagUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Tag } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Tag operations. */ export class TagImpl implements Tag { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Tag class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Tag class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all Tags associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - public listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByOperationPagingAll( - resourceGroupName, - serviceName, - apiId, - operationId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByOperationPagingPage( - resourceGroupName, - serviceName, - apiId, - operationId, - options, - settings + /** + * Lists all Tags associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + public listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByOperationPagingAll( + resourceGroupName, + serviceName, + apiId, + operationId, + options ); - } - }; - } - - private async *listByOperationPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagListByOperationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByOperationPagingPage( + resourceGroupName, + serviceName, + apiId, + operationId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByOperationNext( - resourceGroupName, - serviceName, - apiId, - operationId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - private async *listByOperationPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByOperationPagingPage( - resourceGroupName, - serviceName, - apiId, - operationId, - options - )) { - yield* page; + private async *listByOperationPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagListByOperationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByOperationNext( + resourceGroupName, + serviceName, + apiId, + operationId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists all Tags associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByOperationPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByOperationPagingPage( + resourceGroupName, + serviceName, + apiId, + operationId, + options + )) { + yield* page; } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings - ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + /** + * Lists all Tags associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + apiId, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - } - /** - * Lists all Tags associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings - ); - } - }; - } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + /** + * Lists all Tags associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByProductPagingAll( + resourceGroupName, + serviceName, + productId, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - } - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listByProductPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagListByProductResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByProduct( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByProductNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists a collection of tags defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); + private async *listByProductPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings - ); - } - }; - } + } - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists a collection of tags defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all Tags associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - private _listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - listByOperationOperationSpec - ); - } + /** + * Lists all Tags associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + private _listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, options }, + listByOperationOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetEntityStateByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - getEntityStateByOperationOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetEntityStateByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, tagId, options }, + getEntityStateByOperationOperationSpec + ); + } - /** - * Get tag associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - getByOperationOperationSpec - ); - } + /** + * Get tag associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, tagId, options }, + getByOperationOperationSpec + ); + } - /** - * Assign tag to the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagAssignToOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - assignToOperationOperationSpec - ); - } + /** + * Assign tag to the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagAssignToOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, tagId, options }, + assignToOperationOperationSpec + ); + } - /** - * Detach the tag from the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagDetachFromOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - detachFromOperationOperationSpec - ); - } + /** + * Detach the tag from the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagDetachFromOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, tagId, options }, + detachFromOperationOperationSpec + ); + } - /** - * Lists all Tags associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Lists all Tags associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetEntityStateByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - getEntityStateByApiOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetEntityStateByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagId, options }, + getEntityStateByApiOperationSpec + ); + } - /** - * Get tag associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - getByApiOperationSpec - ); - } + /** + * Get tag associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagId, options }, + getByApiOperationSpec + ); + } - /** - * Assign tag to the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagAssignToApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - assignToApiOperationSpec - ); - } + /** + * Assign tag to the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagAssignToApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagId, options }, + assignToApiOperationSpec + ); + } - /** - * Detach the tag from the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagDetachFromApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - detachFromApiOperationSpec - ); - } + /** + * Detach the tag from the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagDetachFromApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagId, options }, + detachFromApiOperationSpec + ); + } - /** - * Lists all Tags associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec - ); - } + /** + * Lists all Tags associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listByProductOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetEntityStateByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - getEntityStateByProductOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetEntityStateByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, tagId, options }, + getEntityStateByProductOperationSpec + ); + } - /** - * Get tag associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - getByProductOperationSpec - ); - } + /** + * Get tag associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, tagId, options }, + getByProductOperationSpec + ); + } - /** - * Assign tag to the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagAssignToProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - assignToProductOperationSpec - ); - } + /** + * Assign tag to the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagAssignToProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, tagId, options }, + assignToProductOperationSpec + ); + } - /** - * Detach the tag from the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagDetachFromProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - detachFromProductOperationSpec - ); - } + /** + * Detach the tag from the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagDetachFromProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, tagId, options }, + detachFromProductOperationSpec + ); + } - /** - * Lists a collection of tags defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of tags defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityState( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetEntityStateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, options }, - getEntityStateOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityState( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetEntityStateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, options }, + getEntityStateOperationSpec + ); + } - /** - * Gets the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, options }, + getOperationSpec + ); + } - /** - * Creates a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - parameters: TagCreateUpdateParameters, - options?: TagCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a tag. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options?: TagCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - parameters: TagCreateUpdateParameters, - options?: TagUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options?: TagUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific tag of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - options?: TagDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific tag of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + options?: TagDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByOperationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param nextLink The nextLink from the previous successful call to the ListByOperation method. - * @param options The options parameters. - */ - private _listByOperationNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - nextLink: string, - options?: TagListByOperationNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, nextLink, options }, - listByOperationNextOperationSpec - ); - } + /** + * ListByOperationNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param nextLink The nextLink from the previous successful call to the ListByOperation method. + * @param options The options parameters. + */ + private _listByOperationNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + nextLink: string, + options?: TagListByOperationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, nextLink, options }, + listByOperationNextOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: TagListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: TagListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApiNextOperationSpec + ); + } - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: TagListByProductNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec - ); - } + /** + * ListByProductNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByProduct method. + * @param options The options parameters. + */ + private _listByProductNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: TagListByProductNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listByProductNextOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TagListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: TagListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityStateByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateByOperationHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TagGetEntityStateByOperationHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const getByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetByOperationHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagGetByOperationHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const assignToOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract - }, - 201: { - bodyMapper: Mappers.TagContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagContract + }, + 201: { + bodyMapper: Mappers.TagContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const detachFromOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityStateByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateByApiHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TagGetEntityStateByApiHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const getByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetByApiHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagGetByApiHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const assignToApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagAssignToApiHeaders - }, - 201: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagAssignToApiHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagAssignToApiHeaders + }, + 201: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagAssignToApiHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const detachFromApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityStateByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateByProductHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TagGetEntityStateByProductHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetByProductHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagGetByProductHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const assignToProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract - }, - 201: { - bodyMapper: Mappers.TagContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagContract + }, + 201: { + bodyMapper: Mappers.TagContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const detachFromProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.scope - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.scope + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityStateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TagGetEntityStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByOperationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts index 1a0a0f0a8cb1..4f31eafe9cc3 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts @@ -6,202 +6,202 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { TagResource } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TagResourceContract, - TagResourceListByServiceNextOptionalParams, - TagResourceListByServiceOptionalParams, - TagResourceListByServiceResponse, - TagResourceListByServiceNextResponse -} from "../models"; + TagResourceContract, + TagResourceListByServiceNextOptionalParams, + TagResourceListByServiceNextResponse, + TagResourceListByServiceOptionalParams, + TagResourceListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TagResource } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing TagResource operations. */ export class TagResourceImpl implements TagResource { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TagResource class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TagResource class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of resources associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of resources associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagResourceListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagResourceListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of resources associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of resources associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TagResourceListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: TagResourceListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts index ab0c13bb24d9..6f250a41dcfa 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts @@ -6,542 +6,542 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { TenantAccess } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AccessInformationContract, - TenantAccessListByServiceNextOptionalParams, - TenantAccessListByServiceOptionalParams, - TenantAccessListByServiceResponse, - AccessIdName, - TenantAccessGetEntityTagOptionalParams, - TenantAccessGetEntityTagResponse, - TenantAccessGetOptionalParams, - TenantAccessGetResponse, - AccessInformationCreateParameters, - TenantAccessCreateOptionalParams, - TenantAccessCreateResponse, - AccessInformationUpdateParameters, - TenantAccessUpdateOptionalParams, - TenantAccessUpdateResponse, - TenantAccessRegeneratePrimaryKeyOptionalParams, - TenantAccessRegenerateSecondaryKeyOptionalParams, - TenantAccessListSecretsOptionalParams, - TenantAccessListSecretsResponse, - TenantAccessListByServiceNextResponse -} from "../models"; + AccessIdName, + AccessInformationContract, + AccessInformationCreateParameters, + AccessInformationUpdateParameters, + TenantAccessCreateOptionalParams, + TenantAccessCreateResponse, + TenantAccessGetEntityTagOptionalParams, + TenantAccessGetEntityTagResponse, + TenantAccessGetOptionalParams, + TenantAccessGetResponse, + TenantAccessListByServiceNextOptionalParams, + TenantAccessListByServiceNextResponse, + TenantAccessListByServiceOptionalParams, + TenantAccessListByServiceResponse, + TenantAccessListSecretsOptionalParams, + TenantAccessListSecretsResponse, + TenantAccessRegeneratePrimaryKeyOptionalParams, + TenantAccessRegenerateSecondaryKeyOptionalParams, + TenantAccessUpdateOptionalParams, + TenantAccessUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TenantAccess } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing TenantAccess operations. */ export class TenantAccessImpl implements TenantAccess { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TenantAccess class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TenantAccess class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Returns list of access infos - for Git and Management endpoints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Returns list of access infos - for Git and Management endpoints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TenantAccessListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TenantAccessListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Returns list of access infos - for Git and Management endpoints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Returns list of access infos - for Git and Management endpoints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Tenant access metadata - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - getEntityTagOperationSpec - ); - } + /** + * Tenant access metadata + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + getEntityTagOperationSpec + ); + } - /** - * Get tenant access information details without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - getOperationSpec - ); - } + /** + * Get tenant access information details without secrets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + getOperationSpec + ); + } - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationCreateParameters, - options?: TenantAccessCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - options - }, - createOperationSpec - ); - } + /** + * Update tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Parameters supplied to retrieve the Tenant Access Information. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationCreateParameters, + options?: TenantAccessCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters, + options + }, + createOperationSpec + ); + } - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationUpdateParameters, - options?: TenantAccessUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Update tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Parameters supplied to retrieve the Tenant Access Information. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationUpdateParameters, + options?: TenantAccessUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Regenerate primary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegeneratePrimaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regeneratePrimaryKeyOperationSpec - ); - } + /** + * Regenerate primary access key + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegeneratePrimaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + regeneratePrimaryKeyOperationSpec + ); + } - /** - * Regenerate secondary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegenerateSecondaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regenerateSecondaryKeyOperationSpec - ); - } + /** + * Regenerate secondary access key + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegenerateSecondaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + regenerateSecondaryKeyOperationSpec + ); + } - /** - * Get tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - listSecretsOperationSpec - ); - } + /** + * Get tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + listSecretsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TenantAccessListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: TenantAccessListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.filter, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TenantAccessGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TenantAccessGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationContract, - headersMapper: Mappers.TenantAccessGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationContract, + headersMapper: Mappers.TenantAccessGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationContract, - headersMapper: Mappers.TenantAccessCreateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationContract, + headersMapper: Mappers.TenantAccessCreateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters69, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters69, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationContract, - headersMapper: Mappers.TenantAccessUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationContract, + headersMapper: Mappers.TenantAccessUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters70, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters70, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationSecretsContract, - headersMapper: Mappers.TenantAccessListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationSecretsContract, + headersMapper: Mappers.TenantAccessListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts index 9d7f1db29713..0315796b22df 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts @@ -6,109 +6,109 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { TenantAccessGit } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AccessIdName, - TenantAccessGitRegeneratePrimaryKeyOptionalParams, - TenantAccessGitRegenerateSecondaryKeyOptionalParams -} from "../models"; + AccessIdName, + TenantAccessGitRegeneratePrimaryKeyOptionalParams, + TenantAccessGitRegenerateSecondaryKeyOptionalParams +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TenantAccessGit } from "../operationsInterfaces/index.js"; /** Class containing TenantAccessGit operations. */ export class TenantAccessGitImpl implements TenantAccessGit { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TenantAccessGit class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TenantAccessGit class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Regenerate primary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regeneratePrimaryKeyOperationSpec - ); - } + /** + * Regenerate primary access key for GIT. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + regeneratePrimaryKeyOperationSpec + ); + } - /** - * Regenerate secondary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regenerateSecondaryKeyOperationSpec - ); - } + /** + * Regenerate secondary access key for GIT. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + regenerateSecondaryKeyOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts index 15867ab82145..20ae4cc5c196 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts @@ -6,515 +6,515 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { TenantConfiguration } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + OperationState, + SimplePollerLike, + createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - DeployConfigurationParameters, - ConfigurationIdName, - TenantConfigurationDeployOptionalParams, - TenantConfigurationDeployResponse, - SaveConfigurationParameter, - TenantConfigurationSaveOptionalParams, - TenantConfigurationSaveResponse, - TenantConfigurationValidateOptionalParams, - TenantConfigurationValidateResponse, - TenantConfigurationGetSyncStateOptionalParams, - TenantConfigurationGetSyncStateResponse -} from "../models"; + ConfigurationIdName, + DeployConfigurationParameters, + SaveConfigurationParameter, + TenantConfigurationDeployOptionalParams, + TenantConfigurationDeployResponse, + TenantConfigurationGetSyncStateOptionalParams, + TenantConfigurationGetSyncStateResponse, + TenantConfigurationSaveOptionalParams, + TenantConfigurationSaveResponse, + TenantConfigurationValidateOptionalParams, + TenantConfigurationValidateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TenantConfiguration } from "../operationsInterfaces/index.js"; /** Class containing TenantConfiguration operations. */ export class TenantConfigurationImpl implements TenantConfiguration { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TenantConfiguration class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TenantConfiguration class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - async beginDeploy( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationDeployResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * This operation applies changes from the specified Git branch to the configuration database. This is + * a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Deploy Configuration parameters. + * @param options The options parameters. + */ + async beginDeploy( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationDeployResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - configurationName, - parameters, - options - }, - spec: deployOperationSpec - }); - const poller = await createHttpPoller< - TenantConfigurationDeployResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + configurationName, + parameters, + options + }, + spec: deployOperationSpec + }); + const poller = await createHttpPoller< + TenantConfigurationDeployResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - async beginDeployAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams - ): Promise { - const poller = await this.beginDeploy( - resourceGroupName, - serviceName, - configurationName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * This operation applies changes from the specified Git branch to the configuration database. This is + * a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Deploy Configuration parameters. + * @param options The options parameters. + */ + async beginDeployAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams + ): Promise { + const poller = await this.beginDeploy( + resourceGroupName, + serviceName, + configurationName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - async beginSave( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationSaveResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * This operation creates a commit with the current configuration snapshot to the specified branch in + * the repository. This is a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Save Configuration parameters. + * @param options The options parameters. + */ + async beginSave( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationSaveResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - configurationName, - parameters, - options - }, - spec: saveOperationSpec - }); - const poller = await createHttpPoller< - TenantConfigurationSaveResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + configurationName, + parameters, + options + }, + spec: saveOperationSpec + }); + const poller = await createHttpPoller< + TenantConfigurationSaveResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - async beginSaveAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams - ): Promise { - const poller = await this.beginSave( - resourceGroupName, - serviceName, - configurationName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * This operation creates a commit with the current configuration snapshot to the specified branch in + * the repository. This is a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Save Configuration parameters. + * @param options The options parameters. + */ + async beginSaveAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams + ): Promise { + const poller = await this.beginSave( + resourceGroupName, + serviceName, + configurationName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - async beginValidate( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationValidateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; + /** + * This operation validates the changes in the specified Git branch. This is a long running operation + * and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Validate Configuration parameters. + * @param options The options parameters. + */ + async beginValidate( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationValidateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - configurationName, - parameters, - options - }, - spec: validateOperationSpec - }); - const poller = await createHttpPoller< - TenantConfigurationValidateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + configurationName, + parameters, + options + }, + spec: validateOperationSpec + }); + const poller = await createHttpPoller< + TenantConfigurationValidateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - async beginValidateAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams - ): Promise { - const poller = await this.beginValidate( - resourceGroupName, - serviceName, - configurationName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * This operation validates the changes in the specified Git branch. This is a long running operation + * and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Validate Configuration parameters. + * @param options The options parameters. + */ + async beginValidateAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams + ): Promise { + const poller = await this.beginValidate( + resourceGroupName, + serviceName, + configurationName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Gets the status of the most recent synchronization between the configuration database and the Git - * repository. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param options The options parameters. - */ - getSyncState( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - options?: TenantConfigurationGetSyncStateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, configurationName, options }, - getSyncStateOperationSpec - ); - } + /** + * Gets the status of the most recent synchronization between the configuration database and the Git + * repository. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param options The options parameters. + */ + getSyncState( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + options?: TenantConfigurationGetSyncStateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, configurationName, options }, + getSyncStateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const deployOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract - }, - 201: { - bodyMapper: Mappers.OperationResultContract - }, - 202: { - bodyMapper: Mappers.OperationResultContract - }, - 204: { - bodyMapper: Mappers.OperationResultContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.OperationResultContract + }, + 201: { + bodyMapper: Mappers.OperationResultContract + }, + 202: { + bodyMapper: Mappers.OperationResultContract + }, + 204: { + bodyMapper: Mappers.OperationResultContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters71, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.configurationName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters71, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.configurationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const saveOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract - }, - 201: { - bodyMapper: Mappers.OperationResultContract - }, - 202: { - bodyMapper: Mappers.OperationResultContract - }, - 204: { - bodyMapper: Mappers.OperationResultContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.OperationResultContract + }, + 201: { + bodyMapper: Mappers.OperationResultContract + }, + 202: { + bodyMapper: Mappers.OperationResultContract + }, + 204: { + bodyMapper: Mappers.OperationResultContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters72, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.configurationName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters72, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.configurationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const validateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract - }, - 201: { - bodyMapper: Mappers.OperationResultContract - }, - 202: { - bodyMapper: Mappers.OperationResultContract - }, - 204: { - bodyMapper: Mappers.OperationResultContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.OperationResultContract + }, + 201: { + bodyMapper: Mappers.OperationResultContract + }, + 202: { + bodyMapper: Mappers.OperationResultContract + }, + 204: { + bodyMapper: Mappers.OperationResultContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters71, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.configurationName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters71, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.configurationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const getSyncStateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantConfigurationSyncStateContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TenantConfigurationSyncStateContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.configurationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.configurationName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts index b46350a3c9ab..0b281e458666 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts @@ -6,243 +6,243 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { TenantSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TenantSettingsContract, - TenantSettingsListByServiceNextOptionalParams, - TenantSettingsListByServiceOptionalParams, - TenantSettingsListByServiceResponse, - SettingsTypeName, - TenantSettingsGetOptionalParams, - TenantSettingsGetResponse, - TenantSettingsListByServiceNextResponse -} from "../models"; + SettingsTypeName, + TenantSettingsContract, + TenantSettingsGetOptionalParams, + TenantSettingsGetResponse, + TenantSettingsListByServiceNextOptionalParams, + TenantSettingsListByServiceNextResponse, + TenantSettingsListByServiceOptionalParams, + TenantSettingsListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TenantSettings } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing TenantSettings operations. */ export class TenantSettingsImpl implements TenantSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TenantSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TenantSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Public settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Public settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TenantSettingsListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TenantSettingsListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Public settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Public settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Get tenant settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param settingsType The identifier of the settings. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - settingsType: SettingsTypeName, - options?: TenantSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, settingsType, options }, - getOperationSpec - ); - } + /** + * Get tenant settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param settingsType The identifier of the settings. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + settingsType: SettingsTypeName, + options?: TenantSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, settingsType, options }, + getOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TenantSettingsListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: TenantSettingsListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantSettingsCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TenantSettingsCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.filter, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantSettingsContract, - headersMapper: Mappers.TenantSettingsGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TenantSettingsContract, + headersMapper: Mappers.TenantSettingsGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.settingsType - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.settingsType + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantSettingsCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TenantSettingsCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/user.ts b/sdk/apimanagement/arm-apimanagement/src/operations/user.ts index 8aa6945fedab..745cf33bc6c5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/user.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/user.ts @@ -6,551 +6,551 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { User } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - UserContract, - UserListByServiceNextOptionalParams, - UserListByServiceOptionalParams, - UserListByServiceResponse, - UserGetEntityTagOptionalParams, - UserGetEntityTagResponse, - UserGetOptionalParams, - UserGetResponse, - UserCreateParameters, - UserCreateOrUpdateOptionalParams, - UserCreateOrUpdateResponse, - UserUpdateParameters, - UserUpdateOptionalParams, - UserUpdateResponse, - UserDeleteOptionalParams, - UserGenerateSsoUrlOptionalParams, - UserGenerateSsoUrlResponse, - UserTokenParameters, - UserGetSharedAccessTokenOptionalParams, - UserGetSharedAccessTokenResponse, - UserListByServiceNextResponse -} from "../models"; + UserContract, + UserCreateOrUpdateOptionalParams, + UserCreateOrUpdateResponse, + UserCreateParameters, + UserDeleteOptionalParams, + UserGenerateSsoUrlOptionalParams, + UserGenerateSsoUrlResponse, + UserGetEntityTagOptionalParams, + UserGetEntityTagResponse, + UserGetOptionalParams, + UserGetResponse, + UserGetSharedAccessTokenOptionalParams, + UserGetSharedAccessTokenResponse, + UserListByServiceNextOptionalParams, + UserListByServiceNextResponse, + UserListByServiceOptionalParams, + UserListByServiceResponse, + UserTokenParameters, + UserUpdateOptionalParams, + UserUpdateParameters, + UserUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { User } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing User operations. */ export class UserImpl implements User { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class User class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class User class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of registered users in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of registered users in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: UserListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UserListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of registered users in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of registered users in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserCreateParameters, - options?: UserCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserCreateParameters, + options?: UserCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - parameters: UserUpdateParameters, - options?: UserUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + parameters: UserUpdateParameters, + options?: UserUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - options?: UserDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the - * developer portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - generateSsoUrl( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGenerateSsoUrlOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - generateSsoUrlOperationSpec - ); - } + /** + * Retrieves a redirection URL containing an authentication token for signing a given user into the + * developer portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + generateSsoUrl( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGenerateSsoUrlOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + generateSsoUrlOperationSpec + ); + } - /** - * Gets the Shared Access Authorization Token for the User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @param options The options parameters. - */ - getSharedAccessToken( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserTokenParameters, - options?: UserGetSharedAccessTokenOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, parameters, options }, - getSharedAccessTokenOperationSpec - ); - } + /** + * Gets the Shared Access Authorization Token for the User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param parameters Create Authorization Token parameters. + * @param options The options parameters. + */ + getSharedAccessToken( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserTokenParameters, + options?: UserGetSharedAccessTokenOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, parameters, options }, + getSharedAccessTokenOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: UserListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: UserListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.expandGroups - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.expandGroups + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.UserGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.UserGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserContract, + headersMapper: Mappers.UserGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.UserContract, + headersMapper: Mappers.UserCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.UserContract, + headersMapper: Mappers.UserCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters73, - queryParameters: [Parameters.apiVersion, Parameters.notify], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters73, + queryParameters: [Parameters.apiVersion, Parameters.notify], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.UserContract, + headersMapper: Mappers.UserUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters74, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters74, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.deleteSubscriptions, - Parameters.notify, - Parameters.appType - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.deleteSubscriptions, + Parameters.notify, + Parameters.appType + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const generateSsoUrlOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GenerateSsoUrlResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GenerateSsoUrlResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const getSharedAccessTokenOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.UserTokenResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.UserTokenResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters75, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters75, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts index 0a9175427c03..fe09ce088e65 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts @@ -6,65 +6,65 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { UserConfirmationPassword } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; -import { UserConfirmationPasswordSendOptionalParams } from "../models"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { UserConfirmationPasswordSendOptionalParams } from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UserConfirmationPassword } from "../operationsInterfaces/index.js"; /** Class containing UserConfirmationPassword operations. */ export class UserConfirmationPasswordImpl implements UserConfirmationPassword { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class UserConfirmationPassword class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class UserConfirmationPassword class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Sends confirmation - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - send( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserConfirmationPasswordSendOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - sendOperationSpec - ); - } + /** + * Sends confirmation + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + send( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserConfirmationPasswordSendOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + sendOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const sendOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.appType], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.appType], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts index 1627954cbe7a..a234b369a319 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts @@ -6,217 +6,217 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { UserGroup } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GroupContract, - UserGroupListNextOptionalParams, - UserGroupListOptionalParams, - UserGroupListResponse, - UserGroupListNextResponse -} from "../models"; + GroupContract, + UserGroupListNextOptionalParams, + UserGroupListNextResponse, + UserGroupListOptionalParams, + UserGroupListResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UserGroup } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing UserGroup operations. */ export class UserGroupImpl implements UserGroup { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class UserGroup class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class UserGroup class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all user groups. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - userId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options, - settings + /** + * Lists all user groups. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + userId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: UserGroupListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - userId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + serviceName, + userId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - userId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UserGroupListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + userId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + userId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + userId, + options + )) { + yield* page; + } } - } - /** - * Lists all user groups. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - listOperationSpec - ); - } + /** + * Lists all user groups. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - userId: string, - nextLink: string, - options?: UserGroupListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + userId: string, + nextLink: string, + options?: UserGroupListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts index 4ff92b553f94..671e1b8e82cb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts @@ -6,212 +6,212 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { UserIdentities } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - UserIdentityContract, - UserIdentitiesListNextOptionalParams, - UserIdentitiesListOptionalParams, - UserIdentitiesListResponse, - UserIdentitiesListNextResponse -} from "../models"; + UserIdentitiesListNextOptionalParams, + UserIdentitiesListNextResponse, + UserIdentitiesListOptionalParams, + UserIdentitiesListResponse, + UserIdentityContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UserIdentities } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing UserIdentities operations. */ export class UserIdentitiesImpl implements UserIdentities { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class UserIdentities class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class UserIdentities class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * List of all user identities. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - userId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options, - settings + /** + * List of all user identities. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + userId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: UserIdentitiesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - userId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + serviceName, + userId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - userId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UserIdentitiesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + userId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + userId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + userId, + options + )) { + yield* page; + } } - } - /** - * List of all user identities. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - listOperationSpec - ); - } + /** + * List of all user identities. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - userId: string, - nextLink: string, - options?: UserIdentitiesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + userId: string, + nextLink: string, + options?: UserIdentitiesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserIdentityCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserIdentityCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserIdentityCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserIdentityCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts index 8e4838abc76a..fd9b73288719 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts @@ -6,266 +6,266 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { UserSubscription } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SubscriptionContract, - UserSubscriptionListNextOptionalParams, - UserSubscriptionListOptionalParams, - UserSubscriptionListResponse, - UserSubscriptionGetOptionalParams, - UserSubscriptionGetResponse, - UserSubscriptionListNextResponse -} from "../models"; + SubscriptionContract, + UserSubscriptionGetOptionalParams, + UserSubscriptionGetResponse, + UserSubscriptionListNextOptionalParams, + UserSubscriptionListNextResponse, + UserSubscriptionListOptionalParams, + UserSubscriptionListResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UserSubscription } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing UserSubscription operations. */ export class UserSubscriptionImpl implements UserSubscription { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class UserSubscription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class UserSubscription class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of subscriptions of the specified user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - userId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options, - settings + /** + * Lists the collection of subscriptions of the specified user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + userId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: UserSubscriptionListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - userId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + serviceName, + userId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - userId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UserSubscriptionListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + userId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + userId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + userId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of subscriptions of the specified user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - listOperationSpec - ); - } + /** + * Lists the collection of subscriptions of the specified user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + listOperationSpec + ); + } - /** - * Gets the specified Subscription entity associated with a particular user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - sid: string, - options?: UserSubscriptionGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, sid, options }, - getOperationSpec - ); - } + /** + * Gets the specified Subscription entity associated with a particular user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + userId: string, + sid: string, + options?: UserSubscriptionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, sid, options }, + getOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - userId: string, - nextLink: string, - options?: UserSubscriptionListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + userId: string, + nextLink: string, + options?: UserSubscriptionListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.UserSubscriptionGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.UserSubscriptionGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts index 0ff932cdd76b..f525873deffd 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts @@ -6,150 +6,150 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - ApiContract, - ApiListByServiceOptionalParams, - TagResourceContract, - ApiListByTagsOptionalParams, - ApiGetEntityTagOptionalParams, - ApiGetEntityTagResponse, - ApiGetOptionalParams, - ApiGetResponse, - ApiCreateOrUpdateParameter, - ApiCreateOrUpdateOptionalParams, - ApiCreateOrUpdateResponse, - ApiUpdateContract, - ApiUpdateOptionalParams, - ApiUpdateResponse, - ApiDeleteOptionalParams -} from "../models"; + ApiContract, + ApiCreateOrUpdateOptionalParams, + ApiCreateOrUpdateParameter, + ApiCreateOrUpdateResponse, + ApiDeleteOptionalParams, + ApiGetEntityTagOptionalParams, + ApiGetEntityTagResponse, + ApiGetOptionalParams, + ApiGetResponse, + ApiListByServiceOptionalParams, + ApiListByTagsOptionalParams, + ApiUpdateContract, + ApiUpdateOptionalParams, + ApiUpdateResponse, + TagResourceContract +} from "../models/index.js"; /// /** Interface representing a Api. */ export interface Api { - /** - * Lists all APIs of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists a collection of apis associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByTags( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetOptionalParams - ): Promise; - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiCreateOrUpdateResponse - > - >; - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Update Contract parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: ApiUpdateContract, - options?: ApiUpdateOptionalParams - ): Promise; - /** - * Deletes the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiDeleteOptionalParams - ): Promise; + /** + * Lists all APIs of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists a collection of apis associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByTags( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetOptionalParams + ): Promise; + /** + * Creates new or updates existing specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiCreateOrUpdateResponse + > + >; + /** + * Creates new or updates existing specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Update Contract parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options?: ApiUpdateOptionalParams + ): Promise; + /** + * Deletes the specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts index d369a59d6f66..66882cfcf6cb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts @@ -8,123 +8,123 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - DiagnosticContract, - ApiDiagnosticListByServiceOptionalParams, - ApiDiagnosticGetEntityTagOptionalParams, - ApiDiagnosticGetEntityTagResponse, - ApiDiagnosticGetOptionalParams, - ApiDiagnosticGetResponse, - ApiDiagnosticCreateOrUpdateOptionalParams, - ApiDiagnosticCreateOrUpdateResponse, - ApiDiagnosticUpdateOptionalParams, - ApiDiagnosticUpdateResponse, - ApiDiagnosticDeleteOptionalParams -} from "../models"; + ApiDiagnosticCreateOrUpdateOptionalParams, + ApiDiagnosticCreateOrUpdateResponse, + ApiDiagnosticDeleteOptionalParams, + ApiDiagnosticGetEntityTagOptionalParams, + ApiDiagnosticGetEntityTagResponse, + ApiDiagnosticGetOptionalParams, + ApiDiagnosticGetResponse, + ApiDiagnosticListByServiceOptionalParams, + ApiDiagnosticUpdateOptionalParams, + ApiDiagnosticUpdateResponse, + DiagnosticContract +} from "../models/index.js"; /// /** Interface representing a ApiDiagnostic. */ export interface ApiDiagnostic { - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetOptionalParams - ): Promise; - /** - * Creates a new Diagnostic for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Diagnostic from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - options?: ApiDiagnosticDeleteOptionalParams - ): Promise; + /** + * Lists all diagnostics of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetOptionalParams + ): Promise; + /** + * Creates a new Diagnostic for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Diagnostic Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Diagnostic from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options?: ApiDiagnosticDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts index 1efcf25c77c1..5427257f8bed 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts @@ -7,32 +7,32 @@ */ import { - ExportFormat, - ExportApi, - ApiExportGetOptionalParams, - ApiExportGetResponse -} from "../models"; + ApiExportGetOptionalParams, + ApiExportGetResponse, + ExportApi, + ExportFormat +} from "../models/index.js"; /** Interface representing a ApiExport. */ export interface ApiExport { - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob - * with SAS Key valid for 5 minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 - * minutes. - * @param exportParam Query parameter required to export the API details. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - format: ExportFormat, - exportParam: ExportApi, - options?: ApiExportGetOptionalParams - ): Promise; + /** + * Gets the details of the API specified by its identifier in the format specified to the Storage Blob + * with SAS Key valid for 5 minutes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 + * minutes. + * @param exportParam Query parameter required to export the API details. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options?: ApiExportGetOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts index ca2f0189336a..0b10da89752b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts @@ -8,119 +8,119 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IssueContract, - ApiIssueListByServiceOptionalParams, - ApiIssueGetEntityTagOptionalParams, - ApiIssueGetEntityTagResponse, - ApiIssueGetOptionalParams, - ApiIssueGetResponse, - ApiIssueCreateOrUpdateOptionalParams, - ApiIssueCreateOrUpdateResponse, - IssueUpdateContract, - ApiIssueUpdateOptionalParams, - ApiIssueUpdateResponse, - ApiIssueDeleteOptionalParams -} from "../models"; + ApiIssueCreateOrUpdateOptionalParams, + ApiIssueCreateOrUpdateResponse, + ApiIssueDeleteOptionalParams, + ApiIssueGetEntityTagOptionalParams, + ApiIssueGetEntityTagResponse, + ApiIssueGetOptionalParams, + ApiIssueGetResponse, + ApiIssueListByServiceOptionalParams, + ApiIssueUpdateOptionalParams, + ApiIssueUpdateResponse, + IssueContract, + IssueUpdateContract +} from "../models/index.js"; /// /** Interface representing a ApiIssue. */ export interface ApiIssue { - /** - * Lists all issues associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetOptionalParams - ): Promise; - /** - * Creates a new Issue for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - parameters: IssueContract, - options?: ApiIssueCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing issue for an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - parameters: IssueUpdateContract, - options?: ApiIssueUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Issue from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - options?: ApiIssueDeleteOptionalParams - ): Promise; + /** + * Lists all issues associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Issue for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetOptionalParams + ): Promise; + /** + * Creates a new Issue for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + parameters: IssueContract, + options?: ApiIssueCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing issue for an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + parameters: IssueUpdateContract, + options?: ApiIssueUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Issue from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + options?: ApiIssueDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts index b6e147b842e3..39d173d3fdd8 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts @@ -8,106 +8,106 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IssueAttachmentContract, - ApiIssueAttachmentListByServiceOptionalParams, - ApiIssueAttachmentGetEntityTagOptionalParams, - ApiIssueAttachmentGetEntityTagResponse, - ApiIssueAttachmentGetOptionalParams, - ApiIssueAttachmentGetResponse, - ApiIssueAttachmentCreateOrUpdateOptionalParams, - ApiIssueAttachmentCreateOrUpdateResponse, - ApiIssueAttachmentDeleteOptionalParams -} from "../models"; + ApiIssueAttachmentCreateOrUpdateOptionalParams, + ApiIssueAttachmentCreateOrUpdateResponse, + ApiIssueAttachmentDeleteOptionalParams, + ApiIssueAttachmentGetEntityTagOptionalParams, + ApiIssueAttachmentGetEntityTagResponse, + ApiIssueAttachmentGetOptionalParams, + ApiIssueAttachmentGetResponse, + ApiIssueAttachmentListByServiceOptionalParams, + IssueAttachmentContract +} from "../models/index.js"; /// /** Interface representing a ApiIssueAttachment. */ export interface ApiIssueAttachment { - /** - * Lists all attachments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetOptionalParams - ): Promise; - /** - * Creates a new Attachment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - parameters: IssueAttachmentContract, - options?: ApiIssueAttachmentCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - ifMatch: string, - options?: ApiIssueAttachmentDeleteOptionalParams - ): Promise; + /** + * Lists all attachments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the issue Attachment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetOptionalParams + ): Promise; + /** + * Creates a new Attachment for the Issue in an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + parameters: IssueAttachmentContract, + options?: ApiIssueAttachmentCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified comment from an Issue. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + ifMatch: string, + options?: ApiIssueAttachmentDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts index 4d86b68407ce..4bfd030eef3a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts @@ -8,106 +8,106 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IssueCommentContract, - ApiIssueCommentListByServiceOptionalParams, - ApiIssueCommentGetEntityTagOptionalParams, - ApiIssueCommentGetEntityTagResponse, - ApiIssueCommentGetOptionalParams, - ApiIssueCommentGetResponse, - ApiIssueCommentCreateOrUpdateOptionalParams, - ApiIssueCommentCreateOrUpdateResponse, - ApiIssueCommentDeleteOptionalParams -} from "../models"; + ApiIssueCommentCreateOrUpdateOptionalParams, + ApiIssueCommentCreateOrUpdateResponse, + ApiIssueCommentDeleteOptionalParams, + ApiIssueCommentGetEntityTagOptionalParams, + ApiIssueCommentGetEntityTagResponse, + ApiIssueCommentGetOptionalParams, + ApiIssueCommentGetResponse, + ApiIssueCommentListByServiceOptionalParams, + IssueCommentContract +} from "../models/index.js"; /// /** Interface representing a ApiIssueComment. */ export interface ApiIssueComment { - /** - * Lists all comments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetOptionalParams - ): Promise; - /** - * Creates a new Comment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - parameters: IssueCommentContract, - options?: ApiIssueCommentCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - ifMatch: string, - options?: ApiIssueCommentDeleteOptionalParams - ): Promise; + /** + * Lists all comments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the issue Comment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetOptionalParams + ): Promise; + /** + * Creates a new Comment for the Issue in an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + parameters: IssueCommentContract, + options?: ApiIssueCommentCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified comment from an Issue. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + ifMatch: string, + options?: ApiIssueCommentDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts index e13d81ae1a56..304a03bc571a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts @@ -8,18 +8,18 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - Operation, - ApiManagementOperationsListOptionalParams -} from "../models"; + ApiManagementOperationsListOptionalParams, + Operation +} from "../models/index.js"; /// /** Interface representing a ApiManagementOperations. */ export interface ApiManagementOperations { - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * @param options The options parameters. - */ - list( - options?: ApiManagementOperationsListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * @param options The options parameters. + */ + list( + options?: ApiManagementOperationsListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts index 947d8acdd1d3..86f90fec68c0 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts @@ -6,309 +6,309 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - ApiManagementServiceResource, - ApiManagementServiceListByResourceGroupOptionalParams, - ApiManagementServiceListOptionalParams, - ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceRestoreOptionalParams, - ApiManagementServiceRestoreResponse, - ApiManagementServiceBackupOptionalParams, - ApiManagementServiceBackupResponse, - ApiManagementServiceCreateOrUpdateOptionalParams, - ApiManagementServiceCreateOrUpdateResponse, - ApiManagementServiceUpdateParameters, - ApiManagementServiceUpdateOptionalParams, - ApiManagementServiceUpdateResponse, - ApiManagementServiceGetOptionalParams, - ApiManagementServiceGetResponse, - ApiManagementServiceDeleteOptionalParams, - ApiManagementServiceMigrateToStv2OptionalParams, - ApiManagementServiceMigrateToStv2Response, - ApiManagementServiceGetSsoTokenOptionalParams, - ApiManagementServiceGetSsoTokenResponse, - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementServiceCheckNameAvailabilityOptionalParams, - ApiManagementServiceCheckNameAvailabilityResponse, - ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, - ApiManagementServiceGetDomainOwnershipIdentifierResponse, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse -} from "../models"; + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, + ApiManagementServiceBackupOptionalParams, + ApiManagementServiceBackupResponse, + ApiManagementServiceBackupRestoreParameters, + ApiManagementServiceCheckNameAvailabilityOptionalParams, + ApiManagementServiceCheckNameAvailabilityParameters, + ApiManagementServiceCheckNameAvailabilityResponse, + ApiManagementServiceCreateOrUpdateOptionalParams, + ApiManagementServiceCreateOrUpdateResponse, + ApiManagementServiceDeleteOptionalParams, + ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ApiManagementServiceGetDomainOwnershipIdentifierResponse, + ApiManagementServiceGetOptionalParams, + ApiManagementServiceGetResponse, + ApiManagementServiceGetSsoTokenOptionalParams, + ApiManagementServiceGetSsoTokenResponse, + ApiManagementServiceListByResourceGroupOptionalParams, + ApiManagementServiceListOptionalParams, + ApiManagementServiceMigrateToStv2OptionalParams, + ApiManagementServiceMigrateToStv2Response, + ApiManagementServiceResource, + ApiManagementServiceRestoreOptionalParams, + ApiManagementServiceRestoreResponse, + ApiManagementServiceUpdateOptionalParams, + ApiManagementServiceUpdateParameters, + ApiManagementServiceUpdateResponse +} from "../models/index.js"; /// /** Interface representing a ApiManagementService. */ export interface ApiManagementService { - /** - * List all API Management services within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists all API Management services within an Azure subscription. - * @param options The options parameters. - */ - list( - options?: ApiManagementServiceListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - beginRestore( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceRestoreResponse - > - >; - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - beginRestoreAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams - ): Promise; - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - beginBackup( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceBackupResponse - > - >; - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - beginBackupAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams - ): Promise; - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceCreateOrUpdateResponse - > - >; - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceUpdateResponse - > - >; - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams - ): Promise; - /** - * Gets an API Management service resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetOptionalParams - ): Promise; - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams - ): Promise, void>>; - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams - ): Promise; - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginMigrateToStv2( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceMigrateToStv2Response - > - >; - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginMigrateToStv2AndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams - ): Promise; - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getSsoToken( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetSsoTokenOptionalParams - ): Promise; - /** - * Checks availability and correctness of a name for an API Management service. - * @param parameters Parameters supplied to the CheckNameAvailability operation. - * @param options The options parameters. - */ - checkNameAvailability( - parameters: ApiManagementServiceCheckNameAvailabilityParameters, - options?: ApiManagementServiceCheckNameAvailabilityOptionalParams - ): Promise; - /** - * Get the custom domain ownership identifier for an API Management service. - * @param options The options parameters. - */ - getDomainOwnershipIdentifier( - options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams - ): Promise; - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginApplyNetworkConfigurationUpdates( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - ): Promise< - SimplePollerLike< - OperationState< - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - >, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - > - >; - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - ): Promise; + /** + * List all API Management services within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all API Management services within an Azure subscription. + * @param options The options parameters. + */ + list( + options?: ApiManagementServiceListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Restores a backup of an API Management service created using the ApiManagementService_Backup + * operation on the current service. This is a long running operation and could take several minutes to + * complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the Restore API Management service from backup operation. + * @param options The options parameters. + */ + beginRestore( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceRestoreResponse + > + >; + /** + * Restores a backup of an API Management service created using the ApiManagementService_Backup + * operation on the current service. This is a long running operation and could take several minutes to + * complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the Restore API Management service from backup operation. + * @param options The options parameters. + */ + beginRestoreAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams + ): Promise; + /** + * Creates a backup of the API Management service to the given Azure Storage Account. This is long + * running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the ApiManagementService_Backup operation. + * @param options The options parameters. + */ + beginBackup( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceBackupResponse + > + >; + /** + * Creates a backup of the API Management service to the given Azure Storage Account. This is long + * running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the ApiManagementService_Backup operation. + * @param options The options parameters. + */ + beginBackupAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams + ): Promise; + /** + * Creates or updates an API Management service. This is long running operation and could take several + * minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceCreateOrUpdateResponse + > + >; + /** + * Creates or updates an API Management service. This is long running operation and could take several + * minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceUpdateResponse + > + >; + /** + * Updates an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams + ): Promise; + /** + * Gets an API Management service resource description. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetOptionalParams + ): Promise; + /** + * Deletes an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams + ): Promise; + /** + * Upgrades an API Management service to the Stv2 platform. For details refer to + * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and + * could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginMigrateToStv2( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceMigrateToStv2Response + > + >; + /** + * Upgrades an API Management service to the Stv2 platform. For details refer to + * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and + * could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginMigrateToStv2AndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams + ): Promise; + /** + * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getSsoToken( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetSsoTokenOptionalParams + ): Promise; + /** + * Checks availability and correctness of a name for an API Management service. + * @param parameters Parameters supplied to the CheckNameAvailability operation. + * @param options The options parameters. + */ + checkNameAvailability( + parameters: ApiManagementServiceCheckNameAvailabilityParameters, + options?: ApiManagementServiceCheckNameAvailabilityOptionalParams + ): Promise; + /** + * Get the custom domain ownership identifier for an API Management service. + * @param options The options parameters. + */ + getDomainOwnershipIdentifier( + options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams + ): Promise; + /** + * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS + * changes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginApplyNetworkConfigurationUpdates( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + >, + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + > + >; + /** + * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS + * changes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginApplyNetworkConfigurationUpdatesAndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts index 49efcda76ba3..acd9797039cf 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts @@ -8,22 +8,22 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ResourceSkuResult, - ApiManagementServiceSkusListAvailableServiceSkusOptionalParams -} from "../models"; + ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, + ResourceSkuResult +} from "../models/index.js"; /// /** Interface representing a ApiManagementServiceSkus. */ export interface ApiManagementServiceSkus { - /** - * Gets all available SKU for a given API Management service - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listAvailableServiceSkus( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - ): PagedAsyncIterableIterator; + /** + * Gets all available SKU for a given API Management service + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listAvailableServiceSkus( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts index c5459f44cbf1..c27c8366d7b8 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts @@ -8,18 +8,18 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiManagementSku, - ApiManagementSkusListOptionalParams -} from "../models"; + ApiManagementSku, + ApiManagementSkusListOptionalParams +} from "../models/index.js"; /// /** Interface representing a ApiManagementSkus. */ export interface ApiManagementSkus { - /** - * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * @param options The options parameters. - */ - list( - options?: ApiManagementSkusListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * @param options The options parameters. + */ + list( + options?: ApiManagementSkusListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts index bfe69dd00983..743eff9e716d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts @@ -8,130 +8,130 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - OperationContract, - ApiOperationListByApiOptionalParams, - ApiOperationGetEntityTagOptionalParams, - ApiOperationGetEntityTagResponse, - ApiOperationGetOptionalParams, - ApiOperationGetResponse, - ApiOperationCreateOrUpdateOptionalParams, - ApiOperationCreateOrUpdateResponse, - OperationUpdateContract, - ApiOperationUpdateOptionalParams, - ApiOperationUpdateResponse, - ApiOperationDeleteOptionalParams -} from "../models"; + ApiOperationCreateOrUpdateOptionalParams, + ApiOperationCreateOrUpdateResponse, + ApiOperationDeleteOptionalParams, + ApiOperationGetEntityTagOptionalParams, + ApiOperationGetEntityTagResponse, + ApiOperationGetOptionalParams, + ApiOperationGetResponse, + ApiOperationListByApiOptionalParams, + ApiOperationUpdateOptionalParams, + ApiOperationUpdateResponse, + OperationContract, + OperationUpdateContract +} from "../models/index.js"; /// /** Interface representing a ApiOperation. */ export interface ApiOperation { - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the API Operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetOptionalParams - ): Promise; - /** - * Creates a new operation in the API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - parameters: OperationContract, - options?: ApiOperationCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the operation in the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Operation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - parameters: OperationUpdateContract, - options?: ApiOperationUpdateOptionalParams - ): Promise; - /** - * Deletes the specified operation in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - options?: ApiOperationDeleteOptionalParams - ): Promise; + /** + * Lists a collection of the operations for the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the API operation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the API Operation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetOptionalParams + ): Promise; + /** + * Creates a new operation in the API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options?: ApiOperationCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the operation in the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Operation Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options?: ApiOperationUpdateOptionalParams + ): Promise; + /** + * Deletes the specified operation in the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + options?: ApiOperationDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts index 224a85a7e194..39be08d7effd 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts @@ -7,117 +7,117 @@ */ import { - ApiOperationPolicyListByOperationOptionalParams, - ApiOperationPolicyListByOperationResponse, - PolicyIdName, - ApiOperationPolicyGetEntityTagOptionalParams, - ApiOperationPolicyGetEntityTagResponse, - ApiOperationPolicyGetOptionalParams, - ApiOperationPolicyGetResponse, - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiOperationPolicyCreateOrUpdateResponse, - ApiOperationPolicyDeleteOptionalParams -} from "../models"; + ApiOperationPolicyCreateOrUpdateOptionalParams, + ApiOperationPolicyCreateOrUpdateResponse, + ApiOperationPolicyDeleteOptionalParams, + ApiOperationPolicyGetEntityTagOptionalParams, + ApiOperationPolicyGetEntityTagResponse, + ApiOperationPolicyGetOptionalParams, + ApiOperationPolicyGetResponse, + ApiOperationPolicyListByOperationOptionalParams, + ApiOperationPolicyListByOperationResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; /** Interface representing a ApiOperationPolicy. */ export interface ApiOperationPolicy { - /** - * Get the list of policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationPolicyListByOperationOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates policy configuration for the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiOperationPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the policy configuration at the Api Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiOperationPolicyDeleteOptionalParams - ): Promise; + /** + * Get the list of policy configuration at the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationPolicyListByOperationOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of the API operation policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the policy configuration at the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates policy configuration for the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiOperationPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the policy configuration at the Api Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiOperationPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts index 3d54b954c30e..a99e543c3099 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts @@ -7,102 +7,102 @@ */ import { - ApiPolicyListByApiOptionalParams, - ApiPolicyListByApiResponse, - PolicyIdName, - ApiPolicyGetEntityTagOptionalParams, - ApiPolicyGetEntityTagResponse, - ApiPolicyGetOptionalParams, - ApiPolicyGetResponse, - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiPolicyCreateOrUpdateResponse, - ApiPolicyDeleteOptionalParams -} from "../models"; + ApiPolicyCreateOrUpdateOptionalParams, + ApiPolicyCreateOrUpdateResponse, + ApiPolicyDeleteOptionalParams, + ApiPolicyGetEntityTagOptionalParams, + ApiPolicyGetEntityTagResponse, + ApiPolicyGetOptionalParams, + ApiPolicyGetResponse, + ApiPolicyListByApiOptionalParams, + ApiPolicyListByApiResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; /** Interface representing a ApiPolicy. */ export interface ApiPolicy { - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiPolicyListByApiOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates policy configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the policy configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiPolicyDeleteOptionalParams - ): Promise; + /** + * Get the policy configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiPolicyListByApiOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of the API policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the policy configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates policy configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the policy configuration at the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts index d83bdb058e0a..d2dc54e5c812 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts @@ -7,22 +7,22 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ProductContract, ApiProductListByApisOptionalParams } from "../models"; +import { ApiProductListByApisOptionalParams, ProductContract } from "../models/index.js"; /// /** Interface representing a ApiProduct. */ export interface ApiProduct { - /** - * Lists all Products, which the API is part of. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByApis( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all Products, which the API is part of. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByApis( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts index 15d74409908a..e02d60a51477 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts @@ -8,125 +8,125 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiReleaseContract, - ApiReleaseListByServiceOptionalParams, - ApiReleaseGetEntityTagOptionalParams, - ApiReleaseGetEntityTagResponse, - ApiReleaseGetOptionalParams, - ApiReleaseGetResponse, - ApiReleaseCreateOrUpdateOptionalParams, - ApiReleaseCreateOrUpdateResponse, - ApiReleaseUpdateOptionalParams, - ApiReleaseUpdateResponse, - ApiReleaseDeleteOptionalParams -} from "../models"; + ApiReleaseContract, + ApiReleaseCreateOrUpdateOptionalParams, + ApiReleaseCreateOrUpdateResponse, + ApiReleaseDeleteOptionalParams, + ApiReleaseGetEntityTagOptionalParams, + ApiReleaseGetEntityTagResponse, + ApiReleaseGetOptionalParams, + ApiReleaseGetResponse, + ApiReleaseListByServiceOptionalParams, + ApiReleaseUpdateOptionalParams, + ApiReleaseUpdateResponse +} from "../models/index.js"; /// /** Interface representing a ApiRelease. */ export interface ApiRelease { - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Returns the etag of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetEntityTagOptionalParams - ): Promise; - /** - * Returns the details of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetOptionalParams - ): Promise; - /** - * Creates a new Release for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - parameters: ApiReleaseContract, - options?: ApiReleaseCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the release of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Release Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - parameters: ApiReleaseContract, - options?: ApiReleaseUpdateOptionalParams - ): Promise; - /** - * Deletes the specified release in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - options?: ApiReleaseDeleteOptionalParams - ): Promise; + /** + * Lists all releases of an API. An API release is created when making an API Revision current. + * Releases are also used to rollback to previous revisions. Results will be paged and can be + * constrained by the $top and $skip parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Returns the etag of an API release. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetEntityTagOptionalParams + ): Promise; + /** + * Returns the details of an API release. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetOptionalParams + ): Promise; + /** + * Creates a new Release for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options?: ApiReleaseCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the release of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Release Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options?: ApiReleaseUpdateOptionalParams + ): Promise; + /** + * Deletes the specified release in the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + options?: ApiReleaseDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts index 8264f54d3f06..8da885063b8a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts @@ -8,24 +8,24 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiRevisionContract, - ApiRevisionListByServiceOptionalParams -} from "../models"; + ApiRevisionContract, + ApiRevisionListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a ApiRevision. */ export interface ApiRevision { - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all revisions of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts index 2a2b5c2c807c..7056686f6734 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts @@ -6,127 +6,127 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - SchemaContract, - ApiSchemaListByApiOptionalParams, - ApiSchemaGetEntityTagOptionalParams, - ApiSchemaGetEntityTagResponse, - ApiSchemaGetOptionalParams, - ApiSchemaGetResponse, - ApiSchemaCreateOrUpdateOptionalParams, - ApiSchemaCreateOrUpdateResponse, - ApiSchemaDeleteOptionalParams -} from "../models"; + ApiSchemaCreateOrUpdateOptionalParams, + ApiSchemaCreateOrUpdateResponse, + ApiSchemaDeleteOptionalParams, + ApiSchemaGetEntityTagOptionalParams, + ApiSchemaGetEntityTagResponse, + ApiSchemaGetOptionalParams, + ApiSchemaGetResponse, + ApiSchemaListByApiOptionalParams, + SchemaContract +} from "../models/index.js"; /// /** Interface representing a ApiSchema. */ export interface ApiSchema { - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetEntityTagOptionalParams - ): Promise; - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetOptionalParams - ): Promise; - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiSchemaCreateOrUpdateResponse - > - >; - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the schema configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - ifMatch: string, - options?: ApiSchemaDeleteOptionalParams - ): Promise; + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetEntityTagOptionalParams + ): Promise; + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetOptionalParams + ): Promise; + /** + * Creates or updates schema configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters The schema contents to apply. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiSchemaCreateOrUpdateResponse + > + >; + /** + * Creates or updates schema configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters The schema contents to apply. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the schema configuration at the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + ifMatch: string, + options?: ApiSchemaDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts index cd4303cd42c1..85e5b5ec3544 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts @@ -8,107 +8,107 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TagDescriptionContract, - ApiTagDescriptionListByServiceOptionalParams, - ApiTagDescriptionGetEntityTagOptionalParams, - ApiTagDescriptionGetEntityTagResponse, - ApiTagDescriptionGetOptionalParams, - ApiTagDescriptionGetResponse, - TagDescriptionCreateParameters, - ApiTagDescriptionCreateOrUpdateOptionalParams, - ApiTagDescriptionCreateOrUpdateResponse, - ApiTagDescriptionDeleteOptionalParams -} from "../models"; + ApiTagDescriptionCreateOrUpdateOptionalParams, + ApiTagDescriptionCreateOrUpdateResponse, + ApiTagDescriptionDeleteOptionalParams, + ApiTagDescriptionGetEntityTagOptionalParams, + ApiTagDescriptionGetEntityTagResponse, + ApiTagDescriptionGetOptionalParams, + ApiTagDescriptionGetResponse, + ApiTagDescriptionListByServiceOptionalParams, + TagDescriptionContract, + TagDescriptionCreateParameters +} from "../models/index.js"; /// /** Interface representing a ApiTagDescription. */ export interface ApiTagDescription { - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on - * API level but tag may be assigned to the Operations - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetEntityTagOptionalParams - ): Promise; - /** - * Get Tag description in scope of API - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetOptionalParams - ): Promise; - /** - * Create/Update tag description in scope of the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - parameters: TagDescriptionCreateParameters, - options?: ApiTagDescriptionCreateOrUpdateOptionalParams - ): Promise; - /** - * Delete tag description for the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - ifMatch: string, - options?: ApiTagDescriptionDeleteOptionalParams - ): Promise; + /** + * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on + * API level but tag may be assigned to the Operations + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetEntityTagOptionalParams + ): Promise; + /** + * Get Tag description in scope of API + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetOptionalParams + ): Promise; + /** + * Create/Update tag description in scope of the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + parameters: TagDescriptionCreateParameters, + options?: ApiTagDescriptionCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete tag description for the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + ifMatch: string, + options?: ApiTagDescriptionDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts index 4a5912de1735..edac616ef3a2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts @@ -8,112 +8,112 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiVersionSetContract, - ApiVersionSetListByServiceOptionalParams, - ApiVersionSetGetEntityTagOptionalParams, - ApiVersionSetGetEntityTagResponse, - ApiVersionSetGetOptionalParams, - ApiVersionSetGetResponse, - ApiVersionSetCreateOrUpdateOptionalParams, - ApiVersionSetCreateOrUpdateResponse, - ApiVersionSetUpdateParameters, - ApiVersionSetUpdateOptionalParams, - ApiVersionSetUpdateResponse, - ApiVersionSetDeleteOptionalParams -} from "../models"; + ApiVersionSetContract, + ApiVersionSetCreateOrUpdateOptionalParams, + ApiVersionSetCreateOrUpdateResponse, + ApiVersionSetDeleteOptionalParams, + ApiVersionSetGetEntityTagOptionalParams, + ApiVersionSetGetEntityTagResponse, + ApiVersionSetGetOptionalParams, + ApiVersionSetGetResponse, + ApiVersionSetListByServiceOptionalParams, + ApiVersionSetUpdateOptionalParams, + ApiVersionSetUpdateParameters, + ApiVersionSetUpdateResponse +} from "../models/index.js"; /// /** Interface representing a ApiVersionSet. */ export interface ApiVersionSet { - /** - * Lists a collection of API Version Sets in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetOptionalParams - ): Promise; - /** - * Creates or Updates a Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - parameters: ApiVersionSetContract, - options?: ApiVersionSetCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Api VersionSet specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - parameters: ApiVersionSetUpdateParameters, - options?: ApiVersionSetUpdateOptionalParams - ): Promise; - /** - * Deletes specific Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - options?: ApiVersionSetDeleteOptionalParams - ): Promise; + /** + * Lists a collection of API Version Sets in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Api Version Set specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetOptionalParams + ): Promise; + /** + * Creates or Updates a Api Version Set. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options?: ApiVersionSetCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Api VersionSet specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options?: ApiVersionSetUpdateOptionalParams + ): Promise; + /** + * Deletes specific Api Version Set. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + options?: ApiVersionSetDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts index 5d6bcdf9565c..005667455680 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts @@ -7,94 +7,94 @@ */ import { - ApiWikiGetEntityTagOptionalParams, - ApiWikiGetEntityTagResponse, - ApiWikiGetOptionalParams, - ApiWikiGetResponse, - WikiContract, - ApiWikiCreateOrUpdateOptionalParams, - ApiWikiCreateOrUpdateResponse, - WikiUpdateContract, - ApiWikiUpdateOptionalParams, - ApiWikiUpdateResponse, - ApiWikiDeleteOptionalParams -} from "../models"; + ApiWikiCreateOrUpdateOptionalParams, + ApiWikiCreateOrUpdateResponse, + ApiWikiDeleteOptionalParams, + ApiWikiGetEntityTagOptionalParams, + ApiWikiGetEntityTagResponse, + ApiWikiGetOptionalParams, + ApiWikiGetResponse, + ApiWikiUpdateOptionalParams, + ApiWikiUpdateResponse, + WikiContract, + WikiUpdateContract +} from "../models/index.js"; /** Interface representing a ApiWiki. */ export interface ApiWiki { - /** - * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetOptionalParams - ): Promise; - /** - * Creates a new Wiki for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: WikiContract, - options?: ApiWikiCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ApiWikiUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Wiki from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiWikiDeleteOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetOptionalParams + ): Promise; + /** + * Creates a new Wiki for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: WikiContract, + options?: ApiWikiCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Wiki Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ApiWikiUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Wiki from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiWikiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts index b86f924bee02..96e551db357b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts @@ -7,22 +7,22 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { WikiContract, ApiWikisListOptionalParams } from "../models"; +import { ApiWikisListOptionalParams, WikiContract } from "../models/index.js"; /// /** Interface representing a ApiWikis. */ export interface ApiWikis { - /** - * Gets the wikis for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Gets the wikis for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts index 015f10f04d61..c468c1d51e30 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts @@ -8,99 +8,99 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AuthorizationContract, - AuthorizationListByAuthorizationProviderOptionalParams, - AuthorizationGetOptionalParams, - AuthorizationGetResponse, - AuthorizationCreateOrUpdateOptionalParams, - AuthorizationCreateOrUpdateResponse, - AuthorizationDeleteOptionalParams, - AuthorizationConfirmConsentCodeRequestContract, - AuthorizationConfirmConsentCodeOptionalParams, - AuthorizationConfirmConsentCodeResponse -} from "../models"; + AuthorizationConfirmConsentCodeOptionalParams, + AuthorizationConfirmConsentCodeRequestContract, + AuthorizationConfirmConsentCodeResponse, + AuthorizationContract, + AuthorizationCreateOrUpdateOptionalParams, + AuthorizationCreateOrUpdateResponse, + AuthorizationDeleteOptionalParams, + AuthorizationGetOptionalParams, + AuthorizationGetResponse, + AuthorizationListByAuthorizationProviderOptionalParams +} from "../models/index.js"; /// /** Interface representing a Authorization. */ export interface Authorization { - /** - * Lists a collection of authorization providers defined within a authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - listByAuthorizationProvider( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the authorization specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationGetOptionalParams - ): Promise; - /** - * Creates or updates authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationContract, - options?: AuthorizationCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific Authorization from the Authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - ifMatch: string, - options?: AuthorizationDeleteOptionalParams - ): Promise; - /** - * Confirm valid consent code to suppress Authorizations anti-phishing page. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - confirmConsentCode( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationConfirmConsentCodeRequestContract, - options?: AuthorizationConfirmConsentCodeOptionalParams - ): Promise; + /** + * Lists a collection of authorization providers defined within a authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + listByAuthorizationProvider( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the authorization specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationGetOptionalParams + ): Promise; + /** + * Creates or updates authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationContract, + options?: AuthorizationCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific Authorization from the Authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + ifMatch: string, + options?: AuthorizationDeleteOptionalParams + ): Promise; + /** + * Confirm valid consent code to suppress Authorizations anti-phishing page. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + confirmConsentCode( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationConfirmConsentCodeRequestContract, + options?: AuthorizationConfirmConsentCodeOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts index 9bbf78ae39d7..96210457ec57 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts @@ -8,87 +8,87 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AuthorizationAccessPolicyContract, - AuthorizationAccessPolicyListByAuthorizationOptionalParams, - AuthorizationAccessPolicyGetOptionalParams, - AuthorizationAccessPolicyGetResponse, - AuthorizationAccessPolicyCreateOrUpdateOptionalParams, - AuthorizationAccessPolicyCreateOrUpdateResponse, - AuthorizationAccessPolicyDeleteOptionalParams -} from "../models"; + AuthorizationAccessPolicyContract, + AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + AuthorizationAccessPolicyCreateOrUpdateResponse, + AuthorizationAccessPolicyDeleteOptionalParams, + AuthorizationAccessPolicyGetOptionalParams, + AuthorizationAccessPolicyGetResponse, + AuthorizationAccessPolicyListByAuthorizationOptionalParams +} from "../models/index.js"; /// /** Interface representing a AuthorizationAccessPolicy. */ export interface AuthorizationAccessPolicy { - /** - * Lists a collection of authorization access policy defined within a authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - listByAuthorization( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the authorization access policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - options?: AuthorizationAccessPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates Authorization Access Policy. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - parameters: AuthorizationAccessPolicyContract, - options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific access policy from the Authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - ifMatch: string, - options?: AuthorizationAccessPolicyDeleteOptionalParams - ): Promise; + /** + * Lists a collection of authorization access policy defined within a authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + listByAuthorization( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the authorization access policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + options?: AuthorizationAccessPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates Authorization Access Policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + parameters: AuthorizationAccessPolicyContract, + options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific access policy from the Authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + ifMatch: string, + options?: AuthorizationAccessPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts index bcfc0be03fe5..23ad1d46b4ea 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts @@ -7,28 +7,28 @@ */ import { - AuthorizationLoginRequestContract, - AuthorizationLoginLinksPostOptionalParams, - AuthorizationLoginLinksPostResponse -} from "../models"; + AuthorizationLoginLinksPostOptionalParams, + AuthorizationLoginLinksPostResponse, + AuthorizationLoginRequestContract +} from "../models/index.js"; /** Interface representing a AuthorizationLoginLinks. */ export interface AuthorizationLoginLinks { - /** - * Gets authorization login links. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - post( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationLoginRequestContract, - options?: AuthorizationLoginLinksPostOptionalParams - ): Promise; + /** + * Gets authorization login links. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + post( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationLoginRequestContract, + options?: AuthorizationLoginLinksPostOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts index 1b2c64bf2296..6d7e4a2d7bae 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts @@ -8,71 +8,71 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AuthorizationProviderContract, - AuthorizationProviderListByServiceOptionalParams, - AuthorizationProviderGetOptionalParams, - AuthorizationProviderGetResponse, - AuthorizationProviderCreateOrUpdateOptionalParams, - AuthorizationProviderCreateOrUpdateResponse, - AuthorizationProviderDeleteOptionalParams -} from "../models"; + AuthorizationProviderContract, + AuthorizationProviderCreateOrUpdateOptionalParams, + AuthorizationProviderCreateOrUpdateResponse, + AuthorizationProviderDeleteOptionalParams, + AuthorizationProviderGetOptionalParams, + AuthorizationProviderGetResponse, + AuthorizationProviderListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a AuthorizationProvider. */ export interface AuthorizationProvider { - /** - * Lists a collection of authorization providers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the authorization provider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationProviderGetOptionalParams - ): Promise; - /** - * Creates or updates authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - parameters: AuthorizationProviderContract, - options?: AuthorizationProviderCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific authorization provider from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - ifMatch: string, - options?: AuthorizationProviderDeleteOptionalParams - ): Promise; + /** + * Lists a collection of authorization providers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the authorization provider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationProviderGetOptionalParams + ): Promise; + /** + * Creates or updates authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + parameters: AuthorizationProviderContract, + options?: AuthorizationProviderCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific authorization provider from the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + ifMatch: string, + options?: AuthorizationProviderDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts index d70ac4bcaccc..bac3852d227d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts @@ -8,122 +8,122 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AuthorizationServerContract, - AuthorizationServerListByServiceOptionalParams, - AuthorizationServerGetEntityTagOptionalParams, - AuthorizationServerGetEntityTagResponse, - AuthorizationServerGetOptionalParams, - AuthorizationServerGetResponse, - AuthorizationServerCreateOrUpdateOptionalParams, - AuthorizationServerCreateOrUpdateResponse, - AuthorizationServerUpdateContract, - AuthorizationServerUpdateOptionalParams, - AuthorizationServerUpdateResponse, - AuthorizationServerDeleteOptionalParams, - AuthorizationServerListSecretsOptionalParams, - AuthorizationServerListSecretsResponse -} from "../models"; + AuthorizationServerContract, + AuthorizationServerCreateOrUpdateOptionalParams, + AuthorizationServerCreateOrUpdateResponse, + AuthorizationServerDeleteOptionalParams, + AuthorizationServerGetEntityTagOptionalParams, + AuthorizationServerGetEntityTagResponse, + AuthorizationServerGetOptionalParams, + AuthorizationServerGetResponse, + AuthorizationServerListByServiceOptionalParams, + AuthorizationServerListSecretsOptionalParams, + AuthorizationServerListSecretsResponse, + AuthorizationServerUpdateContract, + AuthorizationServerUpdateOptionalParams, + AuthorizationServerUpdateResponse +} from "../models/index.js"; /// /** Interface representing a AuthorizationServer. */ export interface AuthorizationServer { - /** - * Lists a collection of authorization servers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetOptionalParams - ): Promise; - /** - * Creates new authorization server or updates an existing authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authsid: string, - parameters: AuthorizationServerContract, - options?: AuthorizationServerCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters OAuth2 Server settings Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - parameters: AuthorizationServerUpdateContract, - options?: AuthorizationServerUpdateOptionalParams - ): Promise; - /** - * Deletes specific authorization server instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - options?: AuthorizationServerDeleteOptionalParams - ): Promise; - /** - * Gets the client secret details of the authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerListSecretsOptionalParams - ): Promise; + /** + * Lists a collection of authorization servers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the authorization server specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetOptionalParams + ): Promise; + /** + * Creates new authorization server or updates an existing authorization server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authsid: string, + parameters: AuthorizationServerContract, + options?: AuthorizationServerCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the authorization server specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters OAuth2 Server settings Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + parameters: AuthorizationServerUpdateContract, + options?: AuthorizationServerUpdateOptionalParams + ): Promise; + /** + * Deletes specific authorization server instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + options?: AuthorizationServerDeleteOptionalParams + ): Promise; + /** + * Gets the client secret details of the authorization server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts index 40e8e927c666..e7fd8604ff5c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts @@ -8,128 +8,128 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - BackendContract, - BackendListByServiceOptionalParams, - BackendGetEntityTagOptionalParams, - BackendGetEntityTagResponse, - BackendGetOptionalParams, - BackendGetResponse, - BackendCreateOrUpdateOptionalParams, - BackendCreateOrUpdateResponse, - BackendUpdateParameters, - BackendUpdateOptionalParams, - BackendUpdateResponse, - BackendDeleteOptionalParams, - BackendReconnectOptionalParams -} from "../models"; + BackendContract, + BackendCreateOrUpdateOptionalParams, + BackendCreateOrUpdateResponse, + BackendDeleteOptionalParams, + BackendGetEntityTagOptionalParams, + BackendGetEntityTagResponse, + BackendGetOptionalParams, + BackendGetResponse, + BackendListByServiceOptionalParams, + BackendReconnectOptionalParams, + BackendUpdateOptionalParams, + BackendUpdateParameters, + BackendUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Backend. */ export interface Backend { - /** - * Lists a collection of backends in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetOptionalParams - ): Promise; - /** - * Creates or Updates a backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - backendId: string, - parameters: BackendContract, - options?: BackendCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - parameters: BackendUpdateParameters, - options?: BackendUpdateOptionalParams - ): Promise; - /** - * Deletes the specified backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - options?: BackendDeleteOptionalParams - ): Promise; - /** - * Notifies the API Management gateway to create a new connection to the backend after the specified - * timeout. If no timeout was specified, timeout of 2 minutes is used. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - reconnect( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendReconnectOptionalParams - ): Promise; + /** + * Lists a collection of backends in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the backend specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the backend specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetOptionalParams + ): Promise; + /** + * Creates or Updates a backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + backendId: string, + parameters: BackendContract, + options?: BackendCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options?: BackendUpdateOptionalParams + ): Promise; + /** + * Deletes the specified backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + options?: BackendDeleteOptionalParams + ): Promise; + /** + * Notifies the API Management gateway to create a new connection to the backend after the specified + * timeout. If no timeout was specified, timeout of 2 minutes is used. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + reconnect( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendReconnectOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts index 8572de9ad24a..83e149d2d53e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts @@ -8,112 +8,112 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - CacheContract, - CacheListByServiceOptionalParams, - CacheGetEntityTagOptionalParams, - CacheGetEntityTagResponse, - CacheGetOptionalParams, - CacheGetResponse, - CacheCreateOrUpdateOptionalParams, - CacheCreateOrUpdateResponse, - CacheUpdateParameters, - CacheUpdateOptionalParams, - CacheUpdateResponse, - CacheDeleteOptionalParams -} from "../models"; + CacheContract, + CacheCreateOrUpdateOptionalParams, + CacheCreateOrUpdateResponse, + CacheDeleteOptionalParams, + CacheGetEntityTagOptionalParams, + CacheGetEntityTagResponse, + CacheGetOptionalParams, + CacheGetResponse, + CacheListByServiceOptionalParams, + CacheUpdateOptionalParams, + CacheUpdateParameters, + CacheUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Cache. */ export interface Cache { - /** - * Lists a collection of all external Caches in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetOptionalParams - ): Promise; - /** - * Creates or updates an External Cache to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - cacheId: string, - parameters: CacheContract, - options?: CacheCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - parameters: CacheUpdateParameters, - options?: CacheUpdateOptionalParams - ): Promise; - /** - * Deletes specific Cache. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - options?: CacheDeleteOptionalParams - ): Promise; + /** + * Lists a collection of all external Caches in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetOptionalParams + ): Promise; + /** + * Creates or updates an External Cache to be used in Api Management instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param parameters Create or Update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + cacheId: string, + parameters: CacheContract, + options?: CacheCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + parameters: CacheUpdateParameters, + options?: CacheUpdateOptionalParams + ): Promise; + /** + * Deletes specific Cache. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + options?: CacheDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts index 1cf2f8298d79..5b7b7e05fe2c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts @@ -8,107 +8,107 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - CertificateContract, - CertificateListByServiceOptionalParams, - CertificateGetEntityTagOptionalParams, - CertificateGetEntityTagResponse, - CertificateGetOptionalParams, - CertificateGetResponse, - CertificateCreateOrUpdateParameters, - CertificateCreateOrUpdateOptionalParams, - CertificateCreateOrUpdateResponse, - CertificateDeleteOptionalParams, - CertificateRefreshSecretOptionalParams, - CertificateRefreshSecretResponse -} from "../models"; + CertificateContract, + CertificateCreateOrUpdateOptionalParams, + CertificateCreateOrUpdateParameters, + CertificateCreateOrUpdateResponse, + CertificateDeleteOptionalParams, + CertificateGetEntityTagOptionalParams, + CertificateGetEntityTagResponse, + CertificateGetOptionalParams, + CertificateGetResponse, + CertificateListByServiceOptionalParams, + CertificateRefreshSecretOptionalParams, + CertificateRefreshSecretResponse +} from "../models/index.js"; /// /** Interface representing a Certificate. */ export interface Certificate { - /** - * Lists a collection of all certificates in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetOptionalParams - ): Promise; - /** - * Creates or updates the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - certificateId: string, - parameters: CertificateCreateOrUpdateParameters, - options?: CertificateCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - certificateId: string, - ifMatch: string, - options?: CertificateDeleteOptionalParams - ): Promise; - /** - * From KeyVault, Refresh the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - refreshSecret( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateRefreshSecretOptionalParams - ): Promise; + /** + * Lists a collection of all certificates in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the certificate specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the certificate specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetOptionalParams + ): Promise; + /** + * Creates or updates the certificate being used for authentication with the backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param parameters Create or Update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options?: CertificateCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + certificateId: string, + ifMatch: string, + options?: CertificateDeleteOptionalParams + ): Promise; + /** + * From KeyVault, Refresh the certificate being used for authentication with the backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + refreshSecret( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateRefreshSecretOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts index d6db18227d54..43bb560d7773 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts @@ -8,97 +8,97 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ContentItemContract, - ContentItemListByServiceOptionalParams, - ContentItemGetEntityTagOptionalParams, - ContentItemGetEntityTagResponse, - ContentItemGetOptionalParams, - ContentItemGetResponse, - ContentItemCreateOrUpdateOptionalParams, - ContentItemCreateOrUpdateResponse, - ContentItemDeleteOptionalParams -} from "../models"; + ContentItemContract, + ContentItemCreateOrUpdateOptionalParams, + ContentItemCreateOrUpdateResponse, + ContentItemDeleteOptionalParams, + ContentItemGetEntityTagOptionalParams, + ContentItemGetEntityTagResponse, + ContentItemGetOptionalParams, + ContentItemGetResponse, + ContentItemListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a ContentItem. */ export interface ContentItem { - /** - * Lists developer portal's content items specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Returns the entity state (ETag) version of the developer portal's content item specified by its - * identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetEntityTagOptionalParams - ): Promise; - /** - * Returns the developer portal's content item specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetOptionalParams - ): Promise; - /** - * Creates a new developer portal's content item specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - parameters: ContentItemContract, - options?: ContentItemCreateOrUpdateOptionalParams - ): Promise; - /** - * Removes the specified developer portal's content item. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - ifMatch: string, - options?: ContentItemDeleteOptionalParams - ): Promise; + /** + * Lists developer portal's content items specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Returns the entity state (ETag) version of the developer portal's content item specified by its + * identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetEntityTagOptionalParams + ): Promise; + /** + * Returns the developer portal's content item specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetOptionalParams + ): Promise; + /** + * Creates a new developer portal's content item specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + parameters: ContentItemContract, + options?: ContentItemCreateOrUpdateOptionalParams + ): Promise; + /** + * Removes the specified developer portal's content item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + ifMatch: string, + options?: ContentItemDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts index 68c247315096..17eac2fee9df 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts @@ -8,77 +8,77 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ContentTypeContract, - ContentTypeListByServiceOptionalParams, - ContentTypeGetOptionalParams, - ContentTypeGetResponse, - ContentTypeCreateOrUpdateOptionalParams, - ContentTypeCreateOrUpdateResponse, - ContentTypeDeleteOptionalParams -} from "../models"; + ContentTypeContract, + ContentTypeCreateOrUpdateOptionalParams, + ContentTypeCreateOrUpdateResponse, + ContentTypeDeleteOptionalParams, + ContentTypeGetOptionalParams, + ContentTypeGetResponse, + ContentTypeListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a ContentType. */ export interface ContentType { - /** - * Lists the developer portal's content types. Content types describe content items' properties, - * validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentTypeGetOptionalParams - ): Promise; - /** - * Creates or updates the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Custom content types' identifiers need to start with - * the `c-` prefix. Built-in content types can't be modified. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - parameters: ContentTypeContract, - options?: ContentTypeCreateOrUpdateOptionalParams - ): Promise; - /** - * Removes the specified developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Built-in content types (with identifiers starting - * with the `c-` prefix) can't be removed. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - ifMatch: string, - options?: ContentTypeDeleteOptionalParams - ): Promise; + /** + * Lists the developer portal's content types. Content types describe content items' properties, + * validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentTypeGetOptionalParams + ): Promise; + /** + * Creates or updates the developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. Custom content types' identifiers need to start with + * the `c-` prefix. Built-in content types can't be modified. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + parameters: ContentTypeContract, + options?: ContentTypeCreateOrUpdateOptionalParams + ): Promise; + /** + * Removes the specified developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. Built-in content types (with identifiers starting + * with the `c-` prefix) can't be removed. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + ifMatch: string, + options?: ContentTypeDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts index 650d46f719ba..9af9216a0754 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts @@ -7,80 +7,80 @@ */ import { - DelegationSettingsGetEntityTagOptionalParams, - DelegationSettingsGetEntityTagResponse, - DelegationSettingsGetOptionalParams, - DelegationSettingsGetResponse, - PortalDelegationSettings, - DelegationSettingsUpdateOptionalParams, - DelegationSettingsCreateOrUpdateOptionalParams, - DelegationSettingsCreateOrUpdateResponse, - DelegationSettingsListSecretsOptionalParams, - DelegationSettingsListSecretsResponse -} from "../models"; + DelegationSettingsCreateOrUpdateOptionalParams, + DelegationSettingsCreateOrUpdateResponse, + DelegationSettingsGetEntityTagOptionalParams, + DelegationSettingsGetEntityTagResponse, + DelegationSettingsGetOptionalParams, + DelegationSettingsGetResponse, + DelegationSettingsListSecretsOptionalParams, + DelegationSettingsListSecretsResponse, + DelegationSettingsUpdateOptionalParams, + PortalDelegationSettings +} from "../models/index.js"; /** Interface representing a DelegationSettings. */ export interface DelegationSettings { - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetEntityTagOptionalParams - ): Promise; - /** - * Get Delegation Settings for the Portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetOptionalParams - ): Promise; - /** - * Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Delegation settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsUpdateOptionalParams - ): Promise; - /** - * Create or Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsCreateOrUpdateOptionalParams - ): Promise; - /** - * Gets the secret validation key of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsListSecretsOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the DelegationSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetEntityTagOptionalParams + ): Promise; + /** + * Get Delegation Settings for the Portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetOptionalParams + ): Promise; + /** + * Update Delegation settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Delegation settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsUpdateOptionalParams + ): Promise; + /** + * Create or Update Delegation settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsCreateOrUpdateOptionalParams + ): Promise; + /** + * Gets the secret validation key of the DelegationSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts index fda32ab5743c..0954cc06811b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts @@ -6,57 +6,57 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - DeletedServiceContract, - DeletedServicesListBySubscriptionOptionalParams, - DeletedServicesGetByNameOptionalParams, - DeletedServicesGetByNameResponse, - DeletedServicesPurgeOptionalParams -} from "../models"; + DeletedServiceContract, + DeletedServicesGetByNameOptionalParams, + DeletedServicesGetByNameResponse, + DeletedServicesListBySubscriptionOptionalParams, + DeletedServicesPurgeOptionalParams +} from "../models/index.js"; /// /** Interface representing a DeletedServices. */ export interface DeletedServices { - /** - * Lists all soft-deleted services available for undelete for the given subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: DeletedServicesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get soft-deleted Api Management Service by name. - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - getByName( - serviceName: string, - location: string, - options?: DeletedServicesGetByNameOptionalParams - ): Promise; - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - beginPurge( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams - ): Promise, void>>; - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - beginPurgeAndWait( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams - ): Promise; + /** + * Lists all soft-deleted services available for undelete for the given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: DeletedServicesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get soft-deleted Api Management Service by name. + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + getByName( + serviceName: string, + location: string, + options?: DeletedServicesGetByNameOptionalParams + ): Promise; + /** + * Purges Api Management Service (deletes it with no option to undelete). + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + beginPurge( + serviceName: string, + location: string, + options?: DeletedServicesPurgeOptionalParams + ): Promise, void>>; + /** + * Purges Api Management Service (deletes it with no option to undelete). + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + beginPurgeAndWait( + serviceName: string, + location: string, + options?: DeletedServicesPurgeOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts index a33338aa2633..772dee6595f8 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts @@ -8,111 +8,111 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - DiagnosticContract, - DiagnosticListByServiceOptionalParams, - DiagnosticGetEntityTagOptionalParams, - DiagnosticGetEntityTagResponse, - DiagnosticGetOptionalParams, - DiagnosticGetResponse, - DiagnosticCreateOrUpdateOptionalParams, - DiagnosticCreateOrUpdateResponse, - DiagnosticUpdateOptionalParams, - DiagnosticUpdateResponse, - DiagnosticDeleteOptionalParams -} from "../models"; + DiagnosticContract, + DiagnosticCreateOrUpdateOptionalParams, + DiagnosticCreateOrUpdateResponse, + DiagnosticDeleteOptionalParams, + DiagnosticGetEntityTagOptionalParams, + DiagnosticGetEntityTagResponse, + DiagnosticGetOptionalParams, + DiagnosticGetResponse, + DiagnosticListByServiceOptionalParams, + DiagnosticUpdateOptionalParams, + DiagnosticUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Diagnostic. */ export interface Diagnostic { - /** - * Lists all diagnostics of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetOptionalParams - ): Promise; - /** - * Creates a new Diagnostic or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: DiagnosticCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: DiagnosticUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Diagnostic. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - options?: DiagnosticDeleteOptionalParams - ): Promise; + /** + * Lists all diagnostics of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetOptionalParams + ): Promise; + /** + * Creates a new Diagnostic or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: DiagnosticCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Diagnostic Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: DiagnosticUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Diagnostic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + options?: DiagnosticDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts index 6a9cc7551419..b1033613437d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts @@ -8,112 +8,112 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - DocumentationContract, - DocumentationListByServiceOptionalParams, - DocumentationGetEntityTagOptionalParams, - DocumentationGetEntityTagResponse, - DocumentationGetOptionalParams, - DocumentationGetResponse, - DocumentationCreateOrUpdateOptionalParams, - DocumentationCreateOrUpdateResponse, - DocumentationUpdateContract, - DocumentationUpdateOptionalParams, - DocumentationUpdateResponse, - DocumentationDeleteOptionalParams -} from "../models"; + DocumentationContract, + DocumentationCreateOrUpdateOptionalParams, + DocumentationCreateOrUpdateResponse, + DocumentationDeleteOptionalParams, + DocumentationGetEntityTagOptionalParams, + DocumentationGetEntityTagResponse, + DocumentationGetOptionalParams, + DocumentationGetResponse, + DocumentationListByServiceOptionalParams, + DocumentationUpdateContract, + DocumentationUpdateOptionalParams, + DocumentationUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Documentation. */ export interface Documentation { - /** - * Lists all Documentations of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Documentation by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Documentation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetOptionalParams - ): Promise; - /** - * Creates a new Documentation or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - documentationId: string, - parameters: DocumentationContract, - options?: DocumentationCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Documentation for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Documentation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - parameters: DocumentationUpdateContract, - options?: DocumentationUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Documentation from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - options?: DocumentationDeleteOptionalParams - ): Promise; + /** + * Lists all Documentations of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Documentation by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Documentation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetOptionalParams + ): Promise; + /** + * Creates a new Documentation or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + documentationId: string, + parameters: DocumentationContract, + options?: DocumentationCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Documentation for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Documentation Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + parameters: DocumentationUpdateContract, + options?: DocumentationUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Documentation from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + options?: DocumentationDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts index daa6c97bed59..7b232b684feb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts @@ -8,108 +8,108 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - EmailTemplateContract, - EmailTemplateListByServiceOptionalParams, - TemplateName, - EmailTemplateGetEntityTagOptionalParams, - EmailTemplateGetEntityTagResponse, - EmailTemplateGetOptionalParams, - EmailTemplateGetResponse, - EmailTemplateUpdateParameters, - EmailTemplateCreateOrUpdateOptionalParams, - EmailTemplateCreateOrUpdateResponse, - EmailTemplateUpdateOptionalParams, - EmailTemplateUpdateResponse, - EmailTemplateDeleteOptionalParams -} from "../models"; + EmailTemplateContract, + EmailTemplateCreateOrUpdateOptionalParams, + EmailTemplateCreateOrUpdateResponse, + EmailTemplateDeleteOptionalParams, + EmailTemplateGetEntityTagOptionalParams, + EmailTemplateGetEntityTagResponse, + EmailTemplateGetOptionalParams, + EmailTemplateGetResponse, + EmailTemplateListByServiceOptionalParams, + EmailTemplateUpdateOptionalParams, + EmailTemplateUpdateParameters, + EmailTemplateUpdateResponse, + TemplateName +} from "../models/index.js"; /// /** Interface representing a EmailTemplate. */ export interface EmailTemplate { - /** - * Gets all email templates - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetOptionalParams - ): Promise; - /** - * Updates an Email Template. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param parameters Email Template update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates API Management email template - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateUpdateOptionalParams - ): Promise; - /** - * Reset the Email Template to default template provided by the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - options?: EmailTemplateDeleteOptionalParams - ): Promise; + /** + * Gets all email templates + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the email template specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the email template specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetOptionalParams + ): Promise; + /** + * Updates an Email Template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param parameters Email Template update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates API Management email template + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateUpdateOptionalParams + ): Promise; + /** + * Reset the Email Template to default template provided by the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + options?: EmailTemplateDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts index 00a5b5b809c8..6b422afa0e4e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts @@ -8,164 +8,164 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GatewayContract, - GatewayListByServiceOptionalParams, - GatewayGetEntityTagOptionalParams, - GatewayGetEntityTagResponse, - GatewayGetOptionalParams, - GatewayGetResponse, - GatewayCreateOrUpdateOptionalParams, - GatewayCreateOrUpdateResponse, - GatewayUpdateOptionalParams, - GatewayUpdateResponse, - GatewayDeleteOptionalParams, - GatewayListKeysOptionalParams, - GatewayListKeysResponse, - GatewayKeyRegenerationRequestContract, - GatewayRegenerateKeyOptionalParams, - GatewayTokenRequestContract, - GatewayGenerateTokenOptionalParams, - GatewayGenerateTokenResponse -} from "../models"; + GatewayContract, + GatewayCreateOrUpdateOptionalParams, + GatewayCreateOrUpdateResponse, + GatewayDeleteOptionalParams, + GatewayGenerateTokenOptionalParams, + GatewayGenerateTokenResponse, + GatewayGetEntityTagOptionalParams, + GatewayGetEntityTagResponse, + GatewayGetOptionalParams, + GatewayGetResponse, + GatewayKeyRegenerationRequestContract, + GatewayListByServiceOptionalParams, + GatewayListKeysOptionalParams, + GatewayListKeysResponse, + GatewayRegenerateKeyOptionalParams, + GatewayTokenRequestContract, + GatewayUpdateOptionalParams, + GatewayUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Gateway. */ export interface Gateway { - /** - * Lists a collection of gateways registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetOptionalParams - ): Promise; - /** - * Creates or updates a Gateway to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayContract, - options?: GatewayCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Gateway details. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - parameters: GatewayContract, - options?: GatewayUpdateOptionalParams - ): Promise; - /** - * Deletes specific Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - options?: GatewayDeleteOptionalParams - ): Promise; - /** - * Retrieves gateway keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listKeys( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayListKeysOptionalParams - ): Promise; - /** - * Regenerates specified gateway key invalidating any tokens created with it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway key regeneration request contract properties. - * @param options The options parameters. - */ - regenerateKey( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayKeyRegenerationRequestContract, - options?: GatewayRegenerateKeyOptionalParams - ): Promise; - /** - * Gets the Shared Access Authorization Token for the gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway token request contract properties. - * @param options The options parameters. - */ - generateToken( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayTokenRequestContract, - options?: GatewayGenerateTokenOptionalParams - ): Promise; + /** + * Lists a collection of gateways registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetOptionalParams + ): Promise; + /** + * Creates or updates a Gateway to be used in Api Management instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayContract, + options?: GatewayCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Gateway details. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + parameters: GatewayContract, + options?: GatewayUpdateOptionalParams + ): Promise; + /** + * Deletes specific Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + options?: GatewayDeleteOptionalParams + ): Promise; + /** + * Retrieves gateway keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listKeys( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayListKeysOptionalParams + ): Promise; + /** + * Regenerates specified gateway key invalidating any tokens created with it. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway key regeneration request contract properties. + * @param options The options parameters. + */ + regenerateKey( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayKeyRegenerationRequestContract, + options?: GatewayRegenerateKeyOptionalParams + ): Promise; + /** + * Gets the Shared Access Authorization Token for the gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway token request contract properties. + * @param options The options parameters. + */ + generateToken( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayTokenRequestContract, + options?: GatewayGenerateTokenOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts index 40fbda7aec7f..e8866875dcc1 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts @@ -8,78 +8,78 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiContract, - GatewayApiListByServiceOptionalParams, - GatewayApiGetEntityTagOptionalParams, - GatewayApiGetEntityTagResponse, - GatewayApiCreateOrUpdateOptionalParams, - GatewayApiCreateOrUpdateResponse, - GatewayApiDeleteOptionalParams -} from "../models"; + ApiContract, + GatewayApiCreateOrUpdateOptionalParams, + GatewayApiCreateOrUpdateResponse, + GatewayApiDeleteOptionalParams, + GatewayApiGetEntityTagOptionalParams, + GatewayApiGetEntityTagResponse, + GatewayApiListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a GatewayApi. */ export interface GatewayApi { - /** - * Lists a collection of the APIs associated with a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that API entity specified by identifier is associated with the Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiGetEntityTagOptionalParams - ): Promise; - /** - * Adds an API to the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified API from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiDeleteOptionalParams - ): Promise; + /** + * Lists a collection of the APIs associated with a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that API entity specified by identifier is associated with the Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiGetEntityTagOptionalParams + ): Promise; + /** + * Adds an API to the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified API from the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts index 8295474134eb..6a74ea7953c7 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts @@ -8,105 +8,105 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GatewayCertificateAuthorityContract, - GatewayCertificateAuthorityListByServiceOptionalParams, - GatewayCertificateAuthorityGetEntityTagOptionalParams, - GatewayCertificateAuthorityGetEntityTagResponse, - GatewayCertificateAuthorityGetOptionalParams, - GatewayCertificateAuthorityGetResponse, - GatewayCertificateAuthorityCreateOrUpdateOptionalParams, - GatewayCertificateAuthorityCreateOrUpdateResponse, - GatewayCertificateAuthorityDeleteOptionalParams -} from "../models"; + GatewayCertificateAuthorityContract, + GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + GatewayCertificateAuthorityCreateOrUpdateResponse, + GatewayCertificateAuthorityDeleteOptionalParams, + GatewayCertificateAuthorityGetEntityTagOptionalParams, + GatewayCertificateAuthorityGetEntityTagResponse, + GatewayCertificateAuthorityGetOptionalParams, + GatewayCertificateAuthorityGetResponse, + GatewayCertificateAuthorityListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a GatewayCertificateAuthority. */ export interface GatewayCertificateAuthority { - /** - * Lists the collection of Certificate Authorities for the specified Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetEntityTagOptionalParams - ): Promise; - /** - * Get assigned Gateway Certificate Authority details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetOptionalParams - ): Promise; - /** - * Assign Certificate entity to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Gateway certificate authority details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - parameters: GatewayCertificateAuthorityContract, - options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams - ): Promise; - /** - * Remove relationship between Certificate Authority and Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - ifMatch: string, - options?: GatewayCertificateAuthorityDeleteOptionalParams - ): Promise; + /** + * Lists the collection of Certificate Authorities for the specified Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetEntityTagOptionalParams + ): Promise; + /** + * Get assigned Gateway Certificate Authority details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetOptionalParams + ): Promise; + /** + * Assign Certificate entity to Gateway entity as Certificate Authority. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param parameters Gateway certificate authority details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + parameters: GatewayCertificateAuthorityContract, + options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams + ): Promise; + /** + * Remove relationship between Certificate Authority and Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + ifMatch: string, + options?: GatewayCertificateAuthorityDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts index 51859ce26a5e..6d6013078ec4 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts @@ -8,106 +8,106 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GatewayHostnameConfigurationContract, - GatewayHostnameConfigurationListByServiceOptionalParams, - GatewayHostnameConfigurationGetEntityTagOptionalParams, - GatewayHostnameConfigurationGetEntityTagResponse, - GatewayHostnameConfigurationGetOptionalParams, - GatewayHostnameConfigurationGetResponse, - GatewayHostnameConfigurationCreateOrUpdateOptionalParams, - GatewayHostnameConfigurationCreateOrUpdateResponse, - GatewayHostnameConfigurationDeleteOptionalParams -} from "../models"; + GatewayHostnameConfigurationContract, + GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + GatewayHostnameConfigurationCreateOrUpdateResponse, + GatewayHostnameConfigurationDeleteOptionalParams, + GatewayHostnameConfigurationGetEntityTagOptionalParams, + GatewayHostnameConfigurationGetEntityTagResponse, + GatewayHostnameConfigurationGetOptionalParams, + GatewayHostnameConfigurationGetResponse, + GatewayHostnameConfigurationListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a GatewayHostnameConfiguration. */ export interface GatewayHostnameConfiguration { - /** - * Lists the collection of hostname configurations for the specified gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that hostname configuration entity specified by identifier exists for specified Gateway - * entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetEntityTagOptionalParams - ): Promise; - /** - * Get details of a hostname configuration - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetOptionalParams - ): Promise; - /** - * Creates of updates hostname configuration for a Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param parameters Gateway hostname configuration details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - parameters: GatewayHostnameConfigurationContract, - options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified hostname configuration from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - ifMatch: string, - options?: GatewayHostnameConfigurationDeleteOptionalParams - ): Promise; + /** + * Lists the collection of hostname configurations for the specified gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that hostname configuration entity specified by identifier exists for specified Gateway + * entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetEntityTagOptionalParams + ): Promise; + /** + * Get details of a hostname configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetOptionalParams + ): Promise; + /** + * Creates of updates hostname configuration for a Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param parameters Gateway hostname configuration details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + parameters: GatewayHostnameConfigurationContract, + options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified hostname configuration from the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + ifMatch: string, + options?: GatewayHostnameConfigurationDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts index a41c3a8d9396..ba97ddd7c360 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts @@ -6,109 +6,109 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - GlobalSchemaContract, - GlobalSchemaListByServiceOptionalParams, - GlobalSchemaGetEntityTagOptionalParams, - GlobalSchemaGetEntityTagResponse, - GlobalSchemaGetOptionalParams, - GlobalSchemaGetResponse, - GlobalSchemaCreateOrUpdateOptionalParams, - GlobalSchemaCreateOrUpdateResponse, - GlobalSchemaDeleteOptionalParams -} from "../models"; + GlobalSchemaContract, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaCreateOrUpdateResponse, + GlobalSchemaDeleteOptionalParams, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetEntityTagResponse, + GlobalSchemaGetOptionalParams, + GlobalSchemaGetResponse, + GlobalSchemaListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a GlobalSchema. */ export interface GlobalSchema { - /** - * Lists a collection of schemas registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetOptionalParams - ): Promise; - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - GlobalSchemaCreateOrUpdateResponse - > - >; - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific Schema. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - schemaId: string, - ifMatch: string, - options?: GlobalSchemaDeleteOptionalParams - ): Promise; + /** + * Lists a collection of schemas registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetOptionalParams + ): Promise; + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GlobalSchemaCreateOrUpdateResponse + > + >; + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific Schema. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options?: GlobalSchemaDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts index a26be7a75349..51b8d418898d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts @@ -8,130 +8,130 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ResolverContract, - GraphQLApiResolverListByApiOptionalParams, - GraphQLApiResolverGetEntityTagOptionalParams, - GraphQLApiResolverGetEntityTagResponse, - GraphQLApiResolverGetOptionalParams, - GraphQLApiResolverGetResponse, - GraphQLApiResolverCreateOrUpdateOptionalParams, - GraphQLApiResolverCreateOrUpdateResponse, - ResolverUpdateContract, - GraphQLApiResolverUpdateOptionalParams, - GraphQLApiResolverUpdateResponse, - GraphQLApiResolverDeleteOptionalParams -} from "../models"; + GraphQLApiResolverCreateOrUpdateOptionalParams, + GraphQLApiResolverCreateOrUpdateResponse, + GraphQLApiResolverDeleteOptionalParams, + GraphQLApiResolverGetEntityTagOptionalParams, + GraphQLApiResolverGetEntityTagResponse, + GraphQLApiResolverGetOptionalParams, + GraphQLApiResolverGetResponse, + GraphQLApiResolverListByApiOptionalParams, + GraphQLApiResolverUpdateOptionalParams, + GraphQLApiResolverUpdateResponse, + ResolverContract, + ResolverUpdateContract +} from "../models/index.js"; /// /** Interface representing a GraphQLApiResolver. */ export interface GraphQLApiResolver { - /** - * Lists a collection of the resolvers for the specified GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the GraphQL API Resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetOptionalParams - ): Promise; - /** - * Creates a new resolver in the GraphQL API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - parameters: ResolverContract, - options?: GraphQLApiResolverCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the resolver in the GraphQL API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters GraphQL API Resolver Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - parameters: ResolverUpdateContract, - options?: GraphQLApiResolverUpdateOptionalParams - ): Promise; - /** - * Deletes the specified resolver in the GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - options?: GraphQLApiResolverDeleteOptionalParams - ): Promise; + /** + * Lists a collection of the resolvers for the specified GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the GraphQL API Resolver specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetOptionalParams + ): Promise; + /** + * Creates a new resolver in the GraphQL API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + parameters: ResolverContract, + options?: GraphQLApiResolverCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the resolver in the GraphQL API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters GraphQL API Resolver Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + parameters: ResolverUpdateContract, + options?: GraphQLApiResolverUpdateOptionalParams + ): Promise; + /** + * Deletes the specified resolver in the GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + options?: GraphQLApiResolverDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts index d2bba1d665a9..72f4d60cdfbf 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts @@ -8,117 +8,117 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - PolicyContract, - GraphQLApiResolverPolicyListByResolverOptionalParams, - PolicyIdName, - GraphQLApiResolverPolicyGetEntityTagOptionalParams, - GraphQLApiResolverPolicyGetEntityTagResponse, - GraphQLApiResolverPolicyGetOptionalParams, - GraphQLApiResolverPolicyGetResponse, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - GraphQLApiResolverPolicyCreateOrUpdateResponse, - GraphQLApiResolverPolicyDeleteOptionalParams -} from "../models"; + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + GraphQLApiResolverPolicyCreateOrUpdateResponse, + GraphQLApiResolverPolicyDeleteOptionalParams, + GraphQLApiResolverPolicyGetEntityTagOptionalParams, + GraphQLApiResolverPolicyGetEntityTagResponse, + GraphQLApiResolverPolicyGetOptionalParams, + GraphQLApiResolverPolicyGetResponse, + GraphQLApiResolverPolicyListByResolverOptionalParams, + PolicyContract, + PolicyIdName +} from "../models/index.js"; /// /** Interface representing a GraphQLApiResolverPolicy. */ export interface GraphQLApiResolverPolicy { - /** - * Get the list of policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - listByResolver( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates policy configuration for the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the policy configuration at the GraphQL Api Resolver. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: GraphQLApiResolverPolicyDeleteOptionalParams - ): Promise; + /** + * Get the list of policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + listByResolver( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates policy configuration for the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the policy configuration at the GraphQL Api Resolver. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: GraphQLApiResolverPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts index 2be3ae28bb90..70002fc60994 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts @@ -8,108 +8,108 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GroupContract, - GroupListByServiceOptionalParams, - GroupGetEntityTagOptionalParams, - GroupGetEntityTagResponse, - GroupGetOptionalParams, - GroupGetResponse, - GroupCreateParameters, - GroupCreateOrUpdateOptionalParams, - GroupCreateOrUpdateResponse, - GroupUpdateParameters, - GroupUpdateOptionalParams, - GroupUpdateResponse, - GroupDeleteOptionalParams -} from "../models"; + GroupContract, + GroupCreateOrUpdateOptionalParams, + GroupCreateOrUpdateResponse, + GroupCreateParameters, + GroupDeleteOptionalParams, + GroupGetEntityTagOptionalParams, + GroupGetEntityTagResponse, + GroupGetOptionalParams, + GroupGetResponse, + GroupListByServiceOptionalParams, + GroupUpdateOptionalParams, + GroupUpdateParameters, + GroupUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Group. */ export interface Group { - /** - * Lists a collection of groups defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetOptionalParams - ): Promise; - /** - * Creates or Updates a group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - groupId: string, - parameters: GroupCreateParameters, - options?: GroupCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - parameters: GroupUpdateParameters, - options?: GroupUpdateOptionalParams - ): Promise; - /** - * Deletes specific group of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - options?: GroupDeleteOptionalParams - ): Promise; + /** + * Lists a collection of groups defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetOptionalParams + ): Promise; + /** + * Creates or Updates a group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + groupId: string, + parameters: GroupCreateParameters, + options?: GroupCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options?: GroupUpdateOptionalParams + ): Promise; + /** + * Deletes specific group of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + options?: GroupDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts index 3eb645744d60..10b661b59a34 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts @@ -8,74 +8,74 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - UserContract, - GroupUserListOptionalParams, - GroupUserCheckEntityExistsOptionalParams, - GroupUserCheckEntityExistsResponse, - GroupUserCreateOptionalParams, - GroupUserCreateResponse, - GroupUserDeleteOptionalParams -} from "../models"; + GroupUserCheckEntityExistsOptionalParams, + GroupUserCheckEntityExistsResponse, + GroupUserCreateOptionalParams, + GroupUserCreateResponse, + GroupUserDeleteOptionalParams, + GroupUserListOptionalParams, + UserContract +} from "../models/index.js"; /// /** Interface representing a GroupUser. */ export interface GroupUser { - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that user entity specified by identifier is associated with the group entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCheckEntityExistsOptionalParams - ): Promise; - /** - * Add existing user to existing group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCreateOptionalParams - ): Promise; - /** - * Remove existing user from existing group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserDeleteOptionalParams - ): Promise; + /** + * Lists a collection of user entities associated with the group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that user entity specified by identifier is associated with the group entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCheckEntityExistsOptionalParams + ): Promise; + /** + * Add existing user to existing group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCreateOptionalParams + ): Promise; + /** + * Remove existing user from existing group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts index c5317c014fbb..a0298ac44271 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts @@ -8,124 +8,124 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IdentityProviderContract, - IdentityProviderListByServiceOptionalParams, - IdentityProviderType, - IdentityProviderGetEntityTagOptionalParams, - IdentityProviderGetEntityTagResponse, - IdentityProviderGetOptionalParams, - IdentityProviderGetResponse, - IdentityProviderCreateContract, - IdentityProviderCreateOrUpdateOptionalParams, - IdentityProviderCreateOrUpdateResponse, - IdentityProviderUpdateParameters, - IdentityProviderUpdateOptionalParams, - IdentityProviderUpdateResponse, - IdentityProviderDeleteOptionalParams, - IdentityProviderListSecretsOptionalParams, - IdentityProviderListSecretsResponse -} from "../models"; + IdentityProviderContract, + IdentityProviderCreateContract, + IdentityProviderCreateOrUpdateOptionalParams, + IdentityProviderCreateOrUpdateResponse, + IdentityProviderDeleteOptionalParams, + IdentityProviderGetEntityTagOptionalParams, + IdentityProviderGetEntityTagResponse, + IdentityProviderGetOptionalParams, + IdentityProviderGetResponse, + IdentityProviderListByServiceOptionalParams, + IdentityProviderListSecretsOptionalParams, + IdentityProviderListSecretsResponse, + IdentityProviderType, + IdentityProviderUpdateOptionalParams, + IdentityProviderUpdateParameters, + IdentityProviderUpdateResponse +} from "../models/index.js"; /// /** Interface representing a IdentityProvider. */ export interface IdentityProvider { - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetEntityTagOptionalParams - ): Promise; - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetOptionalParams - ): Promise; - /** - * Creates or Updates the IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - parameters: IdentityProviderCreateContract, - options?: IdentityProviderCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - parameters: IdentityProviderUpdateParameters, - options?: IdentityProviderUpdateOptionalParams - ): Promise; - /** - * Deletes the specified identity provider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - options?: IdentityProviderDeleteOptionalParams - ): Promise; - /** - * Gets the client secret details of the Identity Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderListSecretsOptionalParams - ): Promise; + /** + * Lists a collection of Identity Provider configured in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the identityProvider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetEntityTagOptionalParams + ): Promise; + /** + * Gets the configuration details of the identity Provider configured in specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetOptionalParams + ): Promise; + /** + * Creates or Updates the IdentityProvider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + parameters: IdentityProviderCreateContract, + options?: IdentityProviderCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing IdentityProvider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + parameters: IdentityProviderUpdateParameters, + options?: IdentityProviderUpdateOptionalParams + ): Promise; + /** + * Deletes the specified identity provider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + options?: IdentityProviderDeleteOptionalParams + ): Promise; + /** + * Gets the client secret details of the Identity Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts index 83434e88bcd2..c6971639d6be 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts @@ -6,91 +6,91 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./api"; -export * from "./apiRevision"; -export * from "./apiRelease"; -export * from "./apiOperation"; -export * from "./apiOperationPolicy"; -export * from "./tag"; -export * from "./graphQLApiResolver"; -export * from "./graphQLApiResolverPolicy"; -export * from "./apiProduct"; -export * from "./apiPolicy"; -export * from "./apiSchema"; -export * from "./apiDiagnostic"; -export * from "./apiIssue"; -export * from "./apiIssueComment"; -export * from "./apiIssueAttachment"; -export * from "./apiTagDescription"; -export * from "./operationOperations"; -export * from "./apiWiki"; -export * from "./apiWikis"; -export * from "./apiExport"; -export * from "./apiVersionSet"; -export * from "./authorizationServer"; -export * from "./authorizationProvider"; -export * from "./authorization"; -export * from "./authorizationLoginLinks"; -export * from "./authorizationAccessPolicy"; -export * from "./backend"; -export * from "./cache"; -export * from "./certificate"; -export * from "./contentType"; -export * from "./contentItem"; -export * from "./deletedServices"; -export * from "./apiManagementOperations"; -export * from "./apiManagementServiceSkus"; -export * from "./apiManagementService"; -export * from "./diagnostic"; -export * from "./emailTemplate"; -export * from "./gateway"; -export * from "./gatewayHostnameConfiguration"; -export * from "./gatewayApi"; -export * from "./gatewayCertificateAuthority"; -export * from "./group"; -export * from "./groupUser"; -export * from "./identityProvider"; -export * from "./issue"; -export * from "./logger"; -export * from "./namedValue"; -export * from "./networkStatus"; -export * from "./notification"; -export * from "./notificationRecipientUser"; -export * from "./notificationRecipientEmail"; -export * from "./openIdConnectProvider"; -export * from "./outboundNetworkDependenciesEndpoints"; -export * from "./policy"; -export * from "./policyDescription"; -export * from "./policyFragment"; -export * from "./portalConfig"; -export * from "./portalRevision"; -export * from "./portalSettings"; -export * from "./signInSettings"; -export * from "./signUpSettings"; -export * from "./delegationSettings"; -export * from "./privateEndpointConnectionOperations"; -export * from "./product"; -export * from "./productApi"; -export * from "./productGroup"; -export * from "./productSubscriptions"; -export * from "./productPolicy"; -export * from "./productWiki"; -export * from "./productWikis"; -export * from "./quotaByCounterKeys"; -export * from "./quotaByPeriodKeys"; -export * from "./region"; -export * from "./reports"; -export * from "./globalSchema"; -export * from "./tenantSettings"; -export * from "./apiManagementSkus"; -export * from "./subscription"; -export * from "./tagResource"; -export * from "./tenantAccess"; -export * from "./tenantAccessGit"; -export * from "./tenantConfiguration"; -export * from "./user"; -export * from "./userGroup"; -export * from "./userSubscription"; -export * from "./userIdentities"; -export * from "./userConfirmationPassword"; -export * from "./documentation"; +export * from "./api.js"; +export * from "./apiDiagnostic.js"; +export * from "./apiExport.js"; +export * from "./apiIssue.js"; +export * from "./apiIssueAttachment.js"; +export * from "./apiIssueComment.js"; +export * from "./apiManagementOperations.js"; +export * from "./apiManagementService.js"; +export * from "./apiManagementServiceSkus.js"; +export * from "./apiManagementSkus.js"; +export * from "./apiOperation.js"; +export * from "./apiOperationPolicy.js"; +export * from "./apiPolicy.js"; +export * from "./apiProduct.js"; +export * from "./apiRelease.js"; +export * from "./apiRevision.js"; +export * from "./apiSchema.js"; +export * from "./apiTagDescription.js"; +export * from "./apiVersionSet.js"; +export * from "./apiWiki.js"; +export * from "./apiWikis.js"; +export * from "./authorization.js"; +export * from "./authorizationAccessPolicy.js"; +export * from "./authorizationLoginLinks.js"; +export * from "./authorizationProvider.js"; +export * from "./authorizationServer.js"; +export * from "./backend.js"; +export * from "./cache.js"; +export * from "./certificate.js"; +export * from "./contentItem.js"; +export * from "./contentType.js"; +export * from "./delegationSettings.js"; +export * from "./deletedServices.js"; +export * from "./diagnostic.js"; +export * from "./documentation.js"; +export * from "./emailTemplate.js"; +export * from "./gateway.js"; +export * from "./gatewayApi.js"; +export * from "./gatewayCertificateAuthority.js"; +export * from "./gatewayHostnameConfiguration.js"; +export * from "./globalSchema.js"; +export * from "./graphQLApiResolver.js"; +export * from "./graphQLApiResolverPolicy.js"; +export * from "./group.js"; +export * from "./groupUser.js"; +export * from "./identityProvider.js"; +export * from "./issue.js"; +export * from "./logger.js"; +export * from "./namedValue.js"; +export * from "./networkStatus.js"; +export * from "./notification.js"; +export * from "./notificationRecipientEmail.js"; +export * from "./notificationRecipientUser.js"; +export * from "./openIdConnectProvider.js"; +export * from "./operationOperations.js"; +export * from "./outboundNetworkDependenciesEndpoints.js"; +export * from "./policy.js"; +export * from "./policyDescription.js"; +export * from "./policyFragment.js"; +export * from "./portalConfig.js"; +export * from "./portalRevision.js"; +export * from "./portalSettings.js"; +export * from "./privateEndpointConnectionOperations.js"; +export * from "./product.js"; +export * from "./productApi.js"; +export * from "./productGroup.js"; +export * from "./productPolicy.js"; +export * from "./productSubscriptions.js"; +export * from "./productWiki.js"; +export * from "./productWikis.js"; +export * from "./quotaByCounterKeys.js"; +export * from "./quotaByPeriodKeys.js"; +export * from "./region.js"; +export * from "./reports.js"; +export * from "./signInSettings.js"; +export * from "./signUpSettings.js"; +export * from "./subscription.js"; +export * from "./tag.js"; +export * from "./tagResource.js"; +export * from "./tenantAccess.js"; +export * from "./tenantAccessGit.js"; +export * from "./tenantConfiguration.js"; +export * from "./tenantSettings.js"; +export * from "./user.js"; +export * from "./userConfirmationPassword.js"; +export * from "./userGroup.js"; +export * from "./userIdentities.js"; +export * from "./userSubscription.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts index 9b26a41c56f2..8570c1a70fb5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts @@ -8,37 +8,37 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IssueContract, - IssueListByServiceOptionalParams, - IssueGetOptionalParams, - IssueGetResponse -} from "../models"; + IssueContract, + IssueGetOptionalParams, + IssueGetResponse, + IssueListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a Issue. */ export interface Issue { - /** - * Lists a collection of issues in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets API Management issue details - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - issueId: string, - options?: IssueGetOptionalParams - ): Promise; + /** + * Lists a collection of issues in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets API Management issue details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + issueId: string, + options?: IssueGetOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts index 8ec31d0af0c0..a1dc00819e39 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts @@ -8,107 +8,107 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - LoggerContract, - LoggerListByServiceOptionalParams, - LoggerGetEntityTagOptionalParams, - LoggerGetEntityTagResponse, - LoggerGetOptionalParams, - LoggerGetResponse, - LoggerCreateOrUpdateOptionalParams, - LoggerCreateOrUpdateResponse, - LoggerUpdateContract, - LoggerUpdateOptionalParams, - LoggerUpdateResponse, - LoggerDeleteOptionalParams -} from "../models"; + LoggerContract, + LoggerCreateOrUpdateOptionalParams, + LoggerCreateOrUpdateResponse, + LoggerDeleteOptionalParams, + LoggerGetEntityTagOptionalParams, + LoggerGetEntityTagResponse, + LoggerGetOptionalParams, + LoggerGetResponse, + LoggerListByServiceOptionalParams, + LoggerUpdateContract, + LoggerUpdateOptionalParams, + LoggerUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Logger. */ export interface Logger { - /** - * Lists a collection of loggers in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetOptionalParams - ): Promise; - /** - * Creates or Updates a logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - loggerId: string, - parameters: LoggerContract, - options?: LoggerCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - parameters: LoggerUpdateContract, - options?: LoggerUpdateOptionalParams - ): Promise; - /** - * Deletes the specified logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - options?: LoggerDeleteOptionalParams - ): Promise; + /** + * Lists a collection of loggers in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the logger specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the logger specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetOptionalParams + ): Promise; + /** + * Creates or Updates a logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + loggerId: string, + parameters: LoggerContract, + options?: LoggerCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options?: LoggerUpdateOptionalParams + ): Promise; + /** + * Deletes the specified logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + options?: LoggerDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts index d325fdb15112..49578d95ff14 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts @@ -6,202 +6,202 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - NamedValueContract, - NamedValueListByServiceOptionalParams, - NamedValueGetEntityTagOptionalParams, - NamedValueGetEntityTagResponse, - NamedValueGetOptionalParams, - NamedValueGetResponse, - NamedValueCreateContract, - NamedValueCreateOrUpdateOptionalParams, - NamedValueCreateOrUpdateResponse, - NamedValueUpdateParameters, - NamedValueUpdateOptionalParams, - NamedValueUpdateResponse, - NamedValueDeleteOptionalParams, - NamedValueListValueOptionalParams, - NamedValueListValueResponse, - NamedValueRefreshSecretOptionalParams, - NamedValueRefreshSecretResponse -} from "../models"; + NamedValueContract, + NamedValueCreateContract, + NamedValueCreateOrUpdateOptionalParams, + NamedValueCreateOrUpdateResponse, + NamedValueDeleteOptionalParams, + NamedValueGetEntityTagOptionalParams, + NamedValueGetEntityTagResponse, + NamedValueGetOptionalParams, + NamedValueGetResponse, + NamedValueListByServiceOptionalParams, + NamedValueListValueOptionalParams, + NamedValueListValueResponse, + NamedValueRefreshSecretOptionalParams, + NamedValueRefreshSecretResponse, + NamedValueUpdateOptionalParams, + NamedValueUpdateParameters, + NamedValueUpdateResponse +} from "../models/index.js"; /// /** Interface representing a NamedValue. */ export interface NamedValue { - /** - * Lists a collection of named values defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetOptionalParams - ): Promise; - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueCreateOrUpdateResponse - > - >; - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueUpdateResponse - > - >; - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams - ): Promise; - /** - * Deletes specific named value from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - options?: NamedValueDeleteOptionalParams - ): Promise; - /** - * Gets the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - listValue( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueListValueOptionalParams - ): Promise; - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - beginRefreshSecret( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueRefreshSecretResponse - > - >; - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - beginRefreshSecretAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams - ): Promise; + /** + * Lists a collection of named values defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetOptionalParams + ): Promise; + /** + * Creates or updates named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueCreateOrUpdateResponse + > + >; + /** + * Creates or updates named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the specific named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueUpdateResponse + > + >; + /** + * Updates the specific named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams + ): Promise; + /** + * Deletes specific named value from the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + options?: NamedValueDeleteOptionalParams + ): Promise; + /** + * Gets the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + listValue( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueListValueOptionalParams + ): Promise; + /** + * Refresh the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + beginRefreshSecret( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueRefreshSecretResponse + > + >; + /** + * Refresh the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + beginRefreshSecretAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts index 6bed7641b6b9..3bf3761b25f9 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts @@ -7,39 +7,39 @@ */ import { - NetworkStatusListByServiceOptionalParams, - NetworkStatusListByServiceResponse, - NetworkStatusListByLocationOptionalParams, - NetworkStatusListByLocationResponse -} from "../models"; + NetworkStatusListByLocationOptionalParams, + NetworkStatusListByLocationResponse, + NetworkStatusListByServiceOptionalParams, + NetworkStatusListByServiceResponse +} from "../models/index.js"; /** Interface representing a NetworkStatus. */ export interface NetworkStatus { - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NetworkStatusListByServiceOptionalParams - ): Promise; - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the - * Azure Regions like West US, East US, South Central US. - * @param options The options parameters. - */ - listByLocation( - resourceGroupName: string, - serviceName: string, - locationName: string, - options?: NetworkStatusListByLocationOptionalParams - ): Promise; + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends + * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: NetworkStatusListByServiceOptionalParams + ): Promise; + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends + * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param locationName Location in which the API Management service is deployed. This is one of the + * Azure Regions like West US, East US, South Central US. + * @param options The options parameters. + */ + listByLocation( + resourceGroupName: string, + serviceName: string, + locationName: string, + options?: NetworkStatusListByLocationOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts index 344725e96540..12a58468a5fd 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts @@ -8,53 +8,53 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - NotificationContract, - NotificationListByServiceOptionalParams, - NotificationName, - NotificationGetOptionalParams, - NotificationGetResponse, - NotificationCreateOrUpdateOptionalParams, - NotificationCreateOrUpdateResponse -} from "../models"; + NotificationContract, + NotificationCreateOrUpdateOptionalParams, + NotificationCreateOrUpdateResponse, + NotificationGetOptionalParams, + NotificationGetResponse, + NotificationListByServiceOptionalParams, + NotificationName +} from "../models/index.js"; /// /** Interface representing a Notification. */ export interface Notification { - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the Notification specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationGetOptionalParams - ): Promise; - /** - * Create or Update API Management publisher notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationCreateOrUpdateOptionalParams - ): Promise; + /** + * Lists a collection of properties defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the Notification specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationGetOptionalParams + ): Promise; + /** + * Create or Update API Management publisher notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts index 0d0742d5c743..165b4fc06b94 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts @@ -7,74 +7,74 @@ */ import { - NotificationName, - NotificationRecipientEmailListByNotificationOptionalParams, - NotificationRecipientEmailListByNotificationResponse, - NotificationRecipientEmailCheckEntityExistsOptionalParams, - NotificationRecipientEmailCheckEntityExistsResponse, - NotificationRecipientEmailCreateOrUpdateOptionalParams, - NotificationRecipientEmailCreateOrUpdateResponse, - NotificationRecipientEmailDeleteOptionalParams -} from "../models"; + NotificationName, + NotificationRecipientEmailCheckEntityExistsOptionalParams, + NotificationRecipientEmailCheckEntityExistsResponse, + NotificationRecipientEmailCreateOrUpdateOptionalParams, + NotificationRecipientEmailCreateOrUpdateResponse, + NotificationRecipientEmailDeleteOptionalParams, + NotificationRecipientEmailListByNotificationOptionalParams, + NotificationRecipientEmailListByNotificationResponse +} from "../models/index.js"; /** Interface representing a NotificationRecipientEmail. */ export interface NotificationRecipientEmail { - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientEmailListByNotificationOptionalParams - ): Promise; - /** - * Determine if Notification Recipient Email subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCheckEntityExistsOptionalParams - ): Promise; - /** - * Adds the Email address to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCreateOrUpdateOptionalParams - ): Promise; - /** - * Removes the email from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailDeleteOptionalParams - ): Promise; + /** + * Gets the list of the Notification Recipient Emails subscribed to a notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + listByNotification( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientEmailListByNotificationOptionalParams + ): Promise; + /** + * Determine if Notification Recipient Email subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCheckEntityExistsOptionalParams + ): Promise; + /** + * Adds the Email address to the list of Recipients for the Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCreateOrUpdateOptionalParams + ): Promise; + /** + * Removes the email from the list of Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts index 1e31f45716ba..9c3537352f1e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts @@ -7,74 +7,74 @@ */ import { - NotificationName, - NotificationRecipientUserListByNotificationOptionalParams, - NotificationRecipientUserListByNotificationResponse, - NotificationRecipientUserCheckEntityExistsOptionalParams, - NotificationRecipientUserCheckEntityExistsResponse, - NotificationRecipientUserCreateOrUpdateOptionalParams, - NotificationRecipientUserCreateOrUpdateResponse, - NotificationRecipientUserDeleteOptionalParams -} from "../models"; + NotificationName, + NotificationRecipientUserCheckEntityExistsOptionalParams, + NotificationRecipientUserCheckEntityExistsResponse, + NotificationRecipientUserCreateOrUpdateOptionalParams, + NotificationRecipientUserCreateOrUpdateResponse, + NotificationRecipientUserDeleteOptionalParams, + NotificationRecipientUserListByNotificationOptionalParams, + NotificationRecipientUserListByNotificationResponse +} from "../models/index.js"; /** Interface representing a NotificationRecipientUser. */ export interface NotificationRecipientUser { - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientUserListByNotificationOptionalParams - ): Promise; - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCheckEntityExistsOptionalParams - ): Promise; - /** - * Adds the API Management User to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCreateOrUpdateOptionalParams - ): Promise; - /** - * Removes the API Management user from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserDeleteOptionalParams - ): Promise; + /** + * Gets the list of the Notification Recipient User subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + listByNotification( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientUserListByNotificationOptionalParams + ): Promise; + /** + * Determine if the Notification Recipient User is subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCheckEntityExistsOptionalParams + ): Promise; + /** + * Adds the API Management User to the list of Recipients for the Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCreateOrUpdateOptionalParams + ): Promise; + /** + * Removes the API Management user from the list of Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts index 580369d0e3de..b03b8decdb38 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts @@ -8,122 +8,122 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - OpenidConnectProviderContract, - OpenIdConnectProviderListByServiceOptionalParams, - OpenIdConnectProviderGetEntityTagOptionalParams, - OpenIdConnectProviderGetEntityTagResponse, - OpenIdConnectProviderGetOptionalParams, - OpenIdConnectProviderGetResponse, - OpenIdConnectProviderCreateOrUpdateOptionalParams, - OpenIdConnectProviderCreateOrUpdateResponse, - OpenidConnectProviderUpdateContract, - OpenIdConnectProviderUpdateOptionalParams, - OpenIdConnectProviderUpdateResponse, - OpenIdConnectProviderDeleteOptionalParams, - OpenIdConnectProviderListSecretsOptionalParams, - OpenIdConnectProviderListSecretsResponse -} from "../models"; + OpenidConnectProviderContract, + OpenIdConnectProviderCreateOrUpdateOptionalParams, + OpenIdConnectProviderCreateOrUpdateResponse, + OpenIdConnectProviderDeleteOptionalParams, + OpenIdConnectProviderGetEntityTagOptionalParams, + OpenIdConnectProviderGetEntityTagResponse, + OpenIdConnectProviderGetOptionalParams, + OpenIdConnectProviderGetResponse, + OpenIdConnectProviderListByServiceOptionalParams, + OpenIdConnectProviderListSecretsOptionalParams, + OpenIdConnectProviderListSecretsResponse, + OpenidConnectProviderUpdateContract, + OpenIdConnectProviderUpdateOptionalParams, + OpenIdConnectProviderUpdateResponse +} from "../models/index.js"; /// /** Interface representing a OpenIdConnectProvider. */ export interface OpenIdConnectProvider { - /** - * Lists of all the OpenId Connect Providers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetEntityTagOptionalParams - ): Promise; - /** - * Gets specific OpenID Connect Provider without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetOptionalParams - ): Promise; - /** - * Creates or updates the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - opid: string, - parameters: OpenidConnectProviderContract, - options?: OpenIdConnectProviderCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the specific OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - parameters: OpenidConnectProviderUpdateContract, - options?: OpenIdConnectProviderUpdateOptionalParams - ): Promise; - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - options?: OpenIdConnectProviderDeleteOptionalParams - ): Promise; - /** - * Gets the client secret details of the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderListSecretsOptionalParams - ): Promise; + /** + * Lists of all the OpenId Connect Providers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetEntityTagOptionalParams + ): Promise; + /** + * Gets specific OpenID Connect Provider without secrets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetOptionalParams + ): Promise; + /** + * Creates or updates the OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + opid: string, + parameters: OpenidConnectProviderContract, + options?: OpenIdConnectProviderCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the specific OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + parameters: OpenidConnectProviderUpdateContract, + options?: OpenIdConnectProviderUpdateOptionalParams + ): Promise; + /** + * Deletes specific OpenID Connect Provider of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + options?: OpenIdConnectProviderDeleteOptionalParams + ): Promise; + /** + * Gets the client secret details of the OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts index f5415a244e27..e7471227242b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts @@ -8,25 +8,25 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TagResourceContract, - OperationListByTagsOptionalParams -} from "../models"; + OperationListByTagsOptionalParams, + TagResourceContract +} from "../models/index.js"; /// /** Interface representing a OperationOperations. */ export interface OperationOperations { - /** - * Lists a collection of operations associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByTags( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists a collection of operations associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByTags( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts index dd3d17095902..9f0c139ec76e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts @@ -7,21 +7,21 @@ */ import { - OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, - OutboundNetworkDependenciesEndpointsListByServiceResponse -} from "../models"; + OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, + OutboundNetworkDependenciesEndpointsListByServiceResponse +} from "../models/index.js"; /** Interface representing a OutboundNetworkDependenciesEndpoints. */ export interface OutboundNetworkDependenciesEndpoints { - /** - * Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams - ): Promise; + /** + * Gets the network endpoints of all outbound dependencies of a ApiManagement service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts index 84d9f55f2198..a54dd508c73d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts @@ -7,87 +7,87 @@ */ import { - PolicyListByServiceOptionalParams, - PolicyListByServiceResponse, - PolicyIdName, - PolicyGetEntityTagOptionalParams, - PolicyGetEntityTagResponse, - PolicyGetOptionalParams, - PolicyGetResponse, - PolicyContract, - PolicyCreateOrUpdateOptionalParams, - PolicyCreateOrUpdateResponse, - PolicyDeleteOptionalParams -} from "../models"; + PolicyContract, + PolicyCreateOrUpdateOptionalParams, + PolicyCreateOrUpdateResponse, + PolicyDeleteOptionalParams, + PolicyGetEntityTagOptionalParams, + PolicyGetEntityTagResponse, + PolicyGetOptionalParams, + PolicyGetResponse, + PolicyIdName, + PolicyListByServiceOptionalParams, + PolicyListByServiceResponse +} from "../models/index.js"; /** Interface representing a Policy. */ export interface Policy { - /** - * Lists all the Global Policy definitions of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyListByServiceOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the Global policy definition of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetOptionalParams - ): Promise; - /** - * Creates or updates the global policy configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: PolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the global policy configuration of the Api Management Service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - ifMatch: string, - options?: PolicyDeleteOptionalParams - ): Promise; + /** + * Lists all the Global Policy definitions of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyListByServiceOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the Global policy definition of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetOptionalParams + ): Promise; + /** + * Creates or updates the global policy configuration of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: PolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the global policy configuration of the Api Management Service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + ifMatch: string, + options?: PolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts index 452f51ef1fdd..0c630cb5e324 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts @@ -7,21 +7,21 @@ */ import { - PolicyDescriptionListByServiceOptionalParams, - PolicyDescriptionListByServiceResponse -} from "../models"; + PolicyDescriptionListByServiceOptionalParams, + PolicyDescriptionListByServiceResponse +} from "../models/index.js"; /** Interface representing a PolicyDescription. */ export interface PolicyDescription { - /** - * Lists all policy descriptions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyDescriptionListByServiceOptionalParams - ): Promise; + /** + * Lists all policy descriptions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyDescriptionListByServiceOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts index 171bfa2f20c0..dbdc6b50da24 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts @@ -6,123 +6,123 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { - PolicyFragmentListByServiceOptionalParams, - PolicyFragmentListByServiceResponse, - PolicyFragmentGetEntityTagOptionalParams, - PolicyFragmentGetEntityTagResponse, - PolicyFragmentGetOptionalParams, - PolicyFragmentGetResponse, - PolicyFragmentContract, - PolicyFragmentCreateOrUpdateOptionalParams, - PolicyFragmentCreateOrUpdateResponse, - PolicyFragmentDeleteOptionalParams, - PolicyFragmentListReferencesOptionalParams, - PolicyFragmentListReferencesResponse -} from "../models"; + PolicyFragmentContract, + PolicyFragmentCreateOrUpdateOptionalParams, + PolicyFragmentCreateOrUpdateResponse, + PolicyFragmentDeleteOptionalParams, + PolicyFragmentGetEntityTagOptionalParams, + PolicyFragmentGetEntityTagResponse, + PolicyFragmentGetOptionalParams, + PolicyFragmentGetResponse, + PolicyFragmentListByServiceOptionalParams, + PolicyFragmentListByServiceResponse, + PolicyFragmentListReferencesOptionalParams, + PolicyFragmentListReferencesResponse +} from "../models/index.js"; /** Interface representing a PolicyFragment. */ export interface PolicyFragment { - /** - * Gets all policy fragments. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyFragmentListByServiceOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetEntityTagOptionalParams - ): Promise; - /** - * Gets a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetOptionalParams - ): Promise; - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PolicyFragmentCreateOrUpdateResponse - > - >; - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - id: string, - ifMatch: string, - options?: PolicyFragmentDeleteOptionalParams - ): Promise; - /** - * Lists policy resources that reference the policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - listReferences( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentListReferencesOptionalParams - ): Promise; + /** + * Gets all policy fragments. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyFragmentListByServiceOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetEntityTagOptionalParams + ): Promise; + /** + * Gets a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetOptionalParams + ): Promise; + /** + * Creates or updates a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param parameters The policy fragment contents to apply. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PolicyFragmentCreateOrUpdateResponse + > + >; + /** + * Creates or updates a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param parameters The policy fragment contents to apply. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + id: string, + ifMatch: string, + options?: PolicyFragmentDeleteOptionalParams + ): Promise; + /** + * Lists policy resources that reference the policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + listReferences( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentListReferencesOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts index d32c7d0eb75b..f8ce29b65c97 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts @@ -7,92 +7,92 @@ */ import { - PortalConfigListByServiceOptionalParams, - PortalConfigListByServiceResponse, - PortalConfigGetEntityTagOptionalParams, - PortalConfigGetEntityTagResponse, - PortalConfigGetOptionalParams, - PortalConfigGetResponse, - PortalConfigContract, - PortalConfigUpdateOptionalParams, - PortalConfigUpdateResponse, - PortalConfigCreateOrUpdateOptionalParams, - PortalConfigCreateOrUpdateResponse -} from "../models"; + PortalConfigContract, + PortalConfigCreateOrUpdateOptionalParams, + PortalConfigCreateOrUpdateResponse, + PortalConfigGetEntityTagOptionalParams, + PortalConfigGetEntityTagResponse, + PortalConfigGetOptionalParams, + PortalConfigGetResponse, + PortalConfigListByServiceOptionalParams, + PortalConfigListByServiceResponse, + PortalConfigUpdateOptionalParams, + PortalConfigUpdateResponse +} from "../models/index.js"; /** Interface representing a PortalConfig. */ export interface PortalConfig { - /** - * Lists the developer portal configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalConfigListByServiceOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetEntityTagOptionalParams - ): Promise; - /** - * Get the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetOptionalParams - ): Promise; - /** - * Update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigUpdateOptionalParams - ): Promise; - /** - * Create or update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigCreateOrUpdateOptionalParams - ): Promise; + /** + * Lists the developer portal configurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalConfigListByServiceOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetEntityTagOptionalParams + ): Promise; + /** + * Get the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetOptionalParams + ): Promise; + /** + * Update the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update the developer portal configuration. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigUpdateOptionalParams + ): Promise; + /** + * Create or update the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update the developer portal configuration. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts index e0f92866e5f3..00cbc59dfe46 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts @@ -6,143 +6,143 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - PortalRevisionContract, - PortalRevisionListByServiceOptionalParams, - PortalRevisionGetEntityTagOptionalParams, - PortalRevisionGetEntityTagResponse, - PortalRevisionGetOptionalParams, - PortalRevisionGetResponse, - PortalRevisionCreateOrUpdateOptionalParams, - PortalRevisionCreateOrUpdateResponse, - PortalRevisionUpdateOptionalParams, - PortalRevisionUpdateResponse -} from "../models"; + PortalRevisionContract, + PortalRevisionCreateOrUpdateOptionalParams, + PortalRevisionCreateOrUpdateResponse, + PortalRevisionGetEntityTagOptionalParams, + PortalRevisionGetEntityTagResponse, + PortalRevisionGetOptionalParams, + PortalRevisionGetResponse, + PortalRevisionListByServiceOptionalParams, + PortalRevisionUpdateOptionalParams, + PortalRevisionUpdateResponse +} from "../models/index.js"; /// /** Interface representing a PortalRevision. */ export interface PortalRevision { - /** - * Lists developer portal's revisions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the developer portal revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetEntityTagOptionalParams - ): Promise; - /** - * Gets the developer portal's revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetOptionalParams - ): Promise; - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionCreateOrUpdateResponse - > - >; - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionUpdateResponse - > - >; - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams - ): Promise; + /** + * Lists developer portal's revisions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the developer portal revision specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetEntityTagOptionalParams + ): Promise; + /** + * Gets the developer portal's revision specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetOptionalParams + ): Promise; + /** + * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` + * property indicates if the revision is publicly accessible. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PortalRevisionCreateOrUpdateResponse + > + >; + /** + * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` + * property indicates if the revision is publicly accessible. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the description of specified portal revision or makes it current. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PortalRevisionUpdateResponse + > + >; + /** + * Updates the description of specified portal revision or makes it current. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts index a7ce1b08a936..d9e3cf5bcb5f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts @@ -7,21 +7,21 @@ */ import { - PortalSettingsListByServiceOptionalParams, - PortalSettingsListByServiceResponse -} from "../models"; + PortalSettingsListByServiceOptionalParams, + PortalSettingsListByServiceResponse +} from "../models/index.js"; /** Interface representing a PortalSettings. */ export interface PortalSettings { - /** - * Lists a collection of portalsettings defined within a service instance.. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalSettingsListByServiceOptionalParams - ): Promise; + /** + * Lists a collection of portalsettings defined within a service instance.. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalSettingsListByServiceOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts index b6f6c5b9b32b..a3763216a7d7 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts @@ -6,133 +6,133 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - PrivateEndpointConnection, - PrivateEndpointConnectionListByServiceOptionalParams, - PrivateEndpointConnectionGetByNameOptionalParams, - PrivateEndpointConnectionGetByNameResponse, - PrivateEndpointConnectionRequest, - PrivateEndpointConnectionCreateOrUpdateOptionalParams, - PrivateEndpointConnectionCreateOrUpdateResponse, - PrivateEndpointConnectionDeleteOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesResponse, - PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, - PrivateEndpointConnectionGetPrivateLinkResourceResponse -} from "../models"; + PrivateEndpointConnection, + PrivateEndpointConnectionCreateOrUpdateOptionalParams, + PrivateEndpointConnectionCreateOrUpdateResponse, + PrivateEndpointConnectionDeleteOptionalParams, + PrivateEndpointConnectionGetByNameOptionalParams, + PrivateEndpointConnectionGetByNameResponse, + PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + PrivateEndpointConnectionGetPrivateLinkResourceResponse, + PrivateEndpointConnectionListByServiceOptionalParams, + PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + PrivateEndpointConnectionListPrivateLinkResourcesResponse, + PrivateEndpointConnectionRequest +} from "../models/index.js"; /// /** Interface representing a PrivateEndpointConnectionOperations. */ export interface PrivateEndpointConnectionOperations { - /** - * Lists all private endpoint connections of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the Private Endpoint Connection specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - getByName( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionGetByNameOptionalParams - ): Promise; - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointConnectionCreateOrUpdateResponse - > - >; - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise, void>>; - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise; - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listPrivateLinkResources( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams - ): Promise; - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateLinkSubResourceName Name of the private link resource. - * @param options The options parameters. - */ - getPrivateLinkResource( - resourceGroupName: string, - serviceName: string, - privateLinkSubResourceName: string, - options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams - ): Promise; + /** + * Lists all private endpoint connections of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the Private Endpoint Connection specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + getByName( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionGetByNameOptionalParams + ): Promise; + /** + * Creates a new Private Endpoint Connection or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrivateEndpointConnectionCreateOrUpdateResponse + > + >; + /** + * Creates a new Private Endpoint Connection or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Private Endpoint Connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified Private Endpoint Connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams + ): Promise; + /** + * Gets the private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listPrivateLinkResources( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams + ): Promise; + /** + * Gets the private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateLinkSubResourceName Name of the private link resource. + * @param options The options parameters. + */ + getPrivateLinkResource( + resourceGroupName: string, + serviceName: string, + privateLinkSubResourceName: string, + options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts index f6a72fe292f0..969d91734a3c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts @@ -8,120 +8,120 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ProductContract, - ProductListByServiceOptionalParams, - TagResourceContract, - ProductListByTagsOptionalParams, - ProductGetEntityTagOptionalParams, - ProductGetEntityTagResponse, - ProductGetOptionalParams, - ProductGetResponse, - ProductCreateOrUpdateOptionalParams, - ProductCreateOrUpdateResponse, - ProductUpdateParameters, - ProductUpdateOptionalParams, - ProductUpdateResponse, - ProductDeleteOptionalParams -} from "../models"; + ProductContract, + ProductCreateOrUpdateOptionalParams, + ProductCreateOrUpdateResponse, + ProductDeleteOptionalParams, + ProductGetEntityTagOptionalParams, + ProductGetEntityTagResponse, + ProductGetOptionalParams, + ProductGetResponse, + ProductListByServiceOptionalParams, + ProductListByTagsOptionalParams, + ProductUpdateOptionalParams, + ProductUpdateParameters, + ProductUpdateResponse, + TagResourceContract +} from "../models/index.js"; /// /** Interface representing a Product. */ export interface Product { - /** - * Lists a collection of products in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists a collection of products associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByTags( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetOptionalParams - ): Promise; - /** - * Creates or Updates a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: ProductContract, - options?: ProductCreateOrUpdateOptionalParams - ): Promise; - /** - * Update existing product details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: ProductUpdateParameters, - options?: ProductUpdateOptionalParams - ): Promise; - /** - * Delete product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductDeleteOptionalParams - ): Promise; + /** + * Lists a collection of products in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists a collection of products associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByTags( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetOptionalParams + ): Promise; + /** + * Creates or Updates a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: ProductContract, + options?: ProductCreateOrUpdateOptionalParams + ): Promise; + /** + * Update existing product details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options?: ProductUpdateOptionalParams + ): Promise; + /** + * Delete product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts index 7051be981009..dcd5f958b026 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts @@ -8,77 +8,77 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiContract, - ProductApiListByProductOptionalParams, - ProductApiCheckEntityExistsOptionalParams, - ProductApiCheckEntityExistsResponse, - ProductApiCreateOrUpdateOptionalParams, - ProductApiCreateOrUpdateResponse, - ProductApiDeleteOptionalParams -} from "../models"; + ApiContract, + ProductApiCheckEntityExistsOptionalParams, + ProductApiCheckEntityExistsResponse, + ProductApiCreateOrUpdateOptionalParams, + ProductApiCreateOrUpdateResponse, + ProductApiDeleteOptionalParams, + ProductApiListByProductOptionalParams +} from "../models/index.js"; /// /** Interface representing a ProductApi. */ export interface ProductApi { - /** - * Lists a collection of the APIs associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCheckEntityExistsOptionalParams - ): Promise; - /** - * Adds an API to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiDeleteOptionalParams - ): Promise; + /** + * Lists a collection of the APIs associated with a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that API entity specified by identifier is associated with the Product entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCheckEntityExistsOptionalParams + ): Promise; + /** + * Adds an API to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified API from the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts index e44872094a3d..09f26ba8ac33 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts @@ -8,74 +8,74 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GroupContract, - ProductGroupListByProductOptionalParams, - ProductGroupCheckEntityExistsOptionalParams, - ProductGroupCheckEntityExistsResponse, - ProductGroupCreateOrUpdateOptionalParams, - ProductGroupCreateOrUpdateResponse, - ProductGroupDeleteOptionalParams -} from "../models"; + GroupContract, + ProductGroupCheckEntityExistsOptionalParams, + ProductGroupCheckEntityExistsResponse, + ProductGroupCreateOrUpdateOptionalParams, + ProductGroupCreateOrUpdateResponse, + ProductGroupDeleteOptionalParams, + ProductGroupListByProductOptionalParams +} from "../models/index.js"; /// /** Interface representing a ProductGroup. */ export interface ProductGroup { - /** - * Lists the collection of developer groups associated with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCheckEntityExistsOptionalParams - ): Promise; - /** - * Adds the association between the specified developer group with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the association between the specified group and product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupDeleteOptionalParams - ): Promise; + /** + * Lists the collection of developer groups associated with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that Group entity specified by identifier is associated with the Product entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCheckEntityExistsOptionalParams + ): Promise; + /** + * Adds the association between the specified developer group with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the association between the specified group and product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts index 9f08f040cfb3..ec2c536bad34 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts @@ -7,97 +7,97 @@ */ import { - ProductPolicyListByProductOptionalParams, - ProductPolicyListByProductResponse, - PolicyIdName, - ProductPolicyGetEntityTagOptionalParams, - ProductPolicyGetEntityTagResponse, - ProductPolicyGetOptionalParams, - ProductPolicyGetResponse, - PolicyContract, - ProductPolicyCreateOrUpdateOptionalParams, - ProductPolicyCreateOrUpdateResponse, - ProductPolicyDeleteOptionalParams -} from "../models"; + PolicyContract, + PolicyIdName, + ProductPolicyCreateOrUpdateOptionalParams, + ProductPolicyCreateOrUpdateResponse, + ProductPolicyDeleteOptionalParams, + ProductPolicyGetEntityTagOptionalParams, + ProductPolicyGetEntityTagResponse, + ProductPolicyGetOptionalParams, + ProductPolicyGetResponse, + ProductPolicyListByProductOptionalParams, + ProductPolicyListByProductResponse +} from "../models/index.js"; /** Interface representing a ProductPolicy. */ export interface ProductPolicy { - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductPolicyListByProductOptionalParams - ): Promise; - /** - * Get the ETag of the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates policy configuration for the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ProductPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the policy configuration at the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ProductPolicyDeleteOptionalParams - ): Promise; + /** + * Get the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductPolicyListByProductOptionalParams + ): Promise; + /** + * Get the ETag of the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates policy configuration for the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ProductPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the policy configuration at the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ProductPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts index 804f5bf882b7..cf547f36a38c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts @@ -8,24 +8,24 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - SubscriptionContract, - ProductSubscriptionsListOptionalParams -} from "../models"; + ProductSubscriptionsListOptionalParams, + SubscriptionContract +} from "../models/index.js"; /// /** Interface representing a ProductSubscriptions. */ export interface ProductSubscriptions { - /** - * Lists the collection of subscriptions to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists the collection of subscriptions to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts index 540bdf5fa04a..233e64d7bdaf 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts @@ -7,94 +7,94 @@ */ import { - ProductWikiGetEntityTagOptionalParams, - ProductWikiGetEntityTagResponse, - ProductWikiGetOptionalParams, - ProductWikiGetResponse, - WikiContract, - ProductWikiCreateOrUpdateOptionalParams, - ProductWikiCreateOrUpdateResponse, - WikiUpdateContract, - ProductWikiUpdateOptionalParams, - ProductWikiUpdateResponse, - ProductWikiDeleteOptionalParams -} from "../models"; + ProductWikiCreateOrUpdateOptionalParams, + ProductWikiCreateOrUpdateResponse, + ProductWikiDeleteOptionalParams, + ProductWikiGetEntityTagOptionalParams, + ProductWikiGetEntityTagResponse, + ProductWikiGetOptionalParams, + ProductWikiGetResponse, + ProductWikiUpdateOptionalParams, + ProductWikiUpdateResponse, + WikiContract, + WikiUpdateContract +} from "../models/index.js"; /** Interface representing a ProductWiki. */ export interface ProductWiki { - /** - * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetOptionalParams - ): Promise; - /** - * Creates a new Wiki for a Product or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: WikiContract, - options?: ProductWikiCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ProductWikiUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Wiki from a Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductWikiDeleteOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetOptionalParams + ): Promise; + /** + * Creates a new Wiki for a Product or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: WikiContract, + options?: ProductWikiCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Wiki Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ProductWikiUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Wiki from a Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductWikiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts index 878251c2a6a7..44f51de62077 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts @@ -7,22 +7,22 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { WikiContract, ProductWikisListOptionalParams } from "../models"; +import { ProductWikisListOptionalParams, WikiContract } from "../models/index.js"; /// /** Interface representing a ProductWikis. */ export interface ProductWikis { - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts index 8b06db3207dd..2115a18e1d34 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts @@ -7,49 +7,49 @@ */ import { - QuotaByCounterKeysListByServiceOptionalParams, - QuotaByCounterKeysListByServiceResponse, - QuotaCounterValueUpdateContract, - QuotaByCounterKeysUpdateOptionalParams, - QuotaByCounterKeysUpdateResponse -} from "../models"; + QuotaByCounterKeysListByServiceOptionalParams, + QuotaByCounterKeysListByServiceResponse, + QuotaByCounterKeysUpdateOptionalParams, + QuotaByCounterKeysUpdateResponse, + QuotaCounterValueUpdateContract +} from "../models/index.js"; /** Interface representing a QuotaByCounterKeys. */ export interface QuotaByCounterKeys { - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in - * the policy on the specified service instance. The api does not support paging yet. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - options?: QuotaByCounterKeysListByServiceOptionalParams - ): Promise; - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the - * specified service instance. This should be used for reset of the quota counter values. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByCounterKeysUpdateOptionalParams - ): Promise; + /** + * Lists a collection of current quota counter periods associated with the counter-key configured in + * the policy on the specified service instance. The api does not support paging yet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + options?: QuotaByCounterKeysListByServiceOptionalParams + ): Promise; + /** + * Updates all the quota counter values specified with the existing quota counter key to a value in the + * specified service instance. This should be used for reset of the quota counter values. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param parameters The value of the quota counter to be applied to all quota counter periods. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByCounterKeysUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts index 49641b09add3..af55942a0e7e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts @@ -7,52 +7,52 @@ */ import { - QuotaByPeriodKeysGetOptionalParams, - QuotaByPeriodKeysGetResponse, - QuotaCounterValueUpdateContract, - QuotaByPeriodKeysUpdateOptionalParams, - QuotaByPeriodKeysUpdateResponse -} from "../models"; + QuotaByPeriodKeysGetOptionalParams, + QuotaByPeriodKeysGetResponse, + QuotaByPeriodKeysUpdateOptionalParams, + QuotaByPeriodKeysUpdateResponse, + QuotaCounterValueUpdateContract +} from "../models/index.js"; /** Interface representing a QuotaByPeriodKeys. */ export interface QuotaByPeriodKeys { - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific - * period in service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - options?: QuotaByPeriodKeysGetOptionalParams - ): Promise; - /** - * Updates an existing quota counter value in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByPeriodKeysUpdateOptionalParams - ): Promise; + /** + * Gets the value of the quota counter associated with the counter-key in the policy for the specific + * period in service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param quotaPeriodKey Quota period key identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + options?: QuotaByPeriodKeysGetOptionalParams + ): Promise; + /** + * Updates an existing quota counter value in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param quotaPeriodKey Quota period key identifier. + * @param parameters The value of the Quota counter to be applied on the specified period. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByPeriodKeysUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts index b65177a34f8c..6de63e394ac3 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts @@ -7,20 +7,20 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { RegionContract, RegionListByServiceOptionalParams } from "../models"; +import { RegionContract, RegionListByServiceOptionalParams } from "../models/index.js"; /// /** Interface representing a Region. */ export interface Region { - /** - * Lists all azure regions in which the service exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all azure regions in which the service exists. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts index 0069ea94bbfc..bdd8e7111a89 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts @@ -8,198 +8,198 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ReportRecordContract, - ReportsListByApiOptionalParams, - ReportsListByUserOptionalParams, - ReportsListByOperationOptionalParams, - ReportsListByProductOptionalParams, - ReportsListByGeoOptionalParams, - ReportsListBySubscriptionOptionalParams, - ReportsListByTimeOptionalParams, - RequestReportRecordContract, - ReportsListByRequestOptionalParams -} from "../models"; + ReportRecordContract, + ReportsListByApiOptionalParams, + ReportsListByGeoOptionalParams, + ReportsListByOperationOptionalParams, + ReportsListByProductOptionalParams, + ReportsListByRequestOptionalParams, + ReportsListBySubscriptionOptionalParams, + ReportsListByTimeOptionalParams, + ReportsListByUserOptionalParams, + RequestReportRecordContract +} from "../models/index.js"; /// /** Interface representing a Reports. */ export interface Reports { - /** - * Lists report records by API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | - * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| - * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter - * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | - * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| - * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | - *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| - * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | - * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | - * | |
- * @param options The options parameters. - */ - listByUser( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by API Operations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | - * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy - * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, - * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | - * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | - * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | - *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| - * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | - * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | - * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | - * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | - *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| - * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by geography. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| country | select | | |
| region | select | | |
| zip | - * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | - *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | - * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | - * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | - *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg - * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listByGeo( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | - *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | - * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, - * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | - * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, - * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listBySubscription( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by Time. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select - * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | - *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| - * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth - * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | - * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The - * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can - * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, - * minutes, seconds)). - * @param options The options parameters. - */ - listByTime( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by Request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId - * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | - *
| subscriptionId | filter | eq | |
- * @param options The options parameters. - */ - listByRequest( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists report records by API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter The filter to apply on the operation. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | + * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| + * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter + * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | + * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| + * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | + *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| + * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| + * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | + * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | + * | |
+ * @param options The options parameters. + */ + listByUser( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by API Operations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | + * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy + * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, + * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | + * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | + * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | + *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + listByOperation( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| + * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | + * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | + * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | + * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | + *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| + * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by geography. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| country | select | | |
| region | select | | |
| zip | + * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | + *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | + * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | + * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | + *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| + * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg + * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + listByGeo( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | + *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | + * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, + * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | + * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, + * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + listBySubscription( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by Time. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select + * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | + *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| + * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth + * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | + * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The + * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can + * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, + * minutes, seconds)). + * @param options The options parameters. + */ + listByTime( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by Request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId + * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | + *
| subscriptionId | filter | eq | |
+ * @param options The options parameters. + */ + listByRequest( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts index 1c4b94321adb..336e2fbc5573 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts @@ -7,67 +7,67 @@ */ import { - SignInSettingsGetEntityTagOptionalParams, - SignInSettingsGetEntityTagResponse, - SignInSettingsGetOptionalParams, - SignInSettingsGetResponse, - PortalSigninSettings, - SignInSettingsUpdateOptionalParams, - SignInSettingsCreateOrUpdateOptionalParams, - SignInSettingsCreateOrUpdateResponse -} from "../models"; + PortalSigninSettings, + SignInSettingsCreateOrUpdateOptionalParams, + SignInSettingsCreateOrUpdateResponse, + SignInSettingsGetEntityTagOptionalParams, + SignInSettingsGetEntityTagResponse, + SignInSettingsGetOptionalParams, + SignInSettingsGetResponse, + SignInSettingsUpdateOptionalParams +} from "../models/index.js"; /** Interface representing a SignInSettings. */ export interface SignInSettings { - /** - * Gets the entity state (Etag) version of the SignInSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetEntityTagOptionalParams - ): Promise; - /** - * Get Sign In Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetOptionalParams - ): Promise; - /** - * Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-In settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSigninSettings, - options?: SignInSettingsUpdateOptionalParams - ): Promise; - /** - * Create or Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSigninSettings, - options?: SignInSettingsCreateOrUpdateOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the SignInSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetEntityTagOptionalParams + ): Promise; + /** + * Get Sign In Settings for the Portal + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetOptionalParams + ): Promise; + /** + * Update Sign-In settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Sign-In settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSigninSettings, + options?: SignInSettingsUpdateOptionalParams + ): Promise; + /** + * Create or Update Sign-In settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalSigninSettings, + options?: SignInSettingsCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts index 1dbcacd372e8..10819d6216b2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts @@ -7,67 +7,67 @@ */ import { - SignUpSettingsGetEntityTagOptionalParams, - SignUpSettingsGetEntityTagResponse, - SignUpSettingsGetOptionalParams, - SignUpSettingsGetResponse, - PortalSignupSettings, - SignUpSettingsUpdateOptionalParams, - SignUpSettingsCreateOrUpdateOptionalParams, - SignUpSettingsCreateOrUpdateResponse -} from "../models"; + PortalSignupSettings, + SignUpSettingsCreateOrUpdateOptionalParams, + SignUpSettingsCreateOrUpdateResponse, + SignUpSettingsGetEntityTagOptionalParams, + SignUpSettingsGetEntityTagResponse, + SignUpSettingsGetOptionalParams, + SignUpSettingsGetResponse, + SignUpSettingsUpdateOptionalParams +} from "../models/index.js"; /** Interface representing a SignUpSettings. */ export interface SignUpSettings { - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetEntityTagOptionalParams - ): Promise; - /** - * Get Sign Up Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetOptionalParams - ): Promise; - /** - * Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-Up settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsUpdateOptionalParams - ): Promise; - /** - * Create or Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsCreateOrUpdateOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the SignUpSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetEntityTagOptionalParams + ): Promise; + /** + * Get Sign Up Settings for the Portal + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetOptionalParams + ): Promise; + /** + * Update Sign-Up settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Sign-Up settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsUpdateOptionalParams + ): Promise; + /** + * Create or Update Sign-Up settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts index 74d50388f102..95630ff3e2f0 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts @@ -8,159 +8,159 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - SubscriptionContract, - SubscriptionListOptionalParams, - SubscriptionGetEntityTagOptionalParams, - SubscriptionGetEntityTagResponse, - SubscriptionGetOptionalParams, - SubscriptionGetResponse, - SubscriptionCreateParameters, - SubscriptionCreateOrUpdateOptionalParams, - SubscriptionCreateOrUpdateResponse, - SubscriptionUpdateParameters, - SubscriptionUpdateOptionalParams, - SubscriptionUpdateResponse, - SubscriptionDeleteOptionalParams, - SubscriptionRegeneratePrimaryKeyOptionalParams, - SubscriptionRegenerateSecondaryKeyOptionalParams, - SubscriptionListSecretsOptionalParams, - SubscriptionListSecretsResponse -} from "../models"; + SubscriptionContract, + SubscriptionCreateOrUpdateOptionalParams, + SubscriptionCreateOrUpdateResponse, + SubscriptionCreateParameters, + SubscriptionDeleteOptionalParams, + SubscriptionGetEntityTagOptionalParams, + SubscriptionGetEntityTagResponse, + SubscriptionGetOptionalParams, + SubscriptionGetResponse, + SubscriptionListOptionalParams, + SubscriptionListSecretsOptionalParams, + SubscriptionListSecretsResponse, + SubscriptionRegeneratePrimaryKeyOptionalParams, + SubscriptionRegenerateSecondaryKeyOptionalParams, + SubscriptionUpdateOptionalParams, + SubscriptionUpdateParameters, + SubscriptionUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Subscription. */ export interface Subscription { - /** - * Lists all subscriptions of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetEntityTagOptionalParams - ): Promise; - /** - * Gets the specified Subscription entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetOptionalParams - ): Promise; - /** - * Creates or updates the subscription of specified user to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - sid: string, - parameters: SubscriptionCreateParameters, - options?: SubscriptionCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of a subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - parameters: SubscriptionUpdateParameters, - options?: SubscriptionUpdateOptionalParams - ): Promise; - /** - * Deletes the specified subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - options?: SubscriptionDeleteOptionalParams - ): Promise; - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegeneratePrimaryKeyOptionalParams - ): Promise; - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegenerateSecondaryKeyOptionalParams - ): Promise; - /** - * Gets the specified Subscription keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionListSecretsOptionalParams - ): Promise; + /** + * Lists all subscriptions of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetEntityTagOptionalParams + ): Promise; + /** + * Gets the specified Subscription entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetOptionalParams + ): Promise; + /** + * Creates or updates the subscription of specified user to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + sid: string, + parameters: SubscriptionCreateParameters, + options?: SubscriptionCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of a subscription specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options?: SubscriptionUpdateOptionalParams + ): Promise; + /** + * Deletes the specified subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + options?: SubscriptionDeleteOptionalParams + ): Promise; + /** + * Regenerates primary key of existing subscription of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegeneratePrimaryKeyOptionalParams + ): Promise; + /** + * Regenerates secondary key of existing subscription of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegenerateSecondaryKeyOptionalParams + ): Promise; + /** + * Gets the specified Subscription keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts index dca054554a45..22dc9aaf7a03 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts @@ -8,375 +8,375 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TagContract, - TagListByOperationOptionalParams, - TagListByApiOptionalParams, - TagListByProductOptionalParams, - TagListByServiceOptionalParams, - TagGetEntityStateByOperationOptionalParams, - TagGetEntityStateByOperationResponse, - TagGetByOperationOptionalParams, - TagGetByOperationResponse, - TagAssignToOperationOptionalParams, - TagAssignToOperationResponse, - TagDetachFromOperationOptionalParams, - TagGetEntityStateByApiOptionalParams, - TagGetEntityStateByApiResponse, - TagGetByApiOptionalParams, - TagGetByApiResponse, - TagAssignToApiOptionalParams, - TagAssignToApiResponse, - TagDetachFromApiOptionalParams, - TagGetEntityStateByProductOptionalParams, - TagGetEntityStateByProductResponse, - TagGetByProductOptionalParams, - TagGetByProductResponse, - TagAssignToProductOptionalParams, - TagAssignToProductResponse, - TagDetachFromProductOptionalParams, - TagGetEntityStateOptionalParams, - TagGetEntityStateResponse, - TagGetOptionalParams, - TagGetResponse, - TagCreateUpdateParameters, - TagCreateOrUpdateOptionalParams, - TagCreateOrUpdateResponse, - TagUpdateOptionalParams, - TagUpdateResponse, - TagDeleteOptionalParams -} from "../models"; + TagAssignToApiOptionalParams, + TagAssignToApiResponse, + TagAssignToOperationOptionalParams, + TagAssignToOperationResponse, + TagAssignToProductOptionalParams, + TagAssignToProductResponse, + TagContract, + TagCreateOrUpdateOptionalParams, + TagCreateOrUpdateResponse, + TagCreateUpdateParameters, + TagDeleteOptionalParams, + TagDetachFromApiOptionalParams, + TagDetachFromOperationOptionalParams, + TagDetachFromProductOptionalParams, + TagGetByApiOptionalParams, + TagGetByApiResponse, + TagGetByOperationOptionalParams, + TagGetByOperationResponse, + TagGetByProductOptionalParams, + TagGetByProductResponse, + TagGetEntityStateByApiOptionalParams, + TagGetEntityStateByApiResponse, + TagGetEntityStateByOperationOptionalParams, + TagGetEntityStateByOperationResponse, + TagGetEntityStateByProductOptionalParams, + TagGetEntityStateByProductResponse, + TagGetEntityStateOptionalParams, + TagGetEntityStateResponse, + TagGetOptionalParams, + TagGetResponse, + TagListByApiOptionalParams, + TagListByOperationOptionalParams, + TagListByProductOptionalParams, + TagListByServiceOptionalParams, + TagUpdateOptionalParams, + TagUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Tag. */ export interface Tag { - /** - * Lists all Tags associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists all Tags associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists all Tags associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists a collection of tags defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetEntityStateByOperationOptionalParams - ): Promise; - /** - * Get tag associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetByOperationOptionalParams - ): Promise; - /** - * Assign tag to the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagAssignToOperationOptionalParams - ): Promise; - /** - * Detach the tag from the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagDetachFromOperationOptionalParams - ): Promise; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetEntityStateByApiOptionalParams - ): Promise; - /** - * Get tag associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetByApiOptionalParams - ): Promise; - /** - * Assign tag to the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagAssignToApiOptionalParams - ): Promise; - /** - * Detach the tag from the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagDetachFromApiOptionalParams - ): Promise; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetEntityStateByProductOptionalParams - ): Promise; - /** - * Get tag associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetByProductOptionalParams - ): Promise; - /** - * Assign tag to the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagAssignToProductOptionalParams - ): Promise; - /** - * Detach the tag from the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagDetachFromProductOptionalParams - ): Promise; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityState( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetEntityStateOptionalParams - ): Promise; - /** - * Gets the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetOptionalParams - ): Promise; - /** - * Creates a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - parameters: TagCreateUpdateParameters, - options?: TagCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - parameters: TagCreateUpdateParameters, - options?: TagUpdateOptionalParams - ): Promise; - /** - * Deletes specific tag of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - options?: TagDeleteOptionalParams - ): Promise; + /** + * Lists all Tags associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all Tags associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all Tags associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists a collection of tags defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetEntityStateByOperationOptionalParams + ): Promise; + /** + * Get tag associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetByOperationOptionalParams + ): Promise; + /** + * Assign tag to the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagAssignToOperationOptionalParams + ): Promise; + /** + * Detach the tag from the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagDetachFromOperationOptionalParams + ): Promise; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetEntityStateByApiOptionalParams + ): Promise; + /** + * Get tag associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetByApiOptionalParams + ): Promise; + /** + * Assign tag to the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagAssignToApiOptionalParams + ): Promise; + /** + * Detach the tag from the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagDetachFromApiOptionalParams + ): Promise; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetEntityStateByProductOptionalParams + ): Promise; + /** + * Get tag associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetByProductOptionalParams + ): Promise; + /** + * Assign tag to the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagAssignToProductOptionalParams + ): Promise; + /** + * Detach the tag from the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagDetachFromProductOptionalParams + ): Promise; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityState( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetEntityStateOptionalParams + ): Promise; + /** + * Gets the details of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetOptionalParams + ): Promise; + /** + * Creates a tag. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options?: TagCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options?: TagUpdateOptionalParams + ): Promise; + /** + * Deletes specific tag of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + options?: TagDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts index 9290bd0da6f0..cdc419c93ceb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts @@ -8,22 +8,22 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TagResourceContract, - TagResourceListByServiceOptionalParams -} from "../models"; + TagResourceContract, + TagResourceListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a TagResource. */ export interface TagResource { - /** - * Lists a collection of resources associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists a collection of resources associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts index 21cdd2908a90..90af15cc9d2f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts @@ -8,138 +8,138 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AccessInformationContract, - TenantAccessListByServiceOptionalParams, - AccessIdName, - TenantAccessGetEntityTagOptionalParams, - TenantAccessGetEntityTagResponse, - TenantAccessGetOptionalParams, - TenantAccessGetResponse, - AccessInformationCreateParameters, - TenantAccessCreateOptionalParams, - TenantAccessCreateResponse, - AccessInformationUpdateParameters, - TenantAccessUpdateOptionalParams, - TenantAccessUpdateResponse, - TenantAccessRegeneratePrimaryKeyOptionalParams, - TenantAccessRegenerateSecondaryKeyOptionalParams, - TenantAccessListSecretsOptionalParams, - TenantAccessListSecretsResponse -} from "../models"; + AccessIdName, + AccessInformationContract, + AccessInformationCreateParameters, + AccessInformationUpdateParameters, + TenantAccessCreateOptionalParams, + TenantAccessCreateResponse, + TenantAccessGetEntityTagOptionalParams, + TenantAccessGetEntityTagResponse, + TenantAccessGetOptionalParams, + TenantAccessGetResponse, + TenantAccessListByServiceOptionalParams, + TenantAccessListSecretsOptionalParams, + TenantAccessListSecretsResponse, + TenantAccessRegeneratePrimaryKeyOptionalParams, + TenantAccessRegenerateSecondaryKeyOptionalParams, + TenantAccessUpdateOptionalParams, + TenantAccessUpdateResponse +} from "../models/index.js"; /// /** Interface representing a TenantAccess. */ export interface TenantAccess { - /** - * Returns list of access infos - for Git and Management endpoints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Tenant access metadata - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetEntityTagOptionalParams - ): Promise; - /** - * Get tenant access information details without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetOptionalParams - ): Promise; - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationCreateParameters, - options?: TenantAccessCreateOptionalParams - ): Promise; - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationUpdateParameters, - options?: TenantAccessUpdateOptionalParams - ): Promise; - /** - * Regenerate primary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegeneratePrimaryKeyOptionalParams - ): Promise; - /** - * Regenerate secondary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegenerateSecondaryKeyOptionalParams - ): Promise; - /** - * Get tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessListSecretsOptionalParams - ): Promise; + /** + * Returns list of access infos - for Git and Management endpoints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Tenant access metadata + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetEntityTagOptionalParams + ): Promise; + /** + * Get tenant access information details without secrets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetOptionalParams + ): Promise; + /** + * Update tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Parameters supplied to retrieve the Tenant Access Information. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationCreateParameters, + options?: TenantAccessCreateOptionalParams + ): Promise; + /** + * Update tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Parameters supplied to retrieve the Tenant Access Information. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationUpdateParameters, + options?: TenantAccessUpdateOptionalParams + ): Promise; + /** + * Regenerate primary access key + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegeneratePrimaryKeyOptionalParams + ): Promise; + /** + * Regenerate secondary access key + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegenerateSecondaryKeyOptionalParams + ): Promise; + /** + * Get tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts index 12b13c1b73e1..29e4b2f6cdeb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts @@ -7,37 +7,37 @@ */ import { - AccessIdName, - TenantAccessGitRegeneratePrimaryKeyOptionalParams, - TenantAccessGitRegenerateSecondaryKeyOptionalParams -} from "../models"; + AccessIdName, + TenantAccessGitRegeneratePrimaryKeyOptionalParams, + TenantAccessGitRegenerateSecondaryKeyOptionalParams +} from "../models/index.js"; /** Interface representing a TenantAccessGit. */ export interface TenantAccessGit { - /** - * Regenerate primary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams - ): Promise; - /** - * Regenerate secondary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams - ): Promise; + /** + * Regenerate primary access key for GIT. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams + ): Promise; + /** + * Regenerate secondary access key for GIT. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts index 81a7460fa896..7efe4699fc17 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts @@ -6,146 +6,146 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { - DeployConfigurationParameters, - ConfigurationIdName, - TenantConfigurationDeployOptionalParams, - TenantConfigurationDeployResponse, - SaveConfigurationParameter, - TenantConfigurationSaveOptionalParams, - TenantConfigurationSaveResponse, - TenantConfigurationValidateOptionalParams, - TenantConfigurationValidateResponse, - TenantConfigurationGetSyncStateOptionalParams, - TenantConfigurationGetSyncStateResponse -} from "../models"; + ConfigurationIdName, + DeployConfigurationParameters, + SaveConfigurationParameter, + TenantConfigurationDeployOptionalParams, + TenantConfigurationDeployResponse, + TenantConfigurationGetSyncStateOptionalParams, + TenantConfigurationGetSyncStateResponse, + TenantConfigurationSaveOptionalParams, + TenantConfigurationSaveResponse, + TenantConfigurationValidateOptionalParams, + TenantConfigurationValidateResponse +} from "../models/index.js"; /** Interface representing a TenantConfiguration. */ export interface TenantConfiguration { - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - beginDeploy( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationDeployResponse - > - >; - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - beginDeployAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams - ): Promise; - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - beginSave( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationSaveResponse - > - >; - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - beginSaveAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams - ): Promise; - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - beginValidate( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationValidateResponse - > - >; - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - beginValidateAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams - ): Promise; - /** - * Gets the status of the most recent synchronization between the configuration database and the Git - * repository. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param options The options parameters. - */ - getSyncState( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - options?: TenantConfigurationGetSyncStateOptionalParams - ): Promise; + /** + * This operation applies changes from the specified Git branch to the configuration database. This is + * a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Deploy Configuration parameters. + * @param options The options parameters. + */ + beginDeploy( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationDeployResponse + > + >; + /** + * This operation applies changes from the specified Git branch to the configuration database. This is + * a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Deploy Configuration parameters. + * @param options The options parameters. + */ + beginDeployAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams + ): Promise; + /** + * This operation creates a commit with the current configuration snapshot to the specified branch in + * the repository. This is a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Save Configuration parameters. + * @param options The options parameters. + */ + beginSave( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationSaveResponse + > + >; + /** + * This operation creates a commit with the current configuration snapshot to the specified branch in + * the repository. This is a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Save Configuration parameters. + * @param options The options parameters. + */ + beginSaveAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams + ): Promise; + /** + * This operation validates the changes in the specified Git branch. This is a long running operation + * and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Validate Configuration parameters. + * @param options The options parameters. + */ + beginValidate( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationValidateResponse + > + >; + /** + * This operation validates the changes in the specified Git branch. This is a long running operation + * and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Validate Configuration parameters. + * @param options The options parameters. + */ + beginValidateAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams + ): Promise; + /** + * Gets the status of the most recent synchronization between the configuration database and the Git + * repository. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param options The options parameters. + */ + getSyncState( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + options?: TenantConfigurationGetSyncStateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts index 4f8c4c6faa9f..036e6ac0bdab 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts @@ -8,38 +8,38 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TenantSettingsContract, - TenantSettingsListByServiceOptionalParams, - SettingsTypeName, - TenantSettingsGetOptionalParams, - TenantSettingsGetResponse -} from "../models"; + SettingsTypeName, + TenantSettingsContract, + TenantSettingsGetOptionalParams, + TenantSettingsGetResponse, + TenantSettingsListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a TenantSettings. */ export interface TenantSettings { - /** - * Public settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get tenant settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param settingsType The identifier of the settings. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - settingsType: SettingsTypeName, - options?: TenantSettingsGetOptionalParams - ): Promise; + /** + * Public settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get tenant settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param settingsType The identifier of the settings. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + settingsType: SettingsTypeName, + options?: TenantSettingsGetOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts index 0b6102704805..3018b4caa931 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts @@ -8,142 +8,142 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - UserContract, - UserListByServiceOptionalParams, - UserGetEntityTagOptionalParams, - UserGetEntityTagResponse, - UserGetOptionalParams, - UserGetResponse, - UserCreateParameters, - UserCreateOrUpdateOptionalParams, - UserCreateOrUpdateResponse, - UserUpdateParameters, - UserUpdateOptionalParams, - UserUpdateResponse, - UserDeleteOptionalParams, - UserGenerateSsoUrlOptionalParams, - UserGenerateSsoUrlResponse, - UserTokenParameters, - UserGetSharedAccessTokenOptionalParams, - UserGetSharedAccessTokenResponse -} from "../models"; + UserContract, + UserCreateOrUpdateOptionalParams, + UserCreateOrUpdateResponse, + UserCreateParameters, + UserDeleteOptionalParams, + UserGenerateSsoUrlOptionalParams, + UserGenerateSsoUrlResponse, + UserGetEntityTagOptionalParams, + UserGetEntityTagResponse, + UserGetOptionalParams, + UserGetResponse, + UserGetSharedAccessTokenOptionalParams, + UserGetSharedAccessTokenResponse, + UserListByServiceOptionalParams, + UserTokenParameters, + UserUpdateOptionalParams, + UserUpdateParameters, + UserUpdateResponse +} from "../models/index.js"; /// /** Interface representing a User. */ export interface User { - /** - * Lists a collection of registered users in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetOptionalParams - ): Promise; - /** - * Creates or Updates a user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserCreateParameters, - options?: UserCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - parameters: UserUpdateParameters, - options?: UserUpdateOptionalParams - ): Promise; - /** - * Deletes specific user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - options?: UserDeleteOptionalParams - ): Promise; - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the - * developer portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - generateSsoUrl( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGenerateSsoUrlOptionalParams - ): Promise; - /** - * Gets the Shared Access Authorization Token for the User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @param options The options parameters. - */ - getSharedAccessToken( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserTokenParameters, - options?: UserGetSharedAccessTokenOptionalParams - ): Promise; + /** + * Lists a collection of registered users in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetOptionalParams + ): Promise; + /** + * Creates or Updates a user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserCreateParameters, + options?: UserCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + parameters: UserUpdateParameters, + options?: UserUpdateOptionalParams + ): Promise; + /** + * Deletes specific user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams + ): Promise; + /** + * Retrieves a redirection URL containing an authentication token for signing a given user into the + * developer portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + generateSsoUrl( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGenerateSsoUrlOptionalParams + ): Promise; + /** + * Gets the Shared Access Authorization Token for the User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param parameters Create Authorization Token parameters. + * @param options The options parameters. + */ + getSharedAccessToken( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserTokenParameters, + options?: UserGetSharedAccessTokenOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts index 0479110f882e..7a08f8198eef 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts @@ -6,21 +6,21 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { UserConfirmationPasswordSendOptionalParams } from "../models"; +import { UserConfirmationPasswordSendOptionalParams } from "../models/index.js"; /** Interface representing a UserConfirmationPassword. */ export interface UserConfirmationPassword { - /** - * Sends confirmation - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - send( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserConfirmationPasswordSendOptionalParams - ): Promise; + /** + * Sends confirmation + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + send( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserConfirmationPasswordSendOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts index a2fbd8f792de..bdeeb9743eba 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts @@ -7,22 +7,22 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { GroupContract, UserGroupListOptionalParams } from "../models"; +import { GroupContract, UserGroupListOptionalParams } from "../models/index.js"; /// /** Interface representing a UserGroup. */ export interface UserGroup { - /** - * Lists all user groups. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all user groups. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts index 1a242a6c686d..6de6c6ce174b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts @@ -8,24 +8,24 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - UserIdentityContract, - UserIdentitiesListOptionalParams -} from "../models"; + UserIdentitiesListOptionalParams, + UserIdentityContract +} from "../models/index.js"; /// /** Interface representing a UserIdentities. */ export interface UserIdentities { - /** - * List of all user identities. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams - ): PagedAsyncIterableIterator; + /** + * List of all user identities. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts index 548a266d86dd..4e1b8d8eeacc 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts @@ -8,42 +8,42 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - SubscriptionContract, - UserSubscriptionListOptionalParams, - UserSubscriptionGetOptionalParams, - UserSubscriptionGetResponse -} from "../models"; + SubscriptionContract, + UserSubscriptionGetOptionalParams, + UserSubscriptionGetResponse, + UserSubscriptionListOptionalParams +} from "../models/index.js"; /// /** Interface representing a UserSubscription. */ export interface UserSubscription { - /** - * Lists the collection of subscriptions of the specified user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the specified Subscription entity associated with a particular user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - sid: string, - options?: UserSubscriptionGetOptionalParams - ): Promise; + /** + * Lists the collection of subscriptions of the specified user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified Subscription entity associated with a particular user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + userId: string, + sid: string, + options?: UserSubscriptionGetOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts b/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts index 269a2b9814b5..1c31970c4f29 100644 --- a/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts +++ b/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts @@ -7,7 +7,7 @@ */ export interface PageInfo { - continuationToken?: string; + continuationToken?: string; } const pageMap = new WeakMap(); @@ -20,20 +20,20 @@ const pageMap = new WeakMap(); * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { - if (typeof page !== "object" || page === null) { - return undefined; - } - return pageMap.get(page)?.continuationToken; + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; } export function setContinuationToken( - page: unknown, - continuationToken: string | undefined + page: unknown, + continuationToken: string | undefined ): void { - if (typeof page !== "object" || page === null || !continuationToken) { - return; - } - const pageInfo = pageMap.get(page) ?? {}; - pageInfo.continuationToken = continuationToken; - pageMap.set(page, pageInfo); + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); } diff --git a/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.ts b/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts similarity index 56% rename from sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.ts rename to sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts index 67abcbe11fb7..cddda8564c8f 100644 --- a/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.ts +++ b/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts @@ -6,17 +6,16 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { createTestCredential } from "@azure-tools/test-credential"; import { + delay, env, + isPlaybackMode, Recorder, RecorderStartOptions, - delay, - isPlaybackMode, } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { ApiManagementClient } from "../src/apiManagementClient"; +import { ApiManagementClient } from "../src/apiManagementClient.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888", @@ -41,46 +40,50 @@ describe("Apimanagement test", () => { let resourceGroupName: string; let serviceName: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; + subscriptionId = env.SUBSCRIPTION_ID || ""; // This is an example of how the environment variables are used const credential = createTestCredential(); - client = new ApiManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); + client = new ApiManagementClient( + credential, + subscriptionId, + recorder.configureClientOptions({}), + ); location = "eastus"; resourceGroupName = "myjstest"; serviceName = "myserviceyyy1"; }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - function sleep(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)) - } - - it("apiManagementService create test", async function () { - const res = await client.apiManagementService.beginCreateOrUpdateAndWait(resourceGroupName, serviceName, { - location: location, - sku: { - name: "Standard", - capacity: 1 + it("apiManagementService create test", { timeout: 3600000 }, async () => { + const res = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + { + location: location, + sku: { + name: "Standard", + capacity: 1, + }, + publisherEmail: "foo@contoso.com", + publisherName: "foo", }, - publisherEmail: "foo@contoso.com", - publisherName: "foo" - }, testPollingOptions); + testPollingOptions, + ); assert.equal(res.name, serviceName); - }).timeout(3600000); + }); - it("apiManagementService get test", async function () { + it("apiManagementService get test", async () => { const res = await client.apiManagementService.get(resourceGroupName, serviceName); assert.equal(res.name, serviceName); }); - it("apiManagementService listByResourceGroup test", async function () { + it("apiManagementService listByResourceGroup test", async () => { const resArray = new Array(); for await (let item of client.apiManagementService.listByResourceGroup(resourceGroupName)) { resArray.push(item); @@ -88,90 +91,59 @@ describe("Apimanagement test", () => { assert.equal(resArray.length, 1); }); - it("apiManagementService update test", async function () { - // this.timeout(3600000); + it("apiManagementService update test", { timeout: 3600000 }, async () => { let count = 0; while (count < 20) { count++; const res = await client.apiManagementService.get(resourceGroupName, serviceName); if (res.provisioningState == "Succeeded") { - const res = await client.apiManagementService.beginUpdateAndWait(resourceGroupName, serviceName, { - customProperties: { - "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false" - } - }, testPollingOptions); + const res = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + { + customProperties: { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + }, + }, + testPollingOptions, + ); assert.equal(res.type, "Microsoft.ApiManagement/service"); break; } else { // The resource is activating - await delay(isPlaybackMode() ? 1000 : 300000) + await delay(isPlaybackMode() ? 1000 : 300000); } } - }).timeout(3600000); - + }); - it("backend create test1", async function () { - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - "sfbackend1", - { - description: "Service Fabric Test App 1", - url: "https://backendname26441", - protocol: "http" - }, - ); - }) + it("backend create test1", async () => {}); - it("backend create test2", async function () { - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - "sfbackend2", - { - description: "Service Fabric Test App 1", - url: "https://backendname26442", - protocol: "http" - }, - ); - }) + it("backend create test2", async () => {}); - it("backend list test", async function () { + it("backend list test", async () => { const resArray = new Array(); - for await (let item of client.backend.listByService(resourceGroupName, serviceName, { top: 1 })) { + for await (let item of client.backend.listByService(resourceGroupName, serviceName, { + top: 1, + })) { resArray.push(item); } assert.equal(resArray.length, 2); - }) + }); - it("backend delete test", async function () { - const res1 = await client.backend.delete( - resourceGroupName, - serviceName, - "sfbackend1", - "*" - ); - const res2 = await client.backend.delete( - resourceGroupName, - serviceName, - "sfbackend2", - "*" - ); + it("backend delete test", async () => { const resArray = new Array(); for await (let item of client.backend.listByService(resourceGroupName, serviceName)) { resArray.push(item); } assert.equal(resArray.length, 0); - }) + }); - it("apiManagementService delete test", async function () { + it("apiManagementService delete test", { timeout: 3600000 }, async () => { let count = 0; while (count < 20) { count++; const res = await client.apiManagementService.get(resourceGroupName, serviceName); if (res.provisioningState == "Succeeded") { - const res = await client.apiManagementService.beginDeleteAndWait(resourceGroupName, serviceName, testPollingOptions); - const purge_resource = await client.deletedServices.beginPurgeAndWait(serviceName, location, testPollingOptions); const resArray = new Array(); for await (let item of client.apiManagementService.listByResourceGroup(resourceGroupName)) { resArray.push(item); @@ -183,5 +155,5 @@ describe("Apimanagement test", () => { await delay(isPlaybackMode() ? 1000 : 300000); } } - }).timeout(3600000); + }); }); diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.json b/sdk/apimanagement/arm-apimanagement/tsconfig.json index f92121c033f6..19ceb382b521 100644 --- a/sdk/apimanagement/arm-apimanagement/tsconfig.json +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-apimanagement": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.samples.json b/sdk/apimanagement/arm-apimanagement/tsconfig.samples.json new file mode 100644 index 000000000000..9ad07351dbc4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-apimanagement": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.src.json b/sdk/apimanagement/arm-apimanagement/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.test.json b/sdk/apimanagement/arm-apimanagement/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/apimanagement/arm-apimanagement/vitest.config.ts b/sdk/apimanagement/arm-apimanagement/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/apimanagement/arm-apimanagement/vitest.esm.config.ts b/sdk/apimanagement/arm-apimanagement/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); From d08b046d5f4f3776b4aaeab6f958f7d9bb628456 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Wed, 18 Dec 2024 15:37:31 -0800 Subject: [PATCH 06/55] [EngSys] remove dev dependency `decompress` (#32094) and replace usage with `tar` and `unzipper`. `decompress` pulls in `decompress-tar` which has a vulnerability https://security.snyk.io/package/npm/decompress-tar. However, `decompress-tar` hasn't been updated for seven years, and there's no sign of this issue being addressed in the future. This PR switches to use more actively maintained packages `tar` and `unzipper` to extract from compressed archives and removes `decompress` dependency. --- common/config/rush/pnpm-lock.yaml | 295 +++++------------- common/tools/dev-tool/package.json | 9 +- .../tools/dev-tool/src/util/testProxyUtils.ts | 15 +- .../ai-language-text/package.json | 6 +- .../test/public/utils/customTestHelpter.ts | 7 +- 5 files changed, 109 insertions(+), 223 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 68be1681fb6b..e8d6a3df56f5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1915,6 +1915,10 @@ packages: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} + '@isaacs/fs-minipass@4.0.1': + resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} + engines: {node: '>=18.0.0'} + '@istanbuljs/load-nyc-config@1.1.0': resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -2472,7 +2476,7 @@ packages: version: 0.0.0 '@rush-temp/ai-language-text@file:projects/ai-language-text.tgz': - resolution: {integrity: sha512-n6FqRIxx4ITNn8zyiy/ehfXu0b10brSpJtXnueHONlEkvboa8qyV8NiR1bUCvTavLrt+jijNyCVMnXZkx+yRCw==, tarball: file:projects/ai-language-text.tgz} + resolution: {integrity: sha512-9cKrF/UJZgauk6Ppg/DH71XdtMWF26wmPc/YszeJbMxursxNjUmRvUgxyTPaw5N69GWz2/r0kzS5XyzpdcTu1Q==, tarball: file:projects/ai-language-text.tgz} version: 0.0.0 '@rush-temp/ai-language-textauthoring@file:projects/ai-language-textauthoring.tgz': @@ -3656,7 +3660,7 @@ packages: version: 0.0.0 '@rush-temp/dev-tool@file:projects/dev-tool.tgz': - resolution: {integrity: sha512-FPrbQSShxuTjy1c/SWvDZN0ywtIGBH/2JJPhihg8E6fJhIOj/RfmTBj2sm8Ft9Eh19Zbgw+kXRy4LEjpeFih3A==, tarball: file:projects/dev-tool.tgz} + resolution: {integrity: sha512-ABI6GuqturhAGkHgvB7PajFX9JBkZIG4iWhX8I6BmjdhcZQHz//puZx6x9YTyHux8Zo8XbvYN5EVRxZBaTeQJg==, tarball: file:projects/dev-tool.tgz} version: 0.0.0 '@rush-temp/developer-devcenter@file:projects/developer-devcenter.tgz': @@ -4193,9 +4197,6 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} - '@types/decompress@4.2.7': - resolution: {integrity: sha512-9z+8yjKr5Wn73Pt17/ldnmQToaFHZxK0N1GHysuk/JIPT8RIdQeoInM01wWPgypRcvb6VH1drjuFpQ4zmY437g==} - '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} @@ -4367,6 +4368,9 @@ packages: '@types/unist@2.0.11': resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} + '@types/unzipper@0.10.10': + resolution: {integrity: sha512-jKJdNxhmCHTZsaKW5x0qjn6rB+gHk0w5VFbEKsw84i+RJqXZyfTmGnpjDcKqzMpjz7VVLsUBMtO5T3mVidpt0g==} + '@types/uuid@8.3.4': resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} @@ -4715,9 +4719,6 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} - bl@1.2.3: - resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} - bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -4746,21 +4747,12 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - buffer-alloc-unsafe@1.1.0: - resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==} - - buffer-alloc@1.2.0: - resolution: {integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==} - buffer-crc32@0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} buffer-equal-constant-time@1.0.1: resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} - buffer-fill@1.0.0: - resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==} - buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -4899,6 +4891,10 @@ packages: chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + chownr@3.0.0: + resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} + engines: {node: '>=18'} + chromium-bidi@0.8.0: resolution: {integrity: sha512-uJydbGdTw0DEUjhoogGveneJVWX/9YuqkWePzMmkBYwtdAqo5d3J/ovNKFr+/2hWXYmYCr6it8mSSTIj6SS6Ug==} peerDependencies: @@ -4977,9 +4973,6 @@ packages: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} - commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} @@ -5131,26 +5124,6 @@ packages: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} - decompress-tar@4.1.1: - resolution: {integrity: sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==} - engines: {node: '>=4'} - - decompress-tarbz2@4.1.1: - resolution: {integrity: sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==} - engines: {node: '>=4'} - - decompress-targz@4.1.1: - resolution: {integrity: sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==} - engines: {node: '>=4'} - - decompress-unzip@4.0.1: - resolution: {integrity: sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==} - engines: {node: '>=4'} - - decompress@4.2.1: - resolution: {integrity: sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==} - engines: {node: '>=4'} - deep-eql@4.1.4: resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} engines: {node: '>=6'} @@ -5261,6 +5234,9 @@ packages: resolution: {integrity: sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==} engines: {node: '>= 0.4'} + duplexer2@0.1.4: + resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -5607,18 +5583,6 @@ packages: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} - file-type@3.9.0: - resolution: {integrity: sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==} - engines: {node: '>=0.10.0'} - - file-type@5.2.0: - resolution: {integrity: sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==} - engines: {node: '>=4'} - - file-type@6.2.0: - resolution: {integrity: sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==} - engines: {node: '>=4'} - fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -5753,10 +5717,6 @@ packages: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} - get-stream@2.3.1: - resolution: {integrity: sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==} - engines: {node: '>=0.10.0'} - get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -6046,9 +6006,6 @@ packages: is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - is-natural-number@4.0.1: - resolution: {integrity: sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==} - is-node-process@1.2.0: resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} @@ -6075,10 +6032,6 @@ packages: is-reference@1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - is-stream@1.1.0: - resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} - engines: {node: '>=0.10.0'} - is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -6435,10 +6388,6 @@ packages: magicast@0.3.5: resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} - make-dir@1.3.0: - resolution: {integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==} - engines: {node: '>=4'} - make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -6602,6 +6551,10 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + minizlib@3.0.1: + resolution: {integrity: sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==} + engines: {node: '>= 18'} + mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} @@ -6736,6 +6689,9 @@ packages: encoding: optional: true + node-int64@0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + node-preload@0.2.1: resolution: {integrity: sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==} engines: {node: '>=8'} @@ -6995,22 +6951,6 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} - pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - - pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - - pinkie-promise@2.0.1: - resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} - engines: {node: '>=0.10.0'} - - pinkie@2.0.4: - resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} - engines: {node: '>=0.10.0'} - pkg-dir@4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -7343,10 +7283,6 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - seek-bzip@1.0.6: - resolution: {integrity: sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==} - hasBin: true - semaphore@1.1.0: resolution: {integrity: sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==} engines: {node: '>=0.8.0'} @@ -7589,9 +7525,6 @@ packages: resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} engines: {node: '>=8'} - strip-dirs@2.1.0: - resolution: {integrity: sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==} - strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -7654,10 +7587,6 @@ packages: tar-fs@3.0.6: resolution: {integrity: sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==} - tar-stream@1.6.2: - resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==} - engines: {node: '>= 0.8.0'} - tar-stream@2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} @@ -7665,6 +7594,10 @@ packages: tar-stream@3.1.7: resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} + tar@7.4.3: + resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} + engines: {node: '>=18'} + tersify@3.12.1: resolution: {integrity: sha512-VwzXGHZSOB4T27s4uvh9v8FYrNXyfVz0nBQi28TDwrZoQwT8ZJUp1W2Ff73ekN07stJSb0D+pr6iXeNeFqTI6Q==} @@ -7731,9 +7664,6 @@ packages: resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} engines: {node: '>=14.14'} - to-buffer@1.1.1: - resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -7962,6 +7892,9 @@ packages: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} engines: {node: '>=8'} + unzipper@0.12.3: + resolution: {integrity: sha512-PZ8hTS+AqcGxsaQntl3IRBw65QrBI6lxzqDEL7IAo/XCEqRTKGfOX56Vea5TH9SZczRVxuzk1re04z/YjuYCJA==} + update-browserslist-db@1.1.1: resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true @@ -8201,6 +8134,10 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yallist@5.0.0: + resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} + engines: {node: '>=18'} + yaml@2.6.1: resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==} engines: {node: '>= 14'} @@ -9104,6 +9041,10 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + '@isaacs/fs-minipass@4.0.1': + dependencies: + minipass: 7.1.2 + '@istanbuljs/load-nyc-config@1.1.0': dependencies: camelcase: 5.3.1 @@ -9993,18 +9934,18 @@ snapshots: '@rush-temp/ai-language-text@file:projects/ai-language-text.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@azure/core-lro': 2.7.2 - '@types/decompress': 4.2.7 '@types/node': 18.19.68 + '@types/unzipper': 0.10.10 '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) chai: 5.1.2 chai-exclude: 3.0.0(chai@5.1.2) - decompress: 4.2.1 dotenv: 16.4.7 eslint: 9.17.0 playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + unzipper: 0.12.3 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -16762,20 +16703,19 @@ snapshots: '@rollup/plugin-multi-entry': 6.0.1(rollup@4.28.1) '@rollup/plugin-node-resolve': 15.3.0(rollup@4.28.1) '@types/archiver': 6.0.3 - '@types/decompress': 4.2.7 '@types/express': 4.17.21 '@types/express-serve-static-core': 4.19.6 '@types/fs-extra': 11.0.4 '@types/minimist': 1.2.5 '@types/node': 18.19.68 '@types/semver': 7.5.8 + '@types/unzipper': 0.10.10 '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) autorest: 3.7.1 builtin-modules: 3.3.0 chalk: 4.1.2 concurrently: 8.2.2 cross-env: 7.0.3 - decompress: 4.2.1 dotenv: 16.4.7 env-paths: 2.2.1 eslint: 9.17.0 @@ -16791,6 +16731,7 @@ snapshots: rollup-plugin-visualizer: 5.12.0(rollup@4.28.1) semver: 7.6.3 strip-json-comments: 5.0.1 + tar: 7.4.3 ts-morph: 24.0.0 ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tshy: 2.0.1 @@ -16799,6 +16740,7 @@ snapshots: typescript: 5.6.3 typescript-eslint: 8.16.0(eslint@9.17.0)(typescript@5.6.3) uglify-js: 3.19.3 + unzipper: 0.12.3 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) yaml: 2.6.1 transitivePeerDependencies: @@ -20024,10 +19966,6 @@ snapshots: dependencies: '@types/ms': 0.7.34 - '@types/decompress@4.2.7': - dependencies: - '@types/node': 18.19.68 - '@types/deep-eql@4.0.2': {} '@types/eslint-config-prettier@6.11.3': {} @@ -20045,7 +19983,7 @@ snapshots: '@types/express-serve-static-core@4.19.6': dependencies: - '@types/node': 18.19.68 + '@types/node': 22.7.9 '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -20060,7 +19998,7 @@ snapshots: '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 18.19.68 + '@types/node': 22.7.9 '@types/fs-extra@8.1.5': dependencies: @@ -20086,7 +20024,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 18.19.68 + '@types/node': 22.7.9 '@types/jsonwebtoken@9.0.7': dependencies: @@ -20169,7 +20107,7 @@ snapshots: '@types/readdir-glob@1.1.5': dependencies: - '@types/node': 18.19.68 + '@types/node': 22.7.9 '@types/resolve@1.20.2': {} @@ -20216,6 +20154,10 @@ snapshots: '@types/unist@2.0.11': {} + '@types/unzipper@0.10.10': + dependencies: + '@types/node': 22.7.9 + '@types/uuid@8.3.4': {} '@types/ws@7.4.7': @@ -20692,11 +20634,6 @@ snapshots: binary-extensions@2.3.0: {} - bl@1.2.3: - dependencies: - readable-stream: 2.3.8 - safe-buffer: 5.2.1 - bl@4.1.0: dependencies: buffer: 5.7.1 @@ -20742,19 +20679,10 @@ snapshots: node-releases: 2.0.19 update-browserslist-db: 1.1.1(browserslist@4.24.3) - buffer-alloc-unsafe@1.1.0: {} - - buffer-alloc@1.2.0: - dependencies: - buffer-alloc-unsafe: 1.1.0 - buffer-fill: 1.0.0 - buffer-crc32@0.2.13: {} buffer-equal-constant-time@1.0.1: {} - buffer-fill@1.0.0: {} - buffer-from@1.1.2: {} buffer@5.7.1: @@ -20911,6 +20839,8 @@ snapshots: chownr@1.1.4: {} + chownr@3.0.0: {} + chromium-bidi@0.8.0(devtools-protocol@0.0.1367902): dependencies: devtools-protocol: 0.0.1367902 @@ -20991,8 +20921,6 @@ snapshots: commander@10.0.1: {} - commander@2.20.3: {} - commondir@1.0.1: {} component-emitter@2.0.0: {} @@ -21137,44 +21065,6 @@ snapshots: dependencies: mimic-response: 3.1.0 - decompress-tar@4.1.1: - dependencies: - file-type: 5.2.0 - is-stream: 1.1.0 - tar-stream: 1.6.2 - - decompress-tarbz2@4.1.1: - dependencies: - decompress-tar: 4.1.1 - file-type: 6.2.0 - is-stream: 1.1.0 - seek-bzip: 1.0.6 - unbzip2-stream: 1.4.3 - - decompress-targz@4.1.1: - dependencies: - decompress-tar: 4.1.1 - file-type: 5.2.0 - is-stream: 1.1.0 - - decompress-unzip@4.0.1: - dependencies: - file-type: 3.9.0 - get-stream: 2.3.1 - pify: 2.3.0 - yauzl: 2.10.0 - - decompress@4.2.1: - dependencies: - decompress-tar: 4.1.1 - decompress-tarbz2: 4.1.1 - decompress-targz: 4.1.1 - decompress-unzip: 4.0.1 - graceful-fs: 4.2.11 - make-dir: 1.3.0 - pify: 2.3.0 - strip-dirs: 2.1.0 - deep-eql@4.1.4: dependencies: type-detect: 4.1.0 @@ -21263,6 +21153,10 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 + duplexer2@0.1.4: + dependencies: + readable-stream: 2.3.8 + eastasianwidth@0.2.0: {} ecdsa-sig-formatter@1.0.11: @@ -21736,12 +21630,6 @@ snapshots: dependencies: flat-cache: 4.0.1 - file-type@3.9.0: {} - - file-type@5.2.0: {} - - file-type@6.2.0: {} - fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -21885,11 +21773,6 @@ snapshots: get-package-type@0.1.0: {} - get-stream@2.3.1: - dependencies: - object-assign: 4.1.1 - pinkie-promise: 2.0.1 - get-stream@5.2.0: dependencies: pump: 3.0.2 @@ -22175,8 +22058,6 @@ snapshots: is-module@1.0.0: {} - is-natural-number@4.0.1: {} - is-node-process@1.2.0: {} is-number@7.0.0: {} @@ -22193,8 +22074,6 @@ snapshots: dependencies: '@types/estree': 1.0.6 - is-stream@1.1.0: {} - is-stream@2.0.1: {} is-stream@3.0.0: {} @@ -22622,10 +22501,6 @@ snapshots: '@babel/types': 7.26.3 source-map-js: 1.2.1 - make-dir@1.3.0: - dependencies: - pify: 3.0.0 - make-dir@3.1.0: dependencies: semver: 6.3.1 @@ -22782,6 +22657,11 @@ snapshots: minipass@7.1.2: {} + minizlib@3.0.1: + dependencies: + minipass: 7.1.2 + rimraf: 5.0.10 + mitt@3.0.1: {} mkdirp-classic@0.5.3: {} @@ -22955,6 +22835,8 @@ snapshots: dependencies: whatwg-url: 5.0.0 + node-int64@0.4.0: {} + node-preload@0.2.1: dependencies: process-on-spawn: 1.1.0 @@ -23250,16 +23132,6 @@ snapshots: picomatch@4.0.2: {} - pify@2.3.0: {} - - pify@3.0.0: {} - - pinkie-promise@2.0.1: - dependencies: - pinkie: 2.0.4 - - pinkie@2.0.4: {} - pkg-dir@4.2.0: dependencies: find-up: 4.1.0 @@ -23653,10 +23525,6 @@ snapshots: safer-buffer@2.1.2: {} - seek-bzip@1.0.6: - dependencies: - commander: 2.20.3 - semaphore@1.1.0: {} semver@6.3.1: {} @@ -23948,10 +23816,6 @@ snapshots: strip-bom@4.0.0: {} - strip-dirs@2.1.0: - dependencies: - is-natural-number: 4.0.1 - strip-final-newline@2.0.0: {} strip-final-newline@3.0.0: {} @@ -24011,16 +23875,6 @@ snapshots: bare-fs: 2.3.5 bare-path: 2.1.3 - tar-stream@1.6.2: - dependencies: - bl: 1.2.3 - buffer-alloc: 1.2.0 - end-of-stream: 1.4.4 - fs-constants: 1.0.0 - readable-stream: 2.3.8 - to-buffer: 1.1.1 - xtend: 4.0.2 - tar-stream@2.2.0: dependencies: bl: 4.1.0 @@ -24035,6 +23889,15 @@ snapshots: fast-fifo: 1.3.2 streamx: 2.21.1 + tar@7.4.3: + dependencies: + '@isaacs/fs-minipass': 4.0.1 + chownr: 3.0.0 + minipass: 7.1.2 + minizlib: 3.0.1 + mkdirp: 3.0.1 + yallist: 5.0.0 + tersify@3.12.1: dependencies: acorn: 8.14.0 @@ -24099,8 +23962,6 @@ snapshots: tmp@0.2.3: {} - to-buffer@1.1.1: {} - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -24329,6 +24190,14 @@ snapshots: untildify@4.0.0: {} + unzipper@0.12.3: + dependencies: + bluebird: 3.7.2 + duplexer2: 0.1.4 + fs-extra: 11.2.0 + graceful-fs: 4.2.11 + node-int64: 0.4.0 + update-browserslist-db@1.1.1(browserslist@4.24.3): dependencies: browserslist: 4.24.3 @@ -24661,6 +24530,8 @@ snapshots: yallist@4.0.0: {} + yallist@5.0.0: {} + yaml@2.6.1: {} yargs-parser@18.1.3: diff --git a/common/tools/dev-tool/package.json b/common/tools/dev-tool/package.json index 131f60ba23e4..67bab7b19127 100644 --- a/common/tools/dev-tool/package.json +++ b/common/tools/dev-tool/package.json @@ -54,7 +54,6 @@ "@rollup/plugin-node-resolve": "^15.2.3", "chalk": "^4.1.1", "concurrently": "^8.2.2", - "decompress": "^4.2.1", "dotenv": "^16.0.0", "env-paths": "^2.2.1", "express": "^4.19.2", @@ -74,12 +73,13 @@ "tsx": "^4.0.0", "typescript": "~5.6.2", "yaml": "^2.3.4", - "@arethetypeswrong/cli": "^0.17.0" + "@arethetypeswrong/cli": "^0.17.0", + "tar": "^7.4.3", + "unzipper": "~0.12.3" }, "devDependencies": { "@eslint/js": "^9.9.0", "@types/archiver": "^6.0.2", - "@types/decompress": "^4.2.7", "@types/express": "^4.17.21", "@types/express-serve-static-core": "^4.19.0", "@types/fs-extra": "^11.0.4", @@ -95,6 +95,7 @@ "rimraf": "^5.0.5", "typescript-eslint": "~8.16.0", "uglify-js": "^3.4.9", - "vitest": "^2.0.5" + "vitest": "^2.0.5", + "@types/unzipper": "~0.10.10" } } diff --git a/common/tools/dev-tool/src/util/testProxyUtils.ts b/common/tools/dev-tool/src/util/testProxyUtils.ts index 68bdb7dc2156..3d7268547234 100644 --- a/common/tools/dev-tool/src/util/testProxyUtils.ts +++ b/common/tools/dev-tool/src/util/testProxyUtils.ts @@ -6,9 +6,12 @@ import { createPrinter } from "./printer"; import { ProjectInfo, resolveProject, resolveRoot } from "./resolveProject"; import fs from "fs-extra"; import path from "node:path"; -import decompress from "decompress"; +import { extract } from "tar"; +import * as unzipper from "unzipper"; import envPaths from "env-paths"; import { promisify } from "node:util"; +import { PassThrough } from "node:stream"; +import { pipeline } from "node:stream/promises"; const log = createPrinter("test-proxy"); const downloadLocation = path.join(envPaths("azsdk-dev-tool").cache, "test-proxy"); @@ -103,7 +106,15 @@ async function downloadTestProxy(downloadLocation: string, downloadUrl: string): const response = await fetch(downloadUrl); const data = await response.arrayBuffer(); log(`Extracting test proxy binary to ${downloadLocation}`); - await decompress(Buffer.from(data), downloadLocation); + if (downloadUrl.endsWith(".tar.gz")) { + const stream = new PassThrough(); + stream.write(Buffer.from(data)); + stream.end(); + await pipeline(stream, extract({ cwd: downloadLocation })); + } else { + const stream = await unzipper.Open.buffer(Buffer.from(data)); + await stream.extract({ path: downloadLocation }); + } } let cachedTestProxyExecutableLocation: string | undefined; diff --git a/sdk/cognitivelanguage/ai-language-text/package.json b/sdk/cognitivelanguage/ai-language-text/package.json index 851c4d4571ed..41dcb84111b3 100644 --- a/sdk/cognitivelanguage/ai-language-text/package.json +++ b/sdk/cognitivelanguage/ai-language-text/package.json @@ -105,18 +105,18 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", "@azure/storage-blob": "^12.26.0", - "@types/decompress": "^4.0.0", "@types/node": "^18.0.0", "@vitest/browser": "^2.1.8", "@vitest/coverage-istanbul": "^2.1.8", "chai": "^5.1.2", "chai-exclude": "^3.0.0", - "decompress": "^4.0.0", "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.49.0", "typescript": "~5.7.2", - "vitest": "^2.1.8" + "vitest": "^2.1.8", + "unzipper": "~0.12.3", + "@types/unzipper": "~0.10.10" }, "type": "module", "tshy": { diff --git a/sdk/cognitivelanguage/ai-language-text/test/public/utils/customTestHelpter.ts b/sdk/cognitivelanguage/ai-language-text/test/public/utils/customTestHelpter.ts index 82971859343d..a064b8c09d27 100644 --- a/sdk/cognitivelanguage/ai-language-text/test/public/utils/customTestHelpter.ts +++ b/sdk/cognitivelanguage/ai-language-text/test/public/utils/customTestHelpter.ts @@ -15,7 +15,7 @@ import type { ContainerClient } from "@azure/storage-blob"; import { BlobServiceClient } from "@azure/storage-blob"; import { DefaultAzureCredential } from "@azure/identity"; import path from "node:path"; -import decompress from "decompress"; +import * as unzipper from "unzipper"; import { customEntityAssets, customMultiLabelAssets, @@ -110,7 +110,10 @@ export async function createCustomTestProject( ): Promise { const { assets, fileName } = await getAssetsforProject(projectKind); const dirName = path.join(pathName, fileName); - await decompress(dirName.concat(".zip"), pathName); + const stream = await unzipper.Open.file(dirName.concat(".zip")); + await stream.extract({ path: pathName }); + return; + await uploadDocumentsToStorage(dirName); const createProjectOptions: CreateProjectOptions = { From 7189228f6bb6a7de03f450448965eef299b213d7 Mon Sep 17 00:00:00 2001 From: Matthew Podwysocki Date: Wed, 18 Dec 2024 19:01:59 -0500 Subject: [PATCH 07/55] [dev-tool] Fix source fixups per tsconfig changes (#32292) ### Packages impacted by this PR - @azure/dev-tool ### Issues associated with this PR ### Describe the problem that is addressed by this PR Fixes the source migration to not look for the `NodeNext` but to make the migration. Also fixes the idempotency of the migration for config files. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary) --- .../dev-tool/src/commands/admin/migrate-source.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/common/tools/dev-tool/src/commands/admin/migrate-source.ts b/common/tools/dev-tool/src/commands/admin/migrate-source.ts index 0a2585537d6a..886d6dea0772 100644 --- a/common/tools/dev-tool/src/commands/admin/migrate-source.ts +++ b/common/tools/dev-tool/src/commands/admin/migrate-source.ts @@ -81,18 +81,15 @@ export default leafCommand(commandInfo, async ({ "package-name": packageName }) const projectFile = resolve(projectFolder, "tsconfig.json"); - const projectFileContents = await readFile(projectFile, "utf-8"); - const projectFileJSON = JSON.parse(projectFileContents); - const module = projectFileJSON.compilerOptions.module; - const moduleResolution = projectFileJSON.compilerOptions.moduleResolution; - - if (module !== "NodeNext" || moduleResolution !== "NodeNext") { - log.info("Package does not use NodeNext module resolution. Skipping."); - return true; - } + const skipPatterns = [/^vitest.*\.config\.ts$/]; const tsProject = new Project({ tsConfigFilePath: projectFile }); for (const sourceFile of tsProject.getSourceFiles()) { + // Skip config files + if (skipPatterns.some((pattern) => pattern.test(sourceFile.getBaseName()))) { + continue; + } + fixSourceFile(sourceFile); await sourceFile.save(); } From f6b7ffc6b85a2741852a6a837b7b904ed99bba76 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Wed, 18 Dec 2024 16:03:06 -0800 Subject: [PATCH 08/55] [dev-tool] fix test and linting (#32293) - some eslint-disable directives no long apply - dev-tool stays at typescript@~5.6.2 but its unit-test baseline got upgraded incorrectly in the last NO_CI commit --- .../dev-tool/src/commands/admin/create-migration.ts | 1 - common/tools/dev-tool/src/commands/migrate.ts | 9 +++------ common/tools/dev-tool/src/config/rollup.base.config.ts | 1 - .../files/expectations/cjs-forms/typescript/package.json | 2 +- .../output-customization/typescript/package.json | 2 +- .../files/expectations/simple/typescript/package.json | 2 +- .../simple@1.0.0-beta.1/typescript/package.json | 2 +- .../special-characters/typescript/package.json | 2 +- 8 files changed, 8 insertions(+), 13 deletions(-) diff --git a/common/tools/dev-tool/src/commands/admin/create-migration.ts b/common/tools/dev-tool/src/commands/admin/create-migration.ts index d28ee0ee9712..24369894f418 100644 --- a/common/tools/dev-tool/src/commands/admin/create-migration.ts +++ b/common/tools/dev-tool/src/commands/admin/create-migration.ts @@ -72,7 +72,6 @@ export default leafCommand(commandInfo, async (options) => { let id = options.name ?? (await prompt("Migration Id: ")); let migrationFile = path.resolve(__dirname, "..", "..", "migrations", ...id.split("/")) + ".ts"; // Need to check that the id is a simple identifier that only contains alphanumeric characters, underscores, dashes, and slashes. - // eslint-disable-next-line no-constant-condition while (true) { let failed = false; if (!/^[a-zA-Z0-9_\-/]+$/.test(id)) { diff --git a/common/tools/dev-tool/src/commands/migrate.ts b/common/tools/dev-tool/src/commands/migrate.ts index 74c7a57f1941..074f887bc865 100644 --- a/common/tools/dev-tool/src/commands/migrate.ts +++ b/common/tools/dev-tool/src/commands/migrate.ts @@ -354,7 +354,7 @@ async function runMigrations(pending: Migration[], project: ProjectInfo): Promis async function onMigrationSuccess( project: ProjectInfo, migration: Migration, - quiet: boolean = false, // eslint-disable-line @typescript-eslint/no-inferrable-types + quiet: boolean = false, ): Promise { await updateMigrationDate(project, migration); @@ -372,7 +372,7 @@ async function onMigrationSuccess( async function onMigrationSkipped( project: ProjectInfo, migration: Migration, - quiet: boolean = false, // eslint-disable-line @typescript-eslint/no-inferrable-types + quiet: boolean = false, ): Promise { await updateMigrationDate(project, migration); @@ -451,10 +451,7 @@ function printMigrationSuspendedWarning(migration: Migration, status: MigrationS * @param project - the working project * @returns true on success, otherwise false */ -async function abortMigration( - project: ProjectInfo, - quiet: boolean = false, // eslint-disable-line @typescript-eslint/no-inferrable-types -): Promise { +async function abortMigration(project: ProjectInfo, quiet: boolean = false): Promise { const suspendedMigration = await validateSuspendedState(project); if (!suspendedMigration) return false; diff --git a/common/tools/dev-tool/src/config/rollup.base.config.ts b/common/tools/dev-tool/src/config/rollup.base.config.ts index 48e6fdfcdce5..9f8c43be42f3 100644 --- a/common/tools/dev-tool/src/config/rollup.base.config.ts +++ b/common/tools/dev-tool/src/config/rollup.base.config.ts @@ -168,7 +168,6 @@ export function sourcemaps() { debug("no map for file ", id); return { code, map: null }; } catch (e) { - // eslint-disable-next-line no-inner-declarations function toString(error: unknown): string { return error instanceof Error ? (error.stack ?? error.toString()) : JSON.stringify(error); } diff --git a/common/tools/dev-tool/test/samples/files/expectations/cjs-forms/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/cjs-forms/typescript/package.json index 3a94f1549003..706aa3625430 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/cjs-forms/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/cjs-forms/typescript/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.7.2", + "typescript": "~5.6.2", "rimraf": "latest" } } diff --git a/common/tools/dev-tool/test/samples/files/expectations/output-customization/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/output-customization/typescript/package.json index 7d9d57082861..74fab6ee1ddd 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/output-customization/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/output-customization/typescript/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.7.2", + "typescript": "~5.6.2", "rimraf": "latest" } } diff --git a/common/tools/dev-tool/test/samples/files/expectations/simple/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/simple/typescript/package.json index 6fd1ebf65093..28b388eebf71 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/simple/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/simple/typescript/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.7.2", + "typescript": "~5.6.2", "rimraf": "latest" } } diff --git a/common/tools/dev-tool/test/samples/files/expectations/simple@1.0.0-beta.1/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/simple@1.0.0-beta.1/typescript/package.json index 8b1cb1b2f073..3ec84c6c954e 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/simple@1.0.0-beta.1/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/simple@1.0.0-beta.1/typescript/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.7.2", + "typescript": "~5.6.2", "rimraf": "latest" } } diff --git a/common/tools/dev-tool/test/samples/files/expectations/special-characters/typescript/package.json b/common/tools/dev-tool/test/samples/files/expectations/special-characters/typescript/package.json index 87bec26f3cc8..56ced7ad1c53 100644 --- a/common/tools/dev-tool/test/samples/files/expectations/special-characters/typescript/package.json +++ b/common/tools/dev-tool/test/samples/files/expectations/special-characters/typescript/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.7.2", + "typescript": "~5.6.2", "rimraf": "latest" } } From c7a5e8f272264bd156de4e671590db7d9aa47505 Mon Sep 17 00:00:00 2001 From: Jackson Weber <47067795+JacksonWeber@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:33:19 -0800 Subject: [PATCH 09/55] [Monitor OpenTelemetry Exporter] Fix samples-dev Test Execution (#32225) ### Packages impacted by this PR @azure/monitor-opentelemetry-exporter ### Issues associated with this PR #32205 ### Describe the problem that is addressed by this PR Execute Samples failing in nightly runs ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary) --- .../samples-dev/basicTracerNode.ts | 4 +++- .../monitor-opentelemetry-exporter/samples-dev/httpSample.ts | 4 +++- .../monitor-opentelemetry-exporter/samples-dev/logSample.ts | 4 +++- .../samples-dev/metricsSample.ts | 4 +++- .../src/export/statsbeat/statsbeatMetrics.ts | 4 +--- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/basicTracerNode.ts b/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/basicTracerNode.ts index 8cf951efb6e9..b879ec312d1f 100644 --- a/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/basicTracerNode.ts +++ b/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/basicTracerNode.ts @@ -28,7 +28,9 @@ const provider = new BasicTracerProvider({ // Configure span processor to send spans to the exporter const exporter = new AzureMonitorTraceExporter({ connectionString: - process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "", + // Replace with your Application Insights Connection String + process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || + "InstrumentationKey=00000000-0000-0000-0000-000000000000;", }); provider.addSpanProcessor(new SimpleSpanProcessor(exporter as any)); diff --git a/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/httpSample.ts b/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/httpSample.ts index 380575c4daa0..80b443dd1921 100644 --- a/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/httpSample.ts +++ b/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/httpSample.ts @@ -117,7 +117,9 @@ function setupOpenTelemetry() { const provider = new NodeTracerProvider(); const exporter = new AzureMonitorTraceExporter({ connectionString: - process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "", + // Replace with your Application Insights Connection String + process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || + "InstrumentationKey=00000000-0000-0000-0000-000000000000;", }); provider.addSpanProcessor(new SimpleSpanProcessor(exporter as any)); diff --git a/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/logSample.ts b/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/logSample.ts index 6363019c6a75..82b13492530c 100644 --- a/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/logSample.ts +++ b/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/logSample.ts @@ -28,7 +28,9 @@ const loggerProvider = new LoggerProvider({ // Configure processor to send logs to the exporter const logExporter = new AzureMonitorLogExporter({ connectionString: - process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "", + // Replace with your Application Insights Connection String + process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || + "InstrumentationKey=00000000-0000-0000-0000-000000000000;", }); loggerProvider.addLogRecordProcessor(new SimpleLogRecordProcessor(logExporter)); const logger = loggerProvider.getLogger("example-basic-logger-node"); diff --git a/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/metricsSample.ts b/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/metricsSample.ts index aa64cd29c606..a8633740f971 100644 --- a/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/metricsSample.ts +++ b/sdk/monitor/monitor-opentelemetry-exporter/samples-dev/metricsSample.ts @@ -30,7 +30,9 @@ export async function main() { }); const exporter = new AzureMonitorMetricExporter({ connectionString: - process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "", + // Replace with your Application Insights Connection String + process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || + "InstrumentationKey=00000000-0000-0000-0000-000000000000;", }); const metricReaderOptions: PeriodicExportingMetricReaderOptions = { exporter: exporter, diff --git a/sdk/monitor/monitor-opentelemetry-exporter/src/export/statsbeat/statsbeatMetrics.ts b/sdk/monitor/monitor-opentelemetry-exporter/src/export/statsbeat/statsbeatMetrics.ts index 9db0e061d295..89256fdfbaf2 100644 --- a/sdk/monitor/monitor-opentelemetry-exporter/src/export/statsbeat/statsbeatMetrics.ts +++ b/sdk/monitor/monitor-opentelemetry-exporter/src/export/statsbeat/statsbeatMetrics.ts @@ -14,9 +14,7 @@ import { NON_EU_CONNECTION_STRING, StatsbeatResourceProvider, } from "./types.js"; - -// eslint-disable-next-line @typescript-eslint/no-require-imports -const os = require("os"); +import * as os from "os"; export class StatsbeatMetrics { protected resourceProvider: string = StatsbeatResourceProvider.unknown; From 12c49d1e84517ac2022ee965c54951a0deff8cab Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:20:36 +0800 Subject: [PATCH 10/55] [mgmt] containerservice release (#32080) https://github.com/Azure/sdk-release-request/issues/5706 --- .../arm-containerservice/CHANGELOG.md | 205 +- .../arm-containerservice/README.md | 3 +- .../arm-containerservice/_meta.json | 8 +- .../arm-containerservice/assets.json | 2 +- .../arm-containerservice/package.json | 2 +- .../review/arm-containerservice.api.md | 714 +++++- .../agentPoolsAbortLatestOperationSample.ts | 6 +- .../agentPoolsCreateOrUpdateSample.ts | 200 +- .../agentPoolsDeleteMachinesSample.ts | 2 +- .../samples-dev/agentPoolsDeleteSample.ts | 27 +- ...oolsGetAvailableAgentPoolVersionsSample.ts | 2 +- .../samples-dev/agentPoolsGetSample.ts | 2 +- .../agentPoolsGetUpgradeProfileSample.ts | 2 +- .../samples-dev/agentPoolsListSample.ts | 2 +- ...agentPoolsUpgradeNodeImageVersionSample.ts | 2 +- .../loadBalancersCreateOrUpdateSample.ts | 45 + .../samples-dev/loadBalancersDeleteSample.ts | 45 + .../loadBalancersGetSample.ts} | 16 +- ...loadBalancersListByManagedClusterSample.ts | 46 + .../samples-dev/machinesGetSample.ts | 4 +- .../samples-dev/machinesListSample.ts | 4 +- ...nanceConfigurationsCreateOrUpdateSample.ts | 4 +- .../maintenanceConfigurationsDeleteSample.ts | 4 +- .../maintenanceConfigurationsGetSample.ts | 4 +- ...onfigurationsListByManagedClusterSample.ts | 4 +- ...gedClusterSnapshotsCreateOrUpdateSample.ts | 55 + .../managedClusterSnapshotsDeleteSample.ts | 43 + .../managedClusterSnapshotsGetSample.ts | 43 + ...usterSnapshotsListByResourceGroupSample.ts | 44 + .../managedClusterSnapshotsListSample.ts | 40 + ...managedClusterSnapshotsUpdateTagsSample.ts | 48 + ...nagedClustersAbortLatestOperationSample.ts | 6 +- .../managedClustersCreateOrUpdateSample.ts | 474 +++- .../managedClustersDeleteSample.ts | 2 +- .../managedClustersGetAccessProfileSample.ts | 2 +- .../managedClustersGetCommandResultSample.ts | 4 +- ...agedClustersGetGuardrailsVersionsSample.ts | 42 + ...gedClustersGetMeshRevisionProfileSample.ts | 2 +- ...agedClustersGetMeshUpgradeProfileSample.ts | 2 +- ...agedClustersGetSafeguardsVersionsSample.ts | 42 + .../samples-dev/managedClustersGetSample.ts | 2 +- .../managedClustersGetUpgradeProfileSample.ts | 2 +- ...anagedClustersListByResourceGroupSample.ts | 2 +- ...ustersListClusterAdminCredentialsSample.ts | 2 +- ...tClusterMonitoringUserCredentialsSample.ts | 2 +- ...lustersListClusterUserCredentialsSample.ts | 2 +- ...gedClustersListGuardrailsVersionsSample.ts | 43 + ...gedClustersListKubernetesVersionsSample.ts | 2 +- ...dClustersListMeshRevisionProfilesSample.ts | 2 +- ...edClustersListMeshUpgradeProfilesSample.ts | 2 +- ...boundNetworkDependenciesEndpointsSample.ts | 2 +- ...gedClustersListSafeguardsVersionsSample.ts | 43 + .../samples-dev/managedClustersListSample.ts | 2 +- ...gedClustersRebalanceLoadBalancersSample.ts | 51 + .../managedClustersResetAadProfileSample.ts | 2 +- ...stersResetServicePrincipalProfileSample.ts | 2 +- ...ClustersRotateClusterCertificatesSample.ts | 2 +- ...rsRotateServiceAccountSigningKeysSample.ts | 2 +- .../managedClustersRunCommandSample.ts | 2 +- .../samples-dev/managedClustersStartSample.ts | 2 +- .../samples-dev/managedClustersStopSample.ts | 2 +- .../managedClustersUpdateTagsSample.ts | 2 +- ...erationStatusResultGetByAgentPoolSample.ts | 47 + .../operationStatusResultGetSample.ts | 45 + .../operationStatusResultListSample.ts | 46 + .../samples-dev/operationsListSample.ts | 2 +- .../privateEndpointConnectionsDeleteSample.ts | 2 +- .../privateEndpointConnectionsGetSample.ts | 2 +- .../privateEndpointConnectionsListSample.ts | 2 +- .../privateEndpointConnectionsUpdateSample.ts | 2 +- .../privateLinkResourcesListSample.ts | 2 +- .../resolvePrivateLinkServiceIdPostSample.ts | 2 +- .../snapshotsCreateOrUpdateSample.ts | 2 +- .../samples-dev/snapshotsDeleteSample.ts | 2 +- .../samples-dev/snapshotsGetSample.ts | 2 +- .../snapshotsListByResourceGroupSample.ts | 2 +- .../samples-dev/snapshotsListSample.ts | 2 +- .../samples-dev/snapshotsUpdateTagsSample.ts | 2 +- ...dAccessRoleBindingsCreateOrUpdateSample.ts | 2 +- .../trustedAccessRoleBindingsDeleteSample.ts | 2 +- .../trustedAccessRoleBindingsGetSample.ts | 2 +- .../trustedAccessRoleBindingsListSample.ts | 2 +- .../trustedAccessRolesListSample.ts | 2 +- .../{v21 => v21-beta}/javascript/README.md | 280 ++- .../agentPoolsAbortLatestOperationSample.js | 6 +- .../agentPoolsCreateOrUpdateSample.js | 192 +- .../agentPoolsDeleteMachinesSample.js | 2 +- .../javascript/agentPoolsDeleteSample.js | 64 + ...oolsGetAvailableAgentPoolVersionsSample.js | 2 +- .../javascript/agentPoolsGetSample.js | 2 +- .../agentPoolsGetUpgradeProfileSample.js | 2 +- .../javascript/agentPoolsListSample.js | 2 +- ...agentPoolsUpgradeNodeImageVersionSample.js | 2 +- .../loadBalancersCreateOrUpdateSample.js | 41 + .../javascript/loadBalancersDeleteSample.js} | 16 +- .../javascript/loadBalancersGetSample.js | 37 + ...loadBalancersListByManagedClusterSample.js | 42 + .../javascript/machinesGetSample.js | 4 +- .../javascript/machinesListSample.js | 4 +- ...nanceConfigurationsCreateOrUpdateSample.js | 4 +- .../maintenanceConfigurationsDeleteSample.js | 4 +- .../maintenanceConfigurationsGetSample.js | 4 +- ...onfigurationsListByManagedClusterSample.js | 4 +- ...gedClusterSnapshotsCreateOrUpdateSample.js | 48 + .../managedClusterSnapshotsDeleteSample.js | 36 + .../managedClusterSnapshotsGetSample.js | 36 + ...usterSnapshotsListByResourceGroupSample.js | 38 + .../managedClusterSnapshotsListSample.js | 37 + ...managedClusterSnapshotsUpdateTagsSample.js | 41 + ...nagedClustersAbortLatestOperationSample.js | 6 +- .../managedClustersCreateOrUpdateSample.js | 460 +++- .../javascript/managedClustersDeleteSample.js | 2 +- .../managedClustersGetAccessProfileSample.js | 2 +- .../managedClustersGetCommandResultSample.js | 4 +- ...agedClustersGetGuardrailsVersionsSample.js | 36 + ...gedClustersGetMeshRevisionProfileSample.js | 2 +- ...agedClustersGetMeshUpgradeProfileSample.js | 2 +- ...agedClustersGetSafeguardsVersionsSample.js | 36 + .../javascript/managedClustersGetSample.js | 2 +- .../managedClustersGetUpgradeProfileSample.js | 2 +- ...anagedClustersListByResourceGroupSample.js | 2 +- ...ustersListClusterAdminCredentialsSample.js | 2 +- ...tClusterMonitoringUserCredentialsSample.js | 2 +- ...lustersListClusterUserCredentialsSample.js | 2 +- ...gedClustersListGuardrailsVersionsSample.js | 38 + ...gedClustersListKubernetesVersionsSample.js | 2 +- ...dClustersListMeshRevisionProfilesSample.js | 2 +- ...edClustersListMeshUpgradeProfilesSample.js | 2 +- ...boundNetworkDependenciesEndpointsSample.js | 2 +- ...gedClustersListSafeguardsVersionsSample.js | 38 + .../javascript/managedClustersListSample.js | 2 +- ...gedClustersRebalanceLoadBalancersSample.js | 43 + .../managedClustersResetAadProfileSample.js | 2 +- ...stersResetServicePrincipalProfileSample.js | 2 +- ...ClustersRotateClusterCertificatesSample.js | 2 +- ...rsRotateServiceAccountSigningKeysSample.js | 2 +- .../managedClustersRunCommandSample.js | 2 +- .../javascript/managedClustersStartSample.js | 2 +- .../javascript/managedClustersStopSample.js | 2 +- .../managedClustersUpdateTagsSample.js | 2 +- ...erationStatusResultGetByAgentPoolSample.js | 43 + .../operationStatusResultGetSample.js | 41 + .../operationStatusResultListSample.js | 42 + .../javascript/operationsListSample.js | 2 +- .../{v21 => v21-beta}/javascript/package.json | 6 +- .../privateEndpointConnectionsDeleteSample.js | 2 +- .../privateEndpointConnectionsGetSample.js | 2 +- .../privateEndpointConnectionsListSample.js | 2 +- .../privateEndpointConnectionsUpdateSample.js | 2 +- .../privateLinkResourcesListSample.js | 2 +- .../resolvePrivateLinkServiceIdPostSample.js | 2 +- .../{v21 => v21-beta}/javascript/sample.env | 0 .../snapshotsCreateOrUpdateSample.js | 2 +- .../javascript/snapshotsDeleteSample.js | 2 +- .../javascript/snapshotsGetSample.js | 2 +- .../snapshotsListByResourceGroupSample.js | 2 +- .../javascript/snapshotsListSample.js | 2 +- .../javascript/snapshotsUpdateTagsSample.js | 2 +- ...dAccessRoleBindingsCreateOrUpdateSample.js | 2 +- .../trustedAccessRoleBindingsDeleteSample.js | 2 +- .../trustedAccessRoleBindingsGetSample.js | 2 +- .../trustedAccessRoleBindingsListSample.js | 2 +- .../trustedAccessRolesListSample.js | 2 +- .../{v21 => v21-beta}/typescript/README.md | 280 ++- .../{v21 => v21-beta}/typescript/package.json | 6 +- .../{v21 => v21-beta}/typescript/sample.env | 0 .../agentPoolsAbortLatestOperationSample.ts | 6 +- .../src/agentPoolsCreateOrUpdateSample.ts | 200 +- .../src/agentPoolsDeleteMachinesSample.ts | 2 +- .../typescript/src/agentPoolsDeleteSample.ts | 70 + ...oolsGetAvailableAgentPoolVersionsSample.ts | 2 +- .../typescript/src/agentPoolsGetSample.ts | 2 +- .../src/agentPoolsGetUpgradeProfileSample.ts | 2 +- .../typescript/src/agentPoolsListSample.ts | 2 +- ...agentPoolsUpgradeNodeImageVersionSample.ts | 2 +- .../src/loadBalancersCreateOrUpdateSample.ts | 45 + .../src/loadBalancersDeleteSample.ts | 45 + .../typescript/src/loadBalancersGetSample.ts | 45 + ...loadBalancersListByManagedClusterSample.ts | 46 + .../typescript/src/machinesGetSample.ts | 4 +- .../typescript/src/machinesListSample.ts | 4 +- ...nanceConfigurationsCreateOrUpdateSample.ts | 4 +- .../maintenanceConfigurationsDeleteSample.ts | 4 +- .../src/maintenanceConfigurationsGetSample.ts | 4 +- ...onfigurationsListByManagedClusterSample.ts | 4 +- ...gedClusterSnapshotsCreateOrUpdateSample.ts | 55 + .../managedClusterSnapshotsDeleteSample.ts | 43 + .../src/managedClusterSnapshotsGetSample.ts | 43 + ...usterSnapshotsListByResourceGroupSample.ts | 44 + .../src/managedClusterSnapshotsListSample.ts | 40 + ...managedClusterSnapshotsUpdateTagsSample.ts | 48 + ...nagedClustersAbortLatestOperationSample.ts | 6 +- .../managedClustersCreateOrUpdateSample.ts | 474 +++- .../src/managedClustersDeleteSample.ts | 2 +- .../managedClustersGetAccessProfileSample.ts | 2 +- .../managedClustersGetCommandResultSample.ts | 4 +- ...agedClustersGetGuardrailsVersionsSample.ts | 42 + ...gedClustersGetMeshRevisionProfileSample.ts | 2 +- ...agedClustersGetMeshUpgradeProfileSample.ts | 2 +- ...agedClustersGetSafeguardsVersionsSample.ts | 42 + .../src/managedClustersGetSample.ts | 2 +- .../managedClustersGetUpgradeProfileSample.ts | 2 +- ...anagedClustersListByResourceGroupSample.ts | 2 +- ...ustersListClusterAdminCredentialsSample.ts | 2 +- ...tClusterMonitoringUserCredentialsSample.ts | 2 +- ...lustersListClusterUserCredentialsSample.ts | 2 +- ...gedClustersListGuardrailsVersionsSample.ts | 43 + ...gedClustersListKubernetesVersionsSample.ts | 2 +- ...dClustersListMeshRevisionProfilesSample.ts | 2 +- ...edClustersListMeshUpgradeProfilesSample.ts | 2 +- ...boundNetworkDependenciesEndpointsSample.ts | 2 +- ...gedClustersListSafeguardsVersionsSample.ts | 43 + .../src/managedClustersListSample.ts | 2 +- ...gedClustersRebalanceLoadBalancersSample.ts | 51 + .../managedClustersResetAadProfileSample.ts | 2 +- ...stersResetServicePrincipalProfileSample.ts | 2 +- ...ClustersRotateClusterCertificatesSample.ts | 2 +- ...rsRotateServiceAccountSigningKeysSample.ts | 2 +- .../src/managedClustersRunCommandSample.ts | 2 +- .../src/managedClustersStartSample.ts | 2 +- .../src/managedClustersStopSample.ts | 2 +- .../src/managedClustersUpdateTagsSample.ts | 2 +- ...erationStatusResultGetByAgentPoolSample.ts | 47 + .../src/operationStatusResultGetSample.ts | 45 + .../src/operationStatusResultListSample.ts | 46 + .../typescript/src/operationsListSample.ts | 2 +- .../privateEndpointConnectionsDeleteSample.ts | 2 +- .../privateEndpointConnectionsGetSample.ts | 2 +- .../privateEndpointConnectionsListSample.ts | 2 +- .../privateEndpointConnectionsUpdateSample.ts | 2 +- .../src/privateLinkResourcesListSample.ts | 2 +- .../resolvePrivateLinkServiceIdPostSample.ts | 2 +- .../src/snapshotsCreateOrUpdateSample.ts | 2 +- .../typescript/src/snapshotsDeleteSample.ts | 2 +- .../typescript/src/snapshotsGetSample.ts | 2 +- .../src/snapshotsListByResourceGroupSample.ts | 2 +- .../typescript/src/snapshotsListSample.ts | 2 +- .../src/snapshotsUpdateTagsSample.ts | 2 +- ...dAccessRoleBindingsCreateOrUpdateSample.ts | 2 +- .../trustedAccessRoleBindingsDeleteSample.ts | 2 +- .../src/trustedAccessRoleBindingsGetSample.ts | 2 +- .../trustedAccessRoleBindingsListSample.ts | 2 +- .../src/trustedAccessRolesListSample.ts | 2 +- .../typescript/tsconfig.json | 0 .../src/containerServiceClient.ts | 33 +- .../arm-containerservice/src/models/index.ts | 1481 ++++++++++-- .../src/models/mappers.ts | 1984 +++++++++++++++-- .../src/models/parameters.ts | 126 +- .../src/operations/agentPools.ts | 6 +- .../src/operations/index.ts | 7 +- .../src/operations/loadBalancers.ts | 435 ++++ .../operations/maintenanceConfigurations.ts | 2 +- .../src/operations/managedClusterSnapshots.ts | 468 ++++ .../src/operations/managedClusters.ts | 604 ++++- .../operationStatusResultOperations.ts | 284 +++ .../operations/privateEndpointConnections.ts | 2 +- .../operations/resolvePrivateLinkServiceId.ts | 2 +- .../src/operations/snapshots.ts | 2 +- .../src/operationsInterfaces/agentPools.ts | 4 +- .../src/operationsInterfaces/index.ts | 7 +- .../src/operationsInterfaces/loadBalancers.ts | 93 + .../managedClusterSnapshots.ts | 91 + .../operationsInterfaces/managedClusters.ts | 136 +- .../operationStatusResultOperations.ts | 61 + 264 files changed, 10890 insertions(+), 1293 deletions(-) create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/loadBalancersCreateOrUpdateSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/loadBalancersDeleteSample.ts rename sdk/containerservice/arm-containerservice/{samples/v21/typescript/src/agentPoolsDeleteSample.ts => samples-dev/loadBalancersGetSample.ts} (71%) create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/loadBalancersListByManagedClusterSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsCreateOrUpdateSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsDeleteSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListByResourceGroupSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsUpdateTagsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetGuardrailsVersionsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSafeguardsVersionsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersListGuardrailsVersionsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSafeguardsVersionsSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/managedClustersRebalanceLoadBalancersSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetByAgentPoolSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultListSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/README.md (55%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/agentPoolsAbortLatestOperationSample.js (88%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/agentPoolsCreateOrUpdateSample.js (75%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/agentPoolsDeleteMachinesSample.js (93%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/agentPoolsDeleteSample.js rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/agentPoolsGetAvailableAgentPoolVersionsSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/agentPoolsGetSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/agentPoolsGetUpgradeProfileSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/agentPoolsListSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/agentPoolsUpgradeNodeImageVersionSample.js (94%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/loadBalancersCreateOrUpdateSample.js rename sdk/containerservice/arm-containerservice/samples/{v21/javascript/agentPoolsDeleteSample.js => v21-beta/javascript/loadBalancersDeleteSample.js} (69%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/loadBalancersGetSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/loadBalancersListByManagedClusterSample.js rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/machinesGetSample.js (88%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/machinesListSample.js (87%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/maintenanceConfigurationsCreateOrUpdateSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/maintenanceConfigurationsDeleteSample.js (90%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/maintenanceConfigurationsGetSample.js (91%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/maintenanceConfigurationsListByManagedClusterSample.js (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClusterSnapshotsCreateOrUpdateSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClusterSnapshotsDeleteSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClusterSnapshotsGetSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClusterSnapshotsListByResourceGroupSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClusterSnapshotsListSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClusterSnapshotsUpdateTagsSample.js rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersAbortLatestOperationSample.js (90%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersCreateOrUpdateSample.js (77%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersDeleteSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersGetAccessProfileSample.js (94%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersGetCommandResultSample.js (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClustersGetGuardrailsVersionsSample.js rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersGetMeshRevisionProfileSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersGetMeshUpgradeProfileSample.js (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClustersGetSafeguardsVersionsSample.js rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersGetSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersGetUpgradeProfileSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersListByResourceGroupSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersListClusterAdminCredentialsSample.js (91%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersListClusterMonitoringUserCredentialsSample.js (91%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersListClusterUserCredentialsSample.js (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClustersListGuardrailsVersionsSample.js rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersListKubernetesVersionsSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersListMeshRevisionProfilesSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersListMeshUpgradeProfilesSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersListOutboundNetworkDependenciesEndpointsSample.js (93%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClustersListSafeguardsVersionsSample.js rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersListSample.js (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/managedClustersRebalanceLoadBalancersSample.js rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersResetAadProfileSample.js (94%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersResetServicePrincipalProfileSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersRotateClusterCertificatesSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersRotateServiceAccountSigningKeysSample.js (91%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersRunCommandSample.js (94%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersStartSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersStopSample.js (95%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/managedClustersUpdateTagsSample.js (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/operationStatusResultGetByAgentPoolSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/operationStatusResultGetSample.js create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/operationStatusResultListSample.js rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/operationsListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/package.json (80%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/privateEndpointConnectionsDeleteSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/privateEndpointConnectionsGetSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/privateEndpointConnectionsListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/privateEndpointConnectionsUpdateSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/privateLinkResourcesListSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/resolvePrivateLinkServiceIdPostSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/sample.env (100%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/snapshotsCreateOrUpdateSample.js (94%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/snapshotsDeleteSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/snapshotsGetSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/snapshotsListByResourceGroupSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/snapshotsListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/snapshotsUpdateTagsSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/trustedAccessRoleBindingsDeleteSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/trustedAccessRoleBindingsGetSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/trustedAccessRoleBindingsListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/javascript/trustedAccessRolesListSample.js (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/README.md (55%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/package.json (83%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/sample.env (100%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/agentPoolsAbortLatestOperationSample.ts (88%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/agentPoolsCreateOrUpdateSample.ts (75%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/agentPoolsDeleteMachinesSample.ts (94%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsDeleteSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/agentPoolsGetSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/agentPoolsGetUpgradeProfileSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/agentPoolsListSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts (94%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersCreateOrUpdateSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersDeleteSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersListByManagedClusterSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/machinesGetSample.ts (91%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/machinesListSample.ts (91%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/maintenanceConfigurationsDeleteSample.ts (90%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/maintenanceConfigurationsGetSample.ts (91%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsCreateOrUpdateSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsDeleteSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsListByResourceGroupSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsListSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsUpdateTagsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersAbortLatestOperationSample.ts (90%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersCreateOrUpdateSample.ts (77%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersDeleteSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersGetAccessProfileSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersGetCommandResultSample.ts (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetGuardrailsVersionsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersGetMeshRevisionProfileSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetSafeguardsVersionsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersGetSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersGetUpgradeProfileSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersListByResourceGroupSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersListClusterAdminCredentialsSample.ts (91%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersListClusterUserCredentialsSample.ts (91%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListGuardrailsVersionsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersListKubernetesVersionsSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersListMeshRevisionProfilesSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts (93%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListSafeguardsVersionsSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersListSample.ts (92%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRebalanceLoadBalancersSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersResetAadProfileSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersResetServicePrincipalProfileSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersRotateClusterCertificatesSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts (91%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersRunCommandSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersStartSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersStopSample.ts (95%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/managedClustersUpdateTagsSample.ts (93%) create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultGetByAgentPoolSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultGetSample.ts create mode 100644 sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultListSample.ts rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/operationsListSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/privateEndpointConnectionsDeleteSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/privateEndpointConnectionsGetSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/privateEndpointConnectionsListSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/privateEndpointConnectionsUpdateSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/privateLinkResourcesListSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/resolvePrivateLinkServiceIdPostSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/snapshotsCreateOrUpdateSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/snapshotsDeleteSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/snapshotsGetSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/snapshotsListByResourceGroupSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/snapshotsListSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/snapshotsUpdateTagsSample.ts (93%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts (94%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/trustedAccessRoleBindingsDeleteSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/trustedAccessRoleBindingsGetSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/trustedAccessRoleBindingsListSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/src/trustedAccessRolesListSample.ts (92%) rename sdk/containerservice/arm-containerservice/samples/{v21 => v21-beta}/typescript/tsconfig.json (100%) create mode 100644 sdk/containerservice/arm-containerservice/src/operations/loadBalancers.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operations/operationStatusResultOperations.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/loadBalancers.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts create mode 100644 sdk/containerservice/arm-containerservice/src/operationsInterfaces/operationStatusResultOperations.ts diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index 84a180eb56ef..5249ce0b1078 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,15 +1,202 @@ # Release History - -## 21.3.1 (Unreleased) - + +## 21.4.0-beta.1 (2024-12-06) +Compared with version 21.3.0 + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group LoadBalancers + - Added operation group ManagedClusterSnapshots + - Added operation group OperationStatusResultOperations + - Added operation ManagedClusters.beginRebalanceLoadBalancers + - Added operation ManagedClusters.beginRebalanceLoadBalancersAndWait + - Added operation ManagedClusters.getGuardrailsVersions + - Added operation ManagedClusters.getSafeguardsVersions + - Added operation ManagedClusters.listGuardrailsVersions + - Added operation ManagedClusters.listSafeguardsVersions + - Added Interface AgentPoolArtifactStreamingProfile + - Added Interface AgentPoolGatewayProfile + - Added Interface AgentPoolGPUProfile + - Added Interface AutoScaleProfile + - Added Interface Component + - Added Interface ComponentsByRelease + - Added Interface ContainerServiceNetworkProfileKubeProxyConfig + - Added Interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + - Added Interface GuardrailsAvailableVersion + - Added Interface GuardrailsAvailableVersionsList + - Added Interface GuardrailsAvailableVersionsProperties + - Added Interface LabelSelector + - Added Interface LabelSelectorRequirement + - Added Interface LoadBalancer + - Added Interface LoadBalancerListResult + - Added Interface LoadBalancersCreateOrUpdateOptionalParams + - Added Interface LoadBalancersDeleteHeaders + - Added Interface LoadBalancersDeleteOptionalParams + - Added Interface LoadBalancersGetOptionalParams + - Added Interface LoadBalancersListByManagedClusterNextOptionalParams + - Added Interface LoadBalancersListByManagedClusterOptionalParams + - Added Interface ManagedClusterAIToolchainOperatorProfile + - Added Interface ManagedClusterAzureMonitorProfileAppMonitoring + - Added Interface ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation + - Added Interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs + - Added Interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics + - Added Interface ManagedClusterAzureMonitorProfileContainerInsights + - Added Interface ManagedClusterBootstrapProfile + - Added Interface ManagedClusterIngressProfileNginx + - Added Interface ManagedClusterNodeProvisioningProfile + - Added Interface ManagedClusterPropertiesForSnapshot + - Added Interface ManagedClusterSecurityProfileImageIntegrity + - Added Interface ManagedClusterSecurityProfileNodeRestriction + - Added Interface ManagedClustersGetGuardrailsVersionsOptionalParams + - Added Interface ManagedClustersGetSafeguardsVersionsOptionalParams + - Added Interface ManagedClustersListGuardrailsVersionsNextOptionalParams + - Added Interface ManagedClustersListGuardrailsVersionsOptionalParams + - Added Interface ManagedClustersListSafeguardsVersionsNextOptionalParams + - Added Interface ManagedClustersListSafeguardsVersionsOptionalParams + - Added Interface ManagedClusterSnapshot + - Added Interface ManagedClusterSnapshotListResult + - Added Interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams + - Added Interface ManagedClusterSnapshotsDeleteOptionalParams + - Added Interface ManagedClusterSnapshotsGetOptionalParams + - Added Interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams + - Added Interface ManagedClusterSnapshotsListByResourceGroupOptionalParams + - Added Interface ManagedClusterSnapshotsListNextOptionalParams + - Added Interface ManagedClusterSnapshotsListOptionalParams + - Added Interface ManagedClusterSnapshotsUpdateTagsOptionalParams + - Added Interface ManagedClustersRebalanceLoadBalancersHeaders + - Added Interface ManagedClustersRebalanceLoadBalancersOptionalParams + - Added Interface ManagedClusterStaticEgressGatewayProfile + - Added Interface ManualScaleProfile + - Added Interface NetworkProfileForSnapshot + - Added Interface OperationStatusResult + - Added Interface OperationStatusResultGetByAgentPoolOptionalParams + - Added Interface OperationStatusResultGetOptionalParams + - Added Interface OperationStatusResultList + - Added Interface OperationStatusResultListNextOptionalParams + - Added Interface OperationStatusResultListOptionalParams + - Added Interface RebalanceLoadBalancersRequestBody + - Added Interface SafeguardsAvailableVersion + - Added Interface SafeguardsAvailableVersionsList + - Added Interface SafeguardsAvailableVersionsProperties + - Added Interface SafeguardsProfile + - Added Interface ScaleProfile + - Added Interface VirtualMachineNodes + - Added Interface VirtualMachinesProfile + - Added Type Alias AddonAutoscaling + - Added Type Alias AgentPoolSSHAccess + - Added Type Alias ArtifactSource + - Added Type Alias ClusterServiceLoadBalancerHealthProbeMode + - Added Type Alias DriverType + - Added Type Alias GuardrailsSupport + - Added Type Alias IpvsScheduler + - Added Type Alias Level + - Added Type Alias LoadBalancersCreateOrUpdateResponse + - Added Type Alias LoadBalancersDeleteResponse + - Added Type Alias LoadBalancersGetResponse + - Added Type Alias LoadBalancersListByManagedClusterNextResponse + - Added Type Alias LoadBalancersListByManagedClusterResponse + - Added Type Alias ManagedClustersGetGuardrailsVersionsResponse + - Added Type Alias ManagedClustersGetSafeguardsVersionsResponse + - Added Type Alias ManagedClustersListGuardrailsVersionsNextResponse + - Added Type Alias ManagedClustersListGuardrailsVersionsResponse + - Added Type Alias ManagedClustersListSafeguardsVersionsNextResponse + - Added Type Alias ManagedClustersListSafeguardsVersionsResponse + - Added Type Alias ManagedClusterSnapshotsCreateOrUpdateResponse + - Added Type Alias ManagedClusterSnapshotsGetResponse + - Added Type Alias ManagedClusterSnapshotsListByResourceGroupNextResponse + - Added Type Alias ManagedClusterSnapshotsListByResourceGroupResponse + - Added Type Alias ManagedClusterSnapshotsListNextResponse + - Added Type Alias ManagedClusterSnapshotsListResponse + - Added Type Alias ManagedClusterSnapshotsUpdateTagsResponse + - Added Type Alias ManagedClustersRebalanceLoadBalancersResponse + - Added Type Alias Mode + - Added Type Alias NginxIngressControllerType + - Added Type Alias NodeProvisioningMode + - Added Type Alias OperationStatusResultGetByAgentPoolResponse + - Added Type Alias OperationStatusResultGetResponse + - Added Type Alias OperationStatusResultListNextResponse + - Added Type Alias OperationStatusResultListResponse + - Added Type Alias Operator + - Added Type Alias PodIPAllocationMode + - Added Type Alias PodLinkLocalAccess + - Added Type Alias SafeguardsSupport + - Added Type Alias SeccompDefault + - Added Type Alias UndrainableNodeBehavior + - Interface AgentPool has a new optional parameter artifactStreamingProfile + - Interface AgentPool has a new optional parameter enableCustomCATrust + - Interface AgentPool has a new optional parameter gatewayProfile + - Interface AgentPool has a new optional parameter gpuProfile + - Interface AgentPool has a new optional parameter messageOfTheDay + - Interface AgentPool has a new optional parameter nodeInitializationTaints + - Interface AgentPool has a new optional parameter podIPAllocationMode + - Interface AgentPool has a new optional parameter virtualMachineNodesStatus + - Interface AgentPool has a new optional parameter virtualMachinesProfile + - Interface AgentPoolSecurityProfile has a new optional parameter sshAccess + - Interface AgentPoolUpgradeProfile has a new optional parameter componentsByReleases + - Interface AgentPoolUpgradeSettings has a new optional parameter maxUnavailable + - Interface AgentPoolUpgradeSettings has a new optional parameter undrainableNodeBehavior + - Interface ContainerServiceNetworkProfile has a new optional parameter kubeProxyConfig + - Interface ContainerServiceNetworkProfile has a new optional parameter podLinkLocalAccess + - Interface ContainerServiceNetworkProfile has a new optional parameter staticEgressGatewayProfile + - Interface KubeletConfig has a new optional parameter seccompDefault + - Interface ManagedCluster has a new optional parameter aiToolchainOperatorProfile + - Interface ManagedCluster has a new optional parameter bootstrapProfile + - Interface ManagedCluster has a new optional parameter creationData + - Interface ManagedCluster has a new optional parameter enableNamespaceResources + - Interface ManagedCluster has a new optional parameter kind + - Interface ManagedCluster has a new optional parameter nodeProvisioningProfile + - Interface ManagedCluster has a new optional parameter safeguardsProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter artifactStreamingProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter enableCustomCATrust + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter gatewayProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter gpuProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter messageOfTheDay + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter nodeInitializationTaints + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter podIPAllocationMode + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter virtualMachineNodesStatus + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter virtualMachinesProfile + - Interface ManagedClusterAPIServerAccessProfile has a new optional parameter enableVnetIntegration + - Interface ManagedClusterAPIServerAccessProfile has a new optional parameter subnetId + - Interface ManagedClusterAzureMonitorProfile has a new optional parameter appMonitoring + - Interface ManagedClusterAzureMonitorProfile has a new optional parameter containerInsights + - Interface ManagedClusterHttpProxyConfig has a new optional parameter effectiveNoProxy + - Interface ManagedClusterIngressProfileWebAppRouting has a new optional parameter nginx + - Interface ManagedClusterLoadBalancerProfile has a new optional parameter clusterServiceLoadBalancerHealthProbeMode + - Interface ManagedClusterPoolUpgradeProfile has a new optional parameter componentsByReleases + - Interface ManagedClustersDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget + - Interface ManagedClusterSecurityProfile has a new optional parameter customCATrustCertificates + - Interface ManagedClusterSecurityProfile has a new optional parameter imageIntegrity + - Interface ManagedClusterSecurityProfile has a new optional parameter nodeRestriction + - Interface ManagedClusterStorageProfileDiskCSIDriver has a new optional parameter version + - Interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler has a new optional parameter addonAutoscaling + - Added Enum KnownAddonAutoscaling + - Added Enum KnownAgentPoolSSHAccess + - Added Enum KnownArtifactSource + - Added Enum KnownClusterServiceLoadBalancerHealthProbeMode + - Added Enum KnownDriverType + - Added Enum KnownGuardrailsSupport + - Added Enum KnownIpvsScheduler + - Added Enum KnownLevel + - Added Enum KnownMode + - Added Enum KnownNginxIngressControllerType + - Added Enum KnownNodeProvisioningMode + - Added Enum KnownOperator + - Added Enum KnownPodIPAllocationMode + - Added Enum KnownPodLinkLocalAccess + - Added Enum KnownSafeguardsSupport + - Added Enum KnownSeccompDefault + - Added Enum KnownUndrainableNodeBehavior + - Enum KnownAgentPoolMode has a new value Gateway + - Enum KnownAgentPoolType has a new value VirtualMachines + - Enum KnownManagedClusterSKUName has a new value Automatic + - Enum KnownOssku has a new value Mariner + - Enum KnownOssku has a new value WindowsAnnual + - Enum KnownOutboundType has a new value None + - Enum KnownPublicNetworkAccess has a new value SecuredByPerimeter + - Enum KnownSnapshotType has a new value ManagedCluster + - Enum KnownWorkloadRuntime has a new value KataMshvVmIsolation + + ## 21.3.0 (2024-11-15) ### Features Added diff --git a/sdk/containerservice/arm-containerservice/README.md b/sdk/containerservice/arm-containerservice/README.md index a816851c0fbd..edbb61693641 100644 --- a/sdk/containerservice/arm-containerservice/README.md +++ b/sdk/containerservice/arm-containerservice/README.md @@ -6,7 +6,7 @@ The Container Service Client. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-containerservice) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-containerservice) | +[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure ContainerService** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/containerservice/arm-containerservice/_meta.json b/sdk/containerservice/arm-containerservice/_meta.json index d964aa73bc82..b76cef0aace5 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "ff7b8e12e78b352561e2e470dd045be310a313fa", + "commit": "2bde125befabb21807a2021765901f20e3e74ec8", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.28 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.29 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.15", - "use": "@autorest/typescript@6.0.28" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@6.0.29" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/assets.json b/sdk/containerservice/arm-containerservice/assets.json index 18e1bc159b10..7ad5217c7fef 100644 --- a/sdk/containerservice/arm-containerservice/assets.json +++ b/sdk/containerservice/arm-containerservice/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/containerservice/arm-containerservice", - "Tag": "js/containerservice/arm-containerservice_1cb77746c8" + "Tag": "js/containerservice/arm-containerservice_4572e680dc" } diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 92d5978bebdc..b1cce49be8e3 100644 --- a/sdk/containerservice/arm-containerservice/package.json +++ b/sdk/containerservice/arm-containerservice/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerServiceClient.", - "version": "21.3.1", + "version": "21.4.0-beta.1", "engines": { "node": ">=18.0.0" }, diff --git a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md index 1e371223706d..c49621baad96 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -16,6 +16,9 @@ export interface AbsoluteMonthlySchedule { intervalMonths: number; } +// @public +export type AddonAutoscaling = string; + // @public export interface AdvancedNetworking { enabled?: boolean; @@ -35,28 +38,34 @@ export interface AdvancedNetworkingSecurity { // @public export interface AgentPool extends SubResource { + artifactStreamingProfile?: AgentPoolArtifactStreamingProfile; availabilityZones?: string[]; capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; enableAutoScaling?: boolean; + enableCustomCATrust?: boolean; enableEncryptionAtHost?: boolean; enableFips?: boolean; enableNodePublicIP?: boolean; enableUltraSSD?: boolean; readonly eTag?: string; + gatewayProfile?: AgentPoolGatewayProfile; gpuInstanceProfile?: GPUInstanceProfile; + gpuProfile?: AgentPoolGPUProfile; hostGroupID?: string; kubeletConfig?: KubeletConfig; kubeletDiskType?: KubeletDiskType; linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; + messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; networkProfile?: AgentPoolNetworkProfile; readonly nodeImageVersion?: string; + nodeInitializationTaints?: string[]; nodeLabels?: { [propertyName: string]: string; }; @@ -67,6 +76,7 @@ export interface AgentPool extends SubResource { osDiskType?: OSDiskType; osSKU?: Ossku; osType?: OSType; + podIPAllocationMode?: PodIPAllocationMode; podSubnetID?: string; powerState?: PowerState; readonly provisioningState?: string; @@ -81,12 +91,19 @@ export interface AgentPool extends SubResource { }; typePropertiesType?: AgentPoolType; upgradeSettings?: AgentPoolUpgradeSettings; + virtualMachineNodesStatus?: VirtualMachineNodes[]; + virtualMachinesProfile?: VirtualMachinesProfile; vmSize?: string; vnetSubnetID?: string; windowsProfile?: AgentPoolWindowsProfile; workloadRuntime?: WorkloadRuntime; } +// @public (undocumented) +export interface AgentPoolArtifactStreamingProfile { + enabled?: boolean; +} + // @public export interface AgentPoolAvailableVersions { agentPoolVersions?: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]; @@ -107,6 +124,17 @@ export interface AgentPoolDeleteMachinesParameter { machineNames: string[]; } +// @public +export interface AgentPoolGatewayProfile { + publicIPPrefixSize?: number; +} + +// @public (undocumented) +export interface AgentPoolGPUProfile { + driverType?: DriverType; + installGPUDriver?: boolean; +} + // @public export interface AgentPoolListResult { readonly nextLink?: string; @@ -201,6 +229,7 @@ export type AgentPoolsDeleteResponse = AgentPoolsDeleteHeaders; export interface AgentPoolSecurityProfile { enableSecureBoot?: boolean; enableVtpm?: boolean; + sshAccess?: AgentPoolSSHAccess; } // @public @@ -238,6 +267,9 @@ export interface AgentPoolsListOptionalParams extends coreClient.OperationOption // @public export type AgentPoolsListResponse = AgentPoolListResult; +// @public +export type AgentPoolSSHAccess = string; + // @public export interface AgentPoolsUpgradeNodeImageVersionHeaders { azureAsyncOperation?: string; @@ -254,6 +286,7 @@ export type AgentPoolType = string; // @public export interface AgentPoolUpgradeProfile { + componentsByReleases?: ComponentsByRelease[]; readonly id?: string; kubernetesVersion: string; latestNodeImageVersion?: string; @@ -273,7 +306,9 @@ export interface AgentPoolUpgradeProfilePropertiesUpgradesItem { export interface AgentPoolUpgradeSettings { drainTimeoutInMinutes?: number; maxSurge?: string; + maxUnavailable?: string; nodeSoakDurationInMinutes?: number; + undrainableNodeBehavior?: UndrainableNodeBehavior; } // @public @@ -281,6 +316,16 @@ export interface AgentPoolWindowsProfile { disableOutboundNat?: boolean; } +// @public +export type ArtifactSource = string; + +// @public +export interface AutoScaleProfile { + maxCount?: number; + minCount?: number; + sizes?: string[]; +} + // @public export interface AzureKeyVaultKms { enabled?: boolean; @@ -305,6 +350,9 @@ export interface CloudErrorBody { target?: string; } +// @public +export type ClusterServiceLoadBalancerHealthProbeMode = string; + // @public export interface ClusterUpgradeSettings { overrideSettings?: UpgradeOverrideSettings; @@ -319,6 +367,19 @@ export interface CompatibleVersions { versions?: string[]; } +// @public (undocumented) +export interface Component { + hasBreakingChanges?: boolean; + name?: string; + version?: string; +} + +// @public +export interface ComponentsByRelease { + components?: Component[]; + kubernetesVersion?: string; +} + // @public export type ConnectionStatus = string; @@ -332,14 +393,20 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + loadBalancers: LoadBalancers; + // (undocumented) machines: Machines; // (undocumented) maintenanceConfigurations: MaintenanceConfigurations; // (undocumented) managedClusters: ManagedClusters; // (undocumented) + managedClusterSnapshots: ManagedClusterSnapshots; + // (undocumented) operations: Operations; // (undocumented) + operationStatusResultOperations: OperationStatusResultOperations; + // (undocumented) privateEndpointConnections: PrivateEndpointConnections; // (undocumented) privateLinkResources: PrivateLinkResources; @@ -373,6 +440,7 @@ export interface ContainerServiceNetworkProfile { advancedNetworking?: AdvancedNetworking; dnsServiceIP?: string; ipFamilies?: IpFamily[]; + kubeProxyConfig?: ContainerServiceNetworkProfileKubeProxyConfig; loadBalancerProfile?: ManagedClusterLoadBalancerProfile; loadBalancerSku?: LoadBalancerSku; natGatewayProfile?: ManagedClusterNATGatewayProfile; @@ -384,8 +452,25 @@ export interface ContainerServiceNetworkProfile { outboundType?: OutboundType; podCidr?: string; podCidrs?: string[]; + podLinkLocalAccess?: PodLinkLocalAccess; serviceCidr?: string; serviceCidrs?: string[]; + staticEgressGatewayProfile?: ManagedClusterStaticEgressGatewayProfile; +} + +// @public +export interface ContainerServiceNetworkProfileKubeProxyConfig { + enabled?: boolean; + ipvsConfig?: ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; + mode?: Mode; +} + +// @public +export interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig { + scheduler?: IpvsScheduler; + tcpFinTimeoutSeconds?: number; + tcpTimeoutSeconds?: number; + udpTimeoutSeconds?: number; } // @public @@ -436,6 +521,9 @@ export interface DelegatedResource { tenantId?: string; } +// @public +export type DriverType = string; + // @public export interface EndpointDependency { domainName?: string; @@ -491,6 +579,26 @@ export function getContinuationToken(page: unknown): string | undefined; // @public export type GPUInstanceProfile = string; +// @public +export interface GuardrailsAvailableVersion extends Resource { + properties: GuardrailsAvailableVersionsProperties; +} + +// @public +export interface GuardrailsAvailableVersionsList { + readonly nextLink?: string; + value?: GuardrailsAvailableVersion[]; +} + +// @public +export interface GuardrailsAvailableVersionsProperties { + readonly isDefaultVersion?: boolean; + readonly support?: GuardrailsSupport; +} + +// @public +export type GuardrailsSupport = string; + // @public export type IpFamily = string; @@ -500,6 +608,9 @@ export interface IPTag { tag?: string; } +// @public +export type IpvsScheduler = string; + // @public export interface IstioCertificateAuthority { plugin?: IstioPluginCertificateAuthority; @@ -544,24 +655,50 @@ export interface IstioServiceMesh { // @public export type KeyVaultNetworkAccessTypes = string; +// @public +export enum KnownAddonAutoscaling { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownAgentPoolMode { + Gateway = "Gateway", System = "System", User = "User" } +// @public +export enum KnownAgentPoolSSHAccess { + Disabled = "Disabled", + LocalUser = "LocalUser" +} + // @public export enum KnownAgentPoolType { AvailabilitySet = "AvailabilitySet", + VirtualMachines = "VirtualMachines", VirtualMachineScaleSets = "VirtualMachineScaleSets" } +// @public +export enum KnownArtifactSource { + Cache = "Cache", + Direct = "Direct" +} + // @public export enum KnownBackendPoolType { NodeIP = "NodeIP", NodeIPConfiguration = "NodeIPConfiguration" } +// @public +export enum KnownClusterServiceLoadBalancerHealthProbeMode { + ServiceNodePort = "ServiceNodePort", + Shared = "Shared" +} + // @public export enum KnownCode { Running = "Running", @@ -584,6 +721,12 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDriverType { + Cuda = "CUDA", + Grid = "GRID" +} + // @public export enum KnownExpander { LeastWaste = "least-waste", @@ -612,12 +755,24 @@ export enum KnownGPUInstanceProfile { MIG7G = "MIG7g" } +// @public +export enum KnownGuardrailsSupport { + Preview = "Preview", + Stable = "Stable" +} + // @public export enum KnownIpFamily { IPv4 = "IPv4", IPv6 = "IPv6" } +// @public +export enum KnownIpvsScheduler { + LeastConnection = "LeastConnection", + RoundRobin = "RoundRobin" +} + // @public export enum KnownIstioIngressGatewayMode { External = "External", @@ -642,6 +797,13 @@ export enum KnownKubernetesSupportPlan { KubernetesOfficial = "KubernetesOfficial" } +// @public +export enum KnownLevel { + Enforcement = "Enforcement", + Off = "Off", + Warning = "Warning" +} + // @public export enum KnownLicenseType { None = "None", @@ -666,6 +828,7 @@ export enum KnownManagedClusterPodIdentityProvisioningState { // @public export enum KnownManagedClusterSKUName { + Automatic = "Automatic", Base = "Base" } @@ -676,6 +839,12 @@ export enum KnownManagedClusterSKUTier { Standard = "Standard" } +// @public +export enum KnownMode { + Iptables = "IPTABLES", + Ipvs = "IPVS" +} + // @public export enum KnownNetworkDataplane { Azure = "azure", @@ -708,6 +877,14 @@ export enum KnownNetworkPolicy { None = "none" } +// @public +export enum KnownNginxIngressControllerType { + AnnotationControlled = "AnnotationControlled", + External = "External", + Internal = "Internal", + None = "None" +} + // @public export enum KnownNodeOSUpgradeChannel { NodeImage = "NodeImage", @@ -716,6 +893,20 @@ export enum KnownNodeOSUpgradeChannel { Unmanaged = "Unmanaged" } +// @public +export enum KnownNodeProvisioningMode { + Auto = "Auto", + Manual = "Manual" +} + +// @public +export enum KnownOperator { + DoesNotExist = "DoesNotExist", + Exists = "Exists", + In = "In", + NotIn = "NotIn" +} + // @public export enum KnownOSDiskType { Ephemeral = "Ephemeral", @@ -726,9 +917,11 @@ export enum KnownOSDiskType { export enum KnownOssku { AzureLinux = "AzureLinux", CBLMariner = "CBLMariner", + Mariner = "Mariner", Ubuntu = "Ubuntu", Windows2019 = "Windows2019", - Windows2022 = "Windows2022" + Windows2022 = "Windows2022", + WindowsAnnual = "WindowsAnnual" } // @public @@ -741,10 +934,23 @@ export enum KnownOSType { export enum KnownOutboundType { LoadBalancer = "loadBalancer", ManagedNATGateway = "managedNATGateway", + None = "none", UserAssignedNATGateway = "userAssignedNATGateway", UserDefinedRouting = "userDefinedRouting" } +// @public +export enum KnownPodIPAllocationMode { + DynamicIndividual = "DynamicIndividual", + StaticBlock = "StaticBlock" +} + +// @public +export enum KnownPodLinkLocalAccess { + Imds = "IMDS", + None = "None" +} + // @public export enum KnownPrivateEndpointConnectionProvisioningState { Canceled = "Canceled", @@ -763,7 +969,8 @@ export enum KnownProtocol { // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", - Enabled = "Enabled" + Enabled = "Enabled", + SecuredByPerimeter = "SecuredByPerimeter" } // @public @@ -772,6 +979,12 @@ export enum KnownRestrictionLevel { Unrestricted = "Unrestricted" } +// @public +export enum KnownSafeguardsSupport { + Preview = "Preview", + Stable = "Stable" +} + // @public export enum KnownScaleDownMode { Deallocate = "Deallocate", @@ -790,6 +1003,12 @@ export enum KnownScaleSetPriority { Spot = "Spot" } +// @public +export enum KnownSeccompDefault { + RuntimeDefault = "RuntimeDefault", + Unconfined = "Unconfined" +} + // @public export enum KnownServiceMeshMode { Disabled = "Disabled", @@ -798,6 +1017,7 @@ export enum KnownServiceMeshMode { // @public export enum KnownSnapshotType { + ManagedCluster = "ManagedCluster", NodePool = "NodePool" } @@ -819,6 +1039,12 @@ export enum KnownType { Third = "Third" } +// @public +export enum KnownUndrainableNodeBehavior { + Cordon = "Cordon", + Schedule = "Schedule" +} + // @public export enum KnownUpgradeChannel { NodeImage = "node-image", @@ -841,6 +1067,7 @@ export enum KnownWeekDay { // @public export enum KnownWorkloadRuntime { + KataMshvVmIsolation = "KataMshvVmIsolation", OCIContainer = "OCIContainer", WasmWasi = "WasmWasi" } @@ -857,6 +1084,7 @@ export interface KubeletConfig { imageGcHighThreshold?: number; imageGcLowThreshold?: number; podMaxPids?: number; + seccompDefault?: SeccompDefault; topologyManagerPolicy?: string; } @@ -893,6 +1121,22 @@ export interface KubernetesVersionListResult { values?: KubernetesVersion[]; } +// @public +export interface LabelSelector { + matchExpressions?: LabelSelectorRequirement[]; + matchLabels?: string[]; +} + +// @public +export interface LabelSelectorRequirement { + key?: string; + operator?: Operator; + values?: string[]; +} + +// @public +export type Level = string; + // @public export type LicenseType = string; @@ -904,9 +1148,83 @@ export interface LinuxOSConfig { transparentHugePageEnabled?: string; } +// @public +export interface LoadBalancer extends ProxyResource { + allowServicePlacement?: boolean; + namePropertiesName?: string; + nodeSelector?: LabelSelector; + primaryAgentPoolName?: string; + readonly provisioningState?: string; + serviceLabelSelector?: LabelSelector; + serviceNamespaceSelector?: LabelSelector; +} + +// @public +export interface LoadBalancerListResult { + readonly nextLink?: string; + value?: LoadBalancer[]; +} + +// @public +export interface LoadBalancers { + beginDelete(resourceGroupName: string, resourceName: string, loadBalancerName: string, options?: LoadBalancersDeleteOptionalParams): Promise, LoadBalancersDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, loadBalancerName: string, options?: LoadBalancersDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, resourceName: string, loadBalancerName: string, options?: LoadBalancersCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, loadBalancerName: string, options?: LoadBalancersGetOptionalParams): Promise; + listByManagedCluster(resourceGroupName: string, resourceName: string, options?: LoadBalancersListByManagedClusterOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface LoadBalancersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + allowServicePlacement?: boolean; + name?: string; + nodeSelector?: LabelSelector; + primaryAgentPoolName?: string; + serviceLabelSelector?: LabelSelector; + serviceNamespaceSelector?: LabelSelector; +} + +// @public +export type LoadBalancersCreateOrUpdateResponse = LoadBalancer; + +// @public +export interface LoadBalancersDeleteHeaders { + location?: string; +} + +// @public +export interface LoadBalancersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LoadBalancersDeleteResponse = LoadBalancersDeleteHeaders; + +// @public +export interface LoadBalancersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LoadBalancersGetResponse = LoadBalancer; + // @public export type LoadBalancerSku = string; +// @public +export interface LoadBalancersListByManagedClusterNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LoadBalancersListByManagedClusterNextResponse = LoadBalancerListResult; + +// @public +export interface LoadBalancersListByManagedClusterOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LoadBalancersListByManagedClusterResponse = LoadBalancerListResult; + // @public export interface Machine extends SubResource { readonly properties?: MachineProperties; @@ -1033,15 +1351,19 @@ export interface ManagedCluster extends TrackedResource { [propertyName: string]: ManagedClusterAddonProfile; }; agentPoolProfiles?: ManagedClusterAgentPoolProfile[]; + aiToolchainOperatorProfile?: ManagedClusterAIToolchainOperatorProfile; apiServerAccessProfile?: ManagedClusterAPIServerAccessProfile; autoScalerProfile?: ManagedClusterPropertiesAutoScalerProfile; autoUpgradeProfile?: ManagedClusterAutoUpgradeProfile; azureMonitorProfile?: ManagedClusterAzureMonitorProfile; readonly azurePortalFqdn?: string; + bootstrapProfile?: ManagedClusterBootstrapProfile; + creationData?: CreationData; readonly currentKubernetesVersion?: string; disableLocalAccounts?: boolean; diskEncryptionSetID?: string; dnsPrefix?: string; + enableNamespaceResources?: boolean; enablePodSecurityPolicy?: boolean; enableRbac?: boolean; readonly eTag?: string; @@ -1054,11 +1376,13 @@ export interface ManagedCluster extends TrackedResource { [propertyName: string]: UserAssignedIdentity; }; ingressProfile?: ManagedClusterIngressProfile; + kind?: string; kubernetesVersion?: string; linuxProfile?: ContainerServiceLinuxProfile; readonly maxAgentPools?: number; metricsProfile?: ManagedClusterMetricsProfile; networkProfile?: ContainerServiceNetworkProfile; + nodeProvisioningProfile?: ManagedClusterNodeProvisioningProfile; nodeResourceGroup?: string; nodeResourceGroupProfile?: ManagedClusterNodeResourceGroupProfile; oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; @@ -1069,6 +1393,7 @@ export interface ManagedCluster extends TrackedResource { readonly provisioningState?: string; publicNetworkAccess?: PublicNetworkAccess; readonly resourceUID?: string; + safeguardsProfile?: SafeguardsProfile; securityProfile?: ManagedClusterSecurityProfile; serviceMeshProfile?: ServiceMeshProfile; servicePrincipalProfile?: ManagedClusterServicePrincipalProfile; @@ -1116,28 +1441,34 @@ export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolP // @public export interface ManagedClusterAgentPoolProfileProperties { + artifactStreamingProfile?: AgentPoolArtifactStreamingProfile; availabilityZones?: string[]; capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; enableAutoScaling?: boolean; + enableCustomCATrust?: boolean; enableEncryptionAtHost?: boolean; enableFips?: boolean; enableNodePublicIP?: boolean; enableUltraSSD?: boolean; readonly eTag?: string; + gatewayProfile?: AgentPoolGatewayProfile; gpuInstanceProfile?: GPUInstanceProfile; + gpuProfile?: AgentPoolGPUProfile; hostGroupID?: string; kubeletConfig?: KubeletConfig; kubeletDiskType?: KubeletDiskType; linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; + messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; networkProfile?: AgentPoolNetworkProfile; readonly nodeImageVersion?: string; + nodeInitializationTaints?: string[]; nodeLabels?: { [propertyName: string]: string; }; @@ -1148,6 +1479,7 @@ export interface ManagedClusterAgentPoolProfileProperties { osDiskType?: OSDiskType; osSKU?: Ossku; osType?: OSType; + podIPAllocationMode?: PodIPAllocationMode; podSubnetID?: string; powerState?: PowerState; readonly provisioningState?: string; @@ -1162,19 +1494,28 @@ export interface ManagedClusterAgentPoolProfileProperties { }; type?: AgentPoolType; upgradeSettings?: AgentPoolUpgradeSettings; + virtualMachineNodesStatus?: VirtualMachineNodes[]; + virtualMachinesProfile?: VirtualMachinesProfile; vmSize?: string; vnetSubnetID?: string; windowsProfile?: AgentPoolWindowsProfile; workloadRuntime?: WorkloadRuntime; } +// @public +export interface ManagedClusterAIToolchainOperatorProfile { + enabled?: boolean; +} + // @public export interface ManagedClusterAPIServerAccessProfile { authorizedIPRanges?: string[]; disableRunCommand?: boolean; enablePrivateCluster?: boolean; enablePrivateClusterPublicFqdn?: boolean; + enableVnetIntegration?: boolean; privateDNSZone?: string; + subnetId?: string; } // @public @@ -1185,9 +1526,44 @@ export interface ManagedClusterAutoUpgradeProfile { // @public export interface ManagedClusterAzureMonitorProfile { + appMonitoring?: ManagedClusterAzureMonitorProfileAppMonitoring; + containerInsights?: ManagedClusterAzureMonitorProfileContainerInsights; metrics?: ManagedClusterAzureMonitorProfileMetrics; } +// @public +export interface ManagedClusterAzureMonitorProfileAppMonitoring { + autoInstrumentation?: ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation; + openTelemetryLogs?: ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs; + openTelemetryMetrics?: ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics; +} + +// @public +export interface ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation { + enabled?: boolean; +} + +// @public +export interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs { + enabled?: boolean; + port?: number; +} + +// @public +export interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics { + enabled?: boolean; + port?: number; +} + +// @public +export interface ManagedClusterAzureMonitorProfileContainerInsights { + disableCustomMetrics?: boolean; + disablePrometheusMetricsScraping?: boolean; + enabled?: boolean; + logAnalyticsWorkspaceResourceId?: string; + syslogPort?: number; +} + // @public export interface ManagedClusterAzureMonitorProfileKubeStateMetrics { metricAnnotationsAllowList?: string; @@ -1200,6 +1576,12 @@ export interface ManagedClusterAzureMonitorProfileMetrics { kubeStateMetrics?: ManagedClusterAzureMonitorProfileKubeStateMetrics; } +// @public +export interface ManagedClusterBootstrapProfile { + artifactSource?: ArtifactSource; + containerRegistryId?: string; +} + // @public export interface ManagedClusterCostAnalysis { enabled?: boolean; @@ -1207,6 +1589,7 @@ export interface ManagedClusterCostAnalysis { // @public export interface ManagedClusterHttpProxyConfig { + readonly effectiveNoProxy?: string[]; httpProxy?: string; httpsProxy?: string; noProxy?: string[]; @@ -1231,11 +1614,17 @@ export interface ManagedClusterIngressProfile { webAppRouting?: ManagedClusterIngressProfileWebAppRouting; } +// @public (undocumented) +export interface ManagedClusterIngressProfileNginx { + defaultIngressControllerType?: NginxIngressControllerType; +} + // @public export interface ManagedClusterIngressProfileWebAppRouting { dnsZoneResourceIds?: string[]; enabled?: boolean; readonly identity?: UserAssignedIdentity; + nginx?: ManagedClusterIngressProfileNginx; } // @public @@ -1248,6 +1637,7 @@ export interface ManagedClusterListResult { export interface ManagedClusterLoadBalancerProfile { allocatedOutboundPorts?: number; backendPoolType?: BackendPoolType; + clusterServiceLoadBalancerHealthProbeMode?: ClusterServiceLoadBalancerHealthProbeMode; effectiveOutboundIPs?: ResourceReference[]; enableMultipleStandardLoadBalancers?: boolean; idleTimeoutInMinutes?: number; @@ -1289,6 +1679,11 @@ export interface ManagedClusterNATGatewayProfile { managedOutboundIPProfile?: ManagedClusterManagedOutboundIPProfile; } +// @public (undocumented) +export interface ManagedClusterNodeProvisioningProfile { + mode?: NodeProvisioningMode; +} + // @public export interface ManagedClusterNodeResourceGroupProfile { restrictionLevel?: RestrictionLevel; @@ -1350,6 +1745,7 @@ export type ManagedClusterPodIdentityProvisioningState = string; // @public export interface ManagedClusterPoolUpgradeProfile { + componentsByReleases?: ComponentsByRelease[]; kubernetesVersion: string; name?: string; osType: OSType; @@ -1386,6 +1782,14 @@ export interface ManagedClusterPropertiesAutoScalerProfile { skipNodesWithSystemPods?: string; } +// @public +export interface ManagedClusterPropertiesForSnapshot { + enableRbac?: boolean; + kubernetesVersion?: string; + readonly networkProfile?: NetworkProfileForSnapshot; + sku?: ManagedClusterSKU; +} + // @public export interface ManagedClusters { beginAbortLatestOperation(resourceGroupName: string, resourceName: string, options?: ManagedClustersAbortLatestOperationOptionalParams): Promise, ManagedClustersAbortLatestOperationResponse>>; @@ -1394,6 +1798,8 @@ export interface ManagedClusters { beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, resourceName: string, options?: ManagedClustersDeleteOptionalParams): Promise, ManagedClustersDeleteResponse>>; beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: ManagedClustersDeleteOptionalParams): Promise; + beginRebalanceLoadBalancers(resourceGroupName: string, resourceName: string, parameters: RebalanceLoadBalancersRequestBody, options?: ManagedClustersRebalanceLoadBalancersOptionalParams): Promise, ManagedClustersRebalanceLoadBalancersResponse>>; + beginRebalanceLoadBalancersAndWait(resourceGroupName: string, resourceName: string, parameters: RebalanceLoadBalancersRequestBody, options?: ManagedClustersRebalanceLoadBalancersOptionalParams): Promise; beginResetAADProfile(resourceGroupName: string, resourceName: string, parameters: ManagedClusterAADProfile, options?: ManagedClustersResetAADProfileOptionalParams): Promise, void>>; beginResetAADProfileAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedClusterAADProfile, options?: ManagedClustersResetAADProfileOptionalParams): Promise; beginResetServicePrincipalProfile(resourceGroupName: string, resourceName: string, parameters: ManagedClusterServicePrincipalProfile, options?: ManagedClustersResetServicePrincipalProfileOptionalParams): Promise, void>>; @@ -1413,18 +1819,22 @@ export interface ManagedClusters { get(resourceGroupName: string, resourceName: string, options?: ManagedClustersGetOptionalParams): Promise; getAccessProfile(resourceGroupName: string, resourceName: string, roleName: string, options?: ManagedClustersGetAccessProfileOptionalParams): Promise; getCommandResult(resourceGroupName: string, resourceName: string, commandId: string, options?: ManagedClustersGetCommandResultOptionalParams): Promise; + getGuardrailsVersions(location: string, version: string, options?: ManagedClustersGetGuardrailsVersionsOptionalParams): Promise; getMeshRevisionProfile(location: string, mode: string, options?: ManagedClustersGetMeshRevisionProfileOptionalParams): Promise; getMeshUpgradeProfile(resourceGroupName: string, resourceName: string, mode: string, options?: ManagedClustersGetMeshUpgradeProfileOptionalParams): Promise; + getSafeguardsVersions(location: string, version: string, options?: ManagedClustersGetSafeguardsVersionsOptionalParams): Promise; getUpgradeProfile(resourceGroupName: string, resourceName: string, options?: ManagedClustersGetUpgradeProfileOptionalParams): Promise; list(options?: ManagedClustersListOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: ManagedClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listClusterAdminCredentials(resourceGroupName: string, resourceName: string, options?: ManagedClustersListClusterAdminCredentialsOptionalParams): Promise; listClusterMonitoringUserCredentials(resourceGroupName: string, resourceName: string, options?: ManagedClustersListClusterMonitoringUserCredentialsOptionalParams): Promise; listClusterUserCredentials(resourceGroupName: string, resourceName: string, options?: ManagedClustersListClusterUserCredentialsOptionalParams): Promise; + listGuardrailsVersions(location: string, options?: ManagedClustersListGuardrailsVersionsOptionalParams): PagedAsyncIterableIterator; listKubernetesVersions(location: string, options?: ManagedClustersListKubernetesVersionsOptionalParams): Promise; listMeshRevisionProfiles(location: string, options?: ManagedClustersListMeshRevisionProfilesOptionalParams): PagedAsyncIterableIterator; listMeshUpgradeProfiles(resourceGroupName: string, resourceName: string, options?: ManagedClustersListMeshUpgradeProfilesOptionalParams): PagedAsyncIterableIterator; listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, resourceName: string, options?: ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator; + listSafeguardsVersions(location: string, options?: ManagedClustersListSafeguardsVersionsOptionalParams): PagedAsyncIterableIterator; } // @public @@ -1461,6 +1871,7 @@ export interface ManagedClustersDeleteHeaders { // @public export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { ifMatch?: string; + ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -1471,8 +1882,11 @@ export type ManagedClustersDeleteResponse = ManagedClustersDeleteHeaders; // @public export interface ManagedClusterSecurityProfile { azureKeyVaultKms?: AzureKeyVaultKms; + customCATrustCertificates?: Uint8Array[]; defender?: ManagedClusterSecurityProfileDefender; imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + imageIntegrity?: ManagedClusterSecurityProfileImageIntegrity; + nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; } @@ -1493,6 +1907,16 @@ export interface ManagedClusterSecurityProfileImageCleaner { intervalHours?: number; } +// @public +export interface ManagedClusterSecurityProfileImageIntegrity { + enabled?: boolean; +} + +// @public +export interface ManagedClusterSecurityProfileNodeRestriction { + enabled?: boolean; +} + // @public export interface ManagedClusterSecurityProfileWorkloadIdentity { enabled?: boolean; @@ -1523,6 +1947,13 @@ export interface ManagedClustersGetCommandResultOptionalParams extends coreClien // @public export type ManagedClustersGetCommandResultResponse = RunCommandResult; +// @public +export interface ManagedClustersGetGuardrailsVersionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersGetGuardrailsVersionsResponse = GuardrailsAvailableVersion; + // @public export interface ManagedClustersGetMeshRevisionProfileOptionalParams extends coreClient.OperationOptions { } @@ -1544,6 +1975,13 @@ export interface ManagedClustersGetOptionalParams extends coreClient.OperationOp // @public export type ManagedClustersGetResponse = ManagedCluster; +// @public +export interface ManagedClustersGetSafeguardsVersionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersGetSafeguardsVersionsResponse = SafeguardsAvailableVersion; + // @public export interface ManagedClustersGetUpgradeProfileOptionalParams extends coreClient.OperationOptions { } @@ -1602,6 +2040,20 @@ export interface ManagedClustersListClusterUserCredentialsOptionalParams extends // @public export type ManagedClustersListClusterUserCredentialsResponse = CredentialResults; +// @public +export interface ManagedClustersListGuardrailsVersionsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListGuardrailsVersionsNextResponse = GuardrailsAvailableVersionsList; + +// @public +export interface ManagedClustersListGuardrailsVersionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListGuardrailsVersionsResponse = GuardrailsAvailableVersionsList; + // @public export interface ManagedClustersListKubernetesVersionsOptionalParams extends coreClient.OperationOptions { } @@ -1665,6 +2117,110 @@ export type ManagedClustersListOutboundNetworkDependenciesEndpointsResponse = Ou // @public export type ManagedClustersListResponse = ManagedClusterListResult; +// @public +export interface ManagedClustersListSafeguardsVersionsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListSafeguardsVersionsNextResponse = SafeguardsAvailableVersionsList; + +// @public +export interface ManagedClustersListSafeguardsVersionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClustersListSafeguardsVersionsResponse = SafeguardsAvailableVersionsList; + +// @public +export interface ManagedClusterSnapshot extends TrackedResource { + creationData?: CreationData; + readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; + snapshotType?: SnapshotType; +} + +// @public +export interface ManagedClusterSnapshotListResult { + readonly nextLink?: string; + value?: ManagedClusterSnapshot[]; +} + +// @public +export interface ManagedClusterSnapshots { + createOrUpdate(resourceGroupName: string, resourceName: string, parameters: ManagedClusterSnapshot, options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, options?: ManagedClusterSnapshotsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: ManagedClusterSnapshotsGetOptionalParams): Promise; + list(options?: ManagedClusterSnapshotsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + updateTags(resourceGroupName: string, resourceName: string, parameters: TagsObject, options?: ManagedClusterSnapshotsUpdateTagsOptionalParams): Promise; +} + +// @public +export interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsCreateOrUpdateResponse = ManagedClusterSnapshot; + +// @public +export interface ManagedClusterSnapshotsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ManagedClusterSnapshotsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsGetResponse = ManagedClusterSnapshot; + +// @public +export interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListByResourceGroupNextResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListByResourceGroupResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListNextResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsListResponse = ManagedClusterSnapshotListResult; + +// @public +export interface ManagedClusterSnapshotsUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedClusterSnapshotsUpdateTagsResponse = ManagedClusterSnapshot; + +// @public +export interface ManagedClustersRebalanceLoadBalancersHeaders { + location?: string; +} + +// @public +export interface ManagedClustersRebalanceLoadBalancersOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedClustersRebalanceLoadBalancersResponse = ManagedClustersRebalanceLoadBalancersHeaders; + // @public export interface ManagedClustersResetAADProfileHeaders { location?: string; @@ -1703,7 +2259,6 @@ export type ManagedClustersRotateClusterCertificatesResponse = ManagedClustersRo // @public export interface ManagedClustersRotateServiceAccountSigningKeysHeaders { - // (undocumented) location?: string; } @@ -1758,6 +2313,11 @@ export interface ManagedClustersStopOptionalParams extends coreClient.OperationO // @public export type ManagedClustersStopResponse = ManagedClustersStopHeaders; +// @public +export interface ManagedClusterStaticEgressGatewayProfile { + enabled?: boolean; +} + // @public export interface ManagedClusterStorageProfile { blobCSIDriver?: ManagedClusterStorageProfileBlobCSIDriver; @@ -1774,6 +2334,7 @@ export interface ManagedClusterStorageProfileBlobCSIDriver { // @public export interface ManagedClusterStorageProfileDiskCSIDriver { enabled?: boolean; + version?: string; } // @public @@ -1817,6 +2378,7 @@ export interface ManagedClusterWindowsProfile { // @public export interface ManagedClusterWorkloadAutoScalerProfile { keda?: ManagedClusterWorkloadAutoScalerProfileKeda; + // (undocumented) verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; } @@ -1825,8 +2387,9 @@ export interface ManagedClusterWorkloadAutoScalerProfileKeda { enabled: boolean; } -// @public +// @public (undocumented) export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + addonAutoscaling?: AddonAutoscaling; enabled: boolean; } @@ -1836,6 +2399,12 @@ export interface ManagedServiceIdentityUserAssignedIdentitiesValue { readonly principalId?: string; } +// @public +export interface ManualScaleProfile { + count?: number; + sizes?: string[]; +} + // @public export interface MeshRevision { compatibleWith?: CompatibleVersions[]; @@ -1875,6 +2444,9 @@ export interface MeshUpgradeProfileList { export interface MeshUpgradeProfileProperties extends MeshRevision { } +// @public +export type Mode = string; + // @public export type NetworkDataplane = string; @@ -1890,9 +2462,24 @@ export type NetworkPluginMode = string; // @public export type NetworkPolicy = string; +// @public +export interface NetworkProfileForSnapshot { + loadBalancerSku?: LoadBalancerSku; + networkMode?: NetworkMode; + networkPlugin?: NetworkPlugin; + networkPluginMode?: NetworkPluginMode; + networkPolicy?: NetworkPolicy; +} + +// @public +export type NginxIngressControllerType = string; + // @public export type NodeOSUpgradeChannel = string; +// @public +export type NodeProvisioningMode = string; + // @public export interface OperationListResult { readonly value?: OperationValue[]; @@ -1910,6 +2497,60 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = OperationListResult; +// @public +export interface OperationStatusResult { + endTime?: Date; + error?: ErrorDetail; + id?: string; + name?: string; + operations?: OperationStatusResult[]; + percentComplete?: number; + readonly resourceId?: string; + startTime?: Date; + status: string; +} + +// @public +export interface OperationStatusResultGetByAgentPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationStatusResultGetByAgentPoolResponse = OperationStatusResult; + +// @public +export interface OperationStatusResultGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationStatusResultGetResponse = OperationStatusResult; + +// @public +export interface OperationStatusResultList { + readonly nextLink?: string; + readonly value?: OperationStatusResult[]; +} + +// @public +export interface OperationStatusResultListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationStatusResultListNextResponse = OperationStatusResultList; + +// @public +export interface OperationStatusResultListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationStatusResultListResponse = OperationStatusResultList; + +// @public +export interface OperationStatusResultOperations { + get(resourceGroupName: string, resourceName: string, operationId: string, options?: OperationStatusResultGetOptionalParams): Promise; + getByAgentPool(resourceGroupName: string, resourceName: string, agentPoolName: string, operationId: string, options?: OperationStatusResultGetByAgentPoolOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: OperationStatusResultListOptionalParams): PagedAsyncIterableIterator; +} + // @public export interface OperationValue { readonly description?: string; @@ -1920,6 +2561,9 @@ export interface OperationValue { readonly resource?: string; } +// @public +export type Operator = string; + // @public export type OSDiskType = string; @@ -1944,6 +2588,12 @@ export interface OutboundEnvironmentEndpointCollection { // @public export type OutboundType = string; +// @public +export type PodIPAllocationMode = string; + +// @public +export type PodLinkLocalAccess = string; + // @public export interface PortRange { portEnd?: number; @@ -2058,6 +2708,11 @@ export interface ProxyResource extends Resource { // @public export type PublicNetworkAccess = string; +// @public +export interface RebalanceLoadBalancersRequestBody { + loadBalancerNames?: string[]; +} + // @public export interface RelativeMonthlySchedule { dayOfWeek: WeekDay; @@ -2114,9 +2769,43 @@ export interface RunCommandResult { readonly startedAt?: Date; } +// @public +export interface SafeguardsAvailableVersion extends Resource { + properties: SafeguardsAvailableVersionsProperties; +} + +// @public +export interface SafeguardsAvailableVersionsList { + readonly nextLink?: string; + value?: SafeguardsAvailableVersion[]; +} + +// @public +export interface SafeguardsAvailableVersionsProperties { + readonly isDefaultVersion?: boolean; + readonly support?: SafeguardsSupport; +} + +// @public +export interface SafeguardsProfile { + excludedNamespaces?: string[]; + level: Level; + readonly systemExcludedNamespaces?: string[]; + version?: string; +} + +// @public +export type SafeguardsSupport = string; + // @public export type ScaleDownMode = string; +// @public +export interface ScaleProfile { + autoscale?: AutoScaleProfile[]; + manual?: ManualScaleProfile[]; +} + // @public export type ScaleSetEvictionPolicy = string; @@ -2131,6 +2820,9 @@ export interface Schedule { weekly?: WeeklySchedule; } +// @public +export type SeccompDefault = string; + // @public export type ServiceMeshMode = string; @@ -2414,6 +3106,9 @@ export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; // @public export type Type = string; +// @public +export type UndrainableNodeBehavior = string; + // @public export type UpgradeChannel = string; @@ -2430,6 +3125,17 @@ export interface UserAssignedIdentity { resourceId?: string; } +// @public +export interface VirtualMachineNodes { + count?: number; + size?: string; +} + +// @public +export interface VirtualMachinesProfile { + scale?: ScaleProfile; +} + // @public export type WeekDay = string; diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsAbortLatestOperationSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsAbortLatestOperationSample.ts index be23fd85b9d7..d9a87909815d 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsAbortLatestOperationSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsAbortLatestOperationSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + * This sample demonstrates how to Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. * - * @summary Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsAbortOperation.json + * @summary Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsAbortOperation.json */ async function abortOperationOnAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsCreateOrUpdateSample.ts index c6426680bfb6..91e637595228 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsCreateOrUpdateSample.ts @@ -18,7 +18,40 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Snapshot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsAssociate_CRG.json + */ +async function associateAgentPoolWithCapacityReservationGroup() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + capacityReservationGroupID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1", + count: 3, + orchestratorVersion: "", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_Snapshot.json */ async function createAgentPoolUsingAnAgentPoolSnapshot() { const subscriptionId = @@ -32,7 +65,7 @@ async function createAgentPoolUsingAnAgentPoolSnapshot() { count: 3, creationData: { sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", }, enableFips: true, orchestratorVersion: "", @@ -54,9 +87,9 @@ async function createAgentPoolUsingAnAgentPoolSnapshot() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_CRG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_EnableCustomCATrust.json */ -async function createAgentPoolWithCapacityReservationGroup() { +async function createAgentPoolWithCustomCaTrustEnabled() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -65,9 +98,8 @@ async function createAgentPoolWithCapacityReservationGroup() { const resourceName = "clustername1"; const agentPoolName = "agentpool1"; const parameters: AgentPool = { - capacityReservationGroupID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1", count: 3, + enableCustomCATrust: true, orchestratorVersion: "", osType: "Linux", vmSize: "Standard_DS2_v2", @@ -87,7 +119,7 @@ async function createAgentPoolWithCapacityReservationGroup() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_DedicatedHostGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json */ async function createAgentPoolWithDedicatedHostGroup() { const subscriptionId = @@ -120,7 +152,7 @@ async function createAgentPoolWithDedicatedHostGroup() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_EnableEncryptionAtHost.json */ async function createAgentPoolWithEncryptionAtHostEnabled() { const subscriptionId = @@ -152,7 +184,7 @@ async function createAgentPoolWithEncryptionAtHostEnabled() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Ephemeral.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_Ephemeral.json */ async function createAgentPoolWithEphemeralOSDisk() { const subscriptionId = @@ -185,7 +217,7 @@ async function createAgentPoolWithEphemeralOSDisk() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_EnableFIPS.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_EnableFIPS.json */ async function createAgentPoolWithFipsEnabledOS() { const subscriptionId = @@ -217,7 +249,7 @@ async function createAgentPoolWithFipsEnabledOS() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_GPUMIG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_GPUMIG.json */ async function createAgentPoolWithGpumig() { const subscriptionId = @@ -270,7 +302,7 @@ async function createAgentPoolWithGpumig() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_WasmWasi.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_WasmWasi.json */ async function createAgentPoolWithKrustletAndTheWasiRuntime() { const subscriptionId = @@ -304,7 +336,7 @@ async function createAgentPoolWithKrustletAndTheWasiRuntime() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_CustomNodeConfig.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json */ async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() { const subscriptionId = @@ -356,7 +388,41 @@ async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_OSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_MessageOfTheDay.json + */ +async function createAgentPoolWithMessageOfTheDay() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + count: 3, + messageOfTheDay: "Zm9vCg==", + mode: "User", + orchestratorVersion: "", + osDiskSizeGB: 64, + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_OSSKU.json */ async function createAgentPoolWithOssku() { const subscriptionId = @@ -409,7 +475,7 @@ async function createAgentPoolWithOssku() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_PPG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_PPG.json */ async function createAgentPoolWithPpg() { const subscriptionId = @@ -442,7 +508,7 @@ async function createAgentPoolWithPpg() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_EnableUltraSSD.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_EnableUltraSSD.json */ async function createAgentPoolWithUltraSsdEnabled() { const subscriptionId = @@ -474,7 +540,89 @@ async function createAgentPoolWithUltraSsdEnabled() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_WindowsOSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines.json + */ +async function createAgentPoolWithVirtualMachinesPoolType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + typePropertiesType: "VirtualMachines", + nodeLabels: { key1: "val1" }, + nodeTaints: ["Key1=Value1:NoSchedule"], + orchestratorVersion: "1.9.6", + osType: "Linux", + tags: { name1: "val1" }, + virtualMachinesProfile: { + scale: { + manual: [{ count: 5, sizes: ["Standard_D2_v2", "Standard_D2_v3"] }], + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json + */ +async function createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + typePropertiesType: "VirtualMachines", + nodeLabels: { key1: "val1" }, + nodeTaints: ["Key1=Value1:NoSchedule"], + orchestratorVersion: "1.29.0", + osType: "Linux", + tags: { name1: "val1" }, + virtualMachinesProfile: { + scale: { + autoscale: [ + { + maxCount: 5, + minCount: 1, + sizes: ["Standard_D2_v2", "Standard_D2_v3"], + }, + ], + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_WindowsOSSKU.json */ async function createAgentPoolWithWindowsOssku() { const subscriptionId = @@ -506,7 +654,7 @@ async function createAgentPoolWithWindowsOssku() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Spot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_Spot.json */ async function createSpotAgentPool() { const subscriptionId = @@ -542,7 +690,7 @@ async function createSpotAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json */ async function createWindowsAgentPoolWithDisablingOutboundNat() { const subscriptionId = @@ -575,7 +723,7 @@ async function createWindowsAgentPoolWithDisablingOutboundNat() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_Update.json */ async function createOrUpdateAgentPool() { const subscriptionId = @@ -612,7 +760,7 @@ async function createOrUpdateAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPools_Start.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPools_Start.json */ async function startAgentPool() { const subscriptionId = @@ -638,7 +786,7 @@ async function startAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPools_Stop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPools_Stop.json */ async function stopAgentPool() { const subscriptionId = @@ -664,7 +812,7 @@ async function stopAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPools_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPools_Update.json */ async function updateAgentPool() { const subscriptionId = @@ -698,8 +846,9 @@ async function updateAgentPool() { } async function main() { + associateAgentPoolWithCapacityReservationGroup(); createAgentPoolUsingAnAgentPoolSnapshot(); - createAgentPoolWithCapacityReservationGroup(); + createAgentPoolWithCustomCaTrustEnabled(); createAgentPoolWithDedicatedHostGroup(); createAgentPoolWithEncryptionAtHostEnabled(); createAgentPoolWithEphemeralOSDisk(); @@ -707,9 +856,12 @@ async function main() { createAgentPoolWithGpumig(); createAgentPoolWithKrustletAndTheWasiRuntime(); createAgentPoolWithKubeletConfigAndLinuxOSConfig(); + createAgentPoolWithMessageOfTheDay(); createAgentPoolWithOssku(); createAgentPoolWithPpg(); createAgentPoolWithUltraSsdEnabled(); + createAgentPoolWithVirtualMachinesPoolType(); + createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled(); createAgentPoolWithWindowsOssku(); createSpotAgentPool(); createWindowsAgentPoolWithDisablingOutboundNat(); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteMachinesSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteMachinesSample.ts index b2d93cfb8a6a..411f72dcb6b2 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteMachinesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteMachinesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes specific machines in an agent pool. * * @summary Deletes specific machines in an agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsDeleteMachines.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDeleteMachines.json */ async function deleteSpecificMachinesInAnAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteSample.ts index b1ac4b193263..2903a6a3e35e 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. * * @summary Deletes an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDelete.json */ async function deleteAgentPool() { const subscriptionId = @@ -38,8 +38,33 @@ async function deleteAgentPool() { console.log(result); } +/** + * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. + * + * @summary Deletes an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json + */ +async function deleteAgentPoolByIgnoringPodDisruptionBudget() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginDeleteAndWait( + resourceGroupName, + resourceName, + agentPoolName, + ); + console.log(result); +} + async function main() { deleteAgentPool(); + deleteAgentPoolByIgnoringPodDisruptionBudget(); } main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetAvailableAgentPoolVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetAvailableAgentPoolVersionsSample.ts index 67e35d440225..35853548ee5b 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetAvailableAgentPoolVersionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetAvailableAgentPoolVersionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. * * @summary See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json */ async function getAvailableVersionsForAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetSample.ts index 41ed5b93b708..5bd12db0e876 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified managed cluster agent pool. * * @summary Gets the specified managed cluster agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGet.json */ async function getAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetUpgradeProfileSample.ts index a3ca34b8fc1a..3e03395545d6 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsGetUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the upgrade profile for an agent pool. * * @summary Gets the upgrade profile for an agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGetUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGetUpgradeProfile.json */ async function getUpgradeProfileForAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsListSample.ts index d616aea11cc6..fd292174fd77 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of agent pools in the specified managed cluster. * * @summary Gets a list of agent pools in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsList.json */ async function listAgentPoolsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsUpgradeNodeImageVersionSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsUpgradeNodeImageVersionSample.ts index bd366cc4ac67..9233e412a95c 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsUpgradeNodeImageVersionSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/agentPoolsUpgradeNodeImageVersionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade * * @summary Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsUpgradeNodeImageVersion.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json */ async function upgradeAgentPoolNodeImageVersion() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersCreateOrUpdateSample.ts new file mode 100644 index 000000000000..673c204b0748 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersCreateOrUpdateSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or updates a load balancer in the specified managed cluster. + * + * @summary Creates or updates a load balancer in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Create_Or_Update.json + */ +async function createOrUpdateALoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + createOrUpdateALoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersDeleteSample.ts new file mode 100644 index 000000000000..e46689dd6249 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes a load balancer in the specified managed cluster. + * + * @summary Deletes a load balancer in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Delete.json + */ +async function deleteALoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.beginDeleteAndWait( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + deleteALoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersGetSample.ts similarity index 71% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples-dev/loadBalancersGetSample.ts index b1ac4b193263..1f1b32905db2 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersGetSample.ts @@ -15,31 +15,31 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. + * This sample demonstrates how to Gets the specified load balancer. * - * @summary Deletes an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsDelete.json + * @summary Gets the specified load balancer. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Get.json */ -async function deleteAgentPool() { +async function getLoadBalancer() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; const resourceName = "clustername1"; - const agentPoolName = "agentpool1"; + const loadBalancerName = "kubernetes"; const credential = new DefaultAzureCredential(); const client = new ContainerServiceClient(credential, subscriptionId); - const result = await client.agentPools.beginDeleteAndWait( + const result = await client.loadBalancers.get( resourceGroupName, resourceName, - agentPoolName, + loadBalancerName, ); console.log(result); } async function main() { - deleteAgentPool(); + getLoadBalancer(); } main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersListByManagedClusterSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersListByManagedClusterSample.ts new file mode 100644 index 000000000000..74cf8397b5bb --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/loadBalancersListByManagedClusterSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of load balancers in the specified managed cluster. + * + * @summary Gets a list of load balancers in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_List.json + */ +async function listLoadBalancersByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.loadBalancers.listByManagedCluster( + resourceGroupName, + resourceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listLoadBalancersByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/machinesGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/machinesGetSample.ts index 77792a4b0d26..d600ee4de966 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/machinesGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/machinesGetSample.ts @@ -18,12 +18,12 @@ dotenv.config(); * This sample demonstrates how to Get a specific machine in the specified agent pool. * * @summary Get a specific machine in the specified agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MachineGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MachineGet.json */ async function getAMachineInAnAgentPoolsByManagedCluster() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "26fe00f8-9173-4872-9134-bb1d2e00343a"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; const resourceName = "clustername1"; diff --git a/sdk/containerservice/arm-containerservice/samples-dev/machinesListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/machinesListSample.ts index f9aa0939a787..7aeb9c223f73 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/machinesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/machinesListSample.ts @@ -18,12 +18,12 @@ dotenv.config(); * This sample demonstrates how to Gets a list of machines in the specified agent pool. * * @summary Gets a list of machines in the specified agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MachineList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MachineList.json */ async function listMachinesInAnAgentpoolByManagedCluster() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "26fe00f8-9173-4872-9134-bb1d2e00343a"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; const resourceName = "clustername1"; diff --git a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsCreateOrUpdateSample.ts index 150041bf1f0f..2e392329a222 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster. * * @summary Creates or updates a maintenance configuration in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsCreate_Update.json */ async function createOrUpdateMaintenanceConfiguration() { const subscriptionId = @@ -55,7 +55,7 @@ async function createOrUpdateMaintenanceConfiguration() { * This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster. * * @summary Creates or updates a maintenance configuration in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json */ async function createOrUpdateMaintenanceConfigurationWithMaintenanceWindow() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsDeleteSample.ts index af8a77316e8a..6956e15bb019 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a maintenance configuration. * * @summary Deletes a maintenance configuration. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsDelete.json */ async function deleteMaintenanceConfiguration() { const subscriptionId = @@ -42,7 +42,7 @@ async function deleteMaintenanceConfiguration() { * This sample demonstrates how to Deletes a maintenance configuration. * * @summary Deletes a maintenance configuration. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json */ async function deleteMaintenanceConfigurationForNodeOSUpgrade() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsGetSample.ts index 9b35a32eb289..0513a96d9279 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster. * * @summary Gets the specified maintenance configuration of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsGet.json */ async function getMaintenanceConfiguration() { const subscriptionId = @@ -42,7 +42,7 @@ async function getMaintenanceConfiguration() { * This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster. * * @summary Gets the specified maintenance configuration of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json */ async function getMaintenanceConfigurationConfiguredWithMaintenanceWindow() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsListByManagedClusterSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsListByManagedClusterSample.ts index f1615ce26e31..7f8849594380 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsListByManagedClusterSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/maintenanceConfigurationsListByManagedClusterSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster. * * @summary Gets a list of maintenance configurations in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsList.json */ async function listMaintenanceConfigurationsByManagedCluster() { const subscriptionId = @@ -43,7 +43,7 @@ async function listMaintenanceConfigurationsByManagedCluster() { * This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster. * * @summary Gets a list of maintenance configurations in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsList_MaintenanceWindow.json */ async function listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a18a89fc7a1e --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsCreateOrUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ManagedClusterSnapshot, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or updates a managed cluster snapshot. + * + * @summary Creates or updates a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsCreate.json + */ +async function createOrUpdateManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const parameters: ManagedClusterSnapshot = { + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1", + }, + location: "westus", + tags: { key1: "val1", key2: "val2" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.createOrUpdate( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + createOrUpdateManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsDeleteSample.ts new file mode 100644 index 000000000000..5f1f95fb7cd5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsDeleteSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes a managed cluster snapshot. + * + * @summary Deletes a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsDelete.json + */ +async function deleteManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.delete( + resourceGroupName, + resourceName, + ); + console.log(result); +} + +async function main() { + deleteManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsGetSample.ts new file mode 100644 index 000000000000..ddf07fea1127 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsGetSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a managed cluster snapshot. + * + * @summary Gets a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsGet.json + */ +async function getManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.get( + resourceGroupName, + resourceName, + ); + console.log(result); +} + +async function main() { + getManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListByResourceGroupSample.ts new file mode 100644 index 000000000000..933153809819 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListByResourceGroupSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists managed cluster snapshots in the specified subscription and resource group. + * + * @summary Lists managed cluster snapshots in the specified subscription and resource group. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json + */ +async function listManagedClusterSnapshotsByResourceGroup() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusterSnapshots.listByResourceGroup( + resourceGroupName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listManagedClusterSnapshotsByResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListSample.ts new file mode 100644 index 000000000000..07a7e20b51f2 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsListSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of managed cluster snapshots in the specified subscription. + * + * @summary Gets a list of managed cluster snapshots in the specified subscription. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsList.json + */ +async function listManagedClusterSnapshots() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusterSnapshots.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listManagedClusterSnapshots(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsUpdateTagsSample.ts new file mode 100644 index 000000000000..5448a3bd2097 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClusterSnapshotsUpdateTagsSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TagsObject, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates tags on a managed cluster snapshot. + * + * @summary Updates tags on a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json + */ +async function updateManagedClusterSnapshotTags() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const parameters: TagsObject = { tags: { key2: "new-val2", key3: "val3" } }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.updateTags( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + updateManagedClusterSnapshotTags(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersAbortLatestOperationSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersAbortLatestOperationSample.ts index 53c09beb2301..11b8789ee649 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersAbortLatestOperationSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersAbortLatestOperationSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + * This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. * - * @summary Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersAbortOperation.json + * @summary Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersAbortOperation.json */ async function abortOperationOnManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersCreateOrUpdateSample.ts index f201dce40cc3..d1be3a5a8906 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersCreateOrUpdateSample.ts @@ -21,7 +21,121 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_Snapshot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersAssociate_CRG.json + */ +async function associateManagedClusterWithCapacityReservationGroup() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + capacityReservationGroupID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_MCSnapshot.json + */ +async function createManagedClusterUsingAManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableFips: true, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1", + }, + dnsPrefix: "dnsprefix1", + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_Snapshot.json */ async function createManagedClusterUsingAnAgentPoolSnapshot() { const subscriptionId = @@ -39,7 +153,7 @@ async function createManagedClusterUsingAnAgentPoolSnapshot() { count: 3, creationData: { sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", }, enableFips: true, enableNodePublicIP: true, @@ -50,7 +164,7 @@ async function createManagedClusterUsingAnAgentPoolSnapshot() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -87,7 +201,64 @@ async function createManagedClusterUsingAnAgentPoolSnapshot() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_ManagedNATGateway.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnableAIToolchainOperator.json + */ +async function createManagedClusterWithAiToolchainOperatorEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + aiToolchainOperatorProfile: { enabled: true }, + dnsPrefix: "dnsprefix1", + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + networkDataplane: "cilium", + networkPlugin: "azure", + networkPluginMode: "overlay", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_ManagedNATGateway.json */ async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { const subscriptionId = @@ -111,7 +282,7 @@ async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -148,7 +319,7 @@ async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json */ async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { const subscriptionId = @@ -177,7 +348,7 @@ async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -214,9 +385,9 @@ async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_CRG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnableCustomCATrust.json */ -async function createManagedClusterWithCapacityReservationGroup() { +async function createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCatrustEnabled() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -229,9 +400,8 @@ async function createManagedClusterWithCapacityReservationGroup() { { name: "nodepool1", type: "VirtualMachineScaleSets", - capacityReservationGroupID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1", count: 3, + enableCustomCATrust: true, enableNodePublicIP: true, mode: "System", osType: "Linux", @@ -255,6 +425,13 @@ async function createManagedClusterWithCapacityReservationGroup() { loadBalancerSku: "standard", outboundType: "loadBalancer", }, + securityProfile: { + customCATrustCertificates: [ + Buffer.from( + "ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=", + ), + ], + }, servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, sku: { name: "Basic", tier: "Free" }, tags: { archv2: "", tier: "production" }, @@ -277,7 +454,7 @@ async function createManagedClusterWithCapacityReservationGroup() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_DedicatedHostGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_DedicatedHostGroup.json */ async function createManagedClusterWithDedicatedHostGroup() { const subscriptionId = @@ -302,7 +479,7 @@ async function createManagedClusterWithDedicatedHostGroup() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -339,7 +516,7 @@ async function createManagedClusterWithDedicatedHostGroup() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnableEncryptionAtHost.json */ async function createManagedClusterWithEncryptionAtHostEnabled() { const subscriptionId = @@ -364,7 +541,7 @@ async function createManagedClusterWithEncryptionAtHostEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -401,7 +578,7 @@ async function createManagedClusterWithEncryptionAtHostEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_EnabledFIPS.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnabledFIPS.json */ async function createManagedClusterWithFipsEnabledOS() { const subscriptionId = @@ -426,7 +603,7 @@ async function createManagedClusterWithFipsEnabledOS() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -463,7 +640,7 @@ async function createManagedClusterWithFipsEnabledOS() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_GPUMIG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_GPUMIG.json */ async function createManagedClusterWithGpumig() { const subscriptionId = @@ -488,7 +665,7 @@ async function createManagedClusterWithGpumig() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -531,7 +708,7 @@ async function createManagedClusterWithGpumig() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_HTTPProxy.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_HTTPProxy.json */ async function createManagedClusterWithHttpProxyConfigured() { const subscriptionId = @@ -555,7 +732,7 @@ async function createManagedClusterWithHttpProxyConfigured() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -598,7 +775,7 @@ async function createManagedClusterWithHttpProxyConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_Premium.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_Premium.json */ async function createManagedClusterWithLongTermSupport() { const subscriptionId = @@ -660,7 +837,64 @@ async function createManagedClusterWithLongTermSupport() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_NodeAutoProvisioning.json + */ +async function createManagedClusterWithNodeAutoProvisioning() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + networkDataplane: "cilium", + networkPlugin: "azure", + networkPluginMode: "overlay", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_NodePublicIPPrefix.json */ async function createManagedClusterWithNodePublicIPPrefix() { const subscriptionId = @@ -686,7 +920,7 @@ async function createManagedClusterWithNodePublicIPPrefix() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -723,7 +957,7 @@ async function createManagedClusterWithNodePublicIPPrefix() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_OSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_OSSKU.json */ async function createManagedClusterWithOssku() { const subscriptionId = @@ -748,7 +982,7 @@ async function createManagedClusterWithOssku() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -791,7 +1025,7 @@ async function createManagedClusterWithOssku() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_PPG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_PPG.json */ async function createManagedClusterWithPpg() { const subscriptionId = @@ -817,7 +1051,7 @@ async function createManagedClusterWithPpg() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -854,7 +1088,7 @@ async function createManagedClusterWithPpg() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_PodIdentity.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_PodIdentity.json */ async function createManagedClusterWithPodIdentityEnabled() { const subscriptionId = @@ -878,7 +1112,7 @@ async function createManagedClusterWithPodIdentityEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -916,7 +1150,7 @@ async function createManagedClusterWithPodIdentityEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_DisableRunCommand.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_DisableRunCommand.json */ async function createManagedClusterWithRunCommandDisabled() { const subscriptionId = @@ -977,7 +1211,7 @@ async function createManagedClusterWithRunCommandDisabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_SecurityProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_SecurityProfile.json */ async function createManagedClusterWithSecurityProfileConfigured() { const subscriptionId = @@ -1016,7 +1250,6 @@ async function createManagedClusterWithSecurityProfileConfigured() { "/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME", securityMonitoring: { enabled: true }, }, - workloadIdentity: { enabled: true }, }, sku: { name: "Basic", tier: "Free" }, tags: { archv2: "", tier: "production" }, @@ -1035,7 +1268,7 @@ async function createManagedClusterWithSecurityProfileConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_EnableUltraSSD.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnableUltraSSD.json */ async function createManagedClusterWithUltraSsdEnabled() { const subscriptionId = @@ -1060,7 +1293,7 @@ async function createManagedClusterWithUltraSsdEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1097,7 +1330,63 @@ async function createManagedClusterWithUltraSsdEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_VirtualMachines.json + */ +async function createManagedClusterWithVirtualMachinesPoolType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachines", + count: 3, + enableFips: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: false, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json */ async function createManagedClusterWithWebAppRoutingIngressProfileConfigured() { const subscriptionId = @@ -1155,7 +1444,7 @@ async function createManagedClusterWithWebAppRoutingIngressProfileConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UserAssignedNATGateway.json */ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { const subscriptionId = @@ -1179,7 +1468,7 @@ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1215,7 +1504,7 @@ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json */ async function createManagedPrivateClusterWithPublicFqdnSpecified() { const subscriptionId = @@ -1279,7 +1568,7 @@ async function createManagedPrivateClusterWithPublicFqdnSpecified() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json */ async function createManagedPrivateClusterWithFqdnSubdomainSpecified() { const subscriptionId = @@ -1344,7 +1633,7 @@ async function createManagedPrivateClusterWithFqdnSubdomainSpecified() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json */ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { const subscriptionId = @@ -1370,7 +1659,7 @@ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1407,7 +1696,7 @@ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_Update.json */ async function createOrUpdateManagedCluster() { const subscriptionId = @@ -1441,14 +1730,14 @@ async function createOrUpdateManagedCluster() { skipNodesWithSystemPods: "false", }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1468,7 +1757,7 @@ async function createOrUpdateManagedCluster() { tags: { archv2: "", tier: "production" }, upgradeSettings: { overrideSettings: { - forceUpgrade: false, + forceUpgrade: true, until: new Date("2022-11-01T13:00:00Z"), }, }, @@ -1491,7 +1780,7 @@ async function createOrUpdateManagedCluster() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_AzureServiceMesh.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_AzureServiceMesh.json */ async function createOrUpdateManagedClusterWithAzureServiceMesh() { const subscriptionId = @@ -1520,7 +1809,7 @@ async function createOrUpdateManagedClusterWithAzureServiceMesh() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1576,7 +1865,7 @@ async function createOrUpdateManagedClusterWithAzureServiceMesh() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_UpdateWithAHUB.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UpdateWithAHUB.json */ async function createOrUpdateManagedClusterWithEnableAhub() { const subscriptionId = @@ -1601,14 +1890,14 @@ async function createOrUpdateManagedClusterWithEnableAhub() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1646,7 +1935,70 @@ async function createOrUpdateManagedClusterWithEnableAhub() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json + */ +async function createOrUpdateManagedClusterWithEnableNamespaceResources() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + availabilityZones: ["1", "2", "3"], + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS1_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enableNamespaceResources: true, + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UpdateWindowsGmsa.json */ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { const subscriptionId = @@ -1671,14 +2023,14 @@ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1716,7 +2068,7 @@ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_DualStackNetworking.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_DualStackNetworking.json */ async function createOrUpdateManagedClusterWithDualStackNetworking() { const subscriptionId = @@ -1750,14 +2102,14 @@ async function createOrUpdateManagedClusterWithDualStackNetworking() { skipNodesWithSystemPods: "false", }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1792,16 +2144,20 @@ async function createOrUpdateManagedClusterWithDualStackNetworking() { } async function main() { + associateManagedClusterWithCapacityReservationGroup(); + createManagedClusterUsingAManagedClusterSnapshot(); createManagedClusterUsingAnAgentPoolSnapshot(); + createManagedClusterWithAiToolchainOperatorEnabled(); createManagedClusterWithAksManagedNatGatewayAsOutboundType(); createManagedClusterWithAzureKeyVaultSecretsProviderAddon(); - createManagedClusterWithCapacityReservationGroup(); + createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCatrustEnabled(); createManagedClusterWithDedicatedHostGroup(); createManagedClusterWithEncryptionAtHostEnabled(); createManagedClusterWithFipsEnabledOS(); createManagedClusterWithGpumig(); createManagedClusterWithHttpProxyConfigured(); createManagedClusterWithLongTermSupport(); + createManagedClusterWithNodeAutoProvisioning(); createManagedClusterWithNodePublicIPPrefix(); createManagedClusterWithOssku(); createManagedClusterWithPpg(); @@ -1809,6 +2165,7 @@ async function main() { createManagedClusterWithRunCommandDisabled(); createManagedClusterWithSecurityProfileConfigured(); createManagedClusterWithUltraSsdEnabled(); + createManagedClusterWithVirtualMachinesPoolType(); createManagedClusterWithWebAppRoutingIngressProfileConfigured(); createManagedClusterWithUserAssignedNatGatewayAsOutboundType(); createManagedPrivateClusterWithPublicFqdnSpecified(); @@ -1817,6 +2174,7 @@ async function main() { createOrUpdateManagedCluster(); createOrUpdateManagedClusterWithAzureServiceMesh(); createOrUpdateManagedClusterWithEnableAhub(); + createOrUpdateManagedClusterWithEnableNamespaceResources(); createOrUpdateManagedClusterWithWindowsGMsaEnabled(); createOrUpdateManagedClusterWithDualStackNetworking(); } diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersDeleteSample.ts index b6dffd8e0f59..6adb749efe27 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a managed cluster. * * @summary Deletes a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersDelete.json */ async function deleteManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetAccessProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetAccessProfileSample.ts index 0638030dc50e..39b237f907b3 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetAccessProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetAccessProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . * * @summary **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGetAccessProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGetAccessProfile.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetCommandResultSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetCommandResultSample.ts index 70b1e54c3ec2..20571f386135 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetCommandResultSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetCommandResultSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster. * * @summary Gets the results of a command which has been run on the Managed Cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandResultFailed.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandResultFailed.json */ async function commandFailedResult() { const subscriptionId = @@ -42,7 +42,7 @@ async function commandFailedResult() { * This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster. * * @summary Gets the results of a command which has been run on the Managed Cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandResultSucceed.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandResultSucceed.json */ async function commandSucceedResult() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetGuardrailsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetGuardrailsVersionsSample.ts new file mode 100644 index 000000000000..2d11760e3900 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetGuardrailsVersionsSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains Guardrails version along with its support info and whether it is a default version. + * + * @summary Contains Guardrails version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/GetGuardrailsVersions.json + */ +async function getGuardrailsAvailableVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const version = "v1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.getGuardrailsVersions( + location, + version, + ); + console.log(result); +} + +async function main() { + getGuardrailsAvailableVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshRevisionProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshRevisionProfileSample.ts index 2213aa12f0a7..1e14c67be8f4 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshRevisionProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshRevisionProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades * * @summary Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet_MeshRevisionProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json */ async function getAMeshRevisionProfileForAMeshMode() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshUpgradeProfileSample.ts index d3bafe13663a..2f2a6128b77d 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetMeshUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets available upgrades for a service mesh in a cluster. * * @summary Gets available upgrades for a service mesh in a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet_MeshUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json */ async function getsVersionCompatibilityAndUpgradeProfileForAServiceMeshInACluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSafeguardsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSafeguardsVersionsSample.ts new file mode 100644 index 000000000000..1aac12a3fc47 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSafeguardsVersionsSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains Safeguards version along with its support info and whether it is a default version. + * + * @summary Contains Safeguards version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/GetSafeguardsVersions.json + */ +async function getSafeguardsAvailableVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const version = "v1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.getSafeguardsVersions( + location, + version, + ); + console.log(result); +} + +async function main() { + getSafeguardsAvailableVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSample.ts index 05b55dccceba..324c508ba7dd 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a managed cluster. * * @summary Gets a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetUpgradeProfileSample.ts index bdf6e77a29ed..33ffd17acef9 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersGetUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the upgrade profile of a managed cluster. * * @summary Gets the upgrade profile of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGetUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGetUpgradeProfile.json */ async function getUpgradeProfileForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListByResourceGroupSample.ts index 1336e0c609d6..ae678f072dff 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListByResourceGroupSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists managed clusters in the specified subscription and resource group. * * @summary Lists managed clusters in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListByResourceGroup.json */ async function getManagedClustersByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterAdminCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterAdminCredentialsSample.ts index 6f98741b979d..4f8f7b43582d 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterAdminCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterAdminCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the admin credentials of a managed cluster. * * @summary Lists the admin credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterAdminCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterMonitoringUserCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterMonitoringUserCredentialsSample.ts index 630e4e20c446..a69bd80eedd3 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterMonitoringUserCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterMonitoringUserCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the cluster monitoring user credentials of a managed cluster. * * @summary Lists the cluster monitoring user credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterUserCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterUserCredentialsSample.ts index 28058dc75583..cecaf8943135 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterUserCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListClusterUserCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the user credentials of a managed cluster. * * @summary Lists the user credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterUserCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListGuardrailsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListGuardrailsVersionsSample.ts new file mode 100644 index 000000000000..6c033400ce5b --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListGuardrailsVersionsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @summary Contains list of Guardrails version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ListGuardrailsVersions.json + */ +async function listGuardrailsVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusters.listGuardrailsVersions( + location, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGuardrailsVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListKubernetesVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListKubernetesVersionsSample.ts index b15a4fca38e9..571a451d9c55 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListKubernetesVersionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListKubernetesVersionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version * * @summary Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/KubernetesVersions_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/KubernetesVersions_List.json */ async function listKubernetesVersions() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshRevisionProfilesSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshRevisionProfilesSample.ts index ecf4b84dc852..96a39913f418 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshRevisionProfilesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshRevisionProfilesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades * * @summary Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList_MeshRevisionProfiles.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json */ async function listMeshRevisionProfilesInALocation() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshUpgradeProfilesSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshUpgradeProfilesSample.ts index 59e3b05196cd..d70065846d79 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshUpgradeProfilesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListMeshUpgradeProfilesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists available upgrades for all service meshes in a specific cluster. * * @summary Lists available upgrades for all service meshes in a specific cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList_MeshUpgradeProfiles.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json */ async function listsVersionCompatibilityAndUpgradeProfileForAllServiceMeshesInACluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts index c9f0a943f62f..36cf46929625 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. * * @summary Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/OutboundNetworkDependenciesEndpointsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json */ async function listOutboundNetworkDependenciesEndpointsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSafeguardsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSafeguardsVersionsSample.ts new file mode 100644 index 000000000000..31800e34fd0c --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSafeguardsVersionsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @summary Contains list of Safeguards version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ListSafeguardsVersions.json + */ +async function listSafeguardsVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusters.listSafeguardsVersions( + location, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listSafeguardsVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSample.ts index 551476d56bfd..26e2259a42b8 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of managed clusters in the specified subscription. * * @summary Gets a list of managed clusters in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList.json */ async function listManagedClusters() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRebalanceLoadBalancersSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRebalanceLoadBalancersSample.ts new file mode 100644 index 000000000000..186239bbd5b5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRebalanceLoadBalancersSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RebalanceLoadBalancersRequestBody, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Rebalance nodes across specific load balancers. + * + * @summary Rebalance nodes across specific load balancers. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Rebalance.json + */ +async function listAgentPoolsByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: RebalanceLoadBalancersRequestBody = { + loadBalancerNames: ["kubernetes"], + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = + await client.managedClusters.beginRebalanceLoadBalancersAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + listAgentPoolsByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetAadProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetAadProfileSample.ts index ee60914e670b..2d909bfefaba 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetAadProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetAadProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @summary **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersResetAADProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersResetAADProfile.json */ async function resetAadProfile() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetServicePrincipalProfileSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetServicePrincipalProfileSample.ts index d349987804d7..8837ee49072f 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetServicePrincipalProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersResetServicePrincipalProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to This action cannot be performed on a cluster that is not using a service principal * * @summary This action cannot be performed on a cluster that is not using a service principal - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersResetServicePrincipalProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json */ async function resetServicePrincipalProfile() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateClusterCertificatesSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateClusterCertificatesSample.ts index 253c3a401dfd..ef19e488e62b 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateClusterCertificatesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateClusterCertificatesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. * * @summary See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersRotateClusterCertificates.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersRotateClusterCertificates.json */ async function rotateClusterCertificates() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateServiceAccountSigningKeysSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateServiceAccountSigningKeysSample.ts index 71e21f39af7d..026c6a2316be 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateServiceAccountSigningKeysSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRotateServiceAccountSigningKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Rotates the service account signing keys of a managed cluster. * * @summary Rotates the service account signing keys of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json */ async function rotateClusterServiceAccountSigningKeys() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRunCommandSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRunCommandSample.ts index b485beec4e64..c6b7eb146aad 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRunCommandSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersRunCommandSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @summary AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandRequest.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandRequest.json */ async function submitNewCommand() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStartSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStartSample.ts index f2b7d731b209..beca69137337 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStartSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. * * @summary See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersStart.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersStart.json */ async function startManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStopSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStopSample.ts index babfe05af301..02c296a2f346 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStopSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. * * @summary This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersStop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersStop.json */ async function stopManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersUpdateTagsSample.ts index 028b331d3c31..93786e0599b9 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/managedClustersUpdateTagsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/managedClustersUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags on a managed cluster. * * @summary Updates tags on a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersUpdateTags.json */ async function updateManagedClusterTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetByAgentPoolSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetByAgentPoolSample.ts new file mode 100644 index 000000000000..d2d0a606aa7d --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetByAgentPoolSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the status of a specific operation in the specified agent pool. + * + * @summary Get the status of a specific operation in the specified agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultGetByAgentPool.json + */ +async function getOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const operationId = "00000000-0000-0000-0000-000000000001"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.operationStatusResultOperations.getByAgentPool( + resourceGroupName, + resourceName, + agentPoolName, + operationId, + ); + console.log(result); +} + +async function main() { + getOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetSample.ts new file mode 100644 index 000000000000..eb99a691b156 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultGetSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the status of a specific operation in the specified managed cluster. + * + * @summary Get the status of a specific operation in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultGet.json + */ +async function getOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const operationId = "00000000-0000-0000-0000-000000000001"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.operationStatusResultOperations.get( + resourceGroupName, + resourceName, + operationId, + ); + console.log(result); +} + +async function main() { + getOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultListSample.ts new file mode 100644 index 000000000000..faa8d39fcd0d --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples-dev/operationStatusResultListSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of operations in the specified managedCluster + * + * @summary Gets a list of operations in the specified managedCluster + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultList.json + */ +async function listOfOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operationStatusResultOperations.list( + resourceGroupName, + resourceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listOfOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples-dev/operationsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/operationsListSample.ts index 3b0b1ba4f6ec..da68aad29ec5 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/operationsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of operations. * * @summary Gets a list of operations. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/Operation_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/Operation_List.json */ async function listAvailableOperationsForTheContainerServiceResourceProvider() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsDeleteSample.ts index c8f7cdc7c83e..bf08e518ceb8 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a private endpoint connection. * * @summary Deletes a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsDelete.json */ async function deletePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsGetSample.ts index 00899f089e4c..6ec0dc924fc0 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsGet.json */ async function getPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsListSample.ts index 69e929501b13..b6dcb5456e49 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsList.json */ async function listPrivateEndpointConnectionsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsUpdateSample.ts index a4ee8474fd06..0a255d20a774 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateEndpointConnectionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates a private endpoint connection. * * @summary Updates a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsUpdate.json */ async function updatePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/privateLinkResourcesListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/privateLinkResourcesListSample.ts index 1745cf4d561a..82a32a32169c 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/privateLinkResourcesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/privateLinkResourcesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateLinkResourcesList.json */ async function listPrivateLinkResourcesByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/resolvePrivateLinkServiceIdPostSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/resolvePrivateLinkServiceIdPostSample.ts index c4b21d57a932..acf04c39e6cc 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/resolvePrivateLinkServiceIdPostSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/resolvePrivateLinkServiceIdPostSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link service ID for the specified managed cluster. * * @summary Gets the private link service ID for the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ResolvePrivateLinkServiceId.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ResolvePrivateLinkServiceId.json */ async function resolveThePrivateLinkServiceIdForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsCreateOrUpdateSample.ts index cfd79e400923..0e52917f0a9a 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a snapshot. * * @summary Creates or updates a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsCreate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsCreate.json */ async function createOrUpdateSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsDeleteSample.ts index f39263f6377f..99e34cb74f99 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a snapshot. * * @summary Deletes a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsDelete.json */ async function deleteSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsGetSample.ts index 85e8f4c6fe4d..926888d27560 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a snapshot. * * @summary Gets a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsGet.json */ async function getSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListByResourceGroupSample.ts index 583a5b9d1ac4..b5387e089fcb 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListByResourceGroupSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists snapshots in the specified subscription and resource group. * * @summary Lists snapshots in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsListByResourceGroup.json */ async function listSnapshotsByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListSample.ts index 3fb5ceab6801..624626962837 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of snapshots in the specified subscription. * * @summary Gets a list of snapshots in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsList.json */ async function listSnapshots() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsUpdateTagsSample.ts index 4d2f734e2f32..b67c6247a0ee 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/snapshotsUpdateTagsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/snapshotsUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags on a snapshot. * * @summary Updates tags on a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsUpdateTags.json */ async function updateSnapshotTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsCreateOrUpdateSample.ts index 026f11ce7040..ce9bfd5d6934 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a trusted access role binding * * @summary Create or update a trusted access role binding - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json */ async function createOrUpdateATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsDeleteSample.ts index 5b8cba149f0e..0c6129d231eb 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a trusted access role binding. * * @summary Delete a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Delete.json */ async function deleteATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsGetSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsGetSample.ts index d5b9e3a4fc6e..91376cb14528 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a trusted access role binding. * * @summary Get a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Get.json */ async function getATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsListSample.ts index 5115805c6534..103d94bb3168 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRoleBindingsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List trusted access role bindings. * * @summary List trusted access role bindings. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_List.json */ async function listTrustedAccessRoleBindings() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRolesListSample.ts b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRolesListSample.ts index a78d08fe54ea..6d196dbd0569 100644 --- a/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRolesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples-dev/trustedAccessRolesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List supported trusted access roles. * * @summary List supported trusted access roles. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoles_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoles_List.json */ async function listTrustedAccessRoles() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/README.md b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/README.md similarity index 55% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/README.md rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/README.md index e89617d9d825..3ac43d382d0b 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/README.md +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/README.md @@ -1,68 +1,86 @@ -# client library samples for JavaScript +# client library samples for JavaScript (Beta) These sample programs show how to use the JavaScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolsAbortLatestOperationSample.js][agentpoolsabortlatestoperationsample] | Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsAbortOperation.json | -| [agentPoolsCreateOrUpdateSample.js][agentpoolscreateorupdatesample] | Creates or updates an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Snapshot.json | -| [agentPoolsDeleteMachinesSample.js][agentpoolsdeletemachinessample] | Deletes specific machines in an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsDeleteMachines.json | -| [agentPoolsDeleteSample.js][agentpoolsdeletesample] | Deletes an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsDelete.json | -| [agentPoolsGetAvailableAgentPoolVersionsSample.js][agentpoolsgetavailableagentpoolversionssample] | See [supported Kubernetes versions](https://learn.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json | -| [agentPoolsGetSample.js][agentpoolsgetsample] | Gets the specified managed cluster agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGet.json | -| [agentPoolsGetUpgradeProfileSample.js][agentpoolsgetupgradeprofilesample] | Gets the upgrade profile for an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGetUpgradeProfile.json | -| [agentPoolsListSample.js][agentpoolslistsample] | Gets a list of agent pools in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsList.json | -| [agentPoolsUpgradeNodeImageVersionSample.js][agentpoolsupgradenodeimageversionsample] | Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://learn.microsoft.com/azure/aks/node-image-upgrade x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsUpgradeNodeImageVersion.json | -| [machinesGetSample.js][machinesgetsample] | Get a specific machine in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MachineGet.json | -| [machinesListSample.js][machineslistsample] | Gets a list of machines in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MachineList.json | -| [maintenanceConfigurationsCreateOrUpdateSample.js][maintenanceconfigurationscreateorupdatesample] | Creates or updates a maintenance configuration in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsCreate_Update.json | -| [maintenanceConfigurationsDeleteSample.js][maintenanceconfigurationsdeletesample] | Deletes a maintenance configuration. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsDelete.json | -| [maintenanceConfigurationsGetSample.js][maintenanceconfigurationsgetsample] | Gets the specified maintenance configuration of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsGet.json | -| [maintenanceConfigurationsListByManagedClusterSample.js][maintenanceconfigurationslistbymanagedclustersample] | Gets a list of maintenance configurations in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsList.json | -| [managedClustersAbortLatestOperationSample.js][managedclustersabortlatestoperationsample] | Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersAbortOperation.json | -| [managedClustersCreateOrUpdateSample.js][managedclusterscreateorupdatesample] | Creates or updates a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_Snapshot.json | -| [managedClustersDeleteSample.js][managedclustersdeletesample] | Deletes a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersDelete.json | -| [managedClustersGetAccessProfileSample.js][managedclustersgetaccessprofilesample] | **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://learn.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://learn.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGetAccessProfile.json | -| [managedClustersGetCommandResultSample.js][managedclustersgetcommandresultsample] | Gets the results of a command which has been run on the Managed Cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandResultFailed.json | -| [managedClustersGetMeshRevisionProfileSample.js][managedclustersgetmeshrevisionprofilesample] | Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet_MeshRevisionProfile.json | -| [managedClustersGetMeshUpgradeProfileSample.js][managedclustersgetmeshupgradeprofilesample] | Gets available upgrades for a service mesh in a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet_MeshUpgradeProfile.json | -| [managedClustersGetSample.js][managedclustersgetsample] | Gets a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet.json | -| [managedClustersGetUpgradeProfileSample.js][managedclustersgetupgradeprofilesample] | Gets the upgrade profile of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGetUpgradeProfile.json | -| [managedClustersListByResourceGroupSample.js][managedclusterslistbyresourcegroupsample] | Lists managed clusters in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListByResourceGroup.json | -| [managedClustersListClusterAdminCredentialsSample.js][managedclusterslistclusteradmincredentialssample] | Lists the admin credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterAdminCredentials.json | -| [managedClustersListClusterMonitoringUserCredentialsSample.js][managedclusterslistclustermonitoringusercredentialssample] | Lists the cluster monitoring user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json | -| [managedClustersListClusterUserCredentialsSample.js][managedclusterslistclusterusercredentialssample] | Lists the user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterUserCredentials.json | -| [managedClustersListKubernetesVersionsSample.js][managedclusterslistkubernetesversionssample] | Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/KubernetesVersions_List.json | -| [managedClustersListMeshRevisionProfilesSample.js][managedclusterslistmeshrevisionprofilessample] | Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList_MeshRevisionProfiles.json | -| [managedClustersListMeshUpgradeProfilesSample.js][managedclusterslistmeshupgradeprofilessample] | Lists available upgrades for all service meshes in a specific cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList_MeshUpgradeProfiles.json | -| [managedClustersListOutboundNetworkDependenciesEndpointsSample.js][managedclusterslistoutboundnetworkdependenciesendpointssample] | Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/OutboundNetworkDependenciesEndpointsList.json | -| [managedClustersListSample.js][managedclusterslistsample] | Gets a list of managed clusters in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList.json | -| [managedClustersResetAadProfileSample.js][managedclustersresetaadprofilesample] | **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersResetAADProfile.json | -| [managedClustersResetServicePrincipalProfileSample.js][managedclustersresetserviceprincipalprofilesample] | This action cannot be performed on a cluster that is not using a service principal x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersResetServicePrincipalProfile.json | -| [managedClustersRotateClusterCertificatesSample.js][managedclustersrotateclustercertificatessample] | See [Certificate rotation](https://learn.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersRotateClusterCertificates.json | -| [managedClustersRotateServiceAccountSigningKeysSample.js][managedclustersrotateserviceaccountsigningkeyssample] | Rotates the service account signing keys of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json | -| [managedClustersRunCommandSample.js][managedclustersruncommandsample] | AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://learn.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandRequest.json | -| [managedClustersStartSample.js][managedclustersstartsample] | See [starting a cluster](https://learn.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersStart.json | -| [managedClustersStopSample.js][managedclustersstopsample] | This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://learn.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersStop.json | -| [managedClustersUpdateTagsSample.js][managedclustersupdatetagssample] | Updates tags on a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersUpdateTags.json | -| [operationsListSample.js][operationslistsample] | Gets a list of operations. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/Operation_List.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsDelete.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | To learn more about private clusters, see: https://learn.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsGet.json | -| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | To learn more about private clusters, see: https://learn.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsList.json | -| [privateEndpointConnectionsUpdateSample.js][privateendpointconnectionsupdatesample] | Updates a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsUpdate.json | -| [privateLinkResourcesListSample.js][privatelinkresourceslistsample] | To learn more about private clusters, see: https://learn.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateLinkResourcesList.json | -| [resolvePrivateLinkServiceIdPostSample.js][resolveprivatelinkserviceidpostsample] | Gets the private link service ID for the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ResolvePrivateLinkServiceId.json | -| [snapshotsCreateOrUpdateSample.js][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsCreate.json | -| [snapshotsDeleteSample.js][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsDelete.json | -| [snapshotsGetSample.js][snapshotsgetsample] | Gets a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsGet.json | -| [snapshotsListByResourceGroupSample.js][snapshotslistbyresourcegroupsample] | Lists snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsListByResourceGroup.json | -| [snapshotsListSample.js][snapshotslistsample] | Gets a list of snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsList.json | -| [snapshotsUpdateTagsSample.js][snapshotsupdatetagssample] | Updates tags on a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsUpdateTags.json | -| [trustedAccessRoleBindingsCreateOrUpdateSample.js][trustedaccessrolebindingscreateorupdatesample] | Create or update a trusted access role binding x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json | -| [trustedAccessRoleBindingsDeleteSample.js][trustedaccessrolebindingsdeletesample] | Delete a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Delete.json | -| [trustedAccessRoleBindingsGetSample.js][trustedaccessrolebindingsgetsample] | Get a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Get.json | -| [trustedAccessRoleBindingsListSample.js][trustedaccessrolebindingslistsample] | List trusted access role bindings. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_List.json | -| [trustedAccessRolesListSample.js][trustedaccessroleslistsample] | List supported trusted access roles. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoles_List.json | +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [agentPoolsAbortLatestOperationSample.js][agentpoolsabortlatestoperationsample] | Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsAbortOperation.json | +| [agentPoolsCreateOrUpdateSample.js][agentpoolscreateorupdatesample] | Creates or updates an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsAssociate_CRG.json | +| [agentPoolsDeleteMachinesSample.js][agentpoolsdeletemachinessample] | Deletes specific machines in an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDeleteMachines.json | +| [agentPoolsDeleteSample.js][agentpoolsdeletesample] | Deletes an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDelete.json | +| [agentPoolsGetAvailableAgentPoolVersionsSample.js][agentpoolsgetavailableagentpoolversionssample] | See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json | +| [agentPoolsGetSample.js][agentpoolsgetsample] | Gets the specified managed cluster agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGet.json | +| [agentPoolsGetUpgradeProfileSample.js][agentpoolsgetupgradeprofilesample] | Gets the upgrade profile for an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGetUpgradeProfile.json | +| [agentPoolsListSample.js][agentpoolslistsample] | Gets a list of agent pools in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsList.json | +| [agentPoolsUpgradeNodeImageVersionSample.js][agentpoolsupgradenodeimageversionsample] | Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json | +| [loadBalancersCreateOrUpdateSample.js][loadbalancerscreateorupdatesample] | Creates or updates a load balancer in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Create_Or_Update.json | +| [loadBalancersDeleteSample.js][loadbalancersdeletesample] | Deletes a load balancer in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Delete.json | +| [loadBalancersGetSample.js][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Get.json | +| [loadBalancersListByManagedClusterSample.js][loadbalancerslistbymanagedclustersample] | Gets a list of load balancers in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_List.json | +| [machinesGetSample.js][machinesgetsample] | Get a specific machine in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MachineGet.json | +| [machinesListSample.js][machineslistsample] | Gets a list of machines in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MachineList.json | +| [maintenanceConfigurationsCreateOrUpdateSample.js][maintenanceconfigurationscreateorupdatesample] | Creates or updates a maintenance configuration in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsCreate_Update.json | +| [maintenanceConfigurationsDeleteSample.js][maintenanceconfigurationsdeletesample] | Deletes a maintenance configuration. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsDelete.json | +| [maintenanceConfigurationsGetSample.js][maintenanceconfigurationsgetsample] | Gets the specified maintenance configuration of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsGet.json | +| [maintenanceConfigurationsListByManagedClusterSample.js][maintenanceconfigurationslistbymanagedclustersample] | Gets a list of maintenance configurations in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsList.json | +| [managedClusterSnapshotsCreateOrUpdateSample.js][managedclustersnapshotscreateorupdatesample] | Creates or updates a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsCreate.json | +| [managedClusterSnapshotsDeleteSample.js][managedclustersnapshotsdeletesample] | Deletes a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsDelete.json | +| [managedClusterSnapshotsGetSample.js][managedclustersnapshotsgetsample] | Gets a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsGet.json | +| [managedClusterSnapshotsListByResourceGroupSample.js][managedclustersnapshotslistbyresourcegroupsample] | Lists managed cluster snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json | +| [managedClusterSnapshotsListSample.js][managedclustersnapshotslistsample] | Gets a list of managed cluster snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsList.json | +| [managedClusterSnapshotsUpdateTagsSample.js][managedclustersnapshotsupdatetagssample] | Updates tags on a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json | +| [managedClustersAbortLatestOperationSample.js][managedclustersabortlatestoperationsample] | Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersAbortOperation.json | +| [managedClustersCreateOrUpdateSample.js][managedclusterscreateorupdatesample] | Creates or updates a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersAssociate_CRG.json | +| [managedClustersDeleteSample.js][managedclustersdeletesample] | Deletes a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersDelete.json | +| [managedClustersGetAccessProfileSample.js][managedclustersgetaccessprofilesample] | **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGetAccessProfile.json | +| [managedClustersGetCommandResultSample.js][managedclustersgetcommandresultsample] | Gets the results of a command which has been run on the Managed Cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandResultFailed.json | +| [managedClustersGetGuardrailsVersionsSample.js][managedclustersgetguardrailsversionssample] | Contains Guardrails version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/GetGuardrailsVersions.json | +| [managedClustersGetMeshRevisionProfileSample.js][managedclustersgetmeshrevisionprofilesample] | Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json | +| [managedClustersGetMeshUpgradeProfileSample.js][managedclustersgetmeshupgradeprofilesample] | Gets available upgrades for a service mesh in a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json | +| [managedClustersGetSafeguardsVersionsSample.js][managedclustersgetsafeguardsversionssample] | Contains Safeguards version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/GetSafeguardsVersions.json | +| [managedClustersGetSample.js][managedclustersgetsample] | Gets a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet.json | +| [managedClustersGetUpgradeProfileSample.js][managedclustersgetupgradeprofilesample] | Gets the upgrade profile of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGetUpgradeProfile.json | +| [managedClustersListByResourceGroupSample.js][managedclusterslistbyresourcegroupsample] | Lists managed clusters in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListByResourceGroup.json | +| [managedClustersListClusterAdminCredentialsSample.js][managedclusterslistclusteradmincredentialssample] | Lists the admin credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListClusterMonitoringUserCredentialsSample.js][managedclusterslistclustermonitoringusercredentialssample] | Lists the cluster monitoring user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListClusterUserCredentialsSample.js][managedclusterslistclusterusercredentialssample] | Lists the user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListGuardrailsVersionsSample.js][managedclusterslistguardrailsversionssample] | Contains list of Guardrails version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ListGuardrailsVersions.json | +| [managedClustersListKubernetesVersionsSample.js][managedclusterslistkubernetesversionssample] | Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/KubernetesVersions_List.json | +| [managedClustersListMeshRevisionProfilesSample.js][managedclusterslistmeshrevisionprofilessample] | Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json | +| [managedClustersListMeshUpgradeProfilesSample.js][managedclusterslistmeshupgradeprofilessample] | Lists available upgrades for all service meshes in a specific cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json | +| [managedClustersListOutboundNetworkDependenciesEndpointsSample.js][managedclusterslistoutboundnetworkdependenciesendpointssample] | Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json | +| [managedClustersListSafeguardsVersionsSample.js][managedclusterslistsafeguardsversionssample] | Contains list of Safeguards version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ListSafeguardsVersions.json | +| [managedClustersListSample.js][managedclusterslistsample] | Gets a list of managed clusters in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList.json | +| [managedClustersRebalanceLoadBalancersSample.js][managedclustersrebalanceloadbalancerssample] | Rebalance nodes across specific load balancers. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Rebalance.json | +| [managedClustersResetAadProfileSample.js][managedclustersresetaadprofilesample] | **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersResetAADProfile.json | +| [managedClustersResetServicePrincipalProfileSample.js][managedclustersresetserviceprincipalprofilesample] | This action cannot be performed on a cluster that is not using a service principal x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json | +| [managedClustersRotateClusterCertificatesSample.js][managedclustersrotateclustercertificatessample] | See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersRotateClusterCertificates.json | +| [managedClustersRotateServiceAccountSigningKeysSample.js][managedclustersrotateserviceaccountsigningkeyssample] | Rotates the service account signing keys of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json | +| [managedClustersRunCommandSample.js][managedclustersruncommandsample] | AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandRequest.json | +| [managedClustersStartSample.js][managedclustersstartsample] | See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersStart.json | +| [managedClustersStopSample.js][managedclustersstopsample] | This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersStop.json | +| [managedClustersUpdateTagsSample.js][managedclustersupdatetagssample] | Updates tags on a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersUpdateTags.json | +| [operationStatusResultGetByAgentPoolSample.js][operationstatusresultgetbyagentpoolsample] | Get the status of a specific operation in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultGetByAgentPool.json | +| [operationStatusResultGetSample.js][operationstatusresultgetsample] | Get the status of a specific operation in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultGet.json | +| [operationStatusResultListSample.js][operationstatusresultlistsample] | Gets a list of operations in the specified managedCluster x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultList.json | +| [operationsListSample.js][operationslistsample] | Gets a list of operations. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/Operation_List.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsDelete.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsGet.json | +| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsList.json | +| [privateEndpointConnectionsUpdateSample.js][privateendpointconnectionsupdatesample] | Updates a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsUpdate.json | +| [privateLinkResourcesListSample.js][privatelinkresourceslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateLinkResourcesList.json | +| [resolvePrivateLinkServiceIdPostSample.js][resolveprivatelinkserviceidpostsample] | Gets the private link service ID for the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ResolvePrivateLinkServiceId.json | +| [snapshotsCreateOrUpdateSample.js][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsCreate.json | +| [snapshotsDeleteSample.js][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsDelete.json | +| [snapshotsGetSample.js][snapshotsgetsample] | Gets a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsGet.json | +| [snapshotsListByResourceGroupSample.js][snapshotslistbyresourcegroupsample] | Lists snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsListByResourceGroup.json | +| [snapshotsListSample.js][snapshotslistsample] | Gets a list of snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsList.json | +| [snapshotsUpdateTagsSample.js][snapshotsupdatetagssample] | Updates tags on a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsUpdateTags.json | +| [trustedAccessRoleBindingsCreateOrUpdateSample.js][trustedaccessrolebindingscreateorupdatesample] | Create or update a trusted access role binding x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json | +| [trustedAccessRoleBindingsDeleteSample.js][trustedaccessrolebindingsdeletesample] | Delete a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Delete.json | +| [trustedAccessRoleBindingsGetSample.js][trustedaccessrolebindingsgetsample] | Get a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Get.json | +| [trustedAccessRoleBindingsListSample.js][trustedaccessrolebindingslistsample] | List trusted access role bindings. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_List.json | +| [trustedAccessRolesListSample.js][trustedaccessroleslistsample] | List supported trusted access roles. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoles_List.json | ## Prerequisites @@ -102,65 +120,83 @@ npx dev-tool run vendored cross-env CONTAINERSERVICE_SUBSCRIPTION_ID="=18.0.0" }, @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice", "dependencies": { - "@azure/arm-containerservice": "latest", + "@azure/arm-containerservice": "next", "dotenv": "latest", "@azure/identity": "^4.2.1" } diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsDeleteSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsDeleteSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsDeleteSample.js index bd437b133b9c..669954d40d53 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsDeleteSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a private endpoint connection. * * @summary Deletes a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsDelete.json */ async function deletePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsGetSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsGetSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsGetSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsGetSample.js index 1ccafe103835..ef7380b86647 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsGetSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsGet.json */ async function getPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsListSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsListSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsListSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsListSample.js index 3a236f658c12..f7ee08c91f48 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsList.json */ async function listPrivateEndpointConnectionsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsUpdateSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsUpdateSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsUpdateSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsUpdateSample.js index ae3f9cdfd1f3..3caa0a0a297e 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateEndpointConnectionsUpdateSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateEndpointConnectionsUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a private endpoint connection. * * @summary Updates a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsUpdate.json */ async function updatePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateLinkResourcesListSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateLinkResourcesListSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/privateLinkResourcesListSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateLinkResourcesListSample.js index ed2193e67f94..28e905676064 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/privateLinkResourcesListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/privateLinkResourcesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateLinkResourcesList.json */ async function listPrivateLinkResourcesByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/resolvePrivateLinkServiceIdPostSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/resolvePrivateLinkServiceIdPostSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/resolvePrivateLinkServiceIdPostSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/resolvePrivateLinkServiceIdPostSample.js index e5835664fa56..9df73b24d36e 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/resolvePrivateLinkServiceIdPostSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/resolvePrivateLinkServiceIdPostSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the private link service ID for the specified managed cluster. * * @summary Gets the private link service ID for the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ResolvePrivateLinkServiceId.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ResolvePrivateLinkServiceId.json */ async function resolveThePrivateLinkServiceIdForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/sample.env b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/sample.env similarity index 100% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/sample.env rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/sample.env diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsCreateOrUpdateSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsCreateOrUpdateSample.js similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsCreateOrUpdateSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsCreateOrUpdateSample.js index a9f69f1ca109..43789521e09d 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsCreateOrUpdateSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a snapshot. * * @summary Creates or updates a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsCreate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsCreate.json */ async function createOrUpdateSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsDeleteSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsDeleteSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsDeleteSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsDeleteSample.js index c6022c96b8f3..9410970fc5d5 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsDeleteSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a snapshot. * * @summary Deletes a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsDelete.json */ async function deleteSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsGetSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsGetSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsGetSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsGetSample.js index b316dfcc1857..f30d0cde646e 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsGetSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a snapshot. * * @summary Gets a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsGet.json */ async function getSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsListByResourceGroupSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsListByResourceGroupSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsListByResourceGroupSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsListByResourceGroupSample.js index 3b8586afd47c..ff8a2ab73033 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsListByResourceGroupSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists snapshots in the specified subscription and resource group. * * @summary Lists snapshots in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsListByResourceGroup.json */ async function listSnapshotsByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsListSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsListSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsListSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsListSample.js index 76c98358287e..3ecf49e2ef1f 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of snapshots in the specified subscription. * * @summary Gets a list of snapshots in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsList.json */ async function listSnapshots() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsUpdateTagsSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsUpdateTagsSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsUpdateTagsSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsUpdateTagsSample.js index fef44d7bf1bd..d0bdaf32140d 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/snapshotsUpdateTagsSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/snapshotsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates tags on a snapshot. * * @summary Updates tags on a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsUpdateTags.json */ async function updateSnapshotTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js index 36469adaa304..c4e20d107f1f 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a trusted access role binding * * @summary Create or update a trusted access role binding - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json */ async function createOrUpdateATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsDeleteSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsDeleteSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsDeleteSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsDeleteSample.js index b61c4b64ef62..04d354cc3d28 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsDeleteSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a trusted access role binding. * * @summary Delete a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Delete.json */ async function deleteATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsGetSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsGetSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsGetSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsGetSample.js index 38e77459c863..99802deb807d 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsGetSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a trusted access role binding. * * @summary Get a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Get.json */ async function getATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsListSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsListSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsListSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsListSample.js index 2d11e4139dea..b3b80416ae42 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRoleBindingsListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRoleBindingsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List trusted access role bindings. * * @summary List trusted access role bindings. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_List.json */ async function listTrustedAccessRoleBindings() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRolesListSample.js b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRolesListSample.js similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRolesListSample.js rename to sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRolesListSample.js index a31c410a385d..9a3780bdb6db 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/javascript/trustedAccessRolesListSample.js +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/javascript/trustedAccessRolesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List supported trusted access roles. * * @summary List supported trusted access roles. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoles_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoles_List.json */ async function listTrustedAccessRoles() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/README.md b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/README.md similarity index 55% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/README.md rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/README.md index 0df3145538be..423af7f4f6f8 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/README.md +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/README.md @@ -1,68 +1,86 @@ -# client library samples for TypeScript +# client library samples for TypeScript (Beta) These sample programs show how to use the TypeScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolsAbortLatestOperationSample.ts][agentpoolsabortlatestoperationsample] | Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsAbortOperation.json | -| [agentPoolsCreateOrUpdateSample.ts][agentpoolscreateorupdatesample] | Creates or updates an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Snapshot.json | -| [agentPoolsDeleteMachinesSample.ts][agentpoolsdeletemachinessample] | Deletes specific machines in an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsDeleteMachines.json | -| [agentPoolsDeleteSample.ts][agentpoolsdeletesample] | Deletes an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsDelete.json | -| [agentPoolsGetAvailableAgentPoolVersionsSample.ts][agentpoolsgetavailableagentpoolversionssample] | See [supported Kubernetes versions](https://learn.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json | -| [agentPoolsGetSample.ts][agentpoolsgetsample] | Gets the specified managed cluster agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGet.json | -| [agentPoolsGetUpgradeProfileSample.ts][agentpoolsgetupgradeprofilesample] | Gets the upgrade profile for an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGetUpgradeProfile.json | -| [agentPoolsListSample.ts][agentpoolslistsample] | Gets a list of agent pools in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsList.json | -| [agentPoolsUpgradeNodeImageVersionSample.ts][agentpoolsupgradenodeimageversionsample] | Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://learn.microsoft.com/azure/aks/node-image-upgrade x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsUpgradeNodeImageVersion.json | -| [machinesGetSample.ts][machinesgetsample] | Get a specific machine in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MachineGet.json | -| [machinesListSample.ts][machineslistsample] | Gets a list of machines in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MachineList.json | -| [maintenanceConfigurationsCreateOrUpdateSample.ts][maintenanceconfigurationscreateorupdatesample] | Creates or updates a maintenance configuration in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsCreate_Update.json | -| [maintenanceConfigurationsDeleteSample.ts][maintenanceconfigurationsdeletesample] | Deletes a maintenance configuration. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsDelete.json | -| [maintenanceConfigurationsGetSample.ts][maintenanceconfigurationsgetsample] | Gets the specified maintenance configuration of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsGet.json | -| [maintenanceConfigurationsListByManagedClusterSample.ts][maintenanceconfigurationslistbymanagedclustersample] | Gets a list of maintenance configurations in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsList.json | -| [managedClustersAbortLatestOperationSample.ts][managedclustersabortlatestoperationsample] | Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersAbortOperation.json | -| [managedClustersCreateOrUpdateSample.ts][managedclusterscreateorupdatesample] | Creates or updates a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_Snapshot.json | -| [managedClustersDeleteSample.ts][managedclustersdeletesample] | Deletes a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersDelete.json | -| [managedClustersGetAccessProfileSample.ts][managedclustersgetaccessprofilesample] | **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://learn.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://learn.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGetAccessProfile.json | -| [managedClustersGetCommandResultSample.ts][managedclustersgetcommandresultsample] | Gets the results of a command which has been run on the Managed Cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandResultFailed.json | -| [managedClustersGetMeshRevisionProfileSample.ts][managedclustersgetmeshrevisionprofilesample] | Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet_MeshRevisionProfile.json | -| [managedClustersGetMeshUpgradeProfileSample.ts][managedclustersgetmeshupgradeprofilesample] | Gets available upgrades for a service mesh in a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet_MeshUpgradeProfile.json | -| [managedClustersGetSample.ts][managedclustersgetsample] | Gets a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet.json | -| [managedClustersGetUpgradeProfileSample.ts][managedclustersgetupgradeprofilesample] | Gets the upgrade profile of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGetUpgradeProfile.json | -| [managedClustersListByResourceGroupSample.ts][managedclusterslistbyresourcegroupsample] | Lists managed clusters in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListByResourceGroup.json | -| [managedClustersListClusterAdminCredentialsSample.ts][managedclusterslistclusteradmincredentialssample] | Lists the admin credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterAdminCredentials.json | -| [managedClustersListClusterMonitoringUserCredentialsSample.ts][managedclusterslistclustermonitoringusercredentialssample] | Lists the cluster monitoring user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json | -| [managedClustersListClusterUserCredentialsSample.ts][managedclusterslistclusterusercredentialssample] | Lists the user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterUserCredentials.json | -| [managedClustersListKubernetesVersionsSample.ts][managedclusterslistkubernetesversionssample] | Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/KubernetesVersions_List.json | -| [managedClustersListMeshRevisionProfilesSample.ts][managedclusterslistmeshrevisionprofilessample] | Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList_MeshRevisionProfiles.json | -| [managedClustersListMeshUpgradeProfilesSample.ts][managedclusterslistmeshupgradeprofilessample] | Lists available upgrades for all service meshes in a specific cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList_MeshUpgradeProfiles.json | -| [managedClustersListOutboundNetworkDependenciesEndpointsSample.ts][managedclusterslistoutboundnetworkdependenciesendpointssample] | Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/OutboundNetworkDependenciesEndpointsList.json | -| [managedClustersListSample.ts][managedclusterslistsample] | Gets a list of managed clusters in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList.json | -| [managedClustersResetAadProfileSample.ts][managedclustersresetaadprofilesample] | **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersResetAADProfile.json | -| [managedClustersResetServicePrincipalProfileSample.ts][managedclustersresetserviceprincipalprofilesample] | This action cannot be performed on a cluster that is not using a service principal x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersResetServicePrincipalProfile.json | -| [managedClustersRotateClusterCertificatesSample.ts][managedclustersrotateclustercertificatessample] | See [Certificate rotation](https://learn.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersRotateClusterCertificates.json | -| [managedClustersRotateServiceAccountSigningKeysSample.ts][managedclustersrotateserviceaccountsigningkeyssample] | Rotates the service account signing keys of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json | -| [managedClustersRunCommandSample.ts][managedclustersruncommandsample] | AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://learn.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandRequest.json | -| [managedClustersStartSample.ts][managedclustersstartsample] | See [starting a cluster](https://learn.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersStart.json | -| [managedClustersStopSample.ts][managedclustersstopsample] | This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://learn.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersStop.json | -| [managedClustersUpdateTagsSample.ts][managedclustersupdatetagssample] | Updates tags on a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersUpdateTags.json | -| [operationsListSample.ts][operationslistsample] | Gets a list of operations. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/Operation_List.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsDelete.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | To learn more about private clusters, see: https://learn.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsGet.json | -| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | To learn more about private clusters, see: https://learn.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsList.json | -| [privateEndpointConnectionsUpdateSample.ts][privateendpointconnectionsupdatesample] | Updates a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsUpdate.json | -| [privateLinkResourcesListSample.ts][privatelinkresourceslistsample] | To learn more about private clusters, see: https://learn.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateLinkResourcesList.json | -| [resolvePrivateLinkServiceIdPostSample.ts][resolveprivatelinkserviceidpostsample] | Gets the private link service ID for the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ResolvePrivateLinkServiceId.json | -| [snapshotsCreateOrUpdateSample.ts][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsCreate.json | -| [snapshotsDeleteSample.ts][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsDelete.json | -| [snapshotsGetSample.ts][snapshotsgetsample] | Gets a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsGet.json | -| [snapshotsListByResourceGroupSample.ts][snapshotslistbyresourcegroupsample] | Lists snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsListByResourceGroup.json | -| [snapshotsListSample.ts][snapshotslistsample] | Gets a list of snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsList.json | -| [snapshotsUpdateTagsSample.ts][snapshotsupdatetagssample] | Updates tags on a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsUpdateTags.json | -| [trustedAccessRoleBindingsCreateOrUpdateSample.ts][trustedaccessrolebindingscreateorupdatesample] | Create or update a trusted access role binding x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json | -| [trustedAccessRoleBindingsDeleteSample.ts][trustedaccessrolebindingsdeletesample] | Delete a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Delete.json | -| [trustedAccessRoleBindingsGetSample.ts][trustedaccessrolebindingsgetsample] | Get a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Get.json | -| [trustedAccessRoleBindingsListSample.ts][trustedaccessrolebindingslistsample] | List trusted access role bindings. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_List.json | -| [trustedAccessRolesListSample.ts][trustedaccessroleslistsample] | List supported trusted access roles. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoles_List.json | +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [agentPoolsAbortLatestOperationSample.ts][agentpoolsabortlatestoperationsample] | Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsAbortOperation.json | +| [agentPoolsCreateOrUpdateSample.ts][agentpoolscreateorupdatesample] | Creates or updates an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsAssociate_CRG.json | +| [agentPoolsDeleteMachinesSample.ts][agentpoolsdeletemachinessample] | Deletes specific machines in an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDeleteMachines.json | +| [agentPoolsDeleteSample.ts][agentpoolsdeletesample] | Deletes an agent pool in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDelete.json | +| [agentPoolsGetAvailableAgentPoolVersionsSample.ts][agentpoolsgetavailableagentpoolversionssample] | See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json | +| [agentPoolsGetSample.ts][agentpoolsgetsample] | Gets the specified managed cluster agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGet.json | +| [agentPoolsGetUpgradeProfileSample.ts][agentpoolsgetupgradeprofilesample] | Gets the upgrade profile for an agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGetUpgradeProfile.json | +| [agentPoolsListSample.ts][agentpoolslistsample] | Gets a list of agent pools in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsList.json | +| [agentPoolsUpgradeNodeImageVersionSample.ts][agentpoolsupgradenodeimageversionsample] | Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json | +| [loadBalancersCreateOrUpdateSample.ts][loadbalancerscreateorupdatesample] | Creates or updates a load balancer in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Create_Or_Update.json | +| [loadBalancersDeleteSample.ts][loadbalancersdeletesample] | Deletes a load balancer in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Delete.json | +| [loadBalancersGetSample.ts][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Get.json | +| [loadBalancersListByManagedClusterSample.ts][loadbalancerslistbymanagedclustersample] | Gets a list of load balancers in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_List.json | +| [machinesGetSample.ts][machinesgetsample] | Get a specific machine in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MachineGet.json | +| [machinesListSample.ts][machineslistsample] | Gets a list of machines in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MachineList.json | +| [maintenanceConfigurationsCreateOrUpdateSample.ts][maintenanceconfigurationscreateorupdatesample] | Creates or updates a maintenance configuration in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsCreate_Update.json | +| [maintenanceConfigurationsDeleteSample.ts][maintenanceconfigurationsdeletesample] | Deletes a maintenance configuration. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsDelete.json | +| [maintenanceConfigurationsGetSample.ts][maintenanceconfigurationsgetsample] | Gets the specified maintenance configuration of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsGet.json | +| [maintenanceConfigurationsListByManagedClusterSample.ts][maintenanceconfigurationslistbymanagedclustersample] | Gets a list of maintenance configurations in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsList.json | +| [managedClusterSnapshotsCreateOrUpdateSample.ts][managedclustersnapshotscreateorupdatesample] | Creates or updates a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsCreate.json | +| [managedClusterSnapshotsDeleteSample.ts][managedclustersnapshotsdeletesample] | Deletes a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsDelete.json | +| [managedClusterSnapshotsGetSample.ts][managedclustersnapshotsgetsample] | Gets a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsGet.json | +| [managedClusterSnapshotsListByResourceGroupSample.ts][managedclustersnapshotslistbyresourcegroupsample] | Lists managed cluster snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json | +| [managedClusterSnapshotsListSample.ts][managedclustersnapshotslistsample] | Gets a list of managed cluster snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsList.json | +| [managedClusterSnapshotsUpdateTagsSample.ts][managedclustersnapshotsupdatetagssample] | Updates tags on a managed cluster snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json | +| [managedClustersAbortLatestOperationSample.ts][managedclustersabortlatestoperationsample] | Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersAbortOperation.json | +| [managedClustersCreateOrUpdateSample.ts][managedclusterscreateorupdatesample] | Creates or updates a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersAssociate_CRG.json | +| [managedClustersDeleteSample.ts][managedclustersdeletesample] | Deletes a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersDelete.json | +| [managedClustersGetAccessProfileSample.ts][managedclustersgetaccessprofilesample] | **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGetAccessProfile.json | +| [managedClustersGetCommandResultSample.ts][managedclustersgetcommandresultsample] | Gets the results of a command which has been run on the Managed Cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandResultFailed.json | +| [managedClustersGetGuardrailsVersionsSample.ts][managedclustersgetguardrailsversionssample] | Contains Guardrails version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/GetGuardrailsVersions.json | +| [managedClustersGetMeshRevisionProfileSample.ts][managedclustersgetmeshrevisionprofilesample] | Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json | +| [managedClustersGetMeshUpgradeProfileSample.ts][managedclustersgetmeshupgradeprofilesample] | Gets available upgrades for a service mesh in a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json | +| [managedClustersGetSafeguardsVersionsSample.ts][managedclustersgetsafeguardsversionssample] | Contains Safeguards version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/GetSafeguardsVersions.json | +| [managedClustersGetSample.ts][managedclustersgetsample] | Gets a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet.json | +| [managedClustersGetUpgradeProfileSample.ts][managedclustersgetupgradeprofilesample] | Gets the upgrade profile of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGetUpgradeProfile.json | +| [managedClustersListByResourceGroupSample.ts][managedclusterslistbyresourcegroupsample] | Lists managed clusters in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListByResourceGroup.json | +| [managedClustersListClusterAdminCredentialsSample.ts][managedclusterslistclusteradmincredentialssample] | Lists the admin credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListClusterMonitoringUserCredentialsSample.ts][managedclusterslistclustermonitoringusercredentialssample] | Lists the cluster monitoring user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListClusterUserCredentialsSample.ts][managedclusterslistclusterusercredentialssample] | Lists the user credentials of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json | +| [managedClustersListGuardrailsVersionsSample.ts][managedclusterslistguardrailsversionssample] | Contains list of Guardrails version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ListGuardrailsVersions.json | +| [managedClustersListKubernetesVersionsSample.ts][managedclusterslistkubernetesversionssample] | Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/KubernetesVersions_List.json | +| [managedClustersListMeshRevisionProfilesSample.ts][managedclusterslistmeshrevisionprofilessample] | Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json | +| [managedClustersListMeshUpgradeProfilesSample.ts][managedclusterslistmeshupgradeprofilessample] | Lists available upgrades for all service meshes in a specific cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json | +| [managedClustersListOutboundNetworkDependenciesEndpointsSample.ts][managedclusterslistoutboundnetworkdependenciesendpointssample] | Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json | +| [managedClustersListSafeguardsVersionsSample.ts][managedclusterslistsafeguardsversionssample] | Contains list of Safeguards version along with its support info and whether it is a default version. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ListSafeguardsVersions.json | +| [managedClustersListSample.ts][managedclusterslistsample] | Gets a list of managed clusters in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList.json | +| [managedClustersRebalanceLoadBalancersSample.ts][managedclustersrebalanceloadbalancerssample] | Rebalance nodes across specific load balancers. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Rebalance.json | +| [managedClustersResetAadProfileSample.ts][managedclustersresetaadprofilesample] | **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersResetAADProfile.json | +| [managedClustersResetServicePrincipalProfileSample.ts][managedclustersresetserviceprincipalprofilesample] | This action cannot be performed on a cluster that is not using a service principal x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json | +| [managedClustersRotateClusterCertificatesSample.ts][managedclustersrotateclustercertificatessample] | See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersRotateClusterCertificates.json | +| [managedClustersRotateServiceAccountSigningKeysSample.ts][managedclustersrotateserviceaccountsigningkeyssample] | Rotates the service account signing keys of a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json | +| [managedClustersRunCommandSample.ts][managedclustersruncommandsample] | AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandRequest.json | +| [managedClustersStartSample.ts][managedclustersstartsample] | See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersStart.json | +| [managedClustersStopSample.ts][managedclustersstopsample] | This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersStop.json | +| [managedClustersUpdateTagsSample.ts][managedclustersupdatetagssample] | Updates tags on a managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersUpdateTags.json | +| [operationStatusResultGetByAgentPoolSample.ts][operationstatusresultgetbyagentpoolsample] | Get the status of a specific operation in the specified agent pool. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultGetByAgentPool.json | +| [operationStatusResultGetSample.ts][operationstatusresultgetsample] | Get the status of a specific operation in the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultGet.json | +| [operationStatusResultListSample.ts][operationstatusresultlistsample] | Gets a list of operations in the specified managedCluster x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultList.json | +| [operationsListSample.ts][operationslistsample] | Gets a list of operations. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/Operation_List.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsDelete.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsGet.json | +| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsList.json | +| [privateEndpointConnectionsUpdateSample.ts][privateendpointconnectionsupdatesample] | Updates a private endpoint connection. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsUpdate.json | +| [privateLinkResourcesListSample.ts][privatelinkresourceslistsample] | To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateLinkResourcesList.json | +| [resolvePrivateLinkServiceIdPostSample.ts][resolveprivatelinkserviceidpostsample] | Gets the private link service ID for the specified managed cluster. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ResolvePrivateLinkServiceId.json | +| [snapshotsCreateOrUpdateSample.ts][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsCreate.json | +| [snapshotsDeleteSample.ts][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsDelete.json | +| [snapshotsGetSample.ts][snapshotsgetsample] | Gets a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsGet.json | +| [snapshotsListByResourceGroupSample.ts][snapshotslistbyresourcegroupsample] | Lists snapshots in the specified subscription and resource group. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsListByResourceGroup.json | +| [snapshotsListSample.ts][snapshotslistsample] | Gets a list of snapshots in the specified subscription. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsList.json | +| [snapshotsUpdateTagsSample.ts][snapshotsupdatetagssample] | Updates tags on a snapshot. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsUpdateTags.json | +| [trustedAccessRoleBindingsCreateOrUpdateSample.ts][trustedaccessrolebindingscreateorupdatesample] | Create or update a trusted access role binding x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json | +| [trustedAccessRoleBindingsDeleteSample.ts][trustedaccessrolebindingsdeletesample] | Delete a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Delete.json | +| [trustedAccessRoleBindingsGetSample.ts][trustedaccessrolebindingsgetsample] | Get a trusted access role binding. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Get.json | +| [trustedAccessRoleBindingsListSample.ts][trustedaccessrolebindingslistsample] | List trusted access role bindings. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_List.json | +| [trustedAccessRolesListSample.ts][trustedaccessroleslistsample] | List supported trusted access roles. x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoles_List.json | ## Prerequisites @@ -114,66 +132,84 @@ npx dev-tool run vendored cross-env CONTAINERSERVICE_SUBSCRIPTION_ID="=18.0.0" }, @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice", "dependencies": { - "@azure/arm-containerservice": "latest", + "@azure/arm-containerservice": "next", "dotenv": "latest", "@azure/identity": "^4.2.1" }, diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/sample.env b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/sample.env similarity index 100% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/sample.env rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/sample.env diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsAbortLatestOperationSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsAbortLatestOperationSample.ts similarity index 88% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsAbortLatestOperationSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsAbortLatestOperationSample.ts index be23fd85b9d7..d9a87909815d 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsAbortLatestOperationSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsAbortLatestOperationSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + * This sample demonstrates how to Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. * - * @summary Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsAbortOperation.json + * @summary Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsAbortOperation.json */ async function abortOperationOnAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts similarity index 75% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts index c6426680bfb6..91e637595228 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts @@ -18,7 +18,40 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Snapshot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsAssociate_CRG.json + */ +async function associateAgentPoolWithCapacityReservationGroup() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + capacityReservationGroupID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1", + count: 3, + orchestratorVersion: "", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_Snapshot.json */ async function createAgentPoolUsingAnAgentPoolSnapshot() { const subscriptionId = @@ -32,7 +65,7 @@ async function createAgentPoolUsingAnAgentPoolSnapshot() { count: 3, creationData: { sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", }, enableFips: true, orchestratorVersion: "", @@ -54,9 +87,9 @@ async function createAgentPoolUsingAnAgentPoolSnapshot() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_CRG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_EnableCustomCATrust.json */ -async function createAgentPoolWithCapacityReservationGroup() { +async function createAgentPoolWithCustomCaTrustEnabled() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -65,9 +98,8 @@ async function createAgentPoolWithCapacityReservationGroup() { const resourceName = "clustername1"; const agentPoolName = "agentpool1"; const parameters: AgentPool = { - capacityReservationGroupID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1", count: 3, + enableCustomCATrust: true, orchestratorVersion: "", osType: "Linux", vmSize: "Standard_DS2_v2", @@ -87,7 +119,7 @@ async function createAgentPoolWithCapacityReservationGroup() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_DedicatedHostGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json */ async function createAgentPoolWithDedicatedHostGroup() { const subscriptionId = @@ -120,7 +152,7 @@ async function createAgentPoolWithDedicatedHostGroup() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_EnableEncryptionAtHost.json */ async function createAgentPoolWithEncryptionAtHostEnabled() { const subscriptionId = @@ -152,7 +184,7 @@ async function createAgentPoolWithEncryptionAtHostEnabled() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Ephemeral.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_Ephemeral.json */ async function createAgentPoolWithEphemeralOSDisk() { const subscriptionId = @@ -185,7 +217,7 @@ async function createAgentPoolWithEphemeralOSDisk() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_EnableFIPS.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_EnableFIPS.json */ async function createAgentPoolWithFipsEnabledOS() { const subscriptionId = @@ -217,7 +249,7 @@ async function createAgentPoolWithFipsEnabledOS() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_GPUMIG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_GPUMIG.json */ async function createAgentPoolWithGpumig() { const subscriptionId = @@ -270,7 +302,7 @@ async function createAgentPoolWithGpumig() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_WasmWasi.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_WasmWasi.json */ async function createAgentPoolWithKrustletAndTheWasiRuntime() { const subscriptionId = @@ -304,7 +336,7 @@ async function createAgentPoolWithKrustletAndTheWasiRuntime() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_CustomNodeConfig.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json */ async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() { const subscriptionId = @@ -356,7 +388,41 @@ async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_OSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_MessageOfTheDay.json + */ +async function createAgentPoolWithMessageOfTheDay() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + count: 3, + messageOfTheDay: "Zm9vCg==", + mode: "User", + orchestratorVersion: "", + osDiskSizeGB: 64, + osType: "Linux", + vmSize: "Standard_DS2_v2", + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_OSSKU.json */ async function createAgentPoolWithOssku() { const subscriptionId = @@ -409,7 +475,7 @@ async function createAgentPoolWithOssku() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_PPG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_PPG.json */ async function createAgentPoolWithPpg() { const subscriptionId = @@ -442,7 +508,7 @@ async function createAgentPoolWithPpg() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_EnableUltraSSD.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_EnableUltraSSD.json */ async function createAgentPoolWithUltraSsdEnabled() { const subscriptionId = @@ -474,7 +540,89 @@ async function createAgentPoolWithUltraSsdEnabled() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_WindowsOSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines.json + */ +async function createAgentPoolWithVirtualMachinesPoolType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + typePropertiesType: "VirtualMachines", + nodeLabels: { key1: "val1" }, + nodeTaints: ["Key1=Value1:NoSchedule"], + orchestratorVersion: "1.9.6", + osType: "Linux", + tags: { name1: "val1" }, + virtualMachinesProfile: { + scale: { + manual: [{ count: 5, sizes: ["Standard_D2_v2", "Standard_D2_v3"] }], + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json + */ +async function createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const parameters: AgentPool = { + typePropertiesType: "VirtualMachines", + nodeLabels: { key1: "val1" }, + nodeTaints: ["Key1=Value1:NoSchedule"], + orchestratorVersion: "1.29.0", + osType: "Linux", + tags: { name1: "val1" }, + virtualMachinesProfile: { + scale: { + autoscale: [ + { + maxCount: 5, + minCount: 1, + sizes: ["Standard_D2_v2", "Standard_D2_v3"], + }, + ], + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. + * + * @summary Creates or updates an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_WindowsOSSKU.json */ async function createAgentPoolWithWindowsOssku() { const subscriptionId = @@ -506,7 +654,7 @@ async function createAgentPoolWithWindowsOssku() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Spot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_Spot.json */ async function createSpotAgentPool() { const subscriptionId = @@ -542,7 +690,7 @@ async function createSpotAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json */ async function createWindowsAgentPoolWithDisablingOutboundNat() { const subscriptionId = @@ -575,7 +723,7 @@ async function createWindowsAgentPoolWithDisablingOutboundNat() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsCreate_Update.json */ async function createOrUpdateAgentPool() { const subscriptionId = @@ -612,7 +760,7 @@ async function createOrUpdateAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPools_Start.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPools_Start.json */ async function startAgentPool() { const subscriptionId = @@ -638,7 +786,7 @@ async function startAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPools_Stop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPools_Stop.json */ async function stopAgentPool() { const subscriptionId = @@ -664,7 +812,7 @@ async function stopAgentPool() { * This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster. * * @summary Creates or updates an agent pool in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPools_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPools_Update.json */ async function updateAgentPool() { const subscriptionId = @@ -698,8 +846,9 @@ async function updateAgentPool() { } async function main() { + associateAgentPoolWithCapacityReservationGroup(); createAgentPoolUsingAnAgentPoolSnapshot(); - createAgentPoolWithCapacityReservationGroup(); + createAgentPoolWithCustomCaTrustEnabled(); createAgentPoolWithDedicatedHostGroup(); createAgentPoolWithEncryptionAtHostEnabled(); createAgentPoolWithEphemeralOSDisk(); @@ -707,9 +856,12 @@ async function main() { createAgentPoolWithGpumig(); createAgentPoolWithKrustletAndTheWasiRuntime(); createAgentPoolWithKubeletConfigAndLinuxOSConfig(); + createAgentPoolWithMessageOfTheDay(); createAgentPoolWithOssku(); createAgentPoolWithPpg(); createAgentPoolWithUltraSsdEnabled(); + createAgentPoolWithVirtualMachinesPoolType(); + createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled(); createAgentPoolWithWindowsOssku(); createSpotAgentPool(); createWindowsAgentPoolWithDisablingOutboundNat(); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsDeleteMachinesSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsDeleteMachinesSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsDeleteMachinesSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsDeleteMachinesSample.ts index b2d93cfb8a6a..411f72dcb6b2 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsDeleteMachinesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsDeleteMachinesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes specific machines in an agent pool. * * @summary Deletes specific machines in an agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsDeleteMachines.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDeleteMachines.json */ async function deleteSpecificMachinesInAnAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsDeleteSample.ts new file mode 100644 index 000000000000..2903a6a3e35e --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsDeleteSample.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. + * + * @summary Deletes an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDelete.json + */ +async function deleteAgentPool() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginDeleteAndWait( + resourceGroupName, + resourceName, + agentPoolName, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Deletes an agent pool in the specified managed cluster. + * + * @summary Deletes an agent pool in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json + */ +async function deleteAgentPoolByIgnoringPodDisruptionBudget() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.agentPools.beginDeleteAndWait( + resourceGroupName, + resourceName, + agentPoolName, + ); + console.log(result); +} + +async function main() { + deleteAgentPool(); + deleteAgentPoolByIgnoringPodDisruptionBudget(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts index 67e35d440225..35853548ee5b 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsGetAvailableAgentPoolVersionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. * * @summary See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json */ async function getAvailableVersionsForAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsGetSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsGetSample.ts index 41ed5b93b708..5bd12db0e876 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified managed cluster agent pool. * * @summary Gets the specified managed cluster agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGet.json */ async function getAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsGetUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsGetUpgradeProfileSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsGetUpgradeProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsGetUpgradeProfileSample.ts index a3ca34b8fc1a..3e03395545d6 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsGetUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsGetUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the upgrade profile for an agent pool. * * @summary Gets the upgrade profile for an agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsGetUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsGetUpgradeProfile.json */ async function getUpgradeProfileForAgentPool() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsListSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsListSample.ts index d616aea11cc6..fd292174fd77 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of agent pools in the specified managed cluster. * * @summary Gets a list of agent pools in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsList.json */ async function listAgentPoolsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts index bd366cc4ac67..9233e412a95c 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/agentPoolsUpgradeNodeImageVersionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade * * @summary Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/AgentPoolsUpgradeNodeImageVersion.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json */ async function upgradeAgentPoolNodeImageVersion() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersCreateOrUpdateSample.ts new file mode 100644 index 000000000000..673c204b0748 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersCreateOrUpdateSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or updates a load balancer in the specified managed cluster. + * + * @summary Creates or updates a load balancer in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Create_Or_Update.json + */ +async function createOrUpdateALoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.createOrUpdate( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + createOrUpdateALoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersDeleteSample.ts new file mode 100644 index 000000000000..e46689dd6249 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes a load balancer in the specified managed cluster. + * + * @summary Deletes a load balancer in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Delete.json + */ +async function deleteALoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.beginDeleteAndWait( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + deleteALoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersGetSample.ts new file mode 100644 index 000000000000..1f1b32905db2 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersGetSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified load balancer. + * + * @summary Gets the specified load balancer. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Get.json + */ +async function getLoadBalancer() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const loadBalancerName = "kubernetes"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.loadBalancers.get( + resourceGroupName, + resourceName, + loadBalancerName, + ); + console.log(result); +} + +async function main() { + getLoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersListByManagedClusterSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersListByManagedClusterSample.ts new file mode 100644 index 000000000000..74cf8397b5bb --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/loadBalancersListByManagedClusterSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of load balancers in the specified managed cluster. + * + * @summary Gets a list of load balancers in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_List.json + */ +async function listLoadBalancersByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.loadBalancers.listByManagedCluster( + resourceGroupName, + resourceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listLoadBalancersByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/machinesGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/machinesGetSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/machinesGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/machinesGetSample.ts index 77792a4b0d26..d600ee4de966 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/machinesGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/machinesGetSample.ts @@ -18,12 +18,12 @@ dotenv.config(); * This sample demonstrates how to Get a specific machine in the specified agent pool. * * @summary Get a specific machine in the specified agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MachineGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MachineGet.json */ async function getAMachineInAnAgentPoolsByManagedCluster() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "26fe00f8-9173-4872-9134-bb1d2e00343a"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; const resourceName = "clustername1"; diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/machinesListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/machinesListSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/machinesListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/machinesListSample.ts index f9aa0939a787..7aeb9c223f73 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/machinesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/machinesListSample.ts @@ -18,12 +18,12 @@ dotenv.config(); * This sample demonstrates how to Gets a list of machines in the specified agent pool. * * @summary Gets a list of machines in the specified agent pool. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MachineList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MachineList.json */ async function listMachinesInAnAgentpoolByManagedCluster() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || - "26fe00f8-9173-4872-9134-bb1d2e00343a"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; const resourceName = "clustername1"; diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts index 150041bf1f0f..2e392329a222 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster. * * @summary Creates or updates a maintenance configuration in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsCreate_Update.json */ async function createOrUpdateMaintenanceConfiguration() { const subscriptionId = @@ -55,7 +55,7 @@ async function createOrUpdateMaintenanceConfiguration() { * This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster. * * @summary Creates or updates a maintenance configuration in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json */ async function createOrUpdateMaintenanceConfigurationWithMaintenanceWindow() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsDeleteSample.ts similarity index 90% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsDeleteSample.ts index af8a77316e8a..6956e15bb019 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a maintenance configuration. * * @summary Deletes a maintenance configuration. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsDelete.json */ async function deleteMaintenanceConfiguration() { const subscriptionId = @@ -42,7 +42,7 @@ async function deleteMaintenanceConfiguration() { * This sample demonstrates how to Deletes a maintenance configuration. * * @summary Deletes a maintenance configuration. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json */ async function deleteMaintenanceConfigurationForNodeOSUpgrade() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsGetSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsGetSample.ts index 9b35a32eb289..0513a96d9279 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster. * * @summary Gets the specified maintenance configuration of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsGet.json */ async function getMaintenanceConfiguration() { const subscriptionId = @@ -42,7 +42,7 @@ async function getMaintenanceConfiguration() { * This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster. * * @summary Gets the specified maintenance configuration of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json */ async function getMaintenanceConfigurationConfiguredWithMaintenanceWindow() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts index f1615ce26e31..7f8849594380 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/maintenanceConfigurationsListByManagedClusterSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster. * * @summary Gets a list of maintenance configurations in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsList.json */ async function listMaintenanceConfigurationsByManagedCluster() { const subscriptionId = @@ -43,7 +43,7 @@ async function listMaintenanceConfigurationsByManagedCluster() { * This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster. * * @summary Gets a list of maintenance configurations in the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/MaintenanceConfigurationsList_MaintenanceWindow.json */ async function listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a18a89fc7a1e --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsCreateOrUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ManagedClusterSnapshot, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or updates a managed cluster snapshot. + * + * @summary Creates or updates a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsCreate.json + */ +async function createOrUpdateManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const parameters: ManagedClusterSnapshot = { + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1", + }, + location: "westus", + tags: { key1: "val1", key2: "val2" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.createOrUpdate( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + createOrUpdateManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsDeleteSample.ts new file mode 100644 index 000000000000..5f1f95fb7cd5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsDeleteSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes a managed cluster snapshot. + * + * @summary Deletes a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsDelete.json + */ +async function deleteManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.delete( + resourceGroupName, + resourceName, + ); + console.log(result); +} + +async function main() { + deleteManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsGetSample.ts new file mode 100644 index 000000000000..ddf07fea1127 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsGetSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a managed cluster snapshot. + * + * @summary Gets a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsGet.json + */ +async function getManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.get( + resourceGroupName, + resourceName, + ); + console.log(result); +} + +async function main() { + getManagedClusterSnapshot(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsListByResourceGroupSample.ts new file mode 100644 index 000000000000..933153809819 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsListByResourceGroupSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists managed cluster snapshots in the specified subscription and resource group. + * + * @summary Lists managed cluster snapshots in the specified subscription and resource group. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json + */ +async function listManagedClusterSnapshotsByResourceGroup() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusterSnapshots.listByResourceGroup( + resourceGroupName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listManagedClusterSnapshotsByResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsListSample.ts new file mode 100644 index 000000000000..07a7e20b51f2 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsListSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of managed cluster snapshots in the specified subscription. + * + * @summary Gets a list of managed cluster snapshots in the specified subscription. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsList.json + */ +async function listManagedClusterSnapshots() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusterSnapshots.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listManagedClusterSnapshots(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsUpdateTagsSample.ts new file mode 100644 index 000000000000..5448a3bd2097 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClusterSnapshotsUpdateTagsSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TagsObject, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates tags on a managed cluster snapshot. + * + * @summary Updates tags on a managed cluster snapshot. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json + */ +async function updateManagedClusterSnapshotTags() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "snapshot1"; + const parameters: TagsObject = { tags: { key2: "new-val2", key3: "val3" } }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusterSnapshots.updateTags( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + updateManagedClusterSnapshotTags(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersAbortLatestOperationSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersAbortLatestOperationSample.ts similarity index 90% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersAbortLatestOperationSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersAbortLatestOperationSample.ts index 53c09beb2301..11b8789ee649 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersAbortLatestOperationSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersAbortLatestOperationSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + * This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. * - * @summary Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersAbortOperation.json + * @summary Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersAbortOperation.json */ async function abortOperationOnManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersCreateOrUpdateSample.ts similarity index 77% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersCreateOrUpdateSample.ts index f201dce40cc3..d1be3a5a8906 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersCreateOrUpdateSample.ts @@ -21,7 +21,121 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_Snapshot.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersAssociate_CRG.json + */ +async function associateManagedClusterWithCapacityReservationGroup() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + capacityReservationGroupID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_MCSnapshot.json + */ +async function createManagedClusterUsingAManagedClusterSnapshot() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableFips: true, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + creationData: { + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1", + }, + dnsPrefix: "dnsprefix1", + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_Snapshot.json */ async function createManagedClusterUsingAnAgentPoolSnapshot() { const subscriptionId = @@ -39,7 +153,7 @@ async function createManagedClusterUsingAnAgentPoolSnapshot() { count: 3, creationData: { sourceResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", }, enableFips: true, enableNodePublicIP: true, @@ -50,7 +164,7 @@ async function createManagedClusterUsingAnAgentPoolSnapshot() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -87,7 +201,64 @@ async function createManagedClusterUsingAnAgentPoolSnapshot() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_ManagedNATGateway.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnableAIToolchainOperator.json + */ +async function createManagedClusterWithAiToolchainOperatorEnabled() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + aiToolchainOperatorProfile: { enabled: true }, + dnsPrefix: "dnsprefix1", + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + networkDataplane: "cilium", + networkPlugin: "azure", + networkPluginMode: "overlay", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_ManagedNATGateway.json */ async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { const subscriptionId = @@ -111,7 +282,7 @@ async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -148,7 +319,7 @@ async function createManagedClusterWithAksManagedNatGatewayAsOutboundType() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json */ async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { const subscriptionId = @@ -177,7 +348,7 @@ async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -214,9 +385,9 @@ async function createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_CRG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnableCustomCATrust.json */ -async function createManagedClusterWithCapacityReservationGroup() { +async function createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCatrustEnabled() { const subscriptionId = process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -229,9 +400,8 @@ async function createManagedClusterWithCapacityReservationGroup() { { name: "nodepool1", type: "VirtualMachineScaleSets", - capacityReservationGroupID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1", count: 3, + enableCustomCATrust: true, enableNodePublicIP: true, mode: "System", osType: "Linux", @@ -255,6 +425,13 @@ async function createManagedClusterWithCapacityReservationGroup() { loadBalancerSku: "standard", outboundType: "loadBalancer", }, + securityProfile: { + customCATrustCertificates: [ + Buffer.from( + "ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=", + ), + ], + }, servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, sku: { name: "Basic", tier: "Free" }, tags: { archv2: "", tier: "production" }, @@ -277,7 +454,7 @@ async function createManagedClusterWithCapacityReservationGroup() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_DedicatedHostGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_DedicatedHostGroup.json */ async function createManagedClusterWithDedicatedHostGroup() { const subscriptionId = @@ -302,7 +479,7 @@ async function createManagedClusterWithDedicatedHostGroup() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -339,7 +516,7 @@ async function createManagedClusterWithDedicatedHostGroup() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnableEncryptionAtHost.json */ async function createManagedClusterWithEncryptionAtHostEnabled() { const subscriptionId = @@ -364,7 +541,7 @@ async function createManagedClusterWithEncryptionAtHostEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -401,7 +578,7 @@ async function createManagedClusterWithEncryptionAtHostEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_EnabledFIPS.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnabledFIPS.json */ async function createManagedClusterWithFipsEnabledOS() { const subscriptionId = @@ -426,7 +603,7 @@ async function createManagedClusterWithFipsEnabledOS() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: false, enableRbac: true, @@ -463,7 +640,7 @@ async function createManagedClusterWithFipsEnabledOS() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_GPUMIG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_GPUMIG.json */ async function createManagedClusterWithGpumig() { const subscriptionId = @@ -488,7 +665,7 @@ async function createManagedClusterWithGpumig() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -531,7 +708,7 @@ async function createManagedClusterWithGpumig() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_HTTPProxy.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_HTTPProxy.json */ async function createManagedClusterWithHttpProxyConfigured() { const subscriptionId = @@ -555,7 +732,7 @@ async function createManagedClusterWithHttpProxyConfigured() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -598,7 +775,7 @@ async function createManagedClusterWithHttpProxyConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_Premium.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_Premium.json */ async function createManagedClusterWithLongTermSupport() { const subscriptionId = @@ -660,7 +837,64 @@ async function createManagedClusterWithLongTermSupport() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_NodeAutoProvisioning.json + */ +async function createManagedClusterWithNodeAutoProvisioning() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + networkDataplane: "cilium", + networkPlugin: "azure", + networkPluginMode: "overlay", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_NodePublicIPPrefix.json */ async function createManagedClusterWithNodePublicIPPrefix() { const subscriptionId = @@ -686,7 +920,7 @@ async function createManagedClusterWithNodePublicIPPrefix() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -723,7 +957,7 @@ async function createManagedClusterWithNodePublicIPPrefix() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_OSSKU.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_OSSKU.json */ async function createManagedClusterWithOssku() { const subscriptionId = @@ -748,7 +982,7 @@ async function createManagedClusterWithOssku() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -791,7 +1025,7 @@ async function createManagedClusterWithOssku() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_PPG.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_PPG.json */ async function createManagedClusterWithPpg() { const subscriptionId = @@ -817,7 +1051,7 @@ async function createManagedClusterWithPpg() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -854,7 +1088,7 @@ async function createManagedClusterWithPpg() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_PodIdentity.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_PodIdentity.json */ async function createManagedClusterWithPodIdentityEnabled() { const subscriptionId = @@ -878,7 +1112,7 @@ async function createManagedClusterWithPodIdentityEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -916,7 +1150,7 @@ async function createManagedClusterWithPodIdentityEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_DisableRunCommand.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_DisableRunCommand.json */ async function createManagedClusterWithRunCommandDisabled() { const subscriptionId = @@ -977,7 +1211,7 @@ async function createManagedClusterWithRunCommandDisabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_SecurityProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_SecurityProfile.json */ async function createManagedClusterWithSecurityProfileConfigured() { const subscriptionId = @@ -1016,7 +1250,6 @@ async function createManagedClusterWithSecurityProfileConfigured() { "/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME", securityMonitoring: { enabled: true }, }, - workloadIdentity: { enabled: true }, }, sku: { name: "Basic", tier: "Free" }, tags: { archv2: "", tier: "production" }, @@ -1035,7 +1268,7 @@ async function createManagedClusterWithSecurityProfileConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_EnableUltraSSD.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_EnableUltraSSD.json */ async function createManagedClusterWithUltraSsdEnabled() { const subscriptionId = @@ -1060,7 +1293,7 @@ async function createManagedClusterWithUltraSsdEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1097,7 +1330,63 @@ async function createManagedClusterWithUltraSsdEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_VirtualMachines.json + */ +async function createManagedClusterWithVirtualMachinesPoolType() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachines", + count: 3, + enableFips: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS2_v2", + }, + ], + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enablePodSecurityPolicy: false, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json */ async function createManagedClusterWithWebAppRoutingIngressProfileConfigured() { const subscriptionId = @@ -1155,7 +1444,7 @@ async function createManagedClusterWithWebAppRoutingIngressProfileConfigured() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UserAssignedNATGateway.json */ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { const subscriptionId = @@ -1179,7 +1468,7 @@ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1215,7 +1504,7 @@ async function createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json */ async function createManagedPrivateClusterWithPublicFqdnSpecified() { const subscriptionId = @@ -1279,7 +1568,7 @@ async function createManagedPrivateClusterWithPublicFqdnSpecified() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json */ async function createManagedPrivateClusterWithFqdnSubdomainSpecified() { const subscriptionId = @@ -1344,7 +1633,7 @@ async function createManagedPrivateClusterWithFqdnSubdomainSpecified() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json */ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { const subscriptionId = @@ -1370,7 +1659,7 @@ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1407,7 +1696,7 @@ async function createOrUpdateAadManagedClusterWithEnableAzureRbac() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_Update.json */ async function createOrUpdateManagedCluster() { const subscriptionId = @@ -1441,14 +1730,14 @@ async function createOrUpdateManagedCluster() { skipNodesWithSystemPods: "false", }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1468,7 +1757,7 @@ async function createOrUpdateManagedCluster() { tags: { archv2: "", tier: "production" }, upgradeSettings: { overrideSettings: { - forceUpgrade: false, + forceUpgrade: true, until: new Date("2022-11-01T13:00:00Z"), }, }, @@ -1491,7 +1780,7 @@ async function createOrUpdateManagedCluster() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_AzureServiceMesh.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_AzureServiceMesh.json */ async function createOrUpdateManagedClusterWithAzureServiceMesh() { const subscriptionId = @@ -1520,7 +1809,7 @@ async function createOrUpdateManagedClusterWithAzureServiceMesh() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, @@ -1576,7 +1865,7 @@ async function createOrUpdateManagedClusterWithAzureServiceMesh() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_UpdateWithAHUB.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UpdateWithAHUB.json */ async function createOrUpdateManagedClusterWithEnableAhub() { const subscriptionId = @@ -1601,14 +1890,14 @@ async function createOrUpdateManagedClusterWithEnableAhub() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1646,7 +1935,70 @@ async function createOrUpdateManagedClusterWithEnableAhub() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json + */ +async function createOrUpdateManagedClusterWithEnableNamespaceResources() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: ManagedCluster = { + addonProfiles: {}, + agentPoolProfiles: [ + { + name: "nodepool1", + type: "VirtualMachineScaleSets", + availabilityZones: ["1", "2", "3"], + count: 3, + enableNodePublicIP: true, + mode: "System", + osType: "Linux", + vmSize: "Standard_DS1_v2", + }, + ], + autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, + diskEncryptionSetID: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + dnsPrefix: "dnsprefix1", + enableNamespaceResources: true, + enablePodSecurityPolicy: true, + enableRbac: true, + kubernetesVersion: "", + linuxProfile: { + adminUsername: "azureuser", + ssh: { publicKeys: [{ keyData: "keydata" }] }, + }, + location: "location1", + networkProfile: { + loadBalancerProfile: { managedOutboundIPs: { count: 2 } }, + loadBalancerSku: "standard", + outboundType: "loadBalancer", + }, + servicePrincipalProfile: { clientId: "clientid", secret: "secret" }, + sku: { name: "Basic", tier: "Free" }, + tags: { archv2: "", tier: "production" }, + windowsProfile: { + adminPassword: "replacePassword1234$", + adminUsername: "azureuser", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.beginCreateOrUpdateAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a managed cluster. + * + * @summary Creates or updates a managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_UpdateWindowsGmsa.json */ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { const subscriptionId = @@ -1671,14 +2023,14 @@ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { ], autoScalerProfile: { scaleDownDelayAfterAdd: "15m", scanInterval: "20s" }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1716,7 +2068,7 @@ async function createOrUpdateManagedClusterWithWindowsGMsaEnabled() { * This sample demonstrates how to Creates or updates a managed cluster. * * @summary Creates or updates a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersCreate_DualStackNetworking.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersCreate_DualStackNetworking.json */ async function createOrUpdateManagedClusterWithDualStackNetworking() { const subscriptionId = @@ -1750,14 +2102,14 @@ async function createOrUpdateManagedClusterWithDualStackNetworking() { skipNodesWithSystemPods: "false", }, diskEncryptionSetID: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", dnsPrefix: "dnsprefix1", enablePodSecurityPolicy: true, enableRbac: true, identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourcegroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": + "/subscriptions/00000000000000000000000000000000/resourceGroups/rgName1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -1792,16 +2144,20 @@ async function createOrUpdateManagedClusterWithDualStackNetworking() { } async function main() { + associateManagedClusterWithCapacityReservationGroup(); + createManagedClusterUsingAManagedClusterSnapshot(); createManagedClusterUsingAnAgentPoolSnapshot(); + createManagedClusterWithAiToolchainOperatorEnabled(); createManagedClusterWithAksManagedNatGatewayAsOutboundType(); createManagedClusterWithAzureKeyVaultSecretsProviderAddon(); - createManagedClusterWithCapacityReservationGroup(); + createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCatrustEnabled(); createManagedClusterWithDedicatedHostGroup(); createManagedClusterWithEncryptionAtHostEnabled(); createManagedClusterWithFipsEnabledOS(); createManagedClusterWithGpumig(); createManagedClusterWithHttpProxyConfigured(); createManagedClusterWithLongTermSupport(); + createManagedClusterWithNodeAutoProvisioning(); createManagedClusterWithNodePublicIPPrefix(); createManagedClusterWithOssku(); createManagedClusterWithPpg(); @@ -1809,6 +2165,7 @@ async function main() { createManagedClusterWithRunCommandDisabled(); createManagedClusterWithSecurityProfileConfigured(); createManagedClusterWithUltraSsdEnabled(); + createManagedClusterWithVirtualMachinesPoolType(); createManagedClusterWithWebAppRoutingIngressProfileConfigured(); createManagedClusterWithUserAssignedNatGatewayAsOutboundType(); createManagedPrivateClusterWithPublicFqdnSpecified(); @@ -1817,6 +2174,7 @@ async function main() { createOrUpdateManagedCluster(); createOrUpdateManagedClusterWithAzureServiceMesh(); createOrUpdateManagedClusterWithEnableAhub(); + createOrUpdateManagedClusterWithEnableNamespaceResources(); createOrUpdateManagedClusterWithWindowsGMsaEnabled(); createOrUpdateManagedClusterWithDualStackNetworking(); } diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersDeleteSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersDeleteSample.ts index b6dffd8e0f59..6adb749efe27 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a managed cluster. * * @summary Deletes a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersDelete.json */ async function deleteManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetAccessProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetAccessProfileSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetAccessProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetAccessProfileSample.ts index 0638030dc50e..39b237f907b3 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetAccessProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetAccessProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . * * @summary **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGetAccessProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGetAccessProfile.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetCommandResultSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetCommandResultSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetCommandResultSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetCommandResultSample.ts index 70b1e54c3ec2..20571f386135 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetCommandResultSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetCommandResultSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster. * * @summary Gets the results of a command which has been run on the Managed Cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandResultFailed.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandResultFailed.json */ async function commandFailedResult() { const subscriptionId = @@ -42,7 +42,7 @@ async function commandFailedResult() { * This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster. * * @summary Gets the results of a command which has been run on the Managed Cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandResultSucceed.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandResultSucceed.json */ async function commandSucceedResult() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetGuardrailsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetGuardrailsVersionsSample.ts new file mode 100644 index 000000000000..2d11760e3900 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetGuardrailsVersionsSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains Guardrails version along with its support info and whether it is a default version. + * + * @summary Contains Guardrails version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/GetGuardrailsVersions.json + */ +async function getGuardrailsAvailableVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const version = "v1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.getGuardrailsVersions( + location, + version, + ); + console.log(result); +} + +async function main() { + getGuardrailsAvailableVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetMeshRevisionProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetMeshRevisionProfileSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetMeshRevisionProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetMeshRevisionProfileSample.ts index 2213aa12f0a7..1e14c67be8f4 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetMeshRevisionProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetMeshRevisionProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades * * @summary Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet_MeshRevisionProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json */ async function getAMeshRevisionProfileForAMeshMode() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts index d3bafe13663a..2f2a6128b77d 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetMeshUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets available upgrades for a service mesh in a cluster. * * @summary Gets available upgrades for a service mesh in a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet_MeshUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json */ async function getsVersionCompatibilityAndUpgradeProfileForAServiceMeshInACluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetSafeguardsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetSafeguardsVersionsSample.ts new file mode 100644 index 000000000000..1aac12a3fc47 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetSafeguardsVersionsSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains Safeguards version along with its support info and whether it is a default version. + * + * @summary Contains Safeguards version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/GetSafeguardsVersions.json + */ +async function getSafeguardsAvailableVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const version = "v1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.managedClusters.getSafeguardsVersions( + location, + version, + ); + console.log(result); +} + +async function main() { + getSafeguardsAvailableVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetSample.ts index 05b55dccceba..324c508ba7dd 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a managed cluster. * * @summary Gets a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGet.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetUpgradeProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetUpgradeProfileSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetUpgradeProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetUpgradeProfileSample.ts index bdf6e77a29ed..33ffd17acef9 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersGetUpgradeProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersGetUpgradeProfileSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the upgrade profile of a managed cluster. * * @summary Gets the upgrade profile of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersGetUpgradeProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersGetUpgradeProfile.json */ async function getUpgradeProfileForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListByResourceGroupSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListByResourceGroupSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListByResourceGroupSample.ts index 1336e0c609d6..ae678f072dff 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListByResourceGroupSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists managed clusters in the specified subscription and resource group. * * @summary Lists managed clusters in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListByResourceGroup.json */ async function getManagedClustersByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListClusterAdminCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListClusterAdminCredentialsSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListClusterAdminCredentialsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListClusterAdminCredentialsSample.ts index 6f98741b979d..4f8f7b43582d 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListClusterAdminCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListClusterAdminCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the admin credentials of a managed cluster. * * @summary Lists the admin credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterAdminCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts index 630e4e20c446..a69bd80eedd3 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListClusterMonitoringUserCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the cluster monitoring user credentials of a managed cluster. * * @summary Lists the cluster monitoring user credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListClusterUserCredentialsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListClusterUserCredentialsSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListClusterUserCredentialsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListClusterUserCredentialsSample.ts index 28058dc75583..cecaf8943135 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListClusterUserCredentialsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListClusterUserCredentialsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the user credentials of a managed cluster. * * @summary Lists the user credentials of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersListClusterUserCredentials.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json */ async function getManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListGuardrailsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListGuardrailsVersionsSample.ts new file mode 100644 index 000000000000..6c033400ce5b --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListGuardrailsVersionsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @summary Contains list of Guardrails version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ListGuardrailsVersions.json + */ +async function listGuardrailsVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusters.listGuardrailsVersions( + location, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGuardrailsVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListKubernetesVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListKubernetesVersionsSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListKubernetesVersionsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListKubernetesVersionsSample.ts index b15a4fca38e9..571a451d9c55 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListKubernetesVersionsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListKubernetesVersionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version * * @summary Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/KubernetesVersions_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/KubernetesVersions_List.json */ async function listKubernetesVersions() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListMeshRevisionProfilesSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListMeshRevisionProfilesSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListMeshRevisionProfilesSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListMeshRevisionProfilesSample.ts index ecf4b84dc852..96a39913f418 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListMeshRevisionProfilesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListMeshRevisionProfilesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades * * @summary Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList_MeshRevisionProfiles.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json */ async function listMeshRevisionProfilesInALocation() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts index 59e3b05196cd..d70065846d79 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListMeshUpgradeProfilesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists available upgrades for all service meshes in a specific cluster. * * @summary Lists available upgrades for all service meshes in a specific cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList_MeshUpgradeProfiles.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json */ async function listsVersionCompatibilityAndUpgradeProfileForAllServiceMeshesInACluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts index c9f0a943f62f..36cf46929625 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListOutboundNetworkDependenciesEndpointsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. * * @summary Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/OutboundNetworkDependenciesEndpointsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json */ async function listOutboundNetworkDependenciesEndpointsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListSafeguardsVersionsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListSafeguardsVersionsSample.ts new file mode 100644 index 000000000000..31800e34fd0c --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListSafeguardsVersionsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @summary Contains list of Safeguards version along with its support info and whether it is a default version. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ListSafeguardsVersions.json + */ +async function listSafeguardsVersions() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "location1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedClusters.listSafeguardsVersions( + location, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listSafeguardsVersions(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListSample.ts index 551476d56bfd..26e2259a42b8 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of managed clusters in the specified subscription. * * @summary Gets a list of managed clusters in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersList.json */ async function listManagedClusters() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRebalanceLoadBalancersSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRebalanceLoadBalancersSample.ts new file mode 100644 index 000000000000..186239bbd5b5 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRebalanceLoadBalancersSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RebalanceLoadBalancersRequestBody, + ContainerServiceClient, +} from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Rebalance nodes across specific load balancers. + * + * @summary Rebalance nodes across specific load balancers. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/LoadBalancers_Rebalance.json + */ +async function listAgentPoolsByManagedCluster() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const parameters: RebalanceLoadBalancersRequestBody = { + loadBalancerNames: ["kubernetes"], + }; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = + await client.managedClusters.beginRebalanceLoadBalancersAndWait( + resourceGroupName, + resourceName, + parameters, + ); + console.log(result); +} + +async function main() { + listAgentPoolsByManagedCluster(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersResetAadProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersResetAadProfileSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersResetAadProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersResetAadProfileSample.ts index ee60914e670b..2d909bfefaba 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersResetAadProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersResetAadProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @summary **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersResetAADProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersResetAADProfile.json */ async function resetAadProfile() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersResetServicePrincipalProfileSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersResetServicePrincipalProfileSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersResetServicePrincipalProfileSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersResetServicePrincipalProfileSample.ts index d349987804d7..8837ee49072f 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersResetServicePrincipalProfileSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersResetServicePrincipalProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to This action cannot be performed on a cluster that is not using a service principal * * @summary This action cannot be performed on a cluster that is not using a service principal - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersResetServicePrincipalProfile.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json */ async function resetServicePrincipalProfile() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersRotateClusterCertificatesSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRotateClusterCertificatesSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersRotateClusterCertificatesSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRotateClusterCertificatesSample.ts index 253c3a401dfd..ef19e488e62b 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersRotateClusterCertificatesSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRotateClusterCertificatesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. * * @summary See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersRotateClusterCertificates.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersRotateClusterCertificates.json */ async function rotateClusterCertificates() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts similarity index 91% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts index 71e21f39af7d..026c6a2316be 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRotateServiceAccountSigningKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Rotates the service account signing keys of a managed cluster. * * @summary Rotates the service account signing keys of a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json */ async function rotateClusterServiceAccountSigningKeys() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersRunCommandSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRunCommandSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersRunCommandSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRunCommandSample.ts index b485beec4e64..c6b7eb146aad 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersRunCommandSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersRunCommandSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @summary AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/RunCommandRequest.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/RunCommandRequest.json */ async function submitNewCommand() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersStartSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersStartSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersStartSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersStartSample.ts index f2b7d731b209..beca69137337 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersStartSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersStartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. * * @summary See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersStart.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersStart.json */ async function startManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersStopSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersStopSample.ts similarity index 95% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersStopSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersStopSample.ts index babfe05af301..02c296a2f346 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersStopSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. * * @summary This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersStop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersStop.json */ async function stopManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersUpdateTagsSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersUpdateTagsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersUpdateTagsSample.ts index 028b331d3c31..93786e0599b9 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/managedClustersUpdateTagsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/managedClustersUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags on a managed cluster. * * @summary Updates tags on a managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ManagedClustersUpdateTags.json */ async function updateManagedClusterTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultGetByAgentPoolSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultGetByAgentPoolSample.ts new file mode 100644 index 000000000000..d2d0a606aa7d --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultGetByAgentPoolSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the status of a specific operation in the specified agent pool. + * + * @summary Get the status of a specific operation in the specified agent pool. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultGetByAgentPool.json + */ +async function getOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const agentPoolName = "agentpool1"; + const operationId = "00000000-0000-0000-0000-000000000001"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.operationStatusResultOperations.getByAgentPool( + resourceGroupName, + resourceName, + agentPoolName, + operationId, + ); + console.log(result); +} + +async function main() { + getOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultGetSample.ts new file mode 100644 index 000000000000..eb99a691b156 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultGetSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the status of a specific operation in the specified managed cluster. + * + * @summary Get the status of a specific operation in the specified managed cluster. + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultGet.json + */ +async function getOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const operationId = "00000000-0000-0000-0000-000000000001"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const result = await client.operationStatusResultOperations.get( + resourceGroupName, + resourceName, + operationId, + ); + console.log(result); +} + +async function main() { + getOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultListSample.ts new file mode 100644 index 000000000000..faa8d39fcd0d --- /dev/null +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationStatusResultListSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ContainerServiceClient } from "@azure/arm-containerservice"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of operations in the specified managedCluster + * + * @summary Gets a list of operations in the specified managedCluster + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/OperationStatusResultList.json + */ +async function listOfOperationStatusResult() { + const subscriptionId = + process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1"; + const resourceName = "clustername1"; + const credential = new DefaultAzureCredential(); + const client = new ContainerServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operationStatusResultOperations.list( + resourceGroupName, + resourceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listOfOperationStatusResult(); +} + +main().catch(console.error); diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/operationsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationsListSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/operationsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationsListSample.ts index 3b0b1ba4f6ec..da68aad29ec5 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/operationsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of operations. * * @summary Gets a list of operations. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/Operation_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/Operation_List.json */ async function listAvailableOperationsForTheContainerServiceResourceProvider() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts index c8f7cdc7c83e..bf08e518ceb8 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a private endpoint connection. * * @summary Deletes a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsDelete.json */ async function deletePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsGetSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsGetSample.ts index 00899f089e4c..6ec0dc924fc0 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsGet.json */ async function getPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsListSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsListSample.ts index 69e929501b13..b6dcb5456e49 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsList.json */ async function listPrivateEndpointConnectionsByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts index a4ee8474fd06..0a255d20a774 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateEndpointConnectionsUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates a private endpoint connection. * * @summary Updates a private endpoint connection. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateEndpointConnectionsUpdate.json */ async function updatePrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateLinkResourcesListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateLinkResourcesListSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateLinkResourcesListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateLinkResourcesListSample.ts index 1745cf4d561a..82a32a32169c 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/privateLinkResourcesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/privateLinkResourcesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters * * @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/PrivateLinkResourcesList.json */ async function listPrivateLinkResourcesByManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/resolvePrivateLinkServiceIdPostSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/resolvePrivateLinkServiceIdPostSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/resolvePrivateLinkServiceIdPostSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/resolvePrivateLinkServiceIdPostSample.ts index c4b21d57a932..acf04c39e6cc 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/resolvePrivateLinkServiceIdPostSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/resolvePrivateLinkServiceIdPostSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link service ID for the specified managed cluster. * * @summary Gets the private link service ID for the specified managed cluster. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ResolvePrivateLinkServiceId.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/ResolvePrivateLinkServiceId.json */ async function resolveThePrivateLinkServiceIdForManagedCluster() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsCreateOrUpdateSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsCreateOrUpdateSample.ts index cfd79e400923..0e52917f0a9a 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a snapshot. * * @summary Creates or updates a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsCreate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsCreate.json */ async function createOrUpdateSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsDeleteSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsDeleteSample.ts index f39263f6377f..99e34cb74f99 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a snapshot. * * @summary Deletes a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsDelete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsDelete.json */ async function deleteSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsGetSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsGetSample.ts index 85e8f4c6fe4d..926888d27560 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a snapshot. * * @summary Gets a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsGet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsGet.json */ async function getSnapshot() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsListByResourceGroupSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsListByResourceGroupSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsListByResourceGroupSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsListByResourceGroupSample.ts index 583a5b9d1ac4..b5387e089fcb 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsListByResourceGroupSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists snapshots in the specified subscription and resource group. * * @summary Lists snapshots in the specified subscription and resource group. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsListByResourceGroup.json */ async function listSnapshotsByResourceGroup() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsListSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsListSample.ts index 3fb5ceab6801..624626962837 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of snapshots in the specified subscription. * * @summary Gets a list of snapshots in the specified subscription. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsList.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsList.json */ async function listSnapshots() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsUpdateTagsSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsUpdateTagsSample.ts similarity index 93% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsUpdateTagsSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsUpdateTagsSample.ts index 4d2f734e2f32..b67c6247a0ee 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/snapshotsUpdateTagsSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/snapshotsUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags on a snapshot. * * @summary Updates tags on a snapshot. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/SnapshotsUpdateTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/SnapshotsUpdateTags.json */ async function updateSnapshotTags() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts similarity index 94% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts index 026f11ce7040..ce9bfd5d6934 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a trusted access role binding * * @summary Create or update a trusted access role binding - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json */ async function createOrUpdateATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsDeleteSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsDeleteSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsDeleteSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsDeleteSample.ts index 5b8cba149f0e..0c6129d231eb 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsDeleteSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a trusted access role binding. * * @summary Delete a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Delete.json */ async function deleteATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsGetSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsGetSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsGetSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsGetSample.ts index d5b9e3a4fc6e..91376cb14528 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsGetSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a trusted access role binding. * * @summary Get a trusted access role binding. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_Get.json */ async function getATrustedAccessRoleBinding() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsListSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsListSample.ts index 5115805c6534..103d94bb3168 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRoleBindingsListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRoleBindingsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List trusted access role bindings. * * @summary List trusted access role bindings. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoleBindings_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoleBindings_List.json */ async function listTrustedAccessRoleBindings() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRolesListSample.ts b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRolesListSample.ts similarity index 92% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRolesListSample.ts rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRolesListSample.ts index a78d08fe54ea..6d196dbd0569 100644 --- a/sdk/containerservice/arm-containerservice/samples/v21/typescript/src/trustedAccessRolesListSample.ts +++ b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/src/trustedAccessRolesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List supported trusted access roles. * * @summary List supported trusted access roles. - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/TrustedAccessRoles_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-09-02-preview/examples/TrustedAccessRoles_List.json */ async function listTrustedAccessRoles() { const subscriptionId = diff --git a/sdk/containerservice/arm-containerservice/samples/v21/typescript/tsconfig.json b/sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/tsconfig.json similarity index 100% rename from sdk/containerservice/arm-containerservice/samples/v21/typescript/tsconfig.json rename to sdk/containerservice/arm-containerservice/samples/v21-beta/typescript/tsconfig.json diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index e7bedcbfa530..433b6ae0ed01 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -19,26 +19,32 @@ import { ManagedClustersImpl, MaintenanceConfigurationsImpl, AgentPoolsImpl, + MachinesImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, ResolvePrivateLinkServiceIdImpl, + OperationStatusResultOperationsImpl, SnapshotsImpl, - TrustedAccessRoleBindingsImpl, + ManagedClusterSnapshotsImpl, TrustedAccessRolesImpl, - MachinesImpl, + TrustedAccessRoleBindingsImpl, + LoadBalancersImpl, } from "./operations"; import { Operations, ManagedClusters, MaintenanceConfigurations, AgentPools, + Machines, PrivateEndpointConnections, PrivateLinkResources, ResolvePrivateLinkServiceId, + OperationStatusResultOperations, Snapshots, - TrustedAccessRoleBindings, + ManagedClusterSnapshots, TrustedAccessRoles, - Machines, + TrustedAccessRoleBindings, + LoadBalancers, } from "./operationsInterfaces"; import { ContainerServiceClientOptionalParams } from "./models"; @@ -74,7 +80,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-containerservice/21.3.1`; + const packageDetails = `azsdk-js-arm-containerservice/21.4.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -128,20 +134,24 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-09-01"; + this.apiVersion = options.apiVersion || "2024-09-02-preview"; this.operations = new OperationsImpl(this); this.managedClusters = new ManagedClustersImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); this.agentPools = new AgentPoolsImpl(this); + this.machines = new MachinesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.resolvePrivateLinkServiceId = new ResolvePrivateLinkServiceIdImpl( this, ); + this.operationStatusResultOperations = + new OperationStatusResultOperationsImpl(this); this.snapshots = new SnapshotsImpl(this); - this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsImpl(this); + this.managedClusterSnapshots = new ManagedClusterSnapshotsImpl(this); this.trustedAccessRoles = new TrustedAccessRolesImpl(this); - this.machines = new MachinesImpl(this); + this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsImpl(this); + this.loadBalancers = new LoadBalancersImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -177,11 +187,14 @@ export class ContainerServiceClient extends coreClient.ServiceClient { managedClusters: ManagedClusters; maintenanceConfigurations: MaintenanceConfigurations; agentPools: AgentPools; + machines: Machines; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; resolvePrivateLinkServiceId: ResolvePrivateLinkServiceId; + operationStatusResultOperations: OperationStatusResultOperations; snapshots: Snapshots; - trustedAccessRoleBindings: TrustedAccessRoleBindings; + managedClusterSnapshots: ManagedClusterSnapshots; trustedAccessRoles: TrustedAccessRoles; - machines: Machines; + trustedAccessRoleBindings: TrustedAccessRoleBindings; + loadBalancers: LoadBalancers; } diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index bbc83c760aa1..2847dfb04365 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -180,6 +180,12 @@ export interface PowerState { code?: Code; } +/** Data used when creating a target resource from a source resource. */ +export interface CreationData { + /** This is the ARM ID of the source object to be used to create the target object. */ + sourceResourceId?: string; +} + /** Properties for the container service agent pool profile. */ export interface ManagedClusterAgentPoolProfileProperties { /** @@ -199,15 +205,19 @@ export interface ManagedClusterAgentPoolProfileProperties { kubeletDiskType?: KubeletDiskType; /** Determines the type of workload a node can run. */ workloadRuntime?: WorkloadRuntime; + /** A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). */ + messageOfTheDay?: string; /** If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ vnetSubnetID?: string; /** If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ podSubnetID?: string; + /** The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. */ + podIPAllocationMode?: PodIPAllocationMode; /** The maximum number of pods that can run on a node. */ maxPods?: number; /** The operating system type. The default is Linux. */ osType?: OSType; - /** Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. */ + /** Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. */ osSKU?: Ossku; /** The maximum number of nodes for auto-scaling */ maxCount?: number; @@ -221,10 +231,10 @@ export interface ManagedClusterAgentPoolProfileProperties { type?: AgentPoolType; /** A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools */ mode?: AgentPoolMode; - /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ + /** Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ orchestratorVersion?: string; /** - * If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. + * If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion was , this field will contain the full version being used. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentOrchestratorVersion?: string; @@ -246,6 +256,8 @@ export interface ManagedClusterAgentPoolProfileProperties { availabilityZones?: string[]; /** Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false. */ enableNodePublicIP?: boolean; + /** When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded certificates into node trust stores. Defaults to false. */ + enableCustomCATrust?: boolean; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} */ nodePublicIPPrefixID?: string; /** The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. */ @@ -260,6 +272,8 @@ export interface ManagedClusterAgentPoolProfileProperties { nodeLabels?: { [propertyName: string]: string }; /** The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. */ nodeTaints?: string[]; + /** These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-` */ + nodeInitializationTaints?: string[]; /** The ID for Proximity Placement Group. */ proximityPlacementGroupID?: string; /** The Kubelet configuration on the agent pool nodes. */ @@ -280,22 +294,36 @@ export interface ManagedClusterAgentPoolProfileProperties { capacityReservationGroupID?: string; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ hostGroupID?: string; - /** Network-related settings of an agent pool. */ - networkProfile?: AgentPoolNetworkProfile; /** The Windows agent pool's specific profile. */ windowsProfile?: AgentPoolWindowsProfile; + /** Network-related settings of an agent pool. */ + networkProfile?: AgentPoolNetworkProfile; /** The security settings of an agent pool. */ securityProfile?: AgentPoolSecurityProfile; + /** The GPU settings of an agent pool. */ + gpuProfile?: AgentPoolGPUProfile; + /** Configuration for using artifact streaming on AKS. */ + artifactStreamingProfile?: AgentPoolArtifactStreamingProfile; + /** Specifications on VirtualMachines agent pool. */ + virtualMachinesProfile?: VirtualMachinesProfile; + /** The status of nodes in a VirtualMachines agent pool. */ + virtualMachineNodesStatus?: VirtualMachineNodes[]; + /** Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway. */ + gatewayProfile?: AgentPoolGatewayProfile; } /** Settings for upgrading an agentpool */ export interface AgentPoolUpgradeSettings { - /** This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade */ + /** This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster */ maxSurge?: string; + /** This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster */ + maxUnavailable?: string; /** The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. */ drainTimeoutInMinutes?: number; /** The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 minutes. */ nodeSoakDurationInMinutes?: number; + /** Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes. */ + undrainableNodeBehavior?: UndrainableNodeBehavior; } /** See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. */ @@ -322,6 +350,8 @@ export interface KubeletConfig { containerLogMaxFiles?: number; /** The maximum number of processes per pod. */ podMaxPids?: number; + /** Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by default. */ + seccompDefault?: SeccompDefault; } /** See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. */ @@ -396,10 +426,10 @@ export interface SysctlConfig { vmVfsCachePressure?: number; } -/** Data used when creating a target resource from a source resource. */ -export interface CreationData { - /** This is the ARM ID of the source object to be used to create the target object. */ - sourceResourceId?: string; +/** The Windows agent pool's specific profile. */ +export interface AgentPoolWindowsProfile { + /** The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. */ + disableOutboundNat?: boolean; } /** Network settings of an agent pool. */ @@ -430,20 +460,74 @@ export interface PortRange { protocol?: Protocol; } -/** The Windows agent pool's specific profile. */ -export interface AgentPoolWindowsProfile { - /** The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. */ - disableOutboundNat?: boolean; -} - /** The security settings of an agent pool. */ export interface AgentPoolSecurityProfile { + /** SSH access method of an agent pool. */ + sshAccess?: AgentPoolSSHAccess; /** vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. */ enableVtpm?: boolean; /** Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. */ enableSecureBoot?: boolean; } +export interface AgentPoolGPUProfile { + /** The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU Driver Installation can only be set true when VM has an associated GPU resource. Setting this field to false prevents automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform GPU driver installation themselves. */ + installGPUDriver?: boolean; + /** Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool has been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. */ + driverType?: DriverType; +} + +export interface AgentPoolArtifactStreamingProfile { + /** Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use this feature, container images must also enable artifact streaming on ACR. If not specified, the default is false. */ + enabled?: boolean; +} + +/** Specifications on VirtualMachines agent pool. */ +export interface VirtualMachinesProfile { + /** Specifications on how to scale a VirtualMachines agent pool. */ + scale?: ScaleProfile; +} + +/** Specifications on how to scale a VirtualMachines agent pool. */ +export interface ScaleProfile { + /** Specifications on how to scale the VirtualMachines agent pool to a fixed size. */ + manual?: ManualScaleProfile[]; + /** Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range. Currently, at most one AutoScaleProfile is allowed. */ + autoscale?: AutoScaleProfile[]; +} + +/** Specifications on number of machines. */ +export interface ManualScaleProfile { + /** The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', 'Standard_D16s_v5']. AKS will use the first available one when scaling. If a VM size is unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. */ + sizes?: string[]; + /** Number of nodes. */ + count?: number; +} + +/** Specifications on auto-scaling. */ +export interface AutoScaleProfile { + /** The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', 'Standard_D16s_v5']. AKS will use the first available one when auto scaling. If a VM size is unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. */ + sizes?: string[]; + /** The minimum number of nodes of the specified sizes. */ + minCount?: number; + /** The maximum number of nodes of the specified sizes. */ + maxCount?: number; +} + +/** Current status on a group of nodes of the same vm size. */ +export interface VirtualMachineNodes { + /** The VM size of the agents used to host this group of nodes. */ + size?: string; + /** Number of nodes. */ + count?: number; +} + +/** Profile of the managed cluster gateway agent pool. */ +export interface AgentPoolGatewayProfile { + /** The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31. */ + publicIPPrefixSize?: number; +} + /** Profile for Linux VMs in the container service cluster. */ export interface ContainerServiceLinuxProfile { /** The administrator username to use for Linux VMs. */ @@ -596,7 +680,7 @@ export interface ManagedClusterOidcIssuerProfile { /** Node resource group lockdown profile for a managed cluster. */ export interface ManagedClusterNodeResourceGroupProfile { - /** The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' */ + /** The restriction level applied to the cluster's node resource group */ restrictionLevel?: RestrictionLevel; } @@ -604,7 +688,7 @@ export interface ManagedClusterNodeResourceGroupProfile { export interface ContainerServiceNetworkProfile { /** Network plugin used for building the Kubernetes network. */ networkPlugin?: NetworkPlugin; - /** The mode the network plugin should use. */ + /** Network plugin mode used for building the Kubernetes network. */ networkPluginMode?: NetworkPluginMode; /** Network policy used for building the Kubernetes network. */ networkPolicy?: NetworkPolicy; @@ -612,8 +696,6 @@ export interface ContainerServiceNetworkProfile { networkMode?: NetworkMode; /** Network dataplane used in the Kubernetes cluster. */ networkDataplane?: NetworkDataplane; - /** Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see aka.ms/aksadvancednetworking. */ - advancedNetworking?: AdvancedNetworking; /** A CIDR notation IP range from which to assign pod IPs when kubenet is used. */ podCidr?: string; /** A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. */ @@ -628,34 +710,20 @@ export interface ContainerServiceNetworkProfile { loadBalancerProfile?: ManagedClusterLoadBalancerProfile; /** Profile of the cluster NAT gateway. */ natGatewayProfile?: ManagedClusterNATGatewayProfile; + /** The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. */ + staticEgressGatewayProfile?: ManagedClusterStaticEgressGatewayProfile; /** One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. */ podCidrs?: string[]; /** One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with any Subnet IP ranges. */ serviceCidrs?: string[]; /** IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6. */ ipFamilies?: IpFamily[]; -} - -/** Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see aka.ms/aksadvancednetworking. */ -export interface AdvancedNetworking { - /** Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, the default is false. */ - enabled?: boolean; - /** Observability profile to enable advanced network metrics and flow logs with historical contexts. */ - observability?: AdvancedNetworkingObservability; - /** Security profile to enable security features on cilium based cluster. */ - security?: AdvancedNetworkingSecurity; -} - -/** Observability profile to enable advanced network metrics and flow logs with historical contexts. */ -export interface AdvancedNetworkingObservability { - /** Indicates the enablement of Advanced Networking observability functionalities on clusters. */ - enabled?: boolean; -} - -/** Security profile to enable security features on cilium based cluster. */ -export interface AdvancedNetworkingSecurity { - /** This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based clusters. If not specified, the default is false. */ - enabled?: boolean; + /** Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. */ + podLinkLocalAccess?: PodLinkLocalAccess; + /** Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes version 1.23 would be '1-23'. */ + kubeProxyConfig?: ContainerServiceNetworkProfileKubeProxyConfig; + /** Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see aka.ms/aksadvancednetworking. */ + advancedNetworking?: AdvancedNetworking; } /** Profile of the managed cluster load balancer. */ @@ -676,6 +744,8 @@ export interface ManagedClusterLoadBalancerProfile { enableMultipleStandardLoadBalancers?: boolean; /** The type of the managed inbound Load Balancer BackendPool. */ backendPoolType?: BackendPoolType; + /** The health probing behavior for External Traffic Policy Cluster services. */ + clusterServiceLoadBalancerHealthProbeMode?: ClusterServiceLoadBalancerHealthProbeMode; } /** Desired managed outbound IPs for the cluster load balancer. */ @@ -720,6 +790,56 @@ export interface ManagedClusterManagedOutboundIPProfile { count?: number; } +/** The Static Egress Gateway addon configuration for the cluster. */ +export interface ManagedClusterStaticEgressGatewayProfile { + /** Indicates if Static Egress Gateway addon is enabled or not. */ + enabled?: boolean; +} + +/** Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes version 1.23 would be '1-23'. */ +export interface ContainerServiceNetworkProfileKubeProxyConfig { + /** Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). */ + enabled?: boolean; + /** Specify which proxy mode to use ('IPTABLES' or 'IPVS') */ + mode?: Mode; + /** Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. */ + ipvsConfig?: ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; +} + +/** Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. */ +export interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig { + /** IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. */ + scheduler?: IpvsScheduler; + /** The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. */ + tcpTimeoutSeconds?: number; + /** The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. */ + tcpFinTimeoutSeconds?: number; + /** The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. */ + udpTimeoutSeconds?: number; +} + +/** Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information see aka.ms/aksadvancednetworking. */ +export interface AdvancedNetworking { + /** Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. When this is set to true, all observability and security features will be set to enabled unless explicitly disabled. If not specified, the default is false. */ + enabled?: boolean; + /** Observability profile to enable advanced network metrics and flow logs with historical contexts. */ + observability?: AdvancedNetworkingObservability; + /** Security profile to enable security features on cilium based cluster. */ + security?: AdvancedNetworkingSecurity; +} + +/** Observability profile to enable advanced network metrics and flow logs with historical contexts. */ +export interface AdvancedNetworkingObservability { + /** Indicates the enablement of Advanced Networking observability functionalities on clusters. */ + enabled?: boolean; +} + +/** Security profile to enable security features on cilium based cluster. */ +export interface AdvancedNetworkingSecurity { + /** This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based clusters. If not specified, the default is false. */ + enabled?: boolean; +} + /** For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). */ export interface ManagedClusterAADProfile { /** Whether to enable managed AAD. */ @@ -742,7 +862,7 @@ export interface ManagedClusterAADProfile { export interface ManagedClusterAutoUpgradeProfile { /** For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). */ upgradeChannel?: UpgradeChannel; - /** Manner in which the OS on your nodes is updated. The default is NodeImage. */ + /** The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. */ nodeOSUpgradeChannel?: NodeOSUpgradeChannel; } @@ -770,7 +890,7 @@ export interface ManagedClusterPropertiesAutoScalerProfile { daemonsetEvictionForOccupiedNodes?: boolean; /** If set to true, the resources used by daemonset will be taken into account when making scaling down decisions. */ ignoreDaemonsetsUtilization?: boolean; - /** If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information. */ + /** Available values are: 'least-waste', 'most-pods', 'priority', 'random'. */ expander?: Expander; /** The default is 10. */ maxEmptyBulkDelete?: string; @@ -816,6 +936,10 @@ export interface ManagedClusterAPIServerAccessProfile { enablePrivateClusterPublicFqdn?: boolean; /** Whether to disable run command for the cluster or not. */ disableRunCommand?: boolean; + /** Whether to enable apiserver vnet integration for the cluster or not. */ + enableVnetIntegration?: boolean; + /** It is required when: 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet integration. */ + subnetId?: string; } /** A private link resource */ @@ -845,6 +969,11 @@ export interface ManagedClusterHttpProxyConfig { httpsProxy?: string; /** The endpoints that should not go through proxy. */ noProxy?: string[]; + /** + * A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset of noProxy and values injected by AKS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly effectiveNoProxy?: string[]; /** Alternative CA cert to use for connecting to proxy servers. */ trustedCa?: string; } @@ -859,6 +988,12 @@ export interface ManagedClusterSecurityProfile { workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; /** Image Cleaner settings for the security profile. */ imageCleaner?: ManagedClusterSecurityProfileImageCleaner; + /** Image integrity is a feature that works with Azure Policy to verify image integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image signatures. See https://aka.ms/aks/image-integrity for how to use this feature via policy. */ + imageIntegrity?: ManagedClusterSecurityProfileImageIntegrity; + /** [Node Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) settings for the security profile. */ + nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction; + /** A list of up to 10 base64 encoded CAs that will be added to the trust store on nodes with the Custom CA Trust feature enabled. For more information see [Custom CA Trust Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority) */ + customCATrustCertificates?: Uint8Array[]; } /** Microsoft Defender settings for the security profile. */ @@ -901,6 +1036,18 @@ export interface ManagedClusterSecurityProfileImageCleaner { intervalHours?: number; } +/** Image integrity related settings for the security profile. */ +export interface ManagedClusterSecurityProfileImageIntegrity { + /** Whether to enable image integrity. The default value is false. */ + enabled?: boolean; +} + +/** Node Restriction settings for the security profile. */ +export interface ManagedClusterSecurityProfileNodeRestriction { + /** Whether to enable Node Restriction */ + enabled?: boolean; +} + /** Storage profile for the container service cluster. */ export interface ManagedClusterStorageProfile { /** AzureDisk CSI Driver settings for the storage profile. */ @@ -917,6 +1064,8 @@ export interface ManagedClusterStorageProfile { export interface ManagedClusterStorageProfileDiskCSIDriver { /** Whether to enable AzureDisk CSI Driver. The default value is true. */ enabled?: boolean; + /** The version of AzureDisk CSI Driver. The default value is v1. */ + version?: string; } /** AzureFile CSI Driver settings for the storage profile. */ @@ -939,28 +1088,34 @@ export interface ManagedClusterStorageProfileBlobCSIDriver { /** Ingress profile for the container service cluster. */ export interface ManagedClusterIngressProfile { - /** App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. */ + /** Web App Routing settings for the ingress profile. */ webAppRouting?: ManagedClusterIngressProfileWebAppRouting; } -/** Application Routing add-on settings for the ingress profile. */ +/** Web App Routing settings for the ingress profile. */ export interface ManagedClusterIngressProfileWebAppRouting { - /** Whether to enable the Application Routing add-on. */ + /** Whether to enable Web App Routing. */ enabled?: boolean; - /** Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group. */ + /** Resource IDs of the DNS zones to be associated with the Web App Routing add-on. Used only when Web App Routing is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group. */ dnsZoneResourceIds?: string[]; + /** Configuration for the default NginxIngressController. See more at https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. */ + nginx?: ManagedClusterIngressProfileNginx; /** - * Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more instructions. + * Managed identity of the Web Application Routing add-on. This is the identity that should be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more instructions. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly identity?: UserAssignedIdentity; } +export interface ManagedClusterIngressProfileNginx { + /** Ingress type for the default NginxIngressController custom resource */ + defaultIngressControllerType?: NginxIngressControllerType; +} + /** Workload Auto-scaler profile for the managed cluster. */ export interface ManagedClusterWorkloadAutoScalerProfile { /** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ keda?: ManagedClusterWorkloadAutoScalerProfileKeda; - /** VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. */ verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; } @@ -970,34 +1125,100 @@ export interface ManagedClusterWorkloadAutoScalerProfileKeda { enabled: boolean; } -/** VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. */ export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { - /** Whether to enable VPA. Default value is false. */ + /** Whether to enable VPA add-on in cluster. Default value is false. */ enabled: boolean; + /** Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. */ + addonAutoscaling?: AddonAutoscaling; } -/** Azure Monitor addon profiles for monitoring the managed cluster. */ +/** Prometheus addon profile for the container service cluster */ export interface ManagedClusterAzureMonitorProfile { - /** Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. */ + /** Metrics profile for the prometheus service addon */ metrics?: ManagedClusterAzureMonitorProfileMetrics; + /** Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. */ + containerInsights?: ManagedClusterAzureMonitorProfileContainerInsights; + /** Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ + appMonitoring?: ManagedClusterAzureMonitorProfileAppMonitoring; } -/** Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. */ +/** Metrics profile for the prometheus service addon */ export interface ManagedClusterAzureMonitorProfileMetrics { - /** Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. */ + /** Whether to enable the Prometheus collector */ enabled: boolean; - /** Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. */ + /** Kube State Metrics for prometheus addon profile for the container service cluster */ kubeStateMetrics?: ManagedClusterAzureMonitorProfileKubeStateMetrics; } -/** Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. */ +/** Kube State Metrics for prometheus addon profile for the container service cluster */ export interface ManagedClusterAzureMonitorProfileKubeStateMetrics { - /** Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only resource name and namespace labels. */ + /** Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. */ metricLabelsAllowlist?: string; - /** Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric contains only resource name and namespace labels. */ + /** Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric. */ metricAnnotationsAllowList?: string; } +/** Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. */ +export interface ManagedClusterAzureMonitorProfileContainerInsights { + /** Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. */ + enabled?: boolean; + /** Fully Qualified ARM Resource Id of Azure Log Analytics Workspace for storing Azure Monitor Container Insights Logs. */ + logAnalyticsWorkspaceResourceId?: string; + /** The syslog host port. If not specified, the default port is 28330. */ + syslogPort?: number; + /** Indicates whether custom metrics collection has to be disabled or not. If not specified the default is false. No custom metrics will be emitted if this field is false but the container insights enabled field is false */ + disableCustomMetrics?: boolean; + /** Indicates whether prometheus metrics scraping is disabled or not. If not specified the default is false. No prometheus metrics will be emitted if this field is false but the container insights enabled field is false */ + disablePrometheusMetricsScraping?: boolean; +} + +/** Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ +export interface ManagedClusterAzureMonitorProfileAppMonitoring { + /** Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ + autoInstrumentation?: ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation; + /** Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ + openTelemetryMetrics?: ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics; + /** Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ + openTelemetryLogs?: ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs; +} + +/** Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ +export interface ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation { + /** Indicates if Application Monitoring Auto Instrumentation is enabled or not. */ + enabled?: boolean; +} + +/** Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ +export interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics { + /** Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. */ + enabled?: boolean; + /** The Open Telemetry host port for Open Telemetry metrics. If not specified, the default port is 28333. */ + port?: number; +} + +/** Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. */ +export interface ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs { + /** Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. */ + enabled?: boolean; + /** The Open Telemetry host port for Open Telemetry logs and traces. If not specified, the default port is 28331. */ + port?: number; +} + +/** The Safeguards profile. */ +export interface SafeguardsProfile { + /** + * List of namespaces specified by AKS to be excluded from Safeguards + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemExcludedNamespaces?: string[]; + /** The version of constraints to use */ + version?: string; + /** The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS excludes via systemExcludedNamespaces */ + level: Level; + /** List of namespaces excluded from Safeguards checks */ + excludedNamespaces?: string[]; +} + /** Service mesh profile for a managed cluster. */ export interface ServiceMeshProfile { /** Mode of the service mesh. */ @@ -1070,6 +1291,25 @@ export interface ManagedClusterCostAnalysis { enabled?: boolean; } +/** When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator automates the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and enables distributed inference against them. */ +export interface ManagedClusterAIToolchainOperatorProfile { + /** Indicates if AI toolchain operator enabled or not. */ + enabled?: boolean; +} + +export interface ManagedClusterNodeProvisioningProfile { + /** Once the mode it set to Auto, it cannot be changed back to Manual. */ + mode?: NodeProvisioningMode; +} + +/** The bootstrap profile. */ +export interface ManagedClusterBootstrapProfile { + /** The source where the artifacts are downloaded from. */ + artifactSource?: ArtifactSource; + /** The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. */ + containerRegistryId?: string; +} + /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** @@ -1143,6 +1383,8 @@ export interface ManagedClusterPoolUpgradeProfile { osType: OSType; /** List of orchestrator types and versions available for upgrade. */ upgrades?: ManagedClusterPoolUpgradeProfileUpgradesItem[]; + /** List of components grouped by kubernetes major.minor version. */ + componentsByReleases?: ComponentsByRelease[]; } export interface ManagedClusterPoolUpgradeProfileUpgradesItem { @@ -1152,6 +1394,23 @@ export interface ManagedClusterPoolUpgradeProfileUpgradesItem { isPreview?: boolean; } +/** components of given Kubernetes version. */ +export interface ComponentsByRelease { + /** The Kubernetes version (major.minor). */ + kubernetesVersion?: string; + /** components of current or upgraded Kubernetes version in the cluster. */ + components?: Component[]; +} + +export interface Component { + /** Component name. */ + name?: string; + /** Component version. */ + version?: string; + /** If upgraded component version contains breaking changes from the current version. To see a detailed description of what the breaking changes are, visit https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. */ + hasBreakingChanges?: boolean; +} + /** The list credential result response. */ export interface CredentialResults { /** @@ -1262,7 +1521,7 @@ export interface AbsoluteMonthlySchedule { export interface RelativeMonthlySchedule { /** Specifies the number of months between each set of occurrences. */ intervalMonths: number; - /** Specifies on which week of the month the dayOfWeek applies. */ + /** Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. */ weekIndex: Type; /** Specifies on which day of the week the maintenance occurs. */ dayOfWeek: WeekDay; @@ -1329,6 +1588,8 @@ export interface AgentPoolUpgradeProfile { osType: OSType; /** List of orchestrator types and versions available for upgrade. */ upgrades?: AgentPoolUpgradeProfilePropertiesUpgradesItem[]; + /** List of components grouped by kubernetes major.minor version. */ + componentsByReleases?: ComponentsByRelease[]; /** The latest AKS supported node image version. */ latestNodeImageVersion?: string; } @@ -1395,6 +1656,54 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } +/** The response from the List Machines operation. */ +export interface MachineListResult { + /** The list of Machines in cluster. */ + value?: Machine[]; + /** + * The URL to get the next set of machine results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The properties of the machine */ +export interface MachineProperties { + /** + * network properties of the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly network?: MachineNetworkProperties; + /** + * Arm resource id of the machine. It can be used to GET underlying VM Instance + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceId?: string; +} + +/** network properties of the machine */ +export interface MachineNetworkProperties { + /** + * IPv4, IPv6 addresses of the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipAddresses?: MachineIpAddress[]; +} + +/** The machine IP address details. */ +export interface MachineIpAddress { + /** + * To determine if address belongs IPv4 or IPv6 family + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly family?: IpFamily; + /** + * IPv4 or IPv6 address of the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ip?: string; +} + /** The list of available versions for an agent pool. */ export interface AgentPoolAvailableVersions { /** @@ -1567,82 +1876,105 @@ export interface EndpointDetail { description?: string; } -/** The response from the List Snapshots operation. */ -export interface SnapshotListResult { - /** The list of snapshots. */ - value?: Snapshot[]; +/** The operations list. It contains an URL link to get the next set of results. */ +export interface OperationStatusResultList { /** - * The URL to get the next set of snapshot results. + * List of operations * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Holds an array of MeshRevisionsProfiles */ -export interface MeshRevisionProfileList { - /** Array of service mesh add-on revision profiles for all supported mesh modes. */ - value?: MeshRevisionProfile[]; + readonly value?: OperationStatusResult[]; /** - * The URL to get the next set of mesh revision profile. + * URL to get the next set of operation list results (if there are any). * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly nextLink?: string; } -/** Mesh revision profile properties for a mesh */ -export interface MeshRevisionProfileProperties { - meshRevisions?: MeshRevision[]; -} - -/** Holds information on upgrades and compatibility for given major.minor mesh release. */ -export interface MeshRevision { - /** The revision of the mesh release. */ - revision?: string; - /** List of revisions available for upgrade of a specific mesh revision */ - upgrades?: string[]; - /** List of items this revision of service mesh is compatible with, and their associated versions. */ - compatibleWith?: CompatibleVersions[]; -} - -/** Version information about a product/service that is compatible with a service mesh revision. */ -export interface CompatibleVersions { - /** The product/service name. */ +/** The current status of an async operation. */ +export interface OperationStatusResult { + /** Fully qualified ID for the async operation. */ + id?: string; + /** + * Fully qualified ID of the resource against which the original async operation was started. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceId?: string; + /** Name of the async operation. */ name?: string; - /** Product/service versions compatible with a service mesh add-on revision. */ - versions?: string[]; + /** Operation status. */ + status: string; + /** Percent of the operation that is complete. */ + percentComplete?: number; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** The operations list. */ + operations?: OperationStatusResult[]; + /** If present, details of the operation error. */ + error?: ErrorDetail; } -/** Holds an array of MeshUpgradeProfiles */ -export interface MeshUpgradeProfileList { - /** Array of supported service mesh add-on upgrade profiles. */ - value?: MeshUpgradeProfile[]; +/** The response from the List Snapshots operation. */ +export interface SnapshotListResult { + /** The list of snapshots. */ + value?: Snapshot[]; /** - * The URL to get the next set of mesh upgrade profile. + * The URL to get the next set of snapshot results. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly nextLink?: string; } -/** List of trusted access role bindings */ -export interface TrustedAccessRoleBindingListResult { - /** Role binding list */ - value?: TrustedAccessRoleBinding[]; +/** The response from the List Managed Cluster Snapshots operation. */ +export interface ManagedClusterSnapshotListResult { + /** The list of managed cluster snapshots. */ + value?: ManagedClusterSnapshot[]; /** - * Link to next page of resources. + * The URL to get the next set of managed cluster snapshot results. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly nextLink?: string; } -/** List of trusted access roles */ -export interface TrustedAccessRoleListResult { +/** managed cluster properties for snapshot, these properties are read only. */ +export interface ManagedClusterPropertiesForSnapshot { + /** The current kubernetes version. */ + kubernetesVersion?: string; + /** The current managed cluster sku. */ + sku?: ManagedClusterSKU; + /** Whether the cluster has enabled Kubernetes Role-Based Access Control or not. */ + enableRbac?: boolean; /** - * Role list + * The current network profile. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: TrustedAccessRole[]; - /** - * Link to next page of resources. + readonly networkProfile?: NetworkProfileForSnapshot; +} + +/** network profile for managed cluster snapshot, these properties are read only. */ +export interface NetworkProfileForSnapshot { + /** networkPlugin for managed cluster snapshot. */ + networkPlugin?: NetworkPlugin; + /** NetworkPluginMode for managed cluster snapshot. */ + networkPluginMode?: NetworkPluginMode; + /** networkPolicy for managed cluster snapshot. */ + networkPolicy?: NetworkPolicy; + /** networkMode for managed cluster snapshot. */ + networkMode?: NetworkMode; + /** loadBalancerSku for managed cluster snapshot. */ + loadBalancerSku?: LoadBalancerSku; +} + +/** List of trusted access roles */ +export interface TrustedAccessRoleListResult { + /** + * Role list + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: TrustedAccessRole[]; + /** + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly nextLink?: string; @@ -1696,52 +2028,139 @@ export interface TrustedAccessRoleRule { readonly nonResourceURLs?: string[]; } -/** The response from the List Machines operation. */ -export interface MachineListResult { +/** List of trusted access role bindings */ +export interface TrustedAccessRoleBindingListResult { + /** Role binding list */ + value?: TrustedAccessRoleBinding[]; /** - * The URL to get the next set of machine results. + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly nextLink?: string; - /** The list of Machines in cluster. */ - value?: Machine[]; } -/** The properties of the machine */ -export interface MachineProperties { +/** Whether the version is default or not and support info. */ +export interface GuardrailsAvailableVersionsProperties { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly isDefaultVersion?: boolean; /** - * network properties of the machine + * Whether the version is preview or stable. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly network?: MachineNetworkProperties; + readonly support?: GuardrailsSupport; +} + +/** Hold values properties, which is array of GuardrailsVersions */ +export interface GuardrailsAvailableVersionsList { + /** Array of AKS supported Guardrails versions. */ + value?: GuardrailsAvailableVersion[]; /** - * Azure resource id of the machine. It can be used to GET underlying VM Instance + * The URL to get the next Guardrails available version. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resourceId?: string; + readonly nextLink?: string; } -/** network properties of the machine */ -export interface MachineNetworkProperties { +/** Whether the version is default or not and support info. */ +export interface SafeguardsAvailableVersionsProperties { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly isDefaultVersion?: boolean; /** - * IPv4, IPv6 addresses of the machine + * Whether the version is preview or stable. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ipAddresses?: MachineIpAddress[]; + readonly support?: SafeguardsSupport; } -/** The machine IP address details. */ -export interface MachineIpAddress { +/** Hold values properties, which is array of SafeguardsVersions */ +export interface SafeguardsAvailableVersionsList { + /** Array of AKS supported Safeguards versions. */ + value?: SafeguardsAvailableVersion[]; /** - * To determine if address belongs IPv4 or IPv6 family + * The URL to get the next Safeguards available version. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly family?: IpFamily; + readonly nextLink?: string; +} + +/** Holds an array of MeshRevisionsProfiles */ +export interface MeshRevisionProfileList { + /** Array of service mesh add-on revision profiles for all supported mesh modes. */ + value?: MeshRevisionProfile[]; /** - * IPv4 or IPv6 address of the machine + * The URL to get the next set of mesh revision profile. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ip?: string; + readonly nextLink?: string; +} + +/** Mesh revision profile properties for a mesh */ +export interface MeshRevisionProfileProperties { + meshRevisions?: MeshRevision[]; +} + +/** Holds information on upgrades and compatibility for given major.minor mesh release. */ +export interface MeshRevision { + /** The revision of the mesh release. */ + revision?: string; + /** List of revisions available for upgrade of a specific mesh revision */ + upgrades?: string[]; + /** List of items this revision of service mesh is compatible with, and their associated versions. */ + compatibleWith?: CompatibleVersions[]; +} + +/** Version information about a product/service that is compatible with a service mesh revision. */ +export interface CompatibleVersions { + /** The product/service name. */ + name?: string; + /** Product/service versions compatible with a service mesh add-on revision. */ + versions?: string[]; +} + +/** Holds an array of MeshUpgradeProfiles */ +export interface MeshUpgradeProfileList { + /** Array of supported service mesh add-on upgrade profiles. */ + value?: MeshUpgradeProfile[]; + /** + * The URL to get the next set of mesh upgrade profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The response from the List Load Balancers operation. */ +export interface LoadBalancerListResult { + /** The list of Load Balancers. */ + value?: LoadBalancer[]; + /** + * The URL to get the next set of load balancer results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. */ +export interface LabelSelector { + /** matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, and the values array contains only `value`. The requirements are ANDed. */ + matchLabels?: string[]; + /** matchExpressions is a list of label selector requirements. The requirements are ANDed. */ + matchExpressions?: LabelSelectorRequirement[]; +} + +/** A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. */ +export interface LabelSelectorRequirement { + /** key is the label key that the selector applies to. */ + key?: string; + /** operator represents a key's relationship to a set of values. Valid operators are In and NotIn */ + operator?: Operator; + /** values is an array of string values, the values array must be non-empty. */ + values?: string[]; +} + +/** The names of the load balancers to rebalance. If set to empty, all load balancers will be rebalanced. */ +export interface RebalanceLoadBalancersRequestBody { + /** The load balancer names list. */ + loadBalancerNames?: string[]; } /** Profile for the container service agent pool. */ @@ -1763,9 +2182,6 @@ export interface TrackedResource extends Resource { location: string; } -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - /** Defines binding between a resource and role */ export interface TrustedAccessRoleBinding extends Resource { /** @@ -1779,6 +2195,21 @@ export interface TrustedAccessRoleBinding extends Resource { roles: string[]; } +/** Available Guardrails Version */ +export interface GuardrailsAvailableVersion extends Resource { + /** Whether the version is default or not and support info. */ + properties: GuardrailsAvailableVersionsProperties; +} + +/** Available Safeguards Version */ +export interface SafeguardsAvailableVersion extends Resource { + /** Whether the version is default or not and support info. */ + properties: SafeguardsAvailableVersionsProperties; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + /** See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned maintenance. */ export interface MaintenanceConfiguration extends SubResource { /** @@ -1813,15 +2244,19 @@ export interface AgentPool extends SubResource { kubeletDiskType?: KubeletDiskType; /** Determines the type of workload a node can run. */ workloadRuntime?: WorkloadRuntime; + /** A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). */ + messageOfTheDay?: string; /** If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ vnetSubnetID?: string; /** If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ podSubnetID?: string; + /** The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. */ + podIPAllocationMode?: PodIPAllocationMode; /** The maximum number of pods that can run on a node. */ maxPods?: number; /** The operating system type. The default is Linux. */ osType?: OSType; - /** Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. */ + /** Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. */ osSKU?: Ossku; /** The maximum number of nodes for auto-scaling */ maxCount?: number; @@ -1835,10 +2270,10 @@ export interface AgentPool extends SubResource { typePropertiesType?: AgentPoolType; /** A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools */ mode?: AgentPoolMode; - /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ + /** Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ orchestratorVersion?: string; /** - * If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. + * If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion was , this field will contain the full version being used. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentOrchestratorVersion?: string; @@ -1860,6 +2295,8 @@ export interface AgentPool extends SubResource { availabilityZones?: string[]; /** Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false. */ enableNodePublicIP?: boolean; + /** When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded certificates into node trust stores. Defaults to false. */ + enableCustomCATrust?: boolean; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} */ nodePublicIPPrefixID?: string; /** The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. */ @@ -1874,6 +2311,8 @@ export interface AgentPool extends SubResource { nodeLabels?: { [propertyName: string]: string }; /** The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. */ nodeTaints?: string[]; + /** These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-` */ + nodeInitializationTaints?: string[]; /** The ID for Proximity Placement Group. */ proximityPlacementGroupID?: string; /** The Kubelet configuration on the agent pool nodes. */ @@ -1894,12 +2333,22 @@ export interface AgentPool extends SubResource { capacityReservationGroupID?: string; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ hostGroupID?: string; - /** Network-related settings of an agent pool. */ - networkProfile?: AgentPoolNetworkProfile; /** The Windows agent pool's specific profile. */ windowsProfile?: AgentPoolWindowsProfile; + /** Network-related settings of an agent pool. */ + networkProfile?: AgentPoolNetworkProfile; /** The security settings of an agent pool. */ securityProfile?: AgentPoolSecurityProfile; + /** The GPU settings of an agent pool. */ + gpuProfile?: AgentPoolGPUProfile; + /** Configuration for using artifact streaming on AKS. */ + artifactStreamingProfile?: AgentPoolArtifactStreamingProfile; + /** Specifications on VirtualMachines agent pool. */ + virtualMachinesProfile?: VirtualMachinesProfile; + /** The status of nodes in a VirtualMachines agent pool. */ + virtualMachineNodesStatus?: VirtualMachineNodes[]; + /** Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway. */ + gatewayProfile?: AgentPoolGatewayProfile; } /** A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. */ @@ -1927,6 +2376,8 @@ export interface ManagedCluster extends TrackedResource { extendedLocation?: ExtendedLocation; /** The identity of the managed cluster, if configured. */ identity?: ManagedClusterIdentity; + /** This is primarily used to expose different UI experiences in the portal for different kinds */ + kind?: string; /** * The current provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1937,15 +2388,17 @@ export interface ManagedCluster extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly powerState?: PowerState; + /** CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot. */ + creationData?: CreationData; /** * The max number of agent pools for the managed cluster. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly maxAgentPools?: number; - /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. */ + /** When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. */ kubernetesVersion?: string; /** - * If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full version being used. + * The version of Kubernetes the Managed Cluster is running. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentKubernetesVersion?: string; @@ -1984,7 +2437,7 @@ export interface ManagedCluster extends TrackedResource { oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; /** The name of the resource group containing agent pool nodes. */ nodeResourceGroup?: string; - /** Profile of the node resource group configuration. */ + /** The node resource group configuration profile. */ nodeResourceGroupProfile?: ManagedClusterNodeResourceGroupProfile; /** Whether to enable Kubernetes Role-Based Access Control. */ enableRbac?: boolean; @@ -1992,6 +2445,8 @@ export interface ManagedCluster extends TrackedResource { supportPlan?: KubernetesSupportPlan; /** (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. */ enablePodSecurityPolicy?: boolean; + /** The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM Resource. */ + enableNamespaceResources?: boolean; /** The network configuration profile. */ networkProfile?: ContainerServiceNetworkProfile; /** The Azure Active Directory configuration. */ @@ -2024,8 +2479,10 @@ export interface ManagedCluster extends TrackedResource { publicNetworkAccess?: PublicNetworkAccess; /** Workload Auto-scaler profile for the managed cluster. */ workloadAutoScalerProfile?: ManagedClusterWorkloadAutoScalerProfile; - /** Azure Monitor addon profiles for monitoring the managed cluster. */ + /** Prometheus addon profile for the container service cluster */ azureMonitorProfile?: ManagedClusterAzureMonitorProfile; + /** The Safeguards profile holds all the safeguards information for a given cluster */ + safeguardsProfile?: SafeguardsProfile; /** Service mesh profile for a managed cluster. */ serviceMeshProfile?: ServiceMeshProfile; /** @@ -2035,6 +2492,12 @@ export interface ManagedCluster extends TrackedResource { readonly resourceUID?: string; /** Optional cluster metrics configuration. */ metricsProfile?: ManagedClusterMetricsProfile; + /** AI toolchain operator settings that apply to the whole cluster. */ + aiToolchainOperatorProfile?: ManagedClusterAIToolchainOperatorProfile; + /** Node provisioning settings that apply to the whole cluster. */ + nodeProvisioningProfile?: ManagedClusterNodeProvisioningProfile; + /** Profile of the cluster bootstrap configuration. */ + bootstrapProfile?: ManagedClusterBootstrapProfile; } /** Managed cluster Access Profile. */ @@ -2065,7 +2528,7 @@ export interface Snapshot extends TrackedResource { */ readonly osType?: OSType; /** - * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osSku?: Ossku; @@ -2081,6 +2544,19 @@ export interface Snapshot extends TrackedResource { readonly enableFips?: boolean; } +/** A managed cluster snapshot resource. */ +export interface ManagedClusterSnapshot extends TrackedResource { + /** CreationData to be used to specify the source resource ID to create this snapshot. */ + creationData?: CreationData; + /** The type of a snapshot. The default is NodePool. */ + snapshotType?: SnapshotType; + /** + * What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; +} + /** Mesh revision profile for a mesh. */ export interface MeshRevisionProfile extends ProxyResource { /** Mesh revision profile properties for a mesh */ @@ -2093,6 +2569,27 @@ export interface MeshUpgradeProfile extends ProxyResource { properties?: MeshUpgradeProfileProperties; } +/** The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be used. Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a configuration named `kubernetes`. */ +export interface LoadBalancer extends ProxyResource { + /** Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list. */ + namePropertiesName?: string; + /** Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer. */ + primaryAgentPoolName?: string; + /** Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it. */ + allowServicePlacement?: boolean; + /** Only services that must match this selector can be placed on this load balancer. */ + serviceLabelSelector?: LabelSelector; + /** Services created in namespaces that match the selector can be placed on this load balancer. */ + serviceNamespaceSelector?: LabelSelector; + /** Nodes that match this selector will be possible members of this load balancer. */ + nodeSelector?: LabelSelector; + /** + * The current provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +} + /** Defines headers for ManagedClusters_delete operation. */ export interface ManagedClustersDeleteHeaders { /** URL to query for status of the operation. */ @@ -2111,12 +2608,6 @@ export interface ManagedClustersResetAADProfileHeaders { location?: string; } -/** Defines headers for ManagedClusters_rotateClusterCertificates operation. */ -export interface ManagedClustersRotateClusterCertificatesHeaders { - /** URL to query for status of the operation. */ - location?: string; -} - /** Defines headers for ManagedClusters_abortLatestOperation operation. */ export interface ManagedClustersAbortLatestOperationHeaders { /** URL to query for status of the operation. */ @@ -2125,8 +2616,15 @@ export interface ManagedClustersAbortLatestOperationHeaders { azureAsyncOperation?: string; } +/** Defines headers for ManagedClusters_rotateClusterCertificates operation. */ +export interface ManagedClustersRotateClusterCertificatesHeaders { + /** URL to query for status of the operation. */ + location?: string; +} + /** Defines headers for ManagedClusters_rotateServiceAccountSigningKeys operation. */ export interface ManagedClustersRotateServiceAccountSigningKeysHeaders { + /** URL to query for status of the operation. */ location?: string; } @@ -2154,6 +2652,12 @@ export interface ManagedClustersGetCommandResultHeaders { location?: string; } +/** Defines headers for ManagedClusters_rebalanceLoadBalancers operation. */ +export interface ManagedClustersRebalanceLoadBalancersHeaders { + /** URL to query for status of the operation. */ + location?: string; +} + /** Defines headers for AgentPools_abortLatestOperation operation. */ export interface AgentPoolsAbortLatestOperationHeaders { /** URL to query for status of the operation. */ @@ -2186,6 +2690,12 @@ export interface TrustedAccessRoleBindingsDeleteHeaders { location?: string; } +/** Defines headers for LoadBalancers_delete operation. */ +export interface LoadBalancersDeleteHeaders { + /** URL to query for status of the operation. */ + location?: string; +} + /** Known values of {@link KubernetesSupportPlan} that the service accepts. */ export enum KnownKubernetesSupportPlan { /** Support for the version is the same as for the open source Kubernetes offering. Official Kubernetes open source community support versions for 1 year after release. */ @@ -2208,6 +2718,8 @@ export type KubernetesSupportPlan = string; export enum KnownManagedClusterSKUName { /** Base option for the AKS control plane. */ Base = "Base", + /** Automatic clusters are optimized to run most production workloads with configuration that follows AKS best practices and recommendations for cluster and workload setup, scalability, and security. For more details about Automatic clusters see aka.ms\/aks\/automatic. */ + Automatic = "Automatic", } /** @@ -2215,7 +2727,8 @@ export enum KnownManagedClusterSKUName { * {@link KnownManagedClusterSKUName} can be used interchangeably with ManagedClusterSKUName, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Base**: Base option for the AKS control plane. + * **Base**: Base option for the AKS control plane. \ + * **Automatic**: Automatic clusters are optimized to run most production workloads with configuration that follows AKS best practices and recommendations for cluster and workload setup, scalability, and security. For more details about Automatic clusters see aka.ms\/aks\/automatic. */ export type ManagedClusterSKUName = string; @@ -2315,6 +2828,8 @@ export enum KnownWorkloadRuntime { OCIContainer = "OCIContainer", /** Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). */ WasmWasi = "WasmWasi", + /** Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series that support Nested Virtualization such as Dv3 series. */ + KataMshvVmIsolation = "KataMshvVmIsolation", } /** @@ -2323,10 +2838,29 @@ export enum KnownWorkloadRuntime { * this enum contains the known values that the service supports. * ### Known values supported by the service * **OCIContainer**: Nodes will use Kubelet to run standard OCI container workloads. \ - * **WasmWasi**: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + * **WasmWasi**: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). \ + * **KataMshvVmIsolation**: Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series that support Nested Virtualization such as Dv3 series. */ export type WorkloadRuntime = string; +/** Known values of {@link PodIPAllocationMode} that the service accepts. */ +export enum KnownPodIPAllocationMode { + /** Each pod gets a single IP address assigned. This is better for maximizing a small to medium subnet of size \/16 or smaller. The Azure CNI cluster with dynamic IP allocation defaults to this mode if the customer does not explicitly specify a podIPAllocationMode */ + DynamicIndividual = "DynamicIndividual", + /** Each node is statically allocated CIDR block(s) of size \/28 = 16 IPs per block to satisfy the maxPods per node. Number of CIDR blocks >= (maxPods \/ 16). The block, rather than a single IP, counts against the Azure Vnet Private IP limit of 65K. Therefore block mode is suitable for running larger workloads with more than the current limit of 65K pods in a cluster. This mode is better suited to scale with larger subnets of \/15 or bigger */ + StaticBlock = "StaticBlock", +} + +/** + * Defines values for PodIPAllocationMode. \ + * {@link KnownPodIPAllocationMode} can be used interchangeably with PodIPAllocationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DynamicIndividual**: Each pod gets a single IP address assigned. This is better for maximizing a small to medium subnet of size \/16 or smaller. The Azure CNI cluster with dynamic IP allocation defaults to this mode if the customer does not explicitly specify a podIPAllocationMode \ + * **StaticBlock**: Each node is statically allocated CIDR block(s) of size \/28 = 16 IPs per block to satisfy the maxPods per node. Number of CIDR blocks >= (maxPods \/ 16). The block, rather than a single IP, counts against the Azure Vnet Private IP limit of 65K. Therefore block mode is suitable for running larger workloads with more than the current limit of 65K pods in a cluster. This mode is better suited to scale with larger subnets of \/15 or bigger + */ +export type PodIPAllocationMode = string; + /** Known values of {@link OSType} that the service accepts. */ export enum KnownOSType { /** Use Linux. */ @@ -2349,6 +2883,8 @@ export type OSType = string; export enum KnownOssku { /** Use Ubuntu as the OS for node images. */ Ubuntu = "Ubuntu", + /** Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. */ + Mariner = "Mariner", /** Use AzureLinux as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https:\//aka.ms\/azurelinux for more information. */ AzureLinux = "AzureLinux", /** Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. */ @@ -2357,6 +2893,8 @@ export enum KnownOssku { Windows2019 = "Windows2019", /** Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa. */ Windows2022 = "Windows2022", + /** Use Windows Annual Channel version as the OS for node images. Unsupported for system node pools. Details about supported container images and kubernetes versions under different AKS Annual Channel versions could be seen in https:\//aka.ms\/aks\/windows-annual-channel-details. */ + WindowsAnnual = "WindowsAnnual", } /** @@ -2365,10 +2903,12 @@ export enum KnownOssku { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Ubuntu**: Use Ubuntu as the OS for node images. \ + * **Mariner**: Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. \ * **AzureLinux**: Use AzureLinux as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https:\/\/aka.ms\/azurelinux for more information. \ * **CBLMariner**: Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. \ * **Windows2019**: Use Windows2019 as the OS for node images. Unsupported for system node pools. Windows2019 only supports Windows2019 containers; it cannot run Windows2022 containers and vice versa. \ - * **Windows2022**: Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa. + * **Windows2022**: Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa. \ + * **WindowsAnnual**: Use Windows Annual Channel version as the OS for node images. Unsupported for system node pools. Details about supported container images and kubernetes versions under different AKS Annual Channel versions could be seen in https:\/\/aka.ms\/aks\/windows-annual-channel-details. */ export type Ossku = string; @@ -2396,6 +2936,8 @@ export enum KnownAgentPoolType { VirtualMachineScaleSets = "VirtualMachineScaleSets", /** Use of this is strongly discouraged. */ AvailabilitySet = "AvailabilitySet", + /** Create an Agent Pool backed by a Single Instance VM orchestration mode. */ + VirtualMachines = "VirtualMachines", } /** @@ -2404,7 +2946,8 @@ export enum KnownAgentPoolType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **VirtualMachineScaleSets**: Create an Agent Pool backed by a Virtual Machine Scale Set. \ - * **AvailabilitySet**: Use of this is strongly discouraged. + * **AvailabilitySet**: Use of this is strongly discouraged. \ + * **VirtualMachines**: Create an Agent Pool backed by a Single Instance VM orchestration mode. */ export type AgentPoolType = string; @@ -2414,6 +2957,8 @@ export enum KnownAgentPoolMode { System = "System", /** User agent pools are primarily for hosting your application pods. */ User = "User", + /** Gateway agent pools are dedicated to providing static egress IPs to pods. For more details, see https:\//aka.ms\/aks\/static-egress-gateway. */ + Gateway = "Gateway", } /** @@ -2422,10 +2967,29 @@ export enum KnownAgentPoolMode { * this enum contains the known values that the service supports. * ### Known values supported by the service * **System**: System agent pools are primarily for hosting critical system pods such as CoreDNS and metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at least 2vCPUs and 4GB of memory. \ - * **User**: User agent pools are primarily for hosting your application pods. + * **User**: User agent pools are primarily for hosting your application pods. \ + * **Gateway**: Gateway agent pools are dedicated to providing static egress IPs to pods. For more details, see https:\/\/aka.ms\/aks\/static-egress-gateway. */ export type AgentPoolMode = string; +/** Known values of {@link UndrainableNodeBehavior} that the service accepts. */ +export enum KnownUndrainableNodeBehavior { + /** AKS will cordon the blocked nodes and replace them with surge nodes during upgrade. The blocked nodes will be cordoned and replaced by surge nodes. The blocked nodes will have label 'kubernetes.azure.com\/upgrade-status:Quarantined'. A surge node will be retained for each blocked node. A best-effort attempt will be made to delete all other surge nodes. If there are enough surge nodes to replace blocked nodes, then the upgrade operation and the managed cluster will be in failed state. Otherwise, the upgrade operation and the managed cluster will be in canceled state. */ + Cordon = "Cordon", + /** AKS will mark the blocked nodes schedulable, but the blocked nodes are not upgraded. A best-effort attempt will be made to delete all surge nodes. The upgrade operation and the managed cluster will be in failed state if there are any blocked nodes. */ + Schedule = "Schedule", +} + +/** + * Defines values for UndrainableNodeBehavior. \ + * {@link KnownUndrainableNodeBehavior} can be used interchangeably with UndrainableNodeBehavior, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Cordon**: AKS will cordon the blocked nodes and replace them with surge nodes during upgrade. The blocked nodes will be cordoned and replaced by surge nodes. The blocked nodes will have label 'kubernetes.azure.com\/upgrade-status:Quarantined'. A surge node will be retained for each blocked node. A best-effort attempt will be made to delete all other surge nodes. If there are enough surge nodes to replace blocked nodes, then the upgrade operation and the managed cluster will be in failed state. Otherwise, the upgrade operation and the managed cluster will be in canceled state. \ + * **Schedule**: AKS will mark the blocked nodes schedulable, but the blocked nodes are not upgraded. A best-effort attempt will be made to delete all surge nodes. The upgrade operation and the managed cluster will be in failed state if there are any blocked nodes. + */ +export type UndrainableNodeBehavior = string; + /** Known values of {@link ScaleSetPriority} that the service accepts. */ export enum KnownScaleSetPriority { /** Spot priority VMs will be used. There is no SLA for spot nodes. See [spot on AKS](https:\//docs.microsoft.com\/azure\/aks\/spot-node-pool) for more information. */ @@ -2462,6 +3026,24 @@ export enum KnownScaleSetEvictionPolicy { */ export type ScaleSetEvictionPolicy = string; +/** Known values of {@link SeccompDefault} that the service accepts. */ +export enum KnownSeccompDefault { + /** No seccomp profile is applied, allowing all system calls. */ + Unconfined = "Unconfined", + /** The default seccomp profile for container runtime is applied, which restricts certain system calls for enhanced security. */ + RuntimeDefault = "RuntimeDefault", +} + +/** + * Defines values for SeccompDefault. \ + * {@link KnownSeccompDefault} can be used interchangeably with SeccompDefault, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unconfined**: No seccomp profile is applied, allowing all system calls. \ + * **RuntimeDefault**: The default seccomp profile for container runtime is applied, which restricts certain system calls for enhanced security. + */ +export type SeccompDefault = string; + /** Known values of {@link GPUInstanceProfile} that the service accepts. */ export enum KnownGPUInstanceProfile { /** MIG1G */ @@ -2507,6 +3089,42 @@ export enum KnownProtocol { */ export type Protocol = string; +/** Known values of {@link AgentPoolSSHAccess} that the service accepts. */ +export enum KnownAgentPoolSSHAccess { + /** Can SSH onto the node as a local user using private key. */ + LocalUser = "LocalUser", + /** SSH service will be turned off on the node. */ + Disabled = "Disabled", +} + +/** + * Defines values for AgentPoolSSHAccess. \ + * {@link KnownAgentPoolSSHAccess} can be used interchangeably with AgentPoolSSHAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LocalUser**: Can SSH onto the node as a local user using private key. \ + * **Disabled**: SSH service will be turned off on the node. + */ +export type AgentPoolSSHAccess = string; + +/** Known values of {@link DriverType} that the service accepts. */ +export enum KnownDriverType { + /** Install the GRID driver for the GPU, suitable for applications requiring virtualization support. */ + Grid = "GRID", + /** Install the CUDA driver for the GPU, optimized for computational tasks in scientific computing and data-intensive applications. */ + Cuda = "CUDA", +} + +/** + * Defines values for DriverType. \ + * {@link KnownDriverType} can be used interchangeably with DriverType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **GRID**: Install the GRID driver for the GPU, suitable for applications requiring virtualization support. \ + * **CUDA**: Install the CUDA driver for the GPU, optimized for computational tasks in scientific computing and data-intensive applications. + */ +export type DriverType = string; + /** Known values of {@link LicenseType} that the service accepts. */ export enum KnownLicenseType { /** No additional licensing is applied. */ @@ -2579,7 +3197,7 @@ export enum KnownNetworkPlugin { Azure = "azure", /** Use the Kubenet network plugin. See [Kubenet (basic) networking](https:\//docs.microsoft.com\/azure\/aks\/concepts-network#kubenet-basic-networking) for more information. */ Kubenet = "kubenet", - /** No CNI plugin is pre-installed. See [BYO CNI](https:\//docs.microsoft.com\/en-us\/azure\/aks\/use-byo-cni) for more information. */ + /** Do not use a network plugin. A custom CNI will need to be installed after cluster creation for networking functionality. */ None = "none", } @@ -2590,13 +3208,13 @@ export enum KnownNetworkPlugin { * ### Known values supported by the service * **azure**: Use the Azure CNI network plugin. See [Azure CNI (advanced) networking](https:\/\/docs.microsoft.com\/azure\/aks\/concepts-network#azure-cni-advanced-networking) for more information. \ * **kubenet**: Use the Kubenet network plugin. See [Kubenet (basic) networking](https:\/\/docs.microsoft.com\/azure\/aks\/concepts-network#kubenet-basic-networking) for more information. \ - * **none**: No CNI plugin is pre-installed. See [BYO CNI](https:\/\/docs.microsoft.com\/en-us\/azure\/aks\/use-byo-cni) for more information. + * **none**: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for networking functionality. */ export type NetworkPlugin = string; /** Known values of {@link NetworkPluginMode} that the service accepts. */ export enum KnownNetworkPluginMode { - /** Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than Kubenet's method of route tables. For more information visit https:\//aka.ms\/aks\/azure-cni-overlay. */ + /** Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than Kubenet reference plugins host-local and bridge. */ Overlay = "overlay", } @@ -2605,7 +3223,7 @@ export enum KnownNetworkPluginMode { * {@link KnownNetworkPluginMode} can be used interchangeably with NetworkPluginMode, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **overlay**: Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than Kubenet's method of route tables. For more information visit https:\/\/aka.ms\/aks\/azure-cni-overlay. + * **overlay**: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than Kubenet reference plugins host-local and bridge. */ export type NetworkPluginMode = string; @@ -2679,6 +3297,8 @@ export enum KnownOutboundType { ManagedNATGateway = "managedNATGateway", /** The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario and requires proper network configuration. */ UserAssignedNATGateway = "userAssignedNATGateway", + /** The AKS cluster is not set with any outbound-type. All AKS nodes follows Azure VM default outbound behavior. Please refer to https:\//azure.microsoft.com\/en-us\/updates\/default-outbound-access-for-vms-in-azure-will-be-retired-transition-to-a-new-method-of-internet-access\/ */ + None = "none", } /** @@ -2689,7 +3309,8 @@ export enum KnownOutboundType { * **loadBalancer**: The load balancer is used for egress through an AKS assigned public IP. This supports Kubernetes services of type 'loadBalancer'. For more information see [outbound type loadbalancer](https:\/\/docs.microsoft.com\/azure\/aks\/egress-outboundtype#outbound-type-of-loadbalancer). \ * **userDefinedRouting**: Egress paths must be defined by the user. This is an advanced scenario and requires proper network configuration. For more information see [outbound type userDefinedRouting](https:\/\/docs.microsoft.com\/azure\/aks\/egress-outboundtype#outbound-type-of-userdefinedrouting). \ * **managedNATGateway**: The AKS-managed NAT gateway is used for egress. \ - * **userAssignedNATGateway**: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario and requires proper network configuration. + * **userAssignedNATGateway**: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario and requires proper network configuration. \ + * **none**: The AKS cluster is not set with any outbound-type. All AKS nodes follows Azure VM default outbound behavior. Please refer to https:\/\/azure.microsoft.com\/en-us\/updates\/default-outbound-access-for-vms-in-azure-will-be-retired-transition-to-a-new-method-of-internet-access\/ */ export type OutboundType = string; @@ -2729,11 +3350,29 @@ export enum KnownBackendPoolType { */ export type BackendPoolType = string; +/** Known values of {@link ClusterServiceLoadBalancerHealthProbeMode} that the service accepts. */ +export enum KnownClusterServiceLoadBalancerHealthProbeMode { + /** Each External Traffic Policy Cluster service will have its own health probe targeting service nodePort. */ + ServiceNodePort = "ServiceNodePort", + /** All External Traffic Policy Cluster services in a Standard Load Balancer will have a dedicated health probe targeting the backend nodes' kube-proxy health check port 10256. */ + Shared = "Shared", +} + +/** + * Defines values for ClusterServiceLoadBalancerHealthProbeMode. \ + * {@link KnownClusterServiceLoadBalancerHealthProbeMode} can be used interchangeably with ClusterServiceLoadBalancerHealthProbeMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ServiceNodePort**: Each External Traffic Policy Cluster service will have its own health probe targeting service nodePort. \ + * **Shared**: All External Traffic Policy Cluster services in a Standard Load Balancer will have a dedicated health probe targeting the backend nodes' kube-proxy health check port 10256. + */ +export type ClusterServiceLoadBalancerHealthProbeMode = string; + /** Known values of {@link IpFamily} that the service accepts. */ export enum KnownIpFamily { - /** IPv4 */ + /** IPv4 family */ IPv4 = "IPv4", - /** IPv6 */ + /** IPv6 family */ IPv6 = "IPv6", } @@ -2742,11 +3381,65 @@ export enum KnownIpFamily { * {@link KnownIpFamily} can be used interchangeably with IpFamily, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **IPv4** \ - * **IPv6** + * **IPv4**: IPv4 family \ + * **IPv6**: IPv6 family */ export type IpFamily = string; +/** Known values of {@link PodLinkLocalAccess} that the service accepts. */ +export enum KnownPodLinkLocalAccess { + /** Pods with hostNetwork=false can access Azure Instance Metadata Service (IMDS) without restriction. */ + Imds = "IMDS", + /** Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS). */ + None = "None", +} + +/** + * Defines values for PodLinkLocalAccess. \ + * {@link KnownPodLinkLocalAccess} can be used interchangeably with PodLinkLocalAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IMDS**: Pods with hostNetwork=false can access Azure Instance Metadata Service (IMDS) without restriction. \ + * **None**: Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS). + */ +export type PodLinkLocalAccess = string; + +/** Known values of {@link Mode} that the service accepts. */ +export enum KnownMode { + /** IPTables proxy mode */ + Iptables = "IPTABLES", + /** IPVS proxy mode. Must be using Kubernetes version >= 1.22. */ + Ipvs = "IPVS", +} + +/** + * Defines values for Mode. \ + * {@link KnownMode} can be used interchangeably with Mode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPTABLES**: IPTables proxy mode \ + * **IPVS**: IPVS proxy mode. Must be using Kubernetes version >= 1.22. + */ +export type Mode = string; + +/** Known values of {@link IpvsScheduler} that the service accepts. */ +export enum KnownIpvsScheduler { + /** Round Robin */ + RoundRobin = "RoundRobin", + /** Least Connection */ + LeastConnection = "LeastConnection", +} + +/** + * Defines values for IpvsScheduler. \ + * {@link KnownIpvsScheduler} can be used interchangeably with IpvsScheduler, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **RoundRobin**: Round Robin \ + * **LeastConnection**: Least Connection + */ +export type IpvsScheduler = string; + /** Known values of {@link UpgradeChannel} that the service accepts. */ export enum KnownUpgradeChannel { /** Automatically upgrade the cluster to the latest supported patch release on the latest supported minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor version where N is the latest supported minor version, the cluster first upgrades to the latest supported patch version on N-1 minor version. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is upgraded to 1.18.6, then is upgraded to 1.19.1. */ @@ -2778,12 +3471,12 @@ export type UpgradeChannel = string; export enum KnownNodeOSUpgradeChannel { /** No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means you are responsible for your security updates */ None = "None", - /** OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially and will be patched at some point by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice */ + /** OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially, and will be patched at some later time by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice */ Unmanaged = "Unmanaged", - /** AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. */ - NodeImage = "NodeImage", /** AKS downloads and updates the nodes with tested security updates. These updates honor the maintenance window settings and produce a new VHD that is used on new nodes. On some occasions it's not possible to apply the updates in place, in such cases the existing nodes will also be re-imaged to the newly produced VHD in order to apply the changes. This option incurs an extra cost of hosting the new Security Patch VHDs in your resource group for just in time consumption. */ SecurityPatch = "SecurityPatch", + /** AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. */ + NodeImage = "NodeImage", } /** @@ -2792,9 +3485,9 @@ export enum KnownNodeOSUpgradeChannel { * this enum contains the known values that the service supports. * ### Known values supported by the service * **None**: No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means you are responsible for your security updates \ - * **Unmanaged**: OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially and will be patched at some point by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice \ - * **NodeImage**: AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. \ - * **SecurityPatch**: AKS downloads and updates the nodes with tested security updates. These updates honor the maintenance window settings and produce a new VHD that is used on new nodes. On some occasions it's not possible to apply the updates in place, in such cases the existing nodes will also be re-imaged to the newly produced VHD in order to apply the changes. This option incurs an extra cost of hosting the new Security Patch VHDs in your resource group for just in time consumption. + * **Unmanaged**: OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in machines will be unpatched initially, and will be patched at some later time by the OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent to None till further notice \ + * **SecurityPatch**: AKS downloads and updates the nodes with tested security updates. These updates honor the maintenance window settings and produce a new VHD that is used on new nodes. On some occasions it's not possible to apply the updates in place, in such cases the existing nodes will also be re-imaged to the newly produced VHD in order to apply the changes. This option incurs an extra cost of hosting the new Security Patch VHDs in your resource group for just in time consumption. \ + * **NodeImage**: AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. */ export type NodeOSUpgradeChannel = string; @@ -2840,12 +3533,38 @@ export enum KnownKeyVaultNetworkAccessTypes { */ export type KeyVaultNetworkAccessTypes = string; +/** Known values of {@link NginxIngressControllerType} that the service accepts. */ +export enum KnownNginxIngressControllerType { + /** The default NginxIngressController will be created. Users can edit the default NginxIngressController Custom Resource to configure load balancer annotations. */ + AnnotationControlled = "AnnotationControlled", + /** The default NginxIngressController will be created and the operator will provision an external loadbalancer with it. Any annotation to make the default loadbalancer internal will be overwritten. */ + External = "External", + /** The default NginxIngressController will be created and the operator will provision an internal loadbalancer with it. Any annotation to make the default loadbalancer external will be overwritten. */ + Internal = "Internal", + /** The default Ingress Controller will not be created. It will not be deleted by the system if it exists. Users should delete the default NginxIngressController Custom Resource manually if desired. */ + None = "None", +} + +/** + * Defines values for NginxIngressControllerType. \ + * {@link KnownNginxIngressControllerType} can be used interchangeably with NginxIngressControllerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AnnotationControlled**: The default NginxIngressController will be created. Users can edit the default NginxIngressController Custom Resource to configure load balancer annotations. \ + * **External**: The default NginxIngressController will be created and the operator will provision an external loadbalancer with it. Any annotation to make the default loadbalancer internal will be overwritten. \ + * **Internal**: The default NginxIngressController will be created and the operator will provision an internal loadbalancer with it. Any annotation to make the default loadbalancer external will be overwritten. \ + * **None**: The default Ingress Controller will not be created. It will not be deleted by the system if it exists. Users should delete the default NginxIngressController Custom Resource manually if desired. + */ +export type NginxIngressControllerType = string; + /** Known values of {@link PublicNetworkAccess} that the service accepts. */ export enum KnownPublicNetworkAccess { - /** Enabled */ + /** Inbound\/Outbound to the managedCluster is allowed. */ Enabled = "Enabled", - /** Disabled */ + /** Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. */ Disabled = "Disabled", + /** Inbound\/Outbound traffic is managed by Microsoft.Network\/NetworkSecurityPerimeters. */ + SecuredByPerimeter = "SecuredByPerimeter", } /** @@ -2853,11 +3572,51 @@ export enum KnownPublicNetworkAccess { * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Enabled** \ - * **Disabled** + * **Enabled**: Inbound\/Outbound to the managedCluster is allowed. \ + * **Disabled**: Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. \ + * **SecuredByPerimeter**: Inbound\/Outbound traffic is managed by Microsoft.Network\/NetworkSecurityPerimeters. */ export type PublicNetworkAccess = string; +/** Known values of {@link AddonAutoscaling} that the service accepts. */ +export enum KnownAddonAutoscaling { + /** Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial mode. */ + Enabled = "Enabled", + /** Feature to autoscale AKS-managed add-ons is disabled. */ + Disabled = "Disabled", +} + +/** + * Defines values for AddonAutoscaling. \ + * {@link KnownAddonAutoscaling} can be used interchangeably with AddonAutoscaling, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial mode. \ + * **Disabled**: Feature to autoscale AKS-managed add-ons is disabled. + */ +export type AddonAutoscaling = string; + +/** Known values of {@link Level} that the service accepts. */ +export enum KnownLevel { + /** Off */ + Off = "Off", + /** Warning */ + Warning = "Warning", + /** Enforcement */ + Enforcement = "Enforcement", +} + +/** + * Defines values for Level. \ + * {@link KnownLevel} can be used interchangeably with Level, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Off** \ + * **Warning** \ + * **Enforcement** + */ +export type Level = string; + /** Known values of {@link ServiceMeshMode} that the service accepts. */ export enum KnownServiceMeshMode { /** Istio deployed as an AKS addon. */ @@ -2894,6 +3653,42 @@ export enum KnownIstioIngressGatewayMode { */ export type IstioIngressGatewayMode = string; +/** Known values of {@link NodeProvisioningMode} that the service accepts. */ +export enum KnownNodeProvisioningMode { + /** Nodes are provisioned manually by the user */ + Manual = "Manual", + /** Nodes are provisioned automatically by AKS using Karpenter. Fixed size Node Pools can still be created, but autoscaling Node Pools cannot be. (See aka.ms\/aks\/nap for more details). */ + Auto = "Auto", +} + +/** + * Defines values for NodeProvisioningMode. \ + * {@link KnownNodeProvisioningMode} can be used interchangeably with NodeProvisioningMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Manual**: Nodes are provisioned manually by the user \ + * **Auto**: Nodes are provisioned automatically by AKS using Karpenter. Fixed size Node Pools can still be created, but autoscaling Node Pools cannot be. (See aka.ms\/aks\/nap for more details). + */ +export type NodeProvisioningMode = string; + +/** Known values of {@link ArtifactSource} that the service accepts. */ +export enum KnownArtifactSource { + /** pull images from Azure Container Registry with cache */ + Cache = "Cache", + /** pull images from Microsoft Artifact Registry */ + Direct = "Direct", +} + +/** + * Defines values for ArtifactSource. \ + * {@link KnownArtifactSource} can be used interchangeably with ArtifactSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Cache**: pull images from Azure Container Registry with cache \ + * **Direct**: pull images from Microsoft Artifact Registry + */ +export type ArtifactSource = string; + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -2971,15 +3766,15 @@ export type WeekDay = string; /** Known values of {@link Type} that the service accepts. */ export enum KnownType { - /** First week of the month. */ + /** First. */ First = "First", - /** Second week of the month. */ + /** Second. */ Second = "Second", - /** Third week of the month. */ + /** Third. */ Third = "Third", - /** Fourth week of the month. */ + /** Fourth. */ Fourth = "Fourth", - /** Last week of the month. */ + /** Last. */ Last = "Last", } @@ -2988,11 +3783,11 @@ export enum KnownType { * {@link KnownType} can be used interchangeably with Type, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **First**: First week of the month. \ - * **Second**: Second week of the month. \ - * **Third**: Third week of the month. \ - * **Fourth**: Fourth week of the month. \ - * **Last**: Last week of the month. + * **First**: First. \ + * **Second**: Second. \ + * **Third**: Third. \ + * **Fourth**: Fourth. \ + * **Last**: Last. */ export type Type = string; @@ -3051,6 +3846,8 @@ export type ConnectionStatus = string; export enum KnownSnapshotType { /** The snapshot is a snapshot of a node pool. */ NodePool = "NodePool", + /** The snapshot is a snapshot of a managed cluster. */ + ManagedCluster = "ManagedCluster", } /** @@ -3058,7 +3855,8 @@ export enum KnownSnapshotType { * {@link KnownSnapshotType} can be used interchangeably with SnapshotType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NodePool**: The snapshot is a snapshot of a node pool. + * **NodePool**: The snapshot is a snapshot of a node pool. \ + * **ManagedCluster**: The snapshot is a snapshot of a managed cluster. */ export type SnapshotType = string; @@ -3088,6 +3886,66 @@ export enum KnownTrustedAccessRoleBindingProvisioningState { * **Updating** */ export type TrustedAccessRoleBindingProvisioningState = string; + +/** Known values of {@link GuardrailsSupport} that the service accepts. */ +export enum KnownGuardrailsSupport { + /** The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases. */ + Preview = "Preview", + /** The version is stable and can be used on critical production clusters. */ + Stable = "Stable", +} + +/** + * Defines values for GuardrailsSupport. \ + * {@link KnownGuardrailsSupport} can be used interchangeably with GuardrailsSupport, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preview**: The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases. \ + * **Stable**: The version is stable and can be used on critical production clusters. + */ +export type GuardrailsSupport = string; + +/** Known values of {@link SafeguardsSupport} that the service accepts. */ +export enum KnownSafeguardsSupport { + /** The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases. */ + Preview = "Preview", + /** The version is stable and can be used on critical production clusters. */ + Stable = "Stable", +} + +/** + * Defines values for SafeguardsSupport. \ + * {@link KnownSafeguardsSupport} can be used interchangeably with SafeguardsSupport, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preview**: The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases. \ + * **Stable**: The version is stable and can be used on critical production clusters. + */ +export type SafeguardsSupport = string; + +/** Known values of {@link Operator} that the service accepts. */ +export enum KnownOperator { + /** The value of the key should be in the given list. */ + In = "In", + /** The value of the key should not be in the given list. */ + NotIn = "NotIn", + /** The value of the key should exist. */ + Exists = "Exists", + /** The value of the key should not exist. */ + DoesNotExist = "DoesNotExist", +} + +/** + * Defines values for Operator. \ + * {@link KnownOperator} can be used interchangeably with Operator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **In**: The value of the key should be in the given list. \ + * **NotIn**: The value of the key should not be in the given list. \ + * **Exists**: The value of the key should exist. \ + * **DoesNotExist**: The value of the key should not exist. + */ +export type Operator = string; /** Defines values for ResourceIdentityType. */ export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "None"; @@ -3214,6 +4072,8 @@ export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { /** The request should only proceed if an entity matches this string. */ ifMatch?: string; + /** ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget */ + ignorePodDisruptionBudget?: boolean; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -3242,7 +4102,7 @@ export interface ManagedClustersResetAADProfileOptionalParams } /** Optional parameters. */ -export interface ManagedClustersRotateClusterCertificatesOptionalParams +export interface ManagedClustersAbortLatestOperationOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3250,12 +4110,12 @@ export interface ManagedClustersRotateClusterCertificatesOptionalParams resumeFrom?: string; } -/** Contains response data for the rotateClusterCertificates operation. */ -export type ManagedClustersRotateClusterCertificatesResponse = - ManagedClustersRotateClusterCertificatesHeaders; +/** Contains response data for the abortLatestOperation operation. */ +export type ManagedClustersAbortLatestOperationResponse = + ManagedClustersAbortLatestOperationHeaders; /** Optional parameters. */ -export interface ManagedClustersAbortLatestOperationOptionalParams +export interface ManagedClustersRotateClusterCertificatesOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3263,9 +4123,9 @@ export interface ManagedClustersAbortLatestOperationOptionalParams resumeFrom?: string; } -/** Contains response data for the abortLatestOperation operation. */ -export type ManagedClustersAbortLatestOperationResponse = - ManagedClustersAbortLatestOperationHeaders; +/** Contains response data for the rotateClusterCertificates operation. */ +export type ManagedClustersRotateClusterCertificatesResponse = + ManagedClustersRotateClusterCertificatesHeaders; /** Optional parameters. */ export interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams @@ -3331,6 +4191,38 @@ export interface ManagedClustersListOutboundNetworkDependenciesEndpointsOptional export type ManagedClustersListOutboundNetworkDependenciesEndpointsResponse = OutboundEnvironmentEndpointCollection; +/** Optional parameters. */ +export interface ManagedClustersGetGuardrailsVersionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getGuardrailsVersions operation. */ +export type ManagedClustersGetGuardrailsVersionsResponse = + GuardrailsAvailableVersion; + +/** Optional parameters. */ +export interface ManagedClustersListGuardrailsVersionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listGuardrailsVersions operation. */ +export type ManagedClustersListGuardrailsVersionsResponse = + GuardrailsAvailableVersionsList; + +/** Optional parameters. */ +export interface ManagedClustersGetSafeguardsVersionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getSafeguardsVersions operation. */ +export type ManagedClustersGetSafeguardsVersionsResponse = + SafeguardsAvailableVersion; + +/** Optional parameters. */ +export interface ManagedClustersListSafeguardsVersionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSafeguardsVersions operation. */ +export type ManagedClustersListSafeguardsVersionsResponse = + SafeguardsAvailableVersionsList; + /** Optional parameters. */ export interface ManagedClustersListMeshRevisionProfilesOptionalParams extends coreClient.OperationOptions {} @@ -3361,6 +4253,19 @@ export interface ManagedClustersGetMeshUpgradeProfileOptionalParams /** Contains response data for the getMeshUpgradeProfile operation. */ export type ManagedClustersGetMeshUpgradeProfileResponse = MeshUpgradeProfile; +/** Optional parameters. */ +export interface ManagedClustersRebalanceLoadBalancersOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the rebalanceLoadBalancers operation. */ +export type ManagedClustersRebalanceLoadBalancersResponse = + ManagedClustersRebalanceLoadBalancersHeaders; + /** Optional parameters. */ export interface ManagedClustersListNextOptionalParams extends coreClient.OperationOptions {} @@ -3384,6 +4289,22 @@ export interface ManagedClustersListOutboundNetworkDependenciesEndpointsNextOpti export type ManagedClustersListOutboundNetworkDependenciesEndpointsNextResponse = OutboundEnvironmentEndpointCollection; +/** Optional parameters. */ +export interface ManagedClustersListGuardrailsVersionsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listGuardrailsVersionsNext operation. */ +export type ManagedClustersListGuardrailsVersionsNextResponse = + GuardrailsAvailableVersionsList; + +/** Optional parameters. */ +export interface ManagedClustersListSafeguardsVersionsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSafeguardsVersionsNext operation. */ +export type ManagedClustersListSafeguardsVersionsNextResponse = + SafeguardsAvailableVersionsList; + /** Optional parameters. */ export interface ManagedClustersListMeshRevisionProfilesNextOptionalParams extends coreClient.OperationOptions {} @@ -3537,6 +4458,27 @@ export interface AgentPoolsListNextOptionalParams /** Contains response data for the listNext operation. */ export type AgentPoolsListNextResponse = AgentPoolListResult; +/** Optional parameters. */ +export interface MachinesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type MachinesListResponse = MachineListResult; + +/** Optional parameters. */ +export interface MachinesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MachinesGetResponse = Machine; + +/** Optional parameters. */ +export interface MachinesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type MachinesListNextResponse = MachineListResult; + /** Optional parameters. */ export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions {} @@ -3583,6 +4525,34 @@ export interface ResolvePrivateLinkServiceIdPostOptionalParams /** Contains response data for the post operation. */ export type ResolvePrivateLinkServiceIdPostResponse = PrivateLinkResource; +/** Optional parameters. */ +export interface OperationStatusResultListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationStatusResultListResponse = OperationStatusResultList; + +/** Optional parameters. */ +export interface OperationStatusResultGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type OperationStatusResultGetResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface OperationStatusResultGetByAgentPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getByAgentPool operation. */ +export type OperationStatusResultGetByAgentPoolResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface OperationStatusResultListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationStatusResultListNextResponse = OperationStatusResultList; + /** Optional parameters. */ export interface SnapshotsListOptionalParams extends coreClient.OperationOptions {} @@ -3636,6 +4606,78 @@ export interface SnapshotsListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type SnapshotsListByResourceGroupNextResponse = SnapshotListResult; +/** Optional parameters. */ +export interface ManagedClusterSnapshotsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ManagedClusterSnapshotsListResponse = + ManagedClusterSnapshotListResult; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ManagedClusterSnapshotsListByResourceGroupResponse = + ManagedClusterSnapshotListResult; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedClusterSnapshotsGetResponse = ManagedClusterSnapshot; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedClusterSnapshotsCreateOrUpdateResponse = + ManagedClusterSnapshot; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsUpdateTagsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateTags operation. */ +export type ManagedClusterSnapshotsUpdateTagsResponse = ManagedClusterSnapshot; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ManagedClusterSnapshotsListNextResponse = + ManagedClusterSnapshotListResult; + +/** Optional parameters. */ +export interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ManagedClusterSnapshotsListByResourceGroupNextResponse = + ManagedClusterSnapshotListResult; + +/** Optional parameters. */ +export interface TrustedAccessRolesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; + +/** Optional parameters. */ +export interface TrustedAccessRolesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type TrustedAccessRolesListNextResponse = TrustedAccessRoleListResult; + /** Optional parameters. */ export interface TrustedAccessRoleBindingsListOptionalParams extends coreClient.OperationOptions {} @@ -3686,39 +4728,58 @@ export type TrustedAccessRoleBindingsListNextResponse = TrustedAccessRoleBindingListResult; /** Optional parameters. */ -export interface TrustedAccessRolesListOptionalParams +export interface LoadBalancersListByManagedClusterOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; +/** Contains response data for the listByManagedCluster operation. */ +export type LoadBalancersListByManagedClusterResponse = LoadBalancerListResult; /** Optional parameters. */ -export interface TrustedAccessRolesListNextOptionalParams +export interface LoadBalancersGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type TrustedAccessRolesListNextResponse = TrustedAccessRoleListResult; +/** Contains response data for the get operation. */ +export type LoadBalancersGetResponse = LoadBalancer; /** Optional parameters. */ -export interface MachinesListOptionalParams - extends coreClient.OperationOptions {} +export interface LoadBalancersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list. */ + name?: string; + /** Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer. */ + primaryAgentPoolName?: string; + /** Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it. */ + allowServicePlacement?: boolean; + /** Only services that must match this selector can be placed on this load balancer. */ + serviceLabelSelector?: LabelSelector; + /** Services created in namespaces that match the selector can be placed on this load balancer. */ + serviceNamespaceSelector?: LabelSelector; + /** Nodes that match this selector will be possible members of this load balancer. */ + nodeSelector?: LabelSelector; +} -/** Contains response data for the list operation. */ -export type MachinesListResponse = MachineListResult; +/** Contains response data for the createOrUpdate operation. */ +export type LoadBalancersCreateOrUpdateResponse = LoadBalancer; /** Optional parameters. */ -export interface MachinesGetOptionalParams - extends coreClient.OperationOptions {} +export interface LoadBalancersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the get operation. */ -export type MachinesGetResponse = Machine; +/** Contains response data for the delete operation. */ +export type LoadBalancersDeleteResponse = LoadBalancersDeleteHeaders; /** Optional parameters. */ -export interface MachinesListNextOptionalParams +export interface LoadBalancersListByManagedClusterNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type MachinesListNextResponse = MachineListResult; +/** Contains response data for the listByManagedClusterNext operation. */ +export type LoadBalancersListByManagedClusterNextResponse = + LoadBalancerListResult; /** Optional parameters. */ export interface ContainerServiceClientOptionalParams diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index 339230230c18..06fd2119b8fc 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -433,6 +433,21 @@ export const PowerState: coreClient.CompositeMapper = { }, }; +export const CreationData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CreationData", + modelProperties: { + sourceResourceId: { + serializedName: "sourceResourceId", + type: { + name: "String", + }, + }, + }, + }, +}; + export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMapper = { type: { @@ -486,6 +501,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "String", }, }, + messageOfTheDay: { + serializedName: "messageOfTheDay", + type: { + name: "String", + }, + }, vnetSubnetID: { serializedName: "vnetSubnetID", type: { @@ -498,6 +519,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "String", }, }, + podIPAllocationMode: { + serializedName: "podIPAllocationMode", + type: { + name: "String", + }, + }, maxPods: { serializedName: "maxPods", type: { @@ -611,6 +638,12 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "Boolean", }, }, + enableCustomCATrust: { + serializedName: "enableCustomCATrust", + type: { + name: "Boolean", + }, + }, nodePublicIPPrefixID: { serializedName: "nodePublicIPPrefixID", type: { @@ -663,6 +696,17 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe }, }, }, + nodeInitializationTaints: { + serializedName: "nodeInitializationTaints", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, proximityPlacementGroupID: { serializedName: "proximityPlacementGroupID", type: { @@ -726,18 +770,18 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "String", }, }, - networkProfile: { - serializedName: "networkProfile", + windowsProfile: { + serializedName: "windowsProfile", type: { name: "Composite", - className: "AgentPoolNetworkProfile", + className: "AgentPoolWindowsProfile", }, }, - windowsProfile: { - serializedName: "windowsProfile", + networkProfile: { + serializedName: "networkProfile", type: { name: "Composite", - className: "AgentPoolWindowsProfile", + className: "AgentPoolNetworkProfile", }, }, securityProfile: { @@ -747,6 +791,46 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe className: "AgentPoolSecurityProfile", }, }, + gpuProfile: { + serializedName: "gpuProfile", + type: { + name: "Composite", + className: "AgentPoolGPUProfile", + }, + }, + artifactStreamingProfile: { + serializedName: "artifactStreamingProfile", + type: { + name: "Composite", + className: "AgentPoolArtifactStreamingProfile", + }, + }, + virtualMachinesProfile: { + serializedName: "virtualMachinesProfile", + type: { + name: "Composite", + className: "VirtualMachinesProfile", + }, + }, + virtualMachineNodesStatus: { + serializedName: "virtualMachineNodesStatus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineNodes", + }, + }, + }, + }, + gatewayProfile: { + serializedName: "gatewayProfile", + type: { + name: "Composite", + className: "AgentPoolGatewayProfile", + }, + }, }, }, }; @@ -762,6 +846,12 @@ export const AgentPoolUpgradeSettings: coreClient.CompositeMapper = { name: "String", }, }, + maxUnavailable: { + serializedName: "maxUnavailable", + type: { + name: "String", + }, + }, drainTimeoutInMinutes: { constraints: { InclusiveMaximum: 1440, @@ -782,6 +872,12 @@ export const AgentPoolUpgradeSettings: coreClient.CompositeMapper = { name: "Number", }, }, + undrainableNodeBehavior: { + serializedName: "undrainableNodeBehavior", + type: { + name: "String", + }, + }, }, }, }; @@ -865,6 +961,12 @@ export const KubeletConfig: coreClient.CompositeMapper = { name: "Number", }, }, + seccompDefault: { + serializedName: "seccompDefault", + type: { + name: "String", + }, + }, }, }, }; @@ -1092,15 +1194,15 @@ export const SysctlConfig: coreClient.CompositeMapper = { }, }; -export const CreationData: coreClient.CompositeMapper = { +export const AgentPoolWindowsProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CreationData", + className: "AgentPoolWindowsProfile", modelProperties: { - sourceResourceId: { - serializedName: "sourceResourceId", + disableOutboundNat: { + serializedName: "disableOutboundNat", type: { - name: "String", + name: "Boolean", }, }, }, @@ -1207,13 +1309,25 @@ export const PortRange: coreClient.CompositeMapper = { }, }; -export const AgentPoolWindowsProfile: coreClient.CompositeMapper = { +export const AgentPoolSecurityProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AgentPoolWindowsProfile", + className: "AgentPoolSecurityProfile", modelProperties: { - disableOutboundNat: { - serializedName: "disableOutboundNat", + sshAccess: { + serializedName: "sshAccess", + type: { + name: "String", + }, + }, + enableVtpm: { + serializedName: "enableVTPM", + type: { + name: "Boolean", + }, + }, + enableSecureBoot: { + serializedName: "enableSecureBoot", type: { name: "Boolean", }, @@ -1222,19 +1336,34 @@ export const AgentPoolWindowsProfile: coreClient.CompositeMapper = { }, }; -export const AgentPoolSecurityProfile: coreClient.CompositeMapper = { +export const AgentPoolGPUProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AgentPoolSecurityProfile", + className: "AgentPoolGPUProfile", modelProperties: { - enableVtpm: { - serializedName: "enableVTPM", + installGPUDriver: { + serializedName: "installGPUDriver", type: { name: "Boolean", }, }, - enableSecureBoot: { - serializedName: "enableSecureBoot", + driverType: { + serializedName: "driverType", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AgentPoolArtifactStreamingProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolArtifactStreamingProfile", + modelProperties: { + enabled: { + serializedName: "enabled", type: { name: "Boolean", }, @@ -1243,6 +1372,154 @@ export const AgentPoolSecurityProfile: coreClient.CompositeMapper = { }, }; +export const VirtualMachinesProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachinesProfile", + modelProperties: { + scale: { + serializedName: "scale", + type: { + name: "Composite", + className: "ScaleProfile", + }, + }, + }, + }, +}; + +export const ScaleProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleProfile", + modelProperties: { + manual: { + serializedName: "manual", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManualScaleProfile", + }, + }, + }, + }, + autoscale: { + serializedName: "autoscale", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoScaleProfile", + }, + }, + }, + }, + }, + }, +}; + +export const ManualScaleProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManualScaleProfile", + modelProperties: { + sizes: { + serializedName: "sizes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + count: { + serializedName: "count", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const AutoScaleProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AutoScaleProfile", + modelProperties: { + sizes: { + serializedName: "sizes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + minCount: { + serializedName: "minCount", + type: { + name: "Number", + }, + }, + maxCount: { + serializedName: "maxCount", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const VirtualMachineNodes: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineNodes", + modelProperties: { + size: { + serializedName: "size", + type: { + name: "String", + }, + }, + count: { + serializedName: "count", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const AgentPoolGatewayProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolGatewayProfile", + modelProperties: { + publicIPPrefixSize: { + defaultValue: 31, + constraints: { + InclusiveMaximum: 31, + InclusiveMinimum: 28, + }, + serializedName: "publicIPPrefixSize", + type: { + name: "Number", + }, + }, + }, + }, +}; + export const ContainerServiceLinuxProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1728,13 +2005,6 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { name: "String", }, }, - advancedNetworking: { - serializedName: "advancedNetworking", - type: { - name: "Composite", - className: "AdvancedNetworking", - }, - }, podCidr: { defaultValue: "10.244.0.0/16", constraints: { @@ -1798,6 +2068,13 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { className: "ManagedClusterNATGatewayProfile", }, }, + staticEgressGatewayProfile: { + serializedName: "staticEgressGatewayProfile", + type: { + name: "Composite", + className: "ManagedClusterStaticEgressGatewayProfile", + }, + }, podCidrs: { serializedName: "podCidrs", type: { @@ -1831,63 +2108,24 @@ export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { }, }, }, - }, - }, -}; - -export const AdvancedNetworking: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdvancedNetworking", - modelProperties: { - enabled: { - serializedName: "enabled", + podLinkLocalAccess: { + serializedName: "podLinkLocalAccess", type: { - name: "Boolean", + name: "String", }, }, - observability: { - serializedName: "observability", + kubeProxyConfig: { + serializedName: "kubeProxyConfig", type: { name: "Composite", - className: "AdvancedNetworkingObservability", + className: "ContainerServiceNetworkProfileKubeProxyConfig", }, }, - security: { - serializedName: "security", + advancedNetworking: { + serializedName: "advancedNetworking", type: { name: "Composite", - className: "AdvancedNetworkingSecurity", - }, - }, - }, - }, -}; - -export const AdvancedNetworkingObservability: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdvancedNetworkingObservability", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const AdvancedNetworkingSecurity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdvancedNetworkingSecurity", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean", + className: "AdvancedNetworking", }, }, }, @@ -1967,6 +2205,13 @@ export const ManagedClusterLoadBalancerProfile: coreClient.CompositeMapper = { name: "String", }, }, + clusterServiceLoadBalancerHealthProbeMode: { + defaultValue: "ServiceNodePort", + serializedName: "clusterServiceLoadBalancerHealthProbeMode", + type: { + name: "String", + }, + }, }, }, }; @@ -2122,6 +2367,145 @@ export const ManagedClusterManagedOutboundIPProfile: coreClient.CompositeMapper }, }; +export const ManagedClusterStaticEgressGatewayProfile: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterStaticEgressGatewayProfile", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ContainerServiceNetworkProfileKubeProxyConfig: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfig", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + mode: { + serializedName: "mode", + type: { + name: "String", + }, + }, + ipvsConfig: { + serializedName: "ipvsConfig", + type: { + name: "Composite", + className: + "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", + }, + }, + }, + }, + }; + +export const ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", + modelProperties: { + scheduler: { + serializedName: "scheduler", + type: { + name: "String", + }, + }, + tcpTimeoutSeconds: { + serializedName: "tcpTimeoutSeconds", + type: { + name: "Number", + }, + }, + tcpFinTimeoutSeconds: { + serializedName: "tcpFinTimeoutSeconds", + type: { + name: "Number", + }, + }, + udpTimeoutSeconds: { + serializedName: "udpTimeoutSeconds", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const AdvancedNetworking: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdvancedNetworking", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + observability: { + serializedName: "observability", + type: { + name: "Composite", + className: "AdvancedNetworkingObservability", + }, + }, + security: { + serializedName: "security", + type: { + name: "Composite", + className: "AdvancedNetworkingSecurity", + }, + }, + }, + }, +}; + +export const AdvancedNetworkingObservability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdvancedNetworkingObservability", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const AdvancedNetworkingSecurity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdvancedNetworkingSecurity", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + export const ManagedClusterAADProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2407,6 +2791,18 @@ export const ManagedClusterAPIServerAccessProfile: coreClient.CompositeMapper = name: "Boolean", }, }, + enableVnetIntegration: { + serializedName: "enableVnetIntegration", + type: { + name: "Boolean", + }, + }, + subnetId: { + serializedName: "subnetId", + type: { + name: "String", + }, + }, }, }, }; @@ -2490,6 +2886,18 @@ export const ManagedClusterHttpProxyConfig: coreClient.CompositeMapper = { }, }, }, + effectiveNoProxy: { + serializedName: "effectiveNoProxy", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, trustedCa: { serializedName: "trustedCa", type: { @@ -2533,6 +2941,34 @@ export const ManagedClusterSecurityProfile: coreClient.CompositeMapper = { className: "ManagedClusterSecurityProfileImageCleaner", }, }, + imageIntegrity: { + serializedName: "imageIntegrity", + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileImageIntegrity", + }, + }, + nodeRestriction: { + serializedName: "nodeRestriction", + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileNodeRestriction", + }, + }, + customCATrustCertificates: { + constraints: { + MaxItems: 10, + }, + serializedName: "customCATrustCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "ByteArray", + }, + }, + }, + }, }, }, }; @@ -2649,6 +3085,38 @@ export const ManagedClusterSecurityProfileImageCleaner: coreClient.CompositeMapp }, }; +export const ManagedClusterSecurityProfileImageIntegrity: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileImageIntegrity", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ManagedClusterSecurityProfileNodeRestriction: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterSecurityProfileNodeRestriction", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + export const ManagedClusterStorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2698,6 +3166,12 @@ export const ManagedClusterStorageProfileDiskCSIDriver: coreClient.CompositeMapp name: "Boolean", }, }, + version: { + serializedName: "version", + type: { + name: "String", + }, + }, }, }, }; @@ -2792,6 +3266,13 @@ export const ManagedClusterIngressProfileWebAppRouting: coreClient.CompositeMapp }, }, }, + nginx: { + serializedName: "nginx", + type: { + name: "Composite", + className: "ManagedClusterIngressProfileNginx", + }, + }, identity: { serializedName: "identity", type: { @@ -2803,12 +3284,27 @@ export const ManagedClusterIngressProfileWebAppRouting: coreClient.CompositeMapp }, }; -export const ManagedClusterWorkloadAutoScalerProfile: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ManagedClusterWorkloadAutoScalerProfile", - modelProperties: { +export const ManagedClusterIngressProfileNginx: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterIngressProfileNginx", + modelProperties: { + defaultIngressControllerType: { + serializedName: "defaultIngressControllerType", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ManagedClusterWorkloadAutoScalerProfile: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterWorkloadAutoScalerProfile", + modelProperties: { keda: { serializedName: "keda", type: { @@ -2859,6 +3355,13 @@ export const ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler: coreC name: "Boolean", }, }, + addonAutoscaling: { + defaultValue: "Disabled", + serializedName: "addonAutoscaling", + type: { + name: "String", + }, + }, }, }, }; @@ -2875,6 +3378,20 @@ export const ManagedClusterAzureMonitorProfile: coreClient.CompositeMapper = { className: "ManagedClusterAzureMonitorProfileMetrics", }, }, + containerInsights: { + serializedName: "containerInsights", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileContainerInsights", + }, + }, + appMonitoring: { + serializedName: "appMonitoring", + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileAppMonitoring", + }, + }, }, }, }; @@ -2925,6 +3442,188 @@ export const ManagedClusterAzureMonitorProfileKubeStateMetrics: coreClient.Compo }, }; +export const ManagedClusterAzureMonitorProfileContainerInsights: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileContainerInsights", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + logAnalyticsWorkspaceResourceId: { + serializedName: "logAnalyticsWorkspaceResourceId", + type: { + name: "String", + }, + }, + syslogPort: { + serializedName: "syslogPort", + type: { + name: "Number", + }, + }, + disableCustomMetrics: { + serializedName: "disableCustomMetrics", + type: { + name: "Boolean", + }, + }, + disablePrometheusMetricsScraping: { + serializedName: "disablePrometheusMetricsScraping", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ManagedClusterAzureMonitorProfileAppMonitoring: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterAzureMonitorProfileAppMonitoring", + modelProperties: { + autoInstrumentation: { + serializedName: "autoInstrumentation", + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation", + }, + }, + openTelemetryMetrics: { + serializedName: "openTelemetryMetrics", + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics", + }, + }, + openTelemetryLogs: { + serializedName: "openTelemetryLogs", + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs", + }, + }, + }, + }, + }; + +export const ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + port: { + serializedName: "port", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + port: { + serializedName: "port", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const SafeguardsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SafeguardsProfile", + modelProperties: { + systemExcludedNamespaces: { + serializedName: "systemExcludedNamespaces", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + version: { + serializedName: "version", + type: { + name: "String", + }, + }, + level: { + serializedName: "level", + required: true, + type: { + name: "String", + }, + }, + excludedNamespaces: { + serializedName: "excludedNamespaces", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + export const ServiceMeshProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3144,6 +3843,60 @@ export const ManagedClusterCostAnalysis: coreClient.CompositeMapper = { }, }; +export const ManagedClusterAIToolchainOperatorProfile: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterAIToolchainOperatorProfile", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const ManagedClusterNodeProvisioningProfile: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClusterNodeProvisioningProfile", + modelProperties: { + mode: { + serializedName: "mode", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ManagedClusterBootstrapProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterBootstrapProfile", + modelProperties: { + artifactSource: { + defaultValue: "Direct", + serializedName: "artifactSource", + type: { + name: "String", + }, + }, + containerRegistryId: { + serializedName: "containerRegistryId", + type: { + name: "String", + }, + }, + }, + }, +}; + export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3314,6 +4067,18 @@ export const ManagedClusterPoolUpgradeProfile: coreClient.CompositeMapper = { }, }, }, + componentsByReleases: { + serializedName: "componentsByReleases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComponentsByRelease", + }, + }, + }, + }, }, }, }; @@ -3340,20 +4105,25 @@ export const ManagedClusterPoolUpgradeProfileUpgradesItem: coreClient.CompositeM }, }; -export const CredentialResults: coreClient.CompositeMapper = { +export const ComponentsByRelease: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CredentialResults", + className: "ComponentsByRelease", modelProperties: { - kubeconfigs: { - serializedName: "kubeconfigs", - readOnly: true, + kubernetesVersion: { + serializedName: "kubernetesVersion", + type: { + name: "String", + }, + }, + components: { + serializedName: "components", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CredentialResult", + className: "Component", }, }, }, @@ -3362,35 +4132,84 @@ export const CredentialResults: coreClient.CompositeMapper = { }, }; -export const CredentialResult: coreClient.CompositeMapper = { +export const Component: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CredentialResult", + className: "Component", modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String", }, }, - value: { - serializedName: "value", - readOnly: true, + version: { + serializedName: "version", type: { - name: "ByteArray", + name: "String", + }, + }, + hasBreakingChanges: { + serializedName: "hasBreakingChanges", + type: { + name: "Boolean", }, }, }, }, }; -export const TagsObject: coreClient.CompositeMapper = { +export const CredentialResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TagsObject", + className: "CredentialResults", modelProperties: { - tags: { + kubeconfigs: { + serializedName: "kubeconfigs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CredentialResult", + }, + }, + }, + }, + }, + }, +}; + +export const CredentialResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialResult", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "ByteArray", + }, + }, + }, + }, +}; + +export const TagsObject: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TagsObject", + modelProperties: { + tags: { serializedName: "tags", type: { name: "Dictionary", @@ -3828,6 +4647,18 @@ export const AgentPoolUpgradeProfile: coreClient.CompositeMapper = { }, }, }, + componentsByReleases: { + serializedName: "properties.componentsByReleases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComponentsByRelease", + }, + }, + }, + }, latestNodeImageVersion: { serializedName: "properties.latestNodeImageVersion", type: { @@ -3977,6 +4808,102 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { }, }; +export const MachineListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Machine", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const MachineProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineProperties", + modelProperties: { + network: { + serializedName: "network", + type: { + name: "Composite", + className: "MachineNetworkProperties", + }, + }, + resourceId: { + serializedName: "resourceId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const MachineNetworkProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineNetworkProperties", + modelProperties: { + ipAddresses: { + serializedName: "ipAddresses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineIpAddress", + }, + }, + }, + }, + }, + }, +}; + +export const MachineIpAddress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineIpAddress", + modelProperties: { + family: { + serializedName: "family", + readOnly: true, + type: { + name: "String", + }, + }, + ip: { + serializedName: "ip", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const AgentPoolAvailableVersions: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4380,19 +5307,20 @@ export const EndpointDetail: coreClient.CompositeMapper = { }, }; -export const SnapshotListResult: coreClient.CompositeMapper = { +export const OperationStatusResultList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotListResult", + className: "OperationStatusResultList", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Snapshot", + className: "OperationStatusResult", }, }, }, @@ -4408,167 +5336,204 @@ export const SnapshotListResult: coreClient.CompositeMapper = { }, }; -export const MeshRevisionProfileList: coreClient.CompositeMapper = { +export const OperationStatusResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MeshRevisionProfileList", + className: "OperationStatusResult", modelProperties: { - value: { - serializedName: "value", + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + resourceId: { + serializedName: "resourceId", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + required: true, + type: { + name: "String", + }, + }, + percentComplete: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0, + }, + serializedName: "percentComplete", + type: { + name: "Number", + }, + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime", + }, + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime", + }, + }, + operations: { + serializedName: "operations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "MeshRevisionProfile", + className: "OperationStatusResult", }, }, }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + error: { + serializedName: "error", type: { - name: "String", + name: "Composite", + className: "ErrorDetail", }, }, }, }, }; -export const MeshRevisionProfileProperties: coreClient.CompositeMapper = { +export const SnapshotListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MeshRevisionProfileProperties", + className: "SnapshotListResult", modelProperties: { - meshRevisions: { - serializedName: "meshRevisions", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "MeshRevision", + className: "Snapshot", }, }, }, }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, }, }, }; -export const MeshRevision: coreClient.CompositeMapper = { +export const ManagedClusterSnapshotListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MeshRevision", + className: "ManagedClusterSnapshotListResult", modelProperties: { - revision: { - serializedName: "revision", - type: { - name: "String", - }, - }, - upgrades: { - serializedName: "upgrades", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "ManagedClusterSnapshot", }, }, }, }, - compatibleWith: { - serializedName: "compatibleWith", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CompatibleVersions", - }, - }, + name: "String", }, }, }, }, }; -export const CompatibleVersions: coreClient.CompositeMapper = { +export const ManagedClusterPropertiesForSnapshot: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CompatibleVersions", + className: "ManagedClusterPropertiesForSnapshot", modelProperties: { - name: { - serializedName: "name", + kubernetesVersion: { + serializedName: "kubernetesVersion", type: { name: "String", }, }, - versions: { - serializedName: "versions", + sku: { + serializedName: "sku", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "ManagedClusterSKU", + }, + }, + enableRbac: { + serializedName: "enableRbac", + type: { + name: "Boolean", + }, + }, + networkProfile: { + serializedName: "networkProfile", + type: { + name: "Composite", + className: "NetworkProfileForSnapshot", }, }, }, }, }; -export const MeshUpgradeProfileList: coreClient.CompositeMapper = { +export const NetworkProfileForSnapshot: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MeshUpgradeProfileList", + className: "NetworkProfileForSnapshot", modelProperties: { - value: { - serializedName: "value", + networkPlugin: { + serializedName: "networkPlugin", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MeshUpgradeProfile", - }, - }, + name: "String", }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + networkPluginMode: { + serializedName: "networkPluginMode", type: { name: "String", }, }, - }, - }, -}; - -export const TrustedAccessRoleBindingListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrustedAccessRoleBindingListResult", - modelProperties: { - value: { - serializedName: "value", + networkPolicy: { + serializedName: "networkPolicy", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrustedAccessRoleBinding", - }, - }, + name: "String", }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + networkMode: { + serializedName: "networkMode", + type: { + name: "String", + }, + }, + loadBalancerSku: { + serializedName: "loadBalancerSku", type: { name: "String", }, @@ -4711,11 +5676,23 @@ export const TrustedAccessRoleRule: coreClient.CompositeMapper = { }, }; -export const MachineListResult: coreClient.CompositeMapper = { +export const TrustedAccessRoleBindingListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineListResult", + className: "TrustedAccessRoleBindingListResult", modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrustedAccessRoleBinding", + }, + }, + }, + }, nextLink: { serializedName: "nextLink", readOnly: true, @@ -4723,6 +5700,39 @@ export const MachineListResult: coreClient.CompositeMapper = { name: "String", }, }, + }, + }, +}; + +export const GuardrailsAvailableVersionsProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GuardrailsAvailableVersionsProperties", + modelProperties: { + isDefaultVersion: { + serializedName: "isDefaultVersion", + readOnly: true, + type: { + name: "Boolean", + }, + }, + support: { + serializedName: "support", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const GuardrailsAvailableVersionsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuardrailsAvailableVersionsList", + modelProperties: { value: { serializedName: "value", type: { @@ -4730,29 +5740,65 @@ export const MachineListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Machine", + className: "GuardrailsAvailableVersion", }, }, }, }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, }, }, }; -export const MachineProperties: coreClient.CompositeMapper = { +export const SafeguardsAvailableVersionsProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SafeguardsAvailableVersionsProperties", + modelProperties: { + isDefaultVersion: { + serializedName: "isDefaultVersion", + readOnly: true, + type: { + name: "Boolean", + }, + }, + support: { + serializedName: "support", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SafeguardsAvailableVersionsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineProperties", + className: "SafeguardsAvailableVersionsList", modelProperties: { - network: { - serializedName: "network", + value: { + serializedName: "value", type: { - name: "Composite", - className: "MachineNetworkProperties", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SafeguardsAvailableVersion", + }, + }, }, }, - resourceId: { - serializedName: "resourceId", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String", @@ -4762,20 +5808,47 @@ export const MachineProperties: coreClient.CompositeMapper = { }, }; -export const MachineNetworkProperties: coreClient.CompositeMapper = { +export const MeshRevisionProfileList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineNetworkProperties", + className: "MeshRevisionProfileList", modelProperties: { - ipAddresses: { - serializedName: "ipAddresses", + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MeshRevisionProfile", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const MeshRevisionProfileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeshRevisionProfileProperties", + modelProperties: { + meshRevisions: { + serializedName: "meshRevisions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "MachineIpAddress", + className: "MeshRevision", }, }, }, @@ -4784,23 +5857,204 @@ export const MachineNetworkProperties: coreClient.CompositeMapper = { }, }; -export const MachineIpAddress: coreClient.CompositeMapper = { +export const MeshRevision: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineIpAddress", + className: "MeshRevision", modelProperties: { - family: { - serializedName: "family", + revision: { + serializedName: "revision", + type: { + name: "String", + }, + }, + upgrades: { + serializedName: "upgrades", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + compatibleWith: { + serializedName: "compatibleWith", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CompatibleVersions", + }, + }, + }, + }, + }, + }, +}; + +export const CompatibleVersions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CompatibleVersions", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + versions: { + serializedName: "versions", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const MeshUpgradeProfileList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeshUpgradeProfileList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MeshUpgradeProfile", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String", }, }, - ip: { - serializedName: "ip", + }, + }, +}; + +export const LoadBalancerListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBalancerListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LoadBalancer", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "String", + name: "String", + }, + }, + }, + }, +}; + +export const LabelSelector: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LabelSelector", + modelProperties: { + matchLabels: { + serializedName: "matchLabels", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + matchExpressions: { + serializedName: "matchExpressions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LabelSelectorRequirement", + }, + }, + }, + }, + }, + }, +}; + +export const LabelSelectorRequirement: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LabelSelectorRequirement", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "String", + }, + }, + operator: { + serializedName: "operator", + type: { + name: "String", + }, + }, + values: { + serializedName: "values", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const RebalanceLoadBalancersRequestBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RebalanceLoadBalancersRequestBody", + modelProperties: { + loadBalancerNames: { + serializedName: "loadBalancerNames", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, }, @@ -4861,16 +6115,6 @@ export const TrackedResource: coreClient.CompositeMapper = { }, }; -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties, - }, - }, -}; - export const TrustedAccessRoleBinding: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4907,6 +6151,50 @@ export const TrustedAccessRoleBinding: coreClient.CompositeMapper = { }, }; +export const GuardrailsAvailableVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuardrailsAvailableVersion", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "GuardrailsAvailableVersionsProperties", + }, + }, + }, + }, +}; + +export const SafeguardsAvailableVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SafeguardsAvailableVersion", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "SafeguardsAvailableVersionsProperties", + }, + }, + }, + }, +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties, + }, + }, +}; + export const MaintenanceConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5008,6 +6296,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String", }, }, + messageOfTheDay: { + serializedName: "properties.messageOfTheDay", + type: { + name: "String", + }, + }, vnetSubnetID: { serializedName: "properties.vnetSubnetID", type: { @@ -5020,6 +6314,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String", }, }, + podIPAllocationMode: { + serializedName: "properties.podIPAllocationMode", + type: { + name: "String", + }, + }, maxPods: { serializedName: "properties.maxPods", type: { @@ -5133,6 +6433,12 @@ export const AgentPool: coreClient.CompositeMapper = { name: "Boolean", }, }, + enableCustomCATrust: { + serializedName: "properties.enableCustomCATrust", + type: { + name: "Boolean", + }, + }, nodePublicIPPrefixID: { serializedName: "properties.nodePublicIPPrefixID", type: { @@ -5185,6 +6491,17 @@ export const AgentPool: coreClient.CompositeMapper = { }, }, }, + nodeInitializationTaints: { + serializedName: "properties.nodeInitializationTaints", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, proximityPlacementGroupID: { serializedName: "properties.proximityPlacementGroupID", type: { @@ -5248,18 +6565,18 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String", }, }, - networkProfile: { - serializedName: "properties.networkProfile", + windowsProfile: { + serializedName: "properties.windowsProfile", type: { name: "Composite", - className: "AgentPoolNetworkProfile", + className: "AgentPoolWindowsProfile", }, }, - windowsProfile: { - serializedName: "properties.windowsProfile", + networkProfile: { + serializedName: "properties.networkProfile", type: { name: "Composite", - className: "AgentPoolWindowsProfile", + className: "AgentPoolNetworkProfile", }, }, securityProfile: { @@ -5269,6 +6586,46 @@ export const AgentPool: coreClient.CompositeMapper = { className: "AgentPoolSecurityProfile", }, }, + gpuProfile: { + serializedName: "properties.gpuProfile", + type: { + name: "Composite", + className: "AgentPoolGPUProfile", + }, + }, + artifactStreamingProfile: { + serializedName: "properties.artifactStreamingProfile", + type: { + name: "Composite", + className: "AgentPoolArtifactStreamingProfile", + }, + }, + virtualMachinesProfile: { + serializedName: "properties.virtualMachinesProfile", + type: { + name: "Composite", + className: "VirtualMachinesProfile", + }, + }, + virtualMachineNodesStatus: { + serializedName: "properties.virtualMachineNodesStatus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineNodes", + }, + }, + }, + }, + gatewayProfile: { + serializedName: "properties.gatewayProfile", + type: { + name: "Composite", + className: "AgentPoolGatewayProfile", + }, + }, }, }, }; @@ -5334,6 +6691,12 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterIdentity", }, }, + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -5348,6 +6711,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "PowerState", }, }, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "CreationData", + }, + }, maxAgentPools: { serializedName: "properties.maxAgentPools", readOnly: true, @@ -5491,6 +6861,12 @@ export const ManagedCluster: coreClient.CompositeMapper = { name: "Boolean", }, }, + enableNamespaceResources: { + serializedName: "properties.enableNamespaceResources", + type: { + name: "Boolean", + }, + }, networkProfile: { serializedName: "properties.networkProfile", type: { @@ -5614,6 +6990,13 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterAzureMonitorProfile", }, }, + safeguardsProfile: { + serializedName: "properties.safeguardsProfile", + type: { + name: "Composite", + className: "SafeguardsProfile", + }, + }, serviceMeshProfile: { serializedName: "properties.serviceMeshProfile", type: { @@ -5635,6 +7018,27 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterMetricsProfile", }, }, + aiToolchainOperatorProfile: { + serializedName: "properties.aiToolchainOperatorProfile", + type: { + name: "Composite", + className: "ManagedClusterAIToolchainOperatorProfile", + }, + }, + nodeProvisioningProfile: { + serializedName: "properties.nodeProvisioningProfile", + type: { + name: "Composite", + className: "ManagedClusterNodeProvisioningProfile", + }, + }, + bootstrapProfile: { + serializedName: "properties.bootstrapProfile", + type: { + name: "Composite", + className: "ManagedClusterBootstrapProfile", + }, + }, }, }, }; @@ -5722,6 +7126,37 @@ export const Snapshot: coreClient.CompositeMapper = { }, }; +export const ManagedClusterSnapshot: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedClusterSnapshot", + modelProperties: { + ...TrackedResource.type.modelProperties, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "CreationData", + }, + }, + snapshotType: { + defaultValue: "NodePool", + serializedName: "properties.snapshotType", + type: { + name: "String", + }, + }, + managedClusterPropertiesReadOnly: { + serializedName: "properties.managedClusterPropertiesReadOnly", + type: { + name: "Composite", + className: "ManagedClusterPropertiesForSnapshot", + }, + }, + }, + }, +}; + export const MeshRevisionProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5756,6 +7191,62 @@ export const MeshUpgradeProfile: coreClient.CompositeMapper = { }, }; +export const LoadBalancer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBalancer", + modelProperties: { + ...ProxyResource.type.modelProperties, + namePropertiesName: { + serializedName: "properties.name", + type: { + name: "String", + }, + }, + primaryAgentPoolName: { + serializedName: "properties.primaryAgentPoolName", + type: { + name: "String", + }, + }, + allowServicePlacement: { + serializedName: "properties.allowServicePlacement", + type: { + name: "Boolean", + }, + }, + serviceLabelSelector: { + serializedName: "properties.serviceLabelSelector", + type: { + name: "Composite", + className: "LabelSelector", + }, + }, + serviceNamespaceSelector: { + serializedName: "properties.serviceNamespaceSelector", + type: { + name: "Composite", + className: "LabelSelector", + }, + }, + nodeSelector: { + serializedName: "properties.nodeSelector", + type: { + name: "Composite", + className: "LabelSelector", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const ManagedClustersDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5803,11 +7294,11 @@ export const ManagedClustersResetAADProfileHeaders: coreClient.CompositeMapper = }, }; -export const ManagedClustersRotateClusterCertificatesHeaders: coreClient.CompositeMapper = +export const ManagedClustersAbortLatestOperationHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedClustersRotateClusterCertificatesHeaders", + className: "ManagedClustersAbortLatestOperationHeaders", modelProperties: { location: { serializedName: "location", @@ -5815,15 +7306,21 @@ export const ManagedClustersRotateClusterCertificatesHeaders: coreClient.Composi name: "String", }, }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, }, }, }; -export const ManagedClustersAbortLatestOperationHeaders: coreClient.CompositeMapper = +export const ManagedClustersRotateClusterCertificatesHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedClustersAbortLatestOperationHeaders", + className: "ManagedClustersRotateClusterCertificatesHeaders", modelProperties: { location: { serializedName: "location", @@ -5831,12 +7328,6 @@ export const ManagedClustersAbortLatestOperationHeaders: coreClient.CompositeMap name: "String", }, }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, }, }, }; @@ -5918,6 +7409,22 @@ export const ManagedClustersGetCommandResultHeaders: coreClient.CompositeMapper }, }; +export const ManagedClustersRebalanceLoadBalancersHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedClustersRebalanceLoadBalancersHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + export const AgentPoolsAbortLatestOperationHeaders: coreClient.CompositeMapper = { type: { @@ -6001,3 +7508,18 @@ export const TrustedAccessRoleBindingsDeleteHeaders: coreClient.CompositeMapper }, }, }; + +export const LoadBalancersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBalancersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index 1032f08af791..77e4fdacef04 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -17,13 +17,16 @@ import { ManagedClusterServicePrincipalProfile as ManagedClusterServicePrincipalProfileMapper, ManagedClusterAADProfile as ManagedClusterAADProfileMapper, RunCommandRequest as RunCommandRequestMapper, + RebalanceLoadBalancersRequestBody as RebalanceLoadBalancersRequestBodyMapper, MaintenanceConfiguration as MaintenanceConfigurationMapper, AgentPool as AgentPoolMapper, AgentPoolDeleteMachinesParameter as AgentPoolDeleteMachinesParameterMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, PrivateLinkResource as PrivateLinkResourceMapper, Snapshot as SnapshotMapper, + ManagedClusterSnapshot as ManagedClusterSnapshotMapper, TrustedAccessRoleBinding as TrustedAccessRoleBindingMapper, + LoadBalancer as LoadBalancerMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -53,7 +56,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-09-01", + defaultValue: "2024-09-02-preview", isConstant: true, serializedName: "api-version", type: { @@ -193,6 +196,16 @@ export const parameters1: OperationParameter = { mapper: TagsObjectMapper, }; +export const ignorePodDisruptionBudget: OperationQueryParameter = { + parameterPath: ["options", "ignorePodDisruptionBudget"], + mapper: { + serializedName: "ignore-pod-disruption-budget", + type: { + name: "Boolean", + }, + }, +}; + export const parameters2: OperationParameter = { parameterPath: "parameters", mapper: ManagedClusterServicePrincipalProfileMapper, @@ -219,6 +232,21 @@ export const commandId: OperationURLParameter = { }, }; +export const version: OperationURLParameter = { + parameterPath: "version", + mapper: { + constraints: { + MaxLength: 24, + MinLength: 1, + }, + serializedName: "version", + required: true, + type: { + name: "String", + }, + }, +}; + export const mode: OperationURLParameter = { parameterPath: "mode", mapper: { @@ -237,6 +265,11 @@ export const mode: OperationURLParameter = { }, }; +export const parameters4: OperationParameter = { + parameterPath: "parameters", + mapper: RebalanceLoadBalancersRequestBodyMapper, +}; + export const nextLink: OperationURLParameter = { parameterPath: "nextLink", mapper: { @@ -260,7 +293,7 @@ export const configName: OperationURLParameter = { }, }; -export const parameters4: OperationParameter = { +export const parameters5: OperationParameter = { parameterPath: "parameters", mapper: MaintenanceConfigurationMapper, }; @@ -281,26 +314,30 @@ export const agentPoolName: OperationURLParameter = { }, }; -export const parameters5: OperationParameter = { +export const parameters6: OperationParameter = { parameterPath: "parameters", mapper: AgentPoolMapper, }; -export const ignorePodDisruptionBudget: OperationQueryParameter = { - parameterPath: ["options", "ignorePodDisruptionBudget"], +export const machines: OperationParameter = { + parameterPath: "machines", + mapper: AgentPoolDeleteMachinesParameterMapper, +}; + +export const machineName: OperationURLParameter = { + parameterPath: "machineName", mapper: { - serializedName: "ignore-pod-disruption-budget", + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][-_a-zA-Z0-9]{0,39}$"), + }, + serializedName: "machineName", + required: true, type: { - name: "Boolean", + name: "String", }, }, }; -export const machines: OperationParameter = { - parameterPath: "machines", - mapper: AgentPoolDeleteMachinesParameterMapper, -}; - export const privateEndpointConnectionName: OperationURLParameter = { parameterPath: "privateEndpointConnectionName", mapper: { @@ -312,21 +349,40 @@ export const privateEndpointConnectionName: OperationURLParameter = { }, }; -export const parameters6: OperationParameter = { +export const parameters7: OperationParameter = { parameterPath: "parameters", mapper: PrivateEndpointConnectionMapper, }; -export const parameters7: OperationParameter = { +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: PrivateLinkResourceMapper, }; -export const parameters8: OperationParameter = { +export const operationId: OperationURLParameter = { + parameterPath: "operationId", + mapper: { + constraints: { + MinLength: 1, + }, + serializedName: "operationId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const parameters9: OperationParameter = { parameterPath: "parameters", mapper: SnapshotMapper, }; +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedClusterSnapshotMapper, +}; + export const trustedAccessRoleBindingName: OperationURLParameter = { parameterPath: "trustedAccessRoleBindingName", mapper: { @@ -348,16 +404,48 @@ export const trustedAccessRoleBinding: OperationParameter = { mapper: TrustedAccessRoleBindingMapper, }; -export const machineName: OperationURLParameter = { - parameterPath: "machineName", +export const loadBalancerName: OperationURLParameter = { + parameterPath: "loadBalancerName", mapper: { constraints: { - Pattern: new RegExp("^[a-zA-Z0-9][-_a-zA-Z0-9]{0,39}$"), + Pattern: new RegExp("^[a-z][a-z0-9]{0,11}$"), + MaxLength: 12, + MinLength: 1, }, - serializedName: "machineName", + serializedName: "loadBalancerName", required: true, type: { name: "String", }, }, }; + +export const name: OperationParameter = { + parameterPath: ["options", "name"], + mapper: LoadBalancerMapper, +}; + +export const primaryAgentPoolName: OperationParameter = { + parameterPath: ["options", "primaryAgentPoolName"], + mapper: LoadBalancerMapper, +}; + +export const allowServicePlacement: OperationParameter = { + parameterPath: ["options", "allowServicePlacement"], + mapper: LoadBalancerMapper, +}; + +export const serviceLabelSelector: OperationParameter = { + parameterPath: ["options", "serviceLabelSelector"], + mapper: LoadBalancerMapper, +}; + +export const serviceNamespaceSelector: OperationParameter = { + parameterPath: ["options", "serviceNamespaceSelector"], + mapper: LoadBalancerMapper, +}; + +export const nodeSelector: OperationParameter = { + parameterPath: ["options", "nodeSelector"], + mapper: LoadBalancerMapper, +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts index 6947aa7345bd..7647e169b973 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts @@ -135,7 +135,7 @@ export class AgentPoolsImpl implements AgentPools { /** * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. @@ -210,7 +210,7 @@ export class AgentPoolsImpl implements AgentPools { /** * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. @@ -816,7 +816,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/containerservice/arm-containerservice/src/operations/index.ts b/sdk/containerservice/arm-containerservice/src/operations/index.ts index 49a7385b86eb..9576b01c2834 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/index.ts @@ -10,10 +10,13 @@ export * from "./operations"; export * from "./managedClusters"; export * from "./maintenanceConfigurations"; export * from "./agentPools"; +export * from "./machines"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; +export * from "./operationStatusResultOperations"; export * from "./snapshots"; -export * from "./trustedAccessRoleBindings"; +export * from "./managedClusterSnapshots"; export * from "./trustedAccessRoles"; -export * from "./machines"; +export * from "./trustedAccessRoleBindings"; +export * from "./loadBalancers"; diff --git a/sdk/containerservice/arm-containerservice/src/operations/loadBalancers.ts b/sdk/containerservice/arm-containerservice/src/operations/loadBalancers.ts new file mode 100644 index 000000000000..40e42bbd64ac --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/loadBalancers.ts @@ -0,0 +1,435 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { LoadBalancers } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + LoadBalancer, + LoadBalancersListByManagedClusterNextOptionalParams, + LoadBalancersListByManagedClusterOptionalParams, + LoadBalancersListByManagedClusterResponse, + LoadBalancersGetOptionalParams, + LoadBalancersGetResponse, + LoadBalancersCreateOrUpdateOptionalParams, + LoadBalancersCreateOrUpdateResponse, + LoadBalancersDeleteOptionalParams, + LoadBalancersDeleteResponse, + LoadBalancersListByManagedClusterNextResponse, +} from "../models"; + +/// +/** Class containing LoadBalancers operations. */ +export class LoadBalancersImpl implements LoadBalancers { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class LoadBalancers class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + public listByManagedCluster( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByManagedClusterPagingAll( + resourceGroupName, + resourceName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByManagedClusterPagingPage( + resourceGroupName, + resourceName, + options, + settings, + ); + }, + }; + } + + private async *listByManagedClusterPagingPage( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: LoadBalancersListByManagedClusterResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByManagedCluster( + resourceGroupName, + resourceName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByManagedClusterNext( + resourceGroupName, + resourceName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByManagedClusterPagingAll( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByManagedClusterPagingPage( + resourceGroupName, + resourceName, + options, + )) { + yield* page; + } + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + private _listByManagedCluster( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listByManagedClusterOperationSpec, + ); + } + + /** + * Gets the specified load balancer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, loadBalancerName, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, loadBalancerName, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LoadBalancersDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourceName, loadBalancerName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + LoadBalancersDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + loadBalancerName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListByManagedClusterNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param nextLink The nextLink from the previous successful call to the ListByManagedCluster method. + * @param options The options parameters. + */ + private _listByManagedClusterNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: LoadBalancersListByManagedClusterNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listByManagedClusterNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByManagedClusterOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoadBalancerListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoadBalancer, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.loadBalancerName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LoadBalancer, + }, + 201: { + bodyMapper: Mappers.LoadBalancer, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: { + parameterPath: { + name: ["options", "name"], + primaryAgentPoolName: ["options", "primaryAgentPoolName"], + allowServicePlacement: ["options", "allowServicePlacement"], + serviceLabelSelector: ["options", "serviceLabelSelector"], + serviceNamespaceSelector: ["options", "serviceNamespaceSelector"], + nodeSelector: ["options", "nodeSelector"], + }, + mapper: { ...Mappers.LoadBalancer, required: true }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.loadBalancerName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.LoadBalancersDeleteHeaders, + }, + 201: { + headersMapper: Mappers.LoadBalancersDeleteHeaders, + }, + 202: { + headersMapper: Mappers.LoadBalancersDeleteHeaders, + }, + 204: { + headersMapper: Mappers.LoadBalancersDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.loadBalancerName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByManagedClusterNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoadBalancerListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts b/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts index ce0c73cbf52c..d090f544c075 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts @@ -280,7 +280,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts new file mode 100644 index 000000000000..aba7407b0ed2 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts @@ -0,0 +1,468 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedClusterSnapshots } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + ManagedClusterSnapshot, + ManagedClusterSnapshotsListNextOptionalParams, + ManagedClusterSnapshotsListOptionalParams, + ManagedClusterSnapshotsListResponse, + ManagedClusterSnapshotsListByResourceGroupNextOptionalParams, + ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ManagedClusterSnapshotsListByResourceGroupResponse, + ManagedClusterSnapshotsGetOptionalParams, + ManagedClusterSnapshotsGetResponse, + ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ManagedClusterSnapshotsCreateOrUpdateResponse, + TagsObject, + ManagedClusterSnapshotsUpdateTagsOptionalParams, + ManagedClusterSnapshotsUpdateTagsResponse, + ManagedClusterSnapshotsDeleteOptionalParams, + ManagedClusterSnapshotsListNextResponse, + ManagedClusterSnapshotsListByResourceGroupNextResponse, +} from "../models"; + +/// +/** Class containing ManagedClusterSnapshots operations. */ +export class ManagedClusterSnapshotsImpl implements ManagedClusterSnapshots { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class ManagedClusterSnapshots class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * @param options The options parameters. + */ + public list( + options?: ManagedClusterSnapshotsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + }, + }; + } + + private async *listPagingPage( + options?: ManagedClusterSnapshotsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedClusterSnapshotsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: ManagedClusterSnapshotsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings, + ); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedClusterSnapshotsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options, + )) { + yield* page; + } + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * @param options The options parameters. + */ + private _list( + options?: ManagedClusterSnapshotsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * Gets a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + parameters: ManagedClusterSnapshot, + options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, parameters, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Updates tags on a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + resourceName: string, + parameters: TagsObject, + options?: ManagedClusterSnapshotsUpdateTagsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, parameters, options }, + updateTagsOperationSpec, + ); + } + + /** + * Deletes a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + deleteOperationSpec, + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ManagedClusterSnapshotsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec, + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ManagedClusterSnapshotsListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshot, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshot, + }, + 201: { + bodyMapper: Mappers.ManagedClusterSnapshot, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshot, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterSnapshotListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts index d5ff22c4f06c..1f5a3d5568c7 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -31,6 +31,14 @@ import { ManagedClustersListOutboundNetworkDependenciesEndpointsNextOptionalParams, ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams, ManagedClustersListOutboundNetworkDependenciesEndpointsResponse, + GuardrailsAvailableVersion, + ManagedClustersListGuardrailsVersionsNextOptionalParams, + ManagedClustersListGuardrailsVersionsOptionalParams, + ManagedClustersListGuardrailsVersionsResponse, + SafeguardsAvailableVersion, + ManagedClustersListSafeguardsVersionsNextOptionalParams, + ManagedClustersListSafeguardsVersionsOptionalParams, + ManagedClustersListSafeguardsVersionsResponse, MeshRevisionProfile, ManagedClustersListMeshRevisionProfilesNextOptionalParams, ManagedClustersListMeshRevisionProfilesOptionalParams, @@ -64,10 +72,10 @@ import { ManagedClustersResetServicePrincipalProfileOptionalParams, ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, - ManagedClustersRotateClusterCertificatesOptionalParams, - ManagedClustersRotateClusterCertificatesResponse, ManagedClustersAbortLatestOperationOptionalParams, ManagedClustersAbortLatestOperationResponse, + ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateClusterCertificatesResponse, ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersRotateServiceAccountSigningKeysResponse, ManagedClustersStopOptionalParams, @@ -79,13 +87,22 @@ import { ManagedClustersRunCommandResponse, ManagedClustersGetCommandResultOptionalParams, ManagedClustersGetCommandResultResponse, + ManagedClustersGetGuardrailsVersionsOptionalParams, + ManagedClustersGetGuardrailsVersionsResponse, + ManagedClustersGetSafeguardsVersionsOptionalParams, + ManagedClustersGetSafeguardsVersionsResponse, ManagedClustersGetMeshRevisionProfileOptionalParams, ManagedClustersGetMeshRevisionProfileResponse, ManagedClustersGetMeshUpgradeProfileOptionalParams, ManagedClustersGetMeshUpgradeProfileResponse, + RebalanceLoadBalancersRequestBody, + ManagedClustersRebalanceLoadBalancersOptionalParams, + ManagedClustersRebalanceLoadBalancersResponse, ManagedClustersListNextResponse, ManagedClustersListByResourceGroupNextResponse, ManagedClustersListOutboundNetworkDependenciesEndpointsNextResponse, + ManagedClustersListGuardrailsVersionsNextResponse, + ManagedClustersListSafeguardsVersionsNextResponse, ManagedClustersListMeshRevisionProfilesNextResponse, ManagedClustersListMeshUpgradeProfilesNextResponse, } from "../models"; @@ -311,6 +328,144 @@ export class ManagedClustersImpl implements ManagedClusters { } } + /** + * Contains list of Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + public listGuardrailsVersions( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listGuardrailsVersionsPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listGuardrailsVersionsPagingPage( + location, + options, + settings, + ); + }, + }; + } + + private async *listGuardrailsVersionsPagingPage( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedClustersListGuardrailsVersionsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listGuardrailsVersions(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listGuardrailsVersionsNext( + location, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listGuardrailsVersionsPagingAll( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listGuardrailsVersionsPagingPage( + location, + options, + )) { + yield* page; + } + } + + /** + * Contains list of Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + public listSafeguardsVersions( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listSafeguardsVersionsPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listSafeguardsVersionsPagingPage( + location, + options, + settings, + ); + }, + }; + } + + private async *listSafeguardsVersionsPagingPage( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedClustersListSafeguardsVersionsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listSafeguardsVersions(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listSafeguardsVersionsNext( + location, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listSafeguardsVersionsPagingAll( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listSafeguardsVersionsPagingPage( + location, + options, + )) { + yield* page; + } + } + /** * Contains extra metadata on each revision, including supported revisions, cluster compatibility and * available upgrades @@ -1068,26 +1223,27 @@ export class ManagedClustersImpl implements ManagedClusters { } /** - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more - * details about rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to + * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param options The options parameters. */ - async beginRotateClusterCertificates( + async beginAbortLatestOperation( resourceGroupName: string, resourceName: string, - options?: ManagedClustersRotateClusterCertificatesOptionalParams, + options?: ManagedClustersAbortLatestOperationOptionalParams, ): Promise< SimplePollerLike< - OperationState, - ManagedClustersRotateClusterCertificatesResponse + OperationState, + ManagedClustersAbortLatestOperationResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -1125,11 +1281,11 @@ export class ManagedClustersImpl implements ManagedClusters { const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, options }, - spec: rotateClusterCertificatesOperationSpec, + spec: abortLatestOperationOperationSpec, }); const poller = await createHttpPoller< - ManagedClustersRotateClusterCertificatesResponse, - OperationState + ManagedClustersAbortLatestOperationResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -1140,18 +1296,19 @@ export class ManagedClustersImpl implements ManagedClusters { } /** - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more - * details about rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to + * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param options The options parameters. */ - async beginRotateClusterCertificatesAndWait( + async beginAbortLatestOperationAndWait( resourceGroupName: string, resourceName: string, - options?: ManagedClustersRotateClusterCertificatesOptionalParams, - ): Promise { - const poller = await this.beginRotateClusterCertificates( + options?: ManagedClustersAbortLatestOperationOptionalParams, + ): Promise { + const poller = await this.beginAbortLatestOperation( resourceGroupName, resourceName, options, @@ -1160,27 +1317,26 @@ export class ManagedClustersImpl implements ManagedClusters { } /** - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to - * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more + * details about rotating managed cluster certificates. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param options The options parameters. */ - async beginAbortLatestOperation( + async beginRotateClusterCertificates( resourceGroupName: string, resourceName: string, - options?: ManagedClustersAbortLatestOperationOptionalParams, + options?: ManagedClustersRotateClusterCertificatesOptionalParams, ): Promise< SimplePollerLike< - OperationState, - ManagedClustersAbortLatestOperationResponse + OperationState, + ManagedClustersRotateClusterCertificatesResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -1218,11 +1374,11 @@ export class ManagedClustersImpl implements ManagedClusters { const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, options }, - spec: abortLatestOperationOperationSpec, + spec: rotateClusterCertificatesOperationSpec, }); const poller = await createHttpPoller< - ManagedClustersAbortLatestOperationResponse, - OperationState + ManagedClustersRotateClusterCertificatesResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -1233,19 +1389,18 @@ export class ManagedClustersImpl implements ManagedClusters { } /** - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to - * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more + * details about rotating managed cluster certificates. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param options The options parameters. */ - async beginAbortLatestOperationAndWait( + async beginRotateClusterCertificatesAndWait( resourceGroupName: string, resourceName: string, - options?: ManagedClustersAbortLatestOperationOptionalParams, - ): Promise { - const poller = await this.beginAbortLatestOperation( + options?: ManagedClustersRotateClusterCertificatesOptionalParams, + ): Promise { + const poller = await this.beginRotateClusterCertificates( resourceGroupName, resourceName, options, @@ -1669,6 +1824,70 @@ export class ManagedClustersImpl implements ManagedClusters { ); } + /** + * Contains Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param version Safeguards version + * @param options The options parameters. + */ + getGuardrailsVersions( + location: string, + version: string, + options?: ManagedClustersGetGuardrailsVersionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, version, options }, + getGuardrailsVersionsOperationSpec, + ); + } + + /** + * Contains list of Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + private _listGuardrailsVersions( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listGuardrailsVersionsOperationSpec, + ); + } + + /** + * Contains Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param version Safeguards version + * @param options The options parameters. + */ + getSafeguardsVersions( + location: string, + version: string, + options?: ManagedClustersGetSafeguardsVersionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, version, options }, + getSafeguardsVersionsOperationSpec, + ); + } + + /** + * Contains list of Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + private _listSafeguardsVersions( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listSafeguardsVersionsOperationSpec, + ); + } + /** * Contains extra metadata on each revision, including supported revisions, cluster compatibility and * available upgrades @@ -1739,6 +1958,102 @@ export class ManagedClustersImpl implements ManagedClusters { ); } + /** + * Rebalance nodes across specific load balancers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load + * balancers will be rebalanced. + * @param options The options parameters. + */ + async beginRebalanceLoadBalancers( + resourceGroupName: string, + resourceName: string, + parameters: RebalanceLoadBalancersRequestBody, + options?: ManagedClustersRebalanceLoadBalancersOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedClustersRebalanceLoadBalancersResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourceName, parameters, options }, + spec: rebalanceLoadBalancersOperationSpec, + }); + const poller = await createHttpPoller< + ManagedClustersRebalanceLoadBalancersResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Rebalance nodes across specific load balancers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load + * balancers will be rebalanced. + * @param options The options parameters. + */ + async beginRebalanceLoadBalancersAndWait( + resourceGroupName: string, + resourceName: string, + parameters: RebalanceLoadBalancersRequestBody, + options?: ManagedClustersRebalanceLoadBalancersOptionalParams, + ): Promise { + const poller = await this.beginRebalanceLoadBalancers( + resourceGroupName, + resourceName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + /** * ListNext * @param nextLink The nextLink from the previous successful call to the List method. @@ -1791,6 +2106,40 @@ export class ManagedClustersImpl implements ManagedClusters { ); } + /** + * ListGuardrailsVersionsNext + * @param location The name of the Azure region. + * @param nextLink The nextLink from the previous successful call to the ListGuardrailsVersions method. + * @param options The options parameters. + */ + private _listGuardrailsVersionsNext( + location: string, + nextLink: string, + options?: ManagedClustersListGuardrailsVersionsNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listGuardrailsVersionsNextOperationSpec, + ); + } + + /** + * ListSafeguardsVersionsNext + * @param location The name of the Azure region. + * @param nextLink The nextLink from the previous successful call to the ListSafeguardsVersions method. + * @param options The options parameters. + */ + private _listSafeguardsVersionsNext( + location: string, + nextLink: string, + options?: ManagedClustersListSafeguardsVersionsNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listSafeguardsVersionsNextOperationSpec, + ); + } + /** * ListMeshRevisionProfilesNext * @param location The name of the Azure region. @@ -2113,7 +2462,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.ignorePodDisruptionBudget, + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -2171,21 +2523,21 @@ const resetAADProfileOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer, }; -const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", +const abortLatestOperationOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", httpMethod: "POST", responses: { 200: { - headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, + headersMapper: Mappers.ManagedClustersAbortLatestOperationHeaders, }, 201: { - headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, + headersMapper: Mappers.ManagedClustersAbortLatestOperationHeaders, }, 202: { - headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, + headersMapper: Mappers.ManagedClustersAbortLatestOperationHeaders, }, 204: { - headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, + headersMapper: Mappers.ManagedClustersAbortLatestOperationHeaders, }, default: { bodyMapper: Mappers.CloudError, @@ -2201,21 +2553,21 @@ const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; -const abortLatestOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", +const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", httpMethod: "POST", responses: { 200: { - headersMapper: Mappers.ManagedClustersAbortLatestOperationHeaders, + headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, }, 201: { - headersMapper: Mappers.ManagedClustersAbortLatestOperationHeaders, + headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, }, 202: { - headersMapper: Mappers.ManagedClustersAbortLatestOperationHeaders, + headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, }, 204: { - headersMapper: Mappers.ManagedClustersAbortLatestOperationHeaders, + headersMapper: Mappers.ManagedClustersRotateClusterCertificatesHeaders, }, default: { bodyMapper: Mappers.CloudError, @@ -2404,6 +2756,88 @@ const listOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.Operatio headerParameters: [Parameters.accept], serializer, }; +const getGuardrailsVersionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuardrailsAvailableVersion, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.version, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listGuardrailsVersionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuardrailsAvailableVersionsList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getSafeguardsVersionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SafeguardsAvailableVersion, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.version, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listSafeguardsVersionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SafeguardsAvailableVersionsList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; const listMeshRevisionProfilesOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles", httpMethod: "GET", @@ -2488,6 +2922,38 @@ const getMeshUpgradeProfileOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const rebalanceLoadBalancersOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ManagedClustersRebalanceLoadBalancersHeaders, + }, + 201: { + headersMapper: Mappers.ManagedClustersRebalanceLoadBalancersHeaders, + }, + 202: { + headersMapper: Mappers.ManagedClustersRebalanceLoadBalancersHeaders, + }, + 204: { + headersMapper: Mappers.ManagedClustersRebalanceLoadBalancersHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -2549,6 +3015,46 @@ const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.Oper headerParameters: [Parameters.accept], serializer, }; +const listGuardrailsVersionsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuardrailsAvailableVersionsList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listSafeguardsVersionsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SafeguardsAvailableVersionsList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; const listMeshRevisionProfilesNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/containerservice/arm-containerservice/src/operations/operationStatusResultOperations.ts b/sdk/containerservice/arm-containerservice/src/operations/operationStatusResultOperations.ts new file mode 100644 index 000000000000..21cac012cb7c --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/operationStatusResultOperations.ts @@ -0,0 +1,284 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { OperationStatusResultOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + OperationStatusResult, + OperationStatusResultListNextOptionalParams, + OperationStatusResultListOptionalParams, + OperationStatusResultListResponse, + OperationStatusResultGetOptionalParams, + OperationStatusResultGetResponse, + OperationStatusResultGetByAgentPoolOptionalParams, + OperationStatusResultGetByAgentPoolResponse, + OperationStatusResultListNextResponse, +} from "../models"; + +/// +/** Class containing OperationStatusResultOperations operations. */ +export class OperationStatusResultOperationsImpl + implements OperationStatusResultOperations +{ + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class OperationStatusResultOperations class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * Gets a list of operations in the specified managedCluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, resourceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + resourceName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: OperationStatusResultListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, resourceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + resourceName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + options, + )) { + yield* page; + } + } + + /** + * Gets a list of operations in the specified managedCluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listOperationSpec, + ); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + operationId: string, + options?: OperationStatusResultGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, operationId, options }, + getOperationSpec, + ); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + getByAgentPool( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + operationId: string, + options?: OperationStatusResultGetByAgentPoolOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, agentPoolName, operationId, options }, + getByAgentPoolOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: OperationStatusResultListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResultList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.operationId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getByAgentPoolOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.agentPoolName, + Parameters.operationId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResultList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts b/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts index e022b354a4af..c3df55376088 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts @@ -261,7 +261,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts b/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts index f7bb489fbe84..f8533aa465f7 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/resolvePrivateLinkServiceId.ts @@ -64,7 +64,7 @@ const postOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts b/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts index 23a4396858bb..276067652b9f 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts @@ -372,7 +372,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts index 2c11ac25f5f0..47959ddf591f 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/agentPools.ts @@ -46,7 +46,7 @@ export interface AgentPools { /** * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. @@ -66,7 +66,7 @@ export interface AgentPools { /** * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts index 49a7385b86eb..9576b01c2834 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts @@ -10,10 +10,13 @@ export * from "./operations"; export * from "./managedClusters"; export * from "./maintenanceConfigurations"; export * from "./agentPools"; +export * from "./machines"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; +export * from "./operationStatusResultOperations"; export * from "./snapshots"; -export * from "./trustedAccessRoleBindings"; +export * from "./managedClusterSnapshots"; export * from "./trustedAccessRoles"; -export * from "./machines"; +export * from "./trustedAccessRoleBindings"; +export * from "./loadBalancers"; diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/loadBalancers.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/loadBalancers.ts new file mode 100644 index 000000000000..bdca66c5451d --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/loadBalancers.ts @@ -0,0 +1,93 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + LoadBalancer, + LoadBalancersListByManagedClusterOptionalParams, + LoadBalancersGetOptionalParams, + LoadBalancersGetResponse, + LoadBalancersCreateOrUpdateOptionalParams, + LoadBalancersCreateOrUpdateResponse, + LoadBalancersDeleteOptionalParams, + LoadBalancersDeleteResponse, +} from "../models"; + +/// +/** Interface representing a LoadBalancers. */ +export interface LoadBalancers { + /** + * Gets a list of load balancers in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + listByManagedCluster( + resourceGroupName: string, + resourceName: string, + options?: LoadBalancersListByManagedClusterOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the specified load balancer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersGetOptionalParams, + ): Promise; + /** + * Creates or updates a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersCreateOrUpdateOptionalParams, + ): Promise; + /** + * Deletes a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LoadBalancersDeleteResponse + > + >; + /** + * Deletes a load balancer in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + loadBalancerName: string, + options?: LoadBalancersDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts new file mode 100644 index 000000000000..b6a035c3cb02 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts @@ -0,0 +1,91 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ManagedClusterSnapshot, + ManagedClusterSnapshotsListOptionalParams, + ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ManagedClusterSnapshotsGetOptionalParams, + ManagedClusterSnapshotsGetResponse, + ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ManagedClusterSnapshotsCreateOrUpdateResponse, + TagsObject, + ManagedClusterSnapshotsUpdateTagsOptionalParams, + ManagedClusterSnapshotsUpdateTagsResponse, + ManagedClusterSnapshotsDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a ManagedClusterSnapshots. */ +export interface ManagedClusterSnapshots { + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * @param options The options parameters. + */ + list( + options?: ManagedClusterSnapshotsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsGetOptionalParams, + ): Promise; + /** + * Creates or updates a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + parameters: ManagedClusterSnapshot, + options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Updates tags on a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + resourceName: string, + parameters: TagsObject, + options?: ManagedClusterSnapshotsUpdateTagsOptionalParams, + ): Promise; + /** + * Deletes a managed cluster snapshot. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: ManagedClusterSnapshotsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts index 37e070e318b0..a0885892aff1 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts @@ -14,6 +14,10 @@ import { ManagedClustersListByResourceGroupOptionalParams, OutboundEnvironmentEndpoint, ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams, + GuardrailsAvailableVersion, + ManagedClustersListGuardrailsVersionsOptionalParams, + SafeguardsAvailableVersion, + ManagedClustersListSafeguardsVersionsOptionalParams, MeshRevisionProfile, ManagedClustersListMeshRevisionProfilesOptionalParams, MeshUpgradeProfile, @@ -43,10 +47,10 @@ import { ManagedClustersResetServicePrincipalProfileOptionalParams, ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, - ManagedClustersRotateClusterCertificatesOptionalParams, - ManagedClustersRotateClusterCertificatesResponse, ManagedClustersAbortLatestOperationOptionalParams, ManagedClustersAbortLatestOperationResponse, + ManagedClustersRotateClusterCertificatesOptionalParams, + ManagedClustersRotateClusterCertificatesResponse, ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersRotateServiceAccountSigningKeysResponse, ManagedClustersStopOptionalParams, @@ -58,10 +62,17 @@ import { ManagedClustersRunCommandResponse, ManagedClustersGetCommandResultOptionalParams, ManagedClustersGetCommandResultResponse, + ManagedClustersGetGuardrailsVersionsOptionalParams, + ManagedClustersGetGuardrailsVersionsResponse, + ManagedClustersGetSafeguardsVersionsOptionalParams, + ManagedClustersGetSafeguardsVersionsResponse, ManagedClustersGetMeshRevisionProfileOptionalParams, ManagedClustersGetMeshRevisionProfileResponse, ManagedClustersGetMeshUpgradeProfileOptionalParams, ManagedClustersGetMeshUpgradeProfileResponse, + RebalanceLoadBalancersRequestBody, + ManagedClustersRebalanceLoadBalancersOptionalParams, + ManagedClustersRebalanceLoadBalancersResponse, } from "../models"; /// @@ -95,6 +106,24 @@ export interface ManagedClusters { resourceName: string, options?: ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams, ): PagedAsyncIterableIterator; + /** + * Contains list of Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + listGuardrailsVersions( + location: string, + options?: ManagedClustersListGuardrailsVersionsOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Contains list of Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + listSafeguardsVersions( + location: string, + options?: ManagedClustersListSafeguardsVersionsOptionalParams, + ): PagedAsyncIterableIterator; /** * Contains extra metadata on each revision, including supported revisions, cluster compatibility and * available upgrades @@ -342,65 +371,65 @@ export interface ManagedClusters { options?: ManagedClustersResetAADProfileOptionalParams, ): Promise; /** - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more - * details about rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to + * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param options The options parameters. */ - beginRotateClusterCertificates( + beginAbortLatestOperation( resourceGroupName: string, resourceName: string, - options?: ManagedClustersRotateClusterCertificatesOptionalParams, + options?: ManagedClustersAbortLatestOperationOptionalParams, ): Promise< SimplePollerLike< - OperationState, - ManagedClustersRotateClusterCertificatesResponse + OperationState, + ManagedClustersAbortLatestOperationResponse > >; /** - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more - * details about rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to + * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + * completes before cancellation can take place, an error is returned. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param options The options parameters. */ - beginRotateClusterCertificatesAndWait( + beginAbortLatestOperationAndWait( resourceGroupName: string, resourceName: string, - options?: ManagedClustersRotateClusterCertificatesOptionalParams, - ): Promise; + options?: ManagedClustersAbortLatestOperationOptionalParams, + ): Promise; /** - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to - * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more + * details about rotating managed cluster certificates. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param options The options parameters. */ - beginAbortLatestOperation( + beginRotateClusterCertificates( resourceGroupName: string, resourceName: string, - options?: ManagedClustersAbortLatestOperationOptionalParams, + options?: ManagedClustersRotateClusterCertificatesOptionalParams, ): Promise< SimplePollerLike< - OperationState, - ManagedClustersAbortLatestOperationResponse + OperationState, + ManagedClustersRotateClusterCertificatesResponse > >; /** - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to - * a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - * completes before cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more + * details about rotating managed cluster certificates. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param options The options parameters. */ - beginAbortLatestOperationAndWait( + beginRotateClusterCertificatesAndWait( resourceGroupName: string, resourceName: string, - options?: ManagedClustersAbortLatestOperationOptionalParams, - ): Promise; + options?: ManagedClustersRotateClusterCertificatesOptionalParams, + ): Promise; /** * Rotates the service account signing keys of a managed cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -540,6 +569,28 @@ export interface ManagedClusters { commandId: string, options?: ManagedClustersGetCommandResultOptionalParams, ): Promise; + /** + * Contains Guardrails version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param version Safeguards version + * @param options The options parameters. + */ + getGuardrailsVersions( + location: string, + version: string, + options?: ManagedClustersGetGuardrailsVersionsOptionalParams, + ): Promise; + /** + * Contains Safeguards version along with its support info and whether it is a default version. + * @param location The name of the Azure region. + * @param version Safeguards version + * @param options The options parameters. + */ + getSafeguardsVersions( + location: string, + version: string, + options?: ManagedClustersGetSafeguardsVersionsOptionalParams, + ): Promise; /** * Contains extra metadata on the revision, including supported revisions, cluster compatibility and * available upgrades @@ -565,4 +616,37 @@ export interface ManagedClusters { mode: string, options?: ManagedClustersGetMeshUpgradeProfileOptionalParams, ): Promise; + /** + * Rebalance nodes across specific load balancers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load + * balancers will be rebalanced. + * @param options The options parameters. + */ + beginRebalanceLoadBalancers( + resourceGroupName: string, + resourceName: string, + parameters: RebalanceLoadBalancersRequestBody, + options?: ManagedClustersRebalanceLoadBalancersOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedClustersRebalanceLoadBalancersResponse + > + >; + /** + * Rebalance nodes across specific load balancers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load + * balancers will be rebalanced. + * @param options The options parameters. + */ + beginRebalanceLoadBalancersAndWait( + resourceGroupName: string, + resourceName: string, + parameters: RebalanceLoadBalancersRequestBody, + options?: ManagedClustersRebalanceLoadBalancersOptionalParams, + ): Promise; } diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/operationStatusResultOperations.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/operationStatusResultOperations.ts new file mode 100644 index 000000000000..2daabb8e1a77 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/operationStatusResultOperations.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + OperationStatusResult, + OperationStatusResultListOptionalParams, + OperationStatusResultGetOptionalParams, + OperationStatusResultGetResponse, + OperationStatusResultGetByAgentPoolOptionalParams, + OperationStatusResultGetByAgentPoolResponse, +} from "../models"; + +/// +/** Interface representing a OperationStatusResultOperations. */ +export interface OperationStatusResultOperations { + /** + * Gets a list of operations in the specified managedCluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: OperationStatusResultListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get the status of a specific operation in the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + operationId: string, + options?: OperationStatusResultGetOptionalParams, + ): Promise; + /** + * Get the status of a specific operation in the specified agent pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + getByAgentPool( + resourceGroupName: string, + resourceName: string, + agentPoolName: string, + operationId: string, + options?: OperationStatusResultGetByAgentPoolOptionalParams, + ): Promise; +} From dfefda39a31667519b951808386860137e803d76 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:22:27 +0800 Subject: [PATCH 11/55] [mgmt] compute release (#32157) https://github.com/Azure/sdk-release-request/issues/5750 --- common/config/rush/pnpm-lock.yaml | 33 +- sdk/compute/arm-compute/CHANGELOG.md | 96 +- sdk/compute/arm-compute/README.md | 1 - sdk/compute/arm-compute/_meta.json | 8 +- sdk/compute/arm-compute/assets.json | 2 +- sdk/compute/arm-compute/package.json | 54 +- .../arm-compute/review/arm-compute.api.md | 387 ++++++++ sdk/compute/arm-compute/sample.env | 5 +- .../communityGalleriesGetSample.ts | 2 +- .../communityGalleryImageVersionsGetSample.ts | 2 +- ...communityGalleryImageVersionsListSample.ts | 2 +- .../communityGalleryImagesGetSample.ts | 2 +- .../communityGalleryImagesListSample.ts | 2 +- .../galleriesCreateOrUpdateSample.ts | 42 +- .../samples-dev/galleriesDeleteSample.ts | 2 +- .../samples-dev/galleriesGetSample.ts | 27 +- .../galleriesListByResourceGroupSample.ts | 2 +- .../samples-dev/galleriesListSample.ts | 2 +- .../samples-dev/galleriesUpdateSample.ts | 2 +- ...ApplicationVersionsCreateOrUpdateSample.ts | 2 +- .../galleryApplicationVersionsDeleteSample.ts | 2 +- .../galleryApplicationVersionsGetSample.ts | 4 +- ...nVersionsListByGalleryApplicationSample.ts | 2 +- .../galleryApplicationVersionsUpdateSample.ts | 2 +- ...galleryApplicationsCreateOrUpdateSample.ts | 2 +- .../galleryApplicationsDeleteSample.ts | 2 +- .../galleryApplicationsGetSample.ts | 2 +- .../galleryApplicationsListByGallerySample.ts | 2 +- .../galleryApplicationsUpdateSample.ts | 2 +- ...alleryImageVersionsCreateOrUpdateSample.ts | 160 +++- .../galleryImageVersionsDeleteSample.ts | 2 +- .../galleryImageVersionsGetSample.ts | 66 +- ...ryImageVersionsListByGalleryImageSample.ts | 2 +- .../galleryImageVersionsUpdateSample.ts | 35 +- .../galleryImagesCreateOrUpdateSample.ts | 2 +- .../samples-dev/galleryImagesDeleteSample.ts | 2 +- .../samples-dev/galleryImagesGetSample.ts | 2 +- .../galleryImagesListByGallerySample.ts | 2 +- .../samples-dev/galleryImagesUpdateSample.ts | 45 +- ...trolProfileVersionsCreateOrUpdateSample.ts | 79 ++ ...ccessControlProfileVersionsDeleteSample.ts | 47 + ...VMAccessControlProfileVersionsGetSample.ts | 46 + ...ByGalleryInVmaccessControlProfileSample.ts | 47 + ...ccessControlProfileVersionsUpdateSample.ts | 62 ++ ...cessControlProfilesCreateOrUpdateSample.ts | 53 ++ ...ryInVMAccessControlProfilesDeleteSample.ts | 45 + ...lleryInVMAccessControlProfilesGetSample.ts | 44 + ...ccessControlProfilesListByGallerySample.ts | 45 + ...ryInVMAccessControlProfilesUpdateSample.ts | 51 + .../gallerySharingProfileUpdateSample.ts | 6 +- .../samples-dev/sharedGalleriesGetSample.ts | 2 +- .../samples-dev/sharedGalleriesListSample.ts | 2 +- .../sharedGalleryImageVersionsGetSample.ts | 2 +- .../sharedGalleryImageVersionsListSample.ts | 2 +- .../sharedGalleryImagesGetSample.ts | 2 +- .../sharedGalleryImagesListSample.ts | 2 +- ...DeletedResourceListByArtifactNameSample.ts | 49 + ...virtualMachineScaleSetVMSPowerOffSample.ts | 8 +- ...ualMachineScaleSetsCreateOrUpdateSample.ts | 23 +- .../virtualMachineScaleSetsPowerOffSample.ts | 8 +- .../virtualMachinesPowerOffSample.ts | 8 +- .../samples/v22/javascript/README.md | 598 ++++++------ .../javascript/communityGalleriesGetSample.js | 2 +- .../communityGalleryImageVersionsGetSample.js | 2 +- ...communityGalleryImageVersionsListSample.js | 2 +- .../communityGalleryImagesGetSample.js | 2 +- .../communityGalleryImagesListSample.js | 2 +- .../galleriesCreateOrUpdateSample.js | 40 +- .../v22/javascript/galleriesDeleteSample.js | 2 +- .../v22/javascript/galleriesGetSample.js | 25 +- .../galleriesListByResourceGroupSample.js | 2 +- .../v22/javascript/galleriesListSample.js | 2 +- .../v22/javascript/galleriesUpdateSample.js | 2 +- ...ApplicationVersionsCreateOrUpdateSample.js | 2 +- .../galleryApplicationVersionsDeleteSample.js | 2 +- .../galleryApplicationVersionsGetSample.js | 4 +- ...nVersionsListByGalleryApplicationSample.js | 2 +- .../galleryApplicationVersionsUpdateSample.js | 2 +- ...galleryApplicationsCreateOrUpdateSample.js | 2 +- .../galleryApplicationsDeleteSample.js | 2 +- .../galleryApplicationsGetSample.js | 2 +- .../galleryApplicationsListByGallerySample.js | 2 +- .../galleryApplicationsUpdateSample.js | 2 +- ...alleryImageVersionsCreateOrUpdateSample.js | 156 ++- .../galleryImageVersionsDeleteSample.js | 2 +- .../galleryImageVersionsGetSample.js | 62 +- ...ryImageVersionsListByGalleryImageSample.js | 2 +- .../galleryImageVersionsUpdateSample.js | 33 +- .../galleryImagesCreateOrUpdateSample.js | 2 +- .../javascript/galleryImagesDeleteSample.js | 2 +- .../v22/javascript/galleryImagesGetSample.js | 2 +- .../galleryImagesListByGallerySample.js | 2 +- .../javascript/galleryImagesUpdateSample.js | 43 +- ...trolProfileVersionsCreateOrUpdateSample.js | 70 ++ ...ccessControlProfileVersionsDeleteSample.js | 42 + ...VMAccessControlProfileVersionsGetSample.js | 42 + ...ByGalleryInVmaccessControlProfileSample.js | 43 + ...ccessControlProfileVersionsUpdateSample.js | 49 + ...cessControlProfilesCreateOrUpdateSample.js | 45 + ...ryInVMAccessControlProfilesDeleteSample.js | 40 + ...lleryInVMAccessControlProfilesGetSample.js | 40 + ...ccessControlProfilesListByGallerySample.js | 41 + ...ryInVMAccessControlProfilesUpdateSample.js | 44 + .../gallerySharingProfileUpdateSample.js | 6 +- .../samples/v22/javascript/package.json | 2 +- .../samples/v22/javascript/sample.env | 5 +- .../javascript/sharedGalleriesGetSample.js | 2 +- .../javascript/sharedGalleriesListSample.js | 2 +- .../sharedGalleryImageVersionsGetSample.js | 2 +- .../sharedGalleryImageVersionsListSample.js | 2 +- .../sharedGalleryImagesGetSample.js | 2 +- .../sharedGalleryImagesListSample.js | 2 +- ...DeletedResourceListByArtifactNameSample.js | 45 + ...virtualMachineScaleSetVMSPowerOffSample.js | 8 +- ...ualMachineScaleSetsCreateOrUpdateSample.js | 23 +- .../virtualMachineScaleSetsPowerOffSample.js | 8 +- .../virtualMachinesPowerOffSample.js | 8 +- .../samples/v22/typescript/README.md | 598 ++++++------ .../samples/v22/typescript/package.json | 2 +- .../samples/v22/typescript/sample.env | 5 +- .../src/communityGalleriesGetSample.ts | 2 +- .../communityGalleryImageVersionsGetSample.ts | 2 +- ...communityGalleryImageVersionsListSample.ts | 2 +- .../src/communityGalleryImagesGetSample.ts | 2 +- .../src/communityGalleryImagesListSample.ts | 2 +- .../src/galleriesCreateOrUpdateSample.ts | 42 +- .../typescript/src/galleriesDeleteSample.ts | 2 +- .../v22/typescript/src/galleriesGetSample.ts | 27 +- .../src/galleriesListByResourceGroupSample.ts | 2 +- .../v22/typescript/src/galleriesListSample.ts | 2 +- .../typescript/src/galleriesUpdateSample.ts | 2 +- ...ApplicationVersionsCreateOrUpdateSample.ts | 2 +- .../galleryApplicationVersionsDeleteSample.ts | 2 +- .../galleryApplicationVersionsGetSample.ts | 4 +- ...nVersionsListByGalleryApplicationSample.ts | 2 +- .../galleryApplicationVersionsUpdateSample.ts | 2 +- ...galleryApplicationsCreateOrUpdateSample.ts | 2 +- .../src/galleryApplicationsDeleteSample.ts | 2 +- .../src/galleryApplicationsGetSample.ts | 2 +- .../galleryApplicationsListByGallerySample.ts | 2 +- .../src/galleryApplicationsUpdateSample.ts | 2 +- ...alleryImageVersionsCreateOrUpdateSample.ts | 160 +++- .../src/galleryImageVersionsDeleteSample.ts | 2 +- .../src/galleryImageVersionsGetSample.ts | 66 +- ...ryImageVersionsListByGalleryImageSample.ts | 2 +- .../src/galleryImageVersionsUpdateSample.ts | 35 +- .../src/galleryImagesCreateOrUpdateSample.ts | 2 +- .../src/galleryImagesDeleteSample.ts | 2 +- .../typescript/src/galleryImagesGetSample.ts | 2 +- .../src/galleryImagesListByGallerySample.ts | 2 +- .../src/galleryImagesUpdateSample.ts | 45 +- ...trolProfileVersionsCreateOrUpdateSample.ts | 79 ++ ...ccessControlProfileVersionsDeleteSample.ts | 47 + ...VMAccessControlProfileVersionsGetSample.ts | 46 + ...ByGalleryInVmaccessControlProfileSample.ts | 47 + ...ccessControlProfileVersionsUpdateSample.ts | 62 ++ ...cessControlProfilesCreateOrUpdateSample.ts | 53 ++ ...ryInVMAccessControlProfilesDeleteSample.ts | 45 + ...lleryInVMAccessControlProfilesGetSample.ts | 44 + ...ccessControlProfilesListByGallerySample.ts | 45 + ...ryInVMAccessControlProfilesUpdateSample.ts | 51 + .../src/gallerySharingProfileUpdateSample.ts | 6 +- .../src/sharedGalleriesGetSample.ts | 2 +- .../src/sharedGalleriesListSample.ts | 2 +- .../sharedGalleryImageVersionsGetSample.ts | 2 +- .../sharedGalleryImageVersionsListSample.ts | 2 +- .../src/sharedGalleryImagesGetSample.ts | 2 +- .../src/sharedGalleryImagesListSample.ts | 2 +- ...DeletedResourceListByArtifactNameSample.ts | 49 + ...virtualMachineScaleSetVMSPowerOffSample.ts | 8 +- ...ualMachineScaleSetsCreateOrUpdateSample.ts | 23 +- .../virtualMachineScaleSetsPowerOffSample.ts | 8 +- .../src/virtualMachinesPowerOffSample.ts | 8 +- .../src/computeManagementClient.ts | 16 +- sdk/compute/arm-compute/src/models/index.ts | 573 ++++++++++- sdk/compute/arm-compute/src/models/mappers.ts | 896 ++++++++++++++++++ .../arm-compute/src/models/parameters.ts | 133 ++- ...galleryInVMAccessControlProfileVersions.ts | 762 +++++++++++++++ .../galleryInVMAccessControlProfiles.ts | 688 ++++++++++++++ .../arm-compute/src/operations/index.ts | 3 + .../src/operations/softDeletedResource.ts | 243 +++++ .../operations/virtualMachineScaleSetVMs.ts | 6 +- .../src/operations/virtualMachineScaleSets.ts | 6 +- .../src/operations/virtualMachines.ts | 6 +- ...galleryInVMAccessControlProfileVersions.ts | 204 ++++ .../galleryInVMAccessControlProfiles.ts | 174 ++++ .../src/operationsInterfaces/index.ts | 3 + .../softDeletedResource.ts | 35 + .../virtualMachineScaleSetVMs.ts | 6 +- .../virtualMachineScaleSets.ts | 6 +- .../operationsInterfaces/virtualMachines.ts | 6 +- sdk/compute/arm-compute/tsconfig.json | 4 +- 192 files changed, 7734 insertions(+), 929 deletions(-) create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsDeleteSample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsGetSample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsUpdateSample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesCreateOrUpdateSample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesDeleteSample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesGetSample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesListByGallerySample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesUpdateSample.ts create mode 100644 sdk/compute/arm-compute/samples-dev/softDeletedResourceListByArtifactNameSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsDeleteSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsGetSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsUpdateSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesCreateOrUpdateSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesDeleteSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesGetSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesListByGallerySample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesUpdateSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/javascript/softDeletedResourceListByArtifactNameSample.js create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsDeleteSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsGetSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsUpdateSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesCreateOrUpdateSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesDeleteSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesGetSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesListByGallerySample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesUpdateSample.ts create mode 100644 sdk/compute/arm-compute/samples/v22/typescript/src/softDeletedResourceListByArtifactNameSample.ts create mode 100644 sdk/compute/arm-compute/src/operations/galleryInVMAccessControlProfileVersions.ts create mode 100644 sdk/compute/arm-compute/src/operations/galleryInVMAccessControlProfiles.ts create mode 100644 sdk/compute/arm-compute/src/operations/softDeletedResource.ts create mode 100644 sdk/compute/arm-compute/src/operationsInterfaces/galleryInVMAccessControlProfileVersions.ts create mode 100644 sdk/compute/arm-compute/src/operationsInterfaces/galleryInVMAccessControlProfiles.ts create mode 100644 sdk/compute/arm-compute/src/operationsInterfaces/softDeletedResource.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e8d6a3df56f5..954a2cda4bcf 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2668,7 +2668,7 @@ packages: version: 0.0.0 '@rush-temp/arm-compute-1@file:projects/arm-compute-1.tgz': - resolution: {integrity: sha512-8FzW+vrW6+oGXLHdf0ZDgqSRM9A8PldfJvWO73gIUxacv4/dq5964UyK5F7jw5AZmsgxUCtXSRmA9xbA2kfBCg==, tarball: file:projects/arm-compute-1.tgz} + resolution: {integrity: sha512-bRfPIJOvzMpdvqRKVcpInFunhbGFvL3qCIkhMHJKM0Wv71ipALzi7802T6AKKtkSASush+Wj40+/X+3DOfFkEg==, tarball: file:projects/arm-compute-1.tgz} version: 0.0.0 '@rush-temp/arm-compute-profile-2020-09-01-hybrid@file:projects/arm-compute-profile-2020-09-01-hybrid.tgz': @@ -6575,6 +6575,11 @@ packages: engines: {node: '>=10'} hasBin: true + mocha@10.8.2: + resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} + engines: {node: '>= 14.0.0'} + hasBin: true + mocha@11.0.2: resolution: {integrity: sha512-IpLqigxxL825rKCce2hlJL6qiUNgxbjhpS79SA6NN+Quzrf6wzLezwk4LcfIJp/OUD5BVWTM/nCYc3oQ5uqmfw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -11076,7 +11081,6 @@ snapshots: dependencies: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/arm-network': 32.2.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 @@ -11084,7 +11088,7 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 + mocha: 10.8.2 ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 @@ -22674,6 +22678,29 @@ snapshots: mkdirp@3.0.1: {} + mocha@10.8.2: + dependencies: + ansi-colors: 4.1.3 + browser-stdout: 1.3.1 + chokidar: 3.6.0 + debug: 4.4.0(supports-color@8.1.1) + diff: 5.2.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 8.1.0 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 5.1.6 + ms: 2.1.3 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 6.5.1 + yargs: 16.2.0 + yargs-parser: 20.2.9 + yargs-unparser: 2.0.0 + mocha@11.0.2: dependencies: ansi-colors: 4.1.3 diff --git a/sdk/compute/arm-compute/CHANGELOG.md b/sdk/compute/arm-compute/CHANGELOG.md index dc8b08a3c947..b5eb2909f4f3 100644 --- a/sdk/compute/arm-compute/CHANGELOG.md +++ b/sdk/compute/arm-compute/CHANGELOG.md @@ -1,15 +1,91 @@ # Release History - -## 22.1.1 (Unreleased) - + +## 22.2.0 (2024-12-11) + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group GalleryInVMAccessControlProfiles + - Added operation group GalleryInVMAccessControlProfileVersions + - Added operation group SoftDeletedResource + - Added Interface AccessControlRules + - Added Interface AccessControlRulesIdentity + - Added Interface AccessControlRulesPrivilege + - Added Interface AccessControlRulesRole + - Added Interface AccessControlRulesRoleAssignment + - Added Interface AdditionalReplicaSet + - Added Interface ExecutedValidation + - Added Interface GalleryIdentity + - Added Interface GalleryInVMAccessControlProfile + - Added Interface GalleryInVMAccessControlProfileList + - Added Interface GalleryInVMAccessControlProfileProperties + - Added Interface GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams + - Added Interface GalleryInVMAccessControlProfilesDeleteHeaders + - Added Interface GalleryInVMAccessControlProfilesDeleteOptionalParams + - Added Interface GalleryInVMAccessControlProfilesGetOptionalParams + - Added Interface GalleryInVMAccessControlProfilesListByGalleryNextOptionalParams + - Added Interface GalleryInVMAccessControlProfilesListByGalleryOptionalParams + - Added Interface GalleryInVMAccessControlProfilesUpdateOptionalParams + - Added Interface GalleryInVMAccessControlProfileUpdate + - Added Interface GalleryInVMAccessControlProfileVersion + - Added Interface GalleryInVMAccessControlProfileVersionList + - Added Interface GalleryInVMAccessControlProfileVersionProperties + - Added Interface GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams + - Added Interface GalleryInVMAccessControlProfileVersionsDeleteHeaders + - Added Interface GalleryInVMAccessControlProfileVersionsDeleteOptionalParams + - Added Interface GalleryInVMAccessControlProfileVersionsGetOptionalParams + - Added Interface GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileNextOptionalParams + - Added Interface GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams + - Added Interface GalleryInVMAccessControlProfileVersionsUpdateOptionalParams + - Added Interface GalleryInVMAccessControlProfileVersionUpdate + - Added Interface GalleryResourceProfilePropertiesBase + - Added Interface GalleryResourceProfileVersionPropertiesBase + - Added Interface GallerySoftDeletedResource + - Added Interface GallerySoftDeletedResourceList + - Added Interface PlatformAttribute + - Added Interface SoftDeletedResourceListByArtifactNameNextOptionalParams + - Added Interface SoftDeletedResourceListByArtifactNameOptionalParams + - Added Interface ValidationsProfile + - Added Type Alias AccessControlRulesMode + - Added Type Alias EndpointAccess + - Added Type Alias EndpointTypes + - Added Type Alias GalleryApplicationScriptRebootBehavior + - Added Type Alias GalleryInVMAccessControlProfilesCreateOrUpdateResponse + - Added Type Alias GalleryInVMAccessControlProfilesDeleteResponse + - Added Type Alias GalleryInVMAccessControlProfilesGetResponse + - Added Type Alias GalleryInVMAccessControlProfilesListByGalleryNextResponse + - Added Type Alias GalleryInVMAccessControlProfilesListByGalleryResponse + - Added Type Alias GalleryInVMAccessControlProfilesUpdateResponse + - Added Type Alias GalleryInVMAccessControlProfileVersionsCreateOrUpdateResponse + - Added Type Alias GalleryInVMAccessControlProfileVersionsDeleteResponse + - Added Type Alias GalleryInVMAccessControlProfileVersionsGetResponse + - Added Type Alias GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileNextResponse + - Added Type Alias GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileResponse + - Added Type Alias GalleryInVMAccessControlProfileVersionsUpdateResponse + - Added Type Alias SoftDeletedArtifactTypes + - Added Type Alias SoftDeletedResourceListByArtifactNameNextResponse + - Added Type Alias SoftDeletedResourceListByArtifactNameResponse + - Added Type Alias ValidationStatus + - Interface Gallery has a new optional parameter identity + - Interface GalleryImage has a new optional parameter allowUpdateImage + - Interface GalleryImageFeature has a new optional parameter startsAtVersion + - Interface GalleryImageUpdate has a new optional parameter allowUpdateImage + - Interface GalleryImageVersion has a new optional parameter restore + - Interface GalleryImageVersion has a new optional parameter validationsProfile + - Interface GalleryImageVersionSafetyProfile has a new optional parameter blockDeletionBeforeEndOfLife + - Interface GalleryImageVersionUpdate has a new optional parameter restore + - Interface GalleryImageVersionUpdate has a new optional parameter validationsProfile + - Interface GalleryList has a new optional parameter securityProfile + - Interface GalleryUpdate has a new optional parameter identity + - Interface TargetRegion has a new optional parameter additionalReplicaSets + - Interface UserArtifactSettings has a new optional parameter scriptBehaviorAfterReboot + - Added Enum KnownAccessControlRulesMode + - Added Enum KnownEndpointAccess + - Added Enum KnownGalleryApplicationScriptRebootBehavior + - Added Enum KnownSoftDeletedArtifactTypes + - Added Enum KnownValidationStatus + - Enum KnownStorageAccountType has a new value PremiumV2LRS + + ## 22.1.0 (2024-08-12) ### Features Added @@ -579,7 +655,7 @@ ## 17.3.1 (2022-04-06) -### Features Added +**features** - Bug fix diff --git a/sdk/compute/arm-compute/README.md b/sdk/compute/arm-compute/README.md index 89796d2c1def..1a6c254d2960 100644 --- a/sdk/compute/arm-compute/README.md +++ b/sdk/compute/arm-compute/README.md @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure ComputeManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/compute/arm-compute/_meta.json b/sdk/compute/arm-compute/_meta.json index 08483ff528c8..efd598602316 100644 --- a/sdk/compute/arm-compute/_meta.json +++ b/sdk/compute/arm-compute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3cef1bf0125458cc60dfb9e644e6bc28b787beab", + "commit": "552b4dd311f90f4a7b2f7adf45461d7a8774a1cc", "readme": "specification/compute/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\compute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\compute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.29 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.11", - "use": "@autorest/typescript@6.0.23" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@6.0.29" } \ No newline at end of file diff --git a/sdk/compute/arm-compute/assets.json b/sdk/compute/arm-compute/assets.json index 33fbdc4a6a4f..73a520487c34 100644 --- a/sdk/compute/arm-compute/assets.json +++ b/sdk/compute/arm-compute/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/compute/arm-compute", - "Tag": "js/compute/arm-compute_e43f617dad" + "Tag": "js/compute/arm-compute_96a69af62a" } diff --git a/sdk/compute/arm-compute/package.json b/sdk/compute/arm-compute/package.json index edfcfe3cb8d5..36b440e41900 100644 --- a/sdk/compute/arm-compute/package.json +++ b/sdk/compute/arm-compute/package.json @@ -3,16 +3,16 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ComputeManagementClient.", - "version": "22.1.1", + "version": "22.2.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -28,20 +28,20 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-compute.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.1.0", - "@azure-tools/test-recorder": "^3.0.0", - "@azure/arm-network": "^32.2.0", + "typescript": "~5.7.2", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^11.0.2", + "@types/node": "^18.0.0", "ts-node": "^10.0.0", - "tsx": "^4.7.1", - "typescript": "~5.7.2" + "@azure/arm-network": "^32.2.0" }, "repository": { "type": "git", @@ -69,28 +69,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, diff --git a/sdk/compute/arm-compute/review/arm-compute.api.md b/sdk/compute/arm-compute/review/arm-compute.api.md index d9f1a58260a2..eb106edd002b 100644 --- a/sdk/compute/arm-compute/review/arm-compute.api.md +++ b/sdk/compute/arm-compute/review/arm-compute.api.md @@ -10,6 +10,47 @@ import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { SimplePollerLike } from '@azure/core-lro'; +// @public +export interface AccessControlRules { + identities?: AccessControlRulesIdentity[]; + privileges?: AccessControlRulesPrivilege[]; + roleAssignments?: AccessControlRulesRoleAssignment[]; + roles?: AccessControlRulesRole[]; +} + +// @public +export interface AccessControlRulesIdentity { + exePath?: string; + groupName?: string; + name: string; + processName?: string; + userName?: string; +} + +// @public +export type AccessControlRulesMode = string; + +// @public +export interface AccessControlRulesPrivilege { + name: string; + path: string; + queryParameters?: { + [propertyName: string]: string; + }; +} + +// @public +export interface AccessControlRulesRole { + name: string; + privileges: string[]; +} + +// @public +export interface AccessControlRulesRoleAssignment { + identities: string[]; + role: string; +} + // @public export type AccessLevel = string; @@ -25,6 +66,12 @@ export interface AdditionalCapabilities { ultraSSDEnabled?: boolean; } +// @public +export interface AdditionalReplicaSet { + regionalReplicaCount?: number; + storageAccountType?: StorageAccountType; +} + // @public export interface AdditionalUnattendContent { componentName?: "Microsoft-Windows-Shell-Setup"; @@ -1126,6 +1173,10 @@ export class ComputeManagementClient extends coreClient.ServiceClient { // (undocumented) galleryImageVersions: GalleryImageVersions; // (undocumented) + galleryInVMAccessControlProfiles: GalleryInVMAccessControlProfiles; + // (undocumented) + galleryInVMAccessControlProfileVersions: GalleryInVMAccessControlProfileVersions; + // (undocumented) gallerySharingProfile: GallerySharingProfile; // (undocumented) images: Images; @@ -1150,6 +1201,8 @@ export class ComputeManagementClient extends coreClient.ServiceClient { // (undocumented) snapshots: Snapshots; // (undocumented) + softDeletedResource: SoftDeletedResource; + // (undocumented) sshPublicKeys: SshPublicKeys; // (undocumented) subscriptionId: string; @@ -2211,11 +2264,25 @@ export interface EncryptionSettingsElement { // @public export type EncryptionType = string; +// @public +export type EndpointAccess = string; + +// @public +export type EndpointTypes = "WireServer" | "IMDS"; + // @public export interface EventGridAndResourceGraph { enable?: boolean; } +// @public +export interface ExecutedValidation { + executionTime?: Date; + status?: ValidationStatus; + type?: string; + version?: string; +} + // @public export type ExecutionState = string; @@ -2330,6 +2397,7 @@ export type GalleriesUpdateResponse = Gallery; export interface Gallery extends Resource { description?: string; identifier?: GalleryIdentifier; + identity?: GalleryIdentity; readonly provisioningState?: GalleryProvisioningState; sharingProfile?: SharingProfile; readonly sharingStatus?: SharingStatus; @@ -2394,6 +2462,9 @@ export interface GalleryApplicationsCreateOrUpdateOptionalParams extends coreCli // @public export type GalleryApplicationsCreateOrUpdateResponse = GalleryApplication; +// @public +export type GalleryApplicationScriptRebootBehavior = string; + // @public export interface GalleryApplicationsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2607,8 +2678,19 @@ export interface GalleryIdentifier { readonly uniqueName?: string; } +// @public +export interface GalleryIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: ResourceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentitiesValue; + }; +} + // @public export interface GalleryImage extends Resource { + allowUpdateImage?: boolean; architecture?: Architecture; description?: string; disallowed?: Disallowed; @@ -2629,6 +2711,7 @@ export interface GalleryImage extends Resource { // @public export interface GalleryImageFeature { name?: string; + startsAtVersion?: string; value?: string; } @@ -2704,6 +2787,7 @@ export type GalleryImagesUpdateResponse = GalleryImage; // @public export interface GalleryImageUpdate extends UpdateResourceDefinition { + allowUpdateImage?: boolean; architecture?: Architecture; description?: string; disallowed?: Disallowed; @@ -2726,9 +2810,11 @@ export interface GalleryImageVersion extends Resource { readonly provisioningState?: GalleryProvisioningState; publishingProfile?: GalleryImageVersionPublishingProfile; readonly replicationStatus?: ReplicationStatus; + restore?: boolean; safetyProfile?: GalleryImageVersionSafetyProfile; securityProfile?: ImageVersionSecurityProfile; storageProfile?: GalleryImageVersionStorageProfile; + readonly validationsProfile?: ValidationsProfile; } // @public @@ -2755,6 +2841,7 @@ export interface GalleryImageVersions { // @public export interface GalleryImageVersionSafetyProfile extends GalleryArtifactSafetyProfileBase { + blockDeletionBeforeEndOfLife?: boolean; readonly policyViolations?: PolicyViolation[]; readonly reportedForPolicyViolation?: boolean; } @@ -2823,14 +2910,213 @@ export interface GalleryImageVersionUpdate extends UpdateResourceDefinition { readonly provisioningState?: GalleryProvisioningState; publishingProfile?: GalleryImageVersionPublishingProfile; readonly replicationStatus?: ReplicationStatus; + restore?: boolean; safetyProfile?: GalleryImageVersionSafetyProfile; securityProfile?: ImageVersionSecurityProfile; storageProfile?: GalleryImageVersionStorageProfile; + readonly validationsProfile?: ValidationsProfile; +} + +// @public +export interface GalleryInVMAccessControlProfile extends Resource { + properties?: GalleryInVMAccessControlProfileProperties; +} + +// @public +export interface GalleryInVMAccessControlProfileList { + nextLink?: string; + value: GalleryInVMAccessControlProfile[]; +} + +// @public +export interface GalleryInVMAccessControlProfileProperties extends GalleryResourceProfilePropertiesBase { + applicableHostEndpoint: EndpointTypes; + description?: string; + osType: OperatingSystemTypes; +} + +// @public +export interface GalleryInVMAccessControlProfiles { + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, galleryInVMAccessControlProfile: GalleryInVMAccessControlProfile, options?: GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams): Promise, GalleryInVMAccessControlProfilesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, galleryInVMAccessControlProfile: GalleryInVMAccessControlProfile, options?: GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, options?: GalleryInVMAccessControlProfilesDeleteOptionalParams): Promise, GalleryInVMAccessControlProfilesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, options?: GalleryInVMAccessControlProfilesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, galleryInVMAccessControlProfile: GalleryInVMAccessControlProfileUpdate, options?: GalleryInVMAccessControlProfilesUpdateOptionalParams): Promise, GalleryInVMAccessControlProfilesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, galleryInVMAccessControlProfile: GalleryInVMAccessControlProfileUpdate, options?: GalleryInVMAccessControlProfilesUpdateOptionalParams): Promise; + get(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, options?: GalleryInVMAccessControlProfilesGetOptionalParams): Promise; + listByGallery(resourceGroupName: string, galleryName: string, options?: GalleryInVMAccessControlProfilesListByGalleryOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryInVMAccessControlProfilesCreateOrUpdateResponse = GalleryInVMAccessControlProfile; + +// @public +export interface GalleryInVMAccessControlProfilesDeleteHeaders { + // (undocumented) + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface GalleryInVMAccessControlProfilesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryInVMAccessControlProfilesDeleteResponse = GalleryInVMAccessControlProfilesDeleteHeaders; + +// @public +export interface GalleryInVMAccessControlProfilesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryInVMAccessControlProfilesGetResponse = GalleryInVMAccessControlProfile; + +// @public +export interface GalleryInVMAccessControlProfilesListByGalleryNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryInVMAccessControlProfilesListByGalleryNextResponse = GalleryInVMAccessControlProfileList; + +// @public +export interface GalleryInVMAccessControlProfilesListByGalleryOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryInVMAccessControlProfilesListByGalleryResponse = GalleryInVMAccessControlProfileList; + +// @public +export interface GalleryInVMAccessControlProfilesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryInVMAccessControlProfilesUpdateResponse = GalleryInVMAccessControlProfile; + +// @public +export interface GalleryInVMAccessControlProfileUpdate extends UpdateResourceDefinition { + properties?: GalleryInVMAccessControlProfileProperties; +} + +// @public +export interface GalleryInVMAccessControlProfileVersion extends Resource { + defaultAccess?: EndpointAccess; + excludeFromLatest?: boolean; + mode?: AccessControlRulesMode; + readonly provisioningState?: GalleryProvisioningState; + readonly publishedDate?: Date; + readonly replicationStatus?: ReplicationStatus; + rules?: AccessControlRules; + targetLocations?: TargetRegion[]; +} + +// @public +export interface GalleryInVMAccessControlProfileVersionList { + nextLink?: string; + value: GalleryInVMAccessControlProfileVersion[]; +} + +// @public +export interface GalleryInVMAccessControlProfileVersionProperties extends GalleryResourceProfileVersionPropertiesBase { + defaultAccess: EndpointAccess; + mode: AccessControlRulesMode; + rules?: AccessControlRules; +} + +// @public +export interface GalleryInVMAccessControlProfileVersions { + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, inVMAccessControlProfileVersionName: string, galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersion, options?: GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams): Promise, GalleryInVMAccessControlProfileVersionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, inVMAccessControlProfileVersionName: string, galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersion, options?: GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, inVMAccessControlProfileVersionName: string, options?: GalleryInVMAccessControlProfileVersionsDeleteOptionalParams): Promise, GalleryInVMAccessControlProfileVersionsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, inVMAccessControlProfileVersionName: string, options?: GalleryInVMAccessControlProfileVersionsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, inVMAccessControlProfileVersionName: string, galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersionUpdate, options?: GalleryInVMAccessControlProfileVersionsUpdateOptionalParams): Promise, GalleryInVMAccessControlProfileVersionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, inVMAccessControlProfileVersionName: string, galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersionUpdate, options?: GalleryInVMAccessControlProfileVersionsUpdateOptionalParams): Promise; + get(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, inVMAccessControlProfileVersionName: string, options?: GalleryInVMAccessControlProfileVersionsGetOptionalParams): Promise; + listByGalleryInVMAccessControlProfile(resourceGroupName: string, galleryName: string, inVMAccessControlProfileName: string, options?: GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryInVMAccessControlProfileVersionsCreateOrUpdateResponse = GalleryInVMAccessControlProfileVersion; + +// @public +export interface GalleryInVMAccessControlProfileVersionsDeleteHeaders { + // (undocumented) + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface GalleryInVMAccessControlProfileVersionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryInVMAccessControlProfileVersionsDeleteResponse = GalleryInVMAccessControlProfileVersionsDeleteHeaders; + +// @public +export interface GalleryInVMAccessControlProfileVersionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryInVMAccessControlProfileVersionsGetResponse = GalleryInVMAccessControlProfileVersion; + +// @public +export interface GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileNextResponse = GalleryInVMAccessControlProfileVersionList; + +// @public +export interface GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileResponse = GalleryInVMAccessControlProfileVersionList; + +// @public +export interface GalleryInVMAccessControlProfileVersionsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryInVMAccessControlProfileVersionsUpdateResponse = GalleryInVMAccessControlProfileVersion; + +// @public +export interface GalleryInVMAccessControlProfileVersionUpdate extends UpdateResourceDefinition { + defaultAccess?: EndpointAccess; + excludeFromLatest?: boolean; + mode?: AccessControlRulesMode; + readonly provisioningState?: GalleryProvisioningState; + readonly publishedDate?: Date; + readonly replicationStatus?: ReplicationStatus; + rules?: AccessControlRules; + targetLocations?: TargetRegion[]; } // @public export interface GalleryList { nextLink?: string; + securityProfile?: ImageVersionSecurityProfile; value: Gallery[]; } @@ -2841,6 +3127,20 @@ export interface GalleryOSDiskImage extends GalleryDiskImage { // @public export type GalleryProvisioningState = string; +// @public +export interface GalleryResourceProfilePropertiesBase { + readonly provisioningState?: GalleryProvisioningState; +} + +// @public +export interface GalleryResourceProfileVersionPropertiesBase { + excludeFromLatest?: boolean; + readonly provisioningState?: GalleryProvisioningState; + readonly publishedDate?: Date; + readonly replicationStatus?: ReplicationStatus; + targetLocations?: TargetRegion[]; +} + // @public export type GallerySharingPermissionTypes = string; @@ -2859,6 +3159,19 @@ export interface GallerySharingProfileUpdateOptionalParams extends coreClient.Op // @public export type GallerySharingProfileUpdateResponse = SharingUpdate; +// @public +export interface GallerySoftDeletedResource extends Resource { + resourceArmId?: string; + softDeletedArtifactType?: SoftDeletedArtifactTypes; + softDeletedTime?: string; +} + +// @public +export interface GallerySoftDeletedResourceList { + nextLink?: string; + value: GallerySoftDeletedResource[]; +} + // @public (undocumented) export interface GalleryTargetExtendedLocation { encryption?: EncryptionImages; @@ -2872,6 +3185,7 @@ export interface GalleryTargetExtendedLocation { export interface GalleryUpdate extends UpdateResourceDefinition { description?: string; identifier?: GalleryIdentifier; + identity?: GalleryIdentity; readonly provisioningState?: GalleryProvisioningState; sharingProfile?: SharingProfile; readonly sharingStatus?: SharingStatus; @@ -3143,6 +3457,13 @@ export interface KeyVaultSecretReference { sourceVault: SubResource; } +// @public +export enum KnownAccessControlRulesMode { + Audit = "Audit", + Disabled = "Disabled", + Enforce = "Enforce" +} + // @public export enum KnownAccessLevel { None = "None", @@ -3367,6 +3688,12 @@ export enum KnownEncryptionType { EncryptionAtRestWithPlatformKey = "EncryptionAtRestWithPlatformKey" } +// @public +export enum KnownEndpointAccess { + Allow = "Allow", + Deny = "Deny" +} + // @public export enum KnownExecutionState { Canceled = "Canceled", @@ -3415,6 +3742,12 @@ export enum KnownFileFormat { Vhdx = "VHDX" } +// @public +export enum KnownGalleryApplicationScriptRebootBehavior { + None = "None", + Rerun = "Rerun" +} + // @public export enum KnownGalleryExpandParams { SharingProfileGroups = "SharingProfile/Groups" @@ -3759,6 +4092,11 @@ export enum KnownSnapshotStorageAccountTypes { StandardZRS = "Standard_ZRS" } +// @public +export enum KnownSoftDeletedArtifactTypes { + Images = "Images" +} + // @public export enum KnownSshEncryptionTypes { Ed25519 = "Ed25519", @@ -3768,6 +4106,7 @@ export enum KnownSshEncryptionTypes { // @public export enum KnownStorageAccountType { PremiumLRS = "Premium_LRS", + PremiumV2LRS = "PremiumV2_LRS", StandardLRS = "Standard_LRS", StandardZRS = "Standard_ZRS" } @@ -3796,6 +4135,13 @@ export enum KnownUefiSignatureTemplateName { NoSignatureTemplate = "NoSignatureTemplate" } +// @public +export enum KnownValidationStatus { + Failed = "Failed", + Succeeded = "Succeeded", + Unknown = "Unknown" +} + // @public export enum KnownVirtualMachineEvictionPolicyTypes { Deallocate = "Deallocate", @@ -4467,6 +4813,12 @@ export interface Plan { publisher?: string; } +// @public +export interface PlatformAttribute { + readonly name?: string; + readonly value?: string; +} + // @public export interface PolicyViolation { category?: PolicyViolationCategory; @@ -5699,6 +6051,28 @@ export interface SnapshotUpdate { }; } +// @public +export type SoftDeletedArtifactTypes = string; + +// @public +export interface SoftDeletedResource { + listByArtifactName(resourceGroupName: string, galleryName: string, artifactType: string, artifactName: string, options?: SoftDeletedResourceListByArtifactNameOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SoftDeletedResourceListByArtifactNameNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SoftDeletedResourceListByArtifactNameNextResponse = GallerySoftDeletedResourceList; + +// @public +export interface SoftDeletedResourceListByArtifactNameOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SoftDeletedResourceListByArtifactNameResponse = GallerySoftDeletedResourceList; + // @public export interface SoftDeletePolicy { isSoftDeleteEnabled?: boolean; @@ -5882,6 +6256,7 @@ export interface SystemData { // @public export interface TargetRegion { + additionalReplicaSets?: AdditionalReplicaSet[]; encryption?: EncryptionImages; excludeFromLatest?: boolean; name: string; @@ -6038,6 +6413,7 @@ export interface UserArtifactManage { export interface UserArtifactSettings { configFileName?: string; packageFileName?: string; + scriptBehaviorAfterReboot?: GalleryApplicationScriptRebootBehavior; } // @public @@ -6062,6 +6438,17 @@ export interface UserInitiatedRedeploy { automaticallyApprove?: boolean; } +// @public +export interface ValidationsProfile { + // (undocumented) + executedValidations?: ExecutedValidation[]; + platformAttributes?: PlatformAttribute[]; + validationEtag?: string; +} + +// @public +export type ValidationStatus = string; + // @public export interface VaultCertificate { certificateStore?: string; diff --git a/sdk/compute/arm-compute/sample.env b/sdk/compute/arm-compute/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/compute/arm-compute/sample.env +++ b/sdk/compute/arm-compute/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/compute/arm-compute/samples-dev/communityGalleriesGetSample.ts b/sdk/compute/arm-compute/samples-dev/communityGalleriesGetSample.ts index a32c22450f48..df59c52aa6e7 100644 --- a/sdk/compute/arm-compute/samples-dev/communityGalleriesGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/communityGalleriesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a community gallery by gallery public name. * * @summary Get a community gallery by gallery public name. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGallery_Get.json */ async function getACommunityGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/communityGalleryImageVersionsGetSample.ts b/sdk/compute/arm-compute/samples-dev/communityGalleryImageVersionsGetSample.ts index 6e1954e2fe7b..31ed6522c4a6 100644 --- a/sdk/compute/arm-compute/samples-dev/communityGalleryImageVersionsGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/communityGalleryImageVersionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a community gallery image version. * * @summary Get a community gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json */ async function getACommunityGalleryImageVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/communityGalleryImageVersionsListSample.ts b/sdk/compute/arm-compute/samples-dev/communityGalleryImageVersionsListSample.ts index 4124b7701d09..e9c2413622f4 100644 --- a/sdk/compute/arm-compute/samples-dev/communityGalleryImageVersionsListSample.ts +++ b/sdk/compute/arm-compute/samples-dev/communityGalleryImageVersionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List community gallery image versions inside an image. * * @summary List community gallery image versions inside an image. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json */ async function listCommunityGalleryImageVersions() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/communityGalleryImagesGetSample.ts b/sdk/compute/arm-compute/samples-dev/communityGalleryImagesGetSample.ts index ba0705c3f9c6..a82b6683635c 100644 --- a/sdk/compute/arm-compute/samples-dev/communityGalleryImagesGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/communityGalleryImagesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a community gallery image. * * @summary Get a community gallery image. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json */ async function getACommunityGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/communityGalleryImagesListSample.ts b/sdk/compute/arm-compute/samples-dev/communityGalleryImagesListSample.ts index 32c46a871abc..98cc3812efae 100644 --- a/sdk/compute/arm-compute/samples-dev/communityGalleryImagesListSample.ts +++ b/sdk/compute/arm-compute/samples-dev/communityGalleryImagesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List community gallery images inside a gallery. * * @summary List community gallery images inside a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json */ async function listCommunityGalleryImages() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleriesCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleriesCreateOrUpdateSample.ts index 082790fdaf86..6baddf06b31a 100644 --- a/sdk/compute/arm-compute/samples-dev/galleriesCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleriesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Create.json */ async function createACommunityGallery() { const subscriptionId = @@ -53,7 +53,7 @@ async function createACommunityGallery() { * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create_WithSharingProfile.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithSharingProfile.json */ async function createOrUpdateASimpleGalleryWithSharingProfile() { const subscriptionId = @@ -80,7 +80,7 @@ async function createOrUpdateASimpleGalleryWithSharingProfile() { * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create_SoftDeletionEnabled.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_SoftDeletionEnabled.json */ async function createOrUpdateASimpleGalleryWithSoftDeletionEnabled() { const subscriptionId = @@ -107,7 +107,40 @@ async function createOrUpdateASimpleGalleryWithSoftDeletionEnabled() { * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithManagedIdentity.json + */ +async function createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const gallery: Gallery = { + description: "This is the gallery description.", + identity: { + type: "SystemAssigned, UserAssigned", + userAssignedIdentities: { + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/myIdentity": + {}, + }, + }, + location: "West US", + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleries.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + gallery, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or update a Shared Image Gallery. + * + * @summary Create or update a Shared Image Gallery. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create.json */ async function createOrUpdateASimpleGallery() { const subscriptionId = @@ -133,6 +166,7 @@ async function main() { createACommunityGallery(); createOrUpdateASimpleGalleryWithSharingProfile(); createOrUpdateASimpleGalleryWithSoftDeletionEnabled(); + createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities(); createOrUpdateASimpleGallery(); } diff --git a/sdk/compute/arm-compute/samples-dev/galleriesDeleteSample.ts b/sdk/compute/arm-compute/samples-dev/galleriesDeleteSample.ts index 2cdad8d821ab..3f03babba46a 100644 --- a/sdk/compute/arm-compute/samples-dev/galleriesDeleteSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleriesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Shared Image Gallery. * * @summary Delete a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Delete.json */ async function deleteAGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleriesGetSample.ts b/sdk/compute/arm-compute/samples-dev/galleriesGetSample.ts index 915d310529d9..27bce5984bc8 100644 --- a/sdk/compute/arm-compute/samples-dev/galleriesGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleriesGetSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Get.json */ async function getACommunityGallery() { const subscriptionId = @@ -39,7 +39,7 @@ async function getACommunityGallery() { * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json */ async function getAGalleryWithExpandSharingProfileGroups() { const subscriptionId = @@ -63,7 +63,7 @@ async function getAGalleryWithExpandSharingProfileGroups() { * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json */ async function getAGalleryWithSelectPermissions() { const subscriptionId = @@ -87,7 +87,25 @@ async function getAGalleryWithSelectPermissions() { * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithManagedIdentity.json + */ +async function getAGalleryWithSystemAssignedAndUserAssignedManagedIdentities() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleries.get(resourceGroupName, galleryName); + console.log(result); +} + +/** + * This sample demonstrates how to Retrieves information about a Shared Image Gallery. + * + * @summary Retrieves information about a Shared Image Gallery. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get.json */ async function getAGallery() { const subscriptionId = @@ -105,6 +123,7 @@ async function main() { getACommunityGallery(); getAGalleryWithExpandSharingProfileGroups(); getAGalleryWithSelectPermissions(); + getAGalleryWithSystemAssignedAndUserAssignedManagedIdentities(); getAGallery(); } diff --git a/sdk/compute/arm-compute/samples-dev/galleriesListByResourceGroupSample.ts b/sdk/compute/arm-compute/samples-dev/galleriesListByResourceGroupSample.ts index 2b167c09f50a..e25764fe11fc 100644 --- a/sdk/compute/arm-compute/samples-dev/galleriesListByResourceGroupSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleriesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List galleries under a resource group. * * @summary List galleries under a resource group. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListByResourceGroup.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListByResourceGroup.json */ async function listGalleriesInAResourceGroup() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleriesListSample.ts b/sdk/compute/arm-compute/samples-dev/galleriesListSample.ts index 728fa29bba77..1d212e7218ec 100644 --- a/sdk/compute/arm-compute/samples-dev/galleriesListSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleriesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List galleries under a subscription. * * @summary List galleries under a subscription. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListBySubscription.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListBySubscription.json */ async function listGalleriesInASubscription() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleriesUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleriesUpdateSample.ts index 1a19b56f7ce2..f612622e6727 100644 --- a/sdk/compute/arm-compute/samples-dev/galleriesUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleriesUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update a Shared Image Gallery. * * @summary Update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Update.json */ async function updateASimpleGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsCreateOrUpdateSample.ts index aaec62cdc642..928677cb0e49 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a gallery Application Version. * * @summary Create or update a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Create.json */ async function createOrUpdateASimpleGalleryApplicationVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsDeleteSample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsDeleteSample.ts index 38f242f79412..d0afe5b65ac5 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsDeleteSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a gallery Application Version. * * @summary Delete a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json */ async function deleteAGalleryApplicationVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsGetSample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsGetSample.ts index 9fe6ca7bd9cb..4a80188f4822 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsGetSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a gallery Application Version. * * @summary Retrieves information about a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json */ async function getAGalleryApplicationVersionWithReplicationStatus() { const subscriptionId = @@ -49,7 +49,7 @@ async function getAGalleryApplicationVersionWithReplicationStatus() { * This sample demonstrates how to Retrieves information about a gallery Application Version. * * @summary Retrieves information about a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get.json */ async function getAGalleryApplicationVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsListByGalleryApplicationSample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsListByGalleryApplicationSample.ts index 55a74ff36b20..877f057b0823 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsListByGalleryApplicationSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsListByGalleryApplicationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List gallery Application Versions in a gallery Application Definition. * * @summary List gallery Application Versions in a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json */ async function listGalleryApplicationVersionsInAGalleryApplicationDefinition() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsUpdateSample.ts index 3d1ebc4e9c7b..03bab4da4a87 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationVersionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update a gallery Application Version. * * @summary Update a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Update.json */ async function updateASimpleGalleryApplicationVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationsCreateOrUpdateSample.ts index 13ec8d872b01..14db5940329b 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationsCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a gallery Application Definition. * * @summary Create or update a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Create.json */ async function createOrUpdateASimpleGalleryApplication() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationsDeleteSample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationsDeleteSample.ts index dbf8d2a74f6c..e4e81c83d864 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationsDeleteSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a gallery Application. * * @summary Delete a gallery Application. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Delete.json */ async function deleteAGalleryApplication() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationsGetSample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationsGetSample.ts index c7241ed0da23..1f974747e26a 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationsGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a gallery Application Definition. * * @summary Retrieves information about a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Get.json */ async function getAGalleryApplication() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationsListByGallerySample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationsListByGallerySample.ts index b2a567fa665b..25f9c33cce37 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationsListByGallerySample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationsListByGallerySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List gallery Application Definitions in a gallery. * * @summary List gallery Application Definitions in a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_ListByGallery.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_ListByGallery.json */ async function listGalleryApplicationsInAGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryApplicationsUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryApplicationsUpdateSample.ts index ac9c5128804e..6464bc6adb58 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryApplicationsUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryApplicationsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update a gallery Application Definition. * * @summary Update a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Update.json */ async function updateASimpleGalleryApplication() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsCreateOrUpdateSample.ts index b3a2c2e67c30..286b59b4e6be 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { const subscriptionId = @@ -84,7 +84,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { virtualMachineId: @@ -108,7 +111,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithCommunityImageVersionAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithCommunityImageVersionAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource() { const subscriptionId = @@ -171,7 +174,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImag }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { communityGalleryImageId: @@ -195,7 +201,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImag * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create.json */ async function createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource() { const subscriptionId = @@ -258,7 +264,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}", @@ -281,7 +290,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource() { const subscriptionId = @@ -334,7 +343,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapsho }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { dataDiskImages: [ { @@ -369,7 +381,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapsho * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithShallowReplicationMode.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithShallowReplicationMode.json */ async function createOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode() { const subscriptionId = @@ -387,7 +399,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMo { name: "West US", excludeFromLatest: false, regionalReplicaCount: 1 }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}", @@ -410,7 +425,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMo * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithImageVersionAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithImageVersionAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource() { const subscriptionId = @@ -473,7 +488,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource( }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}", @@ -496,7 +514,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource( * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() { const subscriptionId = @@ -549,7 +567,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { dataDiskImages: [ { @@ -584,7 +605,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD_UefiSettings.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD_UefiSettings.json */ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCustomUefiKeys() { const subscriptionId = @@ -624,7 +645,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCust }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, securityProfile: { uefiSettings: { additionalSignatures: { @@ -673,7 +697,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCust * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD.json */ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { const subscriptionId = @@ -713,7 +737,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { dataDiskImages: [ { @@ -752,9 +779,9 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithTargetExtendedLocations.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithAdditionalReplicaSets.json */ -async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified() { +async function createOrUpdateASimpleGalleryImageVersionWithDirectDriveReplicas() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = @@ -768,6 +795,9 @@ async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocatio targetRegions: [ { name: "West US", + additionalReplicaSets: [ + { regionalReplicaCount: 1, storageAccountType: "PreviumV2_LRS" }, + ], encryption: { dataDiskImages: [ { @@ -834,6 +864,95 @@ async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocatio console.log(result); } +/** + * This sample demonstrates how to Create or update a gallery image version. + * + * @summary Create or update a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithTargetExtendedLocations.json + */ +async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const galleryImageVersion: GalleryImageVersion = { + location: "West US", + publishingProfile: { + targetRegions: [ + { + name: "West US", + encryption: { + dataDiskImages: [ + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + lun: 0, + }, + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + lun: 1, + }, + ], + osDiskImage: { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + }, + }, + excludeFromLatest: false, + regionalReplicaCount: 1, + }, + { + name: "East US", + encryption: { + dataDiskImages: [ + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + lun: 0, + }, + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + lun: 1, + }, + ], + osDiskImage: { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + }, + }, + excludeFromLatest: false, + regionalReplicaCount: 2, + storageAccountType: "Standard_ZRS", + }, + ], + }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, + storageProfile: { + source: { + id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + galleryImageVersion, + ); + console.log(result); +} + async function main() { createOrUpdateASimpleGalleryImageVersionUsingVMAsSource(); createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource(); @@ -844,6 +963,7 @@ async function main() { createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource(); createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCustomUefiKeys(); createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource(); + createOrUpdateASimpleGalleryImageVersionWithDirectDriveReplicas(); createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified(); } diff --git a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsDeleteSample.ts b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsDeleteSample.ts index 6a83e09ea49d..a267c08016bc 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsDeleteSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a gallery image version. * * @summary Delete a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Delete.json */ async function deleteAGalleryImageVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsGetSample.ts b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsGetSample.ts index 1c7ce8a851d1..1d35b8efe28e 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsGetSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json */ async function getAGalleryImageVersionWithReplicationStatus() { const subscriptionId = @@ -49,7 +49,7 @@ async function getAGalleryImageVersionWithReplicationStatus() { * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json */ async function getAGalleryImageVersionWithSnapshotsAsASource() { const subscriptionId = @@ -74,7 +74,63 @@ async function getAGalleryImageVersionWithSnapshotsAsASource() { * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithValidationProfileAndReplicationStatus.json + */ +async function getAGalleryImageVersionWithValidationProfileAndReplicationStatus() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const expand = "ValidationProfile,ReplicationStatus"; + const options: GalleryImageVersionsGetOptionalParams = { expand }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.get( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + options, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Retrieves information about a gallery image version. + * + * @summary Retrieves information about a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithValidationProfile.json + */ +async function getAGalleryImageVersionWithValidationProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const expand = "ValidationProfile"; + const options: GalleryImageVersionsGetOptionalParams = { expand }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.get( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + options, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Retrieves information about a gallery image version. + * + * @summary Retrieves information about a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json */ async function getAGalleryImageVersionWithVhdAsASource() { const subscriptionId = @@ -99,7 +155,7 @@ async function getAGalleryImageVersionWithVhdAsASource() { * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get.json */ async function getAGalleryImageVersion() { const subscriptionId = @@ -123,6 +179,8 @@ async function getAGalleryImageVersion() { async function main() { getAGalleryImageVersionWithReplicationStatus(); getAGalleryImageVersionWithSnapshotsAsASource(); + getAGalleryImageVersionWithValidationProfileAndReplicationStatus(); + getAGalleryImageVersionWithValidationProfile(); getAGalleryImageVersionWithVhdAsASource(); getAGalleryImageVersion(); } diff --git a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsListByGalleryImageSample.ts b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsListByGalleryImageSample.ts index c48a9f9f1add..b961a383fe8b 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsListByGalleryImageSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsListByGalleryImageSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List gallery image versions in a gallery image definition. * * @summary List gallery image versions in a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json */ async function listGalleryImageVersionsInAGalleryImageDefinition() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsUpdateSample.ts index e0e24976bbc0..d5019fef2415 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImageVersionsUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImageVersionsUpdateSample.ts @@ -21,7 +21,37 @@ dotenv.config(); * This sample demonstrates how to Update a gallery image version. * * @summary Update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update_RestoreSoftDeleted.json + */ +async function restoreASoftDeletedGalleryImageVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const galleryImageVersion: GalleryImageVersionUpdate = { + restore: true, + storageProfile: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.beginUpdateAndWait( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + galleryImageVersion, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Update a gallery image version. + * + * @summary Update a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update.json */ async function updateASimpleGalleryImageVersionManagedImageAsSource() { const subscriptionId = @@ -64,7 +94,7 @@ async function updateASimpleGalleryImageVersionManagedImageAsSource() { * This sample demonstrates how to Update a gallery image version. * * @summary Update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update_WithoutSourceId.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update_WithoutSourceId.json */ async function updateASimpleGalleryImageVersionWithoutSourceId() { const subscriptionId = @@ -100,6 +130,7 @@ async function updateASimpleGalleryImageVersionWithoutSourceId() { } async function main() { + restoreASoftDeletedGalleryImageVersion(); updateASimpleGalleryImageVersionManagedImageAsSource(); updateASimpleGalleryImageVersionWithoutSourceId(); } diff --git a/sdk/compute/arm-compute/samples-dev/galleryImagesCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryImagesCreateOrUpdateSample.ts index 0f63a0191f57..828800ddcb95 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImagesCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImagesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a gallery image definition. * * @summary Create or update a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Create.json */ async function createOrUpdateASimpleGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryImagesDeleteSample.ts b/sdk/compute/arm-compute/samples-dev/galleryImagesDeleteSample.ts index ef6bc052347f..f8831b8a9bc5 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImagesDeleteSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImagesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a gallery image. * * @summary Delete a gallery image. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Delete.json */ async function deleteAGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryImagesGetSample.ts b/sdk/compute/arm-compute/samples-dev/galleryImagesGetSample.ts index 2d523eaabfe3..e1237c4baa69 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImagesGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImagesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a gallery image definition. * * @summary Retrieves information about a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Get.json */ async function getAGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryImagesListByGallerySample.ts b/sdk/compute/arm-compute/samples-dev/galleryImagesListByGallerySample.ts index 211a3cedfc09..846d63d29e2d 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImagesListByGallerySample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImagesListByGallerySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List gallery image definitions in a gallery. * * @summary List gallery image definitions in a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_ListByGallery.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_ListByGallery.json */ async function listGalleryImagesInAGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/galleryImagesUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryImagesUpdateSample.ts index caf15968df97..370d17715ab7 100644 --- a/sdk/compute/arm-compute/samples-dev/galleryImagesUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/galleryImagesUpdateSample.ts @@ -21,7 +21,49 @@ dotenv.config(); * This sample demonstrates how to Update a gallery image definition. * * @summary Update a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_UpdateFeatures.json + */ +async function updateAGalleryImageFeature() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImage: GalleryImageUpdate = { + allowUpdateImage: true, + features: [ + { + name: "SecurityType", + startsAtVersion: "2.0.0", + value: "TrustedLaunch", + }, + ], + hyperVGeneration: "V2", + identifier: { + offer: "myOfferName", + publisher: "myPublisherName", + sku: "mySkuName", + }, + osState: "Generalized", + osType: "Windows", + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImages.beginUpdateAndWait( + resourceGroupName, + galleryName, + galleryImageName, + galleryImage, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Update a gallery image definition. + * + * @summary Update a gallery image definition. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Update.json */ async function updateASimpleGalleryImage() { const subscriptionId = @@ -52,6 +94,7 @@ async function updateASimpleGalleryImage() { } async function main() { + updateAGalleryImageFeature(); updateASimpleGalleryImage(); } diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..f3a43a2ccff9 --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GalleryInVMAccessControlProfileVersion, + ComputeManagementClient, +} from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create or update a gallery inVMAccessControlProfile version. + * + * @summary Create or update a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Create.json + */ +async function createOrUpdateAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersion = + { + defaultAccess: "Allow", + excludeFromLatest: false, + location: "West US", + mode: "Audit", + rules: { + identities: [ + { + name: "WinPA", + exePath: "C:\\Windows\\System32\\cscript.exe", + groupName: "Administrators", + processName: "cscript", + userName: "SYSTEM", + }, + ], + privileges: [ + { + name: "GoalState", + path: "/machine", + queryParameters: { comp: "goalstate" }, + }, + ], + roleAssignments: [{ identities: ["WinPA"], role: "Provisioning" }], + roles: [{ name: "Provisioning", privileges: ["GoalState"] }], + }, + targetLocations: [{ name: "West US" }, { name: "South Central US" }], + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfileVersions.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + ); + console.log(result); +} + +async function main() { + createOrUpdateAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsDeleteSample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsDeleteSample.ts new file mode 100644 index 000000000000..e535fa714732 --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete a gallery inVMAccessControlProfile version. + * + * @summary Delete a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Delete.json + */ +async function deleteAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfileVersions.beginDeleteAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + ); + console.log(result); +} + +async function main() { + deleteAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsGetSample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsGetSample.ts new file mode 100644 index 000000000000..63510405870d --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsGetSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Retrieves information about a gallery inVMAccessControlProfile version. + * + * @summary Retrieves information about a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json + */ +async function getAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfileVersions.get( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + ); + console.log(result); +} + +async function main() { + getAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts new file mode 100644 index 000000000000..7ae84b73d712 --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + * + * @summary List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_ListByGalleryInVMAccessControlProfile.json + */ +async function listGalleryInVMAccessControlProfileVersionsInAGalleryInVmaccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.galleryInVMAccessControlProfileVersions.listByGalleryInVMAccessControlProfile( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGalleryInVMAccessControlProfileVersionsInAGalleryInVmaccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsUpdateSample.ts new file mode 100644 index 000000000000..6117d07ad951 --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfileVersionsUpdateSample.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GalleryInVMAccessControlProfileVersionUpdate, + ComputeManagementClient, +} from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update a gallery inVMAccessControlProfile version. + * + * @summary Update a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Update.json + */ +async function updateAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersionUpdate = + { + defaultAccess: "Allow", + excludeFromLatest: false, + mode: "Audit", + targetLocations: [ + { name: "West US" }, + { name: "South Central US" }, + { name: "East US" }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfileVersions.beginUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + ); + console.log(result); +} + +async function main() { + updateAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..f3d9f0b815d3 --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesCreateOrUpdateSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GalleryInVMAccessControlProfile, + ComputeManagementClient, +} from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create or update a gallery inVMAccessControlProfile. + * + * @summary Create or update a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Create.json + */ +async function createOrUpdateAGalleryInVMAccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const galleryInVMAccessControlProfile: GalleryInVMAccessControlProfile = { + location: "West US", + properties: { applicableHostEndpoint: "WireServer", osType: "Linux" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfiles.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + ); + console.log(result); +} + +async function main() { + createOrUpdateAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesDeleteSample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesDeleteSample.ts new file mode 100644 index 000000000000..1ed1bb92df19 --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete a gallery inVMAccessControlProfile. + * + * @summary Delete a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Delete.json + */ +async function deleteAGalleryInVMAccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfiles.beginDeleteAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + ); + console.log(result); +} + +async function main() { + deleteAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesGetSample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesGetSample.ts new file mode 100644 index 000000000000..cbafaeb1dfa2 --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesGetSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Retrieves information about a gallery inVMAccessControlProfile. + * + * @summary Retrieves information about a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json + */ +async function getAGalleryInVMAccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfiles.get( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + ); + console.log(result); +} + +async function main() { + getAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesListByGallerySample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesListByGallerySample.ts new file mode 100644 index 000000000000..7f3fe097cf93 --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesListByGallerySample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List gallery inVMAccessControlProfiles in a gallery. + * + * @summary List gallery inVMAccessControlProfiles in a gallery. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_ListByGallery.json + */ +async function listGalleryInVMAccessControlProfilesInAGallery() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.galleryInVMAccessControlProfiles.listByGallery( + resourceGroupName, + galleryName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGalleryInVMAccessControlProfilesInAGallery(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesUpdateSample.ts new file mode 100644 index 000000000000..5b8d0b3506e7 --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/galleryInVMAccessControlProfilesUpdateSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GalleryInVMAccessControlProfileUpdate, + ComputeManagementClient, +} from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update a gallery inVMAccessControlProfile. + * + * @summary Update a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Update.json + */ +async function updateAGalleryInVMAccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const galleryInVMAccessControlProfile: GalleryInVMAccessControlProfileUpdate = + { properties: { applicableHostEndpoint: "WireServer", osType: "Linux" } }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfiles.beginUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + ); + console.log(result); +} + +async function main() { + updateAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/gallerySharingProfileUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/gallerySharingProfileUpdateSample.ts index b3cbc70b8ce8..26ad68593601 100644 --- a/sdk/compute/arm-compute/samples-dev/gallerySharingProfileUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/gallerySharingProfileUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update sharing profile of a gallery. * * @summary Update sharing profile of a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_AddToSharingProfile.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_AddToSharingProfile.json */ async function addSharingIdToTheSharingProfileOfAGallery() { const subscriptionId = @@ -53,7 +53,7 @@ async function addSharingIdToTheSharingProfileOfAGallery() { * This sample demonstrates how to Update sharing profile of a gallery. * * @summary Update sharing profile of a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ResetSharingProfile.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ResetSharingProfile.json */ async function resetSharingProfileOfAGallery() { const subscriptionId = @@ -76,7 +76,7 @@ async function resetSharingProfileOfAGallery() { * This sample demonstrates how to Update sharing profile of a gallery. * * @summary Update sharing profile of a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_EnableCommunityGallery.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_EnableCommunityGallery.json */ async function shareAGalleryToCommunity() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/sharedGalleriesGetSample.ts b/sdk/compute/arm-compute/samples-dev/sharedGalleriesGetSample.ts index 85674d442cf0..fce9fb7fb5dc 100644 --- a/sdk/compute/arm-compute/samples-dev/sharedGalleriesGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/sharedGalleriesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a shared gallery by subscription id or tenant id. * * @summary Get a shared gallery by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_Get.json */ async function getASharedGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/sharedGalleriesListSample.ts b/sdk/compute/arm-compute/samples-dev/sharedGalleriesListSample.ts index cf12445c658f..b823c23d6737 100644 --- a/sdk/compute/arm-compute/samples-dev/sharedGalleriesListSample.ts +++ b/sdk/compute/arm-compute/samples-dev/sharedGalleriesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List shared galleries by subscription id or tenant id. * * @summary List shared galleries by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_List.json */ async function listSharedGalleries() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/sharedGalleryImageVersionsGetSample.ts b/sdk/compute/arm-compute/samples-dev/sharedGalleryImageVersionsGetSample.ts index 0fc9d92c351c..332159d62c5a 100644 --- a/sdk/compute/arm-compute/samples-dev/sharedGalleryImageVersionsGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/sharedGalleryImageVersionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a shared gallery image version by subscription id or tenant id. * * @summary Get a shared gallery image version by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json */ async function getASharedGalleryImageVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/sharedGalleryImageVersionsListSample.ts b/sdk/compute/arm-compute/samples-dev/sharedGalleryImageVersionsListSample.ts index 98ae70b401e2..ac4db5243044 100644 --- a/sdk/compute/arm-compute/samples-dev/sharedGalleryImageVersionsListSample.ts +++ b/sdk/compute/arm-compute/samples-dev/sharedGalleryImageVersionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List shared gallery image versions by subscription id or tenant id. * * @summary List shared gallery image versions by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json */ async function listSharedGalleryImageVersions() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/sharedGalleryImagesGetSample.ts b/sdk/compute/arm-compute/samples-dev/sharedGalleryImagesGetSample.ts index 130e67be7970..b719a4b68f08 100644 --- a/sdk/compute/arm-compute/samples-dev/sharedGalleryImagesGetSample.ts +++ b/sdk/compute/arm-compute/samples-dev/sharedGalleryImagesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a shared gallery image by subscription id or tenant id. * * @summary Get a shared gallery image by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json */ async function getASharedGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/sharedGalleryImagesListSample.ts b/sdk/compute/arm-compute/samples-dev/sharedGalleryImagesListSample.ts index be7c03622bf6..d9ddde2546f6 100644 --- a/sdk/compute/arm-compute/samples-dev/sharedGalleryImagesListSample.ts +++ b/sdk/compute/arm-compute/samples-dev/sharedGalleryImagesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List shared gallery images by subscription id or tenant id. * * @summary List shared gallery images by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json */ async function listSharedGalleryImages() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples-dev/softDeletedResourceListByArtifactNameSample.ts b/sdk/compute/arm-compute/samples-dev/softDeletedResourceListByArtifactNameSample.ts new file mode 100644 index 000000000000..90e717b8306b --- /dev/null +++ b/sdk/compute/arm-compute/samples-dev/softDeletedResourceListByArtifactNameSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an image. + * + * @summary List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an image. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GallerySoftDeletedResource_ListByArtifactName.json + */ +async function listSoftDeletedResourcesOfAnArtifactInTheGallery() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const artifactType = "images"; + const artifactName = "myGalleryImageName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.softDeletedResource.listByArtifactName( + resourceGroupName, + galleryName, + artifactType, + artifactName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listSoftDeletedResourcesOfAnArtifactInTheGallery(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetVMSPowerOffSample.ts b/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetVMSPowerOffSample.ts index f89db1933a6a..295d100fd006 100644 --- a/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetVMSPowerOffSample.ts +++ b/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetVMSPowerOffSample.ts @@ -18,9 +18,9 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * - * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MaximumSet_Gen.json */ async function virtualMachineScaleSetVMPowerOffMaximumSetGen() { @@ -46,9 +46,9 @@ async function virtualMachineScaleSetVMPowerOffMaximumSetGen() { } /** - * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * - * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MinimumSet_Gen.json */ async function virtualMachineScaleSetVMPowerOffMinimumSetGen() { diff --git a/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetsCreateOrUpdateSample.ts index f1c7fdf0aadf..520e61e62e72 100644 --- a/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetsCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetsCreateOrUpdateSample.ts @@ -2673,23 +2673,30 @@ async function createAScaleSetWithPriorityMixPolicy() { const parameters: VirtualMachineScaleSet = { location: "westus", orchestrationMode: "Flexible", + platformFaultDomainCount: 1, priorityMixPolicy: { - baseRegularPriorityCount: 4, + baseRegularPriorityCount: 10, regularPriorityPercentageAboveBase: 50, }, - singlePlacementGroup: false, - sku: { name: "Standard_A8m_v2", capacity: 10, tier: "Standard" }, + sku: { name: "Standard_A8m_v2", capacity: 2, tier: "Standard" }, virtualMachineProfile: { - billingProfile: { maxPrice: -1 }, - evictionPolicy: "Deallocate", networkProfile: { + networkApiVersion: "2020-11-01", networkInterfaceConfigurations: [ { name: "{vmss-name}", + enableAcceleratedNetworking: false, enableIPForwarding: true, ipConfigurations: [ { name: "{vmss-name}", + applicationGatewayBackendAddressPools: [], + loadBalancerBackendAddressPools: [], + primary: true, + publicIPAddressConfiguration: { + name: "{vmss-name}", + idleTimeoutInMinutes: 15, + }, subnet: { id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}", }, @@ -2707,9 +2714,9 @@ async function createAScaleSetWithPriorityMixPolicy() { priority: "Spot", storageProfile: { imageReference: { - offer: "WindowsServer", - publisher: "MicrosoftWindowsServer", - sku: "2016-Datacenter", + offer: "0001-com-ubuntu-server-focal", + publisher: "Canonical", + sku: "20_04-lts-gen2", version: "latest", }, osDisk: { diff --git a/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetsPowerOffSample.ts b/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetsPowerOffSample.ts index 7611696082ee..5fc34298940b 100644 --- a/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetsPowerOffSample.ts +++ b/sdk/compute/arm-compute/samples-dev/virtualMachineScaleSetsPowerOffSample.ts @@ -19,9 +19,9 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * - * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MaximumSet_Gen.json */ async function virtualMachineScaleSetPowerOffMaximumSetGen() { @@ -49,9 +49,9 @@ async function virtualMachineScaleSetPowerOffMaximumSetGen() { } /** - * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * - * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MinimumSet_Gen.json */ async function virtualMachineScaleSetPowerOffMinimumSetGen() { diff --git a/sdk/compute/arm-compute/samples-dev/virtualMachinesPowerOffSample.ts b/sdk/compute/arm-compute/samples-dev/virtualMachinesPowerOffSample.ts index 6a96e46f5d9c..77bd42ca1efe 100644 --- a/sdk/compute/arm-compute/samples-dev/virtualMachinesPowerOffSample.ts +++ b/sdk/compute/arm-compute/samples-dev/virtualMachinesPowerOffSample.ts @@ -18,9 +18,9 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * - * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MaximumSet_Gen.json */ async function virtualMachinePowerOffMaximumSetGen() { @@ -42,9 +42,9 @@ async function virtualMachinePowerOffMaximumSetGen() { } /** - * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * - * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MinimumSet_Gen.json */ async function virtualMachinePowerOffMinimumSetGen() { diff --git a/sdk/compute/arm-compute/samples/v22/javascript/README.md b/sdk/compute/arm-compute/samples/v22/javascript/README.md index aed48cce52c8..038c0b8c870d 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/README.md +++ b/sdk/compute/arm-compute/samples/v22/javascript/README.md @@ -2,294 +2,305 @@ These sample programs show how to use the JavaScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [availabilitySetsCreateOrUpdateSample.js][availabilitysetscreateorupdatesample] | Create or update an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Create_WithScheduledEventProfile.json | -| [availabilitySetsDeleteSample.js][availabilitysetsdeletesample] | Delete an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Delete_MaximumSet_Gen.json | -| [availabilitySetsGetSample.js][availabilitysetsgetsample] | Retrieves information about an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Get_MaximumSet_Gen.json | -| [availabilitySetsListAvailableSizesSample.js][availabilitysetslistavailablesizessample] | Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_ListAvailableSizes_MaximumSet_Gen.json | -| [availabilitySetsListBySubscriptionSample.js][availabilitysetslistbysubscriptionsample] | Lists all availability sets in a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_ListBySubscription.json | -| [availabilitySetsListSample.js][availabilitysetslistsample] | Lists all availability sets in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_List_MaximumSet_Gen.json | -| [availabilitySetsUpdateSample.js][availabilitysetsupdatesample] | Update an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Update_MaximumSet_Gen.json | -| [capacityReservationGroupsCreateOrUpdateSample.js][capacityreservationgroupscreateorupdatesample] | The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_CreateOrUpdate.json | -| [capacityReservationGroupsDeleteSample.js][capacityreservationgroupsdeletesample] | The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Delete_MaximumSet_Gen.json | -| [capacityReservationGroupsGetSample.js][capacityreservationgroupsgetsample] | The operation that retrieves information about a capacity reservation group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Get.json | -| [capacityReservationGroupsListByResourceGroupSample.js][capacityreservationgroupslistbyresourcegroupsample] | Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_ListByResourceGroup.json | -| [capacityReservationGroupsListBySubscriptionSample.js][capacityreservationgroupslistbysubscriptionsample] | Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_ListBySubscription.json | -| [capacityReservationGroupsUpdateSample.js][capacityreservationgroupsupdatesample] | The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Update_MaximumSet_Gen.json | -| [capacityReservationsCreateOrUpdateSample.js][capacityreservationscreateorupdatesample] | The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_CreateOrUpdate.json | -| [capacityReservationsDeleteSample.js][capacityreservationsdeletesample] | The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Delete_MaximumSet_Gen.json | -| [capacityReservationsGetSample.js][capacityreservationsgetsample] | The operation that retrieves information about the capacity reservation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Get.json | -| [capacityReservationsListByCapacityReservationGroupSample.js][capacityreservationslistbycapacityreservationgroupsample] | Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_ListByReservationGroup.json | -| [capacityReservationsUpdateSample.js][capacityreservationsupdatesample] | The operation to update a capacity reservation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Update_MaximumSet_Gen.json | -| [cloudServiceOperatingSystemsGetOSFamilySample.js][cloudserviceoperatingsystemsgetosfamilysample] | Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSFamily_Get.json | -| [cloudServiceOperatingSystemsGetOSVersionSample.js][cloudserviceoperatingsystemsgetosversionsample] | Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSVersion_Get.json | -| [cloudServiceOperatingSystemsListOSFamiliesSample.js][cloudserviceoperatingsystemslistosfamiliessample] | Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSFamilies_List.json | -| [cloudServiceOperatingSystemsListOSVersionsSample.js][cloudserviceoperatingsystemslistosversionssample] | Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSVersion_List.json | -| [cloudServiceRoleInstancesDeleteSample.js][cloudserviceroleinstancesdeletesample] | Deletes a role instance from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Delete.json | -| [cloudServiceRoleInstancesGetInstanceViewSample.js][cloudserviceroleinstancesgetinstanceviewsample] | Retrieves information about the run-time state of a role instance in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_InstanceView.json | -| [cloudServiceRoleInstancesGetRemoteDesktopFileSample.js][cloudserviceroleinstancesgetremotedesktopfilesample] | Gets a remote desktop file for a role instance in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_RemoteDesktopFile.json | -| [cloudServiceRoleInstancesGetSample.js][cloudserviceroleinstancesgetsample] | Gets a role instance from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get.json | -| [cloudServiceRoleInstancesListSample.js][cloudserviceroleinstanceslistsample] | Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRolesInstance_List.json | -| [cloudServiceRoleInstancesRebuildSample.js][cloudserviceroleinstancesrebuildsample] | The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Rebuild.json | -| [cloudServiceRoleInstancesReimageSample.js][cloudserviceroleinstancesreimagesample] | The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Reimage.json | -| [cloudServiceRoleInstancesRestartSample.js][cloudserviceroleinstancesrestartsample] | The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Restart.json | -| [cloudServiceRolesGetSample.js][cloudservicerolesgetsample] | Gets a role from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRole_Get.json | -| [cloudServiceRolesListSample.js][cloudserviceroleslistsample] | Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRole_List.json | -| [cloudServicesCreateOrUpdateSample.js][cloudservicescreateorupdatesample] | Create or update a cloud service. Please note some properties can be set only during cloud service creation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Create_WithMultiRole.json | -| [cloudServicesDeleteInstancesSample.js][cloudservicesdeleteinstancessample] | Deletes role instances in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Delete_ByCloudService.json | -| [cloudServicesDeleteSample.js][cloudservicesdeletesample] | Deletes a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Delete.json | -| [cloudServicesGetInstanceViewSample.js][cloudservicesgetinstanceviewsample] | Gets the status of a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Get_InstanceViewWithMultiRole.json | -| [cloudServicesGetSample.js][cloudservicesgetsample] | Display information about a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Get_WithMultiRoleAndRDP.json | -| [cloudServicesListAllSample.js][cloudserviceslistallsample] | Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_List_BySubscription.json | -| [cloudServicesListSample.js][cloudserviceslistsample] | Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_List_ByResourceGroup.json | -| [cloudServicesPowerOffSample.js][cloudservicespoweroffsample] | Power off the cloud service. Note that resources are still attached and you are getting charged for the resources. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_PowerOff.json | -| [cloudServicesRebuildSample.js][cloudservicesrebuildsample] | Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Rebuild_ByCloudService.json | -| [cloudServicesReimageSample.js][cloudservicesreimagesample] | Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Reimage_ByCloudService.json | -| [cloudServicesRestartSample.js][cloudservicesrestartsample] | Restarts one or more role instances in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Restart_ByCloudService.json | -| [cloudServicesStartSample.js][cloudservicesstartsample] | Starts the cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Start.json | -| [cloudServicesUpdateDomainGetUpdateDomainSample.js][cloudservicesupdatedomaingetupdatedomainsample] | Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_Get.json | -| [cloudServicesUpdateDomainListUpdateDomainsSample.js][cloudservicesupdatedomainlistupdatedomainssample] | Gets a list of all update domains in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_List.json | -| [cloudServicesUpdateDomainWalkUpdateDomainSample.js][cloudservicesupdatedomainwalkupdatedomainsample] | Updates the role instances in the specified update domain. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_Update.json | -| [cloudServicesUpdateSample.js][cloudservicesupdatesample] | Update a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Update_ToIncludeTags.json | -| [communityGalleriesGetSample.js][communitygalleriesgetsample] | Get a community gallery by gallery public name. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGallery_Get.json | -| [communityGalleryImageVersionsGetSample.js][communitygalleryimageversionsgetsample] | Get a community gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json | -| [communityGalleryImageVersionsListSample.js][communitygalleryimageversionslistsample] | List community gallery image versions inside an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json | -| [communityGalleryImagesGetSample.js][communitygalleryimagesgetsample] | Get a community gallery image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json | -| [communityGalleryImagesListSample.js][communitygalleryimageslistsample] | List community gallery images inside a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json | -| [dedicatedHostGroupsCreateOrUpdateSample.js][dedicatedhostgroupscreateorupdatesample] | Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_CreateOrUpdate_WithUltraSSD.json | -| [dedicatedHostGroupsDeleteSample.js][dedicatedhostgroupsdeletesample] | Delete a dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Delete_MaximumSet_Gen.json | -| [dedicatedHostGroupsGetSample.js][dedicatedhostgroupsgetsample] | Retrieves information about a dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Get.json | -| [dedicatedHostGroupsListByResourceGroupSample.js][dedicatedhostgroupslistbyresourcegroupsample] | Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_ListByResourceGroup_MaximumSet_Gen.json | -| [dedicatedHostGroupsListBySubscriptionSample.js][dedicatedhostgroupslistbysubscriptionsample] | Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_ListBySubscription_MaximumSet_Gen.json | -| [dedicatedHostGroupsUpdateSample.js][dedicatedhostgroupsupdatesample] | Update an dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Update_MaximumSet_Gen.json | -| [dedicatedHostsCreateOrUpdateSample.js][dedicatedhostscreateorupdatesample] | Create or update a dedicated host . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_CreateOrUpdate.json | -| [dedicatedHostsDeleteSample.js][dedicatedhostsdeletesample] | Delete a dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Delete_MaximumSet_Gen.json | -| [dedicatedHostsGetSample.js][dedicatedhostsgetsample] | Retrieves information about a dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Get.json | -| [dedicatedHostsListAvailableSizesSample.js][dedicatedhostslistavailablesizessample] | Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_ListAvailableSizes.json | -| [dedicatedHostsListByHostGroupSample.js][dedicatedhostslistbyhostgroupsample] | Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_ListByHostGroup_MaximumSet_Gen.json | -| [dedicatedHostsRedeploySample.js][dedicatedhostsredeploysample] | Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Redeploy.json | -| [dedicatedHostsRestartSample.js][dedicatedhostsrestartsample] | Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Restart.json | -| [dedicatedHostsUpdateSample.js][dedicatedhostsupdatesample] | Update a dedicated host . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Update_MaximumSet_Gen.json | -| [diskAccessesCreateOrUpdateSample.js][diskaccessescreateorupdatesample] | Creates or updates a disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Create.json | -| [diskAccessesDeleteAPrivateEndpointConnectionSample.js][diskaccessesdeleteaprivateendpointconnectionsample] | Deletes a private endpoint connection under a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Delete.json | -| [diskAccessesDeleteSample.js][diskaccessesdeletesample] | Deletes a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Delete.json | -| [diskAccessesGetAPrivateEndpointConnectionSample.js][diskaccessesgetaprivateendpointconnectionsample] | Gets information about a private endpoint connection under a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Get.json | -| [diskAccessesGetPrivateLinkResourcesSample.js][diskaccessesgetprivatelinkresourcessample] | Gets the private link resources possible under disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateLinkResources_Get.json | -| [diskAccessesGetSample.js][diskaccessesgetsample] | Gets information about a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Get_WithPrivateEndpoints.json | -| [diskAccessesListByResourceGroupSample.js][diskaccesseslistbyresourcegroupsample] | Lists all the disk access resources under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_ListByResourceGroup.json | -| [diskAccessesListPrivateEndpointConnectionsSample.js][diskaccesseslistprivateendpointconnectionssample] | List information about private endpoint connections under a disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_ListByDiskAccess.json | -| [diskAccessesListSample.js][diskaccesseslistsample] | Lists all the disk access resources under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_ListBySubscription.json | -| [diskAccessesUpdateAPrivateEndpointConnectionSample.js][diskaccessesupdateaprivateendpointconnectionsample] | Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Approve.json | -| [diskAccessesUpdateSample.js][diskaccessesupdatesample] | Updates (patches) a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Update.json | -| [diskEncryptionSetsCreateOrUpdateSample.js][diskencryptionsetscreateorupdatesample] | Creates or updates a disk encryption set x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Create_WithKeyVaultFromADifferentSubscription.json | -| [diskEncryptionSetsDeleteSample.js][diskencryptionsetsdeletesample] | Deletes a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Delete.json | -| [diskEncryptionSetsGetSample.js][diskencryptionsetsgetsample] | Gets information about a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Get_WithAutoKeyRotationError.json | -| [diskEncryptionSetsListAssociatedResourcesSample.js][diskencryptionsetslistassociatedresourcessample] | Lists all resources that are encrypted with this disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListAssociatedResources.json | -| [diskEncryptionSetsListByResourceGroupSample.js][diskencryptionsetslistbyresourcegroupsample] | Lists all the disk encryption sets under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListByResourceGroup.json | -| [diskEncryptionSetsListSample.js][diskencryptionsetslistsample] | Lists all the disk encryption sets under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListBySubscription.json | -| [diskEncryptionSetsUpdateSample.js][diskencryptionsetsupdatesample] | Updates (patches) a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Update_WithRotationToLatestKeyVersionEnabled.json | -| [diskRestorePointGetSample.js][diskrestorepointgetsample] | Get disk restorePoint resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_Get.json | -| [diskRestorePointGrantAccessSample.js][diskrestorepointgrantaccesssample] | Grants access to a diskRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_BeginGetAccess.json | -| [diskRestorePointListByRestorePointSample.js][diskrestorepointlistbyrestorepointsample] | Lists diskRestorePoints under a vmRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_ListByVmRestorePoint.json | -| [diskRestorePointRevokeAccessSample.js][diskrestorepointrevokeaccesssample] | Revokes access to a diskRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_EndGetAccess.json | -| [disksCreateOrUpdateSample.js][diskscreateorupdatesample] | Creates or updates a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Create_ConfidentialVMSupportedDiskEncryptedWithCMK.json | -| [disksDeleteSample.js][disksdeletesample] | Deletes a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Delete.json | -| [disksGetSample.js][disksgetsample] | Gets information about a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Get.json | -| [disksGrantAccessSample.js][disksgrantaccesssample] | Grants access to a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_BeginGetAccess.json | -| [disksListByResourceGroupSample.js][diskslistbyresourcegroupsample] | Lists all the disks under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_ListByResourceGroup.json | -| [disksListSample.js][diskslistsample] | Lists all the disks under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_ListBySubscription.json | -| [disksRevokeAccessSample.js][disksrevokeaccesssample] | Revokes access to a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_EndGetAccess.json | -| [disksUpdateSample.js][disksupdatesample] | Updates (patches) a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_CreateOrUpdate_BurstingEnabled.json | -| [galleriesCreateOrUpdateSample.js][galleriescreateorupdatesample] | Create or update a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Create.json | -| [galleriesDeleteSample.js][galleriesdeletesample] | Delete a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Delete.json | -| [galleriesGetSample.js][galleriesgetsample] | Retrieves information about a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Get.json | -| [galleriesListByResourceGroupSample.js][gallerieslistbyresourcegroupsample] | List galleries under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListByResourceGroup.json | -| [galleriesListSample.js][gallerieslistsample] | List galleries under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListBySubscription.json | -| [galleriesUpdateSample.js][galleriesupdatesample] | Update a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Update.json | -| [galleryApplicationVersionsCreateOrUpdateSample.js][galleryapplicationversionscreateorupdatesample] | Create or update a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Create.json | -| [galleryApplicationVersionsDeleteSample.js][galleryapplicationversionsdeletesample] | Delete a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json | -| [galleryApplicationVersionsGetSample.js][galleryapplicationversionsgetsample] | Retrieves information about a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json | -| [galleryApplicationVersionsListByGalleryApplicationSample.js][galleryapplicationversionslistbygalleryapplicationsample] | List gallery Application Versions in a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json | -| [galleryApplicationVersionsUpdateSample.js][galleryapplicationversionsupdatesample] | Update a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Update.json | -| [galleryApplicationsCreateOrUpdateSample.js][galleryapplicationscreateorupdatesample] | Create or update a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Create.json | -| [galleryApplicationsDeleteSample.js][galleryapplicationsdeletesample] | Delete a gallery Application. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Delete.json | -| [galleryApplicationsGetSample.js][galleryapplicationsgetsample] | Retrieves information about a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Get.json | -| [galleryApplicationsListByGallerySample.js][galleryapplicationslistbygallerysample] | List gallery Application Definitions in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_ListByGallery.json | -| [galleryApplicationsUpdateSample.js][galleryapplicationsupdatesample] | Update a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Update.json | -| [galleryImageVersionsCreateOrUpdateSample.js][galleryimageversionscreateorupdatesample] | Create or update a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json | -| [galleryImageVersionsDeleteSample.js][galleryimageversionsdeletesample] | Delete a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Delete.json | -| [galleryImageVersionsGetSample.js][galleryimageversionsgetsample] | Retrieves information about a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json | -| [galleryImageVersionsListByGalleryImageSample.js][galleryimageversionslistbygalleryimagesample] | List gallery image versions in a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json | -| [galleryImageVersionsUpdateSample.js][galleryimageversionsupdatesample] | Update a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update.json | -| [galleryImagesCreateOrUpdateSample.js][galleryimagescreateorupdatesample] | Create or update a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Create.json | -| [galleryImagesDeleteSample.js][galleryimagesdeletesample] | Delete a gallery image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Delete.json | -| [galleryImagesGetSample.js][galleryimagesgetsample] | Retrieves information about a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Get.json | -| [galleryImagesListByGallerySample.js][galleryimageslistbygallerysample] | List gallery image definitions in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_ListByGallery.json | -| [galleryImagesUpdateSample.js][galleryimagesupdatesample] | Update a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Update.json | -| [gallerySharingProfileUpdateSample.js][gallerysharingprofileupdatesample] | Update sharing profile of a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_AddToSharingProfile.json | -| [imagesCreateOrUpdateSample.js][imagescreateorupdatesample] | Create or update an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_CreateFromABlobWithDiskEncryptionSet.json | -| [imagesDeleteSample.js][imagesdeletesample] | Deletes an Image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Images_Delete_MaximumSet_Gen.json | -| [imagesGetSample.js][imagesgetsample] | Gets an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_Get.json | -| [imagesListByResourceGroupSample.js][imageslistbyresourcegroupsample] | Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_ListByResourceGroup.json | -| [imagesListSample.js][imageslistsample] | Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_ListBySubscription.json | -| [imagesUpdateSample.js][imagesupdatesample] | Update an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_Update.json | -| [logAnalyticsExportRequestRateByIntervalSample.js][loganalyticsexportrequestratebyintervalsample] | Export logs that show Api requests made by this subscription in the given time window to show throttling activities. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/logAnalyticExamples/LogAnalytics_RequestRateByInterval.json | -| [logAnalyticsExportThrottledRequestsSample.js][loganalyticsexportthrottledrequestssample] | Export logs that show total throttled Api requests for this subscription in the given time window. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/logAnalyticExamples/LogAnalytics_ThrottledRequests.json | -| [operationsListSample.js][operationslistsample] | Gets a list of compute operations. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json | -| [proximityPlacementGroupsCreateOrUpdateSample.js][proximityplacementgroupscreateorupdatesample] | Create or update a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_CreateOrUpdate.json | -| [proximityPlacementGroupsDeleteSample.js][proximityplacementgroupsdeletesample] | Delete a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Delete.json | -| [proximityPlacementGroupsGetSample.js][proximityplacementgroupsgetsample] | Retrieves information about a proximity placement group . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Get.json | -| [proximityPlacementGroupsListByResourceGroupSample.js][proximityplacementgroupslistbyresourcegroupsample] | Lists all proximity placement groups in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListByResourceGroup.json | -| [proximityPlacementGroupsListBySubscriptionSample.js][proximityplacementgroupslistbysubscriptionsample] | Lists all proximity placement groups in a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListBySubscription.json | -| [proximityPlacementGroupsUpdateSample.js][proximityplacementgroupsupdatesample] | Update a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Patch.json | -| [resourceSkusListSample.js][resourceskuslistsample] | Gets the list of Microsoft.Compute SKUs available for your Subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkus.json | -| [restorePointCollectionsCreateOrUpdateSample.js][restorepointcollectionscreateorupdatesample] | The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_CreateOrUpdate_ForCrossRegionCopy.json | -| [restorePointCollectionsDeleteSample.js][restorepointcollectionsdeletesample] | The operation to delete the restore point collection. This operation will also delete all the contained restore points. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Delete_MaximumSet_Gen.json | -| [restorePointCollectionsGetSample.js][restorepointcollectionsgetsample] | The operation to get the restore point collection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Get.json | -| [restorePointCollectionsListAllSample.js][restorepointcollectionslistallsample] | Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_ListBySubscription.json | -| [restorePointCollectionsListSample.js][restorepointcollectionslistsample] | Gets the list of restore point collections in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_ListByResourceGroup.json | -| [restorePointCollectionsUpdateSample.js][restorepointcollectionsupdatesample] | The operation to update the restore point collection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Update_MaximumSet_Gen.json | -| [restorePointsCreateSample.js][restorepointscreatesample] | The operation to create the restore point. Updating properties of an existing restore point is not allowed x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Copy_BetweenRegions.json | -| [restorePointsDeleteSample.js][restorepointsdeletesample] | The operation to delete the restore point. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Delete_MaximumSet_Gen.json | -| [restorePointsGetSample.js][restorepointsgetsample] | The operation to get the restore point. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Get.json | -| [sharedGalleriesGetSample.js][sharedgalleriesgetsample] | Get a shared gallery by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_Get.json | -| [sharedGalleriesListSample.js][sharedgallerieslistsample] | List shared galleries by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_List.json | -| [sharedGalleryImageVersionsGetSample.js][sharedgalleryimageversionsgetsample] | Get a shared gallery image version by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json | -| [sharedGalleryImageVersionsListSample.js][sharedgalleryimageversionslistsample] | List shared gallery image versions by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json | -| [sharedGalleryImagesGetSample.js][sharedgalleryimagesgetsample] | Get a shared gallery image by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json | -| [sharedGalleryImagesListSample.js][sharedgalleryimageslistsample] | List shared gallery images by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json | -| [snapshotsCreateOrUpdateSample.js][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromADifferentSubscription.json | -| [snapshotsDeleteSample.js][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Delete.json | -| [snapshotsGetSample.js][snapshotsgetsample] | Gets information about a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Get.json | -| [snapshotsGrantAccessSample.js][snapshotsgrantaccesssample] | Grants access to a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_BeginGetAccess.json | -| [snapshotsListByResourceGroupSample.js][snapshotslistbyresourcegroupsample] | Lists snapshots under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_ListByResourceGroup.json | -| [snapshotsListSample.js][snapshotslistsample] | Lists snapshots under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_ListBySubscription.json | -| [snapshotsRevokeAccessSample.js][snapshotsrevokeaccesssample] | Revokes access to a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_EndGetAccess.json | -| [snapshotsUpdateSample.js][snapshotsupdatesample] | Updates (patches) a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Update_WithAcceleratedNetwork.json | -| [sshPublicKeysCreateSample.js][sshpublickeyscreatesample] | Creates a new SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Create.json | -| [sshPublicKeysDeleteSample.js][sshpublickeysdeletesample] | Delete an SSH public key. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Delete_MaximumSet_Gen.json | -| [sshPublicKeysGenerateKeyPairSample.js][sshpublickeysgeneratekeypairsample] | Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_GenerateKeyPair_EncryptionWithEd25519.json | -| [sshPublicKeysGetSample.js][sshpublickeysgetsample] | Retrieves information about an SSH public key. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Get.json | -| [sshPublicKeysListByResourceGroupSample.js][sshpublickeyslistbyresourcegroupsample] | Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_ListByResourceGroup_MaximumSet_Gen.json | -| [sshPublicKeysListBySubscriptionSample.js][sshpublickeyslistbysubscriptionsample] | Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_ListBySubscription_MaximumSet_Gen.json | -| [sshPublicKeysUpdateSample.js][sshpublickeysupdatesample] | Updates a new SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Update_MaximumSet_Gen.json | -| [usageListSample.js][usagelistsample] | Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/Usage_List_MaximumSet_Gen.json | -| [virtualMachineExtensionImagesGetSample.js][virtualmachineextensionimagesgetsample] | Gets a virtual machine extension image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_Get_MaximumSet_Gen.json | -| [virtualMachineExtensionImagesListTypesSample.js][virtualmachineextensionimageslisttypessample] | Gets a list of virtual machine extension image types. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen.json | -| [virtualMachineExtensionImagesListVersionsSample.js][virtualmachineextensionimageslistversionssample] | Gets a list of virtual machine extension image versions. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListVersions_MaximumSet_Gen.json | -| [virtualMachineExtensionsCreateOrUpdateSample.js][virtualmachineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualMachineExtensionsDeleteSample.js][virtualmachineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Delete_MaximumSet_Gen.json | -| [virtualMachineExtensionsGetSample.js][virtualmachineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Get_MaximumSet_Gen.json | -| [virtualMachineExtensionsListSample.js][virtualmachineextensionslistsample] | The operation to get all extensions of a Virtual Machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_List_MaximumSet_Gen.json | -| [virtualMachineExtensionsUpdateSample.js][virtualmachineextensionsupdatesample] | The operation to update the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Update.json | -| [virtualMachineImagesEdgeZoneGetSample.js][virtualmachineimagesedgezonegetsample] | Gets a virtual machine image in an edge zone. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_Get_MaximumSet_Gen.json | -| [virtualMachineImagesEdgeZoneListOffersSample.js][virtualmachineimagesedgezonelistofferssample] | Gets a list of virtual machine image offers for the specified location, edge zone and publisher. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListOffers_MaximumSet_Gen.json | -| [virtualMachineImagesEdgeZoneListPublishersSample.js][virtualmachineimagesedgezonelistpublisherssample] | Gets a list of virtual machine image publishers for the specified Azure location and edge zone. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListPublishers_MaximumSet_Gen.json | -| [virtualMachineImagesEdgeZoneListSample.js][virtualmachineimagesedgezonelistsample] | Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_List_MaximumSet_Gen.json | -| [virtualMachineImagesEdgeZoneListSkusSample.js][virtualmachineimagesedgezonelistskussample] | Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListSkus_MaximumSet_Gen.json | -| [virtualMachineImagesGetSample.js][virtualmachineimagesgetsample] | Gets a virtual machine image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_Get_MaximumSet_Gen.json | -| [virtualMachineImagesListByEdgeZoneSample.js][virtualmachineimageslistbyedgezonesample] | Gets a list of all virtual machine image versions for the specified edge zone x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json | -| [virtualMachineImagesListOffersSample.js][virtualmachineimageslistofferssample] | Gets a list of virtual machine image offers for the specified location and publisher. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListOffers_MaximumSet_Gen.json | -| [virtualMachineImagesListPublishersSample.js][virtualmachineimageslistpublisherssample] | Gets a list of virtual machine image publishers for the specified Azure location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListPublishers_MaximumSet_Gen.json | -| [virtualMachineImagesListSample.js][virtualmachineimageslistsample] | Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_List_MaximumSet_Gen.json | -| [virtualMachineImagesListSkusSample.js][virtualmachineimageslistskussample] | Gets a list of virtual machine image SKUs for the specified location, publisher, and offer. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListSkus_MaximumSet_Gen.json | -| [virtualMachineRunCommandsCreateOrUpdateSample.js][virtualmachineruncommandscreateorupdatesample] | The operation to create or update the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_CreateOrUpdate.json | -| [virtualMachineRunCommandsDeleteSample.js][virtualmachineruncommandsdeletesample] | The operation to delete the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Delete.json | -| [virtualMachineRunCommandsGetByVirtualMachineSample.js][virtualmachineruncommandsgetbyvirtualmachinesample] | The operation to get the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Get.json | -| [virtualMachineRunCommandsGetSample.js][virtualmachineruncommandsgetsample] | Gets specific run command for a subscription in a location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/RunCommand_Get.json | -| [virtualMachineRunCommandsListByVirtualMachineSample.js][virtualmachineruncommandslistbyvirtualmachinesample] | The operation to get all run commands of a Virtual Machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_List.json | -| [virtualMachineRunCommandsListSample.js][virtualmachineruncommandslistsample] | Lists all available run commands for a subscription in a location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/RunCommand_List.json | -| [virtualMachineRunCommandsUpdateSample.js][virtualmachineruncommandsupdatesample] | The operation to update the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Update.json | -| [virtualMachineScaleSetExtensionsCreateOrUpdateSample.js][virtualmachinescalesetextensionscreateorupdatesample] | The operation to create or update an extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualMachineScaleSetExtensionsDeleteSample.js][virtualmachinescalesetextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Delete_MaximumSet_Gen.json | -| [virtualMachineScaleSetExtensionsGetSample.js][virtualmachinescalesetextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MaximumSet_Gen.json | -| [virtualMachineScaleSetExtensionsListSample.js][virtualmachinescalesetextensionslistsample] | Gets a list of all extensions in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_List_MaximumSet_Gen.json | -| [virtualMachineScaleSetExtensionsUpdateSample.js][virtualmachinescalesetextensionsupdatesample] | The operation to update an extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Update_MaximumSet_Gen.json | -| [virtualMachineScaleSetRollingUpgradesCancelSample.js][virtualmachinescalesetrollingupgradescancelsample] | Cancels the current virtual machine scale set rolling upgrade. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_Cancel_MaximumSet_Gen.json | -| [virtualMachineScaleSetRollingUpgradesGetLatestSample.js][virtualmachinescalesetrollingupgradesgetlatestsample] | Gets the status of the latest virtual machine scale set rolling upgrade. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_GetLatest_MaximumSet_Gen.json | -| [virtualMachineScaleSetRollingUpgradesStartExtensionUpgradeSample.js][virtualmachinescalesetrollingupgradesstartextensionupgradesample] | Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_RollingUpgrade.json | -| [virtualMachineScaleSetRollingUpgradesStartOSUpgradeSample.js][virtualmachinescalesetrollingupgradesstartosupgradesample] | Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_StartOSUpgrade_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMExtensionsCreateOrUpdateSample.js][virtualmachinescalesetvmextensionscreateorupdatesample] | The operation to create or update the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Create.json | -| [virtualMachineScaleSetVMExtensionsDeleteSample.js][virtualmachinescalesetvmextensionsdeletesample] | The operation to delete the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Delete.json | -| [virtualMachineScaleSetVMExtensionsGetSample.js][virtualmachinescalesetvmextensionsgetsample] | The operation to get the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Get.json | -| [virtualMachineScaleSetVMExtensionsListSample.js][virtualmachinescalesetvmextensionslistsample] | The operation to get all extensions of an instance in Virtual Machine Scaleset. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_List.json | -| [virtualMachineScaleSetVMExtensionsUpdateSample.js][virtualmachinescalesetvmextensionsupdatesample] | The operation to update the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Update.json | -| [virtualMachineScaleSetVMRunCommandsCreateOrUpdateSample.js][virtualmachinescalesetvmruncommandscreateorupdatesample] | The operation to create or update the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_CreateOrUpdate.json | -| [virtualMachineScaleSetVMRunCommandsDeleteSample.js][virtualmachinescalesetvmruncommandsdeletesample] | The operation to delete the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Delete.json | -| [virtualMachineScaleSetVMRunCommandsGetSample.js][virtualmachinescalesetvmruncommandsgetsample] | The operation to get the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Get.json | -| [virtualMachineScaleSetVMRunCommandsListSample.js][virtualmachinescalesetvmruncommandslistsample] | The operation to get all run commands of an instance in Virtual Machine Scaleset. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_List.json | -| [virtualMachineScaleSetVMRunCommandsUpdateSample.js][virtualmachinescalesetvmruncommandsupdatesample] | The operation to update the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Update.json | -| [virtualMachineScaleSetVMSApproveRollingUpgradeSample.js][virtualmachinescalesetvmsapproverollingupgradesample] | Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_ApproveRollingUpgrade.json | -| [virtualMachineScaleSetVMSAttachDetachDataDisksSample.js][virtualmachinescalesetvmsattachdetachdatadiskssample] | Attach and detach data disks to/from a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_AttachDetachDataDisks_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSDeallocateSample.js][virtualmachinescalesetvmsdeallocatesample] | Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Deallocate_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSDeleteSample.js][virtualmachinescalesetvmsdeletesample] | Deletes a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Delete_Force.json | -| [virtualMachineScaleSetVMSGetInstanceViewSample.js][virtualmachinescalesetvmsgetinstanceviewsample] | Gets the status of a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_InstanceViewAutoPlacedOnDedicatedHostGroup.json | -| [virtualMachineScaleSetVMSGetSample.js][virtualmachinescalesetvmsgetsample] | Gets a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_WithUserData.json | -| [virtualMachineScaleSetVMSListSample.js][virtualmachinescalesetvmslistsample] | Gets a list of all virtual machines in a VM scale sets. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_List_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSPerformMaintenanceSample.js][virtualmachinescalesetvmsperformmaintenancesample] | Performs maintenance on a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PerformMaintenance_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSPowerOffSample.js][virtualmachinescalesetvmspoweroffsample] | Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSRedeploySample.js][virtualmachinescalesetvmsredeploysample] | Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Redeploy_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSReimageAllSample.js][virtualmachinescalesetvmsreimageallsample] | Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_ReimageAll_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSReimageSample.js][virtualmachinescalesetvmsreimagesample] | Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Reimage_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSRestartSample.js][virtualmachinescalesetvmsrestartsample] | Restarts a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Restart_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSRetrieveBootDiagnosticsDataSample.js][virtualmachinescalesetvmsretrievebootdiagnosticsdatasample] | The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_RetrieveBootDiagnosticsData.json | -| [virtualMachineScaleSetVMSRunCommandSample.js][virtualmachinescalesetvmsruncommandsample] | Run command on a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand.json | -| [virtualMachineScaleSetVMSSimulateEvictionSample.js][virtualmachinescalesetvmssimulateevictionsample] | The operation to simulate the eviction of spot virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_SimulateEviction.json | -| [virtualMachineScaleSetVMSStartSample.js][virtualmachinescalesetvmsstartsample] | Starts a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Start_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSUpdateSample.js][virtualmachinescalesetvmsupdatesample] | Updates a virtual machine of a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Update_MaximumSet_Gen.json | -| [virtualMachineScaleSetsApproveRollingUpgradeSample.js][virtualmachinescalesetsapproverollingupgradesample] | Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ApproveRollingUpgrade.json | -| [virtualMachineScaleSetsConvertToSinglePlacementGroupSample.js][virtualmachinescalesetsconverttosingleplacementgroupsample] | Converts SinglePlacementGroup property to false for a existing virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ConvertToSinglePlacementGroup_MaximumSet_Gen.json | -| [virtualMachineScaleSetsCreateOrUpdateSample.js][virtualmachinescalesetscreateorupdatesample] | Create or update a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithExtensionsSuppressFailuresEnabled.json | -| [virtualMachineScaleSetsDeallocateSample.js][virtualmachinescalesetsdeallocatesample] | Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Deallocate_MaximumSet_Gen.json | -| [virtualMachineScaleSetsDeleteInstancesSample.js][virtualmachinescalesetsdeleteinstancessample] | Deletes virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_DeleteInstances_MaximumSet_Gen.json | -| [virtualMachineScaleSetsDeleteSample.js][virtualmachinescalesetsdeletesample] | Deletes a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Delete_Force.json | -| [virtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkSample.js][virtualmachinescalesetsforcerecoveryservicefabricplatformupdatedomainwalksample] | Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_MaximumSet_Gen.json | -| [virtualMachineScaleSetsGetInstanceViewSample.js][virtualmachinescalesetsgetinstanceviewsample] | Gets the status of a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_GetInstanceView_MaximumSet_Gen.json | -| [virtualMachineScaleSetsGetOSUpgradeHistorySample.js][virtualmachinescalesetsgetosupgradehistorysample] | Gets list of OS upgrades on a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_GetOSUpgradeHistory_MaximumSet_Gen.json | -| [virtualMachineScaleSetsGetSample.js][virtualmachinescalesetsgetsample] | Display information about a virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Get_WithDiskControllerType.json | -| [virtualMachineScaleSetsListAllSample.js][virtualmachinescalesetslistallsample] | Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListAll_MaximumSet_Gen.json | -| [virtualMachineScaleSetsListByLocationSample.js][virtualmachinescalesetslistbylocationsample] | Gets all the VM scale sets under the specified subscription for the specified location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListBySubscription_ByLocation.json | -| [virtualMachineScaleSetsListSample.js][virtualmachinescalesetslistsample] | Gets a list of all VM scale sets under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_List_MaximumSet_Gen.json | -| [virtualMachineScaleSetsListSkusSample.js][virtualmachinescalesetslistskussample] | Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListSkus_MaximumSet_Gen.json | -| [virtualMachineScaleSetsPerformMaintenanceSample.js][virtualmachinescalesetsperformmaintenancesample] | Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PerformMaintenance_MaximumSet_Gen.json | -| [virtualMachineScaleSetsPowerOffSample.js][virtualmachinescalesetspoweroffsample] | Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MaximumSet_Gen.json | -| [virtualMachineScaleSetsReapplySample.js][virtualmachinescalesetsreapplysample] | Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Reapply_MaximumSet_Gen.json | -| [virtualMachineScaleSetsRedeploySample.js][virtualmachinescalesetsredeploysample] | Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Redeploy_MaximumSet_Gen.json | -| [virtualMachineScaleSetsReimageAllSample.js][virtualmachinescalesetsreimageallsample] | Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ReimageAll_MaximumSet_Gen.json | -| [virtualMachineScaleSetsReimageSample.js][virtualmachinescalesetsreimagesample] | Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Reimage_MaximumSet_Gen.json | -| [virtualMachineScaleSetsRestartSample.js][virtualmachinescalesetsrestartsample] | Restarts one or more virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Restart_MaximumSet_Gen.json | -| [virtualMachineScaleSetsSetOrchestrationServiceStateSample.js][virtualmachinescalesetssetorchestrationservicestatesample] | Changes ServiceState property for a given service x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_SetOrchestrationServiceState_MaximumSet_Gen.json | -| [virtualMachineScaleSetsStartSample.js][virtualmachinescalesetsstartsample] | Starts one or more virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Start_MaximumSet_Gen.json | -| [virtualMachineScaleSetsUpdateInstancesSample.js][virtualmachinescalesetsupdateinstancessample] | Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_UpdateInstances_MaximumSet_Gen.json | -| [virtualMachineScaleSetsUpdateSample.js][virtualmachinescalesetsupdatesample] | Update a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Update_MaximumSet_Gen.json | -| [virtualMachineSizesListSample.js][virtualmachinesizeslistsample] | This API is deprecated. Use [Resources Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/VirtualMachineSizes_List_MaximumSet_Gen.json | -| [virtualMachinesAssessPatchesSample.js][virtualmachinesassesspatchessample] | Assess patches on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_AssessPatches.json | -| [virtualMachinesAttachDetachDataDisksSample.js][virtualmachinesattachdetachdatadiskssample] | Attach and detach data disks to/from the virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_AttachDetachDataDisks_MaximumSet_Gen.json | -| [virtualMachinesCaptureSample.js][virtualmachinescapturesample] | Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Capture_MaximumSet_Gen.json | -| [virtualMachinesConvertToManagedDisksSample.js][virtualmachinesconverttomanageddiskssample] | Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ConvertToManagedDisks_MaximumSet_Gen.json | -| [virtualMachinesCreateOrUpdateSample.js][virtualmachinescreateorupdatesample] | The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithPatchSettingAssessmentModeOfImageDefault.json | -| [virtualMachinesDeallocateSample.js][virtualmachinesdeallocatesample] | Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Deallocate_MaximumSet_Gen.json | -| [virtualMachinesDeleteSample.js][virtualmachinesdeletesample] | The operation to delete a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Delete_Force.json | -| [virtualMachinesGeneralizeSample.js][virtualmachinesgeneralizesample] | Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Generalize.json | -| [virtualMachinesGetSample.js][virtualmachinesgetsample] | Retrieves information about the model view or the instance view of a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Get.json | -| [virtualMachinesInstallPatchesSample.js][virtualmachinesinstallpatchessample] | Installs patches on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_InstallPatches.json | -| [virtualMachinesInstanceViewSample.js][virtualmachinesinstanceviewsample] | Retrieves information about the run-time state of a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Get_InstanceView.json | -| [virtualMachinesListAllSample.js][virtualmachineslistallsample] | Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListAll_MaximumSet_Gen.json | -| [virtualMachinesListAvailableSizesSample.js][virtualmachineslistavailablesizessample] | Lists all available virtual machine sizes to which the specified virtual machine can be resized. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListAvailableVmSizes.json | -| [virtualMachinesListByLocationSample.js][virtualmachineslistbylocationsample] | Gets all the virtual machines under the specified subscription for the specified location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListBySubscription_ByLocation.json | -| [virtualMachinesListSample.js][virtualmachineslistsample] | Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_List_MaximumSet_Gen.json | -| [virtualMachinesPerformMaintenanceSample.js][virtualmachinesperformmaintenancesample] | The operation to perform maintenance on a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PerformMaintenance_MaximumSet_Gen.json | -| [virtualMachinesPowerOffSample.js][virtualmachinespoweroffsample] | The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MaximumSet_Gen.json | -| [virtualMachinesReapplySample.js][virtualmachinesreapplysample] | The operation to reapply a virtual machine's state. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Reapply.json | -| [virtualMachinesRedeploySample.js][virtualmachinesredeploysample] | Shuts down the virtual machine, moves it to a new node, and powers it back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Redeploy_MaximumSet_Gen.json | -| [virtualMachinesReimageSample.js][virtualmachinesreimagesample] | Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Reimage_NonEphemeralVMs.json | -| [virtualMachinesRestartSample.js][virtualmachinesrestartsample] | The operation to restart a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Restart_MaximumSet_Gen.json | -| [virtualMachinesRetrieveBootDiagnosticsDataSample.js][virtualmachinesretrievebootdiagnosticsdatasample] | The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_RetrieveBootDiagnosticsData.json | -| [virtualMachinesRunCommandSample.js][virtualmachinesruncommandsample] | Run command on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand.json | -| [virtualMachinesSimulateEvictionSample.js][virtualmachinessimulateevictionsample] | The operation to simulate the eviction of spot virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_SimulateEviction.json | -| [virtualMachinesStartSample.js][virtualmachinesstartsample] | The operation to start a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Start_MaximumSet_Gen.json | -| [virtualMachinesUpdateSample.js][virtualmachinesupdatesample] | The operation to update a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Update_DetachDataDiskUsingToBeDetachedProperty.json | +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [availabilitySetsCreateOrUpdateSample.js][availabilitysetscreateorupdatesample] | Create or update an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Create_WithScheduledEventProfile.json | +| [availabilitySetsDeleteSample.js][availabilitysetsdeletesample] | Delete an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Delete_MaximumSet_Gen.json | +| [availabilitySetsGetSample.js][availabilitysetsgetsample] | Retrieves information about an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Get_MaximumSet_Gen.json | +| [availabilitySetsListAvailableSizesSample.js][availabilitysetslistavailablesizessample] | Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_ListAvailableSizes_MaximumSet_Gen.json | +| [availabilitySetsListBySubscriptionSample.js][availabilitysetslistbysubscriptionsample] | Lists all availability sets in a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_ListBySubscription.json | +| [availabilitySetsListSample.js][availabilitysetslistsample] | Lists all availability sets in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_List_MaximumSet_Gen.json | +| [availabilitySetsUpdateSample.js][availabilitysetsupdatesample] | Update an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Update_MaximumSet_Gen.json | +| [capacityReservationGroupsCreateOrUpdateSample.js][capacityreservationgroupscreateorupdatesample] | The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_CreateOrUpdate.json | +| [capacityReservationGroupsDeleteSample.js][capacityreservationgroupsdeletesample] | The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Delete_MaximumSet_Gen.json | +| [capacityReservationGroupsGetSample.js][capacityreservationgroupsgetsample] | The operation that retrieves information about a capacity reservation group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Get.json | +| [capacityReservationGroupsListByResourceGroupSample.js][capacityreservationgroupslistbyresourcegroupsample] | Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_ListByResourceGroup.json | +| [capacityReservationGroupsListBySubscriptionSample.js][capacityreservationgroupslistbysubscriptionsample] | Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_ListBySubscription.json | +| [capacityReservationGroupsUpdateSample.js][capacityreservationgroupsupdatesample] | The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Update_MaximumSet_Gen.json | +| [capacityReservationsCreateOrUpdateSample.js][capacityreservationscreateorupdatesample] | The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_CreateOrUpdate.json | +| [capacityReservationsDeleteSample.js][capacityreservationsdeletesample] | The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Delete_MaximumSet_Gen.json | +| [capacityReservationsGetSample.js][capacityreservationsgetsample] | The operation that retrieves information about the capacity reservation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Get.json | +| [capacityReservationsListByCapacityReservationGroupSample.js][capacityreservationslistbycapacityreservationgroupsample] | Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_ListByReservationGroup.json | +| [capacityReservationsUpdateSample.js][capacityreservationsupdatesample] | The operation to update a capacity reservation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Update_MaximumSet_Gen.json | +| [cloudServiceOperatingSystemsGetOSFamilySample.js][cloudserviceoperatingsystemsgetosfamilysample] | Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSFamily_Get.json | +| [cloudServiceOperatingSystemsGetOSVersionSample.js][cloudserviceoperatingsystemsgetosversionsample] | Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSVersion_Get.json | +| [cloudServiceOperatingSystemsListOSFamiliesSample.js][cloudserviceoperatingsystemslistosfamiliessample] | Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSFamilies_List.json | +| [cloudServiceOperatingSystemsListOSVersionsSample.js][cloudserviceoperatingsystemslistosversionssample] | Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSVersion_List.json | +| [cloudServiceRoleInstancesDeleteSample.js][cloudserviceroleinstancesdeletesample] | Deletes a role instance from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Delete.json | +| [cloudServiceRoleInstancesGetInstanceViewSample.js][cloudserviceroleinstancesgetinstanceviewsample] | Retrieves information about the run-time state of a role instance in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_InstanceView.json | +| [cloudServiceRoleInstancesGetRemoteDesktopFileSample.js][cloudserviceroleinstancesgetremotedesktopfilesample] | Gets a remote desktop file for a role instance in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_RemoteDesktopFile.json | +| [cloudServiceRoleInstancesGetSample.js][cloudserviceroleinstancesgetsample] | Gets a role instance from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get.json | +| [cloudServiceRoleInstancesListSample.js][cloudserviceroleinstanceslistsample] | Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRolesInstance_List.json | +| [cloudServiceRoleInstancesRebuildSample.js][cloudserviceroleinstancesrebuildsample] | The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Rebuild.json | +| [cloudServiceRoleInstancesReimageSample.js][cloudserviceroleinstancesreimagesample] | The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Reimage.json | +| [cloudServiceRoleInstancesRestartSample.js][cloudserviceroleinstancesrestartsample] | The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Restart.json | +| [cloudServiceRolesGetSample.js][cloudservicerolesgetsample] | Gets a role from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRole_Get.json | +| [cloudServiceRolesListSample.js][cloudserviceroleslistsample] | Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRole_List.json | +| [cloudServicesCreateOrUpdateSample.js][cloudservicescreateorupdatesample] | Create or update a cloud service. Please note some properties can be set only during cloud service creation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Create_WithMultiRole.json | +| [cloudServicesDeleteInstancesSample.js][cloudservicesdeleteinstancessample] | Deletes role instances in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Delete_ByCloudService.json | +| [cloudServicesDeleteSample.js][cloudservicesdeletesample] | Deletes a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Delete.json | +| [cloudServicesGetInstanceViewSample.js][cloudservicesgetinstanceviewsample] | Gets the status of a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Get_InstanceViewWithMultiRole.json | +| [cloudServicesGetSample.js][cloudservicesgetsample] | Display information about a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Get_WithMultiRoleAndRDP.json | +| [cloudServicesListAllSample.js][cloudserviceslistallsample] | Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_List_BySubscription.json | +| [cloudServicesListSample.js][cloudserviceslistsample] | Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_List_ByResourceGroup.json | +| [cloudServicesPowerOffSample.js][cloudservicespoweroffsample] | Power off the cloud service. Note that resources are still attached and you are getting charged for the resources. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_PowerOff.json | +| [cloudServicesRebuildSample.js][cloudservicesrebuildsample] | Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Rebuild_ByCloudService.json | +| [cloudServicesReimageSample.js][cloudservicesreimagesample] | Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Reimage_ByCloudService.json | +| [cloudServicesRestartSample.js][cloudservicesrestartsample] | Restarts one or more role instances in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Restart_ByCloudService.json | +| [cloudServicesStartSample.js][cloudservicesstartsample] | Starts the cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Start.json | +| [cloudServicesUpdateDomainGetUpdateDomainSample.js][cloudservicesupdatedomaingetupdatedomainsample] | Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_Get.json | +| [cloudServicesUpdateDomainListUpdateDomainsSample.js][cloudservicesupdatedomainlistupdatedomainssample] | Gets a list of all update domains in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_List.json | +| [cloudServicesUpdateDomainWalkUpdateDomainSample.js][cloudservicesupdatedomainwalkupdatedomainsample] | Updates the role instances in the specified update domain. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_Update.json | +| [cloudServicesUpdateSample.js][cloudservicesupdatesample] | Update a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Update_ToIncludeTags.json | +| [communityGalleriesGetSample.js][communitygalleriesgetsample] | Get a community gallery by gallery public name. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGallery_Get.json | +| [communityGalleryImageVersionsGetSample.js][communitygalleryimageversionsgetsample] | Get a community gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json | +| [communityGalleryImageVersionsListSample.js][communitygalleryimageversionslistsample] | List community gallery image versions inside an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json | +| [communityGalleryImagesGetSample.js][communitygalleryimagesgetsample] | Get a community gallery image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json | +| [communityGalleryImagesListSample.js][communitygalleryimageslistsample] | List community gallery images inside a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json | +| [dedicatedHostGroupsCreateOrUpdateSample.js][dedicatedhostgroupscreateorupdatesample] | Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_CreateOrUpdate_WithUltraSSD.json | +| [dedicatedHostGroupsDeleteSample.js][dedicatedhostgroupsdeletesample] | Delete a dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Delete_MaximumSet_Gen.json | +| [dedicatedHostGroupsGetSample.js][dedicatedhostgroupsgetsample] | Retrieves information about a dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Get.json | +| [dedicatedHostGroupsListByResourceGroupSample.js][dedicatedhostgroupslistbyresourcegroupsample] | Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_ListByResourceGroup_MaximumSet_Gen.json | +| [dedicatedHostGroupsListBySubscriptionSample.js][dedicatedhostgroupslistbysubscriptionsample] | Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_ListBySubscription_MaximumSet_Gen.json | +| [dedicatedHostGroupsUpdateSample.js][dedicatedhostgroupsupdatesample] | Update an dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Update_MaximumSet_Gen.json | +| [dedicatedHostsCreateOrUpdateSample.js][dedicatedhostscreateorupdatesample] | Create or update a dedicated host . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_CreateOrUpdate.json | +| [dedicatedHostsDeleteSample.js][dedicatedhostsdeletesample] | Delete a dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Delete_MaximumSet_Gen.json | +| [dedicatedHostsGetSample.js][dedicatedhostsgetsample] | Retrieves information about a dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Get.json | +| [dedicatedHostsListAvailableSizesSample.js][dedicatedhostslistavailablesizessample] | Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_ListAvailableSizes.json | +| [dedicatedHostsListByHostGroupSample.js][dedicatedhostslistbyhostgroupsample] | Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_ListByHostGroup_MaximumSet_Gen.json | +| [dedicatedHostsRedeploySample.js][dedicatedhostsredeploysample] | Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Redeploy.json | +| [dedicatedHostsRestartSample.js][dedicatedhostsrestartsample] | Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Restart.json | +| [dedicatedHostsUpdateSample.js][dedicatedhostsupdatesample] | Update a dedicated host . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Update_MaximumSet_Gen.json | +| [diskAccessesCreateOrUpdateSample.js][diskaccessescreateorupdatesample] | Creates or updates a disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Create.json | +| [diskAccessesDeleteAPrivateEndpointConnectionSample.js][diskaccessesdeleteaprivateendpointconnectionsample] | Deletes a private endpoint connection under a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Delete.json | +| [diskAccessesDeleteSample.js][diskaccessesdeletesample] | Deletes a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Delete.json | +| [diskAccessesGetAPrivateEndpointConnectionSample.js][diskaccessesgetaprivateendpointconnectionsample] | Gets information about a private endpoint connection under a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Get.json | +| [diskAccessesGetPrivateLinkResourcesSample.js][diskaccessesgetprivatelinkresourcessample] | Gets the private link resources possible under disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateLinkResources_Get.json | +| [diskAccessesGetSample.js][diskaccessesgetsample] | Gets information about a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Get_WithPrivateEndpoints.json | +| [diskAccessesListByResourceGroupSample.js][diskaccesseslistbyresourcegroupsample] | Lists all the disk access resources under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_ListByResourceGroup.json | +| [diskAccessesListPrivateEndpointConnectionsSample.js][diskaccesseslistprivateendpointconnectionssample] | List information about private endpoint connections under a disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_ListByDiskAccess.json | +| [diskAccessesListSample.js][diskaccesseslistsample] | Lists all the disk access resources under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_ListBySubscription.json | +| [diskAccessesUpdateAPrivateEndpointConnectionSample.js][diskaccessesupdateaprivateendpointconnectionsample] | Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Approve.json | +| [diskAccessesUpdateSample.js][diskaccessesupdatesample] | Updates (patches) a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Update.json | +| [diskEncryptionSetsCreateOrUpdateSample.js][diskencryptionsetscreateorupdatesample] | Creates or updates a disk encryption set x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Create_WithKeyVaultFromADifferentSubscription.json | +| [diskEncryptionSetsDeleteSample.js][diskencryptionsetsdeletesample] | Deletes a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Delete.json | +| [diskEncryptionSetsGetSample.js][diskencryptionsetsgetsample] | Gets information about a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Get_WithAutoKeyRotationError.json | +| [diskEncryptionSetsListAssociatedResourcesSample.js][diskencryptionsetslistassociatedresourcessample] | Lists all resources that are encrypted with this disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListAssociatedResources.json | +| [diskEncryptionSetsListByResourceGroupSample.js][diskencryptionsetslistbyresourcegroupsample] | Lists all the disk encryption sets under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListByResourceGroup.json | +| [diskEncryptionSetsListSample.js][diskencryptionsetslistsample] | Lists all the disk encryption sets under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListBySubscription.json | +| [diskEncryptionSetsUpdateSample.js][diskencryptionsetsupdatesample] | Updates (patches) a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Update_WithRotationToLatestKeyVersionEnabled.json | +| [diskRestorePointGetSample.js][diskrestorepointgetsample] | Get disk restorePoint resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_Get.json | +| [diskRestorePointGrantAccessSample.js][diskrestorepointgrantaccesssample] | Grants access to a diskRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_BeginGetAccess.json | +| [diskRestorePointListByRestorePointSample.js][diskrestorepointlistbyrestorepointsample] | Lists diskRestorePoints under a vmRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_ListByVmRestorePoint.json | +| [diskRestorePointRevokeAccessSample.js][diskrestorepointrevokeaccesssample] | Revokes access to a diskRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_EndGetAccess.json | +| [disksCreateOrUpdateSample.js][diskscreateorupdatesample] | Creates or updates a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Create_ConfidentialVMSupportedDiskEncryptedWithCMK.json | +| [disksDeleteSample.js][disksdeletesample] | Deletes a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Delete.json | +| [disksGetSample.js][disksgetsample] | Gets information about a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Get.json | +| [disksGrantAccessSample.js][disksgrantaccesssample] | Grants access to a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_BeginGetAccess.json | +| [disksListByResourceGroupSample.js][diskslistbyresourcegroupsample] | Lists all the disks under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_ListByResourceGroup.json | +| [disksListSample.js][diskslistsample] | Lists all the disks under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_ListBySubscription.json | +| [disksRevokeAccessSample.js][disksrevokeaccesssample] | Revokes access to a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_EndGetAccess.json | +| [disksUpdateSample.js][disksupdatesample] | Updates (patches) a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_CreateOrUpdate_BurstingEnabled.json | +| [galleriesCreateOrUpdateSample.js][galleriescreateorupdatesample] | Create or update a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Create.json | +| [galleriesDeleteSample.js][galleriesdeletesample] | Delete a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Delete.json | +| [galleriesGetSample.js][galleriesgetsample] | Retrieves information about a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Get.json | +| [galleriesListByResourceGroupSample.js][gallerieslistbyresourcegroupsample] | List galleries under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListByResourceGroup.json | +| [galleriesListSample.js][gallerieslistsample] | List galleries under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListBySubscription.json | +| [galleriesUpdateSample.js][galleriesupdatesample] | Update a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Update.json | +| [galleryApplicationVersionsCreateOrUpdateSample.js][galleryapplicationversionscreateorupdatesample] | Create or update a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Create.json | +| [galleryApplicationVersionsDeleteSample.js][galleryapplicationversionsdeletesample] | Delete a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json | +| [galleryApplicationVersionsGetSample.js][galleryapplicationversionsgetsample] | Retrieves information about a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json | +| [galleryApplicationVersionsListByGalleryApplicationSample.js][galleryapplicationversionslistbygalleryapplicationsample] | List gallery Application Versions in a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json | +| [galleryApplicationVersionsUpdateSample.js][galleryapplicationversionsupdatesample] | Update a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Update.json | +| [galleryApplicationsCreateOrUpdateSample.js][galleryapplicationscreateorupdatesample] | Create or update a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Create.json | +| [galleryApplicationsDeleteSample.js][galleryapplicationsdeletesample] | Delete a gallery Application. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Delete.json | +| [galleryApplicationsGetSample.js][galleryapplicationsgetsample] | Retrieves information about a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Get.json | +| [galleryApplicationsListByGallerySample.js][galleryapplicationslistbygallerysample] | List gallery Application Definitions in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_ListByGallery.json | +| [galleryApplicationsUpdateSample.js][galleryapplicationsupdatesample] | Update a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Update.json | +| [galleryImageVersionsCreateOrUpdateSample.js][galleryimageversionscreateorupdatesample] | Create or update a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json | +| [galleryImageVersionsDeleteSample.js][galleryimageversionsdeletesample] | Delete a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Delete.json | +| [galleryImageVersionsGetSample.js][galleryimageversionsgetsample] | Retrieves information about a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json | +| [galleryImageVersionsListByGalleryImageSample.js][galleryimageversionslistbygalleryimagesample] | List gallery image versions in a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json | +| [galleryImageVersionsUpdateSample.js][galleryimageversionsupdatesample] | Update a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update_RestoreSoftDeleted.json | +| [galleryImagesCreateOrUpdateSample.js][galleryimagescreateorupdatesample] | Create or update a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Create.json | +| [galleryImagesDeleteSample.js][galleryimagesdeletesample] | Delete a gallery image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Delete.json | +| [galleryImagesGetSample.js][galleryimagesgetsample] | Retrieves information about a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Get.json | +| [galleryImagesListByGallerySample.js][galleryimageslistbygallerysample] | List gallery image definitions in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_ListByGallery.json | +| [galleryImagesUpdateSample.js][galleryimagesupdatesample] | Update a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_UpdateFeatures.json | +| [galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.js][galleryinvmaccesscontrolprofileversionscreateorupdatesample] | Create or update a gallery inVMAccessControlProfile version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Create.json | +| [galleryInVMAccessControlProfileVersionsDeleteSample.js][galleryinvmaccesscontrolprofileversionsdeletesample] | Delete a gallery inVMAccessControlProfile version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Delete.json | +| [galleryInVMAccessControlProfileVersionsGetSample.js][galleryinvmaccesscontrolprofileversionsgetsample] | Retrieves information about a gallery inVMAccessControlProfile version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json | +| [galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.js][galleryinvmaccesscontrolprofileversionslistbygalleryinvmaccesscontrolprofilesample] | List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_ListByGalleryInVMAccessControlProfile.json | +| [galleryInVMAccessControlProfileVersionsUpdateSample.js][galleryinvmaccesscontrolprofileversionsupdatesample] | Update a gallery inVMAccessControlProfile version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Update.json | +| [galleryInVMAccessControlProfilesCreateOrUpdateSample.js][galleryinvmaccesscontrolprofilescreateorupdatesample] | Create or update a gallery inVMAccessControlProfile. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Create.json | +| [galleryInVMAccessControlProfilesDeleteSample.js][galleryinvmaccesscontrolprofilesdeletesample] | Delete a gallery inVMAccessControlProfile. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Delete.json | +| [galleryInVMAccessControlProfilesGetSample.js][galleryinvmaccesscontrolprofilesgetsample] | Retrieves information about a gallery inVMAccessControlProfile. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json | +| [galleryInVMAccessControlProfilesListByGallerySample.js][galleryinvmaccesscontrolprofileslistbygallerysample] | List gallery inVMAccessControlProfiles in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_ListByGallery.json | +| [galleryInVMAccessControlProfilesUpdateSample.js][galleryinvmaccesscontrolprofilesupdatesample] | Update a gallery inVMAccessControlProfile. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Update.json | +| [gallerySharingProfileUpdateSample.js][gallerysharingprofileupdatesample] | Update sharing profile of a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_AddToSharingProfile.json | +| [imagesCreateOrUpdateSample.js][imagescreateorupdatesample] | Create or update an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_CreateFromABlobWithDiskEncryptionSet.json | +| [imagesDeleteSample.js][imagesdeletesample] | Deletes an Image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Images_Delete_MaximumSet_Gen.json | +| [imagesGetSample.js][imagesgetsample] | Gets an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_Get.json | +| [imagesListByResourceGroupSample.js][imageslistbyresourcegroupsample] | Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_ListByResourceGroup.json | +| [imagesListSample.js][imageslistsample] | Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_ListBySubscription.json | +| [imagesUpdateSample.js][imagesupdatesample] | Update an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_Update.json | +| [logAnalyticsExportRequestRateByIntervalSample.js][loganalyticsexportrequestratebyintervalsample] | Export logs that show Api requests made by this subscription in the given time window to show throttling activities. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/logAnalyticExamples/LogAnalytics_RequestRateByInterval.json | +| [logAnalyticsExportThrottledRequestsSample.js][loganalyticsexportthrottledrequestssample] | Export logs that show total throttled Api requests for this subscription in the given time window. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/logAnalyticExamples/LogAnalytics_ThrottledRequests.json | +| [operationsListSample.js][operationslistsample] | Gets a list of compute operations. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json | +| [proximityPlacementGroupsCreateOrUpdateSample.js][proximityplacementgroupscreateorupdatesample] | Create or update a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_CreateOrUpdate.json | +| [proximityPlacementGroupsDeleteSample.js][proximityplacementgroupsdeletesample] | Delete a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Delete.json | +| [proximityPlacementGroupsGetSample.js][proximityplacementgroupsgetsample] | Retrieves information about a proximity placement group . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Get.json | +| [proximityPlacementGroupsListByResourceGroupSample.js][proximityplacementgroupslistbyresourcegroupsample] | Lists all proximity placement groups in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListByResourceGroup.json | +| [proximityPlacementGroupsListBySubscriptionSample.js][proximityplacementgroupslistbysubscriptionsample] | Lists all proximity placement groups in a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListBySubscription.json | +| [proximityPlacementGroupsUpdateSample.js][proximityplacementgroupsupdatesample] | Update a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Patch.json | +| [resourceSkusListSample.js][resourceskuslistsample] | Gets the list of Microsoft.Compute SKUs available for your Subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkus.json | +| [restorePointCollectionsCreateOrUpdateSample.js][restorepointcollectionscreateorupdatesample] | The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_CreateOrUpdate_ForCrossRegionCopy.json | +| [restorePointCollectionsDeleteSample.js][restorepointcollectionsdeletesample] | The operation to delete the restore point collection. This operation will also delete all the contained restore points. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Delete_MaximumSet_Gen.json | +| [restorePointCollectionsGetSample.js][restorepointcollectionsgetsample] | The operation to get the restore point collection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Get.json | +| [restorePointCollectionsListAllSample.js][restorepointcollectionslistallsample] | Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_ListBySubscription.json | +| [restorePointCollectionsListSample.js][restorepointcollectionslistsample] | Gets the list of restore point collections in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_ListByResourceGroup.json | +| [restorePointCollectionsUpdateSample.js][restorepointcollectionsupdatesample] | The operation to update the restore point collection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Update_MaximumSet_Gen.json | +| [restorePointsCreateSample.js][restorepointscreatesample] | The operation to create the restore point. Updating properties of an existing restore point is not allowed x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Copy_BetweenRegions.json | +| [restorePointsDeleteSample.js][restorepointsdeletesample] | The operation to delete the restore point. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Delete_MaximumSet_Gen.json | +| [restorePointsGetSample.js][restorepointsgetsample] | The operation to get the restore point. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Get.json | +| [sharedGalleriesGetSample.js][sharedgalleriesgetsample] | Get a shared gallery by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_Get.json | +| [sharedGalleriesListSample.js][sharedgallerieslistsample] | List shared galleries by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_List.json | +| [sharedGalleryImageVersionsGetSample.js][sharedgalleryimageversionsgetsample] | Get a shared gallery image version by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json | +| [sharedGalleryImageVersionsListSample.js][sharedgalleryimageversionslistsample] | List shared gallery image versions by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json | +| [sharedGalleryImagesGetSample.js][sharedgalleryimagesgetsample] | Get a shared gallery image by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json | +| [sharedGalleryImagesListSample.js][sharedgalleryimageslistsample] | List shared gallery images by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json | +| [snapshotsCreateOrUpdateSample.js][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromADifferentSubscription.json | +| [snapshotsDeleteSample.js][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Delete.json | +| [snapshotsGetSample.js][snapshotsgetsample] | Gets information about a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Get.json | +| [snapshotsGrantAccessSample.js][snapshotsgrantaccesssample] | Grants access to a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_BeginGetAccess.json | +| [snapshotsListByResourceGroupSample.js][snapshotslistbyresourcegroupsample] | Lists snapshots under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_ListByResourceGroup.json | +| [snapshotsListSample.js][snapshotslistsample] | Lists snapshots under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_ListBySubscription.json | +| [snapshotsRevokeAccessSample.js][snapshotsrevokeaccesssample] | Revokes access to a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_EndGetAccess.json | +| [snapshotsUpdateSample.js][snapshotsupdatesample] | Updates (patches) a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Update_WithAcceleratedNetwork.json | +| [softDeletedResourceListByArtifactNameSample.js][softdeletedresourcelistbyartifactnamesample] | List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GallerySoftDeletedResource_ListByArtifactName.json | +| [sshPublicKeysCreateSample.js][sshpublickeyscreatesample] | Creates a new SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Create.json | +| [sshPublicKeysDeleteSample.js][sshpublickeysdeletesample] | Delete an SSH public key. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Delete_MaximumSet_Gen.json | +| [sshPublicKeysGenerateKeyPairSample.js][sshpublickeysgeneratekeypairsample] | Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_GenerateKeyPair_EncryptionWithEd25519.json | +| [sshPublicKeysGetSample.js][sshpublickeysgetsample] | Retrieves information about an SSH public key. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Get.json | +| [sshPublicKeysListByResourceGroupSample.js][sshpublickeyslistbyresourcegroupsample] | Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_ListByResourceGroup_MaximumSet_Gen.json | +| [sshPublicKeysListBySubscriptionSample.js][sshpublickeyslistbysubscriptionsample] | Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_ListBySubscription_MaximumSet_Gen.json | +| [sshPublicKeysUpdateSample.js][sshpublickeysupdatesample] | Updates a new SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Update_MaximumSet_Gen.json | +| [usageListSample.js][usagelistsample] | Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/Usage_List_MaximumSet_Gen.json | +| [virtualMachineExtensionImagesGetSample.js][virtualmachineextensionimagesgetsample] | Gets a virtual machine extension image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_Get_MaximumSet_Gen.json | +| [virtualMachineExtensionImagesListTypesSample.js][virtualmachineextensionimageslisttypessample] | Gets a list of virtual machine extension image types. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen.json | +| [virtualMachineExtensionImagesListVersionsSample.js][virtualmachineextensionimageslistversionssample] | Gets a list of virtual machine extension image versions. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListVersions_MaximumSet_Gen.json | +| [virtualMachineExtensionsCreateOrUpdateSample.js][virtualmachineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_CreateOrUpdate_MaximumSet_Gen.json | +| [virtualMachineExtensionsDeleteSample.js][virtualmachineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Delete_MaximumSet_Gen.json | +| [virtualMachineExtensionsGetSample.js][virtualmachineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Get_MaximumSet_Gen.json | +| [virtualMachineExtensionsListSample.js][virtualmachineextensionslistsample] | The operation to get all extensions of a Virtual Machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_List_MaximumSet_Gen.json | +| [virtualMachineExtensionsUpdateSample.js][virtualmachineextensionsupdatesample] | The operation to update the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Update.json | +| [virtualMachineImagesEdgeZoneGetSample.js][virtualmachineimagesedgezonegetsample] | Gets a virtual machine image in an edge zone. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_Get_MaximumSet_Gen.json | +| [virtualMachineImagesEdgeZoneListOffersSample.js][virtualmachineimagesedgezonelistofferssample] | Gets a list of virtual machine image offers for the specified location, edge zone and publisher. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListOffers_MaximumSet_Gen.json | +| [virtualMachineImagesEdgeZoneListPublishersSample.js][virtualmachineimagesedgezonelistpublisherssample] | Gets a list of virtual machine image publishers for the specified Azure location and edge zone. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListPublishers_MaximumSet_Gen.json | +| [virtualMachineImagesEdgeZoneListSample.js][virtualmachineimagesedgezonelistsample] | Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_List_MaximumSet_Gen.json | +| [virtualMachineImagesEdgeZoneListSkusSample.js][virtualmachineimagesedgezonelistskussample] | Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListSkus_MaximumSet_Gen.json | +| [virtualMachineImagesGetSample.js][virtualmachineimagesgetsample] | Gets a virtual machine image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_Get_MaximumSet_Gen.json | +| [virtualMachineImagesListByEdgeZoneSample.js][virtualmachineimageslistbyedgezonesample] | Gets a list of all virtual machine image versions for the specified edge zone x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json | +| [virtualMachineImagesListOffersSample.js][virtualmachineimageslistofferssample] | Gets a list of virtual machine image offers for the specified location and publisher. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListOffers_MaximumSet_Gen.json | +| [virtualMachineImagesListPublishersSample.js][virtualmachineimageslistpublisherssample] | Gets a list of virtual machine image publishers for the specified Azure location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListPublishers_MaximumSet_Gen.json | +| [virtualMachineImagesListSample.js][virtualmachineimageslistsample] | Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_List_MaximumSet_Gen.json | +| [virtualMachineImagesListSkusSample.js][virtualmachineimageslistskussample] | Gets a list of virtual machine image SKUs for the specified location, publisher, and offer. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListSkus_MaximumSet_Gen.json | +| [virtualMachineRunCommandsCreateOrUpdateSample.js][virtualmachineruncommandscreateorupdatesample] | The operation to create or update the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_CreateOrUpdate.json | +| [virtualMachineRunCommandsDeleteSample.js][virtualmachineruncommandsdeletesample] | The operation to delete the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Delete.json | +| [virtualMachineRunCommandsGetByVirtualMachineSample.js][virtualmachineruncommandsgetbyvirtualmachinesample] | The operation to get the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Get.json | +| [virtualMachineRunCommandsGetSample.js][virtualmachineruncommandsgetsample] | Gets specific run command for a subscription in a location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/RunCommand_Get.json | +| [virtualMachineRunCommandsListByVirtualMachineSample.js][virtualmachineruncommandslistbyvirtualmachinesample] | The operation to get all run commands of a Virtual Machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_List.json | +| [virtualMachineRunCommandsListSample.js][virtualmachineruncommandslistsample] | Lists all available run commands for a subscription in a location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/RunCommand_List.json | +| [virtualMachineRunCommandsUpdateSample.js][virtualmachineruncommandsupdatesample] | The operation to update the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Update.json | +| [virtualMachineScaleSetExtensionsCreateOrUpdateSample.js][virtualmachinescalesetextensionscreateorupdatesample] | The operation to create or update an extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_CreateOrUpdate_MaximumSet_Gen.json | +| [virtualMachineScaleSetExtensionsDeleteSample.js][virtualmachinescalesetextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Delete_MaximumSet_Gen.json | +| [virtualMachineScaleSetExtensionsGetSample.js][virtualmachinescalesetextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MaximumSet_Gen.json | +| [virtualMachineScaleSetExtensionsListSample.js][virtualmachinescalesetextensionslistsample] | Gets a list of all extensions in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_List_MaximumSet_Gen.json | +| [virtualMachineScaleSetExtensionsUpdateSample.js][virtualmachinescalesetextensionsupdatesample] | The operation to update an extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Update_MaximumSet_Gen.json | +| [virtualMachineScaleSetRollingUpgradesCancelSample.js][virtualmachinescalesetrollingupgradescancelsample] | Cancels the current virtual machine scale set rolling upgrade. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_Cancel_MaximumSet_Gen.json | +| [virtualMachineScaleSetRollingUpgradesGetLatestSample.js][virtualmachinescalesetrollingupgradesgetlatestsample] | Gets the status of the latest virtual machine scale set rolling upgrade. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_GetLatest_MaximumSet_Gen.json | +| [virtualMachineScaleSetRollingUpgradesStartExtensionUpgradeSample.js][virtualmachinescalesetrollingupgradesstartextensionupgradesample] | Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_RollingUpgrade.json | +| [virtualMachineScaleSetRollingUpgradesStartOSUpgradeSample.js][virtualmachinescalesetrollingupgradesstartosupgradesample] | Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_StartOSUpgrade_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMExtensionsCreateOrUpdateSample.js][virtualmachinescalesetvmextensionscreateorupdatesample] | The operation to create or update the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Create.json | +| [virtualMachineScaleSetVMExtensionsDeleteSample.js][virtualmachinescalesetvmextensionsdeletesample] | The operation to delete the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Delete.json | +| [virtualMachineScaleSetVMExtensionsGetSample.js][virtualmachinescalesetvmextensionsgetsample] | The operation to get the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Get.json | +| [virtualMachineScaleSetVMExtensionsListSample.js][virtualmachinescalesetvmextensionslistsample] | The operation to get all extensions of an instance in Virtual Machine Scaleset. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_List.json | +| [virtualMachineScaleSetVMExtensionsUpdateSample.js][virtualmachinescalesetvmextensionsupdatesample] | The operation to update the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Update.json | +| [virtualMachineScaleSetVMRunCommandsCreateOrUpdateSample.js][virtualmachinescalesetvmruncommandscreateorupdatesample] | The operation to create or update the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_CreateOrUpdate.json | +| [virtualMachineScaleSetVMRunCommandsDeleteSample.js][virtualmachinescalesetvmruncommandsdeletesample] | The operation to delete the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Delete.json | +| [virtualMachineScaleSetVMRunCommandsGetSample.js][virtualmachinescalesetvmruncommandsgetsample] | The operation to get the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Get.json | +| [virtualMachineScaleSetVMRunCommandsListSample.js][virtualmachinescalesetvmruncommandslistsample] | The operation to get all run commands of an instance in Virtual Machine Scaleset. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_List.json | +| [virtualMachineScaleSetVMRunCommandsUpdateSample.js][virtualmachinescalesetvmruncommandsupdatesample] | The operation to update the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Update.json | +| [virtualMachineScaleSetVMSApproveRollingUpgradeSample.js][virtualmachinescalesetvmsapproverollingupgradesample] | Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_ApproveRollingUpgrade.json | +| [virtualMachineScaleSetVMSAttachDetachDataDisksSample.js][virtualmachinescalesetvmsattachdetachdatadiskssample] | Attach and detach data disks to/from a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_AttachDetachDataDisks_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSDeallocateSample.js][virtualmachinescalesetvmsdeallocatesample] | Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Deallocate_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSDeleteSample.js][virtualmachinescalesetvmsdeletesample] | Deletes a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Delete_Force.json | +| [virtualMachineScaleSetVMSGetInstanceViewSample.js][virtualmachinescalesetvmsgetinstanceviewsample] | Gets the status of a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_InstanceViewAutoPlacedOnDedicatedHostGroup.json | +| [virtualMachineScaleSetVMSGetSample.js][virtualmachinescalesetvmsgetsample] | Gets a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_WithUserData.json | +| [virtualMachineScaleSetVMSListSample.js][virtualmachinescalesetvmslistsample] | Gets a list of all virtual machines in a VM scale sets. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_List_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSPerformMaintenanceSample.js][virtualmachinescalesetvmsperformmaintenancesample] | Performs maintenance on a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PerformMaintenance_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSPowerOffSample.js][virtualmachinescalesetvmspoweroffsample] | Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSRedeploySample.js][virtualmachinescalesetvmsredeploysample] | Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Redeploy_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSReimageAllSample.js][virtualmachinescalesetvmsreimageallsample] | Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_ReimageAll_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSReimageSample.js][virtualmachinescalesetvmsreimagesample] | Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Reimage_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSRestartSample.js][virtualmachinescalesetvmsrestartsample] | Restarts a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Restart_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSRetrieveBootDiagnosticsDataSample.js][virtualmachinescalesetvmsretrievebootdiagnosticsdatasample] | The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_RetrieveBootDiagnosticsData.json | +| [virtualMachineScaleSetVMSRunCommandSample.js][virtualmachinescalesetvmsruncommandsample] | Run command on a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand.json | +| [virtualMachineScaleSetVMSSimulateEvictionSample.js][virtualmachinescalesetvmssimulateevictionsample] | The operation to simulate the eviction of spot virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_SimulateEviction.json | +| [virtualMachineScaleSetVMSStartSample.js][virtualmachinescalesetvmsstartsample] | Starts a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Start_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSUpdateSample.js][virtualmachinescalesetvmsupdatesample] | Updates a virtual machine of a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Update_MaximumSet_Gen.json | +| [virtualMachineScaleSetsApproveRollingUpgradeSample.js][virtualmachinescalesetsapproverollingupgradesample] | Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ApproveRollingUpgrade.json | +| [virtualMachineScaleSetsConvertToSinglePlacementGroupSample.js][virtualmachinescalesetsconverttosingleplacementgroupsample] | Converts SinglePlacementGroup property to false for a existing virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ConvertToSinglePlacementGroup_MaximumSet_Gen.json | +| [virtualMachineScaleSetsCreateOrUpdateSample.js][virtualmachinescalesetscreateorupdatesample] | Create or update a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithExtensionsSuppressFailuresEnabled.json | +| [virtualMachineScaleSetsDeallocateSample.js][virtualmachinescalesetsdeallocatesample] | Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Deallocate_MaximumSet_Gen.json | +| [virtualMachineScaleSetsDeleteInstancesSample.js][virtualmachinescalesetsdeleteinstancessample] | Deletes virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_DeleteInstances_MaximumSet_Gen.json | +| [virtualMachineScaleSetsDeleteSample.js][virtualmachinescalesetsdeletesample] | Deletes a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Delete_Force.json | +| [virtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkSample.js][virtualmachinescalesetsforcerecoveryservicefabricplatformupdatedomainwalksample] | Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_MaximumSet_Gen.json | +| [virtualMachineScaleSetsGetInstanceViewSample.js][virtualmachinescalesetsgetinstanceviewsample] | Gets the status of a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_GetInstanceView_MaximumSet_Gen.json | +| [virtualMachineScaleSetsGetOSUpgradeHistorySample.js][virtualmachinescalesetsgetosupgradehistorysample] | Gets list of OS upgrades on a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_GetOSUpgradeHistory_MaximumSet_Gen.json | +| [virtualMachineScaleSetsGetSample.js][virtualmachinescalesetsgetsample] | Display information about a virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Get_WithDiskControllerType.json | +| [virtualMachineScaleSetsListAllSample.js][virtualmachinescalesetslistallsample] | Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListAll_MaximumSet_Gen.json | +| [virtualMachineScaleSetsListByLocationSample.js][virtualmachinescalesetslistbylocationsample] | Gets all the VM scale sets under the specified subscription for the specified location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListBySubscription_ByLocation.json | +| [virtualMachineScaleSetsListSample.js][virtualmachinescalesetslistsample] | Gets a list of all VM scale sets under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_List_MaximumSet_Gen.json | +| [virtualMachineScaleSetsListSkusSample.js][virtualmachinescalesetslistskussample] | Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListSkus_MaximumSet_Gen.json | +| [virtualMachineScaleSetsPerformMaintenanceSample.js][virtualmachinescalesetsperformmaintenancesample] | Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PerformMaintenance_MaximumSet_Gen.json | +| [virtualMachineScaleSetsPowerOffSample.js][virtualmachinescalesetspoweroffsample] | Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MaximumSet_Gen.json | +| [virtualMachineScaleSetsReapplySample.js][virtualmachinescalesetsreapplysample] | Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Reapply_MaximumSet_Gen.json | +| [virtualMachineScaleSetsRedeploySample.js][virtualmachinescalesetsredeploysample] | Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Redeploy_MaximumSet_Gen.json | +| [virtualMachineScaleSetsReimageAllSample.js][virtualmachinescalesetsreimageallsample] | Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ReimageAll_MaximumSet_Gen.json | +| [virtualMachineScaleSetsReimageSample.js][virtualmachinescalesetsreimagesample] | Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Reimage_MaximumSet_Gen.json | +| [virtualMachineScaleSetsRestartSample.js][virtualmachinescalesetsrestartsample] | Restarts one or more virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Restart_MaximumSet_Gen.json | +| [virtualMachineScaleSetsSetOrchestrationServiceStateSample.js][virtualmachinescalesetssetorchestrationservicestatesample] | Changes ServiceState property for a given service x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_SetOrchestrationServiceState_MaximumSet_Gen.json | +| [virtualMachineScaleSetsStartSample.js][virtualmachinescalesetsstartsample] | Starts one or more virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Start_MaximumSet_Gen.json | +| [virtualMachineScaleSetsUpdateInstancesSample.js][virtualmachinescalesetsupdateinstancessample] | Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_UpdateInstances_MaximumSet_Gen.json | +| [virtualMachineScaleSetsUpdateSample.js][virtualmachinescalesetsupdatesample] | Update a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Update_MaximumSet_Gen.json | +| [virtualMachineSizesListSample.js][virtualmachinesizeslistsample] | This API is deprecated. Use [Resources Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/VirtualMachineSizes_List_MaximumSet_Gen.json | +| [virtualMachinesAssessPatchesSample.js][virtualmachinesassesspatchessample] | Assess patches on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_AssessPatches.json | +| [virtualMachinesAttachDetachDataDisksSample.js][virtualmachinesattachdetachdatadiskssample] | Attach and detach data disks to/from the virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_AttachDetachDataDisks_MaximumSet_Gen.json | +| [virtualMachinesCaptureSample.js][virtualmachinescapturesample] | Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Capture_MaximumSet_Gen.json | +| [virtualMachinesConvertToManagedDisksSample.js][virtualmachinesconverttomanageddiskssample] | Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ConvertToManagedDisks_MaximumSet_Gen.json | +| [virtualMachinesCreateOrUpdateSample.js][virtualmachinescreateorupdatesample] | The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithPatchSettingAssessmentModeOfImageDefault.json | +| [virtualMachinesDeallocateSample.js][virtualmachinesdeallocatesample] | Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Deallocate_MaximumSet_Gen.json | +| [virtualMachinesDeleteSample.js][virtualmachinesdeletesample] | The operation to delete a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Delete_Force.json | +| [virtualMachinesGeneralizeSample.js][virtualmachinesgeneralizesample] | Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Generalize.json | +| [virtualMachinesGetSample.js][virtualmachinesgetsample] | Retrieves information about the model view or the instance view of a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Get.json | +| [virtualMachinesInstallPatchesSample.js][virtualmachinesinstallpatchessample] | Installs patches on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_InstallPatches.json | +| [virtualMachinesInstanceViewSample.js][virtualmachinesinstanceviewsample] | Retrieves information about the run-time state of a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Get_InstanceView.json | +| [virtualMachinesListAllSample.js][virtualmachineslistallsample] | Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListAll_MaximumSet_Gen.json | +| [virtualMachinesListAvailableSizesSample.js][virtualmachineslistavailablesizessample] | Lists all available virtual machine sizes to which the specified virtual machine can be resized. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListAvailableVmSizes.json | +| [virtualMachinesListByLocationSample.js][virtualmachineslistbylocationsample] | Gets all the virtual machines under the specified subscription for the specified location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListBySubscription_ByLocation.json | +| [virtualMachinesListSample.js][virtualmachineslistsample] | Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_List_MaximumSet_Gen.json | +| [virtualMachinesPerformMaintenanceSample.js][virtualmachinesperformmaintenancesample] | The operation to perform maintenance on a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PerformMaintenance_MaximumSet_Gen.json | +| [virtualMachinesPowerOffSample.js][virtualmachinespoweroffsample] | The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MaximumSet_Gen.json | +| [virtualMachinesReapplySample.js][virtualmachinesreapplysample] | The operation to reapply a virtual machine's state. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Reapply.json | +| [virtualMachinesRedeploySample.js][virtualmachinesredeploysample] | Shuts down the virtual machine, moves it to a new node, and powers it back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Redeploy_MaximumSet_Gen.json | +| [virtualMachinesReimageSample.js][virtualmachinesreimagesample] | Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Reimage_NonEphemeralVMs.json | +| [virtualMachinesRestartSample.js][virtualmachinesrestartsample] | The operation to restart a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Restart_MaximumSet_Gen.json | +| [virtualMachinesRetrieveBootDiagnosticsDataSample.js][virtualmachinesretrievebootdiagnosticsdatasample] | The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_RetrieveBootDiagnosticsData.json | +| [virtualMachinesRunCommandSample.js][virtualmachinesruncommandsample] | Run command on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand.json | +| [virtualMachinesSimulateEvictionSample.js][virtualmachinessimulateevictionsample] | The operation to simulate the eviction of spot virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_SimulateEviction.json | +| [virtualMachinesStartSample.js][virtualmachinesstartsample] | The operation to start a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Start_MaximumSet_Gen.json | +| [virtualMachinesUpdateSample.js][virtualmachinesupdatesample] | The operation to update a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Update_DetachDataDiskUsingToBeDetachedProperty.json | ## Prerequisites @@ -452,6 +463,16 @@ Take a look at our [API Documentation][apiref] for more information about the AP [galleryimagesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesGetSample.js [galleryimageslistbygallerysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesListByGallerySample.js [galleryimagesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesUpdateSample.js +[galleryinvmaccesscontrolprofileversionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.js +[galleryinvmaccesscontrolprofileversionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsDeleteSample.js +[galleryinvmaccesscontrolprofileversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsGetSample.js +[galleryinvmaccesscontrolprofileversionslistbygalleryinvmaccesscontrolprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.js +[galleryinvmaccesscontrolprofileversionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsUpdateSample.js +[galleryinvmaccesscontrolprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesCreateOrUpdateSample.js +[galleryinvmaccesscontrolprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesDeleteSample.js +[galleryinvmaccesscontrolprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesGetSample.js +[galleryinvmaccesscontrolprofileslistbygallerysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesListByGallerySample.js +[galleryinvmaccesscontrolprofilesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesUpdateSample.js [gallerysharingprofileupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/gallerySharingProfileUpdateSample.js [imagescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/imagesCreateOrUpdateSample.js [imagesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/imagesDeleteSample.js @@ -492,6 +513,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [snapshotslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/snapshotsListSample.js [snapshotsrevokeaccesssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/snapshotsRevokeAccessSample.js [snapshotsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/snapshotsUpdateSample.js +[softdeletedresourcelistbyartifactnamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/softDeletedResourceListByArtifactNameSample.js [sshpublickeyscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/sshPublicKeysCreateSample.js [sshpublickeysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/sshPublicKeysDeleteSample.js [sshpublickeysgeneratekeypairsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/javascript/sshPublicKeysGenerateKeyPairSample.js diff --git a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleriesGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleriesGetSample.js index 576e174e415a..3aafb35b21a0 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleriesGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleriesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a community gallery by gallery public name. * * @summary Get a community gallery by gallery public name. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGallery_Get.json */ async function getACommunityGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImageVersionsGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImageVersionsGetSample.js index 049f4b55999e..0933f2ca008e 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImageVersionsGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImageVersionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a community gallery image version. * * @summary Get a community gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json */ async function getACommunityGalleryImageVersion() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImageVersionsListSample.js b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImageVersionsListSample.js index 88e61fcb48fb..b894a10aa606 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImageVersionsListSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImageVersionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List community gallery image versions inside an image. * * @summary List community gallery image versions inside an image. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json */ async function listCommunityGalleryImageVersions() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImagesGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImagesGetSample.js index 1474b3c62bc0..e194b57a45f7 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImagesGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImagesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a community gallery image. * * @summary Get a community gallery image. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json */ async function getACommunityGalleryImage() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImagesListSample.js b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImagesListSample.js index ec9ade404036..6b8dd0de7e49 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImagesListSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/communityGalleryImagesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List community gallery images inside a gallery. * * @summary List community gallery images inside a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json */ async function listCommunityGalleryImages() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleriesCreateOrUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleriesCreateOrUpdateSample.js index 5776a6b76712..deec329b2fe6 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleriesCreateOrUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleriesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Create.json */ async function createACommunityGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -49,7 +49,7 @@ async function createACommunityGallery() { * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create_WithSharingProfile.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithSharingProfile.json */ async function createOrUpdateASimpleGalleryWithSharingProfile() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -74,7 +74,7 @@ async function createOrUpdateASimpleGalleryWithSharingProfile() { * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create_SoftDeletionEnabled.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_SoftDeletionEnabled.json */ async function createOrUpdateASimpleGalleryWithSoftDeletionEnabled() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -99,7 +99,38 @@ async function createOrUpdateASimpleGalleryWithSoftDeletionEnabled() { * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithManagedIdentity.json + */ +async function createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const gallery = { + description: "This is the gallery description.", + identity: { + type: "SystemAssigned, UserAssigned", + userAssignedIdentities: { + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/myIdentity": + {}, + }, + }, + location: "West US", + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleries.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + gallery, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or update a Shared Image Gallery. + * + * @summary Create or update a Shared Image Gallery. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create.json */ async function createOrUpdateASimpleGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -123,6 +154,7 @@ async function main() { createACommunityGallery(); createOrUpdateASimpleGalleryWithSharingProfile(); createOrUpdateASimpleGalleryWithSoftDeletionEnabled(); + createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities(); createOrUpdateASimpleGallery(); } diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleriesDeleteSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleriesDeleteSample.js index b6d288221aca..a535fe8f65c3 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleriesDeleteSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleriesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a Shared Image Gallery. * * @summary Delete a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Delete.json */ async function deleteAGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleriesGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleriesGetSample.js index da9baaadf122..5cf911199bc9 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleriesGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleriesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Get.json */ async function getACommunityGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -32,7 +32,7 @@ async function getACommunityGallery() { * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json */ async function getAGalleryWithExpandSharingProfileGroups() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -50,7 +50,7 @@ async function getAGalleryWithExpandSharingProfileGroups() { * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json */ async function getAGalleryWithSelectPermissions() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -68,7 +68,23 @@ async function getAGalleryWithSelectPermissions() { * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithManagedIdentity.json + */ +async function getAGalleryWithSystemAssignedAndUserAssignedManagedIdentities() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleries.get(resourceGroupName, galleryName); + console.log(result); +} + +/** + * This sample demonstrates how to Retrieves information about a Shared Image Gallery. + * + * @summary Retrieves information about a Shared Image Gallery. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get.json */ async function getAGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -84,6 +100,7 @@ async function main() { getACommunityGallery(); getAGalleryWithExpandSharingProfileGroups(); getAGalleryWithSelectPermissions(); + getAGalleryWithSystemAssignedAndUserAssignedManagedIdentities(); getAGallery(); } diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleriesListByResourceGroupSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleriesListByResourceGroupSample.js index 092d006d047b..ae293af088f6 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleriesListByResourceGroupSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleriesListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List galleries under a resource group. * * @summary List galleries under a resource group. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListByResourceGroup.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListByResourceGroup.json */ async function listGalleriesInAResourceGroup() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleriesListSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleriesListSample.js index 95f2f5f50643..936b0164663b 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleriesListSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleriesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List galleries under a subscription. * * @summary List galleries under a subscription. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListBySubscription.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListBySubscription.json */ async function listGalleriesInASubscription() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleriesUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleriesUpdateSample.js index 79d776874161..68bad630594a 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleriesUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleriesUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update a Shared Image Gallery. * * @summary Update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Update.json */ async function updateASimpleGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsCreateOrUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsCreateOrUpdateSample.js index ee8661f0a50d..c2b777cc81de 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsCreateOrUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a gallery Application Version. * * @summary Create or update a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Create.json */ async function createOrUpdateASimpleGalleryApplicationVersion() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsDeleteSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsDeleteSample.js index 45e1d3cf8802..7c4cd74d8e1c 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsDeleteSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a gallery Application Version. * * @summary Delete a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json */ async function deleteAGalleryApplicationVersion() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsGetSample.js index 930a7224f651..78937314f28c 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves information about a gallery Application Version. * * @summary Retrieves information about a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json */ async function getAGalleryApplicationVersionWithReplicationStatus() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -42,7 +42,7 @@ async function getAGalleryApplicationVersionWithReplicationStatus() { * This sample demonstrates how to Retrieves information about a gallery Application Version. * * @summary Retrieves information about a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get.json */ async function getAGalleryApplicationVersion() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsListByGalleryApplicationSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsListByGalleryApplicationSample.js index 84ce819ed0c8..7d9a84fb8217 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsListByGalleryApplicationSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsListByGalleryApplicationSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List gallery Application Versions in a gallery Application Definition. * * @summary List gallery Application Versions in a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json */ async function listGalleryApplicationVersionsInAGalleryApplicationDefinition() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsUpdateSample.js index 2875bdfa30b4..b7b35d9072f5 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationVersionsUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update a gallery Application Version. * * @summary Update a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Update.json */ async function updateASimpleGalleryApplicationVersion() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsCreateOrUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsCreateOrUpdateSample.js index 132b3db0ed0c..9a642e00520b 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsCreateOrUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a gallery Application Definition. * * @summary Create or update a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Create.json */ async function createOrUpdateASimpleGalleryApplication() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsDeleteSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsDeleteSample.js index 85a99ae3cfb6..e0ebb341418b 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsDeleteSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a gallery Application. * * @summary Delete a gallery Application. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Delete.json */ async function deleteAGalleryApplication() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsGetSample.js index 321252a17c5d..f764e212ff85 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves information about a gallery Application Definition. * * @summary Retrieves information about a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Get.json */ async function getAGalleryApplication() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsListByGallerySample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsListByGallerySample.js index 0552712677b7..f19cbcc9fa03 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsListByGallerySample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsListByGallerySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List gallery Application Definitions in a gallery. * * @summary List gallery Application Definitions in a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_ListByGallery.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_ListByGallery.json */ async function listGalleryApplicationsInAGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsUpdateSample.js index a37d89455723..a5677100309c 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryApplicationsUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update a gallery Application Definition. * * @summary Update a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Update.json */ async function updateASimpleGalleryApplication() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsCreateOrUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsCreateOrUpdateSample.js index 3bd8b3a77d51..89b206c7a4a6 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsCreateOrUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -77,7 +77,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { virtualMachineId: @@ -101,7 +104,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithCommunityImageVersionAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithCommunityImageVersionAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -162,7 +165,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImag }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { communityGalleryImageId: @@ -186,7 +192,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImag * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create.json */ async function createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -247,7 +253,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}", @@ -270,7 +279,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -321,7 +330,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapsho }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { dataDiskImages: [ { @@ -356,7 +368,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapsho * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithShallowReplicationMode.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithShallowReplicationMode.json */ async function createOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -370,7 +382,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMo replicationMode: "Shallow", targetRegions: [{ name: "West US", excludeFromLatest: false, regionalReplicaCount: 1 }], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}", @@ -393,7 +408,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMo * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithImageVersionAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithImageVersionAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -454,7 +469,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource( }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}", @@ -477,7 +495,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource( * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -528,7 +546,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { dataDiskImages: [ { @@ -563,7 +584,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD_UefiSettings.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD_UefiSettings.json */ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCustomUefiKeys() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -601,7 +622,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCust }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, securityProfile: { uefiSettings: { additionalSignatures: { @@ -650,7 +674,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCust * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD.json */ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -688,7 +712,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { dataDiskImages: [ { @@ -727,9 +754,9 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithTargetExtendedLocations.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithAdditionalReplicaSets.json */ -async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified() { +async function createOrUpdateASimpleGalleryImageVersionWithDirectDriveReplicas() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; const galleryName = "myGalleryName"; @@ -741,6 +768,7 @@ async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocatio targetRegions: [ { name: "West US", + additionalReplicaSets: [{ regionalReplicaCount: 1, storageAccountType: "PreviumV2_LRS" }], encryption: { dataDiskImages: [ { @@ -807,6 +835,93 @@ async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocatio console.log(result); } +/** + * This sample demonstrates how to Create or update a gallery image version. + * + * @summary Create or update a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithTargetExtendedLocations.json + */ +async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const galleryImageVersion = { + location: "West US", + publishingProfile: { + targetRegions: [ + { + name: "West US", + encryption: { + dataDiskImages: [ + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + lun: 0, + }, + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + lun: 1, + }, + ], + osDiskImage: { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + }, + }, + excludeFromLatest: false, + regionalReplicaCount: 1, + }, + { + name: "East US", + encryption: { + dataDiskImages: [ + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + lun: 0, + }, + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + lun: 1, + }, + ], + osDiskImage: { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + }, + }, + excludeFromLatest: false, + regionalReplicaCount: 2, + storageAccountType: "Standard_ZRS", + }, + ], + }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, + storageProfile: { + source: { + id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + galleryImageVersion, + ); + console.log(result); +} + async function main() { createOrUpdateASimpleGalleryImageVersionUsingVMAsSource(); createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource(); @@ -817,6 +932,7 @@ async function main() { createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource(); createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCustomUefiKeys(); createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource(); + createOrUpdateASimpleGalleryImageVersionWithDirectDriveReplicas(); createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified(); } diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsDeleteSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsDeleteSample.js index 14d14ddc7a55..b3f22a46f18a 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsDeleteSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a gallery image version. * * @summary Delete a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Delete.json */ async function deleteAGalleryImageVersion() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsGetSample.js index b72b3b9b13c4..a7c1976b1b00 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json */ async function getAGalleryImageVersionWithReplicationStatus() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -42,7 +42,7 @@ async function getAGalleryImageVersionWithReplicationStatus() { * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json */ async function getAGalleryImageVersionWithSnapshotsAsASource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -65,7 +65,59 @@ async function getAGalleryImageVersionWithSnapshotsAsASource() { * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithValidationProfileAndReplicationStatus.json + */ +async function getAGalleryImageVersionWithValidationProfileAndReplicationStatus() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const expand = "ValidationProfile,ReplicationStatus"; + const options = { expand }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.get( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + options, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Retrieves information about a gallery image version. + * + * @summary Retrieves information about a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithValidationProfile.json + */ +async function getAGalleryImageVersionWithValidationProfile() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const expand = "ValidationProfile"; + const options = { expand }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.get( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + options, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Retrieves information about a gallery image version. + * + * @summary Retrieves information about a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json */ async function getAGalleryImageVersionWithVhdAsASource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -88,7 +140,7 @@ async function getAGalleryImageVersionWithVhdAsASource() { * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get.json */ async function getAGalleryImageVersion() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -110,6 +162,8 @@ async function getAGalleryImageVersion() { async function main() { getAGalleryImageVersionWithReplicationStatus(); getAGalleryImageVersionWithSnapshotsAsASource(); + getAGalleryImageVersionWithValidationProfileAndReplicationStatus(); + getAGalleryImageVersionWithValidationProfile(); getAGalleryImageVersionWithVhdAsASource(); getAGalleryImageVersion(); } diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsListByGalleryImageSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsListByGalleryImageSample.js index 03240bb7c85b..ecbe93ac0e48 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsListByGalleryImageSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsListByGalleryImageSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List gallery image versions in a gallery image definition. * * @summary List gallery image versions in a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json */ async function listGalleryImageVersionsInAGalleryImageDefinition() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsUpdateSample.js index 375c73f014e2..bf2117925116 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImageVersionsUpdateSample.js @@ -16,7 +16,35 @@ require("dotenv").config(); * This sample demonstrates how to Update a gallery image version. * * @summary Update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update_RestoreSoftDeleted.json + */ +async function restoreASoftDeletedGalleryImageVersion() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const galleryImageVersion = { + restore: true, + storageProfile: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.beginUpdateAndWait( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + galleryImageVersion, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Update a gallery image version. + * + * @summary Update a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update.json */ async function updateASimpleGalleryImageVersionManagedImageAsSource() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -57,7 +85,7 @@ async function updateASimpleGalleryImageVersionManagedImageAsSource() { * This sample demonstrates how to Update a gallery image version. * * @summary Update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update_WithoutSourceId.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update_WithoutSourceId.json */ async function updateASimpleGalleryImageVersionWithoutSourceId() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -91,6 +119,7 @@ async function updateASimpleGalleryImageVersionWithoutSourceId() { } async function main() { + restoreASoftDeletedGalleryImageVersion(); updateASimpleGalleryImageVersionManagedImageAsSource(); updateASimpleGalleryImageVersionWithoutSourceId(); } diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesCreateOrUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesCreateOrUpdateSample.js index 0e4d0968697b..93796dc65486 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesCreateOrUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a gallery image definition. * * @summary Create or update a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Create.json */ async function createOrUpdateASimpleGalleryImage() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesDeleteSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesDeleteSample.js index 69dd7371143b..f5d040d0e57a 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesDeleteSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a gallery image. * * @summary Delete a gallery image. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Delete.json */ async function deleteAGalleryImage() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesGetSample.js index 15c3e8c76f0c..bdaf62b58611 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves information about a gallery image definition. * * @summary Retrieves information about a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Get.json */ async function getAGalleryImage() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesListByGallerySample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesListByGallerySample.js index c294af279686..e2f524a7b276 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesListByGallerySample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesListByGallerySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List gallery image definitions in a gallery. * * @summary List gallery image definitions in a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_ListByGallery.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_ListByGallery.json */ async function listGalleryImagesInAGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesUpdateSample.js index a2280d7d8786..d766c1ff3af7 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryImagesUpdateSample.js @@ -16,7 +16,47 @@ require("dotenv").config(); * This sample demonstrates how to Update a gallery image definition. * * @summary Update a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_UpdateFeatures.json + */ +async function updateAGalleryImageFeature() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImage = { + allowUpdateImage: true, + features: [ + { + name: "SecurityType", + startsAtVersion: "2.0.0", + value: "TrustedLaunch", + }, + ], + hyperVGeneration: "V2", + identifier: { + offer: "myOfferName", + publisher: "myPublisherName", + sku: "mySkuName", + }, + osState: "Generalized", + osType: "Windows", + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImages.beginUpdateAndWait( + resourceGroupName, + galleryName, + galleryImageName, + galleryImage, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Update a gallery image definition. + * + * @summary Update a gallery image definition. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Update.json */ async function updateASimpleGalleryImage() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -45,6 +85,7 @@ async function updateASimpleGalleryImage() { } async function main() { + updateAGalleryImageFeature(); updateASimpleGalleryImage(); } diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.js new file mode 100644 index 000000000000..e3bda3cb412f --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Create or update a gallery inVMAccessControlProfile version. + * + * @summary Create or update a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Create.json + */ +async function createOrUpdateAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const galleryInVMAccessControlProfileVersion = { + defaultAccess: "Allow", + excludeFromLatest: false, + location: "West US", + mode: "Audit", + rules: { + identities: [ + { + name: "WinPA", + exePath: "C:\\Windows\\System32\\cscript.exe", + groupName: "Administrators", + processName: "cscript", + userName: "SYSTEM", + }, + ], + privileges: [ + { + name: "GoalState", + path: "/machine", + queryParameters: { comp: "goalstate" }, + }, + ], + roleAssignments: [{ identities: ["WinPA"], role: "Provisioning" }], + roles: [{ name: "Provisioning", privileges: ["GoalState"] }], + }, + targetLocations: [{ name: "West US" }, { name: "South Central US" }], + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfileVersions.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + ); + console.log(result); +} + +async function main() { + createOrUpdateAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsDeleteSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsDeleteSample.js new file mode 100644 index 000000000000..729fead93891 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsDeleteSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Delete a gallery inVMAccessControlProfile version. + * + * @summary Delete a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Delete.json + */ +async function deleteAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfileVersions.beginDeleteAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + ); + console.log(result); +} + +async function main() { + deleteAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsGetSample.js new file mode 100644 index 000000000000..cfa0883ead34 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsGetSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Retrieves information about a gallery inVMAccessControlProfile version. + * + * @summary Retrieves information about a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json + */ +async function getAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfileVersions.get( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + ); + console.log(result); +} + +async function main() { + getAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.js new file mode 100644 index 000000000000..d86d55ed39f4 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + * + * @summary List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_ListByGalleryInVMAccessControlProfile.json + */ +async function listGalleryInVMAccessControlProfileVersionsInAGalleryInVmaccessControlProfile() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.galleryInVMAccessControlProfileVersions.listByGalleryInVMAccessControlProfile( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGalleryInVMAccessControlProfileVersionsInAGalleryInVmaccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsUpdateSample.js new file mode 100644 index 000000000000..f3f0ad88b1d2 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfileVersionsUpdateSample.js @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update a gallery inVMAccessControlProfile version. + * + * @summary Update a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Update.json + */ +async function updateAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const galleryInVMAccessControlProfileVersion = { + defaultAccess: "Allow", + excludeFromLatest: false, + mode: "Audit", + targetLocations: [{ name: "West US" }, { name: "South Central US" }, { name: "East US" }], + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfileVersions.beginUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + ); + console.log(result); +} + +async function main() { + updateAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesCreateOrUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesCreateOrUpdateSample.js new file mode 100644 index 000000000000..1dbfe1051a76 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesCreateOrUpdateSample.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Create or update a gallery inVMAccessControlProfile. + * + * @summary Create or update a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Create.json + */ +async function createOrUpdateAGalleryInVMAccessControlProfile() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const galleryInVMAccessControlProfile = { + location: "West US", + properties: { applicableHostEndpoint: "WireServer", osType: "Linux" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfiles.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + ); + console.log(result); +} + +async function main() { + createOrUpdateAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesDeleteSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesDeleteSample.js new file mode 100644 index 000000000000..3b0b91981694 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesDeleteSample.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Delete a gallery inVMAccessControlProfile. + * + * @summary Delete a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Delete.json + */ +async function deleteAGalleryInVMAccessControlProfile() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfiles.beginDeleteAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + ); + console.log(result); +} + +async function main() { + deleteAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesGetSample.js new file mode 100644 index 000000000000..19b8aff61234 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesGetSample.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Retrieves information about a gallery inVMAccessControlProfile. + * + * @summary Retrieves information about a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json + */ +async function getAGalleryInVMAccessControlProfile() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfiles.get( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + ); + console.log(result); +} + +async function main() { + getAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesListByGallerySample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesListByGallerySample.js new file mode 100644 index 000000000000..ca3a5953ea80 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesListByGallerySample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List gallery inVMAccessControlProfiles in a gallery. + * + * @summary List gallery inVMAccessControlProfiles in a gallery. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_ListByGallery.json + */ +async function listGalleryInVMAccessControlProfilesInAGallery() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.galleryInVMAccessControlProfiles.listByGallery( + resourceGroupName, + galleryName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGalleryInVMAccessControlProfilesInAGallery(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesUpdateSample.js new file mode 100644 index 000000000000..6b513a659362 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/galleryInVMAccessControlProfilesUpdateSample.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update a gallery inVMAccessControlProfile. + * + * @summary Update a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Update.json + */ +async function updateAGalleryInVMAccessControlProfile() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const galleryInVMAccessControlProfile = { + properties: { applicableHostEndpoint: "WireServer", osType: "Linux" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfiles.beginUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + ); + console.log(result); +} + +async function main() { + updateAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/gallerySharingProfileUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/gallerySharingProfileUpdateSample.js index 42629c467466..f4b2acb613b6 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/gallerySharingProfileUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/gallerySharingProfileUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update sharing profile of a gallery. * * @summary Update sharing profile of a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_AddToSharingProfile.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_AddToSharingProfile.json */ async function addSharingIdToTheSharingProfileOfAGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -46,7 +46,7 @@ async function addSharingIdToTheSharingProfileOfAGallery() { * This sample demonstrates how to Update sharing profile of a gallery. * * @summary Update sharing profile of a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ResetSharingProfile.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ResetSharingProfile.json */ async function resetSharingProfileOfAGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -67,7 +67,7 @@ async function resetSharingProfileOfAGallery() { * This sample demonstrates how to Update sharing profile of a gallery. * * @summary Update sharing profile of a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_EnableCommunityGallery.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_EnableCommunityGallery.json */ async function shareAGalleryToCommunity() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/package.json b/sdk/compute/arm-compute/samples/v22/javascript/package.json index d2ad5f99ae1a..350992b681ae 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/package.json +++ b/sdk/compute/arm-compute/samples/v22/javascript/package.json @@ -27,6 +27,6 @@ "dependencies": { "@azure/arm-compute": "latest", "dotenv": "latest", - "@azure/identity": "^4.0.1" + "@azure/identity": "^4.2.1" } } diff --git a/sdk/compute/arm-compute/samples/v22/javascript/sample.env b/sdk/compute/arm-compute/samples/v22/javascript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/sample.env +++ b/sdk/compute/arm-compute/samples/v22/javascript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleriesGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleriesGetSample.js index a61895fd181b..63dd002104de 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleriesGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleriesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a shared gallery by subscription id or tenant id. * * @summary Get a shared gallery by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_Get.json */ async function getASharedGallery() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleriesListSample.js b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleriesListSample.js index 041b9fa6aa3f..95b890630a70 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleriesListSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleriesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List shared galleries by subscription id or tenant id. * * @summary List shared galleries by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_List.json */ async function listSharedGalleries() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImageVersionsGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImageVersionsGetSample.js index d1a3d9d8e46a..f8717bd6baf1 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImageVersionsGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImageVersionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a shared gallery image version by subscription id or tenant id. * * @summary Get a shared gallery image version by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json */ async function getASharedGalleryImageVersion() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImageVersionsListSample.js b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImageVersionsListSample.js index 466de4f23b62..81cba3e7632a 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImageVersionsListSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImageVersionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List shared gallery image versions by subscription id or tenant id. * * @summary List shared gallery image versions by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json */ async function listSharedGalleryImageVersions() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImagesGetSample.js b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImagesGetSample.js index f864f4ed1999..2d86f01391cb 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImagesGetSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImagesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a shared gallery image by subscription id or tenant id. * * @summary Get a shared gallery image by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json */ async function getASharedGalleryImage() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImagesListSample.js b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImagesListSample.js index 97b1c2aabf2b..9d8f87ffb6c8 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImagesListSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/sharedGalleryImagesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List shared gallery images by subscription id or tenant id. * * @summary List shared gallery images by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json */ async function listSharedGalleryImages() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/compute/arm-compute/samples/v22/javascript/softDeletedResourceListByArtifactNameSample.js b/sdk/compute/arm-compute/samples/v22/javascript/softDeletedResourceListByArtifactNameSample.js new file mode 100644 index 000000000000..8ca456e707c6 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/javascript/softDeletedResourceListByArtifactNameSample.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { ComputeManagementClient } = require("@azure/arm-compute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an image. + * + * @summary List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an image. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GallerySoftDeletedResource_ListByArtifactName.json + */ +async function listSoftDeletedResourcesOfAnArtifactInTheGallery() { + const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const artifactType = "images"; + const artifactName = "myGalleryImageName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.softDeletedResource.listByArtifactName( + resourceGroupName, + galleryName, + artifactType, + artifactName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listSoftDeletedResourcesOfAnArtifactInTheGallery(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetVMSPowerOffSample.js b/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetVMSPowerOffSample.js index f6b96f93e855..e6d85f38b178 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetVMSPowerOffSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetVMSPowerOffSample.js @@ -13,9 +13,9 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * - * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MaximumSet_Gen.json */ async function virtualMachineScaleSetVMPowerOffMaximumSetGen() { @@ -39,9 +39,9 @@ async function virtualMachineScaleSetVMPowerOffMaximumSetGen() { } /** - * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * - * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MinimumSet_Gen.json */ async function virtualMachineScaleSetVMPowerOffMinimumSetGen() { diff --git a/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetsCreateOrUpdateSample.js b/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetsCreateOrUpdateSample.js index 58dd99fc8217..4f3cc65503be 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetsCreateOrUpdateSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetsCreateOrUpdateSample.js @@ -2554,23 +2554,30 @@ async function createAScaleSetWithPriorityMixPolicy() { const parameters = { location: "westus", orchestrationMode: "Flexible", + platformFaultDomainCount: 1, priorityMixPolicy: { - baseRegularPriorityCount: 4, + baseRegularPriorityCount: 10, regularPriorityPercentageAboveBase: 50, }, - singlePlacementGroup: false, - sku: { name: "Standard_A8m_v2", capacity: 10, tier: "Standard" }, + sku: { name: "Standard_A8m_v2", capacity: 2, tier: "Standard" }, virtualMachineProfile: { - billingProfile: { maxPrice: -1 }, - evictionPolicy: "Deallocate", networkProfile: { + networkApiVersion: "2020-11-01", networkInterfaceConfigurations: [ { name: "{vmss-name}", + enableAcceleratedNetworking: false, enableIPForwarding: true, ipConfigurations: [ { name: "{vmss-name}", + applicationGatewayBackendAddressPools: [], + loadBalancerBackendAddressPools: [], + primary: true, + publicIPAddressConfiguration: { + name: "{vmss-name}", + idleTimeoutInMinutes: 15, + }, subnet: { id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}", }, @@ -2588,9 +2595,9 @@ async function createAScaleSetWithPriorityMixPolicy() { priority: "Spot", storageProfile: { imageReference: { - offer: "WindowsServer", - publisher: "MicrosoftWindowsServer", - sku: "2016-Datacenter", + offer: "0001-com-ubuntu-server-focal", + publisher: "Canonical", + sku: "20_04-lts-gen2", version: "latest", }, osDisk: { diff --git a/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetsPowerOffSample.js b/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetsPowerOffSample.js index 7a69b7afd6a9..53335d947bd9 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetsPowerOffSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/virtualMachineScaleSetsPowerOffSample.js @@ -13,9 +13,9 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * - * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MaximumSet_Gen.json */ async function virtualMachineScaleSetPowerOffMaximumSetGen() { @@ -41,9 +41,9 @@ async function virtualMachineScaleSetPowerOffMaximumSetGen() { } /** - * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * - * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MinimumSet_Gen.json */ async function virtualMachineScaleSetPowerOffMinimumSetGen() { diff --git a/sdk/compute/arm-compute/samples/v22/javascript/virtualMachinesPowerOffSample.js b/sdk/compute/arm-compute/samples/v22/javascript/virtualMachinesPowerOffSample.js index ca5d3c5feecc..8d5e6dd3cc65 100644 --- a/sdk/compute/arm-compute/samples/v22/javascript/virtualMachinesPowerOffSample.js +++ b/sdk/compute/arm-compute/samples/v22/javascript/virtualMachinesPowerOffSample.js @@ -13,9 +13,9 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * - * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MaximumSet_Gen.json */ async function virtualMachinePowerOffMaximumSetGen() { @@ -35,9 +35,9 @@ async function virtualMachinePowerOffMaximumSetGen() { } /** - * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * - * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MinimumSet_Gen.json */ async function virtualMachinePowerOffMinimumSetGen() { diff --git a/sdk/compute/arm-compute/samples/v22/typescript/README.md b/sdk/compute/arm-compute/samples/v22/typescript/README.md index 0be73a03b23b..e88520370c96 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/README.md +++ b/sdk/compute/arm-compute/samples/v22/typescript/README.md @@ -2,294 +2,305 @@ These sample programs show how to use the TypeScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [availabilitySetsCreateOrUpdateSample.ts][availabilitysetscreateorupdatesample] | Create or update an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Create_WithScheduledEventProfile.json | -| [availabilitySetsDeleteSample.ts][availabilitysetsdeletesample] | Delete an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Delete_MaximumSet_Gen.json | -| [availabilitySetsGetSample.ts][availabilitysetsgetsample] | Retrieves information about an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Get_MaximumSet_Gen.json | -| [availabilitySetsListAvailableSizesSample.ts][availabilitysetslistavailablesizessample] | Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_ListAvailableSizes_MaximumSet_Gen.json | -| [availabilitySetsListBySubscriptionSample.ts][availabilitysetslistbysubscriptionsample] | Lists all availability sets in a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_ListBySubscription.json | -| [availabilitySetsListSample.ts][availabilitysetslistsample] | Lists all availability sets in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_List_MaximumSet_Gen.json | -| [availabilitySetsUpdateSample.ts][availabilitysetsupdatesample] | Update an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Update_MaximumSet_Gen.json | -| [capacityReservationGroupsCreateOrUpdateSample.ts][capacityreservationgroupscreateorupdatesample] | The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_CreateOrUpdate.json | -| [capacityReservationGroupsDeleteSample.ts][capacityreservationgroupsdeletesample] | The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Delete_MaximumSet_Gen.json | -| [capacityReservationGroupsGetSample.ts][capacityreservationgroupsgetsample] | The operation that retrieves information about a capacity reservation group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Get.json | -| [capacityReservationGroupsListByResourceGroupSample.ts][capacityreservationgroupslistbyresourcegroupsample] | Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_ListByResourceGroup.json | -| [capacityReservationGroupsListBySubscriptionSample.ts][capacityreservationgroupslistbysubscriptionsample] | Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_ListBySubscription.json | -| [capacityReservationGroupsUpdateSample.ts][capacityreservationgroupsupdatesample] | The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Update_MaximumSet_Gen.json | -| [capacityReservationsCreateOrUpdateSample.ts][capacityreservationscreateorupdatesample] | The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_CreateOrUpdate.json | -| [capacityReservationsDeleteSample.ts][capacityreservationsdeletesample] | The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Delete_MaximumSet_Gen.json | -| [capacityReservationsGetSample.ts][capacityreservationsgetsample] | The operation that retrieves information about the capacity reservation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Get.json | -| [capacityReservationsListByCapacityReservationGroupSample.ts][capacityreservationslistbycapacityreservationgroupsample] | Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_ListByReservationGroup.json | -| [capacityReservationsUpdateSample.ts][capacityreservationsupdatesample] | The operation to update a capacity reservation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Update_MaximumSet_Gen.json | -| [cloudServiceOperatingSystemsGetOSFamilySample.ts][cloudserviceoperatingsystemsgetosfamilysample] | Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSFamily_Get.json | -| [cloudServiceOperatingSystemsGetOSVersionSample.ts][cloudserviceoperatingsystemsgetosversionsample] | Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSVersion_Get.json | -| [cloudServiceOperatingSystemsListOSFamiliesSample.ts][cloudserviceoperatingsystemslistosfamiliessample] | Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSFamilies_List.json | -| [cloudServiceOperatingSystemsListOSVersionsSample.ts][cloudserviceoperatingsystemslistosversionssample] | Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSVersion_List.json | -| [cloudServiceRoleInstancesDeleteSample.ts][cloudserviceroleinstancesdeletesample] | Deletes a role instance from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Delete.json | -| [cloudServiceRoleInstancesGetInstanceViewSample.ts][cloudserviceroleinstancesgetinstanceviewsample] | Retrieves information about the run-time state of a role instance in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_InstanceView.json | -| [cloudServiceRoleInstancesGetRemoteDesktopFileSample.ts][cloudserviceroleinstancesgetremotedesktopfilesample] | Gets a remote desktop file for a role instance in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_RemoteDesktopFile.json | -| [cloudServiceRoleInstancesGetSample.ts][cloudserviceroleinstancesgetsample] | Gets a role instance from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get.json | -| [cloudServiceRoleInstancesListSample.ts][cloudserviceroleinstanceslistsample] | Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRolesInstance_List.json | -| [cloudServiceRoleInstancesRebuildSample.ts][cloudserviceroleinstancesrebuildsample] | The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Rebuild.json | -| [cloudServiceRoleInstancesReimageSample.ts][cloudserviceroleinstancesreimagesample] | The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Reimage.json | -| [cloudServiceRoleInstancesRestartSample.ts][cloudserviceroleinstancesrestartsample] | The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Restart.json | -| [cloudServiceRolesGetSample.ts][cloudservicerolesgetsample] | Gets a role from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRole_Get.json | -| [cloudServiceRolesListSample.ts][cloudserviceroleslistsample] | Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRole_List.json | -| [cloudServicesCreateOrUpdateSample.ts][cloudservicescreateorupdatesample] | Create or update a cloud service. Please note some properties can be set only during cloud service creation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Create_WithMultiRole.json | -| [cloudServicesDeleteInstancesSample.ts][cloudservicesdeleteinstancessample] | Deletes role instances in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Delete_ByCloudService.json | -| [cloudServicesDeleteSample.ts][cloudservicesdeletesample] | Deletes a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Delete.json | -| [cloudServicesGetInstanceViewSample.ts][cloudservicesgetinstanceviewsample] | Gets the status of a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Get_InstanceViewWithMultiRole.json | -| [cloudServicesGetSample.ts][cloudservicesgetsample] | Display information about a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Get_WithMultiRoleAndRDP.json | -| [cloudServicesListAllSample.ts][cloudserviceslistallsample] | Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_List_BySubscription.json | -| [cloudServicesListSample.ts][cloudserviceslistsample] | Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_List_ByResourceGroup.json | -| [cloudServicesPowerOffSample.ts][cloudservicespoweroffsample] | Power off the cloud service. Note that resources are still attached and you are getting charged for the resources. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_PowerOff.json | -| [cloudServicesRebuildSample.ts][cloudservicesrebuildsample] | Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Rebuild_ByCloudService.json | -| [cloudServicesReimageSample.ts][cloudservicesreimagesample] | Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Reimage_ByCloudService.json | -| [cloudServicesRestartSample.ts][cloudservicesrestartsample] | Restarts one or more role instances in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Restart_ByCloudService.json | -| [cloudServicesStartSample.ts][cloudservicesstartsample] | Starts the cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Start.json | -| [cloudServicesUpdateDomainGetUpdateDomainSample.ts][cloudservicesupdatedomaingetupdatedomainsample] | Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_Get.json | -| [cloudServicesUpdateDomainListUpdateDomainsSample.ts][cloudservicesupdatedomainlistupdatedomainssample] | Gets a list of all update domains in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_List.json | -| [cloudServicesUpdateDomainWalkUpdateDomainSample.ts][cloudservicesupdatedomainwalkupdatedomainsample] | Updates the role instances in the specified update domain. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_Update.json | -| [cloudServicesUpdateSample.ts][cloudservicesupdatesample] | Update a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Update_ToIncludeTags.json | -| [communityGalleriesGetSample.ts][communitygalleriesgetsample] | Get a community gallery by gallery public name. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGallery_Get.json | -| [communityGalleryImageVersionsGetSample.ts][communitygalleryimageversionsgetsample] | Get a community gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json | -| [communityGalleryImageVersionsListSample.ts][communitygalleryimageversionslistsample] | List community gallery image versions inside an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json | -| [communityGalleryImagesGetSample.ts][communitygalleryimagesgetsample] | Get a community gallery image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json | -| [communityGalleryImagesListSample.ts][communitygalleryimageslistsample] | List community gallery images inside a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json | -| [dedicatedHostGroupsCreateOrUpdateSample.ts][dedicatedhostgroupscreateorupdatesample] | Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_CreateOrUpdate_WithUltraSSD.json | -| [dedicatedHostGroupsDeleteSample.ts][dedicatedhostgroupsdeletesample] | Delete a dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Delete_MaximumSet_Gen.json | -| [dedicatedHostGroupsGetSample.ts][dedicatedhostgroupsgetsample] | Retrieves information about a dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Get.json | -| [dedicatedHostGroupsListByResourceGroupSample.ts][dedicatedhostgroupslistbyresourcegroupsample] | Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_ListByResourceGroup_MaximumSet_Gen.json | -| [dedicatedHostGroupsListBySubscriptionSample.ts][dedicatedhostgroupslistbysubscriptionsample] | Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_ListBySubscription_MaximumSet_Gen.json | -| [dedicatedHostGroupsUpdateSample.ts][dedicatedhostgroupsupdatesample] | Update an dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Update_MaximumSet_Gen.json | -| [dedicatedHostsCreateOrUpdateSample.ts][dedicatedhostscreateorupdatesample] | Create or update a dedicated host . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_CreateOrUpdate.json | -| [dedicatedHostsDeleteSample.ts][dedicatedhostsdeletesample] | Delete a dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Delete_MaximumSet_Gen.json | -| [dedicatedHostsGetSample.ts][dedicatedhostsgetsample] | Retrieves information about a dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Get.json | -| [dedicatedHostsListAvailableSizesSample.ts][dedicatedhostslistavailablesizessample] | Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_ListAvailableSizes.json | -| [dedicatedHostsListByHostGroupSample.ts][dedicatedhostslistbyhostgroupsample] | Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_ListByHostGroup_MaximumSet_Gen.json | -| [dedicatedHostsRedeploySample.ts][dedicatedhostsredeploysample] | Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Redeploy.json | -| [dedicatedHostsRestartSample.ts][dedicatedhostsrestartsample] | Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Restart.json | -| [dedicatedHostsUpdateSample.ts][dedicatedhostsupdatesample] | Update a dedicated host . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Update_MaximumSet_Gen.json | -| [diskAccessesCreateOrUpdateSample.ts][diskaccessescreateorupdatesample] | Creates or updates a disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Create.json | -| [diskAccessesDeleteAPrivateEndpointConnectionSample.ts][diskaccessesdeleteaprivateendpointconnectionsample] | Deletes a private endpoint connection under a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Delete.json | -| [diskAccessesDeleteSample.ts][diskaccessesdeletesample] | Deletes a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Delete.json | -| [diskAccessesGetAPrivateEndpointConnectionSample.ts][diskaccessesgetaprivateendpointconnectionsample] | Gets information about a private endpoint connection under a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Get.json | -| [diskAccessesGetPrivateLinkResourcesSample.ts][diskaccessesgetprivatelinkresourcessample] | Gets the private link resources possible under disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateLinkResources_Get.json | -| [diskAccessesGetSample.ts][diskaccessesgetsample] | Gets information about a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Get_WithPrivateEndpoints.json | -| [diskAccessesListByResourceGroupSample.ts][diskaccesseslistbyresourcegroupsample] | Lists all the disk access resources under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_ListByResourceGroup.json | -| [diskAccessesListPrivateEndpointConnectionsSample.ts][diskaccesseslistprivateendpointconnectionssample] | List information about private endpoint connections under a disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_ListByDiskAccess.json | -| [diskAccessesListSample.ts][diskaccesseslistsample] | Lists all the disk access resources under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_ListBySubscription.json | -| [diskAccessesUpdateAPrivateEndpointConnectionSample.ts][diskaccessesupdateaprivateendpointconnectionsample] | Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Approve.json | -| [diskAccessesUpdateSample.ts][diskaccessesupdatesample] | Updates (patches) a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Update.json | -| [diskEncryptionSetsCreateOrUpdateSample.ts][diskencryptionsetscreateorupdatesample] | Creates or updates a disk encryption set x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Create_WithKeyVaultFromADifferentSubscription.json | -| [diskEncryptionSetsDeleteSample.ts][diskencryptionsetsdeletesample] | Deletes a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Delete.json | -| [diskEncryptionSetsGetSample.ts][diskencryptionsetsgetsample] | Gets information about a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Get_WithAutoKeyRotationError.json | -| [diskEncryptionSetsListAssociatedResourcesSample.ts][diskencryptionsetslistassociatedresourcessample] | Lists all resources that are encrypted with this disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListAssociatedResources.json | -| [diskEncryptionSetsListByResourceGroupSample.ts][diskencryptionsetslistbyresourcegroupsample] | Lists all the disk encryption sets under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListByResourceGroup.json | -| [diskEncryptionSetsListSample.ts][diskencryptionsetslistsample] | Lists all the disk encryption sets under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListBySubscription.json | -| [diskEncryptionSetsUpdateSample.ts][diskencryptionsetsupdatesample] | Updates (patches) a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Update_WithRotationToLatestKeyVersionEnabled.json | -| [diskRestorePointGetSample.ts][diskrestorepointgetsample] | Get disk restorePoint resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_Get.json | -| [diskRestorePointGrantAccessSample.ts][diskrestorepointgrantaccesssample] | Grants access to a diskRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_BeginGetAccess.json | -| [diskRestorePointListByRestorePointSample.ts][diskrestorepointlistbyrestorepointsample] | Lists diskRestorePoints under a vmRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_ListByVmRestorePoint.json | -| [diskRestorePointRevokeAccessSample.ts][diskrestorepointrevokeaccesssample] | Revokes access to a diskRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_EndGetAccess.json | -| [disksCreateOrUpdateSample.ts][diskscreateorupdatesample] | Creates or updates a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Create_ConfidentialVMSupportedDiskEncryptedWithCMK.json | -| [disksDeleteSample.ts][disksdeletesample] | Deletes a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Delete.json | -| [disksGetSample.ts][disksgetsample] | Gets information about a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Get.json | -| [disksGrantAccessSample.ts][disksgrantaccesssample] | Grants access to a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_BeginGetAccess.json | -| [disksListByResourceGroupSample.ts][diskslistbyresourcegroupsample] | Lists all the disks under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_ListByResourceGroup.json | -| [disksListSample.ts][diskslistsample] | Lists all the disks under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_ListBySubscription.json | -| [disksRevokeAccessSample.ts][disksrevokeaccesssample] | Revokes access to a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_EndGetAccess.json | -| [disksUpdateSample.ts][disksupdatesample] | Updates (patches) a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_CreateOrUpdate_BurstingEnabled.json | -| [galleriesCreateOrUpdateSample.ts][galleriescreateorupdatesample] | Create or update a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Create.json | -| [galleriesDeleteSample.ts][galleriesdeletesample] | Delete a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Delete.json | -| [galleriesGetSample.ts][galleriesgetsample] | Retrieves information about a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Get.json | -| [galleriesListByResourceGroupSample.ts][gallerieslistbyresourcegroupsample] | List galleries under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListByResourceGroup.json | -| [galleriesListSample.ts][gallerieslistsample] | List galleries under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListBySubscription.json | -| [galleriesUpdateSample.ts][galleriesupdatesample] | Update a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Update.json | -| [galleryApplicationVersionsCreateOrUpdateSample.ts][galleryapplicationversionscreateorupdatesample] | Create or update a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Create.json | -| [galleryApplicationVersionsDeleteSample.ts][galleryapplicationversionsdeletesample] | Delete a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json | -| [galleryApplicationVersionsGetSample.ts][galleryapplicationversionsgetsample] | Retrieves information about a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json | -| [galleryApplicationVersionsListByGalleryApplicationSample.ts][galleryapplicationversionslistbygalleryapplicationsample] | List gallery Application Versions in a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json | -| [galleryApplicationVersionsUpdateSample.ts][galleryapplicationversionsupdatesample] | Update a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Update.json | -| [galleryApplicationsCreateOrUpdateSample.ts][galleryapplicationscreateorupdatesample] | Create or update a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Create.json | -| [galleryApplicationsDeleteSample.ts][galleryapplicationsdeletesample] | Delete a gallery Application. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Delete.json | -| [galleryApplicationsGetSample.ts][galleryapplicationsgetsample] | Retrieves information about a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Get.json | -| [galleryApplicationsListByGallerySample.ts][galleryapplicationslistbygallerysample] | List gallery Application Definitions in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_ListByGallery.json | -| [galleryApplicationsUpdateSample.ts][galleryapplicationsupdatesample] | Update a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Update.json | -| [galleryImageVersionsCreateOrUpdateSample.ts][galleryimageversionscreateorupdatesample] | Create or update a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json | -| [galleryImageVersionsDeleteSample.ts][galleryimageversionsdeletesample] | Delete a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Delete.json | -| [galleryImageVersionsGetSample.ts][galleryimageversionsgetsample] | Retrieves information about a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json | -| [galleryImageVersionsListByGalleryImageSample.ts][galleryimageversionslistbygalleryimagesample] | List gallery image versions in a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json | -| [galleryImageVersionsUpdateSample.ts][galleryimageversionsupdatesample] | Update a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update.json | -| [galleryImagesCreateOrUpdateSample.ts][galleryimagescreateorupdatesample] | Create or update a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Create.json | -| [galleryImagesDeleteSample.ts][galleryimagesdeletesample] | Delete a gallery image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Delete.json | -| [galleryImagesGetSample.ts][galleryimagesgetsample] | Retrieves information about a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Get.json | -| [galleryImagesListByGallerySample.ts][galleryimageslistbygallerysample] | List gallery image definitions in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_ListByGallery.json | -| [galleryImagesUpdateSample.ts][galleryimagesupdatesample] | Update a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Update.json | -| [gallerySharingProfileUpdateSample.ts][gallerysharingprofileupdatesample] | Update sharing profile of a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_AddToSharingProfile.json | -| [imagesCreateOrUpdateSample.ts][imagescreateorupdatesample] | Create or update an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_CreateFromABlobWithDiskEncryptionSet.json | -| [imagesDeleteSample.ts][imagesdeletesample] | Deletes an Image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Images_Delete_MaximumSet_Gen.json | -| [imagesGetSample.ts][imagesgetsample] | Gets an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_Get.json | -| [imagesListByResourceGroupSample.ts][imageslistbyresourcegroupsample] | Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_ListByResourceGroup.json | -| [imagesListSample.ts][imageslistsample] | Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_ListBySubscription.json | -| [imagesUpdateSample.ts][imagesupdatesample] | Update an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_Update.json | -| [logAnalyticsExportRequestRateByIntervalSample.ts][loganalyticsexportrequestratebyintervalsample] | Export logs that show Api requests made by this subscription in the given time window to show throttling activities. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/logAnalyticExamples/LogAnalytics_RequestRateByInterval.json | -| [logAnalyticsExportThrottledRequestsSample.ts][loganalyticsexportthrottledrequestssample] | Export logs that show total throttled Api requests for this subscription in the given time window. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/logAnalyticExamples/LogAnalytics_ThrottledRequests.json | -| [operationsListSample.ts][operationslistsample] | Gets a list of compute operations. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json | -| [proximityPlacementGroupsCreateOrUpdateSample.ts][proximityplacementgroupscreateorupdatesample] | Create or update a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_CreateOrUpdate.json | -| [proximityPlacementGroupsDeleteSample.ts][proximityplacementgroupsdeletesample] | Delete a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Delete.json | -| [proximityPlacementGroupsGetSample.ts][proximityplacementgroupsgetsample] | Retrieves information about a proximity placement group . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Get.json | -| [proximityPlacementGroupsListByResourceGroupSample.ts][proximityplacementgroupslistbyresourcegroupsample] | Lists all proximity placement groups in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListByResourceGroup.json | -| [proximityPlacementGroupsListBySubscriptionSample.ts][proximityplacementgroupslistbysubscriptionsample] | Lists all proximity placement groups in a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListBySubscription.json | -| [proximityPlacementGroupsUpdateSample.ts][proximityplacementgroupsupdatesample] | Update a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Patch.json | -| [resourceSkusListSample.ts][resourceskuslistsample] | Gets the list of Microsoft.Compute SKUs available for your Subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkus.json | -| [restorePointCollectionsCreateOrUpdateSample.ts][restorepointcollectionscreateorupdatesample] | The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_CreateOrUpdate_ForCrossRegionCopy.json | -| [restorePointCollectionsDeleteSample.ts][restorepointcollectionsdeletesample] | The operation to delete the restore point collection. This operation will also delete all the contained restore points. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Delete_MaximumSet_Gen.json | -| [restorePointCollectionsGetSample.ts][restorepointcollectionsgetsample] | The operation to get the restore point collection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Get.json | -| [restorePointCollectionsListAllSample.ts][restorepointcollectionslistallsample] | Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_ListBySubscription.json | -| [restorePointCollectionsListSample.ts][restorepointcollectionslistsample] | Gets the list of restore point collections in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_ListByResourceGroup.json | -| [restorePointCollectionsUpdateSample.ts][restorepointcollectionsupdatesample] | The operation to update the restore point collection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Update_MaximumSet_Gen.json | -| [restorePointsCreateSample.ts][restorepointscreatesample] | The operation to create the restore point. Updating properties of an existing restore point is not allowed x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Copy_BetweenRegions.json | -| [restorePointsDeleteSample.ts][restorepointsdeletesample] | The operation to delete the restore point. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Delete_MaximumSet_Gen.json | -| [restorePointsGetSample.ts][restorepointsgetsample] | The operation to get the restore point. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Get.json | -| [sharedGalleriesGetSample.ts][sharedgalleriesgetsample] | Get a shared gallery by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_Get.json | -| [sharedGalleriesListSample.ts][sharedgallerieslistsample] | List shared galleries by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_List.json | -| [sharedGalleryImageVersionsGetSample.ts][sharedgalleryimageversionsgetsample] | Get a shared gallery image version by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json | -| [sharedGalleryImageVersionsListSample.ts][sharedgalleryimageversionslistsample] | List shared gallery image versions by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json | -| [sharedGalleryImagesGetSample.ts][sharedgalleryimagesgetsample] | Get a shared gallery image by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json | -| [sharedGalleryImagesListSample.ts][sharedgalleryimageslistsample] | List shared gallery images by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json | -| [snapshotsCreateOrUpdateSample.ts][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromADifferentSubscription.json | -| [snapshotsDeleteSample.ts][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Delete.json | -| [snapshotsGetSample.ts][snapshotsgetsample] | Gets information about a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Get.json | -| [snapshotsGrantAccessSample.ts][snapshotsgrantaccesssample] | Grants access to a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_BeginGetAccess.json | -| [snapshotsListByResourceGroupSample.ts][snapshotslistbyresourcegroupsample] | Lists snapshots under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_ListByResourceGroup.json | -| [snapshotsListSample.ts][snapshotslistsample] | Lists snapshots under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_ListBySubscription.json | -| [snapshotsRevokeAccessSample.ts][snapshotsrevokeaccesssample] | Revokes access to a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_EndGetAccess.json | -| [snapshotsUpdateSample.ts][snapshotsupdatesample] | Updates (patches) a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Update_WithAcceleratedNetwork.json | -| [sshPublicKeysCreateSample.ts][sshpublickeyscreatesample] | Creates a new SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Create.json | -| [sshPublicKeysDeleteSample.ts][sshpublickeysdeletesample] | Delete an SSH public key. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Delete_MaximumSet_Gen.json | -| [sshPublicKeysGenerateKeyPairSample.ts][sshpublickeysgeneratekeypairsample] | Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_GenerateKeyPair_EncryptionWithEd25519.json | -| [sshPublicKeysGetSample.ts][sshpublickeysgetsample] | Retrieves information about an SSH public key. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Get.json | -| [sshPublicKeysListByResourceGroupSample.ts][sshpublickeyslistbyresourcegroupsample] | Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_ListByResourceGroup_MaximumSet_Gen.json | -| [sshPublicKeysListBySubscriptionSample.ts][sshpublickeyslistbysubscriptionsample] | Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_ListBySubscription_MaximumSet_Gen.json | -| [sshPublicKeysUpdateSample.ts][sshpublickeysupdatesample] | Updates a new SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Update_MaximumSet_Gen.json | -| [usageListSample.ts][usagelistsample] | Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/Usage_List_MaximumSet_Gen.json | -| [virtualMachineExtensionImagesGetSample.ts][virtualmachineextensionimagesgetsample] | Gets a virtual machine extension image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_Get_MaximumSet_Gen.json | -| [virtualMachineExtensionImagesListTypesSample.ts][virtualmachineextensionimageslisttypessample] | Gets a list of virtual machine extension image types. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen.json | -| [virtualMachineExtensionImagesListVersionsSample.ts][virtualmachineextensionimageslistversionssample] | Gets a list of virtual machine extension image versions. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListVersions_MaximumSet_Gen.json | -| [virtualMachineExtensionsCreateOrUpdateSample.ts][virtualmachineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualMachineExtensionsDeleteSample.ts][virtualmachineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Delete_MaximumSet_Gen.json | -| [virtualMachineExtensionsGetSample.ts][virtualmachineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Get_MaximumSet_Gen.json | -| [virtualMachineExtensionsListSample.ts][virtualmachineextensionslistsample] | The operation to get all extensions of a Virtual Machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_List_MaximumSet_Gen.json | -| [virtualMachineExtensionsUpdateSample.ts][virtualmachineextensionsupdatesample] | The operation to update the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Update.json | -| [virtualMachineImagesEdgeZoneGetSample.ts][virtualmachineimagesedgezonegetsample] | Gets a virtual machine image in an edge zone. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_Get_MaximumSet_Gen.json | -| [virtualMachineImagesEdgeZoneListOffersSample.ts][virtualmachineimagesedgezonelistofferssample] | Gets a list of virtual machine image offers for the specified location, edge zone and publisher. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListOffers_MaximumSet_Gen.json | -| [virtualMachineImagesEdgeZoneListPublishersSample.ts][virtualmachineimagesedgezonelistpublisherssample] | Gets a list of virtual machine image publishers for the specified Azure location and edge zone. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListPublishers_MaximumSet_Gen.json | -| [virtualMachineImagesEdgeZoneListSample.ts][virtualmachineimagesedgezonelistsample] | Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_List_MaximumSet_Gen.json | -| [virtualMachineImagesEdgeZoneListSkusSample.ts][virtualmachineimagesedgezonelistskussample] | Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListSkus_MaximumSet_Gen.json | -| [virtualMachineImagesGetSample.ts][virtualmachineimagesgetsample] | Gets a virtual machine image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_Get_MaximumSet_Gen.json | -| [virtualMachineImagesListByEdgeZoneSample.ts][virtualmachineimageslistbyedgezonesample] | Gets a list of all virtual machine image versions for the specified edge zone x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json | -| [virtualMachineImagesListOffersSample.ts][virtualmachineimageslistofferssample] | Gets a list of virtual machine image offers for the specified location and publisher. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListOffers_MaximumSet_Gen.json | -| [virtualMachineImagesListPublishersSample.ts][virtualmachineimageslistpublisherssample] | Gets a list of virtual machine image publishers for the specified Azure location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListPublishers_MaximumSet_Gen.json | -| [virtualMachineImagesListSample.ts][virtualmachineimageslistsample] | Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_List_MaximumSet_Gen.json | -| [virtualMachineImagesListSkusSample.ts][virtualmachineimageslistskussample] | Gets a list of virtual machine image SKUs for the specified location, publisher, and offer. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListSkus_MaximumSet_Gen.json | -| [virtualMachineRunCommandsCreateOrUpdateSample.ts][virtualmachineruncommandscreateorupdatesample] | The operation to create or update the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_CreateOrUpdate.json | -| [virtualMachineRunCommandsDeleteSample.ts][virtualmachineruncommandsdeletesample] | The operation to delete the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Delete.json | -| [virtualMachineRunCommandsGetByVirtualMachineSample.ts][virtualmachineruncommandsgetbyvirtualmachinesample] | The operation to get the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Get.json | -| [virtualMachineRunCommandsGetSample.ts][virtualmachineruncommandsgetsample] | Gets specific run command for a subscription in a location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/RunCommand_Get.json | -| [virtualMachineRunCommandsListByVirtualMachineSample.ts][virtualmachineruncommandslistbyvirtualmachinesample] | The operation to get all run commands of a Virtual Machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_List.json | -| [virtualMachineRunCommandsListSample.ts][virtualmachineruncommandslistsample] | Lists all available run commands for a subscription in a location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/RunCommand_List.json | -| [virtualMachineRunCommandsUpdateSample.ts][virtualmachineruncommandsupdatesample] | The operation to update the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Update.json | -| [virtualMachineScaleSetExtensionsCreateOrUpdateSample.ts][virtualmachinescalesetextensionscreateorupdatesample] | The operation to create or update an extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_CreateOrUpdate_MaximumSet_Gen.json | -| [virtualMachineScaleSetExtensionsDeleteSample.ts][virtualmachinescalesetextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Delete_MaximumSet_Gen.json | -| [virtualMachineScaleSetExtensionsGetSample.ts][virtualmachinescalesetextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MaximumSet_Gen.json | -| [virtualMachineScaleSetExtensionsListSample.ts][virtualmachinescalesetextensionslistsample] | Gets a list of all extensions in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_List_MaximumSet_Gen.json | -| [virtualMachineScaleSetExtensionsUpdateSample.ts][virtualmachinescalesetextensionsupdatesample] | The operation to update an extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Update_MaximumSet_Gen.json | -| [virtualMachineScaleSetRollingUpgradesCancelSample.ts][virtualmachinescalesetrollingupgradescancelsample] | Cancels the current virtual machine scale set rolling upgrade. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_Cancel_MaximumSet_Gen.json | -| [virtualMachineScaleSetRollingUpgradesGetLatestSample.ts][virtualmachinescalesetrollingupgradesgetlatestsample] | Gets the status of the latest virtual machine scale set rolling upgrade. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_GetLatest_MaximumSet_Gen.json | -| [virtualMachineScaleSetRollingUpgradesStartExtensionUpgradeSample.ts][virtualmachinescalesetrollingupgradesstartextensionupgradesample] | Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_RollingUpgrade.json | -| [virtualMachineScaleSetRollingUpgradesStartOSUpgradeSample.ts][virtualmachinescalesetrollingupgradesstartosupgradesample] | Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_StartOSUpgrade_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMExtensionsCreateOrUpdateSample.ts][virtualmachinescalesetvmextensionscreateorupdatesample] | The operation to create or update the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Create.json | -| [virtualMachineScaleSetVMExtensionsDeleteSample.ts][virtualmachinescalesetvmextensionsdeletesample] | The operation to delete the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Delete.json | -| [virtualMachineScaleSetVMExtensionsGetSample.ts][virtualmachinescalesetvmextensionsgetsample] | The operation to get the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Get.json | -| [virtualMachineScaleSetVMExtensionsListSample.ts][virtualmachinescalesetvmextensionslistsample] | The operation to get all extensions of an instance in Virtual Machine Scaleset. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_List.json | -| [virtualMachineScaleSetVMExtensionsUpdateSample.ts][virtualmachinescalesetvmextensionsupdatesample] | The operation to update the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Update.json | -| [virtualMachineScaleSetVMRunCommandsCreateOrUpdateSample.ts][virtualmachinescalesetvmruncommandscreateorupdatesample] | The operation to create or update the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_CreateOrUpdate.json | -| [virtualMachineScaleSetVMRunCommandsDeleteSample.ts][virtualmachinescalesetvmruncommandsdeletesample] | The operation to delete the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Delete.json | -| [virtualMachineScaleSetVMRunCommandsGetSample.ts][virtualmachinescalesetvmruncommandsgetsample] | The operation to get the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Get.json | -| [virtualMachineScaleSetVMRunCommandsListSample.ts][virtualmachinescalesetvmruncommandslistsample] | The operation to get all run commands of an instance in Virtual Machine Scaleset. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_List.json | -| [virtualMachineScaleSetVMRunCommandsUpdateSample.ts][virtualmachinescalesetvmruncommandsupdatesample] | The operation to update the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Update.json | -| [virtualMachineScaleSetVMSApproveRollingUpgradeSample.ts][virtualmachinescalesetvmsapproverollingupgradesample] | Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_ApproveRollingUpgrade.json | -| [virtualMachineScaleSetVMSAttachDetachDataDisksSample.ts][virtualmachinescalesetvmsattachdetachdatadiskssample] | Attach and detach data disks to/from a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_AttachDetachDataDisks_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSDeallocateSample.ts][virtualmachinescalesetvmsdeallocatesample] | Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Deallocate_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSDeleteSample.ts][virtualmachinescalesetvmsdeletesample] | Deletes a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Delete_Force.json | -| [virtualMachineScaleSetVMSGetInstanceViewSample.ts][virtualmachinescalesetvmsgetinstanceviewsample] | Gets the status of a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_InstanceViewAutoPlacedOnDedicatedHostGroup.json | -| [virtualMachineScaleSetVMSGetSample.ts][virtualmachinescalesetvmsgetsample] | Gets a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_WithUserData.json | -| [virtualMachineScaleSetVMSListSample.ts][virtualmachinescalesetvmslistsample] | Gets a list of all virtual machines in a VM scale sets. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_List_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSPerformMaintenanceSample.ts][virtualmachinescalesetvmsperformmaintenancesample] | Performs maintenance on a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PerformMaintenance_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSPowerOffSample.ts][virtualmachinescalesetvmspoweroffsample] | Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSRedeploySample.ts][virtualmachinescalesetvmsredeploysample] | Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Redeploy_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSReimageAllSample.ts][virtualmachinescalesetvmsreimageallsample] | Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_ReimageAll_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSReimageSample.ts][virtualmachinescalesetvmsreimagesample] | Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Reimage_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSRestartSample.ts][virtualmachinescalesetvmsrestartsample] | Restarts a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Restart_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSRetrieveBootDiagnosticsDataSample.ts][virtualmachinescalesetvmsretrievebootdiagnosticsdatasample] | The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_RetrieveBootDiagnosticsData.json | -| [virtualMachineScaleSetVMSRunCommandSample.ts][virtualmachinescalesetvmsruncommandsample] | Run command on a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand.json | -| [virtualMachineScaleSetVMSSimulateEvictionSample.ts][virtualmachinescalesetvmssimulateevictionsample] | The operation to simulate the eviction of spot virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_SimulateEviction.json | -| [virtualMachineScaleSetVMSStartSample.ts][virtualmachinescalesetvmsstartsample] | Starts a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Start_MaximumSet_Gen.json | -| [virtualMachineScaleSetVMSUpdateSample.ts][virtualmachinescalesetvmsupdatesample] | Updates a virtual machine of a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Update_MaximumSet_Gen.json | -| [virtualMachineScaleSetsApproveRollingUpgradeSample.ts][virtualmachinescalesetsapproverollingupgradesample] | Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ApproveRollingUpgrade.json | -| [virtualMachineScaleSetsConvertToSinglePlacementGroupSample.ts][virtualmachinescalesetsconverttosingleplacementgroupsample] | Converts SinglePlacementGroup property to false for a existing virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ConvertToSinglePlacementGroup_MaximumSet_Gen.json | -| [virtualMachineScaleSetsCreateOrUpdateSample.ts][virtualmachinescalesetscreateorupdatesample] | Create or update a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithExtensionsSuppressFailuresEnabled.json | -| [virtualMachineScaleSetsDeallocateSample.ts][virtualmachinescalesetsdeallocatesample] | Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Deallocate_MaximumSet_Gen.json | -| [virtualMachineScaleSetsDeleteInstancesSample.ts][virtualmachinescalesetsdeleteinstancessample] | Deletes virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_DeleteInstances_MaximumSet_Gen.json | -| [virtualMachineScaleSetsDeleteSample.ts][virtualmachinescalesetsdeletesample] | Deletes a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Delete_Force.json | -| [virtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkSample.ts][virtualmachinescalesetsforcerecoveryservicefabricplatformupdatedomainwalksample] | Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_MaximumSet_Gen.json | -| [virtualMachineScaleSetsGetInstanceViewSample.ts][virtualmachinescalesetsgetinstanceviewsample] | Gets the status of a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_GetInstanceView_MaximumSet_Gen.json | -| [virtualMachineScaleSetsGetOSUpgradeHistorySample.ts][virtualmachinescalesetsgetosupgradehistorysample] | Gets list of OS upgrades on a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_GetOSUpgradeHistory_MaximumSet_Gen.json | -| [virtualMachineScaleSetsGetSample.ts][virtualmachinescalesetsgetsample] | Display information about a virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Get_WithDiskControllerType.json | -| [virtualMachineScaleSetsListAllSample.ts][virtualmachinescalesetslistallsample] | Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListAll_MaximumSet_Gen.json | -| [virtualMachineScaleSetsListByLocationSample.ts][virtualmachinescalesetslistbylocationsample] | Gets all the VM scale sets under the specified subscription for the specified location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListBySubscription_ByLocation.json | -| [virtualMachineScaleSetsListSample.ts][virtualmachinescalesetslistsample] | Gets a list of all VM scale sets under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_List_MaximumSet_Gen.json | -| [virtualMachineScaleSetsListSkusSample.ts][virtualmachinescalesetslistskussample] | Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListSkus_MaximumSet_Gen.json | -| [virtualMachineScaleSetsPerformMaintenanceSample.ts][virtualmachinescalesetsperformmaintenancesample] | Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PerformMaintenance_MaximumSet_Gen.json | -| [virtualMachineScaleSetsPowerOffSample.ts][virtualmachinescalesetspoweroffsample] | Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MaximumSet_Gen.json | -| [virtualMachineScaleSetsReapplySample.ts][virtualmachinescalesetsreapplysample] | Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Reapply_MaximumSet_Gen.json | -| [virtualMachineScaleSetsRedeploySample.ts][virtualmachinescalesetsredeploysample] | Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Redeploy_MaximumSet_Gen.json | -| [virtualMachineScaleSetsReimageAllSample.ts][virtualmachinescalesetsreimageallsample] | Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ReimageAll_MaximumSet_Gen.json | -| [virtualMachineScaleSetsReimageSample.ts][virtualmachinescalesetsreimagesample] | Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Reimage_MaximumSet_Gen.json | -| [virtualMachineScaleSetsRestartSample.ts][virtualmachinescalesetsrestartsample] | Restarts one or more virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Restart_MaximumSet_Gen.json | -| [virtualMachineScaleSetsSetOrchestrationServiceStateSample.ts][virtualmachinescalesetssetorchestrationservicestatesample] | Changes ServiceState property for a given service x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_SetOrchestrationServiceState_MaximumSet_Gen.json | -| [virtualMachineScaleSetsStartSample.ts][virtualmachinescalesetsstartsample] | Starts one or more virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Start_MaximumSet_Gen.json | -| [virtualMachineScaleSetsUpdateInstancesSample.ts][virtualmachinescalesetsupdateinstancessample] | Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_UpdateInstances_MaximumSet_Gen.json | -| [virtualMachineScaleSetsUpdateSample.ts][virtualmachinescalesetsupdatesample] | Update a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Update_MaximumSet_Gen.json | -| [virtualMachineSizesListSample.ts][virtualmachinesizeslistsample] | This API is deprecated. Use [Resources Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/VirtualMachineSizes_List_MaximumSet_Gen.json | -| [virtualMachinesAssessPatchesSample.ts][virtualmachinesassesspatchessample] | Assess patches on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_AssessPatches.json | -| [virtualMachinesAttachDetachDataDisksSample.ts][virtualmachinesattachdetachdatadiskssample] | Attach and detach data disks to/from the virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_AttachDetachDataDisks_MaximumSet_Gen.json | -| [virtualMachinesCaptureSample.ts][virtualmachinescapturesample] | Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Capture_MaximumSet_Gen.json | -| [virtualMachinesConvertToManagedDisksSample.ts][virtualmachinesconverttomanageddiskssample] | Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ConvertToManagedDisks_MaximumSet_Gen.json | -| [virtualMachinesCreateOrUpdateSample.ts][virtualmachinescreateorupdatesample] | The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithPatchSettingAssessmentModeOfImageDefault.json | -| [virtualMachinesDeallocateSample.ts][virtualmachinesdeallocatesample] | Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Deallocate_MaximumSet_Gen.json | -| [virtualMachinesDeleteSample.ts][virtualmachinesdeletesample] | The operation to delete a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Delete_Force.json | -| [virtualMachinesGeneralizeSample.ts][virtualmachinesgeneralizesample] | Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Generalize.json | -| [virtualMachinesGetSample.ts][virtualmachinesgetsample] | Retrieves information about the model view or the instance view of a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Get.json | -| [virtualMachinesInstallPatchesSample.ts][virtualmachinesinstallpatchessample] | Installs patches on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_InstallPatches.json | -| [virtualMachinesInstanceViewSample.ts][virtualmachinesinstanceviewsample] | Retrieves information about the run-time state of a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Get_InstanceView.json | -| [virtualMachinesListAllSample.ts][virtualmachineslistallsample] | Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListAll_MaximumSet_Gen.json | -| [virtualMachinesListAvailableSizesSample.ts][virtualmachineslistavailablesizessample] | Lists all available virtual machine sizes to which the specified virtual machine can be resized. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListAvailableVmSizes.json | -| [virtualMachinesListByLocationSample.ts][virtualmachineslistbylocationsample] | Gets all the virtual machines under the specified subscription for the specified location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListBySubscription_ByLocation.json | -| [virtualMachinesListSample.ts][virtualmachineslistsample] | Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_List_MaximumSet_Gen.json | -| [virtualMachinesPerformMaintenanceSample.ts][virtualmachinesperformmaintenancesample] | The operation to perform maintenance on a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PerformMaintenance_MaximumSet_Gen.json | -| [virtualMachinesPowerOffSample.ts][virtualmachinespoweroffsample] | The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MaximumSet_Gen.json | -| [virtualMachinesReapplySample.ts][virtualmachinesreapplysample] | The operation to reapply a virtual machine's state. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Reapply.json | -| [virtualMachinesRedeploySample.ts][virtualmachinesredeploysample] | Shuts down the virtual machine, moves it to a new node, and powers it back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Redeploy_MaximumSet_Gen.json | -| [virtualMachinesReimageSample.ts][virtualmachinesreimagesample] | Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Reimage_NonEphemeralVMs.json | -| [virtualMachinesRestartSample.ts][virtualmachinesrestartsample] | The operation to restart a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Restart_MaximumSet_Gen.json | -| [virtualMachinesRetrieveBootDiagnosticsDataSample.ts][virtualmachinesretrievebootdiagnosticsdatasample] | The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_RetrieveBootDiagnosticsData.json | -| [virtualMachinesRunCommandSample.ts][virtualmachinesruncommandsample] | Run command on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand.json | -| [virtualMachinesSimulateEvictionSample.ts][virtualmachinessimulateevictionsample] | The operation to simulate the eviction of spot virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_SimulateEviction.json | -| [virtualMachinesStartSample.ts][virtualmachinesstartsample] | The operation to start a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Start_MaximumSet_Gen.json | -| [virtualMachinesUpdateSample.ts][virtualmachinesupdatesample] | The operation to update a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Update_DetachDataDiskUsingToBeDetachedProperty.json | +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [availabilitySetsCreateOrUpdateSample.ts][availabilitysetscreateorupdatesample] | Create or update an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Create_WithScheduledEventProfile.json | +| [availabilitySetsDeleteSample.ts][availabilitysetsdeletesample] | Delete an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Delete_MaximumSet_Gen.json | +| [availabilitySetsGetSample.ts][availabilitysetsgetsample] | Retrieves information about an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Get_MaximumSet_Gen.json | +| [availabilitySetsListAvailableSizesSample.ts][availabilitysetslistavailablesizessample] | Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_ListAvailableSizes_MaximumSet_Gen.json | +| [availabilitySetsListBySubscriptionSample.ts][availabilitysetslistbysubscriptionsample] | Lists all availability sets in a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_ListBySubscription.json | +| [availabilitySetsListSample.ts][availabilitysetslistsample] | Lists all availability sets in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_List_MaximumSet_Gen.json | +| [availabilitySetsUpdateSample.ts][availabilitysetsupdatesample] | Update an availability set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/availabilitySetExamples/AvailabilitySet_Update_MaximumSet_Gen.json | +| [capacityReservationGroupsCreateOrUpdateSample.ts][capacityreservationgroupscreateorupdatesample] | The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_CreateOrUpdate.json | +| [capacityReservationGroupsDeleteSample.ts][capacityreservationgroupsdeletesample] | The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Delete_MaximumSet_Gen.json | +| [capacityReservationGroupsGetSample.ts][capacityreservationgroupsgetsample] | The operation that retrieves information about a capacity reservation group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Get.json | +| [capacityReservationGroupsListByResourceGroupSample.ts][capacityreservationgroupslistbyresourcegroupsample] | Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_ListByResourceGroup.json | +| [capacityReservationGroupsListBySubscriptionSample.ts][capacityreservationgroupslistbysubscriptionsample] | Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_ListBySubscription.json | +| [capacityReservationGroupsUpdateSample.ts][capacityreservationgroupsupdatesample] | The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservationGroup_Update_MaximumSet_Gen.json | +| [capacityReservationsCreateOrUpdateSample.ts][capacityreservationscreateorupdatesample] | The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_CreateOrUpdate.json | +| [capacityReservationsDeleteSample.ts][capacityreservationsdeletesample] | The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Delete_MaximumSet_Gen.json | +| [capacityReservationsGetSample.ts][capacityreservationsgetsample] | The operation that retrieves information about the capacity reservation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Get.json | +| [capacityReservationsListByCapacityReservationGroupSample.ts][capacityreservationslistbycapacityreservationgroupsample] | Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_ListByReservationGroup.json | +| [capacityReservationsUpdateSample.ts][capacityreservationsupdatesample] | The operation to update a capacity reservation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/capacityReservationExamples/CapacityReservation_Update_MaximumSet_Gen.json | +| [cloudServiceOperatingSystemsGetOSFamilySample.ts][cloudserviceoperatingsystemsgetosfamilysample] | Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSFamily_Get.json | +| [cloudServiceOperatingSystemsGetOSVersionSample.ts][cloudserviceoperatingsystemsgetosversionsample] | Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSVersion_Get.json | +| [cloudServiceOperatingSystemsListOSFamiliesSample.ts][cloudserviceoperatingsystemslistosfamiliessample] | Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSFamilies_List.json | +| [cloudServiceOperatingSystemsListOSVersionsSample.ts][cloudserviceoperatingsystemslistosversionssample] | Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceOSVersion_List.json | +| [cloudServiceRoleInstancesDeleteSample.ts][cloudserviceroleinstancesdeletesample] | Deletes a role instance from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Delete.json | +| [cloudServiceRoleInstancesGetInstanceViewSample.ts][cloudserviceroleinstancesgetinstanceviewsample] | Retrieves information about the run-time state of a role instance in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_InstanceView.json | +| [cloudServiceRoleInstancesGetRemoteDesktopFileSample.ts][cloudserviceroleinstancesgetremotedesktopfilesample] | Gets a remote desktop file for a role instance in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_RemoteDesktopFile.json | +| [cloudServiceRoleInstancesGetSample.ts][cloudserviceroleinstancesgetsample] | Gets a role instance from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get.json | +| [cloudServiceRoleInstancesListSample.ts][cloudserviceroleinstanceslistsample] | Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRolesInstance_List.json | +| [cloudServiceRoleInstancesRebuildSample.ts][cloudserviceroleinstancesrebuildsample] | The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Rebuild.json | +| [cloudServiceRoleInstancesReimageSample.ts][cloudserviceroleinstancesreimagesample] | The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Reimage.json | +| [cloudServiceRoleInstancesRestartSample.ts][cloudserviceroleinstancesrestartsample] | The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Restart.json | +| [cloudServiceRolesGetSample.ts][cloudservicerolesgetsample] | Gets a role from a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRole_Get.json | +| [cloudServiceRolesListSample.ts][cloudserviceroleslistsample] | Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRole_List.json | +| [cloudServicesCreateOrUpdateSample.ts][cloudservicescreateorupdatesample] | Create or update a cloud service. Please note some properties can be set only during cloud service creation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Create_WithMultiRole.json | +| [cloudServicesDeleteInstancesSample.ts][cloudservicesdeleteinstancessample] | Deletes role instances in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Delete_ByCloudService.json | +| [cloudServicesDeleteSample.ts][cloudservicesdeletesample] | Deletes a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Delete.json | +| [cloudServicesGetInstanceViewSample.ts][cloudservicesgetinstanceviewsample] | Gets the status of a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Get_InstanceViewWithMultiRole.json | +| [cloudServicesGetSample.ts][cloudservicesgetsample] | Display information about a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Get_WithMultiRoleAndRDP.json | +| [cloudServicesListAllSample.ts][cloudserviceslistallsample] | Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_List_BySubscription.json | +| [cloudServicesListSample.ts][cloudserviceslistsample] | Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_List_ByResourceGroup.json | +| [cloudServicesPowerOffSample.ts][cloudservicespoweroffsample] | Power off the cloud service. Note that resources are still attached and you are getting charged for the resources. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_PowerOff.json | +| [cloudServicesRebuildSample.ts][cloudservicesrebuildsample] | Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Rebuild_ByCloudService.json | +| [cloudServicesReimageSample.ts][cloudservicesreimagesample] | Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Reimage_ByCloudService.json | +| [cloudServicesRestartSample.ts][cloudservicesrestartsample] | Restarts one or more role instances in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Restart_ByCloudService.json | +| [cloudServicesStartSample.ts][cloudservicesstartsample] | Starts the cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Start.json | +| [cloudServicesUpdateDomainGetUpdateDomainSample.ts][cloudservicesupdatedomaingetupdatedomainsample] | Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_Get.json | +| [cloudServicesUpdateDomainListUpdateDomainsSample.ts][cloudservicesupdatedomainlistupdatedomainssample] | Gets a list of all update domains in a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_List.json | +| [cloudServicesUpdateDomainWalkUpdateDomainSample.ts][cloudservicesupdatedomainwalkupdatedomainsample] | Updates the role instances in the specified update domain. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceUpdateDomain_Update.json | +| [cloudServicesUpdateSample.ts][cloudservicesupdatesample] | Update a cloud service. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudService_Update_ToIncludeTags.json | +| [communityGalleriesGetSample.ts][communitygalleriesgetsample] | Get a community gallery by gallery public name. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGallery_Get.json | +| [communityGalleryImageVersionsGetSample.ts][communitygalleryimageversionsgetsample] | Get a community gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json | +| [communityGalleryImageVersionsListSample.ts][communitygalleryimageversionslistsample] | List community gallery image versions inside an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json | +| [communityGalleryImagesGetSample.ts][communitygalleryimagesgetsample] | Get a community gallery image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json | +| [communityGalleryImagesListSample.ts][communitygalleryimageslistsample] | List community gallery images inside a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json | +| [dedicatedHostGroupsCreateOrUpdateSample.ts][dedicatedhostgroupscreateorupdatesample] | Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_CreateOrUpdate_WithUltraSSD.json | +| [dedicatedHostGroupsDeleteSample.ts][dedicatedhostgroupsdeletesample] | Delete a dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Delete_MaximumSet_Gen.json | +| [dedicatedHostGroupsGetSample.ts][dedicatedhostgroupsgetsample] | Retrieves information about a dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Get.json | +| [dedicatedHostGroupsListByResourceGroupSample.ts][dedicatedhostgroupslistbyresourcegroupsample] | Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_ListByResourceGroup_MaximumSet_Gen.json | +| [dedicatedHostGroupsListBySubscriptionSample.ts][dedicatedhostgroupslistbysubscriptionsample] | Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_ListBySubscription_MaximumSet_Gen.json | +| [dedicatedHostGroupsUpdateSample.ts][dedicatedhostgroupsupdatesample] | Update an dedicated host group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHostGroup_Update_MaximumSet_Gen.json | +| [dedicatedHostsCreateOrUpdateSample.ts][dedicatedhostscreateorupdatesample] | Create or update a dedicated host . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_CreateOrUpdate.json | +| [dedicatedHostsDeleteSample.ts][dedicatedhostsdeletesample] | Delete a dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Delete_MaximumSet_Gen.json | +| [dedicatedHostsGetSample.ts][dedicatedhostsgetsample] | Retrieves information about a dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Get.json | +| [dedicatedHostsListAvailableSizesSample.ts][dedicatedhostslistavailablesizessample] | Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_ListAvailableSizes.json | +| [dedicatedHostsListByHostGroupSample.ts][dedicatedhostslistbyhostgroupsample] | Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_ListByHostGroup_MaximumSet_Gen.json | +| [dedicatedHostsRedeploySample.ts][dedicatedhostsredeploysample] | Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Redeploy.json | +| [dedicatedHostsRestartSample.ts][dedicatedhostsrestartsample] | Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Restart.json | +| [dedicatedHostsUpdateSample.ts][dedicatedhostsupdatesample] | Update a dedicated host . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/dedicatedHostExamples/DedicatedHost_Update_MaximumSet_Gen.json | +| [diskAccessesCreateOrUpdateSample.ts][diskaccessescreateorupdatesample] | Creates or updates a disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Create.json | +| [diskAccessesDeleteAPrivateEndpointConnectionSample.ts][diskaccessesdeleteaprivateendpointconnectionsample] | Deletes a private endpoint connection under a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Delete.json | +| [diskAccessesDeleteSample.ts][diskaccessesdeletesample] | Deletes a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Delete.json | +| [diskAccessesGetAPrivateEndpointConnectionSample.ts][diskaccessesgetaprivateendpointconnectionsample] | Gets information about a private endpoint connection under a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Get.json | +| [diskAccessesGetPrivateLinkResourcesSample.ts][diskaccessesgetprivatelinkresourcessample] | Gets the private link resources possible under disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateLinkResources_Get.json | +| [diskAccessesGetSample.ts][diskaccessesgetsample] | Gets information about a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Get_WithPrivateEndpoints.json | +| [diskAccessesListByResourceGroupSample.ts][diskaccesseslistbyresourcegroupsample] | Lists all the disk access resources under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_ListByResourceGroup.json | +| [diskAccessesListPrivateEndpointConnectionsSample.ts][diskaccesseslistprivateendpointconnectionssample] | List information about private endpoint connections under a disk access resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_ListByDiskAccess.json | +| [diskAccessesListSample.ts][diskaccesseslistsample] | Lists all the disk access resources under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_ListBySubscription.json | +| [diskAccessesUpdateAPrivateEndpointConnectionSample.ts][diskaccessesupdateaprivateendpointconnectionsample] | Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccessPrivateEndpointConnection_Approve.json | +| [diskAccessesUpdateSample.ts][diskaccessesupdatesample] | Updates (patches) a disk access resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskAccessExamples/DiskAccess_Update.json | +| [diskEncryptionSetsCreateOrUpdateSample.ts][diskencryptionsetscreateorupdatesample] | Creates or updates a disk encryption set x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Create_WithKeyVaultFromADifferentSubscription.json | +| [diskEncryptionSetsDeleteSample.ts][diskencryptionsetsdeletesample] | Deletes a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Delete.json | +| [diskEncryptionSetsGetSample.ts][diskencryptionsetsgetsample] | Gets information about a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Get_WithAutoKeyRotationError.json | +| [diskEncryptionSetsListAssociatedResourcesSample.ts][diskencryptionsetslistassociatedresourcessample] | Lists all resources that are encrypted with this disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListAssociatedResources.json | +| [diskEncryptionSetsListByResourceGroupSample.ts][diskencryptionsetslistbyresourcegroupsample] | Lists all the disk encryption sets under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListByResourceGroup.json | +| [diskEncryptionSetsListSample.ts][diskencryptionsetslistsample] | Lists all the disk encryption sets under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_ListBySubscription.json | +| [diskEncryptionSetsUpdateSample.ts][diskencryptionsetsupdatesample] | Updates (patches) a disk encryption set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskEncryptionSetExamples/DiskEncryptionSet_Update_WithRotationToLatestKeyVersionEnabled.json | +| [diskRestorePointGetSample.ts][diskrestorepointgetsample] | Get disk restorePoint resource x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_Get.json | +| [diskRestorePointGrantAccessSample.ts][diskrestorepointgrantaccesssample] | Grants access to a diskRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_BeginGetAccess.json | +| [diskRestorePointListByRestorePointSample.ts][diskrestorepointlistbyrestorepointsample] | Lists diskRestorePoints under a vmRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_ListByVmRestorePoint.json | +| [diskRestorePointRevokeAccessSample.ts][diskrestorepointrevokeaccesssample] | Revokes access to a diskRestorePoint. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskRestorePointExamples/DiskRestorePoint_EndGetAccess.json | +| [disksCreateOrUpdateSample.ts][diskscreateorupdatesample] | Creates or updates a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Create_ConfidentialVMSupportedDiskEncryptedWithCMK.json | +| [disksDeleteSample.ts][disksdeletesample] | Deletes a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Delete.json | +| [disksGetSample.ts][disksgetsample] | Gets information about a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_Get.json | +| [disksGrantAccessSample.ts][disksgrantaccesssample] | Grants access to a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_BeginGetAccess.json | +| [disksListByResourceGroupSample.ts][diskslistbyresourcegroupsample] | Lists all the disks under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_ListByResourceGroup.json | +| [disksListSample.ts][diskslistsample] | Lists all the disks under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_ListBySubscription.json | +| [disksRevokeAccessSample.ts][disksrevokeaccesssample] | Revokes access to a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_EndGetAccess.json | +| [disksUpdateSample.ts][disksupdatesample] | Updates (patches) a disk. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/diskExamples/Disk_CreateOrUpdate_BurstingEnabled.json | +| [galleriesCreateOrUpdateSample.ts][galleriescreateorupdatesample] | Create or update a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Create.json | +| [galleriesDeleteSample.ts][galleriesdeletesample] | Delete a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Delete.json | +| [galleriesGetSample.ts][galleriesgetsample] | Retrieves information about a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Get.json | +| [galleriesListByResourceGroupSample.ts][gallerieslistbyresourcegroupsample] | List galleries under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListByResourceGroup.json | +| [galleriesListSample.ts][gallerieslistsample] | List galleries under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListBySubscription.json | +| [galleriesUpdateSample.ts][galleriesupdatesample] | Update a Shared Image Gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Update.json | +| [galleryApplicationVersionsCreateOrUpdateSample.ts][galleryapplicationversionscreateorupdatesample] | Create or update a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Create.json | +| [galleryApplicationVersionsDeleteSample.ts][galleryapplicationversionsdeletesample] | Delete a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json | +| [galleryApplicationVersionsGetSample.ts][galleryapplicationversionsgetsample] | Retrieves information about a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json | +| [galleryApplicationVersionsListByGalleryApplicationSample.ts][galleryapplicationversionslistbygalleryapplicationsample] | List gallery Application Versions in a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json | +| [galleryApplicationVersionsUpdateSample.ts][galleryapplicationversionsupdatesample] | Update a gallery Application Version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Update.json | +| [galleryApplicationsCreateOrUpdateSample.ts][galleryapplicationscreateorupdatesample] | Create or update a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Create.json | +| [galleryApplicationsDeleteSample.ts][galleryapplicationsdeletesample] | Delete a gallery Application. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Delete.json | +| [galleryApplicationsGetSample.ts][galleryapplicationsgetsample] | Retrieves information about a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Get.json | +| [galleryApplicationsListByGallerySample.ts][galleryapplicationslistbygallerysample] | List gallery Application Definitions in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_ListByGallery.json | +| [galleryApplicationsUpdateSample.ts][galleryapplicationsupdatesample] | Update a gallery Application Definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Update.json | +| [galleryImageVersionsCreateOrUpdateSample.ts][galleryimageversionscreateorupdatesample] | Create or update a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json | +| [galleryImageVersionsDeleteSample.ts][galleryimageversionsdeletesample] | Delete a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Delete.json | +| [galleryImageVersionsGetSample.ts][galleryimageversionsgetsample] | Retrieves information about a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json | +| [galleryImageVersionsListByGalleryImageSample.ts][galleryimageversionslistbygalleryimagesample] | List gallery image versions in a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json | +| [galleryImageVersionsUpdateSample.ts][galleryimageversionsupdatesample] | Update a gallery image version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update_RestoreSoftDeleted.json | +| [galleryImagesCreateOrUpdateSample.ts][galleryimagescreateorupdatesample] | Create or update a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Create.json | +| [galleryImagesDeleteSample.ts][galleryimagesdeletesample] | Delete a gallery image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Delete.json | +| [galleryImagesGetSample.ts][galleryimagesgetsample] | Retrieves information about a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Get.json | +| [galleryImagesListByGallerySample.ts][galleryimageslistbygallerysample] | List gallery image definitions in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_ListByGallery.json | +| [galleryImagesUpdateSample.ts][galleryimagesupdatesample] | Update a gallery image definition. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_UpdateFeatures.json | +| [galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts][galleryinvmaccesscontrolprofileversionscreateorupdatesample] | Create or update a gallery inVMAccessControlProfile version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Create.json | +| [galleryInVMAccessControlProfileVersionsDeleteSample.ts][galleryinvmaccesscontrolprofileversionsdeletesample] | Delete a gallery inVMAccessControlProfile version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Delete.json | +| [galleryInVMAccessControlProfileVersionsGetSample.ts][galleryinvmaccesscontrolprofileversionsgetsample] | Retrieves information about a gallery inVMAccessControlProfile version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json | +| [galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts][galleryinvmaccesscontrolprofileversionslistbygalleryinvmaccesscontrolprofilesample] | List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_ListByGalleryInVMAccessControlProfile.json | +| [galleryInVMAccessControlProfileVersionsUpdateSample.ts][galleryinvmaccesscontrolprofileversionsupdatesample] | Update a gallery inVMAccessControlProfile version. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Update.json | +| [galleryInVMAccessControlProfilesCreateOrUpdateSample.ts][galleryinvmaccesscontrolprofilescreateorupdatesample] | Create or update a gallery inVMAccessControlProfile. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Create.json | +| [galleryInVMAccessControlProfilesDeleteSample.ts][galleryinvmaccesscontrolprofilesdeletesample] | Delete a gallery inVMAccessControlProfile. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Delete.json | +| [galleryInVMAccessControlProfilesGetSample.ts][galleryinvmaccesscontrolprofilesgetsample] | Retrieves information about a gallery inVMAccessControlProfile. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json | +| [galleryInVMAccessControlProfilesListByGallerySample.ts][galleryinvmaccesscontrolprofileslistbygallerysample] | List gallery inVMAccessControlProfiles in a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_ListByGallery.json | +| [galleryInVMAccessControlProfilesUpdateSample.ts][galleryinvmaccesscontrolprofilesupdatesample] | Update a gallery inVMAccessControlProfile. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Update.json | +| [gallerySharingProfileUpdateSample.ts][gallerysharingprofileupdatesample] | Update sharing profile of a gallery. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_AddToSharingProfile.json | +| [imagesCreateOrUpdateSample.ts][imagescreateorupdatesample] | Create or update an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_CreateFromABlobWithDiskEncryptionSet.json | +| [imagesDeleteSample.ts][imagesdeletesample] | Deletes an Image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Images_Delete_MaximumSet_Gen.json | +| [imagesGetSample.ts][imagesgetsample] | Gets an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_Get.json | +| [imagesListByResourceGroupSample.ts][imageslistbyresourcegroupsample] | Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_ListByResourceGroup.json | +| [imagesListSample.ts][imageslistsample] | Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_ListBySubscription.json | +| [imagesUpdateSample.ts][imagesupdatesample] | Update an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/imageExamples/Image_Update.json | +| [logAnalyticsExportRequestRateByIntervalSample.ts][loganalyticsexportrequestratebyintervalsample] | Export logs that show Api requests made by this subscription in the given time window to show throttling activities. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/logAnalyticExamples/LogAnalytics_RequestRateByInterval.json | +| [logAnalyticsExportThrottledRequestsSample.ts][loganalyticsexportthrottledrequestssample] | Export logs that show total throttled Api requests for this subscription in the given time window. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/logAnalyticExamples/LogAnalytics_ThrottledRequests.json | +| [operationsListSample.ts][operationslistsample] | Gets a list of compute operations. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json | +| [proximityPlacementGroupsCreateOrUpdateSample.ts][proximityplacementgroupscreateorupdatesample] | Create or update a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_CreateOrUpdate.json | +| [proximityPlacementGroupsDeleteSample.ts][proximityplacementgroupsdeletesample] | Delete a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Delete.json | +| [proximityPlacementGroupsGetSample.ts][proximityplacementgroupsgetsample] | Retrieves information about a proximity placement group . x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Get.json | +| [proximityPlacementGroupsListByResourceGroupSample.ts][proximityplacementgroupslistbyresourcegroupsample] | Lists all proximity placement groups in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListByResourceGroup.json | +| [proximityPlacementGroupsListBySubscriptionSample.ts][proximityplacementgroupslistbysubscriptionsample] | Lists all proximity placement groups in a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListBySubscription.json | +| [proximityPlacementGroupsUpdateSample.ts][proximityplacementgroupsupdatesample] | Update a proximity placement group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Patch.json | +| [resourceSkusListSample.ts][resourceskuslistsample] | Gets the list of Microsoft.Compute SKUs available for your Subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkus.json | +| [restorePointCollectionsCreateOrUpdateSample.ts][restorepointcollectionscreateorupdatesample] | The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_CreateOrUpdate_ForCrossRegionCopy.json | +| [restorePointCollectionsDeleteSample.ts][restorepointcollectionsdeletesample] | The operation to delete the restore point collection. This operation will also delete all the contained restore points. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Delete_MaximumSet_Gen.json | +| [restorePointCollectionsGetSample.ts][restorepointcollectionsgetsample] | The operation to get the restore point collection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Get.json | +| [restorePointCollectionsListAllSample.ts][restorepointcollectionslistallsample] | Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_ListBySubscription.json | +| [restorePointCollectionsListSample.ts][restorepointcollectionslistsample] | Gets the list of restore point collections in a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_ListByResourceGroup.json | +| [restorePointCollectionsUpdateSample.ts][restorepointcollectionsupdatesample] | The operation to update the restore point collection. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePointCollection_Update_MaximumSet_Gen.json | +| [restorePointsCreateSample.ts][restorepointscreatesample] | The operation to create the restore point. Updating properties of an existing restore point is not allowed x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Copy_BetweenRegions.json | +| [restorePointsDeleteSample.ts][restorepointsdeletesample] | The operation to delete the restore point. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Delete_MaximumSet_Gen.json | +| [restorePointsGetSample.ts][restorepointsgetsample] | The operation to get the restore point. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/restorePointExamples/RestorePoint_Get.json | +| [sharedGalleriesGetSample.ts][sharedgalleriesgetsample] | Get a shared gallery by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_Get.json | +| [sharedGalleriesListSample.ts][sharedgallerieslistsample] | List shared galleries by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_List.json | +| [sharedGalleryImageVersionsGetSample.ts][sharedgalleryimageversionsgetsample] | Get a shared gallery image version by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json | +| [sharedGalleryImageVersionsListSample.ts][sharedgalleryimageversionslistsample] | List shared gallery image versions by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json | +| [sharedGalleryImagesGetSample.ts][sharedgalleryimagesgetsample] | Get a shared gallery image by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json | +| [sharedGalleryImagesListSample.ts][sharedgalleryimageslistsample] | List shared gallery images by subscription id or tenant id. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json | +| [snapshotsCreateOrUpdateSample.ts][snapshotscreateorupdatesample] | Creates or updates a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromADifferentSubscription.json | +| [snapshotsDeleteSample.ts][snapshotsdeletesample] | Deletes a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Delete.json | +| [snapshotsGetSample.ts][snapshotsgetsample] | Gets information about a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Get.json | +| [snapshotsGrantAccessSample.ts][snapshotsgrantaccesssample] | Grants access to a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_BeginGetAccess.json | +| [snapshotsListByResourceGroupSample.ts][snapshotslistbyresourcegroupsample] | Lists snapshots under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_ListByResourceGroup.json | +| [snapshotsListSample.ts][snapshotslistsample] | Lists snapshots under a subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_ListBySubscription.json | +| [snapshotsRevokeAccessSample.ts][snapshotsrevokeaccesssample] | Revokes access to a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_EndGetAccess.json | +| [snapshotsUpdateSample.ts][snapshotsupdatesample] | Updates (patches) a snapshot. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/examples/snapshotExamples/Snapshot_Update_WithAcceleratedNetwork.json | +| [softDeletedResourceListByArtifactNameSample.ts][softdeletedresourcelistbyartifactnamesample] | List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GallerySoftDeletedResource_ListByArtifactName.json | +| [sshPublicKeysCreateSample.ts][sshpublickeyscreatesample] | Creates a new SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Create.json | +| [sshPublicKeysDeleteSample.ts][sshpublickeysdeletesample] | Delete an SSH public key. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Delete_MaximumSet_Gen.json | +| [sshPublicKeysGenerateKeyPairSample.ts][sshpublickeysgeneratekeypairsample] | Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_GenerateKeyPair_EncryptionWithEd25519.json | +| [sshPublicKeysGetSample.ts][sshpublickeysgetsample] | Retrieves information about an SSH public key. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Get.json | +| [sshPublicKeysListByResourceGroupSample.ts][sshpublickeyslistbyresourcegroupsample] | Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_ListByResourceGroup_MaximumSet_Gen.json | +| [sshPublicKeysListBySubscriptionSample.ts][sshpublickeyslistbysubscriptionsample] | Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_ListBySubscription_MaximumSet_Gen.json | +| [sshPublicKeysUpdateSample.ts][sshpublickeysupdatesample] | Updates a new SSH public key resource. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/sshPublicKeyExamples/SshPublicKey_Update_MaximumSet_Gen.json | +| [usageListSample.ts][usagelistsample] | Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/Usage_List_MaximumSet_Gen.json | +| [virtualMachineExtensionImagesGetSample.ts][virtualmachineextensionimagesgetsample] | Gets a virtual machine extension image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_Get_MaximumSet_Gen.json | +| [virtualMachineExtensionImagesListTypesSample.ts][virtualmachineextensionimageslisttypessample] | Gets a list of virtual machine extension image types. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen.json | +| [virtualMachineExtensionImagesListVersionsSample.ts][virtualmachineextensionimageslistversionssample] | Gets a list of virtual machine extension image versions. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListVersions_MaximumSet_Gen.json | +| [virtualMachineExtensionsCreateOrUpdateSample.ts][virtualmachineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_CreateOrUpdate_MaximumSet_Gen.json | +| [virtualMachineExtensionsDeleteSample.ts][virtualmachineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Delete_MaximumSet_Gen.json | +| [virtualMachineExtensionsGetSample.ts][virtualmachineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Get_MaximumSet_Gen.json | +| [virtualMachineExtensionsListSample.ts][virtualmachineextensionslistsample] | The operation to get all extensions of a Virtual Machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_List_MaximumSet_Gen.json | +| [virtualMachineExtensionsUpdateSample.ts][virtualmachineextensionsupdatesample] | The operation to update the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachineExtension_Update.json | +| [virtualMachineImagesEdgeZoneGetSample.ts][virtualmachineimagesedgezonegetsample] | Gets a virtual machine image in an edge zone. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_Get_MaximumSet_Gen.json | +| [virtualMachineImagesEdgeZoneListOffersSample.ts][virtualmachineimagesedgezonelistofferssample] | Gets a list of virtual machine image offers for the specified location, edge zone and publisher. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListOffers_MaximumSet_Gen.json | +| [virtualMachineImagesEdgeZoneListPublishersSample.ts][virtualmachineimagesedgezonelistpublisherssample] | Gets a list of virtual machine image publishers for the specified Azure location and edge zone. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListPublishers_MaximumSet_Gen.json | +| [virtualMachineImagesEdgeZoneListSample.ts][virtualmachineimagesedgezonelistsample] | Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_List_MaximumSet_Gen.json | +| [virtualMachineImagesEdgeZoneListSkusSample.ts][virtualmachineimagesedgezonelistskussample] | Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListSkus_MaximumSet_Gen.json | +| [virtualMachineImagesGetSample.ts][virtualmachineimagesgetsample] | Gets a virtual machine image. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_Get_MaximumSet_Gen.json | +| [virtualMachineImagesListByEdgeZoneSample.ts][virtualmachineimageslistbyedgezonesample] | Gets a list of all virtual machine image versions for the specified edge zone x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json | +| [virtualMachineImagesListOffersSample.ts][virtualmachineimageslistofferssample] | Gets a list of virtual machine image offers for the specified location and publisher. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListOffers_MaximumSet_Gen.json | +| [virtualMachineImagesListPublishersSample.ts][virtualmachineimageslistpublisherssample] | Gets a list of virtual machine image publishers for the specified Azure location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListPublishers_MaximumSet_Gen.json | +| [virtualMachineImagesListSample.ts][virtualmachineimageslistsample] | Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_List_MaximumSet_Gen.json | +| [virtualMachineImagesListSkusSample.ts][virtualmachineimageslistskussample] | Gets a list of virtual machine image SKUs for the specified location, publisher, and offer. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineImageExamples/VirtualMachineImage_ListSkus_MaximumSet_Gen.json | +| [virtualMachineRunCommandsCreateOrUpdateSample.ts][virtualmachineruncommandscreateorupdatesample] | The operation to create or update the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_CreateOrUpdate.json | +| [virtualMachineRunCommandsDeleteSample.ts][virtualmachineruncommandsdeletesample] | The operation to delete the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Delete.json | +| [virtualMachineRunCommandsGetByVirtualMachineSample.ts][virtualmachineruncommandsgetbyvirtualmachinesample] | The operation to get the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Get.json | +| [virtualMachineRunCommandsGetSample.ts][virtualmachineruncommandsgetsample] | Gets specific run command for a subscription in a location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/RunCommand_Get.json | +| [virtualMachineRunCommandsListByVirtualMachineSample.ts][virtualmachineruncommandslistbyvirtualmachinesample] | The operation to get all run commands of a Virtual Machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_List.json | +| [virtualMachineRunCommandsListSample.ts][virtualmachineruncommandslistsample] | Lists all available run commands for a subscription in a location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/RunCommand_List.json | +| [virtualMachineRunCommandsUpdateSample.ts][virtualmachineruncommandsupdatesample] | The operation to update the run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand_Update.json | +| [virtualMachineScaleSetExtensionsCreateOrUpdateSample.ts][virtualmachinescalesetextensionscreateorupdatesample] | The operation to create or update an extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_CreateOrUpdate_MaximumSet_Gen.json | +| [virtualMachineScaleSetExtensionsDeleteSample.ts][virtualmachinescalesetextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Delete_MaximumSet_Gen.json | +| [virtualMachineScaleSetExtensionsGetSample.ts][virtualmachinescalesetextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MaximumSet_Gen.json | +| [virtualMachineScaleSetExtensionsListSample.ts][virtualmachinescalesetextensionslistsample] | Gets a list of all extensions in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_List_MaximumSet_Gen.json | +| [virtualMachineScaleSetExtensionsUpdateSample.ts][virtualmachinescalesetextensionsupdatesample] | The operation to update an extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Update_MaximumSet_Gen.json | +| [virtualMachineScaleSetRollingUpgradesCancelSample.ts][virtualmachinescalesetrollingupgradescancelsample] | Cancels the current virtual machine scale set rolling upgrade. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_Cancel_MaximumSet_Gen.json | +| [virtualMachineScaleSetRollingUpgradesGetLatestSample.ts][virtualmachinescalesetrollingupgradesgetlatestsample] | Gets the status of the latest virtual machine scale set rolling upgrade. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_GetLatest_MaximumSet_Gen.json | +| [virtualMachineScaleSetRollingUpgradesStartExtensionUpgradeSample.ts][virtualmachinescalesetrollingupgradesstartextensionupgradesample] | Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_RollingUpgrade.json | +| [virtualMachineScaleSetRollingUpgradesStartOSUpgradeSample.ts][virtualmachinescalesetrollingupgradesstartosupgradesample] | Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrade_StartOSUpgrade_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMExtensionsCreateOrUpdateSample.ts][virtualmachinescalesetvmextensionscreateorupdatesample] | The operation to create or update the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Create.json | +| [virtualMachineScaleSetVMExtensionsDeleteSample.ts][virtualmachinescalesetvmextensionsdeletesample] | The operation to delete the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Delete.json | +| [virtualMachineScaleSetVMExtensionsGetSample.ts][virtualmachinescalesetvmextensionsgetsample] | The operation to get the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Get.json | +| [virtualMachineScaleSetVMExtensionsListSample.ts][virtualmachinescalesetvmextensionslistsample] | The operation to get all extensions of an instance in Virtual Machine Scaleset. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_List.json | +| [virtualMachineScaleSetVMExtensionsUpdateSample.ts][virtualmachinescalesetvmextensionsupdatesample] | The operation to update the VMSS VM extension. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtension_Update.json | +| [virtualMachineScaleSetVMRunCommandsCreateOrUpdateSample.ts][virtualmachinescalesetvmruncommandscreateorupdatesample] | The operation to create or update the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_CreateOrUpdate.json | +| [virtualMachineScaleSetVMRunCommandsDeleteSample.ts][virtualmachinescalesetvmruncommandsdeletesample] | The operation to delete the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Delete.json | +| [virtualMachineScaleSetVMRunCommandsGetSample.ts][virtualmachinescalesetvmruncommandsgetsample] | The operation to get the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Get.json | +| [virtualMachineScaleSetVMRunCommandsListSample.ts][virtualmachinescalesetvmruncommandslistsample] | The operation to get all run commands of an instance in Virtual Machine Scaleset. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_List.json | +| [virtualMachineScaleSetVMRunCommandsUpdateSample.ts][virtualmachinescalesetvmruncommandsupdatesample] | The operation to update the VMSS VM run command. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Update.json | +| [virtualMachineScaleSetVMSApproveRollingUpgradeSample.ts][virtualmachinescalesetvmsapproverollingupgradesample] | Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_ApproveRollingUpgrade.json | +| [virtualMachineScaleSetVMSAttachDetachDataDisksSample.ts][virtualmachinescalesetvmsattachdetachdatadiskssample] | Attach and detach data disks to/from a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_AttachDetachDataDisks_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSDeallocateSample.ts][virtualmachinescalesetvmsdeallocatesample] | Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Deallocate_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSDeleteSample.ts][virtualmachinescalesetvmsdeletesample] | Deletes a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Delete_Force.json | +| [virtualMachineScaleSetVMSGetInstanceViewSample.ts][virtualmachinescalesetvmsgetinstanceviewsample] | Gets the status of a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_InstanceViewAutoPlacedOnDedicatedHostGroup.json | +| [virtualMachineScaleSetVMSGetSample.ts][virtualmachinescalesetvmsgetsample] | Gets a virtual machine from a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_WithUserData.json | +| [virtualMachineScaleSetVMSListSample.ts][virtualmachinescalesetvmslistsample] | Gets a list of all virtual machines in a VM scale sets. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_List_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSPerformMaintenanceSample.ts][virtualmachinescalesetvmsperformmaintenancesample] | Performs maintenance on a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PerformMaintenance_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSPowerOffSample.ts][virtualmachinescalesetvmspoweroffsample] | Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSRedeploySample.ts][virtualmachinescalesetvmsredeploysample] | Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Redeploy_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSReimageAllSample.ts][virtualmachinescalesetvmsreimageallsample] | Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_ReimageAll_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSReimageSample.ts][virtualmachinescalesetvmsreimagesample] | Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Reimage_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSRestartSample.ts][virtualmachinescalesetvmsrestartsample] | Restarts a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Restart_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSRetrieveBootDiagnosticsDataSample.ts][virtualmachinescalesetvmsretrievebootdiagnosticsdatasample] | The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_RetrieveBootDiagnosticsData.json | +| [virtualMachineScaleSetVMSRunCommandSample.ts][virtualmachinescalesetvmsruncommandsample] | Run command on a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand.json | +| [virtualMachineScaleSetVMSSimulateEvictionSample.ts][virtualmachinescalesetvmssimulateevictionsample] | The operation to simulate the eviction of spot virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_SimulateEviction.json | +| [virtualMachineScaleSetVMSStartSample.ts][virtualmachinescalesetvmsstartsample] | Starts a virtual machine in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Start_MaximumSet_Gen.json | +| [virtualMachineScaleSetVMSUpdateSample.ts][virtualmachinescalesetvmsupdatesample] | Updates a virtual machine of a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Update_MaximumSet_Gen.json | +| [virtualMachineScaleSetsApproveRollingUpgradeSample.ts][virtualmachinescalesetsapproverollingupgradesample] | Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ApproveRollingUpgrade.json | +| [virtualMachineScaleSetsConvertToSinglePlacementGroupSample.ts][virtualmachinescalesetsconverttosingleplacementgroupsample] | Converts SinglePlacementGroup property to false for a existing virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ConvertToSinglePlacementGroup_MaximumSet_Gen.json | +| [virtualMachineScaleSetsCreateOrUpdateSample.ts][virtualmachinescalesetscreateorupdatesample] | Create or update a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithExtensionsSuppressFailuresEnabled.json | +| [virtualMachineScaleSetsDeallocateSample.ts][virtualmachinescalesetsdeallocatesample] | Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Deallocate_MaximumSet_Gen.json | +| [virtualMachineScaleSetsDeleteInstancesSample.ts][virtualmachinescalesetsdeleteinstancessample] | Deletes virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_DeleteInstances_MaximumSet_Gen.json | +| [virtualMachineScaleSetsDeleteSample.ts][virtualmachinescalesetsdeletesample] | Deletes a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Delete_Force.json | +| [virtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkSample.ts][virtualmachinescalesetsforcerecoveryservicefabricplatformupdatedomainwalksample] | Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_MaximumSet_Gen.json | +| [virtualMachineScaleSetsGetInstanceViewSample.ts][virtualmachinescalesetsgetinstanceviewsample] | Gets the status of a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_GetInstanceView_MaximumSet_Gen.json | +| [virtualMachineScaleSetsGetOSUpgradeHistorySample.ts][virtualmachinescalesetsgetosupgradehistorysample] | Gets list of OS upgrades on a VM scale set instance. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_GetOSUpgradeHistory_MaximumSet_Gen.json | +| [virtualMachineScaleSetsGetSample.ts][virtualmachinescalesetsgetsample] | Display information about a virtual machine scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Get_WithDiskControllerType.json | +| [virtualMachineScaleSetsListAllSample.ts][virtualmachinescalesetslistallsample] | Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListAll_MaximumSet_Gen.json | +| [virtualMachineScaleSetsListByLocationSample.ts][virtualmachinescalesetslistbylocationsample] | Gets all the VM scale sets under the specified subscription for the specified location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListBySubscription_ByLocation.json | +| [virtualMachineScaleSetsListSample.ts][virtualmachinescalesetslistsample] | Gets a list of all VM scale sets under a resource group. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_List_MaximumSet_Gen.json | +| [virtualMachineScaleSetsListSkusSample.ts][virtualmachinescalesetslistskussample] | Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ListSkus_MaximumSet_Gen.json | +| [virtualMachineScaleSetsPerformMaintenanceSample.ts][virtualmachinescalesetsperformmaintenancesample] | Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PerformMaintenance_MaximumSet_Gen.json | +| [virtualMachineScaleSetsPowerOffSample.ts][virtualmachinescalesetspoweroffsample] | Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MaximumSet_Gen.json | +| [virtualMachineScaleSetsReapplySample.ts][virtualmachinescalesetsreapplysample] | Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Reapply_MaximumSet_Gen.json | +| [virtualMachineScaleSetsRedeploySample.ts][virtualmachinescalesetsredeploysample] | Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Redeploy_MaximumSet_Gen.json | +| [virtualMachineScaleSetsReimageAllSample.ts][virtualmachinescalesetsreimageallsample] | Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_ReimageAll_MaximumSet_Gen.json | +| [virtualMachineScaleSetsReimageSample.ts][virtualmachinescalesetsreimagesample] | Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Reimage_MaximumSet_Gen.json | +| [virtualMachineScaleSetsRestartSample.ts][virtualmachinescalesetsrestartsample] | Restarts one or more virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Restart_MaximumSet_Gen.json | +| [virtualMachineScaleSetsSetOrchestrationServiceStateSample.ts][virtualmachinescalesetssetorchestrationservicestatesample] | Changes ServiceState property for a given service x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_SetOrchestrationServiceState_MaximumSet_Gen.json | +| [virtualMachineScaleSetsStartSample.ts][virtualmachinescalesetsstartsample] | Starts one or more virtual machines in a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Start_MaximumSet_Gen.json | +| [virtualMachineScaleSetsUpdateInstancesSample.ts][virtualmachinescalesetsupdateinstancessample] | Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_UpdateInstances_MaximumSet_Gen.json | +| [virtualMachineScaleSetsUpdateSample.ts][virtualmachinescalesetsupdatesample] | Update a VM scale set. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Update_MaximumSet_Gen.json | +| [virtualMachineSizesListSample.ts][virtualmachinesizeslistsample] | This API is deprecated. Use [Resources Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/computeRPCommonExamples/VirtualMachineSizes_List_MaximumSet_Gen.json | +| [virtualMachinesAssessPatchesSample.ts][virtualmachinesassesspatchessample] | Assess patches on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_AssessPatches.json | +| [virtualMachinesAttachDetachDataDisksSample.ts][virtualmachinesattachdetachdatadiskssample] | Attach and detach data disks to/from the virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_AttachDetachDataDisks_MaximumSet_Gen.json | +| [virtualMachinesCaptureSample.ts][virtualmachinescapturesample] | Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Capture_MaximumSet_Gen.json | +| [virtualMachinesConvertToManagedDisksSample.ts][virtualmachinesconverttomanageddiskssample] | Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ConvertToManagedDisks_MaximumSet_Gen.json | +| [virtualMachinesCreateOrUpdateSample.ts][virtualmachinescreateorupdatesample] | The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithPatchSettingAssessmentModeOfImageDefault.json | +| [virtualMachinesDeallocateSample.ts][virtualmachinesdeallocatesample] | Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Deallocate_MaximumSet_Gen.json | +| [virtualMachinesDeleteSample.ts][virtualmachinesdeletesample] | The operation to delete a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Delete_Force.json | +| [virtualMachinesGeneralizeSample.ts][virtualmachinesgeneralizesample] | Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Generalize.json | +| [virtualMachinesGetSample.ts][virtualmachinesgetsample] | Retrieves information about the model view or the instance view of a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Get.json | +| [virtualMachinesInstallPatchesSample.ts][virtualmachinesinstallpatchessample] | Installs patches on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_InstallPatches.json | +| [virtualMachinesInstanceViewSample.ts][virtualmachinesinstanceviewsample] | Retrieves information about the run-time state of a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Get_InstanceView.json | +| [virtualMachinesListAllSample.ts][virtualmachineslistallsample] | Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListAll_MaximumSet_Gen.json | +| [virtualMachinesListAvailableSizesSample.ts][virtualmachineslistavailablesizessample] | Lists all available virtual machine sizes to which the specified virtual machine can be resized. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListAvailableVmSizes.json | +| [virtualMachinesListByLocationSample.ts][virtualmachineslistbylocationsample] | Gets all the virtual machines under the specified subscription for the specified location. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_ListBySubscription_ByLocation.json | +| [virtualMachinesListSample.ts][virtualmachineslistsample] | Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_List_MaximumSet_Gen.json | +| [virtualMachinesPerformMaintenanceSample.ts][virtualmachinesperformmaintenancesample] | The operation to perform maintenance on a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PerformMaintenance_MaximumSet_Gen.json | +| [virtualMachinesPowerOffSample.ts][virtualmachinespoweroffsample] | The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MaximumSet_Gen.json | +| [virtualMachinesReapplySample.ts][virtualmachinesreapplysample] | The operation to reapply a virtual machine's state. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Reapply.json | +| [virtualMachinesRedeploySample.ts][virtualmachinesredeploysample] | Shuts down the virtual machine, moves it to a new node, and powers it back on. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Redeploy_MaximumSet_Gen.json | +| [virtualMachinesReimageSample.ts][virtualmachinesreimagesample] | Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Reimage_NonEphemeralVMs.json | +| [virtualMachinesRestartSample.ts][virtualmachinesrestartsample] | The operation to restart a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Restart_MaximumSet_Gen.json | +| [virtualMachinesRetrieveBootDiagnosticsDataSample.ts][virtualmachinesretrievebootdiagnosticsdatasample] | The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_RetrieveBootDiagnosticsData.json | +| [virtualMachinesRunCommandSample.ts][virtualmachinesruncommandsample] | Run command on the VM. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/runCommandExamples/VirtualMachineRunCommand.json | +| [virtualMachinesSimulateEvictionSample.ts][virtualmachinessimulateevictionsample] | The operation to simulate the eviction of spot virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_SimulateEviction.json | +| [virtualMachinesStartSample.ts][virtualmachinesstartsample] | The operation to start a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Start_MaximumSet_Gen.json | +| [virtualMachinesUpdateSample.ts][virtualmachinesupdatesample] | The operation to update a virtual machine. x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_Update_DetachDataDiskUsingToBeDetachedProperty.json | ## Prerequisites @@ -464,6 +475,16 @@ Take a look at our [API Documentation][apiref] for more information about the AP [galleryimagesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesGetSample.ts [galleryimageslistbygallerysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesListByGallerySample.ts [galleryimagesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesUpdateSample.ts +[galleryinvmaccesscontrolprofileversionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts +[galleryinvmaccesscontrolprofileversionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsDeleteSample.ts +[galleryinvmaccesscontrolprofileversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsGetSample.ts +[galleryinvmaccesscontrolprofileversionslistbygalleryinvmaccesscontrolprofilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts +[galleryinvmaccesscontrolprofileversionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsUpdateSample.ts +[galleryinvmaccesscontrolprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesCreateOrUpdateSample.ts +[galleryinvmaccesscontrolprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesDeleteSample.ts +[galleryinvmaccesscontrolprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesGetSample.ts +[galleryinvmaccesscontrolprofileslistbygallerysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesListByGallerySample.ts +[galleryinvmaccesscontrolprofilesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesUpdateSample.ts [gallerysharingprofileupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/gallerySharingProfileUpdateSample.ts [imagescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/imagesCreateOrUpdateSample.ts [imagesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/imagesDeleteSample.ts @@ -504,6 +525,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [snapshotslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/snapshotsListSample.ts [snapshotsrevokeaccesssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/snapshotsRevokeAccessSample.ts [snapshotsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/snapshotsUpdateSample.ts +[softdeletedresourcelistbyartifactnamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/softDeletedResourceListByArtifactNameSample.ts [sshpublickeyscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/sshPublicKeysCreateSample.ts [sshpublickeysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/sshPublicKeysDeleteSample.ts [sshpublickeysgeneratekeypairsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/samples/v22/typescript/src/sshPublicKeysGenerateKeyPairSample.ts diff --git a/sdk/compute/arm-compute/samples/v22/typescript/package.json b/sdk/compute/arm-compute/samples/v22/typescript/package.json index 5e7eb8e30209..8878f5eeee2f 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/package.json +++ b/sdk/compute/arm-compute/samples/v22/typescript/package.json @@ -31,7 +31,7 @@ "dependencies": { "@azure/arm-compute": "latest", "dotenv": "latest", - "@azure/identity": "^4.0.1" + "@azure/identity": "^4.2.1" }, "devDependencies": { "@types/node": "^18.0.0", diff --git a/sdk/compute/arm-compute/samples/v22/typescript/sample.env b/sdk/compute/arm-compute/samples/v22/typescript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/sample.env +++ b/sdk/compute/arm-compute/samples/v22/typescript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleriesGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleriesGetSample.ts index a32c22450f48..df59c52aa6e7 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleriesGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleriesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a community gallery by gallery public name. * * @summary Get a community gallery by gallery public name. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGallery_Get.json */ async function getACommunityGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImageVersionsGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImageVersionsGetSample.ts index 6e1954e2fe7b..31ed6522c4a6 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImageVersionsGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImageVersionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a community gallery image version. * * @summary Get a community gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json */ async function getACommunityGalleryImageVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImageVersionsListSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImageVersionsListSample.ts index 4124b7701d09..e9c2413622f4 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImageVersionsListSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImageVersionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List community gallery image versions inside an image. * * @summary List community gallery image versions inside an image. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json */ async function listCommunityGalleryImageVersions() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImagesGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImagesGetSample.ts index ba0705c3f9c6..a82b6683635c 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImagesGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImagesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a community gallery image. * * @summary Get a community gallery image. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json */ async function getACommunityGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImagesListSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImagesListSample.ts index 32c46a871abc..98cc3812efae 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImagesListSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/communityGalleryImagesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List community gallery images inside a gallery. * * @summary List community gallery images inside a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json */ async function listCommunityGalleryImages() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesCreateOrUpdateSample.ts index 082790fdaf86..6baddf06b31a 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Create.json */ async function createACommunityGallery() { const subscriptionId = @@ -53,7 +53,7 @@ async function createACommunityGallery() { * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create_WithSharingProfile.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithSharingProfile.json */ async function createOrUpdateASimpleGalleryWithSharingProfile() { const subscriptionId = @@ -80,7 +80,7 @@ async function createOrUpdateASimpleGalleryWithSharingProfile() { * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create_SoftDeletionEnabled.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_SoftDeletionEnabled.json */ async function createOrUpdateASimpleGalleryWithSoftDeletionEnabled() { const subscriptionId = @@ -107,7 +107,40 @@ async function createOrUpdateASimpleGalleryWithSoftDeletionEnabled() { * This sample demonstrates how to Create or update a Shared Image Gallery. * * @summary Create or update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithManagedIdentity.json + */ +async function createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const gallery: Gallery = { + description: "This is the gallery description.", + identity: { + type: "SystemAssigned, UserAssigned", + userAssignedIdentities: { + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/myIdentity": + {}, + }, + }, + location: "West US", + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleries.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + gallery, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or update a Shared Image Gallery. + * + * @summary Create or update a Shared Image Gallery. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create.json */ async function createOrUpdateASimpleGallery() { const subscriptionId = @@ -133,6 +166,7 @@ async function main() { createACommunityGallery(); createOrUpdateASimpleGalleryWithSharingProfile(); createOrUpdateASimpleGalleryWithSoftDeletionEnabled(); + createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities(); createOrUpdateASimpleGallery(); } diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesDeleteSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesDeleteSample.ts index 2cdad8d821ab..3f03babba46a 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesDeleteSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Shared Image Gallery. * * @summary Delete a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Delete.json */ async function deleteAGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesGetSample.ts index 915d310529d9..27bce5984bc8 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesGetSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Get.json */ async function getACommunityGallery() { const subscriptionId = @@ -39,7 +39,7 @@ async function getACommunityGallery() { * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json */ async function getAGalleryWithExpandSharingProfileGroups() { const subscriptionId = @@ -63,7 +63,7 @@ async function getAGalleryWithExpandSharingProfileGroups() { * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json */ async function getAGalleryWithSelectPermissions() { const subscriptionId = @@ -87,7 +87,25 @@ async function getAGalleryWithSelectPermissions() { * This sample demonstrates how to Retrieves information about a Shared Image Gallery. * * @summary Retrieves information about a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithManagedIdentity.json + */ +async function getAGalleryWithSystemAssignedAndUserAssignedManagedIdentities() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleries.get(resourceGroupName, galleryName); + console.log(result); +} + +/** + * This sample demonstrates how to Retrieves information about a Shared Image Gallery. + * + * @summary Retrieves information about a Shared Image Gallery. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get.json */ async function getAGallery() { const subscriptionId = @@ -105,6 +123,7 @@ async function main() { getACommunityGallery(); getAGalleryWithExpandSharingProfileGroups(); getAGalleryWithSelectPermissions(); + getAGalleryWithSystemAssignedAndUserAssignedManagedIdentities(); getAGallery(); } diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesListByResourceGroupSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesListByResourceGroupSample.ts index 2b167c09f50a..e25764fe11fc 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesListByResourceGroupSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List galleries under a resource group. * * @summary List galleries under a resource group. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListByResourceGroup.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListByResourceGroup.json */ async function listGalleriesInAResourceGroup() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesListSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesListSample.ts index 728fa29bba77..1d212e7218ec 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesListSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List galleries under a subscription. * * @summary List galleries under a subscription. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListBySubscription.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListBySubscription.json */ async function listGalleriesInASubscription() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesUpdateSample.ts index 1a19b56f7ce2..f612622e6727 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleriesUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update a Shared Image Gallery. * * @summary Update a Shared Image Gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Update.json */ async function updateASimpleGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsCreateOrUpdateSample.ts index aaec62cdc642..928677cb0e49 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a gallery Application Version. * * @summary Create or update a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Create.json */ async function createOrUpdateASimpleGalleryApplicationVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsDeleteSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsDeleteSample.ts index 38f242f79412..d0afe5b65ac5 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsDeleteSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a gallery Application Version. * * @summary Delete a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json */ async function deleteAGalleryApplicationVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsGetSample.ts index 9fe6ca7bd9cb..4a80188f4822 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsGetSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a gallery Application Version. * * @summary Retrieves information about a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json */ async function getAGalleryApplicationVersionWithReplicationStatus() { const subscriptionId = @@ -49,7 +49,7 @@ async function getAGalleryApplicationVersionWithReplicationStatus() { * This sample demonstrates how to Retrieves information about a gallery Application Version. * * @summary Retrieves information about a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get.json */ async function getAGalleryApplicationVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsListByGalleryApplicationSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsListByGalleryApplicationSample.ts index 55a74ff36b20..877f057b0823 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsListByGalleryApplicationSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsListByGalleryApplicationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List gallery Application Versions in a gallery Application Definition. * * @summary List gallery Application Versions in a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json */ async function listGalleryApplicationVersionsInAGalleryApplicationDefinition() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsUpdateSample.ts index 3d1ebc4e9c7b..03bab4da4a87 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationVersionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update a gallery Application Version. * * @summary Update a gallery Application Version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Update.json */ async function updateASimpleGalleryApplicationVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsCreateOrUpdateSample.ts index 13ec8d872b01..14db5940329b 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a gallery Application Definition. * * @summary Create or update a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Create.json */ async function createOrUpdateASimpleGalleryApplication() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsDeleteSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsDeleteSample.ts index dbf8d2a74f6c..e4e81c83d864 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsDeleteSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a gallery Application. * * @summary Delete a gallery Application. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Delete.json */ async function deleteAGalleryApplication() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsGetSample.ts index c7241ed0da23..1f974747e26a 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a gallery Application Definition. * * @summary Retrieves information about a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Get.json */ async function getAGalleryApplication() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsListByGallerySample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsListByGallerySample.ts index b2a567fa665b..25f9c33cce37 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsListByGallerySample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsListByGallerySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List gallery Application Definitions in a gallery. * * @summary List gallery Application Definitions in a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_ListByGallery.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_ListByGallery.json */ async function listGalleryApplicationsInAGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsUpdateSample.ts index ac9c5128804e..6464bc6adb58 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryApplicationsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update a gallery Application Definition. * * @summary Update a gallery Application Definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Update.json */ async function updateASimpleGalleryApplication() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsCreateOrUpdateSample.ts index b3a2c2e67c30..286b59b4e6be 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { const subscriptionId = @@ -84,7 +84,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { virtualMachineId: @@ -108,7 +111,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithCommunityImageVersionAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithCommunityImageVersionAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource() { const subscriptionId = @@ -171,7 +174,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImag }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { communityGalleryImageId: @@ -195,7 +201,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImag * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create.json */ async function createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource() { const subscriptionId = @@ -258,7 +264,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}", @@ -281,7 +290,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource() { const subscriptionId = @@ -334,7 +343,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapsho }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { dataDiskImages: [ { @@ -369,7 +381,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapsho * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithShallowReplicationMode.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithShallowReplicationMode.json */ async function createOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode() { const subscriptionId = @@ -387,7 +399,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMo { name: "West US", excludeFromLatest: false, regionalReplicaCount: 1 }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}", @@ -410,7 +425,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMo * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithImageVersionAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithImageVersionAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource() { const subscriptionId = @@ -473,7 +488,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource( }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { source: { id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}", @@ -496,7 +514,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource( * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json */ async function createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() { const subscriptionId = @@ -549,7 +567,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { dataDiskImages: [ { @@ -584,7 +605,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD_UefiSettings.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD_UefiSettings.json */ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCustomUefiKeys() { const subscriptionId = @@ -624,7 +645,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCust }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, securityProfile: { uefiSettings: { additionalSignatures: { @@ -673,7 +697,7 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCust * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD.json */ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { const subscriptionId = @@ -713,7 +737,10 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { }, ], }, - safetyProfile: { allowDeletionOfReplicatedLocations: false }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, storageProfile: { dataDiskImages: [ { @@ -752,9 +779,9 @@ async function createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { * This sample demonstrates how to Create or update a gallery image version. * * @summary Create or update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithTargetExtendedLocations.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithAdditionalReplicaSets.json */ -async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified() { +async function createOrUpdateASimpleGalleryImageVersionWithDirectDriveReplicas() { const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = @@ -768,6 +795,9 @@ async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocatio targetRegions: [ { name: "West US", + additionalReplicaSets: [ + { regionalReplicaCount: 1, storageAccountType: "PreviumV2_LRS" }, + ], encryption: { dataDiskImages: [ { @@ -834,6 +864,95 @@ async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocatio console.log(result); } +/** + * This sample demonstrates how to Create or update a gallery image version. + * + * @summary Create or update a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithTargetExtendedLocations.json + */ +async function createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const galleryImageVersion: GalleryImageVersion = { + location: "West US", + publishingProfile: { + targetRegions: [ + { + name: "West US", + encryption: { + dataDiskImages: [ + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + lun: 0, + }, + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + lun: 1, + }, + ], + osDiskImage: { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + }, + }, + excludeFromLatest: false, + regionalReplicaCount: 1, + }, + { + name: "East US", + encryption: { + dataDiskImages: [ + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + lun: 0, + }, + { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + lun: 1, + }, + ], + osDiskImage: { + diskEncryptionSetId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + }, + }, + excludeFromLatest: false, + regionalReplicaCount: 2, + storageAccountType: "Standard_ZRS", + }, + ], + }, + safetyProfile: { + allowDeletionOfReplicatedLocations: false, + blockDeletionBeforeEndOfLife: false, + }, + storageProfile: { + source: { + id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + galleryImageVersion, + ); + console.log(result); +} + async function main() { createOrUpdateASimpleGalleryImageVersionUsingVMAsSource(); createOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource(); @@ -844,6 +963,7 @@ async function main() { createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource(); createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCustomUefiKeys(); createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource(); + createOrUpdateASimpleGalleryImageVersionWithDirectDriveReplicas(); createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified(); } diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsDeleteSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsDeleteSample.ts index 6a83e09ea49d..a267c08016bc 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsDeleteSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a gallery image version. * * @summary Delete a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Delete.json */ async function deleteAGalleryImageVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsGetSample.ts index 1c7ce8a851d1..1d35b8efe28e 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsGetSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json */ async function getAGalleryImageVersionWithReplicationStatus() { const subscriptionId = @@ -49,7 +49,7 @@ async function getAGalleryImageVersionWithReplicationStatus() { * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json */ async function getAGalleryImageVersionWithSnapshotsAsASource() { const subscriptionId = @@ -74,7 +74,63 @@ async function getAGalleryImageVersionWithSnapshotsAsASource() { * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithValidationProfileAndReplicationStatus.json + */ +async function getAGalleryImageVersionWithValidationProfileAndReplicationStatus() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const expand = "ValidationProfile,ReplicationStatus"; + const options: GalleryImageVersionsGetOptionalParams = { expand }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.get( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + options, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Retrieves information about a gallery image version. + * + * @summary Retrieves information about a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithValidationProfile.json + */ +async function getAGalleryImageVersionWithValidationProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const expand = "ValidationProfile"; + const options: GalleryImageVersionsGetOptionalParams = { expand }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.get( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + options, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Retrieves information about a gallery image version. + * + * @summary Retrieves information about a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json */ async function getAGalleryImageVersionWithVhdAsASource() { const subscriptionId = @@ -99,7 +155,7 @@ async function getAGalleryImageVersionWithVhdAsASource() { * This sample demonstrates how to Retrieves information about a gallery image version. * * @summary Retrieves information about a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get.json */ async function getAGalleryImageVersion() { const subscriptionId = @@ -123,6 +179,8 @@ async function getAGalleryImageVersion() { async function main() { getAGalleryImageVersionWithReplicationStatus(); getAGalleryImageVersionWithSnapshotsAsASource(); + getAGalleryImageVersionWithValidationProfileAndReplicationStatus(); + getAGalleryImageVersionWithValidationProfile(); getAGalleryImageVersionWithVhdAsASource(); getAGalleryImageVersion(); } diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsListByGalleryImageSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsListByGalleryImageSample.ts index c48a9f9f1add..b961a383fe8b 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsListByGalleryImageSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsListByGalleryImageSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List gallery image versions in a gallery image definition. * * @summary List gallery image versions in a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json */ async function listGalleryImageVersionsInAGalleryImageDefinition() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsUpdateSample.ts index e0e24976bbc0..d5019fef2415 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImageVersionsUpdateSample.ts @@ -21,7 +21,37 @@ dotenv.config(); * This sample demonstrates how to Update a gallery image version. * * @summary Update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update_RestoreSoftDeleted.json + */ +async function restoreASoftDeletedGalleryImageVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImageVersionName = "1.0.0"; + const galleryImageVersion: GalleryImageVersionUpdate = { + restore: true, + storageProfile: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImageVersions.beginUpdateAndWait( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + galleryImageVersion, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Update a gallery image version. + * + * @summary Update a gallery image version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update.json */ async function updateASimpleGalleryImageVersionManagedImageAsSource() { const subscriptionId = @@ -64,7 +94,7 @@ async function updateASimpleGalleryImageVersionManagedImageAsSource() { * This sample demonstrates how to Update a gallery image version. * * @summary Update a gallery image version. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update_WithoutSourceId.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update_WithoutSourceId.json */ async function updateASimpleGalleryImageVersionWithoutSourceId() { const subscriptionId = @@ -100,6 +130,7 @@ async function updateASimpleGalleryImageVersionWithoutSourceId() { } async function main() { + restoreASoftDeletedGalleryImageVersion(); updateASimpleGalleryImageVersionManagedImageAsSource(); updateASimpleGalleryImageVersionWithoutSourceId(); } diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesCreateOrUpdateSample.ts index 0f63a0191f57..828800ddcb95 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a gallery image definition. * * @summary Create or update a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Create.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Create.json */ async function createOrUpdateASimpleGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesDeleteSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesDeleteSample.ts index ef6bc052347f..f8831b8a9bc5 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesDeleteSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a gallery image. * * @summary Delete a gallery image. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Delete.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Delete.json */ async function deleteAGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesGetSample.ts index 2d523eaabfe3..e1237c4baa69 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about a gallery image definition. * * @summary Retrieves information about a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Get.json */ async function getAGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesListByGallerySample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesListByGallerySample.ts index 211a3cedfc09..846d63d29e2d 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesListByGallerySample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesListByGallerySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List gallery image definitions in a gallery. * * @summary List gallery image definitions in a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_ListByGallery.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_ListByGallery.json */ async function listGalleryImagesInAGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesUpdateSample.ts index caf15968df97..370d17715ab7 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryImagesUpdateSample.ts @@ -21,7 +21,49 @@ dotenv.config(); * This sample demonstrates how to Update a gallery image definition. * * @summary Update a gallery image definition. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Update.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_UpdateFeatures.json + */ +async function updateAGalleryImageFeature() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const galleryImageName = "myGalleryImageName"; + const galleryImage: GalleryImageUpdate = { + allowUpdateImage: true, + features: [ + { + name: "SecurityType", + startsAtVersion: "2.0.0", + value: "TrustedLaunch", + }, + ], + hyperVGeneration: "V2", + identifier: { + offer: "myOfferName", + publisher: "myPublisherName", + sku: "mySkuName", + }, + osState: "Generalized", + osType: "Windows", + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryImages.beginUpdateAndWait( + resourceGroupName, + galleryName, + galleryImageName, + galleryImage, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Update a gallery image definition. + * + * @summary Update a gallery image definition. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Update.json */ async function updateASimpleGalleryImage() { const subscriptionId = @@ -52,6 +94,7 @@ async function updateASimpleGalleryImage() { } async function main() { + updateAGalleryImageFeature(); updateASimpleGalleryImage(); } diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..f3a43a2ccff9 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsCreateOrUpdateSample.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GalleryInVMAccessControlProfileVersion, + ComputeManagementClient, +} from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create or update a gallery inVMAccessControlProfile version. + * + * @summary Create or update a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Create.json + */ +async function createOrUpdateAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersion = + { + defaultAccess: "Allow", + excludeFromLatest: false, + location: "West US", + mode: "Audit", + rules: { + identities: [ + { + name: "WinPA", + exePath: "C:\\Windows\\System32\\cscript.exe", + groupName: "Administrators", + processName: "cscript", + userName: "SYSTEM", + }, + ], + privileges: [ + { + name: "GoalState", + path: "/machine", + queryParameters: { comp: "goalstate" }, + }, + ], + roleAssignments: [{ identities: ["WinPA"], role: "Provisioning" }], + roles: [{ name: "Provisioning", privileges: ["GoalState"] }], + }, + targetLocations: [{ name: "West US" }, { name: "South Central US" }], + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfileVersions.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + ); + console.log(result); +} + +async function main() { + createOrUpdateAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsDeleteSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsDeleteSample.ts new file mode 100644 index 000000000000..e535fa714732 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete a gallery inVMAccessControlProfile version. + * + * @summary Delete a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Delete.json + */ +async function deleteAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfileVersions.beginDeleteAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + ); + console.log(result); +} + +async function main() { + deleteAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsGetSample.ts new file mode 100644 index 000000000000..63510405870d --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsGetSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Retrieves information about a gallery inVMAccessControlProfile version. + * + * @summary Retrieves information about a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json + */ +async function getAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfileVersions.get( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + ); + console.log(result); +} + +async function main() { + getAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts new file mode 100644 index 000000000000..7ae84b73d712 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsListByGalleryInVmaccessControlProfileSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + * + * @summary List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_ListByGalleryInVMAccessControlProfile.json + */ +async function listGalleryInVMAccessControlProfileVersionsInAGalleryInVmaccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.galleryInVMAccessControlProfileVersions.listByGalleryInVMAccessControlProfile( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGalleryInVMAccessControlProfileVersionsInAGalleryInVmaccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsUpdateSample.ts new file mode 100644 index 000000000000..6117d07ad951 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfileVersionsUpdateSample.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GalleryInVMAccessControlProfileVersionUpdate, + ComputeManagementClient, +} from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update a gallery inVMAccessControlProfile version. + * + * @summary Update a gallery inVMAccessControlProfile version. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Update.json + */ +async function updateAGalleryInVMAccessControlProfileVersion() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const inVMAccessControlProfileVersionName = "1.0.0"; + const galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersionUpdate = + { + defaultAccess: "Allow", + excludeFromLatest: false, + mode: "Audit", + targetLocations: [ + { name: "West US" }, + { name: "South Central US" }, + { name: "East US" }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfileVersions.beginUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + ); + console.log(result); +} + +async function main() { + updateAGalleryInVMAccessControlProfileVersion(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..f3d9f0b815d3 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesCreateOrUpdateSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GalleryInVMAccessControlProfile, + ComputeManagementClient, +} from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create or update a gallery inVMAccessControlProfile. + * + * @summary Create or update a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Create.json + */ +async function createOrUpdateAGalleryInVMAccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const galleryInVMAccessControlProfile: GalleryInVMAccessControlProfile = { + location: "West US", + properties: { applicableHostEndpoint: "WireServer", osType: "Linux" }, + }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfiles.beginCreateOrUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + ); + console.log(result); +} + +async function main() { + createOrUpdateAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesDeleteSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesDeleteSample.ts new file mode 100644 index 000000000000..1ed1bb92df19 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete a gallery inVMAccessControlProfile. + * + * @summary Delete a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Delete.json + */ +async function deleteAGalleryInVMAccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfiles.beginDeleteAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + ); + console.log(result); +} + +async function main() { + deleteAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesGetSample.ts new file mode 100644 index 000000000000..cbafaeb1dfa2 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesGetSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Retrieves information about a gallery inVMAccessControlProfile. + * + * @summary Retrieves information about a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json + */ +async function getAGalleryInVMAccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = await client.galleryInVMAccessControlProfiles.get( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + ); + console.log(result); +} + +async function main() { + getAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesListByGallerySample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesListByGallerySample.ts new file mode 100644 index 000000000000..7f3fe097cf93 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesListByGallerySample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List gallery inVMAccessControlProfiles in a gallery. + * + * @summary List gallery inVMAccessControlProfiles in a gallery. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_ListByGallery.json + */ +async function listGalleryInVMAccessControlProfilesInAGallery() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.galleryInVMAccessControlProfiles.listByGallery( + resourceGroupName, + galleryName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGalleryInVMAccessControlProfilesInAGallery(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesUpdateSample.ts new file mode 100644 index 000000000000..5b8d0b3506e7 --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/galleryInVMAccessControlProfilesUpdateSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GalleryInVMAccessControlProfileUpdate, + ComputeManagementClient, +} from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update a gallery inVMAccessControlProfile. + * + * @summary Update a gallery inVMAccessControlProfile. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Update.json + */ +async function updateAGalleryInVMAccessControlProfile() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const inVMAccessControlProfileName = "myInVMAccessControlProfileName"; + const galleryInVMAccessControlProfile: GalleryInVMAccessControlProfileUpdate = + { properties: { applicableHostEndpoint: "WireServer", osType: "Linux" } }; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const result = + await client.galleryInVMAccessControlProfiles.beginUpdateAndWait( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + ); + console.log(result); +} + +async function main() { + updateAGalleryInVMAccessControlProfile(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/gallerySharingProfileUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/gallerySharingProfileUpdateSample.ts index b3cbc70b8ce8..26ad68593601 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/gallerySharingProfileUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/gallerySharingProfileUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update sharing profile of a gallery. * * @summary Update sharing profile of a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_AddToSharingProfile.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_AddToSharingProfile.json */ async function addSharingIdToTheSharingProfileOfAGallery() { const subscriptionId = @@ -53,7 +53,7 @@ async function addSharingIdToTheSharingProfileOfAGallery() { * This sample demonstrates how to Update sharing profile of a gallery. * * @summary Update sharing profile of a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ResetSharingProfile.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ResetSharingProfile.json */ async function resetSharingProfileOfAGallery() { const subscriptionId = @@ -76,7 +76,7 @@ async function resetSharingProfileOfAGallery() { * This sample demonstrates how to Update sharing profile of a gallery. * * @summary Update sharing profile of a gallery. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_EnableCommunityGallery.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_EnableCommunityGallery.json */ async function shareAGalleryToCommunity() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleriesGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleriesGetSample.ts index 85674d442cf0..fce9fb7fb5dc 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleriesGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleriesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a shared gallery by subscription id or tenant id. * * @summary Get a shared gallery by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_Get.json */ async function getASharedGallery() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleriesListSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleriesListSample.ts index cf12445c658f..b823c23d6737 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleriesListSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleriesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List shared galleries by subscription id or tenant id. * * @summary List shared galleries by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_List.json */ async function listSharedGalleries() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImageVersionsGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImageVersionsGetSample.ts index 0fc9d92c351c..332159d62c5a 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImageVersionsGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImageVersionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a shared gallery image version by subscription id or tenant id. * * @summary Get a shared gallery image version by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json */ async function getASharedGalleryImageVersion() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImageVersionsListSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImageVersionsListSample.ts index 98ae70b401e2..ac4db5243044 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImageVersionsListSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImageVersionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List shared gallery image versions by subscription id or tenant id. * * @summary List shared gallery image versions by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json */ async function listSharedGalleryImageVersions() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImagesGetSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImagesGetSample.ts index 130e67be7970..b719a4b68f08 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImagesGetSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImagesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a shared gallery image by subscription id or tenant id. * * @summary Get a shared gallery image by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json */ async function getASharedGalleryImage() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImagesListSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImagesListSample.ts index be7c03622bf6..d9ddde2546f6 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImagesListSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/sharedGalleryImagesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List shared gallery images by subscription id or tenant id. * * @summary List shared gallery images by subscription id or tenant id. - * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json */ async function listSharedGalleryImages() { const subscriptionId = diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/softDeletedResourceListByArtifactNameSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/softDeletedResourceListByArtifactNameSample.ts new file mode 100644 index 000000000000..90e717b8306b --- /dev/null +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/softDeletedResourceListByArtifactNameSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { ComputeManagementClient } from "@azure/arm-compute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an image. + * + * @summary List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an image. + * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GallerySoftDeletedResource_ListByArtifactName.json + */ +async function listSoftDeletedResourcesOfAnArtifactInTheGallery() { + const subscriptionId = + process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["COMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const galleryName = "myGalleryName"; + const artifactType = "images"; + const artifactName = "myGalleryImageName"; + const credential = new DefaultAzureCredential(); + const client = new ComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.softDeletedResource.listByArtifactName( + resourceGroupName, + galleryName, + artifactType, + artifactName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listSoftDeletedResourcesOfAnArtifactInTheGallery(); +} + +main().catch(console.error); diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetVMSPowerOffSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetVMSPowerOffSample.ts index f89db1933a6a..295d100fd006 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetVMSPowerOffSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetVMSPowerOffSample.ts @@ -18,9 +18,9 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * - * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MaximumSet_Gen.json */ async function virtualMachineScaleSetVMPowerOffMaximumSetGen() { @@ -46,9 +46,9 @@ async function virtualMachineScaleSetVMPowerOffMaximumSetGen() { } /** - * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * - * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_PowerOff_MinimumSet_Gen.json */ async function virtualMachineScaleSetVMPowerOffMinimumSetGen() { diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetsCreateOrUpdateSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetsCreateOrUpdateSample.ts index f1c7fdf0aadf..520e61e62e72 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetsCreateOrUpdateSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetsCreateOrUpdateSample.ts @@ -2673,23 +2673,30 @@ async function createAScaleSetWithPriorityMixPolicy() { const parameters: VirtualMachineScaleSet = { location: "westus", orchestrationMode: "Flexible", + platformFaultDomainCount: 1, priorityMixPolicy: { - baseRegularPriorityCount: 4, + baseRegularPriorityCount: 10, regularPriorityPercentageAboveBase: 50, }, - singlePlacementGroup: false, - sku: { name: "Standard_A8m_v2", capacity: 10, tier: "Standard" }, + sku: { name: "Standard_A8m_v2", capacity: 2, tier: "Standard" }, virtualMachineProfile: { - billingProfile: { maxPrice: -1 }, - evictionPolicy: "Deallocate", networkProfile: { + networkApiVersion: "2020-11-01", networkInterfaceConfigurations: [ { name: "{vmss-name}", + enableAcceleratedNetworking: false, enableIPForwarding: true, ipConfigurations: [ { name: "{vmss-name}", + applicationGatewayBackendAddressPools: [], + loadBalancerBackendAddressPools: [], + primary: true, + publicIPAddressConfiguration: { + name: "{vmss-name}", + idleTimeoutInMinutes: 15, + }, subnet: { id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}", }, @@ -2707,9 +2714,9 @@ async function createAScaleSetWithPriorityMixPolicy() { priority: "Spot", storageProfile: { imageReference: { - offer: "WindowsServer", - publisher: "MicrosoftWindowsServer", - sku: "2016-Datacenter", + offer: "0001-com-ubuntu-server-focal", + publisher: "Canonical", + sku: "20_04-lts-gen2", version: "latest", }, osDisk: { diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetsPowerOffSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetsPowerOffSample.ts index 7611696082ee..5fc34298940b 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetsPowerOffSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachineScaleSetsPowerOffSample.ts @@ -19,9 +19,9 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * - * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MaximumSet_Gen.json */ async function virtualMachineScaleSetPowerOffMaximumSetGen() { @@ -49,9 +49,9 @@ async function virtualMachineScaleSetPowerOffMaximumSetGen() { } /** - * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * This sample demonstrates how to Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * - * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * @summary Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_PowerOff_MinimumSet_Gen.json */ async function virtualMachineScaleSetPowerOffMinimumSetGen() { diff --git a/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachinesPowerOffSample.ts b/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachinesPowerOffSample.ts index 6a96e46f5d9c..77bd42ca1efe 100644 --- a/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachinesPowerOffSample.ts +++ b/sdk/compute/arm-compute/samples/v22/typescript/src/virtualMachinesPowerOffSample.ts @@ -18,9 +18,9 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * - * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MaximumSet_Gen.json */ async function virtualMachinePowerOffMaximumSetGen() { @@ -42,9 +42,9 @@ async function virtualMachinePowerOffMaximumSetGen() { } /** - * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * This sample demonstrates how to The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * - * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + * @summary The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated. * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/examples/virtualMachineExamples/VirtualMachine_PowerOff_MinimumSet_Gen.json */ async function virtualMachinePowerOffMinimumSetGen() { diff --git a/sdk/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index c266e72e2ce4..3570f019c144 100644 --- a/sdk/compute/arm-compute/src/computeManagementClient.ts +++ b/sdk/compute/arm-compute/src/computeManagementClient.ts @@ -47,7 +47,10 @@ import { GalleryImageVersionsImpl, GalleryApplicationsImpl, GalleryApplicationVersionsImpl, + SoftDeletedResourceImpl, GallerySharingProfileImpl, + GalleryInVMAccessControlProfilesImpl, + GalleryInVMAccessControlProfileVersionsImpl, SharedGalleriesImpl, SharedGalleryImagesImpl, SharedGalleryImageVersionsImpl, @@ -98,7 +101,10 @@ import { GalleryImageVersions, GalleryApplications, GalleryApplicationVersions, + SoftDeletedResource, GallerySharingProfile, + GalleryInVMAccessControlProfiles, + GalleryInVMAccessControlProfileVersions, SharedGalleries, SharedGalleryImages, SharedGalleryImageVersions, @@ -145,7 +151,7 @@ export class ComputeManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-compute/22.1.1`; + const packageDetails = `azsdk-js-arm-compute/22.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -244,7 +250,12 @@ export class ComputeManagementClient extends coreClient.ServiceClient { this.galleryImageVersions = new GalleryImageVersionsImpl(this); this.galleryApplications = new GalleryApplicationsImpl(this); this.galleryApplicationVersions = new GalleryApplicationVersionsImpl(this); + this.softDeletedResource = new SoftDeletedResourceImpl(this); this.gallerySharingProfile = new GallerySharingProfileImpl(this); + this.galleryInVMAccessControlProfiles = + new GalleryInVMAccessControlProfilesImpl(this); + this.galleryInVMAccessControlProfileVersions = + new GalleryInVMAccessControlProfileVersionsImpl(this); this.sharedGalleries = new SharedGalleriesImpl(this); this.sharedGalleryImages = new SharedGalleryImagesImpl(this); this.sharedGalleryImageVersions = new SharedGalleryImageVersionsImpl(this); @@ -299,7 +310,10 @@ export class ComputeManagementClient extends coreClient.ServiceClient { galleryImageVersions: GalleryImageVersions; galleryApplications: GalleryApplications; galleryApplicationVersions: GalleryApplicationVersions; + softDeletedResource: SoftDeletedResource; gallerySharingProfile: GallerySharingProfile; + galleryInVMAccessControlProfiles: GalleryInVMAccessControlProfiles; + galleryInVMAccessControlProfileVersions: GalleryInVMAccessControlProfileVersions; sharedGalleries: SharedGalleries; sharedGalleryImages: SharedGalleryImages; sharedGalleryImageVersions: SharedGalleryImageVersions; diff --git a/sdk/compute/arm-compute/src/models/index.ts b/sdk/compute/arm-compute/src/models/index.ts index 4097b9dd04c9..40ca822f17de 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -1709,7 +1709,7 @@ export interface DataDisk { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly diskMBpsReadWrite?: number; - /** Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. */ + /** Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. */ detachOption?: DiskDetachOptionTypes; /** Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. */ deleteOption?: DiskDeleteOptionTypes; @@ -3769,6 +3769,26 @@ export interface RegionalSharingStatus { details?: string; } +/** Identity for the virtual machine. */ +export interface GalleryIdentity { + /** + * The principal id of the gallery identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The AAD tenant id of the gallery identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove all identities from the gallery. */ + type?: ResourceIdentityType; + /** The list of user identities associated with the gallery. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentitiesValue; + }; +} + /** The Update Resource model definition. */ export interface UpdateResourceDefinition { /** @@ -3838,6 +3858,8 @@ export interface GalleryImageFeature { name?: string; /** The value of the gallery image feature. */ value?: string; + /** The minimum gallery image version which supports this feature. */ + startsAtVersion?: string; } /** Describes the basic gallery artifact publishing profile. */ @@ -3875,6 +3897,8 @@ export interface TargetRegion { encryption?: EncryptionImages; /** Contains the flag setting to hide an image when users specify version='latest' */ excludeFromLatest?: boolean; + /** List of storage sku with replica count to create direct drive replicas. */ + additionalReplicaSets?: AdditionalReplicaSet[]; } /** Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. */ @@ -3899,6 +3923,14 @@ export interface DiskImageEncryption { diskEncryptionSetId?: string; } +/** Describes the additional replica set information. */ +export interface AdditionalReplicaSet { + /** Specifies the storage account type to be used to create the direct drive replicas */ + storageAccountType?: StorageAccountType; + /** The number of direct drive replicas of the Image Version to be created.This Property is updatable */ + regionalReplicaCount?: number; +} + export interface GalleryTargetExtendedLocation { /** The name of the region. */ name?: string; @@ -4034,6 +4066,41 @@ export interface UefiKey { value?: string[]; } +/** This is the validations profile of a Gallery Image Version. */ +export interface ValidationsProfile { + /** The published time of the image version */ + validationEtag?: string; + executedValidations?: ExecutedValidation[]; + /** This specifies the pub, offer, sku and version of the image version metadata */ + platformAttributes?: PlatformAttribute[]; +} + +/** This is the executed Validation. */ +export interface ExecutedValidation { + /** This property specifies the type of image version validation. */ + type?: string; + /** This property specifies the status of the validationProfile of the image version. */ + status?: ValidationStatus; + /** This property specifies the valid version of the validation. */ + version?: string; + /** This property specifies the starting timestamp. */ + executionTime?: Date; +} + +/** This is the platform attribute of the image version. */ +export interface PlatformAttribute { + /** + * This property specifies the name of the platformAttribute. It is read-only. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * This property specifies the value of the corresponding name property. It is read-only. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: string; +} + /** A custom action that can be performed with a Gallery Application Version. */ export interface GalleryApplicationCustomAction { /** The name of the custom action. Must be unique within the Gallery Application Version. */ @@ -4083,6 +4150,8 @@ export interface UserArtifactSettings { packageFileName?: string; /** Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with "_config". */ configFileName?: string; + /** Optional. The action to be taken with regards to install/update/remove of the gallery application in the event of a reboot. */ + scriptBehaviorAfterReboot?: GalleryApplicationScriptRebootBehavior; } /** The List Galleries operation response. */ @@ -4091,6 +4160,8 @@ export interface GalleryList { value: Gallery[]; /** The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries. */ nextLink?: string; + /** The security profile of a gallery image version */ + securityProfile?: ImageVersionSecurityProfile; } /** The List Gallery Images operation response. */ @@ -4125,6 +4196,14 @@ export interface GalleryApplicationVersionList { nextLink?: string; } +/** The List Soft-deleted Resources operation response. */ +export interface GallerySoftDeletedResourceList { + /** A list of soft-deleted resources. */ + value: GallerySoftDeletedResource[]; + /** The uri to fetch the next page of soft-deleted resources. Call ListNext() with this to fetch the next page of soft-deleted resources. */ + nextLink?: string; +} + /** Specifies information about the gallery sharing profile update. */ export interface SharingUpdate { /** This property allows you to specify the operation type of gallery sharing update. Possible values are: **Add,** **Remove,** **Reset.** */ @@ -4133,6 +4212,106 @@ export interface SharingUpdate { groups?: SharingProfileGroup[]; } +/** The properties of a gallery ResourceProfile. */ +export interface GalleryResourceProfilePropertiesBase { + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: GalleryProvisioningState; +} + +/** This is the Access Control Rules specification for an inVMAccessControlProfile version. */ +export interface AccessControlRules { + /** A list of privileges. */ + privileges?: AccessControlRulesPrivilege[]; + /** A list of roles. */ + roles?: AccessControlRulesRole[]; + /** A list of identities. */ + identities?: AccessControlRulesIdentity[]; + /** A list of role assignments. */ + roleAssignments?: AccessControlRulesRoleAssignment[]; +} + +/** The properties of an Access Control Rule Privilege. */ +export interface AccessControlRulesPrivilege { + /** The name of the privilege. */ + name: string; + /** The HTTP path corresponding to the privilege. */ + path: string; + /** The query parameters to match in the path. */ + queryParameters?: { [propertyName: string]: string }; +} + +/** The properties of an Access Control Rule Role. */ +export interface AccessControlRulesRole { + /** The name of the role. */ + name: string; + /** A list of privileges needed by this role. */ + privileges: string[]; +} + +/** The properties of an Access Control Rule Identity. */ +export interface AccessControlRulesIdentity { + /** The name of the identity. */ + name: string; + /** The username corresponding to this identity. */ + userName?: string; + /** The groupName corresponding to this identity. */ + groupName?: string; + /** The path to the executable. */ + exePath?: string; + /** The process name of the executable. */ + processName?: string; +} + +/** The properties of an Access Control Rule RoleAssignment. */ +export interface AccessControlRulesRoleAssignment { + /** The name of the role. */ + role: string; + /** A list of identities that can access the privileges defined by the role. */ + identities: string[]; +} + +/** The properties of a gallery ResourceProfile version. */ +export interface GalleryResourceProfileVersionPropertiesBase { + /** The target regions where the Resource Profile version is going to be replicated to. This property is updatable. */ + targetLocations?: TargetRegion[]; + /** If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version. */ + excludeFromLatest?: boolean; + /** + * The timestamp for when the Resource Profile Version is published. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publishedDate?: Date; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: GalleryProvisioningState; + /** + * This is the replication status of the gallery image version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly replicationStatus?: ReplicationStatus; +} + +/** The List Gallery InVMAccessControlProfiles operation response. */ +export interface GalleryInVMAccessControlProfileList { + /** A list of Gallery InVMAccessControlProfiles. */ + value: GalleryInVMAccessControlProfile[]; + /** The uri to fetch the next page of inVMAccessControlProfiles in the gallery. Call ListNext() with this to fetch the next page of gallery inVMAccessControlProfiles. */ + nextLink?: string; +} + +/** The List Gallery InVMAccessControlProfile Versions operation response. */ +export interface GalleryInVMAccessControlProfileVersionList { + /** A list of Gallery InVMAccessControlProfile Versions. */ + value: GalleryInVMAccessControlProfileVersion[]; + /** The uri to fetch the next page of inVMAccessControlProfile versions. Call ListNext() with this to fetch the next page of gallery inVMAccessControlProfile versions. */ + nextLink?: string; +} + /** The List Shared Galleries operation response. */ export interface SharedGalleryList { /** A list of shared galleries. */ @@ -5950,6 +6129,8 @@ export interface Snapshot extends Resource { /** Specifies information about the Shared Image Gallery that you want to create or update. */ export interface Gallery extends Resource { + /** The identity of the gallery, if configured. */ + identity?: GalleryIdentity; /** The description of this Shared Image Gallery resource. This property is updatable. */ description?: string; /** Describes the gallery unique name. */ @@ -6003,8 +6184,10 @@ export interface GalleryImage extends Resource { readonly provisioningState?: GalleryProvisioningState; /** A list of gallery image features. */ features?: GalleryImageFeature[]; - /** The architecture of the image. Applicable to OS disks only. */ + /** CPU architecture supported by an OS disk. */ architecture?: Architecture; + /** Optional. Must be set to true if the gallery image features are being updated. */ + allowUpdateImage?: boolean; } /** Specifies information about the gallery image version that you want to create or update. */ @@ -6027,6 +6210,13 @@ export interface GalleryImageVersion extends Resource { readonly replicationStatus?: ReplicationStatus; /** The security profile of a gallery image version */ securityProfile?: ImageVersionSecurityProfile; + /** Indicates if this is a soft-delete resource restoration request. */ + restore?: boolean; + /** + * This is the validations profile of a Gallery Image Version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validationsProfile?: ValidationsProfile; } /** Specifies information about the gallery Application Definition that you want to create or update. */ @@ -6065,6 +6255,51 @@ export interface GalleryApplicationVersion extends Resource { readonly replicationStatus?: ReplicationStatus; } +/** The details information of soft-deleted resource. */ +export interface GallerySoftDeletedResource extends Resource { + /** arm id of the soft-deleted resource */ + resourceArmId?: string; + /** artifact type of the soft-deleted resource */ + softDeletedArtifactType?: SoftDeletedArtifactTypes; + /** The timestamp for when the resource is soft-deleted. In dateTime offset format. */ + softDeletedTime?: string; +} + +/** Specifies information about the gallery inVMAccessControlProfile that you want to create or update. */ +export interface GalleryInVMAccessControlProfile extends Resource { + /** Describes the properties of a gallery inVMAccessControlProfile. */ + properties?: GalleryInVMAccessControlProfileProperties; +} + +/** Specifies information about the gallery inVMAccessControlProfile version that you want to create or update. */ +export interface GalleryInVMAccessControlProfileVersion extends Resource { + /** The target regions where the Resource Profile version is going to be replicated to. This property is updatable. */ + targetLocations?: TargetRegion[]; + /** If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version. */ + excludeFromLatest?: boolean; + /** + * The timestamp for when the Resource Profile Version is published. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publishedDate?: Date; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: GalleryProvisioningState; + /** + * This is the replication status of the gallery image version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly replicationStatus?: ReplicationStatus; + /** This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. */ + mode?: AccessControlRulesMode; + /** This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. */ + defaultAccess?: EndpointAccess; + /** This is the Access Control Rules specification for an inVMAccessControlProfile version. */ + rules?: AccessControlRules; +} + /** Describes a Virtual Machine Scale Set. */ export interface VirtualMachineScaleSetUpdate extends UpdateResource { /** The virtual machine scale set sku. */ @@ -6619,6 +6854,8 @@ export interface DiskRestorePoint extends ProxyOnlyResource { /** Specifies information about the Shared Image Gallery that you want to update. */ export interface GalleryUpdate extends UpdateResourceDefinition { + /** The identity of the gallery, if configured. */ + identity?: GalleryIdentity; /** The description of this Shared Image Gallery resource. This property is updatable. */ description?: string; /** Describes the gallery unique name. */ @@ -6672,8 +6909,10 @@ export interface GalleryImageUpdate extends UpdateResourceDefinition { readonly provisioningState?: GalleryProvisioningState; /** A list of gallery image features. */ features?: GalleryImageFeature[]; - /** The architecture of the image. Applicable to OS disks only. */ + /** CPU architecture supported by an OS disk. */ architecture?: Architecture; + /** Optional. Must be set to true if the gallery image features are being updated. */ + allowUpdateImage?: boolean; } /** Specifies information about the gallery image version that you want to update. */ @@ -6696,6 +6935,13 @@ export interface GalleryImageVersionUpdate extends UpdateResourceDefinition { readonly replicationStatus?: ReplicationStatus; /** The security profile of a gallery image version */ securityProfile?: ImageVersionSecurityProfile; + /** Indicates if this is a soft-delete resource restoration request. */ + restore?: boolean; + /** + * This is the validations profile of a Gallery Image Version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validationsProfile?: ValidationsProfile; } /** Specifies information about the gallery Application Definition that you want to update. */ @@ -6735,6 +6981,43 @@ export interface GalleryApplicationVersionUpdate readonly replicationStatus?: ReplicationStatus; } +/** Specifies information about the gallery inVMAccessControlProfile that you want to update. */ +export interface GalleryInVMAccessControlProfileUpdate + extends UpdateResourceDefinition { + /** Describes the properties of a gallery inVMAccessControlProfile. */ + properties?: GalleryInVMAccessControlProfileProperties; +} + +/** Specifies information about the gallery inVMAccessControlProfile version that you want to update. */ +export interface GalleryInVMAccessControlProfileVersionUpdate + extends UpdateResourceDefinition { + /** The target regions where the Resource Profile version is going to be replicated to. This property is updatable. */ + targetLocations?: TargetRegion[]; + /** If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version. */ + excludeFromLatest?: boolean; + /** + * The timestamp for when the Resource Profile Version is published. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publishedDate?: Date; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: GalleryProvisioningState; + /** + * This is the replication status of the gallery image version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly replicationStatus?: ReplicationStatus; + /** This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. */ + mode?: AccessControlRulesMode; + /** This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. */ + defaultAccess?: EndpointAccess; + /** This is the Access Control Rules specification for an inVMAccessControlProfile version. */ + rules?: AccessControlRules; +} + /** The publishing profile of a gallery image Version. */ export interface GalleryImageVersionPublishingProfile extends GalleryArtifactPublishingProfileBase {} @@ -6806,12 +7089,36 @@ export interface GalleryImageVersionSafetyProfile * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly policyViolations?: PolicyViolation[]; + /** Indicates whether or not the deletion is blocked for this Gallery Image Version if its End Of Life has not expired. */ + blockDeletionBeforeEndOfLife?: boolean; } /** The safety profile of the Gallery Application Version. */ export interface GalleryApplicationVersionSafetyProfile extends GalleryArtifactSafetyProfileBase {} +/** Describes the properties of a gallery inVMAccessControlProfile. */ +export interface GalleryInVMAccessControlProfileProperties + extends GalleryResourceProfilePropertiesBase { + /** The description of this gallery inVMAccessControlProfile resources. This property is updatable. */ + description?: string; + /** This property allows you to specify the OS type of the VMs/VMSS for which this profile can be used against. Possible values are: 'Windows' or 'Linux' */ + osType: OperatingSystemTypes; + /** This property allows you to specify the Endpoint type for which this profile is defining the access control for. Possible values are: 'WireServer' or 'IMDS' */ + applicableHostEndpoint: EndpointTypes; +} + +/** Describes the properties of an inVMAccessControlProfile version. */ +export interface GalleryInVMAccessControlProfileVersionProperties + extends GalleryResourceProfileVersionPropertiesBase { + /** This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. */ + mode: AccessControlRulesMode; + /** This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. */ + defaultAccess: EndpointAccess; + /** This is the Access Control Rules specification for an inVMAccessControlProfile version. */ + rules?: AccessControlRules; +} + /** Base information about the shared gallery resource in pir. */ export interface PirSharedGalleryResource extends PirResource { /** The unique id of this shared gallery. */ @@ -6857,7 +7164,7 @@ export interface CommunityGalleryImage extends PirCommunityGalleryResource { features?: GalleryImageFeature[]; /** Describes the gallery image definition purchase plan. This is used by marketplace images. */ purchasePlan?: ImagePurchasePlan; - /** The architecture of the image. Applicable to OS disks only. */ + /** CPU architecture supported by an OS disk. */ architecture?: Architecture; /** Privacy statement URI for the current community gallery image. */ privacyStatementUri?: string; @@ -6942,7 +7249,7 @@ export interface SharedGalleryImage extends PirSharedGalleryResource { features?: GalleryImageFeature[]; /** Describes the gallery image definition purchase plan. This is used by marketplace images. */ purchasePlan?: ImagePurchasePlan; - /** The architecture of the image. Applicable to OS disks only. */ + /** CPU architecture supported by an OS disk. */ architecture?: Architecture; /** Privacy statement uri for the current community gallery image. */ privacyStatementUri?: string; @@ -6996,6 +7303,18 @@ export interface DedicatedHostsRedeployHeaders { location?: string; } +/** Defines headers for GalleryInVMAccessControlProfiles_delete operation. */ +export interface GalleryInVMAccessControlProfilesDeleteHeaders { + location?: string; + azureAsyncOperation?: string; +} + +/** Defines headers for GalleryInVMAccessControlProfileVersions_delete operation. */ +export interface GalleryInVMAccessControlProfileVersionsDeleteHeaders { + location?: string; + azureAsyncOperation?: string; +} + /** Known values of {@link RepairAction} that the service accepts. */ export enum KnownRepairAction { /** Replace */ @@ -9413,6 +9732,8 @@ export enum KnownStorageAccountType { StandardZRS = "Standard_ZRS", /** PremiumLRS */ PremiumLRS = "Premium_LRS", + /** PremiumV2LRS */ + PremiumV2LRS = "PremiumV2_LRS", } /** @@ -9422,7 +9743,8 @@ export enum KnownStorageAccountType { * ### Known values supported by the service * **Standard_LRS** \ * **Standard_ZRS** \ - * **Premium_LRS** + * **Premium_LRS** \ + * **PremiumV2_LRS** */ export type StorageAccountType = string; @@ -9621,6 +9943,27 @@ export enum KnownUefiKeyType { */ export type UefiKeyType = string; +/** Known values of {@link ValidationStatus} that the service accepts. */ +export enum KnownValidationStatus { + /** Unknown */ + Unknown = "Unknown", + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded", +} + +/** + * Defines values for ValidationStatus. \ + * {@link KnownValidationStatus} can be used interchangeably with ValidationStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Failed** \ + * **Succeeded** + */ +export type ValidationStatus = string; + /** Known values of {@link ReplicationStatusTypes} that the service accepts. */ export enum KnownReplicationStatusTypes { /** ReplicationStatus */ @@ -9639,6 +9982,39 @@ export enum KnownReplicationStatusTypes { */ export type ReplicationStatusTypes = string; +/** Known values of {@link GalleryApplicationScriptRebootBehavior} that the service accepts. */ +export enum KnownGalleryApplicationScriptRebootBehavior { + /** None */ + None = "None", + /** Rerun */ + Rerun = "Rerun", +} + +/** + * Defines values for GalleryApplicationScriptRebootBehavior. \ + * {@link KnownGalleryApplicationScriptRebootBehavior} can be used interchangeably with GalleryApplicationScriptRebootBehavior, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Rerun** + */ +export type GalleryApplicationScriptRebootBehavior = string; + +/** Known values of {@link SoftDeletedArtifactTypes} that the service accepts. */ +export enum KnownSoftDeletedArtifactTypes { + /** Images */ + Images = "Images", +} + +/** + * Defines values for SoftDeletedArtifactTypes. \ + * {@link KnownSoftDeletedArtifactTypes} can be used interchangeably with SoftDeletedArtifactTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Images** + */ +export type SoftDeletedArtifactTypes = string; + /** Known values of {@link SharingUpdateOperationTypes} that the service accepts. */ export enum KnownSharingUpdateOperationTypes { /** Add */ @@ -9663,6 +10039,45 @@ export enum KnownSharingUpdateOperationTypes { */ export type SharingUpdateOperationTypes = string; +/** Known values of {@link AccessControlRulesMode} that the service accepts. */ +export enum KnownAccessControlRulesMode { + /** Audit */ + Audit = "Audit", + /** Enforce */ + Enforce = "Enforce", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Defines values for AccessControlRulesMode. \ + * {@link KnownAccessControlRulesMode} can be used interchangeably with AccessControlRulesMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Audit** \ + * **Enforce** \ + * **Disabled** + */ +export type AccessControlRulesMode = string; + +/** Known values of {@link EndpointAccess} that the service accepts. */ +export enum KnownEndpointAccess { + /** Allow */ + Allow = "Allow", + /** Deny */ + Deny = "Deny", +} + +/** + * Defines values for EndpointAccess. \ + * {@link KnownEndpointAccess} can be used interchangeably with EndpointAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allow** \ + * **Deny** + */ +export type EndpointAccess = string; + /** Known values of {@link SharedToValues} that the service accepts. */ export enum KnownSharedToValues { /** Tenant */ @@ -9827,6 +10242,8 @@ export type GalleryApplicationCustomActionParameterType = | "String" | "ConfigurationDataBlob" | "LogOutputBlob"; +/** Defines values for EndpointTypes. */ +export type EndpointTypes = "WireServer" | "IMDS"; /** Optional parameters. */ export interface OperationsListOptionalParams @@ -11010,7 +11427,7 @@ export type AvailabilitySetsGetResponse = AvailabilitySet; /** Optional parameters. */ export interface AvailabilitySetsListBySubscriptionOptionalParams extends coreClient.OperationOptions { - /** The expand expression to apply to the operation. Allowed values are 'instanceView'. */ + /** The expand expression to apply to the operation. Allowed values are 'virtualMachines/$ref'. */ expand?: string; } @@ -12538,6 +12955,22 @@ export interface GalleryApplicationVersionsListByGalleryApplicationNextOptionalP export type GalleryApplicationVersionsListByGalleryApplicationNextResponse = GalleryApplicationVersionList; +/** Optional parameters. */ +export interface SoftDeletedResourceListByArtifactNameOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByArtifactName operation. */ +export type SoftDeletedResourceListByArtifactNameResponse = + GallerySoftDeletedResourceList; + +/** Optional parameters. */ +export interface SoftDeletedResourceListByArtifactNameNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByArtifactNameNext operation. */ +export type SoftDeletedResourceListByArtifactNameNextResponse = + GallerySoftDeletedResourceList; + /** Optional parameters. */ export interface GallerySharingProfileUpdateOptionalParams extends coreClient.OperationOptions { @@ -12550,6 +12983,132 @@ export interface GallerySharingProfileUpdateOptionalParams /** Contains response data for the update operation. */ export type GallerySharingProfileUpdateResponse = SharingUpdate; +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type GalleryInVMAccessControlProfilesCreateOrUpdateResponse = + GalleryInVMAccessControlProfile; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfilesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type GalleryInVMAccessControlProfilesUpdateResponse = + GalleryInVMAccessControlProfile; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfilesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GalleryInVMAccessControlProfilesGetResponse = + GalleryInVMAccessControlProfile; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfilesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type GalleryInVMAccessControlProfilesDeleteResponse = + GalleryInVMAccessControlProfilesDeleteHeaders; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfilesListByGalleryOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByGallery operation. */ +export type GalleryInVMAccessControlProfilesListByGalleryResponse = + GalleryInVMAccessControlProfileList; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfilesListByGalleryNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByGalleryNext operation. */ +export type GalleryInVMAccessControlProfilesListByGalleryNextResponse = + GalleryInVMAccessControlProfileList; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type GalleryInVMAccessControlProfileVersionsCreateOrUpdateResponse = + GalleryInVMAccessControlProfileVersion; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfileVersionsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type GalleryInVMAccessControlProfileVersionsUpdateResponse = + GalleryInVMAccessControlProfileVersion; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfileVersionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GalleryInVMAccessControlProfileVersionsGetResponse = + GalleryInVMAccessControlProfileVersion; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfileVersionsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type GalleryInVMAccessControlProfileVersionsDeleteResponse = + GalleryInVMAccessControlProfileVersionsDeleteHeaders; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByGalleryInVMAccessControlProfile operation. */ +export type GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileResponse = + GalleryInVMAccessControlProfileVersionList; + +/** Optional parameters. */ +export interface GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByGalleryInVMAccessControlProfileNext operation. */ +export type GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileNextResponse = + GalleryInVMAccessControlProfileVersionList; + /** Optional parameters. */ export interface SharedGalleriesListOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index fde041ec9ae2..46bd9c897cc3 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -9904,6 +9904,53 @@ export const RegionalSharingStatus: coreClient.CompositeMapper = { }, }; +export const GalleryIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String", + }, + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None", + ], + }, + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "UserAssignedIdentitiesValue", + }, + }, + }, + }, + }, + }, +}; + export const UpdateResourceDefinition: coreClient.CompositeMapper = { type: { name: "Composite", @@ -10079,6 +10126,12 @@ export const GalleryImageFeature: coreClient.CompositeMapper = { name: "String", }, }, + startsAtVersion: { + serializedName: "startsAtVersion", + type: { + name: "String", + }, + }, }, }, }; @@ -10191,6 +10244,18 @@ export const TargetRegion: coreClient.CompositeMapper = { name: "Boolean", }, }, + additionalReplicaSets: { + serializedName: "additionalReplicaSets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalReplicaSet", + }, + }, + }, + }, }, }, }; @@ -10259,6 +10324,27 @@ export const DiskImageEncryption: coreClient.CompositeMapper = { }, }; +export const AdditionalReplicaSet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdditionalReplicaSet", + modelProperties: { + storageAccountType: { + serializedName: "storageAccountType", + type: { + name: "String", + }, + }, + regionalReplicaCount: { + serializedName: "regionalReplicaCount", + type: { + name: "Number", + }, + }, + }, + }, +}; + export const GalleryTargetExtendedLocation: coreClient.CompositeMapper = { type: { name: "Composite", @@ -10624,6 +10710,101 @@ export const UefiKey: coreClient.CompositeMapper = { }, }; +export const ValidationsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ValidationsProfile", + modelProperties: { + validationEtag: { + serializedName: "validationEtag", + type: { + name: "String", + }, + }, + executedValidations: { + serializedName: "executedValidations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExecutedValidation", + }, + }, + }, + }, + platformAttributes: { + serializedName: "platformAttributes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PlatformAttribute", + }, + }, + }, + }, + }, + }, +}; + +export const ExecutedValidation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExecutedValidation", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + version: { + serializedName: "version", + type: { + name: "String", + }, + }, + executionTime: { + serializedName: "executionTime", + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const PlatformAttribute: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PlatformAttribute", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const GalleryApplicationCustomAction: coreClient.CompositeMapper = { type: { name: "Composite", @@ -10775,6 +10956,12 @@ export const UserArtifactSettings: coreClient.CompositeMapper = { name: "String", }, }, + scriptBehaviorAfterReboot: { + serializedName: "scriptBehaviorAfterReboot", + type: { + name: "String", + }, + }, }, }, }; @@ -10803,6 +10990,13 @@ export const GalleryList: coreClient.CompositeMapper = { name: "String", }, }, + securityProfile: { + serializedName: "securityProfile", + type: { + name: "Composite", + className: "ImageVersionSecurityProfile", + }, + }, }, }, }; @@ -10919,6 +11113,34 @@ export const GalleryApplicationVersionList: coreClient.CompositeMapper = { }, }; +export const GallerySoftDeletedResourceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GallerySoftDeletedResourceList", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GallerySoftDeletedResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + export const SharingUpdate: coreClient.CompositeMapper = { type: { name: "Composite", @@ -10947,6 +11169,312 @@ export const SharingUpdate: coreClient.CompositeMapper = { }, }; +export const GalleryResourceProfilePropertiesBase: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryResourceProfilePropertiesBase", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const AccessControlRules: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlRules", + modelProperties: { + privileges: { + serializedName: "privileges", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessControlRulesPrivilege", + }, + }, + }, + }, + roles: { + serializedName: "roles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessControlRulesRole", + }, + }, + }, + }, + identities: { + serializedName: "identities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessControlRulesIdentity", + }, + }, + }, + }, + roleAssignments: { + serializedName: "roleAssignments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessControlRulesRoleAssignment", + }, + }, + }, + }, + }, + }, +}; + +export const AccessControlRulesPrivilege: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlRulesPrivilege", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String", + }, + }, + path: { + serializedName: "path", + required: true, + type: { + name: "String", + }, + }, + queryParameters: { + serializedName: "queryParameters", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; + +export const AccessControlRulesRole: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlRulesRole", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String", + }, + }, + privileges: { + serializedName: "privileges", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const AccessControlRulesIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlRulesIdentity", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String", + }, + }, + userName: { + serializedName: "userName", + type: { + name: "String", + }, + }, + groupName: { + serializedName: "groupName", + type: { + name: "String", + }, + }, + exePath: { + serializedName: "exePath", + type: { + name: "String", + }, + }, + processName: { + serializedName: "processName", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AccessControlRulesRoleAssignment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlRulesRoleAssignment", + modelProperties: { + role: { + serializedName: "role", + required: true, + type: { + name: "String", + }, + }, + identities: { + serializedName: "identities", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const GalleryResourceProfileVersionPropertiesBase: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryResourceProfileVersionPropertiesBase", + modelProperties: { + targetLocations: { + serializedName: "targetLocations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TargetRegion", + }, + }, + }, + }, + excludeFromLatest: { + serializedName: "excludeFromLatest", + type: { + name: "Boolean", + }, + }, + publishedDate: { + serializedName: "publishedDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + replicationStatus: { + serializedName: "replicationStatus", + type: { + name: "Composite", + className: "ReplicationStatus", + }, + }, + }, + }, + }; + +export const GalleryInVMAccessControlProfileList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileList", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfile", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const GalleryInVMAccessControlProfileVersionList: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileVersionList", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileVersion", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, + }; + export const SharedGalleryList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -15347,6 +15875,13 @@ export const Gallery: coreClient.CompositeMapper = { className: "Gallery", modelProperties: { ...Resource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "GalleryIdentity", + }, + }, description: { serializedName: "properties.description", type: { @@ -15501,6 +16036,12 @@ export const GalleryImage: coreClient.CompositeMapper = { name: "String", }, }, + allowUpdateImage: { + serializedName: "properties.allowUpdateImage", + type: { + name: "Boolean", + }, + }, }, }, }; @@ -15553,6 +16094,19 @@ export const GalleryImageVersion: coreClient.CompositeMapper = { className: "ImageVersionSecurityProfile", }, }, + restore: { + serializedName: "properties.restore", + type: { + name: "Boolean", + }, + }, + validationsProfile: { + serializedName: "properties.validationsProfile", + type: { + name: "Composite", + className: "ValidationsProfile", + }, + }, }, }, }; @@ -15654,6 +16208,120 @@ export const GalleryApplicationVersion: coreClient.CompositeMapper = { }, }; +export const GallerySoftDeletedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GallerySoftDeletedResource", + modelProperties: { + ...Resource.type.modelProperties, + resourceArmId: { + serializedName: "properties.resourceArmId", + type: { + name: "String", + }, + }, + softDeletedArtifactType: { + serializedName: "properties.softDeletedArtifactType", + type: { + name: "String", + }, + }, + softDeletedTime: { + serializedName: "properties.softDeletedTime", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const GalleryInVMAccessControlProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfile", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileProperties", + }, + }, + }, + }, +}; + +export const GalleryInVMAccessControlProfileVersion: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileVersion", + modelProperties: { + ...Resource.type.modelProperties, + targetLocations: { + serializedName: "properties.targetLocations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TargetRegion", + }, + }, + }, + }, + excludeFromLatest: { + serializedName: "properties.excludeFromLatest", + type: { + name: "Boolean", + }, + }, + publishedDate: { + serializedName: "properties.publishedDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + replicationStatus: { + serializedName: "properties.replicationStatus", + type: { + name: "Composite", + className: "ReplicationStatus", + }, + }, + mode: { + serializedName: "properties.mode", + type: { + name: "String", + }, + }, + defaultAccess: { + serializedName: "properties.defaultAccess", + type: { + name: "String", + }, + }, + rules: { + serializedName: "properties.rules", + type: { + name: "Composite", + className: "AccessControlRules", + }, + }, + }, + }, + }; + export const VirtualMachineScaleSetUpdate: coreClient.CompositeMapper = { type: { name: "Composite", @@ -17095,6 +17763,13 @@ export const GalleryUpdate: coreClient.CompositeMapper = { className: "GalleryUpdate", modelProperties: { ...UpdateResourceDefinition.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "GalleryIdentity", + }, + }, description: { serializedName: "properties.description", type: { @@ -17249,6 +17924,12 @@ export const GalleryImageUpdate: coreClient.CompositeMapper = { name: "String", }, }, + allowUpdateImage: { + serializedName: "properties.allowUpdateImage", + type: { + name: "Boolean", + }, + }, }, }, }; @@ -17301,6 +17982,19 @@ export const GalleryImageVersionUpdate: coreClient.CompositeMapper = { className: "ImageVersionSecurityProfile", }, }, + restore: { + serializedName: "properties.restore", + type: { + name: "Boolean", + }, + }, + validationsProfile: { + serializedName: "properties.validationsProfile", + type: { + name: "Composite", + className: "ValidationsProfile", + }, + }, }, }, }; @@ -17402,6 +18096,93 @@ export const GalleryApplicationVersionUpdate: coreClient.CompositeMapper = { }, }; +export const GalleryInVMAccessControlProfileUpdate: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileUpdate", + modelProperties: { + ...UpdateResourceDefinition.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileProperties", + }, + }, + }, + }, + }; + +export const GalleryInVMAccessControlProfileVersionUpdate: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileVersionUpdate", + modelProperties: { + ...UpdateResourceDefinition.type.modelProperties, + targetLocations: { + serializedName: "properties.targetLocations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TargetRegion", + }, + }, + }, + }, + excludeFromLatest: { + serializedName: "properties.excludeFromLatest", + type: { + name: "Boolean", + }, + }, + publishedDate: { + serializedName: "properties.publishedDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + replicationStatus: { + serializedName: "properties.replicationStatus", + type: { + name: "Composite", + className: "ReplicationStatus", + }, + }, + mode: { + serializedName: "properties.mode", + type: { + name: "String", + }, + }, + defaultAccess: { + serializedName: "properties.defaultAccess", + type: { + name: "String", + }, + }, + rules: { + serializedName: "properties.rules", + type: { + name: "Composite", + className: "AccessControlRules", + }, + }, + }, + }, + }; + export const GalleryImageVersionPublishingProfile: coreClient.CompositeMapper = { type: { @@ -17601,6 +18382,12 @@ export const GalleryImageVersionSafetyProfile: coreClient.CompositeMapper = { }, }, }, + blockDeletionBeforeEndOfLife: { + serializedName: "blockDeletionBeforeEndOfLife", + type: { + name: "Boolean", + }, + }, }, }, }; @@ -17616,6 +18403,71 @@ export const GalleryApplicationVersionSafetyProfile: coreClient.CompositeMapper }, }; +export const GalleryInVMAccessControlProfileProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileProperties", + modelProperties: { + ...GalleryResourceProfilePropertiesBase.type.modelProperties, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + osType: { + serializedName: "osType", + required: true, + type: { + name: "Enum", + allowedValues: ["Windows", "Linux"], + }, + }, + applicableHostEndpoint: { + serializedName: "applicableHostEndpoint", + required: true, + type: { + name: "Enum", + allowedValues: ["WireServer", "IMDS"], + }, + }, + }, + }, + }; + +export const GalleryInVMAccessControlProfileVersionProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileVersionProperties", + modelProperties: { + ...GalleryResourceProfileVersionPropertiesBase.type.modelProperties, + mode: { + serializedName: "mode", + required: true, + type: { + name: "String", + }, + }, + defaultAccess: { + serializedName: "defaultAccess", + required: true, + type: { + name: "String", + }, + }, + rules: { + serializedName: "rules", + type: { + name: "Composite", + className: "AccessControlRules", + }, + }, + }, + }, + }; + export const PirSharedGalleryResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -18202,3 +19054,47 @@ export const DedicatedHostsRedeployHeaders: coreClient.CompositeMapper = { }, }, }; + +export const GalleryInVMAccessControlProfilesDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfilesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const GalleryInVMAccessControlProfileVersionsDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GalleryInVMAccessControlProfileVersionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, + }; diff --git a/sdk/compute/arm-compute/src/models/parameters.ts b/sdk/compute/arm-compute/src/models/parameters.ts index 9db43162f04a..57d85e71ede6 100644 --- a/sdk/compute/arm-compute/src/models/parameters.ts +++ b/sdk/compute/arm-compute/src/models/parameters.ts @@ -79,6 +79,10 @@ import { GalleryApplicationVersion as GalleryApplicationVersionMapper, GalleryApplicationVersionUpdate as GalleryApplicationVersionUpdateMapper, SharingUpdate as SharingUpdateMapper, + GalleryInVMAccessControlProfile as GalleryInVMAccessControlProfileMapper, + GalleryInVMAccessControlProfileUpdate as GalleryInVMAccessControlProfileUpdateMapper, + GalleryInVMAccessControlProfileVersion as GalleryInVMAccessControlProfileVersionMapper, + GalleryInVMAccessControlProfileVersionUpdate as GalleryInVMAccessControlProfileVersionUpdateMapper, CloudService as CloudServiceMapper, CloudServiceUpdate as CloudServiceUpdateMapper, RoleInstances as RoleInstancesMapper, @@ -1169,7 +1173,7 @@ export const galleryName: OperationURLParameter = { export const apiVersion3: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-07-03", + defaultValue: "2024-03-03", isConstant: true, serializedName: "api-version", type: { @@ -1297,11 +1301,138 @@ export const galleryApplicationVersion1: OperationParameter = { mapper: GalleryApplicationVersionUpdateMapper, }; +export const galleryName1: OperationURLParameter = { + parameterPath: "galleryName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$"), + }, + serializedName: "galleryName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const artifactType: OperationURLParameter = { + parameterPath: "artifactType", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$"), + }, + serializedName: "artifactType", + required: true, + type: { + name: "String", + }, + }, +}; + +export const artifactName: OperationURLParameter = { + parameterPath: "artifactName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$"), + }, + serializedName: "artifactName", + required: true, + type: { + name: "String", + }, + }, +}; + export const sharingUpdate: OperationParameter = { parameterPath: "sharingUpdate", mapper: SharingUpdateMapper, }; +export const galleryInVMAccessControlProfile: OperationParameter = { + parameterPath: "galleryInVMAccessControlProfile", + mapper: GalleryInVMAccessControlProfileMapper, +}; + +export const inVMAccessControlProfileName: OperationURLParameter = { + parameterPath: "inVMAccessControlProfileName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+([-._]?[a-zA-Z0-9]+)*$"), + MaxLength: 80, + }, + serializedName: "inVMAccessControlProfileName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const galleryInVMAccessControlProfile1: OperationParameter = { + parameterPath: "galleryInVMAccessControlProfile", + mapper: GalleryInVMAccessControlProfileUpdateMapper, +}; + +export const inVMAccessControlProfileName1: OperationURLParameter = { + parameterPath: "inVMAccessControlProfileName", + mapper: { + serializedName: "inVMAccessControlProfileName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const galleryInVMAccessControlProfileVersion: OperationParameter = { + parameterPath: "galleryInVMAccessControlProfileVersion", + mapper: GalleryInVMAccessControlProfileVersionMapper, +}; + +export const inVMAccessControlProfileVersionName: OperationURLParameter = { + parameterPath: "inVMAccessControlProfileVersionName", + mapper: { + constraints: { + Pattern: new RegExp("^[0-9]+\\.[0-9]+\\.[0-9]+$"), + }, + serializedName: "inVMAccessControlProfileVersionName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const galleryInVMAccessControlProfileVersion1: OperationParameter = { + parameterPath: "galleryInVMAccessControlProfileVersion", + mapper: GalleryInVMAccessControlProfileVersionUpdateMapper, +}; + +export const inVMAccessControlProfileVersionName1: OperationURLParameter = { + parameterPath: "inVMAccessControlProfileVersionName", + mapper: { + serializedName: "inVMAccessControlProfileVersionName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const inVMAccessControlProfileName2: OperationURLParameter = { + parameterPath: "inVMAccessControlProfileName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+([-._]?[a-zA-Z0-9]+)*$"), + }, + serializedName: "inVMAccessControlProfileName", + required: true, + type: { + name: "String", + }, + }, +}; + export const sharedTo: OperationQueryParameter = { parameterPath: ["options", "sharedTo"], mapper: { diff --git a/sdk/compute/arm-compute/src/operations/galleryInVMAccessControlProfileVersions.ts b/sdk/compute/arm-compute/src/operations/galleryInVMAccessControlProfileVersions.ts new file mode 100644 index 000000000000..f6f2a932bcee --- /dev/null +++ b/sdk/compute/arm-compute/src/operations/galleryInVMAccessControlProfileVersions.ts @@ -0,0 +1,762 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { GalleryInVMAccessControlProfileVersions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ComputeManagementClient } from "../computeManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + GalleryInVMAccessControlProfileVersion, + GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileNextOptionalParams, + GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams, + GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileResponse, + GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams, + GalleryInVMAccessControlProfileVersionsCreateOrUpdateResponse, + GalleryInVMAccessControlProfileVersionUpdate, + GalleryInVMAccessControlProfileVersionsUpdateOptionalParams, + GalleryInVMAccessControlProfileVersionsUpdateResponse, + GalleryInVMAccessControlProfileVersionsGetOptionalParams, + GalleryInVMAccessControlProfileVersionsGetResponse, + GalleryInVMAccessControlProfileVersionsDeleteOptionalParams, + GalleryInVMAccessControlProfileVersionsDeleteResponse, + GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileNextResponse, +} from "../models"; + +/// +/** Class containing GalleryInVMAccessControlProfileVersions operations. */ +export class GalleryInVMAccessControlProfileVersionsImpl + implements GalleryInVMAccessControlProfileVersions +{ + private readonly client: ComputeManagementClient; + + /** + * Initialize a new instance of the class GalleryInVMAccessControlProfileVersions class. + * @param client Reference to the service client + */ + constructor(client: ComputeManagementClient) { + this.client = client; + } + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @param options The options parameters. + */ + public listByGalleryInVMAccessControlProfile( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByGalleryInVMAccessControlProfilePagingAll( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByGalleryInVMAccessControlProfilePagingPage( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + options, + settings, + ); + }, + }; + } + + private async *listByGalleryInVMAccessControlProfilePagingPage( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByGalleryInVMAccessControlProfile( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByGalleryInVMAccessControlProfileNext( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByGalleryInVMAccessControlProfilePagingAll( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByGalleryInVMAccessControlProfilePagingPage( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + options, + )) { + yield* page; + } + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be created. Needs to follow semantic version name pattern: The allowed characters are digit and + * period. Digits must be within the range of a 32-bit integer. Format: + * .. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersion, + options?: GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfileVersionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + GalleryInVMAccessControlProfileVersionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be created. Needs to follow semantic version name pattern: The allowed characters are digit and + * period. Digits must be within the range of a 32-bit integer. Format: + * .. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersion, + options?: GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be updated. Needs to follow semantic version name pattern: The allowed characters are digit and + * period. Digits must be within the range of a 32-bit integer. Format: + * .. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery + * inVMAccessControlProfile version operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersionUpdate, + options?: GalleryInVMAccessControlProfileVersionsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfileVersionsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + GalleryInVMAccessControlProfileVersionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Update a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be updated. Needs to follow semantic version name pattern: The allowed characters are digit and + * period. Digits must be within the range of a 32-bit integer. Format: + * .. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery + * inVMAccessControlProfile version operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersionUpdate, + options?: GalleryInVMAccessControlProfileVersionsUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + galleryInVMAccessControlProfileVersion, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + options?: GalleryInVMAccessControlProfileVersionsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + options, + }, + getOperationSpec, + ); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be deleted. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + options?: GalleryInVMAccessControlProfileVersionsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfileVersionsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + GalleryInVMAccessControlProfileVersionsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be deleted. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + options?: GalleryInVMAccessControlProfileVersionsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @param options The options parameters. + */ + private _listByGalleryInVMAccessControlProfile( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, inVMAccessControlProfileName, options }, + listByGalleryInVMAccessControlProfileOperationSpec, + ); + } + + /** + * ListByGalleryInVMAccessControlProfileNext + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @param nextLink The nextLink from the previous successful call to the + * ListByGalleryInVMAccessControlProfile method. + * @param options The options parameters. + */ + private _listByGalleryInVMAccessControlProfileNext( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + nextLink: string, + options?: GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + nextLink, + options, + }, + listByGalleryInVMAccessControlProfileNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersion, + }, + 201: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersion, + }, + 202: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersion, + }, + 204: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersion, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.galleryInVMAccessControlProfileVersion, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName1, + Parameters.inVMAccessControlProfileName, + Parameters.inVMAccessControlProfileVersionName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersion, + }, + 201: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersion, + }, + 202: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersion, + }, + 204: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersion, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.galleryInVMAccessControlProfileVersion1, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName, + Parameters.inVMAccessControlProfileName1, + Parameters.inVMAccessControlProfileVersionName1, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersion, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName, + Parameters.inVMAccessControlProfileName1, + Parameters.inVMAccessControlProfileVersionName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: + Mappers.GalleryInVMAccessControlProfileVersionsDeleteHeaders, + }, + 201: { + headersMapper: + Mappers.GalleryInVMAccessControlProfileVersionsDeleteHeaders, + }, + 202: { + headersMapper: + Mappers.GalleryInVMAccessControlProfileVersionsDeleteHeaders, + }, + 204: { + headersMapper: + Mappers.GalleryInVMAccessControlProfileVersionsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName, + Parameters.inVMAccessControlProfileName1, + Parameters.inVMAccessControlProfileVersionName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByGalleryInVMAccessControlProfileOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersionList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName1, + Parameters.inVMAccessControlProfileName2, + ], + headerParameters: [Parameters.accept], + serializer, + }; +const listByGalleryInVMAccessControlProfileNextOperationSpec: coreClient.OperationSpec = + { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileVersionList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.resourceGroupName, + Parameters.galleryName1, + Parameters.inVMAccessControlProfileName2, + ], + headerParameters: [Parameters.accept], + serializer, + }; diff --git a/sdk/compute/arm-compute/src/operations/galleryInVMAccessControlProfiles.ts b/sdk/compute/arm-compute/src/operations/galleryInVMAccessControlProfiles.ts new file mode 100644 index 000000000000..6b5fc5b9d509 --- /dev/null +++ b/sdk/compute/arm-compute/src/operations/galleryInVMAccessControlProfiles.ts @@ -0,0 +1,688 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { GalleryInVMAccessControlProfiles } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ComputeManagementClient } from "../computeManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + GalleryInVMAccessControlProfile, + GalleryInVMAccessControlProfilesListByGalleryNextOptionalParams, + GalleryInVMAccessControlProfilesListByGalleryOptionalParams, + GalleryInVMAccessControlProfilesListByGalleryResponse, + GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams, + GalleryInVMAccessControlProfilesCreateOrUpdateResponse, + GalleryInVMAccessControlProfileUpdate, + GalleryInVMAccessControlProfilesUpdateOptionalParams, + GalleryInVMAccessControlProfilesUpdateResponse, + GalleryInVMAccessControlProfilesGetOptionalParams, + GalleryInVMAccessControlProfilesGetResponse, + GalleryInVMAccessControlProfilesDeleteOptionalParams, + GalleryInVMAccessControlProfilesDeleteResponse, + GalleryInVMAccessControlProfilesListByGalleryNextResponse, +} from "../models"; + +/// +/** Class containing GalleryInVMAccessControlProfiles operations. */ +export class GalleryInVMAccessControlProfilesImpl + implements GalleryInVMAccessControlProfiles +{ + private readonly client: ComputeManagementClient; + + /** + * Initialize a new instance of the class GalleryInVMAccessControlProfiles class. + * @param client Reference to the service client + */ + constructor(client: ComputeManagementClient) { + this.client = client; + } + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are + * to be listed. + * @param options The options parameters. + */ + public listByGallery( + resourceGroupName: string, + galleryName: string, + options?: GalleryInVMAccessControlProfilesListByGalleryOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByGalleryPagingAll( + resourceGroupName, + galleryName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByGalleryPagingPage( + resourceGroupName, + galleryName, + options, + settings, + ); + }, + }; + } + + private async *listByGalleryPagingPage( + resourceGroupName: string, + galleryName: string, + options?: GalleryInVMAccessControlProfilesListByGalleryOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: GalleryInVMAccessControlProfilesListByGalleryResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByGallery( + resourceGroupName, + galleryName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByGalleryNext( + resourceGroupName, + galleryName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByGalleryPagingAll( + resourceGroupName: string, + galleryName: string, + options?: GalleryInVMAccessControlProfilesListByGalleryOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByGalleryPagingPage( + resourceGroupName, + galleryName, + options, + )) { + yield* page; + } + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to + * be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created + * or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed + * in the middle. The maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + galleryInVMAccessControlProfile: GalleryInVMAccessControlProfile, + options?: GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfilesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + GalleryInVMAccessControlProfilesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to + * be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created + * or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed + * in the middle. The maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + galleryInVMAccessControlProfile: GalleryInVMAccessControlProfile, + options?: GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Update a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to + * be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the + * middle. The maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery + * inVMAccessControlProfile operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + galleryInVMAccessControlProfile: GalleryInVMAccessControlProfileUpdate, + options?: GalleryInVMAccessControlProfilesUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfilesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + GalleryInVMAccessControlProfilesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Update a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to + * be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the + * middle. The maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery + * inVMAccessControlProfile operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + galleryInVMAccessControlProfile: GalleryInVMAccessControlProfileUpdate, + options?: GalleryInVMAccessControlProfilesUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + galleryInVMAccessControlProfile, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are + * to be retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be + * retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfilesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, inVMAccessControlProfileName, options }, + getOperationSpec, + ); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfilesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfilesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + GalleryInVMAccessControlProfilesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Delete a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfilesDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + galleryName, + inVMAccessControlProfileName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are + * to be listed. + * @param options The options parameters. + */ + private _listByGallery( + resourceGroupName: string, + galleryName: string, + options?: GalleryInVMAccessControlProfilesListByGalleryOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, options }, + listByGalleryOperationSpec, + ); + } + + /** + * ListByGalleryNext + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are + * to be listed. + * @param nextLink The nextLink from the previous successful call to the ListByGallery method. + * @param options The options parameters. + */ + private _listByGalleryNext( + resourceGroupName: string, + galleryName: string, + nextLink: string, + options?: GalleryInVMAccessControlProfilesListByGalleryNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, nextLink, options }, + listByGalleryNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfile, + }, + 201: { + bodyMapper: Mappers.GalleryInVMAccessControlProfile, + }, + 202: { + bodyMapper: Mappers.GalleryInVMAccessControlProfile, + }, + 204: { + bodyMapper: Mappers.GalleryInVMAccessControlProfile, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.galleryInVMAccessControlProfile, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName1, + Parameters.inVMAccessControlProfileName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfile, + }, + 201: { + bodyMapper: Mappers.GalleryInVMAccessControlProfile, + }, + 202: { + bodyMapper: Mappers.GalleryInVMAccessControlProfile, + }, + 204: { + bodyMapper: Mappers.GalleryInVMAccessControlProfile, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.galleryInVMAccessControlProfile1, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName, + Parameters.inVMAccessControlProfileName1, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfile, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName, + Parameters.inVMAccessControlProfileName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.GalleryInVMAccessControlProfilesDeleteHeaders, + }, + 201: { + headersMapper: Mappers.GalleryInVMAccessControlProfilesDeleteHeaders, + }, + 202: { + headersMapper: Mappers.GalleryInVMAccessControlProfilesDeleteHeaders, + }, + 204: { + headersMapper: Mappers.GalleryInVMAccessControlProfilesDeleteHeaders, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName, + Parameters.inVMAccessControlProfileName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByGalleryOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByGalleryNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryInVMAccessControlProfileList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.resourceGroupName, + Parameters.galleryName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/compute/arm-compute/src/operations/index.ts b/sdk/compute/arm-compute/src/operations/index.ts index 502684dc464f..a5d61a4df502 100644 --- a/sdk/compute/arm-compute/src/operations/index.ts +++ b/sdk/compute/arm-compute/src/operations/index.ts @@ -43,7 +43,10 @@ export * from "./galleryImages"; export * from "./galleryImageVersions"; export * from "./galleryApplications"; export * from "./galleryApplicationVersions"; +export * from "./softDeletedResource"; export * from "./gallerySharingProfile"; +export * from "./galleryInVMAccessControlProfiles"; +export * from "./galleryInVMAccessControlProfileVersions"; export * from "./sharedGalleries"; export * from "./sharedGalleryImages"; export * from "./sharedGalleryImageVersions"; diff --git a/sdk/compute/arm-compute/src/operations/softDeletedResource.ts b/sdk/compute/arm-compute/src/operations/softDeletedResource.ts new file mode 100644 index 000000000000..f95ad5267a75 --- /dev/null +++ b/sdk/compute/arm-compute/src/operations/softDeletedResource.ts @@ -0,0 +1,243 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SoftDeletedResource } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ComputeManagementClient } from "../computeManagementClient"; +import { + GallerySoftDeletedResource, + SoftDeletedResourceListByArtifactNameNextOptionalParams, + SoftDeletedResourceListByArtifactNameOptionalParams, + SoftDeletedResourceListByArtifactNameResponse, + SoftDeletedResourceListByArtifactNameNextResponse, +} from "../models"; + +/// +/** Class containing SoftDeletedResource operations. */ +export class SoftDeletedResourceImpl implements SoftDeletedResource { + private readonly client: ComputeManagementClient; + + /** + * Initialize a new instance of the class SoftDeletedResource class. + * @param client Reference to the service client + */ + constructor(client: ComputeManagementClient) { + this.client = client; + } + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image + * version of an image. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact + * name should be the gallery image name. + * @param options The options parameters. + */ + public listByArtifactName( + resourceGroupName: string, + galleryName: string, + artifactType: string, + artifactName: string, + options?: SoftDeletedResourceListByArtifactNameOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByArtifactNamePagingAll( + resourceGroupName, + galleryName, + artifactType, + artifactName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByArtifactNamePagingPage( + resourceGroupName, + galleryName, + artifactType, + artifactName, + options, + settings, + ); + }, + }; + } + + private async *listByArtifactNamePagingPage( + resourceGroupName: string, + galleryName: string, + artifactType: string, + artifactName: string, + options?: SoftDeletedResourceListByArtifactNameOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: SoftDeletedResourceListByArtifactNameResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByArtifactName( + resourceGroupName, + galleryName, + artifactType, + artifactName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByArtifactNameNext( + resourceGroupName, + galleryName, + artifactType, + artifactName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByArtifactNamePagingAll( + resourceGroupName: string, + galleryName: string, + artifactType: string, + artifactName: string, + options?: SoftDeletedResourceListByArtifactNameOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByArtifactNamePagingPage( + resourceGroupName, + galleryName, + artifactType, + artifactName, + options, + )) { + yield* page; + } + } + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image + * version of an image. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact + * name should be the gallery image name. + * @param options The options parameters. + */ + private _listByArtifactName( + resourceGroupName: string, + galleryName: string, + artifactType: string, + artifactName: string, + options?: SoftDeletedResourceListByArtifactNameOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, artifactType, artifactName, options }, + listByArtifactNameOperationSpec, + ); + } + + /** + * ListByArtifactNameNext + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact + * name should be the gallery image name. + * @param nextLink The nextLink from the previous successful call to the ListByArtifactName method. + * @param options The options parameters. + */ + private _listByArtifactNameNext( + resourceGroupName: string, + galleryName: string, + artifactType: string, + artifactName: string, + nextLink: string, + options?: SoftDeletedResourceListByArtifactNameNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + galleryName, + artifactType, + artifactName, + nextLink, + options, + }, + listByArtifactNameNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByArtifactNameOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/softDeletedArtifactTypes/{artifactType}/artifacts/{artifactName}/versions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GallerySoftDeletedResourceList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryName1, + Parameters.artifactType, + Parameters.artifactName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByArtifactNameNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GallerySoftDeletedResourceList, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.resourceGroupName, + Parameters.galleryName1, + Parameters.artifactType, + Parameters.artifactName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts index 8a18e8a731cc..609a8050fe31 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts @@ -759,7 +759,8 @@ export class VirtualMachineScaleSetVMsImpl /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid - * charges. + * charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated + * or already has been deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. @@ -825,7 +826,8 @@ export class VirtualMachineScaleSetVMsImpl /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid - * charges. + * charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated + * or already has been deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts index 7e46bf7821f2..190769c79f30 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts @@ -987,7 +987,8 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still * attached and you are getting charged for the resources. Instead, use deallocate to release resources - * and avoid charges. + * and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set + * that are being deallocated or have already been deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param options The options parameters. @@ -1051,7 +1052,8 @@ export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still * attached and you are getting charged for the resources. Instead, use deallocate to release resources - * and avoid charges. + * and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set + * that are being deallocated or have already been deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param options The options parameters. diff --git a/sdk/compute/arm-compute/src/operations/virtualMachines.ts b/sdk/compute/arm-compute/src/operations/virtualMachines.ts index 030ffa8c6a39..5fb59e67ab15 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachines.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachines.ts @@ -977,7 +977,8 @@ export class VirtualMachinesImpl implements VirtualMachines { /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the - * same provisioned resources. You are still charged for this virtual machine. + * same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is + * not allowed on a virtual machine that is being deallocated or has already been deallocated. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param options The options parameters. @@ -1040,7 +1041,8 @@ export class VirtualMachinesImpl implements VirtualMachines { /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the - * same provisioned resources. You are still charged for this virtual machine. + * same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is + * not allowed on a virtual machine that is being deallocated or has already been deallocated. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param options The options parameters. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryInVMAccessControlProfileVersions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryInVMAccessControlProfileVersions.ts new file mode 100644 index 000000000000..0f8c89f8ee15 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryInVMAccessControlProfileVersions.ts @@ -0,0 +1,204 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + GalleryInVMAccessControlProfileVersion, + GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams, + GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams, + GalleryInVMAccessControlProfileVersionsCreateOrUpdateResponse, + GalleryInVMAccessControlProfileVersionUpdate, + GalleryInVMAccessControlProfileVersionsUpdateOptionalParams, + GalleryInVMAccessControlProfileVersionsUpdateResponse, + GalleryInVMAccessControlProfileVersionsGetOptionalParams, + GalleryInVMAccessControlProfileVersionsGetResponse, + GalleryInVMAccessControlProfileVersionsDeleteOptionalParams, + GalleryInVMAccessControlProfileVersionsDeleteResponse, +} from "../models"; + +/// +/** Interface representing a GalleryInVMAccessControlProfileVersions. */ +export interface GalleryInVMAccessControlProfileVersions { + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @param options The options parameters. + */ + listByGalleryInVMAccessControlProfile( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Create or update a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be created. Needs to follow semantic version name pattern: The allowed characters are digit and + * period. Digits must be within the range of a 32-bit integer. Format: + * .. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersion, + options?: GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfileVersionsCreateOrUpdateResponse + > + >; + /** + * Create or update a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be created. Needs to follow semantic version name pattern: The allowed characters are digit and + * period. Digits must be within the range of a 32-bit integer. Format: + * .. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersion, + options?: GalleryInVMAccessControlProfileVersionsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Update a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be updated. Needs to follow semantic version name pattern: The allowed characters are digit and + * period. Digits must be within the range of a 32-bit integer. Format: + * .. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery + * inVMAccessControlProfile version operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersionUpdate, + options?: GalleryInVMAccessControlProfileVersionsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfileVersionsUpdateResponse + > + >; + /** + * Update a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be updated. Needs to follow semantic version name pattern: The allowed characters are digit and + * period. Digits must be within the range of a 32-bit integer. Format: + * .. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery + * inVMAccessControlProfile version operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + galleryInVMAccessControlProfileVersion: GalleryInVMAccessControlProfileVersionUpdate, + options?: GalleryInVMAccessControlProfileVersionsUpdateOptionalParams, + ): Promise; + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + options?: GalleryInVMAccessControlProfileVersionsGetOptionalParams, + ): Promise; + /** + * Delete a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be deleted. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + options?: GalleryInVMAccessControlProfileVersionsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfileVersionsDeleteResponse + > + >; + /** + * Delete a gallery inVMAccessControlProfile version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version + * to be deleted. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + inVMAccessControlProfileVersionName: string, + options?: GalleryInVMAccessControlProfileVersionsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryInVMAccessControlProfiles.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryInVMAccessControlProfiles.ts new file mode 100644 index 000000000000..08e2b356f848 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryInVMAccessControlProfiles.ts @@ -0,0 +1,174 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + GalleryInVMAccessControlProfile, + GalleryInVMAccessControlProfilesListByGalleryOptionalParams, + GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams, + GalleryInVMAccessControlProfilesCreateOrUpdateResponse, + GalleryInVMAccessControlProfileUpdate, + GalleryInVMAccessControlProfilesUpdateOptionalParams, + GalleryInVMAccessControlProfilesUpdateResponse, + GalleryInVMAccessControlProfilesGetOptionalParams, + GalleryInVMAccessControlProfilesGetResponse, + GalleryInVMAccessControlProfilesDeleteOptionalParams, + GalleryInVMAccessControlProfilesDeleteResponse, +} from "../models"; + +/// +/** Interface representing a GalleryInVMAccessControlProfiles. */ +export interface GalleryInVMAccessControlProfiles { + /** + * List gallery inVMAccessControlProfiles in a gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are + * to be listed. + * @param options The options parameters. + */ + listByGallery( + resourceGroupName: string, + galleryName: string, + options?: GalleryInVMAccessControlProfilesListByGalleryOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Create or update a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to + * be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created + * or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed + * in the middle. The maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + galleryInVMAccessControlProfile: GalleryInVMAccessControlProfile, + options?: GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfilesCreateOrUpdateResponse + > + >; + /** + * Create or update a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to + * be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created + * or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed + * in the middle. The maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + galleryInVMAccessControlProfile: GalleryInVMAccessControlProfile, + options?: GalleryInVMAccessControlProfilesCreateOrUpdateOptionalParams, + ): Promise; + /** + * Update a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to + * be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the + * middle. The maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery + * inVMAccessControlProfile operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + galleryInVMAccessControlProfile: GalleryInVMAccessControlProfileUpdate, + options?: GalleryInVMAccessControlProfilesUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfilesUpdateResponse + > + >; + /** + * Update a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to + * be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the + * middle. The maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery + * inVMAccessControlProfile operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + galleryInVMAccessControlProfile: GalleryInVMAccessControlProfileUpdate, + options?: GalleryInVMAccessControlProfilesUpdateOptionalParams, + ): Promise; + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are + * to be retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be + * retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfilesGetOptionalParams, + ): Promise; + /** + * Delete a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfilesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GalleryInVMAccessControlProfilesDeleteResponse + > + >; + /** + * Delete a gallery inVMAccessControlProfile. + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile + * resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + inVMAccessControlProfileName: string, + options?: GalleryInVMAccessControlProfilesDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/index.ts b/sdk/compute/arm-compute/src/operationsInterfaces/index.ts index 502684dc464f..a5d61a4df502 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/index.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/index.ts @@ -43,7 +43,10 @@ export * from "./galleryImages"; export * from "./galleryImageVersions"; export * from "./galleryApplications"; export * from "./galleryApplicationVersions"; +export * from "./softDeletedResource"; export * from "./gallerySharingProfile"; +export * from "./galleryInVMAccessControlProfiles"; +export * from "./galleryInVMAccessControlProfileVersions"; export * from "./sharedGalleries"; export * from "./sharedGalleryImages"; export * from "./sharedGalleryImageVersions"; diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/softDeletedResource.ts b/sdk/compute/arm-compute/src/operationsInterfaces/softDeletedResource.ts new file mode 100644 index 000000000000..7e00f5ff512f --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/softDeletedResource.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + GallerySoftDeletedResource, + SoftDeletedResourceListByArtifactNameOptionalParams, +} from "../models"; + +/// +/** Interface representing a SoftDeletedResource. */ +export interface SoftDeletedResource { + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image + * version of an image. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact + * name should be the gallery image name. + * @param options The options parameters. + */ + listByArtifactName( + resourceGroupName: string, + galleryName: string, + artifactType: string, + artifactName: string, + options?: SoftDeletedResourceListByArtifactNameOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts index faba210cac60..f2aa7a1f4e1e 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts @@ -258,7 +258,8 @@ export interface VirtualMachineScaleSetVMs { /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid - * charges. + * charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated + * or already has been deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. @@ -273,7 +274,8 @@ export interface VirtualMachineScaleSetVMs { /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid - * charges. + * charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated + * or already has been deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts index 719d183aa34b..761011917648 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts @@ -263,7 +263,8 @@ export interface VirtualMachineScaleSets { /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still * attached and you are getting charged for the resources. Instead, use deallocate to release resources - * and avoid charges. + * and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set + * that are being deallocated or have already been deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param options The options parameters. @@ -276,7 +277,8 @@ export interface VirtualMachineScaleSets { /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still * attached and you are getting charged for the resources. Instead, use deallocate to release resources - * and avoid charges. + * and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set + * that are being deallocated or have already been deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param options The options parameters. diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts index 8d62cf5b7cee..cc1d51397a6c 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts @@ -302,7 +302,8 @@ export interface VirtualMachines { ): Promise; /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the - * same provisioned resources. You are still charged for this virtual machine. + * same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is + * not allowed on a virtual machine that is being deallocated or has already been deallocated. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param options The options parameters. @@ -314,7 +315,8 @@ export interface VirtualMachines { ): Promise, void>>; /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the - * same provisioned resources. You are still charged for this virtual machine. + * same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is + * not allowed on a virtual machine that is being deallocated or has already been deallocated. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param options The options parameters. diff --git a/sdk/compute/arm-compute/tsconfig.json b/sdk/compute/arm-compute/tsconfig.json index b84abc8423ab..75dfa0b6bb75 100644 --- a/sdk/compute/arm-compute/tsconfig.json +++ b/sdk/compute/arm-compute/tsconfig.json @@ -23,8 +23,8 @@ } }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", + "src/**/*.ts", + "test/**/*.ts", "samples-dev/**/*.ts" ], "exclude": [ From c590627b43084cc034dcae0cba2a005ee12beba5 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:50:26 +0800 Subject: [PATCH 12/55] [mgmt] network release (#32141) https://github.com/Azure/sdk-release-request/issues/5740 --- common/config/rush/pnpm-lock.yaml | 5 +- sdk/network/arm-network/CHANGELOG.md | 171 +- sdk/network/arm-network/README.md | 1 - sdk/network/arm-network/_meta.json | 8 +- sdk/network/arm-network/assets.json | 2 +- sdk/network/arm-network/package.json | 54 +- .../arm-network/review/arm-network.api.md | 838 +++++- sdk/network/arm-network/sample.env | 5 +- ...dminRuleCollectionsCreateOrUpdateSample.ts | 2 +- .../adminRuleCollectionsDeleteSample.ts | 2 +- .../adminRuleCollectionsGetSample.ts | 2 +- .../adminRuleCollectionsListSample.ts | 2 +- .../adminRulesCreateOrUpdateSample.ts | 36 +- .../samples-dev/adminRulesDeleteSample.ts | 2 +- .../samples-dev/adminRulesGetSample.ts | 4 +- .../samples-dev/adminRulesListSample.ts | 2 +- ...yPrivateEndpointConnectionsDeleteSample.ts | 2 +- ...ewayPrivateEndpointConnectionsGetSample.ts | 2 +- ...wayPrivateEndpointConnectionsListSample.ts | 2 +- ...yPrivateEndpointConnectionsUpdateSample.ts | 2 +- ...onGatewayPrivateLinkResourcesListSample.ts | 2 +- ...ewayWafDynamicManifestsDefaultGetSample.ts | 2 +- ...tionGatewayWafDynamicManifestsGetSample.ts | 2 +- ...tionGatewaysBackendHealthOnDemandSample.ts | 2 +- .../applicationGatewaysBackendHealthSample.ts | 2 +- ...applicationGatewaysCreateOrUpdateSample.ts | 2 +- .../applicationGatewaysDeleteSample.ts | 2 +- .../applicationGatewaysGetSample.ts | 2 +- ...ionGatewaysGetSslPredefinedPolicySample.ts | 2 +- .../applicationGatewaysListAllSample.ts | 2 +- ...tewaysListAvailableRequestHeadersSample.ts | 2 +- ...ewaysListAvailableResponseHeadersSample.ts | 2 +- ...ewaysListAvailableServerVariablesSample.ts | 2 +- ...onGatewaysListAvailableSslOptionsSample.ts | 2 +- ...istAvailableSslPredefinedPoliciesSample.ts | 2 +- ...nGatewaysListAvailableWafRuleSetsSample.ts | 2 +- .../applicationGatewaysListSample.ts | 2 +- .../applicationGatewaysStartSample.ts | 2 +- .../applicationGatewaysStopSample.ts | 2 +- .../applicationGatewaysUpdateTagsSample.ts | 2 +- ...ationSecurityGroupsCreateOrUpdateSample.ts | 2 +- .../applicationSecurityGroupsDeleteSample.ts | 2 +- .../applicationSecurityGroupsGetSample.ts | 2 +- .../applicationSecurityGroupsListAllSample.ts | 2 +- .../applicationSecurityGroupsListSample.ts | 2 +- ...plicationSecurityGroupsUpdateTagsSample.ts | 2 +- .../availableDelegationsListSample.ts | 2 +- .../availableEndpointServicesListSample.ts | 2 +- ...eEndpointTypesListByResourceGroupSample.ts | 2 +- ...availablePrivateEndpointTypesListSample.ts | 2 +- ...lableResourceGroupDelegationsListSample.ts | 2 +- ...ServiceAliasesListByResourceGroupSample.ts | 2 +- .../availableServiceAliasesListSample.ts | 2 +- .../azureFirewallFqdnTagsListAllSample.ts | 2 +- .../azureFirewallsCreateOrUpdateSample.ts | 12 +- .../samples-dev/azureFirewallsDeleteSample.ts | 2 +- .../samples-dev/azureFirewallsGetSample.ts | 10 +- .../azureFirewallsListAllSample.ts | 2 +- ...azureFirewallsListLearnedPrefixesSample.ts | 2 +- .../samples-dev/azureFirewallsListSample.ts | 2 +- .../azureFirewallsPacketCaptureSample.ts | 2 +- .../azureFirewallsUpdateTagsSample.ts | 2 +- .../bastionHostsCreateOrUpdateSample.ts | 38 +- .../samples-dev/bastionHostsDeleteSample.ts | 4 +- .../samples-dev/bastionHostsGetSample.ts | 28 +- .../bastionHostsListByResourceGroupSample.ts | 2 +- .../samples-dev/bastionHostsListSample.ts | 2 +- .../bastionHostsUpdateTagsSample.ts | 2 +- .../bgpServiceCommunitiesListSample.ts | 2 +- .../checkDnsNameAvailabilitySample.ts | 2 +- ...urationPolicyGroupsCreateOrUpdateSample.ts | 2 +- .../configurationPolicyGroupsDeleteSample.ts | 2 +- .../configurationPolicyGroupsGetSample.ts | 2 +- ...roupsListByVpnServerConfigurationSample.ts | 2 +- .../connectionMonitorsCreateOrUpdateSample.ts | 6 +- .../connectionMonitorsDeleteSample.ts | 2 +- .../connectionMonitorsGetSample.ts | 2 +- .../connectionMonitorsListSample.ts | 2 +- .../connectionMonitorsQuerySample.ts | 2 +- .../connectionMonitorsStartSample.ts | 2 +- .../connectionMonitorsStopSample.ts | 2 +- .../connectionMonitorsUpdateTagsSample.ts | 2 +- ...ivityConfigurationsCreateOrUpdateSample.ts | 2 +- .../connectivityConfigurationsDeleteSample.ts | 2 +- .../connectivityConfigurationsGetSample.ts | 2 +- .../connectivityConfigurationsListSample.ts | 2 +- .../customIPPrefixesCreateOrUpdateSample.ts | 2 +- .../customIPPrefixesDeleteSample.ts | 2 +- .../samples-dev/customIPPrefixesGetSample.ts | 2 +- .../customIPPrefixesListAllSample.ts | 2 +- .../samples-dev/customIPPrefixesListSample.ts | 2 +- .../customIPPrefixesUpdateTagsSample.ts | 2 +- .../ddosCustomPoliciesCreateOrUpdateSample.ts | 2 +- .../ddosCustomPoliciesDeleteSample.ts | 2 +- .../ddosCustomPoliciesGetSample.ts | 2 +- .../ddosCustomPoliciesUpdateTagsSample.ts | 2 +- ...ddosProtectionPlansCreateOrUpdateSample.ts | 2 +- .../ddosProtectionPlansDeleteSample.ts | 2 +- .../ddosProtectionPlansGetSample.ts | 2 +- ...rotectionPlansListByResourceGroupSample.ts | 2 +- .../ddosProtectionPlansListSample.ts | 2 +- .../ddosProtectionPlansUpdateTagsSample.ts | 2 +- .../defaultSecurityRulesGetSample.ts | 2 +- .../defaultSecurityRulesListSample.ts | 2 +- ...deleteBastionShareableLinkByTokenSample.ts | 2 +- .../deleteBastionShareableLinkSample.ts | 2 +- .../disconnectActiveSessionsSample.ts | 2 +- .../dscpConfigurationCreateOrUpdateSample.ts | 2 +- .../dscpConfigurationDeleteSample.ts | 2 +- .../samples-dev/dscpConfigurationGetSample.ts | 2 +- .../dscpConfigurationListAllSample.ts | 2 +- .../dscpConfigurationListSample.ts | 2 +- ...rcuitAuthorizationsCreateOrUpdateSample.ts | 2 +- ...sRouteCircuitAuthorizationsDeleteSample.ts | 2 +- ...ressRouteCircuitAuthorizationsGetSample.ts | 2 +- ...essRouteCircuitAuthorizationsListSample.ts | 2 +- ...eCircuitConnectionsCreateOrUpdateSample.ts | 2 +- ...ressRouteCircuitConnectionsDeleteSample.ts | 2 +- ...expressRouteCircuitConnectionsGetSample.ts | 2 +- ...xpressRouteCircuitConnectionsListSample.ts | 2 +- ...outeCircuitPeeringsCreateOrUpdateSample.ts | 2 +- ...expressRouteCircuitPeeringsDeleteSample.ts | 2 +- .../expressRouteCircuitPeeringsGetSample.ts | 2 +- .../expressRouteCircuitPeeringsListSample.ts | 2 +- ...xpressRouteCircuitsCreateOrUpdateSample.ts | 4 +- .../expressRouteCircuitsDeleteSample.ts | 2 +- ...pressRouteCircuitsGetPeeringStatsSample.ts | 2 +- .../expressRouteCircuitsGetSample.ts | 2 +- .../expressRouteCircuitsGetStatsSample.ts | 2 +- .../expressRouteCircuitsListAllSample.ts | 2 +- .../expressRouteCircuitsListArpTableSample.ts | 2 +- ...pressRouteCircuitsListRoutesTableSample.ts | 2 +- ...uteCircuitsListRoutesTableSummarySample.ts | 2 +- .../expressRouteCircuitsListSample.ts | 2 +- .../expressRouteCircuitsUpdateTagsSample.ts | 2 +- ...essRouteConnectionsCreateOrUpdateSample.ts | 2 +- .../expressRouteConnectionsDeleteSample.ts | 2 +- .../expressRouteConnectionsGetSample.ts | 2 +- .../expressRouteConnectionsListSample.ts | 2 +- ...sConnectionPeeringsCreateOrUpdateSample.ts | 2 +- ...outeCrossConnectionPeeringsDeleteSample.ts | 2 +- ...ssRouteCrossConnectionPeeringsGetSample.ts | 2 +- ...sRouteCrossConnectionPeeringsListSample.ts | 2 +- ...uteCrossConnectionsCreateOrUpdateSample.ts | 2 +- .../expressRouteCrossConnectionsGetSample.ts | 2 +- ...RouteCrossConnectionsListArpTableSample.ts | 2 +- ...ossConnectionsListByResourceGroupSample.ts | 2 +- ...teCrossConnectionsListRoutesTableSample.ts | 2 +- ...ConnectionsListRoutesTableSummarySample.ts | 2 +- .../expressRouteCrossConnectionsListSample.ts | 2 +- ...ssRouteCrossConnectionsUpdateTagsSample.ts | 2 +- ...xpressRouteGatewaysCreateOrUpdateSample.ts | 2 +- .../expressRouteGatewaysDeleteSample.ts | 2 +- .../expressRouteGatewaysGetSample.ts | 2 +- ...sRouteGatewaysListByResourceGroupSample.ts | 2 +- ...ssRouteGatewaysListBySubscriptionSample.ts | 2 +- .../expressRouteGatewaysUpdateTagsSample.ts | 2 +- .../samples-dev/expressRouteLinksGetSample.ts | 2 +- .../expressRouteLinksListSample.ts | 2 +- ...ePortAuthorizationsCreateOrUpdateSample.ts | 2 +- ...ressRoutePortAuthorizationsDeleteSample.ts | 2 +- ...expressRoutePortAuthorizationsGetSample.ts | 2 +- ...xpressRoutePortAuthorizationsListSample.ts | 2 +- .../expressRoutePortsCreateOrUpdateSample.ts | 4 +- .../expressRoutePortsDeleteSample.ts | 2 +- .../expressRoutePortsGenerateLoaSample.ts | 2 +- .../samples-dev/expressRoutePortsGetSample.ts | 2 +- ...ressRoutePortsListByResourceGroupSample.ts | 2 +- .../expressRoutePortsListSample.ts | 2 +- .../expressRoutePortsLocationsGetSample.ts | 2 +- .../expressRoutePortsLocationsListSample.ts | 2 +- .../expressRoutePortsUpdateTagsSample.ts | 2 +- .../expressRouteProviderPortSample.ts | 2 +- ...essRouteProviderPortsLocationListSample.ts | 2 +- .../expressRouteServiceProvidersListSample.ts | 2 +- .../firewallPoliciesCreateOrUpdateSample.ts | 2 +- .../firewallPoliciesDeleteSample.ts | 2 +- .../samples-dev/firewallPoliciesGetSample.ts | 2 +- .../firewallPoliciesListAllSample.ts | 2 +- .../samples-dev/firewallPoliciesListSample.ts | 2 +- .../firewallPoliciesUpdateTagsSample.ts | 2 +- .../firewallPolicyDeploymentsDeploySample.ts | 2 +- ...irewallPolicyDraftsCreateOrUpdateSample.ts | 2 +- .../firewallPolicyDraftsDeleteSample.ts | 2 +- .../firewallPolicyDraftsGetSample.ts | 2 +- ...icyIdpsSignaturesFilterValuesListSample.ts | 2 +- .../firewallPolicyIdpsSignaturesListSample.ts | 2 +- ...lPolicyIdpsSignaturesOverridesGetSample.ts | 2 +- ...PolicyIdpsSignaturesOverridesListSample.ts | 2 +- ...olicyIdpsSignaturesOverridesPatchSample.ts | 2 +- ...lPolicyIdpsSignaturesOverridesPutSample.ts | 2 +- ...llectionGroupDraftsCreateOrUpdateSample.ts | 2 +- ...cyRuleCollectionGroupDraftsDeleteSample.ts | 2 +- ...olicyRuleCollectionGroupDraftsGetSample.ts | 2 +- ...uleCollectionGroupsCreateOrUpdateSample.ts | 10 +- ...lPolicyRuleCollectionGroupsDeleteSample.ts | 2 +- ...wallPolicyRuleCollectionGroupsGetSample.ts | 8 +- ...allPolicyRuleCollectionGroupsListSample.ts | 6 +- .../flowLogsCreateOrUpdateSample.ts | 2 +- .../samples-dev/flowLogsDeleteSample.ts | 2 +- .../samples-dev/flowLogsGetSample.ts | 2 +- .../samples-dev/flowLogsListSample.ts | 2 +- .../samples-dev/flowLogsUpdateTagsSample.ts | 2 +- ...nvpnserverconfigurationvpnprofileSample.ts | 2 +- .../samples-dev/getActiveSessionsSample.ts | 2 +- .../getBastionShareableLinkSample.ts | 2 +- .../hubRouteTablesCreateOrUpdateSample.ts | 2 +- .../samples-dev/hubRouteTablesDeleteSample.ts | 2 +- .../samples-dev/hubRouteTablesGetSample.ts | 2 +- .../samples-dev/hubRouteTablesListSample.ts | 2 +- ...lNetworkConnectionsCreateOrUpdateSample.ts | 2 +- ...ubVirtualNetworkConnectionsDeleteSample.ts | 2 +- .../hubVirtualNetworkConnectionsGetSample.ts | 2 +- .../hubVirtualNetworkConnectionsListSample.ts | 2 +- .../inboundNatRulesCreateOrUpdateSample.ts | 2 +- .../inboundNatRulesDeleteSample.ts | 2 +- .../samples-dev/inboundNatRulesGetSample.ts | 2 +- .../samples-dev/inboundNatRulesListSample.ts | 2 +- ...inboundSecurityRuleCreateOrUpdateSample.ts | 2 +- .../inboundSecurityRuleGetSample.ts | 2 +- .../ipAllocationsCreateOrUpdateSample.ts | 2 +- .../samples-dev/ipAllocationsDeleteSample.ts | 2 +- .../samples-dev/ipAllocationsGetSample.ts | 2 +- .../ipAllocationsListByResourceGroupSample.ts | 2 +- .../samples-dev/ipAllocationsListSample.ts | 2 +- .../ipAllocationsUpdateTagsSample.ts | 2 +- .../ipGroupsCreateOrUpdateSample.ts | 2 +- .../samples-dev/ipGroupsDeleteSample.ts | 2 +- .../samples-dev/ipGroupsGetSample.ts | 2 +- .../ipGroupsListByResourceGroupSample.ts | 2 +- .../samples-dev/ipGroupsListSample.ts | 2 +- .../samples-dev/ipGroupsUpdateGroupsSample.ts | 2 +- .../samples-dev/ipamPoolsCreateSample.ts | 53 + .../samples-dev/ipamPoolsDeleteSample.ts | 44 + .../ipamPoolsGetPoolUsageSample.ts | 44 + .../samples-dev/ipamPoolsGetSample.ts | 44 + .../ipamPoolsListAssociatedResourcesSample.ts | 47 + .../samples-dev/ipamPoolsListSample.ts | 45 + .../samples-dev/ipamPoolsUpdateSample.ts | 44 + ...tActiveConnectivityConfigurationsSample.ts | 2 +- .../listActiveSecurityAdminRulesSample.ts | 2 +- ...fectiveConnectivityConfigurationsSample.ts | 2 +- ...anagerEffectiveSecurityAdminRulesSample.ts | 2 +- ...BackendAddressPoolsCreateOrUpdateSample.ts | 2 +- ...BalancerBackendAddressPoolsDeleteSample.ts | 2 +- ...oadBalancerBackendAddressPoolsGetSample.ts | 4 +- ...adBalancerBackendAddressPoolsListSample.ts | 4 +- ...lancerFrontendIPConfigurationsGetSample.ts | 2 +- ...ancerFrontendIPConfigurationsListSample.ts | 2 +- ...loadBalancerLoadBalancingRulesGetSample.ts | 2 +- ...dBalancerLoadBalancingRulesHealthSample.ts | 42 + ...oadBalancerLoadBalancingRulesListSample.ts | 2 +- ...loadBalancerNetworkInterfacesListSample.ts | 4 +- .../loadBalancerOutboundRulesGetSample.ts | 2 +- .../loadBalancerOutboundRulesListSample.ts | 2 +- .../loadBalancerProbesGetSample.ts | 2 +- .../loadBalancerProbesListSample.ts | 2 +- .../loadBalancersCreateOrUpdateSample.ts | 20 +- .../samples-dev/loadBalancersDeleteSample.ts | 2 +- .../samples-dev/loadBalancersGetSample.ts | 4 +- .../samples-dev/loadBalancersListAllSample.ts | 2 +- ...ersListInboundNatRulePortMappingsSample.ts | 2 +- .../samples-dev/loadBalancersListSample.ts | 2 +- .../loadBalancersMigrateToIPBasedSample.ts | 2 +- ...oadBalancersSwapPublicIPAddressesSample.ts | 2 +- .../loadBalancersUpdateTagsSample.ts | 2 +- ...ocalNetworkGatewaysCreateOrUpdateSample.ts | 2 +- .../localNetworkGatewaysDeleteSample.ts | 2 +- .../localNetworkGatewaysGetSample.ts | 2 +- .../localNetworkGatewaysListSample.ts | 2 +- .../localNetworkGatewaysUpdateTagsSample.ts | 2 +- ...kManagerConnectionsCreateOrUpdateSample.ts | 2 +- ...upNetworkManagerConnectionsDeleteSample.ts | 2 +- ...GroupNetworkManagerConnectionsGetSample.ts | 2 +- ...roupNetworkManagerConnectionsListSample.ts | 2 +- .../natGatewaysCreateOrUpdateSample.ts | 2 +- .../samples-dev/natGatewaysDeleteSample.ts | 2 +- .../samples-dev/natGatewaysGetSample.ts | 2 +- .../samples-dev/natGatewaysListAllSample.ts | 2 +- .../samples-dev/natGatewaysListSample.ts | 2 +- .../natGatewaysUpdateTagsSample.ts | 2 +- .../natRulesCreateOrUpdateSample.ts | 2 +- .../samples-dev/natRulesDeleteSample.ts | 2 +- .../samples-dev/natRulesGetSample.ts | 2 +- .../natRulesListByVpnGatewaySample.ts | 2 +- .../networkGroupsCreateOrUpdateSample.ts | 2 +- .../samples-dev/networkGroupsDeleteSample.ts | 2 +- .../samples-dev/networkGroupsGetSample.ts | 2 +- .../samples-dev/networkGroupsListSample.ts | 2 +- ...tworkInterfaceIPConfigurationsGetSample.ts | 2 +- ...workInterfaceIPConfigurationsListSample.ts | 2 +- ...networkInterfaceLoadBalancersListSample.ts | 2 +- ...ceTapConfigurationsCreateOrUpdateSample.ts | 2 +- ...kInterfaceTapConfigurationsDeleteSample.ts | 2 +- ...workInterfaceTapConfigurationsGetSample.ts | 2 +- ...orkInterfaceTapConfigurationsListSample.ts | 2 +- .../networkInterfacesCreateOrUpdateSample.ts | 4 +- .../networkInterfacesDeleteSample.ts | 2 +- ...esGetCloudServiceNetworkInterfaceSample.ts | 2 +- ...kInterfacesGetEffectiveRouteTableSample.ts | 2 +- .../samples-dev/networkInterfacesGetSample.ts | 2 +- ...ualMachineScaleSetIPConfigurationSample.ts | 2 +- ...alMachineScaleSetNetworkInterfaceSample.ts | 2 +- .../networkInterfacesListAllSample.ts | 2 +- ...ListCloudServiceNetworkInterfacesSample.ts | 2 +- ...viceRoleInstanceNetworkInterfacesSample.ts | 2 +- ...istEffectiveNetworkSecurityGroupsSample.ts | 2 +- .../networkInterfacesListSample.ts | 2 +- ...alMachineScaleSetIPConfigurationsSample.ts | 2 +- ...lMachineScaleSetNetworkInterfacesSample.ts | 2 +- ...achineScaleSetVMNetworkInterfacesSample.ts | 2 +- .../networkInterfacesUpdateTagsSample.ts | 2 +- .../networkManagerCommitsPostSample.ts | 2 +- ...etworkManagerDeploymentStatusListSample.ts | 2 +- ...utingConfigurationsCreateOrUpdateSample.ts | 2 +- ...anagerRoutingConfigurationsDeleteSample.ts | 2 +- ...rkManagerRoutingConfigurationsGetSample.ts | 2 +- ...kManagerRoutingConfigurationsListSample.ts | 2 +- .../networkManagersCreateOrUpdateSample.ts | 2 +- .../networkManagersDeleteSample.ts | 2 +- .../samples-dev/networkManagersGetSample.ts | 2 +- ...networkManagersListBySubscriptionSample.ts | 2 +- .../samples-dev/networkManagersListSample.ts | 2 +- .../samples-dev/networkManagersPatchSample.ts | 2 +- .../networkProfilesCreateOrUpdateSample.ts | 2 +- .../networkProfilesDeleteSample.ts | 2 +- .../samples-dev/networkProfilesGetSample.ts | 4 +- .../networkProfilesListAllSample.ts | 2 +- .../samples-dev/networkProfilesListSample.ts | 2 +- .../networkProfilesUpdateTagsSample.ts | 2 +- ...tworkSecurityGroupsCreateOrUpdateSample.ts | 4 +- .../networkSecurityGroupsDeleteSample.ts | 2 +- .../networkSecurityGroupsGetSample.ts | 2 +- .../networkSecurityGroupsListAllSample.ts | 2 +- .../networkSecurityGroupsListSample.ts | 2 +- .../networkSecurityGroupsUpdateTagsSample.ts | 2 +- ...pplianceConnectionsCreateOrUpdateSample.ts | 2 +- ...VirtualApplianceConnectionsDeleteSample.ts | 2 +- ...orkVirtualApplianceConnectionsGetSample.ts | 2 +- ...rkVirtualApplianceConnectionsListSample.ts | 2 +- ...rkVirtualAppliancesCreateOrUpdateSample.ts | 4 +- .../networkVirtualAppliancesDeleteSample.ts | 2 +- .../networkVirtualAppliancesGetSample.ts | 2 +- ...tualAppliancesListByResourceGroupSample.ts | 2 +- .../networkVirtualAppliancesListSample.ts | 2 +- .../networkVirtualAppliancesRestartSample.ts | 4 +- ...etworkVirtualAppliancesUpdateTagsSample.ts | 2 +- .../networkWatchersCheckConnectivitySample.ts | 2 +- .../networkWatchersCreateOrUpdateSample.ts | 2 +- .../networkWatchersDeleteSample.ts | 2 +- ...atchersGetAzureReachabilityReportSample.ts | 2 +- .../networkWatchersGetFlowLogStatusSample.ts | 2 +- ...GetNetworkConfigurationDiagnosticSample.ts | 2 +- .../networkWatchersGetNextHopSample.ts | 2 +- .../samples-dev/networkWatchersGetSample.ts | 2 +- .../networkWatchersGetTopologySample.ts | 2 +- ...kWatchersGetTroubleshootingResultSample.ts | 2 +- ...networkWatchersGetTroubleshootingSample.ts | 2 +- ...networkWatchersGetVMSecurityRulesSample.ts | 2 +- .../networkWatchersListAllSample.ts | 2 +- ...orkWatchersListAvailableProvidersSample.ts | 2 +- .../samples-dev/networkWatchersListSample.ts | 2 +- ...rkWatchersSetFlowLogConfigurationSample.ts | 2 +- .../networkWatchersUpdateTagsSample.ts | 2 +- .../networkWatchersVerifyIPFlowSample.ts | 2 +- .../samples-dev/operationsListSample.ts | 2 +- .../p2SVpnGatewaysCreateOrUpdateSample.ts | 2 +- .../samples-dev/p2SVpnGatewaysDeleteSample.ts | 2 +- ...tewaysDisconnectP2SvpnConnectionsSample.ts | 2 +- .../p2SVpnGatewaysGenerateVpnProfileSample.ts | 2 +- ...GetP2SvpnConnectionHealthDetailedSample.ts | 2 +- ...GatewaysGetP2SvpnConnectionHealthSample.ts | 2 +- .../samples-dev/p2SVpnGatewaysGetSample.ts | 2 +- ...p2SVpnGatewaysListByResourceGroupSample.ts | 2 +- .../samples-dev/p2SVpnGatewaysListSample.ts | 2 +- .../samples-dev/p2SVpnGatewaysResetSample.ts | 2 +- .../p2SVpnGatewaysUpdateTagsSample.ts | 2 +- .../samples-dev/packetCapturesCreateSample.ts | 2 +- .../samples-dev/packetCapturesDeleteSample.ts | 2 +- .../samples-dev/packetCapturesGetSample.ts | 2 +- .../packetCapturesGetStatusSample.ts | 2 +- .../samples-dev/packetCapturesListSample.ts | 2 +- .../samples-dev/packetCapturesStopSample.ts | 2 +- ...ExpressRouteCircuitConnectionsGetSample.ts | 2 +- ...xpressRouteCircuitConnectionsListSample.ts | 2 +- ...rivateDnsZoneGroupsCreateOrUpdateSample.ts | 2 +- .../privateDnsZoneGroupsDeleteSample.ts | 2 +- .../privateDnsZoneGroupsGetSample.ts | 2 +- .../privateDnsZoneGroupsListSample.ts | 2 +- .../privateEndpointsCreateOrUpdateSample.ts | 6 +- .../privateEndpointsDeleteSample.ts | 2 +- .../samples-dev/privateEndpointsGetSample.ts | 6 +- ...rivateEndpointsListBySubscriptionSample.ts | 2 +- .../samples-dev/privateEndpointsListSample.ts | 2 +- ...kServiceVisibilityByResourceGroupSample.ts | 2 +- ...CheckPrivateLinkServiceVisibilitySample.ts | 2 +- ...privateLinkServicesCreateOrUpdateSample.ts | 2 +- ...esDeletePrivateEndpointConnectionSample.ts | 2 +- .../privateLinkServicesDeleteSample.ts | 2 +- ...vicesGetPrivateEndpointConnectionSample.ts | 2 +- .../privateLinkServicesGetSample.ts | 2 +- ...rivateLinkServicesByResourceGroupSample.ts | 2 +- ...stAutoApprovedPrivateLinkServicesSample.ts | 2 +- ...ateLinkServicesListBySubscriptionSample.ts | 2 +- ...cesListPrivateEndpointConnectionsSample.ts | 2 +- .../privateLinkServicesListSample.ts | 2 +- ...esUpdatePrivateEndpointConnectionSample.ts | 2 +- .../publicIPAddressesCreateOrUpdateSample.ts | 8 +- ...icIPAddressesDdosProtectionStatusSample.ts | 2 +- .../publicIPAddressesDeleteSample.ts | 2 +- ...sesGetCloudServicePublicIpaddressSample.ts | 2 +- .../samples-dev/publicIPAddressesGetSample.ts | 2 +- ...ualMachineScaleSetPublicIpaddressSample.ts | 2 +- .../publicIPAddressesListAllSample.ts | 2 +- ...ListCloudServicePublicIpaddressesSample.ts | 2 +- ...viceRoleInstancePublicIpaddressesSample.ts | 2 +- .../publicIPAddressesListSample.ts | 2 +- ...lMachineScaleSetPublicIpaddressesSample.ts | 2 +- ...achineScaleSetVmpublicIpaddressesSample.ts | 2 +- .../publicIPAddressesUpdateTagsSample.ts | 2 +- .../publicIPPrefixesCreateOrUpdateSample.ts | 4 +- .../publicIPPrefixesDeleteSample.ts | 2 +- .../samples-dev/publicIPPrefixesGetSample.ts | 2 +- .../publicIPPrefixesListAllSample.ts | 2 +- .../samples-dev/publicIPPrefixesListSample.ts | 2 +- .../publicIPPrefixesUpdateTagsSample.ts | 2 +- .../putBastionShareableLinkSample.ts | 2 +- ...reachabilityAnalysisIntentsCreateSample.ts | 66 + ...reachabilityAnalysisIntentsDeleteSample.ts | 46 + .../reachabilityAnalysisIntentsGetSample.ts | 46 + .../reachabilityAnalysisIntentsListSample.ts | 47 + .../reachabilityAnalysisRunsCreateSample.ts | 57 + .../reachabilityAnalysisRunsDeleteSample.ts | 46 + .../reachabilityAnalysisRunsGetSample.ts | 46 + .../reachabilityAnalysisRunsListSample.ts | 47 + .../resourceNavigationLinksListSample.ts | 2 +- .../routeFilterRulesCreateOrUpdateSample.ts | 2 +- .../routeFilterRulesDeleteSample.ts | 2 +- .../samples-dev/routeFilterRulesGetSample.ts | 2 +- ...routeFilterRulesListByRouteFilterSample.ts | 2 +- .../routeFiltersCreateOrUpdateSample.ts | 2 +- .../samples-dev/routeFiltersDeleteSample.ts | 2 +- .../samples-dev/routeFiltersGetSample.ts | 2 +- .../routeFiltersListByResourceGroupSample.ts | 2 +- .../samples-dev/routeFiltersListSample.ts | 2 +- .../routeFiltersUpdateTagsSample.ts | 2 +- .../routeMapsCreateOrUpdateSample.ts | 2 +- .../samples-dev/routeMapsDeleteSample.ts | 2 +- .../samples-dev/routeMapsGetSample.ts | 2 +- .../samples-dev/routeMapsListSample.ts | 2 +- .../routeTablesCreateOrUpdateSample.ts | 4 +- .../samples-dev/routeTablesDeleteSample.ts | 2 +- .../samples-dev/routeTablesGetSample.ts | 2 +- .../samples-dev/routeTablesListAllSample.ts | 2 +- .../samples-dev/routeTablesListSample.ts | 2 +- .../routeTablesUpdateTagsSample.ts | 2 +- .../samples-dev/routesCreateOrUpdateSample.ts | 2 +- .../samples-dev/routesDeleteSample.ts | 2 +- .../samples-dev/routesGetSample.ts | 2 +- .../samples-dev/routesListSample.ts | 2 +- .../routingIntentCreateOrUpdateSample.ts | 2 +- .../samples-dev/routingIntentDeleteSample.ts | 2 +- .../samples-dev/routingIntentGetSample.ts | 2 +- .../samples-dev/routingIntentListSample.ts | 2 +- ...tingRuleCollectionsCreateOrUpdateSample.ts | 2 +- .../routingRuleCollectionsDeleteSample.ts | 2 +- .../routingRuleCollectionsGetSample.ts | 2 +- .../routingRuleCollectionsListSample.ts | 2 +- .../routingRulesCreateOrUpdateSample.ts | 4 +- .../samples-dev/routingRulesDeleteSample.ts | 2 +- .../samples-dev/routingRulesGetSample.ts | 2 +- .../samples-dev/routingRulesListSample.ts | 2 +- .../scopeConnectionsCreateOrUpdateSample.ts | 2 +- .../scopeConnectionsDeleteSample.ts | 2 +- .../samples-dev/scopeConnectionsGetSample.ts | 2 +- .../samples-dev/scopeConnectionsListSample.ts | 2 +- ...AdminConfigurationsCreateOrUpdateSample.ts | 32 +- ...securityAdminConfigurationsDeleteSample.ts | 2 +- .../securityAdminConfigurationsGetSample.ts | 2 +- .../securityAdminConfigurationsListSample.ts | 2 +- ...ityPartnerProvidersCreateOrUpdateSample.ts | 2 +- .../securityPartnerProvidersDeleteSample.ts | 2 +- .../securityPartnerProvidersGetSample.ts | 2 +- ...rtnerProvidersListByResourceGroupSample.ts | 2 +- .../securityPartnerProvidersListSample.ts | 2 +- ...ecurityPartnerProvidersUpdateTagsSample.ts | 2 +- .../securityRulesCreateOrUpdateSample.ts | 2 +- .../samples-dev/securityRulesDeleteSample.ts | 2 +- .../samples-dev/securityRulesGetSample.ts | 2 +- .../samples-dev/securityRulesListSample.ts | 2 +- ...yUserConfigurationsCreateOrUpdateSample.ts | 2 +- .../securityUserConfigurationsDeleteSample.ts | 2 +- .../securityUserConfigurationsGetSample.ts | 2 +- .../securityUserConfigurationsListSample.ts | 2 +- ...UserRuleCollectionsCreateOrUpdateSample.ts | 2 +- ...securityUserRuleCollectionsDeleteSample.ts | 2 +- .../securityUserRuleCollectionsGetSample.ts | 2 +- .../securityUserRuleCollectionsListSample.ts | 2 +- .../securityUserRulesCreateOrUpdateSample.ts | 2 +- .../securityUserRulesDeleteSample.ts | 2 +- .../samples-dev/securityUserRulesGetSample.ts | 2 +- .../securityUserRulesListSample.ts | 2 +- .../serviceAssociationLinksListSample.ts | 2 +- ...iceEndpointPoliciesCreateOrUpdateSample.ts | 4 +- .../serviceEndpointPoliciesDeleteSample.ts | 2 +- .../serviceEndpointPoliciesGetSample.ts | 2 +- ...dpointPoliciesListByResourceGroupSample.ts | 2 +- .../serviceEndpointPoliciesListSample.ts | 2 +- ...serviceEndpointPoliciesUpdateTagsSample.ts | 2 +- ...ntPolicyDefinitionsCreateOrUpdateSample.ts | 2 +- ...ceEndpointPolicyDefinitionsDeleteSample.ts | 2 +- ...rviceEndpointPolicyDefinitionsGetSample.ts | 2 +- ...icyDefinitionsListByResourceGroupSample.ts | 2 +- .../serviceTagInformationListSample.ts | 6 +- .../samples-dev/serviceTagsListSample.ts | 2 +- .../samples-dev/staticCidrsCreateSample.ts | 46 + .../samples-dev/staticCidrsDeleteSample.ts | 46 + .../samples-dev/staticCidrsGetSample.ts | 46 + .../samples-dev/staticCidrsListSample.ts | 47 + .../staticMembersCreateOrUpdateSample.ts | 2 +- .../samples-dev/staticMembersDeleteSample.ts | 2 +- .../samples-dev/staticMembersGetSample.ts | 2 +- .../samples-dev/staticMembersListSample.ts | 2 +- .../subnetsCreateOrUpdateSample.ts | 10 +- .../samples-dev/subnetsDeleteSample.ts | 2 +- .../samples-dev/subnetsGetSample.ts | 6 +- .../samples-dev/subnetsListSample.ts | 2 +- .../subnetsPrepareNetworkPoliciesSample.ts | 2 +- .../subnetsUnprepareNetworkPoliciesSample.ts | 2 +- ...kManagerConnectionsCreateOrUpdateSample.ts | 2 +- ...onNetworkManagerConnectionsDeleteSample.ts | 2 +- ...ptionNetworkManagerConnectionsGetSample.ts | 2 +- ...tionNetworkManagerConnectionsListSample.ts | 2 +- .../supportedSecurityProvidersSample.ts | 2 +- .../samples-dev/usagesListSample.ts | 4 +- .../verifierWorkspacesCreateSample.ts | 49 + .../verifierWorkspacesDeleteSample.ts | 44 + .../verifierWorkspacesGetSample.ts | 44 + .../verifierWorkspacesListSample.ts | 45 + .../verifierWorkspacesUpdateSample.ts | 44 + .../samples-dev/vipSwapCreateSample.ts | 2 +- .../samples-dev/vipSwapGetSample.ts | 2 +- .../samples-dev/vipSwapListSample.ts | 2 +- ...rtualApplianceSitesCreateOrUpdateSample.ts | 2 +- .../virtualApplianceSitesDeleteSample.ts | 2 +- .../virtualApplianceSitesGetSample.ts | 2 +- .../virtualApplianceSitesListSample.ts | 2 +- .../virtualApplianceSkusGetSample.ts | 2 +- .../virtualApplianceSkusListSample.ts | 2 +- ...ualHubBgpConnectionCreateOrUpdateSample.ts | 2 +- .../virtualHubBgpConnectionDeleteSample.ts | 2 +- .../virtualHubBgpConnectionGetSample.ts | 2 +- ...gpConnectionsListAdvertisedRoutesSample.ts | 2 +- ...ubBgpConnectionsListLearnedRoutesSample.ts | 2 +- .../virtualHubBgpConnectionsListSample.ts | 2 +- ...lHubIPConfigurationCreateOrUpdateSample.ts | 2 +- .../virtualHubIPConfigurationDeleteSample.ts | 2 +- .../virtualHubIPConfigurationGetSample.ts | 2 +- .../virtualHubIPConfigurationListSample.ts | 2 +- ...ualHubRouteTableV2SCreateOrUpdateSample.ts | 2 +- .../virtualHubRouteTableV2SDeleteSample.ts | 2 +- .../virtualHubRouteTableV2SGetSample.ts | 2 +- .../virtualHubRouteTableV2SListSample.ts | 2 +- .../virtualHubsCreateOrUpdateSample.ts | 2 +- .../samples-dev/virtualHubsDeleteSample.ts | 2 +- ...lHubsGetEffectiveVirtualHubRoutesSample.ts | 6 +- .../virtualHubsGetInboundRoutesSample.ts | 2 +- .../virtualHubsGetOutboundRoutesSample.ts | 2 +- .../samples-dev/virtualHubsGetSample.ts | 2 +- .../virtualHubsListByResourceGroupSample.ts | 2 +- .../samples-dev/virtualHubsListSample.ts | 2 +- .../virtualHubsUpdateTagsSample.ts | 2 +- ...kGatewayConnectionsCreateOrUpdateSample.ts | 2 +- ...alNetworkGatewayConnectionsDeleteSample.ts | 2 +- ...etworkGatewayConnectionsGetIkeSasSample.ts | 2 +- ...rtualNetworkGatewayConnectionsGetSample.ts | 2 +- ...orkGatewayConnectionsGetSharedKeySample.ts | 2 +- ...tualNetworkGatewayConnectionsListSample.ts | 2 +- ...GatewayConnectionsResetConnectionSample.ts | 2 +- ...kGatewayConnectionsResetSharedKeySample.ts | 2 +- ...orkGatewayConnectionsSetSharedKeySample.ts | 2 +- ...ewayConnectionsStartPacketCaptureSample.ts | 4 +- ...tewayConnectionsStopPacketCaptureSample.ts | 2 +- ...tworkGatewayConnectionsUpdateTagsSample.ts | 2 +- ...workGatewayNatRulesCreateOrUpdateSample.ts | 2 +- ...rtualNetworkGatewayNatRulesDeleteSample.ts | 2 +- .../virtualNetworkGatewayNatRulesGetSample.ts | 2 +- ...tRulesListByVirtualNetworkGatewaySample.ts | 2 +- ...tualNetworkGatewaysCreateOrUpdateSample.ts | 4 +- .../virtualNetworkGatewaysDeleteSample.ts | 2 +- ...rtualNetworkGatewayVpnConnectionsSample.ts | 2 +- ...NetworkGatewaysGenerateVpnProfileSample.ts | 2 +- ...kGatewaysGeneratevpnclientpackageSample.ts | 2 +- ...etworkGatewaysGetAdvertisedRoutesSample.ts | 2 +- ...alNetworkGatewaysGetBgpPeerStatusSample.ts | 2 +- ...GatewaysGetFailoverAllTestDetailsSample.ts | 45 + ...ewaysGetFailoverSingleTestDetailsSample.ts | 45 + ...alNetworkGatewaysGetLearnedRoutesSample.ts | 2 +- .../virtualNetworkGatewaysGetSample.ts | 4 +- ...rkGatewaysGetVpnProfilePackageUrlSample.ts | 2 +- ...ewaysGetVpnclientConnectionHealthSample.ts | 2 +- ...tewaysGetVpnclientIpsecParametersSample.ts | 2 +- ...ualNetworkGatewaysListConnectionsSample.ts | 2 +- .../virtualNetworkGatewaysListSample.ts | 2 +- .../virtualNetworkGatewaysResetSample.ts | 2 +- ...rkGatewaysResetVpnClientSharedKeySample.ts | 2 +- ...tewaysSetVpnclientIpsecParametersSample.ts | 2 +- ...xpressRouteSiteFailoverSimulationSample.ts | 43 + ...NetworkGatewaysStartPacketCaptureSample.ts | 4 +- ...xpressRouteSiteFailoverSimulationSample.ts | 61 + ...lNetworkGatewaysStopPacketCaptureSample.ts | 2 +- ...etworkGatewaysSupportedVpnDevicesSample.ts | 2 +- .../virtualNetworkGatewaysUpdateTagsSample.ts | 2 +- ...ewaysVpnDeviceConfigurationScriptSample.ts | 2 +- ...tualNetworkPeeringsCreateOrUpdateSample.ts | 14 +- .../virtualNetworkPeeringsDeleteSample.ts | 2 +- .../virtualNetworkPeeringsGetSample.ts | 8 +- .../virtualNetworkPeeringsListSample.ts | 4 +- .../virtualNetworkTapsCreateOrUpdateSample.ts | 2 +- .../virtualNetworkTapsDeleteSample.ts | 2 +- .../virtualNetworkTapsGetSample.ts | 2 +- .../virtualNetworkTapsListAllSample.ts | 2 +- ...ualNetworkTapsListByResourceGroupSample.ts | 2 +- .../virtualNetworkTapsUpdateTagsSample.ts | 2 +- ...etworksCheckIPAddressAvailabilitySample.ts | 2 +- .../virtualNetworksCreateOrUpdateSample.ts | 59 +- .../virtualNetworksDeleteSample.ts | 2 +- .../samples-dev/virtualNetworksGetSample.ts | 6 +- .../virtualNetworksListAllSample.ts | 2 +- ...lNetworksListDdosProtectionStatusSample.ts | 2 +- .../samples-dev/virtualNetworksListSample.ts | 2 +- .../virtualNetworksListUsageSample.ts | 2 +- .../virtualNetworksUpdateTagsSample.ts | 2 +- ...rtualRouterPeeringsCreateOrUpdateSample.ts | 2 +- .../virtualRouterPeeringsDeleteSample.ts | 2 +- .../virtualRouterPeeringsGetSample.ts | 2 +- .../virtualRouterPeeringsListSample.ts | 2 +- .../virtualRoutersCreateOrUpdateSample.ts | 2 +- .../samples-dev/virtualRoutersDeleteSample.ts | 2 +- .../samples-dev/virtualRoutersGetSample.ts | 2 +- ...virtualRoutersListByResourceGroupSample.ts | 2 +- .../samples-dev/virtualRoutersListSample.ts | 2 +- .../virtualWansCreateOrUpdateSample.ts | 2 +- .../samples-dev/virtualWansDeleteSample.ts | 2 +- .../samples-dev/virtualWansGetSample.ts | 2 +- .../virtualWansListByResourceGroupSample.ts | 2 +- .../samples-dev/virtualWansListSample.ts | 2 +- .../virtualWansUpdateTagsSample.ts | 2 +- .../vpnConnectionsCreateOrUpdateSample.ts | 2 +- .../samples-dev/vpnConnectionsDeleteSample.ts | 2 +- .../samples-dev/vpnConnectionsGetSample.ts | 2 +- .../vpnConnectionsListByVpnGatewaySample.ts | 2 +- .../vpnConnectionsStartPacketCaptureSample.ts | 4 +- .../vpnConnectionsStopPacketCaptureSample.ts | 2 +- .../vpnGatewaysCreateOrUpdateSample.ts | 2 +- .../samples-dev/vpnGatewaysDeleteSample.ts | 2 +- .../samples-dev/vpnGatewaysGetSample.ts | 2 +- .../vpnGatewaysListByResourceGroupSample.ts | 2 +- .../samples-dev/vpnGatewaysListSample.ts | 2 +- .../samples-dev/vpnGatewaysResetSample.ts | 2 +- .../vpnGatewaysStartPacketCaptureSample.ts | 4 +- .../vpnGatewaysStopPacketCaptureSample.ts | 2 +- .../vpnGatewaysUpdateTagsSample.ts | 2 +- ...pnLinkConnectionsGetAllSharedKeysSample.ts | 2 +- ...inkConnectionsGetDefaultSharedKeySample.ts | 2 +- .../vpnLinkConnectionsGetIkeSasSample.ts | 2 +- ...inkConnectionsListByVpnConnectionSample.ts | 2 +- ...nkConnectionsListDefaultSharedKeySample.ts | 2 +- ...vpnLinkConnectionsResetConnectionSample.ts | 2 +- ...nectionsSetOrInitDefaultSharedKeySample.ts | 2 +- ...tionsAssociatedWithVirtualWanListSample.ts | 2 +- ...erverConfigurationsCreateOrUpdateSample.ts | 2 +- .../vpnServerConfigurationsDeleteSample.ts | 2 +- .../vpnServerConfigurationsGetSample.ts | 2 +- ...ConfigurationsListByResourceGroupSample.ts | 2 +- .../vpnServerConfigurationsListSample.ts | 2 +- ...vpnServerConfigurationsUpdateTagsSample.ts | 2 +- .../vpnSiteLinkConnectionsGetSample.ts | 2 +- .../samples-dev/vpnSiteLinksGetSample.ts | 2 +- .../vpnSiteLinksListByVpnSiteSample.ts | 2 +- .../vpnSitesConfigurationDownloadSample.ts | 2 +- .../vpnSitesCreateOrUpdateSample.ts | 2 +- .../samples-dev/vpnSitesDeleteSample.ts | 2 +- .../samples-dev/vpnSitesGetSample.ts | 2 +- .../vpnSitesListByResourceGroupSample.ts | 2 +- .../samples-dev/vpnSitesListSample.ts | 2 +- .../samples-dev/vpnSitesUpdateTagsSample.ts | 2 +- ...ionFirewallPoliciesCreateOrUpdateSample.ts | 2 +- ...ApplicationFirewallPoliciesDeleteSample.ts | 2 +- ...webApplicationFirewallPoliciesGetSample.ts | 2 +- ...pplicationFirewallPoliciesListAllSample.ts | 2 +- ...ebApplicationFirewallPoliciesListSample.ts | 2 +- .../samples-dev/webCategoriesGetSample.ts | 2 +- .../webCategoriesListBySubscriptionSample.ts | 2 +- .../samples/v33/javascript/README.md | 1372 ++++----- ...dminRuleCollectionsCreateOrUpdateSample.js | 2 +- .../adminRuleCollectionsDeleteSample.js | 2 +- .../adminRuleCollectionsGetSample.js | 2 +- .../adminRuleCollectionsListSample.js | 2 +- .../adminRulesCreateOrUpdateSample.js | 28 +- .../v33/javascript/adminRulesDeleteSample.js | 2 +- .../v33/javascript/adminRulesGetSample.js | 4 +- .../v33/javascript/adminRulesListSample.js | 2 +- ...yPrivateEndpointConnectionsDeleteSample.js | 2 +- ...ewayPrivateEndpointConnectionsGetSample.js | 2 +- ...wayPrivateEndpointConnectionsListSample.js | 2 +- ...yPrivateEndpointConnectionsUpdateSample.js | 2 +- ...onGatewayPrivateLinkResourcesListSample.js | 2 +- ...ewayWafDynamicManifestsDefaultGetSample.js | 2 +- ...tionGatewayWafDynamicManifestsGetSample.js | 2 +- ...tionGatewaysBackendHealthOnDemandSample.js | 2 +- .../applicationGatewaysBackendHealthSample.js | 2 +- ...applicationGatewaysCreateOrUpdateSample.js | 2 +- .../applicationGatewaysDeleteSample.js | 2 +- .../applicationGatewaysGetSample.js | 2 +- ...ionGatewaysGetSslPredefinedPolicySample.js | 2 +- .../applicationGatewaysListAllSample.js | 2 +- ...tewaysListAvailableRequestHeadersSample.js | 2 +- ...ewaysListAvailableResponseHeadersSample.js | 2 +- ...ewaysListAvailableServerVariablesSample.js | 2 +- ...onGatewaysListAvailableSslOptionsSample.js | 2 +- ...istAvailableSslPredefinedPoliciesSample.js | 2 +- ...nGatewaysListAvailableWafRuleSetsSample.js | 2 +- .../applicationGatewaysListSample.js | 2 +- .../applicationGatewaysStartSample.js | 2 +- .../applicationGatewaysStopSample.js | 2 +- .../applicationGatewaysUpdateTagsSample.js | 2 +- ...ationSecurityGroupsCreateOrUpdateSample.js | 2 +- .../applicationSecurityGroupsDeleteSample.js | 2 +- .../applicationSecurityGroupsGetSample.js | 2 +- .../applicationSecurityGroupsListAllSample.js | 2 +- .../applicationSecurityGroupsListSample.js | 2 +- ...plicationSecurityGroupsUpdateTagsSample.js | 2 +- .../availableDelegationsListSample.js | 2 +- .../availableEndpointServicesListSample.js | 2 +- ...eEndpointTypesListByResourceGroupSample.js | 2 +- ...availablePrivateEndpointTypesListSample.js | 2 +- ...lableResourceGroupDelegationsListSample.js | 2 +- ...ServiceAliasesListByResourceGroupSample.js | 2 +- .../availableServiceAliasesListSample.js | 2 +- .../azureFirewallFqdnTagsListAllSample.js | 2 +- .../azureFirewallsCreateOrUpdateSample.js | 12 +- .../javascript/azureFirewallsDeleteSample.js | 2 +- .../v33/javascript/azureFirewallsGetSample.js | 10 +- .../javascript/azureFirewallsListAllSample.js | 2 +- ...azureFirewallsListLearnedPrefixesSample.js | 2 +- .../javascript/azureFirewallsListSample.js | 2 +- .../azureFirewallsPacketCaptureSample.js | 2 +- .../azureFirewallsUpdateTagsSample.js | 2 +- .../bastionHostsCreateOrUpdateSample.js | 38 +- .../javascript/bastionHostsDeleteSample.js | 4 +- .../v33/javascript/bastionHostsGetSample.js | 25 +- .../bastionHostsListByResourceGroupSample.js | 2 +- .../v33/javascript/bastionHostsListSample.js | 2 +- .../bastionHostsUpdateTagsSample.js | 2 +- .../bgpServiceCommunitiesListSample.js | 2 +- .../checkDnsNameAvailabilitySample.js | 2 +- ...urationPolicyGroupsCreateOrUpdateSample.js | 2 +- .../configurationPolicyGroupsDeleteSample.js | 2 +- .../configurationPolicyGroupsGetSample.js | 2 +- ...roupsListByVpnServerConfigurationSample.js | 2 +- .../connectionMonitorsCreateOrUpdateSample.js | 6 +- .../connectionMonitorsDeleteSample.js | 2 +- .../javascript/connectionMonitorsGetSample.js | 2 +- .../connectionMonitorsListSample.js | 2 +- .../connectionMonitorsQuerySample.js | 2 +- .../connectionMonitorsStartSample.js | 2 +- .../connectionMonitorsStopSample.js | 2 +- .../connectionMonitorsUpdateTagsSample.js | 2 +- ...ivityConfigurationsCreateOrUpdateSample.js | 2 +- .../connectivityConfigurationsDeleteSample.js | 2 +- .../connectivityConfigurationsGetSample.js | 2 +- .../connectivityConfigurationsListSample.js | 2 +- .../customIPPrefixesCreateOrUpdateSample.js | 2 +- .../customIPPrefixesDeleteSample.js | 2 +- .../javascript/customIPPrefixesGetSample.js | 2 +- .../customIPPrefixesListAllSample.js | 2 +- .../javascript/customIPPrefixesListSample.js | 2 +- .../customIPPrefixesUpdateTagsSample.js | 2 +- .../ddosCustomPoliciesCreateOrUpdateSample.js | 2 +- .../ddosCustomPoliciesDeleteSample.js | 2 +- .../javascript/ddosCustomPoliciesGetSample.js | 2 +- .../ddosCustomPoliciesUpdateTagsSample.js | 2 +- ...ddosProtectionPlansCreateOrUpdateSample.js | 2 +- .../ddosProtectionPlansDeleteSample.js | 2 +- .../ddosProtectionPlansGetSample.js | 2 +- ...rotectionPlansListByResourceGroupSample.js | 2 +- .../ddosProtectionPlansListSample.js | 2 +- .../ddosProtectionPlansUpdateTagsSample.js | 2 +- .../defaultSecurityRulesGetSample.js | 2 +- .../defaultSecurityRulesListSample.js | 2 +- ...deleteBastionShareableLinkByTokenSample.js | 2 +- .../deleteBastionShareableLinkSample.js | 2 +- .../disconnectActiveSessionsSample.js | 2 +- .../dscpConfigurationCreateOrUpdateSample.js | 2 +- .../dscpConfigurationDeleteSample.js | 2 +- .../javascript/dscpConfigurationGetSample.js | 2 +- .../dscpConfigurationListAllSample.js | 2 +- .../javascript/dscpConfigurationListSample.js | 2 +- ...rcuitAuthorizationsCreateOrUpdateSample.js | 2 +- ...sRouteCircuitAuthorizationsDeleteSample.js | 2 +- ...ressRouteCircuitAuthorizationsGetSample.js | 2 +- ...essRouteCircuitAuthorizationsListSample.js | 2 +- ...eCircuitConnectionsCreateOrUpdateSample.js | 2 +- ...ressRouteCircuitConnectionsDeleteSample.js | 2 +- ...expressRouteCircuitConnectionsGetSample.js | 2 +- ...xpressRouteCircuitConnectionsListSample.js | 2 +- ...outeCircuitPeeringsCreateOrUpdateSample.js | 2 +- ...expressRouteCircuitPeeringsDeleteSample.js | 2 +- .../expressRouteCircuitPeeringsGetSample.js | 2 +- .../expressRouteCircuitPeeringsListSample.js | 2 +- ...xpressRouteCircuitsCreateOrUpdateSample.js | 4 +- .../expressRouteCircuitsDeleteSample.js | 2 +- ...pressRouteCircuitsGetPeeringStatsSample.js | 2 +- .../expressRouteCircuitsGetSample.js | 2 +- .../expressRouteCircuitsGetStatsSample.js | 2 +- .../expressRouteCircuitsListAllSample.js | 2 +- .../expressRouteCircuitsListArpTableSample.js | 2 +- ...pressRouteCircuitsListRoutesTableSample.js | 2 +- ...uteCircuitsListRoutesTableSummarySample.js | 2 +- .../expressRouteCircuitsListSample.js | 2 +- .../expressRouteCircuitsUpdateTagsSample.js | 2 +- ...essRouteConnectionsCreateOrUpdateSample.js | 2 +- .../expressRouteConnectionsDeleteSample.js | 2 +- .../expressRouteConnectionsGetSample.js | 2 +- .../expressRouteConnectionsListSample.js | 2 +- ...sConnectionPeeringsCreateOrUpdateSample.js | 2 +- ...outeCrossConnectionPeeringsDeleteSample.js | 2 +- ...ssRouteCrossConnectionPeeringsGetSample.js | 2 +- ...sRouteCrossConnectionPeeringsListSample.js | 2 +- ...uteCrossConnectionsCreateOrUpdateSample.js | 2 +- .../expressRouteCrossConnectionsGetSample.js | 2 +- ...RouteCrossConnectionsListArpTableSample.js | 2 +- ...ossConnectionsListByResourceGroupSample.js | 2 +- ...teCrossConnectionsListRoutesTableSample.js | 2 +- ...ConnectionsListRoutesTableSummarySample.js | 2 +- .../expressRouteCrossConnectionsListSample.js | 2 +- ...ssRouteCrossConnectionsUpdateTagsSample.js | 2 +- ...xpressRouteGatewaysCreateOrUpdateSample.js | 2 +- .../expressRouteGatewaysDeleteSample.js | 2 +- .../expressRouteGatewaysGetSample.js | 2 +- ...sRouteGatewaysListByResourceGroupSample.js | 2 +- ...ssRouteGatewaysListBySubscriptionSample.js | 2 +- .../expressRouteGatewaysUpdateTagsSample.js | 2 +- .../javascript/expressRouteLinksGetSample.js | 2 +- .../javascript/expressRouteLinksListSample.js | 2 +- ...ePortAuthorizationsCreateOrUpdateSample.js | 2 +- ...ressRoutePortAuthorizationsDeleteSample.js | 2 +- ...expressRoutePortAuthorizationsGetSample.js | 2 +- ...xpressRoutePortAuthorizationsListSample.js | 2 +- .../expressRoutePortsCreateOrUpdateSample.js | 4 +- .../expressRoutePortsDeleteSample.js | 2 +- .../expressRoutePortsGenerateLoaSample.js | 2 +- .../javascript/expressRoutePortsGetSample.js | 2 +- ...ressRoutePortsListByResourceGroupSample.js | 2 +- .../javascript/expressRoutePortsListSample.js | 2 +- .../expressRoutePortsLocationsGetSample.js | 2 +- .../expressRoutePortsLocationsListSample.js | 2 +- .../expressRoutePortsUpdateTagsSample.js | 2 +- .../expressRouteProviderPortSample.js | 2 +- ...essRouteProviderPortsLocationListSample.js | 2 +- .../expressRouteServiceProvidersListSample.js | 2 +- .../firewallPoliciesCreateOrUpdateSample.js | 2 +- .../firewallPoliciesDeleteSample.js | 2 +- .../javascript/firewallPoliciesGetSample.js | 2 +- .../firewallPoliciesListAllSample.js | 2 +- .../javascript/firewallPoliciesListSample.js | 2 +- .../firewallPoliciesUpdateTagsSample.js | 2 +- .../firewallPolicyDeploymentsDeploySample.js | 2 +- ...irewallPolicyDraftsCreateOrUpdateSample.js | 2 +- .../firewallPolicyDraftsDeleteSample.js | 2 +- .../firewallPolicyDraftsGetSample.js | 2 +- ...icyIdpsSignaturesFilterValuesListSample.js | 2 +- .../firewallPolicyIdpsSignaturesListSample.js | 2 +- ...lPolicyIdpsSignaturesOverridesGetSample.js | 2 +- ...PolicyIdpsSignaturesOverridesListSample.js | 2 +- ...olicyIdpsSignaturesOverridesPatchSample.js | 2 +- ...lPolicyIdpsSignaturesOverridesPutSample.js | 2 +- ...llectionGroupDraftsCreateOrUpdateSample.js | 2 +- ...cyRuleCollectionGroupDraftsDeleteSample.js | 2 +- ...olicyRuleCollectionGroupDraftsGetSample.js | 2 +- ...uleCollectionGroupsCreateOrUpdateSample.js | 10 +- ...lPolicyRuleCollectionGroupsDeleteSample.js | 2 +- ...wallPolicyRuleCollectionGroupsGetSample.js | 8 +- ...allPolicyRuleCollectionGroupsListSample.js | 6 +- .../flowLogsCreateOrUpdateSample.js | 2 +- .../v33/javascript/flowLogsDeleteSample.js | 2 +- .../v33/javascript/flowLogsGetSample.js | 2 +- .../v33/javascript/flowLogsListSample.js | 2 +- .../javascript/flowLogsUpdateTagsSample.js | 2 +- ...nvpnserverconfigurationvpnprofileSample.js | 2 +- .../v33/javascript/getActiveSessionsSample.js | 2 +- .../getBastionShareableLinkSample.js | 2 +- .../hubRouteTablesCreateOrUpdateSample.js | 2 +- .../javascript/hubRouteTablesDeleteSample.js | 2 +- .../v33/javascript/hubRouteTablesGetSample.js | 2 +- .../javascript/hubRouteTablesListSample.js | 2 +- ...lNetworkConnectionsCreateOrUpdateSample.js | 2 +- ...ubVirtualNetworkConnectionsDeleteSample.js | 2 +- .../hubVirtualNetworkConnectionsGetSample.js | 2 +- .../hubVirtualNetworkConnectionsListSample.js | 2 +- .../inboundNatRulesCreateOrUpdateSample.js | 2 +- .../javascript/inboundNatRulesDeleteSample.js | 2 +- .../javascript/inboundNatRulesGetSample.js | 2 +- .../javascript/inboundNatRulesListSample.js | 2 +- ...inboundSecurityRuleCreateOrUpdateSample.js | 2 +- .../inboundSecurityRuleGetSample.js | 2 +- .../ipAllocationsCreateOrUpdateSample.js | 2 +- .../javascript/ipAllocationsDeleteSample.js | 2 +- .../v33/javascript/ipAllocationsGetSample.js | 2 +- .../ipAllocationsListByResourceGroupSample.js | 2 +- .../v33/javascript/ipAllocationsListSample.js | 2 +- .../ipAllocationsUpdateTagsSample.js | 2 +- .../ipGroupsCreateOrUpdateSample.js | 2 +- .../v33/javascript/ipGroupsDeleteSample.js | 2 +- .../v33/javascript/ipGroupsGetSample.js | 2 +- .../ipGroupsListByResourceGroupSample.js | 2 +- .../v33/javascript/ipGroupsListSample.js | 2 +- .../javascript/ipGroupsUpdateGroupsSample.js | 2 +- .../v33/javascript/ipamPoolsCreateSample.js | 50 + .../v33/javascript/ipamPoolsDeleteSample.js | 41 + .../javascript/ipamPoolsGetPoolUsageSample.js | 41 + .../v33/javascript/ipamPoolsGetSample.js | 37 + .../ipamPoolsListAssociatedResourcesSample.js | 44 + .../v33/javascript/ipamPoolsListSample.js | 39 + .../v33/javascript/ipamPoolsUpdateSample.js | 37 + ...tActiveConnectivityConfigurationsSample.js | 2 +- .../listActiveSecurityAdminRulesSample.js | 2 +- ...fectiveConnectivityConfigurationsSample.js | 2 +- ...anagerEffectiveSecurityAdminRulesSample.js | 2 +- ...BackendAddressPoolsCreateOrUpdateSample.js | 2 +- ...BalancerBackendAddressPoolsDeleteSample.js | 2 +- ...oadBalancerBackendAddressPoolsGetSample.js | 4 +- ...adBalancerBackendAddressPoolsListSample.js | 4 +- ...lancerFrontendIPConfigurationsGetSample.js | 2 +- ...ancerFrontendIPConfigurationsListSample.js | 2 +- ...loadBalancerLoadBalancingRulesGetSample.js | 2 +- ...dBalancerLoadBalancingRulesHealthSample.js | 40 + ...oadBalancerLoadBalancingRulesListSample.js | 2 +- ...loadBalancerNetworkInterfacesListSample.js | 4 +- .../loadBalancerOutboundRulesGetSample.js | 2 +- .../loadBalancerOutboundRulesListSample.js | 2 +- .../javascript/loadBalancerProbesGetSample.js | 2 +- .../loadBalancerProbesListSample.js | 2 +- .../loadBalancersCreateOrUpdateSample.js | 20 +- .../javascript/loadBalancersDeleteSample.js | 2 +- .../v33/javascript/loadBalancersGetSample.js | 4 +- .../javascript/loadBalancersListAllSample.js | 2 +- ...ersListInboundNatRulePortMappingsSample.js | 2 +- .../v33/javascript/loadBalancersListSample.js | 2 +- .../loadBalancersMigrateToIPBasedSample.js | 2 +- ...oadBalancersSwapPublicIPAddressesSample.js | 2 +- .../loadBalancersUpdateTagsSample.js | 2 +- ...ocalNetworkGatewaysCreateOrUpdateSample.js | 2 +- .../localNetworkGatewaysDeleteSample.js | 2 +- .../localNetworkGatewaysGetSample.js | 2 +- .../localNetworkGatewaysListSample.js | 2 +- .../localNetworkGatewaysUpdateTagsSample.js | 2 +- ...kManagerConnectionsCreateOrUpdateSample.js | 2 +- ...upNetworkManagerConnectionsDeleteSample.js | 2 +- ...GroupNetworkManagerConnectionsGetSample.js | 2 +- ...roupNetworkManagerConnectionsListSample.js | 2 +- .../natGatewaysCreateOrUpdateSample.js | 2 +- .../v33/javascript/natGatewaysDeleteSample.js | 2 +- .../v33/javascript/natGatewaysGetSample.js | 2 +- .../javascript/natGatewaysListAllSample.js | 2 +- .../v33/javascript/natGatewaysListSample.js | 2 +- .../javascript/natGatewaysUpdateTagsSample.js | 2 +- .../natRulesCreateOrUpdateSample.js | 2 +- .../v33/javascript/natRulesDeleteSample.js | 2 +- .../v33/javascript/natRulesGetSample.js | 2 +- .../natRulesListByVpnGatewaySample.js | 2 +- .../networkGroupsCreateOrUpdateSample.js | 2 +- .../javascript/networkGroupsDeleteSample.js | 2 +- .../v33/javascript/networkGroupsGetSample.js | 2 +- .../v33/javascript/networkGroupsListSample.js | 2 +- ...tworkInterfaceIPConfigurationsGetSample.js | 2 +- ...workInterfaceIPConfigurationsListSample.js | 2 +- ...networkInterfaceLoadBalancersListSample.js | 2 +- ...ceTapConfigurationsCreateOrUpdateSample.js | 2 +- ...kInterfaceTapConfigurationsDeleteSample.js | 2 +- ...workInterfaceTapConfigurationsGetSample.js | 2 +- ...orkInterfaceTapConfigurationsListSample.js | 2 +- .../networkInterfacesCreateOrUpdateSample.js | 4 +- .../networkInterfacesDeleteSample.js | 2 +- ...esGetCloudServiceNetworkInterfaceSample.js | 2 +- ...kInterfacesGetEffectiveRouteTableSample.js | 2 +- .../javascript/networkInterfacesGetSample.js | 2 +- ...ualMachineScaleSetIPConfigurationSample.js | 2 +- ...alMachineScaleSetNetworkInterfaceSample.js | 2 +- .../networkInterfacesListAllSample.js | 2 +- ...ListCloudServiceNetworkInterfacesSample.js | 2 +- ...viceRoleInstanceNetworkInterfacesSample.js | 2 +- ...istEffectiveNetworkSecurityGroupsSample.js | 2 +- .../javascript/networkInterfacesListSample.js | 2 +- ...alMachineScaleSetIPConfigurationsSample.js | 2 +- ...lMachineScaleSetNetworkInterfacesSample.js | 2 +- ...achineScaleSetVMNetworkInterfacesSample.js | 2 +- .../networkInterfacesUpdateTagsSample.js | 2 +- .../networkManagerCommitsPostSample.js | 2 +- ...etworkManagerDeploymentStatusListSample.js | 2 +- ...utingConfigurationsCreateOrUpdateSample.js | 2 +- ...anagerRoutingConfigurationsDeleteSample.js | 2 +- ...rkManagerRoutingConfigurationsGetSample.js | 2 +- ...kManagerRoutingConfigurationsListSample.js | 2 +- .../networkManagersCreateOrUpdateSample.js | 2 +- .../javascript/networkManagersDeleteSample.js | 2 +- .../javascript/networkManagersGetSample.js | 2 +- ...networkManagersListBySubscriptionSample.js | 2 +- .../javascript/networkManagersListSample.js | 2 +- .../javascript/networkManagersPatchSample.js | 2 +- .../networkProfilesCreateOrUpdateSample.js | 2 +- .../javascript/networkProfilesDeleteSample.js | 2 +- .../javascript/networkProfilesGetSample.js | 4 +- .../networkProfilesListAllSample.js | 2 +- .../javascript/networkProfilesListSample.js | 2 +- .../networkProfilesUpdateTagsSample.js | 2 +- ...tworkSecurityGroupsCreateOrUpdateSample.js | 4 +- .../networkSecurityGroupsDeleteSample.js | 2 +- .../networkSecurityGroupsGetSample.js | 2 +- .../networkSecurityGroupsListAllSample.js | 2 +- .../networkSecurityGroupsListSample.js | 2 +- .../networkSecurityGroupsUpdateTagsSample.js | 2 +- ...pplianceConnectionsCreateOrUpdateSample.js | 2 +- ...VirtualApplianceConnectionsDeleteSample.js | 2 +- ...orkVirtualApplianceConnectionsGetSample.js | 2 +- ...rkVirtualApplianceConnectionsListSample.js | 2 +- ...rkVirtualAppliancesCreateOrUpdateSample.js | 4 +- .../networkVirtualAppliancesDeleteSample.js | 2 +- .../networkVirtualAppliancesGetSample.js | 2 +- ...tualAppliancesListByResourceGroupSample.js | 2 +- .../networkVirtualAppliancesListSample.js | 2 +- .../networkVirtualAppliancesRestartSample.js | 4 +- ...etworkVirtualAppliancesUpdateTagsSample.js | 2 +- .../networkWatchersCheckConnectivitySample.js | 2 +- .../networkWatchersCreateOrUpdateSample.js | 2 +- .../javascript/networkWatchersDeleteSample.js | 2 +- ...atchersGetAzureReachabilityReportSample.js | 2 +- .../networkWatchersGetFlowLogStatusSample.js | 2 +- ...GetNetworkConfigurationDiagnosticSample.js | 2 +- .../networkWatchersGetNextHopSample.js | 2 +- .../javascript/networkWatchersGetSample.js | 2 +- .../networkWatchersGetTopologySample.js | 2 +- ...kWatchersGetTroubleshootingResultSample.js | 2 +- ...networkWatchersGetTroubleshootingSample.js | 2 +- ...networkWatchersGetVMSecurityRulesSample.js | 2 +- .../networkWatchersListAllSample.js | 2 +- ...orkWatchersListAvailableProvidersSample.js | 2 +- .../javascript/networkWatchersListSample.js | 2 +- ...rkWatchersSetFlowLogConfigurationSample.js | 2 +- .../networkWatchersUpdateTagsSample.js | 2 +- .../networkWatchersVerifyIPFlowSample.js | 2 +- .../v33/javascript/operationsListSample.js | 2 +- .../p2SVpnGatewaysCreateOrUpdateSample.js | 2 +- .../javascript/p2SVpnGatewaysDeleteSample.js | 2 +- ...tewaysDisconnectP2SvpnConnectionsSample.js | 2 +- .../p2SVpnGatewaysGenerateVpnProfileSample.js | 2 +- ...GetP2SvpnConnectionHealthDetailedSample.js | 2 +- ...GatewaysGetP2SvpnConnectionHealthSample.js | 2 +- .../v33/javascript/p2SVpnGatewaysGetSample.js | 2 +- ...p2SVpnGatewaysListByResourceGroupSample.js | 2 +- .../javascript/p2SVpnGatewaysListSample.js | 2 +- .../javascript/p2SVpnGatewaysResetSample.js | 2 +- .../p2SVpnGatewaysUpdateTagsSample.js | 2 +- .../javascript/packetCapturesCreateSample.js | 2 +- .../javascript/packetCapturesDeleteSample.js | 2 +- .../v33/javascript/packetCapturesGetSample.js | 2 +- .../packetCapturesGetStatusSample.js | 2 +- .../javascript/packetCapturesListSample.js | 2 +- .../javascript/packetCapturesStopSample.js | 2 +- ...ExpressRouteCircuitConnectionsGetSample.js | 2 +- ...xpressRouteCircuitConnectionsListSample.js | 2 +- ...rivateDnsZoneGroupsCreateOrUpdateSample.js | 2 +- .../privateDnsZoneGroupsDeleteSample.js | 2 +- .../privateDnsZoneGroupsGetSample.js | 2 +- .../privateDnsZoneGroupsListSample.js | 2 +- .../privateEndpointsCreateOrUpdateSample.js | 6 +- .../privateEndpointsDeleteSample.js | 2 +- .../javascript/privateEndpointsGetSample.js | 6 +- ...rivateEndpointsListBySubscriptionSample.js | 2 +- .../javascript/privateEndpointsListSample.js | 2 +- ...kServiceVisibilityByResourceGroupSample.js | 2 +- ...CheckPrivateLinkServiceVisibilitySample.js | 2 +- ...privateLinkServicesCreateOrUpdateSample.js | 2 +- ...esDeletePrivateEndpointConnectionSample.js | 2 +- .../privateLinkServicesDeleteSample.js | 2 +- ...vicesGetPrivateEndpointConnectionSample.js | 2 +- .../privateLinkServicesGetSample.js | 2 +- ...rivateLinkServicesByResourceGroupSample.js | 2 +- ...stAutoApprovedPrivateLinkServicesSample.js | 2 +- ...ateLinkServicesListBySubscriptionSample.js | 2 +- ...cesListPrivateEndpointConnectionsSample.js | 2 +- .../privateLinkServicesListSample.js | 2 +- ...esUpdatePrivateEndpointConnectionSample.js | 2 +- .../publicIPAddressesCreateOrUpdateSample.js | 8 +- ...icIPAddressesDdosProtectionStatusSample.js | 2 +- .../publicIPAddressesDeleteSample.js | 2 +- ...sesGetCloudServicePublicIpaddressSample.js | 2 +- .../javascript/publicIPAddressesGetSample.js | 2 +- ...ualMachineScaleSetPublicIpaddressSample.js | 2 +- .../publicIPAddressesListAllSample.js | 2 +- ...ListCloudServicePublicIpaddressesSample.js | 2 +- ...viceRoleInstancePublicIpaddressesSample.js | 2 +- .../javascript/publicIPAddressesListSample.js | 2 +- ...lMachineScaleSetPublicIpaddressesSample.js | 2 +- ...achineScaleSetVmpublicIpaddressesSample.js | 2 +- .../publicIPAddressesUpdateTagsSample.js | 2 +- .../publicIPPrefixesCreateOrUpdateSample.js | 4 +- .../publicIPPrefixesDeleteSample.js | 2 +- .../javascript/publicIPPrefixesGetSample.js | 2 +- .../publicIPPrefixesListAllSample.js | 2 +- .../javascript/publicIPPrefixesListSample.js | 2 +- .../publicIPPrefixesUpdateTagsSample.js | 2 +- .../putBastionShareableLinkSample.js | 2 +- ...reachabilityAnalysisIntentsCreateSample.js | 60 + ...reachabilityAnalysisIntentsDeleteSample.js | 43 + .../reachabilityAnalysisIntentsGetSample.js | 43 + .../reachabilityAnalysisIntentsListSample.js | 44 + .../reachabilityAnalysisRunsCreateSample.js | 51 + .../reachabilityAnalysisRunsDeleteSample.js | 43 + .../reachabilityAnalysisRunsGetSample.js | 43 + .../reachabilityAnalysisRunsListSample.js | 44 + .../resourceNavigationLinksListSample.js | 2 +- .../routeFilterRulesCreateOrUpdateSample.js | 2 +- .../routeFilterRulesDeleteSample.js | 2 +- .../javascript/routeFilterRulesGetSample.js | 2 +- ...routeFilterRulesListByRouteFilterSample.js | 2 +- .../routeFiltersCreateOrUpdateSample.js | 2 +- .../javascript/routeFiltersDeleteSample.js | 2 +- .../v33/javascript/routeFiltersGetSample.js | 2 +- .../routeFiltersListByResourceGroupSample.js | 2 +- .../v33/javascript/routeFiltersListSample.js | 2 +- .../routeFiltersUpdateTagsSample.js | 2 +- .../routeMapsCreateOrUpdateSample.js | 2 +- .../v33/javascript/routeMapsDeleteSample.js | 2 +- .../v33/javascript/routeMapsGetSample.js | 2 +- .../v33/javascript/routeMapsListSample.js | 2 +- .../routeTablesCreateOrUpdateSample.js | 4 +- .../v33/javascript/routeTablesDeleteSample.js | 2 +- .../v33/javascript/routeTablesGetSample.js | 2 +- .../javascript/routeTablesListAllSample.js | 2 +- .../v33/javascript/routeTablesListSample.js | 2 +- .../javascript/routeTablesUpdateTagsSample.js | 2 +- .../javascript/routesCreateOrUpdateSample.js | 2 +- .../v33/javascript/routesDeleteSample.js | 2 +- .../samples/v33/javascript/routesGetSample.js | 2 +- .../v33/javascript/routesListSample.js | 2 +- .../routingIntentCreateOrUpdateSample.js | 2 +- .../javascript/routingIntentDeleteSample.js | 2 +- .../v33/javascript/routingIntentGetSample.js | 2 +- .../v33/javascript/routingIntentListSample.js | 2 +- ...tingRuleCollectionsCreateOrUpdateSample.js | 2 +- .../routingRuleCollectionsDeleteSample.js | 2 +- .../routingRuleCollectionsGetSample.js | 2 +- .../routingRuleCollectionsListSample.js | 2 +- .../routingRulesCreateOrUpdateSample.js | 4 +- .../javascript/routingRulesDeleteSample.js | 2 +- .../v33/javascript/routingRulesGetSample.js | 2 +- .../v33/javascript/routingRulesListSample.js | 2 +- .../samples/v33/javascript/sample.env | 5 +- .../scopeConnectionsCreateOrUpdateSample.js | 2 +- .../scopeConnectionsDeleteSample.js | 2 +- .../javascript/scopeConnectionsGetSample.js | 2 +- .../javascript/scopeConnectionsListSample.js | 2 +- ...AdminConfigurationsCreateOrUpdateSample.js | 31 +- ...securityAdminConfigurationsDeleteSample.js | 2 +- .../securityAdminConfigurationsGetSample.js | 2 +- .../securityAdminConfigurationsListSample.js | 2 +- ...ityPartnerProvidersCreateOrUpdateSample.js | 2 +- .../securityPartnerProvidersDeleteSample.js | 2 +- .../securityPartnerProvidersGetSample.js | 2 +- ...rtnerProvidersListByResourceGroupSample.js | 2 +- .../securityPartnerProvidersListSample.js | 2 +- ...ecurityPartnerProvidersUpdateTagsSample.js | 2 +- .../securityRulesCreateOrUpdateSample.js | 2 +- .../javascript/securityRulesDeleteSample.js | 2 +- .../v33/javascript/securityRulesGetSample.js | 2 +- .../v33/javascript/securityRulesListSample.js | 2 +- ...yUserConfigurationsCreateOrUpdateSample.js | 2 +- .../securityUserConfigurationsDeleteSample.js | 2 +- .../securityUserConfigurationsGetSample.js | 2 +- .../securityUserConfigurationsListSample.js | 2 +- ...UserRuleCollectionsCreateOrUpdateSample.js | 2 +- ...securityUserRuleCollectionsDeleteSample.js | 2 +- .../securityUserRuleCollectionsGetSample.js | 2 +- .../securityUserRuleCollectionsListSample.js | 2 +- .../securityUserRulesCreateOrUpdateSample.js | 2 +- .../securityUserRulesDeleteSample.js | 2 +- .../javascript/securityUserRulesGetSample.js | 2 +- .../javascript/securityUserRulesListSample.js | 2 +- .../serviceAssociationLinksListSample.js | 2 +- ...iceEndpointPoliciesCreateOrUpdateSample.js | 4 +- .../serviceEndpointPoliciesDeleteSample.js | 2 +- .../serviceEndpointPoliciesGetSample.js | 2 +- ...dpointPoliciesListByResourceGroupSample.js | 2 +- .../serviceEndpointPoliciesListSample.js | 2 +- ...serviceEndpointPoliciesUpdateTagsSample.js | 2 +- ...ntPolicyDefinitionsCreateOrUpdateSample.js | 2 +- ...ceEndpointPolicyDefinitionsDeleteSample.js | 2 +- ...rviceEndpointPolicyDefinitionsGetSample.js | 2 +- ...icyDefinitionsListByResourceGroupSample.js | 2 +- .../serviceTagInformationListSample.js | 6 +- .../v33/javascript/serviceTagsListSample.js | 2 +- .../v33/javascript/staticCidrsCreateSample.js | 43 + .../v33/javascript/staticCidrsDeleteSample.js | 43 + .../v33/javascript/staticCidrsGetSample.js | 43 + .../v33/javascript/staticCidrsListSample.js | 40 + .../staticMembersCreateOrUpdateSample.js | 2 +- .../javascript/staticMembersDeleteSample.js | 2 +- .../v33/javascript/staticMembersGetSample.js | 2 +- .../v33/javascript/staticMembersListSample.js | 2 +- .../javascript/subnetsCreateOrUpdateSample.js | 10 +- .../v33/javascript/subnetsDeleteSample.js | 2 +- .../v33/javascript/subnetsGetSample.js | 6 +- .../v33/javascript/subnetsListSample.js | 2 +- .../subnetsPrepareNetworkPoliciesSample.js | 2 +- .../subnetsUnprepareNetworkPoliciesSample.js | 2 +- ...kManagerConnectionsCreateOrUpdateSample.js | 2 +- ...onNetworkManagerConnectionsDeleteSample.js | 2 +- ...ptionNetworkManagerConnectionsGetSample.js | 2 +- ...tionNetworkManagerConnectionsListSample.js | 2 +- .../supportedSecurityProvidersSample.js | 2 +- .../v33/javascript/usagesListSample.js | 4 +- .../verifierWorkspacesCreateSample.js | 46 + .../verifierWorkspacesDeleteSample.js | 41 + .../javascript/verifierWorkspacesGetSample.js | 41 + .../verifierWorkspacesListSample.js | 39 + .../verifierWorkspacesUpdateSample.js | 41 + .../v33/javascript/vipSwapCreateSample.js | 2 +- .../v33/javascript/vipSwapGetSample.js | 2 +- .../v33/javascript/vipSwapListSample.js | 2 +- ...rtualApplianceSitesCreateOrUpdateSample.js | 2 +- .../virtualApplianceSitesDeleteSample.js | 2 +- .../virtualApplianceSitesGetSample.js | 2 +- .../virtualApplianceSitesListSample.js | 2 +- .../virtualApplianceSkusGetSample.js | 2 +- .../virtualApplianceSkusListSample.js | 2 +- ...ualHubBgpConnectionCreateOrUpdateSample.js | 2 +- .../virtualHubBgpConnectionDeleteSample.js | 2 +- .../virtualHubBgpConnectionGetSample.js | 2 +- ...gpConnectionsListAdvertisedRoutesSample.js | 2 +- ...ubBgpConnectionsListLearnedRoutesSample.js | 2 +- .../virtualHubBgpConnectionsListSample.js | 2 +- ...lHubIPConfigurationCreateOrUpdateSample.js | 2 +- .../virtualHubIPConfigurationDeleteSample.js | 2 +- .../virtualHubIPConfigurationGetSample.js | 2 +- .../virtualHubIPConfigurationListSample.js | 2 +- ...ualHubRouteTableV2SCreateOrUpdateSample.js | 2 +- .../virtualHubRouteTableV2SDeleteSample.js | 2 +- .../virtualHubRouteTableV2SGetSample.js | 2 +- .../virtualHubRouteTableV2SListSample.js | 2 +- .../virtualHubsCreateOrUpdateSample.js | 2 +- .../v33/javascript/virtualHubsDeleteSample.js | 2 +- ...lHubsGetEffectiveVirtualHubRoutesSample.js | 6 +- .../virtualHubsGetInboundRoutesSample.js | 2 +- .../virtualHubsGetOutboundRoutesSample.js | 2 +- .../v33/javascript/virtualHubsGetSample.js | 2 +- .../virtualHubsListByResourceGroupSample.js | 2 +- .../v33/javascript/virtualHubsListSample.js | 2 +- .../javascript/virtualHubsUpdateTagsSample.js | 2 +- ...kGatewayConnectionsCreateOrUpdateSample.js | 2 +- ...alNetworkGatewayConnectionsDeleteSample.js | 2 +- ...etworkGatewayConnectionsGetIkeSasSample.js | 2 +- ...rtualNetworkGatewayConnectionsGetSample.js | 2 +- ...orkGatewayConnectionsGetSharedKeySample.js | 2 +- ...tualNetworkGatewayConnectionsListSample.js | 2 +- ...GatewayConnectionsResetConnectionSample.js | 2 +- ...kGatewayConnectionsResetSharedKeySample.js | 2 +- ...orkGatewayConnectionsSetSharedKeySample.js | 2 +- ...ewayConnectionsStartPacketCaptureSample.js | 4 +- ...tewayConnectionsStopPacketCaptureSample.js | 2 +- ...tworkGatewayConnectionsUpdateTagsSample.js | 2 +- ...workGatewayNatRulesCreateOrUpdateSample.js | 2 +- ...rtualNetworkGatewayNatRulesDeleteSample.js | 2 +- .../virtualNetworkGatewayNatRulesGetSample.js | 2 +- ...tRulesListByVirtualNetworkGatewaySample.js | 2 +- ...tualNetworkGatewaysCreateOrUpdateSample.js | 4 +- .../virtualNetworkGatewaysDeleteSample.js | 2 +- ...rtualNetworkGatewayVpnConnectionsSample.js | 2 +- ...NetworkGatewaysGenerateVpnProfileSample.js | 2 +- ...kGatewaysGeneratevpnclientpackageSample.js | 2 +- ...etworkGatewaysGetAdvertisedRoutesSample.js | 2 +- ...alNetworkGatewaysGetBgpPeerStatusSample.js | 2 +- ...GatewaysGetFailoverAllTestDetailsSample.js | 42 + ...ewaysGetFailoverSingleTestDetailsSample.js | 42 + ...alNetworkGatewaysGetLearnedRoutesSample.js | 2 +- .../virtualNetworkGatewaysGetSample.js | 4 +- ...rkGatewaysGetVpnProfilePackageUrlSample.js | 2 +- ...ewaysGetVpnclientConnectionHealthSample.js | 2 +- ...tewaysGetVpnclientIpsecParametersSample.js | 2 +- ...ualNetworkGatewaysListConnectionsSample.js | 2 +- .../virtualNetworkGatewaysListSample.js | 2 +- .../virtualNetworkGatewaysResetSample.js | 2 +- ...rkGatewaysResetVpnClientSharedKeySample.js | 2 +- ...tewaysSetVpnclientIpsecParametersSample.js | 2 +- ...xpressRouteSiteFailoverSimulationSample.js | 41 + ...NetworkGatewaysStartPacketCaptureSample.js | 4 +- ...xpressRouteSiteFailoverSimulationSample.js | 56 + ...lNetworkGatewaysStopPacketCaptureSample.js | 2 +- ...etworkGatewaysSupportedVpnDevicesSample.js | 2 +- .../virtualNetworkGatewaysUpdateTagsSample.js | 2 +- ...ewaysVpnDeviceConfigurationScriptSample.js | 2 +- ...tualNetworkPeeringsCreateOrUpdateSample.js | 14 +- .../virtualNetworkPeeringsDeleteSample.js | 2 +- .../virtualNetworkPeeringsGetSample.js | 8 +- .../virtualNetworkPeeringsListSample.js | 4 +- .../virtualNetworkTapsCreateOrUpdateSample.js | 2 +- .../virtualNetworkTapsDeleteSample.js | 2 +- .../javascript/virtualNetworkTapsGetSample.js | 2 +- .../virtualNetworkTapsListAllSample.js | 2 +- ...ualNetworkTapsListByResourceGroupSample.js | 2 +- .../virtualNetworkTapsUpdateTagsSample.js | 2 +- ...etworksCheckIPAddressAvailabilitySample.js | 2 +- .../virtualNetworksCreateOrUpdateSample.js | 59 +- .../javascript/virtualNetworksDeleteSample.js | 2 +- .../javascript/virtualNetworksGetSample.js | 6 +- .../virtualNetworksListAllSample.js | 2 +- ...lNetworksListDdosProtectionStatusSample.js | 2 +- .../javascript/virtualNetworksListSample.js | 2 +- .../virtualNetworksListUsageSample.js | 2 +- .../virtualNetworksUpdateTagsSample.js | 2 +- ...rtualRouterPeeringsCreateOrUpdateSample.js | 2 +- .../virtualRouterPeeringsDeleteSample.js | 2 +- .../virtualRouterPeeringsGetSample.js | 2 +- .../virtualRouterPeeringsListSample.js | 2 +- .../virtualRoutersCreateOrUpdateSample.js | 2 +- .../javascript/virtualRoutersDeleteSample.js | 2 +- .../v33/javascript/virtualRoutersGetSample.js | 2 +- ...virtualRoutersListByResourceGroupSample.js | 2 +- .../javascript/virtualRoutersListSample.js | 2 +- .../virtualWansCreateOrUpdateSample.js | 2 +- .../v33/javascript/virtualWansDeleteSample.js | 2 +- .../v33/javascript/virtualWansGetSample.js | 2 +- .../virtualWansListByResourceGroupSample.js | 2 +- .../v33/javascript/virtualWansListSample.js | 2 +- .../javascript/virtualWansUpdateTagsSample.js | 2 +- .../vpnConnectionsCreateOrUpdateSample.js | 2 +- .../javascript/vpnConnectionsDeleteSample.js | 2 +- .../v33/javascript/vpnConnectionsGetSample.js | 2 +- .../vpnConnectionsListByVpnGatewaySample.js | 2 +- .../vpnConnectionsStartPacketCaptureSample.js | 4 +- .../vpnConnectionsStopPacketCaptureSample.js | 2 +- .../vpnGatewaysCreateOrUpdateSample.js | 2 +- .../v33/javascript/vpnGatewaysDeleteSample.js | 2 +- .../v33/javascript/vpnGatewaysGetSample.js | 2 +- .../vpnGatewaysListByResourceGroupSample.js | 2 +- .../v33/javascript/vpnGatewaysListSample.js | 2 +- .../v33/javascript/vpnGatewaysResetSample.js | 2 +- .../vpnGatewaysStartPacketCaptureSample.js | 4 +- .../vpnGatewaysStopPacketCaptureSample.js | 2 +- .../javascript/vpnGatewaysUpdateTagsSample.js | 2 +- ...pnLinkConnectionsGetAllSharedKeysSample.js | 2 +- ...inkConnectionsGetDefaultSharedKeySample.js | 2 +- .../vpnLinkConnectionsGetIkeSasSample.js | 2 +- ...inkConnectionsListByVpnConnectionSample.js | 2 +- ...nkConnectionsListDefaultSharedKeySample.js | 2 +- ...vpnLinkConnectionsResetConnectionSample.js | 2 +- ...nectionsSetOrInitDefaultSharedKeySample.js | 2 +- ...tionsAssociatedWithVirtualWanListSample.js | 2 +- ...erverConfigurationsCreateOrUpdateSample.js | 2 +- .../vpnServerConfigurationsDeleteSample.js | 2 +- .../vpnServerConfigurationsGetSample.js | 2 +- ...ConfigurationsListByResourceGroupSample.js | 2 +- .../vpnServerConfigurationsListSample.js | 2 +- ...vpnServerConfigurationsUpdateTagsSample.js | 2 +- .../vpnSiteLinkConnectionsGetSample.js | 2 +- .../v33/javascript/vpnSiteLinksGetSample.js | 2 +- .../vpnSiteLinksListByVpnSiteSample.js | 2 +- .../vpnSitesConfigurationDownloadSample.js | 2 +- .../vpnSitesCreateOrUpdateSample.js | 2 +- .../v33/javascript/vpnSitesDeleteSample.js | 2 +- .../v33/javascript/vpnSitesGetSample.js | 2 +- .../vpnSitesListByResourceGroupSample.js | 2 +- .../v33/javascript/vpnSitesListSample.js | 2 +- .../javascript/vpnSitesUpdateTagsSample.js | 2 +- ...ionFirewallPoliciesCreateOrUpdateSample.js | 2 +- ...ApplicationFirewallPoliciesDeleteSample.js | 2 +- ...webApplicationFirewallPoliciesGetSample.js | 2 +- ...pplicationFirewallPoliciesListAllSample.js | 2 +- ...ebApplicationFirewallPoliciesListSample.js | 2 +- .../v33/javascript/webCategoriesGetSample.js | 2 +- .../webCategoriesListBySubscriptionSample.js | 2 +- .../samples/v33/typescript/README.md | 1372 ++++----- .../samples/v33/typescript/sample.env | 5 +- ...dminRuleCollectionsCreateOrUpdateSample.ts | 2 +- .../src/adminRuleCollectionsDeleteSample.ts | 2 +- .../src/adminRuleCollectionsGetSample.ts | 2 +- .../src/adminRuleCollectionsListSample.ts | 2 +- .../src/adminRulesCreateOrUpdateSample.ts | 36 +- .../typescript/src/adminRulesDeleteSample.ts | 2 +- .../v33/typescript/src/adminRulesGetSample.ts | 4 +- .../typescript/src/adminRulesListSample.ts | 2 +- ...yPrivateEndpointConnectionsDeleteSample.ts | 2 +- ...ewayPrivateEndpointConnectionsGetSample.ts | 2 +- ...wayPrivateEndpointConnectionsListSample.ts | 2 +- ...yPrivateEndpointConnectionsUpdateSample.ts | 2 +- ...onGatewayPrivateLinkResourcesListSample.ts | 2 +- ...ewayWafDynamicManifestsDefaultGetSample.ts | 2 +- ...tionGatewayWafDynamicManifestsGetSample.ts | 2 +- ...tionGatewaysBackendHealthOnDemandSample.ts | 2 +- .../applicationGatewaysBackendHealthSample.ts | 2 +- ...applicationGatewaysCreateOrUpdateSample.ts | 2 +- .../src/applicationGatewaysDeleteSample.ts | 2 +- .../src/applicationGatewaysGetSample.ts | 2 +- ...ionGatewaysGetSslPredefinedPolicySample.ts | 2 +- .../src/applicationGatewaysListAllSample.ts | 2 +- ...tewaysListAvailableRequestHeadersSample.ts | 2 +- ...ewaysListAvailableResponseHeadersSample.ts | 2 +- ...ewaysListAvailableServerVariablesSample.ts | 2 +- ...onGatewaysListAvailableSslOptionsSample.ts | 2 +- ...istAvailableSslPredefinedPoliciesSample.ts | 2 +- ...nGatewaysListAvailableWafRuleSetsSample.ts | 2 +- .../src/applicationGatewaysListSample.ts | 2 +- .../src/applicationGatewaysStartSample.ts | 2 +- .../src/applicationGatewaysStopSample.ts | 2 +- .../applicationGatewaysUpdateTagsSample.ts | 2 +- ...ationSecurityGroupsCreateOrUpdateSample.ts | 2 +- .../applicationSecurityGroupsDeleteSample.ts | 2 +- .../src/applicationSecurityGroupsGetSample.ts | 2 +- .../applicationSecurityGroupsListAllSample.ts | 2 +- .../applicationSecurityGroupsListSample.ts | 2 +- ...plicationSecurityGroupsUpdateTagsSample.ts | 2 +- .../src/availableDelegationsListSample.ts | 2 +- .../availableEndpointServicesListSample.ts | 2 +- ...eEndpointTypesListByResourceGroupSample.ts | 2 +- ...availablePrivateEndpointTypesListSample.ts | 2 +- ...lableResourceGroupDelegationsListSample.ts | 2 +- ...ServiceAliasesListByResourceGroupSample.ts | 2 +- .../src/availableServiceAliasesListSample.ts | 2 +- .../src/azureFirewallFqdnTagsListAllSample.ts | 2 +- .../src/azureFirewallsCreateOrUpdateSample.ts | 12 +- .../src/azureFirewallsDeleteSample.ts | 2 +- .../typescript/src/azureFirewallsGetSample.ts | 10 +- .../src/azureFirewallsListAllSample.ts | 2 +- ...azureFirewallsListLearnedPrefixesSample.ts | 2 +- .../src/azureFirewallsListSample.ts | 2 +- .../src/azureFirewallsPacketCaptureSample.ts | 2 +- .../src/azureFirewallsUpdateTagsSample.ts | 2 +- .../src/bastionHostsCreateOrUpdateSample.ts | 38 +- .../src/bastionHostsDeleteSample.ts | 4 +- .../typescript/src/bastionHostsGetSample.ts | 28 +- .../bastionHostsListByResourceGroupSample.ts | 2 +- .../typescript/src/bastionHostsListSample.ts | 2 +- .../src/bastionHostsUpdateTagsSample.ts | 2 +- .../src/bgpServiceCommunitiesListSample.ts | 2 +- .../src/checkDnsNameAvailabilitySample.ts | 2 +- ...urationPolicyGroupsCreateOrUpdateSample.ts | 2 +- .../configurationPolicyGroupsDeleteSample.ts | 2 +- .../src/configurationPolicyGroupsGetSample.ts | 2 +- ...roupsListByVpnServerConfigurationSample.ts | 2 +- .../connectionMonitorsCreateOrUpdateSample.ts | 6 +- .../src/connectionMonitorsDeleteSample.ts | 2 +- .../src/connectionMonitorsGetSample.ts | 2 +- .../src/connectionMonitorsListSample.ts | 2 +- .../src/connectionMonitorsQuerySample.ts | 2 +- .../src/connectionMonitorsStartSample.ts | 2 +- .../src/connectionMonitorsStopSample.ts | 2 +- .../src/connectionMonitorsUpdateTagsSample.ts | 2 +- ...ivityConfigurationsCreateOrUpdateSample.ts | 2 +- .../connectivityConfigurationsDeleteSample.ts | 2 +- .../connectivityConfigurationsGetSample.ts | 2 +- .../connectivityConfigurationsListSample.ts | 2 +- .../customIPPrefixesCreateOrUpdateSample.ts | 2 +- .../src/customIPPrefixesDeleteSample.ts | 2 +- .../src/customIPPrefixesGetSample.ts | 2 +- .../src/customIPPrefixesListAllSample.ts | 2 +- .../src/customIPPrefixesListSample.ts | 2 +- .../src/customIPPrefixesUpdateTagsSample.ts | 2 +- .../ddosCustomPoliciesCreateOrUpdateSample.ts | 2 +- .../src/ddosCustomPoliciesDeleteSample.ts | 2 +- .../src/ddosCustomPoliciesGetSample.ts | 2 +- .../src/ddosCustomPoliciesUpdateTagsSample.ts | 2 +- ...ddosProtectionPlansCreateOrUpdateSample.ts | 2 +- .../src/ddosProtectionPlansDeleteSample.ts | 2 +- .../src/ddosProtectionPlansGetSample.ts | 2 +- ...rotectionPlansListByResourceGroupSample.ts | 2 +- .../src/ddosProtectionPlansListSample.ts | 2 +- .../ddosProtectionPlansUpdateTagsSample.ts | 2 +- .../src/defaultSecurityRulesGetSample.ts | 2 +- .../src/defaultSecurityRulesListSample.ts | 2 +- ...deleteBastionShareableLinkByTokenSample.ts | 2 +- .../src/deleteBastionShareableLinkSample.ts | 2 +- .../src/disconnectActiveSessionsSample.ts | 2 +- .../dscpConfigurationCreateOrUpdateSample.ts | 2 +- .../src/dscpConfigurationDeleteSample.ts | 2 +- .../src/dscpConfigurationGetSample.ts | 2 +- .../src/dscpConfigurationListAllSample.ts | 2 +- .../src/dscpConfigurationListSample.ts | 2 +- ...rcuitAuthorizationsCreateOrUpdateSample.ts | 2 +- ...sRouteCircuitAuthorizationsDeleteSample.ts | 2 +- ...ressRouteCircuitAuthorizationsGetSample.ts | 2 +- ...essRouteCircuitAuthorizationsListSample.ts | 2 +- ...eCircuitConnectionsCreateOrUpdateSample.ts | 2 +- ...ressRouteCircuitConnectionsDeleteSample.ts | 2 +- ...expressRouteCircuitConnectionsGetSample.ts | 2 +- ...xpressRouteCircuitConnectionsListSample.ts | 2 +- ...outeCircuitPeeringsCreateOrUpdateSample.ts | 2 +- ...expressRouteCircuitPeeringsDeleteSample.ts | 2 +- .../expressRouteCircuitPeeringsGetSample.ts | 2 +- .../expressRouteCircuitPeeringsListSample.ts | 2 +- ...xpressRouteCircuitsCreateOrUpdateSample.ts | 4 +- .../src/expressRouteCircuitsDeleteSample.ts | 2 +- ...pressRouteCircuitsGetPeeringStatsSample.ts | 2 +- .../src/expressRouteCircuitsGetSample.ts | 2 +- .../src/expressRouteCircuitsGetStatsSample.ts | 2 +- .../src/expressRouteCircuitsListAllSample.ts | 2 +- .../expressRouteCircuitsListArpTableSample.ts | 2 +- ...pressRouteCircuitsListRoutesTableSample.ts | 2 +- ...uteCircuitsListRoutesTableSummarySample.ts | 2 +- .../src/expressRouteCircuitsListSample.ts | 2 +- .../expressRouteCircuitsUpdateTagsSample.ts | 2 +- ...essRouteConnectionsCreateOrUpdateSample.ts | 2 +- .../expressRouteConnectionsDeleteSample.ts | 2 +- .../src/expressRouteConnectionsGetSample.ts | 2 +- .../src/expressRouteConnectionsListSample.ts | 2 +- ...sConnectionPeeringsCreateOrUpdateSample.ts | 2 +- ...outeCrossConnectionPeeringsDeleteSample.ts | 2 +- ...ssRouteCrossConnectionPeeringsGetSample.ts | 2 +- ...sRouteCrossConnectionPeeringsListSample.ts | 2 +- ...uteCrossConnectionsCreateOrUpdateSample.ts | 2 +- .../expressRouteCrossConnectionsGetSample.ts | 2 +- ...RouteCrossConnectionsListArpTableSample.ts | 2 +- ...ossConnectionsListByResourceGroupSample.ts | 2 +- ...teCrossConnectionsListRoutesTableSample.ts | 2 +- ...ConnectionsListRoutesTableSummarySample.ts | 2 +- .../expressRouteCrossConnectionsListSample.ts | 2 +- ...ssRouteCrossConnectionsUpdateTagsSample.ts | 2 +- ...xpressRouteGatewaysCreateOrUpdateSample.ts | 2 +- .../src/expressRouteGatewaysDeleteSample.ts | 2 +- .../src/expressRouteGatewaysGetSample.ts | 2 +- ...sRouteGatewaysListByResourceGroupSample.ts | 2 +- ...ssRouteGatewaysListBySubscriptionSample.ts | 2 +- .../expressRouteGatewaysUpdateTagsSample.ts | 2 +- .../src/expressRouteLinksGetSample.ts | 2 +- .../src/expressRouteLinksListSample.ts | 2 +- ...ePortAuthorizationsCreateOrUpdateSample.ts | 2 +- ...ressRoutePortAuthorizationsDeleteSample.ts | 2 +- ...expressRoutePortAuthorizationsGetSample.ts | 2 +- ...xpressRoutePortAuthorizationsListSample.ts | 2 +- .../expressRoutePortsCreateOrUpdateSample.ts | 4 +- .../src/expressRoutePortsDeleteSample.ts | 2 +- .../src/expressRoutePortsGenerateLoaSample.ts | 2 +- .../src/expressRoutePortsGetSample.ts | 2 +- ...ressRoutePortsListByResourceGroupSample.ts | 2 +- .../src/expressRoutePortsListSample.ts | 2 +- .../expressRoutePortsLocationsGetSample.ts | 2 +- .../expressRoutePortsLocationsListSample.ts | 2 +- .../src/expressRoutePortsUpdateTagsSample.ts | 2 +- .../src/expressRouteProviderPortSample.ts | 2 +- ...essRouteProviderPortsLocationListSample.ts | 2 +- .../expressRouteServiceProvidersListSample.ts | 2 +- .../firewallPoliciesCreateOrUpdateSample.ts | 2 +- .../src/firewallPoliciesDeleteSample.ts | 2 +- .../src/firewallPoliciesGetSample.ts | 2 +- .../src/firewallPoliciesListAllSample.ts | 2 +- .../src/firewallPoliciesListSample.ts | 2 +- .../src/firewallPoliciesUpdateTagsSample.ts | 2 +- .../firewallPolicyDeploymentsDeploySample.ts | 2 +- ...irewallPolicyDraftsCreateOrUpdateSample.ts | 2 +- .../src/firewallPolicyDraftsDeleteSample.ts | 2 +- .../src/firewallPolicyDraftsGetSample.ts | 2 +- ...icyIdpsSignaturesFilterValuesListSample.ts | 2 +- .../firewallPolicyIdpsSignaturesListSample.ts | 2 +- ...lPolicyIdpsSignaturesOverridesGetSample.ts | 2 +- ...PolicyIdpsSignaturesOverridesListSample.ts | 2 +- ...olicyIdpsSignaturesOverridesPatchSample.ts | 2 +- ...lPolicyIdpsSignaturesOverridesPutSample.ts | 2 +- ...llectionGroupDraftsCreateOrUpdateSample.ts | 2 +- ...cyRuleCollectionGroupDraftsDeleteSample.ts | 2 +- ...olicyRuleCollectionGroupDraftsGetSample.ts | 2 +- ...uleCollectionGroupsCreateOrUpdateSample.ts | 10 +- ...lPolicyRuleCollectionGroupsDeleteSample.ts | 2 +- ...wallPolicyRuleCollectionGroupsGetSample.ts | 8 +- ...allPolicyRuleCollectionGroupsListSample.ts | 6 +- .../src/flowLogsCreateOrUpdateSample.ts | 2 +- .../typescript/src/flowLogsDeleteSample.ts | 2 +- .../v33/typescript/src/flowLogsGetSample.ts | 2 +- .../v33/typescript/src/flowLogsListSample.ts | 2 +- .../src/flowLogsUpdateTagsSample.ts | 2 +- ...nvpnserverconfigurationvpnprofileSample.ts | 2 +- .../typescript/src/getActiveSessionsSample.ts | 2 +- .../src/getBastionShareableLinkSample.ts | 2 +- .../src/hubRouteTablesCreateOrUpdateSample.ts | 2 +- .../src/hubRouteTablesDeleteSample.ts | 2 +- .../typescript/src/hubRouteTablesGetSample.ts | 2 +- .../src/hubRouteTablesListSample.ts | 2 +- ...lNetworkConnectionsCreateOrUpdateSample.ts | 2 +- ...ubVirtualNetworkConnectionsDeleteSample.ts | 2 +- .../hubVirtualNetworkConnectionsGetSample.ts | 2 +- .../hubVirtualNetworkConnectionsListSample.ts | 2 +- .../inboundNatRulesCreateOrUpdateSample.ts | 2 +- .../src/inboundNatRulesDeleteSample.ts | 2 +- .../src/inboundNatRulesGetSample.ts | 2 +- .../src/inboundNatRulesListSample.ts | 2 +- ...inboundSecurityRuleCreateOrUpdateSample.ts | 2 +- .../src/inboundSecurityRuleGetSample.ts | 2 +- .../src/ipAllocationsCreateOrUpdateSample.ts | 2 +- .../src/ipAllocationsDeleteSample.ts | 2 +- .../typescript/src/ipAllocationsGetSample.ts | 2 +- .../ipAllocationsListByResourceGroupSample.ts | 2 +- .../typescript/src/ipAllocationsListSample.ts | 2 +- .../src/ipAllocationsUpdateTagsSample.ts | 2 +- .../src/ipGroupsCreateOrUpdateSample.ts | 2 +- .../typescript/src/ipGroupsDeleteSample.ts | 2 +- .../v33/typescript/src/ipGroupsGetSample.ts | 2 +- .../src/ipGroupsListByResourceGroupSample.ts | 2 +- .../v33/typescript/src/ipGroupsListSample.ts | 2 +- .../src/ipGroupsUpdateGroupsSample.ts | 2 +- .../typescript/src/ipamPoolsCreateSample.ts | 53 + .../typescript/src/ipamPoolsDeleteSample.ts | 44 + .../src/ipamPoolsGetPoolUsageSample.ts | 44 + .../v33/typescript/src/ipamPoolsGetSample.ts | 44 + .../ipamPoolsListAssociatedResourcesSample.ts | 47 + .../v33/typescript/src/ipamPoolsListSample.ts | 45 + .../typescript/src/ipamPoolsUpdateSample.ts | 44 + ...tActiveConnectivityConfigurationsSample.ts | 2 +- .../src/listActiveSecurityAdminRulesSample.ts | 2 +- ...fectiveConnectivityConfigurationsSample.ts | 2 +- ...anagerEffectiveSecurityAdminRulesSample.ts | 2 +- ...BackendAddressPoolsCreateOrUpdateSample.ts | 2 +- ...BalancerBackendAddressPoolsDeleteSample.ts | 2 +- ...oadBalancerBackendAddressPoolsGetSample.ts | 4 +- ...adBalancerBackendAddressPoolsListSample.ts | 4 +- ...lancerFrontendIPConfigurationsGetSample.ts | 2 +- ...ancerFrontendIPConfigurationsListSample.ts | 2 +- ...loadBalancerLoadBalancingRulesGetSample.ts | 2 +- ...dBalancerLoadBalancingRulesHealthSample.ts | 42 + ...oadBalancerLoadBalancingRulesListSample.ts | 2 +- ...loadBalancerNetworkInterfacesListSample.ts | 4 +- .../src/loadBalancerOutboundRulesGetSample.ts | 2 +- .../loadBalancerOutboundRulesListSample.ts | 2 +- .../src/loadBalancerProbesGetSample.ts | 2 +- .../src/loadBalancerProbesListSample.ts | 2 +- .../src/loadBalancersCreateOrUpdateSample.ts | 20 +- .../src/loadBalancersDeleteSample.ts | 2 +- .../typescript/src/loadBalancersGetSample.ts | 4 +- .../src/loadBalancersListAllSample.ts | 2 +- ...ersListInboundNatRulePortMappingsSample.ts | 2 +- .../typescript/src/loadBalancersListSample.ts | 2 +- .../loadBalancersMigrateToIPBasedSample.ts | 2 +- ...oadBalancersSwapPublicIPAddressesSample.ts | 2 +- .../src/loadBalancersUpdateTagsSample.ts | 2 +- ...ocalNetworkGatewaysCreateOrUpdateSample.ts | 2 +- .../src/localNetworkGatewaysDeleteSample.ts | 2 +- .../src/localNetworkGatewaysGetSample.ts | 2 +- .../src/localNetworkGatewaysListSample.ts | 2 +- .../localNetworkGatewaysUpdateTagsSample.ts | 2 +- ...kManagerConnectionsCreateOrUpdateSample.ts | 2 +- ...upNetworkManagerConnectionsDeleteSample.ts | 2 +- ...GroupNetworkManagerConnectionsGetSample.ts | 2 +- ...roupNetworkManagerConnectionsListSample.ts | 2 +- .../src/natGatewaysCreateOrUpdateSample.ts | 2 +- .../typescript/src/natGatewaysDeleteSample.ts | 2 +- .../typescript/src/natGatewaysGetSample.ts | 2 +- .../src/natGatewaysListAllSample.ts | 2 +- .../typescript/src/natGatewaysListSample.ts | 2 +- .../src/natGatewaysUpdateTagsSample.ts | 2 +- .../src/natRulesCreateOrUpdateSample.ts | 2 +- .../typescript/src/natRulesDeleteSample.ts | 2 +- .../v33/typescript/src/natRulesGetSample.ts | 2 +- .../src/natRulesListByVpnGatewaySample.ts | 2 +- .../src/networkGroupsCreateOrUpdateSample.ts | 2 +- .../src/networkGroupsDeleteSample.ts | 2 +- .../typescript/src/networkGroupsGetSample.ts | 2 +- .../typescript/src/networkGroupsListSample.ts | 2 +- ...tworkInterfaceIPConfigurationsGetSample.ts | 2 +- ...workInterfaceIPConfigurationsListSample.ts | 2 +- ...networkInterfaceLoadBalancersListSample.ts | 2 +- ...ceTapConfigurationsCreateOrUpdateSample.ts | 2 +- ...kInterfaceTapConfigurationsDeleteSample.ts | 2 +- ...workInterfaceTapConfigurationsGetSample.ts | 2 +- ...orkInterfaceTapConfigurationsListSample.ts | 2 +- .../networkInterfacesCreateOrUpdateSample.ts | 4 +- .../src/networkInterfacesDeleteSample.ts | 2 +- ...esGetCloudServiceNetworkInterfaceSample.ts | 2 +- ...kInterfacesGetEffectiveRouteTableSample.ts | 2 +- .../src/networkInterfacesGetSample.ts | 2 +- ...ualMachineScaleSetIPConfigurationSample.ts | 2 +- ...alMachineScaleSetNetworkInterfaceSample.ts | 2 +- .../src/networkInterfacesListAllSample.ts | 2 +- ...ListCloudServiceNetworkInterfacesSample.ts | 2 +- ...viceRoleInstanceNetworkInterfacesSample.ts | 2 +- ...istEffectiveNetworkSecurityGroupsSample.ts | 2 +- .../src/networkInterfacesListSample.ts | 2 +- ...alMachineScaleSetIPConfigurationsSample.ts | 2 +- ...lMachineScaleSetNetworkInterfacesSample.ts | 2 +- ...achineScaleSetVMNetworkInterfacesSample.ts | 2 +- .../src/networkInterfacesUpdateTagsSample.ts | 2 +- .../src/networkManagerCommitsPostSample.ts | 2 +- ...etworkManagerDeploymentStatusListSample.ts | 2 +- ...utingConfigurationsCreateOrUpdateSample.ts | 2 +- ...anagerRoutingConfigurationsDeleteSample.ts | 2 +- ...rkManagerRoutingConfigurationsGetSample.ts | 2 +- ...kManagerRoutingConfigurationsListSample.ts | 2 +- .../networkManagersCreateOrUpdateSample.ts | 2 +- .../src/networkManagersDeleteSample.ts | 2 +- .../src/networkManagersGetSample.ts | 2 +- ...networkManagersListBySubscriptionSample.ts | 2 +- .../src/networkManagersListSample.ts | 2 +- .../src/networkManagersPatchSample.ts | 2 +- .../networkProfilesCreateOrUpdateSample.ts | 2 +- .../src/networkProfilesDeleteSample.ts | 2 +- .../src/networkProfilesGetSample.ts | 4 +- .../src/networkProfilesListAllSample.ts | 2 +- .../src/networkProfilesListSample.ts | 2 +- .../src/networkProfilesUpdateTagsSample.ts | 2 +- ...tworkSecurityGroupsCreateOrUpdateSample.ts | 4 +- .../src/networkSecurityGroupsDeleteSample.ts | 2 +- .../src/networkSecurityGroupsGetSample.ts | 2 +- .../src/networkSecurityGroupsListAllSample.ts | 2 +- .../src/networkSecurityGroupsListSample.ts | 2 +- .../networkSecurityGroupsUpdateTagsSample.ts | 2 +- ...pplianceConnectionsCreateOrUpdateSample.ts | 2 +- ...VirtualApplianceConnectionsDeleteSample.ts | 2 +- ...orkVirtualApplianceConnectionsGetSample.ts | 2 +- ...rkVirtualApplianceConnectionsListSample.ts | 2 +- ...rkVirtualAppliancesCreateOrUpdateSample.ts | 4 +- .../networkVirtualAppliancesDeleteSample.ts | 2 +- .../src/networkVirtualAppliancesGetSample.ts | 2 +- ...tualAppliancesListByResourceGroupSample.ts | 2 +- .../src/networkVirtualAppliancesListSample.ts | 2 +- .../networkVirtualAppliancesRestartSample.ts | 4 +- ...etworkVirtualAppliancesUpdateTagsSample.ts | 2 +- .../networkWatchersCheckConnectivitySample.ts | 2 +- .../networkWatchersCreateOrUpdateSample.ts | 2 +- .../src/networkWatchersDeleteSample.ts | 2 +- ...atchersGetAzureReachabilityReportSample.ts | 2 +- .../networkWatchersGetFlowLogStatusSample.ts | 2 +- ...GetNetworkConfigurationDiagnosticSample.ts | 2 +- .../src/networkWatchersGetNextHopSample.ts | 2 +- .../src/networkWatchersGetSample.ts | 2 +- .../src/networkWatchersGetTopologySample.ts | 2 +- ...kWatchersGetTroubleshootingResultSample.ts | 2 +- ...networkWatchersGetTroubleshootingSample.ts | 2 +- ...networkWatchersGetVMSecurityRulesSample.ts | 2 +- .../src/networkWatchersListAllSample.ts | 2 +- ...orkWatchersListAvailableProvidersSample.ts | 2 +- .../src/networkWatchersListSample.ts | 2 +- ...rkWatchersSetFlowLogConfigurationSample.ts | 2 +- .../src/networkWatchersUpdateTagsSample.ts | 2 +- .../src/networkWatchersVerifyIPFlowSample.ts | 2 +- .../typescript/src/operationsListSample.ts | 2 +- .../src/p2SVpnGatewaysCreateOrUpdateSample.ts | 2 +- .../src/p2SVpnGatewaysDeleteSample.ts | 2 +- ...tewaysDisconnectP2SvpnConnectionsSample.ts | 2 +- .../p2SVpnGatewaysGenerateVpnProfileSample.ts | 2 +- ...GetP2SvpnConnectionHealthDetailedSample.ts | 2 +- ...GatewaysGetP2SvpnConnectionHealthSample.ts | 2 +- .../typescript/src/p2SVpnGatewaysGetSample.ts | 2 +- ...p2SVpnGatewaysListByResourceGroupSample.ts | 2 +- .../src/p2SVpnGatewaysListSample.ts | 2 +- .../src/p2SVpnGatewaysResetSample.ts | 2 +- .../src/p2SVpnGatewaysUpdateTagsSample.ts | 2 +- .../src/packetCapturesCreateSample.ts | 2 +- .../src/packetCapturesDeleteSample.ts | 2 +- .../typescript/src/packetCapturesGetSample.ts | 2 +- .../src/packetCapturesGetStatusSample.ts | 2 +- .../src/packetCapturesListSample.ts | 2 +- .../src/packetCapturesStopSample.ts | 2 +- ...ExpressRouteCircuitConnectionsGetSample.ts | 2 +- ...xpressRouteCircuitConnectionsListSample.ts | 2 +- ...rivateDnsZoneGroupsCreateOrUpdateSample.ts | 2 +- .../src/privateDnsZoneGroupsDeleteSample.ts | 2 +- .../src/privateDnsZoneGroupsGetSample.ts | 2 +- .../src/privateDnsZoneGroupsListSample.ts | 2 +- .../privateEndpointsCreateOrUpdateSample.ts | 6 +- .../src/privateEndpointsDeleteSample.ts | 2 +- .../src/privateEndpointsGetSample.ts | 6 +- ...rivateEndpointsListBySubscriptionSample.ts | 2 +- .../src/privateEndpointsListSample.ts | 2 +- ...kServiceVisibilityByResourceGroupSample.ts | 2 +- ...CheckPrivateLinkServiceVisibilitySample.ts | 2 +- ...privateLinkServicesCreateOrUpdateSample.ts | 2 +- ...esDeletePrivateEndpointConnectionSample.ts | 2 +- .../src/privateLinkServicesDeleteSample.ts | 2 +- ...vicesGetPrivateEndpointConnectionSample.ts | 2 +- .../src/privateLinkServicesGetSample.ts | 2 +- ...rivateLinkServicesByResourceGroupSample.ts | 2 +- ...stAutoApprovedPrivateLinkServicesSample.ts | 2 +- ...ateLinkServicesListBySubscriptionSample.ts | 2 +- ...cesListPrivateEndpointConnectionsSample.ts | 2 +- .../src/privateLinkServicesListSample.ts | 2 +- ...esUpdatePrivateEndpointConnectionSample.ts | 2 +- .../publicIPAddressesCreateOrUpdateSample.ts | 8 +- ...icIPAddressesDdosProtectionStatusSample.ts | 2 +- .../src/publicIPAddressesDeleteSample.ts | 2 +- ...sesGetCloudServicePublicIpaddressSample.ts | 2 +- .../src/publicIPAddressesGetSample.ts | 2 +- ...ualMachineScaleSetPublicIpaddressSample.ts | 2 +- .../src/publicIPAddressesListAllSample.ts | 2 +- ...ListCloudServicePublicIpaddressesSample.ts | 2 +- ...viceRoleInstancePublicIpaddressesSample.ts | 2 +- .../src/publicIPAddressesListSample.ts | 2 +- ...lMachineScaleSetPublicIpaddressesSample.ts | 2 +- ...achineScaleSetVmpublicIpaddressesSample.ts | 2 +- .../src/publicIPAddressesUpdateTagsSample.ts | 2 +- .../publicIPPrefixesCreateOrUpdateSample.ts | 4 +- .../src/publicIPPrefixesDeleteSample.ts | 2 +- .../src/publicIPPrefixesGetSample.ts | 2 +- .../src/publicIPPrefixesListAllSample.ts | 2 +- .../src/publicIPPrefixesListSample.ts | 2 +- .../src/publicIPPrefixesUpdateTagsSample.ts | 2 +- .../src/putBastionShareableLinkSample.ts | 2 +- ...reachabilityAnalysisIntentsCreateSample.ts | 66 + ...reachabilityAnalysisIntentsDeleteSample.ts | 46 + .../reachabilityAnalysisIntentsGetSample.ts | 46 + .../reachabilityAnalysisIntentsListSample.ts | 47 + .../reachabilityAnalysisRunsCreateSample.ts | 57 + .../reachabilityAnalysisRunsDeleteSample.ts | 46 + .../src/reachabilityAnalysisRunsGetSample.ts | 46 + .../src/reachabilityAnalysisRunsListSample.ts | 47 + .../src/resourceNavigationLinksListSample.ts | 2 +- .../routeFilterRulesCreateOrUpdateSample.ts | 2 +- .../src/routeFilterRulesDeleteSample.ts | 2 +- .../src/routeFilterRulesGetSample.ts | 2 +- ...routeFilterRulesListByRouteFilterSample.ts | 2 +- .../src/routeFiltersCreateOrUpdateSample.ts | 2 +- .../src/routeFiltersDeleteSample.ts | 2 +- .../typescript/src/routeFiltersGetSample.ts | 2 +- .../routeFiltersListByResourceGroupSample.ts | 2 +- .../typescript/src/routeFiltersListSample.ts | 2 +- .../src/routeFiltersUpdateTagsSample.ts | 2 +- .../src/routeMapsCreateOrUpdateSample.ts | 2 +- .../typescript/src/routeMapsDeleteSample.ts | 2 +- .../v33/typescript/src/routeMapsGetSample.ts | 2 +- .../v33/typescript/src/routeMapsListSample.ts | 2 +- .../src/routeTablesCreateOrUpdateSample.ts | 4 +- .../typescript/src/routeTablesDeleteSample.ts | 2 +- .../typescript/src/routeTablesGetSample.ts | 2 +- .../src/routeTablesListAllSample.ts | 2 +- .../typescript/src/routeTablesListSample.ts | 2 +- .../src/routeTablesUpdateTagsSample.ts | 2 +- .../src/routesCreateOrUpdateSample.ts | 2 +- .../v33/typescript/src/routesDeleteSample.ts | 2 +- .../v33/typescript/src/routesGetSample.ts | 2 +- .../v33/typescript/src/routesListSample.ts | 2 +- .../src/routingIntentCreateOrUpdateSample.ts | 2 +- .../src/routingIntentDeleteSample.ts | 2 +- .../typescript/src/routingIntentGetSample.ts | 2 +- .../typescript/src/routingIntentListSample.ts | 2 +- ...tingRuleCollectionsCreateOrUpdateSample.ts | 2 +- .../src/routingRuleCollectionsDeleteSample.ts | 2 +- .../src/routingRuleCollectionsGetSample.ts | 2 +- .../src/routingRuleCollectionsListSample.ts | 2 +- .../src/routingRulesCreateOrUpdateSample.ts | 4 +- .../src/routingRulesDeleteSample.ts | 2 +- .../typescript/src/routingRulesGetSample.ts | 2 +- .../typescript/src/routingRulesListSample.ts | 2 +- .../scopeConnectionsCreateOrUpdateSample.ts | 2 +- .../src/scopeConnectionsDeleteSample.ts | 2 +- .../src/scopeConnectionsGetSample.ts | 2 +- .../src/scopeConnectionsListSample.ts | 2 +- ...AdminConfigurationsCreateOrUpdateSample.ts | 32 +- ...securityAdminConfigurationsDeleteSample.ts | 2 +- .../securityAdminConfigurationsGetSample.ts | 2 +- .../securityAdminConfigurationsListSample.ts | 2 +- ...ityPartnerProvidersCreateOrUpdateSample.ts | 2 +- .../securityPartnerProvidersDeleteSample.ts | 2 +- .../src/securityPartnerProvidersGetSample.ts | 2 +- ...rtnerProvidersListByResourceGroupSample.ts | 2 +- .../src/securityPartnerProvidersListSample.ts | 2 +- ...ecurityPartnerProvidersUpdateTagsSample.ts | 2 +- .../src/securityRulesCreateOrUpdateSample.ts | 2 +- .../src/securityRulesDeleteSample.ts | 2 +- .../typescript/src/securityRulesGetSample.ts | 2 +- .../typescript/src/securityRulesListSample.ts | 2 +- ...yUserConfigurationsCreateOrUpdateSample.ts | 2 +- .../securityUserConfigurationsDeleteSample.ts | 2 +- .../securityUserConfigurationsGetSample.ts | 2 +- .../securityUserConfigurationsListSample.ts | 2 +- ...UserRuleCollectionsCreateOrUpdateSample.ts | 2 +- ...securityUserRuleCollectionsDeleteSample.ts | 2 +- .../securityUserRuleCollectionsGetSample.ts | 2 +- .../securityUserRuleCollectionsListSample.ts | 2 +- .../securityUserRulesCreateOrUpdateSample.ts | 2 +- .../src/securityUserRulesDeleteSample.ts | 2 +- .../src/securityUserRulesGetSample.ts | 2 +- .../src/securityUserRulesListSample.ts | 2 +- .../src/serviceAssociationLinksListSample.ts | 2 +- ...iceEndpointPoliciesCreateOrUpdateSample.ts | 4 +- .../serviceEndpointPoliciesDeleteSample.ts | 2 +- .../src/serviceEndpointPoliciesGetSample.ts | 2 +- ...dpointPoliciesListByResourceGroupSample.ts | 2 +- .../src/serviceEndpointPoliciesListSample.ts | 2 +- ...serviceEndpointPoliciesUpdateTagsSample.ts | 2 +- ...ntPolicyDefinitionsCreateOrUpdateSample.ts | 2 +- ...ceEndpointPolicyDefinitionsDeleteSample.ts | 2 +- ...rviceEndpointPolicyDefinitionsGetSample.ts | 2 +- ...icyDefinitionsListByResourceGroupSample.ts | 2 +- .../src/serviceTagInformationListSample.ts | 6 +- .../typescript/src/serviceTagsListSample.ts | 2 +- .../typescript/src/staticCidrsCreateSample.ts | 46 + .../typescript/src/staticCidrsDeleteSample.ts | 46 + .../typescript/src/staticCidrsGetSample.ts | 46 + .../typescript/src/staticCidrsListSample.ts | 47 + .../src/staticMembersCreateOrUpdateSample.ts | 2 +- .../src/staticMembersDeleteSample.ts | 2 +- .../typescript/src/staticMembersGetSample.ts | 2 +- .../typescript/src/staticMembersListSample.ts | 2 +- .../src/subnetsCreateOrUpdateSample.ts | 10 +- .../v33/typescript/src/subnetsDeleteSample.ts | 2 +- .../v33/typescript/src/subnetsGetSample.ts | 6 +- .../v33/typescript/src/subnetsListSample.ts | 2 +- .../subnetsPrepareNetworkPoliciesSample.ts | 2 +- .../subnetsUnprepareNetworkPoliciesSample.ts | 2 +- ...kManagerConnectionsCreateOrUpdateSample.ts | 2 +- ...onNetworkManagerConnectionsDeleteSample.ts | 2 +- ...ptionNetworkManagerConnectionsGetSample.ts | 2 +- ...tionNetworkManagerConnectionsListSample.ts | 2 +- .../src/supportedSecurityProvidersSample.ts | 2 +- .../v33/typescript/src/usagesListSample.ts | 4 +- .../src/verifierWorkspacesCreateSample.ts | 49 + .../src/verifierWorkspacesDeleteSample.ts | 44 + .../src/verifierWorkspacesGetSample.ts | 44 + .../src/verifierWorkspacesListSample.ts | 45 + .../src/verifierWorkspacesUpdateSample.ts | 44 + .../v33/typescript/src/vipSwapCreateSample.ts | 2 +- .../v33/typescript/src/vipSwapGetSample.ts | 2 +- .../v33/typescript/src/vipSwapListSample.ts | 2 +- ...rtualApplianceSitesCreateOrUpdateSample.ts | 2 +- .../src/virtualApplianceSitesDeleteSample.ts | 2 +- .../src/virtualApplianceSitesGetSample.ts | 2 +- .../src/virtualApplianceSitesListSample.ts | 2 +- .../src/virtualApplianceSkusGetSample.ts | 2 +- .../src/virtualApplianceSkusListSample.ts | 2 +- ...ualHubBgpConnectionCreateOrUpdateSample.ts | 2 +- .../virtualHubBgpConnectionDeleteSample.ts | 2 +- .../src/virtualHubBgpConnectionGetSample.ts | 2 +- ...gpConnectionsListAdvertisedRoutesSample.ts | 2 +- ...ubBgpConnectionsListLearnedRoutesSample.ts | 2 +- .../src/virtualHubBgpConnectionsListSample.ts | 2 +- ...lHubIPConfigurationCreateOrUpdateSample.ts | 2 +- .../virtualHubIPConfigurationDeleteSample.ts | 2 +- .../src/virtualHubIPConfigurationGetSample.ts | 2 +- .../virtualHubIPConfigurationListSample.ts | 2 +- ...ualHubRouteTableV2SCreateOrUpdateSample.ts | 2 +- .../virtualHubRouteTableV2SDeleteSample.ts | 2 +- .../src/virtualHubRouteTableV2SGetSample.ts | 2 +- .../src/virtualHubRouteTableV2SListSample.ts | 2 +- .../src/virtualHubsCreateOrUpdateSample.ts | 2 +- .../typescript/src/virtualHubsDeleteSample.ts | 2 +- ...lHubsGetEffectiveVirtualHubRoutesSample.ts | 6 +- .../src/virtualHubsGetInboundRoutesSample.ts | 2 +- .../src/virtualHubsGetOutboundRoutesSample.ts | 2 +- .../typescript/src/virtualHubsGetSample.ts | 2 +- .../virtualHubsListByResourceGroupSample.ts | 2 +- .../typescript/src/virtualHubsListSample.ts | 2 +- .../src/virtualHubsUpdateTagsSample.ts | 2 +- ...kGatewayConnectionsCreateOrUpdateSample.ts | 2 +- ...alNetworkGatewayConnectionsDeleteSample.ts | 2 +- ...etworkGatewayConnectionsGetIkeSasSample.ts | 2 +- ...rtualNetworkGatewayConnectionsGetSample.ts | 2 +- ...orkGatewayConnectionsGetSharedKeySample.ts | 2 +- ...tualNetworkGatewayConnectionsListSample.ts | 2 +- ...GatewayConnectionsResetConnectionSample.ts | 2 +- ...kGatewayConnectionsResetSharedKeySample.ts | 2 +- ...orkGatewayConnectionsSetSharedKeySample.ts | 2 +- ...ewayConnectionsStartPacketCaptureSample.ts | 4 +- ...tewayConnectionsStopPacketCaptureSample.ts | 2 +- ...tworkGatewayConnectionsUpdateTagsSample.ts | 2 +- ...workGatewayNatRulesCreateOrUpdateSample.ts | 2 +- ...rtualNetworkGatewayNatRulesDeleteSample.ts | 2 +- .../virtualNetworkGatewayNatRulesGetSample.ts | 2 +- ...tRulesListByVirtualNetworkGatewaySample.ts | 2 +- ...tualNetworkGatewaysCreateOrUpdateSample.ts | 4 +- .../src/virtualNetworkGatewaysDeleteSample.ts | 2 +- ...rtualNetworkGatewayVpnConnectionsSample.ts | 2 +- ...NetworkGatewaysGenerateVpnProfileSample.ts | 2 +- ...kGatewaysGeneratevpnclientpackageSample.ts | 2 +- ...etworkGatewaysGetAdvertisedRoutesSample.ts | 2 +- ...alNetworkGatewaysGetBgpPeerStatusSample.ts | 2 +- ...GatewaysGetFailoverAllTestDetailsSample.ts | 45 + ...ewaysGetFailoverSingleTestDetailsSample.ts | 45 + ...alNetworkGatewaysGetLearnedRoutesSample.ts | 2 +- .../src/virtualNetworkGatewaysGetSample.ts | 4 +- ...rkGatewaysGetVpnProfilePackageUrlSample.ts | 2 +- ...ewaysGetVpnclientConnectionHealthSample.ts | 2 +- ...tewaysGetVpnclientIpsecParametersSample.ts | 2 +- ...ualNetworkGatewaysListConnectionsSample.ts | 2 +- .../src/virtualNetworkGatewaysListSample.ts | 2 +- .../src/virtualNetworkGatewaysResetSample.ts | 2 +- ...rkGatewaysResetVpnClientSharedKeySample.ts | 2 +- ...tewaysSetVpnclientIpsecParametersSample.ts | 2 +- ...xpressRouteSiteFailoverSimulationSample.ts | 43 + ...NetworkGatewaysStartPacketCaptureSample.ts | 4 +- ...xpressRouteSiteFailoverSimulationSample.ts | 61 + ...lNetworkGatewaysStopPacketCaptureSample.ts | 2 +- ...etworkGatewaysSupportedVpnDevicesSample.ts | 2 +- .../virtualNetworkGatewaysUpdateTagsSample.ts | 2 +- ...ewaysVpnDeviceConfigurationScriptSample.ts | 2 +- ...tualNetworkPeeringsCreateOrUpdateSample.ts | 14 +- .../src/virtualNetworkPeeringsDeleteSample.ts | 2 +- .../src/virtualNetworkPeeringsGetSample.ts | 8 +- .../src/virtualNetworkPeeringsListSample.ts | 4 +- .../virtualNetworkTapsCreateOrUpdateSample.ts | 2 +- .../src/virtualNetworkTapsDeleteSample.ts | 2 +- .../src/virtualNetworkTapsGetSample.ts | 2 +- .../src/virtualNetworkTapsListAllSample.ts | 2 +- ...ualNetworkTapsListByResourceGroupSample.ts | 2 +- .../src/virtualNetworkTapsUpdateTagsSample.ts | 2 +- ...etworksCheckIPAddressAvailabilitySample.ts | 2 +- .../virtualNetworksCreateOrUpdateSample.ts | 59 +- .../src/virtualNetworksDeleteSample.ts | 2 +- .../src/virtualNetworksGetSample.ts | 6 +- .../src/virtualNetworksListAllSample.ts | 2 +- ...lNetworksListDdosProtectionStatusSample.ts | 2 +- .../src/virtualNetworksListSample.ts | 2 +- .../src/virtualNetworksListUsageSample.ts | 2 +- .../src/virtualNetworksUpdateTagsSample.ts | 2 +- ...rtualRouterPeeringsCreateOrUpdateSample.ts | 2 +- .../src/virtualRouterPeeringsDeleteSample.ts | 2 +- .../src/virtualRouterPeeringsGetSample.ts | 2 +- .../src/virtualRouterPeeringsListSample.ts | 2 +- .../src/virtualRoutersCreateOrUpdateSample.ts | 2 +- .../src/virtualRoutersDeleteSample.ts | 2 +- .../typescript/src/virtualRoutersGetSample.ts | 2 +- ...virtualRoutersListByResourceGroupSample.ts | 2 +- .../src/virtualRoutersListSample.ts | 2 +- .../src/virtualWansCreateOrUpdateSample.ts | 2 +- .../typescript/src/virtualWansDeleteSample.ts | 2 +- .../typescript/src/virtualWansGetSample.ts | 2 +- .../virtualWansListByResourceGroupSample.ts | 2 +- .../typescript/src/virtualWansListSample.ts | 2 +- .../src/virtualWansUpdateTagsSample.ts | 2 +- .../src/vpnConnectionsCreateOrUpdateSample.ts | 2 +- .../src/vpnConnectionsDeleteSample.ts | 2 +- .../typescript/src/vpnConnectionsGetSample.ts | 2 +- .../vpnConnectionsListByVpnGatewaySample.ts | 2 +- .../vpnConnectionsStartPacketCaptureSample.ts | 4 +- .../vpnConnectionsStopPacketCaptureSample.ts | 2 +- .../src/vpnGatewaysCreateOrUpdateSample.ts | 2 +- .../typescript/src/vpnGatewaysDeleteSample.ts | 2 +- .../typescript/src/vpnGatewaysGetSample.ts | 2 +- .../vpnGatewaysListByResourceGroupSample.ts | 2 +- .../typescript/src/vpnGatewaysListSample.ts | 2 +- .../typescript/src/vpnGatewaysResetSample.ts | 2 +- .../vpnGatewaysStartPacketCaptureSample.ts | 4 +- .../src/vpnGatewaysStopPacketCaptureSample.ts | 2 +- .../src/vpnGatewaysUpdateTagsSample.ts | 2 +- ...pnLinkConnectionsGetAllSharedKeysSample.ts | 2 +- ...inkConnectionsGetDefaultSharedKeySample.ts | 2 +- .../src/vpnLinkConnectionsGetIkeSasSample.ts | 2 +- ...inkConnectionsListByVpnConnectionSample.ts | 2 +- ...nkConnectionsListDefaultSharedKeySample.ts | 2 +- ...vpnLinkConnectionsResetConnectionSample.ts | 2 +- ...nectionsSetOrInitDefaultSharedKeySample.ts | 2 +- ...tionsAssociatedWithVirtualWanListSample.ts | 2 +- ...erverConfigurationsCreateOrUpdateSample.ts | 2 +- .../vpnServerConfigurationsDeleteSample.ts | 2 +- .../src/vpnServerConfigurationsGetSample.ts | 2 +- ...ConfigurationsListByResourceGroupSample.ts | 2 +- .../src/vpnServerConfigurationsListSample.ts | 2 +- ...vpnServerConfigurationsUpdateTagsSample.ts | 2 +- .../src/vpnSiteLinkConnectionsGetSample.ts | 2 +- .../typescript/src/vpnSiteLinksGetSample.ts | 2 +- .../src/vpnSiteLinksListByVpnSiteSample.ts | 2 +- .../vpnSitesConfigurationDownloadSample.ts | 2 +- .../src/vpnSitesCreateOrUpdateSample.ts | 2 +- .../typescript/src/vpnSitesDeleteSample.ts | 2 +- .../v33/typescript/src/vpnSitesGetSample.ts | 2 +- .../src/vpnSitesListByResourceGroupSample.ts | 2 +- .../v33/typescript/src/vpnSitesListSample.ts | 2 +- .../src/vpnSitesUpdateTagsSample.ts | 2 +- ...ionFirewallPoliciesCreateOrUpdateSample.ts | 2 +- ...ApplicationFirewallPoliciesDeleteSample.ts | 2 +- ...webApplicationFirewallPoliciesGetSample.ts | 2 +- ...pplicationFirewallPoliciesListAllSample.ts | 2 +- ...ebApplicationFirewallPoliciesListSample.ts | 2 +- .../typescript/src/webCategoriesGetSample.ts | 2 +- .../webCategoriesListBySubscriptionSample.ts | 2 +- sdk/network/arm-network/src/models/index.ts | 1923 ++++++++++--- sdk/network/arm-network/src/models/mappers.ts | 2491 ++++++++++++++--- .../arm-network/src/models/parameters.ts | 394 ++- .../src/networkManagementClient.ts | 50 +- .../src/operations/adminRuleCollections.ts | 30 +- .../arm-network/src/operations/adminRules.ts | 38 +- .../operations/connectivityConfigurations.ts | 2 +- .../inboundSecurityRuleOperations.ts | 4 +- .../arm-network/src/operations/index.ts | 11 +- .../arm-network/src/operations/ipamPools.ts | 787 ++++++ .../loadBalancerLoadBalancingRules.ts | 134 + ...anagementGroupNetworkManagerConnections.ts | 2 +- .../src/operations/networkGroups.ts | 2 +- .../src/operations/networkManagerCommits.ts | 2 +- ...etworkManagerDeploymentStatusOperations.ts | 2 +- .../networkManagerRoutingConfigurations.ts | 12 +- .../src/operations/networkManagers.ts | 12 +- .../operations/reachabilityAnalysisIntents.ts | 393 +++ .../operations/reachabilityAnalysisRuns.ts | 487 ++++ .../src/operations/routeFilterRules.ts | 6 +- .../src/operations/routingRuleCollections.ts | 20 +- .../src/operations/routingRules.ts | 28 +- .../src/operations/scopeConnections.ts | 12 +- .../operations/securityAdminConfigurations.ts | 22 +- .../operations/securityUserConfigurations.ts | 12 +- .../operations/securityUserRuleCollections.ts | 18 +- .../src/operations/securityUserRules.ts | 28 +- .../arm-network/src/operations/staticCidrs.ts | 478 ++++ .../src/operations/staticMembers.ts | 2 +- .../subscriptionNetworkManagerConnections.ts | 2 +- .../src/operations/verifierWorkspaces.ts | 476 ++++ .../src/operations/virtualNetworkGateways.ts | 639 +++++ .../src/operations/virtualNetworks.ts | 4 +- .../src/operationsInterfaces/index.ts | 11 +- .../src/operationsInterfaces/ipamPools.ts | 160 ++ .../loadBalancerLoadBalancingRules.ts | 34 + .../reachabilityAnalysisIntents.ts | 83 + .../reachabilityAnalysisRuns.ts | 105 + .../src/operationsInterfaces/staticCidrs.ts | 103 + .../verifierWorkspaces.ts | 110 + .../virtualNetworkGateways.ts | 147 + sdk/network/arm-network/tsconfig.json | 4 +- 2112 files changed, 17364 insertions(+), 4721 deletions(-) create mode 100644 sdk/network/arm-network/samples-dev/ipamPoolsCreateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/ipamPoolsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples-dev/ipamPoolsGetPoolUsageSample.ts create mode 100644 sdk/network/arm-network/samples-dev/ipamPoolsGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/ipamPoolsListAssociatedResourcesSample.ts create mode 100644 sdk/network/arm-network/samples-dev/ipamPoolsListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/ipamPoolsUpdateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesHealthSample.ts create mode 100644 sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsCreateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsCreateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/staticCidrsCreateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/staticCidrsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples-dev/staticCidrsGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/staticCidrsListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/verifierWorkspacesCreateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/verifierWorkspacesDeleteSample.ts create mode 100644 sdk/network/arm-network/samples-dev/verifierWorkspacesGetSample.ts create mode 100644 sdk/network/arm-network/samples-dev/verifierWorkspacesListSample.ts create mode 100644 sdk/network/arm-network/samples-dev/verifierWorkspacesUpdateSample.ts create mode 100644 sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts create mode 100644 sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts create mode 100644 sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts create mode 100644 sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts create mode 100644 sdk/network/arm-network/samples/v33/javascript/ipamPoolsCreateSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/ipamPoolsDeleteSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetPoolUsageSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/ipamPoolsListAssociatedResourcesSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/ipamPoolsListSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/ipamPoolsUpdateSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesHealthSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsCreateSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsDeleteSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsGetSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsListSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsCreateSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsDeleteSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsGetSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsListSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/staticCidrsCreateSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/staticCidrsDeleteSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/staticCidrsGetSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/staticCidrsListSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesCreateSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesDeleteSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesGetSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesListSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesUpdateSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js create mode 100644 sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsCreateSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetPoolUsageSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListAssociatedResourcesSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsUpdateSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsCreateSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsGetSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsListSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsCreateSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsGetSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsListSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/staticCidrsCreateSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/staticCidrsDeleteSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/staticCidrsGetSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/staticCidrsListSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesCreateSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesDeleteSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesGetSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesListSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesUpdateSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts create mode 100644 sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts create mode 100644 sdk/network/arm-network/src/operations/ipamPools.ts create mode 100644 sdk/network/arm-network/src/operations/reachabilityAnalysisIntents.ts create mode 100644 sdk/network/arm-network/src/operations/reachabilityAnalysisRuns.ts create mode 100644 sdk/network/arm-network/src/operations/staticCidrs.ts create mode 100644 sdk/network/arm-network/src/operations/verifierWorkspaces.ts create mode 100644 sdk/network/arm-network/src/operationsInterfaces/ipamPools.ts create mode 100644 sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisIntents.ts create mode 100644 sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisRuns.ts create mode 100644 sdk/network/arm-network/src/operationsInterfaces/staticCidrs.ts create mode 100644 sdk/network/arm-network/src/operationsInterfaces/verifierWorkspaces.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 954a2cda4bcf..cf5003bea31a 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3136,7 +3136,7 @@ packages: version: 0.0.0 '@rush-temp/arm-network-1@file:projects/arm-network-1.tgz': - resolution: {integrity: sha512-v3WX0EhxWhjyjRmHFJKbsVHbbrk+cVc4qah2uwvPzQfpENJOsWcQD+DaJ5GIc5bIllnW59IoZISf3u2ZoB+ZgQ==, tarball: file:projects/arm-network-1.tgz} + resolution: {integrity: sha512-ar1Oosj8hqVBwgZ+v5w/QDMGslyj2F/aUQXQLULArSUjENHzoEGSrrfFXCHbi+iE8AE+wShw2afER5oqqHfrrQ==, tarball: file:projects/arm-network-1.tgz} version: 0.0.0 '@rush-temp/arm-network-profile-2020-09-01-hybrid@file:projects/arm-network-profile-2020-09-01-hybrid.tgz': @@ -13558,14 +13558,13 @@ snapshots: dependencies: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 '@types/mocha': 10.0.10 '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 + mocha: 10.8.2 ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 diff --git a/sdk/network/arm-network/CHANGELOG.md b/sdk/network/arm-network/CHANGELOG.md index cef7bcbe8c71..3e5abcb56615 100644 --- a/sdk/network/arm-network/CHANGELOG.md +++ b/sdk/network/arm-network/CHANGELOG.md @@ -1,15 +1,168 @@ # Release History - -## 33.4.1 (Unreleased) - + +## 33.5.0 (2024-12-10) + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group IpamPools + - Added operation group ReachabilityAnalysisIntents + - Added operation group ReachabilityAnalysisRuns + - Added operation group StaticCidrs + - Added operation group VerifierWorkspaces + - Added operation LoadBalancerLoadBalancingRules.beginHealth + - Added operation LoadBalancerLoadBalancingRules.beginHealthAndWait + - Added operation VirtualNetworkGateways.beginGetFailoverAllTestDetails + - Added operation VirtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait + - Added operation VirtualNetworkGateways.beginGetFailoverSingleTestDetails + - Added operation VirtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait + - Added operation VirtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulation + - Added operation VirtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait + - Added operation VirtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulation + - Added operation VirtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait + - Added Interface CommonErrorAdditionalInfo + - Added Interface CommonErrorDetail + - Added Interface CommonErrorResponse + - Added Interface CommonProxyResource + - Added Interface CommonResource + - Added Interface CommonTrackedResource + - Added Interface ExpressRouteFailoverCircuitResourceDetails + - Added Interface ExpressRouteFailoverConnectionResourceDetails + - Added Interface ExpressRouteFailoverRedundantRoute + - Added Interface ExpressRouteFailoverSingleTestDetails + - Added Interface ExpressRouteFailoverStopApiParameters + - Added Interface ExpressRouteFailoverTestDetails + - Added Interface FailoverConnectionDetails + - Added Interface IntentContent + - Added Interface IpamPool + - Added Interface IpamPoolList + - Added Interface IpamPoolPrefixAllocation + - Added Interface IpamPoolProperties + - Added Interface IpamPoolsCreateHeaders + - Added Interface IpamPoolsCreateOptionalParams + - Added Interface IpamPoolsDeleteHeaders + - Added Interface IpamPoolsDeleteOptionalParams + - Added Interface IpamPoolsGetOptionalParams + - Added Interface IpamPoolsGetPoolUsageOptionalParams + - Added Interface IpamPoolsListAssociatedResourcesNextOptionalParams + - Added Interface IpamPoolsListAssociatedResourcesOptionalParams + - Added Interface IpamPoolsListNextOptionalParams + - Added Interface IpamPoolsListOptionalParams + - Added Interface IpamPoolsUpdateOptionalParams + - Added Interface IpamPoolUpdate + - Added Interface IpamPoolUpdateProperties + - Added Interface IPTraffic + - Added Interface LoadBalancerHealthPerRule + - Added Interface LoadBalancerHealthPerRulePerBackendAddress + - Added Interface LoadBalancerLoadBalancingRulesHealthHeaders + - Added Interface LoadBalancerLoadBalancingRulesHealthOptionalParams + - Added Interface PoolAssociation + - Added Interface PoolAssociationList + - Added Interface PoolUsage + - Added Interface ReachabilityAnalysisIntent + - Added Interface ReachabilityAnalysisIntentListResult + - Added Interface ReachabilityAnalysisIntentProperties + - Added Interface ReachabilityAnalysisIntentsCreateOptionalParams + - Added Interface ReachabilityAnalysisIntentsDeleteOptionalParams + - Added Interface ReachabilityAnalysisIntentsGetOptionalParams + - Added Interface ReachabilityAnalysisIntentsListNextOptionalParams + - Added Interface ReachabilityAnalysisIntentsListOptionalParams + - Added Interface ReachabilityAnalysisRun + - Added Interface ReachabilityAnalysisRunListResult + - Added Interface ReachabilityAnalysisRunProperties + - Added Interface ReachabilityAnalysisRunsCreateOptionalParams + - Added Interface ReachabilityAnalysisRunsDeleteHeaders + - Added Interface ReachabilityAnalysisRunsDeleteOptionalParams + - Added Interface ReachabilityAnalysisRunsGetOptionalParams + - Added Interface ReachabilityAnalysisRunsListNextOptionalParams + - Added Interface ReachabilityAnalysisRunsListOptionalParams + - Added Interface ResourceBasics + - Added Interface StaticCidr + - Added Interface StaticCidrList + - Added Interface StaticCidrProperties + - Added Interface StaticCidrsCreateOptionalParams + - Added Interface StaticCidrsDeleteHeaders + - Added Interface StaticCidrsDeleteOptionalParams + - Added Interface StaticCidrsGetOptionalParams + - Added Interface StaticCidrsListNextOptionalParams + - Added Interface StaticCidrsListOptionalParams + - Added Interface VerifierWorkspace + - Added Interface VerifierWorkspaceListResult + - Added Interface VerifierWorkspaceProperties + - Added Interface VerifierWorkspacesCreateOptionalParams + - Added Interface VerifierWorkspacesDeleteHeaders + - Added Interface VerifierWorkspacesDeleteOptionalParams + - Added Interface VerifierWorkspacesGetOptionalParams + - Added Interface VerifierWorkspacesListNextOptionalParams + - Added Interface VerifierWorkspacesListOptionalParams + - Added Interface VerifierWorkspacesUpdateOptionalParams + - Added Interface VerifierWorkspaceUpdate + - Added Interface VerifierWorkspaceUpdateProperties + - Added Interface VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders + - Added Interface VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams + - Added Interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders + - Added Interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams + - Added Interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders + - Added Interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams + - Added Interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders + - Added Interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams + - Added Type Alias AddressSpaceAggregationOption + - Added Type Alias FailoverConnectionStatus + - Added Type Alias FailoverTestStatus + - Added Type Alias FailoverTestStatusForSingleTest + - Added Type Alias FailoverTestType + - Added Type Alias IpamPoolsCreateResponse + - Added Type Alias IpamPoolsDeleteResponse + - Added Type Alias IpamPoolsGetPoolUsageResponse + - Added Type Alias IpamPoolsGetResponse + - Added Type Alias IpamPoolsListAssociatedResourcesNextResponse + - Added Type Alias IpamPoolsListAssociatedResourcesResponse + - Added Type Alias IpamPoolsListNextResponse + - Added Type Alias IpamPoolsListResponse + - Added Type Alias IpamPoolsUpdateResponse + - Added Type Alias IpType + - Added Type Alias LoadBalancerLoadBalancingRulesHealthResponse + - Added Type Alias NetworkProtocol + - Added Type Alias ReachabilityAnalysisIntentsCreateResponse + - Added Type Alias ReachabilityAnalysisIntentsGetResponse + - Added Type Alias ReachabilityAnalysisIntentsListNextResponse + - Added Type Alias ReachabilityAnalysisIntentsListResponse + - Added Type Alias ReachabilityAnalysisRunsCreateResponse + - Added Type Alias ReachabilityAnalysisRunsDeleteResponse + - Added Type Alias ReachabilityAnalysisRunsGetResponse + - Added Type Alias ReachabilityAnalysisRunsListNextResponse + - Added Type Alias ReachabilityAnalysisRunsListResponse + - Added Type Alias StaticCidrsCreateResponse + - Added Type Alias StaticCidrsDeleteResponse + - Added Type Alias StaticCidrsGetResponse + - Added Type Alias StaticCidrsListNextResponse + - Added Type Alias StaticCidrsListResponse + - Added Type Alias VerifierWorkspacesCreateResponse + - Added Type Alias VerifierWorkspacesDeleteResponse + - Added Type Alias VerifierWorkspacesGetResponse + - Added Type Alias VerifierWorkspacesListNextResponse + - Added Type Alias VerifierWorkspacesListResponse + - Added Type Alias VerifierWorkspacesUpdateResponse + - Added Type Alias VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse + - Added Type Alias VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse + - Added Type Alias VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse + - Added Type Alias VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse + - Interface AddressSpace has a new optional parameter ipamPoolPrefixAllocations + - Interface BastionHost has a new optional parameter enablePrivateOnlyBastion + - Interface NetworkInterface has a new optional parameter defaultOutboundConnectivityEnabled + - Interface SecurityAdminConfiguration has a new optional parameter networkGroupAddressSpaceAggregationOption + - Interface Subnet has a new optional parameter ipamPoolPrefixAllocations + - Added Enum KnownAddressSpaceAggregationOption + - Added Enum KnownFailoverConnectionStatus + - Added Enum KnownFailoverTestStatus + - Added Enum KnownFailoverTestStatusForSingleTest + - Added Enum KnownFailoverTestType + - Added Enum KnownIpType + - Added Enum KnownNetworkProtocol + - Enum KnownAddressPrefixType has a new value NetworkGroup + - Enum KnownProvisioningState has a new value Canceled + - Enum KnownProvisioningState has a new value Creating + + ## 33.4.0 (2024-09-13) ### Features Added diff --git a/sdk/network/arm-network/README.md b/sdk/network/arm-network/README.md index 95d886d781bd..cb034aaf3b20 100644 --- a/sdk/network/arm-network/README.md +++ b/sdk/network/arm-network/README.md @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure NetworkManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/network/arm-network/_meta.json b/sdk/network/arm-network/_meta.json index 3f7682334e50..12dafcc35e0d 100644 --- a/sdk/network/arm-network/_meta.json +++ b/sdk/network/arm-network/_meta.json @@ -1,8 +1,8 @@ { - "commit": "63aca1b0be7893ffe04891b25d1b4a00d7a22563", + "commit": "552b4dd311f90f4a7b2f7adf45461d7a8774a1cc", "readme": "specification/network/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\network\\resource-manager\\readme.md --use=@autorest/typescript@6.0.27 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\network\\resource-manager\\readme.md --use=@autorest/typescript@6.0.29 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.13", - "use": "@autorest/typescript@6.0.27" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@6.0.29" } \ No newline at end of file diff --git a/sdk/network/arm-network/assets.json b/sdk/network/arm-network/assets.json index 588c29fac221..9eda49a3c97f 100644 --- a/sdk/network/arm-network/assets.json +++ b/sdk/network/arm-network/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/network/arm-network", - "Tag": "js/network/arm-network_b175af42ae" + "Tag": "js/network/arm-network_1ea0dd4ad8" } diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index 67bbedcc473f..a5d26f590b1a 100644 --- a/sdk/network/arm-network/package.json +++ b/sdk/network/arm-network/package.json @@ -3,16 +3,16 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NetworkManagementClient.", - "version": "33.4.1", + "version": "33.5.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -28,19 +28,19 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-network.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.1.0", - "@azure-tools/test-recorder": "^3.0.0", + "typescript": "~5.7.2", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.7.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -68,28 +68,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, diff --git a/sdk/network/arm-network/review/arm-network.api.md b/sdk/network/arm-network/review/arm-network.api.md index de3bdcc391d8..bbd8b57a1c36 100644 --- a/sdk/network/arm-network/review/arm-network.api.md +++ b/sdk/network/arm-network/review/arm-network.api.md @@ -113,8 +113,12 @@ export type AddressPrefixType = string; // @public export interface AddressSpace { addressPrefixes?: string[]; + ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; } +// @public +export type AddressSpaceAggregationOption = string; + // @public export interface AdminRule extends BaseAdminRule { access?: SecurityConfigurationRuleAccess; @@ -2009,6 +2013,7 @@ export interface BastionHost extends Resource { enableFileCopy?: boolean; enableIpConnect?: boolean; enableKerberos?: boolean; + enablePrivateOnlyBastion?: boolean; enableSessionRecording?: boolean; enableShareableLink?: boolean; enableTunneling?: boolean; @@ -2284,6 +2289,46 @@ export interface CloudErrorBody { // @public export type CommissionedState = string; +// @public +export interface CommonErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface CommonErrorDetail { + readonly additionalInfo?: CommonErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: CommonErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface CommonErrorResponse { + error?: CommonErrorDetail; +} + +// @public +export interface CommonProxyResource extends CommonResource { +} + +// @public +export interface CommonResource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface CommonTrackedResource extends CommonResource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + // @public (undocumented) export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { readonly clientId?: string; @@ -4300,6 +4345,59 @@ export interface ExpressRouteCrossConnectionsUpdateTagsOptionalParams extends co // @public export type ExpressRouteCrossConnectionsUpdateTagsResponse = ExpressRouteCrossConnection; +// @public (undocumented) +export interface ExpressRouteFailoverCircuitResourceDetails { + connectionName?: string; + name?: string; + nrpResourceUri?: string; +} + +// @public (undocumented) +export interface ExpressRouteFailoverConnectionResourceDetails { + lastUpdatedTime?: string; + name?: string; + nrpResourceUri?: string; + status?: FailoverConnectionStatus; +} + +// @public (undocumented) +export interface ExpressRouteFailoverRedundantRoute { + peeringLocations?: string[]; + routes?: string[]; +} + +// @public +export interface ExpressRouteFailoverSingleTestDetails { + endTimeUtc?: string; + failoverConnectionDetails?: FailoverConnectionDetails[]; + nonRedundantRoutes?: string[]; + peeringLocation?: string; + redundantRoutes?: ExpressRouteFailoverRedundantRoute[]; + startTimeUtc?: string; + status?: FailoverTestStatusForSingleTest; + wasSimulationSuccessful?: boolean; +} + +// @public +export interface ExpressRouteFailoverStopApiParameters { + details?: FailoverConnectionDetails[]; + peeringLocation?: string; + wasSimulationSuccessful?: boolean; +} + +// @public +export interface ExpressRouteFailoverTestDetails { + circuits?: ExpressRouteFailoverCircuitResourceDetails[]; + connections?: ExpressRouteFailoverConnectionResourceDetails[]; + endTime?: string; + issues?: string[]; + peeringLocation?: string; + startTime?: string; + status?: FailoverTestStatus; + testGuid?: string; + testType?: FailoverTestType; +} + // @public export interface ExpressRouteGateway extends Resource { allowNonVirtualWanTraffic?: boolean; @@ -4776,6 +4874,25 @@ export interface ExtendedLocation { // @public export type ExtendedLocationTypes = string; +// @public (undocumented) +export interface FailoverConnectionDetails { + failoverConnectionName?: string; + failoverLocation?: string; + isVerified?: boolean; +} + +// @public +export type FailoverConnectionStatus = string; + +// @public +export type FailoverTestStatus = string; + +// @public +export type FailoverTestStatusForSingleTest = string; + +// @public +export type FailoverTestType = string; + // @public export interface FilterItems { field?: string; @@ -4975,7 +5092,7 @@ export interface FirewallPolicyHttpHeaderToInsert { export type FirewallPolicyIdpsQuerySortOrder = string; // @public -export type FirewallPolicyIdpsSignatureDirection = 0 | 1 | 2 | 3 | 4; +export type FirewallPolicyIdpsSignatureDirection = 0 | 1 | 2 | 3 | 4 | 5; // @public export type FirewallPolicyIdpsSignatureMode = 0 | 1 | 2; @@ -5899,6 +6016,15 @@ export type InboundSecurityRulesProtocol = string; // @public export type InboundSecurityRuleType = string; +// @public +export interface IntentContent { + // (undocumented) + description?: string; + destinationResourceId: string; + ipTraffic: IPTraffic; + sourceResourceId: string; +} + // @public export interface InternetIngressPublicIpsProperties { id?: string; @@ -6013,6 +6139,149 @@ export type IpAllocationsUpdateTagsResponse = IpAllocation; // @public export type IpAllocationType = string; +// @public +export interface IpamPool extends CommonTrackedResource { + properties: IpamPoolProperties; +} + +// @public +export interface IpamPoolList { + nextLink?: string; + // (undocumented) + value?: IpamPool[]; +} + +// @public +export interface IpamPoolPrefixAllocation { + readonly allocatedAddressPrefixes?: string[]; + id?: string; + numberOfIpAddresses?: string; +} + +// @public +export interface IpamPoolProperties { + addressPrefixes: string[]; + // (undocumented) + description?: string; + displayName?: string; + readonly ipAddressType?: IpType[]; + parentPoolName?: string; + provisioningState?: ProvisioningState; +} + +// @public +export interface IpamPools { + beginCreate(resourceGroupName: string, networkManagerName: string, poolName: string, body: IpamPool, options?: IpamPoolsCreateOptionalParams): Promise, IpamPoolsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, networkManagerName: string, poolName: string, body: IpamPool, options?: IpamPoolsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsDeleteOptionalParams): Promise, IpamPoolsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsDeleteOptionalParams): Promise; + get(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsGetOptionalParams): Promise; + getPoolUsage(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsGetPoolUsageOptionalParams): Promise; + list(resourceGroupName: string, networkManagerName: string, options?: IpamPoolsListOptionalParams): PagedAsyncIterableIterator; + listAssociatedResources(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsListAssociatedResourcesOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, networkManagerName: string, poolName: string, options?: IpamPoolsUpdateOptionalParams): Promise; +} + +// @public +export interface IpamPoolsCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface IpamPoolsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IpamPoolsCreateResponse = IpamPool; + +// @public +export interface IpamPoolsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface IpamPoolsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IpamPoolsDeleteResponse = IpamPoolsDeleteHeaders; + +// @public +export interface IpamPoolsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface IpamPoolsGetPoolUsageOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpamPoolsGetPoolUsageResponse = PoolUsage; + +// @public +export type IpamPoolsGetResponse = IpamPool; + +// @public +export interface IpamPoolsListAssociatedResourcesNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpamPoolsListAssociatedResourcesNextResponse = PoolAssociationList; + +// @public +export interface IpamPoolsListAssociatedResourcesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpamPoolsListAssociatedResourcesResponse = PoolAssociationList; + +// @public +export interface IpamPoolsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpamPoolsListNextResponse = IpamPoolList; + +// @public +export interface IpamPoolsListOptionalParams extends coreClient.OperationOptions { + skip?: number; + skipToken?: string; + sortKey?: string; + sortValue?: string; + top?: number; +} + +// @public +export type IpamPoolsListResponse = IpamPoolList; + +// @public +export interface IpamPoolsUpdateOptionalParams extends coreClient.OperationOptions { + body?: IpamPoolUpdate; +} + +// @public +export type IpamPoolsUpdateResponse = IpamPool; + +// @public +export interface IpamPoolUpdate { + properties?: IpamPoolUpdateProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface IpamPoolUpdateProperties { + // (undocumented) + description?: string; + displayName?: string; +} + // @public export interface IPConfiguration extends SubResource { readonly etag?: string; @@ -6163,6 +6432,19 @@ export interface IpTag { tag?: string; } +// @public +export interface IPTraffic { + destinationIps: string[]; + destinationPorts: string[]; + // (undocumented) + protocols: NetworkProtocol[]; + sourceIps: string[]; + sourcePorts: string[]; +} + +// @public +export type IpType = string; + // @public export interface Ipv6CircuitConnectionConfig { addressPrefix?: string; @@ -6208,9 +6490,16 @@ export enum KnownActionType { // @public export enum KnownAddressPrefixType { IPPrefix = "IPPrefix", + NetworkGroup = "NetworkGroup", ServiceTag = "ServiceTag" } +// @public +export enum KnownAddressSpaceAggregationOption { + Manual = "Manual", + None = "None" +} + // @public export enum KnownAdminRuleKind { Custom = "Custom", @@ -6860,6 +7149,45 @@ export enum KnownExtendedLocationTypes { EdgeZone = "EdgeZone" } +// @public +export enum KnownFailoverConnectionStatus { + Connected = "Connected", + Disconnected = "Disconnected" +} + +// @public +export enum KnownFailoverTestStatus { + Completed = "Completed", + Expired = "Expired", + Invalid = "Invalid", + NotStarted = "NotStarted", + Running = "Running", + StartFailed = "StartFailed", + Starting = "Starting", + StopFailed = "StopFailed", + Stopping = "Stopping" +} + +// @public +export enum KnownFailoverTestStatusForSingleTest { + Completed = "Completed", + Expired = "Expired", + Invalid = "Invalid", + NotStarted = "NotStarted", + Running = "Running", + StartFailed = "StartFailed", + Starting = "Starting", + StopFailed = "StopFailed", + Stopping = "Stopping" +} + +// @public +export enum KnownFailoverTestType { + All = "All", + MultiSiteFailover = "MultiSiteFailover", + SingleSiteFailover = "SingleSiteFailover" +} + // @public export enum KnownFirewallPolicyFilterRuleCollectionActionType { Allow = "Allow", @@ -7086,6 +7414,12 @@ export enum KnownIpsecIntegrity { SHA256 = "SHA256" } +// @public +export enum KnownIpType { + IPv4 = "IPv4", + IPv6 = "IPv6" +} + // @public export enum KnownIPVersion { IPv4 = "IPv4", @@ -7208,6 +7542,14 @@ export enum KnownNetworkOperationStatus { Succeeded = "Succeeded" } +// @public +export enum KnownNetworkProtocol { + Any = "Any", + Icmp = "ICMP", + TCP = "TCP", + UDP = "UDP" +} + // @public export enum KnownNextHopType { HyperNetGateway = "HyperNetGateway", @@ -7379,6 +7721,8 @@ export enum KnownProtocolType { // @public export enum KnownProvisioningState { + Canceled = "Canceled", + Creating = "Creating", Deleting = "Deleting", Failed = "Failed", Succeeded = "Succeeded", @@ -8185,6 +8529,21 @@ export interface LoadBalancerFrontendIPConfigurationsListOptionalParams extends // @public export type LoadBalancerFrontendIPConfigurationsListResponse = LoadBalancerFrontendIPConfigurationListResult; +// @public +export interface LoadBalancerHealthPerRule { + down?: number; + loadBalancerBackendAddresses?: LoadBalancerHealthPerRulePerBackendAddress[]; + up?: number; +} + +// @public +export interface LoadBalancerHealthPerRulePerBackendAddress { + ipAddress?: string; + networkInterfaceIPConfigurationId?: NetworkInterfaceIPConfiguration; + reason?: string; + state?: string; +} + // @public export interface LoadBalancerListResult { readonly nextLink?: string; @@ -8199,6 +8558,8 @@ export interface LoadBalancerLoadBalancingRuleListResult { // @public export interface LoadBalancerLoadBalancingRules { + beginHealth(groupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: LoadBalancerLoadBalancingRulesHealthOptionalParams): Promise, LoadBalancerLoadBalancingRulesHealthResponse>>; + beginHealthAndWait(groupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: LoadBalancerLoadBalancingRulesHealthOptionalParams): Promise; get(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: LoadBalancerLoadBalancingRulesGetOptionalParams): Promise; list(resourceGroupName: string, loadBalancerName: string, options?: LoadBalancerLoadBalancingRulesListOptionalParams): PagedAsyncIterableIterator; } @@ -8210,6 +8571,20 @@ export interface LoadBalancerLoadBalancingRulesGetOptionalParams extends coreCli // @public export type LoadBalancerLoadBalancingRulesGetResponse = LoadBalancingRule; +// @public +export interface LoadBalancerLoadBalancingRulesHealthHeaders { + location?: string; +} + +// @public +export interface LoadBalancerLoadBalancingRulesHealthOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LoadBalancerLoadBalancingRulesHealthResponse = LoadBalancerHealthPerRule; + // @public export interface LoadBalancerLoadBalancingRulesListNextOptionalParams extends coreClient.OperationOptions { } @@ -8946,6 +9321,7 @@ export interface NetworkIntentPolicyConfiguration { export interface NetworkInterface extends Resource { auxiliaryMode?: NetworkInterfaceAuxiliaryMode; auxiliarySku?: NetworkInterfaceAuxiliarySku; + readonly defaultOutboundConnectivityEnabled?: boolean; disableTcpStateTracking?: boolean; dnsSettings?: NetworkInterfaceDnsSettings; readonly dscpConfiguration?: SubResource; @@ -9469,6 +9845,8 @@ export class NetworkManagementClient extends coreClient.ServiceClient { // (undocumented) ipAllocations: IpAllocations; // (undocumented) + ipamPools: IpamPools; + // (undocumented) ipGroups: IpGroups; listActiveConnectivityConfigurations(resourceGroupName: string, networkManagerName: string, parameters: ActiveConfigurationParameter, options?: ListActiveConnectivityConfigurationsOptionalParams): Promise; listActiveSecurityAdminRules(resourceGroupName: string, networkManagerName: string, parameters: ActiveConfigurationParameter, options?: ListActiveSecurityAdminRulesOptionalParams): Promise; @@ -9545,6 +9923,10 @@ export class NetworkManagementClient extends coreClient.ServiceClient { // (undocumented) publicIPPrefixes: PublicIPPrefixes; // (undocumented) + reachabilityAnalysisIntents: ReachabilityAnalysisIntents; + // (undocumented) + reachabilityAnalysisRuns: ReachabilityAnalysisRuns; + // (undocumented) resourceNavigationLinks: ResourceNavigationLinks; // (undocumented) routeFilterRules: RouteFilterRules; @@ -9587,6 +9969,8 @@ export class NetworkManagementClient extends coreClient.ServiceClient { // (undocumented) serviceTags: ServiceTags; // (undocumented) + staticCidrs: StaticCidrs; + // (undocumented) staticMembers: StaticMembers; // (undocumented) subnets: Subnets; @@ -9598,6 +9982,8 @@ export class NetworkManagementClient extends coreClient.ServiceClient { // (undocumented) usages: Usages; // (undocumented) + verifierWorkspaces: VerifierWorkspaces; + // (undocumented) vipSwap: VipSwap; // (undocumented) virtualApplianceSites: VirtualApplianceSites; @@ -10017,6 +10403,9 @@ export interface NetworkProfilesUpdateTagsOptionalParams extends coreClient.Oper // @public export type NetworkProfilesUpdateTagsResponse = NetworkProfile; +// @public +export type NetworkProtocol = string; + // @public export interface NetworkRule extends FirewallPolicyRule { destinationAddresses?: string[]; @@ -11159,19 +11548,53 @@ export interface PolicySettingsLogScrubbing { } // @public -export type PreferredIPVersion = string; +export interface PoolAssociation { + readonly addressPrefixes?: string[]; + readonly createdAt?: Date; + // (undocumented) + description?: string; + readonly numberOfReservedIPAddresses?: string; + poolId?: string; + readonly reservationExpiresAt?: Date; + readonly reservedPrefixes?: string[]; + resourceId: string; + readonly totalNumberOfIPAddresses?: string; +} // @public -export type PreferredRoutingGateway = string; +export interface PoolAssociationList { + nextLink?: string; + // (undocumented) + value?: PoolAssociation[]; +} // @public -export interface PrepareNetworkPoliciesRequest { - networkIntentPolicyConfigurations?: NetworkIntentPolicyConfiguration[]; - serviceName?: string; +export interface PoolUsage { + readonly addressPrefixes?: string[]; + readonly allocatedAddressPrefixes?: string[]; + readonly availableAddressPrefixes?: string[]; + readonly childPools?: ResourceBasics[]; + readonly numberOfAllocatedIPAddresses?: string; + readonly numberOfAvailableIPAddresses?: string; + readonly numberOfReservedIPAddresses?: string; + readonly reservedAddressPrefixes?: string[]; + readonly totalNumberOfIPAddresses?: string; } // @public -export interface PrivateDnsZoneConfig { +export type PreferredIPVersion = string; + +// @public +export type PreferredRoutingGateway = string; + +// @public +export interface PrepareNetworkPoliciesRequest { + networkIntentPolicyConfigurations?: NetworkIntentPolicyConfiguration[]; + serviceName?: string; +} + +// @public +export interface PrivateDnsZoneConfig { name?: string; privateDnsZoneId?: string; readonly recordSets?: RecordSet[]; @@ -12024,6 +12447,150 @@ export interface RadiusServer { radiusServerSecret?: string; } +// @public +export interface ReachabilityAnalysisIntent extends CommonProxyResource { + properties: ReachabilityAnalysisIntentProperties; +} + +// @public +export interface ReachabilityAnalysisIntentListResult { + nextLink?: string; + value?: ReachabilityAnalysisIntent[]; +} + +// @public +export interface ReachabilityAnalysisIntentProperties { + // (undocumented) + description?: string; + destinationResourceId: string; + ipTraffic: IPTraffic; + provisioningState?: ProvisioningState; + sourceResourceId: string; +} + +// @public +export interface ReachabilityAnalysisIntents { + create(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisIntentName: string, body: ReachabilityAnalysisIntent, options?: ReachabilityAnalysisIntentsCreateOptionalParams): Promise; + delete(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisIntentName: string, options?: ReachabilityAnalysisIntentsDeleteOptionalParams): Promise; + get(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisIntentName: string, options?: ReachabilityAnalysisIntentsGetOptionalParams): Promise; + list(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: ReachabilityAnalysisIntentsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ReachabilityAnalysisIntentsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReachabilityAnalysisIntentsCreateResponse = ReachabilityAnalysisIntent; + +// @public +export interface ReachabilityAnalysisIntentsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ReachabilityAnalysisIntentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReachabilityAnalysisIntentsGetResponse = ReachabilityAnalysisIntent; + +// @public +export interface ReachabilityAnalysisIntentsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReachabilityAnalysisIntentsListNextResponse = ReachabilityAnalysisIntentListResult; + +// @public +export interface ReachabilityAnalysisIntentsListOptionalParams extends coreClient.OperationOptions { + skip?: number; + skipToken?: string; + sortKey?: string; + sortValue?: string; + top?: number; +} + +// @public +export type ReachabilityAnalysisIntentsListResponse = ReachabilityAnalysisIntentListResult; + +// @public +export interface ReachabilityAnalysisRun extends CommonProxyResource { + properties: ReachabilityAnalysisRunProperties; +} + +// @public +export interface ReachabilityAnalysisRunListResult { + nextLink?: string; + value?: ReachabilityAnalysisRun[]; +} + +// @public +export interface ReachabilityAnalysisRunProperties { + readonly analysisResult?: string; + // (undocumented) + description?: string; + readonly errorMessage?: string; + readonly intentContent?: IntentContent; + intentId: string; + provisioningState?: ProvisioningState; +} + +// @public +export interface ReachabilityAnalysisRuns { + beginDelete(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisRunName: string, options?: ReachabilityAnalysisRunsDeleteOptionalParams): Promise, ReachabilityAnalysisRunsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisRunName: string, options?: ReachabilityAnalysisRunsDeleteOptionalParams): Promise; + create(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisRunName: string, body: ReachabilityAnalysisRun, options?: ReachabilityAnalysisRunsCreateOptionalParams): Promise; + get(resourceGroupName: string, networkManagerName: string, workspaceName: string, reachabilityAnalysisRunName: string, options?: ReachabilityAnalysisRunsGetOptionalParams): Promise; + list(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: ReachabilityAnalysisRunsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ReachabilityAnalysisRunsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReachabilityAnalysisRunsCreateResponse = ReachabilityAnalysisRun; + +// @public +export interface ReachabilityAnalysisRunsDeleteHeaders { + location?: string; +} + +// @public +export interface ReachabilityAnalysisRunsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ReachabilityAnalysisRunsDeleteResponse = ReachabilityAnalysisRunsDeleteHeaders; + +// @public +export interface ReachabilityAnalysisRunsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReachabilityAnalysisRunsGetResponse = ReachabilityAnalysisRun; + +// @public +export interface ReachabilityAnalysisRunsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReachabilityAnalysisRunsListNextResponse = ReachabilityAnalysisRunListResult; + +// @public +export interface ReachabilityAnalysisRunsListOptionalParams extends coreClient.OperationOptions { + skip?: number; + skipToken?: string; + sortKey?: string; + sortValue?: string; + top?: number; +} + +// @public +export type ReachabilityAnalysisRunsListResponse = ReachabilityAnalysisRunListResult; + // @public export interface RecordSet { fqdn?: string; @@ -12053,6 +12620,12 @@ export interface Resource { readonly type?: string; } +// @public +export interface ResourceBasics { + addressPrefixes?: string[]; + resourceId?: string; +} + // @public export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "SystemAssigned, UserAssigned" | "None"; @@ -12781,6 +13354,7 @@ export type ScrubbingRuleEntryState = string; export interface SecurityAdminConfiguration extends ChildResource { applyOnNetworkIntentPolicyBasedServices?: NetworkIntentPolicyBasedService[]; description?: string; + networkGroupAddressSpaceAggregationOption?: AddressSpaceAggregationOption; readonly provisioningState?: ProvisioningState; readonly resourceGuid?: string; readonly systemData?: SystemData; @@ -13590,6 +14164,86 @@ export interface Sku { // @public export type SlotType = "Production" | "Staging"; +// @public +export interface StaticCidr extends CommonProxyResource { + properties?: StaticCidrProperties; +} + +// @public +export interface StaticCidrList { + nextLink?: string; + // (undocumented) + value?: StaticCidr[]; +} + +// @public +export interface StaticCidrProperties { + addressPrefixes?: string[]; + // (undocumented) + description?: string; + numberOfIPAddressesToAllocate?: string; + provisioningState?: ProvisioningState; + readonly totalNumberOfIPAddresses?: string; +} + +// @public +export interface StaticCidrs { + beginDelete(resourceGroupName: string, networkManagerName: string, poolName: string, staticCidrName: string, options?: StaticCidrsDeleteOptionalParams): Promise, StaticCidrsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, poolName: string, staticCidrName: string, options?: StaticCidrsDeleteOptionalParams): Promise; + create(resourceGroupName: string, networkManagerName: string, poolName: string, staticCidrName: string, options?: StaticCidrsCreateOptionalParams): Promise; + get(resourceGroupName: string, networkManagerName: string, poolName: string, staticCidrName: string, options?: StaticCidrsGetOptionalParams): Promise; + list(resourceGroupName: string, networkManagerName: string, poolName: string, options?: StaticCidrsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface StaticCidrsCreateOptionalParams extends coreClient.OperationOptions { + body?: StaticCidr; +} + +// @public +export type StaticCidrsCreateResponse = StaticCidr; + +// @public +export interface StaticCidrsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface StaticCidrsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type StaticCidrsDeleteResponse = StaticCidrsDeleteHeaders; + +// @public +export interface StaticCidrsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StaticCidrsGetResponse = StaticCidr; + +// @public +export interface StaticCidrsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StaticCidrsListNextResponse = StaticCidrList; + +// @public +export interface StaticCidrsListOptionalParams extends coreClient.OperationOptions { + skip?: number; + skipToken?: string; + sortKey?: string; + sortValue?: string; + top?: number; +} + +// @public +export type StaticCidrsListResponse = StaticCidrList; + // @public export interface StaticMember extends ChildResource { readonly provisioningState?: ProvisioningState; @@ -13668,6 +14322,7 @@ export interface Subnet extends SubResource { delegations?: Delegation[]; readonly etag?: string; ipAllocations?: SubResource[]; + ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; readonly ipConfigurationProfiles?: IPConfigurationProfile[]; readonly ipConfigurations?: IPConfiguration[]; name?: string; @@ -14027,6 +14682,103 @@ export interface VerificationIPFlowResult { ruleName?: string; } +// @public +export interface VerifierWorkspace extends CommonTrackedResource { + properties?: VerifierWorkspaceProperties; +} + +// @public +export interface VerifierWorkspaceListResult { + nextLink?: string; + value?: VerifierWorkspace[]; +} + +// @public +export interface VerifierWorkspaceProperties { + // (undocumented) + description?: string; + provisioningState?: ProvisioningState; +} + +// @public +export interface VerifierWorkspaces { + beginDelete(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: VerifierWorkspacesDeleteOptionalParams): Promise, VerifierWorkspacesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: VerifierWorkspacesDeleteOptionalParams): Promise; + create(resourceGroupName: string, networkManagerName: string, workspaceName: string, body: VerifierWorkspace, options?: VerifierWorkspacesCreateOptionalParams): Promise; + get(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: VerifierWorkspacesGetOptionalParams): Promise; + list(resourceGroupName: string, networkManagerName: string, options?: VerifierWorkspacesListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, networkManagerName: string, workspaceName: string, options?: VerifierWorkspacesUpdateOptionalParams): Promise; +} + +// @public +export interface VerifierWorkspacesCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VerifierWorkspacesCreateResponse = VerifierWorkspace; + +// @public +export interface VerifierWorkspacesDeleteHeaders { + location?: string; +} + +// @public +export interface VerifierWorkspacesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VerifierWorkspacesDeleteResponse = VerifierWorkspacesDeleteHeaders; + +// @public +export interface VerifierWorkspacesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VerifierWorkspacesGetResponse = VerifierWorkspace; + +// @public +export interface VerifierWorkspacesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VerifierWorkspacesListNextResponse = VerifierWorkspaceListResult; + +// @public +export interface VerifierWorkspacesListOptionalParams extends coreClient.OperationOptions { + skip?: number; + skipToken?: string; + sortKey?: string; + sortValue?: string; + top?: number; +} + +// @public +export type VerifierWorkspacesListResponse = VerifierWorkspaceListResult; + +// @public +export interface VerifierWorkspacesUpdateOptionalParams extends coreClient.OperationOptions { + body?: VerifierWorkspaceUpdate; +} + +// @public +export type VerifierWorkspacesUpdateResponse = VerifierWorkspace; + +// @public +export interface VerifierWorkspaceUpdate { + properties?: VerifierWorkspaceUpdateProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface VerifierWorkspaceUpdateProperties { + // (undocumented) + description?: string; +} + // @public export interface VipSwap { beginCreate(groupName: string, resourceName: string, parameters: SwapResource, options?: VipSwapCreateOptionalParams): Promise, void>>; @@ -14949,6 +15701,10 @@ export interface VirtualNetworkGateways { beginGetAdvertisedRoutesAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, peer: string, options?: VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams): Promise; beginGetBgpPeerStatus(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams): Promise, VirtualNetworkGatewaysGetBgpPeerStatusResponse>>; beginGetBgpPeerStatusAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams): Promise; + beginGetFailoverAllTestDetails(resourceGroupName: string, virtualNetworkGatewayName: string, typeParam: string, fetchLatest: boolean, options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams): Promise, VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse>>; + beginGetFailoverAllTestDetailsAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, typeParam: string, fetchLatest: boolean, options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams): Promise; + beginGetFailoverSingleTestDetails(resourceGroupName: string, virtualNetworkGatewayName: string, peeringLocation: string, failoverTestId: string, options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams): Promise, VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse>>; + beginGetFailoverSingleTestDetailsAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, peeringLocation: string, failoverTestId: string, options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams): Promise; beginGetLearnedRoutes(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams): Promise, VirtualNetworkGatewaysGetLearnedRoutesResponse>>; beginGetLearnedRoutesAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetLearnedRoutesOptionalParams): Promise; beginGetVpnclientConnectionHealth(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams): Promise, VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse>>; @@ -14963,8 +15719,12 @@ export interface VirtualNetworkGateways { beginResetVpnClientSharedKeyAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams): Promise; beginSetVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: VpnClientIPsecParameters, options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams): Promise, VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse>>; beginSetVpnclientIpsecParametersAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: VpnClientIPsecParameters, options?: VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams): Promise; + beginStartExpressRouteSiteFailoverSimulation(resourceGroupName: string, virtualNetworkGatewayName: string, peeringLocation: string, options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams): Promise, VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse>>; + beginStartExpressRouteSiteFailoverSimulationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, peeringLocation: string, options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams): Promise; beginStartPacketCapture(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams): Promise, VirtualNetworkGatewaysStartPacketCaptureResponse>>; beginStartPacketCaptureAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, options?: VirtualNetworkGatewaysStartPacketCaptureOptionalParams): Promise; + beginStopExpressRouteSiteFailoverSimulation(resourceGroupName: string, virtualNetworkGatewayName: string, stopParameters: ExpressRouteFailoverStopApiParameters, options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams): Promise, VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse>>; + beginStopExpressRouteSiteFailoverSimulationAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, stopParameters: ExpressRouteFailoverStopApiParameters, options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams): Promise; beginStopPacketCapture(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VpnPacketCaptureStopParameters, options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams): Promise, VirtualNetworkGatewaysStopPacketCaptureResponse>>; beginStopPacketCaptureAndWait(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: VpnPacketCaptureStopParameters, options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams): Promise; beginUpdateTags(resourceGroupName: string, virtualNetworkGatewayName: string, parameters: TagsObject, options?: VirtualNetworkGatewaysUpdateTagsOptionalParams): Promise, VirtualNetworkGatewaysUpdateTagsResponse>>; @@ -15038,6 +15798,36 @@ export interface VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams extends co // @public export type VirtualNetworkGatewaysGetBgpPeerStatusResponse = BgpPeerStatusListResult; +// @public +export interface VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse = ExpressRouteFailoverTestDetails[]; + +// @public +export interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse = ExpressRouteFailoverSingleTestDetails[]; + // @public export interface VirtualNetworkGatewaysGetLearnedRoutesOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -15149,6 +15939,23 @@ export interface VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams // @public export type VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse = VpnClientIPsecParameters; +// @public +export interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse = { + body: string; +}; + // @public export interface VirtualNetworkGatewaysStartPacketCaptureOptionalParams extends coreClient.OperationOptions { parameters?: VpnPacketCaptureStartParameters; @@ -15161,6 +15968,23 @@ export type VirtualNetworkGatewaysStartPacketCaptureResponse = { body: string; }; +// @public +export interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse = { + body: string; +}; + // @public export interface VirtualNetworkGatewaysStopPacketCaptureOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; diff --git a/sdk/network/arm-network/sample.env b/sdk/network/arm-network/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/network/arm-network/sample.env +++ b/sdk/network/arm-network/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/network/arm-network/samples-dev/adminRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/adminRuleCollectionsCreateOrUpdateSample.ts index f88cfe54fc2c..a374c24f723e 100644 --- a/sdk/network/arm-network/samples-dev/adminRuleCollectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRuleCollectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an admin rule collection. * * @summary Creates or updates an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionPut.json */ async function createOrUpdateAnAdminRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/adminRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/adminRuleCollectionsDeleteSample.ts index 88454fe88769..8cbacf505a89 100644 --- a/sdk/network/arm-network/samples-dev/adminRuleCollectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRuleCollectionsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes an admin rule collection. * * @summary Deletes an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json */ async function deletesAnAdminRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/adminRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples-dev/adminRuleCollectionsGetSample.ts index f2374405414d..7de90fc0992d 100644 --- a/sdk/network/arm-network/samples-dev/adminRuleCollectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRuleCollectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager security admin configuration rule collection. * * @summary Gets a network manager security admin configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionGet.json */ async function getsSecurityAdminRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/adminRuleCollectionsListSample.ts b/sdk/network/arm-network/samples-dev/adminRuleCollectionsListSample.ts index 3edce3db9bbc..03c9539a1ad8 100644 --- a/sdk/network/arm-network/samples-dev/adminRuleCollectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRuleCollectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the rule collections in a security admin configuration, in a paginated format. * * @summary Lists all the rule collections in a security admin configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionList.json */ async function listSecurityAdminRuleCollections() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/adminRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/adminRulesCreateOrUpdateSample.ts index b989eb4d2bd9..d077e3a6de64 100644 --- a/sdk/network/arm-network/samples-dev/adminRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRulesCreateOrUpdateSample.ts @@ -8,11 +8,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - DefaultAdminRule, - AdminRule, - NetworkManagementClient, -} from "@azure/arm-network"; +import { AdminRule, NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -22,9 +18,9 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an admin rule. * * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json */ -async function createADefaultAdminRule() { +async function createAAdminRuleWithNetworkGroupAsSourceOrDestination() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -32,10 +28,24 @@ async function createADefaultAdminRule() { const networkManagerName = "testNetworkManager"; const configurationName = "myTestSecurityConfig"; const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleDefaultAdminRule"; - const adminRule: DefaultAdminRule = { - flag: "AllowVnetInbound", - kind: "Default", + const ruleName = "SampleAdminRule"; + const adminRule: AdminRule = { + description: "This is Sample Admin Rule", + access: "Deny", + destinationPortRanges: ["22"], + destinations: [ + { + addressPrefix: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", + addressPrefixType: "NetworkGroup", + }, + ], + direction: "Inbound", + kind: "Custom", + priority: 1, + sourcePortRanges: ["0-65535"], + sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], + protocol: "Tcp", }; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential, subscriptionId); @@ -54,7 +64,7 @@ async function createADefaultAdminRule() { * This sample demonstrates how to Creates or updates an admin rule. * * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut.json */ async function createAnAdminRule() { const subscriptionId = @@ -91,7 +101,7 @@ async function createAnAdminRule() { } async function main() { - createADefaultAdminRule(); + createAAdminRuleWithNetworkGroupAsSourceOrDestination(); createAnAdminRule(); } diff --git a/sdk/network/arm-network/samples-dev/adminRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/adminRulesDeleteSample.ts index 0d59a57304dd..a28740b07a2e 100644 --- a/sdk/network/arm-network/samples-dev/adminRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRulesDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes an admin rule. * * @summary Deletes an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleDelete.json */ async function deletesAnAdminRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/adminRulesGetSample.ts b/sdk/network/arm-network/samples-dev/adminRulesGetSample.ts index cccd696298e7..8a452898236f 100644 --- a/sdk/network/arm-network/samples-dev/adminRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager security configuration admin rule. * * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleGet.json */ async function getsSecurityAdminRule() { const subscriptionId = @@ -45,7 +45,7 @@ async function getsSecurityAdminRule() { * This sample demonstrates how to Gets a network manager security configuration admin rule. * * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDefaultAdminRuleGet.json */ async function getsSecurityDefaultAdminRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/adminRulesListSample.ts b/sdk/network/arm-network/samples-dev/adminRulesListSample.ts index 4afce7759e27..50b24b7b3db3 100644 --- a/sdk/network/arm-network/samples-dev/adminRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/adminRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network manager security configuration admin rules. * * @summary List all network manager security configuration admin rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleList.json */ async function listSecurityAdminRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts index a62a3679ef34..b8c26b4dc50e 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private endpoint connection on application gateway. * * @summary Deletes the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json */ async function deleteApplicationGatewayPrivateEndpointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsGetSample.ts index f297fd014601..9dceb4adcd30 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private endpoint connection on application gateway. * * @summary Gets the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json */ async function getApplicationGatewayPrivateEndpointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsListSample.ts index 2dcd64afef9e..ff2f993a03db 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all private endpoint connections on an application gateway. * * @summary Lists all private endpoint connections on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json */ async function listsAllPrivateEndpointConnectionsOnApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts index 5dcc656981e5..6245487f3745 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the specified private endpoint connection on application gateway. * * @summary Updates the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json */ async function updateApplicationGatewayPrivateEndpointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateLinkResourcesListSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateLinkResourcesListSample.ts index 05d9fbb510c6..6a53bf8a2b24 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayPrivateLinkResourcesListSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayPrivateLinkResourcesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all private link resources on an application gateway. * * @summary Lists all private link resources on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json */ async function listsAllPrivateLinkResourcesOnApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsDefaultGetSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsDefaultGetSample.ts index ec6038132e90..b16b0ef815f6 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsDefaultGetSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsDefaultGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the regional application gateway waf manifest. * * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json */ async function getsWafDefaultManifest() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsGetSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsGetSample.ts index fe0b56bb5184..73f29fae1181 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewayWafDynamicManifestsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the regional application gateway waf manifest. * * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifests.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifests.json */ async function getsWafManifests() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthOnDemandSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthOnDemandSample.ts index 6f7e224017b4..6d54e6385220 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthOnDemandSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthOnDemandSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. * * @summary Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthTest.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthTest.json */ async function testBackendHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthSample.ts index 5cf5617b1915..4a480acd5219 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysBackendHealthSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the backend health of the specified application gateway in a resource group. * * @summary Gets the backend health of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthGet.json */ async function getBackendHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysCreateOrUpdateSample.ts index 22e5acda46c8..11abeb106128 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified application gateway. * * @summary Creates or updates the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayCreate.json */ async function createApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysDeleteSample.ts index 1ffd0c3c9f9f..852eaf3ab19b 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified application gateway. * * @summary Deletes the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayDelete.json */ async function deleteApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysGetSample.ts index 7c58c6ca1b63..97d56869751e 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified application gateway. * * @summary Gets the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayGet.json */ async function getApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysGetSslPredefinedPolicySample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysGetSslPredefinedPolicySample.ts index ceffe93bd160..69825191c477 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysGetSslPredefinedPolicySample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysGetSslPredefinedPolicySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets Ssl predefined policy with the specified policy name. * * @summary Gets Ssl predefined policy with the specified policy name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json */ async function getAvailableSslPredefinedPolicyByName() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAllSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAllSample.ts index bd2ec139f7b7..bc1f1cdfda27 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the application gateways in a subscription. * * @summary Gets all the application gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayListAll.json */ async function listsAllApplicationGatewaysInASubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableRequestHeadersSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableRequestHeadersSample.ts index 8add1702fd68..96de22aec2a4 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableRequestHeadersSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableRequestHeadersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all available request headers. * * @summary Lists all available request headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json */ async function getAvailableRequestHeaders() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableResponseHeadersSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableResponseHeadersSample.ts index 2185e9885fdc..497925ea1db2 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableResponseHeadersSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableResponseHeadersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all available response headers. * * @summary Lists all available response headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json */ async function getAvailableResponseHeaders() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableServerVariablesSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableServerVariablesSample.ts index 23dac863eb98..834f479dece1 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableServerVariablesSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableServerVariablesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all available server variables. * * @summary Lists all available server variables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json */ async function getAvailableServerVariables() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslOptionsSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslOptionsSample.ts index 9c1c260d0c20..729cdbe92c82 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslOptionsSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslOptionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists available Ssl options for configuring Ssl policy. * * @summary Lists available Ssl options for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json */ async function getAvailableSslOptions() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts index ba53081524f9..356e9e77150c 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all SSL predefined policies for configuring Ssl policy. * * @summary Lists all SSL predefined policies for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json */ async function getAvailableSslPredefinedPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableWafRuleSetsSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableWafRuleSetsSample.ts index 5583f575c262..4250801911a2 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableWafRuleSetsSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListAvailableWafRuleSetsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all available web application firewall rule sets. * * @summary Lists all available web application firewall rule sets. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json */ async function getAvailableWafRuleSets() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysListSample.ts index c9314b1c5f77..4c7adf9f24e7 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all application gateways in a resource group. * * @summary Lists all application gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayList.json */ async function listsAllApplicationGatewaysInAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysStartSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysStartSample.ts index ec3da2a7c375..82b4687b5906 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysStartSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysStartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Starts the specified application gateway. * * @summary Starts the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStart.json */ async function startApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysStopSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysStopSample.ts index 71aad04963dc..d74643ada109 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysStopSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Stops the specified application gateway in a resource group. * * @summary Stops the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStop.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStop.json */ async function stopApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/applicationGatewaysUpdateTagsSample.ts index d2f20dc92568..b806a29eb05f 100644 --- a/sdk/network/arm-network/samples-dev/applicationGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates the specified application gateway tags. * * @summary Updates the specified application gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayUpdateTags.json */ async function updateApplicationGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsCreateOrUpdateSample.ts index 10f2adce189f..a91fcded23c9 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an application security group. * * @summary Creates or updates an application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupCreate.json */ async function createApplicationSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsDeleteSample.ts index ec1249ac29e6..92b47f73936d 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified application security group. * * @summary Deletes the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupDelete.json */ async function deleteApplicationSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsGetSample.ts index c31efe779a76..7699acd1b53f 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified application security group. * * @summary Gets information about the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupGet.json */ async function getApplicationSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListAllSample.ts index 9a047befdd0a..52ef72132b9d 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all application security groups in a subscription. * * @summary Gets all application security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupListAll.json */ async function listAllApplicationSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListSample.ts index 402a5d7e4d6e..05b6394de981 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the application security groups in a resource group. * * @summary Gets all the application security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupList.json */ async function listLoadBalancersInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsUpdateTagsSample.ts index e1a997b760aa..bde5f82d9a4d 100644 --- a/sdk/network/arm-network/samples-dev/applicationSecurityGroupsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/applicationSecurityGroupsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates an application security group's tags. * * @summary Updates an application security group's tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupUpdateTags.json */ async function updateApplicationSecurityGroupTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/availableDelegationsListSample.ts b/sdk/network/arm-network/samples-dev/availableDelegationsListSample.ts index 9b09eac6e368..328180d61b6c 100644 --- a/sdk/network/arm-network/samples-dev/availableDelegationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/availableDelegationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all of the available subnet delegations for this subscription in this region. * * @summary Gets all of the available subnet delegations for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsSubscriptionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsSubscriptionGet.json */ async function getAvailableDelegations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/availableEndpointServicesListSample.ts b/sdk/network/arm-network/samples-dev/availableEndpointServicesListSample.ts index 4e099c1c0ab1..85f7db7d235f 100644 --- a/sdk/network/arm-network/samples-dev/availableEndpointServicesListSample.ts +++ b/sdk/network/arm-network/samples-dev/availableEndpointServicesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List what values of endpoint services are available for use. * * @summary List what values of endpoint services are available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EndpointServicesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EndpointServicesList.json */ async function endpointServicesList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListByResourceGroupSample.ts index 61fa90eec1e0..deea9dbb6f8e 100644 --- a/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. * * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json */ async function getAvailablePrivateEndpointTypesInTheResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListSample.ts b/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListSample.ts index ca9ace55d9fd..a5b30ee398a4 100644 --- a/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListSample.ts +++ b/sdk/network/arm-network/samples-dev/availablePrivateEndpointTypesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. * * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesGet.json */ async function getAvailablePrivateEndpointTypes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/availableResourceGroupDelegationsListSample.ts b/sdk/network/arm-network/samples-dev/availableResourceGroupDelegationsListSample.ts index cb8c1350328e..65fe67a30395 100644 --- a/sdk/network/arm-network/samples-dev/availableResourceGroupDelegationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/availableResourceGroupDelegationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all of the available subnet delegations for this resource group in this region. * * @summary Gets all of the available subnet delegations for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsResourceGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsResourceGroupGet.json */ async function getAvailableDelegationsInTheResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/availableServiceAliasesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/availableServiceAliasesListByResourceGroupSample.ts index 2c8a6158bab9..3deb4b25c7c2 100644 --- a/sdk/network/arm-network/samples-dev/availableServiceAliasesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/availableServiceAliasesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all available service aliases for this resource group in this region. * * @summary Gets all available service aliases for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesListByResourceGroup.json */ async function getAvailableServiceAliasesInTheResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/availableServiceAliasesListSample.ts b/sdk/network/arm-network/samples-dev/availableServiceAliasesListSample.ts index d1bc3d55dd22..31b13c8cb50c 100644 --- a/sdk/network/arm-network/samples-dev/availableServiceAliasesListSample.ts +++ b/sdk/network/arm-network/samples-dev/availableServiceAliasesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all available service aliases for this subscription in this region. * * @summary Gets all available service aliases for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesList.json */ async function getAvailableServiceAliases() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/azureFirewallFqdnTagsListAllSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallFqdnTagsListAllSample.ts index 1a29fc12381a..a6bf88d18106 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallFqdnTagsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallFqdnTagsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Azure Firewall FQDN Tags in a subscription. * * @summary Gets all the Azure Firewall FQDN Tags in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json */ async function listAllAzureFirewallFqdnTagsForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsCreateOrUpdateSample.ts index 0be00cc5ed87..f84bf7e444f4 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPut.json */ async function createAzureFirewall() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -133,7 +133,7 @@ async function createAzureFirewall() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithAdditionalProperties.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithAdditionalProperties.json */ async function createAzureFirewallWithAdditionalProperties() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -250,7 +250,7 @@ async function createAzureFirewallWithAdditionalProperties() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithIpGroups.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithIpGroups.json */ async function createAzureFirewallWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -365,7 +365,7 @@ async function createAzureFirewallWithIPGroups() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithZones.json */ async function createAzureFirewallWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -480,7 +480,7 @@ async function createAzureFirewallWithZones() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithMgmtSubnet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithMgmtSubnet.json */ async function createAzureFirewallWithManagementSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -604,7 +604,7 @@ async function createAzureFirewallWithManagementSubnet() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutInHub.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutInHub.json */ async function createAzureFirewallInVirtualHub() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsDeleteSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsDeleteSample.ts index 7caf7ff9407a..d52bf110a3c8 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Azure Firewall. * * @summary Deletes the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallDelete.json */ async function deleteAzureFirewall() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsGetSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsGetSample.ts index 1d6e47aba3d1..1884ac25bc3e 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGet.json */ async function getAzureFirewall() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getAzureFirewall() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithAdditionalProperties.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithAdditionalProperties.json */ async function getAzureFirewallWithAdditionalProperties() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -56,7 +56,7 @@ async function getAzureFirewallWithAdditionalProperties() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithIpGroups.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithIpGroups.json */ async function getAzureFirewallWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -75,7 +75,7 @@ async function getAzureFirewallWithIPGroups() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithZones.json */ async function getAzureFirewallWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -94,7 +94,7 @@ async function getAzureFirewallWithZones() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithMgmtSubnet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithMgmtSubnet.json */ async function getAzureFirewallWithManagementSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsListAllSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsListAllSample.ts index 42a857d76759..0322245d89d3 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Azure Firewalls in a subscription. * * @summary Gets all the Azure Firewalls in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListBySubscription.json */ async function listAllAzureFirewallsForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsListLearnedPrefixesSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsListLearnedPrefixesSample.ts index 6262cdf2586a..9da63ea61a7f 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsListLearnedPrefixesSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsListLearnedPrefixesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. * * @summary Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListLearnedIPPrefixes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListLearnedIPPrefixes.json */ async function azureFirewallListLearnedPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsListSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsListSample.ts index 7d64832f3684..e3fc9ec8a2f6 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsListSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Azure Firewalls in a resource group. * * @summary Lists all Azure Firewalls in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListByResourceGroup.json */ async function listAllAzureFirewallsForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureSample.ts index 6c79da502671..8df812ef7fb5 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsPacketCaptureSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Runs a packet capture on AzureFirewall. * * @summary Runs a packet capture on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPacketCapture.json */ async function azureFirewallPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/azureFirewallsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/azureFirewallsUpdateTagsSample.ts index 1ec9f02385f3..c0fa88ce0abd 100644 --- a/sdk/network/arm-network/samples-dev/azureFirewallsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/azureFirewallsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of an Azure Firewall resource. * * @summary Updates tags of an Azure Firewall resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallUpdateTags.json */ async function updateAzureFirewallTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/bastionHostsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsCreateOrUpdateSample.ts index eb76235e5629..0ba3126e50bb 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Bastion Host. * * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPut.json */ async function createBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -51,7 +51,38 @@ async function createBastionHost() { * This sample demonstrates how to Creates or updates the specified Bastion Host. * * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPutWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPutWithPrivateOnly.json + */ +async function createBastionHostWithPrivateOnly() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const bastionHostName = "bastionhosttenant"; + const parameters: BastionHost = { + enablePrivateOnlyBastion: true, + ipConfigurations: [ + { + name: "bastionHostIpConfiguration", + subnet: { + id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", + }, + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.beginCreateOrUpdateAndWait( + resourceGroupName, + bastionHostName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates the specified Bastion Host. + * + * @summary Creates or updates the specified Bastion Host. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPutWithZones.json */ async function createBastionHostWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -84,7 +115,7 @@ async function createBastionHostWithZones() { * This sample demonstrates how to Creates or updates the specified Bastion Host. * * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperPut.json */ async function createDeveloperBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -109,6 +140,7 @@ async function createDeveloperBastionHost() { async function main() { createBastionHost(); + createBastionHostWithPrivateOnly(); createBastionHostWithZones(); createDeveloperBastionHost(); } diff --git a/sdk/network/arm-network/samples-dev/bastionHostsDeleteSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsDeleteSample.ts index 383ecbba188f..3c2b873984d9 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Bastion Host. * * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDelete.json */ async function deleteBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function deleteBastionHost() { * This sample demonstrates how to Deletes the specified Bastion Host. * * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperDelete.json */ async function deleteDeveloperBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/bastionHostsGetSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsGetSample.ts index eeede730a949..f9caa26dbbed 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Bastion Host. * * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGet.json */ async function getBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,12 +37,31 @@ async function getBastionHost() { * This sample demonstrates how to Gets the specified Bastion Host. * * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGetWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithPrivateOnly.json + */ +async function getBastionHostWithPrivateOnly() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const bastionHostName = "bastionhosttenant"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.get( + resourceGroupName, + bastionHostName, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Gets the specified Bastion Host. + * + * @summary Gets the specified Bastion Host. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithZones.json */ async function getBastionHostWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant'"; + const bastionHostName = "bastionhosttenant"; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.bastionHosts.get( @@ -56,7 +75,7 @@ async function getBastionHostWithZones() { * This sample demonstrates how to Gets the specified Bastion Host. * * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperGet.json */ async function getDeveloperBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -73,6 +92,7 @@ async function getDeveloperBastionHost() { async function main() { getBastionHost(); + getBastionHostWithPrivateOnly(); getBastionHostWithZones(); getDeveloperBastionHost(); } diff --git a/sdk/network/arm-network/samples-dev/bastionHostsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsListByResourceGroupSample.ts index a149716fc4cf..13226e0217c6 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Bastion Hosts in a resource group. * * @summary Lists all Bastion Hosts in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListByResourceGroup.json */ async function listAllBastionHostsForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/bastionHostsListSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsListSample.ts index 4b1ab00ebb4d..20303e5a98b8 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsListSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Bastion Hosts in a subscription. * * @summary Lists all Bastion Hosts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListBySubscription.json */ async function listAllBastionHostsForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/bastionHostsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/bastionHostsUpdateTagsSample.ts index f754740aa2c5..333d1d6b74fb 100644 --- a/sdk/network/arm-network/samples-dev/bastionHostsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/bastionHostsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates Tags for BastionHost resource * * @summary Updates Tags for BastionHost resource - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPatch.json */ async function patchBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/bgpServiceCommunitiesListSample.ts b/sdk/network/arm-network/samples-dev/bgpServiceCommunitiesListSample.ts index b6dc24c1efa8..f4d8db541383 100644 --- a/sdk/network/arm-network/samples-dev/bgpServiceCommunitiesListSample.ts +++ b/sdk/network/arm-network/samples-dev/bgpServiceCommunitiesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the available bgp service communities. * * @summary Gets all the available bgp service communities. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceCommunityList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceCommunityList.json */ async function serviceCommunityList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/checkDnsNameAvailabilitySample.ts b/sdk/network/arm-network/samples-dev/checkDnsNameAvailabilitySample.ts index d71aa66809da..6cf25f7bca7d 100644 --- a/sdk/network/arm-network/samples-dev/checkDnsNameAvailabilitySample.ts +++ b/sdk/network/arm-network/samples-dev/checkDnsNameAvailabilitySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether a domain name in the cloudapp.azure.com zone is available for use. * * @summary Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckDnsNameAvailability.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckDnsNameAvailability.json */ async function checkDnsNameAvailability() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsCreateOrUpdateSample.ts index 4879d40a560f..8555ab6bb908 100644 --- a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. * * @summary Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupPut.json */ async function configurationPolicyGroupPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsDeleteSample.ts index 797405a8b12c..eaf6b0940003 100644 --- a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a ConfigurationPolicyGroup. * * @summary Deletes a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupDelete.json */ async function configurationPolicyGroupDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsGetSample.ts index bb3be373dd06..6a825df8cc4e 100644 --- a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a ConfigurationPolicyGroup. * * @summary Retrieves the details of a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupGet.json */ async function configurationPolicyGroupGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsListByVpnServerConfigurationSample.ts b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsListByVpnServerConfigurationSample.ts index 6147ee994cb8..24178755395c 100644 --- a/sdk/network/arm-network/samples-dev/configurationPolicyGroupsListByVpnServerConfigurationSample.ts +++ b/sdk/network/arm-network/samples-dev/configurationPolicyGroupsListByVpnServerConfigurationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. * * @summary Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json */ async function configurationPolicyGroupListByVpnServerConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsCreateOrUpdateSample.ts index 8889877c0333..53962aca52c5 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a connection monitor. * * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreate.json */ async function createConnectionMonitorV1() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -67,7 +67,7 @@ async function createConnectionMonitorV1() { * This sample demonstrates how to Create or update a connection monitor. * * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorV2Create.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorV2Create.json */ async function createConnectionMonitorV2() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -127,7 +127,7 @@ async function createConnectionMonitorV2() { * This sample demonstrates how to Create or update a connection monitor. * * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json */ async function createConnectionMonitorWithArcNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsDeleteSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsDeleteSample.ts index 784525d703a1..69b248344ed1 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified connection monitor. * * @summary Deletes the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorDelete.json */ async function deleteConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsGetSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsGetSample.ts index 481c12676baf..6cb7d01a12ac 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a connection monitor by name. * * @summary Gets a connection monitor by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorGet.json */ async function getConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsListSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsListSample.ts index 6d1be277cddf..5eb773917b89 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsListSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all connection monitors for the specified Network Watcher. * * @summary Lists all connection monitors for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorList.json */ async function listConnectionMonitors() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsQuerySample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsQuerySample.ts index dc8d8d17e177..e4799844640e 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsQuerySample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsQuerySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Query a snapshot of the most recent connection states. * * @summary Query a snapshot of the most recent connection states. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorQuery.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorQuery.json */ async function queryConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsStartSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsStartSample.ts index e1f4ea632da5..fbc335a2f525 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsStartSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsStartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Starts the specified connection monitor. * * @summary Starts the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStart.json */ async function startConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsStopSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsStopSample.ts index b4a5c832271d..f9726fc68c54 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsStopSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Stops the specified connection monitor. * * @summary Stops the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStop.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStop.json */ async function stopConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/connectionMonitorsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/connectionMonitorsUpdateTagsSample.ts index 01437013400f..06fb6c037ee9 100644 --- a/sdk/network/arm-network/samples-dev/connectionMonitorsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/connectionMonitorsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update tags of the specified connection monitor. * * @summary Update tags of the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json */ async function updateConnectionMonitorTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/connectivityConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/connectivityConfigurationsCreateOrUpdateSample.ts index 94dc29397741..6acd522fcae1 100644 --- a/sdk/network/arm-network/samples-dev/connectivityConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/connectivityConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates/Updates a new network manager connectivity configuration * * @summary Creates/Updates a new network manager connectivity configuration - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationPut.json */ async function connectivityConfigurationsPut() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/connectivityConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/connectivityConfigurationsDeleteSample.ts index 43ef02a6abfb..bde020271fea 100644 --- a/sdk/network/arm-network/samples-dev/connectivityConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/connectivityConfigurationsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name * * @summary Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json */ async function connectivityConfigurationsDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/connectivityConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/connectivityConfigurationsGetSample.ts index 55fa525fc9a2..e055c6061781 100644 --- a/sdk/network/arm-network/samples-dev/connectivityConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/connectivityConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name * * @summary Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationGet.json */ async function connectivityConfigurationsGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/connectivityConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/connectivityConfigurationsListSample.ts index 280999c01e21..7f8fe2e4eb68 100644 --- a/sdk/network/arm-network/samples-dev/connectivityConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/connectivityConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the network manager connectivity configuration in a specified network manager. * * @summary Lists all the network manager connectivity configuration in a specified network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationList.json */ async function connectivityConfigurationsList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesCreateOrUpdateSample.ts index 82019fadc9ae..dc4bfbb86b4d 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a custom IP prefix. * * @summary Creates or updates a custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixCreateCustomizedValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixCreateCustomizedValues.json */ async function createCustomIPPrefixAllocationMethod() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesDeleteSample.ts index 9f2518af5e05..6ed2416e264c 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified custom IP prefix. * * @summary Deletes the specified custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixDelete.json */ async function deleteCustomIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesGetSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesGetSample.ts index a1f24c9ba15c..0340748b2f4b 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified custom IP prefix in a specified resource group. * * @summary Gets the specified custom IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixGet.json */ async function getCustomIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesListAllSample.ts index 70265bbae2d3..baeeb5d92ff8 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the custom IP prefixes in a subscription. * * @summary Gets all the custom IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixListAll.json */ async function listAllCustomIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesListSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesListSample.ts index 04163d308e97..624b48839da5 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesListSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all custom IP prefixes in a resource group. * * @summary Gets all custom IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixList.json */ async function listResourceGroupCustomIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/customIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/customIPPrefixesUpdateTagsSample.ts index 6c7cf68a4aca..dbc29aef1bf9 100644 --- a/sdk/network/arm-network/samples-dev/customIPPrefixesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/customIPPrefixesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates custom IP prefix tags. * * @summary Updates custom IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixUpdateTags.json */ async function updatePublicIPAddressTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesCreateOrUpdateSample.ts index fa2fceb9e0f4..082e58c097d9 100644 --- a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a DDoS custom policy. * * @summary Creates or updates a DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyCreate.json */ async function createDDoSCustomPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesDeleteSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesDeleteSample.ts index c3c70aadf1f8..e97a148927ca 100644 --- a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified DDoS custom policy. * * @summary Deletes the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyDelete.json */ async function deleteDDoSCustomPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesGetSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesGetSample.ts index 56739365298f..7a09e6e07396 100644 --- a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified DDoS custom policy. * * @summary Gets information about the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyGet.json */ async function getDDoSCustomPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesUpdateTagsSample.ts index 69929b112400..2d3bbcba6c20 100644 --- a/sdk/network/arm-network/samples-dev/ddosCustomPoliciesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosCustomPoliciesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update a DDoS custom policy tags. * * @summary Update a DDoS custom policy tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyUpdateTags.json */ async function dDoSCustomPolicyUpdateTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansCreateOrUpdateSample.ts index 94b818055e19..5c6a4568889d 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a DDoS protection plan. * * @summary Creates or updates a DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanCreate.json */ async function createDDoSProtectionPlan() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansDeleteSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansDeleteSample.ts index 0880ac4438d3..d75226bd06ae 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified DDoS protection plan. * * @summary Deletes the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanDelete.json */ async function deleteDDoSProtectionPlan() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansGetSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansGetSample.ts index fc71c2214760..aaf0940f31ee 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansGetSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified DDoS protection plan. * * @summary Gets information about the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanGet.json */ async function getDDoSProtectionPlan() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansListByResourceGroupSample.ts index bd617cad503b..fc7ec2aceada 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the DDoS protection plans in a resource group. * * @summary Gets all the DDoS protection plans in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanList.json */ async function listDDoSProtectionPlansInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansListSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansListSample.ts index 99c13da4d742..cc69f8a50e47 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansListSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all DDoS protection plans in a subscription. * * @summary Gets all DDoS protection plans in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanListAll.json */ async function listAllDDoSProtectionPlans() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ddosProtectionPlansUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/ddosProtectionPlansUpdateTagsSample.ts index 0479d49418ce..f9fcff26f7d0 100644 --- a/sdk/network/arm-network/samples-dev/ddosProtectionPlansUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/ddosProtectionPlansUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update a DDoS protection plan tags. * * @summary Update a DDoS protection plan tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanUpdateTags.json */ async function dDoSProtectionPlanUpdateTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/defaultSecurityRulesGetSample.ts b/sdk/network/arm-network/samples-dev/defaultSecurityRulesGetSample.ts index cf11dc3376ee..864690735406 100644 --- a/sdk/network/arm-network/samples-dev/defaultSecurityRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/defaultSecurityRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified default network security rule. * * @summary Get the specified default network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleGet.json */ async function defaultSecurityRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/defaultSecurityRulesListSample.ts b/sdk/network/arm-network/samples-dev/defaultSecurityRulesListSample.ts index c6f00eecf562..bd63f485eab6 100644 --- a/sdk/network/arm-network/samples-dev/defaultSecurityRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/defaultSecurityRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all default security rules in a network security group. * * @summary Gets all default security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleList.json */ async function defaultSecurityRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkByTokenSample.ts b/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkByTokenSample.ts index 79772c795fee..8281b211065b 100644 --- a/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkByTokenSample.ts +++ b/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkByTokenSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the Bastion Shareable Links for all the tokens specified in the request. * * @summary Deletes the Bastion Shareable Links for all the tokens specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDeleteByToken.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDeleteByToken.json */ async function deleteBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkSample.ts b/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkSample.ts index b416babca078..b7d13f632801 100644 --- a/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkSample.ts +++ b/sdk/network/arm-network/samples-dev/deleteBastionShareableLinkSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the Bastion Shareable Links for all the VMs specified in the request. * * @summary Deletes the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDelete.json */ async function deleteBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/disconnectActiveSessionsSample.ts b/sdk/network/arm-network/samples-dev/disconnectActiveSessionsSample.ts index 91637fa8aa18..49f3f1c57a5a 100644 --- a/sdk/network/arm-network/samples-dev/disconnectActiveSessionsSample.ts +++ b/sdk/network/arm-network/samples-dev/disconnectActiveSessionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. * * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionDelete.json */ async function deletesTheSpecifiedActiveSession() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationCreateOrUpdateSample.ts index bb18fac6a5e7..edb1971fc9bf 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a DSCP Configuration. * * @summary Creates or updates a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationCreate.json */ async function createDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationDeleteSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationDeleteSample.ts index 5e8098e68642..910523e48cc0 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a DSCP Configuration. * * @summary Deletes a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationDelete.json */ async function deleteDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationGetSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationGetSample.ts index dc5a75b72aeb..b7370ede7595 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationGetSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a DSCP Configuration. * * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationGet.json */ async function getDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationListAllSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationListAllSample.ts index f68de31ffcd2..e46501ae309f 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all dscp configurations in a subscription. * * @summary Gets all dscp configurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationListAll.json */ async function listAllNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/dscpConfigurationListSample.ts b/sdk/network/arm-network/samples-dev/dscpConfigurationListSample.ts index d2e2d79f78b3..0aa265fe6492 100644 --- a/sdk/network/arm-network/samples-dev/dscpConfigurationListSample.ts +++ b/sdk/network/arm-network/samples-dev/dscpConfigurationListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a DSCP Configuration. * * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationList.json */ async function getDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts index d6ce67575272..89032f54a0f2 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an authorization in the specified express route circuit. * * @summary Creates or updates an authorization in the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json */ async function createExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsDeleteSample.ts index fc48f91a47bf..947110388925 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified authorization from the specified express route circuit. * * @summary Deletes the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json */ async function deleteExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsGetSample.ts index 15ca1a676b69..46b4e9ab9d1a 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified authorization from the specified express route circuit. * * @summary Gets the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationGet.json */ async function getExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsListSample.ts index 8706e59944d5..ff3aaacd5fef 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitAuthorizationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all authorizations in an express route circuit. * * @summary Gets all authorizations in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationList.json */ async function listExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsCreateOrUpdateSample.ts index 288c10a2dcb3..043768c8026a 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a Express Route Circuit Connection in the specified express route circuits. * * @summary Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionCreate.json */ async function expressRouteCircuitConnectionCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsDeleteSample.ts index b856fb23ac42..6ae1ba103c2c 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Express Route Circuit Connection from the specified express route circuit. * * @summary Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionDelete.json */ async function deleteExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsGetSample.ts index f0badf631bad..f146d064ae55 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Express Route Circuit Connection from the specified express route circuit. * * @summary Gets the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionGet.json */ async function expressRouteCircuitConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsListSample.ts index be0ef64a20d7..aed59b36b7f8 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all global reach connections associated with a private peering in an express route circuit. * * @summary Gets all global reach connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionList.json */ async function listExpressRouteCircuitConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsCreateOrUpdateSample.ts index 1f47efdbf0d0..653e0b018b91 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a peering in the specified express route circuits. * * @summary Creates or updates a peering in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringCreate.json */ async function createExpressRouteCircuitPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsDeleteSample.ts index b4fcb74c5d48..28f7805c4651 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified peering from the specified express route circuit. * * @summary Deletes the specified peering from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringDelete.json */ async function deleteExpressRouteCircuitPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsGetSample.ts index c63b3ef3ba03..1c6e10e97f47 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified peering for the express route circuit. * * @summary Gets the specified peering for the express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringGet.json */ async function getExpressRouteCircuitPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsListSample.ts index 3a86371cc4b7..bb445b438dfe 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitPeeringsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all peerings in a specified express route circuit. * * @summary Gets all peerings in a specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringList.json */ async function listExpressRouteCircuitPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsCreateOrUpdateSample.ts index cf39933a9f42..2c19a906affe 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an express route circuit. * * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreate.json */ async function createExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -57,7 +57,7 @@ async function createExpressRouteCircuit() { * This sample demonstrates how to Creates or updates an express route circuit. * * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json */ async function createExpressRouteCircuitOnExpressRoutePort() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsDeleteSample.ts index 71f333ceb414..a35904634a1b 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified express route circuit. * * @summary Deletes the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitDelete.json */ async function deleteExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetPeeringStatsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetPeeringStatsSample.ts index 31560dfea294..67dfbaf064da 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetPeeringStatsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetPeeringStatsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all stats from an express route circuit in a resource group. * * @summary Gets all stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringStats.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringStats.json */ async function getExpressRouteCircuitPeeringTrafficStats() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetSample.ts index d9d195cae9fa..d10cb69ab77f 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified express route circuit. * * @summary Gets information about the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitGet.json */ async function getExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetStatsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetStatsSample.ts index b2824d25306b..88f57c434b09 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetStatsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsGetStatsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the stats from an express route circuit in a resource group. * * @summary Gets all the stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitStats.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitStats.json */ async function getExpressRouteCircuitTrafficStats() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListAllSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListAllSample.ts index 21b72f1a27ed..42f6df128193 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the express route circuits in a subscription. * * @summary Gets all the express route circuits in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListBySubscription.json */ async function listExpressRouteCircuitsInASubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListArpTableSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListArpTableSample.ts index 87a064941547..6b7119881766 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListArpTableSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListArpTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route circuit in a resource group. * * @summary Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitARPTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitARPTableList.json */ async function listArpTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSample.ts index 36ecc75c9b31..2522a1c88eac 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised routes table associated with the express route circuit in a resource group. * * @summary Gets the currently advertised routes table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableList.json */ async function listRouteTables() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSummarySample.ts index 56aedb138fdf..c1c402eb5880 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSummarySample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListRoutesTableSummarySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised routes table summary associated with the express route circuit in a resource group. * * @summary Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json */ async function listRouteTableSummary() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListSample.ts index b5cd8ff6b09f..8610def4b956 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the express route circuits in a resource group. * * @summary Gets all the express route circuits in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListByResourceGroup.json */ async function listExpressRouteCircuitsInAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCircuitsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCircuitsUpdateTagsSample.ts index 119d86669803..0f4e072b51b8 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCircuitsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCircuitsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates an express route circuit tags. * * @summary Updates an express route circuit tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitUpdateTags.json */ async function updateExpressRouteCircuitTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteConnectionsCreateOrUpdateSample.ts index 644a49471ba6..e37fef976ccb 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. * * @summary Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionCreate.json */ async function expressRouteConnectionCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteConnectionsDeleteSample.ts index 173f2cf2043d..ab70b58d85f8 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a connection to a ExpressRoute circuit. * * @summary Deletes a connection to a ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionDelete.json */ async function expressRouteConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteConnectionsGetSample.ts index 1b134d09f79f..76ac1d85aa84 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified ExpressRouteConnection. * * @summary Gets the specified ExpressRouteConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionGet.json */ async function expressRouteConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteConnectionsListSample.ts index 0d706ff01403..d6b8fa9b87e6 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists ExpressRouteConnections. * * @summary Lists ExpressRouteConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionList.json */ async function expressRouteConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts index d69eb952873c..b6cba032d286 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a peering in the specified ExpressRouteCrossConnection. * * @summary Creates or updates a peering in the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json */ async function expressRouteCrossConnectionBgpPeeringCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsDeleteSample.ts index 024ff34c320c..a1d54eb51d0f 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified peering from the ExpressRouteCrossConnection. * * @summary Deletes the specified peering from the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json */ async function deleteExpressRouteCrossConnectionBgpPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsGetSample.ts index b466c46dadb3..19558324ad58 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified peering for the ExpressRouteCrossConnection. * * @summary Gets the specified peering for the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json */ async function getExpressRouteCrossConnectionBgpPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsListSample.ts index c652d822a6c8..2c68bce0f2b3 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionPeeringsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all peerings in a specified ExpressRouteCrossConnection. * * @summary Gets all peerings in a specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json */ async function expressRouteCrossConnectionBgpPeeringList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsCreateOrUpdateSample.ts index b7cf6acee4db..6f2003bb483b 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the specified ExpressRouteCrossConnection. * * @summary Update the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdate.json */ async function updateExpressRouteCrossConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsGetSample.ts index 5bf5edf43faf..e4300c3ed800 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets details about the specified ExpressRouteCrossConnection. * * @summary Gets details about the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionGet.json */ async function getExpressRouteCrossConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListArpTableSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListArpTableSample.ts index 0a872b4a4090..072f8a8e254c 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListArpTableSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListArpTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route cross connection in a resource group. * * @summary Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsArpTable.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsArpTable.json */ async function getExpressRouteCrossConnectionsArpTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListByResourceGroupSample.ts index 98d33ffed9f7..1a7c531604e4 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a resource group. * * @summary Retrieves all the ExpressRouteCrossConnections in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json */ async function expressRouteCrossConnectionListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSample.ts index 7aeb77b79878..dd24cb361307 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised routes table associated with the express route cross connection in a resource group. * * @summary Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json */ async function getExpressRouteCrossConnectionsRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSummarySample.ts index 910d816505ff..d203ef2e6463 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSummarySample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListRoutesTableSummarySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the route table summary associated with the express route cross connection in a resource group. * * @summary Gets the route table summary associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json */ async function getExpressRouteCrossConnectionsRouteTableSummary() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListSample.ts index 88a2efc04f7a..bd63b5972df1 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a subscription. * * @summary Retrieves all the ExpressRouteCrossConnections in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionList.json */ async function expressRouteCrossConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsUpdateTagsSample.ts index b6efdfa84cd3..8768b72e6b9d 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteCrossConnectionsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates an express route cross connection tags. * * @summary Updates an express route cross connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json */ async function updateExpressRouteCrossConnectionTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysCreateOrUpdateSample.ts index a0924f35fb1b..00a70317e93f 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a ExpressRoute gateway in a specified resource group. * * @summary Creates or updates a ExpressRoute gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayCreate.json */ async function expressRouteGatewayCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysDeleteSample.ts index 75e2c8c19546..943a8bb76359 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. * * @summary Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayDelete.json */ async function expressRouteGatewayDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetSample.ts index ee4f8bf78d67..55bc251f50a5 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Fetches the details of a ExpressRoute gateway in a resource group. * * @summary Fetches the details of a ExpressRoute gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayGet.json */ async function expressRouteGatewayGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysListByResourceGroupSample.ts index d6df4ac6d0ab..7bf8323dc4ce 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists ExpressRoute gateways in a given resource group. * * @summary Lists ExpressRoute gateways in a given resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListByResourceGroup.json */ async function expressRouteGatewayListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysListBySubscriptionSample.ts index fcf7de384c08..6bc07e4acdbf 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists ExpressRoute gateways under a given subscription. * * @summary Lists ExpressRoute gateways under a given subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListBySubscription.json */ async function expressRouteGatewayListBySubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/expressRouteGatewaysUpdateTagsSample.ts index dad6bd3f9919..dff1328ec62b 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates express route gateway tags. * * @summary Updates express route gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayUpdateTags.json */ async function expressRouteGatewayUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteLinksGetSample.ts b/sdk/network/arm-network/samples-dev/expressRouteLinksGetSample.ts index f8b3157e5ad8..ceefd3c5cf10 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteLinksGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteLinksGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the specified ExpressRouteLink resource. * * @summary Retrieves the specified ExpressRouteLink resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkGet.json */ async function expressRouteLinkGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteLinksListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteLinksListSample.ts index fc167e4e8a2a..7e7532dc2eb5 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteLinksListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteLinksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. * * @summary Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkList.json */ async function expressRouteLinkGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsCreateOrUpdateSample.ts index c2f8028f8f49..2cf5963ef365 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an authorization in the specified express route port. * * @summary Creates or updates an authorization in the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationCreate.json */ async function createExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsDeleteSample.ts index 5599c4c5e5a7..8b1919bdbe26 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified authorization from the specified express route port. * * @summary Deletes the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationDelete.json */ async function deleteExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsGetSample.ts index 34f2793e4887..072e8e477931 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified authorization from the specified express route port. * * @summary Gets the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationGet.json */ async function getExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsListSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsListSample.ts index 5c22d87c371d..0fde604d6e9d 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortAuthorizationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all authorizations in an express route port. * * @summary Gets all authorizations in an express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationList.json */ async function listExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsCreateOrUpdateSample.ts index a16ee1378286..7a951dbc66e9 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. * * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortCreate.json */ async function expressRoutePortCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -45,7 +45,7 @@ async function expressRoutePortCreate() { * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. * * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateLink.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateLink.json */ async function expressRoutePortUpdateLink() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsDeleteSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsDeleteSample.ts index ec7efe203ba5..2d1df31314f3 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified ExpressRoutePort resource. * * @summary Deletes the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortDelete.json */ async function expressRoutePortDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLoaSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLoaSample.ts index e505088adea9..91791d64548a 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLoaSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsGenerateLoaSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generate a letter of authorization for the requested ExpressRoutePort resource. * * @summary Generate a letter of authorization for the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateExpressRoutePortsLOA.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateExpressRoutePortsLOA.json */ async function generateExpressRoutePortLoa() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsGetSample.ts index abe451d19091..1ff259df3772 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the requested ExpressRoutePort resource. * * @summary Retrieves the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortGet.json */ async function expressRoutePortGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsListByResourceGroupSample.ts index 909b78a1c40c..ba46e3b05d34 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all the ExpressRoutePort resources in the specified resource group. * * @summary List all the ExpressRoutePort resources in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortListByResourceGroup.json */ async function expressRoutePortListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsListSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsListSample.ts index 3afad4b1ea77..f9505a77f68f 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all the ExpressRoutePort resources in the specified subscription. * * @summary List all the ExpressRoutePort resources in the specified subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortList.json */ async function expressRoutePortList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsGetSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsGetSample.ts index 42d12f42cd82..e8a4d0519ac2 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. * * @summary Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationGet.json */ async function expressRoutePortsLocationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsListSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsListSample.ts index d3bde93d2de9..8d5d66142e21 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsLocationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. * * @summary Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationList.json */ async function expressRoutePortsLocationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRoutePortsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/expressRoutePortsUpdateTagsSample.ts index bf2b89541fd3..d30baac0c803 100644 --- a/sdk/network/arm-network/samples-dev/expressRoutePortsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRoutePortsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update ExpressRoutePort tags. * * @summary Update ExpressRoutePort tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateTags.json */ async function expressRoutePortUpdateTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteProviderPortSample.ts b/sdk/network/arm-network/samples-dev/expressRouteProviderPortSample.ts index 1fff89087ac7..70d0b83cde90 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteProviderPortSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteProviderPortSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves detail of a provider port. * * @summary Retrieves detail of a provider port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPort.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPort.json */ async function expressRouteProviderPort() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteProviderPortsLocationListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteProviderPortsLocationListSample.ts index ac77e28b9fda..eac5211910fe 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteProviderPortsLocationListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteProviderPortsLocationListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all the ExpressRouteProviderPorts in a subscription. * * @summary Retrieves all the ExpressRouteProviderPorts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPortList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPortList.json */ async function expressRouteProviderPortList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/expressRouteServiceProvidersListSample.ts b/sdk/network/arm-network/samples-dev/expressRouteServiceProvidersListSample.ts index 0434c77ff5c6..6507988c5aa3 100644 --- a/sdk/network/arm-network/samples-dev/expressRouteServiceProvidersListSample.ts +++ b/sdk/network/arm-network/samples-dev/expressRouteServiceProvidersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the available express route service providers. * * @summary Gets all the available express route service providers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteProviderList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteProviderList.json */ async function listExpressRouteProviders() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesCreateOrUpdateSample.ts index 7c6e31e64bfd..b07fc2df757e 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Firewall Policy. * * @summary Creates or updates the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPut.json */ async function createFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesDeleteSample.ts index 7055ceb0693b..3620fc28ab39 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Firewall Policy. * * @summary Deletes the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDelete.json */ async function deleteFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesGetSample.ts index 3d6ceae0f5a8..824829ade3f9 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Firewall Policy. * * @summary Gets the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyGet.json */ async function getFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesListAllSample.ts index 8d039e1f0ad1..536f777d27e7 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Firewall Policies in a subscription. * * @summary Gets all the Firewall Policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListBySubscription.json */ async function listAllFirewallPoliciesForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesListSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesListSample.ts index f606e15df8c3..6d34ee3512e3 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Firewall Policies in a resource group. * * @summary Lists all Firewall Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListByResourceGroup.json */ async function listAllFirewallPoliciesForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/firewallPoliciesUpdateTagsSample.ts index b9126c324f4a..11e5a9e47e35 100644 --- a/sdk/network/arm-network/samples-dev/firewallPoliciesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPoliciesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of a Azure Firewall Policy resource. * * @summary Updates tags of a Azure Firewall Policy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPatch.json */ async function updateFirewallPolicyTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyDeploymentsDeploySample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyDeploymentsDeploySample.ts index f84ba3467117..b115e7dfe1b6 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyDeploymentsDeploySample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyDeploymentsDeploySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deploys the firewall policy draft and child rule collection group drafts. * * @summary Deploys the firewall policy draft and child rule collection group drafts. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDeploy.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDeploy.json */ async function deployFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsCreateOrUpdateSample.ts index de93f231616b..ec2b79bb755f 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a draft Firewall Policy. * * @summary Create or update a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftPut.json */ async function createOrUpdateFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsDeleteSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsDeleteSample.ts index 542f58c06382..3d5819b85ccd 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a draft policy. * * @summary Delete a draft policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDelete.json */ async function deleteFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsGetSample.ts index f245af84cbc2..0f55f44cfe08 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyDraftsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyDraftsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a draft Firewall Policy. * * @summary Get a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftGet.json */ async function getFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesFilterValuesListSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesFilterValuesListSample.ts index 5a2ca1dcae8c..dcb4f170cd94 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesFilterValuesListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesFilterValuesListSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the current filter values for the signatures overrides * * @summary Retrieves the current filter values for the signatures overrides - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json */ async function querySignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesListSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesListSample.ts index 2ebb69707ed6..fdd4c723c179 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. * * @summary Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverrides.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverrides.json */ async function querySignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesGetSample.ts index 33affc870274..1fc1bb2eafce 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all signatures overrides for a specific policy. * * @summary Returns all signatures overrides for a specific policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesGet.json */ async function getSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesListSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesListSample.ts index 135af0c7a5d6..c8dc1deeff25 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all signatures overrides objects for a specific policy as a list containing a single value. * * @summary Returns all signatures overrides objects for a specific policy as a list containing a single value. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesList.json */ async function getSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPatchSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPatchSample.ts index 7826ba05410e..3d9f52706734 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPatchSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPatchSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Will update the status of policy's signature overrides for IDPS * * @summary Will update the status of policy's signature overrides for IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPatch.json */ async function patchSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPutSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPutSample.ts index 8c5d38374779..5cf4e4a6990c 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPutSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyIdpsSignaturesOverridesPutSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Will override/create a new signature overrides for the policy's IDPS * * @summary Will override/create a new signature overrides for the policy's IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPut.json */ async function putSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts index b56003b494bc..a21ea043731a 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or Update Rule Collection Group Draft. * * @summary Create or Update Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json */ async function createOrUpdateRuleCollectionGroupDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts index 905a9a386a12..a995ad63fbf8 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete Rule Collection Group Draft. * * @summary Delete Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json */ async function deleteFirewallRuleCollectionGroupDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsGetSample.ts index 26bc8dc83389..c8d6340f5756 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupDraftsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get Rule Collection Group Draft. * * @summary Get Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json */ async function getRuleCollectionGroupDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts index 8603c5853430..13f08f374c71 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json */ async function createFirewallPolicyNatRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -68,7 +68,7 @@ async function createFirewallPolicyNatRuleCollectionGroup() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupPut.json */ async function createFirewallPolicyRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -112,7 +112,7 @@ async function createFirewallPolicyRuleCollectionGroup() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json */ async function createFirewallPolicyRuleCollectionGroupWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -159,7 +159,7 @@ async function createFirewallPolicyRuleCollectionGroupWithIPGroups() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json */ async function createFirewallPolicyRuleCollectionGroupWithWebCategories() { const subscriptionId = @@ -204,7 +204,7 @@ async function createFirewallPolicyRuleCollectionGroupWithWebCategories() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json */ async function createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsDeleteSample.ts index 72d35bcf5a7c..0941d6366d36 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified FirewallPolicyRuleCollectionGroup. * * @summary Deletes the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json */ async function deleteFirewallPolicyRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsGetSample.ts index 78df7c9ea295..989bb1a53503 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json */ async function getFirewallPolicyNatRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +39,7 @@ async function getFirewallPolicyNatRuleCollectionGroup() { * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupGet.json */ async function getFirewallPolicyRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -60,7 +60,7 @@ async function getFirewallPolicyRuleCollectionGroup() { * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json */ async function getFirewallPolicyRuleCollectionGroupWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -81,7 +81,7 @@ async function getFirewallPolicyRuleCollectionGroupWithIPGroups() { * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json */ async function getFirewallPolicyRuleCollectionGroupWithWebCategories() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsListSample.ts b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsListSample.ts index ec05750a9538..dea5fc9dcd68 100644 --- a/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/firewallPolicyRuleCollectionGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json */ async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories() { const subscriptionId = @@ -42,7 +42,7 @@ async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories() { * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupList.json */ async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -64,7 +64,7 @@ async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy( * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json */ async function listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/flowLogsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/flowLogsCreateOrUpdateSample.ts index ebf3e2a5f285..6ce10a7f0001 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a flow log for the specified network security group. * * @summary Create or update a flow log for the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogCreate.json */ async function createOrUpdateFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/flowLogsDeleteSample.ts b/sdk/network/arm-network/samples-dev/flowLogsDeleteSample.ts index 79f765785d23..b53704cf0d3a 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified flow log resource. * * @summary Deletes the specified flow log resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogDelete.json */ async function deleteFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/flowLogsGetSample.ts b/sdk/network/arm-network/samples-dev/flowLogsGetSample.ts index 2c7c6f712244..69f99b42a625 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a flow log resource by name. * * @summary Gets a flow log resource by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogGet.json */ async function getFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/flowLogsListSample.ts b/sdk/network/arm-network/samples-dev/flowLogsListSample.ts index 0837668e6728..4cb0b22a14ca 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsListSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all flow log resources for the specified Network Watcher. * * @summary Lists all flow log resources for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogList.json */ async function listConnectionMonitors() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/flowLogsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/flowLogsUpdateTagsSample.ts index ded6f62b0f1a..5d40268dc404 100644 --- a/sdk/network/arm-network/samples-dev/flowLogsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/flowLogsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update tags of the specified flow log. * * @summary Update tags of the specified flow log. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogUpdateTags.json */ async function updateFlowLogTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts b/sdk/network/arm-network/samples-dev/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts index 0216a5dd1c53..aab4609bf372 100644 --- a/sdk/network/arm-network/samples-dev/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts +++ b/sdk/network/arm-network/samples-dev/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. * * @summary Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json */ async function generateVirtualWanVpnServerConfigurationVpnProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/getActiveSessionsSample.ts b/sdk/network/arm-network/samples-dev/getActiveSessionsSample.ts index 4a5b6659db15..1c6ddd0f494e 100644 --- a/sdk/network/arm-network/samples-dev/getActiveSessionsSample.ts +++ b/sdk/network/arm-network/samples-dev/getActiveSessionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. * * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionsList.json */ async function returnsAListOfCurrentlyActiveSessionsOnTheBastion() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/getBastionShareableLinkSample.ts b/sdk/network/arm-network/samples-dev/getBastionShareableLinkSample.ts index ba17721efc21..364eac8ebd86 100644 --- a/sdk/network/arm-network/samples-dev/getBastionShareableLinkSample.ts +++ b/sdk/network/arm-network/samples-dev/getBastionShareableLinkSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Return the Bastion Shareable Links for all the VMs specified in the request. * * @summary Return the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkGet.json */ async function returnsTheBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/hubRouteTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/hubRouteTablesCreateOrUpdateSample.ts index b223777cef41..66c9154eeec8 100644 --- a/sdk/network/arm-network/samples-dev/hubRouteTablesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/hubRouteTablesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. * * @summary Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTablePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTablePut.json */ async function routeTablePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/hubRouteTablesDeleteSample.ts b/sdk/network/arm-network/samples-dev/hubRouteTablesDeleteSample.ts index 63edb94588a2..299fa9858d82 100644 --- a/sdk/network/arm-network/samples-dev/hubRouteTablesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/hubRouteTablesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a RouteTable. * * @summary Deletes a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableDelete.json */ async function routeTableDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/hubRouteTablesGetSample.ts b/sdk/network/arm-network/samples-dev/hubRouteTablesGetSample.ts index 8c1933247a2e..54ce83f4273a 100644 --- a/sdk/network/arm-network/samples-dev/hubRouteTablesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/hubRouteTablesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a RouteTable. * * @summary Retrieves the details of a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableGet.json */ async function routeTableGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/hubRouteTablesListSample.ts b/sdk/network/arm-network/samples-dev/hubRouteTablesListSample.ts index 0063d02954b6..691b9ae54d70 100644 --- a/sdk/network/arm-network/samples-dev/hubRouteTablesListSample.ts +++ b/sdk/network/arm-network/samples-dev/hubRouteTablesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all RouteTables. * * @summary Retrieves the details of all RouteTables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableList.json */ async function routeTableList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts index 18d4f5ce8ed9..c8ad2469d6a1 100644 --- a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a hub virtual network connection if it doesn't exist else updates the existing one. * * @summary Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionPut.json */ async function hubVirtualNetworkConnectionPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsDeleteSample.ts index 52a6603d3915..19a5be04dc94 100644 --- a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a HubVirtualNetworkConnection. * * @summary Deletes a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionDelete.json */ async function hubVirtualNetworkConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsGetSample.ts index 8bbc7e4b75d2..fc7d11b757c5 100644 --- a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a HubVirtualNetworkConnection. * * @summary Retrieves the details of a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionGet.json */ async function hubVirtualNetworkConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsListSample.ts index 828ffc71a621..96d5c272ab9a 100644 --- a/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/hubVirtualNetworkConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all HubVirtualNetworkConnections. * * @summary Retrieves the details of all HubVirtualNetworkConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionList.json */ async function hubVirtualNetworkConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/inboundNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/inboundNatRulesCreateOrUpdateSample.ts index 0e3168503e73..6d8b53cd9f79 100644 --- a/sdk/network/arm-network/samples-dev/inboundNatRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundNatRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a load balancer inbound NAT rule. * * @summary Creates or updates a load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleCreate.json */ async function inboundNatRuleCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/inboundNatRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/inboundNatRulesDeleteSample.ts index dcc7260f53e6..b0637287e183 100644 --- a/sdk/network/arm-network/samples-dev/inboundNatRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundNatRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified load balancer inbound NAT rule. * * @summary Deletes the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleDelete.json */ async function inboundNatRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/inboundNatRulesGetSample.ts b/sdk/network/arm-network/samples-dev/inboundNatRulesGetSample.ts index cb8bce982db6..a520875a3526 100644 --- a/sdk/network/arm-network/samples-dev/inboundNatRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundNatRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified load balancer inbound NAT rule. * * @summary Gets the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleGet.json */ async function inboundNatRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/inboundNatRulesListSample.ts b/sdk/network/arm-network/samples-dev/inboundNatRulesListSample.ts index da24a34e8ba6..8b7898189121 100644 --- a/sdk/network/arm-network/samples-dev/inboundNatRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundNatRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the inbound NAT rules in a load balancer. * * @summary Gets all the inbound NAT rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleList.json */ async function inboundNatRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/inboundSecurityRuleCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/inboundSecurityRuleCreateOrUpdateSample.ts index 51665e1b6eef..0470b45ce998 100644 --- a/sdk/network/arm-network/samples-dev/inboundSecurityRuleCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundSecurityRuleCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Inbound Security Rules. * * @summary Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRulePut.json */ async function createNetworkVirtualApplianceInboundSecurityRules() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/inboundSecurityRuleGetSample.ts b/sdk/network/arm-network/samples-dev/inboundSecurityRuleGetSample.ts index 2112de2bd469..eb1cfce02039 100644 --- a/sdk/network/arm-network/samples-dev/inboundSecurityRuleGetSample.ts +++ b/sdk/network/arm-network/samples-dev/inboundSecurityRuleGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. * * @summary Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRuleGet.json */ async function createNetworkVirtualApplianceInboundSecurityRules() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsCreateOrUpdateSample.ts index 2f09479f5297..ff1d351c3b60 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an IpAllocation in the specified resource group. * * @summary Creates or updates an IpAllocation in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationCreate.json */ async function createIPAllocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsDeleteSample.ts index ca42f847c87a..a57283e53307 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified IpAllocation. * * @summary Deletes the specified IpAllocation. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationDelete.json */ async function deleteIPAllocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsGetSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsGetSample.ts index 30a5df7f4f40..b9bbd2c7c8b5 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified IpAllocation by resource group. * * @summary Gets the specified IpAllocation by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationGet.json */ async function getIPAllocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsListByResourceGroupSample.ts index 855a73ab4dd3..13b73944f56e 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all IpAllocations in a resource group. * * @summary Gets all IpAllocations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationListByResourceGroup.json */ async function listIPAllocationsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsListSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsListSample.ts index 37baf39ee205..9a06887a9f87 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all IpAllocations in a subscription. * * @summary Gets all IpAllocations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationList.json */ async function listAllIPAllocations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ipAllocationsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/ipAllocationsUpdateTagsSample.ts index 9df7cd918b4f..1711a46348a5 100644 --- a/sdk/network/arm-network/samples-dev/ipAllocationsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/ipAllocationsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a IpAllocation tags. * * @summary Updates a IpAllocation tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationUpdateTags.json */ async function updateVirtualNetworkTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/ipGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsCreateOrUpdateSample.ts index 5c87e4df24bd..bfb645b372dd 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an ipGroups in a specified resource group. * * @summary Creates or updates an ipGroups in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsCreate.json */ async function createOrUpdateIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/ipGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsDeleteSample.ts index 825cca6f5ec6..6781246f22f3 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified ipGroups. * * @summary Deletes the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsDelete.json */ async function deleteIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/ipGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsGetSample.ts index ef606fd3c0c2..bf5fc0f6807c 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified ipGroups. * * @summary Gets the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsGet.json */ async function getIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/ipGroupsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsListByResourceGroupSample.ts index f128dec70802..6d703081ca41 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all IpGroups in a resource group. * * @summary Gets all IpGroups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListByResourceGroup.json */ async function listByResourceGroupIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/ipGroupsListSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsListSample.ts index fb27612dbe5c..3116ddc8acdd 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all IpGroups in a subscription. * * @summary Gets all IpGroups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListBySubscription.json */ async function listIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/ipGroupsUpdateGroupsSample.ts b/sdk/network/arm-network/samples-dev/ipGroupsUpdateGroupsSample.ts index 03e957e99a88..534e529cac73 100644 --- a/sdk/network/arm-network/samples-dev/ipGroupsUpdateGroupsSample.ts +++ b/sdk/network/arm-network/samples-dev/ipGroupsUpdateGroupsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of an IpGroups resource. * * @summary Updates tags of an IpGroups resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsUpdateTags.json */ async function updateIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsCreateSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsCreateSample.ts new file mode 100644 index 000000000000..24ee895d58d4 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/ipamPoolsCreateSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { IpamPool, NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates/Updates the Pool resource. + * + * @summary Creates/Updates the Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Create.json + */ +async function ipamPoolsCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const body: IpamPool = { + location: "eastus", + properties: { + description: "Test description.", + addressPrefixes: ["10.0.0.0/24"], + parentPoolName: "", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.beginCreateAndWait( + resourceGroupName, + networkManagerName, + poolName, + body, + ); + console.log(result); +} + +async function main() { + ipamPoolsCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsDeleteSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsDeleteSample.ts new file mode 100644 index 000000000000..889cea13ffa7 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/ipamPoolsDeleteSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete the Pool resource. + * + * @summary Delete the Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Delete.json + */ +async function ipamPoolsDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsGetPoolUsageSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsGetPoolUsageSample.ts new file mode 100644 index 000000000000..4250a6554c35 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/ipamPoolsGetPoolUsageSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the Pool Usage. + * + * @summary Get the Pool Usage. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_GetPoolUsage.json + */ +async function ipamPoolsGetPoolUsage() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.getPoolUsage( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsGetPoolUsage(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsGetSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsGetSample.ts new file mode 100644 index 000000000000..9e4d4426c7e4 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/ipamPoolsGetSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specific Pool resource. + * + * @summary Gets the specific Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Get.json + */ +async function ipamPoolsGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.get( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsListAssociatedResourcesSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsListAssociatedResourcesSample.ts new file mode 100644 index 000000000000..697fe07772e9 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/ipamPoolsListAssociatedResourcesSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List Associated Resource in the Pool. + * + * @summary List Associated Resource in the Pool. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_ListAssociatedResources.json + */ +async function ipamPoolsListAssociatedResources() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipamPools.listAssociatedResources( + resourceGroupName, + networkManagerName, + poolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipamPoolsListAssociatedResources(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsListSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsListSample.ts new file mode 100644 index 000000000000..34ffb8941266 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/ipamPoolsListSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Pool resources at Network Manager level. + * + * @summary Gets list of Pool resources at Network Manager level. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_List.json + */ +async function ipamPoolsList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipamPools.list( + resourceGroupName, + networkManagerName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipamPoolsList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/ipamPoolsUpdateSample.ts b/sdk/network/arm-network/samples-dev/ipamPoolsUpdateSample.ts new file mode 100644 index 000000000000..6c29f18c429c --- /dev/null +++ b/sdk/network/arm-network/samples-dev/ipamPoolsUpdateSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates the specific Pool resource. + * + * @summary Updates the specific Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Update.json + */ +async function ipamPoolsUpdate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.update( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsUpdate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/listActiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples-dev/listActiveConnectivityConfigurationsSample.ts index 9fe3ae33cb5d..d8e855301117 100644 --- a/sdk/network/arm-network/samples-dev/listActiveConnectivityConfigurationsSample.ts +++ b/sdk/network/arm-network/samples-dev/listActiveConnectivityConfigurationsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Lists active connectivity configurations in a network manager. * * @summary Lists active connectivity configurations in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json */ async function listActiveConnectivityConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/listActiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples-dev/listActiveSecurityAdminRulesSample.ts index b8908d116118..c618d5005a14 100644 --- a/sdk/network/arm-network/samples-dev/listActiveSecurityAdminRulesSample.ts +++ b/sdk/network/arm-network/samples-dev/listActiveSecurityAdminRulesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Lists active security admin rules in a network manager. * * @summary Lists active security admin rules in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json */ async function listActiveSecurityAdminRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts index cef37e52f357..5425d8e9acf5 100644 --- a/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts +++ b/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to List all effective connectivity configurations applied on a virtual network. * * @summary List all effective connectivity configurations applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json */ async function listEffectiveConnectivityConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveSecurityAdminRulesSample.ts index fc79a94d3da6..dc1f1df5b594 100644 --- a/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveSecurityAdminRulesSample.ts +++ b/sdk/network/arm-network/samples-dev/listNetworkManagerEffectiveSecurityAdminRulesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to List all effective security admin rules applied on a virtual network. * * @summary List all effective security admin rules applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json */ async function listEffectiveSecurityAdminRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts index 4734be44cff0..111f631f0465 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a load balancer backend address pool. * * @summary Creates or updates a load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json */ async function updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsDeleteSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsDeleteSample.ts index e25b178be0f6..d7a619e32d44 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified load balancer backend address pool. * * @summary Deletes the specified load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolDelete.json */ async function backendAddressPoolDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsGetSample.ts index fdef5315ca01..98b621ee2c3e 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets load balancer backend address pool. * * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json */ async function loadBalancerWithBackendAddressPoolWithBackendAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +39,7 @@ async function loadBalancerWithBackendAddressPoolWithBackendAddresses() { * This sample demonstrates how to Gets load balancer backend address pool. * * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolGet.json */ async function loadBalancerBackendAddressPoolGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsListSample.ts index 9e98ee2f85cd..36d2f53a2c95 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerBackendAddressPoolsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancer backed address pools. * * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json */ async function loadBalancerWithBackendAddressPoolContainingBackendAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -40,7 +40,7 @@ async function loadBalancerWithBackendAddressPoolContainingBackendAddresses() { * This sample demonstrates how to Gets all the load balancer backed address pools. * * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolList.json */ async function loadBalancerBackendAddressPoolList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsGetSample.ts index 2d705e04b723..75706a0a240d 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets load balancer frontend IP configuration. * * @summary Gets load balancer frontend IP configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json */ async function loadBalancerFrontendIPConfigurationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsListSample.ts index bc421ac9f939..ffd068792129 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerFrontendIPConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancer frontend IP configurations. * * @summary Gets all the load balancer frontend IP configurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationList.json */ async function loadBalancerFrontendIPConfigurationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesGetSample.ts index 249b508193bd..dd85ac211e6f 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified load balancer load balancing rule. * * @summary Gets the specified load balancer load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleGet.json */ async function loadBalancerLoadBalancingRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesHealthSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesHealthSample.ts new file mode 100644 index 000000000000..6a4a315d9676 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesHealthSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get health details of a load balancing rule. + * + * @summary Get health details of a load balancing rule. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerHealth.json + */ +async function queryLoadBalancingRuleHealth() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const groupName = "rg1"; + const loadBalancerName = "lb1"; + const loadBalancingRuleName = "rulelb"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancerLoadBalancingRules.beginHealthAndWait( + groupName, + loadBalancerName, + loadBalancingRuleName, + ); + console.log(result); +} + +async function main() { + queryLoadBalancingRuleHealth(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesListSample.ts index 8b464789e6b6..baf950ad3dcb 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerLoadBalancingRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancing rules in a load balancer. * * @summary Gets all the load balancing rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleList.json */ async function loadBalancerLoadBalancingRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerNetworkInterfacesListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerNetworkInterfacesListSample.ts index 0452b3a0d56f..e49ad033a365 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerNetworkInterfacesListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerNetworkInterfacesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets associated load balancer network interfaces. * * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json */ async function loadBalancerNetworkInterfaceListSimple() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -40,7 +40,7 @@ async function loadBalancerNetworkInterfaceListSimple() { * This sample demonstrates how to Gets associated load balancer network interfaces. * * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListVmss.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListVmss.json */ async function loadBalancerNetworkInterfaceListVmss() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesGetSample.ts index 2dce9e8652d9..db17e974a412 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified load balancer outbound rule. * * @summary Gets the specified load balancer outbound rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleGet.json */ async function loadBalancerOutboundRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesListSample.ts index 8c195d998523..a5127e5712a9 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerOutboundRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the outbound rules in a load balancer. * * @summary Gets all the outbound rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleList.json */ async function loadBalancerOutboundRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerProbesGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerProbesGetSample.ts index 54d26ecfbcb8..f67cb948a28a 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerProbesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerProbesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets load balancer probe. * * @summary Gets load balancer probe. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeGet.json */ async function loadBalancerProbeGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancerProbesListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancerProbesListSample.ts index b256be3b973b..cbfbb3070419 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancerProbesListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancerProbesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancer probes. * * @summary Gets all the load balancer probes. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeList.json */ async function loadBalancerProbeList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersCreateOrUpdateSample.ts index 57be72d63d39..b875621b9ab4 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreate.json */ async function createLoadBalancer() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -97,7 +97,7 @@ async function createLoadBalancer() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithZones.json */ async function createLoadBalancerWithFrontendIPInZone1() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -177,7 +177,7 @@ async function createLoadBalancerWithFrontendIPInZone1() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json */ async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -259,7 +259,7 @@ async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json */ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -335,7 +335,7 @@ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOn * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json */ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -407,7 +407,7 @@ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTw * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGlobalTier.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGlobalTier.json */ async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -483,7 +483,7 @@ async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBa * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateStandardSku.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateStandardSku.json */ async function createLoadBalancerWithStandardSku() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -562,7 +562,7 @@ async function createLoadBalancerWithStandardSku() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json */ async function createLoadBalancerWithSyncModePropertyOnPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -649,7 +649,7 @@ async function createLoadBalancerWithSyncModePropertyOnPool() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithInboundNatPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithInboundNatPool.json */ async function createLoadBalancerWithInboundNatPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -705,7 +705,7 @@ async function createLoadBalancerWithInboundNatPool() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithOutboundRules.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithOutboundRules.json */ async function createLoadBalancerWithOutboundRules() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancersDeleteSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersDeleteSample.ts index f6f66771685d..c1412d9e3a5b 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified load balancer. * * @summary Deletes the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerDelete.json */ async function deleteLoadBalancer() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancersGetSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersGetSample.ts index 9a2bc5ca79cc..8d4e664d1b39 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified load balancer. * * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGet.json */ async function getLoadBalancer() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getLoadBalancer() { * This sample demonstrates how to Gets the specified load balancer. * * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGetInboundNatRulePortMapping.json */ async function getLoadBalancerWithInboundNatRulePortMapping() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancersListAllSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersListAllSample.ts index ae05a6e857bd..9673aaa868f7 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancers in a subscription. * * @summary Gets all the load balancers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerListAll.json */ async function listAllLoadBalancers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancersListInboundNatRulePortMappingsSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersListInboundNatRulePortMappingsSample.ts index e4072fe45ca9..ce3cd1033f21 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersListInboundNatRulePortMappingsSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersListInboundNatRulePortMappingsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to List of inbound NAT rule port mappings. * * @summary List of inbound NAT rule port mappings. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/QueryInboundNatRulePortMapping.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/QueryInboundNatRulePortMapping.json */ async function queryInboundNatRulePortMapping() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancersListSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersListSample.ts index 6b6cefbc6914..0009ce99e674 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersListSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancers in a resource group. * * @summary Gets all the load balancers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerList.json */ async function listLoadBalancersInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIPBasedSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIPBasedSample.ts index a60e593b52da..f742840d80ad 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIPBasedSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersMigrateToIPBasedSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Migrate load balancer to IP Based * * @summary Migrate load balancer to IP Based - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/MigrateLoadBalancerToIPBased.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/MigrateLoadBalancerToIPBased.json */ async function migrateLoadBalancerToIPBased() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIPAddressesSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIPAddressesSample.ts index 4d44759dd32b..89a045515966 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIPAddressesSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersSwapPublicIPAddressesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Swaps VIPs between two load balancers. * * @summary Swaps VIPs between two load balancers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancersSwapPublicIpAddresses.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancersSwapPublicIpAddresses.json */ async function swapViPsBetweenTwoLoadBalancers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/loadBalancersUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/loadBalancersUpdateTagsSample.ts index fc3df08199ae..6675b62d91c4 100644 --- a/sdk/network/arm-network/samples-dev/loadBalancersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/loadBalancersUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a load balancer tags. * * @summary Updates a load balancer tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerUpdateTags.json */ async function updateLoadBalancerTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysCreateOrUpdateSample.ts index 9cc12f8a5400..8c6da2f4588a 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a local network gateway in the specified resource group. * * @summary Creates or updates a local network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayCreate.json */ async function createLocalNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysDeleteSample.ts index 9807bce38abf..a1e2871c151c 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified local network gateway. * * @summary Deletes the specified local network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayDelete.json */ async function deleteLocalNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysGetSample.ts index c3d21ecc49b6..0b4f27974be4 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified local network gateway in a resource group. * * @summary Gets the specified local network gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayGet.json */ async function getLocalNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysListSample.ts index 10093388e797..2c6ce8673543 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the local network gateways in a resource group. * * @summary Gets all the local network gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayList.json */ async function listLocalNetworkGateways() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/localNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/localNetworkGatewaysUpdateTagsSample.ts index f9afc07fb2fc..76f125131964 100644 --- a/sdk/network/arm-network/samples-dev/localNetworkGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/localNetworkGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a local network gateway tags. * * @summary Updates a local network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayUpdateTags.json */ async function updateLocalNetworkGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts index 48b12f7d1cda..ebe7b659f7de 100644 --- a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create a network manager connection on this management group. * * @summary Create a network manager connection on this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupPut.json */ async function createOrUpdateManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsDeleteSample.ts index 8c80a4157b6c..9b18426cedbe 100644 --- a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete specified pending connection created by this management group. * * @summary Delete specified pending connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json */ async function deleteManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsGetSample.ts index b62504d27219..d63cce94b095 100644 --- a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a specified connection created by this management group. * * @summary Get a specified connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupGet.json */ async function getManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsListSample.ts index c090726c6cf6..83d738455371 100644 --- a/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/managementGroupNetworkManagerConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network manager connections created by this management group. * * @summary List all network manager connections created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupList.json */ async function listManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples-dev/natGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysCreateOrUpdateSample.ts index 8c402f74e6c0..88cbd88546d5 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a nat gateway. * * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayCreateOrUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayCreateOrUpdate.json */ async function createNatGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/natGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysDeleteSample.ts index 8410bb871c87..3849ce3fd7d0 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified nat gateway. * * @summary Deletes the specified nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayDelete.json */ async function deleteNatGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/natGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysGetSample.ts index 59af5cbcf97e..5acbb84f2e4a 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. * * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayGet.json */ async function getNatGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/natGatewaysListAllSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysListAllSample.ts index 52d2293bcdb5..e829cc2fea35 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Nat Gateways in a subscription. * * @summary Gets all the Nat Gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayListAll.json */ async function listAllNatGateways() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/natGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysListSample.ts index 847a3e2e214c..f69b59b719f5 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all nat gateways in a resource group. * * @summary Gets all nat gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayList.json */ async function listNatGatewaysInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/natGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/natGatewaysUpdateTagsSample.ts index 0a34ca470a8a..97d00059249e 100644 --- a/sdk/network/arm-network/samples-dev/natGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/natGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates nat gateway tags. * * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayUpdateTags.json */ async function updateNatGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/natRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/natRulesCreateOrUpdateSample.ts index 313c588a156f..04dfd0724e08 100644 --- a/sdk/network/arm-network/samples-dev/natRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/natRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. * * @summary Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRulePut.json */ async function natRulePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/natRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/natRulesDeleteSample.ts index 1438fb0aedc6..6d64f6ef81b2 100644 --- a/sdk/network/arm-network/samples-dev/natRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/natRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a nat rule. * * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleDelete.json */ async function natRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/natRulesGetSample.ts b/sdk/network/arm-network/samples-dev/natRulesGetSample.ts index c91dc176b5d7..9da7f69f1148 100644 --- a/sdk/network/arm-network/samples-dev/natRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/natRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a nat ruleGet. * * @summary Retrieves the details of a nat ruleGet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleGet.json */ async function natRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/natRulesListByVpnGatewaySample.ts b/sdk/network/arm-network/samples-dev/natRulesListByVpnGatewaySample.ts index 9158cd640b36..da26c5d6d593 100644 --- a/sdk/network/arm-network/samples-dev/natRulesListByVpnGatewaySample.ts +++ b/sdk/network/arm-network/samples-dev/natRulesListByVpnGatewaySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all nat rules for a particular virtual wan vpn gateway. * * @summary Retrieves all nat rules for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleList.json */ async function natRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkGroupsCreateOrUpdateSample.ts index 4bd7165fc93b..22c700f181a7 100644 --- a/sdk/network/arm-network/samples-dev/networkGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkGroupsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network group. * * @summary Creates or updates a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupPut.json */ async function networkGroupsPut() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkGroupsDeleteSample.ts index 180605f47785..9dabcba57a4a 100644 --- a/sdk/network/arm-network/samples-dev/networkGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkGroupsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network group. * * @summary Deletes a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupDelete.json */ async function networkGroupsDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/networkGroupsGetSample.ts index eb41b06be81f..fcbc6e187024 100644 --- a/sdk/network/arm-network/samples-dev/networkGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network group. * * @summary Gets the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupGet.json */ async function networkGroupsGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkGroupsListSample.ts b/sdk/network/arm-network/samples-dev/networkGroupsListSample.ts index 6261be745cec..0a3b9f3eced0 100644 --- a/sdk/network/arm-network/samples-dev/networkGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the specified network group. * * @summary Lists the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupList.json */ async function networkGroupsList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsGetSample.ts index 78d391dbf5d3..f542e9a4d709 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network interface ip configuration. * * @summary Gets the specified network interface ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationGet.json */ async function networkInterfaceIPConfigurationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsListSample.ts index 0ae75c824205..f2b5821595b0 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceIPConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get all ip configurations in a network interface. * * @summary Get all ip configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationList.json */ async function networkInterfaceIPConfigurationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceLoadBalancersListSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceLoadBalancersListSample.ts index c0de0f18bb47..825a85fb4153 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceLoadBalancersListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceLoadBalancersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all load balancers in a network interface. * * @summary List all load balancers in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceLoadBalancerList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceLoadBalancerList.json */ async function networkInterfaceLoadBalancerList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts index 0e9f5b806fcc..7634901ce9e6 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a Tap configuration in the specified NetworkInterface. * * @summary Creates or updates a Tap configuration in the specified NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationCreate.json */ async function createNetworkInterfaceTapConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsDeleteSample.ts index 3beb2fe29faf..6b355de8f9cf 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified tap configuration from the NetworkInterface. * * @summary Deletes the specified tap configuration from the NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationDelete.json */ async function deleteTapConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsGetSample.ts index 27d080c128db..07d46df21fff 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified tap configuration on a network interface. * * @summary Get the specified tap configuration on a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationGet.json */ async function getNetworkInterfaceTapConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsListSample.ts index cf1c4b1a91e3..9a8b85e6083e 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfaceTapConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get all Tap configurations in a network interface. * * @summary Get all Tap configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationList.json */ async function listVirtualNetworkTapConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesCreateOrUpdateSample.ts index 3f679eca55ec..5be9a272ce24 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network interface. * * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreate.json */ async function createNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -55,7 +55,7 @@ async function createNetworkInterface() { * This sample demonstrates how to Creates or updates a network interface. * * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json */ async function createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesDeleteSample.ts index ad54b4d6bd6a..58a17d155fa8 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network interface. * * @summary Deletes the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceDelete.json */ async function deleteNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts index 1c20e7e9c4a2..bfb050c0119c 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network interface in a cloud service. * * @summary Get the specified network interface in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceGet.json */ async function getCloudServiceNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetEffectiveRouteTableSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetEffectiveRouteTableSample.ts index d38d61df9fa1..bc2b8278c64c 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetEffectiveRouteTableSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesGetEffectiveRouteTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route tables applied to a network interface. * * @summary Gets all route tables applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json */ async function showNetworkInterfaceEffectiveRouteTables() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetSample.ts index aa4f17d5952a..7d773401e7b6 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified network interface. * * @summary Gets information about the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceGet.json */ async function getNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts index 5c0d2fac48a8..450b0b10b2bb 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. * * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigGet.json */ async function getVirtualMachineScaleSetNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts index 8c46523ac43d..b6defba75d3a 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network interface in a virtual machine scale set. * * @summary Get the specified network interface in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceGet.json */ async function getVirtualMachineScaleSetNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListAllSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListAllSample.ts index 72611e14e556..c5bb52a31e8f 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network interfaces in a subscription. * * @summary Gets all network interfaces in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceListAll.json */ async function listAllNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceNetworkInterfacesSample.ts index 95a50a6e5ed8..21fa6a1f5689 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceNetworkInterfacesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network interfaces in a cloud service. * * @summary Gets all network interfaces in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceList.json */ async function listCloudServiceNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts index 1bc990a7ac5d..6f443a7ec99d 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all network interfaces in a role instance in a cloud service. * * @summary Gets information about all network interfaces in a role instance in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json */ async function listCloudServiceRoleInstanceNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts index 5936e266fafc..1ad4e8f14ce0 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network security groups applied to a network interface. * * @summary Gets all network security groups applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveNSGList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveNSGList.json */ async function listNetworkInterfaceEffectiveNetworkSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListSample.ts index 79ab5011e020..2dde7a3e6fc7 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network interfaces in a resource group. * * @summary Gets all network interfaces in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceList.json */ async function listNetworkInterfacesInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts index 4c365ba05f90..ec97abf32069 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. * * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigList.json */ async function listVirtualMachineScaleSetNetworkInterfaceIPConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts index c7247f3188d1..64c62cf1d309 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network interfaces in a virtual machine scale set. * * @summary Gets all network interfaces in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceList.json */ async function listVirtualMachineScaleSetNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts index 9015807b9e06..b9fe861f9fff 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all network interfaces in a virtual machine in a virtual machine scale set. * * @summary Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmNetworkInterfaceList.json */ async function listVirtualMachineScaleSetVMNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkInterfacesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkInterfacesUpdateTagsSample.ts index f9d508d20218..8d4f85c24b79 100644 --- a/sdk/network/arm-network/samples-dev/networkInterfacesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkInterfacesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a network interface tags. * * @summary Updates a network interface tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceUpdateTags.json */ async function updateNetworkInterfaceTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkManagerCommitsPostSample.ts b/sdk/network/arm-network/samples-dev/networkManagerCommitsPostSample.ts index 3fdc3bd72da6..7df836729d7c 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerCommitsPostSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerCommitsPostSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Post a Network Manager Commit. * * @summary Post a Network Manager Commit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerCommitPost.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerCommitPost.json */ async function networkManageCommitPost() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagerDeploymentStatusListSample.ts b/sdk/network/arm-network/samples-dev/networkManagerDeploymentStatusListSample.ts index 777d493eeb22..6d7919ec59a0 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerDeploymentStatusListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerDeploymentStatusListSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Post to List of Network Manager Deployment Status. * * @summary Post to List of Network Manager Deployment Status. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDeploymentStatusList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDeploymentStatusList.json */ async function networkManagerDeploymentStatusList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts index 84c206516a48..309d6defd211 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network manager routing configuration. * * @summary Creates or updates a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationPut.json */ async function createNetworkManagerRoutingConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsDeleteSample.ts index 5e6f6f01f7f5..3e99f30860da 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager routing configuration. * * @summary Deletes a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationDelete.json */ async function deleteNetworkManagerRoutingConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsGetSample.ts index d0b75c091173..c6555a2bf0ce 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a network manager routing configuration. * * @summary Retrieves a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationGet.json */ async function getRoutingConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsListSample.ts index 6581e5b3ebba..ff283f7aba91 100644 --- a/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagerRoutingConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the network manager routing configurations in a network manager, in a paginated format. * * @summary Lists all the network manager routing configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationList.json */ async function listRoutingConfigurationsInANetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkManagersCreateOrUpdateSample.ts index 8b586cb6ae0e..88b929bdbc88 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a Network Manager. * * @summary Creates or updates a Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPut.json */ async function putNetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagersDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkManagersDeleteSample.ts index 56b21998bac2..724c5afbcd7f 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager. * * @summary Deletes a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDelete.json */ async function networkManagersDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagersGetSample.ts b/sdk/network/arm-network/samples-dev/networkManagersGetSample.ts index 288fd95a96ef..6f95e0eb2de9 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Network Manager. * * @summary Gets the specified Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGet.json */ async function networkManagersGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagersListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/networkManagersListBySubscriptionSample.ts index d8449e3faff8..574879ed63bb 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network managers in a subscription. * * @summary List all network managers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerListAll.json */ async function networkManagersList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagersListSample.ts b/sdk/network/arm-network/samples-dev/networkManagersListSample.ts index ccbf3b78c7ed..760c87ef7615 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List network managers in a resource group. * * @summary List network managers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerList.json */ async function listNetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkManagersPatchSample.ts b/sdk/network/arm-network/samples-dev/networkManagersPatchSample.ts index 6a6454dcf446..3da3fa7c6e0e 100644 --- a/sdk/network/arm-network/samples-dev/networkManagersPatchSample.ts +++ b/sdk/network/arm-network/samples-dev/networkManagersPatchSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Patch NetworkManager. * * @summary Patch NetworkManager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPatch.json */ async function networkManagesPatch() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/networkProfilesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesCreateOrUpdateSample.ts index 37485cc92137..5e9eefd98123 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network profile. * * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileCreateConfigOnly.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileCreateConfigOnly.json */ async function createNetworkProfileDefaults() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkProfilesDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesDeleteSample.ts index 4c10bdc31722..ab4dd6daecba 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network profile. * * @summary Deletes the specified network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileDelete.json */ async function deleteNetworkProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkProfilesGetSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesGetSample.ts index 42f6c2f33048..79e85338b518 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network profile in a specified resource group. * * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetConfigOnly.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetConfigOnly.json */ async function getNetworkProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getNetworkProfile() { * This sample demonstrates how to Gets the specified network profile in a specified resource group. * * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetWithContainerNic.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetWithContainerNic.json */ async function getNetworkProfileWithContainerNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkProfilesListAllSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesListAllSample.ts index 97b3ee03d615..156eace954aa 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the network profiles in a subscription. * * @summary Gets all the network profiles in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileListAll.json */ async function listAllNetworkProfiles() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkProfilesListSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesListSample.ts index 64556a54c1ed..5c5169fe0cc9 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network profiles in a resource group. * * @summary Gets all network profiles in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileList.json */ async function listResourceGroupNetworkProfiles() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkProfilesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkProfilesUpdateTagsSample.ts index 2e67031baffb..b4105d68b5cb 100644 --- a/sdk/network/arm-network/samples-dev/networkProfilesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkProfilesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates network profile tags. * * @summary Updates network profile tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileUpdateTags.json */ async function updateNetworkProfileTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsCreateOrUpdateSample.ts index b5fc8d545cf2..7f294f4de0d4 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network security group in the specified resource group. * * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreate.json */ async function createNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -42,7 +42,7 @@ async function createNetworkSecurityGroup() { * This sample demonstrates how to Creates or updates a network security group in the specified resource group. * * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreateWithRule.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreateWithRule.json */ async function createNetworkSecurityGroupWithRule() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsDeleteSample.ts index 30d134db56d0..8146f46b4700 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network security group. * * @summary Deletes the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupDelete.json */ async function deleteNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsGetSample.ts index 27e52c50112e..bff4657d743c 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network security group. * * @summary Gets the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupGet.json */ async function getNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsListAllSample.ts index 2fb219678152..efaaf8569b90 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network security groups in a subscription. * * @summary Gets all network security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupListAll.json */ async function listAllNetworkSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsListSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsListSample.ts index dc688293653d..07b33f7e0f8d 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network security groups in a resource group. * * @summary Gets all network security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupList.json */ async function listNetworkSecurityGroupsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkSecurityGroupsUpdateTagsSample.ts index ab29fc897f79..44ccf70e6075 100644 --- a/sdk/network/arm-network/samples-dev/networkSecurityGroupsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkSecurityGroupsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a network security group tags. * * @summary Updates a network security group tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupUpdateTags.json */ async function updateNetworkSecurityGroupTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts index c81048cedfc3..f570e068ceb8 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' * * @summary Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionPut.json */ async function networkVirtualApplianceConnectionPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsDeleteSample.ts index 27574d8b2b6f..361bfaeb49ab 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a NVA connection. * * @summary Deletes a NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionDelete.json */ async function networkVirtualApplianceConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsGetSample.ts index cde02784f710..bd22ef9a2d11 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of specified NVA connection. * * @summary Retrieves the details of specified NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionGet.json */ async function networkVirtualApplianceConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsListSample.ts index bab78a26451e..ba04cb6674c2 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualApplianceConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists NetworkVirtualApplianceConnections under the NVA. * * @summary Lists NetworkVirtualApplianceConnections under the NVA. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionList.json */ async function networkVirtualApplianceConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesCreateOrUpdateSample.ts index e96c93539f86..6cfec40e55b0 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. * * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualAppliancePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualAppliancePut.json */ async function createNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -96,7 +96,7 @@ async function createNetworkVirtualAppliance() { * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. * * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSaaSPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSaaSPut.json */ async function createSaaSNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesDeleteSample.ts index 72d008524e7a..419afbf71042 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Network Virtual Appliance. * * @summary Deletes the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceDelete.json */ async function deleteNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetSample.ts index 8d42a4576569..6eb91cab6be8 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Network Virtual Appliance. * * @summary Gets the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceGet.json */ async function getNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListByResourceGroupSample.ts index bcd196069c5f..a3d2befec1d6 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Network Virtual Appliances in a resource group. * * @summary Lists all Network Virtual Appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json */ async function listAllNetworkVirtualApplianceForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListSample.ts index 2e1389f36fd5..563b84759783 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Network Virtual Appliances in a subscription. * * @summary Gets all Network Virtual Appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListBySubscription.json */ async function listAllNetworkVirtualAppliancesForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesRestartSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesRestartSample.ts index 4d0add9a9e0a..01237b2c178c 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesRestartSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesRestartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. * * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceEmptyRestart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceEmptyRestart.json */ async function restartAllNetworkVirtualApplianceVMSInVMScaleSet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function restartAllNetworkVirtualApplianceVMSInVMScaleSet() { * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. * * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSpecificRestart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSpecificRestart.json */ async function restartSpecificNetworkVirtualApplianceVMSInVMScaleSet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesUpdateTagsSample.ts index 0afbde04a16c..10d8b5a7ba54 100644 --- a/sdk/network/arm-network/samples-dev/networkVirtualAppliancesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkVirtualAppliancesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a Network Virtual Appliance. * * @summary Updates a Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceUpdateTags.json */ async function updateNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersCheckConnectivitySample.ts b/sdk/network/arm-network/samples-dev/networkWatchersCheckConnectivitySample.ts index 03c96a014d42..079996d37381 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersCheckConnectivitySample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersCheckConnectivitySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. * * @summary Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectivityCheck.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectivityCheck.json */ async function checkConnectivity() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersCreateOrUpdateSample.ts index 72644bff22e7..3ef7816f1abf 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network watcher in the specified resource group. * * @summary Creates or updates a network watcher in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherCreate.json */ async function createNetworkWatcher() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersDeleteSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersDeleteSample.ts index 007b8a686262..53c64b52d9ca 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network watcher resource. * * @summary Deletes the specified network watcher resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherDelete.json */ async function deleteNetworkWatcher() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetAzureReachabilityReportSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetAzureReachabilityReportSample.ts index 6b6165b41ef3..5ad011431f70 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetAzureReachabilityReportSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetAzureReachabilityReportSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. * * @summary NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json */ async function getAzureReachabilityReport() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetFlowLogStatusSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetFlowLogStatusSample.ts index 03a48d13ef56..4064bb102aa2 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetFlowLogStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetFlowLogStatusSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Queries status of flow log and traffic analytics (optional) on a specified resource. * * @summary Queries status of flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogStatusQuery.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogStatusQuery.json */ async function getFlowLogStatus() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetNetworkConfigurationDiagnosticSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetNetworkConfigurationDiagnosticSample.ts index a222e89ead42..0671151ec22f 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetNetworkConfigurationDiagnosticSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetNetworkConfigurationDiagnosticSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. * * @summary Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json */ async function networkConfigurationDiagnostic() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetNextHopSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetNextHopSample.ts index e332e7a83668..90683c404c71 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetNextHopSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetNextHopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the next hop from the specified VM. * * @summary Gets the next hop from the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNextHopGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNextHopGet.json */ async function getNextHop() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetSample.ts index 8f6f0b7efc68..fae12909c84b 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network watcher by resource group. * * @summary Gets the specified network watcher by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherGet.json */ async function getNetworkWatcher() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetTopologySample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetTopologySample.ts index 242267ebbbbf..de81bb09cde6 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetTopologySample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetTopologySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the current network topology by resource group. * * @summary Gets the current network topology by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTopologyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTopologyGet.json */ async function getTopology() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingResultSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingResultSample.ts index 1bd2b532385f..2f4f21895761 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingResultSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingResultSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Get the last completed troubleshooting result on a specified resource. * * @summary Get the last completed troubleshooting result on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootResultQuery.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootResultQuery.json */ async function getTroubleshootResult() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingSample.ts index 7a3f43abe1e7..ea4571242d18 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetTroubleshootingSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Initiate troubleshooting on a specified resource. * * @summary Initiate troubleshooting on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootGet.json */ async function getTroubleshooting() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersGetVMSecurityRulesSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersGetVMSecurityRulesSample.ts index 54b7b8a9d6cd..5252554b1e7b 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersGetVMSecurityRulesSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersGetVMSecurityRulesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the configured and effective security group rules on the specified VM. * * @summary Gets the configured and effective security group rules on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherSecurityGroupViewGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherSecurityGroupViewGet.json */ async function getSecurityGroupView() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersListAllSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersListAllSample.ts index ed542549d129..374508939e5b 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network watchers by subscription. * * @summary Gets all network watchers by subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherListAll.json */ async function listAllNetworkWatchers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersListAvailableProvidersSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersListAvailableProvidersSample.ts index b9c3220825a0..84788f2ba25c 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersListAvailableProvidersSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersListAvailableProvidersSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. * * @summary NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAvailableProvidersListGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAvailableProvidersListGet.json */ async function getAvailableProvidersList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersListSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersListSample.ts index 5f3df179bb90..2290b6ff9932 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersListSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network watchers by resource group. * * @summary Gets all network watchers by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherList.json */ async function listNetworkWatchers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersSetFlowLogConfigurationSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersSetFlowLogConfigurationSample.ts index 801bbee7746e..e4bc4eeeae8b 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersSetFlowLogConfigurationSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersSetFlowLogConfigurationSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Configures flow log and traffic analytics (optional) on a specified resource. * * @summary Configures flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogConfigure.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogConfigure.json */ async function configureFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersUpdateTagsSample.ts index fc1ccce03ece..ba74e2bc8420 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a network watcher tags. * * @summary Updates a network watcher tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherUpdateTags.json */ async function updateNetworkWatcherTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/networkWatchersVerifyIPFlowSample.ts b/sdk/network/arm-network/samples-dev/networkWatchersVerifyIPFlowSample.ts index f90533ff1c1a..dfe1b2935f01 100644 --- a/sdk/network/arm-network/samples-dev/networkWatchersVerifyIPFlowSample.ts +++ b/sdk/network/arm-network/samples-dev/networkWatchersVerifyIPFlowSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Verify IP flow from the specified VM to a location given the currently configured NSG rules. * * @summary Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherIpFlowVerify.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherIpFlowVerify.json */ async function ipFlowVerify() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/operationsListSample.ts b/sdk/network/arm-network/samples-dev/operationsListSample.ts index 04c19e1266b2..6889a8153e51 100644 --- a/sdk/network/arm-network/samples-dev/operationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all of the available Network Rest API operations. * * @summary Lists all of the available Network Rest API operations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/OperationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/OperationList.json */ async function getAListOfOperationsForAResourceProvider() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysCreateOrUpdateSample.ts index 776c848ef4dc..05fc46afd668 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. * * @summary Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayPut.json */ async function p2SVpnGatewayPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDeleteSample.ts index d90908d6651b..904b1828889f 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a virtual wan p2s vpn gateway. * * @summary Deletes a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayDelete.json */ async function p2SVpnGatewayDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts index 823c522a6ac4..c147a5ef71c5 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. * * @summary Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json */ async function disconnectVpnConnectionsFromP2SVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGenerateVpnProfileSample.ts index 1fc5600ae625..af3e972eb5dc 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGenerateVpnProfileSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGenerateVpnProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. * * @summary Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json */ async function generateP2SVpnGatewayVpnprofile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts index 85b978a86a28..3a84745ca447 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. * * @summary Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json */ async function p2SVpnGatewayGetConnectionHealthDetailed() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts index d0a86fe620d6..2e7b8d807206 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. * * @summary Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealth.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealth.json */ async function p2SVpnGatewayGetConnectionHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetSample.ts index 6d4af0f55113..2b05dc0faa80 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a virtual wan p2s vpn gateway. * * @summary Retrieves the details of a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGet.json */ async function p2SVpnGatewayGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListByResourceGroupSample.ts index a6ebee238abf..45722424ece4 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the P2SVpnGateways in a resource group. * * @summary Lists all the P2SVpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayListByResourceGroup.json */ async function p2SVpnGatewayListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListSample.ts index 3e951bc92c6a..045420aa329e 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the P2SVpnGateways in a subscription. * * @summary Lists all the P2SVpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayList.json */ async function p2SVpnGatewayListBySubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysResetSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysResetSample.ts index 52c9000e8007..472c57e5b5f0 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysResetSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysResetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the primary of the p2s vpn gateway in the specified resource group. * * @summary Resets the primary of the p2s vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayReset.json */ async function resetP2SVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysUpdateTagsSample.ts index b19bd68e15d4..ba37bd4999c3 100644 --- a/sdk/network/arm-network/samples-dev/p2SVpnGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/p2SVpnGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates virtual wan p2s vpn gateway tags. * * @summary Updates virtual wan p2s vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayUpdateTags.json */ async function p2SVpnGatewayUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/packetCapturesCreateSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesCreateSample.ts index deb5fa0b41ff..0713214f69e4 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesCreateSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesCreateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create and start a packet capture on the specified VM. * * @summary Create and start a packet capture on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureCreate.json */ async function createPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/packetCapturesDeleteSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesDeleteSample.ts index dafb1ee181e1..ee7c981f5a42 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified packet capture session. * * @summary Deletes the specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureDelete.json */ async function deletePacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/packetCapturesGetSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesGetSample.ts index 788518d85905..8a8b2d0e79ce 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a packet capture session by name. * * @summary Gets a packet capture session by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureGet.json */ async function getPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/packetCapturesGetStatusSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesGetStatusSample.ts index ecf1a3140da6..99ab8ac61573 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesGetStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesGetStatusSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Query the status of a running packet capture session. * * @summary Query the status of a running packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json */ async function queryPacketCaptureStatus() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/packetCapturesListSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesListSample.ts index 4bcfa8239b70..0c7cd7279757 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesListSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all packet capture sessions within the specified resource group. * * @summary Lists all packet capture sessions within the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCapturesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCapturesList.json */ async function listPacketCaptures() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/packetCapturesStopSample.ts b/sdk/network/arm-network/samples-dev/packetCapturesStopSample.ts index 485c9ae75fa0..0c10f2702da1 100644 --- a/sdk/network/arm-network/samples-dev/packetCapturesStopSample.ts +++ b/sdk/network/arm-network/samples-dev/packetCapturesStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Stops a specified packet capture session. * * @summary Stops a specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureStop.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureStop.json */ async function stopPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsGetSample.ts index f80297bc8c8c..db5af640e21d 100644 --- a/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. * * @summary Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionGet.json */ async function peerExpressRouteCircuitConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsListSample.ts index fe95cfd30cf4..699f3cc44235 100644 --- a/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/peerExpressRouteCircuitConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all global reach peer connections associated with a private peering in an express route circuit. * * @summary Gets all global reach peer connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionList.json */ async function listPeerExpressRouteCircuitConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsCreateOrUpdateSample.ts index cc1c039ebc21..124750bf8b75 100644 --- a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a private dns zone group in the specified private endpoint. * * @summary Creates or updates a private dns zone group in the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json */ async function createPrivateDnsZoneGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsDeleteSample.ts b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsDeleteSample.ts index 35f7a951d482..b015a1b97fec 100644 --- a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private dns zone group. * * @summary Deletes the specified private dns zone group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json */ async function deletePrivateDnsZoneGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsGetSample.ts b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsGetSample.ts index 176d32315eb4..df9d004da913 100644 --- a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private dns zone group resource by specified private dns zone group name. * * @summary Gets the private dns zone group resource by specified private dns zone group name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupGet.json */ async function getPrivateDnsZoneGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsListSample.ts b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsListSample.ts index 19d361e876e5..19f145c13bd4 100644 --- a/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsListSample.ts +++ b/sdk/network/arm-network/samples-dev/privateDnsZoneGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private dns zone groups in a private endpoint. * * @summary Gets all private dns zone groups in a private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupList.json */ async function listPrivateEndpointsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsCreateOrUpdateSample.ts index ce58bd30e891..dbe60802f0a8 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. * * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreate.json */ async function createPrivateEndpoint() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -61,7 +61,7 @@ async function createPrivateEndpoint() { * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. * * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreateWithASG.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreateWithASG.json */ async function createPrivateEndpointWithApplicationSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -100,7 +100,7 @@ async function createPrivateEndpointWithApplicationSecurityGroups() { * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. * * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreateForManualApproval.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreateForManualApproval.json */ async function createPrivateEndpointWithManualApprovalConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsDeleteSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsDeleteSample.ts index 2d684bf70bb9..8acf5ecf9b27 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private endpoint. * * @summary Deletes the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDelete.json */ async function deletePrivateEndpoint() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsGetSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsGetSample.ts index 7402c9ea2ca8..3e1f0886e7c1 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private endpoint by resource group. * * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGet.json */ async function getPrivateEndpoint() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -37,7 +37,7 @@ async function getPrivateEndpoint() { * This sample demonstrates how to Gets the specified private endpoint by resource group. * * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGetWithASG.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGetWithASG.json */ async function getPrivateEndpointWithApplicationSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -56,7 +56,7 @@ async function getPrivateEndpointWithApplicationSecurityGroups() { * This sample demonstrates how to Gets the specified private endpoint by resource group. * * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGetForManualApproval.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGetForManualApproval.json */ async function getPrivateEndpointWithManualApprovalConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsListBySubscriptionSample.ts index 02e27d1573d3..bd20ef1f7c1d 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private endpoints in a subscription. * * @summary Gets all private endpoints in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointListAll.json */ async function listAllPrivateEndpoints() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateEndpointsListSample.ts b/sdk/network/arm-network/samples-dev/privateEndpointsListSample.ts index 0004d504ed4a..a56b839b40b1 100644 --- a/sdk/network/arm-network/samples-dev/privateEndpointsListSample.ts +++ b/sdk/network/arm-network/samples-dev/privateEndpointsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private endpoints in a resource group. * * @summary Gets all private endpoints in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointList.json */ async function listPrivateEndpointsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts index f7e01cbe01c9..64ea3773b2de 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether the subscription is visible to private link service in the specified resource group. * * @summary Checks whether the subscription is visible to private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json */ async function checkPrivateLinkServiceVisibility() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts index c87d1f395a51..a7170b7f2558 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether the subscription is visible to private link service. * * @summary Checks whether the subscription is visible to private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibility.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibility.json */ async function checkPrivateLinkServiceVisibility() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesCreateOrUpdateSample.ts index 2db9ed86a534..78bf1aac0afd 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an private link service in the specified resource group. * * @summary Creates or updates an private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceCreate.json */ async function createPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesDeletePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesDeletePrivateEndpointConnectionSample.ts index bf49669495f9..4c82f78ee540 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesDeletePrivateEndpointConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesDeletePrivateEndpointConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete private end point connection for a private link service in a subscription. * * @summary Delete private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json */ async function deletePrivateEndPointConnectionForAPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesDeleteSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesDeleteSample.ts index 0e64be953e10..6e067039d8ae 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private link service. * * @summary Deletes the specified private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDelete.json */ async function deletePrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesGetPrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesGetPrivateEndpointConnectionSample.ts index 249744f4fe0a..344bf3b750ca 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesGetPrivateEndpointConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesGetPrivateEndpointConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specific private end point connection by specific private link service in the resource group. * * @summary Get the specific private end point connection by specific private link service in the resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json */ async function getPrivateEndPointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesGetSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesGetSample.ts index 28bd00110afc..fe2333f3518b 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private link service by resource group. * * @summary Gets the specified private link service by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGet.json */ async function getPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts index bc439579b503..f033a66a3858 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. * * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json */ async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts index 0c6e62863336..4736237e0dcb 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. * * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesGet.json */ async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListBySubscriptionSample.ts index 5fe6c681e68d..22f849798ce3 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private link service in a subscription. * * @summary Gets all private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListAll.json */ async function listAllPrivateListService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListPrivateEndpointConnectionsSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListPrivateEndpointConnectionsSample.ts index b218167c73d7..fd509c7bd6bd 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListPrivateEndpointConnectionsSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListPrivateEndpointConnectionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private end point connections for a specific private link service. * * @summary Gets all private end point connections for a specific private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json */ async function listPrivateLinkServiceInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesListSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesListSample.ts index 61ebb8e38a47..8f9711dcc4a8 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesListSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private link services in a resource group. * * @summary Gets all private link services in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceList.json */ async function listPrivateLinkServiceInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples-dev/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts index f378301281d4..b8f0f2c35e82 100644 --- a/sdk/network/arm-network/samples-dev/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Approve or reject private end point connection for a private link service in a subscription. * * @summary Approve or reject private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json */ async function approveOrRejectPrivateEndPointConnectionForAPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesCreateOrUpdateSample.ts index 75455076ff12..d217f302de96 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDns.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDns.json */ async function createPublicIPAddressDns() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -42,7 +42,7 @@ async function createPublicIPAddressDns() { * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json */ async function createPublicIPAddressDnsWithDomainNameLabelScope() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -69,7 +69,7 @@ async function createPublicIPAddressDnsWithDomainNameLabelScope() { * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateCustomizedValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateCustomizedValues.json */ async function createPublicIPAddressAllocationMethod() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -96,7 +96,7 @@ async function createPublicIPAddressAllocationMethod() { * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDefaults.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDefaults.json */ async function createPublicIPAddressDefaults() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesDdosProtectionStatusSample.ts index 02900eb4ebf0..e27c9c328a0a 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesDdosProtectionStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesDdosProtectionStatusSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the Ddos Protection Status of a Public IP Address * * @summary Gets the Ddos Protection Status of a Public IP Address - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json */ async function getDdosProtectionStatusOfAPublicIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesDeleteSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesDeleteSample.ts index 3d41d4d67808..98638c8cfa88 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified public IP address. * * @summary Deletes the specified public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressDelete.json */ async function deletePublicIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIpaddressSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIpaddressSample.ts index 54cd5f9009a6..f44b87435749 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIpaddressSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesGetCloudServicePublicIpaddressSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified public IP address in a cloud service. * * @summary Get the specified public IP address in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpGet.json */ async function getVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesGetSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesGetSample.ts index 0debe5e914a5..c3a246096b01 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified public IP address in a specified resource group. * * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGet.json */ async function getPublicIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts index ea7263e174a9..0cb3490dc873 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified public IP address in a virtual machine scale set. * * @summary Get the specified public IP address in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpGet.json */ async function getVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListAllSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListAllSample.ts index 885eb3caf675..00fb8d4532a5 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the public IP addresses in a subscription. * * @summary Gets all the public IP addresses in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressListAll.json */ async function listAllPublicIPAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIpaddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIpaddressesSample.ts index c682283a284b..d81c0593cfcc 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIpaddressesSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServicePublicIpaddressesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all public IP addresses on a cloud service level. * * @summary Gets information about all public IP addresses on a cloud service level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpListAll.json */ async function listVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts index bf6f351ca560..4ac70323920e 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all public IP addresses in a role instance IP configuration in a cloud service. * * @summary Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstancePublicIpList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstancePublicIpList.json */ async function listVmssvmPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListSample.ts index 196143d898cd..6f08c4ba51e9 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all public IP addresses in a resource group. * * @summary Gets all public IP addresses in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressList.json */ async function listResourceGroupPublicIPAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts index b98765ec2185..21e663fb4c89 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all public IP addresses on a virtual machine scale set level. * * @summary Gets information about all public IP addresses on a virtual machine scale set level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpListAll.json */ async function listVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts index c8c5715e661d..3e07e972bf92 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. * * @summary Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmPublicIpList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmPublicIpList.json */ async function listVmssvmPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPAddressesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/publicIPAddressesUpdateTagsSample.ts index 6d852ab98540..150ab252a96f 100644 --- a/sdk/network/arm-network/samples-dev/publicIPAddressesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPAddressesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates public IP address tags. * * @summary Updates public IP address tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressUpdateTags.json */ async function updatePublicIPAddressTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesCreateOrUpdateSample.ts index 3d3f89258519..a4b6d8483fdc 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. * * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateCustomizedValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateCustomizedValues.json */ async function createPublicIPPrefixAllocationMethod() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -44,7 +44,7 @@ async function createPublicIPPrefixAllocationMethod() { * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. * * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateDefaults.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateDefaults.json */ async function createPublicIPPrefixDefaults() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesDeleteSample.ts index 463fc50ff3a9..a85cd2284243 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified public IP prefix. * * @summary Deletes the specified public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixDelete.json */ async function deletePublicIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesGetSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesGetSample.ts index de85663b77cd..428599c82cc0 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. * * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixGet.json */ async function getPublicIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesListAllSample.ts index 9f35083159e4..1f6c489cece2 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the public IP prefixes in a subscription. * * @summary Gets all the public IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixListAll.json */ async function listAllPublicIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesListSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesListSample.ts index 63243fba5d24..22fe8edf4bf2 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesListSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all public IP prefixes in a resource group. * * @summary Gets all public IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixList.json */ async function listResourceGroupPublicIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/publicIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/publicIPPrefixesUpdateTagsSample.ts index cf3dd2fc9434..262a9fa4657f 100644 --- a/sdk/network/arm-network/samples-dev/publicIPPrefixesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/publicIPPrefixesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates public IP prefix tags. * * @summary Updates public IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixUpdateTags.json */ async function updatePublicIPPrefixTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/putBastionShareableLinkSample.ts b/sdk/network/arm-network/samples-dev/putBastionShareableLinkSample.ts index 7da2af93cccb..20238395ef66 100644 --- a/sdk/network/arm-network/samples-dev/putBastionShareableLinkSample.ts +++ b/sdk/network/arm-network/samples-dev/putBastionShareableLinkSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a Bastion Shareable Links for all the VMs specified in the request. * * @summary Creates a Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkCreate.json */ async function createBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsCreateSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsCreateSample.ts new file mode 100644 index 000000000000..3f0e9564fb61 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsCreateSample.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ReachabilityAnalysisIntent, + NetworkManagementClient, +} from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates Reachability Analysis Intent. + * + * @summary Creates Reachability Analysis Intent. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentPut.json + */ +async function reachabilityAnalysisIntentCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisIntentName = "testAnalysisIntentName"; + const body: ReachabilityAnalysisIntent = { + properties: { + description: "A sample reachability analysis intent", + destinationResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", + ipTraffic: { + destinationIps: ["10.4.0.1"], + destinationPorts: ["0"], + protocols: ["Any"], + sourceIps: ["10.4.0.0"], + sourcePorts: ["0"], + }, + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisIntents.create( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + body, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisIntentCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsDeleteSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsDeleteSample.ts new file mode 100644 index 000000000000..e1537481c689 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes Reachability Analysis Intent. + * + * @summary Deletes Reachability Analysis Intent. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentDelete.json + */ +async function reachabilityAnalysisIntentDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisIntentName = "testAnalysisIntent"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisIntents.delete( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisIntentDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsGetSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsGetSample.ts new file mode 100644 index 000000000000..3b2a685a11a1 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsGetSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the Reachability Analysis Intent. + * + * @summary Get the Reachability Analysis Intent. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentGet.json + */ +async function reachabilityAnalysisIntentGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisIntentName = "testAnalysisIntentName"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisIntents.get( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisIntentGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsListSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsListSample.ts new file mode 100644 index 000000000000..8ad44892f6ae --- /dev/null +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisIntentsListSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Reachability Analysis Intents . + * + * @summary Gets list of Reachability Analysis Intents . + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentList.json + */ +async function reachabilityAnalysisIntentList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testVerifierWorkspace1"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reachabilityAnalysisIntents.list( + resourceGroupName, + networkManagerName, + workspaceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + reachabilityAnalysisIntentList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsCreateSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsCreateSample.ts new file mode 100644 index 000000000000..78b14e45b3c3 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsCreateSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ReachabilityAnalysisRun, + NetworkManagementClient, +} from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates Reachability Analysis Runs. + * + * @summary Creates Reachability Analysis Runs. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunPut.json + */ +async function reachabilityAnalysisRunCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisRunName = "testAnalysisRunName"; + const body: ReachabilityAnalysisRun = { + properties: { + description: "A sample reachability analysis run", + intentId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisRuns.create( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + body, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisRunCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsDeleteSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsDeleteSample.ts new file mode 100644 index 000000000000..20f2c3527098 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes Reachability Analysis Run. + * + * @summary Deletes Reachability Analysis Run. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunDelete.json + */ +async function reachabilityAnalysisRunDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisRunName = "testAnalysisRun"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisRuns.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisRunDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsGetSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsGetSample.ts new file mode 100644 index 000000000000..4471b06d7402 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsGetSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets Reachability Analysis Run. + * + * @summary Gets Reachability Analysis Run. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunGet.json + */ +async function reachabilityAnalysisRunGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisRunName = "testAnalysisRunName"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisRuns.get( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisRunGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsListSample.ts b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsListSample.ts new file mode 100644 index 000000000000..a2c4eba6fef4 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/reachabilityAnalysisRunsListSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Reachability Analysis Runs. + * + * @summary Gets list of Reachability Analysis Runs. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunList.json + */ +async function reachabilityAnalysisRunList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testVerifierWorkspace1"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reachabilityAnalysisRuns.list( + resourceGroupName, + networkManagerName, + workspaceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + reachabilityAnalysisRunList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/resourceNavigationLinksListSample.ts b/sdk/network/arm-network/samples-dev/resourceNavigationLinksListSample.ts index b3393cca92f9..e10a5f50c4b6 100644 --- a/sdk/network/arm-network/samples-dev/resourceNavigationLinksListSample.ts +++ b/sdk/network/arm-network/samples-dev/resourceNavigationLinksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of resource navigation links for a subnet. * * @summary Gets a list of resource navigation links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json */ async function getResourceNavigationLinks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFilterRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routeFilterRulesCreateOrUpdateSample.ts index 16be6da83a15..bee32c83f044 100644 --- a/sdk/network/arm-network/samples-dev/routeFilterRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFilterRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a route in the specified route filter. * * @summary Creates or updates a route in the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleCreate.json */ async function routeFilterRuleCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFilterRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/routeFilterRulesDeleteSample.ts index 0d983f08defa..85b3b69a9e3b 100644 --- a/sdk/network/arm-network/samples-dev/routeFilterRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFilterRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified rule from a route filter. * * @summary Deletes the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleDelete.json */ async function routeFilterRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFilterRulesGetSample.ts b/sdk/network/arm-network/samples-dev/routeFilterRulesGetSample.ts index 23138a041f1d..fdd616f16456 100644 --- a/sdk/network/arm-network/samples-dev/routeFilterRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFilterRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified rule from a route filter. * * @summary Gets the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleGet.json */ async function routeFilterRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFilterRulesListByRouteFilterSample.ts b/sdk/network/arm-network/samples-dev/routeFilterRulesListByRouteFilterSample.ts index a97c9b82b8d2..c1bdde102694 100644 --- a/sdk/network/arm-network/samples-dev/routeFilterRulesListByRouteFilterSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFilterRulesListByRouteFilterSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all RouteFilterRules in a route filter. * * @summary Gets all RouteFilterRules in a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleListByRouteFilter.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleListByRouteFilter.json */ async function routeFilterRuleListByRouteFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFiltersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersCreateOrUpdateSample.ts index 625b841c6170..223b44b45bb3 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a route filter in a specified resource group. * * @summary Creates or updates a route filter in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterCreate.json */ async function routeFilterCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFiltersDeleteSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersDeleteSample.ts index 2804b7d656b0..cd1fb60007d8 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified route filter. * * @summary Deletes the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterDelete.json */ async function routeFilterDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFiltersGetSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersGetSample.ts index 5228400265c4..73b82f879fd5 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified route filter. * * @summary Gets the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterGet.json */ async function routeFilterGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFiltersListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersListByResourceGroupSample.ts index 85101beb5387..0138677d3c70 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route filters in a resource group. * * @summary Gets all route filters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterListByResourceGroup.json */ async function routeFilterListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFiltersListSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersListSample.ts index 08796fbe1994..aec51ee515f3 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersListSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route filters in a subscription. * * @summary Gets all route filters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterList.json */ async function routeFilterList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeFiltersUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/routeFiltersUpdateTagsSample.ts index 73b7b9238dc2..ca7f50dd87bd 100644 --- a/sdk/network/arm-network/samples-dev/routeFiltersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/routeFiltersUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of a route filter. * * @summary Updates tags of a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterUpdateTags.json */ async function updateRouteFilterTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeMapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routeMapsCreateOrUpdateSample.ts index eb3a36a47535..a4c9095954cf 100644 --- a/sdk/network/arm-network/samples-dev/routeMapsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routeMapsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a RouteMap if it doesn't exist else updates the existing one. * * @summary Creates a RouteMap if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapPut.json */ async function routeMapPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeMapsDeleteSample.ts b/sdk/network/arm-network/samples-dev/routeMapsDeleteSample.ts index b23f00457690..265a6896714b 100644 --- a/sdk/network/arm-network/samples-dev/routeMapsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routeMapsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a RouteMap. * * @summary Deletes a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapDelete.json */ async function routeMapDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeMapsGetSample.ts b/sdk/network/arm-network/samples-dev/routeMapsGetSample.ts index 6319ec72e000..7ade838633b7 100644 --- a/sdk/network/arm-network/samples-dev/routeMapsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routeMapsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a RouteMap. * * @summary Retrieves the details of a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapGet.json */ async function routeMapGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeMapsListSample.ts b/sdk/network/arm-network/samples-dev/routeMapsListSample.ts index bddda68b3797..ab038d0e3a8d 100644 --- a/sdk/network/arm-network/samples-dev/routeMapsListSample.ts +++ b/sdk/network/arm-network/samples-dev/routeMapsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all RouteMaps. * * @summary Retrieves the details of all RouteMaps. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapList.json */ async function routeMapList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routeTablesCreateOrUpdateSample.ts index c7291094b57a..61e4d7e31647 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or updates a route table in a specified resource group. * * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreate.json */ async function createRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +39,7 @@ async function createRouteTable() { * This sample demonstrates how to Create or updates a route table in a specified resource group. * * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreateWithRoute.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreateWithRoute.json */ async function createRouteTableWithRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeTablesDeleteSample.ts b/sdk/network/arm-network/samples-dev/routeTablesDeleteSample.ts index 5bf5f08896e8..401f8b72d0ad 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified route table. * * @summary Deletes the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableDelete.json */ async function deleteRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeTablesGetSample.ts b/sdk/network/arm-network/samples-dev/routeTablesGetSample.ts index 33031913ff34..e38fd13936b2 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified route table. * * @summary Gets the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableGet.json */ async function getRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeTablesListAllSample.ts b/sdk/network/arm-network/samples-dev/routeTablesListAllSample.ts index 3c195ce9773c..55b85a14f2ad 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route tables in a subscription. * * @summary Gets all route tables in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableListAll.json */ async function listAllRouteTables() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeTablesListSample.ts b/sdk/network/arm-network/samples-dev/routeTablesListSample.ts index b29e72e6f65f..943fe8e518be 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesListSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route tables in a resource group. * * @summary Gets all route tables in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableList.json */ async function listRouteTablesInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routeTablesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/routeTablesUpdateTagsSample.ts index 67da8420599e..aebea18ec324 100644 --- a/sdk/network/arm-network/samples-dev/routeTablesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/routeTablesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a route table tags. * * @summary Updates a route table tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableUpdateTags.json */ async function updateRouteTableTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routesCreateOrUpdateSample.ts index e83ab2d3e299..ba8e6c787e61 100644 --- a/sdk/network/arm-network/samples-dev/routesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a route in the specified route table. * * @summary Creates or updates a route in the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteCreate.json */ async function createRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routesDeleteSample.ts b/sdk/network/arm-network/samples-dev/routesDeleteSample.ts index 3d045c05f6f5..2dc318c49a2b 100644 --- a/sdk/network/arm-network/samples-dev/routesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified route from a route table. * * @summary Deletes the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteDelete.json */ async function deleteRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routesGetSample.ts b/sdk/network/arm-network/samples-dev/routesGetSample.ts index 399d10209cc1..628fc3bc5a0c 100644 --- a/sdk/network/arm-network/samples-dev/routesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified route from a route table. * * @summary Gets the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteGet.json */ async function getRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routesListSample.ts b/sdk/network/arm-network/samples-dev/routesListSample.ts index ab7988c3434e..1fd458b1f69e 100644 --- a/sdk/network/arm-network/samples-dev/routesListSample.ts +++ b/sdk/network/arm-network/samples-dev/routesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all routes in a route table. * * @summary Gets all routes in a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteList.json */ async function listRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routingIntentCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routingIntentCreateOrUpdateSample.ts index fe62bb5ed4fb..6ddc8de1781c 100644 --- a/sdk/network/arm-network/samples-dev/routingIntentCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routingIntentCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. * * @summary Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentPut.json */ async function routeTablePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routingIntentDeleteSample.ts b/sdk/network/arm-network/samples-dev/routingIntentDeleteSample.ts index c1ced8650347..978375631d0f 100644 --- a/sdk/network/arm-network/samples-dev/routingIntentDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routingIntentDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a RoutingIntent. * * @summary Deletes a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentDelete.json */ async function routeTableDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routingIntentGetSample.ts b/sdk/network/arm-network/samples-dev/routingIntentGetSample.ts index ee5f5b272bfd..6e7056a49615 100644 --- a/sdk/network/arm-network/samples-dev/routingIntentGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routingIntentGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a RoutingIntent. * * @summary Retrieves the details of a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentGet.json */ async function routeTableGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routingIntentListSample.ts b/sdk/network/arm-network/samples-dev/routingIntentListSample.ts index a2734bfabbc9..4bfae67a3908 100644 --- a/sdk/network/arm-network/samples-dev/routingIntentListSample.ts +++ b/sdk/network/arm-network/samples-dev/routingIntentListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all RoutingIntent child resources of the VirtualHub. * * @summary Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentList.json */ async function routingIntentList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/routingRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routingRuleCollectionsCreateOrUpdateSample.ts index 59c5c876166d..1a5c039751d1 100644 --- a/sdk/network/arm-network/samples-dev/routingRuleCollectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRuleCollectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a routing rule collection. * * @summary Creates or updates a routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json */ async function createOrUpdateARoutingRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/routingRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/routingRuleCollectionsDeleteSample.ts index 0d51b24db738..891f9fd95c45 100644 --- a/sdk/network/arm-network/samples-dev/routingRuleCollectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRuleCollectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes an routing rule collection. * * @summary Deletes an routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json */ async function deletesAnRoutingRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/routingRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples-dev/routingRuleCollectionsGetSample.ts index 71b68f76b3cd..5c9936b8bd2d 100644 --- a/sdk/network/arm-network/samples-dev/routingRuleCollectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRuleCollectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager routing configuration rule collection. * * @summary Gets a network manager routing configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json */ async function getsRoutingRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/routingRuleCollectionsListSample.ts b/sdk/network/arm-network/samples-dev/routingRuleCollectionsListSample.ts index 9ae1fff12571..ca4d699a84a8 100644 --- a/sdk/network/arm-network/samples-dev/routingRuleCollectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRuleCollectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the rule collections in a routing configuration, in a paginated format. * * @summary Lists all the rule collections in a routing configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionList.json */ async function listRoutingRuleCollections() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/routingRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/routingRulesCreateOrUpdateSample.ts index db293c2bbed1..b9bb79b533da 100644 --- a/sdk/network/arm-network/samples-dev/routingRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an routing rule. * * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json */ async function createADefaultRoutingRule() { const subscriptionId = @@ -51,7 +51,7 @@ async function createADefaultRoutingRule() { * This sample demonstrates how to Creates or updates an routing rule. * * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json */ async function createAnRoutingRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/routingRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/routingRulesDeleteSample.ts index 8f7de9f7f9e9..6d5c577b6073 100644 --- a/sdk/network/arm-network/samples-dev/routingRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRulesDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a routing rule. * * @summary Deletes a routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleDelete.json */ async function deletesARoutingRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/routingRulesGetSample.ts b/sdk/network/arm-network/samples-dev/routingRulesGetSample.ts index 9fc80484ece2..2aaeaafa2efd 100644 --- a/sdk/network/arm-network/samples-dev/routingRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager routing configuration routing rule. * * @summary Gets a network manager routing configuration routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleGet.json */ async function getsRoutingRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/routingRulesListSample.ts b/sdk/network/arm-network/samples-dev/routingRulesListSample.ts index 5cc6815d1b2d..48af94c04642 100644 --- a/sdk/network/arm-network/samples-dev/routingRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/routingRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network manager routing configuration routing rules. * * @summary List all network manager routing configuration routing rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleList.json */ async function listRoutingRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/scopeConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/scopeConnectionsCreateOrUpdateSample.ts index 1d59a1baf1e4..fba7b2cae8d1 100644 --- a/sdk/network/arm-network/samples-dev/scopeConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/scopeConnectionsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates scope connection from Network Manager * * @summary Creates or updates scope connection from Network Manager - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionPut.json */ async function createOrUpdateNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/scopeConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/scopeConnectionsDeleteSample.ts index c5cab8789d7f..70ab9007b1d4 100644 --- a/sdk/network/arm-network/samples-dev/scopeConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/scopeConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete the pending scope connection created by this network manager. * * @summary Delete the pending scope connection created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionDelete.json */ async function deleteNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/scopeConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/scopeConnectionsGetSample.ts index 8414a783f531..c77eda244809 100644 --- a/sdk/network/arm-network/samples-dev/scopeConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/scopeConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get specified scope connection created by this Network Manager. * * @summary Get specified scope connection created by this Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionGet.json */ async function getNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/scopeConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/scopeConnectionsListSample.ts index 10f978db34ad..755a4a85b80d 100644 --- a/sdk/network/arm-network/samples-dev/scopeConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/scopeConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all scope connections created by this network manager. * * @summary List all scope connections created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionList.json */ async function listNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsCreateOrUpdateSample.ts index 8157e9ff7ea3..cd243bdd7f8a 100644 --- a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,36 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network manager security admin configuration. * * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json + */ +async function createManualModeSecurityAdminConfiguration() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const configurationName = "myTestSecurityConfig"; + const securityAdminConfiguration: SecurityAdminConfiguration = { + description: + "A configuration which will update any network groups ip addresses at commit times.", + networkGroupAddressSpaceAggregationOption: "Manual", + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.securityAdminConfigurations.createOrUpdate( + resourceGroupName, + networkManagerName, + configurationName, + securityAdminConfiguration, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a network manager security admin configuration. + * + * @summary Creates or updates a network manager security admin configuration. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut.json */ async function createNetworkManagerSecurityAdminConfiguration() { const subscriptionId = @@ -46,6 +75,7 @@ async function createNetworkManagerSecurityAdminConfiguration() { } async function main() { + createManualModeSecurityAdminConfiguration(); createNetworkManagerSecurityAdminConfiguration(); } diff --git a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsDeleteSample.ts index ffd255add98c..1f7172b3bace 100644 --- a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager security admin configuration. * * @summary Deletes a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json */ async function deleteNetworkManagerSecurityAdminConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsGetSample.ts index d8bedecab8e8..0fbdfea9d2f1 100644 --- a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a network manager security admin configuration. * * @summary Retrieves a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json */ async function getSecurityAdminConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsListSample.ts index e20c5f76681c..2ad39b7c8182 100644 --- a/sdk/network/arm-network/samples-dev/securityAdminConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityAdminConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the network manager security admin configurations in a network manager, in a paginated format. * * @summary Lists all the network manager security admin configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json */ async function listSecurityAdminConfigurationsInANetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersCreateOrUpdateSample.ts index 386c6e87767b..44445066f156 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Security Partner Provider. * * @summary Creates or updates the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderPut.json */ async function createSecurityPartnerProvider() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersDeleteSample.ts index f0b235e90b56..16f80bb6ae7a 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Security Partner Provider. * * @summary Deletes the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderDelete.json */ async function deleteSecurityPartnerProvider() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersGetSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersGetSample.ts index 710e66e54ff9..7b12f86049a4 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Security Partner Provider. * * @summary Gets the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderGet.json */ async function getSecurityPartnerProvider() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersListByResourceGroupSample.ts index 6b9398b29261..24d020a40c32 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Security Partner Providers in a resource group. * * @summary Lists all Security Partner Providers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListByResourceGroup.json */ async function listAllSecurityPartnerProvidersForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersListSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersListSample.ts index be479e73fb28..96decd82ab5b 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Security Partner Providers in a subscription. * * @summary Gets all the Security Partner Providers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListBySubscription.json */ async function listAllSecurityPartnerProvidersForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityPartnerProvidersUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/securityPartnerProvidersUpdateTagsSample.ts index 9883f56a1bb7..17bf069155f0 100644 --- a/sdk/network/arm-network/samples-dev/securityPartnerProvidersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/securityPartnerProvidersUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of a Security Partner Provider resource. * * @summary Updates tags of a Security Partner Provider resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderUpdateTags.json */ async function updateSecurityPartnerProviderTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityRulesCreateOrUpdateSample.ts index 2888af955d95..4229bf897672 100644 --- a/sdk/network/arm-network/samples-dev/securityRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a security rule in the specified network security group. * * @summary Creates or updates a security rule in the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleCreate.json */ async function createSecurityRule() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityRulesDeleteSample.ts index 0dfbe57082d0..b654117a7e5a 100644 --- a/sdk/network/arm-network/samples-dev/securityRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network security rule. * * @summary Deletes the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleDelete.json */ async function deleteNetworkSecurityRuleFromNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityRulesGetSample.ts b/sdk/network/arm-network/samples-dev/securityRulesGetSample.ts index 7104a38e500b..53e70d8e8276 100644 --- a/sdk/network/arm-network/samples-dev/securityRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network security rule. * * @summary Get the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleGet.json */ async function getNetworkSecurityRuleInNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityRulesListSample.ts b/sdk/network/arm-network/samples-dev/securityRulesListSample.ts index dc509af5bc5a..02f1d592ef44 100644 --- a/sdk/network/arm-network/samples-dev/securityRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all security rules in a network security group. * * @summary Gets all security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleList.json */ async function listNetworkSecurityRulesInNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/securityUserConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityUserConfigurationsCreateOrUpdateSample.ts index 8625867d45c5..0a98a393ca18 100644 --- a/sdk/network/arm-network/samples-dev/securityUserConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network manager security user configuration. * * @summary Creates or updates a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json */ async function createNetworkManagerSecurityUserConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityUserConfigurationsDeleteSample.ts index f60181a8013d..c7f8b7a057bd 100644 --- a/sdk/network/arm-network/samples-dev/securityUserConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserConfigurationsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager security user configuration. * * @summary Deletes a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json */ async function deleteNetworkManagerSecurityUserConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/securityUserConfigurationsGetSample.ts index fc254b882348..f78a76d11440 100644 --- a/sdk/network/arm-network/samples-dev/securityUserConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a network manager security user configuration. * * @summary Retrieves a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json */ async function getSecurityUserConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/securityUserConfigurationsListSample.ts index 98392463a540..26fc130a9d47 100644 --- a/sdk/network/arm-network/samples-dev/securityUserConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the network manager security user configurations in a network manager, in a paginated format. * * @summary Lists all the network manager security user configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationList.json */ async function listSecurityUserConfigurationsInANetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsCreateOrUpdateSample.ts index e21808d744ad..b04057ea58d5 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a security user rule collection. * * @summary Creates or updates a security user rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json */ async function createOrUpdateASecurityUserRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsDeleteSample.ts index 670fb44a978e..f74a4bf2c9a0 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Security User Rule collection. * * @summary Deletes a Security User Rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json */ async function deletesASecurityUserRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsGetSample.ts index 0cdd71ab7149..4fe14a635f91 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager security user configuration rule collection. * * @summary Gets a network manager security user configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json */ async function getsSecurityUserRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsListSample.ts b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsListSample.ts index cd788d20321c..13bc9f22c0af 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRuleCollectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the security user rule collections in a security configuration, in a paginated format. * * @summary Lists all the security user rule collections in a security configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json */ async function listRuleCollectionsInASecurityConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/securityUserRulesCreateOrUpdateSample.ts index 6180a09fdb75..0bbcccfb7b60 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a security user rule. * * @summary Creates or updates a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRulePut.json */ async function createASecurityUserRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/securityUserRulesDeleteSample.ts index 3705889fc326..88850b317f73 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRulesDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a security user rule. * * @summary Deletes a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleDelete.json */ async function deleteASecurityUserRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserRulesGetSample.ts b/sdk/network/arm-network/samples-dev/securityUserRulesGetSample.ts index e338265a2a11..cbc99836f398 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a security user rule. * * @summary Gets a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleGet.json */ async function getsASecurityUserRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/securityUserRulesListSample.ts b/sdk/network/arm-network/samples-dev/securityUserRulesListSample.ts index f54ff55bea4d..62665decfb22 100644 --- a/sdk/network/arm-network/samples-dev/securityUserRulesListSample.ts +++ b/sdk/network/arm-network/samples-dev/securityUserRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Security User Rules in a rule collection. * * @summary Lists all Security User Rules in a rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleList.json */ async function listSecurityUserRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/serviceAssociationLinksListSample.ts b/sdk/network/arm-network/samples-dev/serviceAssociationLinksListSample.ts index 8ff8ff621c8a..6c23d2f49e29 100644 --- a/sdk/network/arm-network/samples-dev/serviceAssociationLinksListSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceAssociationLinksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of service association links for a subnet. * * @summary Gets a list of service association links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json */ async function getServiceAssociationLinks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesCreateOrUpdateSample.ts index 1efa6ab85def..92bc1d2260af 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a service Endpoint Policies. * * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreate.json */ async function createServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -43,7 +43,7 @@ async function createServiceEndpointPolicy() { * This sample demonstrates how to Creates or updates a service Endpoint Policies. * * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreateWithDefinition.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreateWithDefinition.json */ async function createServiceEndpointPolicyWithDefinition() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesDeleteSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesDeleteSample.ts index 3cf202b55f16..da3518113a5d 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified service endpoint policy. * * @summary Deletes the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDelete.json */ async function deleteServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesGetSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesGetSample.ts index 06d8e31612a3..7d89a61f27dc 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified service Endpoint Policies in a specified resource group. * * @summary Gets the specified service Endpoint Policies in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyGet.json */ async function getServiceEndPointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListByResourceGroupSample.ts index 6f5017021195..ff72fbf3843e 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all service endpoint Policies in a resource group. * * @summary Gets all service endpoint Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyList.json */ async function listResourceGroupServiceEndpointPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListSample.ts index f0e6d99e2069..e0809e7321ee 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the service endpoint policies in a subscription. * * @summary Gets all the service endpoint policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyListAll.json */ async function listAllServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesUpdateTagsSample.ts index 6d4e8b70f3b7..46d39bb9f356 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPoliciesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of a service endpoint policy. * * @summary Updates tags of a service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyUpdateTags.json */ async function updateServiceEndpointPolicyTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts index 19bfcc7c8ae1..f8e9841b4536 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a service endpoint policy definition in the specified service endpoint policy. * * @summary Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json */ async function createServiceEndpointPolicyDefinition() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsDeleteSample.ts index a42b0aba229c..4654f03f981d 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified ServiceEndpoint policy definitions. * * @summary Deletes the specified ServiceEndpoint policy definitions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json */ async function deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsGetSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsGetSample.ts index bd142ab3f47a..eb1bddf818b2 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified service endpoint policy definitions from service endpoint policy. * * @summary Get the specified service endpoint policy definitions from service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionGet.json */ async function getServiceEndpointDefinitionInServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts index e6e35f8c5c7b..ce3fca76eba5 100644 --- a/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all service endpoint policy definitions in a service end point policy. * * @summary Gets all service endpoint policy definitions in a service end point policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionList.json */ async function listServiceEndpointDefinitionsInServiceEndPointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceTagInformationListSample.ts b/sdk/network/arm-network/samples-dev/serviceTagInformationListSample.ts index 3e087eb7afc1..5406a2e2e3e8 100644 --- a/sdk/network/arm-network/samples-dev/serviceTagInformationListSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceTagInformationListSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of service tag information resources with pagination. * * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResult.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResult.json */ async function getListOfServiceTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -41,7 +41,7 @@ async function getListOfServiceTags() { * This sample demonstrates how to Gets a list of service tag information resources with pagination. * * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json */ async function getListOfServiceTagsWithNoAddressPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -66,7 +66,7 @@ async function getListOfServiceTagsWithNoAddressPrefixes() { * This sample demonstrates how to Gets a list of service tag information resources with pagination. * * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResultWithTagname.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResultWithTagname.json */ async function getListOfServiceTagsWithTagName() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/serviceTagsListSample.ts b/sdk/network/arm-network/samples-dev/serviceTagsListSample.ts index 5428868b55a5..7339872801da 100644 --- a/sdk/network/arm-network/samples-dev/serviceTagsListSample.ts +++ b/sdk/network/arm-network/samples-dev/serviceTagsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of service tag information resources. * * @summary Gets a list of service tag information resources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagsList.json */ async function getListOfServiceTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/staticCidrsCreateSample.ts b/sdk/network/arm-network/samples-dev/staticCidrsCreateSample.ts new file mode 100644 index 000000000000..8aa51c2c87a4 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/staticCidrsCreateSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates/Updates the Static CIDR resource. + * + * @summary Creates/Updates the Static CIDR resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Create.json + */ +async function staticCidrsCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const staticCidrName = "TestStaticCidr"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.staticCidrs.create( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + ); + console.log(result); +} + +async function main() { + staticCidrsCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/staticCidrsDeleteSample.ts b/sdk/network/arm-network/samples-dev/staticCidrsDeleteSample.ts new file mode 100644 index 000000000000..76e9bfd528b3 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/staticCidrsDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete the Static CIDR resource. + * + * @summary Delete the Static CIDR resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Delete.json + */ +async function staticCidrsDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const staticCidrName = "TestStaticCidr"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.staticCidrs.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + ); + console.log(result); +} + +async function main() { + staticCidrsDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/staticCidrsGetSample.ts b/sdk/network/arm-network/samples-dev/staticCidrsGetSample.ts new file mode 100644 index 000000000000..c87c44b277e3 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/staticCidrsGetSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specific Static CIDR resource. + * + * @summary Gets the specific Static CIDR resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Get.json + */ +async function staticCidrsGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const staticCidrName = "TestStaticCidr"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.staticCidrs.get( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + ); + console.log(result); +} + +async function main() { + staticCidrsGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/staticCidrsListSample.ts b/sdk/network/arm-network/samples-dev/staticCidrsListSample.ts new file mode 100644 index 000000000000..da7a9debb36e --- /dev/null +++ b/sdk/network/arm-network/samples-dev/staticCidrsListSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Static CIDR resources at Network Manager level. + * + * @summary Gets list of Static CIDR resources at Network Manager level. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_List.json + */ +async function staticCidrsList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.staticCidrs.list( + resourceGroupName, + networkManagerName, + poolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + staticCidrsList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/staticMembersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/staticMembersCreateOrUpdateSample.ts index 9965e0cf9736..2b590a1f5854 100644 --- a/sdk/network/arm-network/samples-dev/staticMembersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/staticMembersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a static member. * * @summary Creates or updates a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberPut.json */ async function staticMemberPut() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/staticMembersDeleteSample.ts b/sdk/network/arm-network/samples-dev/staticMembersDeleteSample.ts index a8fd3906eef5..e0f50c627b1d 100644 --- a/sdk/network/arm-network/samples-dev/staticMembersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/staticMembersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a static member. * * @summary Deletes a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberDelete.json */ async function staticMembersDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/staticMembersGetSample.ts b/sdk/network/arm-network/samples-dev/staticMembersGetSample.ts index 8ef73f613a2c..1e3486f49d73 100644 --- a/sdk/network/arm-network/samples-dev/staticMembersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/staticMembersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified static member. * * @summary Gets the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberGet.json */ async function staticMembersGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/staticMembersListSample.ts b/sdk/network/arm-network/samples-dev/staticMembersListSample.ts index ef4d86a9f698..2fbfb9a806e2 100644 --- a/sdk/network/arm-network/samples-dev/staticMembersListSample.ts +++ b/sdk/network/arm-network/samples-dev/staticMembersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the specified static member. * * @summary Lists the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberList.json */ async function staticMembersList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/subnetsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/subnetsCreateOrUpdateSample.ts index d9021eebf95f..d0cc95cda394 100644 --- a/sdk/network/arm-network/samples-dev/subnetsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreate.json */ async function createSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -42,7 +42,7 @@ async function createSubnet() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateWithDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateWithDelegation.json */ async function createSubnetWithADelegation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -66,7 +66,7 @@ async function createSubnetWithADelegation() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateServiceEndpoint.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateServiceEndpoint.json */ async function createSubnetWithServiceEndpoints() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -93,7 +93,7 @@ async function createSubnetWithServiceEndpoints() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json */ async function createSubnetWithServiceEndpointsWithNetworkIdentifier() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -127,7 +127,7 @@ async function createSubnetWithServiceEndpointsWithNetworkIdentifier() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateWithSharingScope.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateWithSharingScope.json */ async function createSubnetWithSharingScope() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/subnetsDeleteSample.ts b/sdk/network/arm-network/samples-dev/subnetsDeleteSample.ts index 4ba5ebb8da79..238452cf8189 100644 --- a/sdk/network/arm-network/samples-dev/subnetsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified subnet. * * @summary Deletes the specified subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetDelete.json */ async function deleteSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/subnetsGetSample.ts b/sdk/network/arm-network/samples-dev/subnetsGetSample.ts index 3f72ce863a2e..a0a7d4513952 100644 --- a/sdk/network/arm-network/samples-dev/subnetsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. * * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGet.json */ async function getSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -40,7 +40,7 @@ async function getSubnet() { * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. * * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGetWithDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGetWithDelegation.json */ async function getSubnetWithADelegation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -62,7 +62,7 @@ async function getSubnetWithADelegation() { * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. * * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGetWithSharingScope.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGetWithSharingScope.json */ async function getSubnetWithSharingScope() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/subnetsListSample.ts b/sdk/network/arm-network/samples-dev/subnetsListSample.ts index adad911c7d7f..6ef0850ca139 100644 --- a/sdk/network/arm-network/samples-dev/subnetsListSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all subnets in a virtual network. * * @summary Gets all subnets in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetList.json */ async function listSubnets() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/subnetsPrepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples-dev/subnetsPrepareNetworkPoliciesSample.ts index 569a37a02bac..11809f784e58 100644 --- a/sdk/network/arm-network/samples-dev/subnetsPrepareNetworkPoliciesSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsPrepareNetworkPoliciesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Prepares a subnet by applying network intent policies. * * @summary Prepares a subnet by applying network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetPrepareNetworkPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetPrepareNetworkPolicies.json */ async function prepareNetworkPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/subnetsUnprepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples-dev/subnetsUnprepareNetworkPoliciesSample.ts index 94851cc0a84e..7d25d26f5424 100644 --- a/sdk/network/arm-network/samples-dev/subnetsUnprepareNetworkPoliciesSample.ts +++ b/sdk/network/arm-network/samples-dev/subnetsUnprepareNetworkPoliciesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Unprepares a subnet by removing network intent policies. * * @summary Unprepares a subnet by removing network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetUnprepareNetworkPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetUnprepareNetworkPolicies.json */ async function unprepareNetworkPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts index f503fc5cee2c..00d4e48fc453 100644 --- a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create a network manager connection on this subscription. * * @summary Create a network manager connection on this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionPut.json */ async function createOrUpdateSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsDeleteSample.ts index 10f3ebd5c763..5a374a4b44a8 100644 --- a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete specified connection created by this subscription. * * @summary Delete specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json */ async function deleteSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsGetSample.ts index 493bc133579c..8dd0118bbb89 100644 --- a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a specified connection created by this subscription. * * @summary Get a specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionGet.json */ async function getSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsListSample.ts index d92a1be816fd..a777507d1a19 100644 --- a/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/subscriptionNetworkManagerConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network manager connections created by this subscription. * * @summary List all network manager connections created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionList.json */ async function listSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/supportedSecurityProvidersSample.ts b/sdk/network/arm-network/samples-dev/supportedSecurityProvidersSample.ts index 42950bcd4595..511f79f39e01 100644 --- a/sdk/network/arm-network/samples-dev/supportedSecurityProvidersSample.ts +++ b/sdk/network/arm-network/samples-dev/supportedSecurityProvidersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gives the supported security providers for the virtual wan. * * @summary Gives the supported security providers for the virtual wan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWanSupportedSecurityProviders.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWanSupportedSecurityProviders.json */ async function supportedSecurityProviders() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/usagesListSample.ts b/sdk/network/arm-network/samples-dev/usagesListSample.ts index 07feec3d8500..5c5466b27956 100644 --- a/sdk/network/arm-network/samples-dev/usagesListSample.ts +++ b/sdk/network/arm-network/samples-dev/usagesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List network usages for a subscription. * * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageList.json */ async function listUsages() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -36,7 +36,7 @@ async function listUsages() { * This sample demonstrates how to List network usages for a subscription. * * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageListSpacedLocation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageListSpacedLocation.json */ async function listUsagesSpacedLocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesCreateSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesCreateSample.ts new file mode 100644 index 000000000000..e5bfe22ae82c --- /dev/null +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesCreateSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { VerifierWorkspace, NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates Verifier Workspace. + * + * @summary Creates Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePut.json + */ +async function verifierWorkspaceCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const body: VerifierWorkspace = { + location: "eastus", + properties: { description: "A sample workspace" }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.create( + resourceGroupName, + networkManagerName, + workspaceName, + body, + ); + console.log(result); +} + +async function main() { + verifierWorkspaceCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesDeleteSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesDeleteSample.ts new file mode 100644 index 000000000000..82edc529c62e --- /dev/null +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesDeleteSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes Verifier Workspace. + * + * @summary Deletes Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceDelete.json + */ +async function verifierWorkspaceDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + workspaceName, + ); + console.log(result); +} + +async function main() { + verifierWorkspaceDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesGetSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesGetSample.ts new file mode 100644 index 000000000000..e981332d5a65 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesGetSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets Verifier Workspace. + * + * @summary Gets Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceGet.json + */ +async function verifierWorkspaceGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.get( + resourceGroupName, + networkManagerName, + workspaceName, + ); + console.log(result); +} + +async function main() { + verifierWorkspaceGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesListSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesListSample.ts new file mode 100644 index 000000000000..f3cf4e2267fa --- /dev/null +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesListSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Verifier Workspaces. + * + * @summary Gets list of Verifier Workspaces. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceList.json + */ +async function verifierWorkspaceList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.verifierWorkspaces.list( + resourceGroupName, + networkManagerName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + verifierWorkspaceList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/verifierWorkspacesUpdateSample.ts b/sdk/network/arm-network/samples-dev/verifierWorkspacesUpdateSample.ts new file mode 100644 index 000000000000..3a1006836c94 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/verifierWorkspacesUpdateSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates Verifier Workspace. + * + * @summary Updates Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePatch.json + */ +async function verifierWorkspacePatch() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.update( + resourceGroupName, + networkManagerName, + workspaceName, + ); + console.log(result); +} + +async function main() { + verifierWorkspacePatch(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/vipSwapCreateSample.ts b/sdk/network/arm-network/samples-dev/vipSwapCreateSample.ts index fe2fe4729c99..4287bfddaa3b 100644 --- a/sdk/network/arm-network/samples-dev/vipSwapCreateSample.ts +++ b/sdk/network/arm-network/samples-dev/vipSwapCreateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Performs vip swap operation on swappable cloud services. * * @summary Performs vip swap operation on swappable cloud services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapPut.json */ async function putVipSwapOperation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vipSwapGetSample.ts b/sdk/network/arm-network/samples-dev/vipSwapGetSample.ts index 6585d753a6ec..7af6b252ae58 100644 --- a/sdk/network/arm-network/samples-dev/vipSwapGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vipSwapGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production * * @summary Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapGet.json */ async function getSwapResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vipSwapListSample.ts b/sdk/network/arm-network/samples-dev/vipSwapListSample.ts index 237ae41b0305..3655290807d0 100644 --- a/sdk/network/arm-network/samples-dev/vipSwapListSample.ts +++ b/sdk/network/arm-network/samples-dev/vipSwapListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production * * @summary Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapList.json */ async function getSwapResourceList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSitesCreateOrUpdateSample.ts index 66343edc1792..368c0ee2e4ae 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSitesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSitesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Site. * * @summary Creates or updates the specified Network Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSitePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSitePut.json */ async function createNetworkVirtualApplianceSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSitesDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSitesDeleteSample.ts index 54325cdfab87..8467a7670184 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSitesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSitesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified site from a Virtual Appliance. * * @summary Deletes the specified site from a Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteDelete.json */ async function deleteNetworkVirtualApplianceSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSitesGetSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSitesGetSample.ts index 39dec3763bd2..c3f8b80d34c0 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSitesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSitesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Virtual Appliance Site. * * @summary Gets the specified Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteGet.json */ async function getNetworkVirtualApplianceSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSitesListSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSitesListSample.ts index 591d7bc53a83..99675c765367 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSitesListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSitesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. * * @summary Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteList.json */ async function listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSkusGetSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSkusGetSample.ts index 48a6dad75993..8f6a3e127a87 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSkusGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSkusGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a single available sku for network virtual appliance. * * @summary Retrieves a single available sku for network virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuGet.json */ async function networkVirtualApplianceSkuGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualApplianceSkusListSample.ts b/sdk/network/arm-network/samples-dev/virtualApplianceSkusListSample.ts index 1e741e26c286..39f3a50a8bf8 100644 --- a/sdk/network/arm-network/samples-dev/virtualApplianceSkusListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualApplianceSkusListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all SKUs available for a virtual appliance. * * @summary List all SKUs available for a virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuList.json */ async function networkVirtualApplianceSkuListResult() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionCreateOrUpdateSample.ts index fd9360faf3d3..8f251108bb4f 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. * * @summary Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionPut.json */ async function virtualHubRouteTableV2Put() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionDeleteSample.ts index af9d65524db4..4ce14f304990 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualHubBgpConnection. * * @summary Deletes a VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionDelete.json */ async function virtualHubRouteTableV2Delete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionGetSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionGetSample.ts index cf552f4acdbf..c5d6b23ac06c 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a Virtual Hub Bgp Connection. * * @summary Retrieves the details of a Virtual Hub Bgp Connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionGet.json */ async function virtualHubVirtualHubRouteTableV2Get() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts index 76b84fd88446..f9ad72b09f4a 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. * * @summary Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json */ async function virtualRouterPeerListAdvertisedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListLearnedRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListLearnedRoutesSample.ts index cdf8b76d78f0..c6b3cc43ca20 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListLearnedRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListLearnedRoutesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection has learned. * * @summary Retrieves a list of routes the virtual hub bgp connection has learned. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListLearnedRoute.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListLearnedRoute.json */ async function virtualRouterPeerListLearnedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListSample.ts index 925f8ae5fb9c..73473fb715e9 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubBgpConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all VirtualHubBgpConnections. * * @summary Retrieves the details of all VirtualHubBgpConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionList.json */ async function virtualHubRouteTableV2List() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationCreateOrUpdateSample.ts index 9c2b354ecf90..2a9dab05082c 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. * * @summary Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationPut.json */ async function virtualHubIPConfigurationPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationDeleteSample.ts index 439fef94c919..786af8c8e186 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualHubIpConfiguration. * * @summary Deletes a VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationDelete.json */ async function virtualHubIPConfigurationDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationGetSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationGetSample.ts index 2279ff6b8064..50df047073bb 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a Virtual Hub Ip configuration. * * @summary Retrieves the details of a Virtual Hub Ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationGet.json */ async function virtualHubVirtualHubRouteTableV2Get() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationListSample.ts b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationListSample.ts index fdde96930907..4ce37374e480 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubIPConfigurationListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all VirtualHubIpConfigurations. * * @summary Retrieves the details of all VirtualHubIpConfigurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationList.json */ async function virtualHubRouteTableV2List() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SCreateOrUpdateSample.ts index df21a6ba38db..2c8d7cf9db57 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. * * @summary Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Put.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Put.json */ async function virtualHubRouteTableV2Put() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SDeleteSample.ts index 620195f325e5..c051d9e8dcb3 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualHubRouteTableV2. * * @summary Deletes a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Delete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Delete.json */ async function virtualHubRouteTableV2Delete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SGetSample.ts b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SGetSample.ts index 71315b7a4fc1..d27260e7c911 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VirtualHubRouteTableV2. * * @summary Retrieves the details of a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Get.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Get.json */ async function virtualHubVirtualHubRouteTableV2Get() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SListSample.ts b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SListSample.ts index d52e786fa980..c0d800068e7e 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubRouteTableV2SListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all VirtualHubRouteTableV2s. * * @summary Retrieves the details of all VirtualHubRouteTableV2s. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2List.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2List.json */ async function virtualHubRouteTableV2List() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsCreateOrUpdateSample.ts index c304c480b21c..1de757d134fc 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. * * @summary Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubPut.json */ async function virtualHubPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsDeleteSample.ts index 766dc10dc49f..b7dec36d302b 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualHub. * * @summary Deletes a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubDelete.json */ async function virtualHubDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubsGetEffectiveVirtualHubRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsGetEffectiveVirtualHubRoutesSample.ts index 964bbe764b7d..7ce8741df088 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsGetEffectiveVirtualHubRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsGetEffectiveVirtualHubRoutesSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . * * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForConnection.json */ async function effectiveRoutesForAConnectionResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -51,7 +51,7 @@ async function effectiveRoutesForAConnectionResource() { * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . * * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForRouteTable.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForRouteTable.json */ async function effectiveRoutesForARouteTableResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -80,7 +80,7 @@ async function effectiveRoutesForARouteTableResource() { * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . * * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForVirtualHub.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForVirtualHub.json */ async function effectiveRoutesForTheVirtualHub() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubsGetInboundRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsGetInboundRoutesSample.ts index 322a0ac14b02..6544ad1a0535 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsGetInboundRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsGetInboundRoutesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the inbound routes configured for the Virtual Hub on a particular connection. * * @summary Gets the inbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetInboundRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetInboundRoutes.json */ async function inboundRoutesForTheVirtualHubOnAParticularConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubsGetOutboundRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsGetOutboundRoutesSample.ts index 31de8e41d860..5989580d9223 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsGetOutboundRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsGetOutboundRoutesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the outbound routes configured for the Virtual Hub on a particular connection. * * @summary Gets the outbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetOutboundRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetOutboundRoutes.json */ async function outboundRoutesForTheVirtualHubOnAParticularConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsGetSample.ts index 4844546865bd..021b339e88c0 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VirtualHub. * * @summary Retrieves the details of a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubGet.json */ async function virtualHubGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsListByResourceGroupSample.ts index 6775733cb03f..3426127c1b72 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VirtualHubs in a resource group. * * @summary Lists all the VirtualHubs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubListByResourceGroup.json */ async function virtualHubListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubsListSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsListSample.ts index cc7ac4fade12..efb75efe54d6 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VirtualHubs in a subscription. * * @summary Lists all the VirtualHubs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubList.json */ async function virtualHubList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualHubsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualHubsUpdateTagsSample.ts index 12daa7f7e2e3..49dea771630a 100644 --- a/sdk/network/arm-network/samples-dev/virtualHubsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualHubsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates VirtualHub tags. * * @summary Updates VirtualHub tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubUpdateTags.json */ async function virtualHubUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts index 91910d0a57aa..e3a22b3b7671 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a virtual network gateway connection in the specified resource group. * * @summary Creates or updates a virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionCreate.json */ async function createVirtualNetworkGatewayConnectionS2S() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsDeleteSample.ts index 728ea6174dcf..955a5be73458 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network Gateway connection. * * @summary Deletes the specified virtual network Gateway connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionDelete.json */ async function deleteVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetIkeSasSample.ts index a6f7de311898..27a7558a9c2a 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetIkeSasSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetIkeSasSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. * * @summary Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json */ async function getVirtualNetworkGatewayConnectionIkeSa() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSample.ts index 9d872dd917b0..18184fec4fa1 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified virtual network gateway connection by resource group. * * @summary Gets the specified virtual network gateway connection by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGet.json */ async function getVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSharedKeySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSharedKeySample.ts index aae6b9b24bd0..17eb7c78041a 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsGetSharedKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. * * @summary The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json */ async function getVirtualNetworkGatewayConnectionSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsListSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsListSample.ts index bb9466eb2f6c..ef0c63a17271 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. * * @summary The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionsList.json */ async function listVirtualNetworkGatewayConnectionsinResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetConnectionSample.ts index fecd7e555686..4fb212402819 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the virtual network gateway connection specified. * * @summary Resets the virtual network gateway connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionReset.json */ async function resetVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetSharedKeySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetSharedKeySample.ts index 39f3eab3e6a4..92bf52532d68 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsResetSharedKeySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * * @summary The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json */ async function resetVirtualNetworkGatewayConnectionSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsSetSharedKeySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsSetSharedKeySample.ts index 7064363b903e..a10d623eb59c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsSetSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsSetSharedKeySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * * @summary The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json */ async function setVirtualNetworkGatewayConnectionSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts index 2864bf1ab4b2..572b4ec29a1e 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. * * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -49,7 +49,7 @@ async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. * * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json */ async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts index 63e47cce81c7..27bb228aa99b 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Stops packet capture on virtual network gateway connection in the specified resource group. * * @summary Stops packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json */ async function stopPacketCaptureOnVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsUpdateTagsSample.ts index 3324a33a620d..2e0d2c244589 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayConnectionsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a virtual network gateway connection tags. * * @summary Updates a virtual network gateway connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json */ async function updateVirtualNetworkGatewayConnectionTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts index 0c922d3fea1d..604f80449cd7 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. * * @summary Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRulePut.json */ async function virtualNetworkGatewayNatRulePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesDeleteSample.ts index 4fec20464fab..b31d98d7b9a3 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a nat rule. * * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json */ async function virtualNetworkGatewayNatRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesGetSample.ts index 15f8a3c9765a..4247dd75a8d4 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a nat rule. * * @summary Retrieves the details of a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleGet.json */ async function virtualNetworkGatewayNatRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts index b5b4bed9a691..adb2748f9f35 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all nat rules for a particular virtual network gateway. * * @summary Retrieves all nat rules for a particular virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleList.json */ async function virtualNetworkGatewayNatRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysCreateOrUpdateSample.ts index 90b7ff6ec995..3f4cdd79cb8f 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. * * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdate.json */ async function updateVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -100,7 +100,7 @@ async function updateVirtualNetworkGateway() { * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. * * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkScalableGatewayUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayUpdate.json */ async function updateVirtualNetworkScalableGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDeleteSample.ts index 751ed6017e57..d859b6bc764b 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network gateway. * * @summary Deletes the specified virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayDelete.json */ async function deleteVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts index f0818851f218..07840f522b00 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Disconnect vpn connections of virtual network gateway in the specified resource group. * * @summary Disconnect vpn connections of virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json */ async function disconnectVpnConnectionsFromVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGenerateVpnProfileSample.ts index 9df279e7af1b..c053e6f4f81c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGenerateVpnProfileSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGenerateVpnProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @summary Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json */ async function generateVirtualNetworkGatewayVpnProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts index de68f557a49a..b9953c23190d 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. * * @summary Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json */ async function generateVpnClientPackage() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts index 36ddb8853762..0b0be3d63b51 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @summary This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json */ async function getVirtualNetworkGatewayAdvertisedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetBgpPeerStatusSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetBgpPeerStatusSample.ts index 4fcc1effb020..da424c11c237 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetBgpPeerStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetBgpPeerStatusSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @summary The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json */ async function getVirtualNetworkGatewayBgpPeerStatus() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts new file mode 100644 index 000000000000..94e6c0d0790e --- /dev/null +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to This operation retrieves the details of all the failover tests performed on the gateway for different peering locations + * + * @summary This operation retrieves the details of all the failover tests performed on the gateway for different peering locations + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json + */ +async function virtualNetworkGatewayGetFailoverAllTestsDetails() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const typeParam = "SingleSiteFailover"; + const fetchLatest = true; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait( + resourceGroupName, + virtualNetworkGatewayName, + typeParam, + fetchLatest, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayGetFailoverAllTestsDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts new file mode 100644 index 000000000000..d245a1df9094 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid + * + * @summary This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json + */ +async function virtualNetworkGatewayGetFailoverSingleTestDetails() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const peeringLocation = "Vancouver"; + const failoverTestId = "fe458ae8-d2ae-4520-a104-44bc233bde7e"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait( + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + failoverTestId, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayGetFailoverSingleTestDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetLearnedRoutesSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetLearnedRoutesSample.ts index 8eba17b5559a..23cf08102e4e 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetLearnedRoutesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetLearnedRoutesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @summary This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json */ async function getVirtualNetworkGatewayLearnedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetSample.ts index 53a94693d140..ea12e1859f4e 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified virtual network gateway by resource group. * * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGet.json */ async function getVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getVirtualNetworkGateway() { * This sample demonstrates how to Gets the specified virtual network gateway by resource group. * * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkScalableGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayGet.json */ async function getVirtualNetworkScalableGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts index 3e79032b8e8d..d0a7220faae2 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. * * @summary Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json */ async function getVirtualNetworkGatewayVpnProfilePackageUrl() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts index a5bfc637536e..bdb9c9797521 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. * * @summary Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json */ async function getVirtualNetworkGatewayVpnclientConnectionHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts index 3cbe2039bcc5..e6081448d02e 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. * * @summary The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json */ async function getVirtualNetworkGatewayVpnClientIpsecParameters() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListConnectionsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListConnectionsSample.ts index 536aacadc805..7025f258b76c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListConnectionsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListConnectionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the connections in a virtual network gateway. * * @summary Gets all the connections in a virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysListConnections.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysListConnections.json */ async function virtualNetworkGatewaysListConnections() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListSample.ts index 0830ad10ab24..03d9afda1d18 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all virtual network gateways by resource group. * * @summary Gets all virtual network gateways by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayList.json */ async function listVirtualNetworkGatewaysinResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetSample.ts index ead014b55823..d51b5afdcf03 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the primary of the virtual network gateway in the specified resource group. * * @summary Resets the primary of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayReset.json */ async function resetVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts index 770bf9a80947..9b0a237a695d 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the VPN client shared key of the virtual network gateway in the specified resource group. * * @summary Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json */ async function resetVpnClientSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts index 83a0e4506853..9223ff38b65f 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. * * @summary The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json */ async function setVirtualNetworkGatewayVpnClientIpsecParameters() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts new file mode 100644 index 000000000000..d1ca50c396af --- /dev/null +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to This operation starts failover simulation on the gateway for the specified peering location + * + * @summary This operation starts failover simulation on the gateway for the specified peering location + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json + */ +async function virtualNetworkGatewayStartSiteFailoverSimulation() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const peeringLocation = "Vancouver"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayStartSiteFailoverSimulation(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartPacketCaptureSample.ts index 1d5b2a766065..7d1241a8b1cd 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStartPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. * * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVirtualNetworkGatewayWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -50,7 +50,7 @@ async function startPacketCaptureOnVirtualNetworkGatewayWithFilter() { * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. * * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCapture.json */ async function startPacketCaptureOnVirtualNetworkGatewayWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts new file mode 100644 index 000000000000..97031e7bef51 --- /dev/null +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ExpressRouteFailoverStopApiParameters, + NetworkManagementClient, +} from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to This operation stops failover simulation on the gateway for the specified peering location + * + * @summary This operation stops failover simulation on the gateway for the specified peering location + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json + */ +async function virtualNetworkGatewayStopSiteFailoverSimulation() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const stopParameters: ExpressRouteFailoverStopApiParameters = { + peeringLocation: "Vancouver", + wasSimulationSuccessful: true, + details: [ + { + failoverConnectionName: "conn1", + failoverLocation: "Denver", + isVerified: false, + }, + { + failoverConnectionName: "conn2", + failoverLocation: "Amsterdam", + isVerified: true, + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName, + virtualNetworkGatewayName, + stopParameters, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayStopSiteFailoverSimulation(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopPacketCaptureSample.ts index cf53af796162..2486940f9462 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysStopPacketCaptureSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Stops packet capture on virtual network gateway in the specified resource group. * * @summary Stops packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json */ async function stopPacketCaptureOnVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSupportedVpnDevicesSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSupportedVpnDevicesSample.ts index c82a93281bf2..3f8365095bef 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSupportedVpnDevicesSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysSupportedVpnDevicesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a xml format representation for supported vpn devices. * * @summary Gets a xml format representation for supported vpn devices. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json */ async function listVirtualNetworkGatewaySupportedVpnDevices() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysUpdateTagsSample.ts index f4795e4ee2cf..aecef679749e 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a virtual network gateway tags. * * @summary Updates a virtual network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdateTags.json */ async function updateVirtualNetworkGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts index 83c4be37e215..23f10504a897 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets a xml format representation for vpn device configuration script. * * @summary Gets a xml format representation for vpn device configuration script. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json */ async function getVpnDeviceConfigurationScript() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsCreateOrUpdateSample.ts index 5f14be58be7e..1e150a747e01 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsCreateOrUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json */ async function createV6SubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -57,7 +57,7 @@ async function createV6SubnetPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringCreate.json */ async function createPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -88,7 +88,7 @@ async function createPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json */ async function createPeeringWithRemoteVirtualNetworkEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -119,7 +119,7 @@ async function createPeeringWithRemoteVirtualNetworkEncryption() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringCreate.json */ async function createSubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -154,7 +154,7 @@ async function createSubnetPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringSync.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringSync.json */ async function syncPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -190,7 +190,7 @@ async function syncPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringSync.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringSync.json */ async function syncV6SubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -228,7 +228,7 @@ async function syncV6SubnetPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringSync.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringSync.json */ async function syncSubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsDeleteSample.ts index 809977f89018..5867740e0fa6 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network peering. * * @summary Deletes the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringDelete.json */ async function deletePeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsGetSample.ts index 9044bb5ff615..d371f76b8de7 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json */ async function getV6SubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +39,7 @@ async function getV6SubnetPeering() { * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringGet.json */ async function getPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -60,7 +60,7 @@ async function getPeering() { * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json */ async function getPeeringWithRemoteVirtualNetworkEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -81,7 +81,7 @@ async function getPeeringWithRemoteVirtualNetworkEncryption() { * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringGet.json */ async function getSubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsListSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsListSample.ts index 9c29cef11e26..30887725ae64 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkPeeringsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all virtual network peerings in a virtual network. * * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringList.json */ async function listPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -40,7 +40,7 @@ async function listPeerings() { * This sample demonstrates how to Gets all virtual network peerings in a virtual network. * * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json */ async function listPeeringsWithRemoteVirtualNetworkEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsCreateOrUpdateSample.ts index 2b4e202eba50..c58f4b58be8b 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a Virtual Network Tap. * * @summary Creates or updates a Virtual Network Tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapCreate.json */ async function createVirtualNetworkTap() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsDeleteSample.ts index 9e0960e129d7..da61cc8f35b4 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network tap. * * @summary Deletes the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapDelete.json */ async function deleteVirtualNetworkTapResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsGetSample.ts index b42f374f251a..8d6af52f2d0c 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified virtual network tap. * * @summary Gets information about the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapGet.json */ async function getVirtualNetworkTap() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsListAllSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsListAllSample.ts index b52bd73aaa95..02a83991832e 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. * * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapListAll.json */ async function listAllVirtualNetworkTaps() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsListByResourceGroupSample.ts index 5d1947592b08..38e397a50820 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. * * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapList.json */ async function listVirtualNetworkTapsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworkTapsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworkTapsUpdateTagsSample.ts index 7e35d0b3fabd..3f794d4c6db9 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworkTapsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworkTapsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates an VirtualNetworkTap tags. * * @summary Updates an VirtualNetworkTap tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapUpdateTags.json */ async function updateVirtualNetworkTapTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksCheckIPAddressAvailabilitySample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksCheckIPAddressAvailabilitySample.ts index 30d74acdf0a5..eb59749650a3 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksCheckIPAddressAvailabilitySample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksCheckIPAddressAvailabilitySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether a private IP address is available for use. * * @summary Checks whether a private IP address is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json */ async function checkIPAddressAvailability() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksCreateOrUpdateSample.ts index 674ebb36a631..c6a88b0f06ec 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreate.json */ async function createVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -43,7 +43,7 @@ async function createVirtualNetwork() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateWithBgpCommunities.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithBgpCommunities.json */ async function createVirtualNetworkWithBgpCommunities() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -69,7 +69,7 @@ async function createVirtualNetworkWithBgpCommunities() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnetWithDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnetWithDelegation.json */ async function createVirtualNetworkWithDelegatedSubnets() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -105,7 +105,7 @@ async function createVirtualNetworkWithDelegatedSubnets() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateWithEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithEncryption.json */ async function createVirtualNetworkWithEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -131,7 +131,49 @@ async function createVirtualNetworkWithEncryption() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateServiceEndpoints.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithIpamPool.json + */ +async function createVirtualNetworkWithIpamPool() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkName = "test-vnet"; + const parameters: VirtualNetwork = { + addressSpace: { + ipamPoolPrefixAllocations: [ + { + id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", + numberOfIpAddresses: "65536", + }, + ], + }, + location: "eastus", + subnets: [ + { + name: "test-1", + ipamPoolPrefixAllocations: [ + { + id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", + numberOfIpAddresses: "80", + }, + ], + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( + resourceGroupName, + virtualNetworkName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * + * @summary Creates or updates a virtual network in the specified resource group. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateServiceEndpoints.json */ async function createVirtualNetworkWithServiceEndpoints() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -162,7 +204,7 @@ async function createVirtualNetworkWithServiceEndpoints() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json */ async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -198,7 +240,7 @@ async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy( * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnet.json */ async function createVirtualNetworkWithSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -223,7 +265,7 @@ async function createVirtualNetworkWithSubnet() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json */ async function createVirtualNetworkWithSubnetContainingAddressPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -251,6 +293,7 @@ async function main() { createVirtualNetworkWithBgpCommunities(); createVirtualNetworkWithDelegatedSubnets(); createVirtualNetworkWithEncryption(); + createVirtualNetworkWithIpamPool(); createVirtualNetworkWithServiceEndpoints(); createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(); createVirtualNetworkWithSubnet(); diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksDeleteSample.ts index b3ff33ba55d2..de22d12443df 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network. * * @summary Deletes the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkDelete.json */ async function deleteVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksGetSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksGetSample.ts index 5447908bc5d1..a312d5a7277a 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified virtual network by resource group. * * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGet.json */ async function getVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getVirtualNetwork() { * This sample demonstrates how to Gets the specified virtual network by resource group. * * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetWithSubnetDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetWithSubnetDelegation.json */ async function getVirtualNetworkWithADelegatedSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -56,7 +56,7 @@ async function getVirtualNetworkWithADelegatedSubnet() { * This sample demonstrates how to Gets the specified virtual network by resource group. * * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetWithServiceAssociationLink.json */ async function getVirtualNetworkWithServiceAssociationLinks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksListAllSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksListAllSample.ts index 271b04b1608b..11a9c19527b8 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all virtual networks in a subscription. * * @summary Gets all virtual networks in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListAll.json */ async function listAllVirtualNetworks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksListDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksListDdosProtectionStatusSample.ts index 0ed451b61410..00804d3803f2 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksListDdosProtectionStatusSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksListDdosProtectionStatusSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the Ddos Protection Status of all IP Addresses under the Virtual Network * * @summary Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json */ async function getDdosProtectionStatusOfAVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksListSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksListSample.ts index ba7a35a713d3..9b300633244f 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all virtual networks in a resource group. * * @summary Gets all virtual networks in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkList.json */ async function listVirtualNetworksInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksListUsageSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksListUsageSample.ts index 1cc660523da0..65651ea56731 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksListUsageSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksListUsageSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists usage stats. * * @summary Lists usage stats. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListUsage.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListUsage.json */ async function vnetGetUsage() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualNetworksUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualNetworksUpdateTagsSample.ts index a1f81ae46357..df66ad575856 100644 --- a/sdk/network/arm-network/samples-dev/virtualNetworksUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualNetworksUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a virtual network tags. * * @summary Updates a virtual network tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkUpdateTags.json */ async function updateVirtualNetworkTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsCreateOrUpdateSample.ts index d5fb7cb87e9c..18ab522b2c00 100644 --- a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Virtual Router Peering. * * @summary Creates or updates the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringPut.json */ async function createVirtualRouterPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsDeleteSample.ts index 9334ee0d43bd..b8e56b50d9e1 100644 --- a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified peering from a Virtual Router. * * @summary Deletes the specified peering from a Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringDelete.json */ async function deleteVirtualRouterPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsGetSample.ts b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsGetSample.ts index f165c6ddfef3..42347a78bf10 100644 --- a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Virtual Router Peering. * * @summary Gets the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringGet.json */ async function getVirtualRouterPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsListSample.ts b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsListSample.ts index dfc8a35079e6..71796a690d68 100644 --- a/sdk/network/arm-network/samples-dev/virtualRouterPeeringsListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRouterPeeringsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Virtual Router Peerings in a Virtual Router resource. * * @summary Lists all Virtual Router Peerings in a Virtual Router resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringList.json */ async function listAllVirtualRouterPeeringsForAGivenVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersCreateOrUpdateSample.ts index ab07070d67c1..d22987b4b687 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Virtual Router. * * @summary Creates or updates the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPut.json */ async function createVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersDeleteSample.ts index ce34efd85caf..0ad0e7ebc466 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Virtual Router. * * @summary Deletes the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterDelete.json */ async function deleteVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersGetSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersGetSample.ts index e6e6ade70d8a..8005e7f59716 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Virtual Router. * * @summary Gets the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterGet.json */ async function getVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersListByResourceGroupSample.ts index c912d92c95ad..d10422ef1dbe 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Virtual Routers in a resource group. * * @summary Lists all Virtual Routers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListByResourceGroup.json */ async function listAllVirtualRouterForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualRoutersListSample.ts b/sdk/network/arm-network/samples-dev/virtualRoutersListSample.ts index 78e584c70520..215a3816b5df 100644 --- a/sdk/network/arm-network/samples-dev/virtualRoutersListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualRoutersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Virtual Routers in a subscription. * * @summary Gets all the Virtual Routers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListBySubscription.json */ async function listAllVirtualRoutersForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualWansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/virtualWansCreateOrUpdateSample.ts index 66cbf05ffd5d..a6f0d85ff3c7 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. * * @summary Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANPut.json */ async function virtualWanCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualWansDeleteSample.ts b/sdk/network/arm-network/samples-dev/virtualWansDeleteSample.ts index a3972bb69844..993ab5ac2e29 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualWAN. * * @summary Deletes a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANDelete.json */ async function virtualWanDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualWansGetSample.ts b/sdk/network/arm-network/samples-dev/virtualWansGetSample.ts index eb78a85aff16..be3deaf5b822 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansGetSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VirtualWAN. * * @summary Retrieves the details of a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANGet.json */ async function virtualWanGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualWansListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/virtualWansListByResourceGroupSample.ts index acd7a6bcfff2..88f623a1badb 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VirtualWANs in a resource group. * * @summary Lists all the VirtualWANs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANListByResourceGroup.json */ async function virtualWanListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualWansListSample.ts b/sdk/network/arm-network/samples-dev/virtualWansListSample.ts index f1278bfbfca0..779cdbfd63ba 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansListSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VirtualWANs in a subscription. * * @summary Lists all the VirtualWANs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANList.json */ async function virtualWanList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/virtualWansUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/virtualWansUpdateTagsSample.ts index b7c6153263aa..d68fb996fc1d 100644 --- a/sdk/network/arm-network/samples-dev/virtualWansUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/virtualWansUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a VirtualWAN tags. * * @summary Updates a VirtualWAN tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANUpdateTags.json */ async function virtualWanUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsCreateOrUpdateSample.ts index 8839378c6106..c206e371f536 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. * * @summary Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionPut.json */ async function vpnConnectionPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsDeleteSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsDeleteSample.ts index e3a360742d50..05e03f0949fd 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a vpn connection. * * @summary Deletes a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionDelete.json */ async function vpnConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsGetSample.ts index 9df8a01ea7fd..f8b9dbd28216 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a vpn connection. * * @summary Retrieves the details of a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionGet.json */ async function vpnConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsListByVpnGatewaySample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsListByVpnGatewaySample.ts index a5316c774416..2a30b6f6a7fc 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsListByVpnGatewaySample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsListByVpnGatewaySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all vpn connections for a particular virtual wan vpn gateway. * * @summary Retrieves all vpn connections for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionList.json */ async function vpnConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsStartPacketCaptureSample.ts index a7bbdf0ee1b1..e7685ec9322e 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsStartPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. * * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVpnConnectionWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -52,7 +52,7 @@ async function startPacketCaptureOnVpnConnectionWithFilter() { * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. * * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCapture.json */ async function startPacketCaptureOnVpnConnectionWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/vpnConnectionsStopPacketCaptureSample.ts index 68e3789eae3f..1d4dcbbe860a 100644 --- a/sdk/network/arm-network/samples-dev/vpnConnectionsStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnConnectionsStopPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Stops packet capture on Vpn connection in the specified resource group. * * @summary Stops packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStopPacketCapture.json */ async function startPacketCaptureOnVpnConnectionWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysCreateOrUpdateSample.ts index f56207afa3ea..c6ff4aa33bb3 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. * * @summary Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayPut.json */ async function vpnGatewayPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysDeleteSample.ts index 201d3ec3a569..87c4e86d6f66 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a virtual wan vpn gateway. * * @summary Deletes a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayDelete.json */ async function vpnGatewayDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysGetSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysGetSample.ts index ebde64cd0e08..749aae2cf33c 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a virtual wan vpn gateway. * * @summary Retrieves the details of a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayGet.json */ async function vpnGatewayGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysListByResourceGroupSample.ts index b3fb03806a86..24e430f31556 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VpnGateways in a resource group. * * @summary Lists all the VpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayListByResourceGroup.json */ async function vpnGatewayListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysListSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysListSample.ts index 3acaaccc9e8d..cf3e5881ddac 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysListSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VpnGateways in a subscription. * * @summary Lists all the VpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayList.json */ async function vpnGatewayListBySubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysResetSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysResetSample.ts index 7d04e0e08b45..fb1ba1a90aa8 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysResetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysResetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the primary of the vpn gateway in the specified resource group. * * @summary Resets the primary of the vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayReset.json */ async function resetVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysStartPacketCaptureSample.ts index 3e0e2598af29..2f763d1a3a81 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysStartPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. * * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVpnGatewayWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -47,7 +47,7 @@ async function startPacketCaptureOnVpnGatewayWithFilter() { * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. * * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCapture.json */ async function startPacketCaptureOnVpnGatewayWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysStopPacketCaptureSample.ts index 1722980fdf8f..e92f1abf3b48 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysStopPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Stops packet capture on vpn gateway in the specified resource group. * * @summary Stops packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStopPacketCapture.json */ async function stopPacketCaptureOnVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/vpnGatewaysUpdateTagsSample.ts index 590698143f65..1339d984384c 100644 --- a/sdk/network/arm-network/samples-dev/vpnGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates virtual wan vpn gateway tags. * * @summary Updates virtual wan vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayUpdateTags.json */ async function vpnGatewayUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetAllSharedKeysSample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetAllSharedKeysSample.ts index db4f015bbc8e..1816024471fa 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetAllSharedKeysSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetAllSharedKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all shared keys of VpnLink connection specified. * * @summary Lists all shared keys of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json */ async function vpnSiteLinkConnectionSharedKeysGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetDefaultSharedKeySample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetDefaultSharedKeySample.ts index 550e6e9f6aeb..3be7ed88b0be 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetDefaultSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetDefaultSharedKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the shared key of VpnLink connection specified. * * @summary Gets the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json */ async function vpnSiteLinkConnectionDefaultSharedKeyGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetIkeSasSample.ts index 2230c3b47d4f..4696e81589b6 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetIkeSasSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsGetIkeSasSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. * * @summary Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json */ async function getVpnLinkConnectionIkeSa() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListByVpnConnectionSample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListByVpnConnectionSample.ts index 8c489a3d6516..bee51e2a36b2 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListByVpnConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListByVpnConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. * * @summary Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionList.json */ async function vpnSiteLinkConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListDefaultSharedKeySample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListDefaultSharedKeySample.ts index 4053781dd54a..d2f68adcc559 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListDefaultSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsListDefaultSharedKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the value of the shared key of VpnLink connection specified. * * @summary Gets the value of the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json */ async function vpnSiteLinkConnectionDefaultSharedKeyList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsResetConnectionSample.ts index 935b6bd37224..f17fdf15e05e 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsResetConnectionSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsResetConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the VpnLink connection specified. * * @summary Resets the VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionReset.json */ async function resetVpnLinkConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts index 56495fc8d0c2..59e1d65b2eb6 100644 --- a/sdk/network/arm-network/samples-dev/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts +++ b/sdk/network/arm-network/samples-dev/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. * * @summary Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json */ async function vpnSiteLinkConnectionDefaultSharedKeyPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts index 9457463f96df..72d16c5f37c4 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. * * @summary Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetVirtualWanVpnServerConfigurations.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetVirtualWanVpnServerConfigurations.json */ async function getVirtualWanVpnServerConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsCreateOrUpdateSample.ts index eb9989a83295..4fc1042ca9d1 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. * * @summary Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationPut.json */ async function vpnServerConfigurationCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsDeleteSample.ts index 00ed8d1f4f19..11b18d8b881b 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VpnServerConfiguration. * * @summary Deletes a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationDelete.json */ async function vpnServerConfigurationDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsGetSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsGetSample.ts index 0f653589b6d2..4c7937aa9fb4 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VpnServerConfiguration. * * @summary Retrieves the details of a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationGet.json */ async function vpnServerConfigurationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListByResourceGroupSample.ts index 636940333788..f1f18fd6d9a8 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the vpnServerConfigurations in a resource group. * * @summary Lists all the vpnServerConfigurations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationListByResourceGroup.json */ async function vpnServerConfigurationListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListSample.ts index c24000f5bd8b..5038e684b32b 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VpnServerConfigurations in a subscription. * * @summary Lists all the VpnServerConfigurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationList.json */ async function vpnServerConfigurationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsUpdateTagsSample.ts index 70a42495ea59..9e57cde7eb8d 100644 --- a/sdk/network/arm-network/samples-dev/vpnServerConfigurationsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnServerConfigurationsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates VpnServerConfiguration tags. * * @summary Updates VpnServerConfiguration tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationUpdateTags.json */ async function vpnServerConfigurationUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSiteLinkConnectionsGetSample.ts b/sdk/network/arm-network/samples-dev/vpnSiteLinkConnectionsGetSample.ts index 822c974ac506..d2384a75076c 100644 --- a/sdk/network/arm-network/samples-dev/vpnSiteLinkConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSiteLinkConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a vpn site link connection. * * @summary Retrieves the details of a vpn site link connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGet.json */ async function vpnSiteLinkConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSiteLinksGetSample.ts b/sdk/network/arm-network/samples-dev/vpnSiteLinksGetSample.ts index 4a2cb4e4fc57..6726d484240e 100644 --- a/sdk/network/arm-network/samples-dev/vpnSiteLinksGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSiteLinksGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VPN site link. * * @summary Retrieves the details of a VPN site link. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkGet.json */ async function vpnSiteGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSiteLinksListByVpnSiteSample.ts b/sdk/network/arm-network/samples-dev/vpnSiteLinksListByVpnSiteSample.ts index f10abff2c319..ab0032300db5 100644 --- a/sdk/network/arm-network/samples-dev/vpnSiteLinksListByVpnSiteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSiteLinksListByVpnSiteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the vpnSiteLinks in a resource group for a vpn site. * * @summary Lists all the vpnSiteLinks in a resource group for a vpn site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkListByVpnSite.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkListByVpnSite.json */ async function vpnSiteLinkListByVpnSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSitesConfigurationDownloadSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesConfigurationDownloadSample.ts index a828a90d140b..9af46d31c0c7 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesConfigurationDownloadSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesConfigurationDownloadSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gives the sas-url to download the configurations for vpn-sites in a resource group. * * @summary Gives the sas-url to download the configurations for vpn-sites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitesConfigurationDownload.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitesConfigurationDownload.json */ async function vpnSitesConfigurationDownload() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesCreateOrUpdateSample.ts index 8e7f5ce803fd..ad538a476b4a 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. * * @summary Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitePut.json */ async function vpnSiteCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSitesDeleteSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesDeleteSample.ts index a862f3659e5b..abf4edfff149 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VpnSite. * * @summary Deletes a VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteDelete.json */ async function vpnSiteDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSitesGetSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesGetSample.ts index e36de56a3df9..cd33ee927638 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VPN site. * * @summary Retrieves the details of a VPN site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteGet.json */ async function vpnSiteGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSitesListByResourceGroupSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesListByResourceGroupSample.ts index 2f842c6910af..b4442d549052 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the vpnSites in a resource group. * * @summary Lists all the vpnSites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteListByResourceGroup.json */ async function vpnSiteListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSitesListSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesListSample.ts index ee4f44ee459f..11f258ad8939 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesListSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VpnSites in a subscription. * * @summary Lists all the VpnSites in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteList.json */ async function vpnSiteList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/vpnSitesUpdateTagsSample.ts b/sdk/network/arm-network/samples-dev/vpnSitesUpdateTagsSample.ts index ff0a784965fd..aa5950ea52dc 100644 --- a/sdk/network/arm-network/samples-dev/vpnSitesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples-dev/vpnSitesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates VpnSite tags. * * @summary Updates VpnSite tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteUpdateTags.json */ async function vpnSiteUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesCreateOrUpdateSample.ts index 9cb244e2009c..87816cb5a331 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or update policy with specified rule set name within a resource group. * * @summary Creates or update policy with specified rule set name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyCreateOrUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyCreateOrUpdate.json */ async function createsOrUpdatesAWafPolicyWithinAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesDeleteSample.ts index 32bc13f7dee8..1285617d3345 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes Policy. * * @summary Deletes Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyDelete.json */ async function deletesAWafPolicyWithinAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesGetSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesGetSample.ts index 283a32374862..fa7536bcbe24 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieve protection policy with specified name within a resource group. * * @summary Retrieve protection policy with specified name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyGet.json */ async function getsAWafPolicyWithinAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListAllSample.ts index 69f15ce7c71d..e0594fc43351 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListAllSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the WAF policies in a subscription. * * @summary Gets all the WAF policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListAllPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListAllPolicies.json */ async function listsAllWafPoliciesInASubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListSample.ts b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListSample.ts index 05fe7b81c1ab..b4160222f90f 100644 --- a/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListSample.ts +++ b/sdk/network/arm-network/samples-dev/webApplicationFirewallPoliciesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all of the protection policies within a resource group. * * @summary Lists all of the protection policies within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListPolicies.json */ async function listsAllWafPoliciesInAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples-dev/webCategoriesGetSample.ts b/sdk/network/arm-network/samples-dev/webCategoriesGetSample.ts index 015d50696893..e32efe9a78fd 100644 --- a/sdk/network/arm-network/samples-dev/webCategoriesGetSample.ts +++ b/sdk/network/arm-network/samples-dev/webCategoriesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Azure Web Category. * * @summary Gets the specified Azure Web Category. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoryGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoryGet.json */ async function getAzureWebCategoryByName() { const subscriptionId = diff --git a/sdk/network/arm-network/samples-dev/webCategoriesListBySubscriptionSample.ts b/sdk/network/arm-network/samples-dev/webCategoriesListBySubscriptionSample.ts index 35a75ce730a8..70bd3b6cc040 100644 --- a/sdk/network/arm-network/samples-dev/webCategoriesListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples-dev/webCategoriesListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Azure Web Categories in a subscription. * * @summary Gets all the Azure Web Categories in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoriesListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoriesListBySubscription.json */ async function listAllAzureWebCategoriesForAGivenSubscription() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/README.md b/sdk/network/arm-network/samples/v33/javascript/README.md index 3f41a7fac7ac..71f7b5983dbe 100644 --- a/sdk/network/arm-network/samples/v33/javascript/README.md +++ b/sdk/network/arm-network/samples/v33/javascript/README.md @@ -4,663 +4,692 @@ These sample programs show how to use the JavaScript client libraries for in som | **File Name** | **Description** | | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [adminRuleCollectionsCreateOrUpdateSample.js][adminrulecollectionscreateorupdatesample] | Creates or updates an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionPut.json | -| [adminRuleCollectionsDeleteSample.js][adminrulecollectionsdeletesample] | Deletes an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json | -| [adminRuleCollectionsGetSample.js][adminrulecollectionsgetsample] | Gets a network manager security admin configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionGet.json | -| [adminRuleCollectionsListSample.js][adminrulecollectionslistsample] | Lists all the rule collections in a security admin configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionList.json | -| [adminRulesCreateOrUpdateSample.js][adminrulescreateorupdatesample] | Creates or updates an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRulePut.json | -| [adminRulesDeleteSample.js][adminrulesdeletesample] | Deletes an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleDelete.json | -| [adminRulesGetSample.js][adminrulesgetsample] | Gets a network manager security configuration admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleGet.json | -| [adminRulesListSample.js][adminruleslistsample] | List all network manager security configuration admin rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleList.json | -| [applicationGatewayPrivateEndpointConnectionsDeleteSample.js][applicationgatewayprivateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json | -| [applicationGatewayPrivateEndpointConnectionsGetSample.js][applicationgatewayprivateendpointconnectionsgetsample] | Gets the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json | -| [applicationGatewayPrivateEndpointConnectionsListSample.js][applicationgatewayprivateendpointconnectionslistsample] | Lists all private endpoint connections on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json | -| [applicationGatewayPrivateEndpointConnectionsUpdateSample.js][applicationgatewayprivateendpointconnectionsupdatesample] | Updates the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json | -| [applicationGatewayPrivateLinkResourcesListSample.js][applicationgatewayprivatelinkresourceslistsample] | Lists all private link resources on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json | -| [applicationGatewayWafDynamicManifestsDefaultGetSample.js][applicationgatewaywafdynamicmanifestsdefaultgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json | -| [applicationGatewayWafDynamicManifestsGetSample.js][applicationgatewaywafdynamicmanifestsgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifests.json | -| [applicationGatewaysBackendHealthOnDemandSample.js][applicationgatewaysbackendhealthondemandsample] | Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthTest.json | -| [applicationGatewaysBackendHealthSample.js][applicationgatewaysbackendhealthsample] | Gets the backend health of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthGet.json | -| [applicationGatewaysCreateOrUpdateSample.js][applicationgatewayscreateorupdatesample] | Creates or updates the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayCreate.json | -| [applicationGatewaysDeleteSample.js][applicationgatewaysdeletesample] | Deletes the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayDelete.json | -| [applicationGatewaysGetSample.js][applicationgatewaysgetsample] | Gets the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayGet.json | -| [applicationGatewaysGetSslPredefinedPolicySample.js][applicationgatewaysgetsslpredefinedpolicysample] | Gets Ssl predefined policy with the specified policy name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json | -| [applicationGatewaysListAllSample.js][applicationgatewayslistallsample] | Gets all the application gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayListAll.json | -| [applicationGatewaysListAvailableRequestHeadersSample.js][applicationgatewayslistavailablerequestheaderssample] | Lists all available request headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json | -| [applicationGatewaysListAvailableResponseHeadersSample.js][applicationgatewayslistavailableresponseheaderssample] | Lists all available response headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json | -| [applicationGatewaysListAvailableServerVariablesSample.js][applicationgatewayslistavailableservervariablessample] | Lists all available server variables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json | -| [applicationGatewaysListAvailableSslOptionsSample.js][applicationgatewayslistavailablessloptionssample] | Lists available Ssl options for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json | -| [applicationGatewaysListAvailableSslPredefinedPoliciesSample.js][applicationgatewayslistavailablesslpredefinedpoliciessample] | Lists all SSL predefined policies for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json | -| [applicationGatewaysListAvailableWafRuleSetsSample.js][applicationgatewayslistavailablewafrulesetssample] | Lists all available web application firewall rule sets. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json | -| [applicationGatewaysListSample.js][applicationgatewayslistsample] | Lists all application gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayList.json | -| [applicationGatewaysStartSample.js][applicationgatewaysstartsample] | Starts the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStart.json | -| [applicationGatewaysStopSample.js][applicationgatewaysstopsample] | Stops the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStop.json | -| [applicationGatewaysUpdateTagsSample.js][applicationgatewaysupdatetagssample] | Updates the specified application gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayUpdateTags.json | -| [applicationSecurityGroupsCreateOrUpdateSample.js][applicationsecuritygroupscreateorupdatesample] | Creates or updates an application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupCreate.json | -| [applicationSecurityGroupsDeleteSample.js][applicationsecuritygroupsdeletesample] | Deletes the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupDelete.json | -| [applicationSecurityGroupsGetSample.js][applicationsecuritygroupsgetsample] | Gets information about the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupGet.json | -| [applicationSecurityGroupsListAllSample.js][applicationsecuritygroupslistallsample] | Gets all application security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupListAll.json | -| [applicationSecurityGroupsListSample.js][applicationsecuritygroupslistsample] | Gets all the application security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupList.json | -| [applicationSecurityGroupsUpdateTagsSample.js][applicationsecuritygroupsupdatetagssample] | Updates an application security group's tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupUpdateTags.json | -| [availableDelegationsListSample.js][availabledelegationslistsample] | Gets all of the available subnet delegations for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsSubscriptionGet.json | -| [availableEndpointServicesListSample.js][availableendpointserviceslistsample] | List what values of endpoint services are available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EndpointServicesList.json | -| [availablePrivateEndpointTypesListByResourceGroupSample.js][availableprivateendpointtypeslistbyresourcegroupsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json | -| [availablePrivateEndpointTypesListSample.js][availableprivateendpointtypeslistsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesGet.json | -| [availableResourceGroupDelegationsListSample.js][availableresourcegroupdelegationslistsample] | Gets all of the available subnet delegations for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsResourceGroupGet.json | -| [availableServiceAliasesListByResourceGroupSample.js][availableservicealiaseslistbyresourcegroupsample] | Gets all available service aliases for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesListByResourceGroup.json | -| [availableServiceAliasesListSample.js][availableservicealiaseslistsample] | Gets all available service aliases for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesList.json | -| [azureFirewallFqdnTagsListAllSample.js][azurefirewallfqdntagslistallsample] | Gets all the Azure Firewall FQDN Tags in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json | -| [azureFirewallsCreateOrUpdateSample.js][azurefirewallscreateorupdatesample] | Creates or updates the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPut.json | -| [azureFirewallsDeleteSample.js][azurefirewallsdeletesample] | Deletes the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallDelete.json | -| [azureFirewallsGetSample.js][azurefirewallsgetsample] | Gets the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGet.json | -| [azureFirewallsListAllSample.js][azurefirewallslistallsample] | Gets all the Azure Firewalls in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListBySubscription.json | -| [azureFirewallsListLearnedPrefixesSample.js][azurefirewallslistlearnedprefixessample] | Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListLearnedIPPrefixes.json | -| [azureFirewallsListSample.js][azurefirewallslistsample] | Lists all Azure Firewalls in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListByResourceGroup.json | -| [azureFirewallsPacketCaptureSample.js][azurefirewallspacketcapturesample] | Runs a packet capture on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPacketCapture.json | -| [azureFirewallsUpdateTagsSample.js][azurefirewallsupdatetagssample] | Updates tags of an Azure Firewall resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallUpdateTags.json | -| [bastionHostsCreateOrUpdateSample.js][bastionhostscreateorupdatesample] | Creates or updates the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPut.json | -| [bastionHostsDeleteSample.js][bastionhostsdeletesample] | Deletes the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDelete.json | -| [bastionHostsGetSample.js][bastionhostsgetsample] | Gets the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGet.json | -| [bastionHostsListByResourceGroupSample.js][bastionhostslistbyresourcegroupsample] | Lists all Bastion Hosts in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListByResourceGroup.json | -| [bastionHostsListSample.js][bastionhostslistsample] | Lists all Bastion Hosts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListBySubscription.json | -| [bastionHostsUpdateTagsSample.js][bastionhostsupdatetagssample] | Updates Tags for BastionHost resource x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPatch.json | -| [bgpServiceCommunitiesListSample.js][bgpservicecommunitieslistsample] | Gets all the available bgp service communities. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceCommunityList.json | -| [checkDnsNameAvailabilitySample.js][checkdnsnameavailabilitysample] | Checks whether a domain name in the cloudapp.azure.com zone is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckDnsNameAvailability.json | -| [configurationPolicyGroupsCreateOrUpdateSample.js][configurationpolicygroupscreateorupdatesample] | Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupPut.json | -| [configurationPolicyGroupsDeleteSample.js][configurationpolicygroupsdeletesample] | Deletes a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupDelete.json | -| [configurationPolicyGroupsGetSample.js][configurationpolicygroupsgetsample] | Retrieves the details of a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupGet.json | -| [configurationPolicyGroupsListByVpnServerConfigurationSample.js][configurationpolicygroupslistbyvpnserverconfigurationsample] | Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json | -| [connectionMonitorsCreateOrUpdateSample.js][connectionmonitorscreateorupdatesample] | Create or update a connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreate.json | -| [connectionMonitorsDeleteSample.js][connectionmonitorsdeletesample] | Deletes the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorDelete.json | -| [connectionMonitorsGetSample.js][connectionmonitorsgetsample] | Gets a connection monitor by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorGet.json | -| [connectionMonitorsListSample.js][connectionmonitorslistsample] | Lists all connection monitors for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorList.json | -| [connectionMonitorsQuerySample.js][connectionmonitorsquerysample] | Query a snapshot of the most recent connection states. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorQuery.json | -| [connectionMonitorsStartSample.js][connectionmonitorsstartsample] | Starts the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStart.json | -| [connectionMonitorsStopSample.js][connectionmonitorsstopsample] | Stops the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStop.json | -| [connectionMonitorsUpdateTagsSample.js][connectionmonitorsupdatetagssample] | Update tags of the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json | -| [connectivityConfigurationsCreateOrUpdateSample.js][connectivityconfigurationscreateorupdatesample] | Creates/Updates a new network manager connectivity configuration x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationPut.json | -| [connectivityConfigurationsDeleteSample.js][connectivityconfigurationsdeletesample] | Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json | -| [connectivityConfigurationsGetSample.js][connectivityconfigurationsgetsample] | Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationGet.json | -| [connectivityConfigurationsListSample.js][connectivityconfigurationslistsample] | Lists all the network manager connectivity configuration in a specified network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationList.json | -| [customIPPrefixesCreateOrUpdateSample.js][customipprefixescreateorupdatesample] | Creates or updates a custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixCreateCustomizedValues.json | -| [customIPPrefixesDeleteSample.js][customipprefixesdeletesample] | Deletes the specified custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixDelete.json | -| [customIPPrefixesGetSample.js][customipprefixesgetsample] | Gets the specified custom IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixGet.json | -| [customIPPrefixesListAllSample.js][customipprefixeslistallsample] | Gets all the custom IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixListAll.json | -| [customIPPrefixesListSample.js][customipprefixeslistsample] | Gets all custom IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixList.json | -| [customIPPrefixesUpdateTagsSample.js][customipprefixesupdatetagssample] | Updates custom IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixUpdateTags.json | -| [ddosCustomPoliciesCreateOrUpdateSample.js][ddoscustompoliciescreateorupdatesample] | Creates or updates a DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyCreate.json | -| [ddosCustomPoliciesDeleteSample.js][ddoscustompoliciesdeletesample] | Deletes the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyDelete.json | -| [ddosCustomPoliciesGetSample.js][ddoscustompoliciesgetsample] | Gets information about the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyGet.json | -| [ddosCustomPoliciesUpdateTagsSample.js][ddoscustompoliciesupdatetagssample] | Update a DDoS custom policy tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyUpdateTags.json | -| [ddosProtectionPlansCreateOrUpdateSample.js][ddosprotectionplanscreateorupdatesample] | Creates or updates a DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanCreate.json | -| [ddosProtectionPlansDeleteSample.js][ddosprotectionplansdeletesample] | Deletes the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanDelete.json | -| [ddosProtectionPlansGetSample.js][ddosprotectionplansgetsample] | Gets information about the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanGet.json | -| [ddosProtectionPlansListByResourceGroupSample.js][ddosprotectionplanslistbyresourcegroupsample] | Gets all the DDoS protection plans in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanList.json | -| [ddosProtectionPlansListSample.js][ddosprotectionplanslistsample] | Gets all DDoS protection plans in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanListAll.json | -| [ddosProtectionPlansUpdateTagsSample.js][ddosprotectionplansupdatetagssample] | Update a DDoS protection plan tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanUpdateTags.json | -| [defaultSecurityRulesGetSample.js][defaultsecurityrulesgetsample] | Get the specified default network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleGet.json | -| [defaultSecurityRulesListSample.js][defaultsecurityruleslistsample] | Gets all default security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleList.json | -| [deleteBastionShareableLinkByTokenSample.js][deletebastionshareablelinkbytokensample] | Deletes the Bastion Shareable Links for all the tokens specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDeleteByToken.json | -| [deleteBastionShareableLinkSample.js][deletebastionshareablelinksample] | Deletes the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDelete.json | -| [disconnectActiveSessionsSample.js][disconnectactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionDelete.json | -| [dscpConfigurationCreateOrUpdateSample.js][dscpconfigurationcreateorupdatesample] | Creates or updates a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationCreate.json | -| [dscpConfigurationDeleteSample.js][dscpconfigurationdeletesample] | Deletes a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationDelete.json | -| [dscpConfigurationGetSample.js][dscpconfigurationgetsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationGet.json | -| [dscpConfigurationListAllSample.js][dscpconfigurationlistallsample] | Gets all dscp configurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationListAll.json | -| [dscpConfigurationListSample.js][dscpconfigurationlistsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationList.json | -| [expressRouteCircuitAuthorizationsCreateOrUpdateSample.js][expressroutecircuitauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json | -| [expressRouteCircuitAuthorizationsDeleteSample.js][expressroutecircuitauthorizationsdeletesample] | Deletes the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json | -| [expressRouteCircuitAuthorizationsGetSample.js][expressroutecircuitauthorizationsgetsample] | Gets the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationGet.json | -| [expressRouteCircuitAuthorizationsListSample.js][expressroutecircuitauthorizationslistsample] | Gets all authorizations in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationList.json | -| [expressRouteCircuitConnectionsCreateOrUpdateSample.js][expressroutecircuitconnectionscreateorupdatesample] | Creates or updates a Express Route Circuit Connection in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionCreate.json | -| [expressRouteCircuitConnectionsDeleteSample.js][expressroutecircuitconnectionsdeletesample] | Deletes the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionDelete.json | -| [expressRouteCircuitConnectionsGetSample.js][expressroutecircuitconnectionsgetsample] | Gets the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionGet.json | -| [expressRouteCircuitConnectionsListSample.js][expressroutecircuitconnectionslistsample] | Gets all global reach connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionList.json | -| [expressRouteCircuitPeeringsCreateOrUpdateSample.js][expressroutecircuitpeeringscreateorupdatesample] | Creates or updates a peering in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringCreate.json | -| [expressRouteCircuitPeeringsDeleteSample.js][expressroutecircuitpeeringsdeletesample] | Deletes the specified peering from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringDelete.json | -| [expressRouteCircuitPeeringsGetSample.js][expressroutecircuitpeeringsgetsample] | Gets the specified peering for the express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringGet.json | -| [expressRouteCircuitPeeringsListSample.js][expressroutecircuitpeeringslistsample] | Gets all peerings in a specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringList.json | -| [expressRouteCircuitsCreateOrUpdateSample.js][expressroutecircuitscreateorupdatesample] | Creates or updates an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreate.json | -| [expressRouteCircuitsDeleteSample.js][expressroutecircuitsdeletesample] | Deletes the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitDelete.json | -| [expressRouteCircuitsGetPeeringStatsSample.js][expressroutecircuitsgetpeeringstatssample] | Gets all stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringStats.json | -| [expressRouteCircuitsGetSample.js][expressroutecircuitsgetsample] | Gets information about the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitGet.json | -| [expressRouteCircuitsGetStatsSample.js][expressroutecircuitsgetstatssample] | Gets all the stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitStats.json | -| [expressRouteCircuitsListAllSample.js][expressroutecircuitslistallsample] | Gets all the express route circuits in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListBySubscription.json | -| [expressRouteCircuitsListArpTableSample.js][expressroutecircuitslistarptablesample] | Gets the currently advertised ARP table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitARPTableList.json | -| [expressRouteCircuitsListRoutesTableSample.js][expressroutecircuitslistroutestablesample] | Gets the currently advertised routes table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableList.json | -| [expressRouteCircuitsListRoutesTableSummarySample.js][expressroutecircuitslistroutestablesummarysample] | Gets the currently advertised routes table summary associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json | -| [expressRouteCircuitsListSample.js][expressroutecircuitslistsample] | Gets all the express route circuits in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListByResourceGroup.json | -| [expressRouteCircuitsUpdateTagsSample.js][expressroutecircuitsupdatetagssample] | Updates an express route circuit tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitUpdateTags.json | -| [expressRouteConnectionsCreateOrUpdateSample.js][expressrouteconnectionscreateorupdatesample] | Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionCreate.json | -| [expressRouteConnectionsDeleteSample.js][expressrouteconnectionsdeletesample] | Deletes a connection to a ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionDelete.json | -| [expressRouteConnectionsGetSample.js][expressrouteconnectionsgetsample] | Gets the specified ExpressRouteConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionGet.json | -| [expressRouteConnectionsListSample.js][expressrouteconnectionslistsample] | Lists ExpressRouteConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionList.json | -| [expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js][expressroutecrossconnectionpeeringscreateorupdatesample] | Creates or updates a peering in the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json | -| [expressRouteCrossConnectionPeeringsDeleteSample.js][expressroutecrossconnectionpeeringsdeletesample] | Deletes the specified peering from the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json | -| [expressRouteCrossConnectionPeeringsGetSample.js][expressroutecrossconnectionpeeringsgetsample] | Gets the specified peering for the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json | -| [expressRouteCrossConnectionPeeringsListSample.js][expressroutecrossconnectionpeeringslistsample] | Gets all peerings in a specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json | -| [expressRouteCrossConnectionsCreateOrUpdateSample.js][expressroutecrossconnectionscreateorupdatesample] | Update the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdate.json | -| [expressRouteCrossConnectionsGetSample.js][expressroutecrossconnectionsgetsample] | Gets details about the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionGet.json | -| [expressRouteCrossConnectionsListArpTableSample.js][expressroutecrossconnectionslistarptablesample] | Gets the currently advertised ARP table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsArpTable.json | -| [expressRouteCrossConnectionsListByResourceGroupSample.js][expressroutecrossconnectionslistbyresourcegroupsample] | Retrieves all the ExpressRouteCrossConnections in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json | -| [expressRouteCrossConnectionsListRoutesTableSample.js][expressroutecrossconnectionslistroutestablesample] | Gets the currently advertised routes table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json | -| [expressRouteCrossConnectionsListRoutesTableSummarySample.js][expressroutecrossconnectionslistroutestablesummarysample] | Gets the route table summary associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json | -| [expressRouteCrossConnectionsListSample.js][expressroutecrossconnectionslistsample] | Retrieves all the ExpressRouteCrossConnections in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionList.json | -| [expressRouteCrossConnectionsUpdateTagsSample.js][expressroutecrossconnectionsupdatetagssample] | Updates an express route cross connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json | -| [expressRouteGatewaysCreateOrUpdateSample.js][expressroutegatewayscreateorupdatesample] | Creates or updates a ExpressRoute gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayCreate.json | -| [expressRouteGatewaysDeleteSample.js][expressroutegatewaysdeletesample] | Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayDelete.json | -| [expressRouteGatewaysGetSample.js][expressroutegatewaysgetsample] | Fetches the details of a ExpressRoute gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayGet.json | -| [expressRouteGatewaysListByResourceGroupSample.js][expressroutegatewayslistbyresourcegroupsample] | Lists ExpressRoute gateways in a given resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListByResourceGroup.json | -| [expressRouteGatewaysListBySubscriptionSample.js][expressroutegatewayslistbysubscriptionsample] | Lists ExpressRoute gateways under a given subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListBySubscription.json | -| [expressRouteGatewaysUpdateTagsSample.js][expressroutegatewaysupdatetagssample] | Updates express route gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayUpdateTags.json | -| [expressRouteLinksGetSample.js][expressroutelinksgetsample] | Retrieves the specified ExpressRouteLink resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkGet.json | -| [expressRouteLinksListSample.js][expressroutelinkslistsample] | Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkList.json | -| [expressRoutePortAuthorizationsCreateOrUpdateSample.js][expressrouteportauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationCreate.json | -| [expressRoutePortAuthorizationsDeleteSample.js][expressrouteportauthorizationsdeletesample] | Deletes the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationDelete.json | -| [expressRoutePortAuthorizationsGetSample.js][expressrouteportauthorizationsgetsample] | Gets the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationGet.json | -| [expressRoutePortAuthorizationsListSample.js][expressrouteportauthorizationslistsample] | Gets all authorizations in an express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationList.json | -| [expressRoutePortsCreateOrUpdateSample.js][expressrouteportscreateorupdatesample] | Creates or updates the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortCreate.json | -| [expressRoutePortsDeleteSample.js][expressrouteportsdeletesample] | Deletes the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortDelete.json | -| [expressRoutePortsGenerateLoaSample.js][expressrouteportsgenerateloasample] | Generate a letter of authorization for the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateExpressRoutePortsLOA.json | -| [expressRoutePortsGetSample.js][expressrouteportsgetsample] | Retrieves the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortGet.json | -| [expressRoutePortsListByResourceGroupSample.js][expressrouteportslistbyresourcegroupsample] | List all the ExpressRoutePort resources in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortListByResourceGroup.json | -| [expressRoutePortsListSample.js][expressrouteportslistsample] | List all the ExpressRoutePort resources in the specified subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortList.json | -| [expressRoutePortsLocationsGetSample.js][expressrouteportslocationsgetsample] | Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationGet.json | -| [expressRoutePortsLocationsListSample.js][expressrouteportslocationslistsample] | Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationList.json | -| [expressRoutePortsUpdateTagsSample.js][expressrouteportsupdatetagssample] | Update ExpressRoutePort tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateTags.json | -| [expressRouteProviderPortSample.js][expressrouteproviderportsample] | Retrieves detail of a provider port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPort.json | -| [expressRouteProviderPortsLocationListSample.js][expressrouteproviderportslocationlistsample] | Retrieves all the ExpressRouteProviderPorts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPortList.json | -| [expressRouteServiceProvidersListSample.js][expressrouteserviceproviderslistsample] | Gets all the available express route service providers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteProviderList.json | -| [firewallPoliciesCreateOrUpdateSample.js][firewallpoliciescreateorupdatesample] | Creates or updates the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPut.json | -| [firewallPoliciesDeleteSample.js][firewallpoliciesdeletesample] | Deletes the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDelete.json | -| [firewallPoliciesGetSample.js][firewallpoliciesgetsample] | Gets the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyGet.json | -| [firewallPoliciesListAllSample.js][firewallpolicieslistallsample] | Gets all the Firewall Policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListBySubscription.json | -| [firewallPoliciesListSample.js][firewallpolicieslistsample] | Lists all Firewall Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListByResourceGroup.json | -| [firewallPoliciesUpdateTagsSample.js][firewallpoliciesupdatetagssample] | Updates tags of a Azure Firewall Policy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPatch.json | -| [firewallPolicyDeploymentsDeploySample.js][firewallpolicydeploymentsdeploysample] | Deploys the firewall policy draft and child rule collection group drafts. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDeploy.json | -| [firewallPolicyDraftsCreateOrUpdateSample.js][firewallpolicydraftscreateorupdatesample] | Create or update a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftPut.json | -| [firewallPolicyDraftsDeleteSample.js][firewallpolicydraftsdeletesample] | Delete a draft policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDelete.json | -| [firewallPolicyDraftsGetSample.js][firewallpolicydraftsgetsample] | Get a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftGet.json | -| [firewallPolicyIdpsSignaturesFilterValuesListSample.js][firewallpolicyidpssignaturesfiltervalueslistsample] | Retrieves the current filter values for the signatures overrides x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json | -| [firewallPolicyIdpsSignaturesListSample.js][firewallpolicyidpssignatureslistsample] | Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverrides.json | -| [firewallPolicyIdpsSignaturesOverridesGetSample.js][firewallpolicyidpssignaturesoverridesgetsample] | Returns all signatures overrides for a specific policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesGet.json | -| [firewallPolicyIdpsSignaturesOverridesListSample.js][firewallpolicyidpssignaturesoverrideslistsample] | Returns all signatures overrides objects for a specific policy as a list containing a single value. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesList.json | -| [firewallPolicyIdpsSignaturesOverridesPatchSample.js][firewallpolicyidpssignaturesoverridespatchsample] | Will update the status of policy's signature overrides for IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPatch.json | -| [firewallPolicyIdpsSignaturesOverridesPutSample.js][firewallpolicyidpssignaturesoverridesputsample] | Will override/create a new signature overrides for the policy's IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPut.json | -| [firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js][firewallpolicyrulecollectiongroupdraftscreateorupdatesample] | Create or Update Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json | -| [firewallPolicyRuleCollectionGroupDraftsDeleteSample.js][firewallpolicyrulecollectiongroupdraftsdeletesample] | Delete Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json | -| [firewallPolicyRuleCollectionGroupDraftsGetSample.js][firewallpolicyrulecollectiongroupdraftsgetsample] | Get Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json | -| [firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js][firewallpolicyrulecollectiongroupscreateorupdatesample] | Creates or updates the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json | -| [firewallPolicyRuleCollectionGroupsDeleteSample.js][firewallpolicyrulecollectiongroupsdeletesample] | Deletes the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json | -| [firewallPolicyRuleCollectionGroupsGetSample.js][firewallpolicyrulecollectiongroupsgetsample] | Gets the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json | -| [firewallPolicyRuleCollectionGroupsListSample.js][firewallpolicyrulecollectiongroupslistsample] | Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json | -| [flowLogsCreateOrUpdateSample.js][flowlogscreateorupdatesample] | Create or update a flow log for the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogCreate.json | -| [flowLogsDeleteSample.js][flowlogsdeletesample] | Deletes the specified flow log resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogDelete.json | -| [flowLogsGetSample.js][flowlogsgetsample] | Gets a flow log resource by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogGet.json | -| [flowLogsListSample.js][flowlogslistsample] | Lists all flow log resources for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogList.json | -| [flowLogsUpdateTagsSample.js][flowlogsupdatetagssample] | Update tags of the specified flow log. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogUpdateTags.json | -| [generatevirtualwanvpnserverconfigurationvpnprofileSample.js][generatevirtualwanvpnserverconfigurationvpnprofilesample] | Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json | -| [getActiveSessionsSample.js][getactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionsList.json | -| [getBastionShareableLinkSample.js][getbastionshareablelinksample] | Return the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkGet.json | -| [hubRouteTablesCreateOrUpdateSample.js][hubroutetablescreateorupdatesample] | Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTablePut.json | -| [hubRouteTablesDeleteSample.js][hubroutetablesdeletesample] | Deletes a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableDelete.json | -| [hubRouteTablesGetSample.js][hubroutetablesgetsample] | Retrieves the details of a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableGet.json | -| [hubRouteTablesListSample.js][hubroutetableslistsample] | Retrieves the details of all RouteTables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableList.json | -| [hubVirtualNetworkConnectionsCreateOrUpdateSample.js][hubvirtualnetworkconnectionscreateorupdatesample] | Creates a hub virtual network connection if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionPut.json | -| [hubVirtualNetworkConnectionsDeleteSample.js][hubvirtualnetworkconnectionsdeletesample] | Deletes a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionDelete.json | -| [hubVirtualNetworkConnectionsGetSample.js][hubvirtualnetworkconnectionsgetsample] | Retrieves the details of a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionGet.json | -| [hubVirtualNetworkConnectionsListSample.js][hubvirtualnetworkconnectionslistsample] | Retrieves the details of all HubVirtualNetworkConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionList.json | -| [inboundNatRulesCreateOrUpdateSample.js][inboundnatrulescreateorupdatesample] | Creates or updates a load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleCreate.json | -| [inboundNatRulesDeleteSample.js][inboundnatrulesdeletesample] | Deletes the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleDelete.json | -| [inboundNatRulesGetSample.js][inboundnatrulesgetsample] | Gets the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleGet.json | -| [inboundNatRulesListSample.js][inboundnatruleslistsample] | Gets all the inbound NAT rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleList.json | -| [inboundSecurityRuleCreateOrUpdateSample.js][inboundsecurityrulecreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRulePut.json | -| [inboundSecurityRuleGetSample.js][inboundsecurityrulegetsample] | Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRuleGet.json | -| [ipAllocationsCreateOrUpdateSample.js][ipallocationscreateorupdatesample] | Creates or updates an IpAllocation in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationCreate.json | -| [ipAllocationsDeleteSample.js][ipallocationsdeletesample] | Deletes the specified IpAllocation. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationDelete.json | -| [ipAllocationsGetSample.js][ipallocationsgetsample] | Gets the specified IpAllocation by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationGet.json | -| [ipAllocationsListByResourceGroupSample.js][ipallocationslistbyresourcegroupsample] | Gets all IpAllocations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationListByResourceGroup.json | -| [ipAllocationsListSample.js][ipallocationslistsample] | Gets all IpAllocations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationList.json | -| [ipAllocationsUpdateTagsSample.js][ipallocationsupdatetagssample] | Updates a IpAllocation tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationUpdateTags.json | -| [ipGroupsCreateOrUpdateSample.js][ipgroupscreateorupdatesample] | Creates or updates an ipGroups in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsCreate.json | -| [ipGroupsDeleteSample.js][ipgroupsdeletesample] | Deletes the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsDelete.json | -| [ipGroupsGetSample.js][ipgroupsgetsample] | Gets the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsGet.json | -| [ipGroupsListByResourceGroupSample.js][ipgroupslistbyresourcegroupsample] | Gets all IpGroups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListByResourceGroup.json | -| [ipGroupsListSample.js][ipgroupslistsample] | Gets all IpGroups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListBySubscription.json | -| [ipGroupsUpdateGroupsSample.js][ipgroupsupdategroupssample] | Updates tags of an IpGroups resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsUpdateTags.json | -| [listActiveConnectivityConfigurationsSample.js][listactiveconnectivityconfigurationssample] | Lists active connectivity configurations in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json | -| [listActiveSecurityAdminRulesSample.js][listactivesecurityadminrulessample] | Lists active security admin rules in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json | -| [listNetworkManagerEffectiveConnectivityConfigurationsSample.js][listnetworkmanagereffectiveconnectivityconfigurationssample] | List all effective connectivity configurations applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json | -| [listNetworkManagerEffectiveSecurityAdminRulesSample.js][listnetworkmanagereffectivesecurityadminrulessample] | List all effective security admin rules applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json | -| [loadBalancerBackendAddressPoolsCreateOrUpdateSample.js][loadbalancerbackendaddresspoolscreateorupdatesample] | Creates or updates a load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json | -| [loadBalancerBackendAddressPoolsDeleteSample.js][loadbalancerbackendaddresspoolsdeletesample] | Deletes the specified load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolDelete.json | -| [loadBalancerBackendAddressPoolsGetSample.js][loadbalancerbackendaddresspoolsgetsample] | Gets load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json | -| [loadBalancerBackendAddressPoolsListSample.js][loadbalancerbackendaddresspoolslistsample] | Gets all the load balancer backed address pools. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json | -| [loadBalancerFrontendIPConfigurationsGetSample.js][loadbalancerfrontendipconfigurationsgetsample] | Gets load balancer frontend IP configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json | -| [loadBalancerFrontendIPConfigurationsListSample.js][loadbalancerfrontendipconfigurationslistsample] | Gets all the load balancer frontend IP configurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationList.json | -| [loadBalancerLoadBalancingRulesGetSample.js][loadbalancerloadbalancingrulesgetsample] | Gets the specified load balancer load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleGet.json | -| [loadBalancerLoadBalancingRulesListSample.js][loadbalancerloadbalancingruleslistsample] | Gets all the load balancing rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleList.json | -| [loadBalancerNetworkInterfacesListSample.js][loadbalancernetworkinterfaceslistsample] | Gets associated load balancer network interfaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json | -| [loadBalancerOutboundRulesGetSample.js][loadbalanceroutboundrulesgetsample] | Gets the specified load balancer outbound rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleGet.json | -| [loadBalancerOutboundRulesListSample.js][loadbalanceroutboundruleslistsample] | Gets all the outbound rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleList.json | -| [loadBalancerProbesGetSample.js][loadbalancerprobesgetsample] | Gets load balancer probe. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeGet.json | -| [loadBalancerProbesListSample.js][loadbalancerprobeslistsample] | Gets all the load balancer probes. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeList.json | -| [loadBalancersCreateOrUpdateSample.js][loadbalancerscreateorupdatesample] | Creates or updates a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreate.json | -| [loadBalancersDeleteSample.js][loadbalancersdeletesample] | Deletes the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerDelete.json | -| [loadBalancersGetSample.js][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGet.json | -| [loadBalancersListAllSample.js][loadbalancerslistallsample] | Gets all the load balancers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerListAll.json | -| [loadBalancersListInboundNatRulePortMappingsSample.js][loadbalancerslistinboundnatruleportmappingssample] | List of inbound NAT rule port mappings. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/QueryInboundNatRulePortMapping.json | -| [loadBalancersListSample.js][loadbalancerslistsample] | Gets all the load balancers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerList.json | -| [loadBalancersMigrateToIPBasedSample.js][loadbalancersmigratetoipbasedsample] | Migrate load balancer to IP Based x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/MigrateLoadBalancerToIPBased.json | -| [loadBalancersSwapPublicIPAddressesSample.js][loadbalancersswappublicipaddressessample] | Swaps VIPs between two load balancers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancersSwapPublicIpAddresses.json | -| [loadBalancersUpdateTagsSample.js][loadbalancersupdatetagssample] | Updates a load balancer tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerUpdateTags.json | -| [localNetworkGatewaysCreateOrUpdateSample.js][localnetworkgatewayscreateorupdatesample] | Creates or updates a local network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayCreate.json | -| [localNetworkGatewaysDeleteSample.js][localnetworkgatewaysdeletesample] | Deletes the specified local network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayDelete.json | -| [localNetworkGatewaysGetSample.js][localnetworkgatewaysgetsample] | Gets the specified local network gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayGet.json | -| [localNetworkGatewaysListSample.js][localnetworkgatewayslistsample] | Gets all the local network gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayList.json | -| [localNetworkGatewaysUpdateTagsSample.js][localnetworkgatewaysupdatetagssample] | Updates a local network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayUpdateTags.json | -| [managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js][managementgroupnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupPut.json | -| [managementGroupNetworkManagerConnectionsDeleteSample.js][managementgroupnetworkmanagerconnectionsdeletesample] | Delete specified pending connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json | -| [managementGroupNetworkManagerConnectionsGetSample.js][managementgroupnetworkmanagerconnectionsgetsample] | Get a specified connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupGet.json | -| [managementGroupNetworkManagerConnectionsListSample.js][managementgroupnetworkmanagerconnectionslistsample] | List all network manager connections created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupList.json | -| [natGatewaysCreateOrUpdateSample.js][natgatewayscreateorupdatesample] | Creates or updates a nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayCreateOrUpdate.json | -| [natGatewaysDeleteSample.js][natgatewaysdeletesample] | Deletes the specified nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayDelete.json | -| [natGatewaysGetSample.js][natgatewaysgetsample] | Gets the specified nat gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayGet.json | -| [natGatewaysListAllSample.js][natgatewayslistallsample] | Gets all the Nat Gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayListAll.json | -| [natGatewaysListSample.js][natgatewayslistsample] | Gets all nat gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayList.json | -| [natGatewaysUpdateTagsSample.js][natgatewaysupdatetagssample] | Updates nat gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayUpdateTags.json | -| [natRulesCreateOrUpdateSample.js][natrulescreateorupdatesample] | Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRulePut.json | -| [natRulesDeleteSample.js][natrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleDelete.json | -| [natRulesGetSample.js][natrulesgetsample] | Retrieves the details of a nat ruleGet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleGet.json | -| [natRulesListByVpnGatewaySample.js][natruleslistbyvpngatewaysample] | Retrieves all nat rules for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleList.json | -| [networkGroupsCreateOrUpdateSample.js][networkgroupscreateorupdatesample] | Creates or updates a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupPut.json | -| [networkGroupsDeleteSample.js][networkgroupsdeletesample] | Deletes a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupDelete.json | -| [networkGroupsGetSample.js][networkgroupsgetsample] | Gets the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupGet.json | -| [networkGroupsListSample.js][networkgroupslistsample] | Lists the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupList.json | -| [networkInterfaceIPConfigurationsGetSample.js][networkinterfaceipconfigurationsgetsample] | Gets the specified network interface ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationGet.json | -| [networkInterfaceIPConfigurationsListSample.js][networkinterfaceipconfigurationslistsample] | Get all ip configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationList.json | -| [networkInterfaceLoadBalancersListSample.js][networkinterfaceloadbalancerslistsample] | List all load balancers in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceLoadBalancerList.json | -| [networkInterfaceTapConfigurationsCreateOrUpdateSample.js][networkinterfacetapconfigurationscreateorupdatesample] | Creates or updates a Tap configuration in the specified NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationCreate.json | -| [networkInterfaceTapConfigurationsDeleteSample.js][networkinterfacetapconfigurationsdeletesample] | Deletes the specified tap configuration from the NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationDelete.json | -| [networkInterfaceTapConfigurationsGetSample.js][networkinterfacetapconfigurationsgetsample] | Get the specified tap configuration on a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationGet.json | -| [networkInterfaceTapConfigurationsListSample.js][networkinterfacetapconfigurationslistsample] | Get all Tap configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationList.json | -| [networkInterfacesCreateOrUpdateSample.js][networkinterfacescreateorupdatesample] | Creates or updates a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreate.json | -| [networkInterfacesDeleteSample.js][networkinterfacesdeletesample] | Deletes the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceDelete.json | -| [networkInterfacesGetCloudServiceNetworkInterfaceSample.js][networkinterfacesgetcloudservicenetworkinterfacesample] | Get the specified network interface in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceGet.json | -| [networkInterfacesGetEffectiveRouteTableSample.js][networkinterfacesgeteffectiveroutetablesample] | Gets all route tables applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json | -| [networkInterfacesGetSample.js][networkinterfacesgetsample] | Gets information about the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceGet.json | -| [networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js][networkinterfacesgetvirtualmachinescalesetipconfigurationsample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigGet.json | -| [networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js][networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample] | Get the specified network interface in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceGet.json | -| [networkInterfacesListAllSample.js][networkinterfaceslistallsample] | Gets all network interfaces in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceListAll.json | -| [networkInterfacesListCloudServiceNetworkInterfacesSample.js][networkinterfaceslistcloudservicenetworkinterfacessample] | Gets all network interfaces in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceList.json | -| [networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js][networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample] | Gets information about all network interfaces in a role instance in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json | -| [networkInterfacesListEffectiveNetworkSecurityGroupsSample.js][networkinterfaceslisteffectivenetworksecuritygroupssample] | Gets all network security groups applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveNSGList.json | -| [networkInterfacesListSample.js][networkinterfaceslistsample] | Gets all network interfaces in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js][networkinterfaceslistvirtualmachinescalesetipconfigurationssample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigList.json | -| [networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js][networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample] | Gets all network interfaces in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js][networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample] | Gets information about all network interfaces in a virtual machine in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmNetworkInterfaceList.json | -| [networkInterfacesUpdateTagsSample.js][networkinterfacesupdatetagssample] | Updates a network interface tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceUpdateTags.json | -| [networkManagerCommitsPostSample.js][networkmanagercommitspostsample] | Post a Network Manager Commit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerCommitPost.json | -| [networkManagerDeploymentStatusListSample.js][networkmanagerdeploymentstatuslistsample] | Post to List of Network Manager Deployment Status. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDeploymentStatusList.json | -| [networkManagerRoutingConfigurationsCreateOrUpdateSample.js][networkmanagerroutingconfigurationscreateorupdatesample] | Creates or updates a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationPut.json | -| [networkManagerRoutingConfigurationsDeleteSample.js][networkmanagerroutingconfigurationsdeletesample] | Deletes a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationDelete.json | -| [networkManagerRoutingConfigurationsGetSample.js][networkmanagerroutingconfigurationsgetsample] | Retrieves a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationGet.json | -| [networkManagerRoutingConfigurationsListSample.js][networkmanagerroutingconfigurationslistsample] | Lists all the network manager routing configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationList.json | -| [networkManagersCreateOrUpdateSample.js][networkmanagerscreateorupdatesample] | Creates or updates a Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPut.json | -| [networkManagersDeleteSample.js][networkmanagersdeletesample] | Deletes a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDelete.json | -| [networkManagersGetSample.js][networkmanagersgetsample] | Gets the specified Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGet.json | -| [networkManagersListBySubscriptionSample.js][networkmanagerslistbysubscriptionsample] | List all network managers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerListAll.json | -| [networkManagersListSample.js][networkmanagerslistsample] | List network managers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerList.json | -| [networkManagersPatchSample.js][networkmanagerspatchsample] | Patch NetworkManager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPatch.json | -| [networkProfilesCreateOrUpdateSample.js][networkprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileCreateConfigOnly.json | -| [networkProfilesDeleteSample.js][networkprofilesdeletesample] | Deletes the specified network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileDelete.json | -| [networkProfilesGetSample.js][networkprofilesgetsample] | Gets the specified network profile in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetConfigOnly.json | -| [networkProfilesListAllSample.js][networkprofileslistallsample] | Gets all the network profiles in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileListAll.json | -| [networkProfilesListSample.js][networkprofileslistsample] | Gets all network profiles in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileList.json | -| [networkProfilesUpdateTagsSample.js][networkprofilesupdatetagssample] | Updates network profile tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileUpdateTags.json | -| [networkSecurityGroupsCreateOrUpdateSample.js][networksecuritygroupscreateorupdatesample] | Creates or updates a network security group in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreate.json | -| [networkSecurityGroupsDeleteSample.js][networksecuritygroupsdeletesample] | Deletes the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupDelete.json | -| [networkSecurityGroupsGetSample.js][networksecuritygroupsgetsample] | Gets the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupGet.json | -| [networkSecurityGroupsListAllSample.js][networksecuritygroupslistallsample] | Gets all network security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupListAll.json | -| [networkSecurityGroupsListSample.js][networksecuritygroupslistsample] | Gets all network security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupList.json | -| [networkSecurityGroupsUpdateTagsSample.js][networksecuritygroupsupdatetagssample] | Updates a network security group tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupUpdateTags.json | -| [networkVirtualApplianceConnectionsCreateOrUpdateSample.js][networkvirtualapplianceconnectionscreateorupdatesample] | Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionPut.json | -| [networkVirtualApplianceConnectionsDeleteSample.js][networkvirtualapplianceconnectionsdeletesample] | Deletes a NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionDelete.json | -| [networkVirtualApplianceConnectionsGetSample.js][networkvirtualapplianceconnectionsgetsample] | Retrieves the details of specified NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionGet.json | -| [networkVirtualApplianceConnectionsListSample.js][networkvirtualapplianceconnectionslistsample] | Lists NetworkVirtualApplianceConnections under the NVA. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionList.json | -| [networkVirtualAppliancesCreateOrUpdateSample.js][networkvirtualappliancescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualAppliancePut.json | -| [networkVirtualAppliancesDeleteSample.js][networkvirtualappliancesdeletesample] | Deletes the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceDelete.json | -| [networkVirtualAppliancesGetSample.js][networkvirtualappliancesgetsample] | Gets the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceGet.json | -| [networkVirtualAppliancesListByResourceGroupSample.js][networkvirtualapplianceslistbyresourcegroupsample] | Lists all Network Virtual Appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json | -| [networkVirtualAppliancesListSample.js][networkvirtualapplianceslistsample] | Gets all Network Virtual Appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListBySubscription.json | -| [networkVirtualAppliancesRestartSample.js][networkvirtualappliancesrestartsample] | Restarts one or more VMs belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceEmptyRestart.json | -| [networkVirtualAppliancesUpdateTagsSample.js][networkvirtualappliancesupdatetagssample] | Updates a Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceUpdateTags.json | -| [networkWatchersCheckConnectivitySample.js][networkwatcherscheckconnectivitysample] | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectivityCheck.json | -| [networkWatchersCreateOrUpdateSample.js][networkwatcherscreateorupdatesample] | Creates or updates a network watcher in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherCreate.json | -| [networkWatchersDeleteSample.js][networkwatchersdeletesample] | Deletes the specified network watcher resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherDelete.json | -| [networkWatchersGetAzureReachabilityReportSample.js][networkwatchersgetazurereachabilityreportsample] | NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json | -| [networkWatchersGetFlowLogStatusSample.js][networkwatchersgetflowlogstatussample] | Queries status of flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogStatusQuery.json | -| [networkWatchersGetNetworkConfigurationDiagnosticSample.js][networkwatchersgetnetworkconfigurationdiagnosticsample] | Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json | -| [networkWatchersGetNextHopSample.js][networkwatchersgetnexthopsample] | Gets the next hop from the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNextHopGet.json | -| [networkWatchersGetSample.js][networkwatchersgetsample] | Gets the specified network watcher by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherGet.json | -| [networkWatchersGetTopologySample.js][networkwatchersgettopologysample] | Gets the current network topology by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTopologyGet.json | -| [networkWatchersGetTroubleshootingResultSample.js][networkwatchersgettroubleshootingresultsample] | Get the last completed troubleshooting result on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootResultQuery.json | -| [networkWatchersGetTroubleshootingSample.js][networkwatchersgettroubleshootingsample] | Initiate troubleshooting on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootGet.json | -| [networkWatchersGetVMSecurityRulesSample.js][networkwatchersgetvmsecurityrulessample] | Gets the configured and effective security group rules on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherSecurityGroupViewGet.json | -| [networkWatchersListAllSample.js][networkwatcherslistallsample] | Gets all network watchers by subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherListAll.json | -| [networkWatchersListAvailableProvidersSample.js][networkwatcherslistavailableproviderssample] | NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAvailableProvidersListGet.json | -| [networkWatchersListSample.js][networkwatcherslistsample] | Gets all network watchers by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherList.json | -| [networkWatchersSetFlowLogConfigurationSample.js][networkwatcherssetflowlogconfigurationsample] | Configures flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogConfigure.json | -| [networkWatchersUpdateTagsSample.js][networkwatchersupdatetagssample] | Updates a network watcher tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherUpdateTags.json | -| [networkWatchersVerifyIPFlowSample.js][networkwatchersverifyipflowsample] | Verify IP flow from the specified VM to a location given the currently configured NSG rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherIpFlowVerify.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available Network Rest API operations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/OperationList.json | -| [p2SVpnGatewaysCreateOrUpdateSample.js][p2svpngatewayscreateorupdatesample] | Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayPut.json | -| [p2SVpnGatewaysDeleteSample.js][p2svpngatewaysdeletesample] | Deletes a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayDelete.json | -| [p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js][p2svpngatewaysdisconnectp2svpnconnectionssample] | Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json | -| [p2SVpnGatewaysGenerateVpnProfileSample.js][p2svpngatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js][p2svpngatewaysgetp2svpnconnectionhealthdetailedsample] | Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js][p2svpngatewaysgetp2svpnconnectionhealthsample] | Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealth.json | -| [p2SVpnGatewaysGetSample.js][p2svpngatewaysgetsample] | Retrieves the details of a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGet.json | -| [p2SVpnGatewaysListByResourceGroupSample.js][p2svpngatewayslistbyresourcegroupsample] | Lists all the P2SVpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayListByResourceGroup.json | -| [p2SVpnGatewaysListSample.js][p2svpngatewayslistsample] | Lists all the P2SVpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayList.json | -| [p2SVpnGatewaysResetSample.js][p2svpngatewaysresetsample] | Resets the primary of the p2s vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayReset.json | -| [p2SVpnGatewaysUpdateTagsSample.js][p2svpngatewaysupdatetagssample] | Updates virtual wan p2s vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayUpdateTags.json | -| [packetCapturesCreateSample.js][packetcapturescreatesample] | Create and start a packet capture on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureCreate.json | -| [packetCapturesDeleteSample.js][packetcapturesdeletesample] | Deletes the specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureDelete.json | -| [packetCapturesGetSample.js][packetcapturesgetsample] | Gets a packet capture session by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureGet.json | -| [packetCapturesGetStatusSample.js][packetcapturesgetstatussample] | Query the status of a running packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json | -| [packetCapturesListSample.js][packetcaptureslistsample] | Lists all packet capture sessions within the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCapturesList.json | -| [packetCapturesStopSample.js][packetcapturesstopsample] | Stops a specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureStop.json | -| [peerExpressRouteCircuitConnectionsGetSample.js][peerexpressroutecircuitconnectionsgetsample] | Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionGet.json | -| [peerExpressRouteCircuitConnectionsListSample.js][peerexpressroutecircuitconnectionslistsample] | Gets all global reach peer connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionList.json | -| [privateDnsZoneGroupsCreateOrUpdateSample.js][privatednszonegroupscreateorupdatesample] | Creates or updates a private dns zone group in the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json | -| [privateDnsZoneGroupsDeleteSample.js][privatednszonegroupsdeletesample] | Deletes the specified private dns zone group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json | -| [privateDnsZoneGroupsGetSample.js][privatednszonegroupsgetsample] | Gets the private dns zone group resource by specified private dns zone group name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupGet.json | -| [privateDnsZoneGroupsListSample.js][privatednszonegroupslistsample] | Gets all private dns zone groups in a private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupList.json | -| [privateEndpointsCreateOrUpdateSample.js][privateendpointscreateorupdatesample] | Creates or updates an private endpoint in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreate.json | -| [privateEndpointsDeleteSample.js][privateendpointsdeletesample] | Deletes the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDelete.json | -| [privateEndpointsGetSample.js][privateendpointsgetsample] | Gets the specified private endpoint by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGet.json | -| [privateEndpointsListBySubscriptionSample.js][privateendpointslistbysubscriptionsample] | Gets all private endpoints in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointListAll.json | -| [privateEndpointsListSample.js][privateendpointslistsample] | Gets all private endpoints in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointList.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js][privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample] | Checks whether the subscription is visible to private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js][privatelinkservicescheckprivatelinkservicevisibilitysample] | Checks whether the subscription is visible to private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibility.json | -| [privateLinkServicesCreateOrUpdateSample.js][privatelinkservicescreateorupdatesample] | Creates or updates an private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceCreate.json | -| [privateLinkServicesDeletePrivateEndpointConnectionSample.js][privatelinkservicesdeleteprivateendpointconnectionsample] | Delete private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json | -| [privateLinkServicesDeleteSample.js][privatelinkservicesdeletesample] | Deletes the specified private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDelete.json | -| [privateLinkServicesGetPrivateEndpointConnectionSample.js][privatelinkservicesgetprivateendpointconnectionsample] | Get the specific private end point connection by specific private link service in the resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json | -| [privateLinkServicesGetSample.js][privatelinkservicesgetsample] | Gets the specified private link service by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js][privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js][privatelinkserviceslistautoapprovedprivatelinkservicessample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesGet.json | -| [privateLinkServicesListBySubscriptionSample.js][privatelinkserviceslistbysubscriptionsample] | Gets all private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListAll.json | -| [privateLinkServicesListPrivateEndpointConnectionsSample.js][privatelinkserviceslistprivateendpointconnectionssample] | Gets all private end point connections for a specific private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json | -| [privateLinkServicesListSample.js][privatelinkserviceslistsample] | Gets all private link services in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceList.json | -| [privateLinkServicesUpdatePrivateEndpointConnectionSample.js][privatelinkservicesupdateprivateendpointconnectionsample] | Approve or reject private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json | -| [publicIPAddressesCreateOrUpdateSample.js][publicipaddressescreateorupdatesample] | Creates or updates a static or dynamic public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDns.json | -| [publicIPAddressesDdosProtectionStatusSample.js][publicipaddressesddosprotectionstatussample] | Gets the Ddos Protection Status of a Public IP Address x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json | -| [publicIPAddressesDeleteSample.js][publicipaddressesdeletesample] | Deletes the specified public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressDelete.json | -| [publicIPAddressesGetCloudServicePublicIpaddressSample.js][publicipaddressesgetcloudservicepublicipaddresssample] | Get the specified public IP address in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpGet.json | -| [publicIPAddressesGetSample.js][publicipaddressesgetsample] | Gets the specified public IP address in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGet.json | -| [publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js][publicipaddressesgetvirtualmachinescalesetpublicipaddresssample] | Get the specified public IP address in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpGet.json | -| [publicIPAddressesListAllSample.js][publicipaddresseslistallsample] | Gets all the public IP addresses in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressListAll.json | -| [publicIPAddressesListCloudServicePublicIpaddressesSample.js][publicipaddresseslistcloudservicepublicipaddressessample] | Gets information about all public IP addresses on a cloud service level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpListAll.json | -| [publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js][publicipaddresseslistcloudserviceroleinstancepublicipaddressessample] | Gets information about all public IP addresses in a role instance IP configuration in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstancePublicIpList.json | -| [publicIPAddressesListSample.js][publicipaddresseslistsample] | Gets all public IP addresses in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressList.json | -| [publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js][publicipaddresseslistvirtualmachinescalesetpublicipaddressessample] | Gets information about all public IP addresses on a virtual machine scale set level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpListAll.json | -| [publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js][publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample] | Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmPublicIpList.json | -| [publicIPAddressesUpdateTagsSample.js][publicipaddressesupdatetagssample] | Updates public IP address tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressUpdateTags.json | -| [publicIPPrefixesCreateOrUpdateSample.js][publicipprefixescreateorupdatesample] | Creates or updates a static or dynamic public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateCustomizedValues.json | -| [publicIPPrefixesDeleteSample.js][publicipprefixesdeletesample] | Deletes the specified public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixDelete.json | -| [publicIPPrefixesGetSample.js][publicipprefixesgetsample] | Gets the specified public IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixGet.json | -| [publicIPPrefixesListAllSample.js][publicipprefixeslistallsample] | Gets all the public IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixListAll.json | -| [publicIPPrefixesListSample.js][publicipprefixeslistsample] | Gets all public IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixList.json | -| [publicIPPrefixesUpdateTagsSample.js][publicipprefixesupdatetagssample] | Updates public IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixUpdateTags.json | -| [putBastionShareableLinkSample.js][putbastionshareablelinksample] | Creates a Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkCreate.json | -| [resourceNavigationLinksListSample.js][resourcenavigationlinkslistsample] | Gets a list of resource navigation links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json | -| [routeFilterRulesCreateOrUpdateSample.js][routefilterrulescreateorupdatesample] | Creates or updates a route in the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleCreate.json | -| [routeFilterRulesDeleteSample.js][routefilterrulesdeletesample] | Deletes the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleDelete.json | -| [routeFilterRulesGetSample.js][routefilterrulesgetsample] | Gets the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleGet.json | -| [routeFilterRulesListByRouteFilterSample.js][routefilterruleslistbyroutefiltersample] | Gets all RouteFilterRules in a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleListByRouteFilter.json | -| [routeFiltersCreateOrUpdateSample.js][routefilterscreateorupdatesample] | Creates or updates a route filter in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterCreate.json | -| [routeFiltersDeleteSample.js][routefiltersdeletesample] | Deletes the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterDelete.json | -| [routeFiltersGetSample.js][routefiltersgetsample] | Gets the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterGet.json | -| [routeFiltersListByResourceGroupSample.js][routefilterslistbyresourcegroupsample] | Gets all route filters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterListByResourceGroup.json | -| [routeFiltersListSample.js][routefilterslistsample] | Gets all route filters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterList.json | -| [routeFiltersUpdateTagsSample.js][routefiltersupdatetagssample] | Updates tags of a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterUpdateTags.json | -| [routeMapsCreateOrUpdateSample.js][routemapscreateorupdatesample] | Creates a RouteMap if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapPut.json | -| [routeMapsDeleteSample.js][routemapsdeletesample] | Deletes a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapDelete.json | -| [routeMapsGetSample.js][routemapsgetsample] | Retrieves the details of a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapGet.json | -| [routeMapsListSample.js][routemapslistsample] | Retrieves the details of all RouteMaps. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapList.json | -| [routeTablesCreateOrUpdateSample.js][routetablescreateorupdatesample] | Create or updates a route table in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreate.json | -| [routeTablesDeleteSample.js][routetablesdeletesample] | Deletes the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableDelete.json | -| [routeTablesGetSample.js][routetablesgetsample] | Gets the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableGet.json | -| [routeTablesListAllSample.js][routetableslistallsample] | Gets all route tables in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableListAll.json | -| [routeTablesListSample.js][routetableslistsample] | Gets all route tables in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableList.json | -| [routeTablesUpdateTagsSample.js][routetablesupdatetagssample] | Updates a route table tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableUpdateTags.json | -| [routesCreateOrUpdateSample.js][routescreateorupdatesample] | Creates or updates a route in the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteCreate.json | -| [routesDeleteSample.js][routesdeletesample] | Deletes the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteDelete.json | -| [routesGetSample.js][routesgetsample] | Gets the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteGet.json | -| [routesListSample.js][routeslistsample] | Gets all routes in a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteList.json | -| [routingIntentCreateOrUpdateSample.js][routingintentcreateorupdatesample] | Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentPut.json | -| [routingIntentDeleteSample.js][routingintentdeletesample] | Deletes a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentDelete.json | -| [routingIntentGetSample.js][routingintentgetsample] | Retrieves the details of a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentGet.json | -| [routingIntentListSample.js][routingintentlistsample] | Retrieves the details of all RoutingIntent child resources of the VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentList.json | -| [routingRuleCollectionsCreateOrUpdateSample.js][routingrulecollectionscreateorupdatesample] | Creates or updates a routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json | -| [routingRuleCollectionsDeleteSample.js][routingrulecollectionsdeletesample] | Deletes an routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json | -| [routingRuleCollectionsGetSample.js][routingrulecollectionsgetsample] | Gets a network manager routing configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json | -| [routingRuleCollectionsListSample.js][routingrulecollectionslistsample] | Lists all the rule collections in a routing configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionList.json | -| [routingRulesCreateOrUpdateSample.js][routingrulescreateorupdatesample] | Creates or updates an routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRulePut.json | -| [routingRulesDeleteSample.js][routingrulesdeletesample] | Deletes a routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleDelete.json | -| [routingRulesGetSample.js][routingrulesgetsample] | Gets a network manager routing configuration routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleGet.json | -| [routingRulesListSample.js][routingruleslistsample] | List all network manager routing configuration routing rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleList.json | -| [scopeConnectionsCreateOrUpdateSample.js][scopeconnectionscreateorupdatesample] | Creates or updates scope connection from Network Manager x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionPut.json | -| [scopeConnectionsDeleteSample.js][scopeconnectionsdeletesample] | Delete the pending scope connection created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionDelete.json | -| [scopeConnectionsGetSample.js][scopeconnectionsgetsample] | Get specified scope connection created by this Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionGet.json | -| [scopeConnectionsListSample.js][scopeconnectionslistsample] | List all scope connections created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionList.json | -| [securityAdminConfigurationsCreateOrUpdateSample.js][securityadminconfigurationscreateorupdatesample] | Creates or updates a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationPut.json | -| [securityAdminConfigurationsDeleteSample.js][securityadminconfigurationsdeletesample] | Deletes a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json | -| [securityAdminConfigurationsGetSample.js][securityadminconfigurationsgetsample] | Retrieves a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json | -| [securityAdminConfigurationsListSample.js][securityadminconfigurationslistsample] | Lists all the network manager security admin configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json | -| [securityPartnerProvidersCreateOrUpdateSample.js][securitypartnerproviderscreateorupdatesample] | Creates or updates the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderPut.json | -| [securityPartnerProvidersDeleteSample.js][securitypartnerprovidersdeletesample] | Deletes the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderDelete.json | -| [securityPartnerProvidersGetSample.js][securitypartnerprovidersgetsample] | Gets the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderGet.json | -| [securityPartnerProvidersListByResourceGroupSample.js][securitypartnerproviderslistbyresourcegroupsample] | Lists all Security Partner Providers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListByResourceGroup.json | -| [securityPartnerProvidersListSample.js][securitypartnerproviderslistsample] | Gets all the Security Partner Providers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListBySubscription.json | -| [securityPartnerProvidersUpdateTagsSample.js][securitypartnerprovidersupdatetagssample] | Updates tags of a Security Partner Provider resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderUpdateTags.json | -| [securityRulesCreateOrUpdateSample.js][securityrulescreateorupdatesample] | Creates or updates a security rule in the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleCreate.json | -| [securityRulesDeleteSample.js][securityrulesdeletesample] | Deletes the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleDelete.json | -| [securityRulesGetSample.js][securityrulesgetsample] | Get the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleGet.json | -| [securityRulesListSample.js][securityruleslistsample] | Gets all security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleList.json | -| [securityUserConfigurationsCreateOrUpdateSample.js][securityuserconfigurationscreateorupdatesample] | Creates or updates a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json | -| [securityUserConfigurationsDeleteSample.js][securityuserconfigurationsdeletesample] | Deletes a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json | -| [securityUserConfigurationsGetSample.js][securityuserconfigurationsgetsample] | Retrieves a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json | -| [securityUserConfigurationsListSample.js][securityuserconfigurationslistsample] | Lists all the network manager security user configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationList.json | -| [securityUserRuleCollectionsCreateOrUpdateSample.js][securityuserrulecollectionscreateorupdatesample] | Creates or updates a security user rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json | -| [securityUserRuleCollectionsDeleteSample.js][securityuserrulecollectionsdeletesample] | Deletes a Security User Rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json | -| [securityUserRuleCollectionsGetSample.js][securityuserrulecollectionsgetsample] | Gets a network manager security user configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json | -| [securityUserRuleCollectionsListSample.js][securityuserrulecollectionslistsample] | Lists all the security user rule collections in a security configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json | -| [securityUserRulesCreateOrUpdateSample.js][securityuserrulescreateorupdatesample] | Creates or updates a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRulePut.json | -| [securityUserRulesDeleteSample.js][securityuserrulesdeletesample] | Deletes a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleDelete.json | -| [securityUserRulesGetSample.js][securityuserrulesgetsample] | Gets a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleGet.json | -| [securityUserRulesListSample.js][securityuserruleslistsample] | Lists all Security User Rules in a rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleList.json | -| [serviceAssociationLinksListSample.js][serviceassociationlinkslistsample] | Gets a list of service association links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json | -| [serviceEndpointPoliciesCreateOrUpdateSample.js][serviceendpointpoliciescreateorupdatesample] | Creates or updates a service Endpoint Policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreate.json | -| [serviceEndpointPoliciesDeleteSample.js][serviceendpointpoliciesdeletesample] | Deletes the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDelete.json | -| [serviceEndpointPoliciesGetSample.js][serviceendpointpoliciesgetsample] | Gets the specified service Endpoint Policies in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyGet.json | -| [serviceEndpointPoliciesListByResourceGroupSample.js][serviceendpointpolicieslistbyresourcegroupsample] | Gets all service endpoint Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyList.json | -| [serviceEndpointPoliciesListSample.js][serviceendpointpolicieslistsample] | Gets all the service endpoint policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyListAll.json | -| [serviceEndpointPoliciesUpdateTagsSample.js][serviceendpointpoliciesupdatetagssample] | Updates tags of a service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyUpdateTags.json | -| [serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js][serviceendpointpolicydefinitionscreateorupdatesample] | Creates or updates a service endpoint policy definition in the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionCreate.json | -| [serviceEndpointPolicyDefinitionsDeleteSample.js][serviceendpointpolicydefinitionsdeletesample] | Deletes the specified ServiceEndpoint policy definitions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json | -| [serviceEndpointPolicyDefinitionsGetSample.js][serviceendpointpolicydefinitionsgetsample] | Get the specified service endpoint policy definitions from service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionGet.json | -| [serviceEndpointPolicyDefinitionsListByResourceGroupSample.js][serviceendpointpolicydefinitionslistbyresourcegroupsample] | Gets all service endpoint policy definitions in a service end point policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionList.json | -| [serviceTagInformationListSample.js][servicetaginformationlistsample] | Gets a list of service tag information resources with pagination. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResult.json | -| [serviceTagsListSample.js][servicetagslistsample] | Gets a list of service tag information resources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagsList.json | -| [staticMembersCreateOrUpdateSample.js][staticmemberscreateorupdatesample] | Creates or updates a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberPut.json | -| [staticMembersDeleteSample.js][staticmembersdeletesample] | Deletes a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberDelete.json | -| [staticMembersGetSample.js][staticmembersgetsample] | Gets the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberGet.json | -| [staticMembersListSample.js][staticmemberslistsample] | Lists the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberList.json | -| [subnetsCreateOrUpdateSample.js][subnetscreateorupdatesample] | Creates or updates a subnet in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreate.json | -| [subnetsDeleteSample.js][subnetsdeletesample] | Deletes the specified subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetDelete.json | -| [subnetsGetSample.js][subnetsgetsample] | Gets the specified subnet by virtual network and resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGet.json | -| [subnetsListSample.js][subnetslistsample] | Gets all subnets in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetList.json | -| [subnetsPrepareNetworkPoliciesSample.js][subnetspreparenetworkpoliciessample] | Prepares a subnet by applying network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetPrepareNetworkPolicies.json | -| [subnetsUnprepareNetworkPoliciesSample.js][subnetsunpreparenetworkpoliciessample] | Unprepares a subnet by removing network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetUnprepareNetworkPolicies.json | -| [subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js][subscriptionnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionPut.json | -| [subscriptionNetworkManagerConnectionsDeleteSample.js][subscriptionnetworkmanagerconnectionsdeletesample] | Delete specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json | -| [subscriptionNetworkManagerConnectionsGetSample.js][subscriptionnetworkmanagerconnectionsgetsample] | Get a specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionGet.json | -| [subscriptionNetworkManagerConnectionsListSample.js][subscriptionnetworkmanagerconnectionslistsample] | List all network manager connections created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionList.json | -| [supportedSecurityProvidersSample.js][supportedsecurityproviderssample] | Gives the supported security providers for the virtual wan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWanSupportedSecurityProviders.json | -| [usagesListSample.js][usageslistsample] | List network usages for a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageList.json | -| [vipSwapCreateSample.js][vipswapcreatesample] | Performs vip swap operation on swappable cloud services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapPut.json | -| [vipSwapGetSample.js][vipswapgetsample] | Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapGet.json | -| [vipSwapListSample.js][vipswaplistsample] | Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapList.json | -| [virtualApplianceSitesCreateOrUpdateSample.js][virtualappliancesitescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSitePut.json | -| [virtualApplianceSitesDeleteSample.js][virtualappliancesitesdeletesample] | Deletes the specified site from a Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteDelete.json | -| [virtualApplianceSitesGetSample.js][virtualappliancesitesgetsample] | Gets the specified Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteGet.json | -| [virtualApplianceSitesListSample.js][virtualappliancesiteslistsample] | Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteList.json | -| [virtualApplianceSkusGetSample.js][virtualapplianceskusgetsample] | Retrieves a single available sku for network virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuGet.json | -| [virtualApplianceSkusListSample.js][virtualapplianceskuslistsample] | List all SKUs available for a virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuList.json | -| [virtualHubBgpConnectionCreateOrUpdateSample.js][virtualhubbgpconnectioncreateorupdatesample] | Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionPut.json | -| [virtualHubBgpConnectionDeleteSample.js][virtualhubbgpconnectiondeletesample] | Deletes a VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionDelete.json | -| [virtualHubBgpConnectionGetSample.js][virtualhubbgpconnectiongetsample] | Retrieves the details of a Virtual Hub Bgp Connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionGet.json | -| [virtualHubBgpConnectionsListAdvertisedRoutesSample.js][virtualhubbgpconnectionslistadvertisedroutessample] | Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json | -| [virtualHubBgpConnectionsListLearnedRoutesSample.js][virtualhubbgpconnectionslistlearnedroutessample] | Retrieves a list of routes the virtual hub bgp connection has learned. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListLearnedRoute.json | -| [virtualHubBgpConnectionsListSample.js][virtualhubbgpconnectionslistsample] | Retrieves the details of all VirtualHubBgpConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionList.json | -| [virtualHubIPConfigurationCreateOrUpdateSample.js][virtualhubipconfigurationcreateorupdatesample] | Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationPut.json | -| [virtualHubIPConfigurationDeleteSample.js][virtualhubipconfigurationdeletesample] | Deletes a VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationDelete.json | -| [virtualHubIPConfigurationGetSample.js][virtualhubipconfigurationgetsample] | Retrieves the details of a Virtual Hub Ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationGet.json | -| [virtualHubIPConfigurationListSample.js][virtualhubipconfigurationlistsample] | Retrieves the details of all VirtualHubIpConfigurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationList.json | -| [virtualHubRouteTableV2SCreateOrUpdateSample.js][virtualhubroutetablev2screateorupdatesample] | Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Put.json | -| [virtualHubRouteTableV2SDeleteSample.js][virtualhubroutetablev2sdeletesample] | Deletes a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Delete.json | -| [virtualHubRouteTableV2SGetSample.js][virtualhubroutetablev2sgetsample] | Retrieves the details of a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Get.json | -| [virtualHubRouteTableV2SListSample.js][virtualhubroutetablev2slistsample] | Retrieves the details of all VirtualHubRouteTableV2s. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2List.json | -| [virtualHubsCreateOrUpdateSample.js][virtualhubscreateorupdatesample] | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubPut.json | -| [virtualHubsDeleteSample.js][virtualhubsdeletesample] | Deletes a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubDelete.json | -| [virtualHubsGetEffectiveVirtualHubRoutesSample.js][virtualhubsgeteffectivevirtualhubroutessample] | Gets the effective routes configured for the Virtual Hub resource or the specified resource . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForConnection.json | -| [virtualHubsGetInboundRoutesSample.js][virtualhubsgetinboundroutessample] | Gets the inbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetInboundRoutes.json | -| [virtualHubsGetOutboundRoutesSample.js][virtualhubsgetoutboundroutessample] | Gets the outbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetOutboundRoutes.json | -| [virtualHubsGetSample.js][virtualhubsgetsample] | Retrieves the details of a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubGet.json | -| [virtualHubsListByResourceGroupSample.js][virtualhubslistbyresourcegroupsample] | Lists all the VirtualHubs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubListByResourceGroup.json | -| [virtualHubsListSample.js][virtualhubslistsample] | Lists all the VirtualHubs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubList.json | -| [virtualHubsUpdateTagsSample.js][virtualhubsupdatetagssample] | Updates VirtualHub tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubUpdateTags.json | -| [virtualNetworkGatewayConnectionsCreateOrUpdateSample.js][virtualnetworkgatewayconnectionscreateorupdatesample] | Creates or updates a virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionCreate.json | -| [virtualNetworkGatewayConnectionsDeleteSample.js][virtualnetworkgatewayconnectionsdeletesample] | Deletes the specified virtual network Gateway connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionDelete.json | -| [virtualNetworkGatewayConnectionsGetIkeSasSample.js][virtualnetworkgatewayconnectionsgetikesassample] | Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json | -| [virtualNetworkGatewayConnectionsGetSample.js][virtualnetworkgatewayconnectionsgetsample] | Gets the specified virtual network gateway connection by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGet.json | -| [virtualNetworkGatewayConnectionsGetSharedKeySample.js][virtualnetworkgatewayconnectionsgetsharedkeysample] | The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json | -| [virtualNetworkGatewayConnectionsListSample.js][virtualnetworkgatewayconnectionslistsample] | The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionsList.json | -| [virtualNetworkGatewayConnectionsResetConnectionSample.js][virtualnetworkgatewayconnectionsresetconnectionsample] | Resets the virtual network gateway connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionReset.json | -| [virtualNetworkGatewayConnectionsResetSharedKeySample.js][virtualnetworkgatewayconnectionsresetsharedkeysample] | The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json | -| [virtualNetworkGatewayConnectionsSetSharedKeySample.js][virtualnetworkgatewayconnectionssetsharedkeysample] | The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json | -| [virtualNetworkGatewayConnectionsStartPacketCaptureSample.js][virtualnetworkgatewayconnectionsstartpacketcapturesample] | Starts packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json | -| [virtualNetworkGatewayConnectionsStopPacketCaptureSample.js][virtualnetworkgatewayconnectionsstoppacketcapturesample] | Stops packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json | -| [virtualNetworkGatewayConnectionsUpdateTagsSample.js][virtualnetworkgatewayconnectionsupdatetagssample] | Updates a virtual network gateway connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json | -| [virtualNetworkGatewayNatRulesCreateOrUpdateSample.js][virtualnetworkgatewaynatrulescreateorupdatesample] | Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRulePut.json | -| [virtualNetworkGatewayNatRulesDeleteSample.js][virtualnetworkgatewaynatrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json | -| [virtualNetworkGatewayNatRulesGetSample.js][virtualnetworkgatewaynatrulesgetsample] | Retrieves the details of a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleGet.json | -| [virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js][virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample] | Retrieves all nat rules for a particular virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleList.json | -| [virtualNetworkGatewaysCreateOrUpdateSample.js][virtualnetworkgatewayscreateorupdatesample] | Creates or updates a virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdate.json | -| [virtualNetworkGatewaysDeleteSample.js][virtualnetworkgatewaysdeletesample] | Deletes the specified virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayDelete.json | -| [virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js][virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample] | Disconnect vpn connections of virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json | -| [virtualNetworkGatewaysGenerateVpnProfileSample.js][virtualnetworkgatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json | -| [virtualNetworkGatewaysGeneratevpnclientpackageSample.js][virtualnetworkgatewaysgeneratevpnclientpackagesample] | Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json | -| [virtualNetworkGatewaysGetAdvertisedRoutesSample.js][virtualnetworkgatewaysgetadvertisedroutessample] | This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json | -| [virtualNetworkGatewaysGetBgpPeerStatusSample.js][virtualnetworkgatewaysgetbgppeerstatussample] | The GetBgpPeerStatus operation retrieves the status of all BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json | -| [virtualNetworkGatewaysGetLearnedRoutesSample.js][virtualnetworkgatewaysgetlearnedroutessample] | This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json | -| [virtualNetworkGatewaysGetSample.js][virtualnetworkgatewaysgetsample] | Gets the specified virtual network gateway by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGet.json | -| [virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js][virtualnetworkgatewaysgetvpnprofilepackageurlsample] | Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json | -| [virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js][virtualnetworkgatewaysgetvpnclientconnectionhealthsample] | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json | -| [virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js][virtualnetworkgatewaysgetvpnclientipsecparameterssample] | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysListConnectionsSample.js][virtualnetworkgatewayslistconnectionssample] | Gets all the connections in a virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysListConnections.json | -| [virtualNetworkGatewaysListSample.js][virtualnetworkgatewayslistsample] | Gets all virtual network gateways by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayList.json | -| [virtualNetworkGatewaysResetSample.js][virtualnetworkgatewaysresetsample] | Resets the primary of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayReset.json | -| [virtualNetworkGatewaysResetVpnClientSharedKeySample.js][virtualnetworkgatewaysresetvpnclientsharedkeysample] | Resets the VPN client shared key of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json | -| [virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js][virtualnetworkgatewayssetvpnclientipsecparameterssample] | The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysStartPacketCaptureSample.js][virtualnetworkgatewaysstartpacketcapturesample] | Starts packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json | -| [virtualNetworkGatewaysStopPacketCaptureSample.js][virtualnetworkgatewaysstoppacketcapturesample] | Stops packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json | -| [virtualNetworkGatewaysSupportedVpnDevicesSample.js][virtualnetworkgatewayssupportedvpndevicessample] | Gets a xml format representation for supported vpn devices. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json | -| [virtualNetworkGatewaysUpdateTagsSample.js][virtualnetworkgatewaysupdatetagssample] | Updates a virtual network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdateTags.json | -| [virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js][virtualnetworkgatewaysvpndeviceconfigurationscriptsample] | Gets a xml format representation for vpn device configuration script. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json | -| [virtualNetworkPeeringsCreateOrUpdateSample.js][virtualnetworkpeeringscreateorupdatesample] | Creates or updates a peering in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringCreate.json | -| [virtualNetworkPeeringsDeleteSample.js][virtualnetworkpeeringsdeletesample] | Deletes the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringDelete.json | -| [virtualNetworkPeeringsGetSample.js][virtualnetworkpeeringsgetsample] | Gets the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json | -| [virtualNetworkPeeringsListSample.js][virtualnetworkpeeringslistsample] | Gets all virtual network peerings in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringList.json | -| [virtualNetworkTapsCreateOrUpdateSample.js][virtualnetworktapscreateorupdatesample] | Creates or updates a Virtual Network Tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapCreate.json | -| [virtualNetworkTapsDeleteSample.js][virtualnetworktapsdeletesample] | Deletes the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapDelete.json | -| [virtualNetworkTapsGetSample.js][virtualnetworktapsgetsample] | Gets information about the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapGet.json | -| [virtualNetworkTapsListAllSample.js][virtualnetworktapslistallsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapListAll.json | -| [virtualNetworkTapsListByResourceGroupSample.js][virtualnetworktapslistbyresourcegroupsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapList.json | -| [virtualNetworkTapsUpdateTagsSample.js][virtualnetworktapsupdatetagssample] | Updates an VirtualNetworkTap tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapUpdateTags.json | -| [virtualNetworksCheckIPAddressAvailabilitySample.js][virtualnetworkscheckipaddressavailabilitysample] | Checks whether a private IP address is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json | -| [virtualNetworksCreateOrUpdateSample.js][virtualnetworkscreateorupdatesample] | Creates or updates a virtual network in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreate.json | -| [virtualNetworksDeleteSample.js][virtualnetworksdeletesample] | Deletes the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkDelete.json | -| [virtualNetworksGetSample.js][virtualnetworksgetsample] | Gets the specified virtual network by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGet.json | -| [virtualNetworksListAllSample.js][virtualnetworkslistallsample] | Gets all virtual networks in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListAll.json | -| [virtualNetworksListDdosProtectionStatusSample.js][virtualnetworkslistddosprotectionstatussample] | Gets the Ddos Protection Status of all IP Addresses under the Virtual Network x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json | -| [virtualNetworksListSample.js][virtualnetworkslistsample] | Gets all virtual networks in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkList.json | -| [virtualNetworksListUsageSample.js][virtualnetworkslistusagesample] | Lists usage stats. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListUsage.json | -| [virtualNetworksUpdateTagsSample.js][virtualnetworksupdatetagssample] | Updates a virtual network tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkUpdateTags.json | -| [virtualRouterPeeringsCreateOrUpdateSample.js][virtualrouterpeeringscreateorupdatesample] | Creates or updates the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringPut.json | -| [virtualRouterPeeringsDeleteSample.js][virtualrouterpeeringsdeletesample] | Deletes the specified peering from a Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringDelete.json | -| [virtualRouterPeeringsGetSample.js][virtualrouterpeeringsgetsample] | Gets the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringGet.json | -| [virtualRouterPeeringsListSample.js][virtualrouterpeeringslistsample] | Lists all Virtual Router Peerings in a Virtual Router resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringList.json | -| [virtualRoutersCreateOrUpdateSample.js][virtualrouterscreateorupdatesample] | Creates or updates the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPut.json | -| [virtualRoutersDeleteSample.js][virtualroutersdeletesample] | Deletes the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterDelete.json | -| [virtualRoutersGetSample.js][virtualroutersgetsample] | Gets the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterGet.json | -| [virtualRoutersListByResourceGroupSample.js][virtualrouterslistbyresourcegroupsample] | Lists all Virtual Routers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListByResourceGroup.json | -| [virtualRoutersListSample.js][virtualrouterslistsample] | Gets all the Virtual Routers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListBySubscription.json | -| [virtualWansCreateOrUpdateSample.js][virtualwanscreateorupdatesample] | Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANPut.json | -| [virtualWansDeleteSample.js][virtualwansdeletesample] | Deletes a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANDelete.json | -| [virtualWansGetSample.js][virtualwansgetsample] | Retrieves the details of a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANGet.json | -| [virtualWansListByResourceGroupSample.js][virtualwanslistbyresourcegroupsample] | Lists all the VirtualWANs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANListByResourceGroup.json | -| [virtualWansListSample.js][virtualwanslistsample] | Lists all the VirtualWANs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANList.json | -| [virtualWansUpdateTagsSample.js][virtualwansupdatetagssample] | Updates a VirtualWAN tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANUpdateTags.json | -| [vpnConnectionsCreateOrUpdateSample.js][vpnconnectionscreateorupdatesample] | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionPut.json | -| [vpnConnectionsDeleteSample.js][vpnconnectionsdeletesample] | Deletes a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionDelete.json | -| [vpnConnectionsGetSample.js][vpnconnectionsgetsample] | Retrieves the details of a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionGet.json | -| [vpnConnectionsListByVpnGatewaySample.js][vpnconnectionslistbyvpngatewaysample] | Retrieves all vpn connections for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionList.json | -| [vpnConnectionsStartPacketCaptureSample.js][vpnconnectionsstartpacketcapturesample] | Starts packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json | -| [vpnConnectionsStopPacketCaptureSample.js][vpnconnectionsstoppacketcapturesample] | Stops packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStopPacketCapture.json | -| [vpnGatewaysCreateOrUpdateSample.js][vpngatewayscreateorupdatesample] | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayPut.json | -| [vpnGatewaysDeleteSample.js][vpngatewaysdeletesample] | Deletes a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayDelete.json | -| [vpnGatewaysGetSample.js][vpngatewaysgetsample] | Retrieves the details of a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayGet.json | -| [vpnGatewaysListByResourceGroupSample.js][vpngatewayslistbyresourcegroupsample] | Lists all the VpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayListByResourceGroup.json | -| [vpnGatewaysListSample.js][vpngatewayslistsample] | Lists all the VpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayList.json | -| [vpnGatewaysResetSample.js][vpngatewaysresetsample] | Resets the primary of the vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayReset.json | -| [vpnGatewaysStartPacketCaptureSample.js][vpngatewaysstartpacketcapturesample] | Starts packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json | -| [vpnGatewaysStopPacketCaptureSample.js][vpngatewaysstoppacketcapturesample] | Stops packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStopPacketCapture.json | -| [vpnGatewaysUpdateTagsSample.js][vpngatewaysupdatetagssample] | Updates virtual wan vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayUpdateTags.json | -| [vpnLinkConnectionsGetAllSharedKeysSample.js][vpnlinkconnectionsgetallsharedkeyssample] | Lists all shared keys of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json | -| [vpnLinkConnectionsGetDefaultSharedKeySample.js][vpnlinkconnectionsgetdefaultsharedkeysample] | Gets the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json | -| [vpnLinkConnectionsGetIkeSasSample.js][vpnlinkconnectionsgetikesassample] | Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json | -| [vpnLinkConnectionsListByVpnConnectionSample.js][vpnlinkconnectionslistbyvpnconnectionsample] | Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionList.json | -| [vpnLinkConnectionsListDefaultSharedKeySample.js][vpnlinkconnectionslistdefaultsharedkeysample] | Gets the value of the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json | -| [vpnLinkConnectionsResetConnectionSample.js][vpnlinkconnectionsresetconnectionsample] | Resets the VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionReset.json | -| [vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js][vpnlinkconnectionssetorinitdefaultsharedkeysample] | Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json | -| [vpnServerConfigurationsAssociatedWithVirtualWanListSample.js][vpnserverconfigurationsassociatedwithvirtualwanlistsample] | Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetVirtualWanVpnServerConfigurations.json | -| [vpnServerConfigurationsCreateOrUpdateSample.js][vpnserverconfigurationscreateorupdatesample] | Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationPut.json | -| [vpnServerConfigurationsDeleteSample.js][vpnserverconfigurationsdeletesample] | Deletes a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationDelete.json | -| [vpnServerConfigurationsGetSample.js][vpnserverconfigurationsgetsample] | Retrieves the details of a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationGet.json | -| [vpnServerConfigurationsListByResourceGroupSample.js][vpnserverconfigurationslistbyresourcegroupsample] | Lists all the vpnServerConfigurations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationListByResourceGroup.json | -| [vpnServerConfigurationsListSample.js][vpnserverconfigurationslistsample] | Lists all the VpnServerConfigurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationList.json | -| [vpnServerConfigurationsUpdateTagsSample.js][vpnserverconfigurationsupdatetagssample] | Updates VpnServerConfiguration tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationUpdateTags.json | -| [vpnSiteLinkConnectionsGetSample.js][vpnsitelinkconnectionsgetsample] | Retrieves the details of a vpn site link connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGet.json | -| [vpnSiteLinksGetSample.js][vpnsitelinksgetsample] | Retrieves the details of a VPN site link. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkGet.json | -| [vpnSiteLinksListByVpnSiteSample.js][vpnsitelinkslistbyvpnsitesample] | Lists all the vpnSiteLinks in a resource group for a vpn site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkListByVpnSite.json | -| [vpnSitesConfigurationDownloadSample.js][vpnsitesconfigurationdownloadsample] | Gives the sas-url to download the configurations for vpn-sites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitesConfigurationDownload.json | -| [vpnSitesCreateOrUpdateSample.js][vpnsitescreateorupdatesample] | Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitePut.json | -| [vpnSitesDeleteSample.js][vpnsitesdeletesample] | Deletes a VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteDelete.json | -| [vpnSitesGetSample.js][vpnsitesgetsample] | Retrieves the details of a VPN site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteGet.json | -| [vpnSitesListByResourceGroupSample.js][vpnsiteslistbyresourcegroupsample] | Lists all the vpnSites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteListByResourceGroup.json | -| [vpnSitesListSample.js][vpnsiteslistsample] | Lists all the VpnSites in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteList.json | -| [vpnSitesUpdateTagsSample.js][vpnsitesupdatetagssample] | Updates VpnSite tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteUpdateTags.json | -| [webApplicationFirewallPoliciesCreateOrUpdateSample.js][webapplicationfirewallpoliciescreateorupdatesample] | Creates or update policy with specified rule set name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyCreateOrUpdate.json | -| [webApplicationFirewallPoliciesDeleteSample.js][webapplicationfirewallpoliciesdeletesample] | Deletes Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyDelete.json | -| [webApplicationFirewallPoliciesGetSample.js][webapplicationfirewallpoliciesgetsample] | Retrieve protection policy with specified name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyGet.json | -| [webApplicationFirewallPoliciesListAllSample.js][webapplicationfirewallpolicieslistallsample] | Gets all the WAF policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListAllPolicies.json | -| [webApplicationFirewallPoliciesListSample.js][webapplicationfirewallpolicieslistsample] | Lists all of the protection policies within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListPolicies.json | -| [webCategoriesGetSample.js][webcategoriesgetsample] | Gets the specified Azure Web Category. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoryGet.json | -| [webCategoriesListBySubscriptionSample.js][webcategorieslistbysubscriptionsample] | Gets all the Azure Web Categories in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoriesListBySubscription.json | +| [adminRuleCollectionsCreateOrUpdateSample.js][adminrulecollectionscreateorupdatesample] | Creates or updates an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionPut.json | +| [adminRuleCollectionsDeleteSample.js][adminrulecollectionsdeletesample] | Deletes an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json | +| [adminRuleCollectionsGetSample.js][adminrulecollectionsgetsample] | Gets a network manager security admin configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionGet.json | +| [adminRuleCollectionsListSample.js][adminrulecollectionslistsample] | Lists all the rule collections in a security admin configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionList.json | +| [adminRulesCreateOrUpdateSample.js][adminrulescreateorupdatesample] | Creates or updates an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json | +| [adminRulesDeleteSample.js][adminrulesdeletesample] | Deletes an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleDelete.json | +| [adminRulesGetSample.js][adminrulesgetsample] | Gets a network manager security configuration admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleGet.json | +| [adminRulesListSample.js][adminruleslistsample] | List all network manager security configuration admin rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleList.json | +| [applicationGatewayPrivateEndpointConnectionsDeleteSample.js][applicationgatewayprivateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json | +| [applicationGatewayPrivateEndpointConnectionsGetSample.js][applicationgatewayprivateendpointconnectionsgetsample] | Gets the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json | +| [applicationGatewayPrivateEndpointConnectionsListSample.js][applicationgatewayprivateendpointconnectionslistsample] | Lists all private endpoint connections on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json | +| [applicationGatewayPrivateEndpointConnectionsUpdateSample.js][applicationgatewayprivateendpointconnectionsupdatesample] | Updates the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json | +| [applicationGatewayPrivateLinkResourcesListSample.js][applicationgatewayprivatelinkresourceslistsample] | Lists all private link resources on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json | +| [applicationGatewayWafDynamicManifestsDefaultGetSample.js][applicationgatewaywafdynamicmanifestsdefaultgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json | +| [applicationGatewayWafDynamicManifestsGetSample.js][applicationgatewaywafdynamicmanifestsgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifests.json | +| [applicationGatewaysBackendHealthOnDemandSample.js][applicationgatewaysbackendhealthondemandsample] | Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthTest.json | +| [applicationGatewaysBackendHealthSample.js][applicationgatewaysbackendhealthsample] | Gets the backend health of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthGet.json | +| [applicationGatewaysCreateOrUpdateSample.js][applicationgatewayscreateorupdatesample] | Creates or updates the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayCreate.json | +| [applicationGatewaysDeleteSample.js][applicationgatewaysdeletesample] | Deletes the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayDelete.json | +| [applicationGatewaysGetSample.js][applicationgatewaysgetsample] | Gets the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayGet.json | +| [applicationGatewaysGetSslPredefinedPolicySample.js][applicationgatewaysgetsslpredefinedpolicysample] | Gets Ssl predefined policy with the specified policy name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json | +| [applicationGatewaysListAllSample.js][applicationgatewayslistallsample] | Gets all the application gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayListAll.json | +| [applicationGatewaysListAvailableRequestHeadersSample.js][applicationgatewayslistavailablerequestheaderssample] | Lists all available request headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json | +| [applicationGatewaysListAvailableResponseHeadersSample.js][applicationgatewayslistavailableresponseheaderssample] | Lists all available response headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json | +| [applicationGatewaysListAvailableServerVariablesSample.js][applicationgatewayslistavailableservervariablessample] | Lists all available server variables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json | +| [applicationGatewaysListAvailableSslOptionsSample.js][applicationgatewayslistavailablessloptionssample] | Lists available Ssl options for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json | +| [applicationGatewaysListAvailableSslPredefinedPoliciesSample.js][applicationgatewayslistavailablesslpredefinedpoliciessample] | Lists all SSL predefined policies for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json | +| [applicationGatewaysListAvailableWafRuleSetsSample.js][applicationgatewayslistavailablewafrulesetssample] | Lists all available web application firewall rule sets. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json | +| [applicationGatewaysListSample.js][applicationgatewayslistsample] | Lists all application gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayList.json | +| [applicationGatewaysStartSample.js][applicationgatewaysstartsample] | Starts the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStart.json | +| [applicationGatewaysStopSample.js][applicationgatewaysstopsample] | Stops the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStop.json | +| [applicationGatewaysUpdateTagsSample.js][applicationgatewaysupdatetagssample] | Updates the specified application gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayUpdateTags.json | +| [applicationSecurityGroupsCreateOrUpdateSample.js][applicationsecuritygroupscreateorupdatesample] | Creates or updates an application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupCreate.json | +| [applicationSecurityGroupsDeleteSample.js][applicationsecuritygroupsdeletesample] | Deletes the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupDelete.json | +| [applicationSecurityGroupsGetSample.js][applicationsecuritygroupsgetsample] | Gets information about the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupGet.json | +| [applicationSecurityGroupsListAllSample.js][applicationsecuritygroupslistallsample] | Gets all application security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupListAll.json | +| [applicationSecurityGroupsListSample.js][applicationsecuritygroupslistsample] | Gets all the application security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupList.json | +| [applicationSecurityGroupsUpdateTagsSample.js][applicationsecuritygroupsupdatetagssample] | Updates an application security group's tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupUpdateTags.json | +| [availableDelegationsListSample.js][availabledelegationslistsample] | Gets all of the available subnet delegations for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsSubscriptionGet.json | +| [availableEndpointServicesListSample.js][availableendpointserviceslistsample] | List what values of endpoint services are available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EndpointServicesList.json | +| [availablePrivateEndpointTypesListByResourceGroupSample.js][availableprivateendpointtypeslistbyresourcegroupsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json | +| [availablePrivateEndpointTypesListSample.js][availableprivateendpointtypeslistsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesGet.json | +| [availableResourceGroupDelegationsListSample.js][availableresourcegroupdelegationslistsample] | Gets all of the available subnet delegations for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsResourceGroupGet.json | +| [availableServiceAliasesListByResourceGroupSample.js][availableservicealiaseslistbyresourcegroupsample] | Gets all available service aliases for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesListByResourceGroup.json | +| [availableServiceAliasesListSample.js][availableservicealiaseslistsample] | Gets all available service aliases for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesList.json | +| [azureFirewallFqdnTagsListAllSample.js][azurefirewallfqdntagslistallsample] | Gets all the Azure Firewall FQDN Tags in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json | +| [azureFirewallsCreateOrUpdateSample.js][azurefirewallscreateorupdatesample] | Creates or updates the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPut.json | +| [azureFirewallsDeleteSample.js][azurefirewallsdeletesample] | Deletes the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallDelete.json | +| [azureFirewallsGetSample.js][azurefirewallsgetsample] | Gets the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGet.json | +| [azureFirewallsListAllSample.js][azurefirewallslistallsample] | Gets all the Azure Firewalls in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListBySubscription.json | +| [azureFirewallsListLearnedPrefixesSample.js][azurefirewallslistlearnedprefixessample] | Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListLearnedIPPrefixes.json | +| [azureFirewallsListSample.js][azurefirewallslistsample] | Lists all Azure Firewalls in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListByResourceGroup.json | +| [azureFirewallsPacketCaptureSample.js][azurefirewallspacketcapturesample] | Runs a packet capture on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPacketCapture.json | +| [azureFirewallsUpdateTagsSample.js][azurefirewallsupdatetagssample] | Updates tags of an Azure Firewall resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallUpdateTags.json | +| [bastionHostsCreateOrUpdateSample.js][bastionhostscreateorupdatesample] | Creates or updates the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPut.json | +| [bastionHostsDeleteSample.js][bastionhostsdeletesample] | Deletes the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDelete.json | +| [bastionHostsGetSample.js][bastionhostsgetsample] | Gets the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGet.json | +| [bastionHostsListByResourceGroupSample.js][bastionhostslistbyresourcegroupsample] | Lists all Bastion Hosts in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListByResourceGroup.json | +| [bastionHostsListSample.js][bastionhostslistsample] | Lists all Bastion Hosts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListBySubscription.json | +| [bastionHostsUpdateTagsSample.js][bastionhostsupdatetagssample] | Updates Tags for BastionHost resource x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPatch.json | +| [bgpServiceCommunitiesListSample.js][bgpservicecommunitieslistsample] | Gets all the available bgp service communities. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceCommunityList.json | +| [checkDnsNameAvailabilitySample.js][checkdnsnameavailabilitysample] | Checks whether a domain name in the cloudapp.azure.com zone is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckDnsNameAvailability.json | +| [configurationPolicyGroupsCreateOrUpdateSample.js][configurationpolicygroupscreateorupdatesample] | Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupPut.json | +| [configurationPolicyGroupsDeleteSample.js][configurationpolicygroupsdeletesample] | Deletes a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupDelete.json | +| [configurationPolicyGroupsGetSample.js][configurationpolicygroupsgetsample] | Retrieves the details of a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupGet.json | +| [configurationPolicyGroupsListByVpnServerConfigurationSample.js][configurationpolicygroupslistbyvpnserverconfigurationsample] | Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json | +| [connectionMonitorsCreateOrUpdateSample.js][connectionmonitorscreateorupdatesample] | Create or update a connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreate.json | +| [connectionMonitorsDeleteSample.js][connectionmonitorsdeletesample] | Deletes the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorDelete.json | +| [connectionMonitorsGetSample.js][connectionmonitorsgetsample] | Gets a connection monitor by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorGet.json | +| [connectionMonitorsListSample.js][connectionmonitorslistsample] | Lists all connection monitors for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorList.json | +| [connectionMonitorsQuerySample.js][connectionmonitorsquerysample] | Query a snapshot of the most recent connection states. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorQuery.json | +| [connectionMonitorsStartSample.js][connectionmonitorsstartsample] | Starts the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStart.json | +| [connectionMonitorsStopSample.js][connectionmonitorsstopsample] | Stops the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStop.json | +| [connectionMonitorsUpdateTagsSample.js][connectionmonitorsupdatetagssample] | Update tags of the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json | +| [connectivityConfigurationsCreateOrUpdateSample.js][connectivityconfigurationscreateorupdatesample] | Creates/Updates a new network manager connectivity configuration x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationPut.json | +| [connectivityConfigurationsDeleteSample.js][connectivityconfigurationsdeletesample] | Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json | +| [connectivityConfigurationsGetSample.js][connectivityconfigurationsgetsample] | Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationGet.json | +| [connectivityConfigurationsListSample.js][connectivityconfigurationslistsample] | Lists all the network manager connectivity configuration in a specified network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationList.json | +| [customIPPrefixesCreateOrUpdateSample.js][customipprefixescreateorupdatesample] | Creates or updates a custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixCreateCustomizedValues.json | +| [customIPPrefixesDeleteSample.js][customipprefixesdeletesample] | Deletes the specified custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixDelete.json | +| [customIPPrefixesGetSample.js][customipprefixesgetsample] | Gets the specified custom IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixGet.json | +| [customIPPrefixesListAllSample.js][customipprefixeslistallsample] | Gets all the custom IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixListAll.json | +| [customIPPrefixesListSample.js][customipprefixeslistsample] | Gets all custom IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixList.json | +| [customIPPrefixesUpdateTagsSample.js][customipprefixesupdatetagssample] | Updates custom IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixUpdateTags.json | +| [ddosCustomPoliciesCreateOrUpdateSample.js][ddoscustompoliciescreateorupdatesample] | Creates or updates a DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyCreate.json | +| [ddosCustomPoliciesDeleteSample.js][ddoscustompoliciesdeletesample] | Deletes the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyDelete.json | +| [ddosCustomPoliciesGetSample.js][ddoscustompoliciesgetsample] | Gets information about the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyGet.json | +| [ddosCustomPoliciesUpdateTagsSample.js][ddoscustompoliciesupdatetagssample] | Update a DDoS custom policy tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyUpdateTags.json | +| [ddosProtectionPlansCreateOrUpdateSample.js][ddosprotectionplanscreateorupdatesample] | Creates or updates a DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanCreate.json | +| [ddosProtectionPlansDeleteSample.js][ddosprotectionplansdeletesample] | Deletes the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanDelete.json | +| [ddosProtectionPlansGetSample.js][ddosprotectionplansgetsample] | Gets information about the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanGet.json | +| [ddosProtectionPlansListByResourceGroupSample.js][ddosprotectionplanslistbyresourcegroupsample] | Gets all the DDoS protection plans in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanList.json | +| [ddosProtectionPlansListSample.js][ddosprotectionplanslistsample] | Gets all DDoS protection plans in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanListAll.json | +| [ddosProtectionPlansUpdateTagsSample.js][ddosprotectionplansupdatetagssample] | Update a DDoS protection plan tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanUpdateTags.json | +| [defaultSecurityRulesGetSample.js][defaultsecurityrulesgetsample] | Get the specified default network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleGet.json | +| [defaultSecurityRulesListSample.js][defaultsecurityruleslistsample] | Gets all default security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleList.json | +| [deleteBastionShareableLinkByTokenSample.js][deletebastionshareablelinkbytokensample] | Deletes the Bastion Shareable Links for all the tokens specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDeleteByToken.json | +| [deleteBastionShareableLinkSample.js][deletebastionshareablelinksample] | Deletes the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDelete.json | +| [disconnectActiveSessionsSample.js][disconnectactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionDelete.json | +| [dscpConfigurationCreateOrUpdateSample.js][dscpconfigurationcreateorupdatesample] | Creates or updates a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationCreate.json | +| [dscpConfigurationDeleteSample.js][dscpconfigurationdeletesample] | Deletes a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationDelete.json | +| [dscpConfigurationGetSample.js][dscpconfigurationgetsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationGet.json | +| [dscpConfigurationListAllSample.js][dscpconfigurationlistallsample] | Gets all dscp configurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationListAll.json | +| [dscpConfigurationListSample.js][dscpconfigurationlistsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationList.json | +| [expressRouteCircuitAuthorizationsCreateOrUpdateSample.js][expressroutecircuitauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json | +| [expressRouteCircuitAuthorizationsDeleteSample.js][expressroutecircuitauthorizationsdeletesample] | Deletes the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json | +| [expressRouteCircuitAuthorizationsGetSample.js][expressroutecircuitauthorizationsgetsample] | Gets the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationGet.json | +| [expressRouteCircuitAuthorizationsListSample.js][expressroutecircuitauthorizationslistsample] | Gets all authorizations in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationList.json | +| [expressRouteCircuitConnectionsCreateOrUpdateSample.js][expressroutecircuitconnectionscreateorupdatesample] | Creates or updates a Express Route Circuit Connection in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionCreate.json | +| [expressRouteCircuitConnectionsDeleteSample.js][expressroutecircuitconnectionsdeletesample] | Deletes the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionDelete.json | +| [expressRouteCircuitConnectionsGetSample.js][expressroutecircuitconnectionsgetsample] | Gets the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionGet.json | +| [expressRouteCircuitConnectionsListSample.js][expressroutecircuitconnectionslistsample] | Gets all global reach connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionList.json | +| [expressRouteCircuitPeeringsCreateOrUpdateSample.js][expressroutecircuitpeeringscreateorupdatesample] | Creates or updates a peering in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringCreate.json | +| [expressRouteCircuitPeeringsDeleteSample.js][expressroutecircuitpeeringsdeletesample] | Deletes the specified peering from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringDelete.json | +| [expressRouteCircuitPeeringsGetSample.js][expressroutecircuitpeeringsgetsample] | Gets the specified peering for the express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringGet.json | +| [expressRouteCircuitPeeringsListSample.js][expressroutecircuitpeeringslistsample] | Gets all peerings in a specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringList.json | +| [expressRouteCircuitsCreateOrUpdateSample.js][expressroutecircuitscreateorupdatesample] | Creates or updates an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreate.json | +| [expressRouteCircuitsDeleteSample.js][expressroutecircuitsdeletesample] | Deletes the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitDelete.json | +| [expressRouteCircuitsGetPeeringStatsSample.js][expressroutecircuitsgetpeeringstatssample] | Gets all stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringStats.json | +| [expressRouteCircuitsGetSample.js][expressroutecircuitsgetsample] | Gets information about the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitGet.json | +| [expressRouteCircuitsGetStatsSample.js][expressroutecircuitsgetstatssample] | Gets all the stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitStats.json | +| [expressRouteCircuitsListAllSample.js][expressroutecircuitslistallsample] | Gets all the express route circuits in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListBySubscription.json | +| [expressRouteCircuitsListArpTableSample.js][expressroutecircuitslistarptablesample] | Gets the currently advertised ARP table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitARPTableList.json | +| [expressRouteCircuitsListRoutesTableSample.js][expressroutecircuitslistroutestablesample] | Gets the currently advertised routes table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableList.json | +| [expressRouteCircuitsListRoutesTableSummarySample.js][expressroutecircuitslistroutestablesummarysample] | Gets the currently advertised routes table summary associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json | +| [expressRouteCircuitsListSample.js][expressroutecircuitslistsample] | Gets all the express route circuits in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListByResourceGroup.json | +| [expressRouteCircuitsUpdateTagsSample.js][expressroutecircuitsupdatetagssample] | Updates an express route circuit tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitUpdateTags.json | +| [expressRouteConnectionsCreateOrUpdateSample.js][expressrouteconnectionscreateorupdatesample] | Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionCreate.json | +| [expressRouteConnectionsDeleteSample.js][expressrouteconnectionsdeletesample] | Deletes a connection to a ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionDelete.json | +| [expressRouteConnectionsGetSample.js][expressrouteconnectionsgetsample] | Gets the specified ExpressRouteConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionGet.json | +| [expressRouteConnectionsListSample.js][expressrouteconnectionslistsample] | Lists ExpressRouteConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionList.json | +| [expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js][expressroutecrossconnectionpeeringscreateorupdatesample] | Creates or updates a peering in the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json | +| [expressRouteCrossConnectionPeeringsDeleteSample.js][expressroutecrossconnectionpeeringsdeletesample] | Deletes the specified peering from the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json | +| [expressRouteCrossConnectionPeeringsGetSample.js][expressroutecrossconnectionpeeringsgetsample] | Gets the specified peering for the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json | +| [expressRouteCrossConnectionPeeringsListSample.js][expressroutecrossconnectionpeeringslistsample] | Gets all peerings in a specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json | +| [expressRouteCrossConnectionsCreateOrUpdateSample.js][expressroutecrossconnectionscreateorupdatesample] | Update the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdate.json | +| [expressRouteCrossConnectionsGetSample.js][expressroutecrossconnectionsgetsample] | Gets details about the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionGet.json | +| [expressRouteCrossConnectionsListArpTableSample.js][expressroutecrossconnectionslistarptablesample] | Gets the currently advertised ARP table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsArpTable.json | +| [expressRouteCrossConnectionsListByResourceGroupSample.js][expressroutecrossconnectionslistbyresourcegroupsample] | Retrieves all the ExpressRouteCrossConnections in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json | +| [expressRouteCrossConnectionsListRoutesTableSample.js][expressroutecrossconnectionslistroutestablesample] | Gets the currently advertised routes table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json | +| [expressRouteCrossConnectionsListRoutesTableSummarySample.js][expressroutecrossconnectionslistroutestablesummarysample] | Gets the route table summary associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json | +| [expressRouteCrossConnectionsListSample.js][expressroutecrossconnectionslistsample] | Retrieves all the ExpressRouteCrossConnections in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionList.json | +| [expressRouteCrossConnectionsUpdateTagsSample.js][expressroutecrossconnectionsupdatetagssample] | Updates an express route cross connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json | +| [expressRouteGatewaysCreateOrUpdateSample.js][expressroutegatewayscreateorupdatesample] | Creates or updates a ExpressRoute gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayCreate.json | +| [expressRouteGatewaysDeleteSample.js][expressroutegatewaysdeletesample] | Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayDelete.json | +| [expressRouteGatewaysGetSample.js][expressroutegatewaysgetsample] | Fetches the details of a ExpressRoute gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayGet.json | +| [expressRouteGatewaysListByResourceGroupSample.js][expressroutegatewayslistbyresourcegroupsample] | Lists ExpressRoute gateways in a given resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListByResourceGroup.json | +| [expressRouteGatewaysListBySubscriptionSample.js][expressroutegatewayslistbysubscriptionsample] | Lists ExpressRoute gateways under a given subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListBySubscription.json | +| [expressRouteGatewaysUpdateTagsSample.js][expressroutegatewaysupdatetagssample] | Updates express route gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayUpdateTags.json | +| [expressRouteLinksGetSample.js][expressroutelinksgetsample] | Retrieves the specified ExpressRouteLink resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkGet.json | +| [expressRouteLinksListSample.js][expressroutelinkslistsample] | Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkList.json | +| [expressRoutePortAuthorizationsCreateOrUpdateSample.js][expressrouteportauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationCreate.json | +| [expressRoutePortAuthorizationsDeleteSample.js][expressrouteportauthorizationsdeletesample] | Deletes the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationDelete.json | +| [expressRoutePortAuthorizationsGetSample.js][expressrouteportauthorizationsgetsample] | Gets the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationGet.json | +| [expressRoutePortAuthorizationsListSample.js][expressrouteportauthorizationslistsample] | Gets all authorizations in an express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationList.json | +| [expressRoutePortsCreateOrUpdateSample.js][expressrouteportscreateorupdatesample] | Creates or updates the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortCreate.json | +| [expressRoutePortsDeleteSample.js][expressrouteportsdeletesample] | Deletes the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortDelete.json | +| [expressRoutePortsGenerateLoaSample.js][expressrouteportsgenerateloasample] | Generate a letter of authorization for the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateExpressRoutePortsLOA.json | +| [expressRoutePortsGetSample.js][expressrouteportsgetsample] | Retrieves the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortGet.json | +| [expressRoutePortsListByResourceGroupSample.js][expressrouteportslistbyresourcegroupsample] | List all the ExpressRoutePort resources in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortListByResourceGroup.json | +| [expressRoutePortsListSample.js][expressrouteportslistsample] | List all the ExpressRoutePort resources in the specified subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortList.json | +| [expressRoutePortsLocationsGetSample.js][expressrouteportslocationsgetsample] | Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationGet.json | +| [expressRoutePortsLocationsListSample.js][expressrouteportslocationslistsample] | Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationList.json | +| [expressRoutePortsUpdateTagsSample.js][expressrouteportsupdatetagssample] | Update ExpressRoutePort tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateTags.json | +| [expressRouteProviderPortSample.js][expressrouteproviderportsample] | Retrieves detail of a provider port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPort.json | +| [expressRouteProviderPortsLocationListSample.js][expressrouteproviderportslocationlistsample] | Retrieves all the ExpressRouteProviderPorts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPortList.json | +| [expressRouteServiceProvidersListSample.js][expressrouteserviceproviderslistsample] | Gets all the available express route service providers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteProviderList.json | +| [firewallPoliciesCreateOrUpdateSample.js][firewallpoliciescreateorupdatesample] | Creates or updates the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPut.json | +| [firewallPoliciesDeleteSample.js][firewallpoliciesdeletesample] | Deletes the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDelete.json | +| [firewallPoliciesGetSample.js][firewallpoliciesgetsample] | Gets the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyGet.json | +| [firewallPoliciesListAllSample.js][firewallpolicieslistallsample] | Gets all the Firewall Policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListBySubscription.json | +| [firewallPoliciesListSample.js][firewallpolicieslistsample] | Lists all Firewall Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListByResourceGroup.json | +| [firewallPoliciesUpdateTagsSample.js][firewallpoliciesupdatetagssample] | Updates tags of a Azure Firewall Policy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPatch.json | +| [firewallPolicyDeploymentsDeploySample.js][firewallpolicydeploymentsdeploysample] | Deploys the firewall policy draft and child rule collection group drafts. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDeploy.json | +| [firewallPolicyDraftsCreateOrUpdateSample.js][firewallpolicydraftscreateorupdatesample] | Create or update a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftPut.json | +| [firewallPolicyDraftsDeleteSample.js][firewallpolicydraftsdeletesample] | Delete a draft policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDelete.json | +| [firewallPolicyDraftsGetSample.js][firewallpolicydraftsgetsample] | Get a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftGet.json | +| [firewallPolicyIdpsSignaturesFilterValuesListSample.js][firewallpolicyidpssignaturesfiltervalueslistsample] | Retrieves the current filter values for the signatures overrides x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json | +| [firewallPolicyIdpsSignaturesListSample.js][firewallpolicyidpssignatureslistsample] | Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverrides.json | +| [firewallPolicyIdpsSignaturesOverridesGetSample.js][firewallpolicyidpssignaturesoverridesgetsample] | Returns all signatures overrides for a specific policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesGet.json | +| [firewallPolicyIdpsSignaturesOverridesListSample.js][firewallpolicyidpssignaturesoverrideslistsample] | Returns all signatures overrides objects for a specific policy as a list containing a single value. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesList.json | +| [firewallPolicyIdpsSignaturesOverridesPatchSample.js][firewallpolicyidpssignaturesoverridespatchsample] | Will update the status of policy's signature overrides for IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPatch.json | +| [firewallPolicyIdpsSignaturesOverridesPutSample.js][firewallpolicyidpssignaturesoverridesputsample] | Will override/create a new signature overrides for the policy's IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPut.json | +| [firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js][firewallpolicyrulecollectiongroupdraftscreateorupdatesample] | Create or Update Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json | +| [firewallPolicyRuleCollectionGroupDraftsDeleteSample.js][firewallpolicyrulecollectiongroupdraftsdeletesample] | Delete Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json | +| [firewallPolicyRuleCollectionGroupDraftsGetSample.js][firewallpolicyrulecollectiongroupdraftsgetsample] | Get Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json | +| [firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js][firewallpolicyrulecollectiongroupscreateorupdatesample] | Creates or updates the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json | +| [firewallPolicyRuleCollectionGroupsDeleteSample.js][firewallpolicyrulecollectiongroupsdeletesample] | Deletes the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json | +| [firewallPolicyRuleCollectionGroupsGetSample.js][firewallpolicyrulecollectiongroupsgetsample] | Gets the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json | +| [firewallPolicyRuleCollectionGroupsListSample.js][firewallpolicyrulecollectiongroupslistsample] | Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json | +| [flowLogsCreateOrUpdateSample.js][flowlogscreateorupdatesample] | Create or update a flow log for the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogCreate.json | +| [flowLogsDeleteSample.js][flowlogsdeletesample] | Deletes the specified flow log resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogDelete.json | +| [flowLogsGetSample.js][flowlogsgetsample] | Gets a flow log resource by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogGet.json | +| [flowLogsListSample.js][flowlogslistsample] | Lists all flow log resources for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogList.json | +| [flowLogsUpdateTagsSample.js][flowlogsupdatetagssample] | Update tags of the specified flow log. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogUpdateTags.json | +| [generatevirtualwanvpnserverconfigurationvpnprofileSample.js][generatevirtualwanvpnserverconfigurationvpnprofilesample] | Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json | +| [getActiveSessionsSample.js][getactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionsList.json | +| [getBastionShareableLinkSample.js][getbastionshareablelinksample] | Return the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkGet.json | +| [hubRouteTablesCreateOrUpdateSample.js][hubroutetablescreateorupdatesample] | Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTablePut.json | +| [hubRouteTablesDeleteSample.js][hubroutetablesdeletesample] | Deletes a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableDelete.json | +| [hubRouteTablesGetSample.js][hubroutetablesgetsample] | Retrieves the details of a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableGet.json | +| [hubRouteTablesListSample.js][hubroutetableslistsample] | Retrieves the details of all RouteTables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableList.json | +| [hubVirtualNetworkConnectionsCreateOrUpdateSample.js][hubvirtualnetworkconnectionscreateorupdatesample] | Creates a hub virtual network connection if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionPut.json | +| [hubVirtualNetworkConnectionsDeleteSample.js][hubvirtualnetworkconnectionsdeletesample] | Deletes a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionDelete.json | +| [hubVirtualNetworkConnectionsGetSample.js][hubvirtualnetworkconnectionsgetsample] | Retrieves the details of a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionGet.json | +| [hubVirtualNetworkConnectionsListSample.js][hubvirtualnetworkconnectionslistsample] | Retrieves the details of all HubVirtualNetworkConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionList.json | +| [inboundNatRulesCreateOrUpdateSample.js][inboundnatrulescreateorupdatesample] | Creates or updates a load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleCreate.json | +| [inboundNatRulesDeleteSample.js][inboundnatrulesdeletesample] | Deletes the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleDelete.json | +| [inboundNatRulesGetSample.js][inboundnatrulesgetsample] | Gets the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleGet.json | +| [inboundNatRulesListSample.js][inboundnatruleslistsample] | Gets all the inbound NAT rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleList.json | +| [inboundSecurityRuleCreateOrUpdateSample.js][inboundsecurityrulecreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRulePut.json | +| [inboundSecurityRuleGetSample.js][inboundsecurityrulegetsample] | Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRuleGet.json | +| [ipAllocationsCreateOrUpdateSample.js][ipallocationscreateorupdatesample] | Creates or updates an IpAllocation in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationCreate.json | +| [ipAllocationsDeleteSample.js][ipallocationsdeletesample] | Deletes the specified IpAllocation. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationDelete.json | +| [ipAllocationsGetSample.js][ipallocationsgetsample] | Gets the specified IpAllocation by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationGet.json | +| [ipAllocationsListByResourceGroupSample.js][ipallocationslistbyresourcegroupsample] | Gets all IpAllocations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationListByResourceGroup.json | +| [ipAllocationsListSample.js][ipallocationslistsample] | Gets all IpAllocations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationList.json | +| [ipAllocationsUpdateTagsSample.js][ipallocationsupdatetagssample] | Updates a IpAllocation tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationUpdateTags.json | +| [ipGroupsCreateOrUpdateSample.js][ipgroupscreateorupdatesample] | Creates or updates an ipGroups in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsCreate.json | +| [ipGroupsDeleteSample.js][ipgroupsdeletesample] | Deletes the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsDelete.json | +| [ipGroupsGetSample.js][ipgroupsgetsample] | Gets the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsGet.json | +| [ipGroupsListByResourceGroupSample.js][ipgroupslistbyresourcegroupsample] | Gets all IpGroups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListByResourceGroup.json | +| [ipGroupsListSample.js][ipgroupslistsample] | Gets all IpGroups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListBySubscription.json | +| [ipGroupsUpdateGroupsSample.js][ipgroupsupdategroupssample] | Updates tags of an IpGroups resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsUpdateTags.json | +| [ipamPoolsCreateSample.js][ipampoolscreatesample] | Creates/Updates the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Create.json | +| [ipamPoolsDeleteSample.js][ipampoolsdeletesample] | Delete the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Delete.json | +| [ipamPoolsGetPoolUsageSample.js][ipampoolsgetpoolusagesample] | Get the Pool Usage. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_GetPoolUsage.json | +| [ipamPoolsGetSample.js][ipampoolsgetsample] | Gets the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Get.json | +| [ipamPoolsListAssociatedResourcesSample.js][ipampoolslistassociatedresourcessample] | List Associated Resource in the Pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_ListAssociatedResources.json | +| [ipamPoolsListSample.js][ipampoolslistsample] | Gets list of Pool resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_List.json | +| [ipamPoolsUpdateSample.js][ipampoolsupdatesample] | Updates the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Update.json | +| [listActiveConnectivityConfigurationsSample.js][listactiveconnectivityconfigurationssample] | Lists active connectivity configurations in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json | +| [listActiveSecurityAdminRulesSample.js][listactivesecurityadminrulessample] | Lists active security admin rules in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json | +| [listNetworkManagerEffectiveConnectivityConfigurationsSample.js][listnetworkmanagereffectiveconnectivityconfigurationssample] | List all effective connectivity configurations applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json | +| [listNetworkManagerEffectiveSecurityAdminRulesSample.js][listnetworkmanagereffectivesecurityadminrulessample] | List all effective security admin rules applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json | +| [loadBalancerBackendAddressPoolsCreateOrUpdateSample.js][loadbalancerbackendaddresspoolscreateorupdatesample] | Creates or updates a load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json | +| [loadBalancerBackendAddressPoolsDeleteSample.js][loadbalancerbackendaddresspoolsdeletesample] | Deletes the specified load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolDelete.json | +| [loadBalancerBackendAddressPoolsGetSample.js][loadbalancerbackendaddresspoolsgetsample] | Gets load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json | +| [loadBalancerBackendAddressPoolsListSample.js][loadbalancerbackendaddresspoolslistsample] | Gets all the load balancer backed address pools. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json | +| [loadBalancerFrontendIPConfigurationsGetSample.js][loadbalancerfrontendipconfigurationsgetsample] | Gets load balancer frontend IP configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json | +| [loadBalancerFrontendIPConfigurationsListSample.js][loadbalancerfrontendipconfigurationslistsample] | Gets all the load balancer frontend IP configurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationList.json | +| [loadBalancerLoadBalancingRulesGetSample.js][loadbalancerloadbalancingrulesgetsample] | Gets the specified load balancer load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleGet.json | +| [loadBalancerLoadBalancingRulesHealthSample.js][loadbalancerloadbalancingruleshealthsample] | Get health details of a load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerHealth.json | +| [loadBalancerLoadBalancingRulesListSample.js][loadbalancerloadbalancingruleslistsample] | Gets all the load balancing rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleList.json | +| [loadBalancerNetworkInterfacesListSample.js][loadbalancernetworkinterfaceslistsample] | Gets associated load balancer network interfaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json | +| [loadBalancerOutboundRulesGetSample.js][loadbalanceroutboundrulesgetsample] | Gets the specified load balancer outbound rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleGet.json | +| [loadBalancerOutboundRulesListSample.js][loadbalanceroutboundruleslistsample] | Gets all the outbound rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleList.json | +| [loadBalancerProbesGetSample.js][loadbalancerprobesgetsample] | Gets load balancer probe. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeGet.json | +| [loadBalancerProbesListSample.js][loadbalancerprobeslistsample] | Gets all the load balancer probes. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeList.json | +| [loadBalancersCreateOrUpdateSample.js][loadbalancerscreateorupdatesample] | Creates or updates a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreate.json | +| [loadBalancersDeleteSample.js][loadbalancersdeletesample] | Deletes the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerDelete.json | +| [loadBalancersGetSample.js][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGet.json | +| [loadBalancersListAllSample.js][loadbalancerslistallsample] | Gets all the load balancers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerListAll.json | +| [loadBalancersListInboundNatRulePortMappingsSample.js][loadbalancerslistinboundnatruleportmappingssample] | List of inbound NAT rule port mappings. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/QueryInboundNatRulePortMapping.json | +| [loadBalancersListSample.js][loadbalancerslistsample] | Gets all the load balancers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerList.json | +| [loadBalancersMigrateToIPBasedSample.js][loadbalancersmigratetoipbasedsample] | Migrate load balancer to IP Based x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/MigrateLoadBalancerToIPBased.json | +| [loadBalancersSwapPublicIPAddressesSample.js][loadbalancersswappublicipaddressessample] | Swaps VIPs between two load balancers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancersSwapPublicIpAddresses.json | +| [loadBalancersUpdateTagsSample.js][loadbalancersupdatetagssample] | Updates a load balancer tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerUpdateTags.json | +| [localNetworkGatewaysCreateOrUpdateSample.js][localnetworkgatewayscreateorupdatesample] | Creates or updates a local network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayCreate.json | +| [localNetworkGatewaysDeleteSample.js][localnetworkgatewaysdeletesample] | Deletes the specified local network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayDelete.json | +| [localNetworkGatewaysGetSample.js][localnetworkgatewaysgetsample] | Gets the specified local network gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayGet.json | +| [localNetworkGatewaysListSample.js][localnetworkgatewayslistsample] | Gets all the local network gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayList.json | +| [localNetworkGatewaysUpdateTagsSample.js][localnetworkgatewaysupdatetagssample] | Updates a local network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayUpdateTags.json | +| [managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js][managementgroupnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupPut.json | +| [managementGroupNetworkManagerConnectionsDeleteSample.js][managementgroupnetworkmanagerconnectionsdeletesample] | Delete specified pending connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json | +| [managementGroupNetworkManagerConnectionsGetSample.js][managementgroupnetworkmanagerconnectionsgetsample] | Get a specified connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupGet.json | +| [managementGroupNetworkManagerConnectionsListSample.js][managementgroupnetworkmanagerconnectionslistsample] | List all network manager connections created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupList.json | +| [natGatewaysCreateOrUpdateSample.js][natgatewayscreateorupdatesample] | Creates or updates a nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayCreateOrUpdate.json | +| [natGatewaysDeleteSample.js][natgatewaysdeletesample] | Deletes the specified nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayDelete.json | +| [natGatewaysGetSample.js][natgatewaysgetsample] | Gets the specified nat gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayGet.json | +| [natGatewaysListAllSample.js][natgatewayslistallsample] | Gets all the Nat Gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayListAll.json | +| [natGatewaysListSample.js][natgatewayslistsample] | Gets all nat gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayList.json | +| [natGatewaysUpdateTagsSample.js][natgatewaysupdatetagssample] | Updates nat gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayUpdateTags.json | +| [natRulesCreateOrUpdateSample.js][natrulescreateorupdatesample] | Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRulePut.json | +| [natRulesDeleteSample.js][natrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleDelete.json | +| [natRulesGetSample.js][natrulesgetsample] | Retrieves the details of a nat ruleGet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleGet.json | +| [natRulesListByVpnGatewaySample.js][natruleslistbyvpngatewaysample] | Retrieves all nat rules for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleList.json | +| [networkGroupsCreateOrUpdateSample.js][networkgroupscreateorupdatesample] | Creates or updates a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupPut.json | +| [networkGroupsDeleteSample.js][networkgroupsdeletesample] | Deletes a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupDelete.json | +| [networkGroupsGetSample.js][networkgroupsgetsample] | Gets the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupGet.json | +| [networkGroupsListSample.js][networkgroupslistsample] | Lists the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupList.json | +| [networkInterfaceIPConfigurationsGetSample.js][networkinterfaceipconfigurationsgetsample] | Gets the specified network interface ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationGet.json | +| [networkInterfaceIPConfigurationsListSample.js][networkinterfaceipconfigurationslistsample] | Get all ip configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationList.json | +| [networkInterfaceLoadBalancersListSample.js][networkinterfaceloadbalancerslistsample] | List all load balancers in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceLoadBalancerList.json | +| [networkInterfaceTapConfigurationsCreateOrUpdateSample.js][networkinterfacetapconfigurationscreateorupdatesample] | Creates or updates a Tap configuration in the specified NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationCreate.json | +| [networkInterfaceTapConfigurationsDeleteSample.js][networkinterfacetapconfigurationsdeletesample] | Deletes the specified tap configuration from the NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationDelete.json | +| [networkInterfaceTapConfigurationsGetSample.js][networkinterfacetapconfigurationsgetsample] | Get the specified tap configuration on a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationGet.json | +| [networkInterfaceTapConfigurationsListSample.js][networkinterfacetapconfigurationslistsample] | Get all Tap configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationList.json | +| [networkInterfacesCreateOrUpdateSample.js][networkinterfacescreateorupdatesample] | Creates or updates a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreate.json | +| [networkInterfacesDeleteSample.js][networkinterfacesdeletesample] | Deletes the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceDelete.json | +| [networkInterfacesGetCloudServiceNetworkInterfaceSample.js][networkinterfacesgetcloudservicenetworkinterfacesample] | Get the specified network interface in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceGet.json | +| [networkInterfacesGetEffectiveRouteTableSample.js][networkinterfacesgeteffectiveroutetablesample] | Gets all route tables applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json | +| [networkInterfacesGetSample.js][networkinterfacesgetsample] | Gets information about the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceGet.json | +| [networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js][networkinterfacesgetvirtualmachinescalesetipconfigurationsample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigGet.json | +| [networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js][networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample] | Get the specified network interface in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceGet.json | +| [networkInterfacesListAllSample.js][networkinterfaceslistallsample] | Gets all network interfaces in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceListAll.json | +| [networkInterfacesListCloudServiceNetworkInterfacesSample.js][networkinterfaceslistcloudservicenetworkinterfacessample] | Gets all network interfaces in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceList.json | +| [networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js][networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample] | Gets information about all network interfaces in a role instance in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json | +| [networkInterfacesListEffectiveNetworkSecurityGroupsSample.js][networkinterfaceslisteffectivenetworksecuritygroupssample] | Gets all network security groups applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveNSGList.json | +| [networkInterfacesListSample.js][networkinterfaceslistsample] | Gets all network interfaces in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceList.json | +| [networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js][networkinterfaceslistvirtualmachinescalesetipconfigurationssample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigList.json | +| [networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js][networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample] | Gets all network interfaces in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceList.json | +| [networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js][networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample] | Gets information about all network interfaces in a virtual machine in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmNetworkInterfaceList.json | +| [networkInterfacesUpdateTagsSample.js][networkinterfacesupdatetagssample] | Updates a network interface tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceUpdateTags.json | +| [networkManagerCommitsPostSample.js][networkmanagercommitspostsample] | Post a Network Manager Commit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerCommitPost.json | +| [networkManagerDeploymentStatusListSample.js][networkmanagerdeploymentstatuslistsample] | Post to List of Network Manager Deployment Status. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDeploymentStatusList.json | +| [networkManagerRoutingConfigurationsCreateOrUpdateSample.js][networkmanagerroutingconfigurationscreateorupdatesample] | Creates or updates a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationPut.json | +| [networkManagerRoutingConfigurationsDeleteSample.js][networkmanagerroutingconfigurationsdeletesample] | Deletes a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationDelete.json | +| [networkManagerRoutingConfigurationsGetSample.js][networkmanagerroutingconfigurationsgetsample] | Retrieves a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationGet.json | +| [networkManagerRoutingConfigurationsListSample.js][networkmanagerroutingconfigurationslistsample] | Lists all the network manager routing configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationList.json | +| [networkManagersCreateOrUpdateSample.js][networkmanagerscreateorupdatesample] | Creates or updates a Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPut.json | +| [networkManagersDeleteSample.js][networkmanagersdeletesample] | Deletes a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDelete.json | +| [networkManagersGetSample.js][networkmanagersgetsample] | Gets the specified Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGet.json | +| [networkManagersListBySubscriptionSample.js][networkmanagerslistbysubscriptionsample] | List all network managers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerListAll.json | +| [networkManagersListSample.js][networkmanagerslistsample] | List network managers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerList.json | +| [networkManagersPatchSample.js][networkmanagerspatchsample] | Patch NetworkManager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPatch.json | +| [networkProfilesCreateOrUpdateSample.js][networkprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileCreateConfigOnly.json | +| [networkProfilesDeleteSample.js][networkprofilesdeletesample] | Deletes the specified network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileDelete.json | +| [networkProfilesGetSample.js][networkprofilesgetsample] | Gets the specified network profile in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetConfigOnly.json | +| [networkProfilesListAllSample.js][networkprofileslistallsample] | Gets all the network profiles in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileListAll.json | +| [networkProfilesListSample.js][networkprofileslistsample] | Gets all network profiles in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileList.json | +| [networkProfilesUpdateTagsSample.js][networkprofilesupdatetagssample] | Updates network profile tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileUpdateTags.json | +| [networkSecurityGroupsCreateOrUpdateSample.js][networksecuritygroupscreateorupdatesample] | Creates or updates a network security group in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreate.json | +| [networkSecurityGroupsDeleteSample.js][networksecuritygroupsdeletesample] | Deletes the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupDelete.json | +| [networkSecurityGroupsGetSample.js][networksecuritygroupsgetsample] | Gets the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupGet.json | +| [networkSecurityGroupsListAllSample.js][networksecuritygroupslistallsample] | Gets all network security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupListAll.json | +| [networkSecurityGroupsListSample.js][networksecuritygroupslistsample] | Gets all network security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupList.json | +| [networkSecurityGroupsUpdateTagsSample.js][networksecuritygroupsupdatetagssample] | Updates a network security group tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupUpdateTags.json | +| [networkVirtualApplianceConnectionsCreateOrUpdateSample.js][networkvirtualapplianceconnectionscreateorupdatesample] | Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionPut.json | +| [networkVirtualApplianceConnectionsDeleteSample.js][networkvirtualapplianceconnectionsdeletesample] | Deletes a NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionDelete.json | +| [networkVirtualApplianceConnectionsGetSample.js][networkvirtualapplianceconnectionsgetsample] | Retrieves the details of specified NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionGet.json | +| [networkVirtualApplianceConnectionsListSample.js][networkvirtualapplianceconnectionslistsample] | Lists NetworkVirtualApplianceConnections under the NVA. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionList.json | +| [networkVirtualAppliancesCreateOrUpdateSample.js][networkvirtualappliancescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualAppliancePut.json | +| [networkVirtualAppliancesDeleteSample.js][networkvirtualappliancesdeletesample] | Deletes the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceDelete.json | +| [networkVirtualAppliancesGetSample.js][networkvirtualappliancesgetsample] | Gets the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceGet.json | +| [networkVirtualAppliancesListByResourceGroupSample.js][networkvirtualapplianceslistbyresourcegroupsample] | Lists all Network Virtual Appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json | +| [networkVirtualAppliancesListSample.js][networkvirtualapplianceslistsample] | Gets all Network Virtual Appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListBySubscription.json | +| [networkVirtualAppliancesRestartSample.js][networkvirtualappliancesrestartsample] | Restarts one or more VMs belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceEmptyRestart.json | +| [networkVirtualAppliancesUpdateTagsSample.js][networkvirtualappliancesupdatetagssample] | Updates a Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceUpdateTags.json | +| [networkWatchersCheckConnectivitySample.js][networkwatcherscheckconnectivitysample] | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectivityCheck.json | +| [networkWatchersCreateOrUpdateSample.js][networkwatcherscreateorupdatesample] | Creates or updates a network watcher in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherCreate.json | +| [networkWatchersDeleteSample.js][networkwatchersdeletesample] | Deletes the specified network watcher resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherDelete.json | +| [networkWatchersGetAzureReachabilityReportSample.js][networkwatchersgetazurereachabilityreportsample] | NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json | +| [networkWatchersGetFlowLogStatusSample.js][networkwatchersgetflowlogstatussample] | Queries status of flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogStatusQuery.json | +| [networkWatchersGetNetworkConfigurationDiagnosticSample.js][networkwatchersgetnetworkconfigurationdiagnosticsample] | Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json | +| [networkWatchersGetNextHopSample.js][networkwatchersgetnexthopsample] | Gets the next hop from the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNextHopGet.json | +| [networkWatchersGetSample.js][networkwatchersgetsample] | Gets the specified network watcher by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherGet.json | +| [networkWatchersGetTopologySample.js][networkwatchersgettopologysample] | Gets the current network topology by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTopologyGet.json | +| [networkWatchersGetTroubleshootingResultSample.js][networkwatchersgettroubleshootingresultsample] | Get the last completed troubleshooting result on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootResultQuery.json | +| [networkWatchersGetTroubleshootingSample.js][networkwatchersgettroubleshootingsample] | Initiate troubleshooting on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootGet.json | +| [networkWatchersGetVMSecurityRulesSample.js][networkwatchersgetvmsecurityrulessample] | Gets the configured and effective security group rules on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherSecurityGroupViewGet.json | +| [networkWatchersListAllSample.js][networkwatcherslistallsample] | Gets all network watchers by subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherListAll.json | +| [networkWatchersListAvailableProvidersSample.js][networkwatcherslistavailableproviderssample] | NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAvailableProvidersListGet.json | +| [networkWatchersListSample.js][networkwatcherslistsample] | Gets all network watchers by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherList.json | +| [networkWatchersSetFlowLogConfigurationSample.js][networkwatcherssetflowlogconfigurationsample] | Configures flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogConfigure.json | +| [networkWatchersUpdateTagsSample.js][networkwatchersupdatetagssample] | Updates a network watcher tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherUpdateTags.json | +| [networkWatchersVerifyIPFlowSample.js][networkwatchersverifyipflowsample] | Verify IP flow from the specified VM to a location given the currently configured NSG rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherIpFlowVerify.json | +| [operationsListSample.js][operationslistsample] | Lists all of the available Network Rest API operations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/OperationList.json | +| [p2SVpnGatewaysCreateOrUpdateSample.js][p2svpngatewayscreateorupdatesample] | Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayPut.json | +| [p2SVpnGatewaysDeleteSample.js][p2svpngatewaysdeletesample] | Deletes a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayDelete.json | +| [p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js][p2svpngatewaysdisconnectp2svpnconnectionssample] | Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json | +| [p2SVpnGatewaysGenerateVpnProfileSample.js][p2svpngatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json | +| [p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js][p2svpngatewaysgetp2svpnconnectionhealthdetailedsample] | Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json | +| [p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js][p2svpngatewaysgetp2svpnconnectionhealthsample] | Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealth.json | +| [p2SVpnGatewaysGetSample.js][p2svpngatewaysgetsample] | Retrieves the details of a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGet.json | +| [p2SVpnGatewaysListByResourceGroupSample.js][p2svpngatewayslistbyresourcegroupsample] | Lists all the P2SVpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayListByResourceGroup.json | +| [p2SVpnGatewaysListSample.js][p2svpngatewayslistsample] | Lists all the P2SVpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayList.json | +| [p2SVpnGatewaysResetSample.js][p2svpngatewaysresetsample] | Resets the primary of the p2s vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayReset.json | +| [p2SVpnGatewaysUpdateTagsSample.js][p2svpngatewaysupdatetagssample] | Updates virtual wan p2s vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayUpdateTags.json | +| [packetCapturesCreateSample.js][packetcapturescreatesample] | Create and start a packet capture on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureCreate.json | +| [packetCapturesDeleteSample.js][packetcapturesdeletesample] | Deletes the specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureDelete.json | +| [packetCapturesGetSample.js][packetcapturesgetsample] | Gets a packet capture session by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureGet.json | +| [packetCapturesGetStatusSample.js][packetcapturesgetstatussample] | Query the status of a running packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json | +| [packetCapturesListSample.js][packetcaptureslistsample] | Lists all packet capture sessions within the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCapturesList.json | +| [packetCapturesStopSample.js][packetcapturesstopsample] | Stops a specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureStop.json | +| [peerExpressRouteCircuitConnectionsGetSample.js][peerexpressroutecircuitconnectionsgetsample] | Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionGet.json | +| [peerExpressRouteCircuitConnectionsListSample.js][peerexpressroutecircuitconnectionslistsample] | Gets all global reach peer connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionList.json | +| [privateDnsZoneGroupsCreateOrUpdateSample.js][privatednszonegroupscreateorupdatesample] | Creates or updates a private dns zone group in the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json | +| [privateDnsZoneGroupsDeleteSample.js][privatednszonegroupsdeletesample] | Deletes the specified private dns zone group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json | +| [privateDnsZoneGroupsGetSample.js][privatednszonegroupsgetsample] | Gets the private dns zone group resource by specified private dns zone group name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupGet.json | +| [privateDnsZoneGroupsListSample.js][privatednszonegroupslistsample] | Gets all private dns zone groups in a private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupList.json | +| [privateEndpointsCreateOrUpdateSample.js][privateendpointscreateorupdatesample] | Creates or updates an private endpoint in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreate.json | +| [privateEndpointsDeleteSample.js][privateendpointsdeletesample] | Deletes the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDelete.json | +| [privateEndpointsGetSample.js][privateendpointsgetsample] | Gets the specified private endpoint by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGet.json | +| [privateEndpointsListBySubscriptionSample.js][privateendpointslistbysubscriptionsample] | Gets all private endpoints in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointListAll.json | +| [privateEndpointsListSample.js][privateendpointslistsample] | Gets all private endpoints in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointList.json | +| [privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js][privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample] | Checks whether the subscription is visible to private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json | +| [privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js][privatelinkservicescheckprivatelinkservicevisibilitysample] | Checks whether the subscription is visible to private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibility.json | +| [privateLinkServicesCreateOrUpdateSample.js][privatelinkservicescreateorupdatesample] | Creates or updates an private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceCreate.json | +| [privateLinkServicesDeletePrivateEndpointConnectionSample.js][privatelinkservicesdeleteprivateendpointconnectionsample] | Delete private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json | +| [privateLinkServicesDeleteSample.js][privatelinkservicesdeletesample] | Deletes the specified private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDelete.json | +| [privateLinkServicesGetPrivateEndpointConnectionSample.js][privatelinkservicesgetprivateendpointconnectionsample] | Get the specific private end point connection by specific private link service in the resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json | +| [privateLinkServicesGetSample.js][privatelinkservicesgetsample] | Gets the specified private link service by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGet.json | +| [privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js][privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json | +| [privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js][privatelinkserviceslistautoapprovedprivatelinkservicessample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesGet.json | +| [privateLinkServicesListBySubscriptionSample.js][privatelinkserviceslistbysubscriptionsample] | Gets all private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListAll.json | +| [privateLinkServicesListPrivateEndpointConnectionsSample.js][privatelinkserviceslistprivateendpointconnectionssample] | Gets all private end point connections for a specific private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json | +| [privateLinkServicesListSample.js][privatelinkserviceslistsample] | Gets all private link services in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceList.json | +| [privateLinkServicesUpdatePrivateEndpointConnectionSample.js][privatelinkservicesupdateprivateendpointconnectionsample] | Approve or reject private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json | +| [publicIPAddressesCreateOrUpdateSample.js][publicipaddressescreateorupdatesample] | Creates or updates a static or dynamic public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDns.json | +| [publicIPAddressesDdosProtectionStatusSample.js][publicipaddressesddosprotectionstatussample] | Gets the Ddos Protection Status of a Public IP Address x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json | +| [publicIPAddressesDeleteSample.js][publicipaddressesdeletesample] | Deletes the specified public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressDelete.json | +| [publicIPAddressesGetCloudServicePublicIpaddressSample.js][publicipaddressesgetcloudservicepublicipaddresssample] | Get the specified public IP address in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpGet.json | +| [publicIPAddressesGetSample.js][publicipaddressesgetsample] | Gets the specified public IP address in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGet.json | +| [publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js][publicipaddressesgetvirtualmachinescalesetpublicipaddresssample] | Get the specified public IP address in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpGet.json | +| [publicIPAddressesListAllSample.js][publicipaddresseslistallsample] | Gets all the public IP addresses in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressListAll.json | +| [publicIPAddressesListCloudServicePublicIpaddressesSample.js][publicipaddresseslistcloudservicepublicipaddressessample] | Gets information about all public IP addresses on a cloud service level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpListAll.json | +| [publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js][publicipaddresseslistcloudserviceroleinstancepublicipaddressessample] | Gets information about all public IP addresses in a role instance IP configuration in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstancePublicIpList.json | +| [publicIPAddressesListSample.js][publicipaddresseslistsample] | Gets all public IP addresses in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressList.json | +| [publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js][publicipaddresseslistvirtualmachinescalesetpublicipaddressessample] | Gets information about all public IP addresses on a virtual machine scale set level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpListAll.json | +| [publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js][publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample] | Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmPublicIpList.json | +| [publicIPAddressesUpdateTagsSample.js][publicipaddressesupdatetagssample] | Updates public IP address tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressUpdateTags.json | +| [publicIPPrefixesCreateOrUpdateSample.js][publicipprefixescreateorupdatesample] | Creates or updates a static or dynamic public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateCustomizedValues.json | +| [publicIPPrefixesDeleteSample.js][publicipprefixesdeletesample] | Deletes the specified public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixDelete.json | +| [publicIPPrefixesGetSample.js][publicipprefixesgetsample] | Gets the specified public IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixGet.json | +| [publicIPPrefixesListAllSample.js][publicipprefixeslistallsample] | Gets all the public IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixListAll.json | +| [publicIPPrefixesListSample.js][publicipprefixeslistsample] | Gets all public IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixList.json | +| [publicIPPrefixesUpdateTagsSample.js][publicipprefixesupdatetagssample] | Updates public IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixUpdateTags.json | +| [putBastionShareableLinkSample.js][putbastionshareablelinksample] | Creates a Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkCreate.json | +| [reachabilityAnalysisIntentsCreateSample.js][reachabilityanalysisintentscreatesample] | Creates Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentPut.json | +| [reachabilityAnalysisIntentsDeleteSample.js][reachabilityanalysisintentsdeletesample] | Deletes Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentDelete.json | +| [reachabilityAnalysisIntentsGetSample.js][reachabilityanalysisintentsgetsample] | Get the Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentGet.json | +| [reachabilityAnalysisIntentsListSample.js][reachabilityanalysisintentslistsample] | Gets list of Reachability Analysis Intents . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentList.json | +| [reachabilityAnalysisRunsCreateSample.js][reachabilityanalysisrunscreatesample] | Creates Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunPut.json | +| [reachabilityAnalysisRunsDeleteSample.js][reachabilityanalysisrunsdeletesample] | Deletes Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunDelete.json | +| [reachabilityAnalysisRunsGetSample.js][reachabilityanalysisrunsgetsample] | Gets Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunGet.json | +| [reachabilityAnalysisRunsListSample.js][reachabilityanalysisrunslistsample] | Gets list of Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunList.json | +| [resourceNavigationLinksListSample.js][resourcenavigationlinkslistsample] | Gets a list of resource navigation links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json | +| [routeFilterRulesCreateOrUpdateSample.js][routefilterrulescreateorupdatesample] | Creates or updates a route in the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleCreate.json | +| [routeFilterRulesDeleteSample.js][routefilterrulesdeletesample] | Deletes the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleDelete.json | +| [routeFilterRulesGetSample.js][routefilterrulesgetsample] | Gets the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleGet.json | +| [routeFilterRulesListByRouteFilterSample.js][routefilterruleslistbyroutefiltersample] | Gets all RouteFilterRules in a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleListByRouteFilter.json | +| [routeFiltersCreateOrUpdateSample.js][routefilterscreateorupdatesample] | Creates or updates a route filter in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterCreate.json | +| [routeFiltersDeleteSample.js][routefiltersdeletesample] | Deletes the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterDelete.json | +| [routeFiltersGetSample.js][routefiltersgetsample] | Gets the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterGet.json | +| [routeFiltersListByResourceGroupSample.js][routefilterslistbyresourcegroupsample] | Gets all route filters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterListByResourceGroup.json | +| [routeFiltersListSample.js][routefilterslistsample] | Gets all route filters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterList.json | +| [routeFiltersUpdateTagsSample.js][routefiltersupdatetagssample] | Updates tags of a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterUpdateTags.json | +| [routeMapsCreateOrUpdateSample.js][routemapscreateorupdatesample] | Creates a RouteMap if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapPut.json | +| [routeMapsDeleteSample.js][routemapsdeletesample] | Deletes a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapDelete.json | +| [routeMapsGetSample.js][routemapsgetsample] | Retrieves the details of a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapGet.json | +| [routeMapsListSample.js][routemapslistsample] | Retrieves the details of all RouteMaps. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapList.json | +| [routeTablesCreateOrUpdateSample.js][routetablescreateorupdatesample] | Create or updates a route table in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreate.json | +| [routeTablesDeleteSample.js][routetablesdeletesample] | Deletes the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableDelete.json | +| [routeTablesGetSample.js][routetablesgetsample] | Gets the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableGet.json | +| [routeTablesListAllSample.js][routetableslistallsample] | Gets all route tables in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableListAll.json | +| [routeTablesListSample.js][routetableslistsample] | Gets all route tables in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableList.json | +| [routeTablesUpdateTagsSample.js][routetablesupdatetagssample] | Updates a route table tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableUpdateTags.json | +| [routesCreateOrUpdateSample.js][routescreateorupdatesample] | Creates or updates a route in the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteCreate.json | +| [routesDeleteSample.js][routesdeletesample] | Deletes the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteDelete.json | +| [routesGetSample.js][routesgetsample] | Gets the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteGet.json | +| [routesListSample.js][routeslistsample] | Gets all routes in a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteList.json | +| [routingIntentCreateOrUpdateSample.js][routingintentcreateorupdatesample] | Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentPut.json | +| [routingIntentDeleteSample.js][routingintentdeletesample] | Deletes a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentDelete.json | +| [routingIntentGetSample.js][routingintentgetsample] | Retrieves the details of a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentGet.json | +| [routingIntentListSample.js][routingintentlistsample] | Retrieves the details of all RoutingIntent child resources of the VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentList.json | +| [routingRuleCollectionsCreateOrUpdateSample.js][routingrulecollectionscreateorupdatesample] | Creates or updates a routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json | +| [routingRuleCollectionsDeleteSample.js][routingrulecollectionsdeletesample] | Deletes an routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json | +| [routingRuleCollectionsGetSample.js][routingrulecollectionsgetsample] | Gets a network manager routing configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json | +| [routingRuleCollectionsListSample.js][routingrulecollectionslistsample] | Lists all the rule collections in a routing configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionList.json | +| [routingRulesCreateOrUpdateSample.js][routingrulescreateorupdatesample] | Creates or updates an routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json | +| [routingRulesDeleteSample.js][routingrulesdeletesample] | Deletes a routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleDelete.json | +| [routingRulesGetSample.js][routingrulesgetsample] | Gets a network manager routing configuration routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleGet.json | +| [routingRulesListSample.js][routingruleslistsample] | List all network manager routing configuration routing rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleList.json | +| [scopeConnectionsCreateOrUpdateSample.js][scopeconnectionscreateorupdatesample] | Creates or updates scope connection from Network Manager x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionPut.json | +| [scopeConnectionsDeleteSample.js][scopeconnectionsdeletesample] | Delete the pending scope connection created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionDelete.json | +| [scopeConnectionsGetSample.js][scopeconnectionsgetsample] | Get specified scope connection created by this Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionGet.json | +| [scopeConnectionsListSample.js][scopeconnectionslistsample] | List all scope connections created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionList.json | +| [securityAdminConfigurationsCreateOrUpdateSample.js][securityadminconfigurationscreateorupdatesample] | Creates or updates a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json | +| [securityAdminConfigurationsDeleteSample.js][securityadminconfigurationsdeletesample] | Deletes a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json | +| [securityAdminConfigurationsGetSample.js][securityadminconfigurationsgetsample] | Retrieves a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json | +| [securityAdminConfigurationsListSample.js][securityadminconfigurationslistsample] | Lists all the network manager security admin configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json | +| [securityPartnerProvidersCreateOrUpdateSample.js][securitypartnerproviderscreateorupdatesample] | Creates or updates the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderPut.json | +| [securityPartnerProvidersDeleteSample.js][securitypartnerprovidersdeletesample] | Deletes the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderDelete.json | +| [securityPartnerProvidersGetSample.js][securitypartnerprovidersgetsample] | Gets the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderGet.json | +| [securityPartnerProvidersListByResourceGroupSample.js][securitypartnerproviderslistbyresourcegroupsample] | Lists all Security Partner Providers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListByResourceGroup.json | +| [securityPartnerProvidersListSample.js][securitypartnerproviderslistsample] | Gets all the Security Partner Providers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListBySubscription.json | +| [securityPartnerProvidersUpdateTagsSample.js][securitypartnerprovidersupdatetagssample] | Updates tags of a Security Partner Provider resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderUpdateTags.json | +| [securityRulesCreateOrUpdateSample.js][securityrulescreateorupdatesample] | Creates or updates a security rule in the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleCreate.json | +| [securityRulesDeleteSample.js][securityrulesdeletesample] | Deletes the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleDelete.json | +| [securityRulesGetSample.js][securityrulesgetsample] | Get the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleGet.json | +| [securityRulesListSample.js][securityruleslistsample] | Gets all security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleList.json | +| [securityUserConfigurationsCreateOrUpdateSample.js][securityuserconfigurationscreateorupdatesample] | Creates or updates a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json | +| [securityUserConfigurationsDeleteSample.js][securityuserconfigurationsdeletesample] | Deletes a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json | +| [securityUserConfigurationsGetSample.js][securityuserconfigurationsgetsample] | Retrieves a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json | +| [securityUserConfigurationsListSample.js][securityuserconfigurationslistsample] | Lists all the network manager security user configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationList.json | +| [securityUserRuleCollectionsCreateOrUpdateSample.js][securityuserrulecollectionscreateorupdatesample] | Creates or updates a security user rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json | +| [securityUserRuleCollectionsDeleteSample.js][securityuserrulecollectionsdeletesample] | Deletes a Security User Rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json | +| [securityUserRuleCollectionsGetSample.js][securityuserrulecollectionsgetsample] | Gets a network manager security user configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json | +| [securityUserRuleCollectionsListSample.js][securityuserrulecollectionslistsample] | Lists all the security user rule collections in a security configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json | +| [securityUserRulesCreateOrUpdateSample.js][securityuserrulescreateorupdatesample] | Creates or updates a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRulePut.json | +| [securityUserRulesDeleteSample.js][securityuserrulesdeletesample] | Deletes a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleDelete.json | +| [securityUserRulesGetSample.js][securityuserrulesgetsample] | Gets a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleGet.json | +| [securityUserRulesListSample.js][securityuserruleslistsample] | Lists all Security User Rules in a rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleList.json | +| [serviceAssociationLinksListSample.js][serviceassociationlinkslistsample] | Gets a list of service association links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json | +| [serviceEndpointPoliciesCreateOrUpdateSample.js][serviceendpointpoliciescreateorupdatesample] | Creates or updates a service Endpoint Policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreate.json | +| [serviceEndpointPoliciesDeleteSample.js][serviceendpointpoliciesdeletesample] | Deletes the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDelete.json | +| [serviceEndpointPoliciesGetSample.js][serviceendpointpoliciesgetsample] | Gets the specified service Endpoint Policies in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyGet.json | +| [serviceEndpointPoliciesListByResourceGroupSample.js][serviceendpointpolicieslistbyresourcegroupsample] | Gets all service endpoint Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyList.json | +| [serviceEndpointPoliciesListSample.js][serviceendpointpolicieslistsample] | Gets all the service endpoint policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyListAll.json | +| [serviceEndpointPoliciesUpdateTagsSample.js][serviceendpointpoliciesupdatetagssample] | Updates tags of a service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyUpdateTags.json | +| [serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js][serviceendpointpolicydefinitionscreateorupdatesample] | Creates or updates a service endpoint policy definition in the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json | +| [serviceEndpointPolicyDefinitionsDeleteSample.js][serviceendpointpolicydefinitionsdeletesample] | Deletes the specified ServiceEndpoint policy definitions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json | +| [serviceEndpointPolicyDefinitionsGetSample.js][serviceendpointpolicydefinitionsgetsample] | Get the specified service endpoint policy definitions from service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionGet.json | +| [serviceEndpointPolicyDefinitionsListByResourceGroupSample.js][serviceendpointpolicydefinitionslistbyresourcegroupsample] | Gets all service endpoint policy definitions in a service end point policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionList.json | +| [serviceTagInformationListSample.js][servicetaginformationlistsample] | Gets a list of service tag information resources with pagination. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResult.json | +| [serviceTagsListSample.js][servicetagslistsample] | Gets a list of service tag information resources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagsList.json | +| [staticCidrsCreateSample.js][staticcidrscreatesample] | Creates/Updates the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Create.json | +| [staticCidrsDeleteSample.js][staticcidrsdeletesample] | Delete the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Delete.json | +| [staticCidrsGetSample.js][staticcidrsgetsample] | Gets the specific Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Get.json | +| [staticCidrsListSample.js][staticcidrslistsample] | Gets list of Static CIDR resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_List.json | +| [staticMembersCreateOrUpdateSample.js][staticmemberscreateorupdatesample] | Creates or updates a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberPut.json | +| [staticMembersDeleteSample.js][staticmembersdeletesample] | Deletes a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberDelete.json | +| [staticMembersGetSample.js][staticmembersgetsample] | Gets the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberGet.json | +| [staticMembersListSample.js][staticmemberslistsample] | Lists the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberList.json | +| [subnetsCreateOrUpdateSample.js][subnetscreateorupdatesample] | Creates or updates a subnet in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreate.json | +| [subnetsDeleteSample.js][subnetsdeletesample] | Deletes the specified subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetDelete.json | +| [subnetsGetSample.js][subnetsgetsample] | Gets the specified subnet by virtual network and resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGet.json | +| [subnetsListSample.js][subnetslistsample] | Gets all subnets in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetList.json | +| [subnetsPrepareNetworkPoliciesSample.js][subnetspreparenetworkpoliciessample] | Prepares a subnet by applying network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetPrepareNetworkPolicies.json | +| [subnetsUnprepareNetworkPoliciesSample.js][subnetsunpreparenetworkpoliciessample] | Unprepares a subnet by removing network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetUnprepareNetworkPolicies.json | +| [subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js][subscriptionnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionPut.json | +| [subscriptionNetworkManagerConnectionsDeleteSample.js][subscriptionnetworkmanagerconnectionsdeletesample] | Delete specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json | +| [subscriptionNetworkManagerConnectionsGetSample.js][subscriptionnetworkmanagerconnectionsgetsample] | Get a specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionGet.json | +| [subscriptionNetworkManagerConnectionsListSample.js][subscriptionnetworkmanagerconnectionslistsample] | List all network manager connections created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionList.json | +| [supportedSecurityProvidersSample.js][supportedsecurityproviderssample] | Gives the supported security providers for the virtual wan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWanSupportedSecurityProviders.json | +| [usagesListSample.js][usageslistsample] | List network usages for a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageList.json | +| [verifierWorkspacesCreateSample.js][verifierworkspacescreatesample] | Creates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePut.json | +| [verifierWorkspacesDeleteSample.js][verifierworkspacesdeletesample] | Deletes Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceDelete.json | +| [verifierWorkspacesGetSample.js][verifierworkspacesgetsample] | Gets Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceGet.json | +| [verifierWorkspacesListSample.js][verifierworkspaceslistsample] | Gets list of Verifier Workspaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceList.json | +| [verifierWorkspacesUpdateSample.js][verifierworkspacesupdatesample] | Updates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePatch.json | +| [vipSwapCreateSample.js][vipswapcreatesample] | Performs vip swap operation on swappable cloud services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapPut.json | +| [vipSwapGetSample.js][vipswapgetsample] | Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapGet.json | +| [vipSwapListSample.js][vipswaplistsample] | Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapList.json | +| [virtualApplianceSitesCreateOrUpdateSample.js][virtualappliancesitescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSitePut.json | +| [virtualApplianceSitesDeleteSample.js][virtualappliancesitesdeletesample] | Deletes the specified site from a Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteDelete.json | +| [virtualApplianceSitesGetSample.js][virtualappliancesitesgetsample] | Gets the specified Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteGet.json | +| [virtualApplianceSitesListSample.js][virtualappliancesiteslistsample] | Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteList.json | +| [virtualApplianceSkusGetSample.js][virtualapplianceskusgetsample] | Retrieves a single available sku for network virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuGet.json | +| [virtualApplianceSkusListSample.js][virtualapplianceskuslistsample] | List all SKUs available for a virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuList.json | +| [virtualHubBgpConnectionCreateOrUpdateSample.js][virtualhubbgpconnectioncreateorupdatesample] | Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionPut.json | +| [virtualHubBgpConnectionDeleteSample.js][virtualhubbgpconnectiondeletesample] | Deletes a VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionDelete.json | +| [virtualHubBgpConnectionGetSample.js][virtualhubbgpconnectiongetsample] | Retrieves the details of a Virtual Hub Bgp Connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionGet.json | +| [virtualHubBgpConnectionsListAdvertisedRoutesSample.js][virtualhubbgpconnectionslistadvertisedroutessample] | Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json | +| [virtualHubBgpConnectionsListLearnedRoutesSample.js][virtualhubbgpconnectionslistlearnedroutessample] | Retrieves a list of routes the virtual hub bgp connection has learned. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListLearnedRoute.json | +| [virtualHubBgpConnectionsListSample.js][virtualhubbgpconnectionslistsample] | Retrieves the details of all VirtualHubBgpConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionList.json | +| [virtualHubIPConfigurationCreateOrUpdateSample.js][virtualhubipconfigurationcreateorupdatesample] | Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationPut.json | +| [virtualHubIPConfigurationDeleteSample.js][virtualhubipconfigurationdeletesample] | Deletes a VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationDelete.json | +| [virtualHubIPConfigurationGetSample.js][virtualhubipconfigurationgetsample] | Retrieves the details of a Virtual Hub Ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationGet.json | +| [virtualHubIPConfigurationListSample.js][virtualhubipconfigurationlistsample] | Retrieves the details of all VirtualHubIpConfigurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationList.json | +| [virtualHubRouteTableV2SCreateOrUpdateSample.js][virtualhubroutetablev2screateorupdatesample] | Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Put.json | +| [virtualHubRouteTableV2SDeleteSample.js][virtualhubroutetablev2sdeletesample] | Deletes a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Delete.json | +| [virtualHubRouteTableV2SGetSample.js][virtualhubroutetablev2sgetsample] | Retrieves the details of a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Get.json | +| [virtualHubRouteTableV2SListSample.js][virtualhubroutetablev2slistsample] | Retrieves the details of all VirtualHubRouteTableV2s. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2List.json | +| [virtualHubsCreateOrUpdateSample.js][virtualhubscreateorupdatesample] | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubPut.json | +| [virtualHubsDeleteSample.js][virtualhubsdeletesample] | Deletes a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubDelete.json | +| [virtualHubsGetEffectiveVirtualHubRoutesSample.js][virtualhubsgeteffectivevirtualhubroutessample] | Gets the effective routes configured for the Virtual Hub resource or the specified resource . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForConnection.json | +| [virtualHubsGetInboundRoutesSample.js][virtualhubsgetinboundroutessample] | Gets the inbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetInboundRoutes.json | +| [virtualHubsGetOutboundRoutesSample.js][virtualhubsgetoutboundroutessample] | Gets the outbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetOutboundRoutes.json | +| [virtualHubsGetSample.js][virtualhubsgetsample] | Retrieves the details of a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubGet.json | +| [virtualHubsListByResourceGroupSample.js][virtualhubslistbyresourcegroupsample] | Lists all the VirtualHubs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubListByResourceGroup.json | +| [virtualHubsListSample.js][virtualhubslistsample] | Lists all the VirtualHubs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubList.json | +| [virtualHubsUpdateTagsSample.js][virtualhubsupdatetagssample] | Updates VirtualHub tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubUpdateTags.json | +| [virtualNetworkGatewayConnectionsCreateOrUpdateSample.js][virtualnetworkgatewayconnectionscreateorupdatesample] | Creates or updates a virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionCreate.json | +| [virtualNetworkGatewayConnectionsDeleteSample.js][virtualnetworkgatewayconnectionsdeletesample] | Deletes the specified virtual network Gateway connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionDelete.json | +| [virtualNetworkGatewayConnectionsGetIkeSasSample.js][virtualnetworkgatewayconnectionsgetikesassample] | Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json | +| [virtualNetworkGatewayConnectionsGetSample.js][virtualnetworkgatewayconnectionsgetsample] | Gets the specified virtual network gateway connection by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGet.json | +| [virtualNetworkGatewayConnectionsGetSharedKeySample.js][virtualnetworkgatewayconnectionsgetsharedkeysample] | The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json | +| [virtualNetworkGatewayConnectionsListSample.js][virtualnetworkgatewayconnectionslistsample] | The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionsList.json | +| [virtualNetworkGatewayConnectionsResetConnectionSample.js][virtualnetworkgatewayconnectionsresetconnectionsample] | Resets the virtual network gateway connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionReset.json | +| [virtualNetworkGatewayConnectionsResetSharedKeySample.js][virtualnetworkgatewayconnectionsresetsharedkeysample] | The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json | +| [virtualNetworkGatewayConnectionsSetSharedKeySample.js][virtualnetworkgatewayconnectionssetsharedkeysample] | The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json | +| [virtualNetworkGatewayConnectionsStartPacketCaptureSample.js][virtualnetworkgatewayconnectionsstartpacketcapturesample] | Starts packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json | +| [virtualNetworkGatewayConnectionsStopPacketCaptureSample.js][virtualnetworkgatewayconnectionsstoppacketcapturesample] | Stops packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json | +| [virtualNetworkGatewayConnectionsUpdateTagsSample.js][virtualnetworkgatewayconnectionsupdatetagssample] | Updates a virtual network gateway connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json | +| [virtualNetworkGatewayNatRulesCreateOrUpdateSample.js][virtualnetworkgatewaynatrulescreateorupdatesample] | Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRulePut.json | +| [virtualNetworkGatewayNatRulesDeleteSample.js][virtualnetworkgatewaynatrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json | +| [virtualNetworkGatewayNatRulesGetSample.js][virtualnetworkgatewaynatrulesgetsample] | Retrieves the details of a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleGet.json | +| [virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js][virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample] | Retrieves all nat rules for a particular virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleList.json | +| [virtualNetworkGatewaysCreateOrUpdateSample.js][virtualnetworkgatewayscreateorupdatesample] | Creates or updates a virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdate.json | +| [virtualNetworkGatewaysDeleteSample.js][virtualnetworkgatewaysdeletesample] | Deletes the specified virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayDelete.json | +| [virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js][virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample] | Disconnect vpn connections of virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json | +| [virtualNetworkGatewaysGenerateVpnProfileSample.js][virtualnetworkgatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json | +| [virtualNetworkGatewaysGeneratevpnclientpackageSample.js][virtualnetworkgatewaysgeneratevpnclientpackagesample] | Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json | +| [virtualNetworkGatewaysGetAdvertisedRoutesSample.js][virtualnetworkgatewaysgetadvertisedroutessample] | This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json | +| [virtualNetworkGatewaysGetBgpPeerStatusSample.js][virtualnetworkgatewaysgetbgppeerstatussample] | The GetBgpPeerStatus operation retrieves the status of all BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json | +| [virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js][virtualnetworkgatewaysgetfailoveralltestdetailssample] | This operation retrieves the details of all the failover tests performed on the gateway for different peering locations x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json | +| [virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js][virtualnetworkgatewaysgetfailoversingletestdetailssample] | This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json | +| [virtualNetworkGatewaysGetLearnedRoutesSample.js][virtualnetworkgatewaysgetlearnedroutessample] | This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json | +| [virtualNetworkGatewaysGetSample.js][virtualnetworkgatewaysgetsample] | Gets the specified virtual network gateway by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGet.json | +| [virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js][virtualnetworkgatewaysgetvpnprofilepackageurlsample] | Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json | +| [virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js][virtualnetworkgatewaysgetvpnclientconnectionhealthsample] | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json | +| [virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js][virtualnetworkgatewaysgetvpnclientipsecparameterssample] | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json | +| [virtualNetworkGatewaysListConnectionsSample.js][virtualnetworkgatewayslistconnectionssample] | Gets all the connections in a virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysListConnections.json | +| [virtualNetworkGatewaysListSample.js][virtualnetworkgatewayslistsample] | Gets all virtual network gateways by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayList.json | +| [virtualNetworkGatewaysResetSample.js][virtualnetworkgatewaysresetsample] | Resets the primary of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayReset.json | +| [virtualNetworkGatewaysResetVpnClientSharedKeySample.js][virtualnetworkgatewaysresetvpnclientsharedkeysample] | Resets the VPN client shared key of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json | +| [virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js][virtualnetworkgatewayssetvpnclientipsecparameterssample] | The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json | +| [virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js][virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample] | This operation starts failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json | +| [virtualNetworkGatewaysStartPacketCaptureSample.js][virtualnetworkgatewaysstartpacketcapturesample] | Starts packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json | +| [virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js][virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample] | This operation stops failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json | +| [virtualNetworkGatewaysStopPacketCaptureSample.js][virtualnetworkgatewaysstoppacketcapturesample] | Stops packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json | +| [virtualNetworkGatewaysSupportedVpnDevicesSample.js][virtualnetworkgatewayssupportedvpndevicessample] | Gets a xml format representation for supported vpn devices. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json | +| [virtualNetworkGatewaysUpdateTagsSample.js][virtualnetworkgatewaysupdatetagssample] | Updates a virtual network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdateTags.json | +| [virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js][virtualnetworkgatewaysvpndeviceconfigurationscriptsample] | Gets a xml format representation for vpn device configuration script. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json | +| [virtualNetworkPeeringsCreateOrUpdateSample.js][virtualnetworkpeeringscreateorupdatesample] | Creates or updates a peering in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json | +| [virtualNetworkPeeringsDeleteSample.js][virtualnetworkpeeringsdeletesample] | Deletes the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringDelete.json | +| [virtualNetworkPeeringsGetSample.js][virtualnetworkpeeringsgetsample] | Gets the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json | +| [virtualNetworkPeeringsListSample.js][virtualnetworkpeeringslistsample] | Gets all virtual network peerings in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringList.json | +| [virtualNetworkTapsCreateOrUpdateSample.js][virtualnetworktapscreateorupdatesample] | Creates or updates a Virtual Network Tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapCreate.json | +| [virtualNetworkTapsDeleteSample.js][virtualnetworktapsdeletesample] | Deletes the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapDelete.json | +| [virtualNetworkTapsGetSample.js][virtualnetworktapsgetsample] | Gets information about the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapGet.json | +| [virtualNetworkTapsListAllSample.js][virtualnetworktapslistallsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapListAll.json | +| [virtualNetworkTapsListByResourceGroupSample.js][virtualnetworktapslistbyresourcegroupsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapList.json | +| [virtualNetworkTapsUpdateTagsSample.js][virtualnetworktapsupdatetagssample] | Updates an VirtualNetworkTap tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapUpdateTags.json | +| [virtualNetworksCheckIPAddressAvailabilitySample.js][virtualnetworkscheckipaddressavailabilitysample] | Checks whether a private IP address is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json | +| [virtualNetworksCreateOrUpdateSample.js][virtualnetworkscreateorupdatesample] | Creates or updates a virtual network in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreate.json | +| [virtualNetworksDeleteSample.js][virtualnetworksdeletesample] | Deletes the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkDelete.json | +| [virtualNetworksGetSample.js][virtualnetworksgetsample] | Gets the specified virtual network by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGet.json | +| [virtualNetworksListAllSample.js][virtualnetworkslistallsample] | Gets all virtual networks in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListAll.json | +| [virtualNetworksListDdosProtectionStatusSample.js][virtualnetworkslistddosprotectionstatussample] | Gets the Ddos Protection Status of all IP Addresses under the Virtual Network x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json | +| [virtualNetworksListSample.js][virtualnetworkslistsample] | Gets all virtual networks in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkList.json | +| [virtualNetworksListUsageSample.js][virtualnetworkslistusagesample] | Lists usage stats. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListUsage.json | +| [virtualNetworksUpdateTagsSample.js][virtualnetworksupdatetagssample] | Updates a virtual network tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkUpdateTags.json | +| [virtualRouterPeeringsCreateOrUpdateSample.js][virtualrouterpeeringscreateorupdatesample] | Creates or updates the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringPut.json | +| [virtualRouterPeeringsDeleteSample.js][virtualrouterpeeringsdeletesample] | Deletes the specified peering from a Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringDelete.json | +| [virtualRouterPeeringsGetSample.js][virtualrouterpeeringsgetsample] | Gets the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringGet.json | +| [virtualRouterPeeringsListSample.js][virtualrouterpeeringslistsample] | Lists all Virtual Router Peerings in a Virtual Router resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringList.json | +| [virtualRoutersCreateOrUpdateSample.js][virtualrouterscreateorupdatesample] | Creates or updates the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPut.json | +| [virtualRoutersDeleteSample.js][virtualroutersdeletesample] | Deletes the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterDelete.json | +| [virtualRoutersGetSample.js][virtualroutersgetsample] | Gets the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterGet.json | +| [virtualRoutersListByResourceGroupSample.js][virtualrouterslistbyresourcegroupsample] | Lists all Virtual Routers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListByResourceGroup.json | +| [virtualRoutersListSample.js][virtualrouterslistsample] | Gets all the Virtual Routers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListBySubscription.json | +| [virtualWansCreateOrUpdateSample.js][virtualwanscreateorupdatesample] | Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANPut.json | +| [virtualWansDeleteSample.js][virtualwansdeletesample] | Deletes a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANDelete.json | +| [virtualWansGetSample.js][virtualwansgetsample] | Retrieves the details of a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANGet.json | +| [virtualWansListByResourceGroupSample.js][virtualwanslistbyresourcegroupsample] | Lists all the VirtualWANs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANListByResourceGroup.json | +| [virtualWansListSample.js][virtualwanslistsample] | Lists all the VirtualWANs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANList.json | +| [virtualWansUpdateTagsSample.js][virtualwansupdatetagssample] | Updates a VirtualWAN tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANUpdateTags.json | +| [vpnConnectionsCreateOrUpdateSample.js][vpnconnectionscreateorupdatesample] | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionPut.json | +| [vpnConnectionsDeleteSample.js][vpnconnectionsdeletesample] | Deletes a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionDelete.json | +| [vpnConnectionsGetSample.js][vpnconnectionsgetsample] | Retrieves the details of a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionGet.json | +| [vpnConnectionsListByVpnGatewaySample.js][vpnconnectionslistbyvpngatewaysample] | Retrieves all vpn connections for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionList.json | +| [vpnConnectionsStartPacketCaptureSample.js][vpnconnectionsstartpacketcapturesample] | Starts packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json | +| [vpnConnectionsStopPacketCaptureSample.js][vpnconnectionsstoppacketcapturesample] | Stops packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStopPacketCapture.json | +| [vpnGatewaysCreateOrUpdateSample.js][vpngatewayscreateorupdatesample] | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayPut.json | +| [vpnGatewaysDeleteSample.js][vpngatewaysdeletesample] | Deletes a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayDelete.json | +| [vpnGatewaysGetSample.js][vpngatewaysgetsample] | Retrieves the details of a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayGet.json | +| [vpnGatewaysListByResourceGroupSample.js][vpngatewayslistbyresourcegroupsample] | Lists all the VpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayListByResourceGroup.json | +| [vpnGatewaysListSample.js][vpngatewayslistsample] | Lists all the VpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayList.json | +| [vpnGatewaysResetSample.js][vpngatewaysresetsample] | Resets the primary of the vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayReset.json | +| [vpnGatewaysStartPacketCaptureSample.js][vpngatewaysstartpacketcapturesample] | Starts packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json | +| [vpnGatewaysStopPacketCaptureSample.js][vpngatewaysstoppacketcapturesample] | Stops packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStopPacketCapture.json | +| [vpnGatewaysUpdateTagsSample.js][vpngatewaysupdatetagssample] | Updates virtual wan vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayUpdateTags.json | +| [vpnLinkConnectionsGetAllSharedKeysSample.js][vpnlinkconnectionsgetallsharedkeyssample] | Lists all shared keys of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json | +| [vpnLinkConnectionsGetDefaultSharedKeySample.js][vpnlinkconnectionsgetdefaultsharedkeysample] | Gets the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json | +| [vpnLinkConnectionsGetIkeSasSample.js][vpnlinkconnectionsgetikesassample] | Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json | +| [vpnLinkConnectionsListByVpnConnectionSample.js][vpnlinkconnectionslistbyvpnconnectionsample] | Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionList.json | +| [vpnLinkConnectionsListDefaultSharedKeySample.js][vpnlinkconnectionslistdefaultsharedkeysample] | Gets the value of the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json | +| [vpnLinkConnectionsResetConnectionSample.js][vpnlinkconnectionsresetconnectionsample] | Resets the VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionReset.json | +| [vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js][vpnlinkconnectionssetorinitdefaultsharedkeysample] | Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json | +| [vpnServerConfigurationsAssociatedWithVirtualWanListSample.js][vpnserverconfigurationsassociatedwithvirtualwanlistsample] | Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetVirtualWanVpnServerConfigurations.json | +| [vpnServerConfigurationsCreateOrUpdateSample.js][vpnserverconfigurationscreateorupdatesample] | Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationPut.json | +| [vpnServerConfigurationsDeleteSample.js][vpnserverconfigurationsdeletesample] | Deletes a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationDelete.json | +| [vpnServerConfigurationsGetSample.js][vpnserverconfigurationsgetsample] | Retrieves the details of a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationGet.json | +| [vpnServerConfigurationsListByResourceGroupSample.js][vpnserverconfigurationslistbyresourcegroupsample] | Lists all the vpnServerConfigurations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationListByResourceGroup.json | +| [vpnServerConfigurationsListSample.js][vpnserverconfigurationslistsample] | Lists all the VpnServerConfigurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationList.json | +| [vpnServerConfigurationsUpdateTagsSample.js][vpnserverconfigurationsupdatetagssample] | Updates VpnServerConfiguration tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationUpdateTags.json | +| [vpnSiteLinkConnectionsGetSample.js][vpnsitelinkconnectionsgetsample] | Retrieves the details of a vpn site link connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGet.json | +| [vpnSiteLinksGetSample.js][vpnsitelinksgetsample] | Retrieves the details of a VPN site link. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkGet.json | +| [vpnSiteLinksListByVpnSiteSample.js][vpnsitelinkslistbyvpnsitesample] | Lists all the vpnSiteLinks in a resource group for a vpn site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkListByVpnSite.json | +| [vpnSitesConfigurationDownloadSample.js][vpnsitesconfigurationdownloadsample] | Gives the sas-url to download the configurations for vpn-sites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitesConfigurationDownload.json | +| [vpnSitesCreateOrUpdateSample.js][vpnsitescreateorupdatesample] | Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitePut.json | +| [vpnSitesDeleteSample.js][vpnsitesdeletesample] | Deletes a VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteDelete.json | +| [vpnSitesGetSample.js][vpnsitesgetsample] | Retrieves the details of a VPN site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteGet.json | +| [vpnSitesListByResourceGroupSample.js][vpnsiteslistbyresourcegroupsample] | Lists all the vpnSites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteListByResourceGroup.json | +| [vpnSitesListSample.js][vpnsiteslistsample] | Lists all the VpnSites in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteList.json | +| [vpnSitesUpdateTagsSample.js][vpnsitesupdatetagssample] | Updates VpnSite tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteUpdateTags.json | +| [webApplicationFirewallPoliciesCreateOrUpdateSample.js][webapplicationfirewallpoliciescreateorupdatesample] | Creates or update policy with specified rule set name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyCreateOrUpdate.json | +| [webApplicationFirewallPoliciesDeleteSample.js][webapplicationfirewallpoliciesdeletesample] | Deletes Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyDelete.json | +| [webApplicationFirewallPoliciesGetSample.js][webapplicationfirewallpoliciesgetsample] | Retrieve protection policy with specified name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyGet.json | +| [webApplicationFirewallPoliciesListAllSample.js][webapplicationfirewallpolicieslistallsample] | Gets all the WAF policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListAllPolicies.json | +| [webApplicationFirewallPoliciesListSample.js][webapplicationfirewallpolicieslistsample] | Lists all of the protection policies within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListPolicies.json | +| [webCategoriesGetSample.js][webcategoriesgetsample] | Gets the specified Azure Web Category. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoryGet.json | +| [webCategoriesListBySubscriptionSample.js][webcategorieslistbysubscriptionsample] | Gets all the Azure Web Categories in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoriesListBySubscription.json | ## Prerequisites @@ -924,6 +953,13 @@ Take a look at our [API Documentation][apiref] for more information about the AP [ipgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipGroupsListByResourceGroupSample.js [ipgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipGroupsListSample.js [ipgroupsupdategroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipGroupsUpdateGroupsSample.js +[ipampoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipamPoolsCreateSample.js +[ipampoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipamPoolsDeleteSample.js +[ipampoolsgetpoolusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetPoolUsageSample.js +[ipampoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetSample.js +[ipampoolslistassociatedresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipamPoolsListAssociatedResourcesSample.js +[ipampoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipamPoolsListSample.js +[ipampoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/ipamPoolsUpdateSample.js [listactiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/listActiveConnectivityConfigurationsSample.js [listactivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/listActiveSecurityAdminRulesSample.js [listnetworkmanagereffectiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js @@ -935,6 +971,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [loadbalancerfrontendipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsGetSample.js [loadbalancerfrontendipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsListSample.js [loadbalancerloadbalancingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesGetSample.js +[loadbalancerloadbalancingruleshealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesHealthSample.js [loadbalancerloadbalancingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesListSample.js [loadbalancernetworkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/loadBalancerNetworkInterfacesListSample.js [loadbalanceroutboundrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/loadBalancerOutboundRulesGetSample.js @@ -1111,6 +1148,14 @@ Take a look at our [API Documentation][apiref] for more information about the AP [publicipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesListSample.js [publicipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesUpdateTagsSample.js [putbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/putBastionShareableLinkSample.js +[reachabilityanalysisintentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsCreateSample.js +[reachabilityanalysisintentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsDeleteSample.js +[reachabilityanalysisintentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsGetSample.js +[reachabilityanalysisintentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsListSample.js +[reachabilityanalysisrunscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsCreateSample.js +[reachabilityanalysisrunsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsDeleteSample.js +[reachabilityanalysisrunsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsGetSample.js +[reachabilityanalysisrunslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsListSample.js [resourcenavigationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/resourceNavigationLinksListSample.js [routefilterrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesCreateOrUpdateSample.js [routefilterrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesDeleteSample.js @@ -1191,6 +1236,10 @@ Take a look at our [API Documentation][apiref] for more information about the AP [serviceendpointpolicydefinitionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js [servicetaginformationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/serviceTagInformationListSample.js [servicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/serviceTagsListSample.js +[staticcidrscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/staticCidrsCreateSample.js +[staticcidrsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/staticCidrsDeleteSample.js +[staticcidrsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/staticCidrsGetSample.js +[staticcidrslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/staticCidrsListSample.js [staticmemberscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/staticMembersCreateOrUpdateSample.js [staticmembersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/staticMembersDeleteSample.js [staticmembersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/staticMembersGetSample.js @@ -1207,6 +1256,11 @@ Take a look at our [API Documentation][apiref] for more information about the AP [subscriptionnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsListSample.js [supportedsecurityproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/supportedSecurityProvidersSample.js [usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/usagesListSample.js +[verifierworkspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesCreateSample.js +[verifierworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesDeleteSample.js +[verifierworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesGetSample.js +[verifierworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesListSample.js +[verifierworkspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesUpdateSample.js [vipswapcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/vipSwapCreateSample.js [vipswapgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/vipSwapGetSample.js [vipswaplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/vipSwapListSample.js @@ -1262,6 +1316,8 @@ Take a look at our [API Documentation][apiref] for more information about the AP [virtualnetworkgatewaysgeneratevpnclientpackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js [virtualnetworkgatewaysgetadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js [virtualnetworkgatewaysgetbgppeerstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js +[virtualnetworkgatewaysgetfailoveralltestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js +[virtualnetworkgatewaysgetfailoversingletestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js [virtualnetworkgatewaysgetlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js [virtualnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetSample.js [virtualnetworkgatewaysgetvpnprofilepackageurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js @@ -1272,7 +1328,9 @@ Take a look at our [API Documentation][apiref] for more information about the AP [virtualnetworkgatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetSample.js [virtualnetworkgatewaysresetvpnclientsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js [virtualnetworkgatewayssetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js +[virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js [virtualnetworkgatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js +[virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js [virtualnetworkgatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js [virtualnetworkgatewayssupportedvpndevicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js [virtualnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysUpdateTagsSample.js diff --git a/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsCreateOrUpdateSample.js index d62ba3229688..1ce3256ec3a4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an admin rule collection. * * @summary Creates or updates an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionPut.json */ async function createOrUpdateAnAdminRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsDeleteSample.js index e6d0634dbeee..f6bb78d6d8a9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes an admin rule collection. * * @summary Deletes an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json */ async function deletesAnAdminRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsGetSample.js index e66774e7b1c4..e2f96aafac0a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a network manager security admin configuration rule collection. * * @summary Gets a network manager security admin configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionGet.json */ async function getsSecurityAdminRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsListSample.js index 9df320df900c..44dfac752b1b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/adminRuleCollectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the rule collections in a security admin configuration, in a paginated format. * * @summary Lists all the rule collections in a security admin configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionList.json */ async function listSecurityAdminRuleCollections() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/adminRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/adminRulesCreateOrUpdateSample.js index ea6af59dadce..5d020acd76d9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/adminRulesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/adminRulesCreateOrUpdateSample.js @@ -16,19 +16,33 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an admin rule. * * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json */ -async function createADefaultAdminRule() { +async function createAAdminRuleWithNetworkGroupAsSourceOrDestination() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; const networkManagerName = "testNetworkManager"; const configurationName = "myTestSecurityConfig"; const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleDefaultAdminRule"; + const ruleName = "SampleAdminRule"; const adminRule = { - flag: "AllowVnetInbound", - kind: "Default", + description: "This is Sample Admin Rule", + access: "Deny", + destinationPortRanges: ["22"], + destinations: [ + { + addressPrefix: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", + addressPrefixType: "NetworkGroup", + }, + ], + direction: "Inbound", + kind: "Custom", + priority: 1, + sourcePortRanges: ["0-65535"], + sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], + protocol: "Tcp", }; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential, subscriptionId); @@ -47,7 +61,7 @@ async function createADefaultAdminRule() { * This sample demonstrates how to Creates or updates an admin rule. * * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut.json */ async function createAnAdminRule() { const subscriptionId = @@ -83,7 +97,7 @@ async function createAnAdminRule() { } async function main() { - createADefaultAdminRule(); + createAAdminRuleWithNetworkGroupAsSourceOrDestination(); createAnAdminRule(); } diff --git a/sdk/network/arm-network/samples/v33/javascript/adminRulesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/adminRulesDeleteSample.js index e301670af2f6..2a773b07c5b4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/adminRulesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/adminRulesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes an admin rule. * * @summary Deletes an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleDelete.json */ async function deletesAnAdminRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/adminRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/adminRulesGetSample.js index 03465d29de67..08eca5889b41 100644 --- a/sdk/network/arm-network/samples/v33/javascript/adminRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/adminRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a network manager security configuration admin rule. * * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleGet.json */ async function getsSecurityAdminRule() { const subscriptionId = @@ -42,7 +42,7 @@ async function getsSecurityAdminRule() { * This sample demonstrates how to Gets a network manager security configuration admin rule. * * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDefaultAdminRuleGet.json */ async function getsSecurityDefaultAdminRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/adminRulesListSample.js b/sdk/network/arm-network/samples/v33/javascript/adminRulesListSample.js index f85686ef4ddb..7f1b674fb941 100644 --- a/sdk/network/arm-network/samples/v33/javascript/adminRulesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/adminRulesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all network manager security configuration admin rules. * * @summary List all network manager security configuration admin rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleList.json */ async function listSecurityAdminRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js index f57fbb385921..33343ccd8090 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified private endpoint connection on application gateway. * * @summary Deletes the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json */ async function deleteApplicationGatewayPrivateEndpointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js index 9bfea863819d..2172b4dcb000 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified private endpoint connection on application gateway. * * @summary Gets the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json */ async function getApplicationGatewayPrivateEndpointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js index 41d8d5761bf3..d7305cc5135b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all private endpoint connections on an application gateway. * * @summary Lists all private endpoint connections on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json */ async function listsAllPrivateEndpointConnectionsOnApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js index 6119de1605ac..8d7e6809ae80 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateEndpointConnectionsUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates the specified private endpoint connection on application gateway. * * @summary Updates the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json */ async function updateApplicationGatewayPrivateEndpointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateLinkResourcesListSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateLinkResourcesListSample.js index fb535663a139..fc050d161dcd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateLinkResourcesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayPrivateLinkResourcesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all private link resources on an application gateway. * * @summary Lists all private link resources on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json */ async function listsAllPrivateLinkResourcesOnApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js index b6ae494773a6..4a15f75d9849 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayWafDynamicManifestsDefaultGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the regional application gateway waf manifest. * * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json */ async function getsWafDefaultManifest() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayWafDynamicManifestsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayWafDynamicManifestsGetSample.js index b0c2406a2e0a..91165786d02d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewayWafDynamicManifestsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewayWafDynamicManifestsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the regional application gateway waf manifest. * * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifests.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifests.json */ async function getsWafManifests() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysBackendHealthOnDemandSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysBackendHealthOnDemandSample.js index 65f24b700546..e10185c642af 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysBackendHealthOnDemandSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysBackendHealthOnDemandSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. * * @summary Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthTest.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthTest.json */ async function testBackendHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysBackendHealthSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysBackendHealthSample.js index e93239de32e9..cceebceffaaf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysBackendHealthSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysBackendHealthSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the backend health of the specified application gateway in a resource group. * * @summary Gets the backend health of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthGet.json */ async function getBackendHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysCreateOrUpdateSample.js index 3f4971a5ff7c..4a25dbe5ca5a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified application gateway. * * @summary Creates or updates the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayCreate.json */ async function createApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysDeleteSample.js index 0cc589d2a132..4efab37a26b1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified application gateway. * * @summary Deletes the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayDelete.json */ async function deleteApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysGetSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysGetSample.js index 583ae229b9af..c442911d00d8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified application gateway. * * @summary Gets the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayGet.json */ async function getApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysGetSslPredefinedPolicySample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysGetSslPredefinedPolicySample.js index 36772100c318..e6a9d2f90059 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysGetSslPredefinedPolicySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysGetSslPredefinedPolicySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets Ssl predefined policy with the specified policy name. * * @summary Gets Ssl predefined policy with the specified policy name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json */ async function getAvailableSslPredefinedPolicyByName() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAllSample.js index 2c8e2206d32d..78c4d44fdc4a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the application gateways in a subscription. * * @summary Gets all the application gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayListAll.json */ async function listsAllApplicationGatewaysInASubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableRequestHeadersSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableRequestHeadersSample.js index 8b7177acf063..0417e891660d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableRequestHeadersSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableRequestHeadersSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all available request headers. * * @summary Lists all available request headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json */ async function getAvailableRequestHeaders() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableResponseHeadersSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableResponseHeadersSample.js index 57f2d2bd7b10..95008f002818 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableResponseHeadersSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableResponseHeadersSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all available response headers. * * @summary Lists all available response headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json */ async function getAvailableResponseHeaders() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableServerVariablesSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableServerVariablesSample.js index 7d4fe5eeec77..2667d32246fa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableServerVariablesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableServerVariablesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all available server variables. * * @summary Lists all available server variables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json */ async function getAvailableServerVariables() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableSslOptionsSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableSslOptionsSample.js index 6e69877a0f18..f8690f84a0ba 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableSslOptionsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableSslOptionsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists available Ssl options for configuring Ssl policy. * * @summary Lists available Ssl options for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json */ async function getAvailableSslOptions() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js index 315477166e9b..79c810aa5984 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableSslPredefinedPoliciesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all SSL predefined policies for configuring Ssl policy. * * @summary Lists all SSL predefined policies for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json */ async function getAvailableSslPredefinedPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js index 2251db5c8c83..5fcef9bb6a50 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListAvailableWafRuleSetsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all available web application firewall rule sets. * * @summary Lists all available web application firewall rule sets. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json */ async function getAvailableWafRuleSets() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListSample.js index f2d77f46f3fa..ea0a96174be9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all application gateways in a resource group. * * @summary Lists all application gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayList.json */ async function listsAllApplicationGatewaysInAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysStartSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysStartSample.js index 0e163a7359a0..7a74e8df6ff9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysStartSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysStartSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Starts the specified application gateway. * * @summary Starts the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStart.json */ async function startApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysStopSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysStopSample.js index b6832b345a90..5f7010390418 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysStopSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysStopSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Stops the specified application gateway in a resource group. * * @summary Stops the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStop.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStop.json */ async function stopApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysUpdateTagsSample.js index 24c12717cead..7b8573d76cb6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationGatewaysUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates the specified application gateway tags. * * @summary Updates the specified application gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayUpdateTags.json */ async function updateApplicationGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsCreateOrUpdateSample.js index ef6e710122ea..5770d34acbbb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an application security group. * * @summary Creates or updates an application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupCreate.json */ async function createApplicationSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsDeleteSample.js index 0742a87deead..939eaa3e5a97 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified application security group. * * @summary Deletes the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupDelete.json */ async function deleteApplicationSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsGetSample.js index b4f72f523498..31135fa4f2ed 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about the specified application security group. * * @summary Gets information about the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupGet.json */ async function getApplicationSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsListAllSample.js index 356a28c277ce..1f15e3f3b9b0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all application security groups in a subscription. * * @summary Gets all application security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupListAll.json */ async function listAllApplicationSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsListSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsListSample.js index 7e9a7e1d8244..e972a9037b49 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the application security groups in a resource group. * * @summary Gets all the application security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupList.json */ async function listLoadBalancersInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsUpdateTagsSample.js index b661d35c642b..b37ac035ea60 100644 --- a/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/applicationSecurityGroupsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates an application security group's tags. * * @summary Updates an application security group's tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupUpdateTags.json */ async function updateApplicationSecurityGroupTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/availableDelegationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/availableDelegationsListSample.js index 8c963b87721b..b934955727e1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/availableDelegationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/availableDelegationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all of the available subnet delegations for this subscription in this region. * * @summary Gets all of the available subnet delegations for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsSubscriptionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsSubscriptionGet.json */ async function getAvailableDelegations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/availableEndpointServicesListSample.js b/sdk/network/arm-network/samples/v33/javascript/availableEndpointServicesListSample.js index 9750b8d7f33a..2b5d55f40ca0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/availableEndpointServicesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/availableEndpointServicesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List what values of endpoint services are available for use. * * @summary List what values of endpoint services are available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EndpointServicesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EndpointServicesList.json */ async function endpointServicesList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js index adaa68c2a5f5..c883c44ccf9b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/availablePrivateEndpointTypesListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. * * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json */ async function getAvailablePrivateEndpointTypesInTheResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/availablePrivateEndpointTypesListSample.js b/sdk/network/arm-network/samples/v33/javascript/availablePrivateEndpointTypesListSample.js index 406c1fc877a0..622587e4bd4e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/availablePrivateEndpointTypesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/availablePrivateEndpointTypesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. * * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesGet.json */ async function getAvailablePrivateEndpointTypes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/availableResourceGroupDelegationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/availableResourceGroupDelegationsListSample.js index 354ee37b1aad..bca665d36bc2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/availableResourceGroupDelegationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/availableResourceGroupDelegationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all of the available subnet delegations for this resource group in this region. * * @summary Gets all of the available subnet delegations for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsResourceGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsResourceGroupGet.json */ async function getAvailableDelegationsInTheResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/availableServiceAliasesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/availableServiceAliasesListByResourceGroupSample.js index bcab73dc4e0a..33507565b096 100644 --- a/sdk/network/arm-network/samples/v33/javascript/availableServiceAliasesListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/availableServiceAliasesListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all available service aliases for this resource group in this region. * * @summary Gets all available service aliases for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesListByResourceGroup.json */ async function getAvailableServiceAliasesInTheResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/availableServiceAliasesListSample.js b/sdk/network/arm-network/samples/v33/javascript/availableServiceAliasesListSample.js index e2d0f983adba..4e7510a6a387 100644 --- a/sdk/network/arm-network/samples/v33/javascript/availableServiceAliasesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/availableServiceAliasesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all available service aliases for this subscription in this region. * * @summary Gets all available service aliases for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesList.json */ async function getAvailableServiceAliases() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/azureFirewallFqdnTagsListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/azureFirewallFqdnTagsListAllSample.js index c01a81f6a955..86174a9f1273 100644 --- a/sdk/network/arm-network/samples/v33/javascript/azureFirewallFqdnTagsListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/azureFirewallFqdnTagsListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the Azure Firewall FQDN Tags in a subscription. * * @summary Gets all the Azure Firewall FQDN Tags in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json */ async function listAllAzureFirewallFqdnTagsForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsCreateOrUpdateSample.js index d6efb849f1ed..145c58d1e837 100644 --- a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPut.json */ async function createAzureFirewall() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -127,7 +127,7 @@ async function createAzureFirewall() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithAdditionalProperties.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithAdditionalProperties.json */ async function createAzureFirewallWithAdditionalProperties() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -240,7 +240,7 @@ async function createAzureFirewallWithAdditionalProperties() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithIpGroups.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithIpGroups.json */ async function createAzureFirewallWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -351,7 +351,7 @@ async function createAzureFirewallWithIPGroups() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithZones.json */ async function createAzureFirewallWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -462,7 +462,7 @@ async function createAzureFirewallWithZones() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithMgmtSubnet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithMgmtSubnet.json */ async function createAzureFirewallWithManagementSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -582,7 +582,7 @@ async function createAzureFirewallWithManagementSubnet() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutInHub.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutInHub.json */ async function createAzureFirewallInVirtualHub() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsDeleteSample.js index 9d56c5fd15a0..585f610e087c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified Azure Firewall. * * @summary Deletes the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallDelete.json */ async function deleteAzureFirewall() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsGetSample.js index 7f2c6e0a41e7..f9eac0851c83 100644 --- a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGet.json */ async function getAzureFirewall() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -32,7 +32,7 @@ async function getAzureFirewall() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithAdditionalProperties.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithAdditionalProperties.json */ async function getAzureFirewallWithAdditionalProperties() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -48,7 +48,7 @@ async function getAzureFirewallWithAdditionalProperties() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithIpGroups.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithIpGroups.json */ async function getAzureFirewallWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -64,7 +64,7 @@ async function getAzureFirewallWithIPGroups() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithZones.json */ async function getAzureFirewallWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -80,7 +80,7 @@ async function getAzureFirewallWithZones() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithMgmtSubnet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithMgmtSubnet.json */ async function getAzureFirewallWithManagementSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListAllSample.js index 17ee737b7a37..b5ae4825d5c2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the Azure Firewalls in a subscription. * * @summary Gets all the Azure Firewalls in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListBySubscription.json */ async function listAllAzureFirewallsForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListLearnedPrefixesSample.js b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListLearnedPrefixesSample.js index 8d1a69e621c8..c32f2726be76 100644 --- a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListLearnedPrefixesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListLearnedPrefixesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. * * @summary Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListLearnedIPPrefixes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListLearnedIPPrefixes.json */ async function azureFirewallListLearnedPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListSample.js b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListSample.js index f3a768316ff7..f99b31dc170f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Azure Firewalls in a resource group. * * @summary Lists all Azure Firewalls in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListByResourceGroup.json */ async function listAllAzureFirewallsForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsPacketCaptureSample.js b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsPacketCaptureSample.js index 505afc826c42..983f9c5f9346 100644 --- a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsPacketCaptureSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsPacketCaptureSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Runs a packet capture on AzureFirewall. * * @summary Runs a packet capture on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPacketCapture.json */ async function azureFirewallPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsUpdateTagsSample.js index bac24857fc1b..9e0e10ad8d6a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/azureFirewallsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/azureFirewallsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates tags of an Azure Firewall resource. * * @summary Updates tags of an Azure Firewall resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallUpdateTags.json */ async function updateAzureFirewallTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/bastionHostsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/bastionHostsCreateOrUpdateSample.js index 1e6cb2891266..1f391b31772f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/bastionHostsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/bastionHostsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified Bastion Host. * * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPut.json */ async function createBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -49,7 +49,38 @@ async function createBastionHost() { * This sample demonstrates how to Creates or updates the specified Bastion Host. * * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPutWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPutWithPrivateOnly.json + */ +async function createBastionHostWithPrivateOnly() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const bastionHostName = "bastionhosttenant"; + const parameters = { + enablePrivateOnlyBastion: true, + ipConfigurations: [ + { + name: "bastionHostIpConfiguration", + subnet: { + id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", + }, + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.beginCreateOrUpdateAndWait( + resourceGroupName, + bastionHostName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates the specified Bastion Host. + * + * @summary Creates or updates the specified Bastion Host. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPutWithZones.json */ async function createBastionHostWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -82,7 +113,7 @@ async function createBastionHostWithZones() { * This sample demonstrates how to Creates or updates the specified Bastion Host. * * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperPut.json */ async function createDeveloperBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -107,6 +138,7 @@ async function createDeveloperBastionHost() { async function main() { createBastionHost(); + createBastionHostWithPrivateOnly(); createBastionHostWithZones(); createDeveloperBastionHost(); } diff --git a/sdk/network/arm-network/samples/v33/javascript/bastionHostsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/bastionHostsDeleteSample.js index 7a01f1f7fe65..e8942c54cef9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/bastionHostsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/bastionHostsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified Bastion Host. * * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDelete.json */ async function deleteBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -32,7 +32,7 @@ async function deleteBastionHost() { * This sample demonstrates how to Deletes the specified Bastion Host. * * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperDelete.json */ async function deleteDeveloperBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/bastionHostsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/bastionHostsGetSample.js index f554042a277e..c35159be81b3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/bastionHostsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/bastionHostsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Bastion Host. * * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGet.json */ async function getBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -32,12 +32,28 @@ async function getBastionHost() { * This sample demonstrates how to Gets the specified Bastion Host. * * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGetWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithPrivateOnly.json + */ +async function getBastionHostWithPrivateOnly() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const bastionHostName = "bastionhosttenant"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); + console.log(result); +} + +/** + * This sample demonstrates how to Gets the specified Bastion Host. + * + * @summary Gets the specified Bastion Host. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithZones.json */ async function getBastionHostWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant'"; + const bastionHostName = "bastionhosttenant"; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.bastionHosts.get(resourceGroupName, bastionHostName); @@ -48,7 +64,7 @@ async function getBastionHostWithZones() { * This sample demonstrates how to Gets the specified Bastion Host. * * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperGet.json */ async function getDeveloperBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -62,6 +78,7 @@ async function getDeveloperBastionHost() { async function main() { getBastionHost(); + getBastionHostWithPrivateOnly(); getBastionHostWithZones(); getDeveloperBastionHost(); } diff --git a/sdk/network/arm-network/samples/v33/javascript/bastionHostsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/bastionHostsListByResourceGroupSample.js index f0a6ba0c6185..fda0cfd78f66 100644 --- a/sdk/network/arm-network/samples/v33/javascript/bastionHostsListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/bastionHostsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Bastion Hosts in a resource group. * * @summary Lists all Bastion Hosts in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListByResourceGroup.json */ async function listAllBastionHostsForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/bastionHostsListSample.js b/sdk/network/arm-network/samples/v33/javascript/bastionHostsListSample.js index 39c932a78991..b06b4a1fe67e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/bastionHostsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/bastionHostsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Bastion Hosts in a subscription. * * @summary Lists all Bastion Hosts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListBySubscription.json */ async function listAllBastionHostsForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/bastionHostsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/bastionHostsUpdateTagsSample.js index 28a0bd413780..ff6e1a52d5e0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/bastionHostsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/bastionHostsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates Tags for BastionHost resource * * @summary Updates Tags for BastionHost resource - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPatch.json */ async function patchBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/bgpServiceCommunitiesListSample.js b/sdk/network/arm-network/samples/v33/javascript/bgpServiceCommunitiesListSample.js index 0bea5e85ffe6..e4a1fb5c59b7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/bgpServiceCommunitiesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/bgpServiceCommunitiesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the available bgp service communities. * * @summary Gets all the available bgp service communities. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceCommunityList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceCommunityList.json */ async function serviceCommunityList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/checkDnsNameAvailabilitySample.js b/sdk/network/arm-network/samples/v33/javascript/checkDnsNameAvailabilitySample.js index 34e2d3380888..00130bd1f4a6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/checkDnsNameAvailabilitySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/checkDnsNameAvailabilitySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Checks whether a domain name in the cloudapp.azure.com zone is available for use. * * @summary Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckDnsNameAvailability.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckDnsNameAvailability.json */ async function checkDnsNameAvailability() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsCreateOrUpdateSample.js index fb4403a3d7d8..cb3d03a5f7a2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. * * @summary Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupPut.json */ async function configurationPolicyGroupPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsDeleteSample.js index cf42aec71067..60ac0da86ef6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a ConfigurationPolicyGroup. * * @summary Deletes a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupDelete.json */ async function configurationPolicyGroupDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsGetSample.js index 66a0fc37abd7..275c1e0f9207 100644 --- a/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a ConfigurationPolicyGroup. * * @summary Retrieves the details of a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupGet.json */ async function configurationPolicyGroupGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js b/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js index d47f9fe39a68..4c41c26f9ef3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/configurationPolicyGroupsListByVpnServerConfigurationSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. * * @summary Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json */ async function configurationPolicyGroupListByVpnServerConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsCreateOrUpdateSample.js index cf6d061d1a30..a633af193a7d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a connection monitor. * * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreate.json */ async function createConnectionMonitorV1() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -65,7 +65,7 @@ async function createConnectionMonitorV1() { * This sample demonstrates how to Create or update a connection monitor. * * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorV2Create.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorV2Create.json */ async function createConnectionMonitorV2() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -125,7 +125,7 @@ async function createConnectionMonitorV2() { * This sample demonstrates how to Create or update a connection monitor. * * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json */ async function createConnectionMonitorWithArcNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsDeleteSample.js index 8508b9fb7813..55e369c0b0be 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified connection monitor. * * @summary Deletes the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorDelete.json */ async function deleteConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsGetSample.js index 7aa1571537a0..038e37ce3a54 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a connection monitor by name. * * @summary Gets a connection monitor by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorGet.json */ async function getConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsListSample.js b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsListSample.js index 9c9bb93427e3..13a763626700 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all connection monitors for the specified Network Watcher. * * @summary Lists all connection monitors for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorList.json */ async function listConnectionMonitors() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsQuerySample.js b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsQuerySample.js index c51b22e6ee15..2071430f5fc4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsQuerySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsQuerySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Query a snapshot of the most recent connection states. * * @summary Query a snapshot of the most recent connection states. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorQuery.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorQuery.json */ async function queryConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsStartSample.js b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsStartSample.js index 4b66feb7fd14..e9a806da2247 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsStartSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsStartSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Starts the specified connection monitor. * * @summary Starts the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStart.json */ async function startConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsStopSample.js b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsStopSample.js index c9053533b092..7de33cb0ba17 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsStopSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsStopSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Stops the specified connection monitor. * * @summary Stops the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStop.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStop.json */ async function stopConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsUpdateTagsSample.js index 55c3590dbc47..58099303b989 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectionMonitorsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update tags of the specified connection monitor. * * @summary Update tags of the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json */ async function updateConnectionMonitorTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsCreateOrUpdateSample.js index 8f7bb70a1901..ff65aec8c810 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates/Updates a new network manager connectivity configuration * * @summary Creates/Updates a new network manager connectivity configuration - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationPut.json */ async function connectivityConfigurationsPut() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsDeleteSample.js index 08da950a1c9d..d15a038da81a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name * * @summary Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json */ async function connectivityConfigurationsDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsGetSample.js index 8dcd43e853f9..01bae911d800 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name * * @summary Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationGet.json */ async function connectivityConfigurationsGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsListSample.js index e57574b1c333..87fc15a3f419 100644 --- a/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/connectivityConfigurationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the network manager connectivity configuration in a specified network manager. * * @summary Lists all the network manager connectivity configuration in a specified network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationList.json */ async function connectivityConfigurationsList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesCreateOrUpdateSample.js index 48c06cb36252..95982dba5f61 100644 --- a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a custom IP prefix. * * @summary Creates or updates a custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixCreateCustomizedValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixCreateCustomizedValues.json */ async function createCustomIPPrefixAllocationMethod() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesDeleteSample.js index 3a6e182e0245..ee457b802513 100644 --- a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified custom IP prefix. * * @summary Deletes the specified custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixDelete.json */ async function deleteCustomIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesGetSample.js index fd586181e59a..082b2a180848 100644 --- a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified custom IP prefix in a specified resource group. * * @summary Gets the specified custom IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixGet.json */ async function getCustomIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesListAllSample.js index c4c9279e74dc..55966b10b07f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the custom IP prefixes in a subscription. * * @summary Gets all the custom IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixListAll.json */ async function listAllCustomIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesListSample.js b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesListSample.js index bb9a434a17f0..e6843d2905bc 100644 --- a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all custom IP prefixes in a resource group. * * @summary Gets all custom IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixList.json */ async function listResourceGroupCustomIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesUpdateTagsSample.js index c2927617047f..333ca3194070 100644 --- a/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/customIPPrefixesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates custom IP prefix tags. * * @summary Updates custom IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixUpdateTags.json */ async function updatePublicIPAddressTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesCreateOrUpdateSample.js index f2c66e92b71d..8bcb1287e420 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a DDoS custom policy. * * @summary Creates or updates a DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyCreate.json */ async function createDDoSCustomPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesDeleteSample.js index d007c0153108..5b0a73fc41af 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified DDoS custom policy. * * @summary Deletes the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyDelete.json */ async function deleteDDoSCustomPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesGetSample.js index 8f740336d24b..2c3bd471a819 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about the specified DDoS custom policy. * * @summary Gets information about the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyGet.json */ async function getDDoSCustomPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesUpdateTagsSample.js index 568f5a49c197..e877d530ac3c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosCustomPoliciesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update a DDoS custom policy tags. * * @summary Update a DDoS custom policy tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyUpdateTags.json */ async function dDoSCustomPolicyUpdateTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansCreateOrUpdateSample.js index 90fbf98c078c..75b4adf58f2c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a DDoS protection plan. * * @summary Creates or updates a DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanCreate.json */ async function createDDoSProtectionPlan() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansDeleteSample.js index 431cda7b2074..28cb3e11d5be 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified DDoS protection plan. * * @summary Deletes the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanDelete.json */ async function deleteDDoSProtectionPlan() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansGetSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansGetSample.js index 906ea4565124..4e84bb98dbcc 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about the specified DDoS protection plan. * * @summary Gets information about the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanGet.json */ async function getDDoSProtectionPlan() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansListByResourceGroupSample.js index 1f2de0b35026..262a209e4857 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the DDoS protection plans in a resource group. * * @summary Gets all the DDoS protection plans in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanList.json */ async function listDDoSProtectionPlansInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansListSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansListSample.js index c6ab3b17546d..e52f7a7bf1bd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all DDoS protection plans in a subscription. * * @summary Gets all DDoS protection plans in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanListAll.json */ async function listAllDDoSProtectionPlans() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansUpdateTagsSample.js index 104c9e0017ff..d15b7e618de9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ddosProtectionPlansUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update a DDoS protection plan tags. * * @summary Update a DDoS protection plan tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanUpdateTags.json */ async function dDoSProtectionPlanUpdateTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/defaultSecurityRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/defaultSecurityRulesGetSample.js index b39101c666c4..97ab6b2ee290 100644 --- a/sdk/network/arm-network/samples/v33/javascript/defaultSecurityRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/defaultSecurityRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified default network security rule. * * @summary Get the specified default network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleGet.json */ async function defaultSecurityRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/defaultSecurityRulesListSample.js b/sdk/network/arm-network/samples/v33/javascript/defaultSecurityRulesListSample.js index d0e62d9df296..01b8642c4fc6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/defaultSecurityRulesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/defaultSecurityRulesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all default security rules in a network security group. * * @summary Gets all default security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleList.json */ async function defaultSecurityRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/deleteBastionShareableLinkByTokenSample.js b/sdk/network/arm-network/samples/v33/javascript/deleteBastionShareableLinkByTokenSample.js index 5b0f1dbf7a14..32555cd2bf21 100644 --- a/sdk/network/arm-network/samples/v33/javascript/deleteBastionShareableLinkByTokenSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/deleteBastionShareableLinkByTokenSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the Bastion Shareable Links for all the tokens specified in the request. * * @summary Deletes the Bastion Shareable Links for all the tokens specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDeleteByToken.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDeleteByToken.json */ async function deleteBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/deleteBastionShareableLinkSample.js b/sdk/network/arm-network/samples/v33/javascript/deleteBastionShareableLinkSample.js index 1fbf991ce18b..c2721d391408 100644 --- a/sdk/network/arm-network/samples/v33/javascript/deleteBastionShareableLinkSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/deleteBastionShareableLinkSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the Bastion Shareable Links for all the VMs specified in the request. * * @summary Deletes the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDelete.json */ async function deleteBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/disconnectActiveSessionsSample.js b/sdk/network/arm-network/samples/v33/javascript/disconnectActiveSessionsSample.js index 04b91fb722c1..8410b2e7b315 100644 --- a/sdk/network/arm-network/samples/v33/javascript/disconnectActiveSessionsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/disconnectActiveSessionsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. * * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionDelete.json */ async function deletesTheSpecifiedActiveSession() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationCreateOrUpdateSample.js index c05d48e31002..931e87afe117 100644 --- a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a DSCP Configuration. * * @summary Creates or updates a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationCreate.json */ async function createDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationDeleteSample.js index 4fd54f8d01de..fe72bdb7c2ce 100644 --- a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a DSCP Configuration. * * @summary Deletes a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationDelete.json */ async function deleteDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationGetSample.js b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationGetSample.js index 33691a7814ba..5a67c8b76984 100644 --- a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a DSCP Configuration. * * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationGet.json */ async function getDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationListAllSample.js index e66e5871939e..7434133beeac 100644 --- a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all dscp configurations in a subscription. * * @summary Gets all dscp configurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationListAll.json */ async function listAllNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationListSample.js b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationListSample.js index a004b93a5fdd..b2d398fa765d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/dscpConfigurationListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a DSCP Configuration. * * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationList.json */ async function getDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js index 599ec460de4d..b5cd410be12c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an authorization in the specified express route circuit. * * @summary Creates or updates an authorization in the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json */ async function createExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsDeleteSample.js index 7871c75ddde4..a1c0691b6778 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified authorization from the specified express route circuit. * * @summary Deletes the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json */ async function deleteExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsGetSample.js index 3a83cb07c10e..dea45a603ddd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified authorization from the specified express route circuit. * * @summary Gets the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationGet.json */ async function getExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsListSample.js index 1e8d9bac238b..a093dde7531a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitAuthorizationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all authorizations in an express route circuit. * * @summary Gets all authorizations in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationList.json */ async function listExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js index 2467ae38fa09..2fc63185dbd0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a Express Route Circuit Connection in the specified express route circuits. * * @summary Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionCreate.json */ async function expressRouteCircuitConnectionCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsDeleteSample.js index 5916be8b50b4..292abf63673e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified Express Route Circuit Connection from the specified express route circuit. * * @summary Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionDelete.json */ async function deleteExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsGetSample.js index 541398c8e627..1c32ee18900d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Express Route Circuit Connection from the specified express route circuit. * * @summary Gets the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionGet.json */ async function expressRouteCircuitConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsListSample.js index 4bf1a488037e..c9cd0fd566fe 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all global reach connections associated with a private peering in an express route circuit. * * @summary Gets all global reach connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionList.json */ async function listExpressRouteCircuitConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js index 4fb743d97d9f..eb555e8a5eeb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a peering in the specified express route circuits. * * @summary Creates or updates a peering in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringCreate.json */ async function createExpressRouteCircuitPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsDeleteSample.js index a483e8ffb11f..1b68d13a0d1b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified peering from the specified express route circuit. * * @summary Deletes the specified peering from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringDelete.json */ async function deleteExpressRouteCircuitPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsGetSample.js index 7ef7192fffdd..ec0242d35d4e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified peering for the express route circuit. * * @summary Gets the specified peering for the express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringGet.json */ async function getExpressRouteCircuitPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsListSample.js index f3b7c0084927..d727f075a705 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitPeeringsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all peerings in a specified express route circuit. * * @summary Gets all peerings in a specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringList.json */ async function listExpressRouteCircuitPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsCreateOrUpdateSample.js index 0740fb8f28d3..678443a8bb0f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an express route circuit. * * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreate.json */ async function createExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -52,7 +52,7 @@ async function createExpressRouteCircuit() { * This sample demonstrates how to Creates or updates an express route circuit. * * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json */ async function createExpressRouteCircuitOnExpressRoutePort() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsDeleteSample.js index 985c02448d09..e485982acedd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified express route circuit. * * @summary Deletes the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitDelete.json */ async function deleteExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetPeeringStatsSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetPeeringStatsSample.js index 4b2131dfb04a..f1fc7f6619e9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetPeeringStatsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetPeeringStatsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all stats from an express route circuit in a resource group. * * @summary Gets all stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringStats.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringStats.json */ async function getExpressRouteCircuitPeeringTrafficStats() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetSample.js index 8f6151ae2976..0afcb4533c8c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about the specified express route circuit. * * @summary Gets information about the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitGet.json */ async function getExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetStatsSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetStatsSample.js index 06f36f79c18e..9e9d1d9dd1ec 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetStatsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsGetStatsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the stats from an express route circuit in a resource group. * * @summary Gets all the stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitStats.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitStats.json */ async function getExpressRouteCircuitTrafficStats() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListAllSample.js index a589776d00ec..d3e0261fec1a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the express route circuits in a subscription. * * @summary Gets all the express route circuits in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListBySubscription.json */ async function listExpressRouteCircuitsInASubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListArpTableSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListArpTableSample.js index de476592f284..38429e595dff 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListArpTableSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListArpTableSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route circuit in a resource group. * * @summary Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitARPTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitARPTableList.json */ async function listArpTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListRoutesTableSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListRoutesTableSample.js index 933393fe7ca1..aa0291e7794e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListRoutesTableSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListRoutesTableSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the currently advertised routes table associated with the express route circuit in a resource group. * * @summary Gets the currently advertised routes table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableList.json */ async function listRouteTables() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListRoutesTableSummarySample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListRoutesTableSummarySample.js index 882571a97f37..d4fa76119a3d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListRoutesTableSummarySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListRoutesTableSummarySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the currently advertised routes table summary associated with the express route circuit in a resource group. * * @summary Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json */ async function listRouteTableSummary() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListSample.js index 160619d0f924..67b4d5e5dc3d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the express route circuits in a resource group. * * @summary Gets all the express route circuits in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListByResourceGroup.json */ async function listExpressRouteCircuitsInAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsUpdateTagsSample.js index f9b09c22a7c1..3c1d6ce089fa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCircuitsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates an express route circuit tags. * * @summary Updates an express route circuit tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitUpdateTags.json */ async function updateExpressRouteCircuitTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsCreateOrUpdateSample.js index 3b2e8cc67a47..092eab787d39 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. * * @summary Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionCreate.json */ async function expressRouteConnectionCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsDeleteSample.js index 7d4b05becb04..8c6559903353 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a connection to a ExpressRoute circuit. * * @summary Deletes a connection to a ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionDelete.json */ async function expressRouteConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsGetSample.js index 23215d791502..62541d663c23 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified ExpressRouteConnection. * * @summary Gets the specified ExpressRouteConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionGet.json */ async function expressRouteConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsListSample.js index d9ef10dbc332..a4d881d334ed 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists ExpressRouteConnections. * * @summary Lists ExpressRouteConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionList.json */ async function expressRouteConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js index 4b1c6e1a2a69..0dbea0fadae5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a peering in the specified ExpressRouteCrossConnection. * * @summary Creates or updates a peering in the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json */ async function expressRouteCrossConnectionBgpPeeringCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js index d55ea1a2b626..f92b6f7ea73f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified peering from the ExpressRouteCrossConnection. * * @summary Deletes the specified peering from the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json */ async function deleteExpressRouteCrossConnectionBgpPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsGetSample.js index e54de70852a0..0995d1b912b4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified peering for the ExpressRouteCrossConnection. * * @summary Gets the specified peering for the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json */ async function getExpressRouteCrossConnectionBgpPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsListSample.js index 09abab240ebc..ea9a48c97031 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionPeeringsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all peerings in a specified ExpressRouteCrossConnection. * * @summary Gets all peerings in a specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json */ async function expressRouteCrossConnectionBgpPeeringList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js index 757d838cbc83..32da1a2467c9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update the specified ExpressRouteCrossConnection. * * @summary Update the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdate.json */ async function updateExpressRouteCrossConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsGetSample.js index 82a2afec4cfd..0ed7bb08e3f6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets details about the specified ExpressRouteCrossConnection. * * @summary Gets details about the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionGet.json */ async function getExpressRouteCrossConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListArpTableSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListArpTableSample.js index 5c410927d510..3292a237c43b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListArpTableSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListArpTableSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route cross connection in a resource group. * * @summary Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsArpTable.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsArpTable.json */ async function getExpressRouteCrossConnectionsArpTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js index ce2c850afba8..f037271347f0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a resource group. * * @summary Retrieves all the ExpressRouteCrossConnections in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json */ async function expressRouteCrossConnectionListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListRoutesTableSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListRoutesTableSample.js index 63b0391723d3..049a6f21cb4b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListRoutesTableSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListRoutesTableSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the currently advertised routes table associated with the express route cross connection in a resource group. * * @summary Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json */ async function getExpressRouteCrossConnectionsRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js index 504713d8bc91..343ef654a75d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListRoutesTableSummarySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the route table summary associated with the express route cross connection in a resource group. * * @summary Gets the route table summary associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json */ async function getExpressRouteCrossConnectionsRouteTableSummary() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListSample.js index af4591388f5f..f710fb5fc916 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a subscription. * * @summary Retrieves all the ExpressRouteCrossConnections in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionList.json */ async function expressRouteCrossConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsUpdateTagsSample.js index c7375121f93f..a68bfa12536d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteCrossConnectionsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates an express route cross connection tags. * * @summary Updates an express route cross connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json */ async function updateExpressRouteCrossConnectionTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysCreateOrUpdateSample.js index add723231a97..ced0f0619e82 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a ExpressRoute gateway in a specified resource group. * * @summary Creates or updates a ExpressRoute gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayCreate.json */ async function expressRouteGatewayCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysDeleteSample.js index f9887f422f71..f34fd5413d9f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. * * @summary Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayDelete.json */ async function expressRouteGatewayDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysGetSample.js index 90ac18565df2..489346f2f54c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Fetches the details of a ExpressRoute gateway in a resource group. * * @summary Fetches the details of a ExpressRoute gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayGet.json */ async function expressRouteGatewayGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysListByResourceGroupSample.js index 029d51d7bc57..cf8d96b2a791 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists ExpressRoute gateways in a given resource group. * * @summary Lists ExpressRoute gateways in a given resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListByResourceGroup.json */ async function expressRouteGatewayListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysListBySubscriptionSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysListBySubscriptionSample.js index a807e4a43b5c..2c7c23b5bbba 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysListBySubscriptionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysListBySubscriptionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists ExpressRoute gateways under a given subscription. * * @summary Lists ExpressRoute gateways under a given subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListBySubscription.json */ async function expressRouteGatewayListBySubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysUpdateTagsSample.js index 72df1a7b3ee2..b454fa60e63f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteGatewaysUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates express route gateway tags. * * @summary Updates express route gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayUpdateTags.json */ async function expressRouteGatewayUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteLinksGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteLinksGetSample.js index 8493caf6a9f7..e2b8d331913e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteLinksGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteLinksGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the specified ExpressRouteLink resource. * * @summary Retrieves the specified ExpressRouteLink resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkGet.json */ async function expressRouteLinkGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteLinksListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteLinksListSample.js index c07760aa7ad8..c909bb0c6fbf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteLinksListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteLinksListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. * * @summary Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkList.json */ async function expressRouteLinkGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js index ad0cc1624764..24017fea432c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an authorization in the specified express route port. * * @summary Creates or updates an authorization in the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationCreate.json */ async function createExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsDeleteSample.js index 1b49087a29c7..7b38dad01e45 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified authorization from the specified express route port. * * @summary Deletes the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationDelete.json */ async function deleteExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsGetSample.js index 0a99d49e308f..bbc065713ccb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified authorization from the specified express route port. * * @summary Gets the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationGet.json */ async function getExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsListSample.js index f4218ddb2ca4..f0d59c4b62f0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortAuthorizationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all authorizations in an express route port. * * @summary Gets all authorizations in an express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationList.json */ async function listExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsCreateOrUpdateSample.js index f7cecfc22c75..9725ca0a7319 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. * * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortCreate.json */ async function expressRoutePortCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -43,7 +43,7 @@ async function expressRoutePortCreate() { * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. * * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateLink.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateLink.json */ async function expressRoutePortUpdateLink() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsDeleteSample.js index 529443c6f07f..ca2a5dc45309 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified ExpressRoutePort resource. * * @summary Deletes the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortDelete.json */ async function expressRoutePortDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsGenerateLoaSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsGenerateLoaSample.js index 665709a68c45..2aa64f29a7d4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsGenerateLoaSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsGenerateLoaSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Generate a letter of authorization for the requested ExpressRoutePort resource. * * @summary Generate a letter of authorization for the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateExpressRoutePortsLOA.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateExpressRoutePortsLOA.json */ async function generateExpressRoutePortLoa() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsGetSample.js index bf2615d2dec5..8f579c8d3cf9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the requested ExpressRoutePort resource. * * @summary Retrieves the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortGet.json */ async function expressRoutePortGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsListByResourceGroupSample.js index 61f6e8ff591e..741e0d2a1a97 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all the ExpressRoutePort resources in the specified resource group. * * @summary List all the ExpressRoutePort resources in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortListByResourceGroup.json */ async function expressRoutePortListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsListSample.js index c5f7ca745376..c345c24052de 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all the ExpressRoutePort resources in the specified subscription. * * @summary List all the ExpressRoutePort resources in the specified subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortList.json */ async function expressRoutePortList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsLocationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsLocationsGetSample.js index 184a816c4b24..b810acdd55c5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsLocationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsLocationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. * * @summary Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationGet.json */ async function expressRoutePortsLocationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsLocationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsLocationsListSample.js index 1a5b988c368a..2af5e123d974 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsLocationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsLocationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. * * @summary Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationList.json */ async function expressRoutePortsLocationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsUpdateTagsSample.js index 1e7680c6b881..21896cb571e6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRoutePortsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update ExpressRoutePort tags. * * @summary Update ExpressRoutePort tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateTags.json */ async function expressRoutePortUpdateTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteProviderPortSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteProviderPortSample.js index b8637cd72032..4c4ebf78e521 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteProviderPortSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteProviderPortSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves detail of a provider port. * * @summary Retrieves detail of a provider port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPort.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPort.json */ async function expressRouteProviderPort() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteProviderPortsLocationListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteProviderPortsLocationListSample.js index 3dd988839ca3..b17421c3fd61 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteProviderPortsLocationListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteProviderPortsLocationListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves all the ExpressRouteProviderPorts in a subscription. * * @summary Retrieves all the ExpressRouteProviderPorts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPortList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPortList.json */ async function expressRouteProviderPortList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/expressRouteServiceProvidersListSample.js b/sdk/network/arm-network/samples/v33/javascript/expressRouteServiceProvidersListSample.js index 737b416e6d58..ee541c6e572e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/expressRouteServiceProvidersListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/expressRouteServiceProvidersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the available express route service providers. * * @summary Gets all the available express route service providers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteProviderList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteProviderList.json */ async function listExpressRouteProviders() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesCreateOrUpdateSample.js index 445fdf272ee2..7995e888f5f4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified Firewall Policy. * * @summary Creates or updates the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPut.json */ async function createFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesDeleteSample.js index 697ff3159876..4403eff40b09 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified Firewall Policy. * * @summary Deletes the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDelete.json */ async function deleteFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesGetSample.js index 25a5513ea7e2..28d4af66bcb7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Firewall Policy. * * @summary Gets the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyGet.json */ async function getFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesListAllSample.js index 9094acd4146e..ea3e70fff3b5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the Firewall Policies in a subscription. * * @summary Gets all the Firewall Policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListBySubscription.json */ async function listAllFirewallPoliciesForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesListSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesListSample.js index 9a041abf0e20..da2bd902d278 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Firewall Policies in a resource group. * * @summary Lists all Firewall Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListByResourceGroup.json */ async function listAllFirewallPoliciesForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesUpdateTagsSample.js index 9a53279fdd89..cbc1d57aff71 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPoliciesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates tags of a Azure Firewall Policy resource. * * @summary Updates tags of a Azure Firewall Policy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPatch.json */ async function updateFirewallPolicyTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDeploymentsDeploySample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDeploymentsDeploySample.js index d9677824bfa7..9cb53883ee6b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDeploymentsDeploySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDeploymentsDeploySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deploys the firewall policy draft and child rule collection group drafts. * * @summary Deploys the firewall policy draft and child rule collection group drafts. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDeploy.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDeploy.json */ async function deployFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsCreateOrUpdateSample.js index cbb9fa0b504d..add72d19a7a7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a draft Firewall Policy. * * @summary Create or update a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftPut.json */ async function createOrUpdateFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsDeleteSample.js index 399892dca875..a37356d4becf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a draft policy. * * @summary Delete a draft policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDelete.json */ async function deleteFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsGetSample.js index ef4004cab2c9..e863ae6c9485 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyDraftsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a draft Firewall Policy. * * @summary Get a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftGet.json */ async function getFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js index bda00301f4bc..60be9622b71f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesFilterValuesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the current filter values for the signatures overrides * * @summary Retrieves the current filter values for the signatures overrides - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json */ async function querySignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesListSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesListSample.js index 2c9485722d0e..b2df6579ec4f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. * * @summary Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverrides.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverrides.json */ async function querySignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js index 0318722a5e83..2a2d8dffd5be 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all signatures overrides for a specific policy. * * @summary Returns all signatures overrides for a specific policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesGet.json */ async function getSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js index 5571187fd9cc..8a02e35d4d72 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all signatures overrides objects for a specific policy as a list containing a single value. * * @summary Returns all signatures overrides objects for a specific policy as a list containing a single value. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesList.json */ async function getSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js index e13d4ccdf150..545897db117a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesPatchSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Will update the status of policy's signature overrides for IDPS * * @summary Will update the status of policy's signature overrides for IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPatch.json */ async function patchSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js index 786e2cab3bcb..e8030be578bd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyIdpsSignaturesOverridesPutSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Will override/create a new signature overrides for the policy's IDPS * * @summary Will override/create a new signature overrides for the policy's IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPut.json */ async function putSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js index 62be7fb2b1c2..de129e75b1d5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or Update Rule Collection Group Draft. * * @summary Create or Update Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json */ async function createOrUpdateRuleCollectionGroupDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js index 24cddc5953fd..62831ceb1c92 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete Rule Collection Group Draft. * * @summary Delete Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json */ async function deleteFirewallRuleCollectionGroupDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js index 61c8796f409c..fe55ba38a3fe 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupDraftsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get Rule Collection Group Draft. * * @summary Get Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json */ async function getRuleCollectionGroupDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js index 84274d4ae21c..7c2d86f4b707 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json */ async function createFirewallPolicyNatRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -62,7 +62,7 @@ async function createFirewallPolicyNatRuleCollectionGroup() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupPut.json */ async function createFirewallPolicyRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -105,7 +105,7 @@ async function createFirewallPolicyRuleCollectionGroup() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json */ async function createFirewallPolicyRuleCollectionGroupWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -151,7 +151,7 @@ async function createFirewallPolicyRuleCollectionGroupWithIPGroups() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json */ async function createFirewallPolicyRuleCollectionGroupWithWebCategories() { const subscriptionId = @@ -194,7 +194,7 @@ async function createFirewallPolicyRuleCollectionGroupWithWebCategories() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json */ async function createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js index 7745a844e06e..fe0316f3404e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified FirewallPolicyRuleCollectionGroup. * * @summary Deletes the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json */ async function deleteFirewallPolicyRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsGetSample.js index cf87af26f949..4dfc51a8fbf0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json */ async function getFirewallPolicyNatRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getFirewallPolicyNatRuleCollectionGroup() { * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupGet.json */ async function getFirewallPolicyRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -58,7 +58,7 @@ async function getFirewallPolicyRuleCollectionGroup() { * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json */ async function getFirewallPolicyRuleCollectionGroupWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -79,7 +79,7 @@ async function getFirewallPolicyRuleCollectionGroupWithIPGroups() { * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json */ async function getFirewallPolicyRuleCollectionGroupWithWebCategories() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsListSample.js b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsListSample.js index e7c0643a80f9..28bee4bb0df9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/firewallPolicyRuleCollectionGroupsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json */ async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories() { const subscriptionId = @@ -39,7 +39,7 @@ async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories() { * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupList.json */ async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -61,7 +61,7 @@ async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy( * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json */ async function listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/flowLogsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/flowLogsCreateOrUpdateSample.js index fe0b0f9e598c..bb4c78aa5458 100644 --- a/sdk/network/arm-network/samples/v33/javascript/flowLogsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/flowLogsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a flow log for the specified network security group. * * @summary Create or update a flow log for the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogCreate.json */ async function createOrUpdateFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/flowLogsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/flowLogsDeleteSample.js index 15be122587e8..00c8827afbe2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/flowLogsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/flowLogsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified flow log resource. * * @summary Deletes the specified flow log resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogDelete.json */ async function deleteFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/flowLogsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/flowLogsGetSample.js index 6ee342f28e9a..d3ef296b2f98 100644 --- a/sdk/network/arm-network/samples/v33/javascript/flowLogsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/flowLogsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a flow log resource by name. * * @summary Gets a flow log resource by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogGet.json */ async function getFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/flowLogsListSample.js b/sdk/network/arm-network/samples/v33/javascript/flowLogsListSample.js index 64aaafd998c9..25e41716e574 100644 --- a/sdk/network/arm-network/samples/v33/javascript/flowLogsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/flowLogsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all flow log resources for the specified Network Watcher. * * @summary Lists all flow log resources for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogList.json */ async function listConnectionMonitors() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/flowLogsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/flowLogsUpdateTagsSample.js index 4576bf6fc1e1..e593a2a000d1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/flowLogsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/flowLogsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update tags of the specified flow log. * * @summary Update tags of the specified flow log. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogUpdateTags.json */ async function updateFlowLogTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js b/sdk/network/arm-network/samples/v33/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js index 809751b89da0..1ea7978584ad 100644 --- a/sdk/network/arm-network/samples/v33/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/generatevirtualwanvpnserverconfigurationvpnprofileSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. * * @summary Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json */ async function generateVirtualWanVpnServerConfigurationVpnProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/getActiveSessionsSample.js b/sdk/network/arm-network/samples/v33/javascript/getActiveSessionsSample.js index 5def6e163477..5ba5784ac49e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/getActiveSessionsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/getActiveSessionsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. * * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionsList.json */ async function returnsAListOfCurrentlyActiveSessionsOnTheBastion() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/getBastionShareableLinkSample.js b/sdk/network/arm-network/samples/v33/javascript/getBastionShareableLinkSample.js index e7be2f7b0c33..62371960d93e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/getBastionShareableLinkSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/getBastionShareableLinkSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Return the Bastion Shareable Links for all the VMs specified in the request. * * @summary Return the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkGet.json */ async function returnsTheBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesCreateOrUpdateSample.js index 3cf56ba9149b..8c3c5da0d797 100644 --- a/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. * * @summary Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTablePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTablePut.json */ async function routeTablePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesDeleteSample.js index 50218fc27891..349ded09ea87 100644 --- a/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a RouteTable. * * @summary Deletes a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableDelete.json */ async function routeTableDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesGetSample.js index f8701d8c6770..3d6728f266b4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a RouteTable. * * @summary Retrieves the details of a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableGet.json */ async function routeTableGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesListSample.js b/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesListSample.js index d99710f61c1f..bf352fbcf6cb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/hubRouteTablesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of all RouteTables. * * @summary Retrieves the details of all RouteTables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableList.json */ async function routeTableList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js index 1718c032a789..b23973673564 100644 --- a/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a hub virtual network connection if it doesn't exist else updates the existing one. * * @summary Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionPut.json */ async function hubVirtualNetworkConnectionPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsDeleteSample.js index 89c7ef91cf48..d75e6bc58895 100644 --- a/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a HubVirtualNetworkConnection. * * @summary Deletes a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionDelete.json */ async function hubVirtualNetworkConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsGetSample.js index a845187a179d..a9dbb038d6ea 100644 --- a/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a HubVirtualNetworkConnection. * * @summary Retrieves the details of a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionGet.json */ async function hubVirtualNetworkConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsListSample.js index 1216be5f2dcd..bd2a27490c57 100644 --- a/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/hubVirtualNetworkConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of all HubVirtualNetworkConnections. * * @summary Retrieves the details of all HubVirtualNetworkConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionList.json */ async function hubVirtualNetworkConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesCreateOrUpdateSample.js index dccbcefdaba9..90a891ddb4c6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a load balancer inbound NAT rule. * * @summary Creates or updates a load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleCreate.json */ async function inboundNatRuleCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesDeleteSample.js index ca0a2c29104a..60c6cb2b1a6f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified load balancer inbound NAT rule. * * @summary Deletes the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleDelete.json */ async function inboundNatRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesGetSample.js index f724a7f6b9b9..ebd3a8a9e7bf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified load balancer inbound NAT rule. * * @summary Gets the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleGet.json */ async function inboundNatRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesListSample.js b/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesListSample.js index d25fc4f3c764..c07a1c447164 100644 --- a/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/inboundNatRulesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the inbound NAT rules in a load balancer. * * @summary Gets all the inbound NAT rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleList.json */ async function inboundNatRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/inboundSecurityRuleCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/inboundSecurityRuleCreateOrUpdateSample.js index d914a965d51e..ab44e957514c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/inboundSecurityRuleCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/inboundSecurityRuleCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Inbound Security Rules. * * @summary Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRulePut.json */ async function createNetworkVirtualApplianceInboundSecurityRules() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/inboundSecurityRuleGetSample.js b/sdk/network/arm-network/samples/v33/javascript/inboundSecurityRuleGetSample.js index d2b2fe50608e..f42c6c403d67 100644 --- a/sdk/network/arm-network/samples/v33/javascript/inboundSecurityRuleGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/inboundSecurityRuleGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. * * @summary Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRuleGet.json */ async function createNetworkVirtualApplianceInboundSecurityRules() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsCreateOrUpdateSample.js index a6fbc8247573..3cd04a9bfa65 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an IpAllocation in the specified resource group. * * @summary Creates or updates an IpAllocation in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationCreate.json */ async function createIPAllocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsDeleteSample.js index 4bbea4497938..5bd132cf427a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified IpAllocation. * * @summary Deletes the specified IpAllocation. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationDelete.json */ async function deleteIPAllocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsGetSample.js index 05f90d78b042..a1d4baa69b97 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified IpAllocation by resource group. * * @summary Gets the specified IpAllocation by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationGet.json */ async function getIPAllocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsListByResourceGroupSample.js index 845a82960b30..3438fc172749 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all IpAllocations in a resource group. * * @summary Gets all IpAllocations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationListByResourceGroup.json */ async function listIPAllocationsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsListSample.js index 65131adf7099..fef009b80125 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all IpAllocations in a subscription. * * @summary Gets all IpAllocations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationList.json */ async function listAllIPAllocations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsUpdateTagsSample.js index f9962377c54a..7fa20210b425 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipAllocationsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipAllocationsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a IpAllocation tags. * * @summary Updates a IpAllocation tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationUpdateTags.json */ async function updateVirtualNetworkTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/ipGroupsCreateOrUpdateSample.js index 9681baa92dbb..7d50dbcb601b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipGroupsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipGroupsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an ipGroups in a specified resource group. * * @summary Creates or updates an ipGroups in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsCreate.json */ async function createOrUpdateIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipGroupsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/ipGroupsDeleteSample.js index 2336901b6536..4e1bd9fb90e2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipGroupsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipGroupsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified ipGroups. * * @summary Deletes the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsDelete.json */ async function deleteIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipGroupsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/ipGroupsGetSample.js index d51fa695e250..72444294e3f9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipGroupsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipGroupsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified ipGroups. * * @summary Gets the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsGet.json */ async function getIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipGroupsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/ipGroupsListByResourceGroupSample.js index d293287ea84d..c157ebb90a1e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipGroupsListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipGroupsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all IpGroups in a resource group. * * @summary Gets all IpGroups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListByResourceGroup.json */ async function listByResourceGroupIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipGroupsListSample.js b/sdk/network/arm-network/samples/v33/javascript/ipGroupsListSample.js index 7d5da820d18a..0ab27cc244c5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipGroupsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipGroupsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all IpGroups in a subscription. * * @summary Gets all IpGroups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListBySubscription.json */ async function listIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipGroupsUpdateGroupsSample.js b/sdk/network/arm-network/samples/v33/javascript/ipGroupsUpdateGroupsSample.js index ec44ab24e079..52464e8bd583 100644 --- a/sdk/network/arm-network/samples/v33/javascript/ipGroupsUpdateGroupsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/ipGroupsUpdateGroupsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates tags of an IpGroups resource. * * @summary Updates tags of an IpGroups resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsUpdateTags.json */ async function updateIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/ipamPoolsCreateSample.js b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsCreateSample.js new file mode 100644 index 000000000000..cde75ddd9b12 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsCreateSample.js @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates/Updates the Pool resource. + * + * @summary Creates/Updates the Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Create.json + */ +async function ipamPoolsCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const body = { + location: "eastus", + properties: { + description: "Test description.", + addressPrefixes: ["10.0.0.0/24"], + parentPoolName: "", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.beginCreateAndWait( + resourceGroupName, + networkManagerName, + poolName, + body, + ); + console.log(result); +} + +async function main() { + ipamPoolsCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/ipamPoolsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsDeleteSample.js new file mode 100644 index 000000000000..49e8cfe915b9 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsDeleteSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Delete the Pool resource. + * + * @summary Delete the Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Delete.json + */ +async function ipamPoolsDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetPoolUsageSample.js b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetPoolUsageSample.js new file mode 100644 index 000000000000..04099e166fd7 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetPoolUsageSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get the Pool Usage. + * + * @summary Get the Pool Usage. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_GetPoolUsage.json + */ +async function ipamPoolsGetPoolUsage() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.getPoolUsage( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsGetPoolUsage(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetSample.js new file mode 100644 index 000000000000..30766d4258a3 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsGetSample.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the specific Pool resource. + * + * @summary Gets the specific Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Get.json + */ +async function ipamPoolsGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.get(resourceGroupName, networkManagerName, poolName); + console.log(result); +} + +async function main() { + ipamPoolsGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/ipamPoolsListAssociatedResourcesSample.js b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsListAssociatedResourcesSample.js new file mode 100644 index 000000000000..a3f87e1e1520 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsListAssociatedResourcesSample.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List Associated Resource in the Pool. + * + * @summary List Associated Resource in the Pool. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_ListAssociatedResources.json + */ +async function ipamPoolsListAssociatedResources() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipamPools.listAssociatedResources( + resourceGroupName, + networkManagerName, + poolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipamPoolsListAssociatedResources(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/ipamPoolsListSample.js b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsListSample.js new file mode 100644 index 000000000000..da19d873d04d --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets list of Pool resources at Network Manager level. + * + * @summary Gets list of Pool resources at Network Manager level. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_List.json + */ +async function ipamPoolsList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipamPools.list(resourceGroupName, networkManagerName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipamPoolsList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/ipamPoolsUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsUpdateSample.js new file mode 100644 index 000000000000..bd38d91404cb --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/ipamPoolsUpdateSample.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Updates the specific Pool resource. + * + * @summary Updates the specific Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Update.json + */ +async function ipamPoolsUpdate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.update(resourceGroupName, networkManagerName, poolName); + console.log(result); +} + +async function main() { + ipamPoolsUpdate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/listActiveConnectivityConfigurationsSample.js b/sdk/network/arm-network/samples/v33/javascript/listActiveConnectivityConfigurationsSample.js index 26dc012acce3..d12683f014a1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/listActiveConnectivityConfigurationsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/listActiveConnectivityConfigurationsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists active connectivity configurations in a network manager. * * @summary Lists active connectivity configurations in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json */ async function listActiveConnectivityConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/listActiveSecurityAdminRulesSample.js b/sdk/network/arm-network/samples/v33/javascript/listActiveSecurityAdminRulesSample.js index 850b9ebb0500..7408ded77b2b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/listActiveSecurityAdminRulesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/listActiveSecurityAdminRulesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists active security admin rules in a network manager. * * @summary Lists active security admin rules in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json */ async function listActiveSecurityAdminRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js b/sdk/network/arm-network/samples/v33/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js index 9d292cc0517d..d944b0324708 100644 --- a/sdk/network/arm-network/samples/v33/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/listNetworkManagerEffectiveConnectivityConfigurationsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all effective connectivity configurations applied on a virtual network. * * @summary List all effective connectivity configurations applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json */ async function listEffectiveConnectivityConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js b/sdk/network/arm-network/samples/v33/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js index d5967ee274eb..bb5c31e923cc 100644 --- a/sdk/network/arm-network/samples/v33/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/listNetworkManagerEffectiveSecurityAdminRulesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all effective security admin rules applied on a virtual network. * * @summary List all effective security admin rules applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json */ async function listEffectiveSecurityAdminRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js index 7c925c3c06c7..35c093ad0b69 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a load balancer backend address pool. * * @summary Creates or updates a load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json */ async function updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsDeleteSample.js index 20bfad1b60df..50aca3e068b6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified load balancer backend address pool. * * @summary Deletes the specified load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolDelete.json */ async function backendAddressPoolDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsGetSample.js index 1058e2dde8c2..549c2c62d3ff 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets load balancer backend address pool. * * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json */ async function loadBalancerWithBackendAddressPoolWithBackendAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function loadBalancerWithBackendAddressPoolWithBackendAddresses() { * This sample demonstrates how to Gets load balancer backend address pool. * * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolGet.json */ async function loadBalancerBackendAddressPoolGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsListSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsListSample.js index 72d44ca949bc..2893a64fa60f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerBackendAddressPoolsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the load balancer backed address pools. * * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json */ async function loadBalancerWithBackendAddressPoolContainingBackendAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -38,7 +38,7 @@ async function loadBalancerWithBackendAddressPoolContainingBackendAddresses() { * This sample demonstrates how to Gets all the load balancer backed address pools. * * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolList.json */ async function loadBalancerBackendAddressPoolList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsGetSample.js index 25492523a1d5..edae70e797a7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets load balancer frontend IP configuration. * * @summary Gets load balancer frontend IP configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json */ async function loadBalancerFrontendIPConfigurationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsListSample.js index a63167395914..62909b888bec 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerFrontendIPConfigurationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the load balancer frontend IP configurations. * * @summary Gets all the load balancer frontend IP configurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationList.json */ async function loadBalancerFrontendIPConfigurationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesGetSample.js index ca54c1745420..30435adeb501 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified load balancer load balancing rule. * * @summary Gets the specified load balancer load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleGet.json */ async function loadBalancerLoadBalancingRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesHealthSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesHealthSample.js new file mode 100644 index 000000000000..17427dc00ec2 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesHealthSample.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get health details of a load balancing rule. + * + * @summary Get health details of a load balancing rule. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerHealth.json + */ +async function queryLoadBalancingRuleHealth() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const groupName = "rg1"; + const loadBalancerName = "lb1"; + const loadBalancingRuleName = "rulelb"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancerLoadBalancingRules.beginHealthAndWait( + groupName, + loadBalancerName, + loadBalancingRuleName, + ); + console.log(result); +} + +async function main() { + queryLoadBalancingRuleHealth(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesListSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesListSample.js index 7a04cc722a22..4f42c00200c4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerLoadBalancingRulesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the load balancing rules in a load balancer. * * @summary Gets all the load balancing rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleList.json */ async function loadBalancerLoadBalancingRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerNetworkInterfacesListSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerNetworkInterfacesListSample.js index e7d0521d56a9..48d50c452000 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerNetworkInterfacesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerNetworkInterfacesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets associated load balancer network interfaces. * * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json */ async function loadBalancerNetworkInterfaceListSimple() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -38,7 +38,7 @@ async function loadBalancerNetworkInterfaceListSimple() { * This sample demonstrates how to Gets associated load balancer network interfaces. * * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListVmss.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListVmss.json */ async function loadBalancerNetworkInterfaceListVmss() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerOutboundRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerOutboundRulesGetSample.js index a79cecec42e4..bc4420a975d8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerOutboundRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerOutboundRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified load balancer outbound rule. * * @summary Gets the specified load balancer outbound rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleGet.json */ async function loadBalancerOutboundRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerOutboundRulesListSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerOutboundRulesListSample.js index 51d15e5d42d2..f7d1e19f7693 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerOutboundRulesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerOutboundRulesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the outbound rules in a load balancer. * * @summary Gets all the outbound rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleList.json */ async function loadBalancerOutboundRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerProbesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerProbesGetSample.js index ccc99e841d59..b96fc256c4f6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerProbesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerProbesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets load balancer probe. * * @summary Gets load balancer probe. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeGet.json */ async function loadBalancerProbeGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancerProbesListSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancerProbesListSample.js index 0139b38dba0b..88a3dcb05359 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancerProbesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancerProbesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the load balancer probes. * * @summary Gets all the load balancer probes. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeList.json */ async function loadBalancerProbeList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancersCreateOrUpdateSample.js index f59aa0b323d8..8fad6a1926b9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancersCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancersCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreate.json */ async function createLoadBalancer() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -95,7 +95,7 @@ async function createLoadBalancer() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithZones.json */ async function createLoadBalancerWithFrontendIPInZone1() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -175,7 +175,7 @@ async function createLoadBalancerWithFrontendIPInZone1() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json */ async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -257,7 +257,7 @@ async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json */ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -333,7 +333,7 @@ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOn * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json */ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -405,7 +405,7 @@ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTw * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGlobalTier.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGlobalTier.json */ async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -481,7 +481,7 @@ async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBa * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateStandardSku.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateStandardSku.json */ async function createLoadBalancerWithStandardSku() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -560,7 +560,7 @@ async function createLoadBalancerWithStandardSku() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json */ async function createLoadBalancerWithSyncModePropertyOnPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -647,7 +647,7 @@ async function createLoadBalancerWithSyncModePropertyOnPool() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithInboundNatPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithInboundNatPool.json */ async function createLoadBalancerWithInboundNatPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -703,7 +703,7 @@ async function createLoadBalancerWithInboundNatPool() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithOutboundRules.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithOutboundRules.json */ async function createLoadBalancerWithOutboundRules() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancersDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancersDeleteSample.js index db8b0e90fe50..58cbb6e21c83 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancersDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancersDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified load balancer. * * @summary Deletes the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerDelete.json */ async function deleteLoadBalancer() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancersGetSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancersGetSample.js index e7c634c45407..436985c6fddc 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancersGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancersGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified load balancer. * * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGet.json */ async function getLoadBalancer() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -32,7 +32,7 @@ async function getLoadBalancer() { * This sample demonstrates how to Gets the specified load balancer. * * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGetInboundNatRulePortMapping.json */ async function getLoadBalancerWithInboundNatRulePortMapping() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancersListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancersListAllSample.js index f161b8b9e393..22e11cc42b92 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancersListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancersListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the load balancers in a subscription. * * @summary Gets all the load balancers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerListAll.json */ async function listAllLoadBalancers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancersListInboundNatRulePortMappingsSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancersListInboundNatRulePortMappingsSample.js index 94eb9ec5d5af..57275c892a2c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancersListInboundNatRulePortMappingsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancersListInboundNatRulePortMappingsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of inbound NAT rule port mappings. * * @summary List of inbound NAT rule port mappings. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/QueryInboundNatRulePortMapping.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/QueryInboundNatRulePortMapping.json */ async function queryInboundNatRulePortMapping() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancersListSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancersListSample.js index fbee0c4a3750..e22d3fe1717f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancersListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the load balancers in a resource group. * * @summary Gets all the load balancers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerList.json */ async function listLoadBalancersInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancersMigrateToIPBasedSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancersMigrateToIPBasedSample.js index d81c5c2ce705..d908d36108b6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancersMigrateToIPBasedSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancersMigrateToIPBasedSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Migrate load balancer to IP Based * * @summary Migrate load balancer to IP Based - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/MigrateLoadBalancerToIPBased.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/MigrateLoadBalancerToIPBased.json */ async function migrateLoadBalancerToIPBased() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancersSwapPublicIPAddressesSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancersSwapPublicIPAddressesSample.js index aa66e2dcc100..48be3741b554 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancersSwapPublicIPAddressesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancersSwapPublicIPAddressesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Swaps VIPs between two load balancers. * * @summary Swaps VIPs between two load balancers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancersSwapPublicIpAddresses.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancersSwapPublicIpAddresses.json */ async function swapViPsBetweenTwoLoadBalancers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/loadBalancersUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/loadBalancersUpdateTagsSample.js index 5a187b3ba920..cf65b339c74f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/loadBalancersUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/loadBalancersUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a load balancer tags. * * @summary Updates a load balancer tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerUpdateTags.json */ async function updateLoadBalancerTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysCreateOrUpdateSample.js index a747901b28d4..76b54dedabd9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a local network gateway in the specified resource group. * * @summary Creates or updates a local network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayCreate.json */ async function createLocalNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysDeleteSample.js index 4abd7fa9addf..5d8ddcece2ed 100644 --- a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified local network gateway. * * @summary Deletes the specified local network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayDelete.json */ async function deleteLocalNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysGetSample.js b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysGetSample.js index f33f1e6cc18f..1f1c62127013 100644 --- a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified local network gateway in a resource group. * * @summary Gets the specified local network gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayGet.json */ async function getLocalNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysListSample.js b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysListSample.js index ed145fead69a..6cea431f4f62 100644 --- a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the local network gateways in a resource group. * * @summary Gets all the local network gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayList.json */ async function listLocalNetworkGateways() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysUpdateTagsSample.js index 5dcc898fc673..c2abf66f3fe7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/localNetworkGatewaysUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a local network gateway tags. * * @summary Updates a local network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayUpdateTags.json */ async function updateLocalNetworkGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js index 54d98f18dcbc..818e34c95a3e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create a network manager connection on this management group. * * @summary Create a network manager connection on this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupPut.json */ async function createOrUpdateManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js index 7a33ff126f74..87f4cac0558a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete specified pending connection created by this management group. * * @summary Delete specified pending connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json */ async function deleteManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsGetSample.js index 976aea30a9c3..de572f0c25db 100644 --- a/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a specified connection created by this management group. * * @summary Get a specified connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupGet.json */ async function getManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsListSample.js index e9572f90933a..4ab56ab2b503 100644 --- a/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/managementGroupNetworkManagerConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all network manager connections created by this management group. * * @summary List all network manager connections created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupList.json */ async function listManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/natGatewaysCreateOrUpdateSample.js index 9e34ff260d6e..be23a2c7271b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natGatewaysCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natGatewaysCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a nat gateway. * * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayCreateOrUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayCreateOrUpdate.json */ async function createNatGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/natGatewaysDeleteSample.js index 421126c1e4f8..cf8059e8ff55 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natGatewaysDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natGatewaysDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified nat gateway. * * @summary Deletes the specified nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayDelete.json */ async function deleteNatGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natGatewaysGetSample.js b/sdk/network/arm-network/samples/v33/javascript/natGatewaysGetSample.js index 3ac4db7b67fd..43543efdf97a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natGatewaysGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natGatewaysGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. * * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayGet.json */ async function getNatGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natGatewaysListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/natGatewaysListAllSample.js index b1e8f932e116..3f73da68226f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natGatewaysListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natGatewaysListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the Nat Gateways in a subscription. * * @summary Gets all the Nat Gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayListAll.json */ async function listAllNatGateways() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natGatewaysListSample.js b/sdk/network/arm-network/samples/v33/javascript/natGatewaysListSample.js index d81bd5678b8f..27f06a431b75 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natGatewaysListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natGatewaysListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all nat gateways in a resource group. * * @summary Gets all nat gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayList.json */ async function listNatGatewaysInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/natGatewaysUpdateTagsSample.js index 5fbf610148a6..b8678c3cf7eb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natGatewaysUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natGatewaysUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates nat gateway tags. * * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayUpdateTags.json */ async function updateNatGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/natRulesCreateOrUpdateSample.js index 0901918d7372..7693535b539b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natRulesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natRulesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. * * @summary Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRulePut.json */ async function natRulePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natRulesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/natRulesDeleteSample.js index df7cbd1ef388..1464191aa54c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natRulesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natRulesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a nat rule. * * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleDelete.json */ async function natRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/natRulesGetSample.js index 8a08f24a1c87..f0b4bb17acd2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a nat ruleGet. * * @summary Retrieves the details of a nat ruleGet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleGet.json */ async function natRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/natRulesListByVpnGatewaySample.js b/sdk/network/arm-network/samples/v33/javascript/natRulesListByVpnGatewaySample.js index be2548b0a4ce..6a0b96c6353c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/natRulesListByVpnGatewaySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/natRulesListByVpnGatewaySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves all nat rules for a particular virtual wan vpn gateway. * * @summary Retrieves all nat rules for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleList.json */ async function natRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkGroupsCreateOrUpdateSample.js index 216849ba1aa2..ffa749a9026a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkGroupsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkGroupsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a network group. * * @summary Creates or updates a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupPut.json */ async function networkGroupsPut() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkGroupsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkGroupsDeleteSample.js index d99001d13935..e509a5a2e1a2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkGroupsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkGroupsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a network group. * * @summary Deletes a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupDelete.json */ async function networkGroupsDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkGroupsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkGroupsGetSample.js index d2b906da449d..d8f2dbcbdb01 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkGroupsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkGroupsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified network group. * * @summary Gets the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupGet.json */ async function networkGroupsGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkGroupsListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkGroupsListSample.js index 6848d70ad72f..a2c2b62d2da3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkGroupsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkGroupsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists the specified network group. * * @summary Lists the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupList.json */ async function networkGroupsList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceIPConfigurationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceIPConfigurationsGetSample.js index 3a0855b94f42..824ab177350b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceIPConfigurationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceIPConfigurationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified network interface ip configuration. * * @summary Gets the specified network interface ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationGet.json */ async function networkInterfaceIPConfigurationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceIPConfigurationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceIPConfigurationsListSample.js index eacd82beb873..0247c71e92ce 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceIPConfigurationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceIPConfigurationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get all ip configurations in a network interface. * * @summary Get all ip configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationList.json */ async function networkInterfaceIPConfigurationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceLoadBalancersListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceLoadBalancersListSample.js index be9e9afd2976..b984938cfdea 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceLoadBalancersListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceLoadBalancersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all load balancers in a network interface. * * @summary List all load balancers in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceLoadBalancerList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceLoadBalancerList.json */ async function networkInterfaceLoadBalancerList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js index fa32bf1864a3..650d54e9a954 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a Tap configuration in the specified NetworkInterface. * * @summary Creates or updates a Tap configuration in the specified NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationCreate.json */ async function createNetworkInterfaceTapConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsDeleteSample.js index 5bd3fefb37c8..9f048a20d2e3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified tap configuration from the NetworkInterface. * * @summary Deletes the specified tap configuration from the NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationDelete.json */ async function deleteTapConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsGetSample.js index 6c18debd4d51..13819db7894a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified tap configuration on a network interface. * * @summary Get the specified tap configuration on a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationGet.json */ async function getNetworkInterfaceTapConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsListSample.js index 57cccee47a90..d4f121950d40 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfaceTapConfigurationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get all Tap configurations in a network interface. * * @summary Get all Tap configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationList.json */ async function listVirtualNetworkTapConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesCreateOrUpdateSample.js index 07775b7df313..459d86cfda60 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a network interface. * * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreate.json */ async function createNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -53,7 +53,7 @@ async function createNetworkInterface() { * This sample demonstrates how to Creates or updates a network interface. * * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json */ async function createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesDeleteSample.js index 97c708a9e9ba..1460060cd7cf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified network interface. * * @summary Deletes the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceDelete.json */ async function deleteNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js index d8bff3bedc66..ea02c2f44429 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetCloudServiceNetworkInterfaceSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified network interface in a cloud service. * * @summary Get the specified network interface in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceGet.json */ async function getCloudServiceNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetEffectiveRouteTableSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetEffectiveRouteTableSample.js index 12643dd74f1a..369f89b95251 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetEffectiveRouteTableSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetEffectiveRouteTableSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all route tables applied to a network interface. * * @summary Gets all route tables applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json */ async function showNetworkInterfaceEffectiveRouteTables() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetSample.js index 2f70cc587d07..3dc78ffce333 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about the specified network interface. * * @summary Gets information about the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceGet.json */ async function getNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js index b7742e46980d..c1ef0b379d59 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. * * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigGet.json */ async function getVirtualMachineScaleSetNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js index a3090bbea757..c9024249b6ae 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified network interface in a virtual machine scale set. * * @summary Get the specified network interface in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceGet.json */ async function getVirtualMachineScaleSetNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListAllSample.js index 64a60d67e7ad..25d0c2c694ff 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network interfaces in a subscription. * * @summary Gets all network interfaces in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceListAll.json */ async function listAllNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js index 159f7a47f768..aa266d1f5080 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListCloudServiceNetworkInterfacesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network interfaces in a cloud service. * * @summary Gets all network interfaces in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceList.json */ async function listCloudServiceNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js index ed0eedbcc75e..e8ae7228e9b5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about all network interfaces in a role instance in a cloud service. * * @summary Gets information about all network interfaces in a role instance in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json */ async function listCloudServiceRoleInstanceNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js index dbec32299e3d..ddb9c797d95b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListEffectiveNetworkSecurityGroupsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network security groups applied to a network interface. * * @summary Gets all network security groups applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveNSGList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveNSGList.json */ async function listNetworkInterfaceEffectiveNetworkSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListSample.js index fd4213a3fc38..929b8e7d61d4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network interfaces in a resource group. * * @summary Gets all network interfaces in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceList.json */ async function listNetworkInterfacesInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js index 9693a8eaf5bb..1bc93d5851d6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. * * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigList.json */ async function listVirtualMachineScaleSetNetworkInterfaceIPConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js index ef71b7e7c8cc..d175ac670ce9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network interfaces in a virtual machine scale set. * * @summary Gets all network interfaces in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceList.json */ async function listVirtualMachineScaleSetNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js index bcffe7376ceb..6997942d8e57 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about all network interfaces in a virtual machine in a virtual machine scale set. * * @summary Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmNetworkInterfaceList.json */ async function listVirtualMachineScaleSetVMNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesUpdateTagsSample.js index 1e6a6010f58f..9be711596ce4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkInterfacesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkInterfacesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a network interface tags. * * @summary Updates a network interface tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceUpdateTags.json */ async function updateNetworkInterfaceTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagerCommitsPostSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagerCommitsPostSample.js index f0d0828dbc51..1a9ccd93dd91 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagerCommitsPostSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagerCommitsPostSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Post a Network Manager Commit. * * @summary Post a Network Manager Commit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerCommitPost.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerCommitPost.json */ async function networkManageCommitPost() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagerDeploymentStatusListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagerDeploymentStatusListSample.js index 3b0e620e206d..301938c95a57 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagerDeploymentStatusListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagerDeploymentStatusListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Post to List of Network Manager Deployment Status. * * @summary Post to List of Network Manager Deployment Status. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDeploymentStatusList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDeploymentStatusList.json */ async function networkManagerDeploymentStatusList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js index 031a3f08f72d..1bfc7b39cb8d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a network manager routing configuration. * * @summary Creates or updates a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationPut.json */ async function createNetworkManagerRoutingConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsDeleteSample.js index 950d7dee8ea4..f8c4f36469a5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a network manager routing configuration. * * @summary Deletes a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationDelete.json */ async function deleteNetworkManagerRoutingConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsGetSample.js index 195a661f1b1f..cfaa6f014b2a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves a network manager routing configuration. * * @summary Retrieves a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationGet.json */ async function getRoutingConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsListSample.js index 6fc7a369bdc9..d08b9714e2ba 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagerRoutingConfigurationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the network manager routing configurations in a network manager, in a paginated format. * * @summary Lists all the network manager routing configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationList.json */ async function listRoutingConfigurationsInANetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagersCreateOrUpdateSample.js index 56b099de5988..da9863513187 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagersCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagersCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a Network Manager. * * @summary Creates or updates a Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPut.json */ async function putNetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagersDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagersDeleteSample.js index 8529b3ee9169..33cc8beba4ca 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagersDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagersDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a network manager. * * @summary Deletes a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDelete.json */ async function networkManagersDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagersGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagersGetSample.js index 27ea4f970596..7a83730a32f6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagersGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagersGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Network Manager. * * @summary Gets the specified Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGet.json */ async function networkManagersGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagersListBySubscriptionSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagersListBySubscriptionSample.js index 38f2b6d91f10..72bb86efb4d8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagersListBySubscriptionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagersListBySubscriptionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all network managers in a subscription. * * @summary List all network managers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerListAll.json */ async function networkManagersList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagersListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagersListSample.js index d5d4ab6ed091..152179cde085 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagersListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List network managers in a resource group. * * @summary List network managers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerList.json */ async function listNetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkManagersPatchSample.js b/sdk/network/arm-network/samples/v33/javascript/networkManagersPatchSample.js index 77124200424c..e614f8aec6a1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkManagersPatchSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkManagersPatchSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Patch NetworkManager. * * @summary Patch NetworkManager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPatch.json */ async function networkManagesPatch() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/networkProfilesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkProfilesCreateOrUpdateSample.js index b7aa40ac4bee..005311bbf1d8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkProfilesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkProfilesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a network profile. * * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileCreateConfigOnly.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileCreateConfigOnly.json */ async function createNetworkProfileDefaults() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkProfilesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkProfilesDeleteSample.js index 5b994c33ddec..5376bc088f09 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkProfilesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkProfilesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified network profile. * * @summary Deletes the specified network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileDelete.json */ async function deleteNetworkProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkProfilesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkProfilesGetSample.js index 1acb695088b7..cf6e9cb409ce 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkProfilesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkProfilesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified network profile in a specified resource group. * * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetConfigOnly.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetConfigOnly.json */ async function getNetworkProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -32,7 +32,7 @@ async function getNetworkProfile() { * This sample demonstrates how to Gets the specified network profile in a specified resource group. * * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetWithContainerNic.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetWithContainerNic.json */ async function getNetworkProfileWithContainerNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkProfilesListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/networkProfilesListAllSample.js index 5cc8f8878009..fb04cbda64bb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkProfilesListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkProfilesListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the network profiles in a subscription. * * @summary Gets all the network profiles in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileListAll.json */ async function listAllNetworkProfiles() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkProfilesListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkProfilesListSample.js index 2d602dfb291c..fa2611a81ced 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkProfilesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkProfilesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network profiles in a resource group. * * @summary Gets all network profiles in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileList.json */ async function listResourceGroupNetworkProfiles() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkProfilesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/networkProfilesUpdateTagsSample.js index 4b0abd4f9300..2ac81749d55f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkProfilesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkProfilesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates network profile tags. * * @summary Updates network profile tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileUpdateTags.json */ async function updateNetworkProfileTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsCreateOrUpdateSample.js index 459102e8d9fd..ba80b2e2fb33 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a network security group in the specified resource group. * * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreate.json */ async function createNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function createNetworkSecurityGroup() { * This sample demonstrates how to Creates or updates a network security group in the specified resource group. * * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreateWithRule.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreateWithRule.json */ async function createNetworkSecurityGroupWithRule() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsDeleteSample.js index c9f3c73adbd5..852a53219b7e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified network security group. * * @summary Deletes the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupDelete.json */ async function deleteNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsGetSample.js index bcbf572615ef..d4a0d5652d97 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified network security group. * * @summary Gets the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupGet.json */ async function getNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsListAllSample.js index 427d053d491b..1fc641f08feb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network security groups in a subscription. * * @summary Gets all network security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupListAll.json */ async function listAllNetworkSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsListSample.js index 0315d2e8b949..4beb0c88a88d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network security groups in a resource group. * * @summary Gets all network security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupList.json */ async function listNetworkSecurityGroupsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsUpdateTagsSample.js index 41121a64ec0d..784eb5eb3454 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkSecurityGroupsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a network security group tags. * * @summary Updates a network security group tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupUpdateTags.json */ async function updateNetworkSecurityGroupTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js index 4c10cdd8ec34..5058ee2425f1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' * * @summary Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionPut.json */ async function networkVirtualApplianceConnectionPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsDeleteSample.js index 893ec18309a6..cb142b9b4976 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a NVA connection. * * @summary Deletes a NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionDelete.json */ async function networkVirtualApplianceConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsGetSample.js index 8a4625118fb3..a171d46609ae 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of specified NVA connection. * * @summary Retrieves the details of specified NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionGet.json */ async function networkVirtualApplianceConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsListSample.js index 19b3e01fac82..68317ed9949f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualApplianceConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists NetworkVirtualApplianceConnections under the NVA. * * @summary Lists NetworkVirtualApplianceConnections under the NVA. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionList.json */ async function networkVirtualApplianceConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesCreateOrUpdateSample.js index 2b3cc96140cb..1859e2194608 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. * * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualAppliancePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualAppliancePut.json */ async function createNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -90,7 +90,7 @@ async function createNetworkVirtualAppliance() { * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. * * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSaaSPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSaaSPut.json */ async function createSaaSNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesDeleteSample.js index fec2ef285276..adc1d4b376a8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified Network Virtual Appliance. * * @summary Deletes the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceDelete.json */ async function deleteNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesGetSample.js index 686a7761f689..84989407206a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Network Virtual Appliance. * * @summary Gets the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceGet.json */ async function getNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesListByResourceGroupSample.js index 12235a96ddf7..8dab507b341f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Network Virtual Appliances in a resource group. * * @summary Lists all Network Virtual Appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json */ async function listAllNetworkVirtualApplianceForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesListSample.js index aa109ba1705c..bafc4bf82b2a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all Network Virtual Appliances in a subscription. * * @summary Gets all Network Virtual Appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListBySubscription.json */ async function listAllNetworkVirtualAppliancesForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesRestartSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesRestartSample.js index 51be4a7594ce..be413b3d45fa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesRestartSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesRestartSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. * * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceEmptyRestart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceEmptyRestart.json */ async function restartAllNetworkVirtualApplianceVMSInVMScaleSet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -35,7 +35,7 @@ async function restartAllNetworkVirtualApplianceVMSInVMScaleSet() { * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. * * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSpecificRestart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSpecificRestart.json */ async function restartSpecificNetworkVirtualApplianceVMSInVMScaleSet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesUpdateTagsSample.js index 89a3a9119bec..38d9584e3346 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkVirtualAppliancesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a Network Virtual Appliance. * * @summary Updates a Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceUpdateTags.json */ async function updateNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersCheckConnectivitySample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersCheckConnectivitySample.js index 203c7d8504d5..6027256c2360 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersCheckConnectivitySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersCheckConnectivitySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. * * @summary Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectivityCheck.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectivityCheck.json */ async function checkConnectivity() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersCreateOrUpdateSample.js index 3513e65c7163..e17cab03bc36 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a network watcher in the specified resource group. * * @summary Creates or updates a network watcher in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherCreate.json */ async function createNetworkWatcher() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersDeleteSample.js index a9f621db853e..cba03f66dbd0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified network watcher resource. * * @summary Deletes the specified network watcher resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherDelete.json */ async function deleteNetworkWatcher() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetAzureReachabilityReportSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetAzureReachabilityReportSample.js index 6ee790179985..ec5ea4630c64 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetAzureReachabilityReportSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetAzureReachabilityReportSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. * * @summary NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json */ async function getAzureReachabilityReport() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetFlowLogStatusSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetFlowLogStatusSample.js index f816d7ce2f33..192400005c03 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetFlowLogStatusSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetFlowLogStatusSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Queries status of flow log and traffic analytics (optional) on a specified resource. * * @summary Queries status of flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogStatusQuery.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogStatusQuery.json */ async function getFlowLogStatus() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js index 956a85bb8c43..aaf82f6826a5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetNetworkConfigurationDiagnosticSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. * * @summary Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json */ async function networkConfigurationDiagnostic() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetNextHopSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetNextHopSample.js index ac62097957fa..71d379af2738 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetNextHopSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetNextHopSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the next hop from the specified VM. * * @summary Gets the next hop from the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNextHopGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNextHopGet.json */ async function getNextHop() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetSample.js index cec58451052c..2b9d6c84a3dd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified network watcher by resource group. * * @summary Gets the specified network watcher by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherGet.json */ async function getNetworkWatcher() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTopologySample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTopologySample.js index d6e972fe0075..c2ab41caabd7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTopologySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTopologySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the current network topology by resource group. * * @summary Gets the current network topology by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTopologyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTopologyGet.json */ async function getTopology() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTroubleshootingResultSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTroubleshootingResultSample.js index 530844628154..5a413b66e6b2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTroubleshootingResultSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTroubleshootingResultSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the last completed troubleshooting result on a specified resource. * * @summary Get the last completed troubleshooting result on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootResultQuery.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootResultQuery.json */ async function getTroubleshootResult() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTroubleshootingSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTroubleshootingSample.js index f45016d4349c..423d62edaf8f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTroubleshootingSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetTroubleshootingSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Initiate troubleshooting on a specified resource. * * @summary Initiate troubleshooting on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootGet.json */ async function getTroubleshooting() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetVMSecurityRulesSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetVMSecurityRulesSample.js index 93a70b5fffc4..fcf337f40b0d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetVMSecurityRulesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersGetVMSecurityRulesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the configured and effective security group rules on the specified VM. * * @summary Gets the configured and effective security group rules on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherSecurityGroupViewGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherSecurityGroupViewGet.json */ async function getSecurityGroupView() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersListAllSample.js index d3115ef228a1..349a8465e1fd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network watchers by subscription. * * @summary Gets all network watchers by subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherListAll.json */ async function listAllNetworkWatchers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersListAvailableProvidersSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersListAvailableProvidersSample.js index 328d6e51487f..9f102830adf3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersListAvailableProvidersSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersListAvailableProvidersSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. * * @summary NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAvailableProvidersListGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAvailableProvidersListGet.json */ async function getAvailableProvidersList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersListSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersListSample.js index ac7613430a30..f5d056e7d72a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all network watchers by resource group. * * @summary Gets all network watchers by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherList.json */ async function listNetworkWatchers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersSetFlowLogConfigurationSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersSetFlowLogConfigurationSample.js index 1762acfba990..1611af8da01a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersSetFlowLogConfigurationSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersSetFlowLogConfigurationSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Configures flow log and traffic analytics (optional) on a specified resource. * * @summary Configures flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogConfigure.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogConfigure.json */ async function configureFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersUpdateTagsSample.js index 3cc1946d7706..74e6c34fd354 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a network watcher tags. * * @summary Updates a network watcher tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherUpdateTags.json */ async function updateNetworkWatcherTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/networkWatchersVerifyIPFlowSample.js b/sdk/network/arm-network/samples/v33/javascript/networkWatchersVerifyIPFlowSample.js index cf1c42071f53..b70dc719c0d7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/networkWatchersVerifyIPFlowSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/networkWatchersVerifyIPFlowSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Verify IP flow from the specified VM to a location given the currently configured NSG rules. * * @summary Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherIpFlowVerify.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherIpFlowVerify.json */ async function ipFlowVerify() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/operationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/operationsListSample.js index f38c6ee48321..3885dbe93f0a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/operationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/operationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all of the available Network Rest API operations. * * @summary Lists all of the available Network Rest API operations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/OperationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/OperationList.json */ async function getAListOfOperationsForAResourceProvider() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysCreateOrUpdateSample.js index 866d47f42592..43def1aa39b3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. * * @summary Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayPut.json */ async function p2SVpnGatewayPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysDeleteSample.js index f9d721b9f173..8e36a8fa9e77 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a virtual wan p2s vpn gateway. * * @summary Deletes a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayDelete.json */ async function p2SVpnGatewayDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js index 74b403be44e9..653f8d4afd6b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. * * @summary Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json */ async function disconnectVpnConnectionsFromP2SVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js index a36ade405bee..3e5852f96b52 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGenerateVpnProfileSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. * * @summary Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json */ async function generateP2SVpnGatewayVpnprofile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js index 4f134b178c34..7d7e33807d89 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. * * @summary Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json */ async function p2SVpnGatewayGetConnectionHealthDetailed() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js index 3528afd260a9..edb3aa3ddd40 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. * * @summary Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealth.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealth.json */ async function p2SVpnGatewayGetConnectionHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetSample.js index 6e5c5e07a46b..8dc0fc7ee709 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a virtual wan p2s vpn gateway. * * @summary Retrieves the details of a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGet.json */ async function p2SVpnGatewayGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysListByResourceGroupSample.js index e1943d28db6f..e951b2e27197 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the P2SVpnGateways in a resource group. * * @summary Lists all the P2SVpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayListByResourceGroup.json */ async function p2SVpnGatewayListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysListSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysListSample.js index fb159ae0021e..840cd818f69f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the P2SVpnGateways in a subscription. * * @summary Lists all the P2SVpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayList.json */ async function p2SVpnGatewayListBySubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysResetSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysResetSample.js index ad32512cef95..d1517f581e87 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysResetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysResetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Resets the primary of the p2s vpn gateway in the specified resource group. * * @summary Resets the primary of the p2s vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayReset.json */ async function resetP2SVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysUpdateTagsSample.js index e9d6350094fe..6fcb131f601b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/p2SVpnGatewaysUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates virtual wan p2s vpn gateway tags. * * @summary Updates virtual wan p2s vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayUpdateTags.json */ async function p2SVpnGatewayUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/packetCapturesCreateSample.js b/sdk/network/arm-network/samples/v33/javascript/packetCapturesCreateSample.js index ed739a73c6a0..6851e55efa05 100644 --- a/sdk/network/arm-network/samples/v33/javascript/packetCapturesCreateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/packetCapturesCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create and start a packet capture on the specified VM. * * @summary Create and start a packet capture on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureCreate.json */ async function createPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/packetCapturesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/packetCapturesDeleteSample.js index 478e6d159bcb..aacb94a6b019 100644 --- a/sdk/network/arm-network/samples/v33/javascript/packetCapturesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/packetCapturesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified packet capture session. * * @summary Deletes the specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureDelete.json */ async function deletePacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/packetCapturesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/packetCapturesGetSample.js index e8e6f33b6180..ca1d9f1a0634 100644 --- a/sdk/network/arm-network/samples/v33/javascript/packetCapturesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/packetCapturesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a packet capture session by name. * * @summary Gets a packet capture session by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureGet.json */ async function getPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/packetCapturesGetStatusSample.js b/sdk/network/arm-network/samples/v33/javascript/packetCapturesGetStatusSample.js index d043b0b0a214..33dca10d35c3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/packetCapturesGetStatusSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/packetCapturesGetStatusSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Query the status of a running packet capture session. * * @summary Query the status of a running packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json */ async function queryPacketCaptureStatus() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/packetCapturesListSample.js b/sdk/network/arm-network/samples/v33/javascript/packetCapturesListSample.js index f76e816618fe..27e1aae30650 100644 --- a/sdk/network/arm-network/samples/v33/javascript/packetCapturesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/packetCapturesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all packet capture sessions within the specified resource group. * * @summary Lists all packet capture sessions within the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCapturesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCapturesList.json */ async function listPacketCaptures() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/packetCapturesStopSample.js b/sdk/network/arm-network/samples/v33/javascript/packetCapturesStopSample.js index a5ae0654b264..85f2e312e090 100644 --- a/sdk/network/arm-network/samples/v33/javascript/packetCapturesStopSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/packetCapturesStopSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Stops a specified packet capture session. * * @summary Stops a specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureStop.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureStop.json */ async function stopPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/peerExpressRouteCircuitConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/peerExpressRouteCircuitConnectionsGetSample.js index d29e38e3889f..fd149a535789 100644 --- a/sdk/network/arm-network/samples/v33/javascript/peerExpressRouteCircuitConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/peerExpressRouteCircuitConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. * * @summary Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionGet.json */ async function peerExpressRouteCircuitConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/javascript/peerExpressRouteCircuitConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/peerExpressRouteCircuitConnectionsListSample.js index be22407b9647..af441e1aef66 100644 --- a/sdk/network/arm-network/samples/v33/javascript/peerExpressRouteCircuitConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/peerExpressRouteCircuitConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all global reach peer connections associated with a private peering in an express route circuit. * * @summary Gets all global reach peer connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionList.json */ async function listPeerExpressRouteCircuitConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js index b1f4b5ca1040..f69b8dedf1a3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a private dns zone group in the specified private endpoint. * * @summary Creates or updates a private dns zone group in the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json */ async function createPrivateDnsZoneGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsDeleteSample.js index ef70052b71b0..42002fd2a48a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified private dns zone group. * * @summary Deletes the specified private dns zone group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json */ async function deletePrivateDnsZoneGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsGetSample.js index a06b4898f748..76c7d55da608 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the private dns zone group resource by specified private dns zone group name. * * @summary Gets the private dns zone group resource by specified private dns zone group name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupGet.json */ async function getPrivateDnsZoneGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsListSample.js b/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsListSample.js index 948492e515b8..73b05a774ff7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateDnsZoneGroupsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all private dns zone groups in a private endpoint. * * @summary Gets all private dns zone groups in a private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupList.json */ async function listPrivateEndpointsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsCreateOrUpdateSample.js index ecb28807c228..bdd304e996ea 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. * * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreate.json */ async function createPrivateEndpoint() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -59,7 +59,7 @@ async function createPrivateEndpoint() { * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. * * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreateWithASG.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreateWithASG.json */ async function createPrivateEndpointWithApplicationSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -98,7 +98,7 @@ async function createPrivateEndpointWithApplicationSecurityGroups() { * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. * * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreateForManualApproval.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreateForManualApproval.json */ async function createPrivateEndpointWithManualApprovalConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsDeleteSample.js index a94c43c31cca..66c9128466d4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified private endpoint. * * @summary Deletes the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDelete.json */ async function deletePrivateEndpoint() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsGetSample.js index dd649c5ec911..4d4074b86d8e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified private endpoint by resource group. * * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGet.json */ async function getPrivateEndpoint() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -32,7 +32,7 @@ async function getPrivateEndpoint() { * This sample demonstrates how to Gets the specified private endpoint by resource group. * * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGetWithASG.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGetWithASG.json */ async function getPrivateEndpointWithApplicationSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -48,7 +48,7 @@ async function getPrivateEndpointWithApplicationSecurityGroups() { * This sample demonstrates how to Gets the specified private endpoint by resource group. * * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGetForManualApproval.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGetForManualApproval.json */ async function getPrivateEndpointWithManualApprovalConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsListBySubscriptionSample.js b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsListBySubscriptionSample.js index 6f818aed4adf..68660a10e9d3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsListBySubscriptionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsListBySubscriptionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all private endpoints in a subscription. * * @summary Gets all private endpoints in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointListAll.json */ async function listAllPrivateEndpoints() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsListSample.js b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsListSample.js index 6fa85232e9c9..092c2780106a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateEndpointsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateEndpointsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all private endpoints in a resource group. * * @summary Gets all private endpoints in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointList.json */ async function listPrivateEndpointsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js index e6917b90a6a8..5ebea2d921b6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Checks whether the subscription is visible to private link service in the specified resource group. * * @summary Checks whether the subscription is visible to private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json */ async function checkPrivateLinkServiceVisibility() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js index d45ea0c54a9e..b9d2eff2fb65 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Checks whether the subscription is visible to private link service. * * @summary Checks whether the subscription is visible to private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibility.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibility.json */ async function checkPrivateLinkServiceVisibility() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCreateOrUpdateSample.js index dd28956990ec..f07901561957 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an private link service in the specified resource group. * * @summary Creates or updates an private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceCreate.json */ async function createPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js index 43957a4fad3f..b89a9ad18a3e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesDeletePrivateEndpointConnectionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete private end point connection for a private link service in a subscription. * * @summary Delete private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json */ async function deletePrivateEndPointConnectionForAPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesDeleteSample.js index 7e4ea3e113c3..02a24ba8ac21 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified private link service. * * @summary Deletes the specified private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDelete.json */ async function deletePrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js index 41df7469f636..bb22d11390cf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesGetPrivateEndpointConnectionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specific private end point connection by specific private link service in the resource group. * * @summary Get the specific private end point connection by specific private link service in the resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json */ async function getPrivateEndPointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesGetSample.js index 98c71ca34ce9..9bf1c60d2431 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified private link service by resource group. * * @summary Gets the specified private link service by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGet.json */ async function getPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js index ec66ca6f301c..7773bf655ff1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. * * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json */ async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js index 8cf0420ce55d..125bb9cb3a76 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. * * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesGet.json */ async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListBySubscriptionSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListBySubscriptionSample.js index e8ff738ea266..8415d9beff53 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListBySubscriptionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListBySubscriptionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all private link service in a subscription. * * @summary Gets all private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListAll.json */ async function listAllPrivateListService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js index 974359a8308d..f01c0a7088c7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListPrivateEndpointConnectionsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all private end point connections for a specific private link service. * * @summary Gets all private end point connections for a specific private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json */ async function listPrivateLinkServiceInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListSample.js index 9c018ee7ada8..e4e221701bbe 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all private link services in a resource group. * * @summary Gets all private link services in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceList.json */ async function listPrivateLinkServiceInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js index 510e4abb6d73..3c080c281e09 100644 --- a/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/privateLinkServicesUpdatePrivateEndpointConnectionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Approve or reject private end point connection for a private link service in a subscription. * * @summary Approve or reject private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json */ async function approveOrRejectPrivateEndPointConnectionForAPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesCreateOrUpdateSample.js index 6924affd0ab4..dad5e1e340e8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDns.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDns.json */ async function createPublicIPAddressDns() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -40,7 +40,7 @@ async function createPublicIPAddressDns() { * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json */ async function createPublicIPAddressDnsWithDomainNameLabelScope() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -67,7 +67,7 @@ async function createPublicIPAddressDnsWithDomainNameLabelScope() { * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateCustomizedValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateCustomizedValues.json */ async function createPublicIPAddressAllocationMethod() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -94,7 +94,7 @@ async function createPublicIPAddressAllocationMethod() { * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDefaults.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDefaults.json */ async function createPublicIPAddressDefaults() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesDdosProtectionStatusSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesDdosProtectionStatusSample.js index d2bc8697d8b9..30107370dcc8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesDdosProtectionStatusSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesDdosProtectionStatusSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the Ddos Protection Status of a Public IP Address * * @summary Gets the Ddos Protection Status of a Public IP Address - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json */ async function getDdosProtectionStatusOfAPublicIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesDeleteSample.js index 4d7637d41fdb..fb8b7ac6fee7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified public IP address. * * @summary Deletes the specified public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressDelete.json */ async function deletePublicIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js index 090a883baa77..a3397e11a754 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetCloudServicePublicIpaddressSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified public IP address in a cloud service. * * @summary Get the specified public IP address in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpGet.json */ async function getVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetSample.js index d1634ed08abd..69e80a036f80 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified public IP address in a specified resource group. * * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGet.json */ async function getPublicIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js index 9e8d496edc9e..a37d861aa7c0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified public IP address in a virtual machine scale set. * * @summary Get the specified public IP address in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpGet.json */ async function getVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListAllSample.js index d19b59f1c602..ee3abdbb06a0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the public IP addresses in a subscription. * * @summary Gets all the public IP addresses in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressListAll.json */ async function listAllPublicIPAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js index a9c3bcdd6896..93fcceef3ec5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListCloudServicePublicIpaddressesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about all public IP addresses on a cloud service level. * * @summary Gets information about all public IP addresses on a cloud service level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpListAll.json */ async function listVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js index ca31bafc4e49..0bb71e958a6f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about all public IP addresses in a role instance IP configuration in a cloud service. * * @summary Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstancePublicIpList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstancePublicIpList.json */ async function listVmssvmPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListSample.js index fddbde35781d..bcfbed4fee2d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all public IP addresses in a resource group. * * @summary Gets all public IP addresses in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressList.json */ async function listResourceGroupPublicIPAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js index bef8d1f4be3e..dd5039b95432 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about all public IP addresses on a virtual machine scale set level. * * @summary Gets information about all public IP addresses on a virtual machine scale set level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpListAll.json */ async function listVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js index b0b8e7cefb3a..c100b50a9c3e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. * * @summary Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmPublicIpList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmPublicIpList.json */ async function listVmssvmPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesUpdateTagsSample.js index 99c796fc382d..bd93f0edbdcb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPAddressesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates public IP address tags. * * @summary Updates public IP address tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressUpdateTags.json */ async function updatePublicIPAddressTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesCreateOrUpdateSample.js index 14b3b2bf210d..e253f0375a42 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. * * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateCustomizedValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateCustomizedValues.json */ async function createPublicIPPrefixAllocationMethod() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -42,7 +42,7 @@ async function createPublicIPPrefixAllocationMethod() { * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. * * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateDefaults.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateDefaults.json */ async function createPublicIPPrefixDefaults() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesDeleteSample.js index b087c590c889..9af87b1c8059 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified public IP prefix. * * @summary Deletes the specified public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixDelete.json */ async function deletePublicIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesGetSample.js index 45016dcf9f55..09871af7d423 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. * * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixGet.json */ async function getPublicIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesListAllSample.js index 462393e7cf73..f6cc99774a44 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the public IP prefixes in a subscription. * * @summary Gets all the public IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixListAll.json */ async function listAllPublicIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesListSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesListSample.js index a8bac9ed5687..f53fa4e7251b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all public IP prefixes in a resource group. * * @summary Gets all public IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixList.json */ async function listResourceGroupPublicIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesUpdateTagsSample.js index 1493567f07d9..640febc31ba0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/publicIPPrefixesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates public IP prefix tags. * * @summary Updates public IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixUpdateTags.json */ async function updatePublicIPPrefixTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/putBastionShareableLinkSample.js b/sdk/network/arm-network/samples/v33/javascript/putBastionShareableLinkSample.js index 7c7d526b6d82..8a52e7f6a82b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/putBastionShareableLinkSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/putBastionShareableLinkSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a Bastion Shareable Links for all the VMs specified in the request. * * @summary Creates a Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkCreate.json */ async function createBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsCreateSample.js b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsCreateSample.js new file mode 100644 index 000000000000..2f920bdcafc1 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsCreateSample.js @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates Reachability Analysis Intent. + * + * @summary Creates Reachability Analysis Intent. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentPut.json + */ +async function reachabilityAnalysisIntentCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisIntentName = "testAnalysisIntentName"; + const body = { + properties: { + description: "A sample reachability analysis intent", + destinationResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", + ipTraffic: { + destinationIps: ["10.4.0.1"], + destinationPorts: ["0"], + protocols: ["Any"], + sourceIps: ["10.4.0.0"], + sourcePorts: ["0"], + }, + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisIntents.create( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + body, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisIntentCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsDeleteSample.js new file mode 100644 index 000000000000..d934a1aa3ba0 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsDeleteSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes Reachability Analysis Intent. + * + * @summary Deletes Reachability Analysis Intent. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentDelete.json + */ +async function reachabilityAnalysisIntentDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisIntentName = "testAnalysisIntent"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisIntents.delete( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisIntentDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsGetSample.js new file mode 100644 index 000000000000..74c30e54c810 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsGetSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get the Reachability Analysis Intent. + * + * @summary Get the Reachability Analysis Intent. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentGet.json + */ +async function reachabilityAnalysisIntentGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisIntentName = "testAnalysisIntentName"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisIntents.get( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisIntentGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsListSample.js b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsListSample.js new file mode 100644 index 000000000000..e73d96a74de6 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisIntentsListSample.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets list of Reachability Analysis Intents . + * + * @summary Gets list of Reachability Analysis Intents . + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentList.json + */ +async function reachabilityAnalysisIntentList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testVerifierWorkspace1"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reachabilityAnalysisIntents.list( + resourceGroupName, + networkManagerName, + workspaceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + reachabilityAnalysisIntentList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsCreateSample.js b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsCreateSample.js new file mode 100644 index 000000000000..0e88beb8b6bd --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsCreateSample.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates Reachability Analysis Runs. + * + * @summary Creates Reachability Analysis Runs. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunPut.json + */ +async function reachabilityAnalysisRunCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisRunName = "testAnalysisRunName"; + const body = { + properties: { + description: "A sample reachability analysis run", + intentId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisRuns.create( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + body, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisRunCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsDeleteSample.js new file mode 100644 index 000000000000..afec25518a9b --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsDeleteSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes Reachability Analysis Run. + * + * @summary Deletes Reachability Analysis Run. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunDelete.json + */ +async function reachabilityAnalysisRunDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisRunName = "testAnalysisRun"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisRuns.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisRunDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsGetSample.js new file mode 100644 index 000000000000..5957bffc1a66 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsGetSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets Reachability Analysis Run. + * + * @summary Gets Reachability Analysis Run. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunGet.json + */ +async function reachabilityAnalysisRunGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisRunName = "testAnalysisRunName"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisRuns.get( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisRunGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsListSample.js b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsListSample.js new file mode 100644 index 000000000000..d0a938ff2c0d --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/reachabilityAnalysisRunsListSample.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets list of Reachability Analysis Runs. + * + * @summary Gets list of Reachability Analysis Runs. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunList.json + */ +async function reachabilityAnalysisRunList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testVerifierWorkspace1"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reachabilityAnalysisRuns.list( + resourceGroupName, + networkManagerName, + workspaceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + reachabilityAnalysisRunList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/resourceNavigationLinksListSample.js b/sdk/network/arm-network/samples/v33/javascript/resourceNavigationLinksListSample.js index 7284694695ca..176095a5141b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/resourceNavigationLinksListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/resourceNavigationLinksListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of resource navigation links for a subnet. * * @summary Gets a list of resource navigation links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json */ async function getResourceNavigationLinks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesCreateOrUpdateSample.js index 1f29d67d0eb7..acb87ebc3cc7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a route in the specified route filter. * * @summary Creates or updates a route in the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleCreate.json */ async function routeFilterRuleCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesDeleteSample.js index ff4bfdf7161d..acada99fa8d3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified rule from a route filter. * * @summary Deletes the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleDelete.json */ async function routeFilterRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesGetSample.js index ef1be3760bce..df8cf6a2c0d8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified rule from a route filter. * * @summary Gets the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleGet.json */ async function routeFilterRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesListByRouteFilterSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesListByRouteFilterSample.js index d7fb00b14289..a0a5ad579c26 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesListByRouteFilterSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFilterRulesListByRouteFilterSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all RouteFilterRules in a route filter. * * @summary Gets all RouteFilterRules in a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleListByRouteFilter.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleListByRouteFilter.json */ async function routeFilterRuleListByRouteFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFiltersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFiltersCreateOrUpdateSample.js index 01a99bce0d50..52f77e5c2a92 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFiltersCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFiltersCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a route filter in a specified resource group. * * @summary Creates or updates a route filter in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterCreate.json */ async function routeFilterCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFiltersDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFiltersDeleteSample.js index 7e9e39ac042e..a5efb026cbb1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFiltersDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFiltersDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified route filter. * * @summary Deletes the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterDelete.json */ async function routeFilterDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFiltersGetSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFiltersGetSample.js index ea2221e2bfcc..1592a3ad34ed 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFiltersGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFiltersGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified route filter. * * @summary Gets the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterGet.json */ async function routeFilterGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFiltersListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFiltersListByResourceGroupSample.js index 69238f1a225d..e26a465a801f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFiltersListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFiltersListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all route filters in a resource group. * * @summary Gets all route filters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterListByResourceGroup.json */ async function routeFilterListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFiltersListSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFiltersListSample.js index accd2814b040..8184ce0c6663 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFiltersListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFiltersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all route filters in a subscription. * * @summary Gets all route filters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterList.json */ async function routeFilterList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeFiltersUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/routeFiltersUpdateTagsSample.js index fb38ecec748f..d2e7cdae0571 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeFiltersUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeFiltersUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates tags of a route filter. * * @summary Updates tags of a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterUpdateTags.json */ async function updateRouteFilterTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeMapsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/routeMapsCreateOrUpdateSample.js index b2502828942e..f035eade501d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeMapsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeMapsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a RouteMap if it doesn't exist else updates the existing one. * * @summary Creates a RouteMap if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapPut.json */ async function routeMapPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeMapsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/routeMapsDeleteSample.js index 853ed073e7e9..0913a4724f49 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeMapsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeMapsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a RouteMap. * * @summary Deletes a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapDelete.json */ async function routeMapDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeMapsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/routeMapsGetSample.js index 0f7d11d7658d..f50a394430b0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeMapsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeMapsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a RouteMap. * * @summary Retrieves the details of a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapGet.json */ async function routeMapGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeMapsListSample.js b/sdk/network/arm-network/samples/v33/javascript/routeMapsListSample.js index 78dc6fe1e56c..f9b5d8ad02e8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeMapsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeMapsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of all RouteMaps. * * @summary Retrieves the details of all RouteMaps. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapList.json */ async function routeMapList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeTablesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/routeTablesCreateOrUpdateSample.js index 42262e00c24b..facb67de3279 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeTablesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeTablesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or updates a route table in a specified resource group. * * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreate.json */ async function createRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function createRouteTable() { * This sample demonstrates how to Create or updates a route table in a specified resource group. * * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreateWithRoute.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreateWithRoute.json */ async function createRouteTableWithRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeTablesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/routeTablesDeleteSample.js index ac6eea12710f..40216fef742e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeTablesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeTablesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified route table. * * @summary Deletes the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableDelete.json */ async function deleteRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeTablesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/routeTablesGetSample.js index 927fc1dd0007..29fee3a224a8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeTablesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeTablesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified route table. * * @summary Gets the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableGet.json */ async function getRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeTablesListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/routeTablesListAllSample.js index 6c1d909645c0..ae85cafcd064 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeTablesListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeTablesListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all route tables in a subscription. * * @summary Gets all route tables in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableListAll.json */ async function listAllRouteTables() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeTablesListSample.js b/sdk/network/arm-network/samples/v33/javascript/routeTablesListSample.js index 6501b43efdc3..972d69a27af6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeTablesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeTablesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all route tables in a resource group. * * @summary Gets all route tables in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableList.json */ async function listRouteTablesInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routeTablesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/routeTablesUpdateTagsSample.js index 7b59404920c3..c4016d478248 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routeTablesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routeTablesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a route table tags. * * @summary Updates a route table tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableUpdateTags.json */ async function updateRouteTableTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/routesCreateOrUpdateSample.js index 53af61765c4b..1c5f2a3825b0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a route in the specified route table. * * @summary Creates or updates a route in the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteCreate.json */ async function createRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/routesDeleteSample.js index 1222f097f728..7cb2953cb429 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified route from a route table. * * @summary Deletes the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteDelete.json */ async function deleteRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/routesGetSample.js index ca3c80eec56f..30254167726f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified route from a route table. * * @summary Gets the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteGet.json */ async function getRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routesListSample.js b/sdk/network/arm-network/samples/v33/javascript/routesListSample.js index d3ee266a961b..35ac1c3e17c6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all routes in a route table. * * @summary Gets all routes in a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteList.json */ async function listRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routingIntentCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/routingIntentCreateOrUpdateSample.js index d978ec8e2ce7..437616ad10bf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingIntentCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingIntentCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. * * @summary Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentPut.json */ async function routeTablePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routingIntentDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/routingIntentDeleteSample.js index 9352a40076b0..91f57293e7be 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingIntentDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingIntentDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a RoutingIntent. * * @summary Deletes a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentDelete.json */ async function routeTableDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routingIntentGetSample.js b/sdk/network/arm-network/samples/v33/javascript/routingIntentGetSample.js index 3626a5d501fe..051c2c923930 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingIntentGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingIntentGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a RoutingIntent. * * @summary Retrieves the details of a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentGet.json */ async function routeTableGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routingIntentListSample.js b/sdk/network/arm-network/samples/v33/javascript/routingIntentListSample.js index 054d0a51ec4f..627b33622803 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingIntentListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingIntentListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of all RoutingIntent child resources of the VirtualHub. * * @summary Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentList.json */ async function routingIntentList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsCreateOrUpdateSample.js index 66c44aff039d..6a5bd3e04a3c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a routing rule collection. * * @summary Creates or updates a routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json */ async function createOrUpdateARoutingRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsDeleteSample.js index b3a2122d571e..531c4e394294 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes an routing rule collection. * * @summary Deletes an routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json */ async function deletesAnRoutingRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsGetSample.js index eb014e358e64..c516da20c4fd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a network manager routing configuration rule collection. * * @summary Gets a network manager routing configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json */ async function getsRoutingRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsListSample.js index 3469d1014fb5..cfb0582f7448 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingRuleCollectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the rule collections in a routing configuration, in a paginated format. * * @summary Lists all the rule collections in a routing configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionList.json */ async function listRoutingRuleCollections() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/routingRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/routingRulesCreateOrUpdateSample.js index 1d3e101f11f7..205627822fce 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingRulesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingRulesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an routing rule. * * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json */ async function createADefaultRoutingRule() { const subscriptionId = @@ -48,7 +48,7 @@ async function createADefaultRoutingRule() { * This sample demonstrates how to Creates or updates an routing rule. * * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json */ async function createAnRoutingRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/routingRulesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/routingRulesDeleteSample.js index 91f59eb63009..79fb3a430c7e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingRulesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingRulesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a routing rule. * * @summary Deletes a routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleDelete.json */ async function deletesARoutingRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/routingRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/routingRulesGetSample.js index 23779dd4dd7d..d0748043eff2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a network manager routing configuration routing rule. * * @summary Gets a network manager routing configuration routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleGet.json */ async function getsRoutingRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/routingRulesListSample.js b/sdk/network/arm-network/samples/v33/javascript/routingRulesListSample.js index 739c3aff9747..f189868737bc 100644 --- a/sdk/network/arm-network/samples/v33/javascript/routingRulesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/routingRulesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all network manager routing configuration routing rules. * * @summary List all network manager routing configuration routing rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleList.json */ async function listRoutingRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/sample.env b/sdk/network/arm-network/samples/v33/javascript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/network/arm-network/samples/v33/javascript/sample.env +++ b/sdk/network/arm-network/samples/v33/javascript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsCreateOrUpdateSample.js index 4f1f020a7d94..0ef48bd15370 100644 --- a/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates scope connection from Network Manager * * @summary Creates or updates scope connection from Network Manager - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionPut.json */ async function createOrUpdateNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsDeleteSample.js index 47f623c7afaa..f1f2b5c528f2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete the pending scope connection created by this network manager. * * @summary Delete the pending scope connection created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionDelete.json */ async function deleteNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsGetSample.js index f58eb5652dbf..88e88bc287df 100644 --- a/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get specified scope connection created by this Network Manager. * * @summary Get specified scope connection created by this Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionGet.json */ async function getNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsListSample.js index 01fc8f0366b8..7daba7042431 100644 --- a/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/scopeConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all scope connections created by this network manager. * * @summary List all scope connections created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionList.json */ async function listNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsCreateOrUpdateSample.js index 5d430d87fcac..70a39441d22c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsCreateOrUpdateSample.js @@ -16,7 +16,35 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a network manager security admin configuration. * * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json + */ +async function createManualModeSecurityAdminConfiguration() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const configurationName = "myTestSecurityConfig"; + const securityAdminConfiguration = { + description: + "A configuration which will update any network groups ip addresses at commit times.", + networkGroupAddressSpaceAggregationOption: "Manual", + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.securityAdminConfigurations.createOrUpdate( + resourceGroupName, + networkManagerName, + configurationName, + securityAdminConfiguration, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a network manager security admin configuration. + * + * @summary Creates or updates a network manager security admin configuration. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut.json */ async function createNetworkManagerSecurityAdminConfiguration() { const subscriptionId = @@ -40,6 +68,7 @@ async function createNetworkManagerSecurityAdminConfiguration() { } async function main() { + createManualModeSecurityAdminConfiguration(); createNetworkManagerSecurityAdminConfiguration(); } diff --git a/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsDeleteSample.js index a47ec69c624a..24ff4f43271a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a network manager security admin configuration. * * @summary Deletes a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json */ async function deleteNetworkManagerSecurityAdminConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsGetSample.js index 461fbf1a19c9..f96f03b3d8b2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves a network manager security admin configuration. * * @summary Retrieves a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json */ async function getSecurityAdminConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsListSample.js index d6b66e429135..030f124329b7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityAdminConfigurationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the network manager security admin configurations in a network manager, in a paginated format. * * @summary Lists all the network manager security admin configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json */ async function listSecurityAdminConfigurationsInANetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersCreateOrUpdateSample.js index 70399da71eb7..0257af7ba4fa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified Security Partner Provider. * * @summary Creates or updates the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderPut.json */ async function createSecurityPartnerProvider() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersDeleteSample.js index 4bf79147913a..0ef2dc7eae82 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified Security Partner Provider. * * @summary Deletes the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderDelete.json */ async function deleteSecurityPartnerProvider() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersGetSample.js b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersGetSample.js index c4e68902f9fe..a8502e9e75cc 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Security Partner Provider. * * @summary Gets the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderGet.json */ async function getSecurityPartnerProvider() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersListByResourceGroupSample.js index 24013d5802ed..f862f2d597ba 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Security Partner Providers in a resource group. * * @summary Lists all Security Partner Providers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListByResourceGroup.json */ async function listAllSecurityPartnerProvidersForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersListSample.js b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersListSample.js index 3b6f456720e0..b212eff5cf46 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the Security Partner Providers in a subscription. * * @summary Gets all the Security Partner Providers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListBySubscription.json */ async function listAllSecurityPartnerProvidersForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersUpdateTagsSample.js index fc9b7b683cfc..cf0cf6725d9a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityPartnerProvidersUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates tags of a Security Partner Provider resource. * * @summary Updates tags of a Security Partner Provider resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderUpdateTags.json */ async function updateSecurityPartnerProviderTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/securityRulesCreateOrUpdateSample.js index 73f8dfd6437a..7e902ae9dc97 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityRulesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityRulesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a security rule in the specified network security group. * * @summary Creates or updates a security rule in the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleCreate.json */ async function createSecurityRule() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityRulesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/securityRulesDeleteSample.js index 62b2c4a1acac..9c0827e88b24 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityRulesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityRulesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified network security rule. * * @summary Deletes the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleDelete.json */ async function deleteNetworkSecurityRuleFromNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/securityRulesGetSample.js index 83008362a980..2c3d3e2e60a5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified network security rule. * * @summary Get the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleGet.json */ async function getNetworkSecurityRuleInNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityRulesListSample.js b/sdk/network/arm-network/samples/v33/javascript/securityRulesListSample.js index e125f95f105f..44b2b285c727 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityRulesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityRulesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all security rules in a network security group. * * @summary Gets all security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleList.json */ async function listNetworkSecurityRulesInNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsCreateOrUpdateSample.js index da8885353100..d39b6dc440d5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a network manager security user configuration. * * @summary Creates or updates a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json */ async function createNetworkManagerSecurityUserConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsDeleteSample.js index b73608d7c0aa..6b5872f32b84 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a network manager security user configuration. * * @summary Deletes a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json */ async function deleteNetworkManagerSecurityUserConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsGetSample.js index 61dcb6cf9a65..8079fbaeb0ce 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves a network manager security user configuration. * * @summary Retrieves a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json */ async function getSecurityUserConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsListSample.js index 39114b82fa0d..75ace5c16f5d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserConfigurationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the network manager security user configurations in a network manager, in a paginated format. * * @summary Lists all the network manager security user configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationList.json */ async function listSecurityUserConfigurationsInANetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js index 04b30049459d..eda39b2f4b53 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a security user rule collection. * * @summary Creates or updates a security user rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json */ async function createOrUpdateASecurityUserRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsDeleteSample.js index 6ceccfcaeed3..ce39bbc63dbc 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a Security User Rule collection. * * @summary Deletes a Security User Rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json */ async function deletesASecurityUserRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsGetSample.js index 0227606c9229..386fc414af77 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a network manager security user configuration rule collection. * * @summary Gets a network manager security user configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json */ async function getsSecurityUserRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsListSample.js index 6420b1b053db..c8965745a65c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserRuleCollectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the security user rule collections in a security configuration, in a paginated format. * * @summary Lists all the security user rule collections in a security configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json */ async function listRuleCollectionsInASecurityConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserRulesCreateOrUpdateSample.js index f396ebfb74ec..416b6a9593cb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserRulesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserRulesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a security user rule. * * @summary Creates or updates a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRulePut.json */ async function createASecurityUserRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserRulesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserRulesDeleteSample.js index 51f60453f9dc..a22e30238bd7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserRulesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserRulesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a security user rule. * * @summary Deletes a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleDelete.json */ async function deleteASecurityUserRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserRulesGetSample.js index 92d81befcbe7..018b21231c44 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a security user rule. * * @summary Gets a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleGet.json */ async function getsASecurityUserRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/securityUserRulesListSample.js b/sdk/network/arm-network/samples/v33/javascript/securityUserRulesListSample.js index cbe864f39c49..11a7918a09ce 100644 --- a/sdk/network/arm-network/samples/v33/javascript/securityUserRulesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/securityUserRulesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Security User Rules in a rule collection. * * @summary Lists all Security User Rules in a rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleList.json */ async function listSecurityUserRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceAssociationLinksListSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceAssociationLinksListSample.js index 705fe32f3cfe..68841127e6da 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceAssociationLinksListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceAssociationLinksListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of service association links for a subnet. * * @summary Gets a list of service association links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json */ async function getServiceAssociationLinks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js index 34889ee2678e..2a1e6dd626f7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a service Endpoint Policies. * * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreate.json */ async function createServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function createServiceEndpointPolicy() { * This sample demonstrates how to Creates or updates a service Endpoint Policies. * * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreateWithDefinition.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreateWithDefinition.json */ async function createServiceEndpointPolicyWithDefinition() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesDeleteSample.js index 0a54df3ead4d..8f8be90e1011 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified service endpoint policy. * * @summary Deletes the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDelete.json */ async function deleteServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesGetSample.js index 6c1e0184ba77..53d29b02b25a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified service Endpoint Policies in a specified resource group. * * @summary Gets the specified service Endpoint Policies in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyGet.json */ async function getServiceEndPointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesListByResourceGroupSample.js index e9cf929cf021..d9254eb4d8c9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all service endpoint Policies in a resource group. * * @summary Gets all service endpoint Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyList.json */ async function listResourceGroupServiceEndpointPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesListSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesListSample.js index eec1b031bab5..03d7d263a0b4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the service endpoint policies in a subscription. * * @summary Gets all the service endpoint policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyListAll.json */ async function listAllServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesUpdateTagsSample.js index 0f1ee7c2d4e6..bccfa11ea67a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPoliciesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates tags of a service endpoint policy. * * @summary Updates tags of a service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyUpdateTags.json */ async function updateServiceEndpointPolicyTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js index e39554ef48a8..6eaa71e6b074 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a service endpoint policy definition in the specified service endpoint policy. * * @summary Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json */ async function createServiceEndpointPolicyDefinition() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js index 18b55db91b37..0d450b794993 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified ServiceEndpoint policy definitions. * * @summary Deletes the specified ServiceEndpoint policy definitions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json */ async function deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsGetSample.js index c3dca0bd5607..30ea4c78ebe9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the specified service endpoint policy definitions from service endpoint policy. * * @summary Get the specified service endpoint policy definitions from service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionGet.json */ async function getServiceEndpointDefinitionInServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js index 95e2fe7046d5..2954effe9091 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceEndpointPolicyDefinitionsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all service endpoint policy definitions in a service end point policy. * * @summary Gets all service endpoint policy definitions in a service end point policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionList.json */ async function listServiceEndpointDefinitionsInServiceEndPointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceTagInformationListSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceTagInformationListSample.js index a54129866966..1c0c9dc21e83 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceTagInformationListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceTagInformationListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of service tag information resources with pagination. * * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResult.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResult.json */ async function getListOfServiceTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -34,7 +34,7 @@ async function getListOfServiceTags() { * This sample demonstrates how to Gets a list of service tag information resources with pagination. * * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json */ async function getListOfServiceTagsWithNoAddressPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -56,7 +56,7 @@ async function getListOfServiceTagsWithNoAddressPrefixes() { * This sample demonstrates how to Gets a list of service tag information resources with pagination. * * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResultWithTagname.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResultWithTagname.json */ async function getListOfServiceTagsWithTagName() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/serviceTagsListSample.js b/sdk/network/arm-network/samples/v33/javascript/serviceTagsListSample.js index c7f5d94f35b2..07f279647c39 100644 --- a/sdk/network/arm-network/samples/v33/javascript/serviceTagsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/serviceTagsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of service tag information resources. * * @summary Gets a list of service tag information resources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagsList.json */ async function getListOfServiceTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/staticCidrsCreateSample.js b/sdk/network/arm-network/samples/v33/javascript/staticCidrsCreateSample.js new file mode 100644 index 000000000000..97d8c5bb4495 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/staticCidrsCreateSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates/Updates the Static CIDR resource. + * + * @summary Creates/Updates the Static CIDR resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Create.json + */ +async function staticCidrsCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const staticCidrName = "TestStaticCidr"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.staticCidrs.create( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + ); + console.log(result); +} + +async function main() { + staticCidrsCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/staticCidrsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/staticCidrsDeleteSample.js new file mode 100644 index 000000000000..c663b040b5bc --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/staticCidrsDeleteSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Delete the Static CIDR resource. + * + * @summary Delete the Static CIDR resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Delete.json + */ +async function staticCidrsDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const staticCidrName = "TestStaticCidr"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.staticCidrs.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + ); + console.log(result); +} + +async function main() { + staticCidrsDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/staticCidrsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/staticCidrsGetSample.js new file mode 100644 index 000000000000..e0fe13bc4bf7 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/staticCidrsGetSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the specific Static CIDR resource. + * + * @summary Gets the specific Static CIDR resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Get.json + */ +async function staticCidrsGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const staticCidrName = "TestStaticCidr"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.staticCidrs.get( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + ); + console.log(result); +} + +async function main() { + staticCidrsGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/staticCidrsListSample.js b/sdk/network/arm-network/samples/v33/javascript/staticCidrsListSample.js new file mode 100644 index 000000000000..8cc15d199d10 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/staticCidrsListSample.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets list of Static CIDR resources at Network Manager level. + * + * @summary Gets list of Static CIDR resources at Network Manager level. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_List.json + */ +async function staticCidrsList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.staticCidrs.list(resourceGroupName, networkManagerName, poolName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + staticCidrsList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/staticMembersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/staticMembersCreateOrUpdateSample.js index 116d5540fa1f..715e407087fa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/staticMembersCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/staticMembersCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a static member. * * @summary Creates or updates a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberPut.json */ async function staticMemberPut() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/staticMembersDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/staticMembersDeleteSample.js index 5f61e35ac45e..d2586658afae 100644 --- a/sdk/network/arm-network/samples/v33/javascript/staticMembersDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/staticMembersDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a static member. * * @summary Deletes a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberDelete.json */ async function staticMembersDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/staticMembersGetSample.js b/sdk/network/arm-network/samples/v33/javascript/staticMembersGetSample.js index c89f7ee1dc6a..483ac3677a0d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/staticMembersGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/staticMembersGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified static member. * * @summary Gets the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberGet.json */ async function staticMembersGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/staticMembersListSample.js b/sdk/network/arm-network/samples/v33/javascript/staticMembersListSample.js index f97fb71bf765..d4cd6d12ebf8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/staticMembersListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/staticMembersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists the specified static member. * * @summary Lists the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberList.json */ async function staticMembersList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/subnetsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/subnetsCreateOrUpdateSample.js index ab5b243584f0..13e6ded22287 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subnetsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subnetsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreate.json */ async function createSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +39,7 @@ async function createSubnet() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateWithDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateWithDelegation.json */ async function createSubnetWithADelegation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -62,7 +62,7 @@ async function createSubnetWithADelegation() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateServiceEndpoint.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateServiceEndpoint.json */ async function createSubnetWithServiceEndpoints() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -88,7 +88,7 @@ async function createSubnetWithServiceEndpoints() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json */ async function createSubnetWithServiceEndpointsWithNetworkIdentifier() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -121,7 +121,7 @@ async function createSubnetWithServiceEndpointsWithNetworkIdentifier() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateWithSharingScope.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateWithSharingScope.json */ async function createSubnetWithSharingScope() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/subnetsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/subnetsDeleteSample.js index b61d75086a4b..2a6bebf402cd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subnetsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subnetsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified subnet. * * @summary Deletes the specified subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetDelete.json */ async function deleteSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/subnetsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/subnetsGetSample.js index 0cd3edf9f783..63f96938d198 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subnetsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subnetsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. * * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGet.json */ async function getSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -33,7 +33,7 @@ async function getSubnet() { * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. * * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGetWithDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGetWithDelegation.json */ async function getSubnetWithADelegation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -50,7 +50,7 @@ async function getSubnetWithADelegation() { * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. * * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGetWithSharingScope.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGetWithSharingScope.json */ async function getSubnetWithSharingScope() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/subnetsListSample.js b/sdk/network/arm-network/samples/v33/javascript/subnetsListSample.js index c54ce89d38a0..f4c1a6e4a0a2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subnetsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subnetsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all subnets in a virtual network. * * @summary Gets all subnets in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetList.json */ async function listSubnets() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/subnetsPrepareNetworkPoliciesSample.js b/sdk/network/arm-network/samples/v33/javascript/subnetsPrepareNetworkPoliciesSample.js index bdfcbcfa2247..ef327c00b228 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subnetsPrepareNetworkPoliciesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subnetsPrepareNetworkPoliciesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Prepares a subnet by applying network intent policies. * * @summary Prepares a subnet by applying network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetPrepareNetworkPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetPrepareNetworkPolicies.json */ async function prepareNetworkPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/subnetsUnprepareNetworkPoliciesSample.js b/sdk/network/arm-network/samples/v33/javascript/subnetsUnprepareNetworkPoliciesSample.js index e1df0a7121d0..d133d5736ded 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subnetsUnprepareNetworkPoliciesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subnetsUnprepareNetworkPoliciesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Unprepares a subnet by removing network intent policies. * * @summary Unprepares a subnet by removing network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetUnprepareNetworkPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetUnprepareNetworkPolicies.json */ async function unprepareNetworkPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js index 8aea3f3dd56a..31e978f13a80 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create a network manager connection on this subscription. * * @summary Create a network manager connection on this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionPut.json */ async function createOrUpdateSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js index 53431c216a5b..723d17da9827 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete specified connection created by this subscription. * * @summary Delete specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json */ async function deleteSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsGetSample.js index ca1a8d20dbc7..464660f9eefc 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a specified connection created by this subscription. * * @summary Get a specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionGet.json */ async function getSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsListSample.js index 983d5d634516..76765ed2b0aa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/subscriptionNetworkManagerConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all network manager connections created by this subscription. * * @summary List all network manager connections created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionList.json */ async function listSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/supportedSecurityProvidersSample.js b/sdk/network/arm-network/samples/v33/javascript/supportedSecurityProvidersSample.js index f004d34a9884..9d74756f2910 100644 --- a/sdk/network/arm-network/samples/v33/javascript/supportedSecurityProvidersSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/supportedSecurityProvidersSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gives the supported security providers for the virtual wan. * * @summary Gives the supported security providers for the virtual wan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWanSupportedSecurityProviders.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWanSupportedSecurityProviders.json */ async function supportedSecurityProviders() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/usagesListSample.js b/sdk/network/arm-network/samples/v33/javascript/usagesListSample.js index a2af257aaaf9..28f8612c5e38 100644 --- a/sdk/network/arm-network/samples/v33/javascript/usagesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/usagesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List network usages for a subscription. * * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageList.json */ async function listUsages() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -34,7 +34,7 @@ async function listUsages() { * This sample demonstrates how to List network usages for a subscription. * * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageListSpacedLocation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageListSpacedLocation.json */ async function listUsagesSpacedLocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesCreateSample.js b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesCreateSample.js new file mode 100644 index 000000000000..2299a34a7fa1 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesCreateSample.js @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates Verifier Workspace. + * + * @summary Creates Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePut.json + */ +async function verifierWorkspaceCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const body = { + location: "eastus", + properties: { description: "A sample workspace" }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.create( + resourceGroupName, + networkManagerName, + workspaceName, + body, + ); + console.log(result); +} + +async function main() { + verifierWorkspaceCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesDeleteSample.js new file mode 100644 index 000000000000..46122b7ff266 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesDeleteSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes Verifier Workspace. + * + * @summary Deletes Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceDelete.json + */ +async function verifierWorkspaceDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + workspaceName, + ); + console.log(result); +} + +async function main() { + verifierWorkspaceDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesGetSample.js new file mode 100644 index 000000000000..58c524c84609 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesGetSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets Verifier Workspace. + * + * @summary Gets Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceGet.json + */ +async function verifierWorkspaceGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.get( + resourceGroupName, + networkManagerName, + workspaceName, + ); + console.log(result); +} + +async function main() { + verifierWorkspaceGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesListSample.js b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesListSample.js new file mode 100644 index 000000000000..09275985110e --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets list of Verifier Workspaces. + * + * @summary Gets list of Verifier Workspaces. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceList.json + */ +async function verifierWorkspaceList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.verifierWorkspaces.list(resourceGroupName, networkManagerName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + verifierWorkspaceList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesUpdateSample.js new file mode 100644 index 000000000000..b84c0dc1eb33 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/verifierWorkspacesUpdateSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Updates Verifier Workspace. + * + * @summary Updates Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePatch.json + */ +async function verifierWorkspacePatch() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.update( + resourceGroupName, + networkManagerName, + workspaceName, + ); + console.log(result); +} + +async function main() { + verifierWorkspacePatch(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/vipSwapCreateSample.js b/sdk/network/arm-network/samples/v33/javascript/vipSwapCreateSample.js index 0272b44a3688..3f364cd51eac 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vipSwapCreateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vipSwapCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Performs vip swap operation on swappable cloud services. * * @summary Performs vip swap operation on swappable cloud services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapPut.json */ async function putVipSwapOperation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vipSwapGetSample.js b/sdk/network/arm-network/samples/v33/javascript/vipSwapGetSample.js index 3817967f828a..fb9243b1422b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vipSwapGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vipSwapGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production * * @summary Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapGet.json */ async function getSwapResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vipSwapListSample.js b/sdk/network/arm-network/samples/v33/javascript/vipSwapListSample.js index 2b17effcde00..072c53a1eff5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vipSwapListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vipSwapListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production * * @summary Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapList.json */ async function getSwapResourceList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesCreateOrUpdateSample.js index 4dfed96e0df6..9496fe987324 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Site. * * @summary Creates or updates the specified Network Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSitePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSitePut.json */ async function createNetworkVirtualApplianceSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesDeleteSample.js index 461bd015fc47..aa2b5a9e06f3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified site from a Virtual Appliance. * * @summary Deletes the specified site from a Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteDelete.json */ async function deleteNetworkVirtualApplianceSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesGetSample.js index 134789c25e7a..9fc740f2b037 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Virtual Appliance Site. * * @summary Gets the specified Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteGet.json */ async function getNetworkVirtualApplianceSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesListSample.js index 42f6007e53b5..04e7a8d1db67 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSitesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. * * @summary Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteList.json */ async function listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSkusGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSkusGetSample.js index 02792b35f58e..2f56c0288b33 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSkusGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSkusGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves a single available sku for network virtual appliance. * * @summary Retrieves a single available sku for network virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuGet.json */ async function networkVirtualApplianceSkuGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSkusListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSkusListSample.js index b8e383168c2f..370ef3d63e1a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSkusListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualApplianceSkusListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List all SKUs available for a virtual appliance. * * @summary List all SKUs available for a virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuList.json */ async function networkVirtualApplianceSkuListResult() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js index c2fc5261a46d..f7e6e5eedb5a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. * * @summary Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionPut.json */ async function virtualHubRouteTableV2Put() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionDeleteSample.js index af446d1974d4..a613135444a9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a VirtualHubBgpConnection. * * @summary Deletes a VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionDelete.json */ async function virtualHubRouteTableV2Delete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionGetSample.js index afa09eb650d2..acd50bd4a9be 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a Virtual Hub Bgp Connection. * * @summary Retrieves the details of a Virtual Hub Bgp Connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionGet.json */ async function virtualHubVirtualHubRouteTableV2Get() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js index b65674387cbd..33439d72ea66 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListAdvertisedRoutesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. * * @summary Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json */ async function virtualRouterPeerListAdvertisedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js index b06293ae3b60..4feae227e98f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListLearnedRoutesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection has learned. * * @summary Retrieves a list of routes the virtual hub bgp connection has learned. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListLearnedRoute.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListLearnedRoute.json */ async function virtualRouterPeerListLearnedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListSample.js index 2cc67e6e1ee5..6335e0db6cc9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubBgpConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of all VirtualHubBgpConnections. * * @summary Retrieves the details of all VirtualHubBgpConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionList.json */ async function virtualHubRouteTableV2List() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js index 756f061797fd..4719ad0612e2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. * * @summary Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationPut.json */ async function virtualHubIPConfigurationPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationDeleteSample.js index 5508b687854f..e6271e36cbc8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a VirtualHubIpConfiguration. * * @summary Deletes a VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationDelete.json */ async function virtualHubIPConfigurationDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationGetSample.js index 433cdc659463..bafc43b32bb2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a Virtual Hub Ip configuration. * * @summary Retrieves the details of a Virtual Hub Ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationGet.json */ async function virtualHubVirtualHubRouteTableV2Get() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationListSample.js index 84465b1884fd..15a344e40c40 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubIPConfigurationListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of all VirtualHubIpConfigurations. * * @summary Retrieves the details of all VirtualHubIpConfigurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationList.json */ async function virtualHubRouteTableV2List() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js index e5d55f767b07..4472a3e97f4a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. * * @summary Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Put.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Put.json */ async function virtualHubRouteTableV2Put() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SDeleteSample.js index b0632d822a33..3a51f74b81f0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a VirtualHubRouteTableV2. * * @summary Deletes a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Delete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Delete.json */ async function virtualHubRouteTableV2Delete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SGetSample.js index a49a7df23404..031b0faa7c55 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a VirtualHubRouteTableV2. * * @summary Retrieves the details of a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Get.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Get.json */ async function virtualHubVirtualHubRouteTableV2Get() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SListSample.js index 4f0166f1e12c..8d8b4f81f4db 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubRouteTableV2SListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of all VirtualHubRouteTableV2s. * * @summary Retrieves the details of all VirtualHubRouteTableV2s. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2List.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2List.json */ async function virtualHubRouteTableV2List() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubsCreateOrUpdateSample.js index 30d9b8f5d67d..0f33d3eb6afe 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. * * @summary Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubPut.json */ async function virtualHubPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubsDeleteSample.js index de186985f82d..8f1f2a4f588f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a VirtualHub. * * @summary Deletes a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubDelete.json */ async function virtualHubDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js index 2f2158f08466..953d1aa0c7a6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetEffectiveVirtualHubRoutesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . * * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForConnection.json */ async function effectiveRoutesForAConnectionResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -44,7 +44,7 @@ async function effectiveRoutesForAConnectionResource() { * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . * * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForRouteTable.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForRouteTable.json */ async function effectiveRoutesForARouteTableResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -72,7 +72,7 @@ async function effectiveRoutesForARouteTableResource() { * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . * * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForVirtualHub.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForVirtualHub.json */ async function effectiveRoutesForTheVirtualHub() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetInboundRoutesSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetInboundRoutesSample.js index ca453098e2d4..d24198c0877a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetInboundRoutesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetInboundRoutesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the inbound routes configured for the Virtual Hub on a particular connection. * * @summary Gets the inbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetInboundRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetInboundRoutes.json */ async function inboundRoutesForTheVirtualHubOnAParticularConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetOutboundRoutesSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetOutboundRoutesSample.js index 9586d7534837..5beb87fb0dba 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetOutboundRoutesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetOutboundRoutesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the outbound routes configured for the Virtual Hub on a particular connection. * * @summary Gets the outbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetOutboundRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetOutboundRoutes.json */ async function outboundRoutesForTheVirtualHubOnAParticularConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetSample.js index 078548c6e4c1..a03da985b4fa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a VirtualHub. * * @summary Retrieves the details of a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubGet.json */ async function virtualHubGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubsListByResourceGroupSample.js index 59db329132cf..e9ed9dd98709 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubsListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the VirtualHubs in a resource group. * * @summary Lists all the VirtualHubs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubListByResourceGroup.json */ async function virtualHubListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubsListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubsListSample.js index 124a257eded3..a2664ee633e0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the VirtualHubs in a subscription. * * @summary Lists all the VirtualHubs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubList.json */ async function virtualHubList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualHubsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualHubsUpdateTagsSample.js index f896543f4523..476d36b3e3c8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualHubsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualHubsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates VirtualHub tags. * * @summary Updates VirtualHub tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubUpdateTags.json */ async function virtualHubUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js index 5474667cf693..097e11fc4183 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a virtual network gateway connection in the specified resource group. * * @summary Creates or updates a virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionCreate.json */ async function createVirtualNetworkGatewayConnectionS2S() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsDeleteSample.js index d0d784ca83b6..5504962aec62 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified virtual network Gateway connection. * * @summary Deletes the specified virtual network Gateway connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionDelete.json */ async function deleteVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js index aeb9012e9d14..2e1e84f07090 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetIkeSasSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. * * @summary Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json */ async function getVirtualNetworkGatewayConnectionIkeSa() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetSample.js index 148b9164ba07..699c04c2f500 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified virtual network gateway connection by resource group. * * @summary Gets the specified virtual network gateway connection by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGet.json */ async function getVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js index bc79074c0fc6..c3fa2b235347 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsGetSharedKeySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. * * @summary The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json */ async function getVirtualNetworkGatewayConnectionSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsListSample.js index ee84a254f9d1..5effa3dc5fcf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. * * @summary The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionsList.json */ async function listVirtualNetworkGatewayConnectionsinResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js index 6c424965f5bb..211eada14a5f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsResetConnectionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Resets the virtual network gateway connection specified. * * @summary Resets the virtual network gateway connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionReset.json */ async function resetVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js index 86684fe679a7..125b10832130 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsResetSharedKeySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * * @summary The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json */ async function resetVirtualNetworkGatewayConnectionSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js index 1bc25c54a7af..b052f3f3c892 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsSetSharedKeySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * * @summary The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json */ async function setVirtualNetworkGatewayConnectionSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js index a23026977386..e2b1fa9dcf35 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsStartPacketCaptureSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. * * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -41,7 +41,7 @@ async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. * * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json */ async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js index 2d1be71de49e..21d136e8d1e2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsStopPacketCaptureSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Stops packet capture on virtual network gateway connection in the specified resource group. * * @summary Stops packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json */ async function stopPacketCaptureOnVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js index 32e6288685c2..350332738472 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayConnectionsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a virtual network gateway connection tags. * * @summary Updates a virtual network gateway connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json */ async function updateVirtualNetworkGatewayConnectionTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js index 43f067dc9d02..9cc3cb1c00c8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. * * @summary Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRulePut.json */ async function virtualNetworkGatewayNatRulePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesDeleteSample.js index 4f9c20a83623..b22ff0e7b17f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a nat rule. * * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json */ async function virtualNetworkGatewayNatRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesGetSample.js index f0cbc3e1a33f..38c0c3f7b3e8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a nat rule. * * @summary Retrieves the details of a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleGet.json */ async function virtualNetworkGatewayNatRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js index ce643cd811b5..17fb5b8099c0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves all nat rules for a particular virtual network gateway. * * @summary Retrieves all nat rules for a particular virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleList.json */ async function virtualNetworkGatewayNatRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js index c18f3d76bfc0..df69bdb22232 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. * * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdate.json */ async function updateVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -95,7 +95,7 @@ async function updateVirtualNetworkGateway() { * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. * * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkScalableGatewayUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayUpdate.json */ async function updateVirtualNetworkScalableGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysDeleteSample.js index 5018f4271188..ee7b3b11c63c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified virtual network gateway. * * @summary Deletes the specified virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayDelete.json */ async function deleteVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js index c28176080539..5014f2fa84f1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Disconnect vpn connections of virtual network gateway in the specified resource group. * * @summary Disconnect vpn connections of virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json */ async function disconnectVpnConnectionsFromVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js index 6949bf006fe0..04aecd3ffddb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGenerateVpnProfileSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @summary Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json */ async function generateVirtualNetworkGatewayVpnProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js index acdf6e6dc7cc..23c82488cb0c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGeneratevpnclientpackageSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. * * @summary Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json */ async function generateVpnClientPackage() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js index 3c7946a7b6ac..db48da73c88e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetAdvertisedRoutesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @summary This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json */ async function getVirtualNetworkGatewayAdvertisedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js index d59f74ae901d..58bd835929ab 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetBgpPeerStatusSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @summary The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json */ async function getVirtualNetworkGatewayBgpPeerStatus() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js new file mode 100644 index 000000000000..bbff80ba9125 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to This operation retrieves the details of all the failover tests performed on the gateway for different peering locations + * + * @summary This operation retrieves the details of all the failover tests performed on the gateway for different peering locations + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json + */ +async function virtualNetworkGatewayGetFailoverAllTestsDetails() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const typeParam = "SingleSiteFailover"; + const fetchLatest = true; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait( + resourceGroupName, + virtualNetworkGatewayName, + typeParam, + fetchLatest, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayGetFailoverAllTestsDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js new file mode 100644 index 000000000000..dd040e6f884e --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid + * + * @summary This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json + */ +async function virtualNetworkGatewayGetFailoverSingleTestDetails() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const peeringLocation = "Vancouver"; + const failoverTestId = "fe458ae8-d2ae-4520-a104-44bc233bde7e"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait( + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + failoverTestId, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayGetFailoverSingleTestDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js index 682ccdf0d908..dbfe3494c310 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetLearnedRoutesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @summary This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json */ async function getVirtualNetworkGatewayLearnedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetSample.js index 877ea2f3d7b4..3e4d8709dabf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified virtual network gateway by resource group. * * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGet.json */ async function getVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -35,7 +35,7 @@ async function getVirtualNetworkGateway() { * This sample demonstrates how to Gets the specified virtual network gateway by resource group. * * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkScalableGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayGet.json */ async function getVirtualNetworkScalableGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js index 4cc6408b0546..9481b186b6f8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. * * @summary Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json */ async function getVirtualNetworkGatewayVpnProfilePackageUrl() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js index 716b87936c35..f2491a61ae08 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. * * @summary Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json */ async function getVirtualNetworkGatewayVpnclientConnectionHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js index 0bb0fa03205d..9846458d6daa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. * * @summary The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json */ async function getVirtualNetworkGatewayVpnClientIpsecParameters() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysListConnectionsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysListConnectionsSample.js index 2d6008a80ed0..3bc2c4f1f17a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysListConnectionsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysListConnectionsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the connections in a virtual network gateway. * * @summary Gets all the connections in a virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysListConnections.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysListConnections.json */ async function virtualNetworkGatewaysListConnections() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysListSample.js index 83eb103b8e43..0a2e7412984b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all virtual network gateways by resource group. * * @summary Gets all virtual network gateways by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayList.json */ async function listVirtualNetworkGatewaysinResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetSample.js index f49d0b45959e..33775175a874 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Resets the primary of the virtual network gateway in the specified resource group. * * @summary Resets the primary of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayReset.json */ async function resetVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js index 02dfa6b18e07..3daec3186001 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysResetVpnClientSharedKeySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Resets the VPN client shared key of the virtual network gateway in the specified resource group. * * @summary Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json */ async function resetVpnClientSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js index 3490b3e3f1de..d85ea1098712 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. * * @summary The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json */ async function setVirtualNetworkGatewayVpnClientIpsecParameters() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js new file mode 100644 index 000000000000..7e206acfdb6b --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to This operation starts failover simulation on the gateway for the specified peering location + * + * @summary This operation starts failover simulation on the gateway for the specified peering location + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json + */ +async function virtualNetworkGatewayStartSiteFailoverSimulation() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const peeringLocation = "Vancouver"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayStartSiteFailoverSimulation(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js index 2a01873770eb..25f1990be7cd 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStartPacketCaptureSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. * * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVirtualNetworkGatewayWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -43,7 +43,7 @@ async function startPacketCaptureOnVirtualNetworkGatewayWithFilter() { * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. * * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCapture.json */ async function startPacketCaptureOnVirtualNetworkGatewayWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js new file mode 100644 index 000000000000..ee07f075f137 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { NetworkManagementClient } = require("@azure/arm-network"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to This operation stops failover simulation on the gateway for the specified peering location + * + * @summary This operation stops failover simulation on the gateway for the specified peering location + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json + */ +async function virtualNetworkGatewayStopSiteFailoverSimulation() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const stopParameters = { + peeringLocation: "Vancouver", + wasSimulationSuccessful: true, + details: [ + { + failoverConnectionName: "conn1", + failoverLocation: "Denver", + isVerified: false, + }, + { + failoverConnectionName: "conn2", + failoverLocation: "Amsterdam", + isVerified: true, + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName, + virtualNetworkGatewayName, + stopParameters, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayStopSiteFailoverSimulation(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js index 141b8190713c..ec86eab35ed8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysStopPacketCaptureSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Stops packet capture on virtual network gateway in the specified resource group. * * @summary Stops packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json */ async function stopPacketCaptureOnVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js index 3b3a40f7364c..bca3b788b5d4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysSupportedVpnDevicesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a xml format representation for supported vpn devices. * * @summary Gets a xml format representation for supported vpn devices. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json */ async function listVirtualNetworkGatewaySupportedVpnDevices() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysUpdateTagsSample.js index d6e6ffa690d5..88ed23b9980e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a virtual network gateway tags. * * @summary Updates a virtual network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdateTags.json */ async function updateVirtualNetworkGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js index f3aa79d232aa..79c7b9cc07b6 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a xml format representation for vpn device configuration script. * * @summary Gets a xml format representation for vpn device configuration script. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json */ async function getVpnDeviceConfigurationScript() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js index 704a410a64d5..26779b00438a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json */ async function createV6SubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -51,7 +51,7 @@ async function createV6SubnetPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringCreate.json */ async function createPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -82,7 +82,7 @@ async function createPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json */ async function createPeeringWithRemoteVirtualNetworkEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -113,7 +113,7 @@ async function createPeeringWithRemoteVirtualNetworkEncryption() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringCreate.json */ async function createSubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -148,7 +148,7 @@ async function createSubnetPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringSync.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringSync.json */ async function syncPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -184,7 +184,7 @@ async function syncPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringSync.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringSync.json */ async function syncV6SubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -222,7 +222,7 @@ async function syncV6SubnetPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringSync.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringSync.json */ async function syncSubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsDeleteSample.js index df9510706fc4..867de73a333e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified virtual network peering. * * @summary Deletes the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringDelete.json */ async function deletePeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsGetSample.js index 03516467e44c..f65a26128b20 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json */ async function getV6SubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getV6SubnetPeering() { * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringGet.json */ async function getPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -58,7 +58,7 @@ async function getPeering() { * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json */ async function getPeeringWithRemoteVirtualNetworkEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -79,7 +79,7 @@ async function getPeeringWithRemoteVirtualNetworkEncryption() { * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringGet.json */ async function getSubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsListSample.js index 54b10a5ab292..3b61913f8497 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkPeeringsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all virtual network peerings in a virtual network. * * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringList.json */ async function listPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -38,7 +38,7 @@ async function listPeerings() { * This sample demonstrates how to Gets all virtual network peerings in a virtual network. * * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json */ async function listPeeringsWithRemoteVirtualNetworkEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsCreateOrUpdateSample.js index 3a5cd26cf272..77c2dbb21027 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a Virtual Network Tap. * * @summary Creates or updates a Virtual Network Tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapCreate.json */ async function createVirtualNetworkTap() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsDeleteSample.js index 36c33e023dfb..be6caa91fe0e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified virtual network tap. * * @summary Deletes the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapDelete.json */ async function deleteVirtualNetworkTapResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsGetSample.js index e7ac5d173898..56ef83acd941 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about the specified virtual network tap. * * @summary Gets information about the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapGet.json */ async function getVirtualNetworkTap() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsListAllSample.js index bb9097d2c78d..8df0b9df6409 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. * * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapListAll.json */ async function listAllVirtualNetworkTaps() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsListByResourceGroupSample.js index 77b0c1c138d5..2bcdb5e27b23 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. * * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapList.json */ async function listVirtualNetworkTapsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsUpdateTagsSample.js index 6dfb69f2491f..ed430f14e87f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworkTapsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates an VirtualNetworkTap tags. * * @summary Updates an VirtualNetworkTap tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapUpdateTags.json */ async function updateVirtualNetworkTapTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js index fa8443fa3831..2992138cd608 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksCheckIPAddressAvailabilitySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Checks whether a private IP address is available for use. * * @summary Checks whether a private IP address is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json */ async function checkIPAddressAvailability() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksCreateOrUpdateSample.js index 3c698a38bac3..638774ec098d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreate.json */ async function createVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -41,7 +41,7 @@ async function createVirtualNetwork() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateWithBgpCommunities.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithBgpCommunities.json */ async function createVirtualNetworkWithBgpCommunities() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -67,7 +67,7 @@ async function createVirtualNetworkWithBgpCommunities() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnetWithDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnetWithDelegation.json */ async function createVirtualNetworkWithDelegatedSubnets() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -103,7 +103,7 @@ async function createVirtualNetworkWithDelegatedSubnets() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateWithEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithEncryption.json */ async function createVirtualNetworkWithEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -129,7 +129,49 @@ async function createVirtualNetworkWithEncryption() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateServiceEndpoints.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithIpamPool.json + */ +async function createVirtualNetworkWithIpamPool() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkName = "test-vnet"; + const parameters = { + addressSpace: { + ipamPoolPrefixAllocations: [ + { + id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", + numberOfIpAddresses: "65536", + }, + ], + }, + location: "eastus", + subnets: [ + { + name: "test-1", + ipamPoolPrefixAllocations: [ + { + id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", + numberOfIpAddresses: "80", + }, + ], + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( + resourceGroupName, + virtualNetworkName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * + * @summary Creates or updates a virtual network in the specified resource group. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateServiceEndpoints.json */ async function createVirtualNetworkWithServiceEndpoints() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -160,7 +202,7 @@ async function createVirtualNetworkWithServiceEndpoints() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json */ async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -196,7 +238,7 @@ async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy( * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnet.json */ async function createVirtualNetworkWithSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -221,7 +263,7 @@ async function createVirtualNetworkWithSubnet() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json */ async function createVirtualNetworkWithSubnetContainingAddressPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -247,6 +289,7 @@ async function main() { createVirtualNetworkWithBgpCommunities(); createVirtualNetworkWithDelegatedSubnets(); createVirtualNetworkWithEncryption(); + createVirtualNetworkWithIpamPool(); createVirtualNetworkWithServiceEndpoints(); createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(); createVirtualNetworkWithSubnet(); diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksDeleteSample.js index aa004f4eb508..ce15e4f45b2a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified virtual network. * * @summary Deletes the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkDelete.json */ async function deleteVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksGetSample.js index 918a5868560a..c098a41b735f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified virtual network by resource group. * * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGet.json */ async function getVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -32,7 +32,7 @@ async function getVirtualNetwork() { * This sample demonstrates how to Gets the specified virtual network by resource group. * * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetWithSubnetDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetWithSubnetDelegation.json */ async function getVirtualNetworkWithADelegatedSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -48,7 +48,7 @@ async function getVirtualNetworkWithADelegatedSubnet() { * This sample demonstrates how to Gets the specified virtual network by resource group. * * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetWithServiceAssociationLink.json */ async function getVirtualNetworkWithServiceAssociationLinks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListAllSample.js index d42e96a0d1d8..a54a6a09f471 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all virtual networks in a subscription. * * @summary Gets all virtual networks in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListAll.json */ async function listAllVirtualNetworks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListDdosProtectionStatusSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListDdosProtectionStatusSample.js index ef0be8bdcebc..0c7e5887e98b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListDdosProtectionStatusSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListDdosProtectionStatusSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the Ddos Protection Status of all IP Addresses under the Virtual Network * * @summary Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json */ async function getDdosProtectionStatusOfAVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListSample.js index 2dc4b8700fad..98700ad55fd3 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all virtual networks in a resource group. * * @summary Gets all virtual networks in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkList.json */ async function listVirtualNetworksInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListUsageSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListUsageSample.js index 7459a7af0076..2e9a05108bfa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListUsageSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksListUsageSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists usage stats. * * @summary Lists usage stats. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListUsage.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListUsage.json */ async function vnetGetUsage() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksUpdateTagsSample.js index b5e42b5350b5..540cf66905bc 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualNetworksUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualNetworksUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a virtual network tags. * * @summary Updates a virtual network tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkUpdateTags.json */ async function updateVirtualNetworkTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsCreateOrUpdateSample.js index fcaa185f7e01..e7259736b88e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified Virtual Router Peering. * * @summary Creates or updates the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringPut.json */ async function createVirtualRouterPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsDeleteSample.js index d8efd1e13c0d..f12b81ee3f19 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified peering from a Virtual Router. * * @summary Deletes the specified peering from a Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringDelete.json */ async function deleteVirtualRouterPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsGetSample.js index 2bf8877368dd..2714f63d15cb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Virtual Router Peering. * * @summary Gets the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringGet.json */ async function getVirtualRouterPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsListSample.js index e5cb9a3b91e9..7de5ebc87b0e 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualRouterPeeringsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Virtual Router Peerings in a Virtual Router resource. * * @summary Lists all Virtual Router Peerings in a Virtual Router resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringList.json */ async function listAllVirtualRouterPeeringsForAGivenVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersCreateOrUpdateSample.js index c05e74c8219e..edcee90764e7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates the specified Virtual Router. * * @summary Creates or updates the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPut.json */ async function createVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersDeleteSample.js index 4333f1e6cf55..befbbfa4d5ad 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified Virtual Router. * * @summary Deletes the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterDelete.json */ async function deleteVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersGetSample.js index 373eccacca54..10cfb4b222b8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Virtual Router. * * @summary Gets the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterGet.json */ async function getVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersListByResourceGroupSample.js index 398d3a1142d2..01dcdf43fde9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all Virtual Routers in a resource group. * * @summary Lists all Virtual Routers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListByResourceGroup.json */ async function listAllVirtualRouterForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersListSample.js index 4c01708344d5..a22d5301dbe9 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualRoutersListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualRoutersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the Virtual Routers in a subscription. * * @summary Gets all the Virtual Routers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListBySubscription.json */ async function listAllVirtualRoutersForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualWansCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualWansCreateOrUpdateSample.js index f3f2e3d49917..3a6fab6ef358 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualWansCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualWansCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. * * @summary Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANPut.json */ async function virtualWanCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualWansDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualWansDeleteSample.js index 37a9c7d56a86..03ab9afd1693 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualWansDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualWansDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a VirtualWAN. * * @summary Deletes a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANDelete.json */ async function virtualWanDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualWansGetSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualWansGetSample.js index 48c773722b7b..243de00206ab 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualWansGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualWansGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a VirtualWAN. * * @summary Retrieves the details of a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANGet.json */ async function virtualWanGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualWansListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualWansListByResourceGroupSample.js index 97e8a590db70..480425a16059 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualWansListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualWansListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the VirtualWANs in a resource group. * * @summary Lists all the VirtualWANs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANListByResourceGroup.json */ async function virtualWanListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualWansListSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualWansListSample.js index 27d2f7d47975..9d46097547eb 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualWansListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualWansListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the VirtualWANs in a subscription. * * @summary Lists all the VirtualWANs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANList.json */ async function virtualWanList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/virtualWansUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/virtualWansUpdateTagsSample.js index b3d54a737bc8..069b91a0dd24 100644 --- a/sdk/network/arm-network/samples/v33/javascript/virtualWansUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/virtualWansUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a VirtualWAN tags. * * @summary Updates a VirtualWAN tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANUpdateTags.json */ async function virtualWanUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsCreateOrUpdateSample.js index 369c39413785..7254df95a82d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. * * @summary Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionPut.json */ async function vpnConnectionPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsDeleteSample.js index ea89a0c8e651..4fb1fdc6b1ee 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a vpn connection. * * @summary Deletes a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionDelete.json */ async function vpnConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsGetSample.js index 60430c34341b..75718253246c 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a vpn connection. * * @summary Retrieves the details of a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionGet.json */ async function vpnConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsListByVpnGatewaySample.js b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsListByVpnGatewaySample.js index d341a95d845a..1825f7018871 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsListByVpnGatewaySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsListByVpnGatewaySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves all vpn connections for a particular virtual wan vpn gateway. * * @summary Retrieves all vpn connections for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionList.json */ async function vpnConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsStartPacketCaptureSample.js index 1106601600d8..7284b7f0e4e2 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsStartPacketCaptureSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsStartPacketCaptureSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. * * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVpnConnectionWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -46,7 +46,7 @@ async function startPacketCaptureOnVpnConnectionWithFilter() { * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. * * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCapture.json */ async function startPacketCaptureOnVpnConnectionWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsStopPacketCaptureSample.js index b956fbc818fa..e1f438f8f301 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsStopPacketCaptureSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnConnectionsStopPacketCaptureSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Stops packet capture on Vpn connection in the specified resource group. * * @summary Stops packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStopPacketCapture.json */ async function startPacketCaptureOnVpnConnectionWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysCreateOrUpdateSample.js index 112d8248d831..d20c89616baf 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. * * @summary Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayPut.json */ async function vpnGatewayPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysDeleteSample.js index c935960173d6..ffdf4e259baa 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a virtual wan vpn gateway. * * @summary Deletes a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayDelete.json */ async function vpnGatewayDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysGetSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysGetSample.js index be63a974040e..51c76aa58440 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a virtual wan vpn gateway. * * @summary Retrieves the details of a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayGet.json */ async function vpnGatewayGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysListByResourceGroupSample.js index fad8b457968a..6f6c716fdd75 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the VpnGateways in a resource group. * * @summary Lists all the VpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayListByResourceGroup.json */ async function vpnGatewayListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysListSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysListSample.js index 237ffef10568..7d30a801b008 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the VpnGateways in a subscription. * * @summary Lists all the VpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayList.json */ async function vpnGatewayListBySubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysResetSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysResetSample.js index 9a4e81abaddd..144997873f02 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysResetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysResetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Resets the primary of the vpn gateway in the specified resource group. * * @summary Resets the primary of the vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayReset.json */ async function resetVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysStartPacketCaptureSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysStartPacketCaptureSample.js index 45f4f44df677..63166c60fac0 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysStartPacketCaptureSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysStartPacketCaptureSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. * * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVpnGatewayWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -41,7 +41,7 @@ async function startPacketCaptureOnVpnGatewayWithFilter() { * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. * * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCapture.json */ async function startPacketCaptureOnVpnGatewayWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysStopPacketCaptureSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysStopPacketCaptureSample.js index c7bc0f14bfb5..e3591baeb770 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysStopPacketCaptureSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysStopPacketCaptureSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Stops packet capture on vpn gateway in the specified resource group. * * @summary Stops packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStopPacketCapture.json */ async function stopPacketCaptureOnVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysUpdateTagsSample.js index 1c990a4594ba..f19112713276 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnGatewaysUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates virtual wan vpn gateway tags. * * @summary Updates virtual wan vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayUpdateTags.json */ async function vpnGatewayUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js index 4d47d5afc1c6..16702b290e49 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetAllSharedKeysSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all shared keys of VpnLink connection specified. * * @summary Lists all shared keys of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json */ async function vpnSiteLinkConnectionSharedKeysGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js index f8b72ce31a28..48c13565ffb5 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetDefaultSharedKeySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the shared key of VpnLink connection specified. * * @summary Gets the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json */ async function vpnSiteLinkConnectionDefaultSharedKeyGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetIkeSasSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetIkeSasSample.js index d623078367b9..03eb7376379a 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetIkeSasSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsGetIkeSasSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. * * @summary Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json */ async function getVpnLinkConnectionIkeSa() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsListByVpnConnectionSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsListByVpnConnectionSample.js index fa8ee9207336..049739da2564 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsListByVpnConnectionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsListByVpnConnectionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. * * @summary Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionList.json */ async function vpnSiteLinkConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js index 89cf5fee17c8..59e142244f52 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsListDefaultSharedKeySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the value of the shared key of VpnLink connection specified. * * @summary Gets the value of the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json */ async function vpnSiteLinkConnectionDefaultSharedKeyList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsResetConnectionSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsResetConnectionSample.js index 4435330fd9f2..d14896ee78d4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsResetConnectionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsResetConnectionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Resets the VpnLink connection specified. * * @summary Resets the VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionReset.json */ async function resetVpnLinkConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js index d5cb08f3e21e..d075e7ea5c5f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. * * @summary Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json */ async function vpnSiteLinkConnectionDefaultSharedKeyPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js index 10bb74dea7cd..042e5e0f6fb8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsAssociatedWithVirtualWanListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. * * @summary Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetVirtualWanVpnServerConfigurations.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetVirtualWanVpnServerConfigurations.json */ async function getVirtualWanVpnServerConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsCreateOrUpdateSample.js index f0b676185286..3d30f75eb758 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. * * @summary Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationPut.json */ async function vpnServerConfigurationCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsDeleteSample.js index 3ae268095115..d42659e0e1c8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a VpnServerConfiguration. * * @summary Deletes a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationDelete.json */ async function vpnServerConfigurationDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsGetSample.js index 47f0d8eb2e3d..3ef45a995a35 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a VpnServerConfiguration. * * @summary Retrieves the details of a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationGet.json */ async function vpnServerConfigurationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsListByResourceGroupSample.js index 78a9945e2cac..6b259490a521 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the vpnServerConfigurations in a resource group. * * @summary Lists all the vpnServerConfigurations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationListByResourceGroup.json */ async function vpnServerConfigurationListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsListSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsListSample.js index ef1aea472db6..4645e8cdb457 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the VpnServerConfigurations in a subscription. * * @summary Lists all the VpnServerConfigurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationList.json */ async function vpnServerConfigurationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsUpdateTagsSample.js index 919fe0f20949..7989011960ea 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnServerConfigurationsUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates VpnServerConfiguration tags. * * @summary Updates VpnServerConfiguration tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationUpdateTags.json */ async function vpnServerConfigurationUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinkConnectionsGetSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinkConnectionsGetSample.js index 466c4680d43d..1c9093a0a87b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinkConnectionsGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinkConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a vpn site link connection. * * @summary Retrieves the details of a vpn site link connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGet.json */ async function vpnSiteLinkConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinksGetSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinksGetSample.js index 82a038d957b9..65eddfadd714 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinksGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinksGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a VPN site link. * * @summary Retrieves the details of a VPN site link. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkGet.json */ async function vpnSiteGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinksListByVpnSiteSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinksListByVpnSiteSample.js index 4cee21706acc..347b1ea059d8 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinksListByVpnSiteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSiteLinksListByVpnSiteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the vpnSiteLinks in a resource group for a vpn site. * * @summary Lists all the vpnSiteLinks in a resource group for a vpn site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkListByVpnSite.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkListByVpnSite.json */ async function vpnSiteLinkListByVpnSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSitesConfigurationDownloadSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSitesConfigurationDownloadSample.js index 42bd0073fb44..cf03734ce3d4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSitesConfigurationDownloadSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSitesConfigurationDownloadSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gives the sas-url to download the configurations for vpn-sites in a resource group. * * @summary Gives the sas-url to download the configurations for vpn-sites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitesConfigurationDownload.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitesConfigurationDownload.json */ async function vpnSitesConfigurationDownload() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSitesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSitesCreateOrUpdateSample.js index f7abf2a05048..f3def372f14f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSitesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSitesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. * * @summary Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitePut.json */ async function vpnSiteCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSitesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSitesDeleteSample.js index 48f51bf69d52..ef0c9920aa2d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSitesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSitesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a VpnSite. * * @summary Deletes a VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteDelete.json */ async function vpnSiteDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSitesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSitesGetSample.js index dfa9cc43b5fd..a3b2e1a670a1 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSitesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSitesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves the details of a VPN site. * * @summary Retrieves the details of a VPN site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteGet.json */ async function vpnSiteGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSitesListByResourceGroupSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSitesListByResourceGroupSample.js index 6fa358c5b0bc..29e44029ee32 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSitesListByResourceGroupSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSitesListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the vpnSites in a resource group. * * @summary Lists all the vpnSites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteListByResourceGroup.json */ async function vpnSiteListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSitesListSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSitesListSample.js index 3b6bb45aa80c..ec3e8db872e4 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSitesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSitesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the VpnSites in a subscription. * * @summary Lists all the VpnSites in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteList.json */ async function vpnSiteList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/vpnSitesUpdateTagsSample.js b/sdk/network/arm-network/samples/v33/javascript/vpnSitesUpdateTagsSample.js index 479894474836..76224351e57f 100644 --- a/sdk/network/arm-network/samples/v33/javascript/vpnSitesUpdateTagsSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/vpnSitesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates VpnSite tags. * * @summary Updates VpnSite tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteUpdateTags.json */ async function vpnSiteUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js index 8c2fbb9088e3..6e6403ebe4ff 100644 --- a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates or update policy with specified rule set name within a resource group. * * @summary Creates or update policy with specified rule set name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyCreateOrUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyCreateOrUpdate.json */ async function createsOrUpdatesAWafPolicyWithinAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesDeleteSample.js b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesDeleteSample.js index c7766fbd5052..ba35769e6331 100644 --- a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesDeleteSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes Policy. * * @summary Deletes Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyDelete.json */ async function deletesAWafPolicyWithinAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesGetSample.js index 5bd64f899b1e..b9d78401f02d 100644 --- a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieve protection policy with specified name within a resource group. * * @summary Retrieve protection policy with specified name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyGet.json */ async function getsAWafPolicyWithinAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesListAllSample.js b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesListAllSample.js index 6ac92b1ccc02..d560b092f89b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesListAllSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesListAllSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the WAF policies in a subscription. * * @summary Gets all the WAF policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListAllPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListAllPolicies.json */ async function listsAllWafPoliciesInASubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesListSample.js b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesListSample.js index 86a67f763b54..e8de03e25f3b 100644 --- a/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesListSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/webApplicationFirewallPoliciesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all of the protection policies within a resource group. * * @summary Lists all of the protection policies within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListPolicies.json */ async function listsAllWafPoliciesInAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/javascript/webCategoriesGetSample.js b/sdk/network/arm-network/samples/v33/javascript/webCategoriesGetSample.js index cdafe1e01e24..c6098fcb11a7 100644 --- a/sdk/network/arm-network/samples/v33/javascript/webCategoriesGetSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/webCategoriesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified Azure Web Category. * * @summary Gets the specified Azure Web Category. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoryGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoryGet.json */ async function getAzureWebCategoryByName() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/javascript/webCategoriesListBySubscriptionSample.js b/sdk/network/arm-network/samples/v33/javascript/webCategoriesListBySubscriptionSample.js index a0dbd3fc6a80..3f950b042440 100644 --- a/sdk/network/arm-network/samples/v33/javascript/webCategoriesListBySubscriptionSample.js +++ b/sdk/network/arm-network/samples/v33/javascript/webCategoriesListBySubscriptionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all the Azure Web Categories in a subscription. * * @summary Gets all the Azure Web Categories in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoriesListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoriesListBySubscription.json */ async function listAllAzureWebCategoriesForAGivenSubscription() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/README.md b/sdk/network/arm-network/samples/v33/typescript/README.md index 87c2a0d27176..a621315b792f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/README.md +++ b/sdk/network/arm-network/samples/v33/typescript/README.md @@ -4,663 +4,692 @@ These sample programs show how to use the TypeScript client libraries for in som | **File Name** | **Description** | | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [adminRuleCollectionsCreateOrUpdateSample.ts][adminrulecollectionscreateorupdatesample] | Creates or updates an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionPut.json | -| [adminRuleCollectionsDeleteSample.ts][adminrulecollectionsdeletesample] | Deletes an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json | -| [adminRuleCollectionsGetSample.ts][adminrulecollectionsgetsample] | Gets a network manager security admin configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionGet.json | -| [adminRuleCollectionsListSample.ts][adminrulecollectionslistsample] | Lists all the rule collections in a security admin configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionList.json | -| [adminRulesCreateOrUpdateSample.ts][adminrulescreateorupdatesample] | Creates or updates an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRulePut.json | -| [adminRulesDeleteSample.ts][adminrulesdeletesample] | Deletes an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleDelete.json | -| [adminRulesGetSample.ts][adminrulesgetsample] | Gets a network manager security configuration admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleGet.json | -| [adminRulesListSample.ts][adminruleslistsample] | List all network manager security configuration admin rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleList.json | -| [applicationGatewayPrivateEndpointConnectionsDeleteSample.ts][applicationgatewayprivateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json | -| [applicationGatewayPrivateEndpointConnectionsGetSample.ts][applicationgatewayprivateendpointconnectionsgetsample] | Gets the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json | -| [applicationGatewayPrivateEndpointConnectionsListSample.ts][applicationgatewayprivateendpointconnectionslistsample] | Lists all private endpoint connections on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json | -| [applicationGatewayPrivateEndpointConnectionsUpdateSample.ts][applicationgatewayprivateendpointconnectionsupdatesample] | Updates the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json | -| [applicationGatewayPrivateLinkResourcesListSample.ts][applicationgatewayprivatelinkresourceslistsample] | Lists all private link resources on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json | -| [applicationGatewayWafDynamicManifestsDefaultGetSample.ts][applicationgatewaywafdynamicmanifestsdefaultgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json | -| [applicationGatewayWafDynamicManifestsGetSample.ts][applicationgatewaywafdynamicmanifestsgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifests.json | -| [applicationGatewaysBackendHealthOnDemandSample.ts][applicationgatewaysbackendhealthondemandsample] | Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthTest.json | -| [applicationGatewaysBackendHealthSample.ts][applicationgatewaysbackendhealthsample] | Gets the backend health of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthGet.json | -| [applicationGatewaysCreateOrUpdateSample.ts][applicationgatewayscreateorupdatesample] | Creates or updates the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayCreate.json | -| [applicationGatewaysDeleteSample.ts][applicationgatewaysdeletesample] | Deletes the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayDelete.json | -| [applicationGatewaysGetSample.ts][applicationgatewaysgetsample] | Gets the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayGet.json | -| [applicationGatewaysGetSslPredefinedPolicySample.ts][applicationgatewaysgetsslpredefinedpolicysample] | Gets Ssl predefined policy with the specified policy name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json | -| [applicationGatewaysListAllSample.ts][applicationgatewayslistallsample] | Gets all the application gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayListAll.json | -| [applicationGatewaysListAvailableRequestHeadersSample.ts][applicationgatewayslistavailablerequestheaderssample] | Lists all available request headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json | -| [applicationGatewaysListAvailableResponseHeadersSample.ts][applicationgatewayslistavailableresponseheaderssample] | Lists all available response headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json | -| [applicationGatewaysListAvailableServerVariablesSample.ts][applicationgatewayslistavailableservervariablessample] | Lists all available server variables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json | -| [applicationGatewaysListAvailableSslOptionsSample.ts][applicationgatewayslistavailablessloptionssample] | Lists available Ssl options for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json | -| [applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts][applicationgatewayslistavailablesslpredefinedpoliciessample] | Lists all SSL predefined policies for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json | -| [applicationGatewaysListAvailableWafRuleSetsSample.ts][applicationgatewayslistavailablewafrulesetssample] | Lists all available web application firewall rule sets. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json | -| [applicationGatewaysListSample.ts][applicationgatewayslistsample] | Lists all application gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayList.json | -| [applicationGatewaysStartSample.ts][applicationgatewaysstartsample] | Starts the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStart.json | -| [applicationGatewaysStopSample.ts][applicationgatewaysstopsample] | Stops the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStop.json | -| [applicationGatewaysUpdateTagsSample.ts][applicationgatewaysupdatetagssample] | Updates the specified application gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayUpdateTags.json | -| [applicationSecurityGroupsCreateOrUpdateSample.ts][applicationsecuritygroupscreateorupdatesample] | Creates or updates an application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupCreate.json | -| [applicationSecurityGroupsDeleteSample.ts][applicationsecuritygroupsdeletesample] | Deletes the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupDelete.json | -| [applicationSecurityGroupsGetSample.ts][applicationsecuritygroupsgetsample] | Gets information about the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupGet.json | -| [applicationSecurityGroupsListAllSample.ts][applicationsecuritygroupslistallsample] | Gets all application security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupListAll.json | -| [applicationSecurityGroupsListSample.ts][applicationsecuritygroupslistsample] | Gets all the application security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupList.json | -| [applicationSecurityGroupsUpdateTagsSample.ts][applicationsecuritygroupsupdatetagssample] | Updates an application security group's tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupUpdateTags.json | -| [availableDelegationsListSample.ts][availabledelegationslistsample] | Gets all of the available subnet delegations for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsSubscriptionGet.json | -| [availableEndpointServicesListSample.ts][availableendpointserviceslistsample] | List what values of endpoint services are available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EndpointServicesList.json | -| [availablePrivateEndpointTypesListByResourceGroupSample.ts][availableprivateendpointtypeslistbyresourcegroupsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json | -| [availablePrivateEndpointTypesListSample.ts][availableprivateendpointtypeslistsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesGet.json | -| [availableResourceGroupDelegationsListSample.ts][availableresourcegroupdelegationslistsample] | Gets all of the available subnet delegations for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsResourceGroupGet.json | -| [availableServiceAliasesListByResourceGroupSample.ts][availableservicealiaseslistbyresourcegroupsample] | Gets all available service aliases for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesListByResourceGroup.json | -| [availableServiceAliasesListSample.ts][availableservicealiaseslistsample] | Gets all available service aliases for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesList.json | -| [azureFirewallFqdnTagsListAllSample.ts][azurefirewallfqdntagslistallsample] | Gets all the Azure Firewall FQDN Tags in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json | -| [azureFirewallsCreateOrUpdateSample.ts][azurefirewallscreateorupdatesample] | Creates or updates the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPut.json | -| [azureFirewallsDeleteSample.ts][azurefirewallsdeletesample] | Deletes the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallDelete.json | -| [azureFirewallsGetSample.ts][azurefirewallsgetsample] | Gets the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGet.json | -| [azureFirewallsListAllSample.ts][azurefirewallslistallsample] | Gets all the Azure Firewalls in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListBySubscription.json | -| [azureFirewallsListLearnedPrefixesSample.ts][azurefirewallslistlearnedprefixessample] | Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListLearnedIPPrefixes.json | -| [azureFirewallsListSample.ts][azurefirewallslistsample] | Lists all Azure Firewalls in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListByResourceGroup.json | -| [azureFirewallsPacketCaptureSample.ts][azurefirewallspacketcapturesample] | Runs a packet capture on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPacketCapture.json | -| [azureFirewallsUpdateTagsSample.ts][azurefirewallsupdatetagssample] | Updates tags of an Azure Firewall resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallUpdateTags.json | -| [bastionHostsCreateOrUpdateSample.ts][bastionhostscreateorupdatesample] | Creates or updates the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPut.json | -| [bastionHostsDeleteSample.ts][bastionhostsdeletesample] | Deletes the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDelete.json | -| [bastionHostsGetSample.ts][bastionhostsgetsample] | Gets the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGet.json | -| [bastionHostsListByResourceGroupSample.ts][bastionhostslistbyresourcegroupsample] | Lists all Bastion Hosts in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListByResourceGroup.json | -| [bastionHostsListSample.ts][bastionhostslistsample] | Lists all Bastion Hosts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListBySubscription.json | -| [bastionHostsUpdateTagsSample.ts][bastionhostsupdatetagssample] | Updates Tags for BastionHost resource x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPatch.json | -| [bgpServiceCommunitiesListSample.ts][bgpservicecommunitieslistsample] | Gets all the available bgp service communities. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceCommunityList.json | -| [checkDnsNameAvailabilitySample.ts][checkdnsnameavailabilitysample] | Checks whether a domain name in the cloudapp.azure.com zone is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckDnsNameAvailability.json | -| [configurationPolicyGroupsCreateOrUpdateSample.ts][configurationpolicygroupscreateorupdatesample] | Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupPut.json | -| [configurationPolicyGroupsDeleteSample.ts][configurationpolicygroupsdeletesample] | Deletes a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupDelete.json | -| [configurationPolicyGroupsGetSample.ts][configurationpolicygroupsgetsample] | Retrieves the details of a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupGet.json | -| [configurationPolicyGroupsListByVpnServerConfigurationSample.ts][configurationpolicygroupslistbyvpnserverconfigurationsample] | Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json | -| [connectionMonitorsCreateOrUpdateSample.ts][connectionmonitorscreateorupdatesample] | Create or update a connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreate.json | -| [connectionMonitorsDeleteSample.ts][connectionmonitorsdeletesample] | Deletes the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorDelete.json | -| [connectionMonitorsGetSample.ts][connectionmonitorsgetsample] | Gets a connection monitor by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorGet.json | -| [connectionMonitorsListSample.ts][connectionmonitorslistsample] | Lists all connection monitors for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorList.json | -| [connectionMonitorsQuerySample.ts][connectionmonitorsquerysample] | Query a snapshot of the most recent connection states. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorQuery.json | -| [connectionMonitorsStartSample.ts][connectionmonitorsstartsample] | Starts the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStart.json | -| [connectionMonitorsStopSample.ts][connectionmonitorsstopsample] | Stops the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStop.json | -| [connectionMonitorsUpdateTagsSample.ts][connectionmonitorsupdatetagssample] | Update tags of the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json | -| [connectivityConfigurationsCreateOrUpdateSample.ts][connectivityconfigurationscreateorupdatesample] | Creates/Updates a new network manager connectivity configuration x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationPut.json | -| [connectivityConfigurationsDeleteSample.ts][connectivityconfigurationsdeletesample] | Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json | -| [connectivityConfigurationsGetSample.ts][connectivityconfigurationsgetsample] | Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationGet.json | -| [connectivityConfigurationsListSample.ts][connectivityconfigurationslistsample] | Lists all the network manager connectivity configuration in a specified network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationList.json | -| [customIPPrefixesCreateOrUpdateSample.ts][customipprefixescreateorupdatesample] | Creates or updates a custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixCreateCustomizedValues.json | -| [customIPPrefixesDeleteSample.ts][customipprefixesdeletesample] | Deletes the specified custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixDelete.json | -| [customIPPrefixesGetSample.ts][customipprefixesgetsample] | Gets the specified custom IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixGet.json | -| [customIPPrefixesListAllSample.ts][customipprefixeslistallsample] | Gets all the custom IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixListAll.json | -| [customIPPrefixesListSample.ts][customipprefixeslistsample] | Gets all custom IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixList.json | -| [customIPPrefixesUpdateTagsSample.ts][customipprefixesupdatetagssample] | Updates custom IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixUpdateTags.json | -| [ddosCustomPoliciesCreateOrUpdateSample.ts][ddoscustompoliciescreateorupdatesample] | Creates or updates a DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyCreate.json | -| [ddosCustomPoliciesDeleteSample.ts][ddoscustompoliciesdeletesample] | Deletes the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyDelete.json | -| [ddosCustomPoliciesGetSample.ts][ddoscustompoliciesgetsample] | Gets information about the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyGet.json | -| [ddosCustomPoliciesUpdateTagsSample.ts][ddoscustompoliciesupdatetagssample] | Update a DDoS custom policy tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyUpdateTags.json | -| [ddosProtectionPlansCreateOrUpdateSample.ts][ddosprotectionplanscreateorupdatesample] | Creates or updates a DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanCreate.json | -| [ddosProtectionPlansDeleteSample.ts][ddosprotectionplansdeletesample] | Deletes the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanDelete.json | -| [ddosProtectionPlansGetSample.ts][ddosprotectionplansgetsample] | Gets information about the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanGet.json | -| [ddosProtectionPlansListByResourceGroupSample.ts][ddosprotectionplanslistbyresourcegroupsample] | Gets all the DDoS protection plans in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanList.json | -| [ddosProtectionPlansListSample.ts][ddosprotectionplanslistsample] | Gets all DDoS protection plans in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanListAll.json | -| [ddosProtectionPlansUpdateTagsSample.ts][ddosprotectionplansupdatetagssample] | Update a DDoS protection plan tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanUpdateTags.json | -| [defaultSecurityRulesGetSample.ts][defaultsecurityrulesgetsample] | Get the specified default network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleGet.json | -| [defaultSecurityRulesListSample.ts][defaultsecurityruleslistsample] | Gets all default security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleList.json | -| [deleteBastionShareableLinkByTokenSample.ts][deletebastionshareablelinkbytokensample] | Deletes the Bastion Shareable Links for all the tokens specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDeleteByToken.json | -| [deleteBastionShareableLinkSample.ts][deletebastionshareablelinksample] | Deletes the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDelete.json | -| [disconnectActiveSessionsSample.ts][disconnectactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionDelete.json | -| [dscpConfigurationCreateOrUpdateSample.ts][dscpconfigurationcreateorupdatesample] | Creates or updates a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationCreate.json | -| [dscpConfigurationDeleteSample.ts][dscpconfigurationdeletesample] | Deletes a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationDelete.json | -| [dscpConfigurationGetSample.ts][dscpconfigurationgetsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationGet.json | -| [dscpConfigurationListAllSample.ts][dscpconfigurationlistallsample] | Gets all dscp configurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationListAll.json | -| [dscpConfigurationListSample.ts][dscpconfigurationlistsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationList.json | -| [expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts][expressroutecircuitauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json | -| [expressRouteCircuitAuthorizationsDeleteSample.ts][expressroutecircuitauthorizationsdeletesample] | Deletes the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json | -| [expressRouteCircuitAuthorizationsGetSample.ts][expressroutecircuitauthorizationsgetsample] | Gets the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationGet.json | -| [expressRouteCircuitAuthorizationsListSample.ts][expressroutecircuitauthorizationslistsample] | Gets all authorizations in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationList.json | -| [expressRouteCircuitConnectionsCreateOrUpdateSample.ts][expressroutecircuitconnectionscreateorupdatesample] | Creates or updates a Express Route Circuit Connection in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionCreate.json | -| [expressRouteCircuitConnectionsDeleteSample.ts][expressroutecircuitconnectionsdeletesample] | Deletes the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionDelete.json | -| [expressRouteCircuitConnectionsGetSample.ts][expressroutecircuitconnectionsgetsample] | Gets the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionGet.json | -| [expressRouteCircuitConnectionsListSample.ts][expressroutecircuitconnectionslistsample] | Gets all global reach connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionList.json | -| [expressRouteCircuitPeeringsCreateOrUpdateSample.ts][expressroutecircuitpeeringscreateorupdatesample] | Creates or updates a peering in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringCreate.json | -| [expressRouteCircuitPeeringsDeleteSample.ts][expressroutecircuitpeeringsdeletesample] | Deletes the specified peering from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringDelete.json | -| [expressRouteCircuitPeeringsGetSample.ts][expressroutecircuitpeeringsgetsample] | Gets the specified peering for the express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringGet.json | -| [expressRouteCircuitPeeringsListSample.ts][expressroutecircuitpeeringslistsample] | Gets all peerings in a specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringList.json | -| [expressRouteCircuitsCreateOrUpdateSample.ts][expressroutecircuitscreateorupdatesample] | Creates or updates an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreate.json | -| [expressRouteCircuitsDeleteSample.ts][expressroutecircuitsdeletesample] | Deletes the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitDelete.json | -| [expressRouteCircuitsGetPeeringStatsSample.ts][expressroutecircuitsgetpeeringstatssample] | Gets all stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringStats.json | -| [expressRouteCircuitsGetSample.ts][expressroutecircuitsgetsample] | Gets information about the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitGet.json | -| [expressRouteCircuitsGetStatsSample.ts][expressroutecircuitsgetstatssample] | Gets all the stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitStats.json | -| [expressRouteCircuitsListAllSample.ts][expressroutecircuitslistallsample] | Gets all the express route circuits in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListBySubscription.json | -| [expressRouteCircuitsListArpTableSample.ts][expressroutecircuitslistarptablesample] | Gets the currently advertised ARP table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitARPTableList.json | -| [expressRouteCircuitsListRoutesTableSample.ts][expressroutecircuitslistroutestablesample] | Gets the currently advertised routes table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableList.json | -| [expressRouteCircuitsListRoutesTableSummarySample.ts][expressroutecircuitslistroutestablesummarysample] | Gets the currently advertised routes table summary associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json | -| [expressRouteCircuitsListSample.ts][expressroutecircuitslistsample] | Gets all the express route circuits in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListByResourceGroup.json | -| [expressRouteCircuitsUpdateTagsSample.ts][expressroutecircuitsupdatetagssample] | Updates an express route circuit tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitUpdateTags.json | -| [expressRouteConnectionsCreateOrUpdateSample.ts][expressrouteconnectionscreateorupdatesample] | Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionCreate.json | -| [expressRouteConnectionsDeleteSample.ts][expressrouteconnectionsdeletesample] | Deletes a connection to a ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionDelete.json | -| [expressRouteConnectionsGetSample.ts][expressrouteconnectionsgetsample] | Gets the specified ExpressRouteConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionGet.json | -| [expressRouteConnectionsListSample.ts][expressrouteconnectionslistsample] | Lists ExpressRouteConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionList.json | -| [expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts][expressroutecrossconnectionpeeringscreateorupdatesample] | Creates or updates a peering in the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json | -| [expressRouteCrossConnectionPeeringsDeleteSample.ts][expressroutecrossconnectionpeeringsdeletesample] | Deletes the specified peering from the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json | -| [expressRouteCrossConnectionPeeringsGetSample.ts][expressroutecrossconnectionpeeringsgetsample] | Gets the specified peering for the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json | -| [expressRouteCrossConnectionPeeringsListSample.ts][expressroutecrossconnectionpeeringslistsample] | Gets all peerings in a specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json | -| [expressRouteCrossConnectionsCreateOrUpdateSample.ts][expressroutecrossconnectionscreateorupdatesample] | Update the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdate.json | -| [expressRouteCrossConnectionsGetSample.ts][expressroutecrossconnectionsgetsample] | Gets details about the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionGet.json | -| [expressRouteCrossConnectionsListArpTableSample.ts][expressroutecrossconnectionslistarptablesample] | Gets the currently advertised ARP table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsArpTable.json | -| [expressRouteCrossConnectionsListByResourceGroupSample.ts][expressroutecrossconnectionslistbyresourcegroupsample] | Retrieves all the ExpressRouteCrossConnections in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json | -| [expressRouteCrossConnectionsListRoutesTableSample.ts][expressroutecrossconnectionslistroutestablesample] | Gets the currently advertised routes table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json | -| [expressRouteCrossConnectionsListRoutesTableSummarySample.ts][expressroutecrossconnectionslistroutestablesummarysample] | Gets the route table summary associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json | -| [expressRouteCrossConnectionsListSample.ts][expressroutecrossconnectionslistsample] | Retrieves all the ExpressRouteCrossConnections in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionList.json | -| [expressRouteCrossConnectionsUpdateTagsSample.ts][expressroutecrossconnectionsupdatetagssample] | Updates an express route cross connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json | -| [expressRouteGatewaysCreateOrUpdateSample.ts][expressroutegatewayscreateorupdatesample] | Creates or updates a ExpressRoute gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayCreate.json | -| [expressRouteGatewaysDeleteSample.ts][expressroutegatewaysdeletesample] | Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayDelete.json | -| [expressRouteGatewaysGetSample.ts][expressroutegatewaysgetsample] | Fetches the details of a ExpressRoute gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayGet.json | -| [expressRouteGatewaysListByResourceGroupSample.ts][expressroutegatewayslistbyresourcegroupsample] | Lists ExpressRoute gateways in a given resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListByResourceGroup.json | -| [expressRouteGatewaysListBySubscriptionSample.ts][expressroutegatewayslistbysubscriptionsample] | Lists ExpressRoute gateways under a given subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListBySubscription.json | -| [expressRouteGatewaysUpdateTagsSample.ts][expressroutegatewaysupdatetagssample] | Updates express route gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayUpdateTags.json | -| [expressRouteLinksGetSample.ts][expressroutelinksgetsample] | Retrieves the specified ExpressRouteLink resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkGet.json | -| [expressRouteLinksListSample.ts][expressroutelinkslistsample] | Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkList.json | -| [expressRoutePortAuthorizationsCreateOrUpdateSample.ts][expressrouteportauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationCreate.json | -| [expressRoutePortAuthorizationsDeleteSample.ts][expressrouteportauthorizationsdeletesample] | Deletes the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationDelete.json | -| [expressRoutePortAuthorizationsGetSample.ts][expressrouteportauthorizationsgetsample] | Gets the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationGet.json | -| [expressRoutePortAuthorizationsListSample.ts][expressrouteportauthorizationslistsample] | Gets all authorizations in an express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationList.json | -| [expressRoutePortsCreateOrUpdateSample.ts][expressrouteportscreateorupdatesample] | Creates or updates the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortCreate.json | -| [expressRoutePortsDeleteSample.ts][expressrouteportsdeletesample] | Deletes the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortDelete.json | -| [expressRoutePortsGenerateLoaSample.ts][expressrouteportsgenerateloasample] | Generate a letter of authorization for the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateExpressRoutePortsLOA.json | -| [expressRoutePortsGetSample.ts][expressrouteportsgetsample] | Retrieves the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortGet.json | -| [expressRoutePortsListByResourceGroupSample.ts][expressrouteportslistbyresourcegroupsample] | List all the ExpressRoutePort resources in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortListByResourceGroup.json | -| [expressRoutePortsListSample.ts][expressrouteportslistsample] | List all the ExpressRoutePort resources in the specified subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortList.json | -| [expressRoutePortsLocationsGetSample.ts][expressrouteportslocationsgetsample] | Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationGet.json | -| [expressRoutePortsLocationsListSample.ts][expressrouteportslocationslistsample] | Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationList.json | -| [expressRoutePortsUpdateTagsSample.ts][expressrouteportsupdatetagssample] | Update ExpressRoutePort tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateTags.json | -| [expressRouteProviderPortSample.ts][expressrouteproviderportsample] | Retrieves detail of a provider port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPort.json | -| [expressRouteProviderPortsLocationListSample.ts][expressrouteproviderportslocationlistsample] | Retrieves all the ExpressRouteProviderPorts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPortList.json | -| [expressRouteServiceProvidersListSample.ts][expressrouteserviceproviderslistsample] | Gets all the available express route service providers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteProviderList.json | -| [firewallPoliciesCreateOrUpdateSample.ts][firewallpoliciescreateorupdatesample] | Creates or updates the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPut.json | -| [firewallPoliciesDeleteSample.ts][firewallpoliciesdeletesample] | Deletes the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDelete.json | -| [firewallPoliciesGetSample.ts][firewallpoliciesgetsample] | Gets the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyGet.json | -| [firewallPoliciesListAllSample.ts][firewallpolicieslistallsample] | Gets all the Firewall Policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListBySubscription.json | -| [firewallPoliciesListSample.ts][firewallpolicieslistsample] | Lists all Firewall Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListByResourceGroup.json | -| [firewallPoliciesUpdateTagsSample.ts][firewallpoliciesupdatetagssample] | Updates tags of a Azure Firewall Policy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPatch.json | -| [firewallPolicyDeploymentsDeploySample.ts][firewallpolicydeploymentsdeploysample] | Deploys the firewall policy draft and child rule collection group drafts. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDeploy.json | -| [firewallPolicyDraftsCreateOrUpdateSample.ts][firewallpolicydraftscreateorupdatesample] | Create or update a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftPut.json | -| [firewallPolicyDraftsDeleteSample.ts][firewallpolicydraftsdeletesample] | Delete a draft policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDelete.json | -| [firewallPolicyDraftsGetSample.ts][firewallpolicydraftsgetsample] | Get a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftGet.json | -| [firewallPolicyIdpsSignaturesFilterValuesListSample.ts][firewallpolicyidpssignaturesfiltervalueslistsample] | Retrieves the current filter values for the signatures overrides x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json | -| [firewallPolicyIdpsSignaturesListSample.ts][firewallpolicyidpssignatureslistsample] | Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverrides.json | -| [firewallPolicyIdpsSignaturesOverridesGetSample.ts][firewallpolicyidpssignaturesoverridesgetsample] | Returns all signatures overrides for a specific policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesGet.json | -| [firewallPolicyIdpsSignaturesOverridesListSample.ts][firewallpolicyidpssignaturesoverrideslistsample] | Returns all signatures overrides objects for a specific policy as a list containing a single value. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesList.json | -| [firewallPolicyIdpsSignaturesOverridesPatchSample.ts][firewallpolicyidpssignaturesoverridespatchsample] | Will update the status of policy's signature overrides for IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPatch.json | -| [firewallPolicyIdpsSignaturesOverridesPutSample.ts][firewallpolicyidpssignaturesoverridesputsample] | Will override/create a new signature overrides for the policy's IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPut.json | -| [firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts][firewallpolicyrulecollectiongroupdraftscreateorupdatesample] | Create or Update Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json | -| [firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts][firewallpolicyrulecollectiongroupdraftsdeletesample] | Delete Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json | -| [firewallPolicyRuleCollectionGroupDraftsGetSample.ts][firewallpolicyrulecollectiongroupdraftsgetsample] | Get Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json | -| [firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts][firewallpolicyrulecollectiongroupscreateorupdatesample] | Creates or updates the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json | -| [firewallPolicyRuleCollectionGroupsDeleteSample.ts][firewallpolicyrulecollectiongroupsdeletesample] | Deletes the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json | -| [firewallPolicyRuleCollectionGroupsGetSample.ts][firewallpolicyrulecollectiongroupsgetsample] | Gets the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json | -| [firewallPolicyRuleCollectionGroupsListSample.ts][firewallpolicyrulecollectiongroupslistsample] | Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json | -| [flowLogsCreateOrUpdateSample.ts][flowlogscreateorupdatesample] | Create or update a flow log for the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogCreate.json | -| [flowLogsDeleteSample.ts][flowlogsdeletesample] | Deletes the specified flow log resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogDelete.json | -| [flowLogsGetSample.ts][flowlogsgetsample] | Gets a flow log resource by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogGet.json | -| [flowLogsListSample.ts][flowlogslistsample] | Lists all flow log resources for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogList.json | -| [flowLogsUpdateTagsSample.ts][flowlogsupdatetagssample] | Update tags of the specified flow log. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogUpdateTags.json | -| [generatevirtualwanvpnserverconfigurationvpnprofileSample.ts][generatevirtualwanvpnserverconfigurationvpnprofilesample] | Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json | -| [getActiveSessionsSample.ts][getactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionsList.json | -| [getBastionShareableLinkSample.ts][getbastionshareablelinksample] | Return the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkGet.json | -| [hubRouteTablesCreateOrUpdateSample.ts][hubroutetablescreateorupdatesample] | Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTablePut.json | -| [hubRouteTablesDeleteSample.ts][hubroutetablesdeletesample] | Deletes a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableDelete.json | -| [hubRouteTablesGetSample.ts][hubroutetablesgetsample] | Retrieves the details of a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableGet.json | -| [hubRouteTablesListSample.ts][hubroutetableslistsample] | Retrieves the details of all RouteTables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableList.json | -| [hubVirtualNetworkConnectionsCreateOrUpdateSample.ts][hubvirtualnetworkconnectionscreateorupdatesample] | Creates a hub virtual network connection if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionPut.json | -| [hubVirtualNetworkConnectionsDeleteSample.ts][hubvirtualnetworkconnectionsdeletesample] | Deletes a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionDelete.json | -| [hubVirtualNetworkConnectionsGetSample.ts][hubvirtualnetworkconnectionsgetsample] | Retrieves the details of a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionGet.json | -| [hubVirtualNetworkConnectionsListSample.ts][hubvirtualnetworkconnectionslistsample] | Retrieves the details of all HubVirtualNetworkConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionList.json | -| [inboundNatRulesCreateOrUpdateSample.ts][inboundnatrulescreateorupdatesample] | Creates or updates a load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleCreate.json | -| [inboundNatRulesDeleteSample.ts][inboundnatrulesdeletesample] | Deletes the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleDelete.json | -| [inboundNatRulesGetSample.ts][inboundnatrulesgetsample] | Gets the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleGet.json | -| [inboundNatRulesListSample.ts][inboundnatruleslistsample] | Gets all the inbound NAT rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleList.json | -| [inboundSecurityRuleCreateOrUpdateSample.ts][inboundsecurityrulecreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRulePut.json | -| [inboundSecurityRuleGetSample.ts][inboundsecurityrulegetsample] | Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRuleGet.json | -| [ipAllocationsCreateOrUpdateSample.ts][ipallocationscreateorupdatesample] | Creates or updates an IpAllocation in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationCreate.json | -| [ipAllocationsDeleteSample.ts][ipallocationsdeletesample] | Deletes the specified IpAllocation. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationDelete.json | -| [ipAllocationsGetSample.ts][ipallocationsgetsample] | Gets the specified IpAllocation by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationGet.json | -| [ipAllocationsListByResourceGroupSample.ts][ipallocationslistbyresourcegroupsample] | Gets all IpAllocations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationListByResourceGroup.json | -| [ipAllocationsListSample.ts][ipallocationslistsample] | Gets all IpAllocations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationList.json | -| [ipAllocationsUpdateTagsSample.ts][ipallocationsupdatetagssample] | Updates a IpAllocation tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationUpdateTags.json | -| [ipGroupsCreateOrUpdateSample.ts][ipgroupscreateorupdatesample] | Creates or updates an ipGroups in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsCreate.json | -| [ipGroupsDeleteSample.ts][ipgroupsdeletesample] | Deletes the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsDelete.json | -| [ipGroupsGetSample.ts][ipgroupsgetsample] | Gets the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsGet.json | -| [ipGroupsListByResourceGroupSample.ts][ipgroupslistbyresourcegroupsample] | Gets all IpGroups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListByResourceGroup.json | -| [ipGroupsListSample.ts][ipgroupslistsample] | Gets all IpGroups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListBySubscription.json | -| [ipGroupsUpdateGroupsSample.ts][ipgroupsupdategroupssample] | Updates tags of an IpGroups resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsUpdateTags.json | -| [listActiveConnectivityConfigurationsSample.ts][listactiveconnectivityconfigurationssample] | Lists active connectivity configurations in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json | -| [listActiveSecurityAdminRulesSample.ts][listactivesecurityadminrulessample] | Lists active security admin rules in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json | -| [listNetworkManagerEffectiveConnectivityConfigurationsSample.ts][listnetworkmanagereffectiveconnectivityconfigurationssample] | List all effective connectivity configurations applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json | -| [listNetworkManagerEffectiveSecurityAdminRulesSample.ts][listnetworkmanagereffectivesecurityadminrulessample] | List all effective security admin rules applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json | -| [loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts][loadbalancerbackendaddresspoolscreateorupdatesample] | Creates or updates a load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json | -| [loadBalancerBackendAddressPoolsDeleteSample.ts][loadbalancerbackendaddresspoolsdeletesample] | Deletes the specified load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolDelete.json | -| [loadBalancerBackendAddressPoolsGetSample.ts][loadbalancerbackendaddresspoolsgetsample] | Gets load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json | -| [loadBalancerBackendAddressPoolsListSample.ts][loadbalancerbackendaddresspoolslistsample] | Gets all the load balancer backed address pools. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json | -| [loadBalancerFrontendIPConfigurationsGetSample.ts][loadbalancerfrontendipconfigurationsgetsample] | Gets load balancer frontend IP configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json | -| [loadBalancerFrontendIPConfigurationsListSample.ts][loadbalancerfrontendipconfigurationslistsample] | Gets all the load balancer frontend IP configurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationList.json | -| [loadBalancerLoadBalancingRulesGetSample.ts][loadbalancerloadbalancingrulesgetsample] | Gets the specified load balancer load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleGet.json | -| [loadBalancerLoadBalancingRulesListSample.ts][loadbalancerloadbalancingruleslistsample] | Gets all the load balancing rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleList.json | -| [loadBalancerNetworkInterfacesListSample.ts][loadbalancernetworkinterfaceslistsample] | Gets associated load balancer network interfaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json | -| [loadBalancerOutboundRulesGetSample.ts][loadbalanceroutboundrulesgetsample] | Gets the specified load balancer outbound rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleGet.json | -| [loadBalancerOutboundRulesListSample.ts][loadbalanceroutboundruleslistsample] | Gets all the outbound rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleList.json | -| [loadBalancerProbesGetSample.ts][loadbalancerprobesgetsample] | Gets load balancer probe. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeGet.json | -| [loadBalancerProbesListSample.ts][loadbalancerprobeslistsample] | Gets all the load balancer probes. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeList.json | -| [loadBalancersCreateOrUpdateSample.ts][loadbalancerscreateorupdatesample] | Creates or updates a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreate.json | -| [loadBalancersDeleteSample.ts][loadbalancersdeletesample] | Deletes the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerDelete.json | -| [loadBalancersGetSample.ts][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGet.json | -| [loadBalancersListAllSample.ts][loadbalancerslistallsample] | Gets all the load balancers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerListAll.json | -| [loadBalancersListInboundNatRulePortMappingsSample.ts][loadbalancerslistinboundnatruleportmappingssample] | List of inbound NAT rule port mappings. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/QueryInboundNatRulePortMapping.json | -| [loadBalancersListSample.ts][loadbalancerslistsample] | Gets all the load balancers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerList.json | -| [loadBalancersMigrateToIPBasedSample.ts][loadbalancersmigratetoipbasedsample] | Migrate load balancer to IP Based x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/MigrateLoadBalancerToIPBased.json | -| [loadBalancersSwapPublicIPAddressesSample.ts][loadbalancersswappublicipaddressessample] | Swaps VIPs between two load balancers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancersSwapPublicIpAddresses.json | -| [loadBalancersUpdateTagsSample.ts][loadbalancersupdatetagssample] | Updates a load balancer tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerUpdateTags.json | -| [localNetworkGatewaysCreateOrUpdateSample.ts][localnetworkgatewayscreateorupdatesample] | Creates or updates a local network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayCreate.json | -| [localNetworkGatewaysDeleteSample.ts][localnetworkgatewaysdeletesample] | Deletes the specified local network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayDelete.json | -| [localNetworkGatewaysGetSample.ts][localnetworkgatewaysgetsample] | Gets the specified local network gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayGet.json | -| [localNetworkGatewaysListSample.ts][localnetworkgatewayslistsample] | Gets all the local network gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayList.json | -| [localNetworkGatewaysUpdateTagsSample.ts][localnetworkgatewaysupdatetagssample] | Updates a local network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayUpdateTags.json | -| [managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts][managementgroupnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupPut.json | -| [managementGroupNetworkManagerConnectionsDeleteSample.ts][managementgroupnetworkmanagerconnectionsdeletesample] | Delete specified pending connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json | -| [managementGroupNetworkManagerConnectionsGetSample.ts][managementgroupnetworkmanagerconnectionsgetsample] | Get a specified connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupGet.json | -| [managementGroupNetworkManagerConnectionsListSample.ts][managementgroupnetworkmanagerconnectionslistsample] | List all network manager connections created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupList.json | -| [natGatewaysCreateOrUpdateSample.ts][natgatewayscreateorupdatesample] | Creates or updates a nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayCreateOrUpdate.json | -| [natGatewaysDeleteSample.ts][natgatewaysdeletesample] | Deletes the specified nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayDelete.json | -| [natGatewaysGetSample.ts][natgatewaysgetsample] | Gets the specified nat gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayGet.json | -| [natGatewaysListAllSample.ts][natgatewayslistallsample] | Gets all the Nat Gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayListAll.json | -| [natGatewaysListSample.ts][natgatewayslistsample] | Gets all nat gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayList.json | -| [natGatewaysUpdateTagsSample.ts][natgatewaysupdatetagssample] | Updates nat gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayUpdateTags.json | -| [natRulesCreateOrUpdateSample.ts][natrulescreateorupdatesample] | Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRulePut.json | -| [natRulesDeleteSample.ts][natrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleDelete.json | -| [natRulesGetSample.ts][natrulesgetsample] | Retrieves the details of a nat ruleGet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleGet.json | -| [natRulesListByVpnGatewaySample.ts][natruleslistbyvpngatewaysample] | Retrieves all nat rules for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleList.json | -| [networkGroupsCreateOrUpdateSample.ts][networkgroupscreateorupdatesample] | Creates or updates a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupPut.json | -| [networkGroupsDeleteSample.ts][networkgroupsdeletesample] | Deletes a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupDelete.json | -| [networkGroupsGetSample.ts][networkgroupsgetsample] | Gets the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupGet.json | -| [networkGroupsListSample.ts][networkgroupslistsample] | Lists the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupList.json | -| [networkInterfaceIPConfigurationsGetSample.ts][networkinterfaceipconfigurationsgetsample] | Gets the specified network interface ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationGet.json | -| [networkInterfaceIPConfigurationsListSample.ts][networkinterfaceipconfigurationslistsample] | Get all ip configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationList.json | -| [networkInterfaceLoadBalancersListSample.ts][networkinterfaceloadbalancerslistsample] | List all load balancers in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceLoadBalancerList.json | -| [networkInterfaceTapConfigurationsCreateOrUpdateSample.ts][networkinterfacetapconfigurationscreateorupdatesample] | Creates or updates a Tap configuration in the specified NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationCreate.json | -| [networkInterfaceTapConfigurationsDeleteSample.ts][networkinterfacetapconfigurationsdeletesample] | Deletes the specified tap configuration from the NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationDelete.json | -| [networkInterfaceTapConfigurationsGetSample.ts][networkinterfacetapconfigurationsgetsample] | Get the specified tap configuration on a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationGet.json | -| [networkInterfaceTapConfigurationsListSample.ts][networkinterfacetapconfigurationslistsample] | Get all Tap configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationList.json | -| [networkInterfacesCreateOrUpdateSample.ts][networkinterfacescreateorupdatesample] | Creates or updates a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreate.json | -| [networkInterfacesDeleteSample.ts][networkinterfacesdeletesample] | Deletes the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceDelete.json | -| [networkInterfacesGetCloudServiceNetworkInterfaceSample.ts][networkinterfacesgetcloudservicenetworkinterfacesample] | Get the specified network interface in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceGet.json | -| [networkInterfacesGetEffectiveRouteTableSample.ts][networkinterfacesgeteffectiveroutetablesample] | Gets all route tables applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json | -| [networkInterfacesGetSample.ts][networkinterfacesgetsample] | Gets information about the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceGet.json | -| [networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts][networkinterfacesgetvirtualmachinescalesetipconfigurationsample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigGet.json | -| [networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts][networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample] | Get the specified network interface in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceGet.json | -| [networkInterfacesListAllSample.ts][networkinterfaceslistallsample] | Gets all network interfaces in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceListAll.json | -| [networkInterfacesListCloudServiceNetworkInterfacesSample.ts][networkinterfaceslistcloudservicenetworkinterfacessample] | Gets all network interfaces in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceList.json | -| [networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts][networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample] | Gets information about all network interfaces in a role instance in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json | -| [networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts][networkinterfaceslisteffectivenetworksecuritygroupssample] | Gets all network security groups applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveNSGList.json | -| [networkInterfacesListSample.ts][networkinterfaceslistsample] | Gets all network interfaces in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts][networkinterfaceslistvirtualmachinescalesetipconfigurationssample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigList.json | -| [networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts][networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample] | Gets all network interfaces in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceList.json | -| [networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts][networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample] | Gets information about all network interfaces in a virtual machine in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmNetworkInterfaceList.json | -| [networkInterfacesUpdateTagsSample.ts][networkinterfacesupdatetagssample] | Updates a network interface tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceUpdateTags.json | -| [networkManagerCommitsPostSample.ts][networkmanagercommitspostsample] | Post a Network Manager Commit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerCommitPost.json | -| [networkManagerDeploymentStatusListSample.ts][networkmanagerdeploymentstatuslistsample] | Post to List of Network Manager Deployment Status. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDeploymentStatusList.json | -| [networkManagerRoutingConfigurationsCreateOrUpdateSample.ts][networkmanagerroutingconfigurationscreateorupdatesample] | Creates or updates a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationPut.json | -| [networkManagerRoutingConfigurationsDeleteSample.ts][networkmanagerroutingconfigurationsdeletesample] | Deletes a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationDelete.json | -| [networkManagerRoutingConfigurationsGetSample.ts][networkmanagerroutingconfigurationsgetsample] | Retrieves a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationGet.json | -| [networkManagerRoutingConfigurationsListSample.ts][networkmanagerroutingconfigurationslistsample] | Lists all the network manager routing configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationList.json | -| [networkManagersCreateOrUpdateSample.ts][networkmanagerscreateorupdatesample] | Creates or updates a Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPut.json | -| [networkManagersDeleteSample.ts][networkmanagersdeletesample] | Deletes a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDelete.json | -| [networkManagersGetSample.ts][networkmanagersgetsample] | Gets the specified Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGet.json | -| [networkManagersListBySubscriptionSample.ts][networkmanagerslistbysubscriptionsample] | List all network managers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerListAll.json | -| [networkManagersListSample.ts][networkmanagerslistsample] | List network managers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerList.json | -| [networkManagersPatchSample.ts][networkmanagerspatchsample] | Patch NetworkManager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPatch.json | -| [networkProfilesCreateOrUpdateSample.ts][networkprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileCreateConfigOnly.json | -| [networkProfilesDeleteSample.ts][networkprofilesdeletesample] | Deletes the specified network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileDelete.json | -| [networkProfilesGetSample.ts][networkprofilesgetsample] | Gets the specified network profile in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetConfigOnly.json | -| [networkProfilesListAllSample.ts][networkprofileslistallsample] | Gets all the network profiles in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileListAll.json | -| [networkProfilesListSample.ts][networkprofileslistsample] | Gets all network profiles in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileList.json | -| [networkProfilesUpdateTagsSample.ts][networkprofilesupdatetagssample] | Updates network profile tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileUpdateTags.json | -| [networkSecurityGroupsCreateOrUpdateSample.ts][networksecuritygroupscreateorupdatesample] | Creates or updates a network security group in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreate.json | -| [networkSecurityGroupsDeleteSample.ts][networksecuritygroupsdeletesample] | Deletes the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupDelete.json | -| [networkSecurityGroupsGetSample.ts][networksecuritygroupsgetsample] | Gets the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupGet.json | -| [networkSecurityGroupsListAllSample.ts][networksecuritygroupslistallsample] | Gets all network security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupListAll.json | -| [networkSecurityGroupsListSample.ts][networksecuritygroupslistsample] | Gets all network security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupList.json | -| [networkSecurityGroupsUpdateTagsSample.ts][networksecuritygroupsupdatetagssample] | Updates a network security group tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupUpdateTags.json | -| [networkVirtualApplianceConnectionsCreateOrUpdateSample.ts][networkvirtualapplianceconnectionscreateorupdatesample] | Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionPut.json | -| [networkVirtualApplianceConnectionsDeleteSample.ts][networkvirtualapplianceconnectionsdeletesample] | Deletes a NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionDelete.json | -| [networkVirtualApplianceConnectionsGetSample.ts][networkvirtualapplianceconnectionsgetsample] | Retrieves the details of specified NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionGet.json | -| [networkVirtualApplianceConnectionsListSample.ts][networkvirtualapplianceconnectionslistsample] | Lists NetworkVirtualApplianceConnections under the NVA. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionList.json | -| [networkVirtualAppliancesCreateOrUpdateSample.ts][networkvirtualappliancescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualAppliancePut.json | -| [networkVirtualAppliancesDeleteSample.ts][networkvirtualappliancesdeletesample] | Deletes the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceDelete.json | -| [networkVirtualAppliancesGetSample.ts][networkvirtualappliancesgetsample] | Gets the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceGet.json | -| [networkVirtualAppliancesListByResourceGroupSample.ts][networkvirtualapplianceslistbyresourcegroupsample] | Lists all Network Virtual Appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json | -| [networkVirtualAppliancesListSample.ts][networkvirtualapplianceslistsample] | Gets all Network Virtual Appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListBySubscription.json | -| [networkVirtualAppliancesRestartSample.ts][networkvirtualappliancesrestartsample] | Restarts one or more VMs belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceEmptyRestart.json | -| [networkVirtualAppliancesUpdateTagsSample.ts][networkvirtualappliancesupdatetagssample] | Updates a Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceUpdateTags.json | -| [networkWatchersCheckConnectivitySample.ts][networkwatcherscheckconnectivitysample] | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectivityCheck.json | -| [networkWatchersCreateOrUpdateSample.ts][networkwatcherscreateorupdatesample] | Creates or updates a network watcher in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherCreate.json | -| [networkWatchersDeleteSample.ts][networkwatchersdeletesample] | Deletes the specified network watcher resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherDelete.json | -| [networkWatchersGetAzureReachabilityReportSample.ts][networkwatchersgetazurereachabilityreportsample] | NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json | -| [networkWatchersGetFlowLogStatusSample.ts][networkwatchersgetflowlogstatussample] | Queries status of flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogStatusQuery.json | -| [networkWatchersGetNetworkConfigurationDiagnosticSample.ts][networkwatchersgetnetworkconfigurationdiagnosticsample] | Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json | -| [networkWatchersGetNextHopSample.ts][networkwatchersgetnexthopsample] | Gets the next hop from the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNextHopGet.json | -| [networkWatchersGetSample.ts][networkwatchersgetsample] | Gets the specified network watcher by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherGet.json | -| [networkWatchersGetTopologySample.ts][networkwatchersgettopologysample] | Gets the current network topology by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTopologyGet.json | -| [networkWatchersGetTroubleshootingResultSample.ts][networkwatchersgettroubleshootingresultsample] | Get the last completed troubleshooting result on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootResultQuery.json | -| [networkWatchersGetTroubleshootingSample.ts][networkwatchersgettroubleshootingsample] | Initiate troubleshooting on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootGet.json | -| [networkWatchersGetVMSecurityRulesSample.ts][networkwatchersgetvmsecurityrulessample] | Gets the configured and effective security group rules on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherSecurityGroupViewGet.json | -| [networkWatchersListAllSample.ts][networkwatcherslistallsample] | Gets all network watchers by subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherListAll.json | -| [networkWatchersListAvailableProvidersSample.ts][networkwatcherslistavailableproviderssample] | NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAvailableProvidersListGet.json | -| [networkWatchersListSample.ts][networkwatcherslistsample] | Gets all network watchers by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherList.json | -| [networkWatchersSetFlowLogConfigurationSample.ts][networkwatcherssetflowlogconfigurationsample] | Configures flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogConfigure.json | -| [networkWatchersUpdateTagsSample.ts][networkwatchersupdatetagssample] | Updates a network watcher tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherUpdateTags.json | -| [networkWatchersVerifyIPFlowSample.ts][networkwatchersverifyipflowsample] | Verify IP flow from the specified VM to a location given the currently configured NSG rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherIpFlowVerify.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available Network Rest API operations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/OperationList.json | -| [p2SVpnGatewaysCreateOrUpdateSample.ts][p2svpngatewayscreateorupdatesample] | Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayPut.json | -| [p2SVpnGatewaysDeleteSample.ts][p2svpngatewaysdeletesample] | Deletes a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayDelete.json | -| [p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts][p2svpngatewaysdisconnectp2svpnconnectionssample] | Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json | -| [p2SVpnGatewaysGenerateVpnProfileSample.ts][p2svpngatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts][p2svpngatewaysgetp2svpnconnectionhealthdetailedsample] | Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json | -| [p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts][p2svpngatewaysgetp2svpnconnectionhealthsample] | Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealth.json | -| [p2SVpnGatewaysGetSample.ts][p2svpngatewaysgetsample] | Retrieves the details of a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGet.json | -| [p2SVpnGatewaysListByResourceGroupSample.ts][p2svpngatewayslistbyresourcegroupsample] | Lists all the P2SVpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayListByResourceGroup.json | -| [p2SVpnGatewaysListSample.ts][p2svpngatewayslistsample] | Lists all the P2SVpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayList.json | -| [p2SVpnGatewaysResetSample.ts][p2svpngatewaysresetsample] | Resets the primary of the p2s vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayReset.json | -| [p2SVpnGatewaysUpdateTagsSample.ts][p2svpngatewaysupdatetagssample] | Updates virtual wan p2s vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayUpdateTags.json | -| [packetCapturesCreateSample.ts][packetcapturescreatesample] | Create and start a packet capture on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureCreate.json | -| [packetCapturesDeleteSample.ts][packetcapturesdeletesample] | Deletes the specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureDelete.json | -| [packetCapturesGetSample.ts][packetcapturesgetsample] | Gets a packet capture session by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureGet.json | -| [packetCapturesGetStatusSample.ts][packetcapturesgetstatussample] | Query the status of a running packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json | -| [packetCapturesListSample.ts][packetcaptureslistsample] | Lists all packet capture sessions within the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCapturesList.json | -| [packetCapturesStopSample.ts][packetcapturesstopsample] | Stops a specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureStop.json | -| [peerExpressRouteCircuitConnectionsGetSample.ts][peerexpressroutecircuitconnectionsgetsample] | Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionGet.json | -| [peerExpressRouteCircuitConnectionsListSample.ts][peerexpressroutecircuitconnectionslistsample] | Gets all global reach peer connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionList.json | -| [privateDnsZoneGroupsCreateOrUpdateSample.ts][privatednszonegroupscreateorupdatesample] | Creates or updates a private dns zone group in the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json | -| [privateDnsZoneGroupsDeleteSample.ts][privatednszonegroupsdeletesample] | Deletes the specified private dns zone group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json | -| [privateDnsZoneGroupsGetSample.ts][privatednszonegroupsgetsample] | Gets the private dns zone group resource by specified private dns zone group name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupGet.json | -| [privateDnsZoneGroupsListSample.ts][privatednszonegroupslistsample] | Gets all private dns zone groups in a private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupList.json | -| [privateEndpointsCreateOrUpdateSample.ts][privateendpointscreateorupdatesample] | Creates or updates an private endpoint in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreate.json | -| [privateEndpointsDeleteSample.ts][privateendpointsdeletesample] | Deletes the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDelete.json | -| [privateEndpointsGetSample.ts][privateendpointsgetsample] | Gets the specified private endpoint by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGet.json | -| [privateEndpointsListBySubscriptionSample.ts][privateendpointslistbysubscriptionsample] | Gets all private endpoints in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointListAll.json | -| [privateEndpointsListSample.ts][privateendpointslistsample] | Gets all private endpoints in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointList.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts][privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample] | Checks whether the subscription is visible to private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json | -| [privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts][privatelinkservicescheckprivatelinkservicevisibilitysample] | Checks whether the subscription is visible to private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibility.json | -| [privateLinkServicesCreateOrUpdateSample.ts][privatelinkservicescreateorupdatesample] | Creates or updates an private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceCreate.json | -| [privateLinkServicesDeletePrivateEndpointConnectionSample.ts][privatelinkservicesdeleteprivateendpointconnectionsample] | Delete private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json | -| [privateLinkServicesDeleteSample.ts][privatelinkservicesdeletesample] | Deletes the specified private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDelete.json | -| [privateLinkServicesGetPrivateEndpointConnectionSample.ts][privatelinkservicesgetprivateendpointconnectionsample] | Get the specific private end point connection by specific private link service in the resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json | -| [privateLinkServicesGetSample.ts][privatelinkservicesgetsample] | Gets the specified private link service by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts][privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json | -| [privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts][privatelinkserviceslistautoapprovedprivatelinkservicessample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesGet.json | -| [privateLinkServicesListBySubscriptionSample.ts][privatelinkserviceslistbysubscriptionsample] | Gets all private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListAll.json | -| [privateLinkServicesListPrivateEndpointConnectionsSample.ts][privatelinkserviceslistprivateendpointconnectionssample] | Gets all private end point connections for a specific private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json | -| [privateLinkServicesListSample.ts][privatelinkserviceslistsample] | Gets all private link services in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceList.json | -| [privateLinkServicesUpdatePrivateEndpointConnectionSample.ts][privatelinkservicesupdateprivateendpointconnectionsample] | Approve or reject private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json | -| [publicIPAddressesCreateOrUpdateSample.ts][publicipaddressescreateorupdatesample] | Creates or updates a static or dynamic public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDns.json | -| [publicIPAddressesDdosProtectionStatusSample.ts][publicipaddressesddosprotectionstatussample] | Gets the Ddos Protection Status of a Public IP Address x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json | -| [publicIPAddressesDeleteSample.ts][publicipaddressesdeletesample] | Deletes the specified public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressDelete.json | -| [publicIPAddressesGetCloudServicePublicIpaddressSample.ts][publicipaddressesgetcloudservicepublicipaddresssample] | Get the specified public IP address in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpGet.json | -| [publicIPAddressesGetSample.ts][publicipaddressesgetsample] | Gets the specified public IP address in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGet.json | -| [publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts][publicipaddressesgetvirtualmachinescalesetpublicipaddresssample] | Get the specified public IP address in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpGet.json | -| [publicIPAddressesListAllSample.ts][publicipaddresseslistallsample] | Gets all the public IP addresses in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressListAll.json | -| [publicIPAddressesListCloudServicePublicIpaddressesSample.ts][publicipaddresseslistcloudservicepublicipaddressessample] | Gets information about all public IP addresses on a cloud service level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpListAll.json | -| [publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts][publicipaddresseslistcloudserviceroleinstancepublicipaddressessample] | Gets information about all public IP addresses in a role instance IP configuration in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstancePublicIpList.json | -| [publicIPAddressesListSample.ts][publicipaddresseslistsample] | Gets all public IP addresses in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressList.json | -| [publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts][publicipaddresseslistvirtualmachinescalesetpublicipaddressessample] | Gets information about all public IP addresses on a virtual machine scale set level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpListAll.json | -| [publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts][publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample] | Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmPublicIpList.json | -| [publicIPAddressesUpdateTagsSample.ts][publicipaddressesupdatetagssample] | Updates public IP address tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressUpdateTags.json | -| [publicIPPrefixesCreateOrUpdateSample.ts][publicipprefixescreateorupdatesample] | Creates or updates a static or dynamic public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateCustomizedValues.json | -| [publicIPPrefixesDeleteSample.ts][publicipprefixesdeletesample] | Deletes the specified public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixDelete.json | -| [publicIPPrefixesGetSample.ts][publicipprefixesgetsample] | Gets the specified public IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixGet.json | -| [publicIPPrefixesListAllSample.ts][publicipprefixeslistallsample] | Gets all the public IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixListAll.json | -| [publicIPPrefixesListSample.ts][publicipprefixeslistsample] | Gets all public IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixList.json | -| [publicIPPrefixesUpdateTagsSample.ts][publicipprefixesupdatetagssample] | Updates public IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixUpdateTags.json | -| [putBastionShareableLinkSample.ts][putbastionshareablelinksample] | Creates a Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkCreate.json | -| [resourceNavigationLinksListSample.ts][resourcenavigationlinkslistsample] | Gets a list of resource navigation links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json | -| [routeFilterRulesCreateOrUpdateSample.ts][routefilterrulescreateorupdatesample] | Creates or updates a route in the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleCreate.json | -| [routeFilterRulesDeleteSample.ts][routefilterrulesdeletesample] | Deletes the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleDelete.json | -| [routeFilterRulesGetSample.ts][routefilterrulesgetsample] | Gets the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleGet.json | -| [routeFilterRulesListByRouteFilterSample.ts][routefilterruleslistbyroutefiltersample] | Gets all RouteFilterRules in a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleListByRouteFilter.json | -| [routeFiltersCreateOrUpdateSample.ts][routefilterscreateorupdatesample] | Creates or updates a route filter in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterCreate.json | -| [routeFiltersDeleteSample.ts][routefiltersdeletesample] | Deletes the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterDelete.json | -| [routeFiltersGetSample.ts][routefiltersgetsample] | Gets the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterGet.json | -| [routeFiltersListByResourceGroupSample.ts][routefilterslistbyresourcegroupsample] | Gets all route filters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterListByResourceGroup.json | -| [routeFiltersListSample.ts][routefilterslistsample] | Gets all route filters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterList.json | -| [routeFiltersUpdateTagsSample.ts][routefiltersupdatetagssample] | Updates tags of a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterUpdateTags.json | -| [routeMapsCreateOrUpdateSample.ts][routemapscreateorupdatesample] | Creates a RouteMap if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapPut.json | -| [routeMapsDeleteSample.ts][routemapsdeletesample] | Deletes a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapDelete.json | -| [routeMapsGetSample.ts][routemapsgetsample] | Retrieves the details of a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapGet.json | -| [routeMapsListSample.ts][routemapslistsample] | Retrieves the details of all RouteMaps. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapList.json | -| [routeTablesCreateOrUpdateSample.ts][routetablescreateorupdatesample] | Create or updates a route table in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreate.json | -| [routeTablesDeleteSample.ts][routetablesdeletesample] | Deletes the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableDelete.json | -| [routeTablesGetSample.ts][routetablesgetsample] | Gets the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableGet.json | -| [routeTablesListAllSample.ts][routetableslistallsample] | Gets all route tables in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableListAll.json | -| [routeTablesListSample.ts][routetableslistsample] | Gets all route tables in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableList.json | -| [routeTablesUpdateTagsSample.ts][routetablesupdatetagssample] | Updates a route table tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableUpdateTags.json | -| [routesCreateOrUpdateSample.ts][routescreateorupdatesample] | Creates or updates a route in the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteCreate.json | -| [routesDeleteSample.ts][routesdeletesample] | Deletes the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteDelete.json | -| [routesGetSample.ts][routesgetsample] | Gets the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteGet.json | -| [routesListSample.ts][routeslistsample] | Gets all routes in a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteList.json | -| [routingIntentCreateOrUpdateSample.ts][routingintentcreateorupdatesample] | Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentPut.json | -| [routingIntentDeleteSample.ts][routingintentdeletesample] | Deletes a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentDelete.json | -| [routingIntentGetSample.ts][routingintentgetsample] | Retrieves the details of a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentGet.json | -| [routingIntentListSample.ts][routingintentlistsample] | Retrieves the details of all RoutingIntent child resources of the VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentList.json | -| [routingRuleCollectionsCreateOrUpdateSample.ts][routingrulecollectionscreateorupdatesample] | Creates or updates a routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json | -| [routingRuleCollectionsDeleteSample.ts][routingrulecollectionsdeletesample] | Deletes an routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json | -| [routingRuleCollectionsGetSample.ts][routingrulecollectionsgetsample] | Gets a network manager routing configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json | -| [routingRuleCollectionsListSample.ts][routingrulecollectionslistsample] | Lists all the rule collections in a routing configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionList.json | -| [routingRulesCreateOrUpdateSample.ts][routingrulescreateorupdatesample] | Creates or updates an routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRulePut.json | -| [routingRulesDeleteSample.ts][routingrulesdeletesample] | Deletes a routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleDelete.json | -| [routingRulesGetSample.ts][routingrulesgetsample] | Gets a network manager routing configuration routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleGet.json | -| [routingRulesListSample.ts][routingruleslistsample] | List all network manager routing configuration routing rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleList.json | -| [scopeConnectionsCreateOrUpdateSample.ts][scopeconnectionscreateorupdatesample] | Creates or updates scope connection from Network Manager x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionPut.json | -| [scopeConnectionsDeleteSample.ts][scopeconnectionsdeletesample] | Delete the pending scope connection created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionDelete.json | -| [scopeConnectionsGetSample.ts][scopeconnectionsgetsample] | Get specified scope connection created by this Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionGet.json | -| [scopeConnectionsListSample.ts][scopeconnectionslistsample] | List all scope connections created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionList.json | -| [securityAdminConfigurationsCreateOrUpdateSample.ts][securityadminconfigurationscreateorupdatesample] | Creates or updates a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationPut.json | -| [securityAdminConfigurationsDeleteSample.ts][securityadminconfigurationsdeletesample] | Deletes a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json | -| [securityAdminConfigurationsGetSample.ts][securityadminconfigurationsgetsample] | Retrieves a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json | -| [securityAdminConfigurationsListSample.ts][securityadminconfigurationslistsample] | Lists all the network manager security admin configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json | -| [securityPartnerProvidersCreateOrUpdateSample.ts][securitypartnerproviderscreateorupdatesample] | Creates or updates the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderPut.json | -| [securityPartnerProvidersDeleteSample.ts][securitypartnerprovidersdeletesample] | Deletes the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderDelete.json | -| [securityPartnerProvidersGetSample.ts][securitypartnerprovidersgetsample] | Gets the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderGet.json | -| [securityPartnerProvidersListByResourceGroupSample.ts][securitypartnerproviderslistbyresourcegroupsample] | Lists all Security Partner Providers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListByResourceGroup.json | -| [securityPartnerProvidersListSample.ts][securitypartnerproviderslistsample] | Gets all the Security Partner Providers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListBySubscription.json | -| [securityPartnerProvidersUpdateTagsSample.ts][securitypartnerprovidersupdatetagssample] | Updates tags of a Security Partner Provider resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderUpdateTags.json | -| [securityRulesCreateOrUpdateSample.ts][securityrulescreateorupdatesample] | Creates or updates a security rule in the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleCreate.json | -| [securityRulesDeleteSample.ts][securityrulesdeletesample] | Deletes the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleDelete.json | -| [securityRulesGetSample.ts][securityrulesgetsample] | Get the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleGet.json | -| [securityRulesListSample.ts][securityruleslistsample] | Gets all security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleList.json | -| [securityUserConfigurationsCreateOrUpdateSample.ts][securityuserconfigurationscreateorupdatesample] | Creates or updates a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json | -| [securityUserConfigurationsDeleteSample.ts][securityuserconfigurationsdeletesample] | Deletes a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json | -| [securityUserConfigurationsGetSample.ts][securityuserconfigurationsgetsample] | Retrieves a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json | -| [securityUserConfigurationsListSample.ts][securityuserconfigurationslistsample] | Lists all the network manager security user configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationList.json | -| [securityUserRuleCollectionsCreateOrUpdateSample.ts][securityuserrulecollectionscreateorupdatesample] | Creates or updates a security user rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json | -| [securityUserRuleCollectionsDeleteSample.ts][securityuserrulecollectionsdeletesample] | Deletes a Security User Rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json | -| [securityUserRuleCollectionsGetSample.ts][securityuserrulecollectionsgetsample] | Gets a network manager security user configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json | -| [securityUserRuleCollectionsListSample.ts][securityuserrulecollectionslistsample] | Lists all the security user rule collections in a security configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json | -| [securityUserRulesCreateOrUpdateSample.ts][securityuserrulescreateorupdatesample] | Creates or updates a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRulePut.json | -| [securityUserRulesDeleteSample.ts][securityuserrulesdeletesample] | Deletes a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleDelete.json | -| [securityUserRulesGetSample.ts][securityuserrulesgetsample] | Gets a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleGet.json | -| [securityUserRulesListSample.ts][securityuserruleslistsample] | Lists all Security User Rules in a rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleList.json | -| [serviceAssociationLinksListSample.ts][serviceassociationlinkslistsample] | Gets a list of service association links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json | -| [serviceEndpointPoliciesCreateOrUpdateSample.ts][serviceendpointpoliciescreateorupdatesample] | Creates or updates a service Endpoint Policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreate.json | -| [serviceEndpointPoliciesDeleteSample.ts][serviceendpointpoliciesdeletesample] | Deletes the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDelete.json | -| [serviceEndpointPoliciesGetSample.ts][serviceendpointpoliciesgetsample] | Gets the specified service Endpoint Policies in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyGet.json | -| [serviceEndpointPoliciesListByResourceGroupSample.ts][serviceendpointpolicieslistbyresourcegroupsample] | Gets all service endpoint Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyList.json | -| [serviceEndpointPoliciesListSample.ts][serviceendpointpolicieslistsample] | Gets all the service endpoint policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyListAll.json | -| [serviceEndpointPoliciesUpdateTagsSample.ts][serviceendpointpoliciesupdatetagssample] | Updates tags of a service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyUpdateTags.json | -| [serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts][serviceendpointpolicydefinitionscreateorupdatesample] | Creates or updates a service endpoint policy definition in the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionCreate.json | -| [serviceEndpointPolicyDefinitionsDeleteSample.ts][serviceendpointpolicydefinitionsdeletesample] | Deletes the specified ServiceEndpoint policy definitions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json | -| [serviceEndpointPolicyDefinitionsGetSample.ts][serviceendpointpolicydefinitionsgetsample] | Get the specified service endpoint policy definitions from service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionGet.json | -| [serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts][serviceendpointpolicydefinitionslistbyresourcegroupsample] | Gets all service endpoint policy definitions in a service end point policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionList.json | -| [serviceTagInformationListSample.ts][servicetaginformationlistsample] | Gets a list of service tag information resources with pagination. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResult.json | -| [serviceTagsListSample.ts][servicetagslistsample] | Gets a list of service tag information resources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagsList.json | -| [staticMembersCreateOrUpdateSample.ts][staticmemberscreateorupdatesample] | Creates or updates a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberPut.json | -| [staticMembersDeleteSample.ts][staticmembersdeletesample] | Deletes a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberDelete.json | -| [staticMembersGetSample.ts][staticmembersgetsample] | Gets the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberGet.json | -| [staticMembersListSample.ts][staticmemberslistsample] | Lists the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberList.json | -| [subnetsCreateOrUpdateSample.ts][subnetscreateorupdatesample] | Creates or updates a subnet in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreate.json | -| [subnetsDeleteSample.ts][subnetsdeletesample] | Deletes the specified subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetDelete.json | -| [subnetsGetSample.ts][subnetsgetsample] | Gets the specified subnet by virtual network and resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGet.json | -| [subnetsListSample.ts][subnetslistsample] | Gets all subnets in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetList.json | -| [subnetsPrepareNetworkPoliciesSample.ts][subnetspreparenetworkpoliciessample] | Prepares a subnet by applying network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetPrepareNetworkPolicies.json | -| [subnetsUnprepareNetworkPoliciesSample.ts][subnetsunpreparenetworkpoliciessample] | Unprepares a subnet by removing network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetUnprepareNetworkPolicies.json | -| [subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts][subscriptionnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionPut.json | -| [subscriptionNetworkManagerConnectionsDeleteSample.ts][subscriptionnetworkmanagerconnectionsdeletesample] | Delete specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json | -| [subscriptionNetworkManagerConnectionsGetSample.ts][subscriptionnetworkmanagerconnectionsgetsample] | Get a specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionGet.json | -| [subscriptionNetworkManagerConnectionsListSample.ts][subscriptionnetworkmanagerconnectionslistsample] | List all network manager connections created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionList.json | -| [supportedSecurityProvidersSample.ts][supportedsecurityproviderssample] | Gives the supported security providers for the virtual wan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWanSupportedSecurityProviders.json | -| [usagesListSample.ts][usageslistsample] | List network usages for a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageList.json | -| [vipSwapCreateSample.ts][vipswapcreatesample] | Performs vip swap operation on swappable cloud services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapPut.json | -| [vipSwapGetSample.ts][vipswapgetsample] | Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapGet.json | -| [vipSwapListSample.ts][vipswaplistsample] | Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapList.json | -| [virtualApplianceSitesCreateOrUpdateSample.ts][virtualappliancesitescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSitePut.json | -| [virtualApplianceSitesDeleteSample.ts][virtualappliancesitesdeletesample] | Deletes the specified site from a Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteDelete.json | -| [virtualApplianceSitesGetSample.ts][virtualappliancesitesgetsample] | Gets the specified Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteGet.json | -| [virtualApplianceSitesListSample.ts][virtualappliancesiteslistsample] | Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteList.json | -| [virtualApplianceSkusGetSample.ts][virtualapplianceskusgetsample] | Retrieves a single available sku for network virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuGet.json | -| [virtualApplianceSkusListSample.ts][virtualapplianceskuslistsample] | List all SKUs available for a virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuList.json | -| [virtualHubBgpConnectionCreateOrUpdateSample.ts][virtualhubbgpconnectioncreateorupdatesample] | Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionPut.json | -| [virtualHubBgpConnectionDeleteSample.ts][virtualhubbgpconnectiondeletesample] | Deletes a VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionDelete.json | -| [virtualHubBgpConnectionGetSample.ts][virtualhubbgpconnectiongetsample] | Retrieves the details of a Virtual Hub Bgp Connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionGet.json | -| [virtualHubBgpConnectionsListAdvertisedRoutesSample.ts][virtualhubbgpconnectionslistadvertisedroutessample] | Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json | -| [virtualHubBgpConnectionsListLearnedRoutesSample.ts][virtualhubbgpconnectionslistlearnedroutessample] | Retrieves a list of routes the virtual hub bgp connection has learned. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListLearnedRoute.json | -| [virtualHubBgpConnectionsListSample.ts][virtualhubbgpconnectionslistsample] | Retrieves the details of all VirtualHubBgpConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionList.json | -| [virtualHubIPConfigurationCreateOrUpdateSample.ts][virtualhubipconfigurationcreateorupdatesample] | Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationPut.json | -| [virtualHubIPConfigurationDeleteSample.ts][virtualhubipconfigurationdeletesample] | Deletes a VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationDelete.json | -| [virtualHubIPConfigurationGetSample.ts][virtualhubipconfigurationgetsample] | Retrieves the details of a Virtual Hub Ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationGet.json | -| [virtualHubIPConfigurationListSample.ts][virtualhubipconfigurationlistsample] | Retrieves the details of all VirtualHubIpConfigurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationList.json | -| [virtualHubRouteTableV2SCreateOrUpdateSample.ts][virtualhubroutetablev2screateorupdatesample] | Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Put.json | -| [virtualHubRouteTableV2SDeleteSample.ts][virtualhubroutetablev2sdeletesample] | Deletes a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Delete.json | -| [virtualHubRouteTableV2SGetSample.ts][virtualhubroutetablev2sgetsample] | Retrieves the details of a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Get.json | -| [virtualHubRouteTableV2SListSample.ts][virtualhubroutetablev2slistsample] | Retrieves the details of all VirtualHubRouteTableV2s. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2List.json | -| [virtualHubsCreateOrUpdateSample.ts][virtualhubscreateorupdatesample] | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubPut.json | -| [virtualHubsDeleteSample.ts][virtualhubsdeletesample] | Deletes a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubDelete.json | -| [virtualHubsGetEffectiveVirtualHubRoutesSample.ts][virtualhubsgeteffectivevirtualhubroutessample] | Gets the effective routes configured for the Virtual Hub resource or the specified resource . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForConnection.json | -| [virtualHubsGetInboundRoutesSample.ts][virtualhubsgetinboundroutessample] | Gets the inbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetInboundRoutes.json | -| [virtualHubsGetOutboundRoutesSample.ts][virtualhubsgetoutboundroutessample] | Gets the outbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetOutboundRoutes.json | -| [virtualHubsGetSample.ts][virtualhubsgetsample] | Retrieves the details of a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubGet.json | -| [virtualHubsListByResourceGroupSample.ts][virtualhubslistbyresourcegroupsample] | Lists all the VirtualHubs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubListByResourceGroup.json | -| [virtualHubsListSample.ts][virtualhubslistsample] | Lists all the VirtualHubs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubList.json | -| [virtualHubsUpdateTagsSample.ts][virtualhubsupdatetagssample] | Updates VirtualHub tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubUpdateTags.json | -| [virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts][virtualnetworkgatewayconnectionscreateorupdatesample] | Creates or updates a virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionCreate.json | -| [virtualNetworkGatewayConnectionsDeleteSample.ts][virtualnetworkgatewayconnectionsdeletesample] | Deletes the specified virtual network Gateway connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionDelete.json | -| [virtualNetworkGatewayConnectionsGetIkeSasSample.ts][virtualnetworkgatewayconnectionsgetikesassample] | Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json | -| [virtualNetworkGatewayConnectionsGetSample.ts][virtualnetworkgatewayconnectionsgetsample] | Gets the specified virtual network gateway connection by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGet.json | -| [virtualNetworkGatewayConnectionsGetSharedKeySample.ts][virtualnetworkgatewayconnectionsgetsharedkeysample] | The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json | -| [virtualNetworkGatewayConnectionsListSample.ts][virtualnetworkgatewayconnectionslistsample] | The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionsList.json | -| [virtualNetworkGatewayConnectionsResetConnectionSample.ts][virtualnetworkgatewayconnectionsresetconnectionsample] | Resets the virtual network gateway connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionReset.json | -| [virtualNetworkGatewayConnectionsResetSharedKeySample.ts][virtualnetworkgatewayconnectionsresetsharedkeysample] | The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json | -| [virtualNetworkGatewayConnectionsSetSharedKeySample.ts][virtualnetworkgatewayconnectionssetsharedkeysample] | The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json | -| [virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts][virtualnetworkgatewayconnectionsstartpacketcapturesample] | Starts packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json | -| [virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts][virtualnetworkgatewayconnectionsstoppacketcapturesample] | Stops packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json | -| [virtualNetworkGatewayConnectionsUpdateTagsSample.ts][virtualnetworkgatewayconnectionsupdatetagssample] | Updates a virtual network gateway connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json | -| [virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts][virtualnetworkgatewaynatrulescreateorupdatesample] | Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRulePut.json | -| [virtualNetworkGatewayNatRulesDeleteSample.ts][virtualnetworkgatewaynatrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json | -| [virtualNetworkGatewayNatRulesGetSample.ts][virtualnetworkgatewaynatrulesgetsample] | Retrieves the details of a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleGet.json | -| [virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts][virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample] | Retrieves all nat rules for a particular virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleList.json | -| [virtualNetworkGatewaysCreateOrUpdateSample.ts][virtualnetworkgatewayscreateorupdatesample] | Creates or updates a virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdate.json | -| [virtualNetworkGatewaysDeleteSample.ts][virtualnetworkgatewaysdeletesample] | Deletes the specified virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayDelete.json | -| [virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts][virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample] | Disconnect vpn connections of virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json | -| [virtualNetworkGatewaysGenerateVpnProfileSample.ts][virtualnetworkgatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json | -| [virtualNetworkGatewaysGeneratevpnclientpackageSample.ts][virtualnetworkgatewaysgeneratevpnclientpackagesample] | Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json | -| [virtualNetworkGatewaysGetAdvertisedRoutesSample.ts][virtualnetworkgatewaysgetadvertisedroutessample] | This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json | -| [virtualNetworkGatewaysGetBgpPeerStatusSample.ts][virtualnetworkgatewaysgetbgppeerstatussample] | The GetBgpPeerStatus operation retrieves the status of all BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json | -| [virtualNetworkGatewaysGetLearnedRoutesSample.ts][virtualnetworkgatewaysgetlearnedroutessample] | This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json | -| [virtualNetworkGatewaysGetSample.ts][virtualnetworkgatewaysgetsample] | Gets the specified virtual network gateway by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGet.json | -| [virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts][virtualnetworkgatewaysgetvpnprofilepackageurlsample] | Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json | -| [virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts][virtualnetworkgatewaysgetvpnclientconnectionhealthsample] | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json | -| [virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts][virtualnetworkgatewaysgetvpnclientipsecparameterssample] | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysListConnectionsSample.ts][virtualnetworkgatewayslistconnectionssample] | Gets all the connections in a virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysListConnections.json | -| [virtualNetworkGatewaysListSample.ts][virtualnetworkgatewayslistsample] | Gets all virtual network gateways by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayList.json | -| [virtualNetworkGatewaysResetSample.ts][virtualnetworkgatewaysresetsample] | Resets the primary of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayReset.json | -| [virtualNetworkGatewaysResetVpnClientSharedKeySample.ts][virtualnetworkgatewaysresetvpnclientsharedkeysample] | Resets the VPN client shared key of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json | -| [virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts][virtualnetworkgatewayssetvpnclientipsecparameterssample] | The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json | -| [virtualNetworkGatewaysStartPacketCaptureSample.ts][virtualnetworkgatewaysstartpacketcapturesample] | Starts packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json | -| [virtualNetworkGatewaysStopPacketCaptureSample.ts][virtualnetworkgatewaysstoppacketcapturesample] | Stops packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json | -| [virtualNetworkGatewaysSupportedVpnDevicesSample.ts][virtualnetworkgatewayssupportedvpndevicessample] | Gets a xml format representation for supported vpn devices. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json | -| [virtualNetworkGatewaysUpdateTagsSample.ts][virtualnetworkgatewaysupdatetagssample] | Updates a virtual network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdateTags.json | -| [virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts][virtualnetworkgatewaysvpndeviceconfigurationscriptsample] | Gets a xml format representation for vpn device configuration script. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json | -| [virtualNetworkPeeringsCreateOrUpdateSample.ts][virtualnetworkpeeringscreateorupdatesample] | Creates or updates a peering in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringCreate.json | -| [virtualNetworkPeeringsDeleteSample.ts][virtualnetworkpeeringsdeletesample] | Deletes the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringDelete.json | -| [virtualNetworkPeeringsGetSample.ts][virtualnetworkpeeringsgetsample] | Gets the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json | -| [virtualNetworkPeeringsListSample.ts][virtualnetworkpeeringslistsample] | Gets all virtual network peerings in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringList.json | -| [virtualNetworkTapsCreateOrUpdateSample.ts][virtualnetworktapscreateorupdatesample] | Creates or updates a Virtual Network Tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapCreate.json | -| [virtualNetworkTapsDeleteSample.ts][virtualnetworktapsdeletesample] | Deletes the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapDelete.json | -| [virtualNetworkTapsGetSample.ts][virtualnetworktapsgetsample] | Gets information about the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapGet.json | -| [virtualNetworkTapsListAllSample.ts][virtualnetworktapslistallsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapListAll.json | -| [virtualNetworkTapsListByResourceGroupSample.ts][virtualnetworktapslistbyresourcegroupsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapList.json | -| [virtualNetworkTapsUpdateTagsSample.ts][virtualnetworktapsupdatetagssample] | Updates an VirtualNetworkTap tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapUpdateTags.json | -| [virtualNetworksCheckIPAddressAvailabilitySample.ts][virtualnetworkscheckipaddressavailabilitysample] | Checks whether a private IP address is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json | -| [virtualNetworksCreateOrUpdateSample.ts][virtualnetworkscreateorupdatesample] | Creates or updates a virtual network in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreate.json | -| [virtualNetworksDeleteSample.ts][virtualnetworksdeletesample] | Deletes the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkDelete.json | -| [virtualNetworksGetSample.ts][virtualnetworksgetsample] | Gets the specified virtual network by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGet.json | -| [virtualNetworksListAllSample.ts][virtualnetworkslistallsample] | Gets all virtual networks in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListAll.json | -| [virtualNetworksListDdosProtectionStatusSample.ts][virtualnetworkslistddosprotectionstatussample] | Gets the Ddos Protection Status of all IP Addresses under the Virtual Network x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json | -| [virtualNetworksListSample.ts][virtualnetworkslistsample] | Gets all virtual networks in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkList.json | -| [virtualNetworksListUsageSample.ts][virtualnetworkslistusagesample] | Lists usage stats. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListUsage.json | -| [virtualNetworksUpdateTagsSample.ts][virtualnetworksupdatetagssample] | Updates a virtual network tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkUpdateTags.json | -| [virtualRouterPeeringsCreateOrUpdateSample.ts][virtualrouterpeeringscreateorupdatesample] | Creates or updates the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringPut.json | -| [virtualRouterPeeringsDeleteSample.ts][virtualrouterpeeringsdeletesample] | Deletes the specified peering from a Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringDelete.json | -| [virtualRouterPeeringsGetSample.ts][virtualrouterpeeringsgetsample] | Gets the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringGet.json | -| [virtualRouterPeeringsListSample.ts][virtualrouterpeeringslistsample] | Lists all Virtual Router Peerings in a Virtual Router resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringList.json | -| [virtualRoutersCreateOrUpdateSample.ts][virtualrouterscreateorupdatesample] | Creates or updates the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPut.json | -| [virtualRoutersDeleteSample.ts][virtualroutersdeletesample] | Deletes the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterDelete.json | -| [virtualRoutersGetSample.ts][virtualroutersgetsample] | Gets the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterGet.json | -| [virtualRoutersListByResourceGroupSample.ts][virtualrouterslistbyresourcegroupsample] | Lists all Virtual Routers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListByResourceGroup.json | -| [virtualRoutersListSample.ts][virtualrouterslistsample] | Gets all the Virtual Routers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListBySubscription.json | -| [virtualWansCreateOrUpdateSample.ts][virtualwanscreateorupdatesample] | Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANPut.json | -| [virtualWansDeleteSample.ts][virtualwansdeletesample] | Deletes a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANDelete.json | -| [virtualWansGetSample.ts][virtualwansgetsample] | Retrieves the details of a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANGet.json | -| [virtualWansListByResourceGroupSample.ts][virtualwanslistbyresourcegroupsample] | Lists all the VirtualWANs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANListByResourceGroup.json | -| [virtualWansListSample.ts][virtualwanslistsample] | Lists all the VirtualWANs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANList.json | -| [virtualWansUpdateTagsSample.ts][virtualwansupdatetagssample] | Updates a VirtualWAN tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANUpdateTags.json | -| [vpnConnectionsCreateOrUpdateSample.ts][vpnconnectionscreateorupdatesample] | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionPut.json | -| [vpnConnectionsDeleteSample.ts][vpnconnectionsdeletesample] | Deletes a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionDelete.json | -| [vpnConnectionsGetSample.ts][vpnconnectionsgetsample] | Retrieves the details of a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionGet.json | -| [vpnConnectionsListByVpnGatewaySample.ts][vpnconnectionslistbyvpngatewaysample] | Retrieves all vpn connections for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionList.json | -| [vpnConnectionsStartPacketCaptureSample.ts][vpnconnectionsstartpacketcapturesample] | Starts packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json | -| [vpnConnectionsStopPacketCaptureSample.ts][vpnconnectionsstoppacketcapturesample] | Stops packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStopPacketCapture.json | -| [vpnGatewaysCreateOrUpdateSample.ts][vpngatewayscreateorupdatesample] | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayPut.json | -| [vpnGatewaysDeleteSample.ts][vpngatewaysdeletesample] | Deletes a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayDelete.json | -| [vpnGatewaysGetSample.ts][vpngatewaysgetsample] | Retrieves the details of a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayGet.json | -| [vpnGatewaysListByResourceGroupSample.ts][vpngatewayslistbyresourcegroupsample] | Lists all the VpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayListByResourceGroup.json | -| [vpnGatewaysListSample.ts][vpngatewayslistsample] | Lists all the VpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayList.json | -| [vpnGatewaysResetSample.ts][vpngatewaysresetsample] | Resets the primary of the vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayReset.json | -| [vpnGatewaysStartPacketCaptureSample.ts][vpngatewaysstartpacketcapturesample] | Starts packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json | -| [vpnGatewaysStopPacketCaptureSample.ts][vpngatewaysstoppacketcapturesample] | Stops packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStopPacketCapture.json | -| [vpnGatewaysUpdateTagsSample.ts][vpngatewaysupdatetagssample] | Updates virtual wan vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayUpdateTags.json | -| [vpnLinkConnectionsGetAllSharedKeysSample.ts][vpnlinkconnectionsgetallsharedkeyssample] | Lists all shared keys of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json | -| [vpnLinkConnectionsGetDefaultSharedKeySample.ts][vpnlinkconnectionsgetdefaultsharedkeysample] | Gets the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json | -| [vpnLinkConnectionsGetIkeSasSample.ts][vpnlinkconnectionsgetikesassample] | Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json | -| [vpnLinkConnectionsListByVpnConnectionSample.ts][vpnlinkconnectionslistbyvpnconnectionsample] | Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionList.json | -| [vpnLinkConnectionsListDefaultSharedKeySample.ts][vpnlinkconnectionslistdefaultsharedkeysample] | Gets the value of the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json | -| [vpnLinkConnectionsResetConnectionSample.ts][vpnlinkconnectionsresetconnectionsample] | Resets the VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionReset.json | -| [vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts][vpnlinkconnectionssetorinitdefaultsharedkeysample] | Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json | -| [vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts][vpnserverconfigurationsassociatedwithvirtualwanlistsample] | Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetVirtualWanVpnServerConfigurations.json | -| [vpnServerConfigurationsCreateOrUpdateSample.ts][vpnserverconfigurationscreateorupdatesample] | Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationPut.json | -| [vpnServerConfigurationsDeleteSample.ts][vpnserverconfigurationsdeletesample] | Deletes a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationDelete.json | -| [vpnServerConfigurationsGetSample.ts][vpnserverconfigurationsgetsample] | Retrieves the details of a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationGet.json | -| [vpnServerConfigurationsListByResourceGroupSample.ts][vpnserverconfigurationslistbyresourcegroupsample] | Lists all the vpnServerConfigurations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationListByResourceGroup.json | -| [vpnServerConfigurationsListSample.ts][vpnserverconfigurationslistsample] | Lists all the VpnServerConfigurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationList.json | -| [vpnServerConfigurationsUpdateTagsSample.ts][vpnserverconfigurationsupdatetagssample] | Updates VpnServerConfiguration tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationUpdateTags.json | -| [vpnSiteLinkConnectionsGetSample.ts][vpnsitelinkconnectionsgetsample] | Retrieves the details of a vpn site link connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGet.json | -| [vpnSiteLinksGetSample.ts][vpnsitelinksgetsample] | Retrieves the details of a VPN site link. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkGet.json | -| [vpnSiteLinksListByVpnSiteSample.ts][vpnsitelinkslistbyvpnsitesample] | Lists all the vpnSiteLinks in a resource group for a vpn site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkListByVpnSite.json | -| [vpnSitesConfigurationDownloadSample.ts][vpnsitesconfigurationdownloadsample] | Gives the sas-url to download the configurations for vpn-sites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitesConfigurationDownload.json | -| [vpnSitesCreateOrUpdateSample.ts][vpnsitescreateorupdatesample] | Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitePut.json | -| [vpnSitesDeleteSample.ts][vpnsitesdeletesample] | Deletes a VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteDelete.json | -| [vpnSitesGetSample.ts][vpnsitesgetsample] | Retrieves the details of a VPN site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteGet.json | -| [vpnSitesListByResourceGroupSample.ts][vpnsiteslistbyresourcegroupsample] | Lists all the vpnSites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteListByResourceGroup.json | -| [vpnSitesListSample.ts][vpnsiteslistsample] | Lists all the VpnSites in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteList.json | -| [vpnSitesUpdateTagsSample.ts][vpnsitesupdatetagssample] | Updates VpnSite tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteUpdateTags.json | -| [webApplicationFirewallPoliciesCreateOrUpdateSample.ts][webapplicationfirewallpoliciescreateorupdatesample] | Creates or update policy with specified rule set name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyCreateOrUpdate.json | -| [webApplicationFirewallPoliciesDeleteSample.ts][webapplicationfirewallpoliciesdeletesample] | Deletes Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyDelete.json | -| [webApplicationFirewallPoliciesGetSample.ts][webapplicationfirewallpoliciesgetsample] | Retrieve protection policy with specified name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyGet.json | -| [webApplicationFirewallPoliciesListAllSample.ts][webapplicationfirewallpolicieslistallsample] | Gets all the WAF policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListAllPolicies.json | -| [webApplicationFirewallPoliciesListSample.ts][webapplicationfirewallpolicieslistsample] | Lists all of the protection policies within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListPolicies.json | -| [webCategoriesGetSample.ts][webcategoriesgetsample] | Gets the specified Azure Web Category. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoryGet.json | -| [webCategoriesListBySubscriptionSample.ts][webcategorieslistbysubscriptionsample] | Gets all the Azure Web Categories in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoriesListBySubscription.json | +| [adminRuleCollectionsCreateOrUpdateSample.ts][adminrulecollectionscreateorupdatesample] | Creates or updates an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionPut.json | +| [adminRuleCollectionsDeleteSample.ts][adminrulecollectionsdeletesample] | Deletes an admin rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json | +| [adminRuleCollectionsGetSample.ts][adminrulecollectionsgetsample] | Gets a network manager security admin configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionGet.json | +| [adminRuleCollectionsListSample.ts][adminrulecollectionslistsample] | Lists all the rule collections in a security admin configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionList.json | +| [adminRulesCreateOrUpdateSample.ts][adminrulescreateorupdatesample] | Creates or updates an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json | +| [adminRulesDeleteSample.ts][adminrulesdeletesample] | Deletes an admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleDelete.json | +| [adminRulesGetSample.ts][adminrulesgetsample] | Gets a network manager security configuration admin rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleGet.json | +| [adminRulesListSample.ts][adminruleslistsample] | List all network manager security configuration admin rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleList.json | +| [applicationGatewayPrivateEndpointConnectionsDeleteSample.ts][applicationgatewayprivateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json | +| [applicationGatewayPrivateEndpointConnectionsGetSample.ts][applicationgatewayprivateendpointconnectionsgetsample] | Gets the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json | +| [applicationGatewayPrivateEndpointConnectionsListSample.ts][applicationgatewayprivateendpointconnectionslistsample] | Lists all private endpoint connections on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json | +| [applicationGatewayPrivateEndpointConnectionsUpdateSample.ts][applicationgatewayprivateendpointconnectionsupdatesample] | Updates the specified private endpoint connection on application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json | +| [applicationGatewayPrivateLinkResourcesListSample.ts][applicationgatewayprivatelinkresourceslistsample] | Lists all private link resources on an application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json | +| [applicationGatewayWafDynamicManifestsDefaultGetSample.ts][applicationgatewaywafdynamicmanifestsdefaultgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json | +| [applicationGatewayWafDynamicManifestsGetSample.ts][applicationgatewaywafdynamicmanifestsgetsample] | Gets the regional application gateway waf manifest. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifests.json | +| [applicationGatewaysBackendHealthOnDemandSample.ts][applicationgatewaysbackendhealthondemandsample] | Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthTest.json | +| [applicationGatewaysBackendHealthSample.ts][applicationgatewaysbackendhealthsample] | Gets the backend health of the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthGet.json | +| [applicationGatewaysCreateOrUpdateSample.ts][applicationgatewayscreateorupdatesample] | Creates or updates the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayCreate.json | +| [applicationGatewaysDeleteSample.ts][applicationgatewaysdeletesample] | Deletes the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayDelete.json | +| [applicationGatewaysGetSample.ts][applicationgatewaysgetsample] | Gets the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayGet.json | +| [applicationGatewaysGetSslPredefinedPolicySample.ts][applicationgatewaysgetsslpredefinedpolicysample] | Gets Ssl predefined policy with the specified policy name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json | +| [applicationGatewaysListAllSample.ts][applicationgatewayslistallsample] | Gets all the application gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayListAll.json | +| [applicationGatewaysListAvailableRequestHeadersSample.ts][applicationgatewayslistavailablerequestheaderssample] | Lists all available request headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json | +| [applicationGatewaysListAvailableResponseHeadersSample.ts][applicationgatewayslistavailableresponseheaderssample] | Lists all available response headers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json | +| [applicationGatewaysListAvailableServerVariablesSample.ts][applicationgatewayslistavailableservervariablessample] | Lists all available server variables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json | +| [applicationGatewaysListAvailableSslOptionsSample.ts][applicationgatewayslistavailablessloptionssample] | Lists available Ssl options for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json | +| [applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts][applicationgatewayslistavailablesslpredefinedpoliciessample] | Lists all SSL predefined policies for configuring Ssl policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json | +| [applicationGatewaysListAvailableWafRuleSetsSample.ts][applicationgatewayslistavailablewafrulesetssample] | Lists all available web application firewall rule sets. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json | +| [applicationGatewaysListSample.ts][applicationgatewayslistsample] | Lists all application gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayList.json | +| [applicationGatewaysStartSample.ts][applicationgatewaysstartsample] | Starts the specified application gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStart.json | +| [applicationGatewaysStopSample.ts][applicationgatewaysstopsample] | Stops the specified application gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStop.json | +| [applicationGatewaysUpdateTagsSample.ts][applicationgatewaysupdatetagssample] | Updates the specified application gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayUpdateTags.json | +| [applicationSecurityGroupsCreateOrUpdateSample.ts][applicationsecuritygroupscreateorupdatesample] | Creates or updates an application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupCreate.json | +| [applicationSecurityGroupsDeleteSample.ts][applicationsecuritygroupsdeletesample] | Deletes the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupDelete.json | +| [applicationSecurityGroupsGetSample.ts][applicationsecuritygroupsgetsample] | Gets information about the specified application security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupGet.json | +| [applicationSecurityGroupsListAllSample.ts][applicationsecuritygroupslistallsample] | Gets all application security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupListAll.json | +| [applicationSecurityGroupsListSample.ts][applicationsecuritygroupslistsample] | Gets all the application security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupList.json | +| [applicationSecurityGroupsUpdateTagsSample.ts][applicationsecuritygroupsupdatetagssample] | Updates an application security group's tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupUpdateTags.json | +| [availableDelegationsListSample.ts][availabledelegationslistsample] | Gets all of the available subnet delegations for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsSubscriptionGet.json | +| [availableEndpointServicesListSample.ts][availableendpointserviceslistsample] | List what values of endpoint services are available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EndpointServicesList.json | +| [availablePrivateEndpointTypesListByResourceGroupSample.ts][availableprivateendpointtypeslistbyresourcegroupsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json | +| [availablePrivateEndpointTypesListSample.ts][availableprivateendpointtypeslistsample] | Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesGet.json | +| [availableResourceGroupDelegationsListSample.ts][availableresourcegroupdelegationslistsample] | Gets all of the available subnet delegations for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsResourceGroupGet.json | +| [availableServiceAliasesListByResourceGroupSample.ts][availableservicealiaseslistbyresourcegroupsample] | Gets all available service aliases for this resource group in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesListByResourceGroup.json | +| [availableServiceAliasesListSample.ts][availableservicealiaseslistsample] | Gets all available service aliases for this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesList.json | +| [azureFirewallFqdnTagsListAllSample.ts][azurefirewallfqdntagslistallsample] | Gets all the Azure Firewall FQDN Tags in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json | +| [azureFirewallsCreateOrUpdateSample.ts][azurefirewallscreateorupdatesample] | Creates or updates the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPut.json | +| [azureFirewallsDeleteSample.ts][azurefirewallsdeletesample] | Deletes the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallDelete.json | +| [azureFirewallsGetSample.ts][azurefirewallsgetsample] | Gets the specified Azure Firewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGet.json | +| [azureFirewallsListAllSample.ts][azurefirewallslistallsample] | Gets all the Azure Firewalls in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListBySubscription.json | +| [azureFirewallsListLearnedPrefixesSample.ts][azurefirewallslistlearnedprefixessample] | Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListLearnedIPPrefixes.json | +| [azureFirewallsListSample.ts][azurefirewallslistsample] | Lists all Azure Firewalls in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListByResourceGroup.json | +| [azureFirewallsPacketCaptureSample.ts][azurefirewallspacketcapturesample] | Runs a packet capture on AzureFirewall. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPacketCapture.json | +| [azureFirewallsUpdateTagsSample.ts][azurefirewallsupdatetagssample] | Updates tags of an Azure Firewall resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallUpdateTags.json | +| [bastionHostsCreateOrUpdateSample.ts][bastionhostscreateorupdatesample] | Creates or updates the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPut.json | +| [bastionHostsDeleteSample.ts][bastionhostsdeletesample] | Deletes the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDelete.json | +| [bastionHostsGetSample.ts][bastionhostsgetsample] | Gets the specified Bastion Host. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGet.json | +| [bastionHostsListByResourceGroupSample.ts][bastionhostslistbyresourcegroupsample] | Lists all Bastion Hosts in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListByResourceGroup.json | +| [bastionHostsListSample.ts][bastionhostslistsample] | Lists all Bastion Hosts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListBySubscription.json | +| [bastionHostsUpdateTagsSample.ts][bastionhostsupdatetagssample] | Updates Tags for BastionHost resource x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPatch.json | +| [bgpServiceCommunitiesListSample.ts][bgpservicecommunitieslistsample] | Gets all the available bgp service communities. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceCommunityList.json | +| [checkDnsNameAvailabilitySample.ts][checkdnsnameavailabilitysample] | Checks whether a domain name in the cloudapp.azure.com zone is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckDnsNameAvailability.json | +| [configurationPolicyGroupsCreateOrUpdateSample.ts][configurationpolicygroupscreateorupdatesample] | Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupPut.json | +| [configurationPolicyGroupsDeleteSample.ts][configurationpolicygroupsdeletesample] | Deletes a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupDelete.json | +| [configurationPolicyGroupsGetSample.ts][configurationpolicygroupsgetsample] | Retrieves the details of a ConfigurationPolicyGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupGet.json | +| [configurationPolicyGroupsListByVpnServerConfigurationSample.ts][configurationpolicygroupslistbyvpnserverconfigurationsample] | Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json | +| [connectionMonitorsCreateOrUpdateSample.ts][connectionmonitorscreateorupdatesample] | Create or update a connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreate.json | +| [connectionMonitorsDeleteSample.ts][connectionmonitorsdeletesample] | Deletes the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorDelete.json | +| [connectionMonitorsGetSample.ts][connectionmonitorsgetsample] | Gets a connection monitor by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorGet.json | +| [connectionMonitorsListSample.ts][connectionmonitorslistsample] | Lists all connection monitors for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorList.json | +| [connectionMonitorsQuerySample.ts][connectionmonitorsquerysample] | Query a snapshot of the most recent connection states. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorQuery.json | +| [connectionMonitorsStartSample.ts][connectionmonitorsstartsample] | Starts the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStart.json | +| [connectionMonitorsStopSample.ts][connectionmonitorsstopsample] | Stops the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStop.json | +| [connectionMonitorsUpdateTagsSample.ts][connectionmonitorsupdatetagssample] | Update tags of the specified connection monitor. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json | +| [connectivityConfigurationsCreateOrUpdateSample.ts][connectivityconfigurationscreateorupdatesample] | Creates/Updates a new network manager connectivity configuration x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationPut.json | +| [connectivityConfigurationsDeleteSample.ts][connectivityconfigurationsdeletesample] | Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json | +| [connectivityConfigurationsGetSample.ts][connectivityconfigurationsgetsample] | Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationGet.json | +| [connectivityConfigurationsListSample.ts][connectivityconfigurationslistsample] | Lists all the network manager connectivity configuration in a specified network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationList.json | +| [customIPPrefixesCreateOrUpdateSample.ts][customipprefixescreateorupdatesample] | Creates or updates a custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixCreateCustomizedValues.json | +| [customIPPrefixesDeleteSample.ts][customipprefixesdeletesample] | Deletes the specified custom IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixDelete.json | +| [customIPPrefixesGetSample.ts][customipprefixesgetsample] | Gets the specified custom IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixGet.json | +| [customIPPrefixesListAllSample.ts][customipprefixeslistallsample] | Gets all the custom IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixListAll.json | +| [customIPPrefixesListSample.ts][customipprefixeslistsample] | Gets all custom IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixList.json | +| [customIPPrefixesUpdateTagsSample.ts][customipprefixesupdatetagssample] | Updates custom IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixUpdateTags.json | +| [ddosCustomPoliciesCreateOrUpdateSample.ts][ddoscustompoliciescreateorupdatesample] | Creates or updates a DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyCreate.json | +| [ddosCustomPoliciesDeleteSample.ts][ddoscustompoliciesdeletesample] | Deletes the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyDelete.json | +| [ddosCustomPoliciesGetSample.ts][ddoscustompoliciesgetsample] | Gets information about the specified DDoS custom policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyGet.json | +| [ddosCustomPoliciesUpdateTagsSample.ts][ddoscustompoliciesupdatetagssample] | Update a DDoS custom policy tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyUpdateTags.json | +| [ddosProtectionPlansCreateOrUpdateSample.ts][ddosprotectionplanscreateorupdatesample] | Creates or updates a DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanCreate.json | +| [ddosProtectionPlansDeleteSample.ts][ddosprotectionplansdeletesample] | Deletes the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanDelete.json | +| [ddosProtectionPlansGetSample.ts][ddosprotectionplansgetsample] | Gets information about the specified DDoS protection plan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanGet.json | +| [ddosProtectionPlansListByResourceGroupSample.ts][ddosprotectionplanslistbyresourcegroupsample] | Gets all the DDoS protection plans in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanList.json | +| [ddosProtectionPlansListSample.ts][ddosprotectionplanslistsample] | Gets all DDoS protection plans in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanListAll.json | +| [ddosProtectionPlansUpdateTagsSample.ts][ddosprotectionplansupdatetagssample] | Update a DDoS protection plan tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanUpdateTags.json | +| [defaultSecurityRulesGetSample.ts][defaultsecurityrulesgetsample] | Get the specified default network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleGet.json | +| [defaultSecurityRulesListSample.ts][defaultsecurityruleslistsample] | Gets all default security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleList.json | +| [deleteBastionShareableLinkByTokenSample.ts][deletebastionshareablelinkbytokensample] | Deletes the Bastion Shareable Links for all the tokens specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDeleteByToken.json | +| [deleteBastionShareableLinkSample.ts][deletebastionshareablelinksample] | Deletes the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDelete.json | +| [disconnectActiveSessionsSample.ts][disconnectactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionDelete.json | +| [dscpConfigurationCreateOrUpdateSample.ts][dscpconfigurationcreateorupdatesample] | Creates or updates a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationCreate.json | +| [dscpConfigurationDeleteSample.ts][dscpconfigurationdeletesample] | Deletes a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationDelete.json | +| [dscpConfigurationGetSample.ts][dscpconfigurationgetsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationGet.json | +| [dscpConfigurationListAllSample.ts][dscpconfigurationlistallsample] | Gets all dscp configurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationListAll.json | +| [dscpConfigurationListSample.ts][dscpconfigurationlistsample] | Gets a DSCP Configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationList.json | +| [expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts][expressroutecircuitauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json | +| [expressRouteCircuitAuthorizationsDeleteSample.ts][expressroutecircuitauthorizationsdeletesample] | Deletes the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json | +| [expressRouteCircuitAuthorizationsGetSample.ts][expressroutecircuitauthorizationsgetsample] | Gets the specified authorization from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationGet.json | +| [expressRouteCircuitAuthorizationsListSample.ts][expressroutecircuitauthorizationslistsample] | Gets all authorizations in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationList.json | +| [expressRouteCircuitConnectionsCreateOrUpdateSample.ts][expressroutecircuitconnectionscreateorupdatesample] | Creates or updates a Express Route Circuit Connection in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionCreate.json | +| [expressRouteCircuitConnectionsDeleteSample.ts][expressroutecircuitconnectionsdeletesample] | Deletes the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionDelete.json | +| [expressRouteCircuitConnectionsGetSample.ts][expressroutecircuitconnectionsgetsample] | Gets the specified Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionGet.json | +| [expressRouteCircuitConnectionsListSample.ts][expressroutecircuitconnectionslistsample] | Gets all global reach connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionList.json | +| [expressRouteCircuitPeeringsCreateOrUpdateSample.ts][expressroutecircuitpeeringscreateorupdatesample] | Creates or updates a peering in the specified express route circuits. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringCreate.json | +| [expressRouteCircuitPeeringsDeleteSample.ts][expressroutecircuitpeeringsdeletesample] | Deletes the specified peering from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringDelete.json | +| [expressRouteCircuitPeeringsGetSample.ts][expressroutecircuitpeeringsgetsample] | Gets the specified peering for the express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringGet.json | +| [expressRouteCircuitPeeringsListSample.ts][expressroutecircuitpeeringslistsample] | Gets all peerings in a specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringList.json | +| [expressRouteCircuitsCreateOrUpdateSample.ts][expressroutecircuitscreateorupdatesample] | Creates or updates an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreate.json | +| [expressRouteCircuitsDeleteSample.ts][expressroutecircuitsdeletesample] | Deletes the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitDelete.json | +| [expressRouteCircuitsGetPeeringStatsSample.ts][expressroutecircuitsgetpeeringstatssample] | Gets all stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringStats.json | +| [expressRouteCircuitsGetSample.ts][expressroutecircuitsgetsample] | Gets information about the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitGet.json | +| [expressRouteCircuitsGetStatsSample.ts][expressroutecircuitsgetstatssample] | Gets all the stats from an express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitStats.json | +| [expressRouteCircuitsListAllSample.ts][expressroutecircuitslistallsample] | Gets all the express route circuits in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListBySubscription.json | +| [expressRouteCircuitsListArpTableSample.ts][expressroutecircuitslistarptablesample] | Gets the currently advertised ARP table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitARPTableList.json | +| [expressRouteCircuitsListRoutesTableSample.ts][expressroutecircuitslistroutestablesample] | Gets the currently advertised routes table associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableList.json | +| [expressRouteCircuitsListRoutesTableSummarySample.ts][expressroutecircuitslistroutestablesummarysample] | Gets the currently advertised routes table summary associated with the express route circuit in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json | +| [expressRouteCircuitsListSample.ts][expressroutecircuitslistsample] | Gets all the express route circuits in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListByResourceGroup.json | +| [expressRouteCircuitsUpdateTagsSample.ts][expressroutecircuitsupdatetagssample] | Updates an express route circuit tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitUpdateTags.json | +| [expressRouteConnectionsCreateOrUpdateSample.ts][expressrouteconnectionscreateorupdatesample] | Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionCreate.json | +| [expressRouteConnectionsDeleteSample.ts][expressrouteconnectionsdeletesample] | Deletes a connection to a ExpressRoute circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionDelete.json | +| [expressRouteConnectionsGetSample.ts][expressrouteconnectionsgetsample] | Gets the specified ExpressRouteConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionGet.json | +| [expressRouteConnectionsListSample.ts][expressrouteconnectionslistsample] | Lists ExpressRouteConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionList.json | +| [expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts][expressroutecrossconnectionpeeringscreateorupdatesample] | Creates or updates a peering in the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json | +| [expressRouteCrossConnectionPeeringsDeleteSample.ts][expressroutecrossconnectionpeeringsdeletesample] | Deletes the specified peering from the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json | +| [expressRouteCrossConnectionPeeringsGetSample.ts][expressroutecrossconnectionpeeringsgetsample] | Gets the specified peering for the ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json | +| [expressRouteCrossConnectionPeeringsListSample.ts][expressroutecrossconnectionpeeringslistsample] | Gets all peerings in a specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json | +| [expressRouteCrossConnectionsCreateOrUpdateSample.ts][expressroutecrossconnectionscreateorupdatesample] | Update the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdate.json | +| [expressRouteCrossConnectionsGetSample.ts][expressroutecrossconnectionsgetsample] | Gets details about the specified ExpressRouteCrossConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionGet.json | +| [expressRouteCrossConnectionsListArpTableSample.ts][expressroutecrossconnectionslistarptablesample] | Gets the currently advertised ARP table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsArpTable.json | +| [expressRouteCrossConnectionsListByResourceGroupSample.ts][expressroutecrossconnectionslistbyresourcegroupsample] | Retrieves all the ExpressRouteCrossConnections in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json | +| [expressRouteCrossConnectionsListRoutesTableSample.ts][expressroutecrossconnectionslistroutestablesample] | Gets the currently advertised routes table associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json | +| [expressRouteCrossConnectionsListRoutesTableSummarySample.ts][expressroutecrossconnectionslistroutestablesummarysample] | Gets the route table summary associated with the express route cross connection in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json | +| [expressRouteCrossConnectionsListSample.ts][expressroutecrossconnectionslistsample] | Retrieves all the ExpressRouteCrossConnections in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionList.json | +| [expressRouteCrossConnectionsUpdateTagsSample.ts][expressroutecrossconnectionsupdatetagssample] | Updates an express route cross connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json | +| [expressRouteGatewaysCreateOrUpdateSample.ts][expressroutegatewayscreateorupdatesample] | Creates or updates a ExpressRoute gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayCreate.json | +| [expressRouteGatewaysDeleteSample.ts][expressroutegatewaysdeletesample] | Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayDelete.json | +| [expressRouteGatewaysGetSample.ts][expressroutegatewaysgetsample] | Fetches the details of a ExpressRoute gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayGet.json | +| [expressRouteGatewaysListByResourceGroupSample.ts][expressroutegatewayslistbyresourcegroupsample] | Lists ExpressRoute gateways in a given resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListByResourceGroup.json | +| [expressRouteGatewaysListBySubscriptionSample.ts][expressroutegatewayslistbysubscriptionsample] | Lists ExpressRoute gateways under a given subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListBySubscription.json | +| [expressRouteGatewaysUpdateTagsSample.ts][expressroutegatewaysupdatetagssample] | Updates express route gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayUpdateTags.json | +| [expressRouteLinksGetSample.ts][expressroutelinksgetsample] | Retrieves the specified ExpressRouteLink resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkGet.json | +| [expressRouteLinksListSample.ts][expressroutelinkslistsample] | Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkList.json | +| [expressRoutePortAuthorizationsCreateOrUpdateSample.ts][expressrouteportauthorizationscreateorupdatesample] | Creates or updates an authorization in the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationCreate.json | +| [expressRoutePortAuthorizationsDeleteSample.ts][expressrouteportauthorizationsdeletesample] | Deletes the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationDelete.json | +| [expressRoutePortAuthorizationsGetSample.ts][expressrouteportauthorizationsgetsample] | Gets the specified authorization from the specified express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationGet.json | +| [expressRoutePortAuthorizationsListSample.ts][expressrouteportauthorizationslistsample] | Gets all authorizations in an express route port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationList.json | +| [expressRoutePortsCreateOrUpdateSample.ts][expressrouteportscreateorupdatesample] | Creates or updates the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortCreate.json | +| [expressRoutePortsDeleteSample.ts][expressrouteportsdeletesample] | Deletes the specified ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortDelete.json | +| [expressRoutePortsGenerateLoaSample.ts][expressrouteportsgenerateloasample] | Generate a letter of authorization for the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateExpressRoutePortsLOA.json | +| [expressRoutePortsGetSample.ts][expressrouteportsgetsample] | Retrieves the requested ExpressRoutePort resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortGet.json | +| [expressRoutePortsListByResourceGroupSample.ts][expressrouteportslistbyresourcegroupsample] | List all the ExpressRoutePort resources in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortListByResourceGroup.json | +| [expressRoutePortsListSample.ts][expressrouteportslistsample] | List all the ExpressRoutePort resources in the specified subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortList.json | +| [expressRoutePortsLocationsGetSample.ts][expressrouteportslocationsgetsample] | Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationGet.json | +| [expressRoutePortsLocationsListSample.ts][expressrouteportslocationslistsample] | Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationList.json | +| [expressRoutePortsUpdateTagsSample.ts][expressrouteportsupdatetagssample] | Update ExpressRoutePort tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateTags.json | +| [expressRouteProviderPortSample.ts][expressrouteproviderportsample] | Retrieves detail of a provider port. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPort.json | +| [expressRouteProviderPortsLocationListSample.ts][expressrouteproviderportslocationlistsample] | Retrieves all the ExpressRouteProviderPorts in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPortList.json | +| [expressRouteServiceProvidersListSample.ts][expressrouteserviceproviderslistsample] | Gets all the available express route service providers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteProviderList.json | +| [firewallPoliciesCreateOrUpdateSample.ts][firewallpoliciescreateorupdatesample] | Creates or updates the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPut.json | +| [firewallPoliciesDeleteSample.ts][firewallpoliciesdeletesample] | Deletes the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDelete.json | +| [firewallPoliciesGetSample.ts][firewallpoliciesgetsample] | Gets the specified Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyGet.json | +| [firewallPoliciesListAllSample.ts][firewallpolicieslistallsample] | Gets all the Firewall Policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListBySubscription.json | +| [firewallPoliciesListSample.ts][firewallpolicieslistsample] | Lists all Firewall Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListByResourceGroup.json | +| [firewallPoliciesUpdateTagsSample.ts][firewallpoliciesupdatetagssample] | Updates tags of a Azure Firewall Policy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPatch.json | +| [firewallPolicyDeploymentsDeploySample.ts][firewallpolicydeploymentsdeploysample] | Deploys the firewall policy draft and child rule collection group drafts. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDeploy.json | +| [firewallPolicyDraftsCreateOrUpdateSample.ts][firewallpolicydraftscreateorupdatesample] | Create or update a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftPut.json | +| [firewallPolicyDraftsDeleteSample.ts][firewallpolicydraftsdeletesample] | Delete a draft policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDelete.json | +| [firewallPolicyDraftsGetSample.ts][firewallpolicydraftsgetsample] | Get a draft Firewall Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftGet.json | +| [firewallPolicyIdpsSignaturesFilterValuesListSample.ts][firewallpolicyidpssignaturesfiltervalueslistsample] | Retrieves the current filter values for the signatures overrides x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json | +| [firewallPolicyIdpsSignaturesListSample.ts][firewallpolicyidpssignatureslistsample] | Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverrides.json | +| [firewallPolicyIdpsSignaturesOverridesGetSample.ts][firewallpolicyidpssignaturesoverridesgetsample] | Returns all signatures overrides for a specific policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesGet.json | +| [firewallPolicyIdpsSignaturesOverridesListSample.ts][firewallpolicyidpssignaturesoverrideslistsample] | Returns all signatures overrides objects for a specific policy as a list containing a single value. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesList.json | +| [firewallPolicyIdpsSignaturesOverridesPatchSample.ts][firewallpolicyidpssignaturesoverridespatchsample] | Will update the status of policy's signature overrides for IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPatch.json | +| [firewallPolicyIdpsSignaturesOverridesPutSample.ts][firewallpolicyidpssignaturesoverridesputsample] | Will override/create a new signature overrides for the policy's IDPS x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPut.json | +| [firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts][firewallpolicyrulecollectiongroupdraftscreateorupdatesample] | Create or Update Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json | +| [firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts][firewallpolicyrulecollectiongroupdraftsdeletesample] | Delete Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json | +| [firewallPolicyRuleCollectionGroupDraftsGetSample.ts][firewallpolicyrulecollectiongroupdraftsgetsample] | Get Rule Collection Group Draft. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json | +| [firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts][firewallpolicyrulecollectiongroupscreateorupdatesample] | Creates or updates the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json | +| [firewallPolicyRuleCollectionGroupsDeleteSample.ts][firewallpolicyrulecollectiongroupsdeletesample] | Deletes the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json | +| [firewallPolicyRuleCollectionGroupsGetSample.ts][firewallpolicyrulecollectiongroupsgetsample] | Gets the specified FirewallPolicyRuleCollectionGroup. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json | +| [firewallPolicyRuleCollectionGroupsListSample.ts][firewallpolicyrulecollectiongroupslistsample] | Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json | +| [flowLogsCreateOrUpdateSample.ts][flowlogscreateorupdatesample] | Create or update a flow log for the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogCreate.json | +| [flowLogsDeleteSample.ts][flowlogsdeletesample] | Deletes the specified flow log resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogDelete.json | +| [flowLogsGetSample.ts][flowlogsgetsample] | Gets a flow log resource by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogGet.json | +| [flowLogsListSample.ts][flowlogslistsample] | Lists all flow log resources for the specified Network Watcher. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogList.json | +| [flowLogsUpdateTagsSample.ts][flowlogsupdatetagssample] | Update tags of the specified flow log. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogUpdateTags.json | +| [generatevirtualwanvpnserverconfigurationvpnprofileSample.ts][generatevirtualwanvpnserverconfigurationvpnprofilesample] | Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json | +| [getActiveSessionsSample.ts][getactivesessionssample] | Returns the list of currently active sessions on the Bastion. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionsList.json | +| [getBastionShareableLinkSample.ts][getbastionshareablelinksample] | Return the Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkGet.json | +| [hubRouteTablesCreateOrUpdateSample.ts][hubroutetablescreateorupdatesample] | Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTablePut.json | +| [hubRouteTablesDeleteSample.ts][hubroutetablesdeletesample] | Deletes a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableDelete.json | +| [hubRouteTablesGetSample.ts][hubroutetablesgetsample] | Retrieves the details of a RouteTable. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableGet.json | +| [hubRouteTablesListSample.ts][hubroutetableslistsample] | Retrieves the details of all RouteTables. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableList.json | +| [hubVirtualNetworkConnectionsCreateOrUpdateSample.ts][hubvirtualnetworkconnectionscreateorupdatesample] | Creates a hub virtual network connection if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionPut.json | +| [hubVirtualNetworkConnectionsDeleteSample.ts][hubvirtualnetworkconnectionsdeletesample] | Deletes a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionDelete.json | +| [hubVirtualNetworkConnectionsGetSample.ts][hubvirtualnetworkconnectionsgetsample] | Retrieves the details of a HubVirtualNetworkConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionGet.json | +| [hubVirtualNetworkConnectionsListSample.ts][hubvirtualnetworkconnectionslistsample] | Retrieves the details of all HubVirtualNetworkConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionList.json | +| [inboundNatRulesCreateOrUpdateSample.ts][inboundnatrulescreateorupdatesample] | Creates or updates a load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleCreate.json | +| [inboundNatRulesDeleteSample.ts][inboundnatrulesdeletesample] | Deletes the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleDelete.json | +| [inboundNatRulesGetSample.ts][inboundnatrulesgetsample] | Gets the specified load balancer inbound NAT rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleGet.json | +| [inboundNatRulesListSample.ts][inboundnatruleslistsample] | Gets all the inbound NAT rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleList.json | +| [inboundSecurityRuleCreateOrUpdateSample.ts][inboundsecurityrulecreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRulePut.json | +| [inboundSecurityRuleGetSample.ts][inboundsecurityrulegetsample] | Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRuleGet.json | +| [ipAllocationsCreateOrUpdateSample.ts][ipallocationscreateorupdatesample] | Creates or updates an IpAllocation in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationCreate.json | +| [ipAllocationsDeleteSample.ts][ipallocationsdeletesample] | Deletes the specified IpAllocation. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationDelete.json | +| [ipAllocationsGetSample.ts][ipallocationsgetsample] | Gets the specified IpAllocation by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationGet.json | +| [ipAllocationsListByResourceGroupSample.ts][ipallocationslistbyresourcegroupsample] | Gets all IpAllocations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationListByResourceGroup.json | +| [ipAllocationsListSample.ts][ipallocationslistsample] | Gets all IpAllocations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationList.json | +| [ipAllocationsUpdateTagsSample.ts][ipallocationsupdatetagssample] | Updates a IpAllocation tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationUpdateTags.json | +| [ipGroupsCreateOrUpdateSample.ts][ipgroupscreateorupdatesample] | Creates or updates an ipGroups in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsCreate.json | +| [ipGroupsDeleteSample.ts][ipgroupsdeletesample] | Deletes the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsDelete.json | +| [ipGroupsGetSample.ts][ipgroupsgetsample] | Gets the specified ipGroups. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsGet.json | +| [ipGroupsListByResourceGroupSample.ts][ipgroupslistbyresourcegroupsample] | Gets all IpGroups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListByResourceGroup.json | +| [ipGroupsListSample.ts][ipgroupslistsample] | Gets all IpGroups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListBySubscription.json | +| [ipGroupsUpdateGroupsSample.ts][ipgroupsupdategroupssample] | Updates tags of an IpGroups resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsUpdateTags.json | +| [ipamPoolsCreateSample.ts][ipampoolscreatesample] | Creates/Updates the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Create.json | +| [ipamPoolsDeleteSample.ts][ipampoolsdeletesample] | Delete the Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Delete.json | +| [ipamPoolsGetPoolUsageSample.ts][ipampoolsgetpoolusagesample] | Get the Pool Usage. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_GetPoolUsage.json | +| [ipamPoolsGetSample.ts][ipampoolsgetsample] | Gets the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Get.json | +| [ipamPoolsListAssociatedResourcesSample.ts][ipampoolslistassociatedresourcessample] | List Associated Resource in the Pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_ListAssociatedResources.json | +| [ipamPoolsListSample.ts][ipampoolslistsample] | Gets list of Pool resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_List.json | +| [ipamPoolsUpdateSample.ts][ipampoolsupdatesample] | Updates the specific Pool resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Update.json | +| [listActiveConnectivityConfigurationsSample.ts][listactiveconnectivityconfigurationssample] | Lists active connectivity configurations in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json | +| [listActiveSecurityAdminRulesSample.ts][listactivesecurityadminrulessample] | Lists active security admin rules in a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json | +| [listNetworkManagerEffectiveConnectivityConfigurationsSample.ts][listnetworkmanagereffectiveconnectivityconfigurationssample] | List all effective connectivity configurations applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json | +| [listNetworkManagerEffectiveSecurityAdminRulesSample.ts][listnetworkmanagereffectivesecurityadminrulessample] | List all effective security admin rules applied on a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json | +| [loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts][loadbalancerbackendaddresspoolscreateorupdatesample] | Creates or updates a load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json | +| [loadBalancerBackendAddressPoolsDeleteSample.ts][loadbalancerbackendaddresspoolsdeletesample] | Deletes the specified load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolDelete.json | +| [loadBalancerBackendAddressPoolsGetSample.ts][loadbalancerbackendaddresspoolsgetsample] | Gets load balancer backend address pool. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json | +| [loadBalancerBackendAddressPoolsListSample.ts][loadbalancerbackendaddresspoolslistsample] | Gets all the load balancer backed address pools. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json | +| [loadBalancerFrontendIPConfigurationsGetSample.ts][loadbalancerfrontendipconfigurationsgetsample] | Gets load balancer frontend IP configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json | +| [loadBalancerFrontendIPConfigurationsListSample.ts][loadbalancerfrontendipconfigurationslistsample] | Gets all the load balancer frontend IP configurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationList.json | +| [loadBalancerLoadBalancingRulesGetSample.ts][loadbalancerloadbalancingrulesgetsample] | Gets the specified load balancer load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleGet.json | +| [loadBalancerLoadBalancingRulesHealthSample.ts][loadbalancerloadbalancingruleshealthsample] | Get health details of a load balancing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerHealth.json | +| [loadBalancerLoadBalancingRulesListSample.ts][loadbalancerloadbalancingruleslistsample] | Gets all the load balancing rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleList.json | +| [loadBalancerNetworkInterfacesListSample.ts][loadbalancernetworkinterfaceslistsample] | Gets associated load balancer network interfaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json | +| [loadBalancerOutboundRulesGetSample.ts][loadbalanceroutboundrulesgetsample] | Gets the specified load balancer outbound rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleGet.json | +| [loadBalancerOutboundRulesListSample.ts][loadbalanceroutboundruleslistsample] | Gets all the outbound rules in a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleList.json | +| [loadBalancerProbesGetSample.ts][loadbalancerprobesgetsample] | Gets load balancer probe. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeGet.json | +| [loadBalancerProbesListSample.ts][loadbalancerprobeslistsample] | Gets all the load balancer probes. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeList.json | +| [loadBalancersCreateOrUpdateSample.ts][loadbalancerscreateorupdatesample] | Creates or updates a load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreate.json | +| [loadBalancersDeleteSample.ts][loadbalancersdeletesample] | Deletes the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerDelete.json | +| [loadBalancersGetSample.ts][loadbalancersgetsample] | Gets the specified load balancer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGet.json | +| [loadBalancersListAllSample.ts][loadbalancerslistallsample] | Gets all the load balancers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerListAll.json | +| [loadBalancersListInboundNatRulePortMappingsSample.ts][loadbalancerslistinboundnatruleportmappingssample] | List of inbound NAT rule port mappings. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/QueryInboundNatRulePortMapping.json | +| [loadBalancersListSample.ts][loadbalancerslistsample] | Gets all the load balancers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerList.json | +| [loadBalancersMigrateToIPBasedSample.ts][loadbalancersmigratetoipbasedsample] | Migrate load balancer to IP Based x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/MigrateLoadBalancerToIPBased.json | +| [loadBalancersSwapPublicIPAddressesSample.ts][loadbalancersswappublicipaddressessample] | Swaps VIPs between two load balancers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancersSwapPublicIpAddresses.json | +| [loadBalancersUpdateTagsSample.ts][loadbalancersupdatetagssample] | Updates a load balancer tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerUpdateTags.json | +| [localNetworkGatewaysCreateOrUpdateSample.ts][localnetworkgatewayscreateorupdatesample] | Creates or updates a local network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayCreate.json | +| [localNetworkGatewaysDeleteSample.ts][localnetworkgatewaysdeletesample] | Deletes the specified local network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayDelete.json | +| [localNetworkGatewaysGetSample.ts][localnetworkgatewaysgetsample] | Gets the specified local network gateway in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayGet.json | +| [localNetworkGatewaysListSample.ts][localnetworkgatewayslistsample] | Gets all the local network gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayList.json | +| [localNetworkGatewaysUpdateTagsSample.ts][localnetworkgatewaysupdatetagssample] | Updates a local network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayUpdateTags.json | +| [managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts][managementgroupnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupPut.json | +| [managementGroupNetworkManagerConnectionsDeleteSample.ts][managementgroupnetworkmanagerconnectionsdeletesample] | Delete specified pending connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json | +| [managementGroupNetworkManagerConnectionsGetSample.ts][managementgroupnetworkmanagerconnectionsgetsample] | Get a specified connection created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupGet.json | +| [managementGroupNetworkManagerConnectionsListSample.ts][managementgroupnetworkmanagerconnectionslistsample] | List all network manager connections created by this management group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupList.json | +| [natGatewaysCreateOrUpdateSample.ts][natgatewayscreateorupdatesample] | Creates or updates a nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayCreateOrUpdate.json | +| [natGatewaysDeleteSample.ts][natgatewaysdeletesample] | Deletes the specified nat gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayDelete.json | +| [natGatewaysGetSample.ts][natgatewaysgetsample] | Gets the specified nat gateway in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayGet.json | +| [natGatewaysListAllSample.ts][natgatewayslistallsample] | Gets all the Nat Gateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayListAll.json | +| [natGatewaysListSample.ts][natgatewayslistsample] | Gets all nat gateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayList.json | +| [natGatewaysUpdateTagsSample.ts][natgatewaysupdatetagssample] | Updates nat gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayUpdateTags.json | +| [natRulesCreateOrUpdateSample.ts][natrulescreateorupdatesample] | Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRulePut.json | +| [natRulesDeleteSample.ts][natrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleDelete.json | +| [natRulesGetSample.ts][natrulesgetsample] | Retrieves the details of a nat ruleGet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleGet.json | +| [natRulesListByVpnGatewaySample.ts][natruleslistbyvpngatewaysample] | Retrieves all nat rules for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleList.json | +| [networkGroupsCreateOrUpdateSample.ts][networkgroupscreateorupdatesample] | Creates or updates a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupPut.json | +| [networkGroupsDeleteSample.ts][networkgroupsdeletesample] | Deletes a network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupDelete.json | +| [networkGroupsGetSample.ts][networkgroupsgetsample] | Gets the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupGet.json | +| [networkGroupsListSample.ts][networkgroupslistsample] | Lists the specified network group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupList.json | +| [networkInterfaceIPConfigurationsGetSample.ts][networkinterfaceipconfigurationsgetsample] | Gets the specified network interface ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationGet.json | +| [networkInterfaceIPConfigurationsListSample.ts][networkinterfaceipconfigurationslistsample] | Get all ip configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationList.json | +| [networkInterfaceLoadBalancersListSample.ts][networkinterfaceloadbalancerslistsample] | List all load balancers in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceLoadBalancerList.json | +| [networkInterfaceTapConfigurationsCreateOrUpdateSample.ts][networkinterfacetapconfigurationscreateorupdatesample] | Creates or updates a Tap configuration in the specified NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationCreate.json | +| [networkInterfaceTapConfigurationsDeleteSample.ts][networkinterfacetapconfigurationsdeletesample] | Deletes the specified tap configuration from the NetworkInterface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationDelete.json | +| [networkInterfaceTapConfigurationsGetSample.ts][networkinterfacetapconfigurationsgetsample] | Get the specified tap configuration on a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationGet.json | +| [networkInterfaceTapConfigurationsListSample.ts][networkinterfacetapconfigurationslistsample] | Get all Tap configurations in a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationList.json | +| [networkInterfacesCreateOrUpdateSample.ts][networkinterfacescreateorupdatesample] | Creates or updates a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreate.json | +| [networkInterfacesDeleteSample.ts][networkinterfacesdeletesample] | Deletes the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceDelete.json | +| [networkInterfacesGetCloudServiceNetworkInterfaceSample.ts][networkinterfacesgetcloudservicenetworkinterfacesample] | Get the specified network interface in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceGet.json | +| [networkInterfacesGetEffectiveRouteTableSample.ts][networkinterfacesgeteffectiveroutetablesample] | Gets all route tables applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json | +| [networkInterfacesGetSample.ts][networkinterfacesgetsample] | Gets information about the specified network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceGet.json | +| [networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts][networkinterfacesgetvirtualmachinescalesetipconfigurationsample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigGet.json | +| [networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts][networkinterfacesgetvirtualmachinescalesetnetworkinterfacesample] | Get the specified network interface in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceGet.json | +| [networkInterfacesListAllSample.ts][networkinterfaceslistallsample] | Gets all network interfaces in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceListAll.json | +| [networkInterfacesListCloudServiceNetworkInterfacesSample.ts][networkinterfaceslistcloudservicenetworkinterfacessample] | Gets all network interfaces in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceList.json | +| [networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts][networkinterfaceslistcloudserviceroleinstancenetworkinterfacessample] | Gets information about all network interfaces in a role instance in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json | +| [networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts][networkinterfaceslisteffectivenetworksecuritygroupssample] | Gets all network security groups applied to a network interface. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveNSGList.json | +| [networkInterfacesListSample.ts][networkinterfaceslistsample] | Gets all network interfaces in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceList.json | +| [networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts][networkinterfaceslistvirtualmachinescalesetipconfigurationssample] | Get the specified network interface ip configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigList.json | +| [networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts][networkinterfaceslistvirtualmachinescalesetnetworkinterfacessample] | Gets all network interfaces in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceList.json | +| [networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts][networkinterfaceslistvirtualmachinescalesetvmnetworkinterfacessample] | Gets information about all network interfaces in a virtual machine in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmNetworkInterfaceList.json | +| [networkInterfacesUpdateTagsSample.ts][networkinterfacesupdatetagssample] | Updates a network interface tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceUpdateTags.json | +| [networkManagerCommitsPostSample.ts][networkmanagercommitspostsample] | Post a Network Manager Commit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerCommitPost.json | +| [networkManagerDeploymentStatusListSample.ts][networkmanagerdeploymentstatuslistsample] | Post to List of Network Manager Deployment Status. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDeploymentStatusList.json | +| [networkManagerRoutingConfigurationsCreateOrUpdateSample.ts][networkmanagerroutingconfigurationscreateorupdatesample] | Creates or updates a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationPut.json | +| [networkManagerRoutingConfigurationsDeleteSample.ts][networkmanagerroutingconfigurationsdeletesample] | Deletes a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationDelete.json | +| [networkManagerRoutingConfigurationsGetSample.ts][networkmanagerroutingconfigurationsgetsample] | Retrieves a network manager routing configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationGet.json | +| [networkManagerRoutingConfigurationsListSample.ts][networkmanagerroutingconfigurationslistsample] | Lists all the network manager routing configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationList.json | +| [networkManagersCreateOrUpdateSample.ts][networkmanagerscreateorupdatesample] | Creates or updates a Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPut.json | +| [networkManagersDeleteSample.ts][networkmanagersdeletesample] | Deletes a network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDelete.json | +| [networkManagersGetSample.ts][networkmanagersgetsample] | Gets the specified Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGet.json | +| [networkManagersListBySubscriptionSample.ts][networkmanagerslistbysubscriptionsample] | List all network managers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerListAll.json | +| [networkManagersListSample.ts][networkmanagerslistsample] | List network managers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerList.json | +| [networkManagersPatchSample.ts][networkmanagerspatchsample] | Patch NetworkManager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPatch.json | +| [networkProfilesCreateOrUpdateSample.ts][networkprofilescreateorupdatesample] | Creates or updates a network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileCreateConfigOnly.json | +| [networkProfilesDeleteSample.ts][networkprofilesdeletesample] | Deletes the specified network profile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileDelete.json | +| [networkProfilesGetSample.ts][networkprofilesgetsample] | Gets the specified network profile in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetConfigOnly.json | +| [networkProfilesListAllSample.ts][networkprofileslistallsample] | Gets all the network profiles in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileListAll.json | +| [networkProfilesListSample.ts][networkprofileslistsample] | Gets all network profiles in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileList.json | +| [networkProfilesUpdateTagsSample.ts][networkprofilesupdatetagssample] | Updates network profile tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileUpdateTags.json | +| [networkSecurityGroupsCreateOrUpdateSample.ts][networksecuritygroupscreateorupdatesample] | Creates or updates a network security group in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreate.json | +| [networkSecurityGroupsDeleteSample.ts][networksecuritygroupsdeletesample] | Deletes the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupDelete.json | +| [networkSecurityGroupsGetSample.ts][networksecuritygroupsgetsample] | Gets the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupGet.json | +| [networkSecurityGroupsListAllSample.ts][networksecuritygroupslistallsample] | Gets all network security groups in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupListAll.json | +| [networkSecurityGroupsListSample.ts][networksecuritygroupslistsample] | Gets all network security groups in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupList.json | +| [networkSecurityGroupsUpdateTagsSample.ts][networksecuritygroupsupdatetagssample] | Updates a network security group tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupUpdateTags.json | +| [networkVirtualApplianceConnectionsCreateOrUpdateSample.ts][networkvirtualapplianceconnectionscreateorupdatesample] | Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionPut.json | +| [networkVirtualApplianceConnectionsDeleteSample.ts][networkvirtualapplianceconnectionsdeletesample] | Deletes a NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionDelete.json | +| [networkVirtualApplianceConnectionsGetSample.ts][networkvirtualapplianceconnectionsgetsample] | Retrieves the details of specified NVA connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionGet.json | +| [networkVirtualApplianceConnectionsListSample.ts][networkvirtualapplianceconnectionslistsample] | Lists NetworkVirtualApplianceConnections under the NVA. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionList.json | +| [networkVirtualAppliancesCreateOrUpdateSample.ts][networkvirtualappliancescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualAppliancePut.json | +| [networkVirtualAppliancesDeleteSample.ts][networkvirtualappliancesdeletesample] | Deletes the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceDelete.json | +| [networkVirtualAppliancesGetSample.ts][networkvirtualappliancesgetsample] | Gets the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceGet.json | +| [networkVirtualAppliancesListByResourceGroupSample.ts][networkvirtualapplianceslistbyresourcegroupsample] | Lists all Network Virtual Appliances in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json | +| [networkVirtualAppliancesListSample.ts][networkvirtualapplianceslistsample] | Gets all Network Virtual Appliances in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListBySubscription.json | +| [networkVirtualAppliancesRestartSample.ts][networkvirtualappliancesrestartsample] | Restarts one or more VMs belonging to the specified Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceEmptyRestart.json | +| [networkVirtualAppliancesUpdateTagsSample.ts][networkvirtualappliancesupdatetagssample] | Updates a Network Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceUpdateTags.json | +| [networkWatchersCheckConnectivitySample.ts][networkwatcherscheckconnectivitysample] | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectivityCheck.json | +| [networkWatchersCreateOrUpdateSample.ts][networkwatcherscreateorupdatesample] | Creates or updates a network watcher in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherCreate.json | +| [networkWatchersDeleteSample.ts][networkwatchersdeletesample] | Deletes the specified network watcher resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherDelete.json | +| [networkWatchersGetAzureReachabilityReportSample.ts][networkwatchersgetazurereachabilityreportsample] | NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json | +| [networkWatchersGetFlowLogStatusSample.ts][networkwatchersgetflowlogstatussample] | Queries status of flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogStatusQuery.json | +| [networkWatchersGetNetworkConfigurationDiagnosticSample.ts][networkwatchersgetnetworkconfigurationdiagnosticsample] | Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json | +| [networkWatchersGetNextHopSample.ts][networkwatchersgetnexthopsample] | Gets the next hop from the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNextHopGet.json | +| [networkWatchersGetSample.ts][networkwatchersgetsample] | Gets the specified network watcher by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherGet.json | +| [networkWatchersGetTopologySample.ts][networkwatchersgettopologysample] | Gets the current network topology by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTopologyGet.json | +| [networkWatchersGetTroubleshootingResultSample.ts][networkwatchersgettroubleshootingresultsample] | Get the last completed troubleshooting result on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootResultQuery.json | +| [networkWatchersGetTroubleshootingSample.ts][networkwatchersgettroubleshootingsample] | Initiate troubleshooting on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootGet.json | +| [networkWatchersGetVMSecurityRulesSample.ts][networkwatchersgetvmsecurityrulessample] | Gets the configured and effective security group rules on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherSecurityGroupViewGet.json | +| [networkWatchersListAllSample.ts][networkwatcherslistallsample] | Gets all network watchers by subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherListAll.json | +| [networkWatchersListAvailableProvidersSample.ts][networkwatcherslistavailableproviderssample] | NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAvailableProvidersListGet.json | +| [networkWatchersListSample.ts][networkwatcherslistsample] | Gets all network watchers by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherList.json | +| [networkWatchersSetFlowLogConfigurationSample.ts][networkwatcherssetflowlogconfigurationsample] | Configures flow log and traffic analytics (optional) on a specified resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogConfigure.json | +| [networkWatchersUpdateTagsSample.ts][networkwatchersupdatetagssample] | Updates a network watcher tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherUpdateTags.json | +| [networkWatchersVerifyIPFlowSample.ts][networkwatchersverifyipflowsample] | Verify IP flow from the specified VM to a location given the currently configured NSG rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherIpFlowVerify.json | +| [operationsListSample.ts][operationslistsample] | Lists all of the available Network Rest API operations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/OperationList.json | +| [p2SVpnGatewaysCreateOrUpdateSample.ts][p2svpngatewayscreateorupdatesample] | Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayPut.json | +| [p2SVpnGatewaysDeleteSample.ts][p2svpngatewaysdeletesample] | Deletes a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayDelete.json | +| [p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts][p2svpngatewaysdisconnectp2svpnconnectionssample] | Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json | +| [p2SVpnGatewaysGenerateVpnProfileSample.ts][p2svpngatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json | +| [p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts][p2svpngatewaysgetp2svpnconnectionhealthdetailedsample] | Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json | +| [p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts][p2svpngatewaysgetp2svpnconnectionhealthsample] | Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealth.json | +| [p2SVpnGatewaysGetSample.ts][p2svpngatewaysgetsample] | Retrieves the details of a virtual wan p2s vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGet.json | +| [p2SVpnGatewaysListByResourceGroupSample.ts][p2svpngatewayslistbyresourcegroupsample] | Lists all the P2SVpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayListByResourceGroup.json | +| [p2SVpnGatewaysListSample.ts][p2svpngatewayslistsample] | Lists all the P2SVpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayList.json | +| [p2SVpnGatewaysResetSample.ts][p2svpngatewaysresetsample] | Resets the primary of the p2s vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayReset.json | +| [p2SVpnGatewaysUpdateTagsSample.ts][p2svpngatewaysupdatetagssample] | Updates virtual wan p2s vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayUpdateTags.json | +| [packetCapturesCreateSample.ts][packetcapturescreatesample] | Create and start a packet capture on the specified VM. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureCreate.json | +| [packetCapturesDeleteSample.ts][packetcapturesdeletesample] | Deletes the specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureDelete.json | +| [packetCapturesGetSample.ts][packetcapturesgetsample] | Gets a packet capture session by name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureGet.json | +| [packetCapturesGetStatusSample.ts][packetcapturesgetstatussample] | Query the status of a running packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json | +| [packetCapturesListSample.ts][packetcaptureslistsample] | Lists all packet capture sessions within the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCapturesList.json | +| [packetCapturesStopSample.ts][packetcapturesstopsample] | Stops a specified packet capture session. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureStop.json | +| [peerExpressRouteCircuitConnectionsGetSample.ts][peerexpressroutecircuitconnectionsgetsample] | Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionGet.json | +| [peerExpressRouteCircuitConnectionsListSample.ts][peerexpressroutecircuitconnectionslistsample] | Gets all global reach peer connections associated with a private peering in an express route circuit. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionList.json | +| [privateDnsZoneGroupsCreateOrUpdateSample.ts][privatednszonegroupscreateorupdatesample] | Creates or updates a private dns zone group in the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json | +| [privateDnsZoneGroupsDeleteSample.ts][privatednszonegroupsdeletesample] | Deletes the specified private dns zone group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json | +| [privateDnsZoneGroupsGetSample.ts][privatednszonegroupsgetsample] | Gets the private dns zone group resource by specified private dns zone group name. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupGet.json | +| [privateDnsZoneGroupsListSample.ts][privatednszonegroupslistsample] | Gets all private dns zone groups in a private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupList.json | +| [privateEndpointsCreateOrUpdateSample.ts][privateendpointscreateorupdatesample] | Creates or updates an private endpoint in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreate.json | +| [privateEndpointsDeleteSample.ts][privateendpointsdeletesample] | Deletes the specified private endpoint. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDelete.json | +| [privateEndpointsGetSample.ts][privateendpointsgetsample] | Gets the specified private endpoint by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGet.json | +| [privateEndpointsListBySubscriptionSample.ts][privateendpointslistbysubscriptionsample] | Gets all private endpoints in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointListAll.json | +| [privateEndpointsListSample.ts][privateendpointslistsample] | Gets all private endpoints in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointList.json | +| [privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts][privatelinkservicescheckprivatelinkservicevisibilitybyresourcegroupsample] | Checks whether the subscription is visible to private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json | +| [privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts][privatelinkservicescheckprivatelinkservicevisibilitysample] | Checks whether the subscription is visible to private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibility.json | +| [privateLinkServicesCreateOrUpdateSample.ts][privatelinkservicescreateorupdatesample] | Creates or updates an private link service in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceCreate.json | +| [privateLinkServicesDeletePrivateEndpointConnectionSample.ts][privatelinkservicesdeleteprivateendpointconnectionsample] | Delete private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json | +| [privateLinkServicesDeleteSample.ts][privatelinkservicesdeletesample] | Deletes the specified private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDelete.json | +| [privateLinkServicesGetPrivateEndpointConnectionSample.ts][privatelinkservicesgetprivateendpointconnectionsample] | Get the specific private end point connection by specific private link service in the resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json | +| [privateLinkServicesGetSample.ts][privatelinkservicesgetsample] | Gets the specified private link service by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGet.json | +| [privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts][privatelinkserviceslistautoapprovedprivatelinkservicesbyresourcegroupsample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json | +| [privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts][privatelinkserviceslistautoapprovedprivatelinkservicessample] | Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesGet.json | +| [privateLinkServicesListBySubscriptionSample.ts][privatelinkserviceslistbysubscriptionsample] | Gets all private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListAll.json | +| [privateLinkServicesListPrivateEndpointConnectionsSample.ts][privatelinkserviceslistprivateendpointconnectionssample] | Gets all private end point connections for a specific private link service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json | +| [privateLinkServicesListSample.ts][privatelinkserviceslistsample] | Gets all private link services in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceList.json | +| [privateLinkServicesUpdatePrivateEndpointConnectionSample.ts][privatelinkservicesupdateprivateendpointconnectionsample] | Approve or reject private end point connection for a private link service in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json | +| [publicIPAddressesCreateOrUpdateSample.ts][publicipaddressescreateorupdatesample] | Creates or updates a static or dynamic public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDns.json | +| [publicIPAddressesDdosProtectionStatusSample.ts][publicipaddressesddosprotectionstatussample] | Gets the Ddos Protection Status of a Public IP Address x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json | +| [publicIPAddressesDeleteSample.ts][publicipaddressesdeletesample] | Deletes the specified public IP address. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressDelete.json | +| [publicIPAddressesGetCloudServicePublicIpaddressSample.ts][publicipaddressesgetcloudservicepublicipaddresssample] | Get the specified public IP address in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpGet.json | +| [publicIPAddressesGetSample.ts][publicipaddressesgetsample] | Gets the specified public IP address in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGet.json | +| [publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts][publicipaddressesgetvirtualmachinescalesetpublicipaddresssample] | Get the specified public IP address in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpGet.json | +| [publicIPAddressesListAllSample.ts][publicipaddresseslistallsample] | Gets all the public IP addresses in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressListAll.json | +| [publicIPAddressesListCloudServicePublicIpaddressesSample.ts][publicipaddresseslistcloudservicepublicipaddressessample] | Gets information about all public IP addresses on a cloud service level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpListAll.json | +| [publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts][publicipaddresseslistcloudserviceroleinstancepublicipaddressessample] | Gets information about all public IP addresses in a role instance IP configuration in a cloud service. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstancePublicIpList.json | +| [publicIPAddressesListSample.ts][publicipaddresseslistsample] | Gets all public IP addresses in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressList.json | +| [publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts][publicipaddresseslistvirtualmachinescalesetpublicipaddressessample] | Gets information about all public IP addresses on a virtual machine scale set level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpListAll.json | +| [publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts][publicipaddresseslistvirtualmachinescalesetvmpublicipaddressessample] | Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmPublicIpList.json | +| [publicIPAddressesUpdateTagsSample.ts][publicipaddressesupdatetagssample] | Updates public IP address tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressUpdateTags.json | +| [publicIPPrefixesCreateOrUpdateSample.ts][publicipprefixescreateorupdatesample] | Creates or updates a static or dynamic public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateCustomizedValues.json | +| [publicIPPrefixesDeleteSample.ts][publicipprefixesdeletesample] | Deletes the specified public IP prefix. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixDelete.json | +| [publicIPPrefixesGetSample.ts][publicipprefixesgetsample] | Gets the specified public IP prefix in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixGet.json | +| [publicIPPrefixesListAllSample.ts][publicipprefixeslistallsample] | Gets all the public IP prefixes in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixListAll.json | +| [publicIPPrefixesListSample.ts][publicipprefixeslistsample] | Gets all public IP prefixes in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixList.json | +| [publicIPPrefixesUpdateTagsSample.ts][publicipprefixesupdatetagssample] | Updates public IP prefix tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixUpdateTags.json | +| [putBastionShareableLinkSample.ts][putbastionshareablelinksample] | Creates a Bastion Shareable Links for all the VMs specified in the request. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkCreate.json | +| [reachabilityAnalysisIntentsCreateSample.ts][reachabilityanalysisintentscreatesample] | Creates Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentPut.json | +| [reachabilityAnalysisIntentsDeleteSample.ts][reachabilityanalysisintentsdeletesample] | Deletes Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentDelete.json | +| [reachabilityAnalysisIntentsGetSample.ts][reachabilityanalysisintentsgetsample] | Get the Reachability Analysis Intent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentGet.json | +| [reachabilityAnalysisIntentsListSample.ts][reachabilityanalysisintentslistsample] | Gets list of Reachability Analysis Intents . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentList.json | +| [reachabilityAnalysisRunsCreateSample.ts][reachabilityanalysisrunscreatesample] | Creates Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunPut.json | +| [reachabilityAnalysisRunsDeleteSample.ts][reachabilityanalysisrunsdeletesample] | Deletes Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunDelete.json | +| [reachabilityAnalysisRunsGetSample.ts][reachabilityanalysisrunsgetsample] | Gets Reachability Analysis Run. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunGet.json | +| [reachabilityAnalysisRunsListSample.ts][reachabilityanalysisrunslistsample] | Gets list of Reachability Analysis Runs. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunList.json | +| [resourceNavigationLinksListSample.ts][resourcenavigationlinkslistsample] | Gets a list of resource navigation links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json | +| [routeFilterRulesCreateOrUpdateSample.ts][routefilterrulescreateorupdatesample] | Creates or updates a route in the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleCreate.json | +| [routeFilterRulesDeleteSample.ts][routefilterrulesdeletesample] | Deletes the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleDelete.json | +| [routeFilterRulesGetSample.ts][routefilterrulesgetsample] | Gets the specified rule from a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleGet.json | +| [routeFilterRulesListByRouteFilterSample.ts][routefilterruleslistbyroutefiltersample] | Gets all RouteFilterRules in a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleListByRouteFilter.json | +| [routeFiltersCreateOrUpdateSample.ts][routefilterscreateorupdatesample] | Creates or updates a route filter in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterCreate.json | +| [routeFiltersDeleteSample.ts][routefiltersdeletesample] | Deletes the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterDelete.json | +| [routeFiltersGetSample.ts][routefiltersgetsample] | Gets the specified route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterGet.json | +| [routeFiltersListByResourceGroupSample.ts][routefilterslistbyresourcegroupsample] | Gets all route filters in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterListByResourceGroup.json | +| [routeFiltersListSample.ts][routefilterslistsample] | Gets all route filters in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterList.json | +| [routeFiltersUpdateTagsSample.ts][routefiltersupdatetagssample] | Updates tags of a route filter. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterUpdateTags.json | +| [routeMapsCreateOrUpdateSample.ts][routemapscreateorupdatesample] | Creates a RouteMap if it doesn't exist else updates the existing one. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapPut.json | +| [routeMapsDeleteSample.ts][routemapsdeletesample] | Deletes a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapDelete.json | +| [routeMapsGetSample.ts][routemapsgetsample] | Retrieves the details of a RouteMap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapGet.json | +| [routeMapsListSample.ts][routemapslistsample] | Retrieves the details of all RouteMaps. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapList.json | +| [routeTablesCreateOrUpdateSample.ts][routetablescreateorupdatesample] | Create or updates a route table in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreate.json | +| [routeTablesDeleteSample.ts][routetablesdeletesample] | Deletes the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableDelete.json | +| [routeTablesGetSample.ts][routetablesgetsample] | Gets the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableGet.json | +| [routeTablesListAllSample.ts][routetableslistallsample] | Gets all route tables in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableListAll.json | +| [routeTablesListSample.ts][routetableslistsample] | Gets all route tables in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableList.json | +| [routeTablesUpdateTagsSample.ts][routetablesupdatetagssample] | Updates a route table tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableUpdateTags.json | +| [routesCreateOrUpdateSample.ts][routescreateorupdatesample] | Creates or updates a route in the specified route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteCreate.json | +| [routesDeleteSample.ts][routesdeletesample] | Deletes the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteDelete.json | +| [routesGetSample.ts][routesgetsample] | Gets the specified route from a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteGet.json | +| [routesListSample.ts][routeslistsample] | Gets all routes in a route table. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteList.json | +| [routingIntentCreateOrUpdateSample.ts][routingintentcreateorupdatesample] | Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentPut.json | +| [routingIntentDeleteSample.ts][routingintentdeletesample] | Deletes a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentDelete.json | +| [routingIntentGetSample.ts][routingintentgetsample] | Retrieves the details of a RoutingIntent. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentGet.json | +| [routingIntentListSample.ts][routingintentlistsample] | Retrieves the details of all RoutingIntent child resources of the VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentList.json | +| [routingRuleCollectionsCreateOrUpdateSample.ts][routingrulecollectionscreateorupdatesample] | Creates or updates a routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json | +| [routingRuleCollectionsDeleteSample.ts][routingrulecollectionsdeletesample] | Deletes an routing rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json | +| [routingRuleCollectionsGetSample.ts][routingrulecollectionsgetsample] | Gets a network manager routing configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json | +| [routingRuleCollectionsListSample.ts][routingrulecollectionslistsample] | Lists all the rule collections in a routing configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionList.json | +| [routingRulesCreateOrUpdateSample.ts][routingrulescreateorupdatesample] | Creates or updates an routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json | +| [routingRulesDeleteSample.ts][routingrulesdeletesample] | Deletes a routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleDelete.json | +| [routingRulesGetSample.ts][routingrulesgetsample] | Gets a network manager routing configuration routing rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleGet.json | +| [routingRulesListSample.ts][routingruleslistsample] | List all network manager routing configuration routing rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleList.json | +| [scopeConnectionsCreateOrUpdateSample.ts][scopeconnectionscreateorupdatesample] | Creates or updates scope connection from Network Manager x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionPut.json | +| [scopeConnectionsDeleteSample.ts][scopeconnectionsdeletesample] | Delete the pending scope connection created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionDelete.json | +| [scopeConnectionsGetSample.ts][scopeconnectionsgetsample] | Get specified scope connection created by this Network Manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionGet.json | +| [scopeConnectionsListSample.ts][scopeconnectionslistsample] | List all scope connections created by this network manager. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionList.json | +| [securityAdminConfigurationsCreateOrUpdateSample.ts][securityadminconfigurationscreateorupdatesample] | Creates or updates a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json | +| [securityAdminConfigurationsDeleteSample.ts][securityadminconfigurationsdeletesample] | Deletes a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json | +| [securityAdminConfigurationsGetSample.ts][securityadminconfigurationsgetsample] | Retrieves a network manager security admin configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json | +| [securityAdminConfigurationsListSample.ts][securityadminconfigurationslistsample] | Lists all the network manager security admin configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json | +| [securityPartnerProvidersCreateOrUpdateSample.ts][securitypartnerproviderscreateorupdatesample] | Creates or updates the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderPut.json | +| [securityPartnerProvidersDeleteSample.ts][securitypartnerprovidersdeletesample] | Deletes the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderDelete.json | +| [securityPartnerProvidersGetSample.ts][securitypartnerprovidersgetsample] | Gets the specified Security Partner Provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderGet.json | +| [securityPartnerProvidersListByResourceGroupSample.ts][securitypartnerproviderslistbyresourcegroupsample] | Lists all Security Partner Providers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListByResourceGroup.json | +| [securityPartnerProvidersListSample.ts][securitypartnerproviderslistsample] | Gets all the Security Partner Providers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListBySubscription.json | +| [securityPartnerProvidersUpdateTagsSample.ts][securitypartnerprovidersupdatetagssample] | Updates tags of a Security Partner Provider resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderUpdateTags.json | +| [securityRulesCreateOrUpdateSample.ts][securityrulescreateorupdatesample] | Creates or updates a security rule in the specified network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleCreate.json | +| [securityRulesDeleteSample.ts][securityrulesdeletesample] | Deletes the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleDelete.json | +| [securityRulesGetSample.ts][securityrulesgetsample] | Get the specified network security rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleGet.json | +| [securityRulesListSample.ts][securityruleslistsample] | Gets all security rules in a network security group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleList.json | +| [securityUserConfigurationsCreateOrUpdateSample.ts][securityuserconfigurationscreateorupdatesample] | Creates or updates a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json | +| [securityUserConfigurationsDeleteSample.ts][securityuserconfigurationsdeletesample] | Deletes a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json | +| [securityUserConfigurationsGetSample.ts][securityuserconfigurationsgetsample] | Retrieves a network manager security user configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json | +| [securityUserConfigurationsListSample.ts][securityuserconfigurationslistsample] | Lists all the network manager security user configurations in a network manager, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationList.json | +| [securityUserRuleCollectionsCreateOrUpdateSample.ts][securityuserrulecollectionscreateorupdatesample] | Creates or updates a security user rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json | +| [securityUserRuleCollectionsDeleteSample.ts][securityuserrulecollectionsdeletesample] | Deletes a Security User Rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json | +| [securityUserRuleCollectionsGetSample.ts][securityuserrulecollectionsgetsample] | Gets a network manager security user configuration rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json | +| [securityUserRuleCollectionsListSample.ts][securityuserrulecollectionslistsample] | Lists all the security user rule collections in a security configuration, in a paginated format. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json | +| [securityUserRulesCreateOrUpdateSample.ts][securityuserrulescreateorupdatesample] | Creates or updates a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRulePut.json | +| [securityUserRulesDeleteSample.ts][securityuserrulesdeletesample] | Deletes a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleDelete.json | +| [securityUserRulesGetSample.ts][securityuserrulesgetsample] | Gets a security user rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleGet.json | +| [securityUserRulesListSample.ts][securityuserruleslistsample] | Lists all Security User Rules in a rule collection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleList.json | +| [serviceAssociationLinksListSample.ts][serviceassociationlinkslistsample] | Gets a list of service association links for a subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json | +| [serviceEndpointPoliciesCreateOrUpdateSample.ts][serviceendpointpoliciescreateorupdatesample] | Creates or updates a service Endpoint Policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreate.json | +| [serviceEndpointPoliciesDeleteSample.ts][serviceendpointpoliciesdeletesample] | Deletes the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDelete.json | +| [serviceEndpointPoliciesGetSample.ts][serviceendpointpoliciesgetsample] | Gets the specified service Endpoint Policies in a specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyGet.json | +| [serviceEndpointPoliciesListByResourceGroupSample.ts][serviceendpointpolicieslistbyresourcegroupsample] | Gets all service endpoint Policies in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyList.json | +| [serviceEndpointPoliciesListSample.ts][serviceendpointpolicieslistsample] | Gets all the service endpoint policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyListAll.json | +| [serviceEndpointPoliciesUpdateTagsSample.ts][serviceendpointpoliciesupdatetagssample] | Updates tags of a service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyUpdateTags.json | +| [serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts][serviceendpointpolicydefinitionscreateorupdatesample] | Creates or updates a service endpoint policy definition in the specified service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json | +| [serviceEndpointPolicyDefinitionsDeleteSample.ts][serviceendpointpolicydefinitionsdeletesample] | Deletes the specified ServiceEndpoint policy definitions. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json | +| [serviceEndpointPolicyDefinitionsGetSample.ts][serviceendpointpolicydefinitionsgetsample] | Get the specified service endpoint policy definitions from service endpoint policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionGet.json | +| [serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts][serviceendpointpolicydefinitionslistbyresourcegroupsample] | Gets all service endpoint policy definitions in a service end point policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionList.json | +| [serviceTagInformationListSample.ts][servicetaginformationlistsample] | Gets a list of service tag information resources with pagination. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResult.json | +| [serviceTagsListSample.ts][servicetagslistsample] | Gets a list of service tag information resources. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagsList.json | +| [staticCidrsCreateSample.ts][staticcidrscreatesample] | Creates/Updates the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Create.json | +| [staticCidrsDeleteSample.ts][staticcidrsdeletesample] | Delete the Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Delete.json | +| [staticCidrsGetSample.ts][staticcidrsgetsample] | Gets the specific Static CIDR resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Get.json | +| [staticCidrsListSample.ts][staticcidrslistsample] | Gets list of Static CIDR resources at Network Manager level. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_List.json | +| [staticMembersCreateOrUpdateSample.ts][staticmemberscreateorupdatesample] | Creates or updates a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberPut.json | +| [staticMembersDeleteSample.ts][staticmembersdeletesample] | Deletes a static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberDelete.json | +| [staticMembersGetSample.ts][staticmembersgetsample] | Gets the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberGet.json | +| [staticMembersListSample.ts][staticmemberslistsample] | Lists the specified static member. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberList.json | +| [subnetsCreateOrUpdateSample.ts][subnetscreateorupdatesample] | Creates or updates a subnet in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreate.json | +| [subnetsDeleteSample.ts][subnetsdeletesample] | Deletes the specified subnet. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetDelete.json | +| [subnetsGetSample.ts][subnetsgetsample] | Gets the specified subnet by virtual network and resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGet.json | +| [subnetsListSample.ts][subnetslistsample] | Gets all subnets in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetList.json | +| [subnetsPrepareNetworkPoliciesSample.ts][subnetspreparenetworkpoliciessample] | Prepares a subnet by applying network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetPrepareNetworkPolicies.json | +| [subnetsUnprepareNetworkPoliciesSample.ts][subnetsunpreparenetworkpoliciessample] | Unprepares a subnet by removing network intent policies. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetUnprepareNetworkPolicies.json | +| [subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts][subscriptionnetworkmanagerconnectionscreateorupdatesample] | Create a network manager connection on this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionPut.json | +| [subscriptionNetworkManagerConnectionsDeleteSample.ts][subscriptionnetworkmanagerconnectionsdeletesample] | Delete specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json | +| [subscriptionNetworkManagerConnectionsGetSample.ts][subscriptionnetworkmanagerconnectionsgetsample] | Get a specified connection created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionGet.json | +| [subscriptionNetworkManagerConnectionsListSample.ts][subscriptionnetworkmanagerconnectionslistsample] | List all network manager connections created by this subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionList.json | +| [supportedSecurityProvidersSample.ts][supportedsecurityproviderssample] | Gives the supported security providers for the virtual wan. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWanSupportedSecurityProviders.json | +| [usagesListSample.ts][usageslistsample] | List network usages for a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageList.json | +| [verifierWorkspacesCreateSample.ts][verifierworkspacescreatesample] | Creates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePut.json | +| [verifierWorkspacesDeleteSample.ts][verifierworkspacesdeletesample] | Deletes Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceDelete.json | +| [verifierWorkspacesGetSample.ts][verifierworkspacesgetsample] | Gets Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceGet.json | +| [verifierWorkspacesListSample.ts][verifierworkspaceslistsample] | Gets list of Verifier Workspaces. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceList.json | +| [verifierWorkspacesUpdateSample.ts][verifierworkspacesupdatesample] | Updates Verifier Workspace. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePatch.json | +| [vipSwapCreateSample.ts][vipswapcreatesample] | Performs vip swap operation on swappable cloud services. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapPut.json | +| [vipSwapGetSample.ts][vipswapgetsample] | Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapGet.json | +| [vipSwapListSample.ts][vipswaplistsample] | Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapList.json | +| [virtualApplianceSitesCreateOrUpdateSample.ts][virtualappliancesitescreateorupdatesample] | Creates or updates the specified Network Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSitePut.json | +| [virtualApplianceSitesDeleteSample.ts][virtualappliancesitesdeletesample] | Deletes the specified site from a Virtual Appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteDelete.json | +| [virtualApplianceSitesGetSample.ts][virtualappliancesitesgetsample] | Gets the specified Virtual Appliance Site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteGet.json | +| [virtualApplianceSitesListSample.ts][virtualappliancesiteslistsample] | Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteList.json | +| [virtualApplianceSkusGetSample.ts][virtualapplianceskusgetsample] | Retrieves a single available sku for network virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuGet.json | +| [virtualApplianceSkusListSample.ts][virtualapplianceskuslistsample] | List all SKUs available for a virtual appliance. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuList.json | +| [virtualHubBgpConnectionCreateOrUpdateSample.ts][virtualhubbgpconnectioncreateorupdatesample] | Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionPut.json | +| [virtualHubBgpConnectionDeleteSample.ts][virtualhubbgpconnectiondeletesample] | Deletes a VirtualHubBgpConnection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionDelete.json | +| [virtualHubBgpConnectionGetSample.ts][virtualhubbgpconnectiongetsample] | Retrieves the details of a Virtual Hub Bgp Connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionGet.json | +| [virtualHubBgpConnectionsListAdvertisedRoutesSample.ts][virtualhubbgpconnectionslistadvertisedroutessample] | Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json | +| [virtualHubBgpConnectionsListLearnedRoutesSample.ts][virtualhubbgpconnectionslistlearnedroutessample] | Retrieves a list of routes the virtual hub bgp connection has learned. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListLearnedRoute.json | +| [virtualHubBgpConnectionsListSample.ts][virtualhubbgpconnectionslistsample] | Retrieves the details of all VirtualHubBgpConnections. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionList.json | +| [virtualHubIPConfigurationCreateOrUpdateSample.ts][virtualhubipconfigurationcreateorupdatesample] | Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationPut.json | +| [virtualHubIPConfigurationDeleteSample.ts][virtualhubipconfigurationdeletesample] | Deletes a VirtualHubIpConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationDelete.json | +| [virtualHubIPConfigurationGetSample.ts][virtualhubipconfigurationgetsample] | Retrieves the details of a Virtual Hub Ip configuration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationGet.json | +| [virtualHubIPConfigurationListSample.ts][virtualhubipconfigurationlistsample] | Retrieves the details of all VirtualHubIpConfigurations. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationList.json | +| [virtualHubRouteTableV2SCreateOrUpdateSample.ts][virtualhubroutetablev2screateorupdatesample] | Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Put.json | +| [virtualHubRouteTableV2SDeleteSample.ts][virtualhubroutetablev2sdeletesample] | Deletes a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Delete.json | +| [virtualHubRouteTableV2SGetSample.ts][virtualhubroutetablev2sgetsample] | Retrieves the details of a VirtualHubRouteTableV2. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Get.json | +| [virtualHubRouteTableV2SListSample.ts][virtualhubroutetablev2slistsample] | Retrieves the details of all VirtualHubRouteTableV2s. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2List.json | +| [virtualHubsCreateOrUpdateSample.ts][virtualhubscreateorupdatesample] | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubPut.json | +| [virtualHubsDeleteSample.ts][virtualhubsdeletesample] | Deletes a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubDelete.json | +| [virtualHubsGetEffectiveVirtualHubRoutesSample.ts][virtualhubsgeteffectivevirtualhubroutessample] | Gets the effective routes configured for the Virtual Hub resource or the specified resource . x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForConnection.json | +| [virtualHubsGetInboundRoutesSample.ts][virtualhubsgetinboundroutessample] | Gets the inbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetInboundRoutes.json | +| [virtualHubsGetOutboundRoutesSample.ts][virtualhubsgetoutboundroutessample] | Gets the outbound routes configured for the Virtual Hub on a particular connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetOutboundRoutes.json | +| [virtualHubsGetSample.ts][virtualhubsgetsample] | Retrieves the details of a VirtualHub. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubGet.json | +| [virtualHubsListByResourceGroupSample.ts][virtualhubslistbyresourcegroupsample] | Lists all the VirtualHubs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubListByResourceGroup.json | +| [virtualHubsListSample.ts][virtualhubslistsample] | Lists all the VirtualHubs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubList.json | +| [virtualHubsUpdateTagsSample.ts][virtualhubsupdatetagssample] | Updates VirtualHub tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubUpdateTags.json | +| [virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts][virtualnetworkgatewayconnectionscreateorupdatesample] | Creates or updates a virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionCreate.json | +| [virtualNetworkGatewayConnectionsDeleteSample.ts][virtualnetworkgatewayconnectionsdeletesample] | Deletes the specified virtual network Gateway connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionDelete.json | +| [virtualNetworkGatewayConnectionsGetIkeSasSample.ts][virtualnetworkgatewayconnectionsgetikesassample] | Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json | +| [virtualNetworkGatewayConnectionsGetSample.ts][virtualnetworkgatewayconnectionsgetsample] | Gets the specified virtual network gateway connection by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGet.json | +| [virtualNetworkGatewayConnectionsGetSharedKeySample.ts][virtualnetworkgatewayconnectionsgetsharedkeysample] | The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json | +| [virtualNetworkGatewayConnectionsListSample.ts][virtualnetworkgatewayconnectionslistsample] | The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionsList.json | +| [virtualNetworkGatewayConnectionsResetConnectionSample.ts][virtualnetworkgatewayconnectionsresetconnectionsample] | Resets the virtual network gateway connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionReset.json | +| [virtualNetworkGatewayConnectionsResetSharedKeySample.ts][virtualnetworkgatewayconnectionsresetsharedkeysample] | The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json | +| [virtualNetworkGatewayConnectionsSetSharedKeySample.ts][virtualnetworkgatewayconnectionssetsharedkeysample] | The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json | +| [virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts][virtualnetworkgatewayconnectionsstartpacketcapturesample] | Starts packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json | +| [virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts][virtualnetworkgatewayconnectionsstoppacketcapturesample] | Stops packet capture on virtual network gateway connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json | +| [virtualNetworkGatewayConnectionsUpdateTagsSample.ts][virtualnetworkgatewayconnectionsupdatetagssample] | Updates a virtual network gateway connection tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json | +| [virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts][virtualnetworkgatewaynatrulescreateorupdatesample] | Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRulePut.json | +| [virtualNetworkGatewayNatRulesDeleteSample.ts][virtualnetworkgatewaynatrulesdeletesample] | Deletes a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json | +| [virtualNetworkGatewayNatRulesGetSample.ts][virtualnetworkgatewaynatrulesgetsample] | Retrieves the details of a nat rule. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleGet.json | +| [virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts][virtualnetworkgatewaynatruleslistbyvirtualnetworkgatewaysample] | Retrieves all nat rules for a particular virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleList.json | +| [virtualNetworkGatewaysCreateOrUpdateSample.ts][virtualnetworkgatewayscreateorupdatesample] | Creates or updates a virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdate.json | +| [virtualNetworkGatewaysDeleteSample.ts][virtualnetworkgatewaysdeletesample] | Deletes the specified virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayDelete.json | +| [virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts][virtualnetworkgatewaysdisconnectvirtualnetworkgatewayvpnconnectionssample] | Disconnect vpn connections of virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json | +| [virtualNetworkGatewaysGenerateVpnProfileSample.ts][virtualnetworkgatewaysgeneratevpnprofilesample] | Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json | +| [virtualNetworkGatewaysGeneratevpnclientpackageSample.ts][virtualnetworkgatewaysgeneratevpnclientpackagesample] | Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json | +| [virtualNetworkGatewaysGetAdvertisedRoutesSample.ts][virtualnetworkgatewaysgetadvertisedroutessample] | This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json | +| [virtualNetworkGatewaysGetBgpPeerStatusSample.ts][virtualnetworkgatewaysgetbgppeerstatussample] | The GetBgpPeerStatus operation retrieves the status of all BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json | +| [virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts][virtualnetworkgatewaysgetfailoveralltestdetailssample] | This operation retrieves the details of all the failover tests performed on the gateway for different peering locations x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json | +| [virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts][virtualnetworkgatewaysgetfailoversingletestdetailssample] | This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json | +| [virtualNetworkGatewaysGetLearnedRoutesSample.ts][virtualnetworkgatewaysgetlearnedroutessample] | This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json | +| [virtualNetworkGatewaysGetSample.ts][virtualnetworkgatewaysgetsample] | Gets the specified virtual network gateway by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGet.json | +| [virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts][virtualnetworkgatewaysgetvpnprofilepackageurlsample] | Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json | +| [virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts][virtualnetworkgatewaysgetvpnclientconnectionhealthsample] | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json | +| [virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts][virtualnetworkgatewaysgetvpnclientipsecparameterssample] | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json | +| [virtualNetworkGatewaysListConnectionsSample.ts][virtualnetworkgatewayslistconnectionssample] | Gets all the connections in a virtual network gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysListConnections.json | +| [virtualNetworkGatewaysListSample.ts][virtualnetworkgatewayslistsample] | Gets all virtual network gateways by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayList.json | +| [virtualNetworkGatewaysResetSample.ts][virtualnetworkgatewaysresetsample] | Resets the primary of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayReset.json | +| [virtualNetworkGatewaysResetVpnClientSharedKeySample.ts][virtualnetworkgatewaysresetvpnclientsharedkeysample] | Resets the VPN client shared key of the virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json | +| [virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts][virtualnetworkgatewayssetvpnclientipsecparameterssample] | The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json | +| [virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts][virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample] | This operation starts failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json | +| [virtualNetworkGatewaysStartPacketCaptureSample.ts][virtualnetworkgatewaysstartpacketcapturesample] | Starts packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json | +| [virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts][virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample] | This operation stops failover simulation on the gateway for the specified peering location x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json | +| [virtualNetworkGatewaysStopPacketCaptureSample.ts][virtualnetworkgatewaysstoppacketcapturesample] | Stops packet capture on virtual network gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json | +| [virtualNetworkGatewaysSupportedVpnDevicesSample.ts][virtualnetworkgatewayssupportedvpndevicessample] | Gets a xml format representation for supported vpn devices. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json | +| [virtualNetworkGatewaysUpdateTagsSample.ts][virtualnetworkgatewaysupdatetagssample] | Updates a virtual network gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdateTags.json | +| [virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts][virtualnetworkgatewaysvpndeviceconfigurationscriptsample] | Gets a xml format representation for vpn device configuration script. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json | +| [virtualNetworkPeeringsCreateOrUpdateSample.ts][virtualnetworkpeeringscreateorupdatesample] | Creates or updates a peering in the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json | +| [virtualNetworkPeeringsDeleteSample.ts][virtualnetworkpeeringsdeletesample] | Deletes the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringDelete.json | +| [virtualNetworkPeeringsGetSample.ts][virtualnetworkpeeringsgetsample] | Gets the specified virtual network peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json | +| [virtualNetworkPeeringsListSample.ts][virtualnetworkpeeringslistsample] | Gets all virtual network peerings in a virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringList.json | +| [virtualNetworkTapsCreateOrUpdateSample.ts][virtualnetworktapscreateorupdatesample] | Creates or updates a Virtual Network Tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapCreate.json | +| [virtualNetworkTapsDeleteSample.ts][virtualnetworktapsdeletesample] | Deletes the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapDelete.json | +| [virtualNetworkTapsGetSample.ts][virtualnetworktapsgetsample] | Gets information about the specified virtual network tap. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapGet.json | +| [virtualNetworkTapsListAllSample.ts][virtualnetworktapslistallsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapListAll.json | +| [virtualNetworkTapsListByResourceGroupSample.ts][virtualnetworktapslistbyresourcegroupsample] | Gets all the VirtualNetworkTaps in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapList.json | +| [virtualNetworkTapsUpdateTagsSample.ts][virtualnetworktapsupdatetagssample] | Updates an VirtualNetworkTap tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapUpdateTags.json | +| [virtualNetworksCheckIPAddressAvailabilitySample.ts][virtualnetworkscheckipaddressavailabilitysample] | Checks whether a private IP address is available for use. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json | +| [virtualNetworksCreateOrUpdateSample.ts][virtualnetworkscreateorupdatesample] | Creates or updates a virtual network in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreate.json | +| [virtualNetworksDeleteSample.ts][virtualnetworksdeletesample] | Deletes the specified virtual network. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkDelete.json | +| [virtualNetworksGetSample.ts][virtualnetworksgetsample] | Gets the specified virtual network by resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGet.json | +| [virtualNetworksListAllSample.ts][virtualnetworkslistallsample] | Gets all virtual networks in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListAll.json | +| [virtualNetworksListDdosProtectionStatusSample.ts][virtualnetworkslistddosprotectionstatussample] | Gets the Ddos Protection Status of all IP Addresses under the Virtual Network x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json | +| [virtualNetworksListSample.ts][virtualnetworkslistsample] | Gets all virtual networks in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkList.json | +| [virtualNetworksListUsageSample.ts][virtualnetworkslistusagesample] | Lists usage stats. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListUsage.json | +| [virtualNetworksUpdateTagsSample.ts][virtualnetworksupdatetagssample] | Updates a virtual network tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkUpdateTags.json | +| [virtualRouterPeeringsCreateOrUpdateSample.ts][virtualrouterpeeringscreateorupdatesample] | Creates or updates the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringPut.json | +| [virtualRouterPeeringsDeleteSample.ts][virtualrouterpeeringsdeletesample] | Deletes the specified peering from a Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringDelete.json | +| [virtualRouterPeeringsGetSample.ts][virtualrouterpeeringsgetsample] | Gets the specified Virtual Router Peering. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringGet.json | +| [virtualRouterPeeringsListSample.ts][virtualrouterpeeringslistsample] | Lists all Virtual Router Peerings in a Virtual Router resource. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringList.json | +| [virtualRoutersCreateOrUpdateSample.ts][virtualrouterscreateorupdatesample] | Creates or updates the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPut.json | +| [virtualRoutersDeleteSample.ts][virtualroutersdeletesample] | Deletes the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterDelete.json | +| [virtualRoutersGetSample.ts][virtualroutersgetsample] | Gets the specified Virtual Router. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterGet.json | +| [virtualRoutersListByResourceGroupSample.ts][virtualrouterslistbyresourcegroupsample] | Lists all Virtual Routers in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListByResourceGroup.json | +| [virtualRoutersListSample.ts][virtualrouterslistsample] | Gets all the Virtual Routers in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListBySubscription.json | +| [virtualWansCreateOrUpdateSample.ts][virtualwanscreateorupdatesample] | Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANPut.json | +| [virtualWansDeleteSample.ts][virtualwansdeletesample] | Deletes a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANDelete.json | +| [virtualWansGetSample.ts][virtualwansgetsample] | Retrieves the details of a VirtualWAN. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANGet.json | +| [virtualWansListByResourceGroupSample.ts][virtualwanslistbyresourcegroupsample] | Lists all the VirtualWANs in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANListByResourceGroup.json | +| [virtualWansListSample.ts][virtualwanslistsample] | Lists all the VirtualWANs in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANList.json | +| [virtualWansUpdateTagsSample.ts][virtualwansupdatetagssample] | Updates a VirtualWAN tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANUpdateTags.json | +| [vpnConnectionsCreateOrUpdateSample.ts][vpnconnectionscreateorupdatesample] | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionPut.json | +| [vpnConnectionsDeleteSample.ts][vpnconnectionsdeletesample] | Deletes a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionDelete.json | +| [vpnConnectionsGetSample.ts][vpnconnectionsgetsample] | Retrieves the details of a vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionGet.json | +| [vpnConnectionsListByVpnGatewaySample.ts][vpnconnectionslistbyvpngatewaysample] | Retrieves all vpn connections for a particular virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionList.json | +| [vpnConnectionsStartPacketCaptureSample.ts][vpnconnectionsstartpacketcapturesample] | Starts packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json | +| [vpnConnectionsStopPacketCaptureSample.ts][vpnconnectionsstoppacketcapturesample] | Stops packet capture on Vpn connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStopPacketCapture.json | +| [vpnGatewaysCreateOrUpdateSample.ts][vpngatewayscreateorupdatesample] | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayPut.json | +| [vpnGatewaysDeleteSample.ts][vpngatewaysdeletesample] | Deletes a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayDelete.json | +| [vpnGatewaysGetSample.ts][vpngatewaysgetsample] | Retrieves the details of a virtual wan vpn gateway. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayGet.json | +| [vpnGatewaysListByResourceGroupSample.ts][vpngatewayslistbyresourcegroupsample] | Lists all the VpnGateways in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayListByResourceGroup.json | +| [vpnGatewaysListSample.ts][vpngatewayslistsample] | Lists all the VpnGateways in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayList.json | +| [vpnGatewaysResetSample.ts][vpngatewaysresetsample] | Resets the primary of the vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayReset.json | +| [vpnGatewaysStartPacketCaptureSample.ts][vpngatewaysstartpacketcapturesample] | Starts packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json | +| [vpnGatewaysStopPacketCaptureSample.ts][vpngatewaysstoppacketcapturesample] | Stops packet capture on vpn gateway in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStopPacketCapture.json | +| [vpnGatewaysUpdateTagsSample.ts][vpngatewaysupdatetagssample] | Updates virtual wan vpn gateway tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayUpdateTags.json | +| [vpnLinkConnectionsGetAllSharedKeysSample.ts][vpnlinkconnectionsgetallsharedkeyssample] | Lists all shared keys of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json | +| [vpnLinkConnectionsGetDefaultSharedKeySample.ts][vpnlinkconnectionsgetdefaultsharedkeysample] | Gets the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json | +| [vpnLinkConnectionsGetIkeSasSample.ts][vpnlinkconnectionsgetikesassample] | Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json | +| [vpnLinkConnectionsListByVpnConnectionSample.ts][vpnlinkconnectionslistbyvpnconnectionsample] | Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionList.json | +| [vpnLinkConnectionsListDefaultSharedKeySample.ts][vpnlinkconnectionslistdefaultsharedkeysample] | Gets the value of the shared key of VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json | +| [vpnLinkConnectionsResetConnectionSample.ts][vpnlinkconnectionsresetconnectionsample] | Resets the VpnLink connection specified. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionReset.json | +| [vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts][vpnlinkconnectionssetorinitdefaultsharedkeysample] | Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json | +| [vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts][vpnserverconfigurationsassociatedwithvirtualwanlistsample] | Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetVirtualWanVpnServerConfigurations.json | +| [vpnServerConfigurationsCreateOrUpdateSample.ts][vpnserverconfigurationscreateorupdatesample] | Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationPut.json | +| [vpnServerConfigurationsDeleteSample.ts][vpnserverconfigurationsdeletesample] | Deletes a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationDelete.json | +| [vpnServerConfigurationsGetSample.ts][vpnserverconfigurationsgetsample] | Retrieves the details of a VpnServerConfiguration. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationGet.json | +| [vpnServerConfigurationsListByResourceGroupSample.ts][vpnserverconfigurationslistbyresourcegroupsample] | Lists all the vpnServerConfigurations in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationListByResourceGroup.json | +| [vpnServerConfigurationsListSample.ts][vpnserverconfigurationslistsample] | Lists all the VpnServerConfigurations in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationList.json | +| [vpnServerConfigurationsUpdateTagsSample.ts][vpnserverconfigurationsupdatetagssample] | Updates VpnServerConfiguration tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationUpdateTags.json | +| [vpnSiteLinkConnectionsGetSample.ts][vpnsitelinkconnectionsgetsample] | Retrieves the details of a vpn site link connection. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGet.json | +| [vpnSiteLinksGetSample.ts][vpnsitelinksgetsample] | Retrieves the details of a VPN site link. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkGet.json | +| [vpnSiteLinksListByVpnSiteSample.ts][vpnsitelinkslistbyvpnsitesample] | Lists all the vpnSiteLinks in a resource group for a vpn site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkListByVpnSite.json | +| [vpnSitesConfigurationDownloadSample.ts][vpnsitesconfigurationdownloadsample] | Gives the sas-url to download the configurations for vpn-sites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitesConfigurationDownload.json | +| [vpnSitesCreateOrUpdateSample.ts][vpnsitescreateorupdatesample] | Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitePut.json | +| [vpnSitesDeleteSample.ts][vpnsitesdeletesample] | Deletes a VpnSite. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteDelete.json | +| [vpnSitesGetSample.ts][vpnsitesgetsample] | Retrieves the details of a VPN site. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteGet.json | +| [vpnSitesListByResourceGroupSample.ts][vpnsiteslistbyresourcegroupsample] | Lists all the vpnSites in a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteListByResourceGroup.json | +| [vpnSitesListSample.ts][vpnsiteslistsample] | Lists all the VpnSites in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteList.json | +| [vpnSitesUpdateTagsSample.ts][vpnsitesupdatetagssample] | Updates VpnSite tags. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteUpdateTags.json | +| [webApplicationFirewallPoliciesCreateOrUpdateSample.ts][webapplicationfirewallpoliciescreateorupdatesample] | Creates or update policy with specified rule set name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyCreateOrUpdate.json | +| [webApplicationFirewallPoliciesDeleteSample.ts][webapplicationfirewallpoliciesdeletesample] | Deletes Policy. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyDelete.json | +| [webApplicationFirewallPoliciesGetSample.ts][webapplicationfirewallpoliciesgetsample] | Retrieve protection policy with specified name within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyGet.json | +| [webApplicationFirewallPoliciesListAllSample.ts][webapplicationfirewallpolicieslistallsample] | Gets all the WAF policies in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListAllPolicies.json | +| [webApplicationFirewallPoliciesListSample.ts][webapplicationfirewallpolicieslistsample] | Lists all of the protection policies within a resource group. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListPolicies.json | +| [webCategoriesGetSample.ts][webcategoriesgetsample] | Gets the specified Azure Web Category. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoryGet.json | +| [webCategoriesListBySubscriptionSample.ts][webcategorieslistbysubscriptionsample] | Gets all the Azure Web Categories in a subscription. x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoriesListBySubscription.json | ## Prerequisites @@ -936,6 +965,13 @@ Take a look at our [API Documentation][apiref] for more information about the AP [ipgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListByResourceGroupSample.ts [ipgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListSample.ts [ipgroupsupdategroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsUpdateGroupsSample.ts +[ipampoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsCreateSample.ts +[ipampoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsDeleteSample.ts +[ipampoolsgetpoolusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetPoolUsageSample.ts +[ipampoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetSample.ts +[ipampoolslistassociatedresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListAssociatedResourcesSample.ts +[ipampoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListSample.ts +[ipampoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsUpdateSample.ts [listactiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/listActiveConnectivityConfigurationsSample.ts [listactivesecurityadminrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/listActiveSecurityAdminRulesSample.ts [listnetworkmanagereffectiveconnectivityconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts @@ -947,6 +983,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [loadbalancerfrontendipconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts [loadbalancerfrontendipconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts [loadbalancerloadbalancingrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts +[loadbalancerloadbalancingruleshealthsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts [loadbalancerloadbalancingruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesListSample.ts [loadbalancernetworkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerNetworkInterfacesListSample.ts [loadbalanceroutboundrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerOutboundRulesGetSample.ts @@ -1123,6 +1160,14 @@ Take a look at our [API Documentation][apiref] for more information about the AP [publicipprefixeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesListSample.ts [publicipprefixesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesUpdateTagsSample.ts [putbastionshareablelinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/putBastionShareableLinkSample.ts +[reachabilityanalysisintentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsCreateSample.ts +[reachabilityanalysisintentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts +[reachabilityanalysisintentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsGetSample.ts +[reachabilityanalysisintentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsListSample.ts +[reachabilityanalysisrunscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsCreateSample.ts +[reachabilityanalysisrunsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsDeleteSample.ts +[reachabilityanalysisrunsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsGetSample.ts +[reachabilityanalysisrunslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsListSample.ts [resourcenavigationlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/resourceNavigationLinksListSample.ts [routefilterrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesCreateOrUpdateSample.ts [routefilterrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesDeleteSample.ts @@ -1203,6 +1248,10 @@ Take a look at our [API Documentation][apiref] for more information about the AP [serviceendpointpolicydefinitionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts [servicetaginformationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/serviceTagInformationListSample.ts [servicetagslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/serviceTagsListSample.ts +[staticcidrscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsCreateSample.ts +[staticcidrsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsDeleteSample.ts +[staticcidrsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsGetSample.ts +[staticcidrslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsListSample.ts [staticmemberscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/staticMembersCreateOrUpdateSample.ts [staticmembersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/staticMembersDeleteSample.ts [staticmembersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/staticMembersGetSample.ts @@ -1219,6 +1268,11 @@ Take a look at our [API Documentation][apiref] for more information about the AP [subscriptionnetworkmanagerconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts [supportedsecurityproviderssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/supportedSecurityProvidersSample.ts [usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/usagesListSample.ts +[verifierworkspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesCreateSample.ts +[verifierworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesDeleteSample.ts +[verifierworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesGetSample.ts +[verifierworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesListSample.ts +[verifierworkspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesUpdateSample.ts [vipswapcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/vipSwapCreateSample.ts [vipswapgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/vipSwapGetSample.ts [vipswaplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/vipSwapListSample.ts @@ -1274,6 +1328,8 @@ Take a look at our [API Documentation][apiref] for more information about the AP [virtualnetworkgatewaysgeneratevpnclientpackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts [virtualnetworkgatewaysgetadvertisedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts [virtualnetworkgatewaysgetbgppeerstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts +[virtualnetworkgatewaysgetfailoveralltestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts +[virtualnetworkgatewaysgetfailoversingletestdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts [virtualnetworkgatewaysgetlearnedroutessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts [virtualnetworkgatewaysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetSample.ts [virtualnetworkgatewaysgetvpnprofilepackageurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts @@ -1284,7 +1340,9 @@ Take a look at our [API Documentation][apiref] for more information about the AP [virtualnetworkgatewaysresetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetSample.ts [virtualnetworkgatewaysresetvpnclientsharedkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts [virtualnetworkgatewayssetvpnclientipsecparameterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts +[virtualnetworkgatewaysstartexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts [virtualnetworkgatewaysstartpacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts +[virtualnetworkgatewaysstopexpressroutesitefailoversimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts [virtualnetworkgatewaysstoppacketcapturesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts [virtualnetworkgatewayssupportedvpndevicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts [virtualnetworkgatewaysupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts diff --git a/sdk/network/arm-network/samples/v33/typescript/sample.env b/sdk/network/arm-network/samples/v33/typescript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/network/arm-network/samples/v33/typescript/sample.env +++ b/sdk/network/arm-network/samples/v33/typescript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts index f88cfe54fc2c..a374c24f723e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an admin rule collection. * * @summary Creates or updates an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionPut.json */ async function createOrUpdateAnAdminRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsDeleteSample.ts index 88454fe88769..8cbacf505a89 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes an admin rule collection. * * @summary Deletes an admin rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json */ async function deletesAnAdminRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsGetSample.ts index f2374405414d..7de90fc0992d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager security admin configuration rule collection. * * @summary Gets a network manager security admin configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionGet.json */ async function getsSecurityAdminRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsListSample.ts index 3edce3db9bbc..03c9539a1ad8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/adminRuleCollectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the rule collections in a security admin configuration, in a paginated format. * * @summary Lists all the rule collections in a security admin configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionList.json */ async function listSecurityAdminRuleCollections() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/adminRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/adminRulesCreateOrUpdateSample.ts index b989eb4d2bd9..d077e3a6de64 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/adminRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/adminRulesCreateOrUpdateSample.ts @@ -8,11 +8,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - DefaultAdminRule, - AdminRule, - NetworkManagementClient, -} from "@azure/arm-network"; +import { AdminRule, NetworkManagementClient } from "@azure/arm-network"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -22,9 +18,9 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an admin rule. * * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json */ -async function createADefaultAdminRule() { +async function createAAdminRuleWithNetworkGroupAsSourceOrDestination() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -32,10 +28,24 @@ async function createADefaultAdminRule() { const networkManagerName = "testNetworkManager"; const configurationName = "myTestSecurityConfig"; const ruleCollectionName = "testRuleCollection"; - const ruleName = "SampleDefaultAdminRule"; - const adminRule: DefaultAdminRule = { - flag: "AllowVnetInbound", - kind: "Default", + const ruleName = "SampleAdminRule"; + const adminRule: AdminRule = { + description: "This is Sample Admin Rule", + access: "Deny", + destinationPortRanges: ["22"], + destinations: [ + { + addressPrefix: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", + addressPrefixType: "NetworkGroup", + }, + ], + direction: "Inbound", + kind: "Custom", + priority: 1, + sourcePortRanges: ["0-65535"], + sources: [{ addressPrefix: "Internet", addressPrefixType: "ServiceTag" }], + protocol: "Tcp", }; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential, subscriptionId); @@ -54,7 +64,7 @@ async function createADefaultAdminRule() { * This sample demonstrates how to Creates or updates an admin rule. * * @summary Creates or updates an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut.json */ async function createAnAdminRule() { const subscriptionId = @@ -91,7 +101,7 @@ async function createAnAdminRule() { } async function main() { - createADefaultAdminRule(); + createAAdminRuleWithNetworkGroupAsSourceOrDestination(); createAnAdminRule(); } diff --git a/sdk/network/arm-network/samples/v33/typescript/src/adminRulesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/adminRulesDeleteSample.ts index 0d59a57304dd..a28740b07a2e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/adminRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/adminRulesDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes an admin rule. * * @summary Deletes an admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleDelete.json */ async function deletesAnAdminRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/adminRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/adminRulesGetSample.ts index cccd696298e7..8a452898236f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/adminRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/adminRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager security configuration admin rule. * * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleGet.json */ async function getsSecurityAdminRule() { const subscriptionId = @@ -45,7 +45,7 @@ async function getsSecurityAdminRule() { * This sample demonstrates how to Gets a network manager security configuration admin rule. * * @summary Gets a network manager security configuration admin rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDefaultAdminRuleGet.json */ async function getsSecurityDefaultAdminRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/adminRulesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/adminRulesListSample.ts index 4afce7759e27..50b24b7b3db3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/adminRulesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/adminRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network manager security configuration admin rules. * * @summary List all network manager security configuration admin rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleList.json */ async function listSecurityAdminRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts index a62a3679ef34..b8c26b4dc50e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private endpoint connection on application gateway. * * @summary Deletes the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json */ async function deleteApplicationGatewayPrivateEndpointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts index f297fd014601..9dceb4adcd30 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private endpoint connection on application gateway. * * @summary Gets the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json */ async function getApplicationGatewayPrivateEndpointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts index 2dcd64afef9e..ff2f993a03db 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all private endpoint connections on an application gateway. * * @summary Lists all private endpoint connections on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json */ async function listsAllPrivateEndpointConnectionsOnApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts index 5dcc656981e5..6245487f3745 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateEndpointConnectionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the specified private endpoint connection on application gateway. * * @summary Updates the specified private endpoint connection on application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json */ async function updateApplicationGatewayPrivateEndpointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts index 05d9fbb510c6..6a53bf8a2b24 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayPrivateLinkResourcesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all private link resources on an application gateway. * * @summary Lists all private link resources on an application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json */ async function listsAllPrivateLinkResourcesOnApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts index ec6038132e90..b16b0ef815f6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayWafDynamicManifestsDefaultGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the regional application gateway waf manifest. * * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json */ async function getsWafDefaultManifest() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts index fe0b56bb5184..73f29fae1181 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewayWafDynamicManifestsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the regional application gateway waf manifest. * * @summary Gets the regional application gateway waf manifest. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifests.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifests.json */ async function getsWafManifests() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts index 6f7e224017b4..6d54e6385220 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysBackendHealthOnDemandSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. * * @summary Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthTest.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthTest.json */ async function testBackendHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysBackendHealthSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysBackendHealthSample.ts index 5cf5617b1915..4a480acd5219 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysBackendHealthSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysBackendHealthSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the backend health of the specified application gateway in a resource group. * * @summary Gets the backend health of the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthGet.json */ async function getBackendHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysCreateOrUpdateSample.ts index 22e5acda46c8..11abeb106128 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified application gateway. * * @summary Creates or updates the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayCreate.json */ async function createApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysDeleteSample.ts index 1ffd0c3c9f9f..852eaf3ab19b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified application gateway. * * @summary Deletes the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayDelete.json */ async function deleteApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysGetSample.ts index 7c58c6ca1b63..97d56869751e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified application gateway. * * @summary Gets the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayGet.json */ async function getApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts index ceffe93bd160..69825191c477 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysGetSslPredefinedPolicySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets Ssl predefined policy with the specified policy name. * * @summary Gets Ssl predefined policy with the specified policy name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json */ async function getAvailableSslPredefinedPolicyByName() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAllSample.ts index bd2ec139f7b7..bc1f1cdfda27 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the application gateways in a subscription. * * @summary Gets all the application gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayListAll.json */ async function listsAllApplicationGatewaysInASubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts index 8add1702fd68..96de22aec2a4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableRequestHeadersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all available request headers. * * @summary Lists all available request headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json */ async function getAvailableRequestHeaders() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts index 2185e9885fdc..497925ea1db2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableResponseHeadersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all available response headers. * * @summary Lists all available response headers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json */ async function getAvailableResponseHeaders() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts index 23dac863eb98..834f479dece1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableServerVariablesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all available server variables. * * @summary Lists all available server variables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json */ async function getAvailableServerVariables() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts index 9c1c260d0c20..729cdbe92c82 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableSslOptionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists available Ssl options for configuring Ssl policy. * * @summary Lists available Ssl options for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json */ async function getAvailableSslOptions() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts index ba53081524f9..356e9e77150c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableSslPredefinedPoliciesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all SSL predefined policies for configuring Ssl policy. * * @summary Lists all SSL predefined policies for configuring Ssl policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json */ async function getAvailableSslPredefinedPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts index 5583f575c262..4250801911a2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListAvailableWafRuleSetsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all available web application firewall rule sets. * * @summary Lists all available web application firewall rule sets. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json */ async function getAvailableWafRuleSets() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListSample.ts index c9314b1c5f77..4c7adf9f24e7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all application gateways in a resource group. * * @summary Lists all application gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayList.json */ async function listsAllApplicationGatewaysInAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysStartSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysStartSample.ts index ec3da2a7c375..82b4687b5906 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysStartSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysStartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Starts the specified application gateway. * * @summary Starts the specified application gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStart.json */ async function startApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysStopSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysStopSample.ts index 71aad04963dc..d74643ada109 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysStopSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Stops the specified application gateway in a resource group. * * @summary Stops the specified application gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStop.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStop.json */ async function stopApplicationGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysUpdateTagsSample.ts index d2f20dc92568..b806a29eb05f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates the specified application gateway tags. * * @summary Updates the specified application gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayUpdateTags.json */ async function updateApplicationGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts index 10f2adce189f..a91fcded23c9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an application security group. * * @summary Creates or updates an application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupCreate.json */ async function createApplicationSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsDeleteSample.ts index ec1249ac29e6..92b47f73936d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified application security group. * * @summary Deletes the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupDelete.json */ async function deleteApplicationSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsGetSample.ts index c31efe779a76..7699acd1b53f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified application security group. * * @summary Gets information about the specified application security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupGet.json */ async function getApplicationSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsListAllSample.ts index 9a047befdd0a..52ef72132b9d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all application security groups in a subscription. * * @summary Gets all application security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupListAll.json */ async function listAllApplicationSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsListSample.ts index 402a5d7e4d6e..05b6394de981 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the application security groups in a resource group. * * @summary Gets all the application security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupList.json */ async function listLoadBalancersInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts index e1a997b760aa..bde5f82d9a4d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/applicationSecurityGroupsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates an application security group's tags. * * @summary Updates an application security group's tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupUpdateTags.json */ async function updateApplicationSecurityGroupTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/availableDelegationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/availableDelegationsListSample.ts index 9b09eac6e368..328180d61b6c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/availableDelegationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/availableDelegationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all of the available subnet delegations for this subscription in this region. * * @summary Gets all of the available subnet delegations for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsSubscriptionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsSubscriptionGet.json */ async function getAvailableDelegations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/availableEndpointServicesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/availableEndpointServicesListSample.ts index 4e099c1c0ab1..85f7db7d235f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/availableEndpointServicesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/availableEndpointServicesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List what values of endpoint services are available for use. * * @summary List what values of endpoint services are available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EndpointServicesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EndpointServicesList.json */ async function endpointServicesList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts index 61fa90eec1e0..deea9dbb6f8e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/availablePrivateEndpointTypesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. * * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json */ async function getAvailablePrivateEndpointTypesInTheResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/availablePrivateEndpointTypesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/availablePrivateEndpointTypesListSample.ts index ca9ace55d9fd..a5b30ee398a4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/availablePrivateEndpointTypesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/availablePrivateEndpointTypesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. * * @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesGet.json */ async function getAvailablePrivateEndpointTypes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/availableResourceGroupDelegationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/availableResourceGroupDelegationsListSample.ts index cb8c1350328e..65fe67a30395 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/availableResourceGroupDelegationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/availableResourceGroupDelegationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all of the available subnet delegations for this resource group in this region. * * @summary Gets all of the available subnet delegations for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsResourceGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsResourceGroupGet.json */ async function getAvailableDelegationsInTheResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/availableServiceAliasesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/availableServiceAliasesListByResourceGroupSample.ts index 2c8a6158bab9..3deb4b25c7c2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/availableServiceAliasesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/availableServiceAliasesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all available service aliases for this resource group in this region. * * @summary Gets all available service aliases for this resource group in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesListByResourceGroup.json */ async function getAvailableServiceAliasesInTheResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/availableServiceAliasesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/availableServiceAliasesListSample.ts index d1bc3d55dd22..31b13c8cb50c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/availableServiceAliasesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/availableServiceAliasesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all available service aliases for this subscription in this region. * * @summary Gets all available service aliases for this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesList.json */ async function getAvailableServiceAliases() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallFqdnTagsListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallFqdnTagsListAllSample.ts index 1a29fc12381a..a6bf88d18106 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallFqdnTagsListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallFqdnTagsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Azure Firewall FQDN Tags in a subscription. * * @summary Gets all the Azure Firewall FQDN Tags in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json */ async function listAllAzureFirewallFqdnTagsForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsCreateOrUpdateSample.ts index 0be00cc5ed87..f84bf7e444f4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPut.json */ async function createAzureFirewall() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -133,7 +133,7 @@ async function createAzureFirewall() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithAdditionalProperties.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithAdditionalProperties.json */ async function createAzureFirewallWithAdditionalProperties() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -250,7 +250,7 @@ async function createAzureFirewallWithAdditionalProperties() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithIpGroups.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithIpGroups.json */ async function createAzureFirewallWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -365,7 +365,7 @@ async function createAzureFirewallWithIPGroups() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithZones.json */ async function createAzureFirewallWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -480,7 +480,7 @@ async function createAzureFirewallWithZones() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithMgmtSubnet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithMgmtSubnet.json */ async function createAzureFirewallWithManagementSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -604,7 +604,7 @@ async function createAzureFirewallWithManagementSubnet() { * This sample demonstrates how to Creates or updates the specified Azure Firewall. * * @summary Creates or updates the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutInHub.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutInHub.json */ async function createAzureFirewallInVirtualHub() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsDeleteSample.ts index 7caf7ff9407a..d52bf110a3c8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Azure Firewall. * * @summary Deletes the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallDelete.json */ async function deleteAzureFirewall() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsGetSample.ts index 1d6e47aba3d1..1884ac25bc3e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGet.json */ async function getAzureFirewall() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getAzureFirewall() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithAdditionalProperties.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithAdditionalProperties.json */ async function getAzureFirewallWithAdditionalProperties() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -56,7 +56,7 @@ async function getAzureFirewallWithAdditionalProperties() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithIpGroups.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithIpGroups.json */ async function getAzureFirewallWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -75,7 +75,7 @@ async function getAzureFirewallWithIPGroups() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithZones.json */ async function getAzureFirewallWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -94,7 +94,7 @@ async function getAzureFirewallWithZones() { * This sample demonstrates how to Gets the specified Azure Firewall. * * @summary Gets the specified Azure Firewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithMgmtSubnet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithMgmtSubnet.json */ async function getAzureFirewallWithManagementSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListAllSample.ts index 42a857d76759..0322245d89d3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Azure Firewalls in a subscription. * * @summary Gets all the Azure Firewalls in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListBySubscription.json */ async function listAllAzureFirewallsForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListLearnedPrefixesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListLearnedPrefixesSample.ts index 6262cdf2586a..9da63ea61a7f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListLearnedPrefixesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListLearnedPrefixesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. * * @summary Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListLearnedIPPrefixes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListLearnedIPPrefixes.json */ async function azureFirewallListLearnedPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListSample.ts index 7d64832f3684..e3fc9ec8a2f6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Azure Firewalls in a resource group. * * @summary Lists all Azure Firewalls in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListByResourceGroup.json */ async function listAllAzureFirewallsForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsPacketCaptureSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsPacketCaptureSample.ts index 6c79da502671..8df812ef7fb5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsPacketCaptureSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Runs a packet capture on AzureFirewall. * * @summary Runs a packet capture on AzureFirewall. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPacketCapture.json */ async function azureFirewallPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsUpdateTagsSample.ts index 1ec9f02385f3..c0fa88ce0abd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/azureFirewallsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of an Azure Firewall resource. * * @summary Updates tags of an Azure Firewall resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallUpdateTags.json */ async function updateAzureFirewallTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsCreateOrUpdateSample.ts index eb76235e5629..0ba3126e50bb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Bastion Host. * * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPut.json */ async function createBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -51,7 +51,38 @@ async function createBastionHost() { * This sample demonstrates how to Creates or updates the specified Bastion Host. * * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPutWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPutWithPrivateOnly.json + */ +async function createBastionHostWithPrivateOnly() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const bastionHostName = "bastionhosttenant"; + const parameters: BastionHost = { + enablePrivateOnlyBastion: true, + ipConfigurations: [ + { + name: "bastionHostIpConfiguration", + subnet: { + id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet", + }, + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.beginCreateOrUpdateAndWait( + resourceGroupName, + bastionHostName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates the specified Bastion Host. + * + * @summary Creates or updates the specified Bastion Host. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPutWithZones.json */ async function createBastionHostWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -84,7 +115,7 @@ async function createBastionHostWithZones() { * This sample demonstrates how to Creates or updates the specified Bastion Host. * * @summary Creates or updates the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperPut.json */ async function createDeveloperBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -109,6 +140,7 @@ async function createDeveloperBastionHost() { async function main() { createBastionHost(); + createBastionHostWithPrivateOnly(); createBastionHostWithZones(); createDeveloperBastionHost(); } diff --git a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsDeleteSample.ts index 383ecbba188f..3c2b873984d9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Bastion Host. * * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDelete.json */ async function deleteBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function deleteBastionHost() { * This sample demonstrates how to Deletes the specified Bastion Host. * * @summary Deletes the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperDelete.json */ async function deleteDeveloperBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsGetSample.ts index eeede730a949..f9caa26dbbed 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Bastion Host. * * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGet.json */ async function getBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,12 +37,31 @@ async function getBastionHost() { * This sample demonstrates how to Gets the specified Bastion Host. * * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGetWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithPrivateOnly.json + */ +async function getBastionHostWithPrivateOnly() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const bastionHostName = "bastionhosttenant"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.bastionHosts.get( + resourceGroupName, + bastionHostName, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Gets the specified Bastion Host. + * + * @summary Gets the specified Bastion Host. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithZones.json */ async function getBastionHostWithZones() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; - const bastionHostName = "bastionhosttenant'"; + const bastionHostName = "bastionhosttenant"; const credential = new DefaultAzureCredential(); const client = new NetworkManagementClient(credential, subscriptionId); const result = await client.bastionHosts.get( @@ -56,7 +75,7 @@ async function getBastionHostWithZones() { * This sample demonstrates how to Gets the specified Bastion Host. * * @summary Gets the specified Bastion Host. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperGet.json */ async function getDeveloperBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -73,6 +92,7 @@ async function getDeveloperBastionHost() { async function main() { getBastionHost(); + getBastionHostWithPrivateOnly(); getBastionHostWithZones(); getDeveloperBastionHost(); } diff --git a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsListByResourceGroupSample.ts index a149716fc4cf..13226e0217c6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Bastion Hosts in a resource group. * * @summary Lists all Bastion Hosts in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListByResourceGroup.json */ async function listAllBastionHostsForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsListSample.ts index 4b1ab00ebb4d..20303e5a98b8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Bastion Hosts in a subscription. * * @summary Lists all Bastion Hosts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListBySubscription.json */ async function listAllBastionHostsForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsUpdateTagsSample.ts index f754740aa2c5..333d1d6b74fb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/bastionHostsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates Tags for BastionHost resource * * @summary Updates Tags for BastionHost resource - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPatch.json */ async function patchBastionHost() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/bgpServiceCommunitiesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/bgpServiceCommunitiesListSample.ts index b6dc24c1efa8..f4d8db541383 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/bgpServiceCommunitiesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/bgpServiceCommunitiesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the available bgp service communities. * * @summary Gets all the available bgp service communities. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceCommunityList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceCommunityList.json */ async function serviceCommunityList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/checkDnsNameAvailabilitySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/checkDnsNameAvailabilitySample.ts index d71aa66809da..6cf25f7bca7d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/checkDnsNameAvailabilitySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/checkDnsNameAvailabilitySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether a domain name in the cloudapp.azure.com zone is available for use. * * @summary Checks whether a domain name in the cloudapp.azure.com zone is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckDnsNameAvailability.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckDnsNameAvailability.json */ async function checkDnsNameAvailability() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts index 4879d40a560f..8555ab6bb908 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. * * @summary Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupPut.json */ async function configurationPolicyGroupPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsDeleteSample.ts index 797405a8b12c..eaf6b0940003 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a ConfigurationPolicyGroup. * * @summary Deletes a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupDelete.json */ async function configurationPolicyGroupDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsGetSample.ts index bb3be373dd06..6a825df8cc4e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a ConfigurationPolicyGroup. * * @summary Retrieves the details of a ConfigurationPolicyGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupGet.json */ async function configurationPolicyGroupGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts index 6147ee994cb8..24178755395c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/configurationPolicyGroupsListByVpnServerConfigurationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. * * @summary Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json */ async function configurationPolicyGroupListByVpnServerConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsCreateOrUpdateSample.ts index 8889877c0333..53962aca52c5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a connection monitor. * * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreate.json */ async function createConnectionMonitorV1() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -67,7 +67,7 @@ async function createConnectionMonitorV1() { * This sample demonstrates how to Create or update a connection monitor. * * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorV2Create.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorV2Create.json */ async function createConnectionMonitorV2() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -127,7 +127,7 @@ async function createConnectionMonitorV2() { * This sample demonstrates how to Create or update a connection monitor. * * @summary Create or update a connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json */ async function createConnectionMonitorWithArcNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsDeleteSample.ts index 784525d703a1..69b248344ed1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified connection monitor. * * @summary Deletes the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorDelete.json */ async function deleteConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsGetSample.ts index 481c12676baf..6cb7d01a12ac 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a connection monitor by name. * * @summary Gets a connection monitor by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorGet.json */ async function getConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsListSample.ts index 6d1be277cddf..5eb773917b89 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all connection monitors for the specified Network Watcher. * * @summary Lists all connection monitors for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorList.json */ async function listConnectionMonitors() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsQuerySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsQuerySample.ts index dc8d8d17e177..e4799844640e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsQuerySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsQuerySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Query a snapshot of the most recent connection states. * * @summary Query a snapshot of the most recent connection states. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorQuery.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorQuery.json */ async function queryConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsStartSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsStartSample.ts index e1f4ea632da5..fbc335a2f525 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsStartSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsStartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Starts the specified connection monitor. * * @summary Starts the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStart.json */ async function startConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsStopSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsStopSample.ts index b4a5c832271d..f9726fc68c54 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsStopSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Stops the specified connection monitor. * * @summary Stops the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStop.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStop.json */ async function stopConnectionMonitor() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsUpdateTagsSample.ts index 01437013400f..06fb6c037ee9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectionMonitorsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update tags of the specified connection monitor. * * @summary Update tags of the specified connection monitor. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json */ async function updateConnectionMonitorTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts index 94dc29397741..6acd522fcae1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates/Updates a new network manager connectivity configuration * * @summary Creates/Updates a new network manager connectivity configuration - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationPut.json */ async function connectivityConfigurationsPut() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsDeleteSample.ts index 43ef02a6abfb..bde020271fea 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name * * @summary Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json */ async function connectivityConfigurationsDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsGetSample.ts index 55fa525fc9a2..e055c6061781 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name * * @summary Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationGet.json */ async function connectivityConfigurationsGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsListSample.ts index 280999c01e21..7f8fe2e4eb68 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/connectivityConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the network manager connectivity configuration in a specified network manager. * * @summary Lists all the network manager connectivity configuration in a specified network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationList.json */ async function connectivityConfigurationsList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesCreateOrUpdateSample.ts index 82019fadc9ae..dc4bfbb86b4d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a custom IP prefix. * * @summary Creates or updates a custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixCreateCustomizedValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixCreateCustomizedValues.json */ async function createCustomIPPrefixAllocationMethod() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesDeleteSample.ts index 9f2518af5e05..6ed2416e264c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified custom IP prefix. * * @summary Deletes the specified custom IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixDelete.json */ async function deleteCustomIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesGetSample.ts index a1f24c9ba15c..0340748b2f4b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified custom IP prefix in a specified resource group. * * @summary Gets the specified custom IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixGet.json */ async function getCustomIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesListAllSample.ts index 70265bbae2d3..baeeb5d92ff8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the custom IP prefixes in a subscription. * * @summary Gets all the custom IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixListAll.json */ async function listAllCustomIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesListSample.ts index 04163d308e97..624b48839da5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all custom IP prefixes in a resource group. * * @summary Gets all custom IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixList.json */ async function listResourceGroupCustomIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesUpdateTagsSample.ts index 6c7cf68a4aca..dbc29aef1bf9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/customIPPrefixesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates custom IP prefix tags. * * @summary Updates custom IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixUpdateTags.json */ async function updatePublicIPAddressTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts index fa2fceb9e0f4..082e58c097d9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a DDoS custom policy. * * @summary Creates or updates a DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyCreate.json */ async function createDDoSCustomPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesDeleteSample.ts index c3c70aadf1f8..e97a148927ca 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified DDoS custom policy. * * @summary Deletes the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyDelete.json */ async function deleteDDoSCustomPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesGetSample.ts index 56739365298f..7a09e6e07396 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified DDoS custom policy. * * @summary Gets information about the specified DDoS custom policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyGet.json */ async function getDDoSCustomPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts index 69929b112400..2d3bbcba6c20 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosCustomPoliciesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update a DDoS custom policy tags. * * @summary Update a DDoS custom policy tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyUpdateTags.json */ async function dDoSCustomPolicyUpdateTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts index 94b818055e19..5c6a4568889d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a DDoS protection plan. * * @summary Creates or updates a DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanCreate.json */ async function createDDoSProtectionPlan() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansDeleteSample.ts index 0880ac4438d3..d75226bd06ae 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified DDoS protection plan. * * @summary Deletes the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanDelete.json */ async function deleteDDoSProtectionPlan() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansGetSample.ts index fc71c2214760..aaf0940f31ee 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified DDoS protection plan. * * @summary Gets information about the specified DDoS protection plan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanGet.json */ async function getDDoSProtectionPlan() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts index bd617cad503b..fc7ec2aceada 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the DDoS protection plans in a resource group. * * @summary Gets all the DDoS protection plans in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanList.json */ async function listDDoSProtectionPlansInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansListSample.ts index 99c13da4d742..cc69f8a50e47 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all DDoS protection plans in a subscription. * * @summary Gets all DDoS protection plans in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanListAll.json */ async function listAllDDoSProtectionPlans() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansUpdateTagsSample.ts index 0479d49418ce..f9fcff26f7d0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ddosProtectionPlansUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update a DDoS protection plan tags. * * @summary Update a DDoS protection plan tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanUpdateTags.json */ async function dDoSProtectionPlanUpdateTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/defaultSecurityRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/defaultSecurityRulesGetSample.ts index cf11dc3376ee..864690735406 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/defaultSecurityRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/defaultSecurityRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified default network security rule. * * @summary Get the specified default network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleGet.json */ async function defaultSecurityRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/defaultSecurityRulesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/defaultSecurityRulesListSample.ts index c6f00eecf562..bd63f485eab6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/defaultSecurityRulesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/defaultSecurityRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all default security rules in a network security group. * * @summary Gets all default security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleList.json */ async function defaultSecurityRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/deleteBastionShareableLinkByTokenSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/deleteBastionShareableLinkByTokenSample.ts index 79772c795fee..8281b211065b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/deleteBastionShareableLinkByTokenSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/deleteBastionShareableLinkByTokenSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the Bastion Shareable Links for all the tokens specified in the request. * * @summary Deletes the Bastion Shareable Links for all the tokens specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDeleteByToken.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDeleteByToken.json */ async function deleteBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/deleteBastionShareableLinkSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/deleteBastionShareableLinkSample.ts index b416babca078..b7d13f632801 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/deleteBastionShareableLinkSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/deleteBastionShareableLinkSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the Bastion Shareable Links for all the VMs specified in the request. * * @summary Deletes the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDelete.json */ async function deleteBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/disconnectActiveSessionsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/disconnectActiveSessionsSample.ts index 91637fa8aa18..49f3f1c57a5a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/disconnectActiveSessionsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/disconnectActiveSessionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. * * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionDelete.json */ async function deletesTheSpecifiedActiveSession() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationCreateOrUpdateSample.ts index bb18fac6a5e7..edb1971fc9bf 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a DSCP Configuration. * * @summary Creates or updates a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationCreate.json */ async function createDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationDeleteSample.ts index 5e8098e68642..910523e48cc0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a DSCP Configuration. * * @summary Deletes a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationDelete.json */ async function deleteDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationGetSample.ts index dc5a75b72aeb..b7370ede7595 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a DSCP Configuration. * * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationGet.json */ async function getDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationListAllSample.ts index f68de31ffcd2..e46501ae309f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all dscp configurations in a subscription. * * @summary Gets all dscp configurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationListAll.json */ async function listAllNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationListSample.ts index d2e2d79f78b3..0aa265fe6492 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/dscpConfigurationListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a DSCP Configuration. * * @summary Gets a DSCP Configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationList.json */ async function getDscpConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts index d6ce67575272..89032f54a0f2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an authorization in the specified express route circuit. * * @summary Creates or updates an authorization in the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json */ async function createExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts index fc48f91a47bf..947110388925 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified authorization from the specified express route circuit. * * @summary Deletes the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json */ async function deleteExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts index 15ca1a676b69..46b4e9ab9d1a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified authorization from the specified express route circuit. * * @summary Gets the specified authorization from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationGet.json */ async function getExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsListSample.ts index 8706e59944d5..ff3aaacd5fef 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitAuthorizationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all authorizations in an express route circuit. * * @summary Gets all authorizations in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationList.json */ async function listExpressRouteCircuitAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts index 288c10a2dcb3..043768c8026a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a Express Route Circuit Connection in the specified express route circuits. * * @summary Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionCreate.json */ async function expressRouteCircuitConnectionCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts index b856fb23ac42..6ae1ba103c2c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Express Route Circuit Connection from the specified express route circuit. * * @summary Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionDelete.json */ async function deleteExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsGetSample.ts index f0badf631bad..f146d064ae55 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Express Route Circuit Connection from the specified express route circuit. * * @summary Gets the specified Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionGet.json */ async function expressRouteCircuitConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsListSample.ts index be0ef64a20d7..aed59b36b7f8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all global reach connections associated with a private peering in an express route circuit. * * @summary Gets all global reach connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionList.json */ async function listExpressRouteCircuitConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts index 1f47efdbf0d0..653e0b018b91 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a peering in the specified express route circuits. * * @summary Creates or updates a peering in the specified express route circuits. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringCreate.json */ async function createExpressRouteCircuitPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts index b4fcb74c5d48..28f7805c4651 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified peering from the specified express route circuit. * * @summary Deletes the specified peering from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringDelete.json */ async function deleteExpressRouteCircuitPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsGetSample.ts index c63b3ef3ba03..1c6e10e97f47 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified peering for the express route circuit. * * @summary Gets the specified peering for the express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringGet.json */ async function getExpressRouteCircuitPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsListSample.ts index 3a86371cc4b7..bb445b438dfe 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitPeeringsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all peerings in a specified express route circuit. * * @summary Gets all peerings in a specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringList.json */ async function listExpressRouteCircuitPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts index cf39933a9f42..2c19a906affe 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an express route circuit. * * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreate.json */ async function createExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -57,7 +57,7 @@ async function createExpressRouteCircuit() { * This sample demonstrates how to Creates or updates an express route circuit. * * @summary Creates or updates an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json */ async function createExpressRouteCircuitOnExpressRoutePort() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsDeleteSample.ts index 71f333ceb414..a35904634a1b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified express route circuit. * * @summary Deletes the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitDelete.json */ async function deleteExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts index 31560dfea294..67dfbaf064da 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetPeeringStatsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all stats from an express route circuit in a resource group. * * @summary Gets all stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringStats.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringStats.json */ async function getExpressRouteCircuitPeeringTrafficStats() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetSample.ts index d9d195cae9fa..d10cb69ab77f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified express route circuit. * * @summary Gets information about the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitGet.json */ async function getExpressRouteCircuit() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetStatsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetStatsSample.ts index b2824d25306b..88f57c434b09 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetStatsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsGetStatsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the stats from an express route circuit in a resource group. * * @summary Gets all the stats from an express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitStats.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitStats.json */ async function getExpressRouteCircuitTrafficStats() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListAllSample.ts index 21b72f1a27ed..42f6df128193 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the express route circuits in a subscription. * * @summary Gets all the express route circuits in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListBySubscription.json */ async function listExpressRouteCircuitsInASubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListArpTableSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListArpTableSample.ts index 87a064941547..6b7119881766 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListArpTableSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListArpTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route circuit in a resource group. * * @summary Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitARPTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitARPTableList.json */ async function listArpTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListRoutesTableSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListRoutesTableSample.ts index 36ecc75c9b31..2522a1c88eac 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListRoutesTableSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListRoutesTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised routes table associated with the express route circuit in a resource group. * * @summary Gets the currently advertised routes table associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableList.json */ async function listRouteTables() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts index 56aedb138fdf..c1c402eb5880 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListRoutesTableSummarySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised routes table summary associated with the express route circuit in a resource group. * * @summary Gets the currently advertised routes table summary associated with the express route circuit in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json */ async function listRouteTableSummary() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListSample.ts index b5cd8ff6b09f..8610def4b956 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the express route circuits in a resource group. * * @summary Gets all the express route circuits in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListByResourceGroup.json */ async function listExpressRouteCircuitsInAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsUpdateTagsSample.ts index 119d86669803..0f4e072b51b8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCircuitsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates an express route circuit tags. * * @summary Updates an express route circuit tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitUpdateTags.json */ async function updateExpressRouteCircuitTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts index 644a49471ba6..e37fef976ccb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. * * @summary Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionCreate.json */ async function expressRouteConnectionCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsDeleteSample.ts index 173f2cf2043d..ab70b58d85f8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a connection to a ExpressRoute circuit. * * @summary Deletes a connection to a ExpressRoute circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionDelete.json */ async function expressRouteConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsGetSample.ts index 1b134d09f79f..76ac1d85aa84 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified ExpressRouteConnection. * * @summary Gets the specified ExpressRouteConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionGet.json */ async function expressRouteConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsListSample.ts index 0d706ff01403..d6b8fa9b87e6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists ExpressRouteConnections. * * @summary Lists ExpressRouteConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionList.json */ async function expressRouteConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts index d69eb952873c..b6cba032d286 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a peering in the specified ExpressRouteCrossConnection. * * @summary Creates or updates a peering in the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json */ async function expressRouteCrossConnectionBgpPeeringCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts index 024ff34c320c..a1d54eb51d0f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified peering from the ExpressRouteCrossConnection. * * @summary Deletes the specified peering from the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json */ async function deleteExpressRouteCrossConnectionBgpPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts index b466c46dadb3..19558324ad58 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified peering for the ExpressRouteCrossConnection. * * @summary Gets the specified peering for the ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json */ async function getExpressRouteCrossConnectionBgpPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts index c652d822a6c8..2c68bce0f2b3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionPeeringsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all peerings in a specified ExpressRouteCrossConnection. * * @summary Gets all peerings in a specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json */ async function expressRouteCrossConnectionBgpPeeringList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts index b7cf6acee4db..6f2003bb483b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the specified ExpressRouteCrossConnection. * * @summary Update the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdate.json */ async function updateExpressRouteCrossConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsGetSample.ts index 5bf5edf43faf..e4300c3ed800 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets details about the specified ExpressRouteCrossConnection. * * @summary Gets details about the specified ExpressRouteCrossConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionGet.json */ async function getExpressRouteCrossConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts index 0a872b4a4090..072f8a8e254c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListArpTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised ARP table associated with the express route cross connection in a resource group. * * @summary Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsArpTable.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsArpTable.json */ async function getExpressRouteCrossConnectionsArpTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts index 98d33ffed9f7..1a7c531604e4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a resource group. * * @summary Retrieves all the ExpressRouteCrossConnections in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json */ async function expressRouteCrossConnectionListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts index 7aeb77b79878..dd24cb361307 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListRoutesTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the currently advertised routes table associated with the express route cross connection in a resource group. * * @summary Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json */ async function getExpressRouteCrossConnectionsRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts index 910d816505ff..d203ef2e6463 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListRoutesTableSummarySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the route table summary associated with the express route cross connection in a resource group. * * @summary Gets the route table summary associated with the express route cross connection in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json */ async function getExpressRouteCrossConnectionsRouteTableSummary() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListSample.ts index 88a2efc04f7a..bd63b5972df1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all the ExpressRouteCrossConnections in a subscription. * * @summary Retrieves all the ExpressRouteCrossConnections in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionList.json */ async function expressRouteCrossConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts index b6efdfa84cd3..8768b72e6b9d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteCrossConnectionsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates an express route cross connection tags. * * @summary Updates an express route cross connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json */ async function updateExpressRouteCrossConnectionTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts index a0924f35fb1b..00a70317e93f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a ExpressRoute gateway in a specified resource group. * * @summary Creates or updates a ExpressRoute gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayCreate.json */ async function expressRouteGatewayCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysDeleteSample.ts index 75e2c8c19546..943a8bb76359 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. * * @summary Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayDelete.json */ async function expressRouteGatewayDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysGetSample.ts index ee4f8bf78d67..55bc251f50a5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Fetches the details of a ExpressRoute gateway in a resource group. * * @summary Fetches the details of a ExpressRoute gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayGet.json */ async function expressRouteGatewayGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts index d6df4ac6d0ab..7bf8323dc4ce 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists ExpressRoute gateways in a given resource group. * * @summary Lists ExpressRoute gateways in a given resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListByResourceGroup.json */ async function expressRouteGatewayListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts index fcf7de384c08..6bc07e4acdbf 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists ExpressRoute gateways under a given subscription. * * @summary Lists ExpressRoute gateways under a given subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListBySubscription.json */ async function expressRouteGatewayListBySubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysUpdateTagsSample.ts index dad6bd3f9919..dff1328ec62b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates express route gateway tags. * * @summary Updates express route gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayUpdateTags.json */ async function expressRouteGatewayUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteLinksGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteLinksGetSample.ts index f8b3157e5ad8..ceefd3c5cf10 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteLinksGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteLinksGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the specified ExpressRouteLink resource. * * @summary Retrieves the specified ExpressRouteLink resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkGet.json */ async function expressRouteLinkGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteLinksListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteLinksListSample.ts index fc167e4e8a2a..7e7532dc2eb5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteLinksListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteLinksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. * * @summary Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkList.json */ async function expressRouteLinkGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts index c2f8028f8f49..2cf5963ef365 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an authorization in the specified express route port. * * @summary Creates or updates an authorization in the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationCreate.json */ async function createExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts index 5599c4c5e5a7..8b1919bdbe26 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified authorization from the specified express route port. * * @summary Deletes the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationDelete.json */ async function deleteExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsGetSample.ts index 34f2793e4887..072e8e477931 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified authorization from the specified express route port. * * @summary Gets the specified authorization from the specified express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationGet.json */ async function getExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsListSample.ts index 5c22d87c371d..0fde604d6e9d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortAuthorizationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all authorizations in an express route port. * * @summary Gets all authorizations in an express route port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationList.json */ async function listExpressRoutePortAuthorization() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsCreateOrUpdateSample.ts index a16ee1378286..7a951dbc66e9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. * * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortCreate.json */ async function expressRoutePortCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -45,7 +45,7 @@ async function expressRoutePortCreate() { * This sample demonstrates how to Creates or updates the specified ExpressRoutePort resource. * * @summary Creates or updates the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateLink.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateLink.json */ async function expressRoutePortUpdateLink() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsDeleteSample.ts index ec7efe203ba5..2d1df31314f3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified ExpressRoutePort resource. * * @summary Deletes the specified ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortDelete.json */ async function expressRoutePortDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsGenerateLoaSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsGenerateLoaSample.ts index e505088adea9..91791d64548a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsGenerateLoaSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsGenerateLoaSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generate a letter of authorization for the requested ExpressRoutePort resource. * * @summary Generate a letter of authorization for the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateExpressRoutePortsLOA.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateExpressRoutePortsLOA.json */ async function generateExpressRoutePortLoa() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsGetSample.ts index abe451d19091..1ff259df3772 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the requested ExpressRoutePort resource. * * @summary Retrieves the requested ExpressRoutePort resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortGet.json */ async function expressRoutePortGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsListByResourceGroupSample.ts index 909b78a1c40c..ba46e3b05d34 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all the ExpressRoutePort resources in the specified resource group. * * @summary List all the ExpressRoutePort resources in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortListByResourceGroup.json */ async function expressRoutePortListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsListSample.ts index 3afad4b1ea77..f9505a77f68f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all the ExpressRoutePort resources in the specified subscription. * * @summary List all the ExpressRoutePort resources in the specified subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortList.json */ async function expressRoutePortList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsLocationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsLocationsGetSample.ts index 42d12f42cd82..e8a4d0519ac2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsLocationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsLocationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. * * @summary Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationGet.json */ async function expressRoutePortsLocationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsLocationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsLocationsListSample.ts index d3bde93d2de9..8d5d66142e21 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsLocationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsLocationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. * * @summary Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. Available bandwidths can only be obtained when retrieving a specific peering location. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationList.json */ async function expressRoutePortsLocationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsUpdateTagsSample.ts index bf2b89541fd3..d30baac0c803 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRoutePortsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update ExpressRoutePort tags. * * @summary Update ExpressRoutePort tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateTags.json */ async function expressRoutePortUpdateTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteProviderPortSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteProviderPortSample.ts index 1fff89087ac7..70d0b83cde90 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteProviderPortSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteProviderPortSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves detail of a provider port. * * @summary Retrieves detail of a provider port. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPort.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPort.json */ async function expressRouteProviderPort() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteProviderPortsLocationListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteProviderPortsLocationListSample.ts index ac77e28b9fda..eac5211910fe 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteProviderPortsLocationListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteProviderPortsLocationListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all the ExpressRouteProviderPorts in a subscription. * * @summary Retrieves all the ExpressRouteProviderPorts in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPortList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPortList.json */ async function expressRouteProviderPortList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteServiceProvidersListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteServiceProvidersListSample.ts index 0434c77ff5c6..6507988c5aa3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/expressRouteServiceProvidersListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/expressRouteServiceProvidersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the available express route service providers. * * @summary Gets all the available express route service providers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteProviderList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteProviderList.json */ async function listExpressRouteProviders() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesCreateOrUpdateSample.ts index 7c6e31e64bfd..b07fc2df757e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Firewall Policy. * * @summary Creates or updates the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPut.json */ async function createFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesDeleteSample.ts index 7055ceb0693b..3620fc28ab39 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Firewall Policy. * * @summary Deletes the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDelete.json */ async function deleteFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesGetSample.ts index 3d6ceae0f5a8..824829ade3f9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Firewall Policy. * * @summary Gets the specified Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyGet.json */ async function getFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesListAllSample.ts index 8d039e1f0ad1..536f777d27e7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Firewall Policies in a subscription. * * @summary Gets all the Firewall Policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListBySubscription.json */ async function listAllFirewallPoliciesForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesListSample.ts index f606e15df8c3..6d34ee3512e3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Firewall Policies in a resource group. * * @summary Lists all Firewall Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListByResourceGroup.json */ async function listAllFirewallPoliciesForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesUpdateTagsSample.ts index b9126c324f4a..11e5a9e47e35 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPoliciesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of a Azure Firewall Policy resource. * * @summary Updates tags of a Azure Firewall Policy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPatch.json */ async function updateFirewallPolicyTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDeploymentsDeploySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDeploymentsDeploySample.ts index f84ba3467117..b115e7dfe1b6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDeploymentsDeploySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDeploymentsDeploySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deploys the firewall policy draft and child rule collection group drafts. * * @summary Deploys the firewall policy draft and child rule collection group drafts. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDeploy.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDeploy.json */ async function deployFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts index de93f231616b..ec2b79bb755f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a draft Firewall Policy. * * @summary Create or update a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftPut.json */ async function createOrUpdateFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsDeleteSample.ts index 542f58c06382..3d5819b85ccd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a draft policy. * * @summary Delete a draft policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDelete.json */ async function deleteFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsGetSample.ts index f245af84cbc2..0f55f44cfe08 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyDraftsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a draft Firewall Policy. * * @summary Get a draft Firewall Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftGet.json */ async function getFirewallPolicyDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts index 5a2ca1dcae8c..dcb4f170cd94 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesFilterValuesListSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the current filter values for the signatures overrides * * @summary Retrieves the current filter values for the signatures overrides - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json */ async function querySignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesListSample.ts index 2ebb69707ed6..fdd4c723c179 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. * * @summary Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is 1000. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverrides.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverrides.json */ async function querySignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts index 33affc870274..1fc1bb2eafce 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all signatures overrides for a specific policy. * * @summary Returns all signatures overrides for a specific policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesGet.json */ async function getSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts index 135af0c7a5d6..c8dc1deeff25 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all signatures overrides objects for a specific policy as a list containing a single value. * * @summary Returns all signatures overrides objects for a specific policy as a list containing a single value. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesList.json */ async function getSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts index 7826ba05410e..3d9f52706734 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesPatchSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Will update the status of policy's signature overrides for IDPS * * @summary Will update the status of policy's signature overrides for IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPatch.json */ async function patchSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts index 8c5d38374779..5cf4e4a6990c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyIdpsSignaturesOverridesPutSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Will override/create a new signature overrides for the policy's IDPS * * @summary Will override/create a new signature overrides for the policy's IDPS - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPut.json */ async function putSignatureOverrides() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts index b56003b494bc..a21ea043731a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or Update Rule Collection Group Draft. * * @summary Create or Update Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json */ async function createOrUpdateRuleCollectionGroupDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts index 905a9a386a12..a995ad63fbf8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete Rule Collection Group Draft. * * @summary Delete Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json */ async function deleteFirewallRuleCollectionGroupDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts index 26bc8dc83389..c8d6340f5756 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupDraftsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get Rule Collection Group Draft. * * @summary Get Rule Collection Group Draft. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json */ async function getRuleCollectionGroupDraft() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts index 8603c5853430..13f08f374c71 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json */ async function createFirewallPolicyNatRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -68,7 +68,7 @@ async function createFirewallPolicyNatRuleCollectionGroup() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupPut.json */ async function createFirewallPolicyRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -112,7 +112,7 @@ async function createFirewallPolicyRuleCollectionGroup() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json */ async function createFirewallPolicyRuleCollectionGroupWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -159,7 +159,7 @@ async function createFirewallPolicyRuleCollectionGroupWithIPGroups() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json */ async function createFirewallPolicyRuleCollectionGroupWithWebCategories() { const subscriptionId = @@ -204,7 +204,7 @@ async function createFirewallPolicyRuleCollectionGroupWithWebCategories() { * This sample demonstrates how to Creates or updates the specified FirewallPolicyRuleCollectionGroup. * * @summary Creates or updates the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json */ async function createFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts index 72d35bcf5a7c..0941d6366d36 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified FirewallPolicyRuleCollectionGroup. * * @summary Deletes the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json */ async function deleteFirewallPolicyRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts index 78df7c9ea295..989bb1a53503 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json */ async function getFirewallPolicyNatRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +39,7 @@ async function getFirewallPolicyNatRuleCollectionGroup() { * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupGet.json */ async function getFirewallPolicyRuleCollectionGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -60,7 +60,7 @@ async function getFirewallPolicyRuleCollectionGroup() { * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json */ async function getFirewallPolicyRuleCollectionGroupWithIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -81,7 +81,7 @@ async function getFirewallPolicyRuleCollectionGroupWithIPGroups() { * This sample demonstrates how to Gets the specified FirewallPolicyRuleCollectionGroup. * * @summary Gets the specified FirewallPolicyRuleCollectionGroup. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json */ async function getFirewallPolicyRuleCollectionGroupWithWebCategories() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts index ec05750a9538..dea5fc9dcd68 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/firewallPolicyRuleCollectionGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json */ async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories() { const subscriptionId = @@ -42,7 +42,7 @@ async function listAllFirewallPolicyRuleCollectionGroupWithWebCategories() { * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupList.json */ async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -64,7 +64,7 @@ async function listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy( * This sample demonstrates how to Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. * * @summary Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json */ async function listAllFirewallPolicyRuleCollectionGroupsWithIPGroupsForAGivenFirewallPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsCreateOrUpdateSample.ts index ebf3e2a5f285..6ce10a7f0001 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a flow log for the specified network security group. * * @summary Create or update a flow log for the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogCreate.json */ async function createOrUpdateFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsDeleteSample.ts index 79f765785d23..b53704cf0d3a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified flow log resource. * * @summary Deletes the specified flow log resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogDelete.json */ async function deleteFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsGetSample.ts index 2c7c6f712244..69f99b42a625 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a flow log resource by name. * * @summary Gets a flow log resource by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogGet.json */ async function getFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsListSample.ts index 0837668e6728..4cb0b22a14ca 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all flow log resources for the specified Network Watcher. * * @summary Lists all flow log resources for the specified Network Watcher. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogList.json */ async function listConnectionMonitors() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsUpdateTagsSample.ts index ded6f62b0f1a..5d40268dc404 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/flowLogsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/flowLogsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Update tags of the specified flow log. * * @summary Update tags of the specified flow log. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogUpdateTags.json */ async function updateFlowLogTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts index 0216a5dd1c53..aab4609bf372 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/generatevirtualwanvpnserverconfigurationvpnprofileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. * * @summary Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json */ async function generateVirtualWanVpnServerConfigurationVpnProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/getActiveSessionsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/getActiveSessionsSample.ts index 4a5b6659db15..1c6ddd0f494e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/getActiveSessionsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/getActiveSessionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns the list of currently active sessions on the Bastion. * * @summary Returns the list of currently active sessions on the Bastion. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionsList.json */ async function returnsAListOfCurrentlyActiveSessionsOnTheBastion() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/getBastionShareableLinkSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/getBastionShareableLinkSample.ts index ba17721efc21..364eac8ebd86 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/getBastionShareableLinkSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/getBastionShareableLinkSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Return the Bastion Shareable Links for all the VMs specified in the request. * * @summary Return the Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkGet.json */ async function returnsTheBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesCreateOrUpdateSample.ts index b223777cef41..66c9154eeec8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. * * @summary Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTablePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTablePut.json */ async function routeTablePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesDeleteSample.ts index 63edb94588a2..299fa9858d82 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a RouteTable. * * @summary Deletes a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableDelete.json */ async function routeTableDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesGetSample.ts index 8c1933247a2e..54ce83f4273a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a RouteTable. * * @summary Retrieves the details of a RouteTable. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableGet.json */ async function routeTableGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesListSample.ts index 0063d02954b6..691b9ae54d70 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/hubRouteTablesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all RouteTables. * * @summary Retrieves the details of all RouteTables. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableList.json */ async function routeTableList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts index 18d4f5ce8ed9..c8ad2469d6a1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a hub virtual network connection if it doesn't exist else updates the existing one. * * @summary Creates a hub virtual network connection if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionPut.json */ async function hubVirtualNetworkConnectionPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts index 52a6603d3915..19a5be04dc94 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a HubVirtualNetworkConnection. * * @summary Deletes a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionDelete.json */ async function hubVirtualNetworkConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsGetSample.ts index 8bbc7e4b75d2..fc7d11b757c5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a HubVirtualNetworkConnection. * * @summary Retrieves the details of a HubVirtualNetworkConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionGet.json */ async function hubVirtualNetworkConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsListSample.ts index 828ffc71a621..96d5c272ab9a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/hubVirtualNetworkConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all HubVirtualNetworkConnections. * * @summary Retrieves the details of all HubVirtualNetworkConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionList.json */ async function hubVirtualNetworkConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesCreateOrUpdateSample.ts index 0e3168503e73..6d8b53cd9f79 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a load balancer inbound NAT rule. * * @summary Creates or updates a load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleCreate.json */ async function inboundNatRuleCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesDeleteSample.ts index dcc7260f53e6..b0637287e183 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified load balancer inbound NAT rule. * * @summary Deletes the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleDelete.json */ async function inboundNatRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesGetSample.ts index cb8bce982db6..a520875a3526 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified load balancer inbound NAT rule. * * @summary Gets the specified load balancer inbound NAT rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleGet.json */ async function inboundNatRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesListSample.ts index da24a34e8ba6..8b7898189121 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/inboundNatRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the inbound NAT rules in a load balancer. * * @summary Gets all the inbound NAT rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleList.json */ async function inboundNatRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts index 51665e1b6eef..0470b45ce998 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/inboundSecurityRuleCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Inbound Security Rules. * * @summary Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRulePut.json */ async function createNetworkVirtualApplianceInboundSecurityRules() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/inboundSecurityRuleGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/inboundSecurityRuleGetSample.ts index 2112de2bd469..eb1cfce02039 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/inboundSecurityRuleGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/inboundSecurityRuleGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. * * @summary Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRuleGet.json */ async function createNetworkVirtualApplianceInboundSecurityRules() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsCreateOrUpdateSample.ts index 2f09479f5297..ff1d351c3b60 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an IpAllocation in the specified resource group. * * @summary Creates or updates an IpAllocation in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationCreate.json */ async function createIPAllocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsDeleteSample.ts index ca42f847c87a..a57283e53307 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified IpAllocation. * * @summary Deletes the specified IpAllocation. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationDelete.json */ async function deleteIPAllocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsGetSample.ts index 30a5df7f4f40..b9bbd2c7c8b5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified IpAllocation by resource group. * * @summary Gets the specified IpAllocation by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationGet.json */ async function getIPAllocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsListByResourceGroupSample.ts index 855a73ab4dd3..13b73944f56e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all IpAllocations in a resource group. * * @summary Gets all IpAllocations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationListByResourceGroup.json */ async function listIPAllocationsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsListSample.ts index 37baf39ee205..9a06887a9f87 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all IpAllocations in a subscription. * * @summary Gets all IpAllocations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationList.json */ async function listAllIPAllocations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsUpdateTagsSample.ts index 9df7cd918b4f..1711a46348a5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipAllocationsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a IpAllocation tags. * * @summary Updates a IpAllocation tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationUpdateTags.json */ async function updateVirtualNetworkTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsCreateOrUpdateSample.ts index 5c87e4df24bd..bfb645b372dd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an ipGroups in a specified resource group. * * @summary Creates or updates an ipGroups in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsCreate.json */ async function createOrUpdateIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsDeleteSample.ts index 825cca6f5ec6..6781246f22f3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified ipGroups. * * @summary Deletes the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsDelete.json */ async function deleteIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsGetSample.ts index ef606fd3c0c2..bf5fc0f6807c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified ipGroups. * * @summary Gets the specified ipGroups. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsGet.json */ async function getIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListByResourceGroupSample.ts index f128dec70802..6d703081ca41 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all IpGroups in a resource group. * * @summary Gets all IpGroups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListByResourceGroup.json */ async function listByResourceGroupIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListSample.ts index fb27612dbe5c..3116ddc8acdd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all IpGroups in a subscription. * * @summary Gets all IpGroups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListBySubscription.json */ async function listIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsUpdateGroupsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsUpdateGroupsSample.ts index 03e957e99a88..534e529cac73 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsUpdateGroupsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipGroupsUpdateGroupsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of an IpGroups resource. * * @summary Updates tags of an IpGroups resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsUpdateTags.json */ async function updateIPGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsCreateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsCreateSample.ts new file mode 100644 index 000000000000..24ee895d58d4 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsCreateSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { IpamPool, NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates/Updates the Pool resource. + * + * @summary Creates/Updates the Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Create.json + */ +async function ipamPoolsCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const body: IpamPool = { + location: "eastus", + properties: { + description: "Test description.", + addressPrefixes: ["10.0.0.0/24"], + parentPoolName: "", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.beginCreateAndWait( + resourceGroupName, + networkManagerName, + poolName, + body, + ); + console.log(result); +} + +async function main() { + ipamPoolsCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsDeleteSample.ts new file mode 100644 index 000000000000..889cea13ffa7 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsDeleteSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete the Pool resource. + * + * @summary Delete the Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Delete.json + */ +async function ipamPoolsDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetPoolUsageSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetPoolUsageSample.ts new file mode 100644 index 000000000000..4250a6554c35 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetPoolUsageSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the Pool Usage. + * + * @summary Get the Pool Usage. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_GetPoolUsage.json + */ +async function ipamPoolsGetPoolUsage() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.getPoolUsage( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsGetPoolUsage(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetSample.ts new file mode 100644 index 000000000000..9e4d4426c7e4 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsGetSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specific Pool resource. + * + * @summary Gets the specific Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Get.json + */ +async function ipamPoolsGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.get( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListAssociatedResourcesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListAssociatedResourcesSample.ts new file mode 100644 index 000000000000..697fe07772e9 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListAssociatedResourcesSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List Associated Resource in the Pool. + * + * @summary List Associated Resource in the Pool. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_ListAssociatedResources.json + */ +async function ipamPoolsListAssociatedResources() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipamPools.listAssociatedResources( + resourceGroupName, + networkManagerName, + poolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipamPoolsListAssociatedResources(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListSample.ts new file mode 100644 index 000000000000..34ffb8941266 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsListSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Pool resources at Network Manager level. + * + * @summary Gets list of Pool resources at Network Manager level. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_List.json + */ +async function ipamPoolsList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipamPools.list( + resourceGroupName, + networkManagerName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipamPoolsList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsUpdateSample.ts new file mode 100644 index 000000000000..6c29f18c429c --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/ipamPoolsUpdateSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates the specific Pool resource. + * + * @summary Updates the specific Pool resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Update.json + */ +async function ipamPoolsUpdate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.ipamPools.update( + resourceGroupName, + networkManagerName, + poolName, + ); + console.log(result); +} + +async function main() { + ipamPoolsUpdate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/listActiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/listActiveConnectivityConfigurationsSample.ts index 9fe3ae33cb5d..d8e855301117 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/listActiveConnectivityConfigurationsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/listActiveConnectivityConfigurationsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Lists active connectivity configurations in a network manager. * * @summary Lists active connectivity configurations in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json */ async function listActiveConnectivityConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/listActiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/listActiveSecurityAdminRulesSample.ts index b8908d116118..c618d5005a14 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/listActiveSecurityAdminRulesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/listActiveSecurityAdminRulesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Lists active security admin rules in a network manager. * * @summary Lists active security admin rules in a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json */ async function listActiveSecurityAdminRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts index cef37e52f357..5425d8e9acf5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/listNetworkManagerEffectiveConnectivityConfigurationsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to List all effective connectivity configurations applied on a virtual network. * * @summary List all effective connectivity configurations applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json */ async function listEffectiveConnectivityConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts index fc79a94d3da6..dc1f1df5b594 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/listNetworkManagerEffectiveSecurityAdminRulesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to List all effective security admin rules applied on a virtual network. * * @summary List all effective security admin rules applied on a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json */ async function listEffectiveSecurityAdminRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts index 4734be44cff0..111f631f0465 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a load balancer backend address pool. * * @summary Creates or updates a load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json */ async function updateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts index e25b178be0f6..d7a619e32d44 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified load balancer backend address pool. * * @summary Deletes the specified load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolDelete.json */ async function backendAddressPoolDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts index fdef5315ca01..98b621ee2c3e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets load balancer backend address pool. * * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json */ async function loadBalancerWithBackendAddressPoolWithBackendAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +39,7 @@ async function loadBalancerWithBackendAddressPoolWithBackendAddresses() { * This sample demonstrates how to Gets load balancer backend address pool. * * @summary Gets load balancer backend address pool. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolGet.json */ async function loadBalancerBackendAddressPoolGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsListSample.ts index 9e98ee2f85cd..36d2f53a2c95 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerBackendAddressPoolsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancer backed address pools. * * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json */ async function loadBalancerWithBackendAddressPoolContainingBackendAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -40,7 +40,7 @@ async function loadBalancerWithBackendAddressPoolContainingBackendAddresses() { * This sample demonstrates how to Gets all the load balancer backed address pools. * * @summary Gets all the load balancer backed address pools. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolList.json */ async function loadBalancerBackendAddressPoolList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts index 2d705e04b723..75706a0a240d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets load balancer frontend IP configuration. * * @summary Gets load balancer frontend IP configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json */ async function loadBalancerFrontendIPConfigurationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts index bc421ac9f939..ffd068792129 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerFrontendIPConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancer frontend IP configurations. * * @summary Gets all the load balancer frontend IP configurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationList.json */ async function loadBalancerFrontendIPConfigurationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts index 249b508193bd..dd85ac211e6f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified load balancer load balancing rule. * * @summary Gets the specified load balancer load balancing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleGet.json */ async function loadBalancerLoadBalancingRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts new file mode 100644 index 000000000000..6a4a315d9676 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesHealthSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get health details of a load balancing rule. + * + * @summary Get health details of a load balancing rule. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerHealth.json + */ +async function queryLoadBalancingRuleHealth() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const groupName = "rg1"; + const loadBalancerName = "lb1"; + const loadBalancingRuleName = "rulelb"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.loadBalancerLoadBalancingRules.beginHealthAndWait( + groupName, + loadBalancerName, + loadBalancingRuleName, + ); + console.log(result); +} + +async function main() { + queryLoadBalancingRuleHealth(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesListSample.ts index 8b464789e6b6..baf950ad3dcb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerLoadBalancingRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancing rules in a load balancer. * * @summary Gets all the load balancing rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleList.json */ async function loadBalancerLoadBalancingRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerNetworkInterfacesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerNetworkInterfacesListSample.ts index 0452b3a0d56f..e49ad033a365 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerNetworkInterfacesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerNetworkInterfacesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets associated load balancer network interfaces. * * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json */ async function loadBalancerNetworkInterfaceListSimple() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -40,7 +40,7 @@ async function loadBalancerNetworkInterfaceListSimple() { * This sample demonstrates how to Gets associated load balancer network interfaces. * * @summary Gets associated load balancer network interfaces. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListVmss.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListVmss.json */ async function loadBalancerNetworkInterfaceListVmss() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerOutboundRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerOutboundRulesGetSample.ts index 2dce9e8652d9..db17e974a412 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerOutboundRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerOutboundRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified load balancer outbound rule. * * @summary Gets the specified load balancer outbound rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleGet.json */ async function loadBalancerOutboundRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerOutboundRulesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerOutboundRulesListSample.ts index 8c195d998523..a5127e5712a9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerOutboundRulesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerOutboundRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the outbound rules in a load balancer. * * @summary Gets all the outbound rules in a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleList.json */ async function loadBalancerOutboundRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerProbesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerProbesGetSample.ts index 54d26ecfbcb8..f67cb948a28a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerProbesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerProbesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets load balancer probe. * * @summary Gets load balancer probe. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeGet.json */ async function loadBalancerProbeGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerProbesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerProbesListSample.ts index b256be3b973b..cbfbb3070419 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerProbesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancerProbesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancer probes. * * @summary Gets all the load balancer probes. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeList.json */ async function loadBalancerProbeList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersCreateOrUpdateSample.ts index 57be72d63d39..b875621b9ab4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreate.json */ async function createLoadBalancer() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -97,7 +97,7 @@ async function createLoadBalancer() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithZones.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithZones.json */ async function createLoadBalancerWithFrontendIPInZone1() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -177,7 +177,7 @@ async function createLoadBalancerWithFrontendIPInZone1() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json */ async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -259,7 +259,7 @@ async function createLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json */ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -335,7 +335,7 @@ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOn * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json */ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -407,7 +407,7 @@ async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTw * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGlobalTier.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGlobalTier.json */ async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -483,7 +483,7 @@ async function createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBa * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateStandardSku.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateStandardSku.json */ async function createLoadBalancerWithStandardSku() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -562,7 +562,7 @@ async function createLoadBalancerWithStandardSku() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json */ async function createLoadBalancerWithSyncModePropertyOnPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -649,7 +649,7 @@ async function createLoadBalancerWithSyncModePropertyOnPool() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithInboundNatPool.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithInboundNatPool.json */ async function createLoadBalancerWithInboundNatPool() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -705,7 +705,7 @@ async function createLoadBalancerWithInboundNatPool() { * This sample demonstrates how to Creates or updates a load balancer. * * @summary Creates or updates a load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithOutboundRules.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithOutboundRules.json */ async function createLoadBalancerWithOutboundRules() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersDeleteSample.ts index f6f66771685d..c1412d9e3a5b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified load balancer. * * @summary Deletes the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerDelete.json */ async function deleteLoadBalancer() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersGetSample.ts index 9a2bc5ca79cc..8d4e664d1b39 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified load balancer. * * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGet.json */ async function getLoadBalancer() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getLoadBalancer() { * This sample demonstrates how to Gets the specified load balancer. * * @summary Gets the specified load balancer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGetInboundNatRulePortMapping.json */ async function getLoadBalancerWithInboundNatRulePortMapping() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListAllSample.ts index ae05a6e857bd..9673aaa868f7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancers in a subscription. * * @summary Gets all the load balancers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerListAll.json */ async function listAllLoadBalancers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts index e4072fe45ca9..ce3cd1033f21 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListInboundNatRulePortMappingsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to List of inbound NAT rule port mappings. * * @summary List of inbound NAT rule port mappings. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/QueryInboundNatRulePortMapping.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/QueryInboundNatRulePortMapping.json */ async function queryInboundNatRulePortMapping() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListSample.ts index 6b6cefbc6914..0009ce99e674 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the load balancers in a resource group. * * @summary Gets all the load balancers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerList.json */ async function listLoadBalancersInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersMigrateToIPBasedSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersMigrateToIPBasedSample.ts index a60e593b52da..f742840d80ad 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersMigrateToIPBasedSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersMigrateToIPBasedSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Migrate load balancer to IP Based * * @summary Migrate load balancer to IP Based - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/MigrateLoadBalancerToIPBased.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/MigrateLoadBalancerToIPBased.json */ async function migrateLoadBalancerToIPBased() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts index 4d44759dd32b..89a045515966 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersSwapPublicIPAddressesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Swaps VIPs between two load balancers. * * @summary Swaps VIPs between two load balancers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancersSwapPublicIpAddresses.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancersSwapPublicIpAddresses.json */ async function swapViPsBetweenTwoLoadBalancers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersUpdateTagsSample.ts index fc3df08199ae..6675b62d91c4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/loadBalancersUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a load balancer tags. * * @summary Updates a load balancer tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerUpdateTags.json */ async function updateLoadBalancerTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts index 9cc12f8a5400..8c6da2f4588a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a local network gateway in the specified resource group. * * @summary Creates or updates a local network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayCreate.json */ async function createLocalNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysDeleteSample.ts index 9807bce38abf..a1e2871c151c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified local network gateway. * * @summary Deletes the specified local network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayDelete.json */ async function deleteLocalNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysGetSample.ts index c3d21ecc49b6..0b4f27974be4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified local network gateway in a resource group. * * @summary Gets the specified local network gateway in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayGet.json */ async function getLocalNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysListSample.ts index 10093388e797..2c6ce8673543 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the local network gateways in a resource group. * * @summary Gets all the local network gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayList.json */ async function listLocalNetworkGateways() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysUpdateTagsSample.ts index f9afc07fb2fc..76f125131964 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/localNetworkGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a local network gateway tags. * * @summary Updates a local network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayUpdateTags.json */ async function updateLocalNetworkGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts index 48b12f7d1cda..ebe7b659f7de 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create a network manager connection on this management group. * * @summary Create a network manager connection on this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupPut.json */ async function createOrUpdateManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts index 8c80a4157b6c..9b18426cedbe 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete specified pending connection created by this management group. * * @summary Delete specified pending connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json */ async function deleteManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts index b62504d27219..d63cce94b095 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a specified connection created by this management group. * * @summary Get a specified connection created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupGet.json */ async function getManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts index c090726c6cf6..83d738455371 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/managementGroupNetworkManagerConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network manager connections created by this management group. * * @summary List all network manager connections created by this management group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupList.json */ async function listManagementGroupNetworkManagerConnection() { const managementGroupId = "managementGroupA"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysCreateOrUpdateSample.ts index 8c402f74e6c0..88cbd88546d5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a nat gateway. * * @summary Creates or updates a nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayCreateOrUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayCreateOrUpdate.json */ async function createNatGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysDeleteSample.ts index 8410bb871c87..3849ce3fd7d0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified nat gateway. * * @summary Deletes the specified nat gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayDelete.json */ async function deleteNatGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysGetSample.ts index 59af5cbcf97e..5acbb84f2e4a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified nat gateway in a specified resource group. * * @summary Gets the specified nat gateway in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayGet.json */ async function getNatGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysListAllSample.ts index 52d2293bcdb5..e829cc2fea35 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Nat Gateways in a subscription. * * @summary Gets all the Nat Gateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayListAll.json */ async function listAllNatGateways() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysListSample.ts index 847a3e2e214c..f69b59b719f5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all nat gateways in a resource group. * * @summary Gets all nat gateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayList.json */ async function listNatGatewaysInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysUpdateTagsSample.ts index 0a34ca470a8a..97d00059249e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates nat gateway tags. * * @summary Updates nat gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayUpdateTags.json */ async function updateNatGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natRulesCreateOrUpdateSample.ts index 313c588a156f..04dfd0724e08 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. * * @summary Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRulePut.json */ async function natRulePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natRulesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natRulesDeleteSample.ts index 1438fb0aedc6..6d64f6ef81b2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a nat rule. * * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleDelete.json */ async function natRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natRulesGetSample.ts index c91dc176b5d7..9da7f69f1148 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a nat ruleGet. * * @summary Retrieves the details of a nat ruleGet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleGet.json */ async function natRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/natRulesListByVpnGatewaySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/natRulesListByVpnGatewaySample.ts index 9158cd640b36..da26c5d6d593 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/natRulesListByVpnGatewaySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/natRulesListByVpnGatewaySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all nat rules for a particular virtual wan vpn gateway. * * @summary Retrieves all nat rules for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleList.json */ async function natRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsCreateOrUpdateSample.ts index 4bd7165fc93b..22c700f181a7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network group. * * @summary Creates or updates a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupPut.json */ async function networkGroupsPut() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsDeleteSample.ts index 180605f47785..9dabcba57a4a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network group. * * @summary Deletes a network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupDelete.json */ async function networkGroupsDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsGetSample.ts index eb41b06be81f..fcbc6e187024 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network group. * * @summary Gets the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupGet.json */ async function networkGroupsGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsListSample.ts index 6261be745cec..0a3b9f3eced0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the specified network group. * * @summary Lists the specified network group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupList.json */ async function networkGroupsList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceIPConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceIPConfigurationsGetSample.ts index 78d391dbf5d3..f542e9a4d709 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceIPConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceIPConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network interface ip configuration. * * @summary Gets the specified network interface ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationGet.json */ async function networkInterfaceIPConfigurationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceIPConfigurationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceIPConfigurationsListSample.ts index 0ae75c824205..f2b5821595b0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceIPConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceIPConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get all ip configurations in a network interface. * * @summary Get all ip configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationList.json */ async function networkInterfaceIPConfigurationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceLoadBalancersListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceLoadBalancersListSample.ts index c0de0f18bb47..825a85fb4153 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceLoadBalancersListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceLoadBalancersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all load balancers in a network interface. * * @summary List all load balancers in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceLoadBalancerList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceLoadBalancerList.json */ async function networkInterfaceLoadBalancerList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts index 0e9f5b806fcc..7634901ce9e6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a Tap configuration in the specified NetworkInterface. * * @summary Creates or updates a Tap configuration in the specified NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationCreate.json */ async function createNetworkInterfaceTapConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts index 3beb2fe29faf..6b355de8f9cf 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified tap configuration from the NetworkInterface. * * @summary Deletes the specified tap configuration from the NetworkInterface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationDelete.json */ async function deleteTapConfiguration() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsGetSample.ts index 27d080c128db..07d46df21fff 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified tap configuration on a network interface. * * @summary Get the specified tap configuration on a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationGet.json */ async function getNetworkInterfaceTapConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsListSample.ts index cf1c4b1a91e3..9a8b85e6083e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfaceTapConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get all Tap configurations in a network interface. * * @summary Get all Tap configurations in a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationList.json */ async function listVirtualNetworkTapConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesCreateOrUpdateSample.ts index 3f679eca55ec..5be9a272ce24 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network interface. * * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreate.json */ async function createNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -55,7 +55,7 @@ async function createNetworkInterface() { * This sample demonstrates how to Creates or updates a network interface. * * @summary Creates or updates a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json */ async function createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesDeleteSample.ts index ad54b4d6bd6a..58a17d155fa8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network interface. * * @summary Deletes the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceDelete.json */ async function deleteNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts index 1c20e7e9c4a2..bfb050c0119c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetCloudServiceNetworkInterfaceSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network interface in a cloud service. * * @summary Get the specified network interface in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceGet.json */ async function getCloudServiceNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts index d38d61df9fa1..bc2b8278c64c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetEffectiveRouteTableSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route tables applied to a network interface. * * @summary Gets all route tables applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json */ async function showNetworkInterfaceEffectiveRouteTables() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetSample.ts index aa4f17d5952a..7d773401e7b6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified network interface. * * @summary Gets information about the specified network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceGet.json */ async function getNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts index 5c0d2fac48a8..450b0b10b2bb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetVirtualMachineScaleSetIPConfigurationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. * * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigGet.json */ async function getVirtualMachineScaleSetNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts index 8c46523ac43d..b6defba75d3a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network interface in a virtual machine scale set. * * @summary Get the specified network interface in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceGet.json */ async function getVirtualMachineScaleSetNetworkInterface() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListAllSample.ts index 72611e14e556..c5bb52a31e8f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network interfaces in a subscription. * * @summary Gets all network interfaces in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceListAll.json */ async function listAllNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts index 95a50a6e5ed8..21fa6a1f5689 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListCloudServiceNetworkInterfacesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network interfaces in a cloud service. * * @summary Gets all network interfaces in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceList.json */ async function listCloudServiceNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts index 1bc990a7ac5d..6f443a7ec99d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all network interfaces in a role instance in a cloud service. * * @summary Gets information about all network interfaces in a role instance in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json */ async function listCloudServiceRoleInstanceNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts index 5936e266fafc..1ad4e8f14ce0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListEffectiveNetworkSecurityGroupsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network security groups applied to a network interface. * * @summary Gets all network security groups applied to a network interface. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveNSGList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveNSGList.json */ async function listNetworkInterfaceEffectiveNetworkSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListSample.ts index 79ab5011e020..2dde7a3e6fc7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network interfaces in a resource group. * * @summary Gets all network interfaces in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceList.json */ async function listNetworkInterfacesInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts index 4c365ba05f90..ec97abf32069 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetIPConfigurationsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network interface ip configuration in a virtual machine scale set. * * @summary Get the specified network interface ip configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigList.json */ async function listVirtualMachineScaleSetNetworkInterfaceIPConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts index c7247f3188d1..64c62cf1d309 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetNetworkInterfacesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network interfaces in a virtual machine scale set. * * @summary Gets all network interfaces in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceList.json */ async function listVirtualMachineScaleSetNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts index 9015807b9e06..b9fe861f9fff 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all network interfaces in a virtual machine in a virtual machine scale set. * * @summary Gets information about all network interfaces in a virtual machine in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmNetworkInterfaceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmNetworkInterfaceList.json */ async function listVirtualMachineScaleSetVMNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesUpdateTagsSample.ts index f9d508d20218..8d4f85c24b79 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkInterfacesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a network interface tags. * * @summary Updates a network interface tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceUpdateTags.json */ async function updateNetworkInterfaceTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerCommitsPostSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerCommitsPostSample.ts index 3fdc3bd72da6..7df836729d7c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerCommitsPostSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerCommitsPostSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Post a Network Manager Commit. * * @summary Post a Network Manager Commit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerCommitPost.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerCommitPost.json */ async function networkManageCommitPost() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerDeploymentStatusListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerDeploymentStatusListSample.ts index 777d493eeb22..6d7919ec59a0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerDeploymentStatusListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerDeploymentStatusListSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Post to List of Network Manager Deployment Status. * * @summary Post to List of Network Manager Deployment Status. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDeploymentStatusList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDeploymentStatusList.json */ async function networkManagerDeploymentStatusList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts index 84c206516a48..309d6defd211 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network manager routing configuration. * * @summary Creates or updates a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationPut.json */ async function createNetworkManagerRoutingConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts index 5e6f6f01f7f5..3e99f30860da 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager routing configuration. * * @summary Deletes a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationDelete.json */ async function deleteNetworkManagerRoutingConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsGetSample.ts index d0b75c091173..c6555a2bf0ce 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a network manager routing configuration. * * @summary Retrieves a network manager routing configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationGet.json */ async function getRoutingConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsListSample.ts index 6581e5b3ebba..ff283f7aba91 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagerRoutingConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the network manager routing configurations in a network manager, in a paginated format. * * @summary Lists all the network manager routing configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationList.json */ async function listRoutingConfigurationsInANetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersCreateOrUpdateSample.ts index 8b586cb6ae0e..88b929bdbc88 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a Network Manager. * * @summary Creates or updates a Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPut.json */ async function putNetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersDeleteSample.ts index 56b21998bac2..724c5afbcd7f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager. * * @summary Deletes a network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDelete.json */ async function networkManagersDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersGetSample.ts index 288fd95a96ef..6f95e0eb2de9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Network Manager. * * @summary Gets the specified Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGet.json */ async function networkManagersGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersListBySubscriptionSample.ts index d8449e3faff8..574879ed63bb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network managers in a subscription. * * @summary List all network managers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerListAll.json */ async function networkManagersList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersListSample.ts index ccbf3b78c7ed..760c87ef7615 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List network managers in a resource group. * * @summary List network managers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerList.json */ async function listNetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersPatchSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersPatchSample.ts index 6a6454dcf446..3da3fa7c6e0e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkManagersPatchSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkManagersPatchSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Patch NetworkManager. * * @summary Patch NetworkManager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPatch.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPatch.json */ async function networkManagesPatch() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesCreateOrUpdateSample.ts index 37485cc92137..5e9eefd98123 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network profile. * * @summary Creates or updates a network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileCreateConfigOnly.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileCreateConfigOnly.json */ async function createNetworkProfileDefaults() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesDeleteSample.ts index 4c10bdc31722..ab4dd6daecba 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network profile. * * @summary Deletes the specified network profile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileDelete.json */ async function deleteNetworkProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesGetSample.ts index 42f6c2f33048..79e85338b518 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network profile in a specified resource group. * * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetConfigOnly.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetConfigOnly.json */ async function getNetworkProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getNetworkProfile() { * This sample demonstrates how to Gets the specified network profile in a specified resource group. * * @summary Gets the specified network profile in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetWithContainerNic.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetWithContainerNic.json */ async function getNetworkProfileWithContainerNetworkInterfaces() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesListAllSample.ts index 97b3ee03d615..156eace954aa 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the network profiles in a subscription. * * @summary Gets all the network profiles in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileListAll.json */ async function listAllNetworkProfiles() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesListSample.ts index 64556a54c1ed..5c5169fe0cc9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network profiles in a resource group. * * @summary Gets all network profiles in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileList.json */ async function listResourceGroupNetworkProfiles() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesUpdateTagsSample.ts index 2e67031baffb..b4105d68b5cb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkProfilesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates network profile tags. * * @summary Updates network profile tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileUpdateTags.json */ async function updateNetworkProfileTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts index b5fc8d545cf2..7f294f4de0d4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network security group in the specified resource group. * * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreate.json */ async function createNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -42,7 +42,7 @@ async function createNetworkSecurityGroup() { * This sample demonstrates how to Creates or updates a network security group in the specified resource group. * * @summary Creates or updates a network security group in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreateWithRule.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreateWithRule.json */ async function createNetworkSecurityGroupWithRule() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsDeleteSample.ts index 30d134db56d0..8146f46b4700 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network security group. * * @summary Deletes the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupDelete.json */ async function deleteNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsGetSample.ts index 27e52c50112e..bff4657d743c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network security group. * * @summary Gets the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupGet.json */ async function getNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsListAllSample.ts index 2fb219678152..efaaf8569b90 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network security groups in a subscription. * * @summary Gets all network security groups in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupListAll.json */ async function listAllNetworkSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsListSample.ts index dc688293653d..07b33f7e0f8d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network security groups in a resource group. * * @summary Gets all network security groups in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupList.json */ async function listNetworkSecurityGroupsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsUpdateTagsSample.ts index ab29fc897f79..44ccf70e6075 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkSecurityGroupsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a network security group tags. * * @summary Updates a network security group tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupUpdateTags.json */ async function updateNetworkSecurityGroupTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts index c81048cedfc3..f570e068ceb8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' * * @summary Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionPut.json */ async function networkVirtualApplianceConnectionPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts index 27574d8b2b6f..361bfaeb49ab 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a NVA connection. * * @summary Deletes a NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionDelete.json */ async function networkVirtualApplianceConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsGetSample.ts index cde02784f710..bd22ef9a2d11 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of specified NVA connection. * * @summary Retrieves the details of specified NVA connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionGet.json */ async function networkVirtualApplianceConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsListSample.ts index bab78a26451e..ba04cb6674c2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualApplianceConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists NetworkVirtualApplianceConnections under the NVA. * * @summary Lists NetworkVirtualApplianceConnections under the NVA. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionList.json */ async function networkVirtualApplianceConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts index e96c93539f86..6cfec40e55b0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. * * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualAppliancePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualAppliancePut.json */ async function createNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -96,7 +96,7 @@ async function createNetworkVirtualAppliance() { * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance. * * @summary Creates or updates the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSaaSPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSaaSPut.json */ async function createSaaSNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesDeleteSample.ts index 72d008524e7a..419afbf71042 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Network Virtual Appliance. * * @summary Deletes the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceDelete.json */ async function deleteNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesGetSample.ts index 8d42a4576569..6eb91cab6be8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Network Virtual Appliance. * * @summary Gets the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceGet.json */ async function getNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts index bcd196069c5f..a3d2befec1d6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Network Virtual Appliances in a resource group. * * @summary Lists all Network Virtual Appliances in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json */ async function listAllNetworkVirtualApplianceForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesListSample.ts index 2e1389f36fd5..563b84759783 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Network Virtual Appliances in a subscription. * * @summary Gets all Network Virtual Appliances in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListBySubscription.json */ async function listAllNetworkVirtualAppliancesForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesRestartSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesRestartSample.ts index 4d0add9a9e0a..01237b2c178c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesRestartSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesRestartSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. * * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceEmptyRestart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceEmptyRestart.json */ async function restartAllNetworkVirtualApplianceVMSInVMScaleSet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function restartAllNetworkVirtualApplianceVMSInVMScaleSet() { * This sample demonstrates how to Restarts one or more VMs belonging to the specified Network Virtual Appliance. * * @summary Restarts one or more VMs belonging to the specified Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSpecificRestart.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSpecificRestart.json */ async function restartSpecificNetworkVirtualApplianceVMSInVMScaleSet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts index 0afbde04a16c..10d8b5a7ba54 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkVirtualAppliancesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a Network Virtual Appliance. * * @summary Updates a Network Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceUpdateTags.json */ async function updateNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersCheckConnectivitySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersCheckConnectivitySample.ts index 03c96a014d42..079996d37381 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersCheckConnectivitySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersCheckConnectivitySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. * * @summary Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectivityCheck.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectivityCheck.json */ async function checkConnectivity() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersCreateOrUpdateSample.ts index 72644bff22e7..3ef7816f1abf 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network watcher in the specified resource group. * * @summary Creates or updates a network watcher in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherCreate.json */ async function createNetworkWatcher() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersDeleteSample.ts index 007b8a686262..53c64b52d9ca 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network watcher resource. * * @summary Deletes the specified network watcher resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherDelete.json */ async function deleteNetworkWatcher() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts index 6b6165b41ef3..5ad011431f70 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetAzureReachabilityReportSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. * * @summary NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json */ async function getAzureReachabilityReport() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetFlowLogStatusSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetFlowLogStatusSample.ts index 03a48d13ef56..4064bb102aa2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetFlowLogStatusSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetFlowLogStatusSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Queries status of flow log and traffic analytics (optional) on a specified resource. * * @summary Queries status of flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogStatusQuery.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogStatusQuery.json */ async function getFlowLogStatus() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts index a222e89ead42..0671151ec22f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetNetworkConfigurationDiagnosticSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. * * @summary Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json */ async function networkConfigurationDiagnostic() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetNextHopSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetNextHopSample.ts index e332e7a83668..90683c404c71 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetNextHopSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetNextHopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the next hop from the specified VM. * * @summary Gets the next hop from the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNextHopGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNextHopGet.json */ async function getNextHop() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetSample.ts index 8f6f0b7efc68..fae12909c84b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified network watcher by resource group. * * @summary Gets the specified network watcher by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherGet.json */ async function getNetworkWatcher() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTopologySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTopologySample.ts index 242267ebbbbf..de81bb09cde6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTopologySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTopologySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the current network topology by resource group. * * @summary Gets the current network topology by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTopologyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTopologyGet.json */ async function getTopology() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTroubleshootingResultSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTroubleshootingResultSample.ts index 1bd2b532385f..2f4f21895761 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTroubleshootingResultSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTroubleshootingResultSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Get the last completed troubleshooting result on a specified resource. * * @summary Get the last completed troubleshooting result on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootResultQuery.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootResultQuery.json */ async function getTroubleshootResult() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTroubleshootingSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTroubleshootingSample.ts index 7a3f43abe1e7..ea4571242d18 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTroubleshootingSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetTroubleshootingSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Initiate troubleshooting on a specified resource. * * @summary Initiate troubleshooting on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootGet.json */ async function getTroubleshooting() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetVMSecurityRulesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetVMSecurityRulesSample.ts index 54b7b8a9d6cd..5252554b1e7b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetVMSecurityRulesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersGetVMSecurityRulesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the configured and effective security group rules on the specified VM. * * @summary Gets the configured and effective security group rules on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherSecurityGroupViewGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherSecurityGroupViewGet.json */ async function getSecurityGroupView() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListAllSample.ts index ed542549d129..374508939e5b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network watchers by subscription. * * @summary Gets all network watchers by subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherListAll.json */ async function listAllNetworkWatchers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListAvailableProvidersSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListAvailableProvidersSample.ts index b9c3220825a0..84788f2ba25c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListAvailableProvidersSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListAvailableProvidersSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. * * @summary NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAvailableProvidersListGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAvailableProvidersListGet.json */ async function getAvailableProvidersList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListSample.ts index 5f3df179bb90..2290b6ff9932 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all network watchers by resource group. * * @summary Gets all network watchers by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherList.json */ async function listNetworkWatchers() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts index 801bbee7746e..e4bc4eeeae8b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersSetFlowLogConfigurationSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Configures flow log and traffic analytics (optional) on a specified resource. * * @summary Configures flow log and traffic analytics (optional) on a specified resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogConfigure.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogConfigure.json */ async function configureFlowLog() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersUpdateTagsSample.ts index fc1ccce03ece..ba74e2bc8420 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a network watcher tags. * * @summary Updates a network watcher tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherUpdateTags.json */ async function updateNetworkWatcherTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersVerifyIPFlowSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersVerifyIPFlowSample.ts index f90533ff1c1a..dfe1b2935f01 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersVerifyIPFlowSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/networkWatchersVerifyIPFlowSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Verify IP flow from the specified VM to a location given the currently configured NSG rules. * * @summary Verify IP flow from the specified VM to a location given the currently configured NSG rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherIpFlowVerify.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherIpFlowVerify.json */ async function ipFlowVerify() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/operationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/operationsListSample.ts index 04c19e1266b2..6889a8153e51 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/operationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all of the available Network Rest API operations. * * @summary Lists all of the available Network Rest API operations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/OperationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/OperationList.json */ async function getAListOfOperationsForAResourceProvider() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts index 776c848ef4dc..05fc46afd668 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. * * @summary Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayPut.json */ async function p2SVpnGatewayPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysDeleteSample.ts index d90908d6651b..904b1828889f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a virtual wan p2s vpn gateway. * * @summary Deletes a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayDelete.json */ async function p2SVpnGatewayDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts index 823c522a6ac4..c147a5ef71c5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysDisconnectP2SvpnConnectionsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. * * @summary Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json */ async function disconnectVpnConnectionsFromP2SVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts index 1fc5600ae625..af3e972eb5dc 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGenerateVpnProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. * * @summary Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json */ async function generateP2SVpnGatewayVpnprofile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts index 85b978a86a28..3a84745ca447 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthDetailedSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. * * @summary Gets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json */ async function p2SVpnGatewayGetConnectionHealthDetailed() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts index d0a86fe620d6..2e7b8d807206 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetP2SvpnConnectionHealthSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. * * @summary Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealth.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealth.json */ async function p2SVpnGatewayGetConnectionHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetSample.ts index 6d4af0f55113..2b05dc0faa80 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a virtual wan p2s vpn gateway. * * @summary Retrieves the details of a virtual wan p2s vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGet.json */ async function p2SVpnGatewayGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts index a6ebee238abf..45722424ece4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the P2SVpnGateways in a resource group. * * @summary Lists all the P2SVpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayListByResourceGroup.json */ async function p2SVpnGatewayListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysListSample.ts index 3e951bc92c6a..045420aa329e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the P2SVpnGateways in a subscription. * * @summary Lists all the P2SVpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayList.json */ async function p2SVpnGatewayListBySubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysResetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysResetSample.ts index 52c9000e8007..472c57e5b5f0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysResetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysResetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the primary of the p2s vpn gateway in the specified resource group. * * @summary Resets the primary of the p2s vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayReset.json */ async function resetP2SVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts index b19bd68e15d4..ba37bd4999c3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/p2SVpnGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates virtual wan p2s vpn gateway tags. * * @summary Updates virtual wan p2s vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayUpdateTags.json */ async function p2SVpnGatewayUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesCreateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesCreateSample.ts index deb5fa0b41ff..0713214f69e4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesCreateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesCreateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create and start a packet capture on the specified VM. * * @summary Create and start a packet capture on the specified VM. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureCreate.json */ async function createPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesDeleteSample.ts index dafb1ee181e1..ee7c981f5a42 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified packet capture session. * * @summary Deletes the specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureDelete.json */ async function deletePacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesGetSample.ts index 788518d85905..8a8b2d0e79ce 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a packet capture session by name. * * @summary Gets a packet capture session by name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureGet.json */ async function getPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesGetStatusSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesGetStatusSample.ts index ecf1a3140da6..99ab8ac61573 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesGetStatusSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesGetStatusSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Query the status of a running packet capture session. * * @summary Query the status of a running packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json */ async function queryPacketCaptureStatus() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesListSample.ts index 4bcfa8239b70..0c7cd7279757 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all packet capture sessions within the specified resource group. * * @summary Lists all packet capture sessions within the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCapturesList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCapturesList.json */ async function listPacketCaptures() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesStopSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesStopSample.ts index 485c9ae75fa0..0c10f2702da1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesStopSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/packetCapturesStopSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Stops a specified packet capture session. * * @summary Stops a specified packet capture session. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureStop.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureStop.json */ async function stopPacketCapture() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts index f80297bc8c8c..db5af640e21d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/peerExpressRouteCircuitConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. * * @summary Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionGet.json */ async function peerExpressRouteCircuitConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts index fe95cfd30cf4..699f3cc44235 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/peerExpressRouteCircuitConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all global reach peer connections associated with a private peering in an express route circuit. * * @summary Gets all global reach peer connections associated with a private peering in an express route circuit. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionList.json */ async function listPeerExpressRouteCircuitConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid1"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts index cc1c039ebc21..124750bf8b75 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a private dns zone group in the specified private endpoint. * * @summary Creates or updates a private dns zone group in the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json */ async function createPrivateDnsZoneGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsDeleteSample.ts index 35f7a951d482..b015a1b97fec 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private dns zone group. * * @summary Deletes the specified private dns zone group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json */ async function deletePrivateDnsZoneGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsGetSample.ts index 176d32315eb4..df9d004da913 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private dns zone group resource by specified private dns zone group name. * * @summary Gets the private dns zone group resource by specified private dns zone group name. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupGet.json */ async function getPrivateDnsZoneGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsListSample.ts index 19d361e876e5..19f145c13bd4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateDnsZoneGroupsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private dns zone groups in a private endpoint. * * @summary Gets all private dns zone groups in a private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupList.json */ async function listPrivateEndpointsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsCreateOrUpdateSample.ts index ce58bd30e891..dbe60802f0a8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. * * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreate.json */ async function createPrivateEndpoint() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -61,7 +61,7 @@ async function createPrivateEndpoint() { * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. * * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreateWithASG.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreateWithASG.json */ async function createPrivateEndpointWithApplicationSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -100,7 +100,7 @@ async function createPrivateEndpointWithApplicationSecurityGroups() { * This sample demonstrates how to Creates or updates an private endpoint in the specified resource group. * * @summary Creates or updates an private endpoint in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreateForManualApproval.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreateForManualApproval.json */ async function createPrivateEndpointWithManualApprovalConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsDeleteSample.ts index 2d684bf70bb9..8acf5ecf9b27 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private endpoint. * * @summary Deletes the specified private endpoint. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDelete.json */ async function deletePrivateEndpoint() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsGetSample.ts index 7402c9ea2ca8..3e1f0886e7c1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private endpoint by resource group. * * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGet.json */ async function getPrivateEndpoint() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -37,7 +37,7 @@ async function getPrivateEndpoint() { * This sample demonstrates how to Gets the specified private endpoint by resource group. * * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGetWithASG.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGetWithASG.json */ async function getPrivateEndpointWithApplicationSecurityGroups() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -56,7 +56,7 @@ async function getPrivateEndpointWithApplicationSecurityGroups() { * This sample demonstrates how to Gets the specified private endpoint by resource group. * * @summary Gets the specified private endpoint by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGetForManualApproval.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGetForManualApproval.json */ async function getPrivateEndpointWithManualApprovalConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsListBySubscriptionSample.ts index 02e27d1573d3..bd20ef1f7c1d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private endpoints in a subscription. * * @summary Gets all private endpoints in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointListAll.json */ async function listAllPrivateEndpoints() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsListSample.ts index 0004d504ed4a..a56b839b40b1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateEndpointsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private endpoints in a resource group. * * @summary Gets all private endpoints in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointList.json */ async function listPrivateEndpointsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts index f7e01cbe01c9..64ea3773b2de 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether the subscription is visible to private link service in the specified resource group. * * @summary Checks whether the subscription is visible to private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json */ async function checkPrivateLinkServiceVisibility() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts index c87d1f395a51..a7170b7f2558 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCheckPrivateLinkServiceVisibilitySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether the subscription is visible to private link service. * * @summary Checks whether the subscription is visible to private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibility.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibility.json */ async function checkPrivateLinkServiceVisibility() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCreateOrUpdateSample.ts index 2db9ed86a534..78bf1aac0afd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an private link service in the specified resource group. * * @summary Creates or updates an private link service in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceCreate.json */ async function createPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts index bf49669495f9..4c82f78ee540 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesDeletePrivateEndpointConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete private end point connection for a private link service in a subscription. * * @summary Delete private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json */ async function deletePrivateEndPointConnectionForAPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesDeleteSample.ts index 0e64be953e10..6e067039d8ae 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private link service. * * @summary Deletes the specified private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDelete.json */ async function deletePrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts index 249744f4fe0a..344bf3b750ca 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesGetPrivateEndpointConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specific private end point connection by specific private link service in the resource group. * * @summary Get the specific private end point connection by specific private link service in the resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json */ async function getPrivateEndPointConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesGetSample.ts index 28bd00110afc..fe2333f3518b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private link service by resource group. * * @summary Gets the specified private link service by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGet.json */ async function getPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts index bc439579b503..f033a66a3858 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. * * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json */ async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts index 0c6e62863336..4736237e0dcb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListAutoApprovedPrivateLinkServicesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. * * @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesGet.json */ async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListBySubscriptionSample.ts index 5fe6c681e68d..22f849798ce3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private link service in a subscription. * * @summary Gets all private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListAll.json */ async function listAllPrivateListService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts index b218167c73d7..fd509c7bd6bd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListPrivateEndpointConnectionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private end point connections for a specific private link service. * * @summary Gets all private end point connections for a specific private link service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json */ async function listPrivateLinkServiceInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListSample.ts index 61ebb8e38a47..8f9711dcc4a8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private link services in a resource group. * * @summary Gets all private link services in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceList.json */ async function listPrivateLinkServiceInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts index f378301281d4..b8f0f2c35e82 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/privateLinkServicesUpdatePrivateEndpointConnectionSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Approve or reject private end point connection for a private link service in a subscription. * * @summary Approve or reject private end point connection for a private link service in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json */ async function approveOrRejectPrivateEndPointConnectionForAPrivateLinkService() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesCreateOrUpdateSample.ts index 75455076ff12..d217f302de96 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDns.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDns.json */ async function createPublicIPAddressDns() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -42,7 +42,7 @@ async function createPublicIPAddressDns() { * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json */ async function createPublicIPAddressDnsWithDomainNameLabelScope() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -69,7 +69,7 @@ async function createPublicIPAddressDnsWithDomainNameLabelScope() { * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateCustomizedValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateCustomizedValues.json */ async function createPublicIPAddressAllocationMethod() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -96,7 +96,7 @@ async function createPublicIPAddressAllocationMethod() { * This sample demonstrates how to Creates or updates a static or dynamic public IP address. * * @summary Creates or updates a static or dynamic public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDefaults.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDefaults.json */ async function createPublicIPAddressDefaults() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts index 02900eb4ebf0..e27c9c328a0a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesDdosProtectionStatusSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the Ddos Protection Status of a Public IP Address * * @summary Gets the Ddos Protection Status of a Public IP Address - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json */ async function getDdosProtectionStatusOfAPublicIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesDeleteSample.ts index 3d41d4d67808..98638c8cfa88 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified public IP address. * * @summary Deletes the specified public IP address. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressDelete.json */ async function deletePublicIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts index 54cd5f9009a6..f44b87435749 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetCloudServicePublicIpaddressSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified public IP address in a cloud service. * * @summary Get the specified public IP address in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpGet.json */ async function getVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetSample.ts index 0debe5e914a5..c3a246096b01 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified public IP address in a specified resource group. * * @summary Gets the specified public IP address in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGet.json */ async function getPublicIPAddress() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts index ea7263e174a9..0cb3490dc873 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesGetVirtualMachineScaleSetPublicIpaddressSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified public IP address in a virtual machine scale set. * * @summary Get the specified public IP address in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpGet.json */ async function getVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListAllSample.ts index 885eb3caf675..00fb8d4532a5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the public IP addresses in a subscription. * * @summary Gets all the public IP addresses in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressListAll.json */ async function listAllPublicIPAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts index c682283a284b..d81c0593cfcc 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListCloudServicePublicIpaddressesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all public IP addresses on a cloud service level. * * @summary Gets information about all public IP addresses on a cloud service level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpListAll.json */ async function listVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts index bf6f351ca560..4ac70323920e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListCloudServiceRoleInstancePublicIpaddressesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all public IP addresses in a role instance IP configuration in a cloud service. * * @summary Gets information about all public IP addresses in a role instance IP configuration in a cloud service. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstancePublicIpList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstancePublicIpList.json */ async function listVmssvmPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListSample.ts index 196143d898cd..6f08c4ba51e9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all public IP addresses in a resource group. * * @summary Gets all public IP addresses in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressList.json */ async function listResourceGroupPublicIPAddresses() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts index b98765ec2185..21e663fb4c89 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListVirtualMachineScaleSetPublicIpaddressesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all public IP addresses on a virtual machine scale set level. * * @summary Gets information about all public IP addresses on a virtual machine scale set level. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpListAll.json */ async function listVmssPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts index c8c5715e661d..3e07e972bf92 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesListVirtualMachineScaleSetVmpublicIpaddressesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. * * @summary Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmPublicIpList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmPublicIpList.json */ async function listVmssvmPublicIP() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesUpdateTagsSample.ts index 6d852ab98540..150ab252a96f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPAddressesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates public IP address tags. * * @summary Updates public IP address tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressUpdateTags.json */ async function updatePublicIPAddressTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts index 3d3f89258519..a4b6d8483fdc 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. * * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateCustomizedValues.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateCustomizedValues.json */ async function createPublicIPPrefixAllocationMethod() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -44,7 +44,7 @@ async function createPublicIPPrefixAllocationMethod() { * This sample demonstrates how to Creates or updates a static or dynamic public IP prefix. * * @summary Creates or updates a static or dynamic public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateDefaults.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateDefaults.json */ async function createPublicIPPrefixDefaults() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesDeleteSample.ts index 463fc50ff3a9..a85cd2284243 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified public IP prefix. * * @summary Deletes the specified public IP prefix. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixDelete.json */ async function deletePublicIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesGetSample.ts index de85663b77cd..428599c82cc0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified public IP prefix in a specified resource group. * * @summary Gets the specified public IP prefix in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixGet.json */ async function getPublicIPPrefix() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesListAllSample.ts index 9f35083159e4..1f6c489cece2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the public IP prefixes in a subscription. * * @summary Gets all the public IP prefixes in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixListAll.json */ async function listAllPublicIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesListSample.ts index 63243fba5d24..22fe8edf4bf2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all public IP prefixes in a resource group. * * @summary Gets all public IP prefixes in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixList.json */ async function listResourceGroupPublicIPPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesUpdateTagsSample.ts index cf3dd2fc9434..262a9fa4657f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/publicIPPrefixesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates public IP prefix tags. * * @summary Updates public IP prefix tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixUpdateTags.json */ async function updatePublicIPPrefixTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/putBastionShareableLinkSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/putBastionShareableLinkSample.ts index 7da2af93cccb..20238395ef66 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/putBastionShareableLinkSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/putBastionShareableLinkSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a Bastion Shareable Links for all the VMs specified in the request. * * @summary Creates a Bastion Shareable Links for all the VMs specified in the request. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkCreate.json */ async function createBastionShareableLinksForTheRequestVMS() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsCreateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsCreateSample.ts new file mode 100644 index 000000000000..3f0e9564fb61 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsCreateSample.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ReachabilityAnalysisIntent, + NetworkManagementClient, +} from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates Reachability Analysis Intent. + * + * @summary Creates Reachability Analysis Intent. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentPut.json + */ +async function reachabilityAnalysisIntentCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisIntentName = "testAnalysisIntentName"; + const body: ReachabilityAnalysisIntent = { + properties: { + description: "A sample reachability analysis intent", + destinationResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", + ipTraffic: { + destinationIps: ["10.4.0.1"], + destinationPorts: ["0"], + protocols: ["Any"], + sourceIps: ["10.4.0.0"], + sourcePorts: ["0"], + }, + sourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisIntents.create( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + body, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisIntentCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts new file mode 100644 index 000000000000..e1537481c689 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes Reachability Analysis Intent. + * + * @summary Deletes Reachability Analysis Intent. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentDelete.json + */ +async function reachabilityAnalysisIntentDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisIntentName = "testAnalysisIntent"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisIntents.delete( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisIntentDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsGetSample.ts new file mode 100644 index 000000000000..3b2a685a11a1 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsGetSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the Reachability Analysis Intent. + * + * @summary Get the Reachability Analysis Intent. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentGet.json + */ +async function reachabilityAnalysisIntentGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisIntentName = "testAnalysisIntentName"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisIntents.get( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisIntentGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsListSample.ts new file mode 100644 index 000000000000..8ad44892f6ae --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisIntentsListSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Reachability Analysis Intents . + * + * @summary Gets list of Reachability Analysis Intents . + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentList.json + */ +async function reachabilityAnalysisIntentList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testVerifierWorkspace1"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reachabilityAnalysisIntents.list( + resourceGroupName, + networkManagerName, + workspaceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + reachabilityAnalysisIntentList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsCreateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsCreateSample.ts new file mode 100644 index 000000000000..78b14e45b3c3 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsCreateSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ReachabilityAnalysisRun, + NetworkManagementClient, +} from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates Reachability Analysis Runs. + * + * @summary Creates Reachability Analysis Runs. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunPut.json + */ +async function reachabilityAnalysisRunCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisRunName = "testAnalysisRunName"; + const body: ReachabilityAnalysisRun = { + properties: { + description: "A sample reachability analysis run", + intentId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisRuns.create( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + body, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisRunCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsDeleteSample.ts new file mode 100644 index 000000000000..20f2c3527098 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes Reachability Analysis Run. + * + * @summary Deletes Reachability Analysis Run. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunDelete.json + */ +async function reachabilityAnalysisRunDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisRunName = "testAnalysisRun"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisRuns.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisRunDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsGetSample.ts new file mode 100644 index 000000000000..4471b06d7402 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsGetSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets Reachability Analysis Run. + * + * @summary Gets Reachability Analysis Run. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunGet.json + */ +async function reachabilityAnalysisRunGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const reachabilityAnalysisRunName = "testAnalysisRunName"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.reachabilityAnalysisRuns.get( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + ); + console.log(result); +} + +async function main() { + reachabilityAnalysisRunGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsListSample.ts new file mode 100644 index 000000000000..a2c4eba6fef4 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/reachabilityAnalysisRunsListSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Reachability Analysis Runs. + * + * @summary Gets list of Reachability Analysis Runs. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunList.json + */ +async function reachabilityAnalysisRunList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testVerifierWorkspace1"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reachabilityAnalysisRuns.list( + resourceGroupName, + networkManagerName, + workspaceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + reachabilityAnalysisRunList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/resourceNavigationLinksListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/resourceNavigationLinksListSample.ts index b3393cca92f9..e10a5f50c4b6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/resourceNavigationLinksListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/resourceNavigationLinksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of resource navigation links for a subnet. * * @summary Gets a list of resource navigation links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json */ async function getResourceNavigationLinks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesCreateOrUpdateSample.ts index 16be6da83a15..bee32c83f044 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a route in the specified route filter. * * @summary Creates or updates a route in the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleCreate.json */ async function routeFilterRuleCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesDeleteSample.ts index 0d983f08defa..85b3b69a9e3b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified rule from a route filter. * * @summary Deletes the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleDelete.json */ async function routeFilterRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesGetSample.ts index 23138a041f1d..fdd616f16456 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified rule from a route filter. * * @summary Gets the specified rule from a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleGet.json */ async function routeFilterRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesListByRouteFilterSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesListByRouteFilterSample.ts index a97c9b82b8d2..c1bdde102694 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesListByRouteFilterSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFilterRulesListByRouteFilterSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all RouteFilterRules in a route filter. * * @summary Gets all RouteFilterRules in a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleListByRouteFilter.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleListByRouteFilter.json */ async function routeFilterRuleListByRouteFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersCreateOrUpdateSample.ts index 625b841c6170..223b44b45bb3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a route filter in a specified resource group. * * @summary Creates or updates a route filter in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterCreate.json */ async function routeFilterCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersDeleteSample.ts index 2804b7d656b0..cd1fb60007d8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified route filter. * * @summary Deletes the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterDelete.json */ async function routeFilterDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersGetSample.ts index 5228400265c4..73b82f879fd5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified route filter. * * @summary Gets the specified route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterGet.json */ async function routeFilterGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersListByResourceGroupSample.ts index 85101beb5387..0138677d3c70 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route filters in a resource group. * * @summary Gets all route filters in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterListByResourceGroup.json */ async function routeFilterListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersListSample.ts index 08796fbe1994..aec51ee515f3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route filters in a subscription. * * @summary Gets all route filters in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterList.json */ async function routeFilterList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersUpdateTagsSample.ts index 73b7b9238dc2..ca7f50dd87bd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeFiltersUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of a route filter. * * @summary Updates tags of a route filter. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterUpdateTags.json */ async function updateRouteFilterTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeMapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeMapsCreateOrUpdateSample.ts index eb3a36a47535..a4c9095954cf 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeMapsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeMapsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a RouteMap if it doesn't exist else updates the existing one. * * @summary Creates a RouteMap if it doesn't exist else updates the existing one. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapPut.json */ async function routeMapPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeMapsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeMapsDeleteSample.ts index b23f00457690..265a6896714b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeMapsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeMapsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a RouteMap. * * @summary Deletes a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapDelete.json */ async function routeMapDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeMapsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeMapsGetSample.ts index 6319ec72e000..7ade838633b7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeMapsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeMapsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a RouteMap. * * @summary Retrieves the details of a RouteMap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapGet.json */ async function routeMapGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeMapsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeMapsListSample.ts index bddda68b3797..ab038d0e3a8d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeMapsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeMapsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all RouteMaps. * * @summary Retrieves the details of all RouteMaps. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapList.json */ async function routeMapList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesCreateOrUpdateSample.ts index c7291094b57a..61e4d7e31647 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Create or updates a route table in a specified resource group. * * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreate.json */ async function createRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +39,7 @@ async function createRouteTable() { * This sample demonstrates how to Create or updates a route table in a specified resource group. * * @summary Create or updates a route table in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreateWithRoute.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreateWithRoute.json */ async function createRouteTableWithRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesDeleteSample.ts index 5bf5f08896e8..401f8b72d0ad 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified route table. * * @summary Deletes the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableDelete.json */ async function deleteRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesGetSample.ts index 33031913ff34..e38fd13936b2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified route table. * * @summary Gets the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableGet.json */ async function getRouteTable() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesListAllSample.ts index 3c195ce9773c..55b85a14f2ad 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route tables in a subscription. * * @summary Gets all route tables in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableListAll.json */ async function listAllRouteTables() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesListSample.ts index b29e72e6f65f..943fe8e518be 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all route tables in a resource group. * * @summary Gets all route tables in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableList.json */ async function listRouteTablesInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesUpdateTagsSample.ts index 67da8420599e..aebea18ec324 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routeTablesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routeTablesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a route table tags. * * @summary Updates a route table tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableUpdateTags.json */ async function updateRouteTableTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routesCreateOrUpdateSample.ts index e83ab2d3e299..ba8e6c787e61 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a route in the specified route table. * * @summary Creates or updates a route in the specified route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteCreate.json */ async function createRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routesDeleteSample.ts index 3d045c05f6f5..2dc318c49a2b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified route from a route table. * * @summary Deletes the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteDelete.json */ async function deleteRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routesGetSample.ts index 399d10209cc1..628fc3bc5a0c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified route from a route table. * * @summary Gets the specified route from a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteGet.json */ async function getRoute() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routesListSample.ts index ab7988c3434e..1fd458b1f69e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all routes in a route table. * * @summary Gets all routes in a route table. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteList.json */ async function listRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingIntentCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingIntentCreateOrUpdateSample.ts index fe62bb5ed4fb..6ddc8de1781c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingIntentCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingIntentCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. * * @summary Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentPut.json */ async function routeTablePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingIntentDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingIntentDeleteSample.ts index c1ced8650347..978375631d0f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingIntentDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingIntentDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a RoutingIntent. * * @summary Deletes a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentDelete.json */ async function routeTableDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingIntentGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingIntentGetSample.ts index ee5f5b272bfd..6e7056a49615 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingIntentGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingIntentGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a RoutingIntent. * * @summary Retrieves the details of a RoutingIntent. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentGet.json */ async function routeTableGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingIntentListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingIntentListSample.ts index a2734bfabbc9..4bfae67a3908 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingIntentListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingIntentListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all RoutingIntent child resources of the VirtualHub. * * @summary Retrieves the details of all RoutingIntent child resources of the VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentList.json */ async function routingIntentList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts index 59c5c876166d..1a5c039751d1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a routing rule collection. * * @summary Creates or updates a routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json */ async function createOrUpdateARoutingRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsDeleteSample.ts index 0d51b24db738..891f9fd95c45 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes an routing rule collection. * * @summary Deletes an routing rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json */ async function deletesAnRoutingRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsGetSample.ts index 71b68f76b3cd..5c9936b8bd2d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager routing configuration rule collection. * * @summary Gets a network manager routing configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json */ async function getsRoutingRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsListSample.ts index 9ae1fff12571..ca4d699a84a8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingRuleCollectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the rule collections in a routing configuration, in a paginated format. * * @summary Lists all the rule collections in a routing configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionList.json */ async function listRoutingRuleCollections() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingRulesCreateOrUpdateSample.ts index db293c2bbed1..b9bb79b533da 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an routing rule. * * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json */ async function createADefaultRoutingRule() { const subscriptionId = @@ -51,7 +51,7 @@ async function createADefaultRoutingRule() { * This sample demonstrates how to Creates or updates an routing rule. * * @summary Creates or updates an routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json */ async function createAnRoutingRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingRulesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingRulesDeleteSample.ts index 8f7de9f7f9e9..6d5c577b6073 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingRulesDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a routing rule. * * @summary Deletes a routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleDelete.json */ async function deletesARoutingRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingRulesGetSample.ts index 9fc80484ece2..2aaeaafa2efd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager routing configuration routing rule. * * @summary Gets a network manager routing configuration routing rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleGet.json */ async function getsRoutingRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/routingRulesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/routingRulesListSample.ts index 5cc6815d1b2d..48af94c04642 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/routingRulesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/routingRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network manager routing configuration routing rules. * * @summary List all network manager routing configuration routing rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleList.json */ async function listRoutingRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsCreateOrUpdateSample.ts index 1d59a1baf1e4..fba7b2cae8d1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates scope connection from Network Manager * * @summary Creates or updates scope connection from Network Manager - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionPut.json */ async function createOrUpdateNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsDeleteSample.ts index c5cab8789d7f..70ab9007b1d4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete the pending scope connection created by this network manager. * * @summary Delete the pending scope connection created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionDelete.json */ async function deleteNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsGetSample.ts index 8414a783f531..c77eda244809 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get specified scope connection created by this Network Manager. * * @summary Get specified scope connection created by this Network Manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionGet.json */ async function getNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsListSample.ts index 10f978db34ad..755a4a85b80d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/scopeConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all scope connections created by this network manager. * * @summary List all scope connections created by this network manager. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionList.json */ async function listNetworkManagerScopeConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts index 8157e9ff7ea3..cd243bdd7f8a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,36 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network manager security admin configuration. * * @summary Creates or updates a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json + */ +async function createManualModeSecurityAdminConfiguration() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const configurationName = "myTestSecurityConfig"; + const securityAdminConfiguration: SecurityAdminConfiguration = { + description: + "A configuration which will update any network groups ip addresses at commit times.", + networkGroupAddressSpaceAggregationOption: "Manual", + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.securityAdminConfigurations.createOrUpdate( + resourceGroupName, + networkManagerName, + configurationName, + securityAdminConfiguration, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a network manager security admin configuration. + * + * @summary Creates or updates a network manager security admin configuration. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut.json */ async function createNetworkManagerSecurityAdminConfiguration() { const subscriptionId = @@ -46,6 +75,7 @@ async function createNetworkManagerSecurityAdminConfiguration() { } async function main() { + createManualModeSecurityAdminConfiguration(); createNetworkManagerSecurityAdminConfiguration(); } diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsDeleteSample.ts index ffd255add98c..1f7172b3bace 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager security admin configuration. * * @summary Deletes a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json */ async function deleteNetworkManagerSecurityAdminConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsGetSample.ts index d8bedecab8e8..0fbdfea9d2f1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a network manager security admin configuration. * * @summary Retrieves a network manager security admin configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json */ async function getSecurityAdminConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsListSample.ts index e20c5f76681c..2ad39b7c8182 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityAdminConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the network manager security admin configurations in a network manager, in a paginated format. * * @summary Lists all the network manager security admin configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json */ async function listSecurityAdminConfigurationsInANetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts index 386c6e87767b..44445066f156 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Security Partner Provider. * * @summary Creates or updates the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderPut.json */ async function createSecurityPartnerProvider() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersDeleteSample.ts index f0b235e90b56..16f80bb6ae7a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Security Partner Provider. * * @summary Deletes the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderDelete.json */ async function deleteSecurityPartnerProvider() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersGetSample.ts index 710e66e54ff9..7b12f86049a4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Security Partner Provider. * * @summary Gets the specified Security Partner Provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderGet.json */ async function getSecurityPartnerProvider() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts index 6b9398b29261..24d020a40c32 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Security Partner Providers in a resource group. * * @summary Lists all Security Partner Providers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListByResourceGroup.json */ async function listAllSecurityPartnerProvidersForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersListSample.ts index be479e73fb28..96decd82ab5b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Security Partner Providers in a subscription. * * @summary Gets all the Security Partner Providers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListBySubscription.json */ async function listAllSecurityPartnerProvidersForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersUpdateTagsSample.ts index 9883f56a1bb7..17bf069155f0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityPartnerProvidersUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of a Security Partner Provider resource. * * @summary Updates tags of a Security Partner Provider resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderUpdateTags.json */ async function updateSecurityPartnerProviderTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityRulesCreateOrUpdateSample.ts index 2888af955d95..4229bf897672 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a security rule in the specified network security group. * * @summary Creates or updates a security rule in the specified network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleCreate.json */ async function createSecurityRule() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityRulesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityRulesDeleteSample.ts index 0dfbe57082d0..b654117a7e5a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified network security rule. * * @summary Deletes the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleDelete.json */ async function deleteNetworkSecurityRuleFromNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityRulesGetSample.ts index 7104a38e500b..53e70d8e8276 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified network security rule. * * @summary Get the specified network security rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleGet.json */ async function getNetworkSecurityRuleInNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityRulesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityRulesListSample.ts index dc509af5bc5a..02f1d592ef44 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityRulesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all security rules in a network security group. * * @summary Gets all security rules in a network security group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleList.json */ async function listNetworkSecurityRulesInNetworkSecurityGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts index 8625867d45c5..0a98a393ca18 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a network manager security user configuration. * * @summary Creates or updates a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json */ async function createNetworkManagerSecurityUserConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsDeleteSample.ts index f60181a8013d..c7f8b7a057bd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a network manager security user configuration. * * @summary Deletes a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json */ async function deleteNetworkManagerSecurityUserConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsGetSample.ts index fc254b882348..f78a76d11440 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a network manager security user configuration. * * @summary Retrieves a network manager security user configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json */ async function getSecurityUserConfigurations() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsListSample.ts index 98392463a540..26fc130a9d47 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the network manager security user configurations in a network manager, in a paginated format. * * @summary Lists all the network manager security user configurations in a network manager, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationList.json */ async function listSecurityUserConfigurationsInANetworkManager() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts index e21808d744ad..b04057ea58d5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a security user rule collection. * * @summary Creates or updates a security user rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json */ async function createOrUpdateASecurityUserRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsDeleteSample.ts index 670fb44a978e..f74a4bf2c9a0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Security User Rule collection. * * @summary Deletes a Security User Rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json */ async function deletesASecurityUserRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsGetSample.ts index 0cdd71ab7149..4fe14a635f91 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a network manager security user configuration rule collection. * * @summary Gets a network manager security user configuration rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json */ async function getsSecurityUserRuleCollection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsListSample.ts index cd788d20321c..13bc9f22c0af 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRuleCollectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the security user rule collections in a security configuration, in a paginated format. * * @summary Lists all the security user rule collections in a security configuration, in a paginated format. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json */ async function listRuleCollectionsInASecurityConfiguration() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesCreateOrUpdateSample.ts index 6180a09fdb75..0bbcccfb7b60 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a security user rule. * * @summary Creates or updates a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRulePut.json */ async function createASecurityUserRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesDeleteSample.ts index 3705889fc326..88850b317f73 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesDeleteSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a security user rule. * * @summary Deletes a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleDelete.json */ async function deleteASecurityUserRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesGetSample.ts index e338265a2a11..cbc99836f398 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a security user rule. * * @summary Gets a security user rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleGet.json */ async function getsASecurityUserRule() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesListSample.ts index f54ff55bea4d..62665decfb22 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/securityUserRulesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Security User Rules in a rule collection. * * @summary Lists all Security User Rules in a rule collection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleList.json */ async function listSecurityUserRules() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceAssociationLinksListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceAssociationLinksListSample.ts index 8ff8ff621c8a..6c23d2f49e29 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceAssociationLinksListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceAssociationLinksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of service association links for a subnet. * * @summary Gets a list of service association links for a subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json */ async function getServiceAssociationLinks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts index 1efa6ab85def..92bc1d2260af 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a service Endpoint Policies. * * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreate.json */ async function createServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -43,7 +43,7 @@ async function createServiceEndpointPolicy() { * This sample demonstrates how to Creates or updates a service Endpoint Policies. * * @summary Creates or updates a service Endpoint Policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreateWithDefinition.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreateWithDefinition.json */ async function createServiceEndpointPolicyWithDefinition() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesDeleteSample.ts index 3cf202b55f16..da3518113a5d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified service endpoint policy. * * @summary Deletes the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDelete.json */ async function deleteServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesGetSample.ts index 06d8e31612a3..7d89a61f27dc 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified service Endpoint Policies in a specified resource group. * * @summary Gets the specified service Endpoint Policies in a specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyGet.json */ async function getServiceEndPointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts index 6f5017021195..ff72fbf3843e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all service endpoint Policies in a resource group. * * @summary Gets all service endpoint Policies in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyList.json */ async function listResourceGroupServiceEndpointPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesListSample.ts index f0e6d99e2069..e0809e7321ee 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the service endpoint policies in a subscription. * * @summary Gets all the service endpoint policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyListAll.json */ async function listAllServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts index 6d4e8b70f3b7..46d39bb9f356 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPoliciesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates tags of a service endpoint policy. * * @summary Updates tags of a service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyUpdateTags.json */ async function updateServiceEndpointPolicyTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts index 19bfcc7c8ae1..f8e9841b4536 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a service endpoint policy definition in the specified service endpoint policy. * * @summary Creates or updates a service endpoint policy definition in the specified service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json */ async function createServiceEndpointPolicyDefinition() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts index a42b0aba229c..4654f03f981d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified ServiceEndpoint policy definitions. * * @summary Deletes the specified ServiceEndpoint policy definitions. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json */ async function deleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts index bd142ab3f47a..eb1bddf818b2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the specified service endpoint policy definitions from service endpoint policy. * * @summary Get the specified service endpoint policy definitions from service endpoint policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionGet.json */ async function getServiceEndpointDefinitionInServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts index e6e35f8c5c7b..ce3fca76eba5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceEndpointPolicyDefinitionsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all service endpoint policy definitions in a service end point policy. * * @summary Gets all service endpoint policy definitions in a service end point policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionList.json */ async function listServiceEndpointDefinitionsInServiceEndPointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceTagInformationListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceTagInformationListSample.ts index 3e087eb7afc1..5406a2e2e3e8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceTagInformationListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceTagInformationListSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of service tag information resources with pagination. * * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResult.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResult.json */ async function getListOfServiceTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -41,7 +41,7 @@ async function getListOfServiceTags() { * This sample demonstrates how to Gets a list of service tag information resources with pagination. * * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json */ async function getListOfServiceTagsWithNoAddressPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -66,7 +66,7 @@ async function getListOfServiceTagsWithNoAddressPrefixes() { * This sample demonstrates how to Gets a list of service tag information resources with pagination. * * @summary Gets a list of service tag information resources with pagination. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResultWithTagname.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResultWithTagname.json */ async function getListOfServiceTagsWithTagName() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/serviceTagsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/serviceTagsListSample.ts index 5428868b55a5..7339872801da 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/serviceTagsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/serviceTagsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of service tag information resources. * * @summary Gets a list of service tag information resources. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagsList.json */ async function getListOfServiceTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsCreateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsCreateSample.ts new file mode 100644 index 000000000000..8aa51c2c87a4 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsCreateSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates/Updates the Static CIDR resource. + * + * @summary Creates/Updates the Static CIDR resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Create.json + */ +async function staticCidrsCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const staticCidrName = "TestStaticCidr"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.staticCidrs.create( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + ); + console.log(result); +} + +async function main() { + staticCidrsCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsDeleteSample.ts new file mode 100644 index 000000000000..76e9bfd528b3 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete the Static CIDR resource. + * + * @summary Delete the Static CIDR resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Delete.json + */ +async function staticCidrsDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const staticCidrName = "TestStaticCidr"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.staticCidrs.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + ); + console.log(result); +} + +async function main() { + staticCidrsDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsGetSample.ts new file mode 100644 index 000000000000..c87c44b277e3 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsGetSample.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specific Static CIDR resource. + * + * @summary Gets the specific Static CIDR resource. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Get.json + */ +async function staticCidrsGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const staticCidrName = "TestStaticCidr"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.staticCidrs.get( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + ); + console.log(result); +} + +async function main() { + staticCidrsGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsListSample.ts new file mode 100644 index 000000000000..da7a9debb36e --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/staticCidrsListSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Static CIDR resources at Network Manager level. + * + * @summary Gets list of Static CIDR resources at Network Manager level. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_List.json + */ +async function staticCidrsList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "11111111-1111-1111-1111-111111111111"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "TestNetworkManager"; + const poolName = "TestPool"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.staticCidrs.list( + resourceGroupName, + networkManagerName, + poolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + staticCidrsList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/staticMembersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/staticMembersCreateOrUpdateSample.ts index 9965e0cf9736..2b590a1f5854 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/staticMembersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/staticMembersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a static member. * * @summary Creates or updates a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberPut.json */ async function staticMemberPut() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/staticMembersDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/staticMembersDeleteSample.ts index a8fd3906eef5..e0f50c627b1d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/staticMembersDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/staticMembersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a static member. * * @summary Deletes a static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberDelete.json */ async function staticMembersDelete() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/staticMembersGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/staticMembersGetSample.ts index 8ef73f613a2c..1e3486f49d73 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/staticMembersGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/staticMembersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified static member. * * @summary Gets the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberGet.json */ async function staticMembersGet() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/staticMembersListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/staticMembersListSample.ts index ef4d86a9f698..2fbfb9a806e2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/staticMembersListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/staticMembersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the specified static member. * * @summary Lists the specified static member. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberList.json */ async function staticMembersList() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subnetsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subnetsCreateOrUpdateSample.ts index d9021eebf95f..d0cc95cda394 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subnetsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subnetsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreate.json */ async function createSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -42,7 +42,7 @@ async function createSubnet() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateWithDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateWithDelegation.json */ async function createSubnetWithADelegation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -66,7 +66,7 @@ async function createSubnetWithADelegation() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateServiceEndpoint.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateServiceEndpoint.json */ async function createSubnetWithServiceEndpoints() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -93,7 +93,7 @@ async function createSubnetWithServiceEndpoints() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json */ async function createSubnetWithServiceEndpointsWithNetworkIdentifier() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -127,7 +127,7 @@ async function createSubnetWithServiceEndpointsWithNetworkIdentifier() { * This sample demonstrates how to Creates or updates a subnet in the specified virtual network. * * @summary Creates or updates a subnet in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateWithSharingScope.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateWithSharingScope.json */ async function createSubnetWithSharingScope() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subnetsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subnetsDeleteSample.ts index 4ba5ebb8da79..238452cf8189 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subnetsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subnetsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified subnet. * * @summary Deletes the specified subnet. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetDelete.json */ async function deleteSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subnetsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subnetsGetSample.ts index 3f72ce863a2e..a0a7d4513952 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subnetsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subnetsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. * * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGet.json */ async function getSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -40,7 +40,7 @@ async function getSubnet() { * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. * * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGetWithDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGetWithDelegation.json */ async function getSubnetWithADelegation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -62,7 +62,7 @@ async function getSubnetWithADelegation() { * This sample demonstrates how to Gets the specified subnet by virtual network and resource group. * * @summary Gets the specified subnet by virtual network and resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGetWithSharingScope.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGetWithSharingScope.json */ async function getSubnetWithSharingScope() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subnetsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subnetsListSample.ts index adad911c7d7f..6ef0850ca139 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subnetsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subnetsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all subnets in a virtual network. * * @summary Gets all subnets in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetList.json */ async function listSubnets() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subnetsPrepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subnetsPrepareNetworkPoliciesSample.ts index 569a37a02bac..11809f784e58 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subnetsPrepareNetworkPoliciesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subnetsPrepareNetworkPoliciesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Prepares a subnet by applying network intent policies. * * @summary Prepares a subnet by applying network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetPrepareNetworkPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetPrepareNetworkPolicies.json */ async function prepareNetworkPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts index 94851cc0a84e..7d25d26f5424 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subnetsUnprepareNetworkPoliciesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Unprepares a subnet by removing network intent policies. * * @summary Unprepares a subnet by removing network intent policies. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetUnprepareNetworkPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetUnprepareNetworkPolicies.json */ async function unprepareNetworkPolicies() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts index f503fc5cee2c..00d4e48fc453 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create a network manager connection on this subscription. * * @summary Create a network manager connection on this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionPut.json */ async function createOrUpdateSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts index 10f3ebd5c763..5a374a4b44a8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete specified connection created by this subscription. * * @summary Delete specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json */ async function deleteSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts index 493bc133579c..8dd0118bbb89 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a specified connection created by this subscription. * * @summary Get a specified connection created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionGet.json */ async function getSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts index d92a1be816fd..a777507d1a19 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/subscriptionNetworkManagerConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all network manager connections created by this subscription. * * @summary List all network manager connections created by this subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionList.json */ async function listSubscriptionNetworkManagerConnection() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/supportedSecurityProvidersSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/supportedSecurityProvidersSample.ts index 42950bcd4595..511f79f39e01 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/supportedSecurityProvidersSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/supportedSecurityProvidersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gives the supported security providers for the virtual wan. * * @summary Gives the supported security providers for the virtual wan. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWanSupportedSecurityProviders.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWanSupportedSecurityProviders.json */ async function supportedSecurityProviders() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/usagesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/usagesListSample.ts index 07feec3d8500..5c5466b27956 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/usagesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/usagesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List network usages for a subscription. * * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageList.json */ async function listUsages() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -36,7 +36,7 @@ async function listUsages() { * This sample demonstrates how to List network usages for a subscription. * * @summary List network usages for a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageListSpacedLocation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageListSpacedLocation.json */ async function listUsagesSpacedLocation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesCreateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesCreateSample.ts new file mode 100644 index 000000000000..e5bfe22ae82c --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesCreateSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { VerifierWorkspace, NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates Verifier Workspace. + * + * @summary Creates Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePut.json + */ +async function verifierWorkspaceCreate() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const body: VerifierWorkspace = { + location: "eastus", + properties: { description: "A sample workspace" }, + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.create( + resourceGroupName, + networkManagerName, + workspaceName, + body, + ); + console.log(result); +} + +async function main() { + verifierWorkspaceCreate(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesDeleteSample.ts new file mode 100644 index 000000000000..82edc529c62e --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesDeleteSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes Verifier Workspace. + * + * @summary Deletes Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceDelete.json + */ +async function verifierWorkspaceDelete() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.beginDeleteAndWait( + resourceGroupName, + networkManagerName, + workspaceName, + ); + console.log(result); +} + +async function main() { + verifierWorkspaceDelete(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesGetSample.ts new file mode 100644 index 000000000000..e981332d5a65 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesGetSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets Verifier Workspace. + * + * @summary Gets Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceGet.json + */ +async function verifierWorkspaceGet() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.get( + resourceGroupName, + networkManagerName, + workspaceName, + ); + console.log(result); +} + +async function main() { + verifierWorkspaceGet(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesListSample.ts new file mode 100644 index 000000000000..f3cf4e2267fa --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesListSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets list of Verifier Workspaces. + * + * @summary Gets list of Verifier Workspaces. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceList.json + */ +async function verifierWorkspaceList() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.verifierWorkspaces.list( + resourceGroupName, + networkManagerName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + verifierWorkspaceList(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesUpdateSample.ts new file mode 100644 index 000000000000..3a1006836c94 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/verifierWorkspacesUpdateSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates Verifier Workspace. + * + * @summary Updates Verifier Workspace. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePatch.json + */ +async function verifierWorkspacePatch() { + const subscriptionId = + process.env["NETWORK_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const networkManagerName = "testNetworkManager"; + const workspaceName = "testWorkspace"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.verifierWorkspaces.update( + resourceGroupName, + networkManagerName, + workspaceName, + ); + console.log(result); +} + +async function main() { + verifierWorkspacePatch(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vipSwapCreateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vipSwapCreateSample.ts index fe2fe4729c99..4287bfddaa3b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vipSwapCreateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vipSwapCreateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Performs vip swap operation on swappable cloud services. * * @summary Performs vip swap operation on swappable cloud services. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapPut.json */ async function putVipSwapOperation() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vipSwapGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vipSwapGetSample.ts index 6585d753a6ec..7af6b252ae58 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vipSwapGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vipSwapGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production * * @summary Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapGet.json */ async function getSwapResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vipSwapListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vipSwapListSample.ts index 237ae41b0305..3655290807d0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vipSwapListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vipSwapListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production * * @summary Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service can either be Staging or Production - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapList.json */ async function getSwapResourceList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts index 66343edc1792..368c0ee2e4ae 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Network Virtual Appliance Site. * * @summary Creates or updates the specified Network Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSitePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSitePut.json */ async function createNetworkVirtualApplianceSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesDeleteSample.ts index 54325cdfab87..8467a7670184 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified site from a Virtual Appliance. * * @summary Deletes the specified site from a Virtual Appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteDelete.json */ async function deleteNetworkVirtualApplianceSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesGetSample.ts index 39dec3763bd2..c3f8b80d34c0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Virtual Appliance Site. * * @summary Gets the specified Virtual Appliance Site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteGet.json */ async function getNetworkVirtualApplianceSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesListSample.ts index 591d7bc53a83..99675c765367 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSitesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. * * @summary Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteList.json */ async function listAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSkusGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSkusGetSample.ts index 48a6dad75993..8f6a3e127a87 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSkusGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSkusGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a single available sku for network virtual appliance. * * @summary Retrieves a single available sku for network virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuGet.json */ async function networkVirtualApplianceSkuGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSkusListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSkusListSample.ts index 1e741e26c286..39f3a50a8bf8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSkusListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualApplianceSkusListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List all SKUs available for a virtual appliance. * * @summary List all SKUs available for a virtual appliance. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuList.json */ async function networkVirtualApplianceSkuListResult() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts index fd9360faf3d3..8f251108bb4f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. * * @summary Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionPut.json */ async function virtualHubRouteTableV2Put() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionDeleteSample.ts index af9d65524db4..4ce14f304990 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualHubBgpConnection. * * @summary Deletes a VirtualHubBgpConnection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionDelete.json */ async function virtualHubRouteTableV2Delete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionGetSample.ts index cf552f4acdbf..c5d6b23ac06c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a Virtual Hub Bgp Connection. * * @summary Retrieves the details of a Virtual Hub Bgp Connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionGet.json */ async function virtualHubVirtualHubRouteTableV2Get() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts index 76b84fd88446..f9ad72b09f4a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListAdvertisedRoutesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. * * @summary Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json */ async function virtualRouterPeerListAdvertisedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts index cdf8b76d78f0..c6b3cc43ca20 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListLearnedRoutesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves a list of routes the virtual hub bgp connection has learned. * * @summary Retrieves a list of routes the virtual hub bgp connection has learned. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListLearnedRoute.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListLearnedRoute.json */ async function virtualRouterPeerListLearnedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListSample.ts index 925f8ae5fb9c..73473fb715e9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubBgpConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all VirtualHubBgpConnections. * * @summary Retrieves the details of all VirtualHubBgpConnections. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionList.json */ async function virtualHubRouteTableV2List() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts index 9c2b354ecf90..2a9dab05082c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. * * @summary Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationPut.json */ async function virtualHubIPConfigurationPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationDeleteSample.ts index 439fef94c919..786af8c8e186 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualHubIpConfiguration. * * @summary Deletes a VirtualHubIpConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationDelete.json */ async function virtualHubIPConfigurationDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationGetSample.ts index 2279ff6b8064..50df047073bb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a Virtual Hub Ip configuration. * * @summary Retrieves the details of a Virtual Hub Ip configuration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationGet.json */ async function virtualHubVirtualHubRouteTableV2Get() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationListSample.ts index fdde96930907..4ce37374e480 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubIPConfigurationListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all VirtualHubIpConfigurations. * * @summary Retrieves the details of all VirtualHubIpConfigurations. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationList.json */ async function virtualHubRouteTableV2List() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts index df21a6ba38db..2c8d7cf9db57 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. * * @summary Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Put.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Put.json */ async function virtualHubRouteTableV2Put() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SDeleteSample.ts index 620195f325e5..c051d9e8dcb3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualHubRouteTableV2. * * @summary Deletes a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Delete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Delete.json */ async function virtualHubRouteTableV2Delete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SGetSample.ts index 71315b7a4fc1..d27260e7c911 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VirtualHubRouteTableV2. * * @summary Retrieves the details of a VirtualHubRouteTableV2. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Get.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Get.json */ async function virtualHubVirtualHubRouteTableV2Get() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SListSample.ts index d52e786fa980..c0d800068e7e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubRouteTableV2SListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of all VirtualHubRouteTableV2s. * * @summary Retrieves the details of all VirtualHubRouteTableV2s. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2List.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2List.json */ async function virtualHubRouteTableV2List() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsCreateOrUpdateSample.ts index c304c480b21c..1de757d134fc 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. * * @summary Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubPut.json */ async function virtualHubPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsDeleteSample.ts index 766dc10dc49f..b7dec36d302b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualHub. * * @summary Deletes a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubDelete.json */ async function virtualHubDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts index 964bbe764b7d..7ce8741df088 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetEffectiveVirtualHubRoutesSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . * * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForConnection.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForConnection.json */ async function effectiveRoutesForAConnectionResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -51,7 +51,7 @@ async function effectiveRoutesForAConnectionResource() { * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . * * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForRouteTable.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForRouteTable.json */ async function effectiveRoutesForARouteTableResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -80,7 +80,7 @@ async function effectiveRoutesForARouteTableResource() { * This sample demonstrates how to Gets the effective routes configured for the Virtual Hub resource or the specified resource . * * @summary Gets the effective routes configured for the Virtual Hub resource or the specified resource . - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForVirtualHub.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForVirtualHub.json */ async function effectiveRoutesForTheVirtualHub() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetInboundRoutesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetInboundRoutesSample.ts index 322a0ac14b02..6544ad1a0535 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetInboundRoutesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetInboundRoutesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the inbound routes configured for the Virtual Hub on a particular connection. * * @summary Gets the inbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetInboundRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetInboundRoutes.json */ async function inboundRoutesForTheVirtualHubOnAParticularConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetOutboundRoutesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetOutboundRoutesSample.ts index 31de8e41d860..5989580d9223 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetOutboundRoutesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetOutboundRoutesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the outbound routes configured for the Virtual Hub on a particular connection. * * @summary Gets the outbound routes configured for the Virtual Hub on a particular connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetOutboundRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetOutboundRoutes.json */ async function outboundRoutesForTheVirtualHubOnAParticularConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetSample.ts index 4844546865bd..021b339e88c0 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VirtualHub. * * @summary Retrieves the details of a VirtualHub. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubGet.json */ async function virtualHubGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsListByResourceGroupSample.ts index 6775733cb03f..3426127c1b72 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VirtualHubs in a resource group. * * @summary Lists all the VirtualHubs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubListByResourceGroup.json */ async function virtualHubListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsListSample.ts index cc7ac4fade12..efb75efe54d6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VirtualHubs in a subscription. * * @summary Lists all the VirtualHubs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubList.json */ async function virtualHubList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsUpdateTagsSample.ts index 12daa7f7e2e3..49dea771630a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualHubsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates VirtualHub tags. * * @summary Updates VirtualHub tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubUpdateTags.json */ async function virtualHubUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts index 91910d0a57aa..e3a22b3b7671 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a virtual network gateway connection in the specified resource group. * * @summary Creates or updates a virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionCreate.json */ async function createVirtualNetworkGatewayConnectionS2S() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts index 728ea6174dcf..955a5be73458 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network Gateway connection. * * @summary Deletes the specified virtual network Gateway connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionDelete.json */ async function deleteVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts index a6f7de311898..27a7558a9c2a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetIkeSasSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. * * @summary Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json */ async function getVirtualNetworkGatewayConnectionIkeSa() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts index 9d872dd917b0..18184fec4fa1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified virtual network gateway connection by resource group. * * @summary Gets the specified virtual network gateway connection by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGet.json */ async function getVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts index aae6b9b24bd0..17eb7c78041a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsGetSharedKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. * * @summary The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json */ async function getVirtualNetworkGatewayConnectionSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsListSample.ts index bb9466eb2f6c..ef0c63a17271 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. * * @summary The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionsList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionsList.json */ async function listVirtualNetworkGatewayConnectionsinResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts index fecd7e555686..4fb212402819 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsResetConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the virtual network gateway connection specified. * * @summary Resets the virtual network gateway connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionReset.json */ async function resetVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts index 39f3eab3e6a4..92bf52532d68 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsResetSharedKeySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * * @summary The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json */ async function resetVirtualNetworkGatewayConnectionSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts index 7064363b903e..a10d623eb59c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsSetSharedKeySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * * @summary The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json */ async function setVirtualNetworkGatewayConnectionSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts index 2864bf1ab4b2..572b4ec29a1e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsStartPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. * * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -49,7 +49,7 @@ async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { * This sample demonstrates how to Starts packet capture on virtual network gateway connection in the specified resource group. * * @summary Starts packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json */ async function startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts index 63e47cce81c7..27bb228aa99b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsStopPacketCaptureSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Stops packet capture on virtual network gateway connection in the specified resource group. * * @summary Stops packet capture on virtual network gateway connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json */ async function stopPacketCaptureOnVirtualNetworkGatewayConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts index 3324a33a620d..2e0d2c244589 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayConnectionsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a virtual network gateway connection tags. * * @summary Updates a virtual network gateway connection tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json */ async function updateVirtualNetworkGatewayConnectionTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts index 0c922d3fea1d..604f80449cd7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. * * @summary Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRulePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRulePut.json */ async function virtualNetworkGatewayNatRulePut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts index 4fec20464fab..b31d98d7b9a3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a nat rule. * * @summary Deletes a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json */ async function virtualNetworkGatewayNatRuleDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts index 15f8a3c9765a..4247dd75a8d4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a nat rule. * * @summary Retrieves the details of a nat rule. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleGet.json */ async function virtualNetworkGatewayNatRuleGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts index b5b4bed9a691..adb2748f9f35 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all nat rules for a particular virtual network gateway. * * @summary Retrieves all nat rules for a particular virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleList.json */ async function virtualNetworkGatewayNatRuleList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts index 90b7ff6ec995..3f4cdd79cb8f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. * * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdate.json */ async function updateVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -100,7 +100,7 @@ async function updateVirtualNetworkGateway() { * This sample demonstrates how to Creates or updates a virtual network gateway in the specified resource group. * * @summary Creates or updates a virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkScalableGatewayUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayUpdate.json */ async function updateVirtualNetworkScalableGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysDeleteSample.ts index 751ed6017e57..d859b6bc764b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network gateway. * * @summary Deletes the specified virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayDelete.json */ async function deleteVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts index f0818851f218..07840f522b00 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Disconnect vpn connections of virtual network gateway in the specified resource group. * * @summary Disconnect vpn connections of virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json */ async function disconnectVpnConnectionsFromVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts index 9df279e7af1b..c053e6f4f81c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGenerateVpnProfileSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @summary Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json */ async function generateVirtualNetworkGatewayVpnProfile() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts index de68f557a49a..b9953c23190d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGeneratevpnclientpackageSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. * * @summary Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json */ async function generateVpnClientPackage() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts index 36ddb8853762..0b0be3d63b51 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetAdvertisedRoutesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @summary This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json */ async function getVirtualNetworkGatewayAdvertisedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts index 4fcc1effb020..da424c11c237 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetBgpPeerStatusSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @summary The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json */ async function getVirtualNetworkGatewayBgpPeerStatus() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts new file mode 100644 index 000000000000..94e6c0d0790e --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverAllTestDetailsSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to This operation retrieves the details of all the failover tests performed on the gateway for different peering locations + * + * @summary This operation retrieves the details of all the failover tests performed on the gateway for different peering locations + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json + */ +async function virtualNetworkGatewayGetFailoverAllTestsDetails() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const typeParam = "SingleSiteFailover"; + const fetchLatest = true; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginGetFailoverAllTestDetailsAndWait( + resourceGroupName, + virtualNetworkGatewayName, + typeParam, + fetchLatest, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayGetFailoverAllTestsDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts new file mode 100644 index 000000000000..d245a1df9094 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetFailoverSingleTestDetailsSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid + * + * @summary This operation retrieves the details of a particular failover test performed on the gateway based on the test Guid + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json + */ +async function virtualNetworkGatewayGetFailoverSingleTestDetails() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const peeringLocation = "Vancouver"; + const failoverTestId = "fe458ae8-d2ae-4520-a104-44bc233bde7e"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginGetFailoverSingleTestDetailsAndWait( + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + failoverTestId, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayGetFailoverSingleTestDetails(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts index 8eba17b5559a..23cf08102e4e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetLearnedRoutesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @summary This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json */ async function getVirtualNetworkGatewayLearnedRoutes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetSample.ts index 53a94693d140..ea12e1859f4e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified virtual network gateway by resource group. * * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGet.json */ async function getVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getVirtualNetworkGateway() { * This sample demonstrates how to Gets the specified virtual network gateway by resource group. * * @summary Gets the specified virtual network gateway by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkScalableGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayGet.json */ async function getVirtualNetworkScalableGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts index 3e79032b8e8d..d0a7220faae2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnProfilePackageUrlSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. * * @summary Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json */ async function getVirtualNetworkGatewayVpnProfilePackageUrl() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts index a5bfc637536e..bdb9c9797521 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnclientConnectionHealthSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. * * @summary Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json */ async function getVirtualNetworkGatewayVpnclientConnectionHealth() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts index 3cbe2039bcc5..e6081448d02e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysGetVpnclientIpsecParametersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. * * @summary The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json */ async function getVirtualNetworkGatewayVpnClientIpsecParameters() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts index 536aacadc805..7025f258b76c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysListConnectionsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the connections in a virtual network gateway. * * @summary Gets all the connections in a virtual network gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysListConnections.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysListConnections.json */ async function virtualNetworkGatewaysListConnections() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysListSample.ts index 0830ad10ab24..03d9afda1d18 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all virtual network gateways by resource group. * * @summary Gets all virtual network gateways by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayList.json */ async function listVirtualNetworkGatewaysinResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetSample.ts index ead014b55823..d51b5afdcf03 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the primary of the virtual network gateway in the specified resource group. * * @summary Resets the primary of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayReset.json */ async function resetVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts index 770bf9a80947..9b0a237a695d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysResetVpnClientSharedKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the VPN client shared key of the virtual network gateway in the specified resource group. * * @summary Resets the VPN client shared key of the virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json */ async function resetVpnClientSharedKey() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts index 83a0e4506853..9223ff38b65f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSetVpnclientIpsecParametersSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. * * @summary The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json */ async function setVirtualNetworkGatewayVpnClientIpsecParameters() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts new file mode 100644 index 000000000000..d1ca50c396af --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { NetworkManagementClient } from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to This operation starts failover simulation on the gateway for the specified peering location + * + * @summary This operation starts failover simulation on the gateway for the specified peering location + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json + */ +async function virtualNetworkGatewayStartSiteFailoverSimulation() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const peeringLocation = "Vancouver"; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginStartExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayStartSiteFailoverSimulation(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts index 1d5b2a766065..7d1241a8b1cd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStartPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. * * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVirtualNetworkGatewayWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -50,7 +50,7 @@ async function startPacketCaptureOnVirtualNetworkGatewayWithFilter() { * This sample demonstrates how to Starts packet capture on virtual network gateway in the specified resource group. * * @summary Starts packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCapture.json */ async function startPacketCaptureOnVirtualNetworkGatewayWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts new file mode 100644 index 000000000000..97031e7bef51 --- /dev/null +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSample.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ExpressRouteFailoverStopApiParameters, + NetworkManagementClient, +} from "@azure/arm-network"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to This operation stops failover simulation on the gateway for the specified peering location + * + * @summary This operation stops failover simulation on the gateway for the specified peering location + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json + */ +async function virtualNetworkGatewayStopSiteFailoverSimulation() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkGatewayName = "ergw"; + const stopParameters: ExpressRouteFailoverStopApiParameters = { + peeringLocation: "Vancouver", + wasSimulationSuccessful: true, + details: [ + { + failoverConnectionName: "conn1", + failoverLocation: "Denver", + isVerified: false, + }, + { + failoverConnectionName: "conn2", + failoverLocation: "Amsterdam", + isVerified: true, + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = + await client.virtualNetworkGateways.beginStopExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName, + virtualNetworkGatewayName, + stopParameters, + ); + console.log(result); +} + +async function main() { + virtualNetworkGatewayStopSiteFailoverSimulation(); +} + +main().catch(console.error); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts index cf53af796162..2486940f9462 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysStopPacketCaptureSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Stops packet capture on virtual network gateway in the specified resource group. * * @summary Stops packet capture on virtual network gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json */ async function stopPacketCaptureOnVirtualNetworkGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts index c82a93281bf2..3f8365095bef 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysSupportedVpnDevicesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a xml format representation for supported vpn devices. * * @summary Gets a xml format representation for supported vpn devices. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json */ async function listVirtualNetworkGatewaySupportedVpnDevices() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts index f4795e4ee2cf..aecef679749e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a virtual network gateway tags. * * @summary Updates a virtual network gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdateTags.json */ async function updateVirtualNetworkGatewayTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts index 83c4be37e215..23f10504a897 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkGatewaysVpnDeviceConfigurationScriptSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets a xml format representation for vpn device configuration script. * * @summary Gets a xml format representation for vpn device configuration script. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json */ async function getVpnDeviceConfigurationScript() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts index 5f14be58be7e..1e150a747e01 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsCreateOrUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringCreate.json */ async function createV6SubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -57,7 +57,7 @@ async function createV6SubnetPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringCreate.json */ async function createPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -88,7 +88,7 @@ async function createPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json */ async function createPeeringWithRemoteVirtualNetworkEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -119,7 +119,7 @@ async function createPeeringWithRemoteVirtualNetworkEncryption() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringCreate.json */ async function createSubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -154,7 +154,7 @@ async function createSubnetPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringSync.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringSync.json */ async function syncPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -190,7 +190,7 @@ async function syncPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringSync.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringSync.json */ async function syncV6SubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -228,7 +228,7 @@ async function syncV6SubnetPeering() { * This sample demonstrates how to Creates or updates a peering in the specified virtual network. * * @summary Creates or updates a peering in the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringSync.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringSync.json */ async function syncSubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsDeleteSample.ts index 809977f89018..5867740e0fa6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network peering. * * @summary Deletes the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringDelete.json */ async function deletePeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsGetSample.ts index 9044bb5ff615..d371f76b8de7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json */ async function getV6SubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +39,7 @@ async function getV6SubnetPeering() { * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringGet.json */ async function getPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -60,7 +60,7 @@ async function getPeering() { * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json */ async function getPeeringWithRemoteVirtualNetworkEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -81,7 +81,7 @@ async function getPeeringWithRemoteVirtualNetworkEncryption() { * This sample demonstrates how to Gets the specified virtual network peering. * * @summary Gets the specified virtual network peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringGet.json */ async function getSubnetPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsListSample.ts index 9c29cef11e26..30887725ae64 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkPeeringsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all virtual network peerings in a virtual network. * * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringList.json */ async function listPeerings() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -40,7 +40,7 @@ async function listPeerings() { * This sample demonstrates how to Gets all virtual network peerings in a virtual network. * * @summary Gets all virtual network peerings in a virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json */ async function listPeeringsWithRemoteVirtualNetworkEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts index 2b4e202eba50..c58f4b58be8b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a Virtual Network Tap. * * @summary Creates or updates a Virtual Network Tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapCreate.json */ async function createVirtualNetworkTap() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsDeleteSample.ts index 9e0960e129d7..da61cc8f35b4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network tap. * * @summary Deletes the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapDelete.json */ async function deleteVirtualNetworkTapResource() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsGetSample.ts index b42f374f251a..8d6af52f2d0c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the specified virtual network tap. * * @summary Gets information about the specified virtual network tap. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapGet.json */ async function getVirtualNetworkTap() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsListAllSample.ts index b52bd73aaa95..02a83991832e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. * * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapListAll.json */ async function listAllVirtualNetworkTaps() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts index 5d1947592b08..38e397a50820 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the VirtualNetworkTaps in a subscription. * * @summary Gets all the VirtualNetworkTaps in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapList.json */ async function listVirtualNetworkTapsInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsUpdateTagsSample.ts index 7e35d0b3fabd..3f794d4c6db9 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworkTapsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates an VirtualNetworkTap tags. * * @summary Updates an VirtualNetworkTap tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapUpdateTags.json */ async function updateVirtualNetworkTapTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts index 30d74acdf0a5..eb59749650a3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksCheckIPAddressAvailabilitySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether a private IP address is available for use. * * @summary Checks whether a private IP address is available for use. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json */ async function checkIPAddressAvailability() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksCreateOrUpdateSample.ts index 674ebb36a631..c6a88b0f06ec 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreate.json */ async function createVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -43,7 +43,7 @@ async function createVirtualNetwork() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateWithBgpCommunities.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithBgpCommunities.json */ async function createVirtualNetworkWithBgpCommunities() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -69,7 +69,7 @@ async function createVirtualNetworkWithBgpCommunities() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnetWithDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnetWithDelegation.json */ async function createVirtualNetworkWithDelegatedSubnets() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -105,7 +105,7 @@ async function createVirtualNetworkWithDelegatedSubnets() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateWithEncryption.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithEncryption.json */ async function createVirtualNetworkWithEncryption() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -131,7 +131,49 @@ async function createVirtualNetworkWithEncryption() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateServiceEndpoints.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithIpamPool.json + */ +async function createVirtualNetworkWithIpamPool() { + const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1"; + const virtualNetworkName = "test-vnet"; + const parameters: VirtualNetwork = { + addressSpace: { + ipamPoolPrefixAllocations: [ + { + id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", + numberOfIpAddresses: "65536", + }, + ], + }, + location: "eastus", + subnets: [ + { + name: "test-1", + ipamPoolPrefixAllocations: [ + { + id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool", + numberOfIpAddresses: "80", + }, + ], + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new NetworkManagementClient(credential, subscriptionId); + const result = await client.virtualNetworks.beginCreateOrUpdateAndWait( + resourceGroupName, + virtualNetworkName, + parameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. + * + * @summary Creates or updates a virtual network in the specified resource group. + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateServiceEndpoints.json */ async function createVirtualNetworkWithServiceEndpoints() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -162,7 +204,7 @@ async function createVirtualNetworkWithServiceEndpoints() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json */ async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -198,7 +240,7 @@ async function createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy( * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnet.json */ async function createVirtualNetworkWithSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -223,7 +265,7 @@ async function createVirtualNetworkWithSubnet() { * This sample demonstrates how to Creates or updates a virtual network in the specified resource group. * * @summary Creates or updates a virtual network in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json */ async function createVirtualNetworkWithSubnetContainingAddressPrefixes() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -251,6 +293,7 @@ async function main() { createVirtualNetworkWithBgpCommunities(); createVirtualNetworkWithDelegatedSubnets(); createVirtualNetworkWithEncryption(); + createVirtualNetworkWithIpamPool(); createVirtualNetworkWithServiceEndpoints(); createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy(); createVirtualNetworkWithSubnet(); diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksDeleteSample.ts index b3ff33ba55d2..de22d12443df 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified virtual network. * * @summary Deletes the specified virtual network. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkDelete.json */ async function deleteVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksGetSample.ts index 5447908bc5d1..a312d5a7277a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified virtual network by resource group. * * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGet.json */ async function getVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function getVirtualNetwork() { * This sample demonstrates how to Gets the specified virtual network by resource group. * * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetWithSubnetDelegation.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetWithSubnetDelegation.json */ async function getVirtualNetworkWithADelegatedSubnet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; @@ -56,7 +56,7 @@ async function getVirtualNetworkWithADelegatedSubnet() { * This sample demonstrates how to Gets the specified virtual network by resource group. * * @summary Gets the specified virtual network by resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetWithServiceAssociationLink.json */ async function getVirtualNetworkWithServiceAssociationLinks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListAllSample.ts index 271b04b1608b..11a9c19527b8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all virtual networks in a subscription. * * @summary Gets all virtual networks in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListAll.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListAll.json */ async function listAllVirtualNetworks() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts index 0ed451b61410..00804d3803f2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListDdosProtectionStatusSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gets the Ddos Protection Status of all IP Addresses under the Virtual Network * * @summary Gets the Ddos Protection Status of all IP Addresses under the Virtual Network - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json */ async function getDdosProtectionStatusOfAVirtualNetwork() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListSample.ts index ba7a35a713d3..9b300633244f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all virtual networks in a resource group. * * @summary Gets all virtual networks in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkList.json */ async function listVirtualNetworksInResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListUsageSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListUsageSample.ts index 1cc660523da0..65651ea56731 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListUsageSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksListUsageSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists usage stats. * * @summary Lists usage stats. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListUsage.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListUsage.json */ async function vnetGetUsage() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksUpdateTagsSample.ts index a1f81ae46357..df66ad575856 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualNetworksUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a virtual network tags. * * @summary Updates a virtual network tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkUpdateTags.json */ async function updateVirtualNetworkTags() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts index d5fb7cb87e9c..18ab522b2c00 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Virtual Router Peering. * * @summary Creates or updates the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringPut.json */ async function createVirtualRouterPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsDeleteSample.ts index 9334ee0d43bd..b8e56b50d9e1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified peering from a Virtual Router. * * @summary Deletes the specified peering from a Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringDelete.json */ async function deleteVirtualRouterPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsGetSample.ts index f165c6ddfef3..42347a78bf10 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Virtual Router Peering. * * @summary Gets the specified Virtual Router Peering. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringGet.json */ async function getVirtualRouterPeering() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsListSample.ts index dfc8a35079e6..71796a690d68 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualRouterPeeringsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Virtual Router Peerings in a Virtual Router resource. * * @summary Lists all Virtual Router Peerings in a Virtual Router resource. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringList.json */ async function listAllVirtualRouterPeeringsForAGivenVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersCreateOrUpdateSample.ts index ab07070d67c1..d22987b4b687 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates or updates the specified Virtual Router. * * @summary Creates or updates the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPut.json */ async function createVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersDeleteSample.ts index ce34efd85caf..0ad0e7ebc466 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified Virtual Router. * * @summary Deletes the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterDelete.json */ async function deleteVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersGetSample.ts index e6e6ade70d8a..8005e7f59716 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Virtual Router. * * @summary Gets the specified Virtual Router. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterGet.json */ async function getVirtualRouter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersListByResourceGroupSample.ts index c912d92c95ad..d10422ef1dbe 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all Virtual Routers in a resource group. * * @summary Lists all Virtual Routers in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListByResourceGroup.json */ async function listAllVirtualRouterForAGivenResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersListSample.ts index 78e584c70520..215a3816b5df 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualRoutersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Virtual Routers in a subscription. * * @summary Gets all the Virtual Routers in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListBySubscription.json */ async function listAllVirtualRoutersForAGivenSubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansCreateOrUpdateSample.ts index 66cbf05ffd5d..a6f0d85ff3c7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. * * @summary Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANPut.json */ async function virtualWanCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansDeleteSample.ts index a3972bb69844..993ab5ac2e29 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VirtualWAN. * * @summary Deletes a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANDelete.json */ async function virtualWanDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansGetSample.ts index eb78a85aff16..be3deaf5b822 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VirtualWAN. * * @summary Retrieves the details of a VirtualWAN. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANGet.json */ async function virtualWanGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansListByResourceGroupSample.ts index acd7a6bcfff2..88f623a1badb 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VirtualWANs in a resource group. * * @summary Lists all the VirtualWANs in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANListByResourceGroup.json */ async function virtualWanListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansListSample.ts index f1278bfbfca0..779cdbfd63ba 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VirtualWANs in a subscription. * * @summary Lists all the VirtualWANs in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANList.json */ async function virtualWanList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansUpdateTagsSample.ts index b7c6153263aa..d68fb996fc1d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/virtualWansUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/virtualWansUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates a VirtualWAN tags. * * @summary Updates a VirtualWAN tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANUpdateTags.json */ async function virtualWanUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsCreateOrUpdateSample.ts index 8839378c6106..c206e371f536 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. * * @summary Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionPut.json */ async function vpnConnectionPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsDeleteSample.ts index e3a360742d50..05e03f0949fd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a vpn connection. * * @summary Deletes a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionDelete.json */ async function vpnConnectionDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsGetSample.ts index 9df8a01ea7fd..f8b9dbd28216 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a vpn connection. * * @summary Retrieves the details of a vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionGet.json */ async function vpnConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsListByVpnGatewaySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsListByVpnGatewaySample.ts index a5316c774416..2a30b6f6a7fc 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsListByVpnGatewaySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsListByVpnGatewaySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all vpn connections for a particular virtual wan vpn gateway. * * @summary Retrieves all vpn connections for a particular virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionList.json */ async function vpnConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsStartPacketCaptureSample.ts index a7bbdf0ee1b1..e7685ec9322e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsStartPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. * * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVpnConnectionWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -52,7 +52,7 @@ async function startPacketCaptureOnVpnConnectionWithFilter() { * This sample demonstrates how to Starts packet capture on Vpn connection in the specified resource group. * * @summary Starts packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCapture.json */ async function startPacketCaptureOnVpnConnectionWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsStopPacketCaptureSample.ts index 68e3789eae3f..1d4dcbbe860a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnConnectionsStopPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Stops packet capture on Vpn connection in the specified resource group. * * @summary Stops packet capture on Vpn connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStopPacketCapture.json */ async function startPacketCaptureOnVpnConnectionWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysCreateOrUpdateSample.ts index f56207afa3ea..c6ff4aa33bb3 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. * * @summary Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayPut.json */ async function vpnGatewayPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysDeleteSample.ts index 201d3ec3a569..87c4e86d6f66 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a virtual wan vpn gateway. * * @summary Deletes a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayDelete.json */ async function vpnGatewayDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysGetSample.ts index ebde64cd0e08..749aae2cf33c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a virtual wan vpn gateway. * * @summary Retrieves the details of a virtual wan vpn gateway. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayGet.json */ async function vpnGatewayGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysListByResourceGroupSample.ts index b3fb03806a86..24e430f31556 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VpnGateways in a resource group. * * @summary Lists all the VpnGateways in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayListByResourceGroup.json */ async function vpnGatewayListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysListSample.ts index 3acaaccc9e8d..cf3e5881ddac 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VpnGateways in a subscription. * * @summary Lists all the VpnGateways in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayList.json */ async function vpnGatewayListBySubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysResetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysResetSample.ts index 7d04e0e08b45..fb1ba1a90aa8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysResetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysResetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the primary of the vpn gateway in the specified resource group. * * @summary Resets the primary of the vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayReset.json */ async function resetVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysStartPacketCaptureSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysStartPacketCaptureSample.ts index 3e0e2598af29..2f763d1a3a81 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysStartPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysStartPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. * * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json */ async function startPacketCaptureOnVpnGatewayWithFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; @@ -47,7 +47,7 @@ async function startPacketCaptureOnVpnGatewayWithFilter() { * This sample demonstrates how to Starts packet capture on vpn gateway in the specified resource group. * * @summary Starts packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCapture.json */ async function startPacketCaptureOnVpnGatewayWithoutFilter() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysStopPacketCaptureSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysStopPacketCaptureSample.ts index 1722980fdf8f..e92f1abf3b48 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysStopPacketCaptureSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysStopPacketCaptureSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Stops packet capture on vpn gateway in the specified resource group. * * @summary Stops packet capture on vpn gateway in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStopPacketCapture.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStopPacketCapture.json */ async function stopPacketCaptureOnVpnGateway() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysUpdateTagsSample.ts index 590698143f65..1339d984384c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnGatewaysUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates virtual wan vpn gateway tags. * * @summary Updates virtual wan vpn gateway tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayUpdateTags.json */ async function vpnGatewayUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts index db4f015bbc8e..1816024471fa 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetAllSharedKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all shared keys of VpnLink connection specified. * * @summary Lists all shared keys of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json */ async function vpnSiteLinkConnectionSharedKeysGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts index 550e6e9f6aeb..3be7ed88b0be 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetDefaultSharedKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the shared key of VpnLink connection specified. * * @summary Gets the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json */ async function vpnSiteLinkConnectionDefaultSharedKeyGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts index 2230c3b47d4f..4696e81589b6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsGetIkeSasSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. * * @summary Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json */ async function getVpnLinkConnectionIkeSa() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts index 8c489a3d6516..bee51e2a36b2 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsListByVpnConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. * * @summary Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionList.json */ async function vpnSiteLinkConnectionList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts index 4053781dd54a..d2f68adcc559 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsListDefaultSharedKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the value of the shared key of VpnLink connection specified. * * @summary Gets the value of the shared key of VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json */ async function vpnSiteLinkConnectionDefaultSharedKeyList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsResetConnectionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsResetConnectionSample.ts index 935b6bd37224..f17fdf15e05e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsResetConnectionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsResetConnectionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Resets the VpnLink connection specified. * * @summary Resets the VpnLink connection specified. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionReset.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionReset.json */ async function resetVpnLinkConnection() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts index 56495fc8d0c2..59e1d65b2eb6 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnLinkConnectionsSetOrInitDefaultSharedKeySample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. * * @summary Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json */ async function vpnSiteLinkConnectionDefaultSharedKeyPut() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts index 9457463f96df..72d16c5f37c4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsAssociatedWithVirtualWanListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. * * @summary Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetVirtualWanVpnServerConfigurations.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetVirtualWanVpnServerConfigurations.json */ async function getVirtualWanVpnServerConfigurations() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts index eb9989a83295..4fc1042ca9d1 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. * * @summary Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationPut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationPut.json */ async function vpnServerConfigurationCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsDeleteSample.ts index 00ed8d1f4f19..11b18d8b881b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VpnServerConfiguration. * * @summary Deletes a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationDelete.json */ async function vpnServerConfigurationDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsGetSample.ts index 0f653589b6d2..4c7937aa9fb4 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VpnServerConfiguration. * * @summary Retrieves the details of a VpnServerConfiguration. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationGet.json */ async function vpnServerConfigurationGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts index 636940333788..f1f18fd6d9a8 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the vpnServerConfigurations in a resource group. * * @summary Lists all the vpnServerConfigurations in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationListByResourceGroup.json */ async function vpnServerConfigurationListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsListSample.ts index c24000f5bd8b..5038e684b32b 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VpnServerConfigurations in a subscription. * * @summary Lists all the VpnServerConfigurations in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationList.json */ async function vpnServerConfigurationList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts index 70a42495ea59..9e57cde7eb8d 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnServerConfigurationsUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates VpnServerConfiguration tags. * * @summary Updates VpnServerConfiguration tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationUpdateTags.json */ async function vpnServerConfigurationUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinkConnectionsGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinkConnectionsGetSample.ts index 822c974ac506..d2384a75076c 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinkConnectionsGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinkConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a vpn site link connection. * * @summary Retrieves the details of a vpn site link connection. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGet.json */ async function vpnSiteLinkConnectionGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinksGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinksGetSample.ts index 4a2cb4e4fc57..6726d484240e 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinksGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinksGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VPN site link. * * @summary Retrieves the details of a VPN site link. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkGet.json */ async function vpnSiteGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinksListByVpnSiteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinksListByVpnSiteSample.ts index f10abff2c319..ab0032300db5 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinksListByVpnSiteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSiteLinksListByVpnSiteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the vpnSiteLinks in a resource group for a vpn site. * * @summary Lists all the vpnSiteLinks in a resource group for a vpn site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkListByVpnSite.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkListByVpnSite.json */ async function vpnSiteLinkListByVpnSite() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesConfigurationDownloadSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesConfigurationDownloadSample.ts index a828a90d140b..9af46d31c0c7 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesConfigurationDownloadSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesConfigurationDownloadSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Gives the sas-url to download the configurations for vpn-sites in a resource group. * * @summary Gives the sas-url to download the configurations for vpn-sites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitesConfigurationDownload.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitesConfigurationDownload.json */ async function vpnSitesConfigurationDownload() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesCreateOrUpdateSample.ts index 8e7f5ce803fd..ad538a476b4a 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. * * @summary Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitePut.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitePut.json */ async function vpnSiteCreate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesDeleteSample.ts index a862f3659e5b..abf4edfff149 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a VpnSite. * * @summary Deletes a VpnSite. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteDelete.json */ async function vpnSiteDelete() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesGetSample.ts index e36de56a3df9..cd33ee927638 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves the details of a VPN site. * * @summary Retrieves the details of a VPN site. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteGet.json */ async function vpnSiteGet() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesListByResourceGroupSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesListByResourceGroupSample.ts index 2f842c6910af..b4442d549052 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesListByResourceGroupSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the vpnSites in a resource group. * * @summary Lists all the vpnSites in a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteListByResourceGroup.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteListByResourceGroup.json */ async function vpnSiteListByResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesListSample.ts index ee4f44ee459f..11f258ad8939 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the VpnSites in a subscription. * * @summary Lists all the VpnSites in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteList.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteList.json */ async function vpnSiteList() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesUpdateTagsSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesUpdateTagsSample.ts index ff0a784965fd..aa5950ea52dc 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesUpdateTagsSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/vpnSitesUpdateTagsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Updates VpnSite tags. * * @summary Updates VpnSite tags. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteUpdateTags.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteUpdateTags.json */ async function vpnSiteUpdate() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts index 9cb244e2009c..87816cb5a331 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates or update policy with specified rule set name within a resource group. * * @summary Creates or update policy with specified rule set name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyCreateOrUpdate.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyCreateOrUpdate.json */ async function createsOrUpdatesAWafPolicyWithinAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts index 32bc13f7dee8..1285617d3345 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes Policy. * * @summary Deletes Policy. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyDelete.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyDelete.json */ async function deletesAWafPolicyWithinAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesGetSample.ts index 283a32374862..fa7536bcbe24 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieve protection policy with specified name within a resource group. * * @summary Retrieve protection policy with specified name within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyGet.json */ async function getsAWafPolicyWithinAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesListAllSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesListAllSample.ts index 69f15ce7c71d..e0594fc43351 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesListAllSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesListAllSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the WAF policies in a subscription. * * @summary Gets all the WAF policies in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListAllPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListAllPolicies.json */ async function listsAllWafPoliciesInASubscription() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesListSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesListSample.ts index 05fe7b81c1ab..b4160222f90f 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesListSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/webApplicationFirewallPoliciesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all of the protection policies within a resource group. * * @summary Lists all of the protection policies within a resource group. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListPolicies.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListPolicies.json */ async function listsAllWafPoliciesInAResourceGroup() { const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/network/arm-network/samples/v33/typescript/src/webCategoriesGetSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/webCategoriesGetSample.ts index 015d50696893..e32efe9a78fd 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/webCategoriesGetSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/webCategoriesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified Azure Web Category. * * @summary Gets the specified Azure Web Category. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoryGet.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoryGet.json */ async function getAzureWebCategoryByName() { const subscriptionId = diff --git a/sdk/network/arm-network/samples/v33/typescript/src/webCategoriesListBySubscriptionSample.ts b/sdk/network/arm-network/samples/v33/typescript/src/webCategoriesListBySubscriptionSample.ts index 35a75ce730a8..70bd3b6cc040 100644 --- a/sdk/network/arm-network/samples/v33/typescript/src/webCategoriesListBySubscriptionSample.ts +++ b/sdk/network/arm-network/samples/v33/typescript/src/webCategoriesListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all the Azure Web Categories in a subscription. * * @summary Gets all the Azure Web Categories in a subscription. - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoriesListBySubscription.json + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoriesListBySubscription.json */ async function listAllAzureWebCategoriesForAGivenSubscription() { const subscriptionId = diff --git a/sdk/network/arm-network/src/models/index.ts b/sdk/network/arm-network/src/models/index.ts index eeb6e57501f9..12718478c1be 100644 --- a/sdk/network/arm-network/src/models/index.ts +++ b/sdk/network/arm-network/src/models/index.ts @@ -310,6 +310,19 @@ export interface NatGatewaySku { name?: NatGatewaySkuName; } +/** IpamPool prefix allocation reference. */ +export interface IpamPoolPrefixAllocation { + /** Number of IP addresses to allocate. */ + numberOfIpAddresses?: string; + /** + * List of assigned IP address prefixes in the IpamPool of the associated resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly allocatedAddressPrefixes?: string[]; + /** Resource id of the associated Azure IpamPool resource. */ + id?: string; +} + /** Gateway load balancer tunnel interface of a load balancer backend address pool. */ export interface GatewayLoadBalancerTunnelInterface { /** Port of gateway load balancer tunnel interface. */ @@ -1908,7 +1921,7 @@ export interface SingleQueryResult { mode?: FirewallPolicyIdpsSignatureMode; /** Describes the severity of signature: 1 - High, 2 - Medium, 3 - Low */ severity?: FirewallPolicyIdpsSignatureSeverity; - /** Describes in which direction signature is being enforced: 0 - OutBound, 1 - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound */ + /** Describes in which direction signature is being enforced: 0 - OutBound, 1 - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound, 5 - InternalInbound */ direction?: FirewallPolicyIdpsSignatureDirection; /** Describes the groups the signature belongs to */ group?: string; @@ -1962,6 +1975,261 @@ export interface SignaturesOverridesList { value?: SignaturesOverrides[]; } +/** List of IpamPool */ +export interface IpamPoolList { + value?: IpamPool[]; + /** The link used to get the next page of operations. */ + nextLink?: string; +} + +/** Properties of IpamPool resource properties which are specific to the Pool resource. */ +export interface IpamPoolProperties { + description?: string; + /** String representing a friendly name for the resource. */ + displayName?: string; + /** + * List of IP address type for the IpamPool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipAddressType?: IpType[]; + /** String representing parent IpamPool resource name. If empty the IpamPool will be a root pool. */ + parentPoolName?: string; + /** List of IP address prefixes of the resource. */ + addressPrefixes: string[]; + /** Provisioning states of a resource. */ + provisioningState?: ProvisioningState; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface CommonResource { + /** + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The type of identity that last modified the resource. */ + lastModifiedAt?: Date; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface CommonErrorResponse { + /** The error object. */ + error?: CommonErrorDetail; +} + +/** The error detail. */ +export interface CommonErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: CommonErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: CommonErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface CommonErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** Represents the IpamPool update API request interface. */ +export interface IpamPoolUpdate { + /** Dictionary of */ + tags?: { [propertyName: string]: string }; + /** Represents the IpamPool update properties. */ + properties?: IpamPoolUpdateProperties; +} + +/** Represents the IpamPool update properties. */ +export interface IpamPoolUpdateProperties { + description?: string; + /** String representing a friendly name for the resource. */ + displayName?: string; +} + +/** IpamPool usage information. */ +export interface PoolUsage { + /** + * List of IP address prefixes of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly addressPrefixes?: string[]; + /** + * List of IpamPool that are children of this IpamPool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly childPools?: ResourceBasics[]; + /** + * List of assigned IP address prefixes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly allocatedAddressPrefixes?: string[]; + /** + * List of reserved IP address prefixes. These IP addresses could be reclaimed if not assigned in the given time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reservedAddressPrefixes?: string[]; + /** + * List of available IP address prefixes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly availableAddressPrefixes?: string[]; + /** + * Total number of IP addresses managed in the IpamPool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalNumberOfIPAddresses?: string; + /** + * Total number of assigned IP addresses in the IpamPool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly numberOfAllocatedIPAddresses?: string; + /** + * Total number of reserved IP addresses in the IpamPool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly numberOfReservedIPAddresses?: string; + /** + * Total number of available IP addresses in the IpamPool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly numberOfAvailableIPAddresses?: string; +} + +/** Representation of basic resource information. */ +export interface ResourceBasics { + /** ResourceId of the Azure resource. */ + resourceId?: string; + /** List of IP address prefixes of the resource. */ + addressPrefixes?: string[]; +} + +/** List of PoolAssociation */ +export interface PoolAssociationList { + value?: PoolAssociation[]; + /** The link used to get the next page of operations. */ + nextLink?: string; +} + +/** IpamPool association information. */ +export interface PoolAssociation { + /** Resource id of the associated Azure resource. */ + resourceId: string; + /** IpamPool id for which the resource is associated to. */ + poolId?: string; + description?: string; + /** + * List of assigned IP address prefixes in the IpamPool of the associated resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly addressPrefixes?: string[]; + /** + * List of reserved IP address prefixes in the IpamPool of the associated resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reservedPrefixes?: string[]; + /** + * Total number of assigned IP addresses of the association. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalNumberOfIPAddresses?: string; + /** + * Total number of reserved IP addresses of the association. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly numberOfReservedIPAddresses?: string; + /** + * Creation time of the association. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdAt?: Date; + /** + * Expire time for IP addresses reserved. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reservationExpiresAt?: Date; +} + +/** List of StaticCidr */ +export interface StaticCidrList { + value?: StaticCidr[]; + /** The link used to get the next page of operations. */ + nextLink?: string; +} + +/** Properties of static CIDR resource. */ +export interface StaticCidrProperties { + description?: string; + /** Number of IP addresses to allocate for a static CIDR resource. The IP addresses will be assigned based on IpamPools available space. */ + numberOfIPAddressesToAllocate?: string; + /** List of IP address prefixes of the resource. */ + addressPrefixes?: string[]; + /** + * Total number of IP addresses allocated for the static CIDR resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalNumberOfIPAddresses?: string; + /** Provisioning states of a resource. */ + provisioningState?: ProvisioningState; +} + /** Response for the ListIpAllocations API service call. */ export interface IpAllocationListResult { /** A list of IpAllocation resources. */ @@ -2115,6 +2383,28 @@ export interface InboundNatRulePortMapping { readonly backendPort?: number; } +/** The response for a Health API. */ +export interface LoadBalancerHealthPerRule { + /** Number of backend instances associated to the LB rule that are considered healthy. */ + up?: number; + /** Number of backend instances associated to the LB rule that are considered unhealthy. */ + down?: number; + /** Information about the health per rule of the backend addresses. */ + loadBalancerBackendAddresses?: LoadBalancerHealthPerRulePerBackendAddress[]; +} + +/** The information about health per rule per backend address. */ +export interface LoadBalancerHealthPerRulePerBackendAddress { + /** The IP address belonging to the backend address. */ + ipAddress?: string; + /** The id of the network interface ip configuration belonging to the backend address */ + networkInterfaceIPConfigurationId?: NetworkInterfaceIPConfiguration; + /** The current health of the backend instances that is associated to the LB rule. */ + state?: string; + /** The explanation of the State */ + reason?: string; +} + /** The request for a migrateToIpBased API. */ export interface MigrateLoadBalancerToIpBasedRequest { /** A list of pool names that should be migrated from Nic based to IP based pool */ @@ -2296,22 +2586,6 @@ export interface CrossTenantScopes { readonly subscriptions?: string[]; } -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The type of identity that last modified the resource. */ - lastModifiedAt?: Date; -} - /** Object for patch operations. */ export interface PatchObject { /** Resource tags. */ @@ -2589,6 +2863,52 @@ export interface StaticMemberListResult { nextLink?: string; } +/** A list of network manager routing configurations */ +export interface NetworkManagerRoutingConfigurationListResult { + /** Gets a page of routing configurations */ + value?: NetworkManagerRoutingConfiguration[]; + /** Gets the URL to get the next page of results. */ + nextLink?: string; +} + +/** Routing configuration rule collection list result. */ +export interface RoutingRuleCollectionListResult { + /** A list of network manager routing configuration rule collections */ + value?: RoutingRuleCollection[]; + /** Gets the URL to get the next set of results. */ + nextLink?: string; +} + +/** Network manager routing group item. */ +export interface NetworkManagerRoutingGroupItem { + /** Network manager group Id. */ + networkGroupId: string; +} + +/** Routing configuration rule list result. */ +export interface RoutingRuleListResult { + /** A list of routing rules. */ + value?: RoutingRule[]; + /** The URL to get the next set of results. */ + nextLink?: string; +} + +/** Route destination. */ +export interface RoutingRuleRouteDestination { + /** Destination type. */ + type: RoutingRuleDestinationType; + /** Destination address. */ + destinationAddress: string; +} + +/** Next hop. */ +export interface RoutingRuleNextHop { + /** Next hop type. */ + nextHopType: RoutingRuleNextHopType; + /** Next hop address. Only required if the next hop type is VirtualAppliance. */ + nextHopAddress?: string; +} + /** List of scope connections. */ export interface ScopeConnectionListResult { /** List of scope connections. */ @@ -2659,95 +2979,148 @@ export interface AddressPrefixItem { addressPrefixType?: AddressPrefixType; } -/** A list of network manager routing configurations */ -export interface NetworkManagerRoutingConfigurationListResult { - /** Gets a page of routing configurations */ - value?: NetworkManagerRoutingConfiguration[]; - /** Gets the URL to get the next page of results. */ +/** The ip configuration for a container network interface. */ +export interface ContainerNetworkInterfaceIpConfiguration { + /** The name of the resource. This name can be used to access the resource. */ + name?: string; + /** + * Sub Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * A unique read-only string that changes whenever the resource is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** + * The provisioning state of the container network interface IP configuration resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Response for ListNetworkProfiles API service call. */ +export interface NetworkProfileListResult { + /** A list of network profiles that exist in a resource group. */ + value?: NetworkProfile[]; + /** The URL to get the next set of results. */ nextLink?: string; } -/** Routing configuration rule collection list result. */ -export interface RoutingRuleCollectionListResult { - /** A list of network manager routing configuration rule collections */ - value?: RoutingRuleCollection[]; - /** Gets the URL to get the next set of results. */ +/** Response for ListNetworkSecurityGroups API service call. */ +export interface NetworkSecurityGroupListResult { + /** A list of NetworkSecurityGroup resources. */ + value?: NetworkSecurityGroup[]; + /** The URL to get the next set of results. */ nextLink?: string; } -/** Network manager routing group item. */ -export interface NetworkManagerRoutingGroupItem { - /** Network manager group Id. */ - networkGroupId: string; -} - -/** Routing configuration rule list result. */ -export interface RoutingRuleListResult { - /** A list of routing rules. */ - value?: RoutingRule[]; +/** Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. */ +export interface SecurityRuleListResult { + /** The security rules in a network security group. */ + value?: SecurityRule[]; /** The URL to get the next set of results. */ nextLink?: string; } -/** Route destination. */ -export interface RoutingRuleRouteDestination { - /** Destination type. */ - type: RoutingRuleDestinationType; - /** Destination address. */ - destinationAddress: string; +/** A list of Reachability Analysis Intents. */ +export interface ReachabilityAnalysisIntentListResult { + /** Gets a page of Reachability Analysis Intents */ + value?: ReachabilityAnalysisIntent[]; + /** Gets the URL to get the next page of results. */ + nextLink?: string; } -/** Next hop. */ -export interface RoutingRuleNextHop { - /** Next hop type. */ - nextHopType: RoutingRuleNextHopType; - /** Next hop address. Only required if the next hop type is VirtualAppliance. */ - nextHopAddress?: string; +/** Represents the Reachability Analysis Intent properties. */ +export interface ReachabilityAnalysisIntentProperties { + /** Provisioning states of a resource. */ + provisioningState?: ProvisioningState; + description?: string; + /** Source resource id to verify the reachability path of. */ + sourceResourceId: string; + /** Destination resource id to verify the reachability path of. */ + destinationResourceId: string; + /** IP traffic information. */ + ipTraffic: IPTraffic; +} + +/** IP traffic information. */ +export interface IPTraffic { + /** List of source IP addresses of the traffic.. */ + sourceIps: string[]; + /** List of destination IP addresses of the traffic.. */ + destinationIps: string[]; + /** The source ports of the traffic. */ + sourcePorts: string[]; + /** The destination ports of the traffic. */ + destinationPorts: string[]; + protocols: NetworkProtocol[]; +} + +/** A list of Reachability Analysis Run */ +export interface ReachabilityAnalysisRunListResult { + /** Gets a page of Reachability Analysis Runs. */ + value?: ReachabilityAnalysisRun[]; + /** Gets the URL to get the next page of results. */ + nextLink?: string; } -/** The ip configuration for a container network interface. */ -export interface ContainerNetworkInterfaceIpConfiguration { - /** The name of the resource. This name can be used to access the resource. */ - name?: string; - /** - * Sub Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * A unique read-only string that changes whenever the resource is updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; +/** Represents the Reachability Analysis Run properties. */ +export interface ReachabilityAnalysisRunProperties { + description?: string; + /** Id of the intent resource to run analysis on. */ + intentId: string; /** - * The provisioning state of the container network interface IP configuration resource. + * Intent information. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ProvisioningState; + readonly intentContent?: IntentContent; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly analysisResult?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly errorMessage?: string; + /** Provisioning states of a resource. */ + provisioningState?: ProvisioningState; } -/** Response for ListNetworkProfiles API service call. */ -export interface NetworkProfileListResult { - /** A list of network profiles that exist in a resource group. */ - value?: NetworkProfile[]; - /** The URL to get the next set of results. */ +/** Intent information. */ +export interface IntentContent { + description?: string; + /** Source resource id of the intent. */ + sourceResourceId: string; + /** Destination resource id of the intent. */ + destinationResourceId: string; + /** IP traffic information. */ + ipTraffic: IPTraffic; +} + +/** A list of Verifier Workspace */ +export interface VerifierWorkspaceListResult { + /** Gets a page of Verifier Workspaces. */ + value?: VerifierWorkspace[]; + /** Gets the URL to get the next page of results. */ nextLink?: string; } -/** Response for ListNetworkSecurityGroups API service call. */ -export interface NetworkSecurityGroupListResult { - /** A list of NetworkSecurityGroup resources. */ - value?: NetworkSecurityGroup[]; - /** The URL to get the next set of results. */ - nextLink?: string; +/** Properties of Verifier Workspace resource. */ +export interface VerifierWorkspaceProperties { + description?: string; + /** Provisioning states of a resource. */ + provisioningState?: ProvisioningState; } -/** Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. */ -export interface SecurityRuleListResult { - /** The security rules in a network security group. */ - value?: SecurityRule[]; - /** The URL to get the next set of results. */ - nextLink?: string; +/** Represents the VerifierWorkspace update API request interface. */ +export interface VerifierWorkspaceUpdate { + /** Dictionary of */ + tags?: { [propertyName: string]: string }; + /** Represents the VerifierWorkspace update properties. */ + properties?: VerifierWorkspaceUpdateProperties; +} + +/** Represents the VerifierWorkspace update properties. */ +export interface VerifierWorkspaceUpdateProperties { + description?: string; } /** Network Virtual Appliance Sku Properties. */ @@ -2840,7 +3213,7 @@ export interface DelegationProperties { /** The service name to which the NVA is delegated. */ serviceName?: string; /** - * The current provisioning state. + * Provisioning states of a resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; @@ -4568,6 +4941,8 @@ export interface UsageName { export interface AddressSpace { /** A list of address blocks reserved for this virtual network in CIDR notation. */ addressPrefixes?: string[]; + /** A list of IPAM Pools allocating IP address prefixes. */ + ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; } /** DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. */ @@ -5091,6 +5466,94 @@ export interface VpnPacketCaptureStopParameters { sasUrl?: string; } +/** ExpressRoute failover test details */ +export interface ExpressRouteFailoverTestDetails { + /** Peering location of the test */ + peeringLocation?: string; + /** All circuits in the peering location */ + circuits?: ExpressRouteFailoverCircuitResourceDetails[]; + /** The current status of the test */ + status?: FailoverTestStatus; + /** Time when the test was started */ + startTime?: string; + /** Time when the test was completed */ + endTime?: string; + /** All connections to the circuits in the peering location */ + connections?: ExpressRouteFailoverConnectionResourceDetails[]; + /** The unique GUID associated with the test */ + testGuid?: string; + /** The type of failover test */ + testType?: FailoverTestType; + /** A list of all issues with the test */ + issues?: string[]; +} + +export interface ExpressRouteFailoverCircuitResourceDetails { + /** NRP Resource URI of the circuit */ + nrpResourceUri?: string; + /** Circuit Name */ + name?: string; + /** Connection name associated with the circuit */ + connectionName?: string; +} + +export interface ExpressRouteFailoverConnectionResourceDetails { + /** NRP Resource URI of the connection */ + nrpResourceUri?: string; + /** Connection Name */ + name?: string; + /** The current status of the connection */ + status?: FailoverConnectionStatus; + /** Time when the connection was last updated */ + lastUpdatedTime?: string; +} + +/** ExpressRoute failover single test details */ +export interface ExpressRouteFailoverSingleTestDetails { + /** Peering location of the test */ + peeringLocation?: string; + /** The current status of the test */ + status?: FailoverTestStatusForSingleTest; + /** Time when the test was started */ + startTimeUtc?: string; + /** Time when the test was completed */ + endTimeUtc?: string; + /** List of routes received from this peering as well as some other peering location */ + redundantRoutes?: ExpressRouteFailoverRedundantRoute[]; + /** List of al the routes that were received only from this peering location */ + nonRedundantRoutes?: string[]; + /** Whether the failover simulation was successful or not */ + wasSimulationSuccessful?: boolean; + /** List of all the failover connections for this peering location */ + failoverConnectionDetails?: FailoverConnectionDetails[]; +} + +export interface ExpressRouteFailoverRedundantRoute { + /** A list of all the peering locations for the redundant routes */ + peeringLocations?: string[]; + /** A list of all the redundant routes in the peering locations */ + routes?: string[]; +} + +export interface FailoverConnectionDetails { + /** Name of the failover connection */ + failoverConnectionName?: string; + /** Location of the failover connection */ + failoverLocation?: string; + /** Whether the customer was able to establish connectivity through this failover connection or not */ + isVerified?: boolean; +} + +/** Start packet capture parameters on virtual network gateway. */ +export interface ExpressRouteFailoverStopApiParameters { + /** Peering location of the test */ + peeringLocation?: string; + /** Whether the failover simulation was successful or not */ + wasSimulationSuccessful?: boolean; + /** List of all the failover connections for this peering location */ + details?: FailoverConnectionDetails[]; +} + /** Response for the ListVirtualNetworkGatewayConnections API service call. */ export interface VirtualNetworkGatewayConnectionListResult { /** A list of VirtualNetworkGatewayConnection resources that exists in a resource group. */ @@ -6841,6 +7304,8 @@ export interface Subnet extends SubResource { sharingScope?: SharingScope; /** Set this property to false to disable default outbound connectivity for all VMs in the subnet. This property can only be set at the time of subnet creation and cannot be updated for an existing subnet. */ defaultOutboundAccess?: boolean; + /** A list of IPAM Pools for allocating IP address prefixes. */ + ipamPoolPrefixAllocations?: IpamPoolPrefixAllocation[]; } /** Frontend IP address of the load balancer. */ @@ -7735,7 +8200,7 @@ export interface BastionHostIPConfiguration extends SubResource { readonly type?: string; /** Reference of the subnet resource. */ subnet?: SubResource; - /** Reference of the PublicIP resource. */ + /** Reference of the PublicIP resource. Null for private only bastion */ publicIPAddress?: SubResource; /** * The provisioning state of the bastion host IP configuration resource. @@ -9385,6 +9850,11 @@ export interface NetworkInterface extends Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly vnetEncryptionSupported?: boolean; + /** + * Whether default outbound connectivity for nic was configured or not. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly defaultOutboundConnectivityEnabled?: boolean; /** If the network interface is configured for accelerated networking. Not applicable to VM sizes which require accelerated networking. */ enableAcceleratedNetworking?: boolean; /** Indicates whether to disable tcp state tracking. */ @@ -9918,6 +10388,8 @@ export interface BastionHost extends Resource { enableKerberos?: boolean; /** Enable/Disable Session Recording feature of the Bastion Host resource. */ enableSessionRecording?: boolean; + /** Enable/Disable Private Only feature of the Bastion Host resource. */ + enablePrivateOnlyBastion?: boolean; } /** Describes a Virtual Machine. */ @@ -11402,6 +11874,17 @@ export interface FirewallPolicyFilterRuleCollection rules?: FirewallPolicyRuleUnion[]; } +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface CommonTrackedResource extends CommonResource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface CommonProxyResource extends CommonResource {} + /** Active connectivity configuration. */ export interface ActiveConnectivityConfiguration extends EffectiveConnectivityConfiguration { @@ -11602,6 +12085,77 @@ export interface StaticMember extends ChildResource { readonly provisioningState?: ProvisioningState; } +/** Defines the routing configuration */ +export interface NetworkManagerRoutingConfiguration extends ChildResource { + /** + * The system metadata related to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** A description of the routing configuration. */ + description?: string; + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Unique identifier for this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceGuid?: string; +} + +/** Defines the routing rule collection. */ +export interface RoutingRuleCollection extends ChildResource { + /** + * The system metadata related to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** A description of the routing rule collection. */ + description?: string; + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Unique identifier for this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceGuid?: string; + /** Groups for configuration */ + appliesTo?: NetworkManagerRoutingGroupItem[]; + /** Determines whether BGP route propagation is enabled. Defaults to true. */ + disableBgpRoutePropagation?: DisableBgpRoutePropagation; +} + +/** Network routing rule. */ +export interface RoutingRule extends ChildResource { + /** + * The system metadata related to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** A description for this rule. */ + description?: string; + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Unique identifier for this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceGuid?: string; + /** Indicates the destination for this particular rule. */ + destination?: RoutingRuleRouteDestination; + /** Indicates the next hop for this particular rule. */ + nextHop?: RoutingRuleNextHop; +} + /** The Scope Connections resource */ export interface ScopeConnection extends ChildResource { /** @@ -11633,6 +12187,8 @@ export interface SecurityAdminConfiguration extends ChildResource { description?: string; /** Enum list of network intent policy based services. */ applyOnNetworkIntentPolicyBasedServices?: NetworkIntentPolicyBasedService[]; + /** Determine update behavior for changes to network groups referenced within the rules in this configuration. */ + networkGroupAddressSpaceAggregationOption?: AddressSpaceAggregationOption; /** * The provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -11756,77 +12312,6 @@ export interface SecurityUserRule extends ChildResource { readonly resourceGuid?: string; } -/** Defines the routing configuration */ -export interface NetworkManagerRoutingConfiguration extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the routing configuration. */ - description?: string; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; -} - -/** Defines the routing rule collection. */ -export interface RoutingRuleCollection extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description of the routing rule collection. */ - description?: string; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** Groups for configuration */ - appliesTo?: NetworkManagerRoutingGroupItem[]; - /** Determines whether BGP route propagation is enabled. Defaults to true. */ - disableBgpRoutePropagation?: DisableBgpRoutePropagation; -} - -/** Network routing rule. */ -export interface RoutingRule extends ChildResource { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description for this rule. */ - description?: string; - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGuid?: string; - /** Indicates the destination for this particular rule. */ - destination?: RoutingRuleRouteDestination; - /** Indicates the next hop for this particular rule. */ - nextHop?: RoutingRuleNextHop; -} - /** Network admin rule. */ export interface EffectiveSecurityAdminRule extends EffectiveBaseSecurityAdminRule { @@ -12028,11 +12513,41 @@ export interface NetworkRule extends FirewallPolicyRule { destinationFqdns?: string[]; } -/** Network admin rule. */ -export interface AdminRule extends BaseAdminRule { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "Custom"; - /** A description for this rule. Restricted to 140 chars. */ +/** Instance of Pool resource. */ +export interface IpamPool extends CommonTrackedResource { + /** Properties of IpamPool resource properties which are specific to the Pool resource. */ + properties: IpamPoolProperties; +} + +/** Instance of Verifier Workspace. */ +export interface VerifierWorkspace extends CommonTrackedResource { + /** Properties of Verifier Workspace resource. */ + properties?: VerifierWorkspaceProperties; +} + +/** Instance of StaticCidr resource. */ +export interface StaticCidr extends CommonProxyResource { + /** Properties of static CIDR resource. */ + properties?: StaticCidrProperties; +} + +/** Configuration information or intent on which to do the analysis on. */ +export interface ReachabilityAnalysisIntent extends CommonProxyResource { + /** Represents the Reachability Analysis Intent properties. */ + properties: ReachabilityAnalysisIntentProperties; +} + +/** Configuration information for analysis run. */ +export interface ReachabilityAnalysisRun extends CommonProxyResource { + /** Represents the Reachability Analysis Run properties. */ + properties: ReachabilityAnalysisRunProperties; +} + +/** Network admin rule. */ +export interface AdminRule extends BaseAdminRule { + /** Polymorphic discriminator, which specifies the different types this object can be */ + kind: "Custom"; + /** A description for this rule. Restricted to 140 chars. */ description?: string; /** Network protocol this rule applies to. */ protocol?: SecurityConfigurationRuleProtocol; @@ -12203,12 +12718,33 @@ export interface FirewallPolicyDeploymentsDeployHeaders { azureAsyncOperation?: string; } +/** Defines headers for IpamPools_create operation. */ +export interface IpamPoolsCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for IpamPools_delete operation. */ +export interface IpamPoolsDeleteHeaders { + location?: string; +} + +/** Defines headers for StaticCidrs_delete operation. */ +export interface StaticCidrsDeleteHeaders { + location?: string; +} + /** Defines headers for IpAllocations_delete operation. */ export interface IpAllocationsDeleteHeaders { /** The URL of the resource used to check the status of the asynchronous operation. */ location?: string; } +/** Defines headers for LoadBalancerLoadBalancingRules_health operation. */ +export interface LoadBalancerLoadBalancingRulesHealthHeaders { + /** URI to query the status of the long-running operation. */ + location?: string; +} + /** Defines headers for NetworkManagers_delete operation. */ export interface NetworkManagersDeleteHeaders { /** The URL of the resource used to check the status of the asynchronous operation. */ @@ -12239,6 +12775,24 @@ export interface NetworkGroupsDeleteHeaders { location?: string; } +/** Defines headers for NetworkManagerRoutingConfigurations_delete operation. */ +export interface NetworkManagerRoutingConfigurationsDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for RoutingRuleCollections_delete operation. */ +export interface RoutingRuleCollectionsDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for RoutingRules_delete operation. */ +export interface RoutingRulesDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; +} + /** Defines headers for SecurityAdminConfigurations_delete operation. */ export interface SecurityAdminConfigurationsDeleteHeaders { /** The URL of the resource used to check the status of the asynchronous operation. */ @@ -12275,20 +12829,14 @@ export interface SecurityUserRulesDeleteHeaders { location?: string; } -/** Defines headers for NetworkManagerRoutingConfigurations_delete operation. */ -export interface NetworkManagerRoutingConfigurationsDeleteHeaders { - /** The URL of the resource used to check the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for RoutingRuleCollections_delete operation. */ -export interface RoutingRuleCollectionsDeleteHeaders { +/** Defines headers for ReachabilityAnalysisRuns_delete operation. */ +export interface ReachabilityAnalysisRunsDeleteHeaders { /** The URL of the resource used to check the status of the asynchronous operation. */ location?: string; } -/** Defines headers for RoutingRules_delete operation. */ -export interface RoutingRulesDeleteHeaders { +/** Defines headers for VerifierWorkspaces_delete operation. */ +export interface VerifierWorkspacesDeleteHeaders { /** The URL of the resource used to check the status of the asynchronous operation. */ location?: string; } @@ -12347,6 +12895,26 @@ export interface RouteFilterRulesDeleteHeaders { azureAsyncOperation?: string; } +/** Defines headers for VirtualNetworkGateways_getFailoverAllTestDetails operation. */ +export interface VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders { + location?: string; +} + +/** Defines headers for VirtualNetworkGateways_getFailoverSingleTestDetails operation. */ +export interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders { + location?: string; +} + +/** Defines headers for VirtualNetworkGateways_startExpressRouteSiteFailoverSimulation operation. */ +export interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders { + location?: string; +} + +/** Defines headers for VirtualNetworkGateways_stopExpressRouteSiteFailoverSimulation operation. */ +export interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders { + location?: string; +} + /** Defines headers for NetworkVirtualApplianceConnections_delete operation. */ export interface NetworkVirtualApplianceConnectionsDeleteHeaders { /** The URL of the resource used to check the status of the asynchronous operation. */ @@ -12628,14 +13196,18 @@ export type ApplicationGatewayOperationalState = string; /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { + /** Failed */ + Failed = "Failed", /** Succeeded */ Succeeded = "Succeeded", + /** Canceled */ + Canceled = "Canceled", + /** Creating */ + Creating = "Creating", /** Updating */ Updating = "Updating", /** Deleting */ Deleting = "Deleting", - /** Failed */ - Failed = "Failed", } /** @@ -12643,10 +13215,12 @@ export enum KnownProvisioningState { * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **Failed** \ * **Succeeded** \ + * **Canceled** \ + * **Creating** \ * **Updating** \ - * **Deleting** \ - * **Failed** + * **Deleting** */ export type ProvisioningState = string; @@ -14318,6 +14892,48 @@ export enum KnownFirewallPolicyIdpsQuerySortOrder { */ export type FirewallPolicyIdpsQuerySortOrder = string; +/** Known values of {@link IpType} that the service accepts. */ +export enum KnownIpType { + /** IPv4 */ + IPv4 = "IPv4", + /** IPv6 */ + IPv6 = "IPv6", +} + +/** + * Defines values for IpType. \ + * {@link KnownIpType} can be used interchangeably with IpType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4** \ + * **IPv6** + */ +export type IpType = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key", +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + /** Known values of {@link IpAllocationType} that the service accepts. */ export enum KnownIpAllocationType { /** Undefined */ @@ -14543,30 +15159,6 @@ export enum KnownConfigurationType { */ export type ConfigurationType = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key", -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - /** Known values of {@link DeploymentStatus} that the service accepts. */ export enum KnownDeploymentStatus { /** NotStarted */ @@ -14744,6 +15336,69 @@ export enum KnownScopeConnectionState { */ export type ScopeConnectionState = string; +/** Known values of {@link DisableBgpRoutePropagation} that the service accepts. */ +export enum KnownDisableBgpRoutePropagation { + /** False */ + False = "False", + /** True */ + True = "True", +} + +/** + * Defines values for DisableBgpRoutePropagation. \ + * {@link KnownDisableBgpRoutePropagation} can be used interchangeably with DisableBgpRoutePropagation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **False** \ + * **True** + */ +export type DisableBgpRoutePropagation = string; + +/** Known values of {@link RoutingRuleDestinationType} that the service accepts. */ +export enum KnownRoutingRuleDestinationType { + /** AddressPrefix */ + AddressPrefix = "AddressPrefix", + /** ServiceTag */ + ServiceTag = "ServiceTag", +} + +/** + * Defines values for RoutingRuleDestinationType. \ + * {@link KnownRoutingRuleDestinationType} can be used interchangeably with RoutingRuleDestinationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AddressPrefix** \ + * **ServiceTag** + */ +export type RoutingRuleDestinationType = string; + +/** Known values of {@link RoutingRuleNextHopType} that the service accepts. */ +export enum KnownRoutingRuleNextHopType { + /** Internet */ + Internet = "Internet", + /** NoNextHop */ + NoNextHop = "NoNextHop", + /** VirtualAppliance */ + VirtualAppliance = "VirtualAppliance", + /** VirtualNetworkGateway */ + VirtualNetworkGateway = "VirtualNetworkGateway", + /** VnetLocal */ + VnetLocal = "VnetLocal", +} + +/** + * Defines values for RoutingRuleNextHopType. \ + * {@link KnownRoutingRuleNextHopType} can be used interchangeably with RoutingRuleNextHopType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internet** \ + * **NoNextHop** \ + * **VirtualAppliance** \ + * **VirtualNetworkGateway** \ + * **VnetLocal** + */ +export type RoutingRuleNextHopType = string; + /** Known values of {@link NetworkIntentPolicyBasedService} that the service accepts. */ export enum KnownNetworkIntentPolicyBasedService { /** None */ @@ -14765,6 +15420,24 @@ export enum KnownNetworkIntentPolicyBasedService { */ export type NetworkIntentPolicyBasedService = string; +/** Known values of {@link AddressSpaceAggregationOption} that the service accepts. */ +export enum KnownAddressSpaceAggregationOption { + /** None */ + None = "None", + /** Manual */ + Manual = "Manual", +} + +/** + * Defines values for AddressSpaceAggregationOption. \ + * {@link KnownAddressSpaceAggregationOption} can be used interchangeably with AddressSpaceAggregationOption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Manual** + */ +export type AddressSpaceAggregationOption = string; + /** Known values of {@link AdminRuleKind} that the service accepts. */ export enum KnownAdminRuleKind { /** Custom */ @@ -14819,6 +15492,8 @@ export enum KnownAddressPrefixType { IPPrefix = "IPPrefix", /** ServiceTag */ ServiceTag = "ServiceTag", + /** NetworkGroup */ + NetworkGroup = "NetworkGroup", } /** @@ -14827,7 +15502,8 @@ export enum KnownAddressPrefixType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **IPPrefix** \ - * **ServiceTag** + * **ServiceTag** \ + * **NetworkGroup** */ export type AddressPrefixType = string; @@ -14849,82 +15525,43 @@ export enum KnownSecurityConfigurationRuleDirection { */ export type SecurityConfigurationRuleDirection = string; -/** Known values of {@link DisableBgpRoutePropagation} that the service accepts. */ -export enum KnownDisableBgpRoutePropagation { - /** False */ - False = "False", - /** True */ - True = "True", +/** Known values of {@link NetworkProtocol} that the service accepts. */ +export enum KnownNetworkProtocol { + /** Any */ + Any = "Any", + /** TCP */ + TCP = "TCP", + /** UDP */ + UDP = "UDP", + /** Icmp */ + Icmp = "ICMP", } /** - * Defines values for DisableBgpRoutePropagation. \ - * {@link KnownDisableBgpRoutePropagation} can be used interchangeably with DisableBgpRoutePropagation, + * Defines values for NetworkProtocol. \ + * {@link KnownNetworkProtocol} can be used interchangeably with NetworkProtocol, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **False** \ - * **True** + * **Any** \ + * **TCP** \ + * **UDP** \ + * **ICMP** */ -export type DisableBgpRoutePropagation = string; +export type NetworkProtocol = string; -/** Known values of {@link RoutingRuleDestinationType} that the service accepts. */ -export enum KnownRoutingRuleDestinationType { - /** AddressPrefix */ - AddressPrefix = "AddressPrefix", - /** ServiceTag */ - ServiceTag = "ServiceTag", +/** Known values of {@link NicTypeInResponse} that the service accepts. */ +export enum KnownNicTypeInResponse { + /** PublicNic */ + PublicNic = "PublicNic", + /** PrivateNic */ + PrivateNic = "PrivateNic", + /** AdditionalNic */ + AdditionalNic = "AdditionalNic", } /** - * Defines values for RoutingRuleDestinationType. \ - * {@link KnownRoutingRuleDestinationType} can be used interchangeably with RoutingRuleDestinationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AddressPrefix** \ - * **ServiceTag** - */ -export type RoutingRuleDestinationType = string; - -/** Known values of {@link RoutingRuleNextHopType} that the service accepts. */ -export enum KnownRoutingRuleNextHopType { - /** Internet */ - Internet = "Internet", - /** NoNextHop */ - NoNextHop = "NoNextHop", - /** VirtualAppliance */ - VirtualAppliance = "VirtualAppliance", - /** VirtualNetworkGateway */ - VirtualNetworkGateway = "VirtualNetworkGateway", - /** VnetLocal */ - VnetLocal = "VnetLocal", -} - -/** - * Defines values for RoutingRuleNextHopType. \ - * {@link KnownRoutingRuleNextHopType} can be used interchangeably with RoutingRuleNextHopType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internet** \ - * **NoNextHop** \ - * **VirtualAppliance** \ - * **VirtualNetworkGateway** \ - * **VnetLocal** - */ -export type RoutingRuleNextHopType = string; - -/** Known values of {@link NicTypeInResponse} that the service accepts. */ -export enum KnownNicTypeInResponse { - /** PublicNic */ - PublicNic = "PublicNic", - /** PrivateNic */ - PrivateNic = "PrivateNic", - /** AdditionalNic */ - AdditionalNic = "AdditionalNic", -} - -/** - * Defines values for NicTypeInResponse. \ - * {@link KnownNicTypeInResponse} can be used interchangeably with NicTypeInResponse, + * Defines values for NicTypeInResponse. \ + * {@link KnownNicTypeInResponse} can be used interchangeably with NicTypeInResponse, * this enum contains the known values that the service supports. * ### Known values supported by the service * **PublicNic** \ @@ -16502,6 +17139,123 @@ export enum KnownBgpPeerState { */ export type BgpPeerState = string; +/** Known values of {@link FailoverTestStatus} that the service accepts. */ +export enum KnownFailoverTestStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** Starting */ + Starting = "Starting", + /** Running */ + Running = "Running", + /** StartFailed */ + StartFailed = "StartFailed", + /** Stopping */ + Stopping = "Stopping", + /** Completed */ + Completed = "Completed", + /** StopFailed */ + StopFailed = "StopFailed", + /** Invalid */ + Invalid = "Invalid", + /** Expired */ + Expired = "Expired", +} + +/** + * Defines values for FailoverTestStatus. \ + * {@link KnownFailoverTestStatus} can be used interchangeably with FailoverTestStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **Starting** \ + * **Running** \ + * **StartFailed** \ + * **Stopping** \ + * **Completed** \ + * **StopFailed** \ + * **Invalid** \ + * **Expired** + */ +export type FailoverTestStatus = string; + +/** Known values of {@link FailoverConnectionStatus} that the service accepts. */ +export enum KnownFailoverConnectionStatus { + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected", +} + +/** + * Defines values for FailoverConnectionStatus. \ + * {@link KnownFailoverConnectionStatus} can be used interchangeably with FailoverConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connected** \ + * **Disconnected** + */ +export type FailoverConnectionStatus = string; + +/** Known values of {@link FailoverTestType} that the service accepts. */ +export enum KnownFailoverTestType { + /** SingleSiteFailover */ + SingleSiteFailover = "SingleSiteFailover", + /** MultiSiteFailover */ + MultiSiteFailover = "MultiSiteFailover", + /** All */ + All = "All", +} + +/** + * Defines values for FailoverTestType. \ + * {@link KnownFailoverTestType} can be used interchangeably with FailoverTestType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SingleSiteFailover** \ + * **MultiSiteFailover** \ + * **All** + */ +export type FailoverTestType = string; + +/** Known values of {@link FailoverTestStatusForSingleTest} that the service accepts. */ +export enum KnownFailoverTestStatusForSingleTest { + /** NotStarted */ + NotStarted = "NotStarted", + /** Starting */ + Starting = "Starting", + /** Running */ + Running = "Running", + /** StartFailed */ + StartFailed = "StartFailed", + /** Stopping */ + Stopping = "Stopping", + /** Completed */ + Completed = "Completed", + /** StopFailed */ + StopFailed = "StopFailed", + /** Invalid */ + Invalid = "Invalid", + /** Expired */ + Expired = "Expired", +} + +/** + * Defines values for FailoverTestStatusForSingleTest. \ + * {@link KnownFailoverTestStatusForSingleTest} can be used interchangeably with FailoverTestStatusForSingleTest, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **Starting** \ + * **Running** \ + * **StartFailed** \ + * **Stopping** \ + * **Completed** \ + * **StopFailed** \ + * **Invalid** \ + * **Expired** + */ +export type FailoverTestStatusForSingleTest = string; + /** Known values of {@link OfficeTrafficCategory} that the service accepts. */ export enum KnownOfficeTrafficCategory { /** Optimize */ @@ -17570,7 +18324,7 @@ export type FirewallPolicyIdpsSignatureMode = 0 | 1 | 2; /** Defines values for FirewallPolicyIdpsSignatureSeverity. */ export type FirewallPolicyIdpsSignatureSeverity = 1 | 2 | 3; /** Defines values for FirewallPolicyIdpsSignatureDirection. */ -export type FirewallPolicyIdpsSignatureDirection = 0 | 1 | 2 | 3 | 4; +export type FirewallPolicyIdpsSignatureDirection = 0 | 1 | 2 | 3 | 4 | 5; /** Defines values for PacketCaptureTargetType. */ export type PacketCaptureTargetType = "AzureVM" | "AzureVMSS"; @@ -19804,6 +20558,147 @@ export interface FirewallPolicyRuleCollectionGroupDraftsGetOptionalParams export type FirewallPolicyRuleCollectionGroupDraftsGetResponse = FirewallPolicyRuleCollectionGroupDraft; +/** Optional parameters. */ +export interface IpamPoolsListOptionalParams + extends coreClient.OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Contains response data for the list operation. */ +export type IpamPoolsListResponse = IpamPoolList; + +/** Optional parameters. */ +export interface IpamPoolsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type IpamPoolsCreateResponse = IpamPool; + +/** Optional parameters. */ +export interface IpamPoolsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Pool resource object to update partially. */ + body?: IpamPoolUpdate; +} + +/** Contains response data for the update operation. */ +export type IpamPoolsUpdateResponse = IpamPool; + +/** Optional parameters. */ +export interface IpamPoolsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type IpamPoolsGetResponse = IpamPool; + +/** Optional parameters. */ +export interface IpamPoolsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type IpamPoolsDeleteResponse = IpamPoolsDeleteHeaders; + +/** Optional parameters. */ +export interface IpamPoolsGetPoolUsageOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getPoolUsage operation. */ +export type IpamPoolsGetPoolUsageResponse = PoolUsage; + +/** Optional parameters. */ +export interface IpamPoolsListAssociatedResourcesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAssociatedResources operation. */ +export type IpamPoolsListAssociatedResourcesResponse = PoolAssociationList; + +/** Optional parameters. */ +export interface IpamPoolsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type IpamPoolsListNextResponse = IpamPoolList; + +/** Optional parameters. */ +export interface IpamPoolsListAssociatedResourcesNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAssociatedResourcesNext operation. */ +export type IpamPoolsListAssociatedResourcesNextResponse = PoolAssociationList; + +/** Optional parameters. */ +export interface StaticCidrsListOptionalParams + extends coreClient.OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Contains response data for the list operation. */ +export type StaticCidrsListResponse = StaticCidrList; + +/** Optional parameters. */ +export interface StaticCidrsCreateOptionalParams + extends coreClient.OperationOptions { + /** StaticCidr resource object to create/update. */ + body?: StaticCidr; +} + +/** Contains response data for the create operation. */ +export type StaticCidrsCreateResponse = StaticCidr; + +/** Optional parameters. */ +export interface StaticCidrsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type StaticCidrsGetResponse = StaticCidr; + +/** Optional parameters. */ +export interface StaticCidrsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type StaticCidrsDeleteResponse = StaticCidrsDeleteHeaders; + +/** Optional parameters. */ +export interface StaticCidrsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type StaticCidrsListNextResponse = StaticCidrList; + /** Optional parameters. */ export interface IpAllocationsDeleteOptionalParams extends coreClient.OperationOptions { @@ -20163,6 +21058,19 @@ export interface LoadBalancerLoadBalancingRulesGetOptionalParams /** Contains response data for the get operation. */ export type LoadBalancerLoadBalancingRulesGetResponse = LoadBalancingRule; +/** Optional parameters. */ +export interface LoadBalancerLoadBalancingRulesHealthOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the health operation. */ +export type LoadBalancerLoadBalancingRulesHealthResponse = + LoadBalancerHealthPerRule; + /** Optional parameters. */ export interface LoadBalancerLoadBalancingRulesListNextOptionalParams extends coreClient.OperationOptions {} @@ -20693,44 +21601,55 @@ export interface StaticMembersListNextOptionalParams export type StaticMembersListNextResponse = StaticMemberListResult; /** Optional parameters. */ -export interface ScopeConnectionsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface NetworkManagerRoutingConfigurationsListOptionalParams + extends coreClient.OperationOptions { + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; +} -/** Contains response data for the createOrUpdate operation. */ -export type ScopeConnectionsCreateOrUpdateResponse = ScopeConnection; +/** Contains response data for the list operation. */ +export type NetworkManagerRoutingConfigurationsListResponse = + NetworkManagerRoutingConfigurationListResult; /** Optional parameters. */ -export interface ScopeConnectionsGetOptionalParams +export interface NetworkManagerRoutingConfigurationsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ScopeConnectionsGetResponse = ScopeConnection; +export type NetworkManagerRoutingConfigurationsGetResponse = + NetworkManagerRoutingConfiguration; /** Optional parameters. */ -export interface ScopeConnectionsDeleteOptionalParams +export interface NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the createOrUpdate operation. */ +export type NetworkManagerRoutingConfigurationsCreateOrUpdateResponse = + NetworkManagerRoutingConfiguration; + /** Optional parameters. */ -export interface ScopeConnectionsListOptionalParams +export interface NetworkManagerRoutingConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; + /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ + force?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the list operation. */ -export type ScopeConnectionsListResponse = ScopeConnectionListResult; - /** Optional parameters. */ -export interface ScopeConnectionsListNextOptionalParams +export interface NetworkManagerRoutingConfigurationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type ScopeConnectionsListNextResponse = ScopeConnectionListResult; +export type NetworkManagerRoutingConfigurationsListNextResponse = + NetworkManagerRoutingConfigurationListResult; /** Optional parameters. */ -export interface SecurityAdminConfigurationsListOptionalParams +export interface RoutingRuleCollectionsListOptionalParams extends coreClient.OperationOptions { /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ top?: number; @@ -20739,26 +21658,26 @@ export interface SecurityAdminConfigurationsListOptionalParams } /** Contains response data for the list operation. */ -export type SecurityAdminConfigurationsListResponse = - SecurityAdminConfigurationListResult; +export type RoutingRuleCollectionsListResponse = + RoutingRuleCollectionListResult; /** Optional parameters. */ -export interface SecurityAdminConfigurationsGetOptionalParams +export interface RoutingRuleCollectionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SecurityAdminConfigurationsGetResponse = SecurityAdminConfiguration; +export type RoutingRuleCollectionsGetResponse = RoutingRuleCollection; /** Optional parameters. */ -export interface SecurityAdminConfigurationsCreateOrUpdateOptionalParams +export interface RoutingRuleCollectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type SecurityAdminConfigurationsCreateOrUpdateResponse = - SecurityAdminConfiguration; +export type RoutingRuleCollectionsCreateOrUpdateResponse = + RoutingRuleCollection; /** Optional parameters. */ -export interface SecurityAdminConfigurationsDeleteOptionalParams +export interface RoutingRuleCollectionsDeleteOptionalParams extends coreClient.OperationOptions { /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ force?: boolean; @@ -20769,15 +21688,15 @@ export interface SecurityAdminConfigurationsDeleteOptionalParams } /** Optional parameters. */ -export interface SecurityAdminConfigurationsListNextOptionalParams +export interface RoutingRuleCollectionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type SecurityAdminConfigurationsListNextResponse = - SecurityAdminConfigurationListResult; +export type RoutingRuleCollectionsListNextResponse = + RoutingRuleCollectionListResult; /** Optional parameters. */ -export interface AdminRuleCollectionsListOptionalParams +export interface RoutingRulesListOptionalParams extends coreClient.OperationOptions { /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ top?: number; @@ -20786,24 +21705,24 @@ export interface AdminRuleCollectionsListOptionalParams } /** Contains response data for the list operation. */ -export type AdminRuleCollectionsListResponse = AdminRuleCollectionListResult; +export type RoutingRulesListResponse = RoutingRuleListResult; /** Optional parameters. */ -export interface AdminRuleCollectionsGetOptionalParams +export interface RoutingRulesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type AdminRuleCollectionsGetResponse = AdminRuleCollection; +export type RoutingRulesGetResponse = RoutingRule; /** Optional parameters. */ -export interface AdminRuleCollectionsCreateOrUpdateOptionalParams +export interface RoutingRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type AdminRuleCollectionsCreateOrUpdateResponse = AdminRuleCollection; +export type RoutingRulesCreateOrUpdateResponse = RoutingRule; /** Optional parameters. */ -export interface AdminRuleCollectionsDeleteOptionalParams +export interface RoutingRulesDeleteOptionalParams extends coreClient.OperationOptions { /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ force?: boolean; @@ -20814,59 +21733,51 @@ export interface AdminRuleCollectionsDeleteOptionalParams } /** Optional parameters. */ -export interface AdminRuleCollectionsListNextOptionalParams +export interface RoutingRulesListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type AdminRuleCollectionsListNextResponse = - AdminRuleCollectionListResult; +export type RoutingRulesListNextResponse = RoutingRuleListResult; /** Optional parameters. */ -export interface AdminRulesListOptionalParams - extends coreClient.OperationOptions { - /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ - top?: number; - /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ - skipToken?: string; -} +export interface ScopeConnectionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type AdminRulesListResponse = AdminRuleListResult; +/** Contains response data for the createOrUpdate operation. */ +export type ScopeConnectionsCreateOrUpdateResponse = ScopeConnection; /** Optional parameters. */ -export interface AdminRulesGetOptionalParams +export interface ScopeConnectionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type AdminRulesGetResponse = BaseAdminRuleUnion; +export type ScopeConnectionsGetResponse = ScopeConnection; /** Optional parameters. */ -export interface AdminRulesCreateOrUpdateOptionalParams +export interface ScopeConnectionsDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type AdminRulesCreateOrUpdateResponse = BaseAdminRuleUnion; - /** Optional parameters. */ -export interface AdminRulesDeleteOptionalParams +export interface ScopeConnectionsListOptionalParams extends coreClient.OperationOptions { - /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ - force?: boolean; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ + top?: number; + /** SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */ + skipToken?: string; } +/** Contains response data for the list operation. */ +export type ScopeConnectionsListResponse = ScopeConnectionListResult; + /** Optional parameters. */ -export interface AdminRulesListNextOptionalParams +export interface ScopeConnectionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type AdminRulesListNextResponse = AdminRuleListResult; +export type ScopeConnectionsListNextResponse = ScopeConnectionListResult; /** Optional parameters. */ -export interface SecurityUserConfigurationsListOptionalParams +export interface SecurityAdminConfigurationsListOptionalParams extends coreClient.OperationOptions { /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ top?: number; @@ -20875,26 +21786,26 @@ export interface SecurityUserConfigurationsListOptionalParams } /** Contains response data for the list operation. */ -export type SecurityUserConfigurationsListResponse = - SecurityUserConfigurationListResult; +export type SecurityAdminConfigurationsListResponse = + SecurityAdminConfigurationListResult; /** Optional parameters. */ -export interface SecurityUserConfigurationsGetOptionalParams +export interface SecurityAdminConfigurationsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SecurityUserConfigurationsGetResponse = SecurityUserConfiguration; +export type SecurityAdminConfigurationsGetResponse = SecurityAdminConfiguration; /** Optional parameters. */ -export interface SecurityUserConfigurationsCreateOrUpdateOptionalParams +export interface SecurityAdminConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type SecurityUserConfigurationsCreateOrUpdateResponse = - SecurityUserConfiguration; +export type SecurityAdminConfigurationsCreateOrUpdateResponse = + SecurityAdminConfiguration; /** Optional parameters. */ -export interface SecurityUserConfigurationsDeleteOptionalParams +export interface SecurityAdminConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ force?: boolean; @@ -20905,15 +21816,15 @@ export interface SecurityUserConfigurationsDeleteOptionalParams } /** Optional parameters. */ -export interface SecurityUserConfigurationsListNextOptionalParams +export interface SecurityAdminConfigurationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type SecurityUserConfigurationsListNextResponse = - SecurityUserConfigurationListResult; +export type SecurityAdminConfigurationsListNextResponse = + SecurityAdminConfigurationListResult; /** Optional parameters. */ -export interface SecurityUserRuleCollectionsListOptionalParams +export interface AdminRuleCollectionsListOptionalParams extends coreClient.OperationOptions { /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ top?: number; @@ -20922,26 +21833,24 @@ export interface SecurityUserRuleCollectionsListOptionalParams } /** Contains response data for the list operation. */ -export type SecurityUserRuleCollectionsListResponse = - SecurityUserRuleCollectionListResult; +export type AdminRuleCollectionsListResponse = AdminRuleCollectionListResult; /** Optional parameters. */ -export interface SecurityUserRuleCollectionsGetOptionalParams +export interface AdminRuleCollectionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SecurityUserRuleCollectionsGetResponse = SecurityUserRuleCollection; +export type AdminRuleCollectionsGetResponse = AdminRuleCollection; /** Optional parameters. */ -export interface SecurityUserRuleCollectionsCreateOrUpdateOptionalParams +export interface AdminRuleCollectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type SecurityUserRuleCollectionsCreateOrUpdateResponse = - SecurityUserRuleCollection; +export type AdminRuleCollectionsCreateOrUpdateResponse = AdminRuleCollection; /** Optional parameters. */ -export interface SecurityUserRuleCollectionsDeleteOptionalParams +export interface AdminRuleCollectionsDeleteOptionalParams extends coreClient.OperationOptions { /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ force?: boolean; @@ -20952,15 +21861,15 @@ export interface SecurityUserRuleCollectionsDeleteOptionalParams } /** Optional parameters. */ -export interface SecurityUserRuleCollectionsListNextOptionalParams +export interface AdminRuleCollectionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type SecurityUserRuleCollectionsListNextResponse = - SecurityUserRuleCollectionListResult; +export type AdminRuleCollectionsListNextResponse = + AdminRuleCollectionListResult; /** Optional parameters. */ -export interface SecurityUserRulesListOptionalParams +export interface AdminRulesListOptionalParams extends coreClient.OperationOptions { /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ top?: number; @@ -20969,24 +21878,24 @@ export interface SecurityUserRulesListOptionalParams } /** Contains response data for the list operation. */ -export type SecurityUserRulesListResponse = SecurityUserRuleListResult; +export type AdminRulesListResponse = AdminRuleListResult; /** Optional parameters. */ -export interface SecurityUserRulesGetOptionalParams +export interface AdminRulesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SecurityUserRulesGetResponse = SecurityUserRule; +export type AdminRulesGetResponse = BaseAdminRuleUnion; /** Optional parameters. */ -export interface SecurityUserRulesCreateOrUpdateOptionalParams +export interface AdminRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type SecurityUserRulesCreateOrUpdateResponse = SecurityUserRule; +export type AdminRulesCreateOrUpdateResponse = BaseAdminRuleUnion; /** Optional parameters. */ -export interface SecurityUserRulesDeleteOptionalParams +export interface AdminRulesDeleteOptionalParams extends coreClient.OperationOptions { /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ force?: boolean; @@ -20997,14 +21906,14 @@ export interface SecurityUserRulesDeleteOptionalParams } /** Optional parameters. */ -export interface SecurityUserRulesListNextOptionalParams +export interface AdminRulesListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type SecurityUserRulesListNextResponse = SecurityUserRuleListResult; +export type AdminRulesListNextResponse = AdminRuleListResult; /** Optional parameters. */ -export interface NetworkManagerRoutingConfigurationsListOptionalParams +export interface SecurityUserConfigurationsListOptionalParams extends coreClient.OperationOptions { /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ top?: number; @@ -21013,27 +21922,26 @@ export interface NetworkManagerRoutingConfigurationsListOptionalParams } /** Contains response data for the list operation. */ -export type NetworkManagerRoutingConfigurationsListResponse = - NetworkManagerRoutingConfigurationListResult; +export type SecurityUserConfigurationsListResponse = + SecurityUserConfigurationListResult; /** Optional parameters. */ -export interface NetworkManagerRoutingConfigurationsGetOptionalParams +export interface SecurityUserConfigurationsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type NetworkManagerRoutingConfigurationsGetResponse = - NetworkManagerRoutingConfiguration; +export type SecurityUserConfigurationsGetResponse = SecurityUserConfiguration; /** Optional parameters. */ -export interface NetworkManagerRoutingConfigurationsCreateOrUpdateOptionalParams +export interface SecurityUserConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type NetworkManagerRoutingConfigurationsCreateOrUpdateResponse = - NetworkManagerRoutingConfiguration; +export type SecurityUserConfigurationsCreateOrUpdateResponse = + SecurityUserConfiguration; /** Optional parameters. */ -export interface NetworkManagerRoutingConfigurationsDeleteOptionalParams +export interface SecurityUserConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ force?: boolean; @@ -21044,15 +21952,15 @@ export interface NetworkManagerRoutingConfigurationsDeleteOptionalParams } /** Optional parameters. */ -export interface NetworkManagerRoutingConfigurationsListNextOptionalParams +export interface SecurityUserConfigurationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type NetworkManagerRoutingConfigurationsListNextResponse = - NetworkManagerRoutingConfigurationListResult; +export type SecurityUserConfigurationsListNextResponse = + SecurityUserConfigurationListResult; /** Optional parameters. */ -export interface RoutingRuleCollectionsListOptionalParams +export interface SecurityUserRuleCollectionsListOptionalParams extends coreClient.OperationOptions { /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ top?: number; @@ -21061,26 +21969,26 @@ export interface RoutingRuleCollectionsListOptionalParams } /** Contains response data for the list operation. */ -export type RoutingRuleCollectionsListResponse = - RoutingRuleCollectionListResult; +export type SecurityUserRuleCollectionsListResponse = + SecurityUserRuleCollectionListResult; /** Optional parameters. */ -export interface RoutingRuleCollectionsGetOptionalParams +export interface SecurityUserRuleCollectionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type RoutingRuleCollectionsGetResponse = RoutingRuleCollection; +export type SecurityUserRuleCollectionsGetResponse = SecurityUserRuleCollection; /** Optional parameters. */ -export interface RoutingRuleCollectionsCreateOrUpdateOptionalParams +export interface SecurityUserRuleCollectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type RoutingRuleCollectionsCreateOrUpdateResponse = - RoutingRuleCollection; +export type SecurityUserRuleCollectionsCreateOrUpdateResponse = + SecurityUserRuleCollection; /** Optional parameters. */ -export interface RoutingRuleCollectionsDeleteOptionalParams +export interface SecurityUserRuleCollectionsDeleteOptionalParams extends coreClient.OperationOptions { /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ force?: boolean; @@ -21091,15 +21999,15 @@ export interface RoutingRuleCollectionsDeleteOptionalParams } /** Optional parameters. */ -export interface RoutingRuleCollectionsListNextOptionalParams +export interface SecurityUserRuleCollectionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type RoutingRuleCollectionsListNextResponse = - RoutingRuleCollectionListResult; +export type SecurityUserRuleCollectionsListNextResponse = + SecurityUserRuleCollectionListResult; /** Optional parameters. */ -export interface RoutingRulesListOptionalParams +export interface SecurityUserRulesListOptionalParams extends coreClient.OperationOptions { /** An optional query parameter which specifies the maximum number of records to be returned by the server. */ top?: number; @@ -21108,24 +22016,24 @@ export interface RoutingRulesListOptionalParams } /** Contains response data for the list operation. */ -export type RoutingRulesListResponse = RoutingRuleListResult; +export type SecurityUserRulesListResponse = SecurityUserRuleListResult; /** Optional parameters. */ -export interface RoutingRulesGetOptionalParams +export interface SecurityUserRulesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type RoutingRulesGetResponse = RoutingRule; +export type SecurityUserRulesGetResponse = SecurityUserRule; /** Optional parameters. */ -export interface RoutingRulesCreateOrUpdateOptionalParams +export interface SecurityUserRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type RoutingRulesCreateOrUpdateResponse = RoutingRule; +export type SecurityUserRulesCreateOrUpdateResponse = SecurityUserRule; /** Optional parameters. */ -export interface RoutingRulesDeleteOptionalParams +export interface SecurityUserRulesDeleteOptionalParams extends coreClient.OperationOptions { /** Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. */ force?: boolean; @@ -21136,11 +22044,11 @@ export interface RoutingRulesDeleteOptionalParams } /** Optional parameters. */ -export interface RoutingRulesListNextOptionalParams +export interface SecurityUserRulesListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type RoutingRulesListNextResponse = RoutingRuleListResult; +export type SecurityUserRulesListNextResponse = SecurityUserRuleListResult; /** Optional parameters. */ export interface NetworkProfilesDeleteOptionalParams @@ -21335,6 +22243,167 @@ export interface DefaultSecurityRulesListNextOptionalParams /** Contains response data for the listNext operation. */ export type DefaultSecurityRulesListNextResponse = SecurityRuleListResult; +/** Optional parameters. */ +export interface ReachabilityAnalysisIntentsListOptionalParams + extends coreClient.OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Contains response data for the list operation. */ +export type ReachabilityAnalysisIntentsListResponse = + ReachabilityAnalysisIntentListResult; + +/** Optional parameters. */ +export interface ReachabilityAnalysisIntentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ReachabilityAnalysisIntentsGetResponse = ReachabilityAnalysisIntent; + +/** Optional parameters. */ +export interface ReachabilityAnalysisIntentsCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type ReachabilityAnalysisIntentsCreateResponse = + ReachabilityAnalysisIntent; + +/** Optional parameters. */ +export interface ReachabilityAnalysisIntentsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ReachabilityAnalysisIntentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ReachabilityAnalysisIntentsListNextResponse = + ReachabilityAnalysisIntentListResult; + +/** Optional parameters. */ +export interface ReachabilityAnalysisRunsListOptionalParams + extends coreClient.OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Contains response data for the list operation. */ +export type ReachabilityAnalysisRunsListResponse = + ReachabilityAnalysisRunListResult; + +/** Optional parameters. */ +export interface ReachabilityAnalysisRunsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ReachabilityAnalysisRunsGetResponse = ReachabilityAnalysisRun; + +/** Optional parameters. */ +export interface ReachabilityAnalysisRunsCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type ReachabilityAnalysisRunsCreateResponse = ReachabilityAnalysisRun; + +/** Optional parameters. */ +export interface ReachabilityAnalysisRunsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ReachabilityAnalysisRunsDeleteResponse = + ReachabilityAnalysisRunsDeleteHeaders; + +/** Optional parameters. */ +export interface ReachabilityAnalysisRunsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ReachabilityAnalysisRunsListNextResponse = + ReachabilityAnalysisRunListResult; + +/** Optional parameters. */ +export interface VerifierWorkspacesListOptionalParams + extends coreClient.OperationOptions { + /** Optional skip token. */ + skipToken?: string; + /** Optional num entries to skip. */ + skip?: number; + /** Optional num entries to show. */ + top?: number; + /** Optional key by which to sort. */ + sortKey?: string; + /** Optional sort value for pagination. */ + sortValue?: string; +} + +/** Contains response data for the list operation. */ +export type VerifierWorkspacesListResponse = VerifierWorkspaceListResult; + +/** Optional parameters. */ +export interface VerifierWorkspacesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VerifierWorkspacesGetResponse = VerifierWorkspace; + +/** Optional parameters. */ +export interface VerifierWorkspacesCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type VerifierWorkspacesCreateResponse = VerifierWorkspace; + +/** Optional parameters. */ +export interface VerifierWorkspacesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Verifier Workspace object to create/update. */ + body?: VerifierWorkspaceUpdate; +} + +/** Contains response data for the update operation. */ +export type VerifierWorkspacesUpdateResponse = VerifierWorkspace; + +/** Optional parameters. */ +export interface VerifierWorkspacesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type VerifierWorkspacesDeleteResponse = VerifierWorkspacesDeleteHeaders; + +/** Optional parameters. */ +export interface VerifierWorkspacesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type VerifierWorkspacesListNextResponse = VerifierWorkspaceListResult; + /** Optional parameters. */ export interface NetworkVirtualAppliancesDeleteOptionalParams extends coreClient.OperationOptions { @@ -22780,10 +23849,10 @@ export type VirtualNetworksListUsageResponse = VirtualNetworkListUsageResult; /** Optional parameters. */ export interface VirtualNetworksListDdosProtectionStatusOptionalParams extends coreClient.OperationOptions { - /** The max number of ip addresses to return. */ - top?: number; /** The skipToken that is given with nextLink. */ skipToken?: string; + /** The max number of ip addresses to return. */ + top?: number; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -23193,6 +24262,64 @@ export type VirtualNetworkGatewaysStopPacketCaptureResponse = { body: string; }; +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the getFailoverAllTestDetails operation. */ +export type VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse = + ExpressRouteFailoverTestDetails[]; + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the getFailoverSingleTestDetails operation. */ +export type VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse = + ExpressRouteFailoverSingleTestDetails[]; + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the startExpressRouteSiteFailoverSimulation operation. */ +export type VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse = + { + /** The parsed response body. */ + body: string; + }; + +/** Optional parameters. */ +export interface VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the stopExpressRouteSiteFailoverSimulation operation. */ +export type VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse = + { + /** The parsed response body. */ + body: string; + }; + /** Optional parameters. */ export interface VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/network/arm-network/src/models/mappers.ts b/sdk/network/arm-network/src/models/mappers.ts index c1973ab9d5ed..92972fdaaab1 100644 --- a/sdk/network/arm-network/src/models/mappers.ts +++ b/sdk/network/arm-network/src/models/mappers.ts @@ -754,6 +754,39 @@ export const NatGatewaySku: coreClient.CompositeMapper = { }, }; +export const IpamPoolPrefixAllocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpamPoolPrefixAllocation", + modelProperties: { + numberOfIpAddresses: { + serializedName: "numberOfIpAddresses", + type: { + name: "String", + }, + }, + allocatedAddressPrefixes: { + serializedName: "allocatedAddressPrefixes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + id: { + serializedName: "pool.id", + type: { + name: "String", + }, + }, + }, + }, +}; + export const GatewayLoadBalancerTunnelInterface: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5469,7 +5502,7 @@ export const SingleQueryResult: coreClient.CompositeMapper = { serializedName: "direction", type: { name: "Enum", - allowedValues: [0, 1, 2, 3, 4], + allowedValues: [0, 1, 2, 3, 4, 5], }, }, group: { @@ -5635,6 +5668,615 @@ export const SignaturesOverridesList: coreClient.CompositeMapper = { }, }; +export const IpamPoolList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpamPoolList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpamPool", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const IpamPoolProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpamPoolProperties", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + displayName: { + serializedName: "displayName", + type: { + name: "String", + }, + }, + ipAddressType: { + serializedName: "ipAddressType", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + parentPoolName: { + serializedName: "parentPoolName", + type: { + name: "String", + }, + }, + addressPrefixes: { + serializedName: "addressPrefixes", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const CommonResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommonResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + }, + }, +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String", + }, + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String", + }, + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime", + }, + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String", + }, + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String", + }, + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const CommonErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommonErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "CommonErrorDetail", + }, + }, + }, + }, +}; + +export const CommonErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommonErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CommonErrorDetail", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CommonErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, +}; + +export const CommonErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommonErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + }, + }, +}; + +export const IpamPoolUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpamPoolUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "IpamPoolUpdateProperties", + }, + }, + }, + }, +}; + +export const IpamPoolUpdateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpamPoolUpdateProperties", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + displayName: { + serializedName: "displayName", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PoolUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PoolUsage", + modelProperties: { + addressPrefixes: { + serializedName: "addressPrefixes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + childPools: { + serializedName: "childPools", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceBasics", + }, + }, + }, + }, + allocatedAddressPrefixes: { + serializedName: "allocatedAddressPrefixes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + reservedAddressPrefixes: { + serializedName: "reservedAddressPrefixes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + availableAddressPrefixes: { + serializedName: "availableAddressPrefixes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + totalNumberOfIPAddresses: { + serializedName: "totalNumberOfIPAddresses", + readOnly: true, + type: { + name: "String", + }, + }, + numberOfAllocatedIPAddresses: { + serializedName: "numberOfAllocatedIPAddresses", + readOnly: true, + type: { + name: "String", + }, + }, + numberOfReservedIPAddresses: { + serializedName: "numberOfReservedIPAddresses", + readOnly: true, + type: { + name: "String", + }, + }, + numberOfAvailableIPAddresses: { + serializedName: "numberOfAvailableIPAddresses", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ResourceBasics: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceBasics", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String", + }, + }, + addressPrefixes: { + serializedName: "addressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const PoolAssociationList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PoolAssociationList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PoolAssociation", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PoolAssociation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PoolAssociation", + modelProperties: { + resourceId: { + serializedName: "resourceId", + required: true, + type: { + name: "String", + }, + }, + poolId: { + serializedName: "poolId", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + addressPrefixes: { + serializedName: "addressPrefixes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + reservedPrefixes: { + serializedName: "reservedPrefixes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + totalNumberOfIPAddresses: { + serializedName: "totalNumberOfIPAddresses", + readOnly: true, + type: { + name: "String", + }, + }, + numberOfReservedIPAddresses: { + serializedName: "numberOfReservedIPAddresses", + readOnly: true, + type: { + name: "String", + }, + }, + createdAt: { + serializedName: "createdAt", + readOnly: true, + type: { + name: "DateTime", + }, + }, + reservationExpiresAt: { + serializedName: "reservationExpiresAt", + readOnly: true, + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const StaticCidrList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StaticCidrList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StaticCidr", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const StaticCidrProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StaticCidrProperties", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + numberOfIPAddressesToAllocate: { + serializedName: "numberOfIPAddressesToAllocate", + type: { + name: "String", + }, + }, + addressPrefixes: { + serializedName: "addressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + totalNumberOfIPAddresses: { + serializedName: "totalNumberOfIPAddresses", + readOnly: true, + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String", + }, + }, + }, + }, +}; + export const IpAllocationListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6035,6 +6677,74 @@ export const InboundNatRulePortMapping: coreClient.CompositeMapper = { }, }; +export const LoadBalancerHealthPerRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBalancerHealthPerRule", + modelProperties: { + up: { + serializedName: "up", + type: { + name: "Number", + }, + }, + down: { + serializedName: "down", + type: { + name: "Number", + }, + }, + loadBalancerBackendAddresses: { + serializedName: "loadBalancerBackendAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LoadBalancerHealthPerRulePerBackendAddress", + }, + }, + }, + }, + }, + }, +}; + +export const LoadBalancerHealthPerRulePerBackendAddress: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "LoadBalancerHealthPerRulePerBackendAddress", + modelProperties: { + ipAddress: { + serializedName: "ipAddress", + type: { + name: "String", + }, + }, + networkInterfaceIPConfigurationId: { + serializedName: "networkInterfaceIPConfigurationId", + type: { + name: "Composite", + className: "NetworkInterfaceIPConfiguration", + }, + }, + state: { + serializedName: "state", + type: { + name: "String", + }, + }, + reason: { + serializedName: "reason", + type: { + name: "String", + }, + }, + }, + }, + }; + export const MigrateLoadBalancerToIpBasedRequest: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6593,51 +7303,6 @@ export const CrossTenantScopes: coreClient.CompositeMapper = { }, }; -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String", - }, - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime", - }, - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - export const PatchObject: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7480,38 +8145,11 @@ export const StaticMemberListResult: coreClient.CompositeMapper = { }, }; -export const ScopeConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScopeConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScopeConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecurityAdminConfigurationListResult: coreClient.CompositeMapper = +export const NetworkManagerRoutingConfigurationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityAdminConfigurationListResult", + className: "NetworkManagerRoutingConfigurationListResult", modelProperties: { value: { serializedName: "value", @@ -7520,7 +8158,7 @@ export const SecurityAdminConfigurationListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "SecurityAdminConfiguration", + className: "NetworkManagerRoutingConfiguration", }, }, }, @@ -7535,10 +8173,10 @@ export const SecurityAdminConfigurationListResult: coreClient.CompositeMapper = }, }; -export const AdminRuleCollectionListResult: coreClient.CompositeMapper = { +export const RoutingRuleCollectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AdminRuleCollectionListResult", + className: "RoutingRuleCollectionListResult", modelProperties: { value: { serializedName: "value", @@ -7547,7 +8185,7 @@ export const AdminRuleCollectionListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "AdminRuleCollection", + className: "RoutingRuleCollection", }, }, }, @@ -7562,10 +8200,26 @@ export const AdminRuleCollectionListResult: coreClient.CompositeMapper = { }, }; -export const AdminRuleListResult: coreClient.CompositeMapper = { +export const NetworkManagerRoutingGroupItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AdminRuleListResult", + className: "NetworkManagerRoutingGroupItem", + modelProperties: { + networkGroupId: { + serializedName: "networkGroupId", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RoutingRuleListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutingRuleListResult", modelProperties: { value: { serializedName: "value", @@ -7574,7 +8228,7 @@ export const AdminRuleListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "BaseAdminRule", + className: "RoutingRule", }, }, }, @@ -7589,10 +8243,55 @@ export const AdminRuleListResult: coreClient.CompositeMapper = { }, }; -export const SecurityUserConfigurationListResult: coreClient.CompositeMapper = { +export const RoutingRuleRouteDestination: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityUserConfigurationListResult", + className: "RoutingRuleRouteDestination", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String", + }, + }, + destinationAddress: { + serializedName: "destinationAddress", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RoutingRuleNextHop: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutingRuleNextHop", + modelProperties: { + nextHopType: { + serializedName: "nextHopType", + required: true, + type: { + name: "String", + }, + }, + nextHopAddress: { + serializedName: "nextHopAddress", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ScopeConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScopeConnectionListResult", modelProperties: { value: { serializedName: "value", @@ -7601,7 +8300,7 @@ export const SecurityUserConfigurationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SecurityUserConfiguration", + className: "ScopeConnection", }, }, }, @@ -7616,11 +8315,11 @@ export const SecurityUserConfigurationListResult: coreClient.CompositeMapper = { }, }; -export const SecurityUserRuleCollectionListResult: coreClient.CompositeMapper = +export const SecurityAdminConfigurationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityUserRuleCollectionListResult", + className: "SecurityAdminConfigurationListResult", modelProperties: { value: { serializedName: "value", @@ -7629,7 +8328,7 @@ export const SecurityUserRuleCollectionListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "SecurityUserRuleCollection", + className: "SecurityAdminConfiguration", }, }, }, @@ -7644,14 +8343,25 @@ export const SecurityUserRuleCollectionListResult: coreClient.CompositeMapper = }, }; -export const SecurityUserGroupItem: coreClient.CompositeMapper = { +export const AdminRuleCollectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityUserGroupItem", + className: "AdminRuleCollectionListResult", modelProperties: { - networkGroupId: { - serializedName: "networkGroupId", - required: true, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdminRuleCollection", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", type: { name: "String", }, @@ -7660,10 +8370,10 @@ export const SecurityUserGroupItem: coreClient.CompositeMapper = { }, }; -export const SecurityUserRuleListResult: coreClient.CompositeMapper = { +export const AdminRuleListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityUserRuleListResult", + className: "AdminRuleListResult", modelProperties: { value: { serializedName: "value", @@ -7672,7 +8382,7 @@ export const SecurityUserRuleListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SecurityUserRule", + className: "BaseAdminRule", }, }, }, @@ -7687,19 +8397,25 @@ export const SecurityUserRuleListResult: coreClient.CompositeMapper = { }, }; -export const AddressPrefixItem: coreClient.CompositeMapper = { +export const SecurityUserConfigurationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AddressPrefixItem", + className: "SecurityUserConfigurationListResult", modelProperties: { - addressPrefix: { - serializedName: "addressPrefix", + value: { + serializedName: "value", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityUserConfiguration", + }, + }, }, }, - addressPrefixType: { - serializedName: "addressPrefixType", + nextLink: { + serializedName: "nextLink", type: { name: "String", }, @@ -7708,11 +8424,11 @@ export const AddressPrefixItem: coreClient.CompositeMapper = { }, }; -export const NetworkManagerRoutingConfigurationListResult: coreClient.CompositeMapper = +export const SecurityUserRuleCollectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkManagerRoutingConfigurationListResult", + className: "SecurityUserRuleCollectionListResult", modelProperties: { value: { serializedName: "value", @@ -7721,7 +8437,7 @@ export const NetworkManagerRoutingConfigurationListResult: coreClient.CompositeM element: { type: { name: "Composite", - className: "NetworkManagerRoutingConfiguration", + className: "SecurityUserRuleCollection", }, }, }, @@ -7736,37 +8452,10 @@ export const NetworkManagerRoutingConfigurationListResult: coreClient.CompositeM }, }; -export const RoutingRuleCollectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRuleCollectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RoutingRuleCollection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkManagerRoutingGroupItem: coreClient.CompositeMapper = { +export const SecurityUserGroupItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkManagerRoutingGroupItem", + className: "SecurityUserGroupItem", modelProperties: { networkGroupId: { serializedName: "networkGroupId", @@ -7779,10 +8468,10 @@ export const NetworkManagerRoutingGroupItem: coreClient.CompositeMapper = { }, }; -export const RoutingRuleListResult: coreClient.CompositeMapper = { +export const SecurityUserRuleListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoutingRuleListResult", + className: "SecurityUserRuleListResult", modelProperties: { value: { serializedName: "value", @@ -7791,7 +8480,7 @@ export const RoutingRuleListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RoutingRule", + className: "SecurityUserRule", }, }, }, @@ -7806,43 +8495,19 @@ export const RoutingRuleListResult: coreClient.CompositeMapper = { }, }; -export const RoutingRuleRouteDestination: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRuleRouteDestination", - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - destinationAddress: { - serializedName: "destinationAddress", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRuleNextHop: coreClient.CompositeMapper = { +export const AddressPrefixItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoutingRuleNextHop", + className: "AddressPrefixItem", modelProperties: { - nextHopType: { - serializedName: "nextHopType", - required: true, + addressPrefix: { + serializedName: "addressPrefix", type: { name: "String", }, }, - nextHopAddress: { - serializedName: "nextHopAddress", + addressPrefixType: { + serializedName: "addressPrefixType", type: { name: "String", }, @@ -7969,6 +8634,344 @@ export const SecurityRuleListResult: coreClient.CompositeMapper = { }, }; +export const ReachabilityAnalysisIntentListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ReachabilityAnalysisIntentListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReachabilityAnalysisIntent", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ReachabilityAnalysisIntentProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ReachabilityAnalysisIntentProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + sourceResourceId: { + serializedName: "sourceResourceId", + required: true, + type: { + name: "String", + }, + }, + destinationResourceId: { + serializedName: "destinationResourceId", + required: true, + type: { + name: "String", + }, + }, + ipTraffic: { + serializedName: "ipTraffic", + type: { + name: "Composite", + className: "IPTraffic", + }, + }, + }, + }, + }; + +export const IPTraffic: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPTraffic", + modelProperties: { + sourceIps: { + serializedName: "sourceIps", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + destinationIps: { + serializedName: "destinationIps", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + sourcePorts: { + serializedName: "sourcePorts", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + destinationPorts: { + serializedName: "destinationPorts", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + protocols: { + serializedName: "protocols", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const ReachabilityAnalysisRunListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReachabilityAnalysisRunListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReachabilityAnalysisRun", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ReachabilityAnalysisRunProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReachabilityAnalysisRunProperties", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + intentId: { + serializedName: "intentId", + required: true, + type: { + name: "String", + }, + }, + intentContent: { + serializedName: "intentContent", + type: { + name: "Composite", + className: "IntentContent", + }, + }, + analysisResult: { + serializedName: "analysisResult", + readOnly: true, + type: { + name: "String", + }, + }, + errorMessage: { + serializedName: "errorMessage", + readOnly: true, + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const IntentContent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IntentContent", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + sourceResourceId: { + serializedName: "sourceResourceId", + required: true, + type: { + name: "String", + }, + }, + destinationResourceId: { + serializedName: "destinationResourceId", + required: true, + type: { + name: "String", + }, + }, + ipTraffic: { + serializedName: "ipTraffic", + type: { + name: "Composite", + className: "IPTraffic", + }, + }, + }, + }, +}; + +export const VerifierWorkspaceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VerifierWorkspaceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VerifierWorkspace", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const VerifierWorkspaceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VerifierWorkspaceProperties", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const VerifierWorkspaceUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VerifierWorkspaceUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "VerifierWorkspaceUpdateProperties", + }, + }, + }, + }, +}; + +export const VerifierWorkspaceUpdateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VerifierWorkspaceUpdateProperties", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + }, + }, +}; + export const VirtualApplianceSkuProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -13149,6 +14152,18 @@ export const AddressSpace: coreClient.CompositeMapper = { }, }, }, + ipamPoolPrefixAllocations: { + serializedName: "ipamPoolPrefixAllocations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpamPoolPrefixAllocation", + }, + }, + }, + }, }, }, }; @@ -14508,6 +15523,315 @@ export const VpnPacketCaptureStopParameters: coreClient.CompositeMapper = { }, }; +export const ExpressRouteFailoverTestDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRouteFailoverTestDetails", + modelProperties: { + peeringLocation: { + serializedName: "peeringLocation", + type: { + name: "String", + }, + }, + circuits: { + serializedName: "circuits", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverCircuitResourceDetails", + }, + }, + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + startTime: { + serializedName: "startTime", + type: { + name: "String", + }, + }, + endTime: { + serializedName: "endTime", + type: { + name: "String", + }, + }, + connections: { + serializedName: "connections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverConnectionResourceDetails", + }, + }, + }, + }, + testGuid: { + serializedName: "testGuid", + type: { + name: "String", + }, + }, + testType: { + serializedName: "testType", + type: { + name: "String", + }, + }, + issues: { + serializedName: "issues", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const ExpressRouteFailoverCircuitResourceDetails: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ExpressRouteFailoverCircuitResourceDetails", + modelProperties: { + nrpResourceUri: { + serializedName: "nrpResourceUri", + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + connectionName: { + serializedName: "connectionName", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ExpressRouteFailoverConnectionResourceDetails: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ExpressRouteFailoverConnectionResourceDetails", + modelProperties: { + nrpResourceUri: { + serializedName: "nrpResourceUri", + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + lastUpdatedTime: { + serializedName: "lastUpdatedTime", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ExpressRouteFailoverSingleTestDetails: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ExpressRouteFailoverSingleTestDetails", + modelProperties: { + peeringLocation: { + serializedName: "peeringLocation", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + startTimeUtc: { + serializedName: "startTimeUtc", + type: { + name: "String", + }, + }, + endTimeUtc: { + serializedName: "endTimeUtc", + type: { + name: "String", + }, + }, + redundantRoutes: { + serializedName: "redundantRoutes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverRedundantRoute", + }, + }, + }, + }, + nonRedundantRoutes: { + serializedName: "nonRedundantRoutes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + wasSimulationSuccessful: { + serializedName: "wasSimulationSuccessful", + type: { + name: "Boolean", + }, + }, + failoverConnectionDetails: { + serializedName: "failoverConnectionDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FailoverConnectionDetails", + }, + }, + }, + }, + }, + }, + }; + +export const ExpressRouteFailoverRedundantRoute: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRouteFailoverRedundantRoute", + modelProperties: { + peeringLocations: { + serializedName: "peeringLocations", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + routes: { + serializedName: "routes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const FailoverConnectionDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FailoverConnectionDetails", + modelProperties: { + failoverConnectionName: { + serializedName: "failoverConnectionName", + type: { + name: "String", + }, + }, + failoverLocation: { + serializedName: "failoverLocation", + type: { + name: "String", + }, + }, + isVerified: { + serializedName: "isVerified", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const ExpressRouteFailoverStopApiParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ExpressRouteFailoverStopApiParameters", + modelProperties: { + peeringLocation: { + serializedName: "peeringLocation", + type: { + name: "String", + }, + }, + wasSimulationSuccessful: { + serializedName: "wasSimulationSuccessful", + type: { + name: "Boolean", + }, + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FailoverConnectionDetails", + }, + }, + }, + }, + }, + }, + }; + export const VirtualNetworkGatewayConnectionListResult: coreClient.CompositeMapper = { type: { @@ -19268,6 +20592,18 @@ export const Subnet: coreClient.CompositeMapper = { name: "Boolean", }, }, + ipamPoolPrefixAllocations: { + serializedName: "properties.ipamPoolPrefixAllocations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpamPoolPrefixAllocation", + }, + }, + }, + }, }, }, }; @@ -25374,6 +26710,13 @@ export const NetworkInterface: coreClient.CompositeMapper = { name: "Boolean", }, }, + defaultOutboundConnectivityEnabled: { + serializedName: "properties.defaultOutboundConnectivityEnabled", + readOnly: true, + type: { + name: "Boolean", + }, + }, enableAcceleratedNetworking: { serializedName: "properties.enableAcceleratedNetworking", type: { @@ -26916,6 +28259,13 @@ export const BastionHost: coreClient.CompositeMapper = { name: "Boolean", }, }, + enablePrivateOnlyBastion: { + defaultValue: false, + serializedName: "properties.enablePrivateOnlyBastion", + type: { + name: "Boolean", + }, + }, }, }, }; @@ -30759,6 +32109,40 @@ export const FirewallPolicyFilterRuleCollection: coreClient.CompositeMapper = { }, }; +export const CommonTrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommonTrackedResource", + modelProperties: { + ...CommonResource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const CommonProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommonProxyResource", + modelProperties: { + ...CommonResource.type.modelProperties, + }, + }, +}; + export const ActiveConnectivityConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -31203,10 +32587,10 @@ export const StaticMember: coreClient.CompositeMapper = { }, }; -export const ScopeConnection: coreClient.CompositeMapper = { +export const NetworkManagerRoutingConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScopeConnection", + className: "NetworkManagerRoutingConfiguration", modelProperties: { ...ChildResource.type.modelProperties, systemData: { @@ -31216,27 +32600,22 @@ export const ScopeConnection: coreClient.CompositeMapper = { className: "SystemData", }, }, - tenantId: { - serializedName: "properties.tenantId", - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "properties.resourceId", + description: { + serializedName: "properties.description", type: { name: "String", }, }, - connectionState: { - serializedName: "properties.connectionState", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String", }, }, - description: { - serializedName: "properties.description", + resourceGuid: { + serializedName: "properties.resourceGuid", + readOnly: true, type: { name: "String", }, @@ -31245,10 +32624,10 @@ export const ScopeConnection: coreClient.CompositeMapper = { }, }; -export const SecurityAdminConfiguration: coreClient.CompositeMapper = { +export const RoutingRuleCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityAdminConfiguration", + className: "RoutingRuleCollection", modelProperties: { ...ChildResource.type.modelProperties, systemData: { @@ -31264,17 +32643,6 @@ export const SecurityAdminConfiguration: coreClient.CompositeMapper = { name: "String", }, }, - applyOnNetworkIntentPolicyBasedServices: { - serializedName: "properties.applyOnNetworkIntentPolicyBasedServices", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -31289,14 +32657,32 @@ export const SecurityAdminConfiguration: coreClient.CompositeMapper = { name: "String", }, }, + appliesTo: { + serializedName: "properties.appliesTo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkManagerRoutingGroupItem", + }, + }, + }, + }, + disableBgpRoutePropagation: { + serializedName: "properties.disableBgpRoutePropagation", + type: { + name: "String", + }, + }, }, }, }; -export const AdminRuleCollection: coreClient.CompositeMapper = { +export const RoutingRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AdminRuleCollection", + className: "RoutingRule", modelProperties: { ...ChildResource.type.modelProperties, systemData: { @@ -31312,18 +32698,6 @@ export const AdminRuleCollection: coreClient.CompositeMapper = { name: "String", }, }, - appliesToGroups: { - serializedName: "properties.appliesToGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkManagerSecurityGroupItem", - }, - }, - }, - }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -31338,29 +32712,30 @@ export const AdminRuleCollection: coreClient.CompositeMapper = { name: "String", }, }, + destination: { + serializedName: "properties.destination", + type: { + name: "Composite", + className: "RoutingRuleRouteDestination", + }, + }, + nextHop: { + serializedName: "properties.nextHop", + type: { + name: "Composite", + className: "RoutingRuleNextHop", + }, + }, }, }, }; -export const BaseAdminRule: coreClient.CompositeMapper = { - serializedName: "BaseAdminRule", +export const ScopeConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BaseAdminRule", - uberParent: "ChildResource", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind", - }, + className: "ScopeConnection", modelProperties: { ...ChildResource.type.modelProperties, - kind: { - serializedName: "kind", - required: true, - type: { - name: "String", - }, - }, systemData: { serializedName: "systemData", type: { @@ -31368,14 +32743,39 @@ export const BaseAdminRule: coreClient.CompositeMapper = { className: "SystemData", }, }, + tenantId: { + serializedName: "properties.tenantId", + type: { + name: "String", + }, + }, + resourceId: { + serializedName: "properties.resourceId", + type: { + name: "String", + }, + }, + connectionState: { + serializedName: "properties.connectionState", + readOnly: true, + type: { + name: "String", + }, + }, + description: { + serializedName: "properties.description", + type: { + name: "String", + }, + }, }, }, }; -export const SecurityUserConfiguration: coreClient.CompositeMapper = { +export const SecurityAdminConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityUserConfiguration", + className: "SecurityAdminConfiguration", modelProperties: { ...ChildResource.type.modelProperties, systemData: { @@ -31391,6 +32791,23 @@ export const SecurityUserConfiguration: coreClient.CompositeMapper = { name: "String", }, }, + applyOnNetworkIntentPolicyBasedServices: { + serializedName: "properties.applyOnNetworkIntentPolicyBasedServices", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + networkGroupAddressSpaceAggregationOption: { + serializedName: "properties.networkGroupAddressSpaceAggregationOption", + type: { + name: "String", + }, + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -31409,10 +32826,10 @@ export const SecurityUserConfiguration: coreClient.CompositeMapper = { }, }; -export const SecurityUserRuleCollection: coreClient.CompositeMapper = { +export const AdminRuleCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityUserRuleCollection", + className: "AdminRuleCollection", modelProperties: { ...ChildResource.type.modelProperties, systemData: { @@ -31435,7 +32852,7 @@ export const SecurityUserRuleCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SecurityUserGroupItem", + className: "NetworkManagerSecurityGroupItem", }, }, }, @@ -31458,79 +32875,51 @@ export const SecurityUserRuleCollection: coreClient.CompositeMapper = { }, }; -export const SecurityUserRule: coreClient.CompositeMapper = { +export const BaseAdminRule: coreClient.CompositeMapper = { + serializedName: "BaseAdminRule", type: { name: "Composite", - className: "SecurityUserRule", + className: "BaseAdminRule", + uberParent: "ChildResource", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind", + }, modelProperties: { ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - description: { - serializedName: "properties.description", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", + kind: { + serializedName: "kind", + required: true, type: { name: "String", }, }, - sources: { - serializedName: "properties.sources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - destinations: { - serializedName: "properties.destinations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AddressPrefixItem", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "properties.sourcePortRanges", + systemData: { + serializedName: "systemData", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "SystemData", }, }, - destinationPortRanges: { - serializedName: "properties.destinationPortRanges", + }, + }, +}; + +export const SecurityUserConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityUserConfiguration", + modelProperties: { + ...ChildResource.type.modelProperties, + systemData: { + serializedName: "systemData", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "SystemData", }, }, - direction: { - serializedName: "properties.direction", + description: { + serializedName: "properties.description", type: { name: "String", }, @@ -31553,10 +32942,10 @@ export const SecurityUserRule: coreClient.CompositeMapper = { }, }; -export const NetworkManagerRoutingConfiguration: coreClient.CompositeMapper = { +export const SecurityUserRuleCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkManagerRoutingConfiguration", + className: "SecurityUserRuleCollection", modelProperties: { ...ChildResource.type.modelProperties, systemData: { @@ -31572,6 +32961,18 @@ export const NetworkManagerRoutingConfiguration: coreClient.CompositeMapper = { name: "String", }, }, + appliesToGroups: { + serializedName: "properties.appliesToGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityUserGroupItem", + }, + }, + }, + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -31590,10 +32991,10 @@ export const NetworkManagerRoutingConfiguration: coreClient.CompositeMapper = { }, }; -export const RoutingRuleCollection: coreClient.CompositeMapper = { +export const SecurityUserRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoutingRuleCollection", + className: "SecurityUserRule", modelProperties: { ...ChildResource.type.modelProperties, systemData: { @@ -31609,57 +33010,60 @@ export const RoutingRuleCollection: coreClient.CompositeMapper = { name: "String", }, }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + protocol: { + serializedName: "properties.protocol", type: { name: "String", }, }, - resourceGuid: { - serializedName: "properties.resourceGuid", - readOnly: true, + sources: { + serializedName: "properties.sources", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AddressPrefixItem", + }, + }, }, }, - appliesTo: { - serializedName: "properties.appliesTo", + destinations: { + serializedName: "properties.destinations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "NetworkManagerRoutingGroupItem", + className: "AddressPrefixItem", }, }, }, }, - disableBgpRoutePropagation: { - serializedName: "properties.disableBgpRoutePropagation", + sourcePortRanges: { + serializedName: "properties.sourcePortRanges", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - }, - }, -}; - -export const RoutingRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRule", - modelProperties: { - ...ChildResource.type.modelProperties, - systemData: { - serializedName: "systemData", + destinationPortRanges: { + serializedName: "properties.destinationPortRanges", type: { - name: "Composite", - className: "SystemData", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - description: { - serializedName: "properties.description", + direction: { + serializedName: "properties.direction", type: { name: "String", }, @@ -31678,20 +33082,6 @@ export const RoutingRule: coreClient.CompositeMapper = { name: "String", }, }, - destination: { - serializedName: "properties.destination", - type: { - name: "Composite", - className: "RoutingRuleRouteDestination", - }, - }, - nextHop: { - serializedName: "properties.nextHop", - type: { - name: "Composite", - className: "RoutingRuleNextHop", - }, - }, }, }, }; @@ -32151,18 +33541,92 @@ export const NatRule: coreClient.CompositeMapper = { }, }, }, - translatedAddress: { - serializedName: "translatedAddress", - type: { - name: "String", - }, - }, - translatedPort: { - serializedName: "translatedPort", - type: { - name: "String", - }, - }, + translatedAddress: { + serializedName: "translatedAddress", + type: { + name: "String", + }, + }, + translatedPort: { + serializedName: "translatedPort", + type: { + name: "String", + }, + }, + sourceIpGroups: { + serializedName: "sourceIpGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + translatedFqdn: { + serializedName: "translatedFqdn", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const NetworkRule: coreClient.CompositeMapper = { + serializedName: "NetworkRule", + type: { + name: "Composite", + className: "NetworkRule", + uberParent: "FirewallPolicyRule", + polymorphicDiscriminator: FirewallPolicyRule.type.polymorphicDiscriminator, + modelProperties: { + ...FirewallPolicyRule.type.modelProperties, + ipProtocols: { + serializedName: "ipProtocols", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + sourceAddresses: { + serializedName: "sourceAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + destinationAddresses: { + serializedName: "destinationAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + destinationPorts: { + serializedName: "destinationPorts", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, sourceIpGroups: { serializedName: "sourceIpGroups", type: { @@ -32174,27 +33638,8 @@ export const NatRule: coreClient.CompositeMapper = { }, }, }, - translatedFqdn: { - serializedName: "translatedFqdn", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkRule: coreClient.CompositeMapper = { - serializedName: "NetworkRule", - type: { - name: "Composite", - className: "NetworkRule", - uberParent: "FirewallPolicyRule", - polymorphicDiscriminator: FirewallPolicyRule.type.polymorphicDiscriminator, - modelProperties: { - ...FirewallPolicyRule.type.modelProperties, - ipProtocols: { - serializedName: "ipProtocols", + destinationIpGroups: { + serializedName: "destinationIpGroups", type: { name: "Sequence", element: { @@ -32204,8 +33649,8 @@ export const NetworkRule: coreClient.CompositeMapper = { }, }, }, - sourceAddresses: { - serializedName: "sourceAddresses", + destinationFqdns: { + serializedName: "destinationFqdns", type: { name: "Sequence", element: { @@ -32215,59 +33660,89 @@ export const NetworkRule: coreClient.CompositeMapper = { }, }, }, - destinationAddresses: { - serializedName: "destinationAddresses", + }, + }, +}; + +export const IpamPool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpamPool", + modelProperties: { + ...CommonTrackedResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "IpamPoolProperties", }, }, - destinationPorts: { - serializedName: "destinationPorts", + }, + }, +}; + +export const VerifierWorkspace: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VerifierWorkspace", + modelProperties: { + ...CommonTrackedResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "VerifierWorkspaceProperties", }, }, - sourceIpGroups: { - serializedName: "sourceIpGroups", + }, + }, +}; + +export const StaticCidr: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StaticCidr", + modelProperties: { + ...CommonProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "StaticCidrProperties", }, }, - destinationIpGroups: { - serializedName: "destinationIpGroups", + }, + }, +}; + +export const ReachabilityAnalysisIntent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReachabilityAnalysisIntent", + modelProperties: { + ...CommonProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "ReachabilityAnalysisIntentProperties", }, }, - destinationFqdns: { - serializedName: "destinationFqdns", + }, + }, +}; + +export const ReachabilityAnalysisRun: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReachabilityAnalysisRun", + modelProperties: { + ...CommonProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "ReachabilityAnalysisRunProperties", }, }, }, @@ -32657,6 +34132,51 @@ export const FirewallPolicyDeploymentsDeployHeaders: coreClient.CompositeMapper }, }; +export const IpamPoolsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpamPoolsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const IpamPoolsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpamPoolsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const StaticCidrsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StaticCidrsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + export const IpAllocationsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -32672,6 +34192,22 @@ export const IpAllocationsDeleteHeaders: coreClient.CompositeMapper = { }, }; +export const LoadBalancerLoadBalancingRulesHealthHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "LoadBalancerLoadBalancingRulesHealthHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + export const NetworkManagersDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -32748,6 +34284,52 @@ export const NetworkGroupsDeleteHeaders: coreClient.CompositeMapper = { }, }; +export const NetworkManagerRoutingConfigurationsDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkManagerRoutingConfigurationsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const RoutingRuleCollectionsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutingRuleCollectionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RoutingRulesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutingRulesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + export const SecurityAdminConfigurationsDeleteHeaders: coreClient.CompositeMapper = { type: { @@ -32841,11 +34423,11 @@ export const SecurityUserRulesDeleteHeaders: coreClient.CompositeMapper = { }, }; -export const NetworkManagerRoutingConfigurationsDeleteHeaders: coreClient.CompositeMapper = +export const ReachabilityAnalysisRunsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkManagerRoutingConfigurationsDeleteHeaders", + className: "ReachabilityAnalysisRunsDeleteHeaders", modelProperties: { location: { serializedName: "location", @@ -32857,25 +34439,10 @@ export const NetworkManagerRoutingConfigurationsDeleteHeaders: coreClient.Compos }, }; -export const RoutingRuleCollectionsDeleteHeaders: coreClient.CompositeMapper = { +export const VerifierWorkspacesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoutingRuleCollectionsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RoutingRulesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RoutingRulesDeleteHeaders", + className: "VerifierWorkspacesDeleteHeaders", modelProperties: { location: { serializedName: "location", @@ -32977,6 +34544,72 @@ export const RouteFilterRulesDeleteHeaders: coreClient.CompositeMapper = { }, }; +export const VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + export const NetworkVirtualApplianceConnectionsDeleteHeaders: coreClient.CompositeMapper = { type: { diff --git a/sdk/network/arm-network/src/models/parameters.ts b/sdk/network/arm-network/src/models/parameters.ts index 89207c24ff13..28fb5297ca6e 100644 --- a/sdk/network/arm-network/src/models/parameters.ts +++ b/sdk/network/arm-network/src/models/parameters.ts @@ -49,6 +49,9 @@ import { SignatureOverridesFilterValuesQuery as SignatureOverridesFilterValuesQueryMapper, FirewallPolicyDraft as FirewallPolicyDraftMapper, FirewallPolicyRuleCollectionGroupDraft as FirewallPolicyRuleCollectionGroupDraftMapper, + IpamPool as IpamPoolMapper, + IpamPoolUpdate as IpamPoolUpdateMapper, + StaticCidr as StaticCidrMapper, IpAllocation as IpAllocationMapper, IpGroup as IpGroupMapper, LoadBalancer as LoadBalancerMapper, @@ -67,6 +70,9 @@ import { ConnectivityConfiguration as ConnectivityConfigurationMapper, NetworkGroup as NetworkGroupMapper, StaticMember as StaticMemberMapper, + NetworkManagerRoutingConfiguration as NetworkManagerRoutingConfigurationMapper, + RoutingRuleCollection as RoutingRuleCollectionMapper, + RoutingRule as RoutingRuleMapper, ScopeConnection as ScopeConnectionMapper, SecurityAdminConfiguration as SecurityAdminConfigurationMapper, AdminRuleCollection as AdminRuleCollectionMapper, @@ -74,12 +80,13 @@ import { SecurityUserConfiguration as SecurityUserConfigurationMapper, SecurityUserRuleCollection as SecurityUserRuleCollectionMapper, SecurityUserRule as SecurityUserRuleMapper, - NetworkManagerRoutingConfiguration as NetworkManagerRoutingConfigurationMapper, - RoutingRuleCollection as RoutingRuleCollectionMapper, - RoutingRule as RoutingRuleMapper, NetworkProfile as NetworkProfileMapper, NetworkSecurityGroup as NetworkSecurityGroupMapper, SecurityRule as SecurityRuleMapper, + ReachabilityAnalysisIntent as ReachabilityAnalysisIntentMapper, + ReachabilityAnalysisRun as ReachabilityAnalysisRunMapper, + VerifierWorkspace as VerifierWorkspaceMapper, + VerifierWorkspaceUpdate as VerifierWorkspaceUpdateMapper, NetworkVirtualAppliance as NetworkVirtualApplianceMapper, NetworkVirtualApplianceInstanceIds as NetworkVirtualApplianceInstanceIdsMapper, VirtualApplianceSite as VirtualApplianceSiteMapper, @@ -124,6 +131,7 @@ import { VpnDeviceScriptParameters as VpnDeviceScriptParametersMapper, VpnPacketCaptureStartParameters as VpnPacketCaptureStartParametersMapper, VpnPacketCaptureStopParameters as VpnPacketCaptureStopParametersMapper, + ExpressRouteFailoverStopApiParameters as ExpressRouteFailoverStopApiParametersMapper, P2SVpnConnectionRequest as P2SVpnConnectionRequestMapper, VirtualNetworkGatewayConnection as VirtualNetworkGatewayConnectionMapper, ConnectionSharedKey as ConnectionSharedKeyMapper, @@ -215,7 +223,7 @@ export const applicationGatewayName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-03-01", + defaultValue: "2024-05-01", isConstant: true, serializedName: "api-version", type: { @@ -951,6 +959,115 @@ export const parameters25: OperationParameter = { mapper: FirewallPolicyRuleCollectionGroupDraftMapper, }; +export const networkManagerName1: OperationURLParameter = { + parameterPath: "networkManagerName", + mapper: { + constraints: { + Pattern: new RegExp("^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"), + }, + serializedName: "networkManagerName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const skipToken: OperationQueryParameter = { + parameterPath: ["options", "skipToken"], + mapper: { + serializedName: "skipToken", + type: { + name: "String", + }, + }, +}; + +export const skip: OperationQueryParameter = { + parameterPath: ["options", "skip"], + mapper: { + defaultValue: 0, + serializedName: "skip", + type: { + name: "Number", + }, + }, +}; + +export const top1: OperationQueryParameter = { + parameterPath: ["options", "top"], + mapper: { + defaultValue: 50, + serializedName: "top", + type: { + name: "Number", + }, + }, +}; + +export const sortKey: OperationQueryParameter = { + parameterPath: ["options", "sortKey"], + mapper: { + serializedName: "sortKey", + type: { + name: "String", + }, + }, +}; + +export const sortValue: OperationQueryParameter = { + parameterPath: ["options", "sortValue"], + mapper: { + serializedName: "sortValue", + type: { + name: "String", + }, + }, +}; + +export const body: OperationParameter = { + parameterPath: "body", + mapper: IpamPoolMapper, +}; + +export const poolName: OperationURLParameter = { + parameterPath: "poolName", + mapper: { + constraints: { + Pattern: new RegExp("^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"), + }, + serializedName: "poolName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body1: OperationParameter = { + parameterPath: ["options", "body"], + mapper: IpamPoolUpdateMapper, +}; + +export const body2: OperationParameter = { + parameterPath: ["options", "body"], + mapper: StaticCidrMapper, +}; + +export const staticCidrName: OperationURLParameter = { + parameterPath: "staticCidrName", + mapper: { + constraints: { + Pattern: new RegExp("^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"), + }, + serializedName: "staticCidrName", + required: true, + type: { + name: "String", + }, + }, +}; + export const ipAllocationName: OperationURLParameter = { parameterPath: "ipAllocationName", mapper: { @@ -1107,6 +1224,20 @@ export const loadBalancingRuleName: OperationURLParameter = { }, }; +export const loadBalancingRuleName1: OperationURLParameter = { + parameterPath: "loadBalancingRuleName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z][a-z0-9]*$"), + }, + serializedName: "loadBalancingRuleName", + required: true, + type: { + name: "String", + }, + }, +}; + export const outboundRuleName: OperationURLParameter = { parameterPath: "outboundRuleName", mapper: { @@ -1181,7 +1312,7 @@ export const parameters35: OperationParameter = { mapper: PatchObjectMapper, }; -export const skipToken: OperationQueryParameter = { +export const skipToken1: OperationQueryParameter = { parameterPath: ["options", "skipToken"], mapper: { serializedName: "$skipToken", @@ -1286,15 +1417,14 @@ export const parameters40: OperationParameter = { mapper: StaticMemberMapper, }; -export const parameters41: OperationParameter = { - parameterPath: "parameters", - mapper: ScopeConnectionMapper, -}; - -export const scopeConnectionName: OperationURLParameter = { - parameterPath: "scopeConnectionName", +export const resourceGroupName1: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { - serializedName: "scopeConnectionName", + constraints: { + MaxLength: 90, + MinLength: 1, + }, + serializedName: "resourceGroupName", required: true, type: { name: "String", @@ -1302,15 +1432,13 @@ export const scopeConnectionName: OperationURLParameter = { }, }; -export const securityAdminConfiguration: OperationParameter = { - parameterPath: "securityAdminConfiguration", - mapper: SecurityAdminConfigurationMapper, -}; - -export const ruleCollectionName: OperationURLParameter = { - parameterPath: "ruleCollectionName", +export const networkManagerName2: OperationURLParameter = { + parameterPath: "networkManagerName", mapper: { - serializedName: "ruleCollectionName", + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9_.-]*$"), + }, + serializedName: "networkManagerName", required: true, type: { name: "String", @@ -1318,15 +1446,13 @@ export const ruleCollectionName: OperationURLParameter = { }, }; -export const ruleCollection: OperationParameter = { - parameterPath: "ruleCollection", - mapper: AdminRuleCollectionMapper, -}; - -export const ruleName: OperationURLParameter = { - parameterPath: "ruleName", +export const configurationName1: OperationURLParameter = { + parameterPath: "configurationName", mapper: { - serializedName: "ruleName", + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9_.-]*$"), + }, + serializedName: "configurationName", required: true, type: { name: "String", @@ -1334,19 +1460,18 @@ export const ruleName: OperationURLParameter = { }, }; -export const adminRule: OperationParameter = { - parameterPath: "adminRule", - mapper: BaseAdminRuleMapper, +export const routingConfiguration: OperationParameter = { + parameterPath: "routingConfiguration", + mapper: NetworkManagerRoutingConfigurationMapper, }; -export const resourceGroupName1: OperationURLParameter = { - parameterPath: "resourceGroupName", +export const ruleCollectionName: OperationURLParameter = { + parameterPath: "ruleCollectionName", mapper: { constraints: { - MaxLength: 90, - MinLength: 1, + Pattern: new RegExp("^[a-zA-Z0-9_.-]*$"), }, - serializedName: "resourceGroupName", + serializedName: "ruleCollectionName", required: true, type: { name: "String", @@ -1354,13 +1479,18 @@ export const resourceGroupName1: OperationURLParameter = { }, }; -export const networkManagerName1: OperationURLParameter = { - parameterPath: "networkManagerName", +export const ruleCollection: OperationParameter = { + parameterPath: "ruleCollection", + mapper: RoutingRuleCollectionMapper, +}; + +export const ruleName: OperationURLParameter = { + parameterPath: "ruleName", mapper: { constraints: { Pattern: new RegExp("^[a-zA-Z0-9_.-]*$"), }, - serializedName: "networkManagerName", + serializedName: "ruleName", required: true, type: { name: "String", @@ -1368,13 +1498,20 @@ export const networkManagerName1: OperationURLParameter = { }, }; -export const configurationName1: OperationURLParameter = { - parameterPath: "configurationName", +export const routingRule: OperationParameter = { + parameterPath: "routingRule", + mapper: RoutingRuleMapper, +}; + +export const parameters41: OperationParameter = { + parameterPath: "parameters", + mapper: ScopeConnectionMapper, +}; + +export const scopeConnectionName: OperationURLParameter = { + parameterPath: "scopeConnectionName", mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9_.-]*$"), - }, - serializedName: "configurationName", + serializedName: "scopeConnectionName", required: true, type: { name: "String", @@ -1382,17 +1519,14 @@ export const configurationName1: OperationURLParameter = { }, }; -export const securityUserConfiguration: OperationParameter = { - parameterPath: "securityUserConfiguration", - mapper: SecurityUserConfigurationMapper, +export const securityAdminConfiguration: OperationParameter = { + parameterPath: "securityAdminConfiguration", + mapper: SecurityAdminConfigurationMapper, }; export const ruleCollectionName1: OperationURLParameter = { parameterPath: "ruleCollectionName", mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9_.-]*$"), - }, serializedName: "ruleCollectionName", required: true, type: { @@ -1401,17 +1535,14 @@ export const ruleCollectionName1: OperationURLParameter = { }, }; -export const securityUserRuleCollection: OperationParameter = { - parameterPath: "securityUserRuleCollection", - mapper: SecurityUserRuleCollectionMapper, +export const ruleCollection1: OperationParameter = { + parameterPath: "ruleCollection", + mapper: AdminRuleCollectionMapper, }; export const ruleName1: OperationURLParameter = { parameterPath: "ruleName", mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9_.-]*$"), - }, serializedName: "ruleName", required: true, type: { @@ -1420,24 +1551,24 @@ export const ruleName1: OperationURLParameter = { }, }; -export const securityUserRule: OperationParameter = { - parameterPath: "securityUserRule", - mapper: SecurityUserRuleMapper, +export const adminRule: OperationParameter = { + parameterPath: "adminRule", + mapper: BaseAdminRuleMapper, }; -export const routingConfiguration: OperationParameter = { - parameterPath: "routingConfiguration", - mapper: NetworkManagerRoutingConfigurationMapper, +export const securityUserConfiguration: OperationParameter = { + parameterPath: "securityUserConfiguration", + mapper: SecurityUserConfigurationMapper, }; -export const ruleCollection1: OperationParameter = { - parameterPath: "ruleCollection", - mapper: RoutingRuleCollectionMapper, +export const securityUserRuleCollection: OperationParameter = { + parameterPath: "securityUserRuleCollection", + mapper: SecurityUserRuleCollectionMapper, }; -export const routingRule: OperationParameter = { - parameterPath: "routingRule", - mapper: RoutingRuleMapper, +export const securityUserRule: OperationParameter = { + parameterPath: "securityUserRule", + mapper: SecurityUserRuleMapper, }; export const networkProfileName: OperationURLParameter = { @@ -1499,6 +1630,68 @@ export const defaultSecurityRuleName: OperationURLParameter = { }, }; +export const workspaceName: OperationURLParameter = { + parameterPath: "workspaceName", + mapper: { + constraints: { + Pattern: new RegExp("^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"), + }, + serializedName: "workspaceName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const reachabilityAnalysisIntentName: OperationURLParameter = { + parameterPath: "reachabilityAnalysisIntentName", + mapper: { + constraints: { + Pattern: new RegExp("^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"), + }, + serializedName: "reachabilityAnalysisIntentName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body3: OperationParameter = { + parameterPath: "body", + mapper: ReachabilityAnalysisIntentMapper, +}; + +export const reachabilityAnalysisRunName: OperationURLParameter = { + parameterPath: "reachabilityAnalysisRunName", + mapper: { + constraints: { + Pattern: new RegExp("^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"), + }, + serializedName: "reachabilityAnalysisRunName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body4: OperationParameter = { + parameterPath: "body", + mapper: ReachabilityAnalysisRunMapper, +}; + +export const body5: OperationParameter = { + parameterPath: "body", + mapper: VerifierWorkspaceMapper, +}; + +export const body6: OperationParameter = { + parameterPath: ["options", "body"], + mapper: VerifierWorkspaceUpdateMapper, +}; + export const networkVirtualApplianceName: OperationURLParameter = { parameterPath: "networkVirtualApplianceName", mapper: { @@ -1922,7 +2115,7 @@ export const ipAddress: OperationQueryParameter = { }, }; -export const top1: OperationQueryParameter = { +export const top2: OperationQueryParameter = { parameterPath: ["options", "top"], mapper: { serializedName: "top", @@ -1932,16 +2125,6 @@ export const top1: OperationQueryParameter = { }, }; -export const skipToken1: OperationQueryParameter = { - parameterPath: ["options", "skipToken"], - mapper: { - serializedName: "skipToken", - type: { - name: "String", - }, - }, -}; - export const subnetName: OperationURLParameter = { parameterPath: "subnetName", mapper: { @@ -2077,6 +2260,55 @@ export const parameters77: OperationParameter = { mapper: VpnPacketCaptureStopParametersMapper, }; +export const typeParam: OperationQueryParameter = { + parameterPath: "typeParam", + mapper: { + serializedName: "type", + required: true, + type: { + name: "String", + }, + }, +}; + +export const fetchLatest: OperationQueryParameter = { + parameterPath: "fetchLatest", + mapper: { + serializedName: "fetchLatest", + required: true, + type: { + name: "Boolean", + }, + }, +}; + +export const peeringLocation: OperationQueryParameter = { + parameterPath: "peeringLocation", + mapper: { + serializedName: "peeringLocation", + required: true, + type: { + name: "String", + }, + }, +}; + +export const failoverTestId: OperationQueryParameter = { + parameterPath: "failoverTestId", + mapper: { + serializedName: "failoverTestId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const stopParameters: OperationParameter = { + parameterPath: "stopParameters", + mapper: ExpressRouteFailoverStopApiParametersMapper, +}; + export const request1: OperationParameter = { parameterPath: "request", mapper: P2SVpnConnectionRequestMapper, diff --git a/sdk/network/arm-network/src/networkManagementClient.ts b/sdk/network/arm-network/src/networkManagementClient.ts index 97628fcaff6e..6c778b53d668 100644 --- a/sdk/network/arm-network/src/networkManagementClient.ts +++ b/sdk/network/arm-network/src/networkManagementClient.ts @@ -60,6 +60,8 @@ import { FirewallPolicyDraftsImpl, FirewallPolicyDeploymentsImpl, FirewallPolicyRuleCollectionGroupDraftsImpl, + IpamPoolsImpl, + StaticCidrsImpl, IpAllocationsImpl, IpGroupsImpl, LoadBalancersImpl, @@ -82,6 +84,9 @@ import { ConnectivityConfigurationsImpl, NetworkGroupsImpl, StaticMembersImpl, + NetworkManagerRoutingConfigurationsImpl, + RoutingRuleCollectionsImpl, + RoutingRulesImpl, ScopeConnectionsImpl, SecurityAdminConfigurationsImpl, AdminRuleCollectionsImpl, @@ -89,13 +94,13 @@ import { SecurityUserConfigurationsImpl, SecurityUserRuleCollectionsImpl, SecurityUserRulesImpl, - NetworkManagerRoutingConfigurationsImpl, - RoutingRuleCollectionsImpl, - RoutingRulesImpl, NetworkProfilesImpl, NetworkSecurityGroupsImpl, SecurityRulesImpl, DefaultSecurityRulesImpl, + ReachabilityAnalysisIntentsImpl, + ReachabilityAnalysisRunsImpl, + VerifierWorkspacesImpl, NetworkVirtualAppliancesImpl, VirtualApplianceSitesImpl, VirtualApplianceSkusImpl, @@ -203,6 +208,8 @@ import { FirewallPolicyDrafts, FirewallPolicyDeployments, FirewallPolicyRuleCollectionGroupDrafts, + IpamPools, + StaticCidrs, IpAllocations, IpGroups, LoadBalancers, @@ -225,6 +232,9 @@ import { ConnectivityConfigurations, NetworkGroups, StaticMembers, + NetworkManagerRoutingConfigurations, + RoutingRuleCollections, + RoutingRules, ScopeConnections, SecurityAdminConfigurations, AdminRuleCollections, @@ -232,13 +242,13 @@ import { SecurityUserConfigurations, SecurityUserRuleCollections, SecurityUserRules, - NetworkManagerRoutingConfigurations, - RoutingRuleCollections, - RoutingRules, NetworkProfiles, NetworkSecurityGroups, SecurityRules, DefaultSecurityRules, + ReachabilityAnalysisIntents, + ReachabilityAnalysisRuns, + VerifierWorkspaces, NetworkVirtualAppliances, VirtualApplianceSites, VirtualApplianceSkus, @@ -400,7 +410,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-network/33.4.1`; + const packageDetails = `azsdk-js-arm-network/33.5.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -521,6 +531,8 @@ export class NetworkManagementClient extends coreClient.ServiceClient { this.firewallPolicyDeployments = new FirewallPolicyDeploymentsImpl(this); this.firewallPolicyRuleCollectionGroupDrafts = new FirewallPolicyRuleCollectionGroupDraftsImpl(this); + this.ipamPools = new IpamPoolsImpl(this); + this.staticCidrs = new StaticCidrsImpl(this); this.ipAllocations = new IpAllocationsImpl(this); this.ipGroups = new IpGroupsImpl(this); this.loadBalancers = new LoadBalancersImpl(this); @@ -555,6 +567,10 @@ export class NetworkManagementClient extends coreClient.ServiceClient { this.connectivityConfigurations = new ConnectivityConfigurationsImpl(this); this.networkGroups = new NetworkGroupsImpl(this); this.staticMembers = new StaticMembersImpl(this); + this.networkManagerRoutingConfigurations = + new NetworkManagerRoutingConfigurationsImpl(this); + this.routingRuleCollections = new RoutingRuleCollectionsImpl(this); + this.routingRules = new RoutingRulesImpl(this); this.scopeConnections = new ScopeConnectionsImpl(this); this.securityAdminConfigurations = new SecurityAdminConfigurationsImpl( this, @@ -566,14 +582,15 @@ export class NetworkManagementClient extends coreClient.ServiceClient { this, ); this.securityUserRules = new SecurityUserRulesImpl(this); - this.networkManagerRoutingConfigurations = - new NetworkManagerRoutingConfigurationsImpl(this); - this.routingRuleCollections = new RoutingRuleCollectionsImpl(this); - this.routingRules = new RoutingRulesImpl(this); this.networkProfiles = new NetworkProfilesImpl(this); this.networkSecurityGroups = new NetworkSecurityGroupsImpl(this); this.securityRules = new SecurityRulesImpl(this); this.defaultSecurityRules = new DefaultSecurityRulesImpl(this); + this.reachabilityAnalysisIntents = new ReachabilityAnalysisIntentsImpl( + this, + ); + this.reachabilityAnalysisRuns = new ReachabilityAnalysisRunsImpl(this); + this.verifierWorkspaces = new VerifierWorkspacesImpl(this); this.networkVirtualAppliances = new NetworkVirtualAppliancesImpl(this); this.virtualApplianceSites = new VirtualApplianceSitesImpl(this); this.virtualApplianceSkus = new VirtualApplianceSkusImpl(this); @@ -1735,6 +1752,8 @@ export class NetworkManagementClient extends coreClient.ServiceClient { firewallPolicyDrafts: FirewallPolicyDrafts; firewallPolicyDeployments: FirewallPolicyDeployments; firewallPolicyRuleCollectionGroupDrafts: FirewallPolicyRuleCollectionGroupDrafts; + ipamPools: IpamPools; + staticCidrs: StaticCidrs; ipAllocations: IpAllocations; ipGroups: IpGroups; loadBalancers: LoadBalancers; @@ -1757,6 +1776,9 @@ export class NetworkManagementClient extends coreClient.ServiceClient { connectivityConfigurations: ConnectivityConfigurations; networkGroups: NetworkGroups; staticMembers: StaticMembers; + networkManagerRoutingConfigurations: NetworkManagerRoutingConfigurations; + routingRuleCollections: RoutingRuleCollections; + routingRules: RoutingRules; scopeConnections: ScopeConnections; securityAdminConfigurations: SecurityAdminConfigurations; adminRuleCollections: AdminRuleCollections; @@ -1764,13 +1786,13 @@ export class NetworkManagementClient extends coreClient.ServiceClient { securityUserConfigurations: SecurityUserConfigurations; securityUserRuleCollections: SecurityUserRuleCollections; securityUserRules: SecurityUserRules; - networkManagerRoutingConfigurations: NetworkManagerRoutingConfigurations; - routingRuleCollections: RoutingRuleCollections; - routingRules: RoutingRules; networkProfiles: NetworkProfiles; networkSecurityGroups: NetworkSecurityGroups; securityRules: SecurityRules; defaultSecurityRules: DefaultSecurityRules; + reachabilityAnalysisIntents: ReachabilityAnalysisIntents; + reachabilityAnalysisRuns: ReachabilityAnalysisRuns; + verifierWorkspaces: VerifierWorkspaces; networkVirtualAppliances: NetworkVirtualAppliances; virtualApplianceSites: VirtualApplianceSites; virtualApplianceSkus: VirtualApplianceSkus; diff --git a/sdk/network/arm-network/src/operations/adminRuleCollections.ts b/sdk/network/arm-network/src/operations/adminRuleCollections.ts index 6671f28de5ad..6d8c172b612b 100644 --- a/sdk/network/arm-network/src/operations/adminRuleCollections.ts +++ b/sdk/network/arm-network/src/operations/adminRuleCollections.ts @@ -350,19 +350,19 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AdminRuleCollectionListResult, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, ], headerParameters: [Parameters.accept], @@ -376,7 +376,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AdminRuleCollection, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, queryParameters: [Parameters.apiVersion], @@ -384,9 +384,9 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, - Parameters.ruleCollectionName, + Parameters.ruleCollectionName1, ], headerParameters: [Parameters.accept], serializer, @@ -402,18 +402,18 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AdminRuleCollection, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, - requestBody: Parameters.ruleCollection, + requestBody: Parameters.ruleCollection1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, - Parameters.ruleCollectionName, + Parameters.ruleCollectionName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -428,7 +428,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, queryParameters: [Parameters.apiVersion, Parameters.force], @@ -436,9 +436,9 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, - Parameters.ruleCollectionName, + Parameters.ruleCollectionName1, ], headerParameters: [Parameters.accept], serializer, @@ -451,7 +451,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AdminRuleCollectionListResult, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, urlParameters: [ @@ -459,7 +459,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.nextLink, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, ], headerParameters: [Parameters.accept], diff --git a/sdk/network/arm-network/src/operations/adminRules.ts b/sdk/network/arm-network/src/operations/adminRules.ts index 883ff15aa038..ceacff0c8ba3 100644 --- a/sdk/network/arm-network/src/operations/adminRules.ts +++ b/sdk/network/arm-network/src/operations/adminRules.ts @@ -382,21 +382,21 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AdminRuleListResult, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, - Parameters.ruleCollectionName, + Parameters.ruleCollectionName1, ], headerParameters: [Parameters.accept], serializer, @@ -409,7 +409,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.BaseAdminRule, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, queryParameters: [Parameters.apiVersion], @@ -417,10 +417,10 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, - Parameters.ruleCollectionName, - Parameters.ruleName, + Parameters.ruleCollectionName1, + Parameters.ruleName1, ], headerParameters: [Parameters.accept], serializer, @@ -436,7 +436,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.BaseAdminRule, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, requestBody: Parameters.adminRule, @@ -445,10 +445,10 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, - Parameters.ruleCollectionName, - Parameters.ruleName, + Parameters.ruleCollectionName1, + Parameters.ruleName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -463,7 +463,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, queryParameters: [Parameters.apiVersion, Parameters.force], @@ -471,10 +471,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, - Parameters.ruleCollectionName, - Parameters.ruleName, + Parameters.ruleCollectionName1, + Parameters.ruleName1, ], headerParameters: [Parameters.accept], serializer, @@ -487,7 +487,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AdminRuleListResult, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, urlParameters: [ @@ -495,9 +495,9 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.nextLink, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, - Parameters.ruleCollectionName, + Parameters.ruleCollectionName1, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/network/arm-network/src/operations/connectivityConfigurations.ts b/sdk/network/arm-network/src/operations/connectivityConfigurations.ts index f5da1542b226..986786c45383 100644 --- a/sdk/network/arm-network/src/operations/connectivityConfigurations.ts +++ b/sdk/network/arm-network/src/operations/connectivityConfigurations.ts @@ -394,7 +394,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, diff --git a/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts b/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts index 657ab633ddd8..21b1e4440a2d 100644 --- a/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts +++ b/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts @@ -200,7 +200,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.ruleCollectionName, + Parameters.ruleCollectionName1, Parameters.networkVirtualApplianceName, ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -223,7 +223,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.ruleCollectionName, + Parameters.ruleCollectionName1, Parameters.networkVirtualApplianceName, ], headerParameters: [Parameters.accept], diff --git a/sdk/network/arm-network/src/operations/index.ts b/sdk/network/arm-network/src/operations/index.ts index 7fdbc259397b..e7e7bdb4a70a 100644 --- a/sdk/network/arm-network/src/operations/index.ts +++ b/sdk/network/arm-network/src/operations/index.ts @@ -48,6 +48,8 @@ export * from "./firewallPolicyIdpsSignaturesFilterValues"; export * from "./firewallPolicyDrafts"; export * from "./firewallPolicyDeployments"; export * from "./firewallPolicyRuleCollectionGroupDrafts"; +export * from "./ipamPools"; +export * from "./staticCidrs"; export * from "./ipAllocations"; export * from "./ipGroups"; export * from "./loadBalancers"; @@ -70,6 +72,9 @@ export * from "./managementGroupNetworkManagerConnections"; export * from "./connectivityConfigurations"; export * from "./networkGroups"; export * from "./staticMembers"; +export * from "./networkManagerRoutingConfigurations"; +export * from "./routingRuleCollections"; +export * from "./routingRules"; export * from "./scopeConnections"; export * from "./securityAdminConfigurations"; export * from "./adminRuleCollections"; @@ -77,13 +82,13 @@ export * from "./adminRules"; export * from "./securityUserConfigurations"; export * from "./securityUserRuleCollections"; export * from "./securityUserRules"; -export * from "./networkManagerRoutingConfigurations"; -export * from "./routingRuleCollections"; -export * from "./routingRules"; export * from "./networkProfiles"; export * from "./networkSecurityGroups"; export * from "./securityRules"; export * from "./defaultSecurityRules"; +export * from "./reachabilityAnalysisIntents"; +export * from "./reachabilityAnalysisRuns"; +export * from "./verifierWorkspaces"; export * from "./networkVirtualAppliances"; export * from "./virtualApplianceSites"; export * from "./virtualApplianceSkus"; diff --git a/sdk/network/arm-network/src/operations/ipamPools.ts b/sdk/network/arm-network/src/operations/ipamPools.ts new file mode 100644 index 000000000000..73eff76932b1 --- /dev/null +++ b/sdk/network/arm-network/src/operations/ipamPools.ts @@ -0,0 +1,787 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { IpamPools } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetworkManagementClient } from "../networkManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + IpamPool, + IpamPoolsListNextOptionalParams, + IpamPoolsListOptionalParams, + IpamPoolsListResponse, + PoolAssociation, + IpamPoolsListAssociatedResourcesNextOptionalParams, + IpamPoolsListAssociatedResourcesOptionalParams, + IpamPoolsListAssociatedResourcesResponse, + IpamPoolsCreateOptionalParams, + IpamPoolsCreateResponse, + IpamPoolsUpdateOptionalParams, + IpamPoolsUpdateResponse, + IpamPoolsGetOptionalParams, + IpamPoolsGetResponse, + IpamPoolsDeleteOptionalParams, + IpamPoolsDeleteResponse, + IpamPoolsGetPoolUsageOptionalParams, + IpamPoolsGetPoolUsageResponse, + IpamPoolsListNextResponse, + IpamPoolsListAssociatedResourcesNextResponse, +} from "../models"; + +/// +/** Class containing IpamPools operations. */ +export class IpamPoolsImpl implements IpamPools { + private readonly client: NetworkManagementClient; + + /** + * Initialize a new instance of the class IpamPools class. + * @param client Reference to the service client + */ + constructor(client: NetworkManagementClient) { + this.client = client; + } + + /** + * Gets list of Pool resources at Network Manager level. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + networkManagerName: string, + options?: IpamPoolsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + networkManagerName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + networkManagerName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + networkManagerName: string, + options?: IpamPoolsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: IpamPoolsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, networkManagerName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + networkManagerName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + networkManagerName: string, + options?: IpamPoolsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + networkManagerName, + options, + )) { + yield* page; + } + } + + /** + * List Associated Resource in the Pool. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + public listAssociatedResources( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsListAssociatedResourcesOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listAssociatedResourcesPagingAll( + resourceGroupName, + networkManagerName, + poolName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listAssociatedResourcesPagingPage( + resourceGroupName, + networkManagerName, + poolName, + options, + settings, + ); + }, + }; + } + + private async *listAssociatedResourcesPagingPage( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsListAssociatedResourcesOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: IpamPoolsListAssociatedResourcesResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listAssociatedResources( + resourceGroupName, + networkManagerName, + poolName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listAssociatedResourcesNext( + resourceGroupName, + networkManagerName, + poolName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listAssociatedResourcesPagingAll( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsListAssociatedResourcesOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listAssociatedResourcesPagingPage( + resourceGroupName, + networkManagerName, + poolName, + options, + )) { + yield* page; + } + } + + /** + * Gets list of Pool resources at Network Manager level. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + networkManagerName: string, + options?: IpamPoolsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, options }, + listOperationSpec, + ); + } + + /** + * Creates/Updates the Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName IP Address Manager Pool resource name. + * @param body Pool resource object to create/update. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + IpamPoolsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkManagerName, poolName, body, options }, + spec: createOperationSpec, + }); + const poller = await createHttpPoller< + IpamPoolsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates/Updates the Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName IP Address Manager Pool resource name. + * @param body Pool resource object to create/update. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + networkManagerName, + poolName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Updates the specific Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName IP Address Manager Pool resource name. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, poolName, options }, + updateOperationSpec, + ); + } + + /** + * Gets the specific Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, poolName, options }, + getOperationSpec, + ); + } + + /** + * Delete the Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + IpamPoolsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkManagerName, poolName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + IpamPoolsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete the Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkManagerName, + poolName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Get the Pool Usage. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + getPoolUsage( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsGetPoolUsageOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, poolName, options }, + getPoolUsageOperationSpec, + ); + } + + /** + * List Associated Resource in the Pool. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + private _listAssociatedResources( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsListAssociatedResourcesOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, poolName, options }, + listAssociatedResourcesOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + networkManagerName: string, + nextLink: string, + options?: IpamPoolsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, nextLink, options }, + listNextOperationSpec, + ); + } + + /** + * ListAssociatedResourcesNext + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param nextLink The nextLink from the previous successful call to the ListAssociatedResources + * method. + * @param options The options parameters. + */ + private _listAssociatedResourcesNext( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + nextLink: string, + options?: IpamPoolsListAssociatedResourcesNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, poolName, nextLink, options }, + listAssociatedResourcesNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpamPoolList, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken, + Parameters.skip, + Parameters.top1, + Parameters.sortKey, + Parameters.sortValue, + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IpamPool, + }, + 201: { + bodyMapper: Mappers.IpamPool, + }, + 202: { + bodyMapper: Mappers.IpamPool, + }, + 204: { + bodyMapper: Mappers.IpamPool, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + requestBody: Parameters.body, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.IpamPool, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpamPool, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.IpamPoolsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.IpamPoolsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.IpamPoolsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.IpamPoolsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getPoolUsageOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/getPoolUsage", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PoolUsage, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listAssociatedResourcesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/listAssociatedResources", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PoolAssociationList, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpamPoolList, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.networkManagerName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listAssociatedResourcesNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PoolAssociationList, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.networkManagerName1, + Parameters.poolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/network/arm-network/src/operations/loadBalancerLoadBalancingRules.ts b/sdk/network/arm-network/src/operations/loadBalancerLoadBalancingRules.ts index 3e6c0c8e1fa5..400bba800656 100644 --- a/sdk/network/arm-network/src/operations/loadBalancerLoadBalancingRules.ts +++ b/sdk/network/arm-network/src/operations/loadBalancerLoadBalancingRules.ts @@ -13,6 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { NetworkManagementClient } from "../networkManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { LoadBalancingRule, LoadBalancerLoadBalancingRulesListNextOptionalParams, @@ -20,6 +26,8 @@ import { LoadBalancerLoadBalancingRulesListResponse, LoadBalancerLoadBalancingRulesGetOptionalParams, LoadBalancerLoadBalancingRulesGetResponse, + LoadBalancerLoadBalancingRulesHealthOptionalParams, + LoadBalancerLoadBalancingRulesHealthResponse, LoadBalancerLoadBalancingRulesListNextResponse, } from "../models"; @@ -154,6 +162,101 @@ export class LoadBalancerLoadBalancingRulesImpl ); } + /** + * Get health details of a load balancing rule. + * @param groupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param loadBalancingRuleName The name of the load balancing rule. + * @param options The options parameters. + */ + async beginHealth( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LoadBalancerLoadBalancingRulesHealthResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { groupName, loadBalancerName, loadBalancingRuleName, options }, + spec: healthOperationSpec, + }); + const poller = await createHttpPoller< + LoadBalancerLoadBalancingRulesHealthResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Get health details of a load balancing rule. + * @param groupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param loadBalancingRuleName The name of the load balancing rule. + * @param options The options parameters. + */ + async beginHealthAndWait( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ): Promise { + const poller = await this.beginHealth( + groupName, + loadBalancerName, + loadBalancingRuleName, + options, + ); + return poller.pollUntilDone(); + } + /** * ListNext * @param resourceGroupName The name of the resource group. @@ -219,6 +322,37 @@ const getOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const healthOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}/health", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.LoadBalancerHealthPerRule, + }, + 201: { + bodyMapper: Mappers.LoadBalancerHealthPerRule, + }, + 202: { + bodyMapper: Mappers.LoadBalancerHealthPerRule, + }, + 204: { + bodyMapper: Mappers.LoadBalancerHealthPerRule, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.groupName1, + Parameters.loadBalancerName1, + Parameters.loadBalancingRuleName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/network/arm-network/src/operations/managementGroupNetworkManagerConnections.ts b/sdk/network/arm-network/src/operations/managementGroupNetworkManagerConnections.ts index 172635f01af8..e51974479913 100644 --- a/sdk/network/arm-network/src/operations/managementGroupNetworkManagerConnections.ts +++ b/sdk/network/arm-network/src/operations/managementGroupNetworkManagerConnections.ts @@ -275,7 +275,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [Parameters.$host, Parameters.managementGroupId], headerParameters: [Parameters.accept], diff --git a/sdk/network/arm-network/src/operations/networkGroups.ts b/sdk/network/arm-network/src/operations/networkGroups.ts index 208268f1cd04..26f46b43a794 100644 --- a/sdk/network/arm-network/src/operations/networkGroups.ts +++ b/sdk/network/arm-network/src/operations/networkGroups.ts @@ -394,7 +394,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, diff --git a/sdk/network/arm-network/src/operations/networkManagerCommits.ts b/sdk/network/arm-network/src/operations/networkManagerCommits.ts index 84d8a8274fdc..df426360ff4a 100644 --- a/sdk/network/arm-network/src/operations/networkManagerCommits.ts +++ b/sdk/network/arm-network/src/operations/networkManagerCommits.ts @@ -159,7 +159,7 @@ const postOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/network/arm-network/src/operations/networkManagerDeploymentStatusOperations.ts b/sdk/network/arm-network/src/operations/networkManagerDeploymentStatusOperations.ts index 3707e58a91a1..6595d68588fc 100644 --- a/sdk/network/arm-network/src/operations/networkManagerDeploymentStatusOperations.ts +++ b/sdk/network/arm-network/src/operations/networkManagerDeploymentStatusOperations.ts @@ -70,7 +70,7 @@ const listOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/network/arm-network/src/operations/networkManagerRoutingConfigurations.ts b/sdk/network/arm-network/src/operations/networkManagerRoutingConfigurations.ts index 42c5c3dde599..3b8ccafe9278 100644 --- a/sdk/network/arm-network/src/operations/networkManagerRoutingConfigurations.ts +++ b/sdk/network/arm-network/src/operations/networkManagerRoutingConfigurations.ts @@ -318,13 +318,13 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, ], headerParameters: [Parameters.accept], serializer, @@ -345,7 +345,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept], @@ -371,7 +371,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -395,7 +395,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept], @@ -417,7 +417,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.nextLink, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/network/arm-network/src/operations/networkManagers.ts b/sdk/network/arm-network/src/operations/networkManagers.ts index e9c3d66e85d3..c96b68ff0409 100644 --- a/sdk/network/arm-network/src/operations/networkManagers.ts +++ b/sdk/network/arm-network/src/operations/networkManagers.ts @@ -384,7 +384,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept], serializer, @@ -409,7 +409,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -432,7 +432,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept], serializer, @@ -454,7 +454,7 @@ const patchOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -474,7 +474,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], @@ -494,7 +494,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, diff --git a/sdk/network/arm-network/src/operations/reachabilityAnalysisIntents.ts b/sdk/network/arm-network/src/operations/reachabilityAnalysisIntents.ts new file mode 100644 index 000000000000..b43dc3ac1e86 --- /dev/null +++ b/sdk/network/arm-network/src/operations/reachabilityAnalysisIntents.ts @@ -0,0 +1,393 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ReachabilityAnalysisIntents } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetworkManagementClient } from "../networkManagementClient"; +import { + ReachabilityAnalysisIntent, + ReachabilityAnalysisIntentsListNextOptionalParams, + ReachabilityAnalysisIntentsListOptionalParams, + ReachabilityAnalysisIntentsListResponse, + ReachabilityAnalysisIntentsGetOptionalParams, + ReachabilityAnalysisIntentsGetResponse, + ReachabilityAnalysisIntentsCreateOptionalParams, + ReachabilityAnalysisIntentsCreateResponse, + ReachabilityAnalysisIntentsDeleteOptionalParams, + ReachabilityAnalysisIntentsListNextResponse, +} from "../models"; + +/// +/** Class containing ReachabilityAnalysisIntents operations. */ +export class ReachabilityAnalysisIntentsImpl + implements ReachabilityAnalysisIntents +{ + private readonly client: NetworkManagementClient; + + /** + * Initialize a new instance of the class ReachabilityAnalysisIntents class. + * @param client Reference to the service client + */ + constructor(client: NetworkManagementClient) { + this.client = client; + } + + /** + * Gets list of Reachability Analysis Intents . + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisIntentsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + networkManagerName, + workspaceName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + networkManagerName, + workspaceName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisIntentsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ReachabilityAnalysisIntentsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + networkManagerName, + workspaceName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + networkManagerName, + workspaceName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisIntentsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + networkManagerName, + workspaceName, + options, + )) { + yield* page; + } + } + + /** + * Gets list of Reachability Analysis Intents . + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisIntentsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, workspaceName, options }, + listOperationSpec, + ); + } + + /** + * Get the Reachability Analysis Intent. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options?: ReachabilityAnalysisIntentsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + options, + }, + getOperationSpec, + ); + } + + /** + * Creates Reachability Analysis Intent. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. + * @param body Reachability Analysis Intent object to create/update. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + body: ReachabilityAnalysisIntent, + options?: ReachabilityAnalysisIntentsCreateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + body, + options, + }, + createOperationSpec, + ); + } + + /** + * Deletes Reachability Analysis Intent. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options?: ReachabilityAnalysisIntentsDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisIntentName, + options, + }, + deleteOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + nextLink: string, + options?: ReachabilityAnalysisIntentsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkManagerName, + workspaceName, + nextLink, + options, + }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReachabilityAnalysisIntentListResult, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken, + Parameters.skip, + Parameters.top1, + Parameters.sortKey, + Parameters.sortValue, + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReachabilityAnalysisIntent, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + Parameters.reachabilityAnalysisIntentName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ReachabilityAnalysisIntent, + }, + 201: { + bodyMapper: Mappers.ReachabilityAnalysisIntent, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + requestBody: Parameters.body3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + Parameters.reachabilityAnalysisIntentName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + Parameters.reachabilityAnalysisIntentName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReachabilityAnalysisIntentListResult, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.networkManagerName1, + Parameters.workspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/network/arm-network/src/operations/reachabilityAnalysisRuns.ts b/sdk/network/arm-network/src/operations/reachabilityAnalysisRuns.ts new file mode 100644 index 000000000000..fb78020932c0 --- /dev/null +++ b/sdk/network/arm-network/src/operations/reachabilityAnalysisRuns.ts @@ -0,0 +1,487 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ReachabilityAnalysisRuns } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetworkManagementClient } from "../networkManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ReachabilityAnalysisRun, + ReachabilityAnalysisRunsListNextOptionalParams, + ReachabilityAnalysisRunsListOptionalParams, + ReachabilityAnalysisRunsListResponse, + ReachabilityAnalysisRunsGetOptionalParams, + ReachabilityAnalysisRunsGetResponse, + ReachabilityAnalysisRunsCreateOptionalParams, + ReachabilityAnalysisRunsCreateResponse, + ReachabilityAnalysisRunsDeleteOptionalParams, + ReachabilityAnalysisRunsDeleteResponse, + ReachabilityAnalysisRunsListNextResponse, +} from "../models"; + +/// +/** Class containing ReachabilityAnalysisRuns operations. */ +export class ReachabilityAnalysisRunsImpl implements ReachabilityAnalysisRuns { + private readonly client: NetworkManagementClient; + + /** + * Initialize a new instance of the class ReachabilityAnalysisRuns class. + * @param client Reference to the service client + */ + constructor(client: NetworkManagementClient) { + this.client = client; + } + + /** + * Gets list of Reachability Analysis Runs. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisRunsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + networkManagerName, + workspaceName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + networkManagerName, + workspaceName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisRunsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ReachabilityAnalysisRunsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + networkManagerName, + workspaceName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + networkManagerName, + workspaceName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisRunsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + networkManagerName, + workspaceName, + options, + )) { + yield* page; + } + } + + /** + * Gets list of Reachability Analysis Runs. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisRunsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, workspaceName, options }, + listOperationSpec, + ); + } + + /** + * Gets Reachability Analysis Run. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisRunName Reachability Analysis Run name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + options, + }, + getOperationSpec, + ); + } + + /** + * Creates Reachability Analysis Runs. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisRunName Reachability Analysis Run name. + * @param body Analysis Run resource object to create/update. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + body: ReachabilityAnalysisRun, + options?: ReachabilityAnalysisRunsCreateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + body, + options, + }, + createOperationSpec, + ); + } + + /** + * Deletes Reachability Analysis Run. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisRunName Reachability Analysis Run name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ReachabilityAnalysisRunsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ReachabilityAnalysisRunsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Deletes Reachability Analysis Run. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisRunName Reachability Analysis Run name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkManagerName, + workspaceName, + reachabilityAnalysisRunName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + nextLink: string, + options?: ReachabilityAnalysisRunsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkManagerName, + workspaceName, + nextLink, + options, + }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReachabilityAnalysisRunListResult, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken, + Parameters.skip, + Parameters.top1, + Parameters.sortKey, + Parameters.sortValue, + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReachabilityAnalysisRun, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + Parameters.reachabilityAnalysisRunName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ReachabilityAnalysisRun, + }, + 201: { + bodyMapper: Mappers.ReachabilityAnalysisRun, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + Parameters.reachabilityAnalysisRunName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ReachabilityAnalysisRunsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ReachabilityAnalysisRunsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ReachabilityAnalysisRunsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ReachabilityAnalysisRunsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + Parameters.reachabilityAnalysisRunName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReachabilityAnalysisRunListResult, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.networkManagerName1, + Parameters.workspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/network/arm-network/src/operations/routeFilterRules.ts b/sdk/network/arm-network/src/operations/routeFilterRules.ts index 05020bf4d5f4..8381ffc579ba 100644 --- a/sdk/network/arm-network/src/operations/routeFilterRules.ts +++ b/sdk/network/arm-network/src/operations/routeFilterRules.ts @@ -399,7 +399,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.ruleName, + Parameters.ruleName1, Parameters.routeFilterName, ], headerParameters: [Parameters.accept], @@ -421,7 +421,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.ruleName, + Parameters.ruleName1, Parameters.routeFilterName, ], headerParameters: [Parameters.accept], @@ -453,7 +453,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.ruleName, + Parameters.ruleName1, Parameters.routeFilterName, ], headerParameters: [Parameters.accept, Parameters.contentType], diff --git a/sdk/network/arm-network/src/operations/routingRuleCollections.ts b/sdk/network/arm-network/src/operations/routingRuleCollections.ts index 32f3b616bba5..91d021c06729 100644 --- a/sdk/network/arm-network/src/operations/routingRuleCollections.ts +++ b/sdk/network/arm-network/src/operations/routingRuleCollections.ts @@ -356,13 +356,13 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept], @@ -384,9 +384,9 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept], serializer, @@ -405,15 +405,15 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError, }, }, - requestBody: Parameters.ruleCollection1, + requestBody: Parameters.ruleCollection, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -436,9 +436,9 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept], serializer, @@ -459,7 +459,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.nextLink, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept], diff --git a/sdk/network/arm-network/src/operations/routingRules.ts b/sdk/network/arm-network/src/operations/routingRules.ts index c99f7e4e3b8a..140a0a0062ad 100644 --- a/sdk/network/arm-network/src/operations/routingRules.ts +++ b/sdk/network/arm-network/src/operations/routingRules.ts @@ -388,15 +388,15 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept], serializer, @@ -417,10 +417,10 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, - Parameters.ruleName1, + Parameters.ruleCollectionName, + Parameters.ruleName, ], headerParameters: [Parameters.accept], serializer, @@ -445,10 +445,10 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, - Parameters.ruleName1, + Parameters.ruleCollectionName, + Parameters.ruleName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -471,10 +471,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, - Parameters.ruleName1, + Parameters.ruleCollectionName, + Parameters.ruleName, ], headerParameters: [Parameters.accept], serializer, @@ -495,9 +495,9 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.nextLink, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/network/arm-network/src/operations/scopeConnections.ts b/sdk/network/arm-network/src/operations/scopeConnections.ts index 465ae004a6db..bbecf3fb5cc1 100644 --- a/sdk/network/arm-network/src/operations/scopeConnections.ts +++ b/sdk/network/arm-network/src/operations/scopeConnections.ts @@ -243,7 +243,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.scopeConnectionName, ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -266,7 +266,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.scopeConnectionName, ], headerParameters: [Parameters.accept], @@ -287,7 +287,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.scopeConnectionName, ], headerParameters: [Parameters.accept], @@ -307,13 +307,13 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept], serializer, @@ -334,7 +334,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.nextLink, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/network/arm-network/src/operations/securityAdminConfigurations.ts b/sdk/network/arm-network/src/operations/securityAdminConfigurations.ts index 8a80b1490bc8..c66451ba0d78 100644 --- a/sdk/network/arm-network/src/operations/securityAdminConfigurations.ts +++ b/sdk/network/arm-network/src/operations/securityAdminConfigurations.ts @@ -314,19 +314,19 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SecurityAdminConfigurationListResult, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept], serializer, @@ -339,7 +339,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SecurityAdminConfiguration, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, queryParameters: [Parameters.apiVersion], @@ -347,7 +347,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, ], headerParameters: [Parameters.accept], @@ -364,7 +364,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SecurityAdminConfiguration, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, requestBody: Parameters.securityAdminConfiguration, @@ -373,7 +373,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -389,7 +389,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, queryParameters: [Parameters.apiVersion, Parameters.force], @@ -397,7 +397,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.networkManagerName, + Parameters.networkManagerName1, Parameters.configurationName, ], headerParameters: [Parameters.accept], @@ -411,7 +411,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SecurityAdminConfigurationListResult, }, default: { - bodyMapper: Mappers.CloudError, + bodyMapper: Mappers.CommonErrorResponse, }, }, urlParameters: [ @@ -419,7 +419,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.nextLink, - Parameters.networkManagerName, + Parameters.networkManagerName1, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/network/arm-network/src/operations/securityUserConfigurations.ts b/sdk/network/arm-network/src/operations/securityUserConfigurations.ts index b204c036485e..141e50d0721e 100644 --- a/sdk/network/arm-network/src/operations/securityUserConfigurations.ts +++ b/sdk/network/arm-network/src/operations/securityUserConfigurations.ts @@ -320,13 +320,13 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, ], headerParameters: [Parameters.accept], serializer, @@ -347,7 +347,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept], @@ -373,7 +373,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -397,7 +397,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept], @@ -419,7 +419,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.nextLink, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/network/arm-network/src/operations/securityUserRuleCollections.ts b/sdk/network/arm-network/src/operations/securityUserRuleCollections.ts index bfa7626b45a4..72cc98f6f670 100644 --- a/sdk/network/arm-network/src/operations/securityUserRuleCollections.ts +++ b/sdk/network/arm-network/src/operations/securityUserRuleCollections.ts @@ -358,13 +358,13 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept], @@ -386,9 +386,9 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept], serializer, @@ -413,9 +413,9 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -438,9 +438,9 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept], serializer, @@ -461,7 +461,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.nextLink, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, ], headerParameters: [Parameters.accept], diff --git a/sdk/network/arm-network/src/operations/securityUserRules.ts b/sdk/network/arm-network/src/operations/securityUserRules.ts index 1bc8f0783933..95664903de23 100644 --- a/sdk/network/arm-network/src/operations/securityUserRules.ts +++ b/sdk/network/arm-network/src/operations/securityUserRules.ts @@ -388,15 +388,15 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept], serializer, @@ -417,10 +417,10 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, - Parameters.ruleName1, + Parameters.ruleCollectionName, + Parameters.ruleName, ], headerParameters: [Parameters.accept], serializer, @@ -445,10 +445,10 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, - Parameters.ruleName1, + Parameters.ruleCollectionName, + Parameters.ruleName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -471,10 +471,10 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, - Parameters.ruleName1, + Parameters.ruleCollectionName, + Parameters.ruleName, ], headerParameters: [Parameters.accept], serializer, @@ -495,9 +495,9 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.nextLink, Parameters.resourceGroupName1, - Parameters.networkManagerName1, + Parameters.networkManagerName2, Parameters.configurationName1, - Parameters.ruleCollectionName1, + Parameters.ruleCollectionName, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/network/arm-network/src/operations/staticCidrs.ts b/sdk/network/arm-network/src/operations/staticCidrs.ts new file mode 100644 index 000000000000..5c44ce8b6be9 --- /dev/null +++ b/sdk/network/arm-network/src/operations/staticCidrs.ts @@ -0,0 +1,478 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { StaticCidrs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetworkManagementClient } from "../networkManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + StaticCidr, + StaticCidrsListNextOptionalParams, + StaticCidrsListOptionalParams, + StaticCidrsListResponse, + StaticCidrsCreateOptionalParams, + StaticCidrsCreateResponse, + StaticCidrsGetOptionalParams, + StaticCidrsGetResponse, + StaticCidrsDeleteOptionalParams, + StaticCidrsDeleteResponse, + StaticCidrsListNextResponse, +} from "../models"; + +/// +/** Class containing StaticCidrs operations. */ +export class StaticCidrsImpl implements StaticCidrs { + private readonly client: NetworkManagementClient; + + /** + * Initialize a new instance of the class StaticCidrs class. + * @param client Reference to the service client + */ + constructor(client: NetworkManagementClient) { + this.client = client; + } + + /** + * Gets list of Static CIDR resources at Network Manager level. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: StaticCidrsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + networkManagerName, + poolName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + networkManagerName, + poolName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: StaticCidrsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: StaticCidrsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + networkManagerName, + poolName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + networkManagerName, + poolName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: StaticCidrsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + networkManagerName, + poolName, + options, + )) { + yield* page; + } + } + + /** + * Gets list of Static CIDR resources at Network Manager level. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: StaticCidrsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, poolName, options }, + listOperationSpec, + ); + } + + /** + * Creates/Updates the Static CIDR resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName IP Address Manager Pool resource name. + * @param staticCidrName Static Cidr allocation name. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsCreateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + options, + }, + createOperationSpec, + ); + } + + /** + * Gets the specific Static CIDR resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param staticCidrName StaticCidr resource name to retrieve. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + options, + }, + getOperationSpec, + ); + } + + /** + * Delete the Static CIDR resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param staticCidrName StaticCidr resource name to delete. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + StaticCidrsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + StaticCidrsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete the Static CIDR resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param staticCidrName StaticCidr resource name to delete. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkManagerName, + poolName, + staticCidrName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + nextLink: string, + options?: StaticCidrsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, poolName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StaticCidrList, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken, + Parameters.skip, + Parameters.top1, + Parameters.sortKey, + Parameters.sortValue, + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.StaticCidr, + }, + 201: { + bodyMapper: Mappers.StaticCidr, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + requestBody: Parameters.body2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + Parameters.staticCidrName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StaticCidr, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + Parameters.staticCidrName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.StaticCidrsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.StaticCidrsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.StaticCidrsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.StaticCidrsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.poolName, + Parameters.staticCidrName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StaticCidrList, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.networkManagerName1, + Parameters.poolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/network/arm-network/src/operations/staticMembers.ts b/sdk/network/arm-network/src/operations/staticMembers.ts index 49d82ea71f30..d36d6f2fe255 100644 --- a/sdk/network/arm-network/src/operations/staticMembers.ts +++ b/sdk/network/arm-network/src/operations/staticMembers.ts @@ -352,7 +352,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [ Parameters.$host, diff --git a/sdk/network/arm-network/src/operations/subscriptionNetworkManagerConnections.ts b/sdk/network/arm-network/src/operations/subscriptionNetworkManagerConnections.ts index 94b498b46b1a..d10a28dbaefe 100644 --- a/sdk/network/arm-network/src/operations/subscriptionNetworkManagerConnections.ts +++ b/sdk/network/arm-network/src/operations/subscriptionNetworkManagerConnections.ts @@ -248,7 +248,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.top, - Parameters.skipToken, + Parameters.skipToken1, ], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], diff --git a/sdk/network/arm-network/src/operations/verifierWorkspaces.ts b/sdk/network/arm-network/src/operations/verifierWorkspaces.ts new file mode 100644 index 000000000000..c78d054818fc --- /dev/null +++ b/sdk/network/arm-network/src/operations/verifierWorkspaces.ts @@ -0,0 +1,476 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { VerifierWorkspaces } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetworkManagementClient } from "../networkManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + VerifierWorkspace, + VerifierWorkspacesListNextOptionalParams, + VerifierWorkspacesListOptionalParams, + VerifierWorkspacesListResponse, + VerifierWorkspacesGetOptionalParams, + VerifierWorkspacesGetResponse, + VerifierWorkspacesCreateOptionalParams, + VerifierWorkspacesCreateResponse, + VerifierWorkspacesUpdateOptionalParams, + VerifierWorkspacesUpdateResponse, + VerifierWorkspacesDeleteOptionalParams, + VerifierWorkspacesDeleteResponse, + VerifierWorkspacesListNextResponse, +} from "../models"; + +/// +/** Class containing VerifierWorkspaces operations. */ +export class VerifierWorkspacesImpl implements VerifierWorkspaces { + private readonly client: NetworkManagementClient; + + /** + * Initialize a new instance of the class VerifierWorkspaces class. + * @param client Reference to the service client + */ + constructor(client: NetworkManagementClient) { + this.client = client; + } + + /** + * Gets list of Verifier Workspaces. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + networkManagerName: string, + options?: VerifierWorkspacesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + networkManagerName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + networkManagerName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + networkManagerName: string, + options?: VerifierWorkspacesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: VerifierWorkspacesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, networkManagerName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + networkManagerName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + networkManagerName: string, + options?: VerifierWorkspacesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + networkManagerName, + options, + )) { + yield* page; + } + } + + /** + * Gets list of Verifier Workspaces. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + networkManagerName: string, + options?: VerifierWorkspacesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, options }, + listOperationSpec, + ); + } + + /** + * Gets Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, workspaceName, options }, + getOperationSpec, + ); + } + + /** + * Creates Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param body Verifier Workspace object to create/update. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + body: VerifierWorkspace, + options?: VerifierWorkspacesCreateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, workspaceName, body, options }, + createOperationSpec, + ); + } + + /** + * Updates Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, workspaceName, options }, + updateOperationSpec, + ); + } + + /** + * Deletes Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VerifierWorkspacesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkManagerName, workspaceName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + VerifierWorkspacesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Deletes Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkManagerName, + workspaceName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + networkManagerName: string, + nextLink: string, + options?: VerifierWorkspacesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkManagerName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VerifierWorkspaceListResult, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken, + Parameters.skip, + Parameters.top1, + Parameters.sortKey, + Parameters.sortValue, + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VerifierWorkspace, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VerifierWorkspace, + }, + 201: { + bodyMapper: Mappers.VerifierWorkspace, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + requestBody: Parameters.body5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.VerifierWorkspace, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + requestBody: Parameters.body6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.VerifierWorkspacesDeleteHeaders, + }, + 201: { + headersMapper: Mappers.VerifierWorkspacesDeleteHeaders, + }, + 202: { + headersMapper: Mappers.VerifierWorkspacesDeleteHeaders, + }, + 204: { + headersMapper: Mappers.VerifierWorkspacesDeleteHeaders, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.networkManagerName1, + Parameters.workspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VerifierWorkspaceListResult, + }, + default: { + bodyMapper: Mappers.CommonErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.networkManagerName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts b/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts index 45ca7847635c..6b8fc2736597 100644 --- a/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts +++ b/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts @@ -67,6 +67,15 @@ import { VpnPacketCaptureStopParameters, VirtualNetworkGatewaysStopPacketCaptureOptionalParams, VirtualNetworkGatewaysStopPacketCaptureResponse, + VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, + ExpressRouteFailoverStopApiParameters, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse, P2SVpnConnectionRequest, @@ -1748,6 +1757,424 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { return poller.pollUntilDone(); } + /** + * This operation retrieves the details of all the failover tests performed on the gateway for + * different peering locations + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param typeParam The type of failover test + * @param fetchLatest Fetch only the latest tests for each peering location + * @param options The options parameters. + */ + async beginGetFailoverAllTestDetails( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + virtualNetworkGatewayName, + typeParam, + fetchLatest, + options, + }, + spec: getFailoverAllTestDetailsOperationSpec, + }); + const poller = await createHttpPoller< + VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * This operation retrieves the details of all the failover tests performed on the gateway for + * different peering locations + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param typeParam The type of failover test + * @param fetchLatest Fetch only the latest tests for each peering location + * @param options The options parameters. + */ + async beginGetFailoverAllTestDetailsAndWait( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ): Promise { + const poller = await this.beginGetFailoverAllTestDetails( + resourceGroupName, + virtualNetworkGatewayName, + typeParam, + fetchLatest, + options, + ); + return poller.pollUntilDone(); + } + + /** + * This operation retrieves the details of a particular failover test performed on the gateway based on + * the test Guid + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peeringLocation Peering location of the test + * @param failoverTestId The unique Guid value which identifies the test + * @param options The options parameters. + */ + async beginGetFailoverSingleTestDetails( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + failoverTestId, + options, + }, + spec: getFailoverSingleTestDetailsOperationSpec, + }); + const poller = await createHttpPoller< + VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * This operation retrieves the details of a particular failover test performed on the gateway based on + * the test Guid + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peeringLocation Peering location of the test + * @param failoverTestId The unique Guid value which identifies the test + * @param options The options parameters. + */ + async beginGetFailoverSingleTestDetailsAndWait( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ): Promise { + const poller = await this.beginGetFailoverSingleTestDetails( + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + failoverTestId, + options, + ); + return poller.pollUntilDone(); + } + + /** + * This operation starts failover simulation on the gateway for the specified peering location + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peeringLocation Peering location of the test + * @param options The options parameters. + */ + async beginStartExpressRouteSiteFailoverSimulation( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + options, + }, + spec: startExpressRouteSiteFailoverSimulationOperationSpec, + }); + const poller = await createHttpPoller< + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * This operation starts failover simulation on the gateway for the specified peering location + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peeringLocation Peering location of the test + * @param options The options parameters. + */ + async beginStartExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ): Promise { + const poller = await this.beginStartExpressRouteSiteFailoverSimulation( + resourceGroupName, + virtualNetworkGatewayName, + peeringLocation, + options, + ); + return poller.pollUntilDone(); + } + + /** + * This operation stops failover simulation on the gateway for the specified peering location + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param stopParameters Virtual network gateway stop simulation parameters supplied to stop failover + * simulation on gateway. + * @param options The options parameters. + */ + async beginStopExpressRouteSiteFailoverSimulation( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + virtualNetworkGatewayName, + stopParameters, + options, + }, + spec: stopExpressRouteSiteFailoverSimulationOperationSpec, + }); + const poller = await createHttpPoller< + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * This operation stops failover simulation on the gateway for the specified peering location + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param stopParameters Virtual network gateway stop simulation parameters supplied to stop failover + * simulation on gateway. + * @param options The options parameters. + */ + async beginStopExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ): Promise { + const poller = await this.beginStopExpressRouteSiteFailoverSimulation( + resourceGroupName, + virtualNetworkGatewayName, + stopParameters, + options, + ); + return poller.pollUntilDone(); + } + /** * Get VPN client connection health detail per P2S client connection of the virtual network gateway in * the specified resource group. @@ -2521,6 +2948,218 @@ const stopPacketCaptureOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer, }; +const getFailoverAllTestDetailsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverAllTestsDetails", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverTestDetails", + }, + }, + }, + }, + }, + 201: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverTestDetails", + }, + }, + }, + }, + }, + 202: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverTestDetails", + }, + }, + }, + }, + }, + 204: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverTestDetails", + }, + }, + }, + }, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.typeParam, + Parameters.fetchLatest, + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.virtualNetworkGatewayName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getFailoverSingleTestDetailsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverSingleTestDetails", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverSingleTestDetails", + }, + }, + }, + }, + }, + 201: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverSingleTestDetails", + }, + }, + }, + }, + }, + 202: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverSingleTestDetails", + }, + }, + }, + }, + }, + 204: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteFailoverSingleTestDetails", + }, + }, + }, + }, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.peeringLocation, + Parameters.failoverTestId, + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.virtualNetworkGatewayName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const startExpressRouteSiteFailoverSimulationOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startSiteFailoverTest", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { type: { name: "String" } }, + }, + 201: { + bodyMapper: { type: { name: "String" } }, + }, + 202: { + bodyMapper: { type: { name: "String" } }, + }, + 204: { + bodyMapper: { type: { name: "String" } }, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion, Parameters.peeringLocation], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.virtualNetworkGatewayName, + ], + headerParameters: [Parameters.accept], + serializer, + }; +const stopExpressRouteSiteFailoverSimulationOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopSiteFailoverTest", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { type: { name: "String" } }, + }, + 201: { + bodyMapper: { type: { name: "String" } }, + }, + 202: { + bodyMapper: { type: { name: "String" } }, + }, + 204: { + bodyMapper: { type: { name: "String" } }, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.stopParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.virtualNetworkGatewayName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; const getVpnclientConnectionHealthOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth", httpMethod: "POST", diff --git a/sdk/network/arm-network/src/operations/virtualNetworks.ts b/sdk/network/arm-network/src/operations/virtualNetworks.ts index cc4ea450540d..95338b46ea4b 100644 --- a/sdk/network/arm-network/src/operations/virtualNetworks.ts +++ b/sdk/network/arm-network/src/operations/virtualNetworks.ts @@ -966,8 +966,8 @@ const listDdosProtectionStatusOperationSpec: coreClient.OperationSpec = { }, queryParameters: [ Parameters.apiVersion, - Parameters.top1, - Parameters.skipToken1, + Parameters.skipToken, + Parameters.top2, ], urlParameters: [ Parameters.$host, diff --git a/sdk/network/arm-network/src/operationsInterfaces/index.ts b/sdk/network/arm-network/src/operationsInterfaces/index.ts index 7fdbc259397b..e7e7bdb4a70a 100644 --- a/sdk/network/arm-network/src/operationsInterfaces/index.ts +++ b/sdk/network/arm-network/src/operationsInterfaces/index.ts @@ -48,6 +48,8 @@ export * from "./firewallPolicyIdpsSignaturesFilterValues"; export * from "./firewallPolicyDrafts"; export * from "./firewallPolicyDeployments"; export * from "./firewallPolicyRuleCollectionGroupDrafts"; +export * from "./ipamPools"; +export * from "./staticCidrs"; export * from "./ipAllocations"; export * from "./ipGroups"; export * from "./loadBalancers"; @@ -70,6 +72,9 @@ export * from "./managementGroupNetworkManagerConnections"; export * from "./connectivityConfigurations"; export * from "./networkGroups"; export * from "./staticMembers"; +export * from "./networkManagerRoutingConfigurations"; +export * from "./routingRuleCollections"; +export * from "./routingRules"; export * from "./scopeConnections"; export * from "./securityAdminConfigurations"; export * from "./adminRuleCollections"; @@ -77,13 +82,13 @@ export * from "./adminRules"; export * from "./securityUserConfigurations"; export * from "./securityUserRuleCollections"; export * from "./securityUserRules"; -export * from "./networkManagerRoutingConfigurations"; -export * from "./routingRuleCollections"; -export * from "./routingRules"; export * from "./networkProfiles"; export * from "./networkSecurityGroups"; export * from "./securityRules"; export * from "./defaultSecurityRules"; +export * from "./reachabilityAnalysisIntents"; +export * from "./reachabilityAnalysisRuns"; +export * from "./verifierWorkspaces"; export * from "./networkVirtualAppliances"; export * from "./virtualApplianceSites"; export * from "./virtualApplianceSkus"; diff --git a/sdk/network/arm-network/src/operationsInterfaces/ipamPools.ts b/sdk/network/arm-network/src/operationsInterfaces/ipamPools.ts new file mode 100644 index 000000000000..2296d0321f16 --- /dev/null +++ b/sdk/network/arm-network/src/operationsInterfaces/ipamPools.ts @@ -0,0 +1,160 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + IpamPool, + IpamPoolsListOptionalParams, + PoolAssociation, + IpamPoolsListAssociatedResourcesOptionalParams, + IpamPoolsCreateOptionalParams, + IpamPoolsCreateResponse, + IpamPoolsUpdateOptionalParams, + IpamPoolsUpdateResponse, + IpamPoolsGetOptionalParams, + IpamPoolsGetResponse, + IpamPoolsDeleteOptionalParams, + IpamPoolsDeleteResponse, + IpamPoolsGetPoolUsageOptionalParams, + IpamPoolsGetPoolUsageResponse, +} from "../models"; + +/// +/** Interface representing a IpamPools. */ +export interface IpamPools { + /** + * Gets list of Pool resources at Network Manager level. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + networkManagerName: string, + options?: IpamPoolsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * List Associated Resource in the Pool. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + listAssociatedResources( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsListAssociatedResourcesOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Creates/Updates the Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName IP Address Manager Pool resource name. + * @param body Pool resource object to create/update. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + IpamPoolsCreateResponse + > + >; + /** + * Creates/Updates the Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName IP Address Manager Pool resource name. + * @param body Pool resource object to create/update. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + body: IpamPool, + options?: IpamPoolsCreateOptionalParams, + ): Promise; + /** + * Updates the specific Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName IP Address Manager Pool resource name. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsUpdateOptionalParams, + ): Promise; + /** + * Gets the specific Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsGetOptionalParams, + ): Promise; + /** + * Delete the Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + IpamPoolsDeleteResponse + > + >; + /** + * Delete the Pool resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsDeleteOptionalParams, + ): Promise; + /** + * Get the Pool Usage. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + getPoolUsage( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: IpamPoolsGetPoolUsageOptionalParams, + ): Promise; +} diff --git a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerLoadBalancingRules.ts b/sdk/network/arm-network/src/operationsInterfaces/loadBalancerLoadBalancingRules.ts index 921e808c466d..86d13ee7700e 100644 --- a/sdk/network/arm-network/src/operationsInterfaces/loadBalancerLoadBalancingRules.ts +++ b/sdk/network/arm-network/src/operationsInterfaces/loadBalancerLoadBalancingRules.ts @@ -7,11 +7,14 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { LoadBalancingRule, LoadBalancerLoadBalancingRulesListOptionalParams, LoadBalancerLoadBalancingRulesGetOptionalParams, LoadBalancerLoadBalancingRulesGetResponse, + LoadBalancerLoadBalancingRulesHealthOptionalParams, + LoadBalancerLoadBalancingRulesHealthResponse, } from "../models"; /// @@ -41,4 +44,35 @@ export interface LoadBalancerLoadBalancingRules { loadBalancingRuleName: string, options?: LoadBalancerLoadBalancingRulesGetOptionalParams, ): Promise; + /** + * Get health details of a load balancing rule. + * @param groupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param loadBalancingRuleName The name of the load balancing rule. + * @param options The options parameters. + */ + beginHealth( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LoadBalancerLoadBalancingRulesHealthResponse + > + >; + /** + * Get health details of a load balancing rule. + * @param groupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param loadBalancingRuleName The name of the load balancing rule. + * @param options The options parameters. + */ + beginHealthAndWait( + groupName: string, + loadBalancerName: string, + loadBalancingRuleName: string, + options?: LoadBalancerLoadBalancingRulesHealthOptionalParams, + ): Promise; } diff --git a/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisIntents.ts b/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisIntents.ts new file mode 100644 index 000000000000..f1a5f9ea378f --- /dev/null +++ b/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisIntents.ts @@ -0,0 +1,83 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ReachabilityAnalysisIntent, + ReachabilityAnalysisIntentsListOptionalParams, + ReachabilityAnalysisIntentsGetOptionalParams, + ReachabilityAnalysisIntentsGetResponse, + ReachabilityAnalysisIntentsCreateOptionalParams, + ReachabilityAnalysisIntentsCreateResponse, + ReachabilityAnalysisIntentsDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a ReachabilityAnalysisIntents. */ +export interface ReachabilityAnalysisIntents { + /** + * Gets list of Reachability Analysis Intents . + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisIntentsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get the Reachability Analysis Intent. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options?: ReachabilityAnalysisIntentsGetOptionalParams, + ): Promise; + /** + * Creates Reachability Analysis Intent. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. + * @param body Reachability Analysis Intent object to create/update. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + body: ReachabilityAnalysisIntent, + options?: ReachabilityAnalysisIntentsCreateOptionalParams, + ): Promise; + /** + * Deletes Reachability Analysis Intent. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisIntentName Reachability Analysis Intent name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisIntentName: string, + options?: ReachabilityAnalysisIntentsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisRuns.ts b/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisRuns.ts new file mode 100644 index 000000000000..47d64b033517 --- /dev/null +++ b/sdk/network/arm-network/src/operationsInterfaces/reachabilityAnalysisRuns.ts @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ReachabilityAnalysisRun, + ReachabilityAnalysisRunsListOptionalParams, + ReachabilityAnalysisRunsGetOptionalParams, + ReachabilityAnalysisRunsGetResponse, + ReachabilityAnalysisRunsCreateOptionalParams, + ReachabilityAnalysisRunsCreateResponse, + ReachabilityAnalysisRunsDeleteOptionalParams, + ReachabilityAnalysisRunsDeleteResponse, +} from "../models"; + +/// +/** Interface representing a ReachabilityAnalysisRuns. */ +export interface ReachabilityAnalysisRuns { + /** + * Gets list of Reachability Analysis Runs. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: ReachabilityAnalysisRunsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets Reachability Analysis Run. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisRunName Reachability Analysis Run name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsGetOptionalParams, + ): Promise; + /** + * Creates Reachability Analysis Runs. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisRunName Reachability Analysis Run name. + * @param body Analysis Run resource object to create/update. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + body: ReachabilityAnalysisRun, + options?: ReachabilityAnalysisRunsCreateOptionalParams, + ): Promise; + /** + * Deletes Reachability Analysis Run. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisRunName Reachability Analysis Run name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ReachabilityAnalysisRunsDeleteResponse + > + >; + /** + * Deletes Reachability Analysis Run. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param reachabilityAnalysisRunName Reachability Analysis Run name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + reachabilityAnalysisRunName: string, + options?: ReachabilityAnalysisRunsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/network/arm-network/src/operationsInterfaces/staticCidrs.ts b/sdk/network/arm-network/src/operationsInterfaces/staticCidrs.ts new file mode 100644 index 000000000000..c42a96985a42 --- /dev/null +++ b/sdk/network/arm-network/src/operationsInterfaces/staticCidrs.ts @@ -0,0 +1,103 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + StaticCidr, + StaticCidrsListOptionalParams, + StaticCidrsCreateOptionalParams, + StaticCidrsCreateResponse, + StaticCidrsGetOptionalParams, + StaticCidrsGetResponse, + StaticCidrsDeleteOptionalParams, + StaticCidrsDeleteResponse, +} from "../models"; + +/// +/** Interface representing a StaticCidrs. */ +export interface StaticCidrs { + /** + * Gets list of Static CIDR resources at Network Manager level. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + options?: StaticCidrsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Creates/Updates the Static CIDR resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName IP Address Manager Pool resource name. + * @param staticCidrName Static Cidr allocation name. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsCreateOptionalParams, + ): Promise; + /** + * Gets the specific Static CIDR resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param staticCidrName StaticCidr resource name to retrieve. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsGetOptionalParams, + ): Promise; + /** + * Delete the Static CIDR resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param staticCidrName StaticCidr resource name to delete. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + StaticCidrsDeleteResponse + > + >; + /** + * Delete the Static CIDR resource. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param poolName Pool resource name. + * @param staticCidrName StaticCidr resource name to delete. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkManagerName: string, + poolName: string, + staticCidrName: string, + options?: StaticCidrsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/network/arm-network/src/operationsInterfaces/verifierWorkspaces.ts b/sdk/network/arm-network/src/operationsInterfaces/verifierWorkspaces.ts new file mode 100644 index 000000000000..9f7db32554f3 --- /dev/null +++ b/sdk/network/arm-network/src/operationsInterfaces/verifierWorkspaces.ts @@ -0,0 +1,110 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + VerifierWorkspace, + VerifierWorkspacesListOptionalParams, + VerifierWorkspacesGetOptionalParams, + VerifierWorkspacesGetResponse, + VerifierWorkspacesCreateOptionalParams, + VerifierWorkspacesCreateResponse, + VerifierWorkspacesUpdateOptionalParams, + VerifierWorkspacesUpdateResponse, + VerifierWorkspacesDeleteOptionalParams, + VerifierWorkspacesDeleteResponse, +} from "../models"; + +/// +/** Interface representing a VerifierWorkspaces. */ +export interface VerifierWorkspaces { + /** + * Gets list of Verifier Workspaces. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + networkManagerName: string, + options?: VerifierWorkspacesListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesGetOptionalParams, + ): Promise; + /** + * Creates Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param body Verifier Workspace object to create/update. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + body: VerifierWorkspace, + options?: VerifierWorkspacesCreateOptionalParams, + ): Promise; + /** + * Updates Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesUpdateOptionalParams, + ): Promise; + /** + * Deletes Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VerifierWorkspacesDeleteResponse + > + >; + /** + * Deletes Verifier Workspace. + * @param resourceGroupName The name of the resource group. + * @param networkManagerName The name of the network manager. + * @param workspaceName Workspace name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkManagerName: string, + workspaceName: string, + options?: VerifierWorkspacesDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGateways.ts b/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGateways.ts index c1ef73ede27e..1490e162ecc6 100644 --- a/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGateways.ts +++ b/sdk/network/arm-network/src/operationsInterfaces/virtualNetworkGateways.ts @@ -52,6 +52,15 @@ import { VpnPacketCaptureStopParameters, VirtualNetworkGatewaysStopPacketCaptureOptionalParams, VirtualNetworkGatewaysStopPacketCaptureResponse, + VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse, + ExpressRouteFailoverStopApiParameters, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse, VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams, VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse, P2SVpnConnectionRequest, @@ -564,6 +573,144 @@ export interface VirtualNetworkGateways { parameters: VpnPacketCaptureStopParameters, options?: VirtualNetworkGatewaysStopPacketCaptureOptionalParams, ): Promise; + /** + * This operation retrieves the details of all the failover tests performed on the gateway for + * different peering locations + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param typeParam The type of failover test + * @param fetchLatest Fetch only the latest tests for each peering location + * @param options The options parameters. + */ + beginGetFailoverAllTestDetails( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysGetFailoverAllTestDetailsResponse + > + >; + /** + * This operation retrieves the details of all the failover tests performed on the gateway for + * different peering locations + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param typeParam The type of failover test + * @param fetchLatest Fetch only the latest tests for each peering location + * @param options The options parameters. + */ + beginGetFailoverAllTestDetailsAndWait( + resourceGroupName: string, + virtualNetworkGatewayName: string, + typeParam: string, + fetchLatest: boolean, + options?: VirtualNetworkGatewaysGetFailoverAllTestDetailsOptionalParams, + ): Promise; + /** + * This operation retrieves the details of a particular failover test performed on the gateway based on + * the test Guid + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peeringLocation Peering location of the test + * @param failoverTestId The unique Guid value which identifies the test + * @param options The options parameters. + */ + beginGetFailoverSingleTestDetails( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysGetFailoverSingleTestDetailsResponse + > + >; + /** + * This operation retrieves the details of a particular failover test performed on the gateway based on + * the test Guid + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peeringLocation Peering location of the test + * @param failoverTestId The unique Guid value which identifies the test + * @param options The options parameters. + */ + beginGetFailoverSingleTestDetailsAndWait( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + failoverTestId: string, + options?: VirtualNetworkGatewaysGetFailoverSingleTestDetailsOptionalParams, + ): Promise; + /** + * This operation starts failover simulation on the gateway for the specified peering location + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peeringLocation Peering location of the test + * @param options The options parameters. + */ + beginStartExpressRouteSiteFailoverSimulation( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationResponse + > + >; + /** + * This operation starts failover simulation on the gateway for the specified peering location + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peeringLocation Peering location of the test + * @param options The options parameters. + */ + beginStartExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName: string, + virtualNetworkGatewayName: string, + peeringLocation: string, + options?: VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationOptionalParams, + ): Promise; + /** + * This operation stops failover simulation on the gateway for the specified peering location + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param stopParameters Virtual network gateway stop simulation parameters supplied to stop failover + * simulation on gateway. + * @param options The options parameters. + */ + beginStopExpressRouteSiteFailoverSimulation( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationResponse + > + >; + /** + * This operation stops failover simulation on the gateway for the specified peering location + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param stopParameters Virtual network gateway stop simulation parameters supplied to stop failover + * simulation on gateway. + * @param options The options parameters. + */ + beginStopExpressRouteSiteFailoverSimulationAndWait( + resourceGroupName: string, + virtualNetworkGatewayName: string, + stopParameters: ExpressRouteFailoverStopApiParameters, + options?: VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationOptionalParams, + ): Promise; /** * Get VPN client connection health detail per P2S client connection of the virtual network gateway in * the specified resource group. diff --git a/sdk/network/arm-network/tsconfig.json b/sdk/network/arm-network/tsconfig.json index 094dfbf3dbe3..ac42f0d614ed 100644 --- a/sdk/network/arm-network/tsconfig.json +++ b/sdk/network/arm-network/tsconfig.json @@ -23,8 +23,8 @@ } }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", + "src/**/*.ts", + "test/**/*.ts", "samples-dev/**/*.ts" ], "exclude": [ From d330d53ac6ff2752aad77accf478178dfbd25694 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:17:33 +0800 Subject: [PATCH 13/55] [mgmt] datafactory release (#32140) https://github.com/Azure/sdk-release-request/issues/5729 --- common/config/rush/pnpm-lock.yaml | 4 +- sdk/datafactory/arm-datafactory/CHANGELOG.md | 43 +++- sdk/datafactory/arm-datafactory/README.md | 1 - sdk/datafactory/arm-datafactory/_meta.json | 8 +- sdk/datafactory/arm-datafactory/assets.json | 2 +- sdk/datafactory/arm-datafactory/package.json | 52 ++--- .../review/arm-datafactory.api.md | 54 ++++- sdk/datafactory/arm-datafactory/sample.env | 5 +- .../samples/v17/javascript/sample.env | 4 - .../samples/v17/typescript/sample.env | 4 - .../samples/{v17 => v18}/javascript/README.md | 206 ++++++++--------- .../activityRunsQueryByPipelineRunSample.js | 0 .../changeDataCaptureCreateOrUpdateSample.js | 0 .../changeDataCaptureDeleteSample.js | 0 .../javascript/changeDataCaptureGetSample.js | 0 .../changeDataCaptureListByFactorySample.js | 0 .../changeDataCaptureStartSample.js | 0 .../changeDataCaptureStatusSample.js | 0 .../javascript/changeDataCaptureStopSample.js | 0 ...redentialOperationsCreateOrUpdateSample.js | 0 .../credentialOperationsDeleteSample.js | 0 .../credentialOperationsGetSample.js | 0 ...credentialOperationsListByFactorySample.js | 0 .../dataFlowDebugSessionAddDataFlowSample.js | 0 .../dataFlowDebugSessionCreateSample.js | 0 .../dataFlowDebugSessionDeleteSample.js | 0 ...ataFlowDebugSessionExecuteCommandSample.js | 0 ...ataFlowDebugSessionQueryByFactorySample.js | 0 .../dataFlowsCreateOrUpdateSample.js | 0 .../javascript/dataFlowsDeleteSample.js | 0 .../javascript/dataFlowsGetSample.js | 0 .../dataFlowsListByFactorySample.js | 0 .../datasetsCreateOrUpdateSample.js | 0 .../javascript/datasetsDeleteSample.js | 0 .../javascript/datasetsGetSample.js | 0 .../javascript/datasetsListByFactorySample.js | 0 ...reControlGetFeatureValueByFactorySample.js | 0 .../exposureControlGetFeatureValueSample.js | 0 ...ontrolQueryFeatureValuesByFactorySample.js | 0 .../factoriesConfigureFactoryRepoSample.js | 0 .../factoriesCreateOrUpdateSample.js | 0 .../javascript/factoriesDeleteSample.js | 0 .../factoriesGetDataPlaneAccessSample.js | 0 .../factoriesGetGitHubAccessTokenSample.js | 0 .../javascript/factoriesGetSample.js | 0 .../factoriesListByResourceGroupSample.js | 0 .../javascript/factoriesListSample.js | 0 .../javascript/factoriesUpdateSample.js | 0 .../globalParametersCreateOrUpdateSample.js | 0 .../globalParametersDeleteSample.js | 0 .../javascript/globalParametersGetSample.js | 0 .../globalParametersListByFactorySample.js | 0 .../integrationRuntimeNodesDeleteSample.js | 0 ...tegrationRuntimeNodesGetIPAddressSample.js | 0 .../integrationRuntimeNodesGetSample.js | 0 .../integrationRuntimeNodesUpdateSample.js | 0 ...tegrationRuntimeObjectMetadataGetSample.js | 0 ...ationRuntimeObjectMetadataRefreshSample.js | 0 ...mesCreateLinkedIntegrationRuntimeSample.js | 0 ...integrationRuntimesCreateOrUpdateSample.js | 0 .../integrationRuntimesDeleteSample.js | 0 ...egrationRuntimesGetConnectionInfoSample.js | 0 ...egrationRuntimesGetMonitoringDataSample.js | 0 .../integrationRuntimesGetSample.js | 0 .../integrationRuntimesGetStatusSample.js | 0 .../integrationRuntimesListAuthKeysSample.js | 0 .../integrationRuntimesListByFactorySample.js | 0 ...boundNetworkDependenciesEndpointsSample.js | 0 ...egrationRuntimesRegenerateAuthKeySample.js | 0 .../integrationRuntimesRemoveLinksSample.js | 0 .../integrationRuntimesStartSample.js | 0 .../integrationRuntimesStopSample.js | 0 ...ntegrationRuntimesSyncCredentialsSample.js | 0 .../integrationRuntimesUpdateSample.js | 0 .../integrationRuntimesUpgradeSample.js | 0 .../linkedServicesCreateOrUpdateSample.js | 0 .../javascript/linkedServicesDeleteSample.js | 0 .../javascript/linkedServicesGetSample.js | 0 .../linkedServicesListByFactorySample.js | 0 ...gedPrivateEndpointsCreateOrUpdateSample.js | 0 .../managedPrivateEndpointsDeleteSample.js | 0 .../managedPrivateEndpointsGetSample.js | 0 ...agedPrivateEndpointsListByFactorySample.js | 0 ...agedVirtualNetworksCreateOrUpdateSample.js | 0 .../managedVirtualNetworksGetSample.js | 0 ...nagedVirtualNetworksListByFactorySample.js | 0 .../javascript/operationsListSample.js | 0 .../{v17 => v18}/javascript/package.json | 0 .../javascript/pipelineRunsCancelSample.js | 0 .../javascript/pipelineRunsGetSample.js | 0 .../pipelineRunsQueryByFactorySample.js | 0 .../pipelinesCreateOrUpdateSample.js | 0 .../javascript/pipelinesCreateRunSample.js | 0 .../javascript/pipelinesDeleteSample.js | 0 .../javascript/pipelinesGetSample.js | 0 .../pipelinesListByFactorySample.js | 0 ...eEndPointConnectionsListByFactorySample.js | 0 ...eEndpointConnectionCreateOrUpdateSample.js | 0 .../privateEndpointConnectionDeleteSample.js | 0 .../privateEndpointConnectionGetSample.js | 0 .../privateLinkResourcesGetSample.js | 0 .../samples/v18/javascript/sample.env | 1 + .../javascript/triggerRunsCancelSample.js | 0 .../triggerRunsQueryByFactorySample.js | 0 .../javascript/triggerRunsRerunSample.js | 0 .../triggersCreateOrUpdateSample.js | 0 .../javascript/triggersDeleteSample.js | 0 ...riggersGetEventSubscriptionStatusSample.js | 0 .../javascript/triggersGetSample.js | 0 .../javascript/triggersListByFactorySample.js | 0 .../triggersQueryByFactorySample.js | 0 .../javascript/triggersStartSample.js | 0 .../javascript/triggersStopSample.js | 0 .../triggersSubscribeToEventsSample.js | 0 .../triggersUnsubscribeFromEventsSample.js | 0 .../samples/{v17 => v18}/typescript/README.md | 206 ++++++++--------- .../{v17 => v18}/typescript/package.json | 0 .../samples/v18/typescript/sample.env | 1 + .../activityRunsQueryByPipelineRunSample.ts | 0 .../changeDataCaptureCreateOrUpdateSample.ts | 0 .../src/changeDataCaptureDeleteSample.ts | 0 .../src/changeDataCaptureGetSample.ts | 0 .../changeDataCaptureListByFactorySample.ts | 0 .../src/changeDataCaptureStartSample.ts | 0 .../src/changeDataCaptureStatusSample.ts | 0 .../src/changeDataCaptureStopSample.ts | 0 ...redentialOperationsCreateOrUpdateSample.ts | 0 .../src/credentialOperationsDeleteSample.ts | 0 .../src/credentialOperationsGetSample.ts | 0 ...credentialOperationsListByFactorySample.ts | 0 .../dataFlowDebugSessionAddDataFlowSample.ts | 0 .../src/dataFlowDebugSessionCreateSample.ts | 0 .../src/dataFlowDebugSessionDeleteSample.ts | 0 ...ataFlowDebugSessionExecuteCommandSample.ts | 0 ...ataFlowDebugSessionQueryByFactorySample.ts | 0 .../src/dataFlowsCreateOrUpdateSample.ts | 0 .../typescript/src/dataFlowsDeleteSample.ts | 0 .../typescript/src/dataFlowsGetSample.ts | 0 .../src/dataFlowsListByFactorySample.ts | 0 .../src/datasetsCreateOrUpdateSample.ts | 0 .../typescript/src/datasetsDeleteSample.ts | 0 .../typescript/src/datasetsGetSample.ts | 0 .../src/datasetsListByFactorySample.ts | 0 ...reControlGetFeatureValueByFactorySample.ts | 0 .../exposureControlGetFeatureValueSample.ts | 0 ...ontrolQueryFeatureValuesByFactorySample.ts | 0 .../factoriesConfigureFactoryRepoSample.ts | 0 .../src/factoriesCreateOrUpdateSample.ts | 0 .../typescript/src/factoriesDeleteSample.ts | 0 .../src/factoriesGetDataPlaneAccessSample.ts | 0 .../factoriesGetGitHubAccessTokenSample.ts | 0 .../typescript/src/factoriesGetSample.ts | 0 .../src/factoriesListByResourceGroupSample.ts | 0 .../typescript/src/factoriesListSample.ts | 0 .../typescript/src/factoriesUpdateSample.ts | 0 .../globalParametersCreateOrUpdateSample.ts | 0 .../src/globalParametersDeleteSample.ts | 0 .../src/globalParametersGetSample.ts | 0 .../globalParametersListByFactorySample.ts | 0 .../integrationRuntimeNodesDeleteSample.ts | 0 ...tegrationRuntimeNodesGetIPAddressSample.ts | 0 .../src/integrationRuntimeNodesGetSample.ts | 0 .../integrationRuntimeNodesUpdateSample.ts | 0 ...tegrationRuntimeObjectMetadataGetSample.ts | 0 ...ationRuntimeObjectMetadataRefreshSample.ts | 0 ...mesCreateLinkedIntegrationRuntimeSample.ts | 0 ...integrationRuntimesCreateOrUpdateSample.ts | 0 .../src/integrationRuntimesDeleteSample.ts | 0 ...egrationRuntimesGetConnectionInfoSample.ts | 0 ...egrationRuntimesGetMonitoringDataSample.ts | 0 .../src/integrationRuntimesGetSample.ts | 0 .../src/integrationRuntimesGetStatusSample.ts | 0 .../integrationRuntimesListAuthKeysSample.ts | 0 .../integrationRuntimesListByFactorySample.ts | 0 ...boundNetworkDependenciesEndpointsSample.ts | 0 ...egrationRuntimesRegenerateAuthKeySample.ts | 0 .../integrationRuntimesRemoveLinksSample.ts | 0 .../src/integrationRuntimesStartSample.ts | 0 .../src/integrationRuntimesStopSample.ts | 0 ...ntegrationRuntimesSyncCredentialsSample.ts | 0 .../src/integrationRuntimesUpdateSample.ts | 0 .../src/integrationRuntimesUpgradeSample.ts | 0 .../src/linkedServicesCreateOrUpdateSample.ts | 0 .../src/linkedServicesDeleteSample.ts | 0 .../typescript/src/linkedServicesGetSample.ts | 0 .../src/linkedServicesListByFactorySample.ts | 0 ...gedPrivateEndpointsCreateOrUpdateSample.ts | 0 .../managedPrivateEndpointsDeleteSample.ts | 0 .../src/managedPrivateEndpointsGetSample.ts | 0 ...agedPrivateEndpointsListByFactorySample.ts | 0 ...agedVirtualNetworksCreateOrUpdateSample.ts | 0 .../src/managedVirtualNetworksGetSample.ts | 0 ...nagedVirtualNetworksListByFactorySample.ts | 0 .../typescript/src/operationsListSample.ts | 0 .../src/pipelineRunsCancelSample.ts | 0 .../typescript/src/pipelineRunsGetSample.ts | 0 .../src/pipelineRunsQueryByFactorySample.ts | 0 .../src/pipelinesCreateOrUpdateSample.ts | 0 .../src/pipelinesCreateRunSample.ts | 0 .../typescript/src/pipelinesDeleteSample.ts | 0 .../typescript/src/pipelinesGetSample.ts | 0 .../src/pipelinesListByFactorySample.ts | 0 ...eEndPointConnectionsListByFactorySample.ts | 0 ...eEndpointConnectionCreateOrUpdateSample.ts | 0 .../privateEndpointConnectionDeleteSample.ts | 0 .../src/privateEndpointConnectionGetSample.ts | 0 .../src/privateLinkResourcesGetSample.ts | 0 .../typescript/src/triggerRunsCancelSample.ts | 0 .../src/triggerRunsQueryByFactorySample.ts | 0 .../typescript/src/triggerRunsRerunSample.ts | 0 .../src/triggersCreateOrUpdateSample.ts | 0 .../typescript/src/triggersDeleteSample.ts | 0 ...riggersGetEventSubscriptionStatusSample.ts | 0 .../typescript/src/triggersGetSample.ts | 0 .../src/triggersListByFactorySample.ts | 0 .../src/triggersQueryByFactorySample.ts | 0 .../typescript/src/triggersStartSample.ts | 0 .../typescript/src/triggersStopSample.ts | 0 .../src/triggersSubscribeToEventsSample.ts | 0 .../triggersUnsubscribeFromEventsSample.ts | 0 .../{v17 => v18}/typescript/tsconfig.json | 0 .../src/dataFactoryManagementClient.ts | 2 +- .../arm-datafactory/src/models/index.ts | 84 ++++++- .../arm-datafactory/src/models/mappers.ts | 211 ++++++++++++++++++ sdk/datafactory/arm-datafactory/tsconfig.json | 4 +- 225 files changed, 621 insertions(+), 271 deletions(-) delete mode 100644 sdk/datafactory/arm-datafactory/samples/v17/javascript/sample.env delete mode 100644 sdk/datafactory/arm-datafactory/samples/v17/typescript/sample.env rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/README.md (92%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/activityRunsQueryByPipelineRunSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/changeDataCaptureCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/changeDataCaptureDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/changeDataCaptureGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/changeDataCaptureListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/changeDataCaptureStartSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/changeDataCaptureStatusSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/changeDataCaptureStopSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/credentialOperationsCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/credentialOperationsDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/credentialOperationsGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/credentialOperationsListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/dataFlowDebugSessionAddDataFlowSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/dataFlowDebugSessionCreateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/dataFlowDebugSessionDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/dataFlowDebugSessionExecuteCommandSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/dataFlowDebugSessionQueryByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/dataFlowsCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/dataFlowsDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/dataFlowsGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/dataFlowsListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/datasetsCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/datasetsDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/datasetsGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/datasetsListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/exposureControlGetFeatureValueByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/exposureControlGetFeatureValueSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/exposureControlQueryFeatureValuesByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/factoriesConfigureFactoryRepoSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/factoriesCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/factoriesDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/factoriesGetDataPlaneAccessSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/factoriesGetGitHubAccessTokenSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/factoriesGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/factoriesListByResourceGroupSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/factoriesListSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/factoriesUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/globalParametersCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/globalParametersDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/globalParametersGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/globalParametersListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimeNodesDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimeNodesGetIPAddressSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimeNodesGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimeNodesUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimeObjectMetadataGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimeObjectMetadataRefreshSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesCreateLinkedIntegrationRuntimeSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesGetConnectionInfoSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesGetMonitoringDataSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesGetStatusSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesListAuthKeysSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesListOutboundNetworkDependenciesEndpointsSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesRegenerateAuthKeySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesRemoveLinksSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesStartSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesStopSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesSyncCredentialsSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/integrationRuntimesUpgradeSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/linkedServicesCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/linkedServicesDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/linkedServicesGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/linkedServicesListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/managedPrivateEndpointsCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/managedPrivateEndpointsDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/managedPrivateEndpointsGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/managedPrivateEndpointsListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/managedVirtualNetworksCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/managedVirtualNetworksGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/managedVirtualNetworksListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/operationsListSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/package.json (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/pipelineRunsCancelSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/pipelineRunsGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/pipelineRunsQueryByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/pipelinesCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/pipelinesCreateRunSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/pipelinesDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/pipelinesGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/pipelinesListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/privateEndPointConnectionsListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/privateEndpointConnectionCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/privateEndpointConnectionDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/privateEndpointConnectionGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/privateLinkResourcesGetSample.js (100%) create mode 100644 sdk/datafactory/arm-datafactory/samples/v18/javascript/sample.env rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggerRunsCancelSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggerRunsQueryByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggerRunsRerunSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersCreateOrUpdateSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersDeleteSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersGetEventSubscriptionStatusSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersGetSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersListByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersQueryByFactorySample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersStartSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersStopSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersSubscribeToEventsSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/javascript/triggersUnsubscribeFromEventsSample.js (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/README.md (92%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/package.json (100%) create mode 100644 sdk/datafactory/arm-datafactory/samples/v18/typescript/sample.env rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/activityRunsQueryByPipelineRunSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/changeDataCaptureCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/changeDataCaptureDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/changeDataCaptureGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/changeDataCaptureListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/changeDataCaptureStartSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/changeDataCaptureStatusSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/changeDataCaptureStopSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/credentialOperationsCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/credentialOperationsDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/credentialOperationsGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/credentialOperationsListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/dataFlowDebugSessionAddDataFlowSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/dataFlowDebugSessionCreateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/dataFlowDebugSessionDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/dataFlowDebugSessionExecuteCommandSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/dataFlowDebugSessionQueryByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/dataFlowsCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/dataFlowsDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/dataFlowsGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/dataFlowsListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/datasetsCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/datasetsDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/datasetsGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/datasetsListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/exposureControlGetFeatureValueByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/exposureControlGetFeatureValueSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/exposureControlQueryFeatureValuesByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/factoriesConfigureFactoryRepoSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/factoriesCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/factoriesDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/factoriesGetDataPlaneAccessSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/factoriesGetGitHubAccessTokenSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/factoriesGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/factoriesListByResourceGroupSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/factoriesListSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/factoriesUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/globalParametersCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/globalParametersDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/globalParametersGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/globalParametersListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimeNodesDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimeNodesGetIPAddressSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimeNodesGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimeNodesUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimeObjectMetadataGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimeObjectMetadataRefreshSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesCreateLinkedIntegrationRuntimeSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesGetConnectionInfoSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesGetMonitoringDataSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesGetStatusSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesListAuthKeysSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesListOutboundNetworkDependenciesEndpointsSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesRegenerateAuthKeySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesRemoveLinksSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesStartSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesStopSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesSyncCredentialsSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/integrationRuntimesUpgradeSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/linkedServicesCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/linkedServicesDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/linkedServicesGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/linkedServicesListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/managedPrivateEndpointsCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/managedPrivateEndpointsDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/managedPrivateEndpointsGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/managedPrivateEndpointsListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/managedVirtualNetworksCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/managedVirtualNetworksGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/managedVirtualNetworksListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/operationsListSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/pipelineRunsCancelSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/pipelineRunsGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/pipelineRunsQueryByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/pipelinesCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/pipelinesCreateRunSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/pipelinesDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/pipelinesGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/pipelinesListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/privateEndPointConnectionsListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/privateEndpointConnectionDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/privateEndpointConnectionGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/privateLinkResourcesGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggerRunsCancelSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggerRunsQueryByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggerRunsRerunSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersCreateOrUpdateSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersDeleteSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersGetEventSubscriptionStatusSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersGetSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersListByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersQueryByFactorySample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersStartSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersStopSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersSubscribeToEventsSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/src/triggersUnsubscribeFromEventsSample.ts (100%) rename sdk/datafactory/arm-datafactory/samples/{v17 => v18}/typescript/tsconfig.json (100%) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index cf5003bea31a..ecf93cf22094 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2780,7 +2780,7 @@ packages: version: 0.0.0 '@rush-temp/arm-datafactory@file:projects/arm-datafactory.tgz': - resolution: {integrity: sha512-gGZGKv/2W3PKagNsG+DGP99wkQXtdBiEfl8mc/RJcG349cUedSrZWd/q8hfxh00N6ViqVgcl9AjsameGKkBeMA==, tarball: file:projects/arm-datafactory.tgz} + resolution: {integrity: sha512-ih/+XoljaydHhxKI2AWkLQlx6fN9bknlzn3OLNppMosFZmH0g20fvzN7uUhbo8jIEHe7HTyfu6NSX+eg7OmeTQ==, tarball: file:projects/arm-datafactory.tgz} version: 0.0.0 '@rush-temp/arm-datalake-analytics@file:projects/arm-datalake-analytics.tgz': @@ -11735,7 +11735,7 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 + mocha: 10.8.2 ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 diff --git a/sdk/datafactory/arm-datafactory/CHANGELOG.md b/sdk/datafactory/arm-datafactory/CHANGELOG.md index db61840b8d7d..d29e4c31cf28 100644 --- a/sdk/datafactory/arm-datafactory/CHANGELOG.md +++ b/sdk/datafactory/arm-datafactory/CHANGELOG.md @@ -1,15 +1,44 @@ # Release History - -## 17.0.1 (Unreleased) - + +## 18.0.0 (2024-12-10) + ### Features Added -### Breaking Changes - -### Bugs Fixed + - Added Interface IcebergDataset + - Added Interface IcebergSink + - Added Interface IcebergWriteSettings + - Interface AzurePostgreSqlLinkedService has a new optional parameter commandTimeout + - Interface AzurePostgreSqlLinkedService has a new optional parameter database + - Interface AzurePostgreSqlLinkedService has a new optional parameter encoding + - Interface AzurePostgreSqlLinkedService has a new optional parameter port + - Interface AzurePostgreSqlLinkedService has a new optional parameter readBufferSize + - Interface AzurePostgreSqlLinkedService has a new optional parameter server + - Interface AzurePostgreSqlLinkedService has a new optional parameter sslMode + - Interface AzurePostgreSqlLinkedService has a new optional parameter timeout + - Interface AzurePostgreSqlLinkedService has a new optional parameter timezone + - Interface AzurePostgreSqlLinkedService has a new optional parameter trustServerCertificate + - Interface AzurePostgreSqlLinkedService has a new optional parameter username + - Interface MariaDBLinkedService has a new optional parameter sslMode + - Interface MariaDBLinkedService has a new optional parameter useSystemTrustStore + - Interface MySqlLinkedService has a new optional parameter allowZeroDateTime + - Interface MySqlLinkedService has a new optional parameter connectionTimeout + - Interface MySqlLinkedService has a new optional parameter convertZeroDateTime + - Interface MySqlLinkedService has a new optional parameter guidFormat + - Interface MySqlLinkedService has a new optional parameter sslCert + - Interface MySqlLinkedService has a new optional parameter sslKey + - Interface MySqlLinkedService has a new optional parameter treatTinyAsBoolean + - Interface SalesforceV2Source has a new optional parameter pageSize + - Interface ServiceNowV2Source has a new optional parameter pageSize + - Interface SnowflakeV2LinkedService has a new optional parameter host + - Type of parameter type of interface CopySink has a new parameter "IcebergSink" + - Type of parameter type of interface Dataset has a new parameter "IcebergSink" + - Type of parameter type of interface FormatWriteSettings has a new parameter "IcebergWriteSettings" -### Other Changes +### Breaking Changes + - Interface PostgreSqlV2LinkedService has a new required parameter authenticationType + + ## 17.0.0 (2024-08-27) ### Features Added diff --git a/sdk/datafactory/arm-datafactory/README.md b/sdk/datafactory/arm-datafactory/README.md index 39c3da390b59..1e2b46e87c0d 100644 --- a/sdk/datafactory/arm-datafactory/README.md +++ b/sdk/datafactory/arm-datafactory/README.md @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure DataFactoryManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/datafactory/arm-datafactory/_meta.json b/sdk/datafactory/arm-datafactory/_meta.json index 5426f9b806c7..232a93b75b70 100644 --- a/sdk/datafactory/arm-datafactory/_meta.json +++ b/sdk/datafactory/arm-datafactory/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d85634405ec3b905f1b0bfc350e47cb704aedb61", + "commit": "552b4dd311f90f4a7b2f7adf45461d7a8774a1cc", "readme": "specification/datafactory/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datafactory\\resource-manager\\readme.md --use=@autorest/typescript@6.0.24 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datafactory\\resource-manager\\readme.md --use=@autorest/typescript@6.0.29 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.11", - "use": "@autorest/typescript@6.0.24" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@6.0.29" } \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/assets.json b/sdk/datafactory/arm-datafactory/assets.json index 17c25aaea148..3daa9cbba396 100644 --- a/sdk/datafactory/arm-datafactory/assets.json +++ b/sdk/datafactory/arm-datafactory/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/datafactory/arm-datafactory", - "Tag": "js/datafactory/arm-datafactory_e2081dc761" + "Tag": "js/datafactory/arm-datafactory_47440efb80" } diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index 6d2cc6027789..04892ffb6ec2 100644 --- a/sdk/datafactory/arm-datafactory/package.json +++ b/sdk/datafactory/arm-datafactory/package.json @@ -3,16 +3,16 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataFactoryManagementClient.", - "version": "17.0.1", + "version": "18.0.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -28,19 +28,19 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-datafactory.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.1.0", - "@azure-tools/test-recorder": "^3.0.0", + "typescript": "~5.7.2", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", - "@types/chai": "^4.2.8", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.7.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -68,28 +68,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, diff --git a/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md b/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md index ecb5f88e3a27..d244c8303974 100644 --- a/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md +++ b/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md @@ -933,10 +933,21 @@ export interface AzureMySqlTableDataset extends Dataset { // @public export interface AzurePostgreSqlLinkedService extends LinkedService { + commandTimeout?: any; connectionString?: any; + database?: any; + encoding?: any; encryptedCredential?: string; password?: AzureKeyVaultSecretReference; + port?: any; + readBufferSize?: any; + server?: any; + sslMode?: any; + timeout?: any; + timezone?: any; + trustServerCertificate?: any; type: "AzurePostgreSql"; + username?: any; } // @public @@ -1648,13 +1659,13 @@ export interface CopySink { maxConcurrentConnections?: any; sinkRetryCount?: any; sinkRetryWait?: any; - type: "DelimitedTextSink" | "JsonSink" | "OrcSink" | "RestSink" | "AzurePostgreSqlSink" | "AzureMySqlSink" | "AzureDatabricksDeltaLakeSink" | "WarehouseSink" | "SapCloudForCustomerSink" | "AzureQueueSink" | "AzureTableSink" | "AvroSink" | "ParquetSink" | "BinarySink" | "BlobSink" | "FileSystemSink" | "DocumentDbCollectionSink" | "CosmosDbSqlApiSink" | "SqlSink" | "SqlServerSink" | "AzureSqlSink" | "SqlMISink" | "SqlDWSink" | "SnowflakeSink" | "SnowflakeV2Sink" | "OracleSink" | "AzureDataLakeStoreSink" | "AzureBlobFSSink" | "AzureSearchIndexSink" | "OdbcSink" | "InformixSink" | "MicrosoftAccessSink" | "DynamicsSink" | "DynamicsCrmSink" | "CommonDataServiceForAppsSink" | "AzureDataExplorerSink" | "SalesforceSink" | "SalesforceServiceCloudSink" | "MongoDbAtlasSink" | "MongoDbV2Sink" | "CosmosDbMongoDbApiSink" | "LakeHouseTableSink" | "SalesforceV2Sink" | "SalesforceServiceCloudV2Sink"; + type: "DelimitedTextSink" | "JsonSink" | "OrcSink" | "RestSink" | "AzurePostgreSqlSink" | "AzureMySqlSink" | "AzureDatabricksDeltaLakeSink" | "WarehouseSink" | "SapCloudForCustomerSink" | "AzureQueueSink" | "AzureTableSink" | "AvroSink" | "ParquetSink" | "BinarySink" | "IcebergSink" | "BlobSink" | "FileSystemSink" | "DocumentDbCollectionSink" | "CosmosDbSqlApiSink" | "SqlSink" | "SqlServerSink" | "AzureSqlSink" | "SqlMISink" | "SqlDWSink" | "SnowflakeSink" | "SnowflakeV2Sink" | "OracleSink" | "AzureDataLakeStoreSink" | "AzureBlobFSSink" | "AzureSearchIndexSink" | "OdbcSink" | "InformixSink" | "MicrosoftAccessSink" | "DynamicsSink" | "DynamicsCrmSink" | "CommonDataServiceForAppsSink" | "AzureDataExplorerSink" | "SalesforceSink" | "SalesforceServiceCloudSink" | "MongoDbAtlasSink" | "MongoDbV2Sink" | "CosmosDbMongoDbApiSink" | "LakeHouseTableSink" | "SalesforceV2Sink" | "SalesforceServiceCloudV2Sink"; writeBatchSize?: any; writeBatchTimeout?: any; } // @public (undocumented) -export type CopySinkUnion = CopySink | DelimitedTextSink | JsonSink | OrcSink | RestSink | AzurePostgreSqlSink | AzureMySqlSink | AzureDatabricksDeltaLakeSink | WarehouseSink | SapCloudForCustomerSink | AzureQueueSink | AzureTableSink | AvroSink | ParquetSink | BinarySink | BlobSink | FileSystemSink | DocumentDbCollectionSink | CosmosDbSqlApiSink | SqlSink | SqlServerSink | AzureSqlSink | SqlMISink | SqlDWSink | SnowflakeSink | SnowflakeV2Sink | OracleSink | AzureDataLakeStoreSink | AzureBlobFSSink | AzureSearchIndexSink | OdbcSink | InformixSink | MicrosoftAccessSink | DynamicsSink | DynamicsCrmSink | CommonDataServiceForAppsSink | AzureDataExplorerSink | SalesforceSink | SalesforceServiceCloudSink | MongoDbAtlasSink | MongoDbV2Sink | CosmosDbMongoDbApiSink | LakeHouseTableSink | SalesforceV2Sink | SalesforceServiceCloudV2Sink; +export type CopySinkUnion = CopySink | DelimitedTextSink | JsonSink | OrcSink | RestSink | AzurePostgreSqlSink | AzureMySqlSink | AzureDatabricksDeltaLakeSink | WarehouseSink | SapCloudForCustomerSink | AzureQueueSink | AzureTableSink | AvroSink | ParquetSink | BinarySink | IcebergSink | BlobSink | FileSystemSink | DocumentDbCollectionSink | CosmosDbSqlApiSink | SqlSink | SqlServerSink | AzureSqlSink | SqlMISink | SqlDWSink | SnowflakeSink | SnowflakeV2Sink | OracleSink | AzureDataLakeStoreSink | AzureBlobFSSink | AzureSearchIndexSink | OdbcSink | InformixSink | MicrosoftAccessSink | DynamicsSink | DynamicsCrmSink | CommonDataServiceForAppsSink | AzureDataExplorerSink | SalesforceSink | SalesforceServiceCloudSink | MongoDbAtlasSink | MongoDbV2Sink | CosmosDbMongoDbApiSink | LakeHouseTableSink | SalesforceV2Sink | SalesforceServiceCloudV2Sink; // @public export interface CopySource { @@ -2290,7 +2301,7 @@ export interface Dataset { }; schema?: any; structure?: any; - type: "AmazonS3Object" | "Avro" | "Excel" | "Parquet" | "DelimitedText" | "Json" | "Xml" | "Orc" | "Binary" | "AzureBlob" | "AzureTable" | "AzureSqlTable" | "AzureSqlMITable" | "AzureSqlDWTable" | "CassandraTable" | "CustomDataset" | "CosmosDbSqlApiCollection" | "DocumentDbCollection" | "DynamicsEntity" | "DynamicsCrmEntity" | "CommonDataServiceForAppsEntity" | "AzureDataLakeStoreFile" | "AzureBlobFSFile" | "Office365Table" | "FileShare" | "MongoDbCollection" | "MongoDbAtlasCollection" | "MongoDbV2Collection" | "CosmosDbMongoDbApiCollection" | "ODataResource" | "OracleTable" | "AmazonRdsForOracleTable" | "TeradataTable" | "AzureMySqlTable" | "AmazonRedshiftTable" | "Db2Table" | "RelationalTable" | "InformixTable" | "OdbcTable" | "MySqlTable" | "PostgreSqlTable" | "PostgreSqlV2Table" | "MicrosoftAccessTable" | "SalesforceObject" | "SalesforceServiceCloudObject" | "SybaseTable" | "SapBwCube" | "SapCloudForCustomerResource" | "SapEccResource" | "SapHanaTable" | "SapOpenHubTable" | "SqlServerTable" | "AmazonRdsForSqlServerTable" | "RestResource" | "SapTableResource" | "SapOdpResource" | "WebTable" | "AzureSearchIndex" | "HttpFile" | "AmazonMWSObject" | "AzurePostgreSqlTable" | "ConcurObject" | "CouchbaseTable" | "DrillTable" | "EloquaObject" | "GoogleBigQueryObject" | "GoogleBigQueryV2Object" | "GreenplumTable" | "HBaseObject" | "HiveObject" | "HubspotObject" | "ImpalaObject" | "JiraObject" | "MagentoObject" | "MariaDBTable" | "AzureMariaDBTable" | "MarketoObject" | "PaypalObject" | "PhoenixObject" | "PrestoObject" | "QuickBooksObject" | "ServiceNowObject" | "ShopifyObject" | "SparkObject" | "SquareObject" | "XeroObject" | "ZohoObject" | "NetezzaTable" | "VerticaTable" | "SalesforceMarketingCloudObject" | "ResponsysObject" | "DynamicsAXResource" | "OracleServiceCloudObject" | "AzureDataExplorerTable" | "GoogleAdWordsObject" | "SnowflakeTable" | "SnowflakeV2Table" | "SharePointOnlineListResource" | "AzureDatabricksDeltaLakeDataset" | "LakeHouseTable" | "SalesforceV2Object" | "SalesforceServiceCloudV2Object" | "WarehouseTable" | "ServiceNowV2Object"; + type: "AmazonS3Object" | "Avro" | "Excel" | "Parquet" | "DelimitedText" | "Json" | "Xml" | "Orc" | "Binary" | "Iceberg" | "AzureBlob" | "AzureTable" | "AzureSqlTable" | "AzureSqlMITable" | "AzureSqlDWTable" | "CassandraTable" | "CustomDataset" | "CosmosDbSqlApiCollection" | "DocumentDbCollection" | "DynamicsEntity" | "DynamicsCrmEntity" | "CommonDataServiceForAppsEntity" | "AzureDataLakeStoreFile" | "AzureBlobFSFile" | "Office365Table" | "FileShare" | "MongoDbCollection" | "MongoDbAtlasCollection" | "MongoDbV2Collection" | "CosmosDbMongoDbApiCollection" | "ODataResource" | "OracleTable" | "AmazonRdsForOracleTable" | "TeradataTable" | "AzureMySqlTable" | "AmazonRedshiftTable" | "Db2Table" | "RelationalTable" | "InformixTable" | "OdbcTable" | "MySqlTable" | "PostgreSqlTable" | "PostgreSqlV2Table" | "MicrosoftAccessTable" | "SalesforceObject" | "SalesforceServiceCloudObject" | "SybaseTable" | "SapBwCube" | "SapCloudForCustomerResource" | "SapEccResource" | "SapHanaTable" | "SapOpenHubTable" | "SqlServerTable" | "AmazonRdsForSqlServerTable" | "RestResource" | "SapTableResource" | "SapOdpResource" | "WebTable" | "AzureSearchIndex" | "HttpFile" | "AmazonMWSObject" | "AzurePostgreSqlTable" | "ConcurObject" | "CouchbaseTable" | "DrillTable" | "EloquaObject" | "GoogleBigQueryObject" | "GoogleBigQueryV2Object" | "GreenplumTable" | "HBaseObject" | "HiveObject" | "HubspotObject" | "ImpalaObject" | "JiraObject" | "MagentoObject" | "MariaDBTable" | "AzureMariaDBTable" | "MarketoObject" | "PaypalObject" | "PhoenixObject" | "PrestoObject" | "QuickBooksObject" | "ServiceNowObject" | "ShopifyObject" | "SparkObject" | "SquareObject" | "XeroObject" | "ZohoObject" | "NetezzaTable" | "VerticaTable" | "SalesforceMarketingCloudObject" | "ResponsysObject" | "DynamicsAXResource" | "OracleServiceCloudObject" | "AzureDataExplorerTable" | "GoogleAdWordsObject" | "SnowflakeTable" | "SnowflakeV2Table" | "SharePointOnlineListResource" | "AzureDatabricksDeltaLakeDataset" | "LakeHouseTable" | "SalesforceV2Object" | "SalesforceServiceCloudV2Object" | "WarehouseTable" | "ServiceNowV2Object"; } // @public @@ -2411,7 +2422,7 @@ export interface DatasetStorageFormat { export type DatasetStorageFormatUnion = DatasetStorageFormat | TextFormat | JsonFormat | AvroFormat | OrcFormat | ParquetFormat; // @public (undocumented) -export type DatasetUnion = Dataset | AmazonS3Dataset | AvroDataset | ExcelDataset | ParquetDataset | DelimitedTextDataset | JsonDataset | XmlDataset | OrcDataset | BinaryDataset | AzureBlobDataset | AzureTableDataset | AzureSqlTableDataset | AzureSqlMITableDataset | AzureSqlDWTableDataset | CassandraTableDataset | CustomDataset | CosmosDbSqlApiCollectionDataset | DocumentDbCollectionDataset | DynamicsEntityDataset | DynamicsCrmEntityDataset | CommonDataServiceForAppsEntityDataset | AzureDataLakeStoreDataset | AzureBlobFSDataset | Office365Dataset | FileShareDataset | MongoDbCollectionDataset | MongoDbAtlasCollectionDataset | MongoDbV2CollectionDataset | CosmosDbMongoDbApiCollectionDataset | ODataResourceDataset | OracleTableDataset | AmazonRdsForOracleTableDataset | TeradataTableDataset | AzureMySqlTableDataset | AmazonRedshiftTableDataset | Db2TableDataset | RelationalTableDataset | InformixTableDataset | OdbcTableDataset | MySqlTableDataset | PostgreSqlTableDataset | PostgreSqlV2TableDataset | MicrosoftAccessTableDataset | SalesforceObjectDataset | SalesforceServiceCloudObjectDataset | SybaseTableDataset | SapBwCubeDataset | SapCloudForCustomerResourceDataset | SapEccResourceDataset | SapHanaTableDataset | SapOpenHubTableDataset | SqlServerTableDataset | AmazonRdsForSqlServerTableDataset | RestResourceDataset | SapTableResourceDataset | SapOdpResourceDataset | WebTableDataset | AzureSearchIndexDataset | HttpDataset | AmazonMWSObjectDataset | AzurePostgreSqlTableDataset | ConcurObjectDataset | CouchbaseTableDataset | DrillTableDataset | EloquaObjectDataset | GoogleBigQueryObjectDataset | GoogleBigQueryV2ObjectDataset | GreenplumTableDataset | HBaseObjectDataset | HiveObjectDataset | HubspotObjectDataset | ImpalaObjectDataset | JiraObjectDataset | MagentoObjectDataset | MariaDBTableDataset | AzureMariaDBTableDataset | MarketoObjectDataset | PaypalObjectDataset | PhoenixObjectDataset | PrestoObjectDataset | QuickBooksObjectDataset | ServiceNowObjectDataset | ShopifyObjectDataset | SparkObjectDataset | SquareObjectDataset | XeroObjectDataset | ZohoObjectDataset | NetezzaTableDataset | VerticaTableDataset | SalesforceMarketingCloudObjectDataset | ResponsysObjectDataset | DynamicsAXResourceDataset | OracleServiceCloudObjectDataset | AzureDataExplorerTableDataset | GoogleAdWordsObjectDataset | SnowflakeDataset | SnowflakeV2Dataset | SharePointOnlineListResourceDataset | AzureDatabricksDeltaLakeDataset | LakeHouseTableDataset | SalesforceV2ObjectDataset | SalesforceServiceCloudV2ObjectDataset | WarehouseTableDataset | ServiceNowV2ObjectDataset; +export type DatasetUnion = Dataset | AmazonS3Dataset | AvroDataset | ExcelDataset | ParquetDataset | DelimitedTextDataset | JsonDataset | XmlDataset | OrcDataset | BinaryDataset | IcebergDataset | AzureBlobDataset | AzureTableDataset | AzureSqlTableDataset | AzureSqlMITableDataset | AzureSqlDWTableDataset | CassandraTableDataset | CustomDataset | CosmosDbSqlApiCollectionDataset | DocumentDbCollectionDataset | DynamicsEntityDataset | DynamicsCrmEntityDataset | CommonDataServiceForAppsEntityDataset | AzureDataLakeStoreDataset | AzureBlobFSDataset | Office365Dataset | FileShareDataset | MongoDbCollectionDataset | MongoDbAtlasCollectionDataset | MongoDbV2CollectionDataset | CosmosDbMongoDbApiCollectionDataset | ODataResourceDataset | OracleTableDataset | AmazonRdsForOracleTableDataset | TeradataTableDataset | AzureMySqlTableDataset | AmazonRedshiftTableDataset | Db2TableDataset | RelationalTableDataset | InformixTableDataset | OdbcTableDataset | MySqlTableDataset | PostgreSqlTableDataset | PostgreSqlV2TableDataset | MicrosoftAccessTableDataset | SalesforceObjectDataset | SalesforceServiceCloudObjectDataset | SybaseTableDataset | SapBwCubeDataset | SapCloudForCustomerResourceDataset | SapEccResourceDataset | SapHanaTableDataset | SapOpenHubTableDataset | SqlServerTableDataset | AmazonRdsForSqlServerTableDataset | RestResourceDataset | SapTableResourceDataset | SapOdpResourceDataset | WebTableDataset | AzureSearchIndexDataset | HttpDataset | AmazonMWSObjectDataset | AzurePostgreSqlTableDataset | ConcurObjectDataset | CouchbaseTableDataset | DrillTableDataset | EloquaObjectDataset | GoogleBigQueryObjectDataset | GoogleBigQueryV2ObjectDataset | GreenplumTableDataset | HBaseObjectDataset | HiveObjectDataset | HubspotObjectDataset | ImpalaObjectDataset | JiraObjectDataset | MagentoObjectDataset | MariaDBTableDataset | AzureMariaDBTableDataset | MarketoObjectDataset | PaypalObjectDataset | PhoenixObjectDataset | PrestoObjectDataset | QuickBooksObjectDataset | ServiceNowObjectDataset | ShopifyObjectDataset | SparkObjectDataset | SquareObjectDataset | XeroObjectDataset | ZohoObjectDataset | NetezzaTableDataset | VerticaTableDataset | SalesforceMarketingCloudObjectDataset | ResponsysObjectDataset | DynamicsAXResourceDataset | OracleServiceCloudObjectDataset | AzureDataExplorerTableDataset | GoogleAdWordsObjectDataset | SnowflakeDataset | SnowflakeV2Dataset | SharePointOnlineListResourceDataset | AzureDatabricksDeltaLakeDataset | LakeHouseTableDataset | SalesforceV2ObjectDataset | SalesforceServiceCloudV2ObjectDataset | WarehouseTableDataset | ServiceNowV2ObjectDataset; // @public export interface DataworldLinkedService extends LinkedService { @@ -3241,11 +3252,11 @@ export type FormatReadSettingsUnion = FormatReadSettings | ParquetReadSettings | // @public export interface FormatWriteSettings { [property: string]: any; - type: "AvroWriteSettings" | "OrcWriteSettings" | "ParquetWriteSettings" | "DelimitedTextWriteSettings" | "JsonWriteSettings"; + type: "AvroWriteSettings" | "OrcWriteSettings" | "ParquetWriteSettings" | "DelimitedTextWriteSettings" | "JsonWriteSettings" | "IcebergWriteSettings"; } // @public (undocumented) -export type FormatWriteSettingsUnion = FormatWriteSettings | AvroWriteSettings | OrcWriteSettings | ParquetWriteSettings | DelimitedTextWriteSettings | JsonWriteSettings; +export type FormatWriteSettingsUnion = FormatWriteSettings | AvroWriteSettings | OrcWriteSettings | ParquetWriteSettings | DelimitedTextWriteSettings | JsonWriteSettings | IcebergWriteSettings; // @public export type FrequencyType = string; @@ -3872,6 +3883,24 @@ export interface HubspotSource extends TabularSource { type: "HubspotSource"; } +// @public +export interface IcebergDataset extends Dataset { + location?: DatasetLocationUnion; + type: "Iceberg"; +} + +// @public +export interface IcebergSink extends CopySink { + formatSettings?: IcebergWriteSettings; + storeSettings?: StoreWriteSettingsUnion; + type: "IcebergSink"; +} + +// @public +export interface IcebergWriteSettings extends FormatWriteSettings { + type: "IcebergWriteSettings"; +} + // @public export interface IfConditionActivity extends ControlActivity { expression: Expression; @@ -5884,8 +5913,10 @@ export interface MariaDBLinkedService extends LinkedService { password?: AzureKeyVaultSecretReference; port?: any; server?: any; + sslMode?: any; type: "MariaDB"; username?: any; + useSystemTrustStore?: any; } // @public @@ -6070,14 +6101,21 @@ export type MultiplePipelineTriggerUnion = MultiplePipelineTrigger | ScheduleTri // @public export interface MySqlLinkedService extends LinkedService { + allowZeroDateTime?: any; connectionString?: any; + connectionTimeout?: any; + convertZeroDateTime?: any; database?: any; driverVersion?: any; encryptedCredential?: string; + guidFormat?: any; password?: AzureKeyVaultSecretReference; port?: any; server?: any; + sslCert?: any; + sslKey?: any; sslMode?: any; + treatTinyAsBoolean?: any; type: "MySql"; username?: any; useSystemTrustStore?: any; @@ -6782,6 +6820,7 @@ export interface PostgreSqlTableDataset extends Dataset { // @public export interface PostgreSqlV2LinkedService extends LinkedService { + authenticationType: any; commandTimeout?: any; connectionTimeout?: any; database: any; @@ -7393,6 +7432,7 @@ export type SalesforceV2SinkWriteBehavior = string; // @public export interface SalesforceV2Source extends TabularSource { includeDeletedObjects?: any; + pageSize?: any; query?: any; soqlQuery?: any; type: "SalesforceV2Source"; @@ -7844,6 +7884,7 @@ export interface ServiceNowV2ObjectDataset extends Dataset { // @public export interface ServiceNowV2Source extends TabularSource { expression?: ExpressionV2; + pageSize?: any; type: "ServiceNowV2Source"; } @@ -8046,6 +8087,7 @@ export interface SnowflakeV2LinkedService extends LinkedService { clientSecret?: SecretBaseUnion; database: any; encryptedCredential?: string; + host?: any; password?: SecretBaseUnion; privateKey?: SecretBaseUnion; privateKeyPassphrase?: SecretBaseUnion; diff --git a/sdk/datafactory/arm-datafactory/sample.env b/sdk/datafactory/arm-datafactory/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/datafactory/arm-datafactory/sample.env +++ b/sdk/datafactory/arm-datafactory/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/samples/v17/javascript/sample.env b/sdk/datafactory/arm-datafactory/samples/v17/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/datafactory/arm-datafactory/samples/v17/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/samples/v17/typescript/sample.env b/sdk/datafactory/arm-datafactory/samples/v17/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/datafactory/arm-datafactory/samples/v17/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/samples/v17/javascript/README.md b/sdk/datafactory/arm-datafactory/samples/v18/javascript/README.md similarity index 92% rename from sdk/datafactory/arm-datafactory/samples/v17/javascript/README.md rename to sdk/datafactory/arm-datafactory/samples/v18/javascript/README.md index 5d1d6e67e66a..d2652f22744b 100644 --- a/sdk/datafactory/arm-datafactory/samples/v17/javascript/README.md +++ b/sdk/datafactory/arm-datafactory/samples/v18/javascript/README.md @@ -145,108 +145,108 @@ npx dev-tool run vendored cross-env DATAFACTORY_SUBSCRIPTION_ID=". Options: DISABLED (0) / PREFERRED (1) (Default) / REQUIRED (2) / VERIFY_CA (3) / VERIFY_IDENTITY (4), REQUIRED (2) is recommended to only allow connections encrypted with SSL/TLS. */ + sslMode?: any; + /** This option specifies whether to use a CA certificate from the system trust store, or from a specified PEM file. E.g. UseSystemTrustStore=<0/1>; Options: Enabled (1) / Disabled (0) (Default) */ + useSystemTrustStore?: any; /** The Azure key vault secret reference of password in connection string. */ password?: AzureKeyVaultSecretReference; /** The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. */ @@ -7081,6 +7129,8 @@ export interface SnowflakeV2LinkedService extends LinkedService { privateKey?: SecretBaseUnion; /** The Azure key vault secret reference of private key password for KeyPair auth with encrypted private key. */ privateKeyPassphrase?: SecretBaseUnion; + /** The host name of the Snowflake account. */ + host?: any; /** The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. */ encryptedCredential?: string; } @@ -7358,6 +7408,14 @@ export interface BinaryDataset extends Dataset { compression?: DatasetCompression; } +/** Iceberg dataset. */ +export interface IcebergDataset extends Dataset { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Iceberg"; + /** The location of the iceberg storage. Setting a file name is not allowed for iceberg format. */ + location?: DatasetLocationUnion; +} + /** The Azure Blob storage. */ export interface AzureBlobDataset extends Dataset { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -9482,6 +9540,12 @@ export interface JsonWriteSettings extends FormatWriteSettings { filePattern?: any; } +/** Iceberg write settings. */ +export interface IcebergWriteSettings extends FormatWriteSettings { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "IcebergWriteSettings"; +} + /** A copy activity Avro source. */ export interface AvroSource extends CopySource { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -10171,6 +10235,16 @@ export interface BinarySink extends CopySink { storeSettings?: StoreWriteSettingsUnion; } +/** A copy activity Iceberg sink. */ +export interface IcebergSink extends CopySink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "IcebergSink"; + /** Iceberg store settings. */ + storeSettings?: StoreWriteSettingsUnion; + /** Iceberg format settings. */ + formatSettings?: IcebergWriteSettings; +} + /** A copy activity Azure Blob sink. */ export interface BlobSink extends CopySink { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -12011,6 +12085,8 @@ export interface SalesforceV2Source extends TabularSource { query?: any; /** This property control whether query result contains Deleted objects. Default is false. Type: boolean (or Expression with resultType boolean). */ includeDeletedObjects?: any; + /** Page size for each http request, too large pageSize will caused timeout, default 300,000. Type: integer (or Expression with resultType integer). */ + pageSize?: any; } /** A copy activity ServiceNowV2 server source. */ @@ -12019,6 +12095,8 @@ export interface ServiceNowV2Source extends TabularSource { type: "ServiceNowV2Source"; /** Expression to filter data from source. */ expression?: ExpressionV2; + /** Page size of the result. Type: integer (or Expression with resultType integer). */ + pageSize?: any; } /** Referenced tumbling window trigger dependency. */ diff --git a/sdk/datafactory/arm-datafactory/src/models/mappers.ts b/sdk/datafactory/arm-datafactory/src/models/mappers.ts index 3c482c53ae1e..0c1d8297debb 100644 --- a/sdk/datafactory/arm-datafactory/src/models/mappers.ts +++ b/sdk/datafactory/arm-datafactory/src/models/mappers.ts @@ -11085,6 +11085,48 @@ export const MySqlLinkedService: coreClient.CompositeMapper = { name: "String", }, }, + allowZeroDateTime: { + serializedName: "typeProperties.allowZeroDateTime", + type: { + name: "any", + }, + }, + connectionTimeout: { + serializedName: "typeProperties.connectionTimeout", + type: { + name: "any", + }, + }, + convertZeroDateTime: { + serializedName: "typeProperties.convertZeroDateTime", + type: { + name: "any", + }, + }, + guidFormat: { + serializedName: "typeProperties.guidFormat", + type: { + name: "any", + }, + }, + sslCert: { + serializedName: "typeProperties.sslCert", + type: { + name: "any", + }, + }, + sslKey: { + serializedName: "typeProperties.sslKey", + type: { + name: "any", + }, + }, + treatTinyAsBoolean: { + serializedName: "typeProperties.treatTinyAsBoolean", + type: { + name: "any", + }, + }, }, }, }; @@ -11160,6 +11202,13 @@ export const PostgreSqlV2LinkedService: coreClient.CompositeMapper = { name: "any", }, }, + authenticationType: { + serializedName: "typeProperties.authenticationType", + required: true, + type: { + name: "any", + }, + }, sslMode: { serializedName: "typeProperties.sslMode", required: true, @@ -13769,6 +13818,72 @@ export const AzurePostgreSqlLinkedService: coreClient.CompositeMapper = { name: "any", }, }, + server: { + serializedName: "typeProperties.server", + type: { + name: "any", + }, + }, + port: { + serializedName: "typeProperties.port", + type: { + name: "any", + }, + }, + username: { + serializedName: "typeProperties.username", + type: { + name: "any", + }, + }, + database: { + serializedName: "typeProperties.database", + type: { + name: "any", + }, + }, + sslMode: { + serializedName: "typeProperties.sslMode", + type: { + name: "any", + }, + }, + timeout: { + serializedName: "typeProperties.timeout", + type: { + name: "any", + }, + }, + commandTimeout: { + serializedName: "typeProperties.commandTimeout", + type: { + name: "any", + }, + }, + trustServerCertificate: { + serializedName: "typeProperties.trustServerCertificate", + type: { + name: "any", + }, + }, + readBufferSize: { + serializedName: "typeProperties.readBufferSize", + type: { + name: "any", + }, + }, + timezone: { + serializedName: "typeProperties.timezone", + type: { + name: "any", + }, + }, + encoding: { + serializedName: "typeProperties.encoding", + type: { + name: "any", + }, + }, password: { serializedName: "typeProperties.password", type: { @@ -14674,6 +14789,18 @@ export const MariaDBLinkedService: coreClient.CompositeMapper = { name: "any", }, }, + sslMode: { + serializedName: "typeProperties.sslMode", + type: { + name: "any", + }, + }, + useSystemTrustStore: { + serializedName: "typeProperties.useSystemTrustStore", + type: { + name: "any", + }, + }, password: { serializedName: "typeProperties.password", type: { @@ -16799,6 +16926,12 @@ export const SnowflakeV2LinkedService: coreClient.CompositeMapper = { className: "SecretBase", }, }, + host: { + serializedName: "typeProperties.host", + type: { + name: "any", + }, + }, encryptedCredential: { serializedName: "typeProperties.encryptedCredential", type: { @@ -17606,6 +17739,27 @@ export const BinaryDataset: coreClient.CompositeMapper = { }, }; +export const IcebergDataset: coreClient.CompositeMapper = { + serializedName: "Iceberg", + type: { + name: "Composite", + className: "IcebergDataset", + uberParent: "Dataset", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: Dataset.type.polymorphicDiscriminator, + modelProperties: { + ...Dataset.type.modelProperties, + location: { + serializedName: "typeProperties.location", + type: { + name: "Composite", + className: "DatasetLocation", + }, + }, + }, + }, +}; + export const AzureBlobDataset: coreClient.CompositeMapper = { serializedName: "AzureBlob", type: { @@ -23297,6 +23451,20 @@ export const JsonWriteSettings: coreClient.CompositeMapper = { }, }; +export const IcebergWriteSettings: coreClient.CompositeMapper = { + serializedName: "IcebergWriteSettings", + type: { + name: "Composite", + className: "IcebergWriteSettings", + uberParent: "FormatWriteSettings", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: FormatWriteSettings.type.polymorphicDiscriminator, + modelProperties: { + ...FormatWriteSettings.type.modelProperties, + }, + }, +}; + export const AvroSource: coreClient.CompositeMapper = { serializedName: "AvroSource", type: { @@ -24992,6 +25160,34 @@ export const BinarySink: coreClient.CompositeMapper = { }, }; +export const IcebergSink: coreClient.CompositeMapper = { + serializedName: "IcebergSink", + type: { + name: "Composite", + className: "IcebergSink", + uberParent: "CopySink", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: CopySink.type.polymorphicDiscriminator, + modelProperties: { + ...CopySink.type.modelProperties, + storeSettings: { + serializedName: "storeSettings", + type: { + name: "Composite", + className: "StoreWriteSettings", + }, + }, + formatSettings: { + serializedName: "formatSettings", + type: { + name: "Composite", + className: "IcebergWriteSettings", + }, + }, + }, + }, +}; + export const BlobSink: coreClient.CompositeMapper = { serializedName: "BlobSink", type: { @@ -30341,6 +30537,12 @@ export const SalesforceV2Source: coreClient.CompositeMapper = { name: "any", }, }, + pageSize: { + serializedName: "pageSize", + type: { + name: "any", + }, + }, }, }, }; @@ -30362,6 +30564,12 @@ export const ServiceNowV2Source: coreClient.CompositeMapper = { className: "ExpressionV2", }, }, + pageSize: { + serializedName: "pageSize", + type: { + name: "any", + }, + }, }, }, }; @@ -30611,6 +30819,7 @@ export let discriminators = { "Dataset.Xml": XmlDataset, "Dataset.Orc": OrcDataset, "Dataset.Binary": BinaryDataset, + "Dataset.Iceberg": IcebergDataset, "Dataset.AzureBlob": AzureBlobDataset, "Dataset.AzureTable": AzureTableDataset, "Dataset.AzureSqlTable": AzureSqlTableDataset, @@ -30796,6 +31005,7 @@ export let discriminators = { "FormatWriteSettings.ParquetWriteSettings": ParquetWriteSettings, "FormatWriteSettings.DelimitedTextWriteSettings": DelimitedTextWriteSettings, "FormatWriteSettings.JsonWriteSettings": JsonWriteSettings, + "FormatWriteSettings.IcebergWriteSettings": IcebergWriteSettings, "CopySource.AvroSource": AvroSource, "CopySource.ExcelSource": ExcelSource, "CopySource.ParquetSource": ParquetSource, @@ -30850,6 +31060,7 @@ export let discriminators = { "CopySink.AvroSink": AvroSink, "CopySink.ParquetSink": ParquetSink, "CopySink.BinarySink": BinarySink, + "CopySink.IcebergSink": IcebergSink, "CopySink.BlobSink": BlobSink, "CopySink.FileSystemSink": FileSystemSink, "CopySink.DocumentDbCollectionSink": DocumentDbCollectionSink, diff --git a/sdk/datafactory/arm-datafactory/tsconfig.json b/sdk/datafactory/arm-datafactory/tsconfig.json index 6f440f5c25a9..8b6b24907f29 100644 --- a/sdk/datafactory/arm-datafactory/tsconfig.json +++ b/sdk/datafactory/arm-datafactory/tsconfig.json @@ -23,8 +23,8 @@ } }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", + "src/**/*.ts", + "test/**/*.ts", "samples-dev/**/*.ts" ], "exclude": [ From 8179e26245b8e44659c97ae36b89bbd2a1bfb221 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:19:30 +0800 Subject: [PATCH 14/55] [mgmt] iotoperations ga (#32203) https://github.com/Azure/sdk-release-request/issues/5781 --- common/config/rush/pnpm-lock.yaml | 3 +- .../arm-iotoperations/CHANGELOG.md | 16 +- sdk/iotoperations/arm-iotoperations/README.md | 15 +- .../arm-iotoperations/assets.json | 2 +- .../arm-iotoperations/eslint.config.mjs | 17 + .../arm-iotoperations/package.json | 7 +- .../review/arm-iotoperations-models.api.md | 87 ++- .../review/arm-iotoperations.api.md | 87 ++- ...rokerAuthenticationCreateOrUpdateSample.ts | 4 +- .../brokerAuthenticationDeleteSample.ts | 2 +- .../brokerAuthenticationGetSample.ts | 2 +- ...AuthenticationListByResourceGroupSample.ts | 2 +- ...brokerAuthorizationCreateOrUpdateSample.ts | 6 +- .../brokerAuthorizationDeleteSample.ts | 2 +- .../brokerAuthorizationGetSample.ts | 2 +- ...rAuthorizationListByResourceGroupSample.ts | 2 +- .../samples-dev/brokerCreateOrUpdateSample.ts | 8 +- .../samples-dev/brokerDeleteSample.ts | 2 +- .../samples-dev/brokerGetSample.ts | 2 +- .../brokerListByResourceGroupSample.ts | 2 +- .../brokerListenerCreateOrUpdateSample.ts | 6 +- .../samples-dev/brokerListenerDeleteSample.ts | 2 +- .../samples-dev/brokerListenerGetSample.ts | 2 +- ...brokerListenerListByResourceGroupSample.ts | 2 +- .../dataflowCreateOrUpdateSample.ts | 12 +- .../samples-dev/dataflowDeleteSample.ts | 2 +- .../dataflowEndpointCreateOrUpdateSample.ts | 20 +- .../dataflowEndpointDeleteSample.ts | 2 +- .../samples-dev/dataflowEndpointGetSample.ts | 2 +- ...taflowEndpointListByResourceGroupSample.ts | 2 +- .../samples-dev/dataflowGetSample.ts | 2 +- .../dataflowListByResourceGroupSample.ts | 2 +- .../dataflowProfileCreateOrUpdateSample.ts | 6 +- .../dataflowProfileDeleteSample.ts | 2 +- .../samples-dev/dataflowProfileGetSample.ts | 2 +- ...ataflowProfileListByResourceGroupSample.ts | 2 +- .../instanceCreateOrUpdateSample.ts | 2 +- .../samples-dev/instanceDeleteSample.ts | 2 +- .../samples-dev/instanceGetSample.ts | 2 +- .../instanceListByResourceGroupSample.ts | 2 +- .../instanceListBySubscriptionSample.ts | 2 +- .../samples-dev/instanceUpdateSample.ts | 2 +- .../samples-dev/operationsListSample.ts | 2 +- .../samples/v1-beta/javascript/README.md | 74 +-- ...rokerAuthenticationCreateOrUpdateSample.js | 4 +- .../brokerAuthenticationDeleteSample.js | 2 +- .../brokerAuthenticationGetSample.js | 2 +- ...AuthenticationListByResourceGroupSample.js | 2 +- ...brokerAuthorizationCreateOrUpdateSample.js | 6 +- .../brokerAuthorizationDeleteSample.js | 2 +- .../brokerAuthorizationGetSample.js | 2 +- ...rAuthorizationListByResourceGroupSample.js | 2 +- .../javascript/brokerCreateOrUpdateSample.js | 8 +- .../v1-beta/javascript/brokerDeleteSample.js | 2 +- .../v1-beta/javascript/brokerGetSample.js | 2 +- .../brokerListByResourceGroupSample.js | 2 +- .../brokerListenerCreateOrUpdateSample.js | 6 +- .../javascript/brokerListenerDeleteSample.js | 2 +- .../javascript/brokerListenerGetSample.js | 2 +- ...brokerListenerListByResourceGroupSample.js | 2 +- .../dataflowCreateOrUpdateSample.js | 12 +- .../javascript/dataflowDeleteSample.js | 2 +- .../dataflowEndpointCreateOrUpdateSample.js | 20 +- .../dataflowEndpointDeleteSample.js | 2 +- .../javascript/dataflowEndpointGetSample.js | 2 +- ...taflowEndpointListByResourceGroupSample.js | 2 +- .../v1-beta/javascript/dataflowGetSample.js | 2 +- .../dataflowListByResourceGroupSample.js | 2 +- .../dataflowProfileCreateOrUpdateSample.js | 6 +- .../javascript/dataflowProfileDeleteSample.js | 2 +- .../javascript/dataflowProfileGetSample.js | 2 +- ...ataflowProfileListByResourceGroupSample.js | 2 +- .../instanceCreateOrUpdateSample.js | 2 +- .../javascript/instanceDeleteSample.js | 2 +- .../v1-beta/javascript/instanceGetSample.js | 2 +- .../instanceListByResourceGroupSample.js | 2 +- .../instanceListBySubscriptionSample.js | 2 +- .../javascript/instanceUpdateSample.js | 2 +- .../javascript/operationsListSample.js | 2 +- .../samples/v1-beta/typescript/README.md | 74 +-- ...rokerAuthenticationCreateOrUpdateSample.ts | 4 +- .../src/brokerAuthenticationDeleteSample.ts | 2 +- .../src/brokerAuthenticationGetSample.ts | 2 +- ...AuthenticationListByResourceGroupSample.ts | 2 +- ...brokerAuthorizationCreateOrUpdateSample.ts | 6 +- .../src/brokerAuthorizationDeleteSample.ts | 2 +- .../src/brokerAuthorizationGetSample.ts | 2 +- ...rAuthorizationListByResourceGroupSample.ts | 2 +- .../src/brokerCreateOrUpdateSample.ts | 8 +- .../typescript/src/brokerDeleteSample.ts | 2 +- .../v1-beta/typescript/src/brokerGetSample.ts | 2 +- .../src/brokerListByResourceGroupSample.ts | 2 +- .../src/brokerListenerCreateOrUpdateSample.ts | 6 +- .../src/brokerListenerDeleteSample.ts | 2 +- .../typescript/src/brokerListenerGetSample.ts | 2 +- ...brokerListenerListByResourceGroupSample.ts | 2 +- .../src/dataflowCreateOrUpdateSample.ts | 12 +- .../typescript/src/dataflowDeleteSample.ts | 2 +- .../dataflowEndpointCreateOrUpdateSample.ts | 20 +- .../src/dataflowEndpointDeleteSample.ts | 2 +- .../src/dataflowEndpointGetSample.ts | 2 +- ...taflowEndpointListByResourceGroupSample.ts | 2 +- .../typescript/src/dataflowGetSample.ts | 2 +- .../src/dataflowListByResourceGroupSample.ts | 2 +- .../dataflowProfileCreateOrUpdateSample.ts | 6 +- .../src/dataflowProfileDeleteSample.ts | 2 +- .../src/dataflowProfileGetSample.ts | 2 +- ...ataflowProfileListByResourceGroupSample.ts | 2 +- .../src/instanceCreateOrUpdateSample.ts | 2 +- .../typescript/src/instanceDeleteSample.ts | 2 +- .../typescript/src/instanceGetSample.ts | 2 +- .../src/instanceListByResourceGroupSample.ts | 2 +- .../src/instanceListBySubscriptionSample.ts | 2 +- .../typescript/src/instanceUpdateSample.ts | 2 +- .../typescript/src/operationsListSample.ts | 2 +- .../arm-iotoperations/src/api/broker/index.ts | 2 +- .../src/api/brokerAuthentication/index.ts | 2 +- .../src/api/brokerAuthorization/index.ts | 2 +- .../src/api/brokerListener/index.ts | 2 +- .../src/api/dataflow/index.ts | 2 +- .../src/api/dataflowEndpoint/index.ts | 2 +- .../src/api/dataflowProfile/index.ts | 2 +- .../src/api/instance/index.ts | 2 +- .../src/api/ioTOperationsContext.ts | 7 +- .../arm-iotoperations/src/index.ts | 20 +- .../src/ioTOperationsClient.ts | 2 +- .../arm-iotoperations/src/models/index.ts | 20 +- .../arm-iotoperations/src/models/models.ts | 560 ++++++++---------- .../arm-iotoperations/tsconfig.json | 12 +- .../arm-iotoperations/tsp-location.yaml | 2 +- sdk/iotoperations/ci.mgmt.yml | 2 - 131 files changed, 656 insertions(+), 721 deletions(-) create mode 100644 sdk/iotoperations/arm-iotoperations/eslint.config.mjs diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ecf93cf22094..f84223d10830 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2992,7 +2992,7 @@ packages: version: 0.0.0 '@rush-temp/arm-iotoperations@file:projects/arm-iotoperations.tgz': - resolution: {integrity: sha512-0dG/Ad4Jtr8ZwdSkt3Pu7qsao/aKcEQV4LPFYvys4yt4vGvYAOgt+i23sAlPPOik1SeYUE/8CCvFluVUl3VtNQ==, tarball: file:projects/arm-iotoperations.tgz} + resolution: {integrity: sha512-sJGhZPYkEh2JIKvE7Drjtp3rm8RhuMZ/F6SL0Hg/LDdy3gii1FIGfth8OV//WK4WuBENbTQNOCafH4keCZE1Xw==, tarball: file:projects/arm-iotoperations.tgz} version: 0.0.0 '@rush-temp/arm-keyvault-profile-2020-09-01-hybrid@file:projects/arm-keyvault-profile-2020-09-01-hybrid.tgz': @@ -12826,6 +12826,7 @@ snapshots: '@rush-temp/arm-iotoperations@file:projects/arm-iotoperations.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: + '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) diff --git a/sdk/iotoperations/arm-iotoperations/CHANGELOG.md b/sdk/iotoperations/arm-iotoperations/CHANGELOG.md index dadd02f8d59d..ec8854800245 100644 --- a/sdk/iotoperations/arm-iotoperations/CHANGELOG.md +++ b/sdk/iotoperations/arm-iotoperations/CHANGELOG.md @@ -1,17 +1,7 @@ # Release History - -## 1.0.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.1 (2024-10-23) + +## 1.0.0 (2024-12-13) ### Features Added -Initial release of the Azure IotOperations package +This is the first stable version with the package of @azure/arm-iotoperations diff --git a/sdk/iotoperations/arm-iotoperations/README.md b/sdk/iotoperations/arm-iotoperations/README.md index 3f802a284e0c..216e2dd689c3 100644 --- a/sdk/iotoperations/arm-iotoperations/README.md +++ b/sdk/iotoperations/arm-iotoperations/README.md @@ -4,8 +4,12 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f Microsoft.IoTOperations Resource Provider management API. -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-iotoperations) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-iotoperations?view=azure-node-preview) | +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-iotoperations) +- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-iotoperations?view=azure-node-preview) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations/samples) ## Getting started @@ -42,7 +46,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure IoTOperations** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). @@ -62,8 +65,8 @@ const client = new IoTOperationsClient(new DefaultAzureCredential(), subscriptio // const client = new IoTOperationsClient(credential, subscriptionId); ``` -### JavaScript Bundle +### JavaScript Bundle To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). ## Key concepts @@ -85,6 +88,10 @@ setLogLevel("info"); For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). +## Next steps + +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations/samples) directory for detailed examples on how to use this library. + ## Contributing If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. diff --git a/sdk/iotoperations/arm-iotoperations/assets.json b/sdk/iotoperations/arm-iotoperations/assets.json index 349320db627a..1c5abfac7599 100644 --- a/sdk/iotoperations/arm-iotoperations/assets.json +++ b/sdk/iotoperations/arm-iotoperations/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/iotoperations/arm-iotoperations", - "Tag": "js/iotoperations/arm-iotoperations_f94fba0d51" + "Tag": "js/iotoperations/arm-iotoperations_eb2e7b6b53" } diff --git a/sdk/iotoperations/arm-iotoperations/eslint.config.mjs b/sdk/iotoperations/arm-iotoperations/eslint.config.mjs new file mode 100644 index 000000000000..03244d34a19f --- /dev/null +++ b/sdk/iotoperations/arm-iotoperations/eslint.config.mjs @@ -0,0 +1,17 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default [ + ...azsdkEslint.configs.recommended, + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]; diff --git a/sdk/iotoperations/arm-iotoperations/package.json b/sdk/iotoperations/arm-iotoperations/package.json index b67fe5d82232..c175b2b1d579 100644 --- a/sdk/iotoperations/arm-iotoperations/package.json +++ b/sdk/iotoperations/arm-iotoperations/package.json @@ -1,6 +1,6 @@ { "name": "@azure/arm-iotoperations", - "version": "1.0.0-beta.2", + "version": "1.0.0", "description": "A generated SDK for IoTOperationsClient.", "engines": { "node": ">=18.0.0" @@ -47,6 +47,7 @@ "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotoperations/arm-iotoperations/README.md", "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", "//metadata": { "constantPaths": [ @@ -68,6 +69,7 @@ }, "devDependencies": { "dotenv": "^16.0.0", + "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", "eslint": "^9.9.0", "typescript": "~5.7.2", @@ -103,7 +105,8 @@ "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", - "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test" + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "update-snippets": "echo skipped" }, "//sampleConfiguration": { "productName": "@azure/arm-iotoperations", diff --git a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md index 774ed9d000a3..a29864f05669 100644 --- a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md +++ b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations-models.api.md @@ -4,9 +4,6 @@ ```ts -// @public -export type AccessTokenMethod = string; - // @public export type ActionType = string; @@ -17,9 +14,6 @@ export interface AdvancedSettings { internalCerts?: CertManagerCertOptions; } -// @public -export type AnonymousMethod = string; - // @public export interface AuthorizationConfig { cache?: OperationalMode; @@ -222,7 +216,7 @@ export type CloudEventAttributeType = string; export type CreatedByType = string; // @public -export type DataExplorerAuthMethod = ManagedIdentityMethod; +export type DataExplorerAuthMethod = string; // @public export interface DataflowBuiltInTransformationDataset { @@ -491,7 +485,7 @@ export interface DataflowSourceOperationSettings { } // @public -export type DataLakeStorageAuthMethod = ManagedIdentityMethod | AccessTokenMethod; +export type DataLakeStorageAuthMethod = string; // @public export interface DiagnosticsLogs { @@ -518,7 +512,7 @@ export interface ExtendedLocation { export type ExtendedLocationType = string; // @public -export type FabricOneLakeAuthMethod = ManagedIdentityMethod; +export type FabricOneLakeAuthMethod = string; // @public export type FilterType = string; @@ -556,23 +550,13 @@ export interface InstanceResource extends TrackedResource { } // @public -export type KafkaAuthMethod = ManagedIdentityMethod | SaslMethod | X509CertificateMethod | AnonymousMethod; - -// @public -export enum KnownAccessTokenMethod { - AccessToken = "AccessToken" -} +export type KafkaAuthMethod = string; // @public export enum KnownActionType { Internal = "Internal" } -// @public -export enum KnownAnonymousMethod { - Anonymous = "Anonymous" -} - // @public export enum KnownBrokerAuthenticationMethod { Custom = "Custom", @@ -621,6 +605,12 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDataExplorerAuthMethod { + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownDataflowEndpointAuthenticationSaslType { Plain = "Plain", @@ -666,6 +656,13 @@ export enum KnownDataflowMappingType { Rename = "Rename" } +// @public +export enum KnownDataLakeStorageAuthMethod { + AccessToken = "AccessToken", + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownEndpointType { DataExplorer = "DataExplorer", @@ -681,15 +678,24 @@ export enum KnownExtendedLocationType { CustomLocation = "CustomLocation" } +// @public +export enum KnownFabricOneLakeAuthMethod { + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownFilterType { Filter = "Filter" } // @public -export enum KnownManagedIdentityMethod { +export enum KnownKafkaAuthMethod { + Anonymous = "Anonymous", + Sasl = "Sasl", SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", + X509Certificate = "X509Certificate" } // @public @@ -700,6 +706,15 @@ export enum KnownManagedServiceIdentityType { UserAssigned = "UserAssigned" } +// @public +export enum KnownMqttAuthMethod { + Anonymous = "Anonymous", + ServiceAccountToken = "ServiceAccountToken", + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", + X509Certificate = "X509Certificate" +} + // @public export enum KnownMqttRetainType { Keep = "Keep", @@ -762,16 +777,6 @@ export enum KnownProvisioningState { Updating = "Updating" } -// @public -export enum KnownSaslMethod { - Sasl = "Sasl" -} - -// @public -export enum KnownServiceAccountTokenMethod { - ServiceAccountToken = "ServiceAccountToken" -} - // @public export enum KnownServiceType { ClusterIp = "ClusterIp", @@ -818,8 +823,8 @@ export enum KnownTransformationSerializationFormat { } // @public -export enum KnownX509CertificateMethod { - X509Certificate = "X509Certificate" +export enum KnownVersions { + "V2024-11-01" = "2024-11-01" } // @public @@ -847,9 +852,6 @@ export interface LocalKubernetesReference { name: string; } -// @public -export type ManagedIdentityMethod = string; - // @public export interface ManagedServiceIdentity { readonly principalId?: string; @@ -867,7 +869,7 @@ export interface Metrics { } // @public -export type MqttAuthMethod = ManagedIdentityMethod | ServiceAccountTokenMethod | X509CertificateMethod | AnonymousMethod; +export type MqttAuthMethod = string; // @public export type MqttRetainType = string; @@ -941,9 +943,6 @@ export interface SanForCert { ip: string[]; } -// @public -export type SaslMethod = string; - // @public export interface SchemaRegistryRef { resourceId: string; @@ -962,9 +961,6 @@ export interface SelfTracing { mode?: OperationalMode; } -// @public -export type ServiceAccountTokenMethod = string; - // @public export type ServiceType = string; @@ -1073,9 +1069,6 @@ export interface VolumeClaimSpecSelectorMatchExpressions { values?: string[]; } -// @public -export type X509CertificateMethod = string; - // @public export interface X509ManualCertificate { secretRef: string; diff --git a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md index 13123ea6579d..0a477bde221e 100644 --- a/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md +++ b/sdk/iotoperations/arm-iotoperations/review/arm-iotoperations.api.md @@ -13,9 +13,6 @@ import { Pipeline } from '@azure/core-rest-pipeline'; import { PollerLike } from '@azure/core-lro'; import { TokenCredential } from '@azure/core-auth'; -// @public -export type AccessTokenMethod = string; - // @public export type ActionType = string; @@ -26,9 +23,6 @@ export interface AdvancedSettings { internalCerts?: CertManagerCertOptions; } -// @public -export type AnonymousMethod = string; - // @public export interface AuthorizationConfig { cache?: OperationalMode; @@ -340,7 +334,7 @@ export type ContinuablePage = TPage & { export type CreatedByType = string; // @public -export type DataExplorerAuthMethod = ManagedIdentityMethod; +export type DataExplorerAuthMethod = string; // @public export interface DataflowBuiltInTransformationDataset { @@ -687,7 +681,7 @@ export interface DataflowSourceOperationSettings { } // @public -export type DataLakeStorageAuthMethod = ManagedIdentityMethod | AccessTokenMethod; +export type DataLakeStorageAuthMethod = string; // @public export interface DiagnosticsLogs { @@ -714,7 +708,7 @@ export interface ExtendedLocation { export type ExtendedLocationType = string; // @public -export type FabricOneLakeAuthMethod = ManagedIdentityMethod; +export type FabricOneLakeAuthMethod = string; // @public export type FilterType = string; @@ -808,23 +802,13 @@ export interface IoTOperationsClientOptionalParams extends ClientOptions { } // @public -export type KafkaAuthMethod = ManagedIdentityMethod | SaslMethod | X509CertificateMethod | AnonymousMethod; - -// @public -export enum KnownAccessTokenMethod { - AccessToken = "AccessToken" -} +export type KafkaAuthMethod = string; // @public export enum KnownActionType { Internal = "Internal" } -// @public -export enum KnownAnonymousMethod { - Anonymous = "Anonymous" -} - // @public export enum KnownBrokerAuthenticationMethod { Custom = "Custom", @@ -873,6 +857,12 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDataExplorerAuthMethod { + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownDataflowEndpointAuthenticationSaslType { Plain = "Plain", @@ -918,6 +908,13 @@ export enum KnownDataflowMappingType { Rename = "Rename" } +// @public +export enum KnownDataLakeStorageAuthMethod { + AccessToken = "AccessToken", + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownEndpointType { DataExplorer = "DataExplorer", @@ -933,15 +930,24 @@ export enum KnownExtendedLocationType { CustomLocation = "CustomLocation" } +// @public +export enum KnownFabricOneLakeAuthMethod { + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" +} + // @public export enum KnownFilterType { Filter = "Filter" } // @public -export enum KnownManagedIdentityMethod { +export enum KnownKafkaAuthMethod { + Anonymous = "Anonymous", + Sasl = "Sasl", SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", + X509Certificate = "X509Certificate" } // @public @@ -952,6 +958,15 @@ export enum KnownManagedServiceIdentityType { UserAssigned = "UserAssigned" } +// @public +export enum KnownMqttAuthMethod { + Anonymous = "Anonymous", + ServiceAccountToken = "ServiceAccountToken", + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", + X509Certificate = "X509Certificate" +} + // @public export enum KnownMqttRetainType { Keep = "Keep", @@ -1014,16 +1029,6 @@ export enum KnownProvisioningState { Updating = "Updating" } -// @public -export enum KnownSaslMethod { - Sasl = "Sasl" -} - -// @public -export enum KnownServiceAccountTokenMethod { - ServiceAccountToken = "ServiceAccountToken" -} - // @public export enum KnownServiceType { ClusterIp = "ClusterIp", @@ -1070,8 +1075,8 @@ export enum KnownTransformationSerializationFormat { } // @public -export enum KnownX509CertificateMethod { - X509Certificate = "X509Certificate" +export enum KnownVersions { + "V2024-11-01" = "2024-11-01" } // @public @@ -1099,9 +1104,6 @@ export interface LocalKubernetesReference { name: string; } -// @public -export type ManagedIdentityMethod = string; - // @public export interface ManagedServiceIdentity { readonly principalId?: string; @@ -1119,7 +1121,7 @@ export interface Metrics { } // @public -export type MqttAuthMethod = ManagedIdentityMethod | ServiceAccountTokenMethod | X509CertificateMethod | AnonymousMethod; +export type MqttAuthMethod = string; // @public export type MqttRetainType = string; @@ -1224,9 +1226,6 @@ export interface SanForCert { ip: string[]; } -// @public -export type SaslMethod = string; - // @public export interface SchemaRegistryRef { resourceId: string; @@ -1245,9 +1244,6 @@ export interface SelfTracing { mode?: OperationalMode; } -// @public -export type ServiceAccountTokenMethod = string; - // @public export type ServiceType = string; @@ -1356,9 +1352,6 @@ export interface VolumeClaimSpecSelectorMatchExpressions { values?: string[]; } -// @public -export type X509CertificateMethod = string; - // @public export interface X509ManualCertificate { secretRef: string; diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationCreateOrUpdateSample.ts index 50b1ca0d1457..00b0e81ae480 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a BrokerAuthenticationResource * * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json */ async function brokerAuthenticationCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -61,7 +61,7 @@ async function brokerAuthenticationCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerAuthenticationResource * * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerAuthenticationCreateOrUpdate() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationDeleteSample.ts index 117723b9e865..4e71341a0a51 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a BrokerAuthenticationResource * * @summary delete a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json */ async function brokerAuthenticationDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationGetSample.ts index 975a99cd11bc..a4cf3bf3ebbe 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a BrokerAuthenticationResource * * @summary get a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json */ async function brokerAuthenticationGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationListByResourceGroupSample.ts index 2776b2a9c5b0..5c0d52b38764 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthenticationListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list BrokerAuthenticationResource resources by BrokerResource * * @summary list BrokerAuthenticationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerAuthenticationListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationCreateOrUpdateSample.ts index c3f606c80a57..3bfc14984eb7 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a BrokerAuthorizationResource * * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json */ async function brokerAuthorizationCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -79,7 +79,7 @@ async function brokerAuthorizationCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerAuthorizationResource * * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerAuthorizationCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -126,7 +126,7 @@ async function brokerAuthorizationCreateOrUpdate() { * This sample demonstrates how to create a BrokerAuthorizationResource * * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Simple.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Simple.json */ async function brokerAuthorizationCreateOrUpdateSimple() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationDeleteSample.ts index 4310d24ba61d..06bfcb96e28e 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a BrokerAuthorizationResource * * @summary delete a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json */ async function brokerAuthorizationDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationGetSample.ts index 20773696e6e4..dcf8687acc1b 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a BrokerAuthorizationResource * * @summary get a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json */ async function brokerAuthorizationGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationListByResourceGroupSample.ts index f698bfef8c61..3e7fac264b82 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerAuthorizationListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list BrokerAuthorizationResource resources by BrokerResource * * @summary list BrokerAuthorizationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerAuthorizationListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerCreateOrUpdateSample.ts index 435779553db8..7f6271c9bb59 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Complex.json */ async function brokerCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -41,7 +41,7 @@ async function brokerCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -169,7 +169,7 @@ async function brokerCreateOrUpdate() { * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Minimal.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Minimal.json */ async function brokerCreateOrUpdateMinimal() { const credential = new DefaultAzureCredential(); @@ -194,7 +194,7 @@ async function brokerCreateOrUpdateMinimal() { * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Simple.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Simple.json */ async function brokerCreateOrUpdateSimple() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerDeleteSample.ts index 576bbc65212b..32dbe2909f6a 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a BrokerResource * * @summary delete a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_Delete_MaximumSet_Gen.json */ async function brokerDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerGetSample.ts index a3682ef5b0f6..cd3070de498b 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a BrokerResource * * @summary get a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_Get_MaximumSet_Gen.json */ async function brokerGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListByResourceGroupSample.ts index 76016e3abf23..93a8a77eb652 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list BrokerResource resources by InstanceResource * * @summary list BrokerResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerCreateOrUpdateSample.ts index 59fc9e87cffc..62289079b4a2 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a BrokerListenerResource * * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json */ async function brokerListenerCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -64,7 +64,7 @@ async function brokerListenerCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerListenerResource * * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerListenerCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -121,7 +121,7 @@ async function brokerListenerCreateOrUpdate() { * This sample demonstrates how to create a BrokerListenerResource * * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Simple.json + * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Simple.json */ async function brokerListenerCreateOrUpdateSimple() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerDeleteSample.ts index dac6e0497872..99f8f881ef84 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a BrokerListenerResource * * @summary delete a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json */ async function brokerListenerDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerGetSample.ts index 913d755c3ea7..df5b2d64620c 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a BrokerListenerResource * * @summary get a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json */ async function brokerListenerGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerListByResourceGroupSample.ts index 83062ca82430..1d8958c8f518 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/brokerListenerListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list BrokerListenerResource resources by BrokerResource * * @summary list BrokerListenerResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerListenerListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowCreateOrUpdateSample.ts index e77b2eef4111..e75f4fb636d4 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json */ async function dataflowCreateOrUpdateComplexContextualization() { const credential = new DefaultAzureCredential(); @@ -71,7 +71,7 @@ async function dataflowCreateOrUpdateComplexContextualization() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexEventHub.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexEventHub.json */ async function dataflowCreateOrUpdateComplexEventHub() { const credential = new DefaultAzureCredential(); @@ -157,7 +157,7 @@ async function dataflowCreateOrUpdateComplexEventHub() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_FilterToTopic.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_FilterToTopic.json */ async function dataflowCreateOrUpdateFilterToTopic() { const credential = new DefaultAzureCredential(); @@ -218,7 +218,7 @@ async function dataflowCreateOrUpdateFilterToTopic() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json */ async function dataflowCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -293,7 +293,7 @@ async function dataflowCreateOrUpdate() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleEventGrid.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json */ async function dataflowCreateOrUpdateSimpleEventGrid() { const credential = new DefaultAzureCredential(); @@ -339,7 +339,7 @@ async function dataflowCreateOrUpdateSimpleEventGrid() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleFabric.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_SimpleFabric.json */ async function dataflowCreateOrUpdateSimpleFabric() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowDeleteSample.ts index b7a7f2cc4f21..d387348fe372 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a DataflowResource * * @summary delete a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json */ async function dataflowDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointCreateOrUpdateSample.ts index 496c8c729fbc..ec2dca32c36d 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json */ async function dataflowEndpointCreateOrUpdateADLSv2() { const credential = new DefaultAzureCredential(); @@ -42,7 +42,7 @@ async function dataflowEndpointCreateOrUpdateADLSv2() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADX.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json */ async function dataflowEndpointCreateOrUpdateAdx() { const credential = new DefaultAzureCredential(); @@ -78,7 +78,7 @@ async function dataflowEndpointCreateOrUpdateAdx() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_AIO.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json */ async function dataflowEndpointCreateOrUpdateAio() { const credential = new DefaultAzureCredential(); @@ -116,7 +116,7 @@ async function dataflowEndpointCreateOrUpdateAio() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventGrid.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json */ async function dataflowEndpointCreateOrUpdateEventGrid() { const credential = new DefaultAzureCredential(); @@ -151,7 +151,7 @@ async function dataflowEndpointCreateOrUpdateEventGrid() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventHub.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json */ async function dataflowEndpointCreateOrUpdateEventHub() { const credential = new DefaultAzureCredential(); @@ -187,7 +187,7 @@ async function dataflowEndpointCreateOrUpdateEventHub() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Fabric.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json */ async function dataflowEndpointCreateOrUpdateFabric() { const credential = new DefaultAzureCredential(); @@ -226,7 +226,7 @@ async function dataflowEndpointCreateOrUpdateFabric() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Kafka.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json */ async function dataflowEndpointCreateOrUpdateKafka() { const credential = new DefaultAzureCredential(); @@ -276,7 +276,7 @@ async function dataflowEndpointCreateOrUpdateKafka() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_LocalStorage.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json */ async function dataflowEndpointCreateOrUpdateLocalStorage() { const credential = new DefaultAzureCredential(); @@ -304,7 +304,7 @@ async function dataflowEndpointCreateOrUpdateLocalStorage() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json */ async function dataflowEndpointCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -442,7 +442,7 @@ async function dataflowEndpointCreateOrUpdate() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MQTT.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json */ async function dataflowEndpointCreateOrUpdateMqtt() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointDeleteSample.ts index 1af8a4bbd0a7..e66dafeb650a 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a DataflowEndpointResource * * @summary delete a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json */ async function dataflowEndpointDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointGetSample.ts index 4c190c182817..d4485d0a45fa 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a DataflowEndpointResource * * @summary get a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json */ async function dataflowEndpointGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointListByResourceGroupSample.ts index 6fc39edc7eae..2630477396a1 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowEndpointListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list DataflowEndpointResource resources by InstanceResource * * @summary list DataflowEndpointResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json */ async function dataflowEndpointListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowGetSample.ts index 638dd886833a..b9205d952e0f 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a DataflowResource * * @summary get a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json */ async function dataflowGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowListByResourceGroupSample.ts index 3de53e08bbfb..2ebcaf4cc063 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list DataflowResource resources by DataflowProfileResource * * @summary list DataflowResource resources by DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json */ async function dataflowListByProfileResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileCreateOrUpdateSample.ts index b751287bfa0a..b2c1e260eacf 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a DataflowProfileResource * * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json */ async function dataflowProfileCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -39,7 +39,7 @@ async function dataflowProfileCreateOrUpdate() { * This sample demonstrates how to create a DataflowProfileResource * * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Minimal.json + * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json */ async function dataflowProfileCreateOrUpdateMinimal() { const credential = new DefaultAzureCredential(); @@ -64,7 +64,7 @@ async function dataflowProfileCreateOrUpdateMinimal() { * This sample demonstrates how to create a DataflowProfileResource * * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Multi.json + * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json */ async function dataflowProfileCreateOrUpdateMulti() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileDeleteSample.ts index 027b0ae0c30c..911d8b32e1c1 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a DataflowProfileResource * * @summary delete a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json */ async function dataflowProfileDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileGetSample.ts index 3f1c0cd20e95..0a3cf1144d43 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a DataflowProfileResource * * @summary get a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json */ async function dataflowProfileGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileListByResourceGroupSample.ts index e1c996594bf5..feb1635f6424 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/dataflowProfileListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list DataflowProfileResource resources by InstanceResource * * @summary list DataflowProfileResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json */ async function dataflowProfileListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceCreateOrUpdateSample.ts index ebb765f8b109..c697f4229309 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a InstanceResource * * @summary create a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json */ async function instanceCreateOrUpdate() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceDeleteSample.ts index 685dbe899f1a..c9a75bb25bfe 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a InstanceResource * * @summary delete a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_Delete_MaximumSet_Gen.json */ async function instanceDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceGetSample.ts index 76be3cc0966c..56e47e466241 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a InstanceResource * * @summary get a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_Get_MaximumSet_Gen.json */ async function instanceGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListByResourceGroupSample.ts index 8382d0ff308e..9716d505a445 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list InstanceResource resources by resource group * * @summary list InstanceResource resources by resource group - * x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json */ async function instanceListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListBySubscriptionSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListBySubscriptionSample.ts index 5c5fc9a85986..e5b6c7ad3aa2 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListBySubscriptionSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceListBySubscriptionSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list InstanceResource resources by subscription ID * * @summary list InstanceResource resources by subscription ID - * x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json */ async function instanceListBySubscription() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceUpdateSample.ts index f7b726f2b59c..e0adaba925f1 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/instanceUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/instanceUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to update a InstanceResource * * @summary update a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_Update_MaximumSet_Gen.json */ async function instanceUpdate() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples-dev/operationsListSample.ts b/sdk/iotoperations/arm-iotoperations/samples-dev/operationsListSample.ts index 9b918368ddd9..7a542300f439 100644 --- a/sdk/iotoperations/arm-iotoperations/samples-dev/operationsListSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples-dev/operationsListSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider - * x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Operations_List_MaximumSet_Gen.json */ async function operationsList() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/README.md b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/README.md index f364654e0182..855fb0992819 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/README.md +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/README.md @@ -2,43 +2,43 @@ These sample programs show how to use the JavaScript client libraries for @azure/arm-iotoperations in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [brokerAuthenticationCreateOrUpdateSample.js][brokerauthenticationcreateorupdatesample] | create a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json | -| [brokerAuthenticationDeleteSample.js][brokerauthenticationdeletesample] | delete a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json | -| [brokerAuthenticationGetSample.js][brokerauthenticationgetsample] | get a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json | -| [brokerAuthenticationListByResourceGroupSample.js][brokerauthenticationlistbyresourcegroupsample] | list BrokerAuthenticationResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerAuthorizationCreateOrUpdateSample.js][brokerauthorizationcreateorupdatesample] | create a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json | -| [brokerAuthorizationDeleteSample.js][brokerauthorizationdeletesample] | delete a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json | -| [brokerAuthorizationGetSample.js][brokerauthorizationgetsample] | get a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json | -| [brokerAuthorizationListByResourceGroupSample.js][brokerauthorizationlistbyresourcegroupsample] | list BrokerAuthorizationResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerCreateOrUpdateSample.js][brokercreateorupdatesample] | create a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json | -| [brokerDeleteSample.js][brokerdeletesample] | delete a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json | -| [brokerGetSample.js][brokergetsample] | get a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json | -| [brokerListByResourceGroupSample.js][brokerlistbyresourcegroupsample] | list BrokerResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerListenerCreateOrUpdateSample.js][brokerlistenercreateorupdatesample] | create a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json | -| [brokerListenerDeleteSample.js][brokerlistenerdeletesample] | delete a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json | -| [brokerListenerGetSample.js][brokerlistenergetsample] | get a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json | -| [brokerListenerListByResourceGroupSample.js][brokerlistenerlistbyresourcegroupsample] | list BrokerListenerResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowCreateOrUpdateSample.js][dataflowcreateorupdatesample] | create a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json | -| [dataflowDeleteSample.js][dataflowdeletesample] | delete a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json | -| [dataflowEndpointCreateOrUpdateSample.js][dataflowendpointcreateorupdatesample] | create a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json | -| [dataflowEndpointDeleteSample.js][dataflowendpointdeletesample] | delete a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json | -| [dataflowEndpointGetSample.js][dataflowendpointgetsample] | get a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json | -| [dataflowEndpointListByResourceGroupSample.js][dataflowendpointlistbyresourcegroupsample] | list DataflowEndpointResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowGetSample.js][dataflowgetsample] | get a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json | -| [dataflowListByResourceGroupSample.js][dataflowlistbyresourcegroupsample] | list DataflowResource resources by DataflowProfileResource x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json | -| [dataflowProfileCreateOrUpdateSample.js][dataflowprofilecreateorupdatesample] | create a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json | -| [dataflowProfileDeleteSample.js][dataflowprofiledeletesample] | delete a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json | -| [dataflowProfileGetSample.js][dataflowprofilegetsample] | get a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json | -| [dataflowProfileListByResourceGroupSample.js][dataflowprofilelistbyresourcegroupsample] | list DataflowProfileResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceCreateOrUpdateSample.js][instancecreateorupdatesample] | create a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json | -| [instanceDeleteSample.js][instancedeletesample] | delete a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json | -| [instanceGetSample.js][instancegetsample] | get a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json | -| [instanceListByResourceGroupSample.js][instancelistbyresourcegroupsample] | list InstanceResource resources by resource group x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceListBySubscriptionSample.js][instancelistbysubscriptionsample] | list InstanceResource resources by subscription ID x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json | -| [instanceUpdateSample.js][instanceupdatesample] | update a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json | -| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json | +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [brokerAuthenticationCreateOrUpdateSample.js][brokerauthenticationcreateorupdatesample] | create a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json | +| [brokerAuthenticationDeleteSample.js][brokerauthenticationdeletesample] | delete a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json | +| [brokerAuthenticationGetSample.js][brokerauthenticationgetsample] | get a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json | +| [brokerAuthenticationListByResourceGroupSample.js][brokerauthenticationlistbyresourcegroupsample] | list BrokerAuthenticationResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json | +| [brokerAuthorizationCreateOrUpdateSample.js][brokerauthorizationcreateorupdatesample] | create a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json | +| [brokerAuthorizationDeleteSample.js][brokerauthorizationdeletesample] | delete a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json | +| [brokerAuthorizationGetSample.js][brokerauthorizationgetsample] | get a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json | +| [brokerAuthorizationListByResourceGroupSample.js][brokerauthorizationlistbyresourcegroupsample] | list BrokerAuthorizationResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json | +| [brokerCreateOrUpdateSample.js][brokercreateorupdatesample] | create a BrokerResource x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Complex.json | +| [brokerDeleteSample.js][brokerdeletesample] | delete a BrokerResource x-ms-original-file: 2024-11-01/Broker_Delete_MaximumSet_Gen.json | +| [brokerGetSample.js][brokergetsample] | get a BrokerResource x-ms-original-file: 2024-11-01/Broker_Get_MaximumSet_Gen.json | +| [brokerListByResourceGroupSample.js][brokerlistbyresourcegroupsample] | list BrokerResource resources by InstanceResource x-ms-original-file: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json | +| [brokerListenerCreateOrUpdateSample.js][brokerlistenercreateorupdatesample] | create a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json | +| [brokerListenerDeleteSample.js][brokerlistenerdeletesample] | delete a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json | +| [brokerListenerGetSample.js][brokerlistenergetsample] | get a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json | +| [brokerListenerListByResourceGroupSample.js][brokerlistenerlistbyresourcegroupsample] | list BrokerListenerResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json | +| [dataflowCreateOrUpdateSample.js][dataflowcreateorupdatesample] | create a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json | +| [dataflowDeleteSample.js][dataflowdeletesample] | delete a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json | +| [dataflowEndpointCreateOrUpdateSample.js][dataflowendpointcreateorupdatesample] | create a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json | +| [dataflowEndpointDeleteSample.js][dataflowendpointdeletesample] | delete a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json | +| [dataflowEndpointGetSample.js][dataflowendpointgetsample] | get a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json | +| [dataflowEndpointListByResourceGroupSample.js][dataflowendpointlistbyresourcegroupsample] | list DataflowEndpointResource resources by InstanceResource x-ms-original-file: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json | +| [dataflowGetSample.js][dataflowgetsample] | get a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json | +| [dataflowListByResourceGroupSample.js][dataflowlistbyresourcegroupsample] | list DataflowResource resources by DataflowProfileResource x-ms-original-file: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json | +| [dataflowProfileCreateOrUpdateSample.js][dataflowprofilecreateorupdatesample] | create a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json | +| [dataflowProfileDeleteSample.js][dataflowprofiledeletesample] | delete a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json | +| [dataflowProfileGetSample.js][dataflowprofilegetsample] | get a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json | +| [dataflowProfileListByResourceGroupSample.js][dataflowprofilelistbyresourcegroupsample] | list DataflowProfileResource resources by InstanceResource x-ms-original-file: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json | +| [instanceCreateOrUpdateSample.js][instancecreateorupdatesample] | create a InstanceResource x-ms-original-file: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json | +| [instanceDeleteSample.js][instancedeletesample] | delete a InstanceResource x-ms-original-file: 2024-11-01/Instance_Delete_MaximumSet_Gen.json | +| [instanceGetSample.js][instancegetsample] | get a InstanceResource x-ms-original-file: 2024-11-01/Instance_Get_MaximumSet_Gen.json | +| [instanceListByResourceGroupSample.js][instancelistbyresourcegroupsample] | list InstanceResource resources by resource group x-ms-original-file: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json | +| [instanceListBySubscriptionSample.js][instancelistbysubscriptionsample] | list InstanceResource resources by subscription ID x-ms-original-file: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json | +| [instanceUpdateSample.js][instanceupdatesample] | update a InstanceResource x-ms-original-file: 2024-11-01/Instance_Update_MaximumSet_Gen.json | +| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-11-01/Operations_List_MaximumSet_Gen.json | ## Prerequisites diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationCreateOrUpdateSample.js index cc535b26acfc..3c7ccb152bbf 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationCreateOrUpdateSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create a BrokerAuthenticationResource * * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json */ async function brokerAuthenticationCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -61,7 +61,7 @@ async function brokerAuthenticationCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerAuthenticationResource * * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerAuthenticationCreateOrUpdate() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationDeleteSample.js index 23cd35ad0e48..24b8233734f5 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationDeleteSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a BrokerAuthenticationResource * * @summary delete a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json */ async function brokerAuthenticationDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationGetSample.js index 94ab8de1a832..c674a94ee3ef 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationGetSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a BrokerAuthenticationResource * * @summary get a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json */ async function brokerAuthenticationGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationListByResourceGroupSample.js index 6c55c8e605a0..54bd91ed0074 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationListByResourceGroupSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthenticationListByResourceGroupSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list BrokerAuthenticationResource resources by BrokerResource * * @summary list BrokerAuthenticationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerAuthenticationListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationCreateOrUpdateSample.js index 34ad11ce7bd5..fd1a80964da5 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationCreateOrUpdateSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create a BrokerAuthorizationResource * * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json */ async function brokerAuthorizationCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -79,7 +79,7 @@ async function brokerAuthorizationCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerAuthorizationResource * * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerAuthorizationCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -126,7 +126,7 @@ async function brokerAuthorizationCreateOrUpdate() { * This sample demonstrates how to create a BrokerAuthorizationResource * * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Simple.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Simple.json */ async function brokerAuthorizationCreateOrUpdateSimple() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationDeleteSample.js index 8b7a3027a5a6..6d4c34b263e1 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationDeleteSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a BrokerAuthorizationResource * * @summary delete a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json */ async function brokerAuthorizationDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationGetSample.js index e9b1f55328fc..7850ad3a0c76 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationGetSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a BrokerAuthorizationResource * * @summary get a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json */ async function brokerAuthorizationGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationListByResourceGroupSample.js index 54ff1c26ba2e..3630ca26d500 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationListByResourceGroupSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerAuthorizationListByResourceGroupSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list BrokerAuthorizationResource resources by BrokerResource * * @summary list BrokerAuthorizationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerAuthorizationListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerCreateOrUpdateSample.js index a18f18a38eba..56a6fb2121cc 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerCreateOrUpdateSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Complex.json */ async function brokerCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -41,7 +41,7 @@ async function brokerCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -169,7 +169,7 @@ async function brokerCreateOrUpdate() { * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Minimal.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Minimal.json */ async function brokerCreateOrUpdateMinimal() { const credential = new DefaultAzureCredential(); @@ -194,7 +194,7 @@ async function brokerCreateOrUpdateMinimal() { * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Simple.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Simple.json */ async function brokerCreateOrUpdateSimple() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerDeleteSample.js index be890262e422..e39b19518750 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerDeleteSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a BrokerResource * * @summary delete a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_Delete_MaximumSet_Gen.json */ async function brokerDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerGetSample.js index 36b0b1cf69f7..40225285deb9 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerGetSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a BrokerResource * * @summary get a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_Get_MaximumSet_Gen.json */ async function brokerGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListByResourceGroupSample.js index 39e8dcb6b09c..bc80d62cc698 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListByResourceGroupSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListByResourceGroupSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list BrokerResource resources by InstanceResource * * @summary list BrokerResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerCreateOrUpdateSample.js index 4a954e4d345a..2437df79757b 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerCreateOrUpdateSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create a BrokerListenerResource * * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json */ async function brokerListenerCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -64,7 +64,7 @@ async function brokerListenerCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerListenerResource * * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerListenerCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -121,7 +121,7 @@ async function brokerListenerCreateOrUpdate() { * This sample demonstrates how to create a BrokerListenerResource * * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Simple.json + * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Simple.json */ async function brokerListenerCreateOrUpdateSimple() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerDeleteSample.js index f0a555f6fd12..82cb72a25c9c 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerDeleteSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a BrokerListenerResource * * @summary delete a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json */ async function brokerListenerDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerGetSample.js index ec8470394016..cbc2dae72a3b 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerGetSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a BrokerListenerResource * * @summary get a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json */ async function brokerListenerGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerListByResourceGroupSample.js index 7c47d69afcac..c415d3d97d05 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerListByResourceGroupSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/brokerListenerListByResourceGroupSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list BrokerListenerResource resources by BrokerResource * * @summary list BrokerListenerResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerListenerListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowCreateOrUpdateSample.js index ff45541bb6e0..d0558c09f927 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowCreateOrUpdateSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json */ async function dataflowCreateOrUpdateComplexContextualization() { const credential = new DefaultAzureCredential(); @@ -71,7 +71,7 @@ async function dataflowCreateOrUpdateComplexContextualization() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexEventHub.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexEventHub.json */ async function dataflowCreateOrUpdateComplexEventHub() { const credential = new DefaultAzureCredential(); @@ -157,7 +157,7 @@ async function dataflowCreateOrUpdateComplexEventHub() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_FilterToTopic.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_FilterToTopic.json */ async function dataflowCreateOrUpdateFilterToTopic() { const credential = new DefaultAzureCredential(); @@ -218,7 +218,7 @@ async function dataflowCreateOrUpdateFilterToTopic() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json */ async function dataflowCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -293,7 +293,7 @@ async function dataflowCreateOrUpdate() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleEventGrid.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json */ async function dataflowCreateOrUpdateSimpleEventGrid() { const credential = new DefaultAzureCredential(); @@ -339,7 +339,7 @@ async function dataflowCreateOrUpdateSimpleEventGrid() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleFabric.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_SimpleFabric.json */ async function dataflowCreateOrUpdateSimpleFabric() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowDeleteSample.js index e9663d02fb77..e434ee976606 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowDeleteSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a DataflowResource * * @summary delete a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json */ async function dataflowDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointCreateOrUpdateSample.js index c10e481b1229..6733044d8070 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointCreateOrUpdateSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json */ async function dataflowEndpointCreateOrUpdateADLSv2() { const credential = new DefaultAzureCredential(); @@ -42,7 +42,7 @@ async function dataflowEndpointCreateOrUpdateADLSv2() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADX.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json */ async function dataflowEndpointCreateOrUpdateAdx() { const credential = new DefaultAzureCredential(); @@ -78,7 +78,7 @@ async function dataflowEndpointCreateOrUpdateAdx() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_AIO.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json */ async function dataflowEndpointCreateOrUpdateAio() { const credential = new DefaultAzureCredential(); @@ -116,7 +116,7 @@ async function dataflowEndpointCreateOrUpdateAio() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventGrid.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json */ async function dataflowEndpointCreateOrUpdateEventGrid() { const credential = new DefaultAzureCredential(); @@ -151,7 +151,7 @@ async function dataflowEndpointCreateOrUpdateEventGrid() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventHub.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json */ async function dataflowEndpointCreateOrUpdateEventHub() { const credential = new DefaultAzureCredential(); @@ -187,7 +187,7 @@ async function dataflowEndpointCreateOrUpdateEventHub() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Fabric.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json */ async function dataflowEndpointCreateOrUpdateFabric() { const credential = new DefaultAzureCredential(); @@ -226,7 +226,7 @@ async function dataflowEndpointCreateOrUpdateFabric() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Kafka.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json */ async function dataflowEndpointCreateOrUpdateKafka() { const credential = new DefaultAzureCredential(); @@ -276,7 +276,7 @@ async function dataflowEndpointCreateOrUpdateKafka() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_LocalStorage.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json */ async function dataflowEndpointCreateOrUpdateLocalStorage() { const credential = new DefaultAzureCredential(); @@ -304,7 +304,7 @@ async function dataflowEndpointCreateOrUpdateLocalStorage() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json */ async function dataflowEndpointCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -442,7 +442,7 @@ async function dataflowEndpointCreateOrUpdate() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MQTT.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json */ async function dataflowEndpointCreateOrUpdateMqtt() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointDeleteSample.js index 944134ca91a5..0519bd24f754 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointDeleteSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a DataflowEndpointResource * * @summary delete a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json */ async function dataflowEndpointDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointGetSample.js index 924a49147874..1c8d1482bc0a 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointGetSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a DataflowEndpointResource * * @summary get a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json */ async function dataflowEndpointGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointListByResourceGroupSample.js index 6b9bf7b529dd..4a833b099298 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointListByResourceGroupSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowEndpointListByResourceGroupSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list DataflowEndpointResource resources by InstanceResource * * @summary list DataflowEndpointResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json */ async function dataflowEndpointListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowGetSample.js index d500c418a469..0ef5cb112543 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowGetSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a DataflowResource * * @summary get a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json */ async function dataflowGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowListByResourceGroupSample.js index 9bda1a8f3ad8..eaf83c379800 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowListByResourceGroupSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowListByResourceGroupSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list DataflowResource resources by DataflowProfileResource * * @summary list DataflowResource resources by DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json */ async function dataflowListByProfileResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileCreateOrUpdateSample.js index 26223d4884c9..a5c41183d0f9 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileCreateOrUpdateSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create a DataflowProfileResource * * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json */ async function dataflowProfileCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -39,7 +39,7 @@ async function dataflowProfileCreateOrUpdate() { * This sample demonstrates how to create a DataflowProfileResource * * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Minimal.json + * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json */ async function dataflowProfileCreateOrUpdateMinimal() { const credential = new DefaultAzureCredential(); @@ -64,7 +64,7 @@ async function dataflowProfileCreateOrUpdateMinimal() { * This sample demonstrates how to create a DataflowProfileResource * * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Multi.json + * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json */ async function dataflowProfileCreateOrUpdateMulti() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileDeleteSample.js index f047f97ca2c8..2881339a7e2a 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileDeleteSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a DataflowProfileResource * * @summary delete a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json */ async function dataflowProfileDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileGetSample.js index 07a39324ba26..c35c23d0df43 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileGetSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a DataflowProfileResource * * @summary get a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json */ async function dataflowProfileGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileListByResourceGroupSample.js index 1090f69da6ac..fddcaf3fdd7c 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileListByResourceGroupSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/dataflowProfileListByResourceGroupSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list DataflowProfileResource resources by InstanceResource * * @summary list DataflowProfileResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json */ async function dataflowProfileListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceCreateOrUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceCreateOrUpdateSample.js index b3207b17c463..ca5549cc8293 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceCreateOrUpdateSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create a InstanceResource * * @summary create a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json */ async function instanceCreateOrUpdate() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceDeleteSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceDeleteSample.js index e7046a167f39..f62de92aae5b 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceDeleteSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a InstanceResource * * @summary delete a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_Delete_MaximumSet_Gen.json */ async function instanceDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceGetSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceGetSample.js index 3ccd7824916f..45b8230e1d5b 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceGetSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a InstanceResource * * @summary get a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_Get_MaximumSet_Gen.json */ async function instanceGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListByResourceGroupSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListByResourceGroupSample.js index 469640261009..4fd3c8c8c4ce 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListByResourceGroupSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListByResourceGroupSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list InstanceResource resources by resource group * * @summary list InstanceResource resources by resource group - * x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json */ async function instanceListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListBySubscriptionSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListBySubscriptionSample.js index 788535f4044c..2c67f60a7759 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListBySubscriptionSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceListBySubscriptionSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list InstanceResource resources by subscription ID * * @summary list InstanceResource resources by subscription ID - * x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json */ async function instanceListBySubscription() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceUpdateSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceUpdateSample.js index a82761fa5fa1..3cbc7a6440ad 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceUpdateSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/instanceUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to update a InstanceResource * * @summary update a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_Update_MaximumSet_Gen.json */ async function instanceUpdate() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/operationsListSample.js b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/operationsListSample.js index ce4e28a85081..a4e550cc403b 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/operationsListSample.js +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/javascript/operationsListSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider - * x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Operations_List_MaximumSet_Gen.json */ async function operationsList() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/README.md b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/README.md index 7ef72a9eb3cc..45ebbce7ca36 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/README.md +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/README.md @@ -2,43 +2,43 @@ These sample programs show how to use the TypeScript client libraries for @azure/arm-iotoperations in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [brokerAuthenticationCreateOrUpdateSample.ts][brokerauthenticationcreateorupdatesample] | create a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json | -| [brokerAuthenticationDeleteSample.ts][brokerauthenticationdeletesample] | delete a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json | -| [brokerAuthenticationGetSample.ts][brokerauthenticationgetsample] | get a BrokerAuthenticationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json | -| [brokerAuthenticationListByResourceGroupSample.ts][brokerauthenticationlistbyresourcegroupsample] | list BrokerAuthenticationResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerAuthorizationCreateOrUpdateSample.ts][brokerauthorizationcreateorupdatesample] | create a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json | -| [brokerAuthorizationDeleteSample.ts][brokerauthorizationdeletesample] | delete a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json | -| [brokerAuthorizationGetSample.ts][brokerauthorizationgetsample] | get a BrokerAuthorizationResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json | -| [brokerAuthorizationListByResourceGroupSample.ts][brokerauthorizationlistbyresourcegroupsample] | list BrokerAuthorizationResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerCreateOrUpdateSample.ts][brokercreateorupdatesample] | create a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json | -| [brokerDeleteSample.ts][brokerdeletesample] | delete a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json | -| [brokerGetSample.ts][brokergetsample] | get a BrokerResource x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json | -| [brokerListByResourceGroupSample.ts][brokerlistbyresourcegroupsample] | list BrokerResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json | -| [brokerListenerCreateOrUpdateSample.ts][brokerlistenercreateorupdatesample] | create a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json | -| [brokerListenerDeleteSample.ts][brokerlistenerdeletesample] | delete a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json | -| [brokerListenerGetSample.ts][brokerlistenergetsample] | get a BrokerListenerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json | -| [brokerListenerListByResourceGroupSample.ts][brokerlistenerlistbyresourcegroupsample] | list BrokerListenerResource resources by BrokerResource x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowCreateOrUpdateSample.ts][dataflowcreateorupdatesample] | create a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json | -| [dataflowDeleteSample.ts][dataflowdeletesample] | delete a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json | -| [dataflowEndpointCreateOrUpdateSample.ts][dataflowendpointcreateorupdatesample] | create a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json | -| [dataflowEndpointDeleteSample.ts][dataflowendpointdeletesample] | delete a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json | -| [dataflowEndpointGetSample.ts][dataflowendpointgetsample] | get a DataflowEndpointResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json | -| [dataflowEndpointListByResourceGroupSample.ts][dataflowendpointlistbyresourcegroupsample] | list DataflowEndpointResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json | -| [dataflowGetSample.ts][dataflowgetsample] | get a DataflowResource x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json | -| [dataflowListByResourceGroupSample.ts][dataflowlistbyresourcegroupsample] | list DataflowResource resources by DataflowProfileResource x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json | -| [dataflowProfileCreateOrUpdateSample.ts][dataflowprofilecreateorupdatesample] | create a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json | -| [dataflowProfileDeleteSample.ts][dataflowprofiledeletesample] | delete a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json | -| [dataflowProfileGetSample.ts][dataflowprofilegetsample] | get a DataflowProfileResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json | -| [dataflowProfileListByResourceGroupSample.ts][dataflowprofilelistbyresourcegroupsample] | list DataflowProfileResource resources by InstanceResource x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceCreateOrUpdateSample.ts][instancecreateorupdatesample] | create a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json | -| [instanceDeleteSample.ts][instancedeletesample] | delete a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json | -| [instanceGetSample.ts][instancegetsample] | get a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json | -| [instanceListByResourceGroupSample.ts][instancelistbyresourcegroupsample] | list InstanceResource resources by resource group x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json | -| [instanceListBySubscriptionSample.ts][instancelistbysubscriptionsample] | list InstanceResource resources by subscription ID x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json | -| [instanceUpdateSample.ts][instanceupdatesample] | update a InstanceResource x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json | -| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json | +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [brokerAuthenticationCreateOrUpdateSample.ts][brokerauthenticationcreateorupdatesample] | create a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json | +| [brokerAuthenticationDeleteSample.ts][brokerauthenticationdeletesample] | delete a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json | +| [brokerAuthenticationGetSample.ts][brokerauthenticationgetsample] | get a BrokerAuthenticationResource x-ms-original-file: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json | +| [brokerAuthenticationListByResourceGroupSample.ts][brokerauthenticationlistbyresourcegroupsample] | list BrokerAuthenticationResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json | +| [brokerAuthorizationCreateOrUpdateSample.ts][brokerauthorizationcreateorupdatesample] | create a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json | +| [brokerAuthorizationDeleteSample.ts][brokerauthorizationdeletesample] | delete a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json | +| [brokerAuthorizationGetSample.ts][brokerauthorizationgetsample] | get a BrokerAuthorizationResource x-ms-original-file: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json | +| [brokerAuthorizationListByResourceGroupSample.ts][brokerauthorizationlistbyresourcegroupsample] | list BrokerAuthorizationResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json | +| [brokerCreateOrUpdateSample.ts][brokercreateorupdatesample] | create a BrokerResource x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Complex.json | +| [brokerDeleteSample.ts][brokerdeletesample] | delete a BrokerResource x-ms-original-file: 2024-11-01/Broker_Delete_MaximumSet_Gen.json | +| [brokerGetSample.ts][brokergetsample] | get a BrokerResource x-ms-original-file: 2024-11-01/Broker_Get_MaximumSet_Gen.json | +| [brokerListByResourceGroupSample.ts][brokerlistbyresourcegroupsample] | list BrokerResource resources by InstanceResource x-ms-original-file: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json | +| [brokerListenerCreateOrUpdateSample.ts][brokerlistenercreateorupdatesample] | create a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json | +| [brokerListenerDeleteSample.ts][brokerlistenerdeletesample] | delete a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json | +| [brokerListenerGetSample.ts][brokerlistenergetsample] | get a BrokerListenerResource x-ms-original-file: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json | +| [brokerListenerListByResourceGroupSample.ts][brokerlistenerlistbyresourcegroupsample] | list BrokerListenerResource resources by BrokerResource x-ms-original-file: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json | +| [dataflowCreateOrUpdateSample.ts][dataflowcreateorupdatesample] | create a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json | +| [dataflowDeleteSample.ts][dataflowdeletesample] | delete a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json | +| [dataflowEndpointCreateOrUpdateSample.ts][dataflowendpointcreateorupdatesample] | create a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json | +| [dataflowEndpointDeleteSample.ts][dataflowendpointdeletesample] | delete a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json | +| [dataflowEndpointGetSample.ts][dataflowendpointgetsample] | get a DataflowEndpointResource x-ms-original-file: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json | +| [dataflowEndpointListByResourceGroupSample.ts][dataflowendpointlistbyresourcegroupsample] | list DataflowEndpointResource resources by InstanceResource x-ms-original-file: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json | +| [dataflowGetSample.ts][dataflowgetsample] | get a DataflowResource x-ms-original-file: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json | +| [dataflowListByResourceGroupSample.ts][dataflowlistbyresourcegroupsample] | list DataflowResource resources by DataflowProfileResource x-ms-original-file: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json | +| [dataflowProfileCreateOrUpdateSample.ts][dataflowprofilecreateorupdatesample] | create a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json | +| [dataflowProfileDeleteSample.ts][dataflowprofiledeletesample] | delete a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json | +| [dataflowProfileGetSample.ts][dataflowprofilegetsample] | get a DataflowProfileResource x-ms-original-file: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json | +| [dataflowProfileListByResourceGroupSample.ts][dataflowprofilelistbyresourcegroupsample] | list DataflowProfileResource resources by InstanceResource x-ms-original-file: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json | +| [instanceCreateOrUpdateSample.ts][instancecreateorupdatesample] | create a InstanceResource x-ms-original-file: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json | +| [instanceDeleteSample.ts][instancedeletesample] | delete a InstanceResource x-ms-original-file: 2024-11-01/Instance_Delete_MaximumSet_Gen.json | +| [instanceGetSample.ts][instancegetsample] | get a InstanceResource x-ms-original-file: 2024-11-01/Instance_Get_MaximumSet_Gen.json | +| [instanceListByResourceGroupSample.ts][instancelistbyresourcegroupsample] | list InstanceResource resources by resource group x-ms-original-file: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json | +| [instanceListBySubscriptionSample.ts][instancelistbysubscriptionsample] | list InstanceResource resources by subscription ID x-ms-original-file: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json | +| [instanceUpdateSample.ts][instanceupdatesample] | update a InstanceResource x-ms-original-file: 2024-11-01/Instance_Update_MaximumSet_Gen.json | +| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-11-01/Operations_List_MaximumSet_Gen.json | ## Prerequisites diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationCreateOrUpdateSample.ts index 260dcb130f63..2c809d5aa0e4 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a BrokerAuthenticationResource * * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json */ async function brokerAuthenticationCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -62,7 +62,7 @@ async function brokerAuthenticationCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerAuthenticationResource * * @summary create a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerAuthenticationCreateOrUpdate() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationDeleteSample.ts index 117723b9e865..4e71341a0a51 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a BrokerAuthenticationResource * * @summary delete a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json */ async function brokerAuthenticationDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationGetSample.ts index 975a99cd11bc..a4cf3bf3ebbe 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a BrokerAuthenticationResource * * @summary get a BrokerAuthenticationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json */ async function brokerAuthenticationGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationListByResourceGroupSample.ts index 2776b2a9c5b0..5c0d52b38764 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthenticationListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list BrokerAuthenticationResource resources by BrokerResource * * @summary list BrokerAuthenticationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerAuthenticationListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationCreateOrUpdateSample.ts index a0360b83eb83..443b4467d16d 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a BrokerAuthorizationResource * * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json */ async function brokerAuthorizationCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -79,7 +79,7 @@ async function brokerAuthorizationCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerAuthorizationResource * * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerAuthorizationCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -128,7 +128,7 @@ async function brokerAuthorizationCreateOrUpdate() { * This sample demonstrates how to create a BrokerAuthorizationResource * * @summary create a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Simple.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Simple.json */ async function brokerAuthorizationCreateOrUpdateSimple() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationDeleteSample.ts index 4310d24ba61d..06bfcb96e28e 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a BrokerAuthorizationResource * * @summary delete a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json */ async function brokerAuthorizationDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationGetSample.ts index 20773696e6e4..dcf8687acc1b 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a BrokerAuthorizationResource * * @summary get a BrokerAuthorizationResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json */ async function brokerAuthorizationGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationListByResourceGroupSample.ts index f698bfef8c61..3e7fac264b82 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerAuthorizationListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list BrokerAuthorizationResource resources by BrokerResource * * @summary list BrokerAuthorizationResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerAuthorizationListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerCreateOrUpdateSample.ts index 435779553db8..7f6271c9bb59 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Complex.json */ async function brokerCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -41,7 +41,7 @@ async function brokerCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -169,7 +169,7 @@ async function brokerCreateOrUpdate() { * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Minimal.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Minimal.json */ async function brokerCreateOrUpdateMinimal() { const credential = new DefaultAzureCredential(); @@ -194,7 +194,7 @@ async function brokerCreateOrUpdateMinimal() { * This sample demonstrates how to create a BrokerResource * * @summary create a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Simple.json + * x-ms-original-file: 2024-11-01/Broker_CreateOrUpdate_Simple.json */ async function brokerCreateOrUpdateSimple() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerDeleteSample.ts index ab6211b0f602..08af96be76d5 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a BrokerResource * * @summary delete a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_Delete_MaximumSet_Gen.json */ async function brokerDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerGetSample.ts index b62bd9a38914..049da701995b 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a BrokerResource * * @summary get a BrokerResource - * x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_Get_MaximumSet_Gen.json */ async function brokerGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListByResourceGroupSample.ts index 0602c6633628..efd402c78154 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list BrokerResource resources by InstanceResource * * @summary list BrokerResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerCreateOrUpdateSample.ts index 59fc9e87cffc..62289079b4a2 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a BrokerListenerResource * * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json + * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json */ async function brokerListenerCreateOrUpdateComplex() { const credential = new DefaultAzureCredential(); @@ -64,7 +64,7 @@ async function brokerListenerCreateOrUpdateComplex() { * This sample demonstrates how to create a BrokerListenerResource * * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json */ async function brokerListenerCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -121,7 +121,7 @@ async function brokerListenerCreateOrUpdate() { * This sample demonstrates how to create a BrokerListenerResource * * @summary create a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Simple.json + * x-ms-original-file: 2024-11-01/BrokerListener_CreateOrUpdate_Simple.json */ async function brokerListenerCreateOrUpdateSimple() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerDeleteSample.ts index dac6e0497872..99f8f881ef84 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a BrokerListenerResource * * @summary delete a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json */ async function brokerListenerDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerGetSample.ts index 913d755c3ea7..df5b2d64620c 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a BrokerListenerResource * * @summary get a BrokerListenerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json */ async function brokerListenerGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerListByResourceGroupSample.ts index 83062ca82430..1d8958c8f518 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/brokerListenerListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list BrokerListenerResource resources by BrokerResource * * @summary list BrokerListenerResource resources by BrokerResource - * x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json */ async function brokerListenerListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowCreateOrUpdateSample.ts index ba9c5a2e2c5f..2b5e5cd2830e 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json */ async function dataflowCreateOrUpdateComplexContextualization() { const credential = new DefaultAzureCredential(); @@ -71,7 +71,7 @@ async function dataflowCreateOrUpdateComplexContextualization() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexEventHub.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_ComplexEventHub.json */ async function dataflowCreateOrUpdateComplexEventHub() { const credential = new DefaultAzureCredential(); @@ -157,7 +157,7 @@ async function dataflowCreateOrUpdateComplexEventHub() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_FilterToTopic.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_FilterToTopic.json */ async function dataflowCreateOrUpdateFilterToTopic() { const credential = new DefaultAzureCredential(); @@ -218,7 +218,7 @@ async function dataflowCreateOrUpdateFilterToTopic() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json */ async function dataflowCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -296,7 +296,7 @@ async function dataflowCreateOrUpdate() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleEventGrid.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json */ async function dataflowCreateOrUpdateSimpleEventGrid() { const credential = new DefaultAzureCredential(); @@ -342,7 +342,7 @@ async function dataflowCreateOrUpdateSimpleEventGrid() { * This sample demonstrates how to create a DataflowResource * * @summary create a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleFabric.json + * x-ms-original-file: 2024-11-01/Dataflow_CreateOrUpdate_SimpleFabric.json */ async function dataflowCreateOrUpdateSimpleFabric() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowDeleteSample.ts index b7a7f2cc4f21..d387348fe372 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a DataflowResource * * @summary delete a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json */ async function dataflowDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointCreateOrUpdateSample.ts index 496c8c729fbc..ec2dca32c36d 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json */ async function dataflowEndpointCreateOrUpdateADLSv2() { const credential = new DefaultAzureCredential(); @@ -42,7 +42,7 @@ async function dataflowEndpointCreateOrUpdateADLSv2() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADX.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json */ async function dataflowEndpointCreateOrUpdateAdx() { const credential = new DefaultAzureCredential(); @@ -78,7 +78,7 @@ async function dataflowEndpointCreateOrUpdateAdx() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_AIO.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json */ async function dataflowEndpointCreateOrUpdateAio() { const credential = new DefaultAzureCredential(); @@ -116,7 +116,7 @@ async function dataflowEndpointCreateOrUpdateAio() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventGrid.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json */ async function dataflowEndpointCreateOrUpdateEventGrid() { const credential = new DefaultAzureCredential(); @@ -151,7 +151,7 @@ async function dataflowEndpointCreateOrUpdateEventGrid() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventHub.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json */ async function dataflowEndpointCreateOrUpdateEventHub() { const credential = new DefaultAzureCredential(); @@ -187,7 +187,7 @@ async function dataflowEndpointCreateOrUpdateEventHub() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Fabric.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json */ async function dataflowEndpointCreateOrUpdateFabric() { const credential = new DefaultAzureCredential(); @@ -226,7 +226,7 @@ async function dataflowEndpointCreateOrUpdateFabric() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Kafka.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json */ async function dataflowEndpointCreateOrUpdateKafka() { const credential = new DefaultAzureCredential(); @@ -276,7 +276,7 @@ async function dataflowEndpointCreateOrUpdateKafka() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_LocalStorage.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json */ async function dataflowEndpointCreateOrUpdateLocalStorage() { const credential = new DefaultAzureCredential(); @@ -304,7 +304,7 @@ async function dataflowEndpointCreateOrUpdateLocalStorage() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json */ async function dataflowEndpointCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -442,7 +442,7 @@ async function dataflowEndpointCreateOrUpdate() { * This sample demonstrates how to create a DataflowEndpointResource * * @summary create a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MQTT.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json */ async function dataflowEndpointCreateOrUpdateMqtt() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointDeleteSample.ts index 3db84ba8a3b1..c07525bfde64 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a DataflowEndpointResource * * @summary delete a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json */ async function dataflowEndpointDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointGetSample.ts index 4c190c182817..d4485d0a45fa 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a DataflowEndpointResource * * @summary get a DataflowEndpointResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json */ async function dataflowEndpointGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointListByResourceGroupSample.ts index 6fc39edc7eae..2630477396a1 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowEndpointListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list DataflowEndpointResource resources by InstanceResource * * @summary list DataflowEndpointResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json */ async function dataflowEndpointListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowGetSample.ts index 638dd886833a..b9205d952e0f 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a DataflowResource * * @summary get a DataflowResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json */ async function dataflowGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowListByResourceGroupSample.ts index 3de53e08bbfb..2ebcaf4cc063 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list DataflowResource resources by DataflowProfileResource * * @summary list DataflowResource resources by DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json */ async function dataflowListByProfileResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileCreateOrUpdateSample.ts index b751287bfa0a..b2c1e260eacf 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a DataflowProfileResource * * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json */ async function dataflowProfileCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -39,7 +39,7 @@ async function dataflowProfileCreateOrUpdate() { * This sample demonstrates how to create a DataflowProfileResource * * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Minimal.json + * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json */ async function dataflowProfileCreateOrUpdateMinimal() { const credential = new DefaultAzureCredential(); @@ -64,7 +64,7 @@ async function dataflowProfileCreateOrUpdateMinimal() { * This sample demonstrates how to create a DataflowProfileResource * * @summary create a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Multi.json + * x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json */ async function dataflowProfileCreateOrUpdateMulti() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileDeleteSample.ts index 5c1d2a2ee2f2..933513d53bf8 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a DataflowProfileResource * * @summary delete a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json */ async function dataflowProfileDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileGetSample.ts index 3f1c0cd20e95..0a3cf1144d43 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a DataflowProfileResource * * @summary get a DataflowProfileResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json */ async function dataflowProfileGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileListByResourceGroupSample.ts index e1c996594bf5..feb1635f6424 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/dataflowProfileListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list DataflowProfileResource resources by InstanceResource * * @summary list DataflowProfileResource resources by InstanceResource - * x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json */ async function dataflowProfileListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceCreateOrUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceCreateOrUpdateSample.ts index 81d732fd63dd..c7e84d607149 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceCreateOrUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a InstanceResource * * @summary create a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json */ async function instanceCreateOrUpdate() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceDeleteSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceDeleteSample.ts index 685dbe899f1a..c9a75bb25bfe 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceDeleteSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a InstanceResource * * @summary delete a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_Delete_MaximumSet_Gen.json */ async function instanceDelete() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceGetSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceGetSample.ts index 76be3cc0966c..56e47e466241 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceGetSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a InstanceResource * * @summary get a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_Get_MaximumSet_Gen.json */ async function instanceGet() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListByResourceGroupSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListByResourceGroupSample.ts index 497ccc06003f..973714b871df 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListByResourceGroupSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list InstanceResource resources by resource group * * @summary list InstanceResource resources by resource group - * x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json */ async function instanceListByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListBySubscriptionSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListBySubscriptionSample.ts index 5c5fc9a85986..e5b6c7ad3aa2 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListBySubscriptionSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceListBySubscriptionSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list InstanceResource resources by subscription ID * * @summary list InstanceResource resources by subscription ID - * x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json */ async function instanceListBySubscription() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceUpdateSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceUpdateSample.ts index 518836b3f8e1..cf8bc5281454 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceUpdateSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/instanceUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to update a InstanceResource * * @summary update a InstanceResource - * x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Instance_Update_MaximumSet_Gen.json */ async function instanceUpdate() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/operationsListSample.ts index 9b918368ddd9..7a542300f439 100644 --- a/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/iotoperations/arm-iotoperations/samples/v1-beta/typescript/src/operationsListSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider - * x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-01/Operations_List_MaximumSet_Gen.json */ async function operationsList() { const credential = new DefaultAzureCredential(); diff --git a/sdk/iotoperations/arm-iotoperations/src/api/broker/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/broker/index.ts index 5697f1ca3a56..5e9d3c951f69 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/broker/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/broker/index.ts @@ -15,11 +15,11 @@ import { _BrokerResourceListResult, _brokerResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts index 636bd17411cb..2366b90d2801 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthentication/index.ts @@ -15,11 +15,11 @@ import { _BrokerAuthenticationResourceListResult, _brokerAuthenticationResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts index 1f501bb37059..3b881e1ea998 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/brokerAuthorization/index.ts @@ -15,11 +15,11 @@ import { _BrokerAuthorizationResourceListResult, _brokerAuthorizationResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts index 204480f1b6b1..30186d1b7d74 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/brokerListener/index.ts @@ -15,11 +15,11 @@ import { _BrokerListenerResourceListResult, _brokerListenerResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts index d0edba7d3f33..df01cd457b54 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/dataflow/index.ts @@ -15,11 +15,11 @@ import { _DataflowResourceListResult, _dataflowResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts index c25a3791af67..dfc6de5775c0 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/dataflowEndpoint/index.ts @@ -15,11 +15,11 @@ import { _DataflowEndpointResourceListResult, _dataflowEndpointResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts index 9660c8089ede..6832042eb92c 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/dataflowProfile/index.ts @@ -15,11 +15,11 @@ import { _DataflowProfileResourceListResult, _dataflowProfileResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts b/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts index 777521d3c37a..14d6a5cd9860 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/instance/index.ts @@ -19,11 +19,11 @@ import { _InstanceResourceListResult, _instanceResourceListResultDeserializer, } from "../../models/models.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { PagedAsyncIterableIterator, buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; import { StreamableMethod, PathUncheckedResponse, diff --git a/sdk/iotoperations/arm-iotoperations/src/api/ioTOperationsContext.ts b/sdk/iotoperations/arm-iotoperations/src/api/ioTOperationsContext.ts index 7481927f7280..6fb0f66aae57 100644 --- a/sdk/iotoperations/arm-iotoperations/src/api/ioTOperationsContext.ts +++ b/sdk/iotoperations/arm-iotoperations/src/api/ioTOperationsContext.ts @@ -2,6 +2,7 @@ // Licensed under the MIT License. import { logger } from "../logger.js"; +import { KnownVersions } from "../models/models.js"; import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; import { TokenCredential } from "@azure/core-auth"; @@ -11,6 +12,7 @@ export interface IoTOperationsContext extends Client {} /** Optional parameters for the client. */ export interface IoTOperationsClientOptionalParams extends ClientOptions { /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ apiVersion?: string; } @@ -20,9 +22,8 @@ export function createIoTOperations( options: IoTOperationsClientOptionalParams = {}, ): IoTOperationsContext { const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; - const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; - const userAgentInfo = `azsdk-js-arm-iotoperations/1.0.0-beta.2`; + const userAgentInfo = `azsdk-js-arm-iotoperations/1.0.0`; const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` : `azsdk-js-api ${userAgentInfo}`; @@ -36,7 +37,7 @@ export function createIoTOperations( }; const clientContext = getClient(endpointUrl, credential, updatedOptions); clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); - const apiVersion = options.apiVersion ?? "2024-09-15-preview"; + const apiVersion = options.apiVersion ?? "2024-11-01"; clientContext.pipeline.addPolicy({ name: "ClientApiVersionPolicy", sendRequest: (req, next) => { diff --git a/sdk/iotoperations/arm-iotoperations/src/index.ts b/sdk/iotoperations/arm-iotoperations/src/index.ts index 59e129c7c0c7..9fc2984da58f 100644 --- a/sdk/iotoperations/arm-iotoperations/src/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/index.ts @@ -16,33 +16,27 @@ export { EndpointType, DataflowEndpointDataExplorer, DataflowEndpointDataExplorerAuthentication, + KnownDataExplorerAuthMethod, DataExplorerAuthMethod, - KnownManagedIdentityMethod, - ManagedIdentityMethod, DataflowEndpointAuthenticationSystemAssignedManagedIdentity, DataflowEndpointAuthenticationUserAssignedManagedIdentity, BatchingConfiguration, DataflowEndpointDataLakeStorage, DataflowEndpointDataLakeStorageAuthentication, + KnownDataLakeStorageAuthMethod, DataLakeStorageAuthMethod, - KnownAccessTokenMethod, - AccessTokenMethod, DataflowEndpointAuthenticationAccessToken, DataflowEndpointFabricOneLake, DataflowEndpointFabricOneLakeAuthentication, + KnownFabricOneLakeAuthMethod, FabricOneLakeAuthMethod, DataflowEndpointFabricOneLakeNames, KnownDataflowEndpointFabricPathType, DataflowEndpointFabricPathType, DataflowEndpointKafka, DataflowEndpointKafkaAuthentication, + KnownKafkaAuthMethod, KafkaAuthMethod, - KnownSaslMethod, - SaslMethod, - KnownX509CertificateMethod, - X509CertificateMethod, - KnownAnonymousMethod, - AnonymousMethod, DataflowEndpointAuthenticationSasl, KnownDataflowEndpointAuthenticationSaslType, DataflowEndpointAuthenticationSaslType, @@ -62,16 +56,15 @@ export { DataflowEndpointLocalStorage, DataflowEndpointMqtt, DataflowEndpointMqttAuthentication, + KnownMqttAuthMethod, MqttAuthMethod, - KnownServiceAccountTokenMethod, - ServiceAccountTokenMethod, DataflowEndpointAuthenticationServiceAccountToken, KnownBrokerProtocolType, BrokerProtocolType, KnownMqttRetainType, MqttRetainType, - ProvisioningState, KnownProvisioningState, + ProvisioningState, ExtendedLocation, KnownExtendedLocationType, ExtendedLocationType, @@ -188,6 +181,7 @@ export { Origin, KnownActionType, ActionType, + KnownVersions, } from "./models/index.js"; export { IoTOperationsClientOptionalParams, diff --git a/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts b/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts index 9b381c8dd3cb..48fc9cb13269 100644 --- a/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts +++ b/sdk/iotoperations/arm-iotoperations/src/ioTOperationsClient.ts @@ -49,7 +49,7 @@ export class IoTOperationsClient { const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-client` - : "azsdk-js-client"; + : `azsdk-js-client`; this._client = createIoTOperations(credential, { ...options, userAgentOptions: { userAgentPrefix }, diff --git a/sdk/iotoperations/arm-iotoperations/src/models/index.ts b/sdk/iotoperations/arm-iotoperations/src/models/index.ts index bb7545d4fcff..9329a0004e89 100644 --- a/sdk/iotoperations/arm-iotoperations/src/models/index.ts +++ b/sdk/iotoperations/arm-iotoperations/src/models/index.ts @@ -8,33 +8,27 @@ export { EndpointType, DataflowEndpointDataExplorer, DataflowEndpointDataExplorerAuthentication, + KnownDataExplorerAuthMethod, DataExplorerAuthMethod, - KnownManagedIdentityMethod, - ManagedIdentityMethod, DataflowEndpointAuthenticationSystemAssignedManagedIdentity, DataflowEndpointAuthenticationUserAssignedManagedIdentity, BatchingConfiguration, DataflowEndpointDataLakeStorage, DataflowEndpointDataLakeStorageAuthentication, + KnownDataLakeStorageAuthMethod, DataLakeStorageAuthMethod, - KnownAccessTokenMethod, - AccessTokenMethod, DataflowEndpointAuthenticationAccessToken, DataflowEndpointFabricOneLake, DataflowEndpointFabricOneLakeAuthentication, + KnownFabricOneLakeAuthMethod, FabricOneLakeAuthMethod, DataflowEndpointFabricOneLakeNames, KnownDataflowEndpointFabricPathType, DataflowEndpointFabricPathType, DataflowEndpointKafka, DataflowEndpointKafkaAuthentication, + KnownKafkaAuthMethod, KafkaAuthMethod, - KnownSaslMethod, - SaslMethod, - KnownX509CertificateMethod, - X509CertificateMethod, - KnownAnonymousMethod, - AnonymousMethod, DataflowEndpointAuthenticationSasl, KnownDataflowEndpointAuthenticationSaslType, DataflowEndpointAuthenticationSaslType, @@ -54,16 +48,15 @@ export { DataflowEndpointLocalStorage, DataflowEndpointMqtt, DataflowEndpointMqttAuthentication, + KnownMqttAuthMethod, MqttAuthMethod, - KnownServiceAccountTokenMethod, - ServiceAccountTokenMethod, DataflowEndpointAuthenticationServiceAccountToken, KnownBrokerProtocolType, BrokerProtocolType, KnownMqttRetainType, MqttRetainType, - ProvisioningState, KnownProvisioningState, + ProvisioningState, ExtendedLocation, KnownExtendedLocationType, ExtendedLocationType, @@ -180,4 +173,5 @@ export { Origin, KnownActionType, ActionType, + KnownVersions, } from "./models.js"; diff --git a/sdk/iotoperations/arm-iotoperations/src/models/models.ts b/sdk/iotoperations/arm-iotoperations/src/models/models.ts index 8a3c26dc54f5..201dbb62822d 100644 --- a/sdk/iotoperations/arm-iotoperations/src/models/models.ts +++ b/sdk/iotoperations/arm-iotoperations/src/models/models.ts @@ -98,9 +98,7 @@ export function dataflowEndpointPropertiesDeserializer(item: any): DataflowEndpo mqttSettings: !item["mqttSettings"] ? item["mqttSettings"] : dataflowEndpointMqttDeserializer(item["mqttSettings"]), - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } @@ -182,7 +180,7 @@ export function dataflowEndpointDataExplorerAuthenticationSerializer( item: DataflowEndpointDataExplorerAuthentication, ): any { return { - method: dataExplorerAuthMethodSerializer(item["method"]), + method: item["method"], systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( @@ -200,7 +198,7 @@ export function dataflowEndpointDataExplorerAuthenticationDeserializer( item: any, ): DataflowEndpointDataExplorerAuthentication { return { - method: dataExplorerAuthMethodDeserializer(item["method"]), + method: item["method"], systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( @@ -214,19 +212,8 @@ export function dataflowEndpointDataExplorerAuthenticationDeserializer( }; } -/** Alias for DataExplorerAuthMethod */ -export type DataExplorerAuthMethod = ManagedIdentityMethod; - -export function dataExplorerAuthMethodSerializer(item: DataExplorerAuthMethod): any { - return item; -} - -export function dataExplorerAuthMethodDeserializer(item: any): DataExplorerAuthMethod { - return item; -} - -/** Managed Identity Method */ -export enum KnownManagedIdentityMethod { +/** DataflowEndpoint Data Explorer Authentication Method properties */ +export enum KnownDataExplorerAuthMethod { /** SystemAssignedManagedIdentity type */ SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", /** UserAssignedManagedIdentity type */ @@ -234,14 +221,14 @@ export enum KnownManagedIdentityMethod { } /** - * Managed Identity Method \ - * {@link KnownManagedIdentityMethod} can be used interchangeably with ManagedIdentityMethod, + * DataflowEndpoint Data Explorer Authentication Method properties \ + * {@link KnownDataExplorerAuthMethod} can be used interchangeably with DataExplorerAuthMethod, * this enum contains the known values that the service supports. * ### Known values supported by the service * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type */ -export type ManagedIdentityMethod = string; +export type DataExplorerAuthMethod = string; /** DataflowEndpoint Authentication SystemAssignedManagedIdentity properties */ export interface DataflowEndpointAuthenticationSystemAssignedManagedIdentity { @@ -367,7 +354,7 @@ export function dataflowEndpointDataLakeStorageAuthenticationSerializer( item: DataflowEndpointDataLakeStorageAuthentication, ): any { return { - method: dataLakeStorageAuthMethodSerializer(item["method"]), + method: item["method"], accessTokenSettings: !item["accessTokenSettings"] ? item["accessTokenSettings"] : dataflowEndpointAuthenticationAccessTokenSerializer(item["accessTokenSettings"]), @@ -388,7 +375,7 @@ export function dataflowEndpointDataLakeStorageAuthenticationDeserializer( item: any, ): DataflowEndpointDataLakeStorageAuthentication { return { - method: dataLakeStorageAuthMethodDeserializer(item["method"]), + method: item["method"], accessTokenSettings: !item["accessTokenSettings"] ? item["accessTokenSettings"] : dataflowEndpointAuthenticationAccessTokenDeserializer(item["accessTokenSettings"]), @@ -405,31 +392,26 @@ export function dataflowEndpointDataLakeStorageAuthenticationDeserializer( }; } -/** Alias for DataLakeStorageAuthMethod */ -export type DataLakeStorageAuthMethod = ManagedIdentityMethod | AccessTokenMethod; - -export function dataLakeStorageAuthMethodSerializer(item: DataLakeStorageAuthMethod): any { - return item; -} - -export function dataLakeStorageAuthMethodDeserializer(item: any): DataLakeStorageAuthMethod { - return item; -} - -/** Access Token Method */ -export enum KnownAccessTokenMethod { +/** DataflowEndpoint Data Lake Storage Authentication Method properties */ +export enum KnownDataLakeStorageAuthMethod { + /** SystemAssignedManagedIdentity type */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** UserAssignedManagedIdentity type */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", /** AccessToken Option */ AccessToken = "AccessToken", } /** - * Access Token Method \ - * {@link KnownAccessTokenMethod} can be used interchangeably with AccessTokenMethod, + * DataflowEndpoint Data Lake Storage Authentication Method properties \ + * {@link KnownDataLakeStorageAuthMethod} can be used interchangeably with DataLakeStorageAuthMethod, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ + * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type \ * **AccessToken**: AccessToken Option */ -export type AccessTokenMethod = string; +export type DataLakeStorageAuthMethod = string; /** DataflowEndpoint Authentication Access Token properties */ export interface DataflowEndpointAuthenticationAccessToken { @@ -505,7 +487,7 @@ export function dataflowEndpointFabricOneLakeAuthenticationSerializer( item: DataflowEndpointFabricOneLakeAuthentication, ): any { return { - method: fabricOneLakeAuthMethodSerializer(item["method"]), + method: item["method"], systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( @@ -523,7 +505,7 @@ export function dataflowEndpointFabricOneLakeAuthenticationDeserializer( item: any, ): DataflowEndpointFabricOneLakeAuthentication { return { - method: fabricOneLakeAuthMethodDeserializer(item["method"]), + method: item["method"], systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( @@ -537,16 +519,23 @@ export function dataflowEndpointFabricOneLakeAuthenticationDeserializer( }; } -/** Alias for FabricOneLakeAuthMethod */ -export type FabricOneLakeAuthMethod = ManagedIdentityMethod; - -export function fabricOneLakeAuthMethodSerializer(item: FabricOneLakeAuthMethod): any { - return item; +/** DataflowEndpoint Fabric One Lake Authentication Method properties */ +export enum KnownFabricOneLakeAuthMethod { + /** SystemAssignedManagedIdentity type */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** UserAssignedManagedIdentity type */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", } -export function fabricOneLakeAuthMethodDeserializer(item: any): FabricOneLakeAuthMethod { - return item; -} +/** + * DataflowEndpoint Fabric One Lake Authentication Method properties \ + * {@link KnownFabricOneLakeAuthMethod} can be used interchangeably with FabricOneLakeAuthMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ + * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type + */ +export type FabricOneLakeAuthMethod = string; /** Microsoft Fabric endpoint Names properties */ export interface DataflowEndpointFabricOneLakeNames { @@ -668,7 +657,7 @@ export function dataflowEndpointKafkaAuthenticationSerializer( item: DataflowEndpointKafkaAuthentication, ): any { return { - method: kafkaAuthMethodSerializer(item["method"]), + method: item["method"], systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( @@ -692,7 +681,7 @@ export function dataflowEndpointKafkaAuthenticationDeserializer( item: any, ): DataflowEndpointKafkaAuthentication { return { - method: kafkaAuthMethodDeserializer(item["method"]), + method: item["method"], systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( @@ -712,65 +701,32 @@ export function dataflowEndpointKafkaAuthenticationDeserializer( }; } -/** Alias for KafkaAuthMethod */ -export type KafkaAuthMethod = - | ManagedIdentityMethod - | SaslMethod - | X509CertificateMethod - | AnonymousMethod; - -export function kafkaAuthMethodSerializer(item: KafkaAuthMethod): any { - return item; -} - -export function kafkaAuthMethodDeserializer(item: any): KafkaAuthMethod { - return item; -} - -/** Sasl Method */ -export enum KnownSaslMethod { +/** DataflowEndpoint Kafka Authentication Method properties */ +export enum KnownKafkaAuthMethod { + /** SystemAssignedManagedIdentity type */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** UserAssignedManagedIdentity type */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", /** Sasl Option */ Sasl = "Sasl", -} - -/** - * Sasl Method \ - * {@link KnownSaslMethod} can be used interchangeably with SaslMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Sasl**: Sasl Option - */ -export type SaslMethod = string; - -/** x509 Certificate Method */ -export enum KnownX509CertificateMethod { /** x509Certificate Option */ X509Certificate = "X509Certificate", -} - -/** - * x509 Certificate Method \ - * {@link Knownx509CertificateMethod} can be used interchangeably with x509CertificateMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **X509Certificate**: x509Certificate Option - */ -export type X509CertificateMethod = string; - -/** x509 Certificate Method */ -export enum KnownAnonymousMethod { /** Anonymous Option */ Anonymous = "Anonymous", } /** - * x509 Certificate Method \ - * {@link KnownAnonymousMethod} can be used interchangeably with AnonymousMethod, + * DataflowEndpoint Kafka Authentication Method properties \ + * {@link KnownKafkaAuthMethod} can be used interchangeably with KafkaAuthMethod, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ + * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type \ + * **Sasl**: Sasl Option \ + * **X509Certificate**: x509Certificate Option \ * **Anonymous**: Anonymous Option */ -export type AnonymousMethod = string; +export type KafkaAuthMethod = string; /** DataflowEndpoint Authentication Sasl properties */ export interface DataflowEndpointAuthenticationSasl { @@ -1087,7 +1043,7 @@ export function dataflowEndpointMqttAuthenticationSerializer( item: DataflowEndpointMqttAuthentication, ): any { return { - method: mqttAuthMethodSerializer(item["method"]), + method: item["method"], systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentitySerializer( @@ -1113,7 +1069,7 @@ export function dataflowEndpointMqttAuthenticationDeserializer( item: any, ): DataflowEndpointMqttAuthentication { return { - method: mqttAuthMethodDeserializer(item["method"]), + method: item["method"], systemAssignedManagedIdentitySettings: !item["systemAssignedManagedIdentitySettings"] ? item["systemAssignedManagedIdentitySettings"] : dataflowEndpointAuthenticationSystemAssignedManagedIdentityDeserializer( @@ -1135,35 +1091,32 @@ export function dataflowEndpointMqttAuthenticationDeserializer( }; } -/** Alias for MqttAuthMethod */ -export type MqttAuthMethod = - | ManagedIdentityMethod - | ServiceAccountTokenMethod - | X509CertificateMethod - | AnonymousMethod; - -export function mqttAuthMethodSerializer(item: MqttAuthMethod): any { - return item; -} - -export function mqttAuthMethodDeserializer(item: any): MqttAuthMethod { - return item; -} - -/** Service Account Token Method */ -export enum KnownServiceAccountTokenMethod { +/** DataflowEndpoint Mqtt Authentication Method properties */ +export enum KnownMqttAuthMethod { + /** SystemAssignedManagedIdentity type */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** UserAssignedManagedIdentity type */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", /** ServiceAccountToken Option */ ServiceAccountToken = "ServiceAccountToken", + /** x509Certificate Option */ + X509Certificate = "X509Certificate", + /** Anonymous Option */ + Anonymous = "Anonymous", } /** - * Service Account Token Method \ - * {@link KnownServiceAccountTokenMethod} can be used interchangeably with ServiceAccountTokenMethod, + * DataflowEndpoint Mqtt Authentication Method properties \ + * {@link KnownMqttAuthMethod} can be used interchangeably with MqttAuthMethod, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **ServiceAccountToken**: ServiceAccountToken Option + * **SystemAssignedManagedIdentity**: SystemAssignedManagedIdentity type \ + * **UserAssignedManagedIdentity**: UserAssignedManagedIdentity type \ + * **ServiceAccountToken**: ServiceAccountToken Option \ + * **X509Certificate**: x509Certificate Option \ + * **Anonymous**: Anonymous Option */ -export type ServiceAccountTokenMethod = string; +export type MqttAuthMethod = string; /** Service Account Token for BrokerAuthentication */ export interface DataflowEndpointAuthenticationServiceAccountToken { @@ -1220,7 +1173,8 @@ export enum KnownMqttRetainType { * **Never**: Never retain messages. */ export type MqttRetainType = string; -/** The provisioning state of a resource type. */ + +/** The enum defining status of resource. */ export enum KnownProvisioningState { /** Resource has been created. */ Succeeded = "Succeeded", @@ -1228,39 +1182,31 @@ export enum KnownProvisioningState { Failed = "Failed", /** Resource creation was canceled. */ Canceled = "Canceled", - /** Resource creation was provisioning. */ + /** Resource is getting provisioned. */ Provisioning = "Provisioning", - /** Resource creation was updating. */ + /** Resource is Updating. */ Updating = "Updating", - /** Resource creation was deleting. */ + /** Resource is Deleting. */ Deleting = "Deleting", - /** Resource creation was accepted. */ + /** Resource has been Accepted. */ Accepted = "Accepted", } /** - * The provisioning state of a resource type. \ - * {@link KnownProvisioningState} can be used interchangeably with ResourceProvisioningState, + * The enum defining status of resource. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Succeeded**: Resource has been created. \ * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation canceled. \ - * **Provisioning**: Resource creation provisioning. \ - * **Updating**: Resource creation updating. \ - * **Deleting**: Resource creation deleting. \ - * **Accepted**: Resource creation was accepted. + * **Canceled**: Resource creation was canceled. \ + * **Provisioning**: Resource is getting provisioned. \ + * **Updating**: Resource is Updating. \ + * **Deleting**: Resource is Deleting. \ + * **Accepted**: Resource has been Accepted. */ export type ProvisioningState = string; -export function provisioningStateSerializer(item: ProvisioningState): any { - return item; -} - -export function provisioningStateDeserializer(item: any): ProvisioningState { - return item; -} - /** Extended location is an extension of Azure locations. They provide a way to use their Azure ARC enabled Kubernetes clusters as target locations for deploying Azure services instances. */ export interface ExtendedLocation { /** The name of the extended location. */ @@ -1479,12 +1425,22 @@ export function dataflowPropertiesDeserializer(item: any): DataflowProperties { return { mode: item["mode"], operations: dataflowOperationArrayDeserializer(item["operations"]), - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } +export function dataflowOperationArraySerializer(result: Array): any[] { + return result.map((item) => { + return dataflowOperationSerializer(item); + }); +} + +export function dataflowOperationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return dataflowOperationDeserializer(item); + }); +} + /** Dataflow Operation properties. NOTE - One only method is allowed to be used for one entry. */ export interface DataflowOperation { /** Type of operation. */ @@ -1678,6 +1634,22 @@ export enum KnownTransformationSerializationFormat { */ export type TransformationSerializationFormat = string; +export function dataflowBuiltInTransformationDatasetArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return dataflowBuiltInTransformationDatasetSerializer(item); + }); +} + +export function dataflowBuiltInTransformationDatasetArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return dataflowBuiltInTransformationDatasetDeserializer(item); + }); +} + /** Dataflow BuiltIn Transformation dataset properties */ export interface DataflowBuiltInTransformationDataset { /** The key of the dataset. */ @@ -1720,19 +1692,19 @@ export function dataflowBuiltInTransformationDatasetDeserializer( }; } -export function dataflowBuiltInTransformationDatasetArraySerializer( - result: Array, +export function dataflowBuiltInTransformationFilterArraySerializer( + result: Array, ): any[] { return result.map((item) => { - return dataflowBuiltInTransformationDatasetSerializer(item); + return dataflowBuiltInTransformationFilterSerializer(item); }); } -export function dataflowBuiltInTransformationDatasetArrayDeserializer( - result: Array, +export function dataflowBuiltInTransformationFilterArrayDeserializer( + result: Array, ): any[] { return result.map((item) => { - return dataflowBuiltInTransformationDatasetDeserializer(item); + return dataflowBuiltInTransformationFilterDeserializer(item); }); } @@ -1789,19 +1761,19 @@ export enum KnownFilterType { */ export type FilterType = string; -export function dataflowBuiltInTransformationFilterArraySerializer( - result: Array, +export function dataflowBuiltInTransformationMapArraySerializer( + result: Array, ): any[] { return result.map((item) => { - return dataflowBuiltInTransformationFilterSerializer(item); + return dataflowBuiltInTransformationMapSerializer(item); }); } -export function dataflowBuiltInTransformationFilterArrayDeserializer( - result: Array, +export function dataflowBuiltInTransformationMapArrayDeserializer( + result: Array, ): any[] { return result.map((item) => { - return dataflowBuiltInTransformationFilterDeserializer(item); + return dataflowBuiltInTransformationMapDeserializer(item); }); } @@ -1874,22 +1846,6 @@ export enum KnownDataflowMappingType { */ export type DataflowMappingType = string; -export function dataflowBuiltInTransformationMapArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowBuiltInTransformationMapSerializer(item); - }); -} - -export function dataflowBuiltInTransformationMapArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return dataflowBuiltInTransformationMapDeserializer(item); - }); -} - /** Dataflow Destination Operation properties */ export interface DataflowDestinationOperationSettings { /** Reference to the Endpoint CR. Can be of Broker, Kafka, Fabric, ADLS, ADX type. */ @@ -1916,18 +1872,6 @@ export function dataflowDestinationOperationSettingsDeserializer( }; } -export function dataflowOperationArraySerializer(result: Array): any[] { - return result.map((item) => { - return dataflowOperationSerializer(item); - }); -} - -export function dataflowOperationArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return dataflowOperationDeserializer(item); - }); -} - /** The response of a DataflowResource list operation. */ export interface _DataflowResourceListResult { /** The DataflowResource items on this page */ @@ -2012,9 +1956,7 @@ export function dataflowProfilePropertiesDeserializer(item: any): DataflowProfil ? item["diagnostics"] : profileDiagnosticsDeserializer(item["diagnostics"]), instanceCount: item["instanceCount"], - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } @@ -2156,9 +2098,7 @@ export function brokerAuthorizationPropertiesDeserializer( ): BrokerAuthorizationProperties { return { authorizationPolicies: authorizationConfigDeserializer(item["authorizationPolicies"]), - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } @@ -2184,6 +2124,18 @@ export function authorizationConfigDeserializer(item: any): AuthorizationConfig }; } +export function authorizationRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return authorizationRuleSerializer(item); + }); +} + +export function authorizationRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return authorizationRuleDeserializer(item); + }); +} + /** AuthorizationConfig Rule Properties */ export interface AuthorizationRule { /** Give access to Broker methods and topics. */ @@ -2214,6 +2166,18 @@ export function authorizationRuleDeserializer(item: any): AuthorizationRule { }; } +export function brokerResourceRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return brokerResourceRuleSerializer(item); + }); +} + +export function brokerResourceRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return brokerResourceRuleDeserializer(item); + }); +} + /** Broker Resource Rule properties. This defines the objects that represent the actions or topics, such as - method.Connect, method.Publish, etc. */ export interface BrokerResourceRule { /** Give access for a Broker method (i.e., Connect, Subscribe, or Publish). */ @@ -2277,18 +2241,6 @@ export enum KnownBrokerResourceDefinitionMethods { */ export type BrokerResourceDefinitionMethods = string; -export function brokerResourceRuleArraySerializer(result: Array): any[] { - return result.map((item) => { - return brokerResourceRuleSerializer(item); - }); -} - -export function brokerResourceRuleArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return brokerResourceRuleDeserializer(item); - }); -} - /** PrincipalDefinition properties of Rule */ export interface PrincipalDefinition { /** A list of key-value pairs that match the attributes of the clients. The attributes are case-sensitive and must match the attributes provided by the clients during authentication. */ @@ -2339,6 +2291,22 @@ export function principalDefinitionDeserializer(item: any): PrincipalDefinition }; } +export function stateStoreResourceRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return stateStoreResourceRuleSerializer(item); + }); +} + +export function stateStoreResourceRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return stateStoreResourceRuleDeserializer(item); + }); +} + /** State Store Resource Rule properties. */ export interface StateStoreResourceRule { /** Allowed keyTypes pattern, string, binary. The key type used for matching, for example pattern tries to match the key to a glob-style pattern and string checks key is equal to value provided in keys. */ @@ -2411,34 +2379,6 @@ export enum KnownStateStoreResourceDefinitionMethods { */ export type StateStoreResourceDefinitionMethods = string; -export function stateStoreResourceRuleArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return stateStoreResourceRuleSerializer(item); - }); -} - -export function stateStoreResourceRuleArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return stateStoreResourceRuleDeserializer(item); - }); -} - -export function authorizationRuleArraySerializer(result: Array): any[] { - return result.map((item) => { - return authorizationRuleSerializer(item); - }); -} - -export function authorizationRuleArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return authorizationRuleDeserializer(item); - }); -} - /** The response of a BrokerAuthorizationResource list operation. */ export interface _BrokerAuthorizationResourceListResult { /** The BrokerAuthorizationResource items on this page */ @@ -2527,12 +2467,26 @@ export function brokerAuthenticationPropertiesDeserializer( authenticationMethods: brokerAuthenticatorMethodsArrayDeserializer( item["authenticationMethods"], ), - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } +export function brokerAuthenticatorMethodsArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return brokerAuthenticatorMethodsSerializer(item); + }); +} + +export function brokerAuthenticatorMethodsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return brokerAuthenticatorMethodsDeserializer(item); + }); +} + /** Set of broker authentication policies. Only one method is supported for each entry. */ export interface BrokerAuthenticatorMethods { /** Custom authentication configuration. */ @@ -2714,29 +2668,6 @@ export function brokerAuthenticatorMethodX509Deserializer( }; } -/** BrokerAuthenticatorMethodX509Attributes properties. */ -export interface BrokerAuthenticatorMethodX509Attributes { - /** Attributes object. */ - attributes: Record; - /** Subject of the X509 attribute. */ - subject: string; -} - -export function brokerAuthenticatorMethodX509AttributesSerializer( - item: BrokerAuthenticatorMethodX509Attributes, -): any { - return { attributes: item["attributes"], subject: item["subject"] }; -} - -export function brokerAuthenticatorMethodX509AttributesDeserializer( - item: any, -): BrokerAuthenticatorMethodX509Attributes { - return { - attributes: item["attributes"], - subject: item["subject"], - }; -} - export function brokerAuthenticatorMethodX509AttributesRecordSerializer( item: Record, ): Record { @@ -2761,20 +2692,27 @@ export function brokerAuthenticatorMethodX509AttributesRecordDeserializer( return result; } -export function brokerAuthenticatorMethodsArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerAuthenticatorMethodsSerializer(item); - }); +/** BrokerAuthenticatorMethodX509Attributes properties. */ +export interface BrokerAuthenticatorMethodX509Attributes { + /** Attributes object. */ + attributes: Record; + /** Subject of the X509 attribute. */ + subject: string; } -export function brokerAuthenticatorMethodsArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return brokerAuthenticatorMethodsDeserializer(item); - }); +export function brokerAuthenticatorMethodX509AttributesSerializer( + item: BrokerAuthenticatorMethodX509Attributes, +): any { + return { attributes: item["attributes"], subject: item["subject"] }; +} + +export function brokerAuthenticatorMethodX509AttributesDeserializer( + item: any, +): BrokerAuthenticatorMethodX509Attributes { + return { + attributes: item["attributes"], + subject: item["subject"], + }; } /** The response of a BrokerAuthenticationResource list operation. */ @@ -2867,12 +2805,22 @@ export function brokerListenerPropertiesDeserializer(item: any): BrokerListenerP serviceName: item["serviceName"], ports: listenerPortArrayDeserializer(item["ports"]), serviceType: item["serviceType"], - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } +export function listenerPortArraySerializer(result: Array): any[] { + return result.map((item) => { + return listenerPortSerializer(item); + }); +} + +export function listenerPortArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return listenerPortDeserializer(item); + }); +} + /** Defines a TCP port on which a `BrokerListener` listens. */ export interface ListenerPort { /** Reference to client authentication settings. Omit to disable authentication. */ @@ -3144,18 +3092,6 @@ export function sanForCertDeserializer(item: any): SanForCert { }; } -export function listenerPortArraySerializer(result: Array): any[] { - return result.map((item) => { - return listenerPortSerializer(item); - }); -} - -export function listenerPortArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return listenerPortDeserializer(item); - }); -} - /** Kubernetes Service Types supported by Listener */ export enum KnownServiceType { /** Cluster IP Service. */ @@ -3295,9 +3231,7 @@ export function brokerPropertiesDeserializer(item: any): BrokerProperties { ? item["generateResourceLimits"] : generateResourceLimitsDeserializer(item["generateResourceLimits"]), memoryProfile: item["memoryProfile"], - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], }; } @@ -3817,6 +3751,22 @@ export function volumeClaimSpecSelectorDeserializer(item: any): VolumeClaimSpecS }; } +export function volumeClaimSpecSelectorMatchExpressionsArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return volumeClaimSpecSelectorMatchExpressionsSerializer(item); + }); +} + +export function volumeClaimSpecSelectorMatchExpressionsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return volumeClaimSpecSelectorMatchExpressionsDeserializer(item); + }); +} + /** VolumeClaimSpecSelectorMatchExpressions properties */ export interface VolumeClaimSpecSelectorMatchExpressions { /** key is the label key that the selector applies to. */ @@ -3879,22 +3829,6 @@ export enum KnownOperatorValues { */ export type OperatorValues = string; -export function volumeClaimSpecSelectorMatchExpressionsArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return volumeClaimSpecSelectorMatchExpressionsSerializer(item); - }); -} - -export function volumeClaimSpecSelectorMatchExpressionsArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return volumeClaimSpecSelectorMatchExpressionsDeserializer(item); - }); -} - /** GenerateResourceLimits properties */ export interface GenerateResourceLimits { /** The toggle to enable/disable cpu resource limits. */ @@ -4028,9 +3962,7 @@ export function instancePropertiesSerializer(item: InstanceProperties): any { export function instancePropertiesDeserializer(item: any): InstanceProperties { return { description: item["description"], - provisioningState: !item["provisioningState"] - ? item["provisioningState"] - : provisioningStateDeserializer(item["provisioningState"]), + provisioningState: item["provisioningState"], version: item["version"], schemaRegistryRef: schemaRegistryRefDeserializer(item["schemaRegistryRef"]), }; @@ -4207,6 +4139,12 @@ export function _operationListResultDeserializer(item: any): _OperationListResul }; } +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + /** Details of a REST API operation, returned from the Resource Provider Operations API */ export interface Operation { /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ @@ -4254,11 +4192,11 @@ export function operationDisplayDeserializer(item: any): OperationDisplay { /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ export enum KnownOrigin { - /** user */ + /** Indicates the operation is initiated by a user. */ User = "user", - /** system */ + /** Indicates the operation is initiated by a system. */ System = "system", - /** user,system */ + /** Indicates the operation is initiated by a user or system. */ UserSystem = "user,system", } @@ -4288,8 +4226,8 @@ export enum KnownActionType { */ export type ActionType = string; -export function operationArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return operationDeserializer(item); - }); +/** Api versions */ +export enum KnownVersions { + /** 2024-11-01 version */ + "V2024-11-01" = "2024-11-01", } diff --git a/sdk/iotoperations/arm-iotoperations/tsconfig.json b/sdk/iotoperations/arm-iotoperations/tsconfig.json index 273d9078a24a..19ceb382b521 100644 --- a/sdk/iotoperations/arm-iotoperations/tsconfig.json +++ b/sdk/iotoperations/arm-iotoperations/tsconfig.json @@ -1,7 +1,13 @@ { "references": [ - { "path": "./tsconfig.src.json" }, - { "path": "./tsconfig.samples.json" }, - { "path": "./tsconfig.test.json" } + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" + } ] } diff --git a/sdk/iotoperations/arm-iotoperations/tsp-location.yaml b/sdk/iotoperations/arm-iotoperations/tsp-location.yaml index 50c98774c2bc..1dfc161067a2 100644 --- a/sdk/iotoperations/arm-iotoperations/tsp-location.yaml +++ b/sdk/iotoperations/arm-iotoperations/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/iotoperations/IoTOperations.Management -commit: 7881f98bf6f1d2e4943f0eb25e6b053c73380aa0 +commit: e725ba2ceffe71772df6918b2950bf571577f968 repo: ../azure-rest-api-specs additionalDirectories: diff --git a/sdk/iotoperations/ci.mgmt.yml b/sdk/iotoperations/ci.mgmt.yml index e43c6d83f983..2ef2d9198f4f 100644 --- a/sdk/iotoperations/ci.mgmt.yml +++ b/sdk/iotoperations/ci.mgmt.yml @@ -13,7 +13,6 @@ trigger: include: - sdk/iotoperations/arm-iotoperations - sdk/iotoperations/ci.mgmt.yml - pr: branches: include: @@ -27,7 +26,6 @@ pr: include: - sdk/iotoperations/arm-iotoperations - sdk/iotoperations/ci.mgmt.yml - extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: From 13e505cc144f49333f8a303f8072ae87b3c88d50 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:01:16 +0800 Subject: [PATCH 15/55] [mgmt] servicefabricmanagedclusters release (#32188) https://github.com/Azure/sdk-release-request/issues/5755 --- common/config/rush/pnpm-lock.yaml | 4 +- .../CHANGELOG.md | 22 ++-- .../README.md | 1 - .../_meta.json | 8 +- .../assets.json | 2 +- .../package.json | 7 +- .../arm-servicefabricmanagedclusters.api.md | 13 ++- .../sample.env | 5 +- ...icationTypeVersionsCreateOrUpdateSample.ts | 2 +- .../applicationTypeVersionsDeleteSample.ts | 2 +- .../applicationTypeVersionsGetSample.ts | 2 +- ...ypeVersionsListByApplicationTypesSample.ts | 2 +- .../applicationTypeVersionsUpdateSample.ts | 2 +- .../applicationTypesCreateOrUpdateSample.ts | 2 +- .../applicationTypesDeleteSample.ts | 2 +- .../samples-dev/applicationTypesGetSample.ts | 2 +- .../samples-dev/applicationTypesListSample.ts | 2 +- .../applicationTypesUpdateSample.ts | 2 +- .../applicationsCreateOrUpdateSample.ts | 4 +- .../samples-dev/applicationsDeleteSample.ts | 2 +- .../samples-dev/applicationsGetSample.ts | 2 +- .../samples-dev/applicationsListSample.ts | 2 +- .../applicationsReadUpgradeSample.ts | 2 +- .../applicationsResumeUpgradeSample.ts | 2 +- .../applicationsStartRollbackSample.ts | 2 +- .../samples-dev/applicationsUpdateSample.ts | 2 +- ...managedApplyMaintenanceWindowPostSample.ts | 2 +- .../managedAzResiliencyStatusGetSample.ts | 2 +- ...gedClusterVersionGetByEnvironmentSample.ts | 2 +- .../managedClusterVersionGetSample.ts | 2 +- ...edClusterVersionListByEnvironmentSample.ts | 2 +- .../managedClusterVersionListSample.ts | 2 +- .../managedClustersCreateOrUpdateSample.ts | 5 +- .../managedClustersDeleteSample.ts | 2 +- .../samples-dev/managedClustersGetSample.ts | 2 +- ...anagedClustersListByResourceGroupSample.ts | 2 +- ...managedClustersListBySubscriptionSample.ts | 2 +- .../managedClustersUpdateSample.ts | 2 +- ...managedMaintenanceWindowStatusGetSample.ts | 2 +- .../managedUnsupportedVMSizesGetSample.ts | 2 +- .../managedUnsupportedVMSizesListSample.ts | 2 +- .../samples-dev/nodeTypeSkusListSample.ts | 2 +- .../nodeTypesCreateOrUpdateSample.ts | 16 +-- .../samples-dev/nodeTypesDeleteNodeSample.ts | 2 +- .../samples-dev/nodeTypesDeleteSample.ts | 2 +- .../samples-dev/nodeTypesGetSample.ts | 2 +- .../nodeTypesListByManagedClustersSample.ts | 2 +- .../samples-dev/nodeTypesReimageSample.ts | 4 +- .../samples-dev/nodeTypesRestartSample.ts | 2 +- .../samples-dev/nodeTypesUpdateSample.ts | 8 +- .../samples-dev/operationResultsGetSample.ts | 2 +- .../samples-dev/operationStatusGetSample.ts | 4 +- .../samples-dev/operationsListSample.ts | 2 +- .../servicesCreateOrUpdateSample.ts | 4 +- .../samples-dev/servicesDeleteSample.ts | 2 +- .../samples-dev/servicesGetSample.ts | 2 +- .../servicesListByApplicationsSample.ts | 2 +- .../samples-dev/servicesUpdateSample.ts | 2 +- .../samples/v1-beta/javascript/README.md | 100 ++++++++--------- ...icationTypeVersionsCreateOrUpdateSample.js | 2 +- .../applicationTypeVersionsDeleteSample.js | 2 +- .../applicationTypeVersionsGetSample.js | 2 +- ...ypeVersionsListByApplicationTypesSample.js | 2 +- .../applicationTypeVersionsUpdateSample.js | 2 +- .../applicationTypesCreateOrUpdateSample.js | 2 +- .../applicationTypesDeleteSample.js | 2 +- .../javascript/applicationTypesGetSample.js | 2 +- .../javascript/applicationTypesListSample.js | 2 +- .../applicationTypesUpdateSample.js | 2 +- .../applicationsCreateOrUpdateSample.js | 4 +- .../javascript/applicationsDeleteSample.js | 2 +- .../javascript/applicationsGetSample.js | 2 +- .../javascript/applicationsListSample.js | 2 +- .../applicationsReadUpgradeSample.js | 2 +- .../applicationsResumeUpgradeSample.js | 2 +- .../applicationsStartRollbackSample.js | 2 +- .../javascript/applicationsUpdateSample.js | 2 +- ...managedApplyMaintenanceWindowPostSample.js | 2 +- .../managedAzResiliencyStatusGetSample.js | 2 +- ...gedClusterVersionGetByEnvironmentSample.js | 2 +- .../managedClusterVersionGetSample.js | 2 +- ...edClusterVersionListByEnvironmentSample.js | 2 +- .../managedClusterVersionListSample.js | 2 +- .../managedClustersCreateOrUpdateSample.js | 5 +- .../javascript/managedClustersDeleteSample.js | 2 +- .../javascript/managedClustersGetSample.js | 2 +- ...anagedClustersListByResourceGroupSample.js | 2 +- ...managedClustersListBySubscriptionSample.js | 2 +- .../javascript/managedClustersUpdateSample.js | 2 +- ...managedMaintenanceWindowStatusGetSample.js | 2 +- .../managedUnsupportedVMSizesGetSample.js | 2 +- .../managedUnsupportedVMSizesListSample.js | 2 +- .../javascript/nodeTypeSkusListSample.js | 2 +- .../nodeTypesCreateOrUpdateSample.js | 16 +-- .../javascript/nodeTypesDeleteNodeSample.js | 2 +- .../javascript/nodeTypesDeleteSample.js | 2 +- .../v1-beta/javascript/nodeTypesGetSample.js | 2 +- .../nodeTypesListByManagedClustersSample.js | 2 +- .../javascript/nodeTypesReimageSample.js | 4 +- .../javascript/nodeTypesRestartSample.js | 2 +- .../javascript/nodeTypesUpdateSample.js | 8 +- .../javascript/operationResultsGetSample.js | 2 +- .../javascript/operationStatusGetSample.js | 4 +- .../javascript/operationsListSample.js | 2 +- .../samples/v1-beta/javascript/sample.env | 5 +- .../servicesCreateOrUpdateSample.js | 4 +- .../javascript/servicesDeleteSample.js | 2 +- .../v1-beta/javascript/servicesGetSample.js | 2 +- .../servicesListByApplicationsSample.js | 2 +- .../javascript/servicesUpdateSample.js | 2 +- .../samples/v1-beta/typescript/README.md | 100 ++++++++--------- .../samples/v1-beta/typescript/sample.env | 5 +- ...icationTypeVersionsCreateOrUpdateSample.ts | 2 +- .../applicationTypeVersionsDeleteSample.ts | 2 +- .../src/applicationTypeVersionsGetSample.ts | 2 +- ...ypeVersionsListByApplicationTypesSample.ts | 2 +- .../applicationTypeVersionsUpdateSample.ts | 2 +- .../applicationTypesCreateOrUpdateSample.ts | 2 +- .../src/applicationTypesDeleteSample.ts | 2 +- .../src/applicationTypesGetSample.ts | 2 +- .../src/applicationTypesListSample.ts | 2 +- .../src/applicationTypesUpdateSample.ts | 2 +- .../src/applicationsCreateOrUpdateSample.ts | 4 +- .../src/applicationsDeleteSample.ts | 2 +- .../typescript/src/applicationsGetSample.ts | 2 +- .../typescript/src/applicationsListSample.ts | 2 +- .../src/applicationsReadUpgradeSample.ts | 2 +- .../src/applicationsResumeUpgradeSample.ts | 2 +- .../src/applicationsStartRollbackSample.ts | 2 +- .../src/applicationsUpdateSample.ts | 2 +- ...managedApplyMaintenanceWindowPostSample.ts | 2 +- .../src/managedAzResiliencyStatusGetSample.ts | 2 +- ...gedClusterVersionGetByEnvironmentSample.ts | 2 +- .../src/managedClusterVersionGetSample.ts | 2 +- ...edClusterVersionListByEnvironmentSample.ts | 2 +- .../src/managedClusterVersionListSample.ts | 2 +- .../managedClustersCreateOrUpdateSample.ts | 5 +- .../src/managedClustersDeleteSample.ts | 2 +- .../src/managedClustersGetSample.ts | 2 +- ...anagedClustersListByResourceGroupSample.ts | 2 +- ...managedClustersListBySubscriptionSample.ts | 2 +- .../src/managedClustersUpdateSample.ts | 2 +- ...managedMaintenanceWindowStatusGetSample.ts | 2 +- .../src/managedUnsupportedVMSizesGetSample.ts | 2 +- .../managedUnsupportedVMSizesListSample.ts | 2 +- .../typescript/src/nodeTypeSkusListSample.ts | 2 +- .../src/nodeTypesCreateOrUpdateSample.ts | 16 +-- .../src/nodeTypesDeleteNodeSample.ts | 2 +- .../typescript/src/nodeTypesDeleteSample.ts | 2 +- .../typescript/src/nodeTypesGetSample.ts | 2 +- .../nodeTypesListByManagedClustersSample.ts | 2 +- .../typescript/src/nodeTypesReimageSample.ts | 4 +- .../typescript/src/nodeTypesRestartSample.ts | 2 +- .../typescript/src/nodeTypesUpdateSample.ts | 8 +- .../src/operationResultsGetSample.ts | 2 +- .../src/operationStatusGetSample.ts | 4 +- .../typescript/src/operationsListSample.ts | 2 +- .../src/servicesCreateOrUpdateSample.ts | 4 +- .../typescript/src/servicesDeleteSample.ts | 2 +- .../typescript/src/servicesGetSample.ts | 2 +- .../src/servicesListByApplicationsSample.ts | 2 +- .../typescript/src/servicesUpdateSample.ts | 2 +- .../src/models/index.ts | 23 +++- .../src/models/mappers.ts | 27 ++++- .../src/models/parameters.ts | 2 +- .../src/operations/nodeTypes.ts | 102 +++++++++++++++++- .../src/operationsInterfaces/nodeTypes.ts | 22 +++- ...ceFabricManagedClustersManagementClient.ts | 2 +- .../tsconfig.json | 4 +- 169 files changed, 503 insertions(+), 344 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index f84223d10830..44a647676fd5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3364,7 +3364,7 @@ packages: version: 0.0.0 '@rush-temp/arm-servicefabricmanagedclusters@file:projects/arm-servicefabricmanagedclusters.tgz': - resolution: {integrity: sha512-XJORCYQaxGTI4A/xLddK8PR4axcz55i7KHb9iXpwJCTbEt7VGQKD6HoRGSYrHVK1/zZjH91U2uTtIVZTCfB6nw==, tarball: file:projects/arm-servicefabricmanagedclusters.tgz} + resolution: {integrity: sha512-xCkGElJtVReO5TDCkZ309jB7+ZGD0zkVnvEGKd+lFb7jR7y1oFVSk9hWDQ1AX615A1L4YGJrgemVpFymZhsr+g==, tarball: file:projects/arm-servicefabricmanagedclusters.tgz} version: 0.0.0 '@rush-temp/arm-servicefabricmesh@file:projects/arm-servicefabricmesh.tgz': @@ -14733,7 +14733,7 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 + mocha: 10.8.2 ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md index 3f66dd0daf30..80b078da46ad 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md @@ -1,15 +1,23 @@ # Release History - -## 1.0.0-beta.3 (Unreleased) - + +## 1.0.0-beta.3 (2024-12-12) +Compared with version 1.0.0-beta.2 + ### Features Added -### Breaking Changes + - Added operation NodeTypes.beginUpdate + - Added operation NodeTypes.beginUpdateAndWait + - Added Interface NodeTypesUpdateHeaders + - Interface ManagedCluster has a new optional parameter allocatedOutboundPorts + - Interface NodeTypesUpdateOptionalParams has a new optional parameter resumeFrom + - Interface NodeTypesUpdateOptionalParams has a new optional parameter updateIntervalInMs -### Bugs Fixed - -### Other Changes +### Breaking Changes + - Removed operation NodeTypes.update + - Interface ManagedCluster no longer has parameter customFqdn + + ## 1.0.0-beta.2 (2024-10-16) Compared with version 1.0.0-beta.1 diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md index 0456d7f6fbdb..1986c86f544b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure ServiceFabricManagedClustersManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/_meta.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/_meta.json index 22df670b02cb..0b48c26e7d41 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/_meta.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/_meta.json @@ -1,8 +1,8 @@ { - "commit": "7d0134ad6d42786b1ff2d49a3cfb331b336c3099", + "commit": "552b4dd311f90f4a7b2f7adf45461d7a8774a1cc", "readme": "specification/servicefabricmanagedclusters/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\servicefabricmanagedclusters\\resource-manager\\readme.md --use=@autorest/typescript@6.0.27 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\servicefabricmanagedclusters\\resource-manager\\readme.md --use=@autorest/typescript@6.0.29 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.13", - "use": "@autorest/typescript@6.0.27" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@6.0.29" } \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/assets.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/assets.json index deb6d071a84d..dd55a7791a66 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/assets.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/servicefabricmanagedclusters/arm-servicefabricmanagedclusters", - "Tag": "js/servicefabricmanagedclusters/arm-servicefabricmanagedclusters_9d8d8c5093" + "Tag": "js/servicefabricmanagedclusters/arm-servicefabricmanagedclusters_6ace53711e" } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json index da9b75af049e..abed5b652480 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json @@ -34,7 +34,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^11.0.2", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", @@ -89,7 +89,8 @@ "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "integration-test:browser": "echo skipped" + "integration-test:browser": "echo skipped", + "update-snippets": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -110,4 +111,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-servicefabricmanagedclusters?view=azure-node-preview" } -} +} \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters.api.md index 7f87033d29df..ea0dd11a26a6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters.api.md @@ -829,6 +829,7 @@ export interface ManagedCluster extends Resource { addonFeatures?: ManagedClusterAddOnFeature[]; adminPassword?: string; adminUserName?: string; + allocatedOutboundPorts?: number; allowRdpAccess?: boolean; applicationTypeVersionsCleanupPolicy?: ApplicationTypeVersionsCleanupPolicy; autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; @@ -842,7 +843,6 @@ export interface ManagedCluster extends Resource { readonly clusterState?: ClusterState; clusterUpgradeCadence?: ClusterUpgradeCadence; clusterUpgradeMode?: ClusterUpgradeMode; - customFqdn?: string; ddosProtectionPlanId?: string; dnsName?: string; enableAutoOSUpgrade?: boolean; @@ -1239,9 +1239,10 @@ export interface NodeTypes { beginReimageAndWait(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesReimageOptionalParams): Promise; beginRestart(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesRestartOptionalParams): Promise, void>>; beginRestartAndWait(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesRestartOptionalParams): Promise; + beginUpdate(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeUpdateParameters, options?: NodeTypesUpdateOptionalParams): Promise, NodeTypesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeUpdateParameters, options?: NodeTypesUpdateOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypesGetOptionalParams): Promise; listByManagedClusters(resourceGroupName: string, clusterName: string, options?: NodeTypesListByManagedClustersOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeUpdateParameters, options?: NodeTypesUpdateOptionalParams): Promise; } // @public @@ -1365,8 +1366,16 @@ export interface NodeTypesRestartOptionalParams extends coreClient.OperationOpti updateIntervalInMs?: number; } +// @public +export interface NodeTypesUpdateHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface NodeTypesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/sample.env b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/sample.env +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts index 44fc60aba516..824c33ab1cb4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed application type version resource with the specified name. * * @summary Create or update a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json */ async function putAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts index e29885462dfb..e4d009dad1b0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed application type version resource with the specified name. * * @summary Delete a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json */ async function deleteAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts index 1e7930fa9f86..309011513673 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. * * @summary Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json */ async function getAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts index 333c8191c277..2c81be0caa6b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. * * @summary Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json */ async function getAListOfApplicationTypeVersionResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts index 451f46d7ff65..8c0924855251 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the tags of an application type version resource of a given managed cluster. * * @summary Updates the tags of an application type version resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json */ async function patchAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts index 5833a84b2187..e8a4e80f6217 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed application type name resource with the specified name. * * @summary Create or update a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json */ async function putAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts index 21bddc0c500f..0d18023c5951 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed application type name resource with the specified name. * * @summary Delete a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json */ async function deleteAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts index 40d8651d09a0..48b1bc06f56c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. * * @summary Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json */ async function getAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts index d2bc5792d3af..51bccda25173 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. * * @summary Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json */ async function getAListOfApplicationTypeNameResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts index 6e8daeba415f..5a182dd3da46 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the tags of an application type resource of a given managed cluster. * * @summary Updates the tags of an application type resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json */ async function patchAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts index 26e07180a534..ba111b7da032 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. * * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json */ async function putAnApplicationWithMaximumParameters() { const subscriptionId = @@ -87,7 +87,7 @@ async function putAnApplicationWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. * * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_min.json */ async function putAnApplicationWithMinimumParameters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts index 872c5f379f7d..121a38054c9f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed application resource with the specified name. * * @summary Delete a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json */ async function deleteAnApplication() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts index ddbbb0090e02..a8910a3cb9d2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. * * @summary Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json */ async function getAnApplication() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts index 043e89eaa080..17f8de60c0e2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. * * @summary Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json */ async function getAListOfApplicationResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts index af6482d70b1b..07b417706b71 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. * * @summary Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json */ async function getAnApplicationUpgrade() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts index cb8efbddf493..01b0923e349f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. * * @summary Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json */ async function resumeUpgrade() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts index 7905137f18e7..9eb9397fd405 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. * * @summary Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionStartRollback_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json */ async function startAnApplicationUpgradeRollback() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts index 53cb253c9d56..fc9d169a5880 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the tags of an application resource of a given managed cluster. * * @summary Updates the tags of an application resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json */ async function patchAnApplication() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts index eb9b60eefe20..924607b55162 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. * * @summary Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json */ async function maintenanceWindowStatus() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts index 2a0f52567753..bea80e77136a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * * @summary Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json */ async function azResiliencyStatusOfBaseResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts index 384e80e625c5..54d34341e2ce 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about an available Service Fabric cluster code version by environment. * * @summary Gets information about an available Service Fabric cluster code version by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json */ async function getClusterVersionByEnvironment() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts index 1998d352c111..fc40a5650f01 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about an available Service Fabric managed cluster code version. * * @summary Gets information about an available Service Fabric managed cluster code version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json */ async function getClusterVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts index 7fe3997ec215..12d815c2c279 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by environment. * * @summary Gets all available code versions for Service Fabric cluster resources by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json */ async function listClusterVersionsByEnvironment() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts index e459d314126b..2441b5022536 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by location. * * @summary Gets all available code versions for Service Fabric cluster resources by location. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionList_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json */ async function listClusterVersions() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts index d0816a2e82da..1e69ac7336d0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. * * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json */ async function putAClusterWithMaximumParameters() { const subscriptionId = @@ -38,6 +38,7 @@ async function putAClusterWithMaximumParameters() { ], adminPassword: "{vm-password}", adminUserName: "vmadmin", + allocatedOutboundPorts: 0, allowRdpAccess: true, applicationTypeVersionsCleanupPolicy: { maxUnusedVersionsToKeep: 3 }, autoGeneratedDomainNameLabelScope: "SubscriptionReuse", @@ -168,7 +169,7 @@ async function putAClusterWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. * * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_min.json */ async function putAClusterWithMinimumParameters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts index 4f46b4189e33..6eb789231145 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed cluster resource with the specified name. * * @summary Delete a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json */ async function deleteACluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts index 8f3ccf71556e..0f433e71fa88 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. * * @summary Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json */ async function getACluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts index b53ddffd83b9..e6f64695f7c7 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @summary Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json */ async function listClusterByResourceGroup() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts index 3d8d03399260..beffdbb1e30d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @summary Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json */ async function listManagedClusters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts index 6999908901c4..a558fc6d052e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the tags of of a Service Fabric managed cluster resource with the specified name. * * @summary Update the tags of of a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json */ async function patchAManagedCluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts index 286564ec6c28..34dc2d8b4333 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * * @summary Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json */ async function maintenanceWindowStatus() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts index 87459b949bee..9cbab7bef3be 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get unsupported vm size for Service Fabric Managed Clusters. * * @summary Get unsupported vm size for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json */ async function getUnsupportedVMSizes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts index 4a21a2315733..4004bdb46a99 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @summary Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json */ async function listUnsupportedVMSizes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts index 7b6f7f4a2451..ba5d9a4c21ae 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric node type supported SKUs. * * @summary Get a Service Fabric node type supported SKUs. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeSkusListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json */ async function listANodeTypeSkUs() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts index ad79164ab1c7..4a061e403be9 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json */ async function putANodeTypeWithAutoScaleParameters() { const subscriptionId = @@ -98,7 +98,7 @@ async function putANodeTypeWithAutoScaleParameters() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_max.json */ async function putANodeTypeWithMaximumParameters() { const subscriptionId = @@ -265,7 +265,7 @@ async function putANodeTypeWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_min.json */ async function putANodeTypeWithMinimumParameters() { const subscriptionId = @@ -303,7 +303,7 @@ async function putANodeTypeWithMinimumParameters() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationStateless_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationStateless_example.json */ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { const subscriptionId = @@ -354,7 +354,7 @@ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomImage_example.json */ async function putNodeTypeWithCustomVMImage() { const subscriptionId = @@ -390,7 +390,7 @@ async function putNodeTypeWithCustomVMImage() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json */ async function putNodeTypeWithDedicatedHosts() { const subscriptionId = @@ -434,7 +434,7 @@ async function putNodeTypeWithDedicatedHosts() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ async function putNodeTypeWithSharedGalleriesCustomVMImage() { const subscriptionId = @@ -470,7 +470,7 @@ async function putNodeTypeWithSharedGalleriesCustomVMImage() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json */ async function putNodeTypeWithVMImagePlan() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts index b29355aba785..7af7fd8dd226 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. * * @summary Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/DeleteNodes_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json */ async function deleteNodes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts index 91a8fa277440..84f845ad30e8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric node type of a given managed cluster. * * @summary Delete a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json */ async function deleteANodeType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts index b21d226dae72..251ba748bf5b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric node type of a given managed cluster. * * @summary Get a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json */ async function getANodeType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts index 9b27c603f65d..945c4c71f509 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Node types of the specified managed cluster. * * @summary Gets all Node types of the specified managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json */ async function listNodeTypeOfTheSpecifiedManagedCluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts index 935ff57b321f..6fe76b1fcad1 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ReimageNodes_UD_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json */ async function reimageAllNodesByUpgradeDomain() { const subscriptionId = @@ -52,7 +52,7 @@ async function reimageAllNodesByUpgradeDomain() { * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ReimageNodes_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_example.json */ async function reimageNodes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts index 6005aff9bba9..812f6dbe75d5 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. * * @summary Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/RestartNodes_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json */ async function restartNodes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts index 3db1c079faab..bf04827cecff 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. * * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json */ async function patchANodeType() { const subscriptionId = @@ -37,7 +37,7 @@ async function patchANodeType() { credential, subscriptionId, ); - const result = await client.nodeTypes.update( + const result = await client.nodeTypes.beginUpdateAndWait( resourceGroupName, clusterName, nodeTypeName, @@ -50,7 +50,7 @@ async function patchANodeType() { * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. * * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperationAutoScale_example.json */ async function patchANodeTypeWhileAutoScaling() { const subscriptionId = @@ -69,7 +69,7 @@ async function patchANodeTypeWhileAutoScaling() { credential, subscriptionId, ); - const result = await client.nodeTypes.update( + const result = await client.nodeTypes.beginUpdateAndWait( resourceGroupName, clusterName, nodeTypeName, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts index 351b8570cfa4..63c3d994d142 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get long running operation result. * * @summary Get long running operation result. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_result.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json */ async function getOperationResult() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts index 501e34b259a9..3a046824902e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get long running operation status. * * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_status_failed.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json */ async function getFailedOperationStatus() { const subscriptionId = @@ -39,7 +39,7 @@ async function getFailedOperationStatus() { * This sample demonstrates how to Get long running operation status. * * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_status_succeeded.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_succeeded.json */ async function getSucceededOperationResult() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts index d51e4f3e5f3e..88704e413181 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the list of available Service Fabric resource provider API operations. * * @summary Get the list of available Service Fabric resource provider API operations. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Operations_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json */ async function listAvailableOperations() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts index 25fd7fabbf82..e6d7d339f63a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. * * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json */ async function putAServiceWithMaximumParameters() { const subscriptionId = @@ -93,7 +93,7 @@ async function putAServiceWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. * * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_min.json */ async function putAServiceWithMinimumParameters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts index 5cabe2b3c4b4..6f64769d5610 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed service resource with the specified name. * * @summary Delete a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json */ async function deleteAService() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts index 6a29f8869f72..9d337836973f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. * * @summary Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json */ async function getAService() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts index e8120a7998c2..b9045108c8a9 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all service resources created or in the process of being created in the Service Fabric managed application resource. * * @summary Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json */ async function getAListOfServiceResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts index abd9e7d82768..d5c93990ac9b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the tags of a service resource of a given managed cluster. * * @summary Updates the tags of a service resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json */ async function patchAService() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md index 9381c8c8b311..ae3a7b426eb3 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md @@ -4,56 +4,56 @@ These sample programs show how to use the JavaScript client libraries for in som | **File Name** | **Description** | | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [applicationTypeVersionsCreateOrUpdateSample.js][applicationtypeversionscreateorupdatesample] | Create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPutOperation_example.json | -| [applicationTypeVersionsDeleteSample.js][applicationtypeversionsdeletesample] | Delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json | -| [applicationTypeVersionsGetSample.js][applicationtypeversionsgetsample] | Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionGetOperation_example.json | -| [applicationTypeVersionsListByApplicationTypesSample.js][applicationtypeversionslistbyapplicationtypessample] | Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionListOperation_example.json | -| [applicationTypeVersionsUpdateSample.js][applicationtypeversionsupdatesample] | Updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json | -| [applicationTypesCreateOrUpdateSample.js][applicationtypescreateorupdatesample] | Create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePutOperation_example.json | -| [applicationTypesDeleteSample.js][applicationtypesdeletesample] | Delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json | -| [applicationTypesGetSample.js][applicationtypesgetsample] | Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameGetOperation_example.json | -| [applicationTypesListSample.js][applicationtypeslistsample] | Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameListOperation_example.json | -| [applicationTypesUpdateSample.js][applicationtypesupdatesample] | Updates the tags of an application type resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePatchOperation_example.json | -| [applicationsCreateOrUpdateSample.js][applicationscreateorupdatesample] | Create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPutOperation_example_max.json | -| [applicationsDeleteSample.js][applicationsdeletesample] | Delete a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationDeleteOperation_example.json | -| [applicationsGetSample.js][applicationsgetsample] | Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationGetOperation_example.json | -| [applicationsListSample.js][applicationslistsample] | Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationListOperation_example.json | -| [applicationsReadUpgradeSample.js][applicationsreadupgradesample] | Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionGetUpgrade_example.json | -| [applicationsResumeUpgradeSample.js][applicationsresumeupgradesample] | Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionResumeUpgrade_example.json | -| [applicationsStartRollbackSample.js][applicationsstartrollbacksample] | Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionStartRollback_example.json | -| [applicationsUpdateSample.js][applicationsupdatesample] | Updates the tags of an application resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPatchOperation_example.json | -| [managedApplyMaintenanceWindowPostSample.js][managedapplymaintenancewindowpostsample] | Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json | -| [managedAzResiliencyStatusGetSample.js][managedazresiliencystatusgetsample] | Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedAzResiliencyStatusGet_example.json | -| [managedClusterVersionGetByEnvironmentSample.js][managedclusterversiongetbyenvironmentsample] | Gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json | -| [managedClusterVersionGetSample.js][managedclusterversiongetsample] | Gets information about an available Service Fabric managed cluster code version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGet_example.json | -| [managedClusterVersionListByEnvironmentSample.js][managedclusterversionlistbyenvironmentsample] | Gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionListByEnvironment.json | -| [managedClusterVersionListSample.js][managedclusterversionlistsample] | Gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionList_example.json | -| [managedClustersCreateOrUpdateSample.js][managedclusterscreateorupdatesample] | Create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPutOperation_example_max.json | -| [managedClustersDeleteSample.js][managedclustersdeletesample] | Delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterDeleteOperation_example.json | -| [managedClustersGetSample.js][managedclustersgetsample] | Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterGetOperation_example.json | -| [managedClustersListByResourceGroupSample.js][managedclusterslistbyresourcegroupsample] | Gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json | -| [managedClustersListBySubscriptionSample.js][managedclusterslistbysubscriptionsample] | Gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json | -| [managedClustersUpdateSample.js][managedclustersupdatesample] | Update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPatchOperation_example.json | -| [managedMaintenanceWindowStatusGetSample.js][managedmaintenancewindowstatusgetsample] | Action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json | -| [managedUnsupportedVMSizesGetSample.js][managedunsupportedvmsizesgetsample] | Get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesGet_example.json | -| [managedUnsupportedVMSizesListSample.js][managedunsupportedvmsizeslistsample] | Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesList_example.json | -| [nodeTypeSkusListSample.js][nodetypeskuslistsample] | Get a Service Fabric node type supported SKUs. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeSkusListOperation_example.json | -| [nodeTypesCreateOrUpdateSample.js][nodetypescreateorupdatesample] | Create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationAutoScale_example.json | -| [nodeTypesDeleteNodeSample.js][nodetypesdeletenodesample] | Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/DeleteNodes_example.json | -| [nodeTypesDeleteSample.js][nodetypesdeletesample] | Delete a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeDeleteOperation_example.json | -| [nodeTypesGetSample.js][nodetypesgetsample] | Get a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeGetOperation_example.json | -| [nodeTypesListByManagedClustersSample.js][nodetypeslistbymanagedclusterssample] | Gets all Node types of the specified managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeListOperation_example.json | -| [nodeTypesReimageSample.js][nodetypesreimagesample] | Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ReimageNodes_UD_example.json | -| [nodeTypesRestartSample.js][nodetypesrestartsample] | Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/RestartNodes_example.json | -| [nodeTypesUpdateSample.js][nodetypesupdatesample] | Update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePatchOperation_example.json | -| [operationResultsGetSample.js][operationresultsgetsample] | Get long running operation result. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_result.json | -| [operationStatusGetSample.js][operationstatusgetsample] | Get long running operation status. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_status_failed.json | -| [operationsListSample.js][operationslistsample] | Get the list of available Service Fabric resource provider API operations. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Operations_example.json | -| [servicesCreateOrUpdateSample.js][servicescreateorupdatesample] | Create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePutOperation_example_max.json | -| [servicesDeleteSample.js][servicesdeletesample] | Delete a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceDeleteOperation_example.json | -| [servicesGetSample.js][servicesgetsample] | Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceGetOperation_example.json | -| [servicesListByApplicationsSample.js][serviceslistbyapplicationssample] | Gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceListOperation_example.json | -| [servicesUpdateSample.js][servicesupdatesample] | Updates the tags of a service resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePatchOperation_example.json | +| [applicationTypeVersionsCreateOrUpdateSample.js][applicationtypeversionscreateorupdatesample] | Create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json | +| [applicationTypeVersionsDeleteSample.js][applicationtypeversionsdeletesample] | Delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json | +| [applicationTypeVersionsGetSample.js][applicationtypeversionsgetsample] | Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json | +| [applicationTypeVersionsListByApplicationTypesSample.js][applicationtypeversionslistbyapplicationtypessample] | Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json | +| [applicationTypeVersionsUpdateSample.js][applicationtypeversionsupdatesample] | Updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json | +| [applicationTypesCreateOrUpdateSample.js][applicationtypescreateorupdatesample] | Create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json | +| [applicationTypesDeleteSample.js][applicationtypesdeletesample] | Delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json | +| [applicationTypesGetSample.js][applicationtypesgetsample] | Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json | +| [applicationTypesListSample.js][applicationtypeslistsample] | Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json | +| [applicationTypesUpdateSample.js][applicationtypesupdatesample] | Updates the tags of an application type resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json | +| [applicationsCreateOrUpdateSample.js][applicationscreateorupdatesample] | Create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json | +| [applicationsDeleteSample.js][applicationsdeletesample] | Delete a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json | +| [applicationsGetSample.js][applicationsgetsample] | Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json | +| [applicationsListSample.js][applicationslistsample] | Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json | +| [applicationsReadUpgradeSample.js][applicationsreadupgradesample] | Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json | +| [applicationsResumeUpgradeSample.js][applicationsresumeupgradesample] | Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json | +| [applicationsStartRollbackSample.js][applicationsstartrollbacksample] | Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json | +| [applicationsUpdateSample.js][applicationsupdatesample] | Updates the tags of an application resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json | +| [managedApplyMaintenanceWindowPostSample.js][managedapplymaintenancewindowpostsample] | Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json | +| [managedAzResiliencyStatusGetSample.js][managedazresiliencystatusgetsample] | Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json | +| [managedClusterVersionGetByEnvironmentSample.js][managedclusterversiongetbyenvironmentsample] | Gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json | +| [managedClusterVersionGetSample.js][managedclusterversiongetsample] | Gets information about an available Service Fabric managed cluster code version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json | +| [managedClusterVersionListByEnvironmentSample.js][managedclusterversionlistbyenvironmentsample] | Gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json | +| [managedClusterVersionListSample.js][managedclusterversionlistsample] | Gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json | +| [managedClustersCreateOrUpdateSample.js][managedclusterscreateorupdatesample] | Create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json | +| [managedClustersDeleteSample.js][managedclustersdeletesample] | Delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json | +| [managedClustersGetSample.js][managedclustersgetsample] | Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json | +| [managedClustersListByResourceGroupSample.js][managedclusterslistbyresourcegroupsample] | Gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json | +| [managedClustersListBySubscriptionSample.js][managedclusterslistbysubscriptionsample] | Gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json | +| [managedClustersUpdateSample.js][managedclustersupdatesample] | Update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json | +| [managedMaintenanceWindowStatusGetSample.js][managedmaintenancewindowstatusgetsample] | Action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json | +| [managedUnsupportedVMSizesGetSample.js][managedunsupportedvmsizesgetsample] | Get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json | +| [managedUnsupportedVMSizesListSample.js][managedunsupportedvmsizeslistsample] | Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json | +| [nodeTypeSkusListSample.js][nodetypeskuslistsample] | Get a Service Fabric node type supported SKUs. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json | +| [nodeTypesCreateOrUpdateSample.js][nodetypescreateorupdatesample] | Create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json | +| [nodeTypesDeleteNodeSample.js][nodetypesdeletenodesample] | Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json | +| [nodeTypesDeleteSample.js][nodetypesdeletesample] | Delete a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json | +| [nodeTypesGetSample.js][nodetypesgetsample] | Get a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json | +| [nodeTypesListByManagedClustersSample.js][nodetypeslistbymanagedclusterssample] | Gets all Node types of the specified managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json | +| [nodeTypesReimageSample.js][nodetypesreimagesample] | Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json | +| [nodeTypesRestartSample.js][nodetypesrestartsample] | Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json | +| [nodeTypesUpdateSample.js][nodetypesupdatesample] | Update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json | +| [operationResultsGetSample.js][operationresultsgetsample] | Get long running operation result. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json | +| [operationStatusGetSample.js][operationstatusgetsample] | Get long running operation status. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json | +| [operationsListSample.js][operationslistsample] | Get the list of available Service Fabric resource provider API operations. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json | +| [servicesCreateOrUpdateSample.js][servicescreateorupdatesample] | Create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json | +| [servicesDeleteSample.js][servicesdeletesample] | Delete a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json | +| [servicesGetSample.js][servicesgetsample] | Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json | +| [servicesListByApplicationsSample.js][serviceslistbyapplicationssample] | Gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json | +| [servicesUpdateSample.js][servicesupdatesample] | Updates the tags of a service resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json | ## Prerequisites diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js index 1dc8b3edd590..1c558af88ab0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a Service Fabric managed application type version resource with the specified name. * * @summary Create or update a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json */ async function putAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js index d92e3137cef0..597b12f57208 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a Service Fabric managed application type version resource with the specified name. * * @summary Delete a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json */ async function deleteAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js index 9aa7babd23d0..d60e578c3578 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. * * @summary Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json */ async function getAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js index 8375f4887e01..2d4944f059ba 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. * * @summary Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json */ async function getAListOfApplicationTypeVersionResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js index c3b5be4540b8..5455b8bea70d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates the tags of an application type version resource of a given managed cluster. * * @summary Updates the tags of an application type version resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json */ async function patchAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js index a260e32637fd..bc3fe4e3e57d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a Service Fabric managed application type name resource with the specified name. * * @summary Create or update a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json */ async function putAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js index 438f15a0aa0f..10380b25dba8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a Service Fabric managed application type name resource with the specified name. * * @summary Delete a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json */ async function deleteAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js index 39d3a7b30b98..06495952c6f4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. * * @summary Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json */ async function getAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js index 07cae07b7b6e..461e0241af3e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. * * @summary Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json */ async function getAListOfApplicationTypeNameResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js index e08475a7612f..4ab8ec38f2a7 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates the tags of an application type resource of a given managed cluster. * * @summary Updates the tags of an application type resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json */ async function patchAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js index 171e3eed679c..30fca469f628 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. * * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json */ async function putAnApplicationWithMaximumParameters() { const subscriptionId = @@ -80,7 +80,7 @@ async function putAnApplicationWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. * * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_min.json */ async function putAnApplicationWithMinimumParameters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js index 3296fe97f02e..26fee3b25fcc 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a Service Fabric managed application resource with the specified name. * * @summary Delete a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json */ async function deleteAnApplication() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js index b9813833011f..72fce9c6fd35 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. * * @summary Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json */ async function getAnApplication() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js index 8a5a927816a7..119bba10cbaf 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. * * @summary Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json */ async function getAListOfApplicationResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js index ff98fd1f6cff..e82a2e0a8abb 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. * * @summary Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json */ async function getAnApplicationUpgrade() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js index 70c2f971a5a7..479c9cf86592 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. * * @summary Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json */ async function resumeUpgrade() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js index 1ec8971f27c3..5baa7e853943 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. * * @summary Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionStartRollback_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json */ async function startAnApplicationUpgradeRollback() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js index 2e1d0d934a11..5dde4483ba34 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates the tags of an application resource of a given managed cluster. * * @summary Updates the tags of an application resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json */ async function patchAnApplication() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js index 086f12c85819..e0e64c71a46b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. * * @summary Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json */ async function maintenanceWindowStatus() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js index db12319cfb06..abd7bc7d473c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * * @summary Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json */ async function azResiliencyStatusOfBaseResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js index b98302e344e8..8efad8ee9a27 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about an available Service Fabric cluster code version by environment. * * @summary Gets information about an available Service Fabric cluster code version by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json */ async function getClusterVersionByEnvironment() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js index d03d258212e5..9b6a102e787b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about an available Service Fabric managed cluster code version. * * @summary Gets information about an available Service Fabric managed cluster code version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json */ async function getClusterVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js index 08320d385885..26e652de75d9 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by environment. * * @summary Gets all available code versions for Service Fabric cluster resources by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json */ async function listClusterVersionsByEnvironment() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js index 0d341b244b8f..e6a6f8afc301 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by location. * * @summary Gets all available code versions for Service Fabric cluster resources by location. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionList_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json */ async function listClusterVersions() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js index 072301971883..e1bd99fb1634 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. * * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json */ async function putAClusterWithMaximumParameters() { const subscriptionId = @@ -30,6 +30,7 @@ async function putAClusterWithMaximumParameters() { addonFeatures: ["DnsService", "BackupRestoreService", "ResourceMonitorService"], adminPassword: "{vm-password}", adminUserName: "vmadmin", + allocatedOutboundPorts: 0, allowRdpAccess: true, applicationTypeVersionsCleanupPolicy: { maxUnusedVersionsToKeep: 3 }, autoGeneratedDomainNameLabelScope: "SubscriptionReuse", @@ -155,7 +156,7 @@ async function putAClusterWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. * * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_min.json */ async function putAClusterWithMinimumParameters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js index 6dd08dc16392..c0c5822c8507 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a Service Fabric managed cluster resource with the specified name. * * @summary Delete a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json */ async function deleteACluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js index 2db69d403561..d78acebcd0fc 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. * * @summary Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json */ async function getACluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js index 302c41f04141..9c25fbd99a11 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @summary Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json */ async function listClusterByResourceGroup() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js index 752551f94495..3b251dc93c8e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @summary Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json */ async function listManagedClusters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js index 195d03ffe803..c330296ebd44 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Update the tags of of a Service Fabric managed cluster resource with the specified name. * * @summary Update the tags of of a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json */ async function patchAManagedCluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js index e50c89425c9c..232b9421f7e2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * * @summary Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json */ async function maintenanceWindowStatus() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js index 818cdabddc56..fea55475e60a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get unsupported vm size for Service Fabric Managed Clusters. * * @summary Get unsupported vm size for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json */ async function getUnsupportedVMSizes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js index 3058210bf93f..9f1c9d6525a4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @summary Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json */ async function listUnsupportedVMSizes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js index fdd2d32d63a1..eaeeef7f30cc 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a Service Fabric node type supported SKUs. * * @summary Get a Service Fabric node type supported SKUs. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeSkusListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json */ async function listANodeTypeSkUs() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js index 67b6a21ce118..2993cb5dba72 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json */ async function putANodeTypeWithAutoScaleParameters() { const subscriptionId = @@ -91,7 +91,7 @@ async function putANodeTypeWithAutoScaleParameters() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_max.json */ async function putANodeTypeWithMaximumParameters() { const subscriptionId = @@ -254,7 +254,7 @@ async function putANodeTypeWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_min.json */ async function putANodeTypeWithMinimumParameters() { const subscriptionId = @@ -288,7 +288,7 @@ async function putANodeTypeWithMinimumParameters() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationStateless_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationStateless_example.json */ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { const subscriptionId = @@ -335,7 +335,7 @@ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomImage_example.json */ async function putNodeTypeWithCustomVMImage() { const subscriptionId = @@ -367,7 +367,7 @@ async function putNodeTypeWithCustomVMImage() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json */ async function putNodeTypeWithDedicatedHosts() { const subscriptionId = @@ -407,7 +407,7 @@ async function putNodeTypeWithDedicatedHosts() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ async function putNodeTypeWithSharedGalleriesCustomVMImage() { const subscriptionId = @@ -439,7 +439,7 @@ async function putNodeTypeWithSharedGalleriesCustomVMImage() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json */ async function putNodeTypeWithVMImagePlan() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js index 3a90981bdc81..9f7873f9479b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. * * @summary Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/DeleteNodes_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json */ async function deleteNodes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js index 662314994880..76bfa831c808 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a Service Fabric node type of a given managed cluster. * * @summary Delete a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json */ async function deleteANodeType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js index f44894f360b3..c165d4780ed0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a Service Fabric node type of a given managed cluster. * * @summary Get a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json */ async function getANodeType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js index d20fad8a0c66..3f0821e3929c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all Node types of the specified managed cluster. * * @summary Gets all Node types of the specified managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json */ async function listNodeTypeOfTheSpecifiedManagedCluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js index 98df97551528..f2925fd63a51 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ReimageNodes_UD_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json */ async function reimageAllNodesByUpgradeDomain() { const subscriptionId = @@ -45,7 +45,7 @@ async function reimageAllNodesByUpgradeDomain() { * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ReimageNodes_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_example.json */ async function reimageNodes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js index 656912b45975..7646c5db834c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. * * @summary Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/RestartNodes_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json */ async function restartNodes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js index 0c8929719796..4975b1d2bd61 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. * * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json */ async function patchANodeType() { const subscriptionId = @@ -30,7 +30,7 @@ async function patchANodeType() { const parameters = { tags: { a: "b" } }; const credential = new DefaultAzureCredential(); const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.update( + const result = await client.nodeTypes.beginUpdateAndWait( resourceGroupName, clusterName, nodeTypeName, @@ -43,7 +43,7 @@ async function patchANodeType() { * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. * * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperationAutoScale_example.json */ async function patchANodeTypeWhileAutoScaling() { const subscriptionId = @@ -58,7 +58,7 @@ async function patchANodeTypeWhileAutoScaling() { }; const credential = new DefaultAzureCredential(); const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.update( + const result = await client.nodeTypes.beginUpdateAndWait( resourceGroupName, clusterName, nodeTypeName, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js index 9dbe33e03f4c..3999396150a4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get long running operation result. * * @summary Get long running operation result. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_result.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json */ async function getOperationResult() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js index 1a391153a01e..fe0b2caf7d49 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get long running operation status. * * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_status_failed.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json */ async function getFailedOperationStatus() { const subscriptionId = @@ -36,7 +36,7 @@ async function getFailedOperationStatus() { * This sample demonstrates how to Get long running operation status. * * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_status_succeeded.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_succeeded.json */ async function getSucceededOperationResult() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js index d9901b63d69d..29d3bb388dcc 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get the list of available Service Fabric resource provider API operations. * * @summary Get the list of available Service Fabric resource provider API operations. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Operations_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json */ async function listAvailableOperations() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/sample.env b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/sample.env +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js index 578c8197554b..baa8e56da530 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. * * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json */ async function putAServiceWithMaximumParameters() { const subscriptionId = @@ -86,7 +86,7 @@ async function putAServiceWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. * * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_min.json */ async function putAServiceWithMinimumParameters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js index b55ab4219f7d..e0695b663de9 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Delete a Service Fabric managed service resource with the specified name. * * @summary Delete a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json */ async function deleteAService() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js index 334b4c127f96..bfdcf618419f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. * * @summary Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json */ async function getAService() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js index de1b74b39aff..2cdbaeabfb90 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all service resources created or in the process of being created in the Service Fabric managed application resource. * * @summary Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json */ async function getAListOfServiceResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js index b282babb93a9..1085d0a6c324 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js @@ -18,7 +18,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates the tags of a service resource of a given managed cluster. * * @summary Updates the tags of a service resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json */ async function patchAService() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md index 1bfe71eedd26..ab7bd9033cfb 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md @@ -4,56 +4,56 @@ These sample programs show how to use the TypeScript client libraries for in som | **File Name** | **Description** | | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [applicationTypeVersionsCreateOrUpdateSample.ts][applicationtypeversionscreateorupdatesample] | Create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPutOperation_example.json | -| [applicationTypeVersionsDeleteSample.ts][applicationtypeversionsdeletesample] | Delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json | -| [applicationTypeVersionsGetSample.ts][applicationtypeversionsgetsample] | Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionGetOperation_example.json | -| [applicationTypeVersionsListByApplicationTypesSample.ts][applicationtypeversionslistbyapplicationtypessample] | Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionListOperation_example.json | -| [applicationTypeVersionsUpdateSample.ts][applicationtypeversionsupdatesample] | Updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json | -| [applicationTypesCreateOrUpdateSample.ts][applicationtypescreateorupdatesample] | Create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePutOperation_example.json | -| [applicationTypesDeleteSample.ts][applicationtypesdeletesample] | Delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json | -| [applicationTypesGetSample.ts][applicationtypesgetsample] | Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameGetOperation_example.json | -| [applicationTypesListSample.ts][applicationtypeslistsample] | Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameListOperation_example.json | -| [applicationTypesUpdateSample.ts][applicationtypesupdatesample] | Updates the tags of an application type resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePatchOperation_example.json | -| [applicationsCreateOrUpdateSample.ts][applicationscreateorupdatesample] | Create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPutOperation_example_max.json | -| [applicationsDeleteSample.ts][applicationsdeletesample] | Delete a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationDeleteOperation_example.json | -| [applicationsGetSample.ts][applicationsgetsample] | Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationGetOperation_example.json | -| [applicationsListSample.ts][applicationslistsample] | Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationListOperation_example.json | -| [applicationsReadUpgradeSample.ts][applicationsreadupgradesample] | Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionGetUpgrade_example.json | -| [applicationsResumeUpgradeSample.ts][applicationsresumeupgradesample] | Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionResumeUpgrade_example.json | -| [applicationsStartRollbackSample.ts][applicationsstartrollbacksample] | Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionStartRollback_example.json | -| [applicationsUpdateSample.ts][applicationsupdatesample] | Updates the tags of an application resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPatchOperation_example.json | -| [managedApplyMaintenanceWindowPostSample.ts][managedapplymaintenancewindowpostsample] | Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json | -| [managedAzResiliencyStatusGetSample.ts][managedazresiliencystatusgetsample] | Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedAzResiliencyStatusGet_example.json | -| [managedClusterVersionGetByEnvironmentSample.ts][managedclusterversiongetbyenvironmentsample] | Gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json | -| [managedClusterVersionGetSample.ts][managedclusterversiongetsample] | Gets information about an available Service Fabric managed cluster code version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGet_example.json | -| [managedClusterVersionListByEnvironmentSample.ts][managedclusterversionlistbyenvironmentsample] | Gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionListByEnvironment.json | -| [managedClusterVersionListSample.ts][managedclusterversionlistsample] | Gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionList_example.json | -| [managedClustersCreateOrUpdateSample.ts][managedclusterscreateorupdatesample] | Create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPutOperation_example_max.json | -| [managedClustersDeleteSample.ts][managedclustersdeletesample] | Delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterDeleteOperation_example.json | -| [managedClustersGetSample.ts][managedclustersgetsample] | Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterGetOperation_example.json | -| [managedClustersListByResourceGroupSample.ts][managedclusterslistbyresourcegroupsample] | Gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json | -| [managedClustersListBySubscriptionSample.ts][managedclusterslistbysubscriptionsample] | Gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json | -| [managedClustersUpdateSample.ts][managedclustersupdatesample] | Update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPatchOperation_example.json | -| [managedMaintenanceWindowStatusGetSample.ts][managedmaintenancewindowstatusgetsample] | Action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json | -| [managedUnsupportedVMSizesGetSample.ts][managedunsupportedvmsizesgetsample] | Get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesGet_example.json | -| [managedUnsupportedVMSizesListSample.ts][managedunsupportedvmsizeslistsample] | Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesList_example.json | -| [nodeTypeSkusListSample.ts][nodetypeskuslistsample] | Get a Service Fabric node type supported SKUs. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeSkusListOperation_example.json | -| [nodeTypesCreateOrUpdateSample.ts][nodetypescreateorupdatesample] | Create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationAutoScale_example.json | -| [nodeTypesDeleteNodeSample.ts][nodetypesdeletenodesample] | Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/DeleteNodes_example.json | -| [nodeTypesDeleteSample.ts][nodetypesdeletesample] | Delete a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeDeleteOperation_example.json | -| [nodeTypesGetSample.ts][nodetypesgetsample] | Get a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeGetOperation_example.json | -| [nodeTypesListByManagedClustersSample.ts][nodetypeslistbymanagedclusterssample] | Gets all Node types of the specified managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeListOperation_example.json | -| [nodeTypesReimageSample.ts][nodetypesreimagesample] | Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ReimageNodes_UD_example.json | -| [nodeTypesRestartSample.ts][nodetypesrestartsample] | Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/RestartNodes_example.json | -| [nodeTypesUpdateSample.ts][nodetypesupdatesample] | Update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePatchOperation_example.json | -| [operationResultsGetSample.ts][operationresultsgetsample] | Get long running operation result. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_result.json | -| [operationStatusGetSample.ts][operationstatusgetsample] | Get long running operation status. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_status_failed.json | -| [operationsListSample.ts][operationslistsample] | Get the list of available Service Fabric resource provider API operations. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Operations_example.json | -| [servicesCreateOrUpdateSample.ts][servicescreateorupdatesample] | Create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePutOperation_example_max.json | -| [servicesDeleteSample.ts][servicesdeletesample] | Delete a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceDeleteOperation_example.json | -| [servicesGetSample.ts][servicesgetsample] | Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceGetOperation_example.json | -| [servicesListByApplicationsSample.ts][serviceslistbyapplicationssample] | Gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceListOperation_example.json | -| [servicesUpdateSample.ts][servicesupdatesample] | Updates the tags of a service resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePatchOperation_example.json | +| [applicationTypeVersionsCreateOrUpdateSample.ts][applicationtypeversionscreateorupdatesample] | Create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json | +| [applicationTypeVersionsDeleteSample.ts][applicationtypeversionsdeletesample] | Delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json | +| [applicationTypeVersionsGetSample.ts][applicationtypeversionsgetsample] | Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json | +| [applicationTypeVersionsListByApplicationTypesSample.ts][applicationtypeversionslistbyapplicationtypessample] | Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json | +| [applicationTypeVersionsUpdateSample.ts][applicationtypeversionsupdatesample] | Updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json | +| [applicationTypesCreateOrUpdateSample.ts][applicationtypescreateorupdatesample] | Create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json | +| [applicationTypesDeleteSample.ts][applicationtypesdeletesample] | Delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json | +| [applicationTypesGetSample.ts][applicationtypesgetsample] | Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json | +| [applicationTypesListSample.ts][applicationtypeslistsample] | Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json | +| [applicationTypesUpdateSample.ts][applicationtypesupdatesample] | Updates the tags of an application type resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json | +| [applicationsCreateOrUpdateSample.ts][applicationscreateorupdatesample] | Create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json | +| [applicationsDeleteSample.ts][applicationsdeletesample] | Delete a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json | +| [applicationsGetSample.ts][applicationsgetsample] | Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json | +| [applicationsListSample.ts][applicationslistsample] | Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json | +| [applicationsReadUpgradeSample.ts][applicationsreadupgradesample] | Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json | +| [applicationsResumeUpgradeSample.ts][applicationsresumeupgradesample] | Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json | +| [applicationsStartRollbackSample.ts][applicationsstartrollbacksample] | Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json | +| [applicationsUpdateSample.ts][applicationsupdatesample] | Updates the tags of an application resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json | +| [managedApplyMaintenanceWindowPostSample.ts][managedapplymaintenancewindowpostsample] | Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json | +| [managedAzResiliencyStatusGetSample.ts][managedazresiliencystatusgetsample] | Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json | +| [managedClusterVersionGetByEnvironmentSample.ts][managedclusterversiongetbyenvironmentsample] | Gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json | +| [managedClusterVersionGetSample.ts][managedclusterversiongetsample] | Gets information about an available Service Fabric managed cluster code version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json | +| [managedClusterVersionListByEnvironmentSample.ts][managedclusterversionlistbyenvironmentsample] | Gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json | +| [managedClusterVersionListSample.ts][managedclusterversionlistsample] | Gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json | +| [managedClustersCreateOrUpdateSample.ts][managedclusterscreateorupdatesample] | Create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json | +| [managedClustersDeleteSample.ts][managedclustersdeletesample] | Delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json | +| [managedClustersGetSample.ts][managedclustersgetsample] | Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json | +| [managedClustersListByResourceGroupSample.ts][managedclusterslistbyresourcegroupsample] | Gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json | +| [managedClustersListBySubscriptionSample.ts][managedclusterslistbysubscriptionsample] | Gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json | +| [managedClustersUpdateSample.ts][managedclustersupdatesample] | Update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json | +| [managedMaintenanceWindowStatusGetSample.ts][managedmaintenancewindowstatusgetsample] | Action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json | +| [managedUnsupportedVMSizesGetSample.ts][managedunsupportedvmsizesgetsample] | Get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json | +| [managedUnsupportedVMSizesListSample.ts][managedunsupportedvmsizeslistsample] | Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json | +| [nodeTypeSkusListSample.ts][nodetypeskuslistsample] | Get a Service Fabric node type supported SKUs. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json | +| [nodeTypesCreateOrUpdateSample.ts][nodetypescreateorupdatesample] | Create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json | +| [nodeTypesDeleteNodeSample.ts][nodetypesdeletenodesample] | Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json | +| [nodeTypesDeleteSample.ts][nodetypesdeletesample] | Delete a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json | +| [nodeTypesGetSample.ts][nodetypesgetsample] | Get a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json | +| [nodeTypesListByManagedClustersSample.ts][nodetypeslistbymanagedclusterssample] | Gets all Node types of the specified managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json | +| [nodeTypesReimageSample.ts][nodetypesreimagesample] | Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json | +| [nodeTypesRestartSample.ts][nodetypesrestartsample] | Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json | +| [nodeTypesUpdateSample.ts][nodetypesupdatesample] | Update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json | +| [operationResultsGetSample.ts][operationresultsgetsample] | Get long running operation result. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json | +| [operationStatusGetSample.ts][operationstatusgetsample] | Get long running operation status. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json | +| [operationsListSample.ts][operationslistsample] | Get the list of available Service Fabric resource provider API operations. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json | +| [servicesCreateOrUpdateSample.ts][servicescreateorupdatesample] | Create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json | +| [servicesDeleteSample.ts][servicesdeletesample] | Delete a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json | +| [servicesGetSample.ts][servicesgetsample] | Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json | +| [servicesListByApplicationsSample.ts][serviceslistbyapplicationssample] | Gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json | +| [servicesUpdateSample.ts][servicesupdatesample] | Updates the tags of a service resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json | ## Prerequisites diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/sample.env b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/sample.env +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts index 44fc60aba516..824c33ab1cb4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed application type version resource with the specified name. * * @summary Create or update a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json */ async function putAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts index e29885462dfb..e4d009dad1b0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed application type version resource with the specified name. * * @summary Delete a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json */ async function deleteAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts index 1e7930fa9f86..309011513673 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. * * @summary Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json */ async function getAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts index 333c8191c277..2c81be0caa6b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. * * @summary Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json */ async function getAListOfApplicationTypeVersionResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts index 451f46d7ff65..8c0924855251 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the tags of an application type version resource of a given managed cluster. * * @summary Updates the tags of an application type version resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json */ async function patchAnApplicationTypeVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts index 5833a84b2187..e8a4e80f6217 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed application type name resource with the specified name. * * @summary Create or update a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json */ async function putAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts index 21bddc0c500f..0d18023c5951 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed application type name resource with the specified name. * * @summary Delete a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json */ async function deleteAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts index 40d8651d09a0..48b1bc06f56c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. * * @summary Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json */ async function getAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts index d2bc5792d3af..51bccda25173 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. * * @summary Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json */ async function getAListOfApplicationTypeNameResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts index 6e8daeba415f..5a182dd3da46 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the tags of an application type resource of a given managed cluster. * * @summary Updates the tags of an application type resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json */ async function patchAnApplicationType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts index 26e07180a534..ba111b7da032 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. * * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json */ async function putAnApplicationWithMaximumParameters() { const subscriptionId = @@ -87,7 +87,7 @@ async function putAnApplicationWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. * * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_min.json */ async function putAnApplicationWithMinimumParameters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts index 872c5f379f7d..121a38054c9f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed application resource with the specified name. * * @summary Delete a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json */ async function deleteAnApplication() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts index ddbbb0090e02..a8910a3cb9d2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. * * @summary Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json */ async function getAnApplication() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts index 043e89eaa080..17f8de60c0e2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. * * @summary Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json */ async function getAListOfApplicationResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts index af6482d70b1b..07b417706b71 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. * * @summary Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json */ async function getAnApplicationUpgrade() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts index cb8efbddf493..01b0923e349f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. * * @summary Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json */ async function resumeUpgrade() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts index 7905137f18e7..9eb9397fd405 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. * * @summary Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationActionStartRollback_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json */ async function startAnApplicationUpgradeRollback() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts index 53cb253c9d56..fc9d169a5880 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the tags of an application resource of a given managed cluster. * * @summary Updates the tags of an application resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ApplicationPatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json */ async function patchAnApplication() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts index eb9b60eefe20..924607b55162 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. * * @summary Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json */ async function maintenanceWindowStatus() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts index 2a0f52567753..bea80e77136a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * * @summary Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json */ async function azResiliencyStatusOfBaseResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts index 384e80e625c5..54d34341e2ce 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about an available Service Fabric cluster code version by environment. * * @summary Gets information about an available Service Fabric cluster code version by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json */ async function getClusterVersionByEnvironment() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts index 1998d352c111..fc40a5650f01 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about an available Service Fabric managed cluster code version. * * @summary Gets information about an available Service Fabric managed cluster code version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json */ async function getClusterVersion() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts index 7fe3997ec215..12d815c2c279 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by environment. * * @summary Gets all available code versions for Service Fabric cluster resources by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json */ async function listClusterVersionsByEnvironment() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts index e459d314126b..2441b5022536 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by location. * * @summary Gets all available code versions for Service Fabric cluster resources by location. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterVersionList_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json */ async function listClusterVersions() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts index d0816a2e82da..1e69ac7336d0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. * * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json */ async function putAClusterWithMaximumParameters() { const subscriptionId = @@ -38,6 +38,7 @@ async function putAClusterWithMaximumParameters() { ], adminPassword: "{vm-password}", adminUserName: "vmadmin", + allocatedOutboundPorts: 0, allowRdpAccess: true, applicationTypeVersionsCleanupPolicy: { maxUnusedVersionsToKeep: 3 }, autoGeneratedDomainNameLabelScope: "SubscriptionReuse", @@ -168,7 +169,7 @@ async function putAClusterWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. * * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_min.json */ async function putAClusterWithMinimumParameters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts index 4f46b4189e33..6eb789231145 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed cluster resource with the specified name. * * @summary Delete a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json */ async function deleteACluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts index 8f3ccf71556e..0f433e71fa88 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. * * @summary Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json */ async function getACluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts index b53ddffd83b9..e6f64695f7c7 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @summary Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json */ async function listClusterByResourceGroup() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts index 3d8d03399260..beffdbb1e30d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @summary Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json */ async function listManagedClusters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts index 6999908901c4..a558fc6d052e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the tags of of a Service Fabric managed cluster resource with the specified name. * * @summary Update the tags of of a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedClusterPatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json */ async function patchAManagedCluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts index 286564ec6c28..34dc2d8b4333 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * * @summary Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json */ async function maintenanceWindowStatus() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts index 87459b949bee..9cbab7bef3be 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get unsupported vm size for Service Fabric Managed Clusters. * * @summary Get unsupported vm size for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json */ async function getUnsupportedVMSizes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts index 4a21a2315733..4004bdb46a99 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @summary Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json */ async function listUnsupportedVMSizes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts index 7b6f7f4a2451..ba5d9a4c21ae 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric node type supported SKUs. * * @summary Get a Service Fabric node type supported SKUs. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeSkusListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json */ async function listANodeTypeSkUs() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts index ad79164ab1c7..4a061e403be9 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json */ async function putANodeTypeWithAutoScaleParameters() { const subscriptionId = @@ -98,7 +98,7 @@ async function putANodeTypeWithAutoScaleParameters() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_max.json */ async function putANodeTypeWithMaximumParameters() { const subscriptionId = @@ -265,7 +265,7 @@ async function putANodeTypeWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_min.json */ async function putANodeTypeWithMinimumParameters() { const subscriptionId = @@ -303,7 +303,7 @@ async function putANodeTypeWithMinimumParameters() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationStateless_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationStateless_example.json */ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { const subscriptionId = @@ -354,7 +354,7 @@ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomImage_example.json */ async function putNodeTypeWithCustomVMImage() { const subscriptionId = @@ -390,7 +390,7 @@ async function putNodeTypeWithCustomVMImage() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json */ async function putNodeTypeWithDedicatedHosts() { const subscriptionId = @@ -434,7 +434,7 @@ async function putNodeTypeWithDedicatedHosts() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ async function putNodeTypeWithSharedGalleriesCustomVMImage() { const subscriptionId = @@ -470,7 +470,7 @@ async function putNodeTypeWithSharedGalleriesCustomVMImage() { * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. * * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json */ async function putNodeTypeWithVMImagePlan() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts index b29355aba785..7af7fd8dd226 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. * * @summary Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/DeleteNodes_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json */ async function deleteNodes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts index 91a8fa277440..84f845ad30e8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric node type of a given managed cluster. * * @summary Delete a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json */ async function deleteANodeType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts index b21d226dae72..251ba748bf5b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric node type of a given managed cluster. * * @summary Get a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json */ async function getANodeType() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts index 9b27c603f65d..945c4c71f509 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Node types of the specified managed cluster. * * @summary Gets all Node types of the specified managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypeListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json */ async function listNodeTypeOfTheSpecifiedManagedCluster() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts index 935ff57b321f..6fe76b1fcad1 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ReimageNodes_UD_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json */ async function reimageAllNodesByUpgradeDomain() { const subscriptionId = @@ -52,7 +52,7 @@ async function reimageAllNodesByUpgradeDomain() { * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ReimageNodes_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_example.json */ async function reimageNodes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts index 6005aff9bba9..812f6dbe75d5 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. * * @summary Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/RestartNodes_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json */ async function restartNodes() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts index 3db1c079faab..bf04827cecff 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. * * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json */ async function patchANodeType() { const subscriptionId = @@ -37,7 +37,7 @@ async function patchANodeType() { credential, subscriptionId, ); - const result = await client.nodeTypes.update( + const result = await client.nodeTypes.beginUpdateAndWait( resourceGroupName, clusterName, nodeTypeName, @@ -50,7 +50,7 @@ async function patchANodeType() { * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. * * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperationAutoScale_example.json */ async function patchANodeTypeWhileAutoScaling() { const subscriptionId = @@ -69,7 +69,7 @@ async function patchANodeTypeWhileAutoScaling() { credential, subscriptionId, ); - const result = await client.nodeTypes.update( + const result = await client.nodeTypes.beginUpdateAndWait( resourceGroupName, clusterName, nodeTypeName, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts index 351b8570cfa4..63c3d994d142 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get long running operation result. * * @summary Get long running operation result. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_result.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json */ async function getOperationResult() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts index 501e34b259a9..3a046824902e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get long running operation status. * * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_status_failed.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json */ async function getFailedOperationStatus() { const subscriptionId = @@ -39,7 +39,7 @@ async function getFailedOperationStatus() { * This sample demonstrates how to Get long running operation status. * * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Long_running_operation_status_succeeded.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_succeeded.json */ async function getSucceededOperationResult() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts index d51e4f3e5f3e..88704e413181 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get the list of available Service Fabric resource provider API operations. * * @summary Get the list of available Service Fabric resource provider API operations. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/Operations_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json */ async function listAvailableOperations() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts index 25fd7fabbf82..e6d7d339f63a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. * * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePutOperation_example_max.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json */ async function putAServiceWithMaximumParameters() { const subscriptionId = @@ -93,7 +93,7 @@ async function putAServiceWithMaximumParameters() { * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. * * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePutOperation_example_min.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_min.json */ async function putAServiceWithMinimumParameters() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts index 5cabe2b3c4b4..6f64769d5610 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Delete a Service Fabric managed service resource with the specified name. * * @summary Delete a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceDeleteOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json */ async function deleteAService() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts index 6a29f8869f72..9d337836973f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. * * @summary Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceGetOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json */ async function getAService() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts index e8120a7998c2..b9045108c8a9 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all service resources created or in the process of being created in the Service Fabric managed application resource. * * @summary Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServiceListOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json */ async function getAListOfServiceResources() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts index abd9e7d82768..d5c93990ac9b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates the tags of a service resource of a given managed cluster. * * @summary Updates the tags of a service resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-06-01-preview/examples/ServicePatchOperation_example.json + * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json */ async function patchAService() { const subscriptionId = diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts index 8e8469a0e442..e764e333953a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts @@ -859,7 +859,7 @@ export interface SubResource { /** Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM. */ export interface VaultCertificate { - /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
} */ + /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). */ certificateUrl: string; /** For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.

For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name .crt for the X509 certificate file and .prv for private key. Both of these files are .pem formatted. */ certificateStore: string; @@ -1423,7 +1423,7 @@ export interface ManagedCluster extends Resource { clusterUpgradeCadence?: ClusterUpgradeCadence; /** List of add-on features to enable on the cluster. */ addonFeatures?: ManagedClusterAddOnFeature[]; - /** Setting this to true enables automatic OS upgrade for the node types that are created using any platform OS image with version 'latest'. The default value for this setting is false. */ + /** Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false. */ enableAutoOSUpgrade?: boolean; /** Indicates if the cluster has zone resiliency. */ zonalResiliency?: boolean; @@ -1464,8 +1464,8 @@ export interface ManagedCluster extends Resource { enableHttpGatewayExclusiveAuthMode?: boolean; /** This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert. */ autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; - /** If using autoGeneratedDomainNameLabelScope, this is the fully qualified domain name using SFMC's domain, pointing to the public load balancer of the cluster. */ - customFqdn?: string; + /** The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. */ + allocatedOutboundPorts?: number; } /** Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ @@ -1735,6 +1735,14 @@ export interface NodeTypesCreateOrUpdateHeaders { location?: string; } +/** Defines headers for NodeTypes_update operation. */ +export interface NodeTypesUpdateHeaders { + /** The URL to get the status of an ongoing long-running operation. */ + azureAsyncOperation?: string; + /** The URL to get the status of a completed long-running operation. */ + location?: string; +} + /** Defines headers for NodeTypes_delete operation. */ export interface NodeTypesDeleteHeaders { /** The URL to get the status of an ongoing long-running operation. */ @@ -2995,7 +3003,12 @@ export type NodeTypesCreateOrUpdateResponse = NodeType; /** Optional parameters. */ export interface NodeTypesUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the update operation. */ export type NodeTypesUpdateResponse = NodeType; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/mappers.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/mappers.ts index 563c583e2650..df03057f06c7 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/mappers.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/mappers.ts @@ -3585,10 +3585,10 @@ export const ManagedCluster: coreClient.CompositeMapper = { name: "String", }, }, - customFqdn: { - serializedName: "properties.customFqdn", + allocatedOutboundPorts: { + serializedName: "properties.allocatedOutboundPorts", type: { - name: "String", + name: "Number", }, }, }, @@ -4419,6 +4419,27 @@ export const NodeTypesCreateOrUpdateHeaders: coreClient.CompositeMapper = { }, }; +export const NodeTypesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NodeTypesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + export const NodeTypesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/parameters.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/parameters.ts index 2c8e9833da46..aa2e79311cf4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/parameters.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/parameters.ts @@ -99,7 +99,7 @@ export const applicationTypeName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-06-01-preview", + defaultValue: "2024-09-01-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypes.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypes.ts index 89047f45afe7..b1e9057742ab 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypes.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypes.ts @@ -586,17 +586,102 @@ export class NodeTypesImpl implements NodeTypes { * @param parameters The parameters to update the node type configuration. * @param options The options parameters. */ - update( + async beginUpdate( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeUpdateParameters, + options?: NodeTypesUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + NodeTypesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + nodeTypeName, + parameters, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + NodeTypesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @param options The options parameters. + */ + async beginUpdateAndWait( resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeUpdateParameters, options?: NodeTypesUpdateOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nodeTypeName, parameters, options }, - updateOperationSpec, + const poller = await this.beginUpdate( + resourceGroupName, + clusterName, + nodeTypeName, + parameters, + options, ); + return poller.pollUntilDone(); } /** @@ -866,6 +951,15 @@ const updateOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.NodeType, }, + 201: { + bodyMapper: Mappers.NodeType, + }, + 202: { + bodyMapper: Mappers.NodeType, + }, + 204: { + bodyMapper: Mappers.NodeType, + }, default: { bodyMapper: Mappers.ErrorModel, }, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypes.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypes.ts index fdd9ec9f3363..c0704aa68158 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypes.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypes.ts @@ -191,7 +191,27 @@ export interface NodeTypes { * @param parameters The parameters to update the node type configuration. * @param options The options parameters. */ - update( + beginUpdate( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeUpdateParameters, + options?: NodeTypesUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + NodeTypesUpdateResponse + > + >; + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @param options The options parameters. + */ + beginUpdateAndWait( resourceGroupName: string, clusterName: string, nodeTypeName: string, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts index da931ef0effe..f760b25d70f9 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts @@ -137,7 +137,7 @@ export class ServiceFabricManagedClustersManagementClient extends coreClient.Ser // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-06-01-preview"; + this.apiVersion = options.apiVersion || "2024-09-01-preview"; this.applicationTypes = new ApplicationTypesImpl(this); this.applicationTypeVersions = new ApplicationTypeVersionsImpl(this); this.applications = new ApplicationsImpl(this); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json index 4b082159c24c..c52d183d5ced 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json @@ -23,8 +23,8 @@ } }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", + "src/**/*.ts", + "test/**/*.ts", "samples-dev/**/*.ts" ], "exclude": [ From b057083f15a0084c03b4c466c1dc47b4ef0f8a0b Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:06:04 +0800 Subject: [PATCH 16/55] [mgmt] cosmosdb preview release (#32295) https://github.com/Azure/sdk-release-request/issues/5734 --- common/config/rush/pnpm-lock.yaml | 84 +- sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md | 365 ++ sdk/cosmosdb/arm-cosmosdb/README.md | 6 +- sdk/cosmosdb/arm-cosmosdb/_meta.json | 2 +- sdk/cosmosdb/arm-cosmosdb/api-extractor.json | 6 +- sdk/cosmosdb/arm-cosmosdb/assets.json | 2 +- sdk/cosmosdb/arm-cosmosdb/package.json | 120 +- .../arm-cosmosdb/review/arm-cosmosdb.api.md | 1577 ++++- .../cassandraClustersCreateUpdateSample.ts | 8 +- .../cassandraClustersDeallocateSample.ts | 8 +- .../cassandraClustersDeleteSample.ts | 6 +- .../cassandraClustersGetBackupSample.ts | 43 + .../cassandraClustersGetCommandAsyncSample.ts | 43 + .../samples-dev/cassandraClustersGetSample.ts | 6 +- ...ssandraClustersInvokeCommandAsyncSample.ts | 50 + .../cassandraClustersInvokeCommandSample.ts | 11 +- .../cassandraClustersListBackupsSample.ts | 44 + ...sandraClustersListByResourceGroupSample.ts | 6 +- ...ssandraClustersListBySubscriptionSample.ts | 6 +- .../cassandraClustersListCommandSample.ts | 44 + .../cassandraClustersStartSample.ts | 8 +- .../cassandraClustersStatusSample.ts | 8 +- .../cassandraClustersUpdateSample.ts | 6 +- .../cassandraDataCentersCreateUpdateSample.ts | 6 +- .../cassandraDataCentersDeleteSample.ts | 6 +- .../cassandraDataCentersGetSample.ts | 6 +- .../cassandraDataCentersListSample.ts | 6 +- .../cassandraDataCentersUpdateSample.ts | 6 +- ...rcesCreateUpdateCassandraKeyspaceSample.ts | 6 +- ...sourcesCreateUpdateCassandraTableSample.ts | 7 +- ...esourcesCreateUpdateCassandraViewSample.ts | 57 + ...aResourcesDeleteCassandraKeyspaceSample.ts | 6 +- ...ndraResourcesDeleteCassandraTableSample.ts | 6 +- ...andraResourcesDeleteCassandraViewSample.ts | 43 + ...ndraResourcesGetCassandraKeyspaceSample.ts | 6 +- ...cesGetCassandraKeyspaceThroughputSample.ts | 6 +- ...ssandraResourcesGetCassandraTableSample.ts | 6 +- ...ourcesGetCassandraTableThroughputSample.ts | 6 +- ...assandraResourcesGetCassandraViewSample.ts | 42 + ...sourcesGetCassandraViewThroughputSample.ts | 42 + ...raResourcesListCassandraKeyspacesSample.ts | 6 +- ...andraResourcesListCassandraTablesSample.ts | 6 +- ...sandraResourcesListCassandraViewsSample.ts | 43 + ...grateCassandraKeyspaceToAutoscaleSample.ts | 6 +- ...ssandraKeyspaceToManualThroughputSample.ts | 6 +- ...sMigrateCassandraTableToAutoscaleSample.ts | 6 +- ...eCassandraTableToManualThroughputSample.ts | 6 +- ...esMigrateCassandraViewToAutoscaleSample.ts | 43 + ...teCassandraViewToManualThroughputSample.ts | 43 + ...UpdateCassandraKeyspaceThroughputSample.ts | 6 +- ...cesUpdateCassandraTableThroughputSample.ts | 6 +- ...rcesUpdateCassandraViewThroughputSample.ts | 51 + .../chaosFaultEnableDisableSample.ts | 53 + .../samples-dev/chaosFaultGetSample.ts | 42 + .../samples-dev/chaosFaultListSample.ts | 43 + .../collectionListMetricDefinitionsSample.ts | 6 +- .../collectionListMetricsSample.ts | 6 +- .../samples-dev/collectionListUsagesSample.ts | 6 +- .../collectionPartitionListMetricsSample.ts | 6 +- .../collectionPartitionListUsagesSample.ts | 6 +- ...lectionPartitionRegionListMetricsSample.ts | 6 +- .../collectionRegionListMetricsSample.ts | 6 +- .../dataTransferJobsCancelSample.ts | 40 + .../dataTransferJobsCompleteSample.ts | 42 + .../dataTransferJobsCreateSample.ts | 58 + .../samples-dev/dataTransferJobsGetSample.ts | 40 + ...TransferJobsListByDatabaseAccountSample.ts | 41 + .../dataTransferJobsPauseSample.ts | 40 + .../dataTransferJobsResumeSample.ts | 40 + .../databaseAccountRegionListMetricsSample.ts | 6 +- .../databaseAccountsCheckNameExistsSample.ts | 6 +- .../databaseAccountsCreateOrUpdateSample.ts | 16 +- .../databaseAccountsDeleteSample.ts | 6 +- ...aseAccountsFailoverPriorityChangeSample.ts | 6 +- .../databaseAccountsGetReadOnlyKeysSample.ts | 6 +- .../samples-dev/databaseAccountsGetSample.ts | 6 +- ...tabaseAccountsListByResourceGroupSample.ts | 6 +- ...baseAccountsListConnectionStringsSample.ts | 8 +- .../databaseAccountsListKeysSample.ts | 6 +- ...baseAccountsListMetricDefinitionsSample.ts | 6 +- .../databaseAccountsListMetricsSample.ts | 6 +- .../databaseAccountsListReadOnlyKeysSample.ts | 6 +- .../samples-dev/databaseAccountsListSample.ts | 6 +- .../databaseAccountsListUsagesSample.ts | 6 +- .../databaseAccountsOfflineRegionSample.ts | 6 +- .../databaseAccountsOnlineRegionSample.ts | 6 +- .../databaseAccountsRegenerateKeySample.ts | 6 +- .../databaseAccountsUpdateSample.ts | 12 +- .../databaseListMetricDefinitionsSample.ts | 6 +- .../samples-dev/databaseListMetricsSample.ts | 6 +- .../samples-dev/databaseListUsagesSample.ts | 6 +- .../graphResourcesCreateUpdateGraphSample.ts} | 28 +- ...graphResourcesDeleteGraphResourceSample.ts | 40 + .../graphResourcesGetGraphSample.ts | 40 + .../graphResourcesListGraphsSample.ts | 41 + ...ourcesCreateUpdateGremlinDatabaseSample.ts | 6 +- ...ResourcesCreateUpdateGremlinGraphSample.ts | 6 +- ...linResourcesDeleteGremlinDatabaseSample.ts | 6 +- ...remlinResourcesDeleteGremlinGraphSample.ts | 6 +- ...remlinResourcesGetGremlinDatabaseSample.ts | 6 +- ...urcesGetGremlinDatabaseThroughputSample.ts | 6 +- .../gremlinResourcesGetGremlinGraphSample.ts | 6 +- ...esourcesGetGremlinGraphThroughputSample.ts | 6 +- ...mlinResourcesListGremlinDatabasesSample.ts | 6 +- ...gremlinResourcesListGremlinGraphsSample.ts | 6 +- ...MigrateGremlinDatabaseToAutoscaleSample.ts | 6 +- ...GremlinDatabaseToManualThroughputSample.ts | 6 +- ...cesMigrateGremlinGraphToAutoscaleSample.ts | 6 +- ...ateGremlinGraphToManualThroughputSample.ts | 6 +- ...trieveContinuousBackupInformationSample.ts | 6 +- ...esUpdateGremlinDatabaseThroughputSample.ts | 6 +- ...urcesUpdateGremlinGraphThroughputSample.ts | 6 +- .../samples-dev/locationsGetSample.ts | 6 +- .../samples-dev/locationsListSample.ts | 6 +- ...rcesCreateUpdateMongoDbcollectionSample.ts | 49 +- ...ourcesCreateUpdateMongoDbdatabaseSample.ts | 46 +- ...esCreateUpdateMongoRoleDefinitionSample.ts | 6 +- ...esCreateUpdateMongoUserDefinitionSample.ts | 6 +- ...bResourcesDeleteMongoDbcollectionSample.ts | 6 +- ...oDbResourcesDeleteMongoDbdatabaseSample.ts | 6 +- ...esourcesDeleteMongoRoleDefinitionSample.ts | 6 +- ...esourcesDeleteMongoUserDefinitionSample.ts | 6 +- ...goDbResourcesGetMongoDbcollectionSample.ts | 6 +- ...cesGetMongoDbcollectionThroughputSample.ts | 6 +- ...ongoDbResourcesGetMongoDbdatabaseSample.ts | 6 +- ...urcesGetMongoDbdatabaseThroughputSample.ts | 6 +- ...DbResourcesGetMongoRoleDefinitionSample.ts | 6 +- ...DbResourcesGetMongoUserDefinitionSample.ts | 6 +- ...stMongoDbcollectionPartitionMergeSample.ts | 45 + ...DbResourcesListMongoDbcollectionsSample.ts | 6 +- ...goDbResourcesListMongoDbdatabasesSample.ts | 6 +- ...ResourcesListMongoRoleDefinitionsSample.ts | 6 +- ...ResourcesListMongoUserDefinitionsSample.ts | 6 +- ...grateMongoDbcollectionToAutoscaleSample.ts | 6 +- ...ngoDbcollectionToManualThroughputSample.ts | 6 +- ...MigrateMongoDbdatabaseToAutoscaleSample.ts | 6 +- ...MongoDbdatabaseToManualThroughputSample.ts | 6 +- ...DbcontainerRedistributeThroughputSample.ts | 60 + ...nerRetrieveThroughputDistributionSample.ts | 50 + ...rcesMongoDbdatabasePartitionMergeSample.ts | 43 + ...oDbdatabaseRedistributeThroughputSample.ts | 58 + ...aseRetrieveThroughputDistributionSample.ts | 48 + ...trieveContinuousBackupInformationSample.ts | 6 +- ...UpdateMongoDbcollectionThroughputSample.ts | 6 +- ...esUpdateMongoDbdatabaseThroughputSample.ts | 6 +- ...ecurityPerimeterConfigurationsGetSample.ts | 43 + ...curityPerimeterConfigurationsListSample.ts | 43 + ...yPerimeterConfigurationsReconcileSample.ts | 44 + .../notebookWorkspacesCreateOrUpdateSample.ts | 6 +- .../notebookWorkspacesDeleteSample.ts | 6 +- .../notebookWorkspacesGetSample.ts | 6 +- ...okWorkspacesListByDatabaseAccountSample.ts | 6 +- ...ebookWorkspacesListConnectionInfoSample.ts | 6 +- ...bookWorkspacesRegenerateAuthTokenSample.ts | 6 +- .../notebookWorkspacesStartSample.ts | 6 +- .../samples-dev/operationsListSample.ts | 6 +- .../partitionKeyRangeIdListMetricsSample.ts | 6 +- ...titionKeyRangeIdRegionListMetricsSample.ts | 6 +- .../percentileListMetricsSample.ts | 6 +- ...percentileSourceTargetListMetricsSample.ts | 6 +- .../percentileTargetListMetricsSample.ts | 6 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 6 +- .../privateEndpointConnectionsDeleteSample.ts | 6 +- .../privateEndpointConnectionsGetSample.ts | 6 +- ...tConnectionsListByDatabaseAccountSample.ts | 6 +- .../privateLinkResourcesGetSample.ts | 6 +- ...inkResourcesListByDatabaseAccountSample.ts | 6 +- ...ableDatabaseAccountsGetByLocationSample.ts | 6 +- ...bleDatabaseAccountsListByLocationSample.ts | 6 +- .../restorableDatabaseAccountsListSample.ts | 6 +- .../restorableGremlinDatabasesListSample.ts | 6 +- .../restorableGremlinGraphsListSample.ts | 6 +- .../restorableGremlinResourcesListSample.ts | 6 +- .../restorableMongodbCollectionsListSample.ts | 6 +- .../restorableMongodbDatabasesListSample.ts | 6 +- .../restorableMongodbResourcesListSample.ts | 6 +- .../restorableSqlContainersListSample.ts | 6 +- .../restorableSqlDatabasesListSample.ts | 6 +- .../restorableSqlResourcesListSample.ts | 6 +- .../restorableTableResourcesListSample.ts | 6 +- .../samples-dev/restorableTablesListSample.ts | 6 +- .../samples-dev/serviceCreateSample.ts | 12 +- .../samples-dev/serviceDeleteSample.ts | 12 +- .../samples-dev/serviceGetSample.ts | 12 +- .../samples-dev/serviceListSample.ts | 6 +- ...esCreateUpdateClientEncryptionKeySample.ts | 10 +- ...ResourcesCreateUpdateSqlContainerSample.ts | 100 +- ...lResourcesCreateUpdateSqlDatabaseSample.ts | 44 +- ...rcesCreateUpdateSqlRoleAssignmentSample.ts | 6 +- ...rcesCreateUpdateSqlRoleDefinitionSample.ts | 6 +- ...cesCreateUpdateSqlStoredProcedureSample.ts | 6 +- ...qlResourcesCreateUpdateSqlTriggerSample.ts | 6 +- ...reateUpdateSqlUserDefinedFunctionSample.ts | 6 +- .../sqlResourcesDeleteSqlContainerSample.ts | 6 +- .../sqlResourcesDeleteSqlDatabaseSample.ts | 6 +- ...lResourcesDeleteSqlRoleAssignmentSample.ts | 6 +- ...lResourcesDeleteSqlRoleDefinitionSample.ts | 6 +- ...ResourcesDeleteSqlStoredProcedureSample.ts | 6 +- .../sqlResourcesDeleteSqlTriggerSample.ts | 6 +- ...urcesDeleteSqlUserDefinedFunctionSample.ts | 6 +- ...qlResourcesGetClientEncryptionKeySample.ts | 6 +- .../sqlResourcesGetSqlContainerSample.ts | 6 +- ...esourcesGetSqlContainerThroughputSample.ts | 6 +- .../sqlResourcesGetSqlDatabaseSample.ts | 6 +- ...ResourcesGetSqlDatabaseThroughputSample.ts | 6 +- .../sqlResourcesGetSqlRoleAssignmentSample.ts | 6 +- .../sqlResourcesGetSqlRoleDefinitionSample.ts | 6 +- ...sqlResourcesGetSqlStoredProcedureSample.ts | 6 +- .../sqlResourcesGetSqlTriggerSample.ts | 6 +- ...esourcesGetSqlUserDefinedFunctionSample.ts | 6 +- ...ResourcesListClientEncryptionKeysSample.ts | 6 +- ...cesListSqlContainerPartitionMergeSample.ts | 45 + .../sqlResourcesListSqlContainersSample.ts | 6 +- .../sqlResourcesListSqlDatabasesSample.ts | 6 +- ...qlResourcesListSqlRoleAssignmentsSample.ts | 6 +- ...qlResourcesListSqlRoleDefinitionsSample.ts | 6 +- ...lResourcesListSqlStoredProceduresSample.ts | 6 +- .../sqlResourcesListSqlTriggersSample.ts | 6 +- ...ourcesListSqlUserDefinedFunctionsSample.ts | 6 +- ...cesMigrateSqlContainerToAutoscaleSample.ts | 6 +- ...ateSqlContainerToManualThroughputSample.ts | 6 +- ...rcesMigrateSqlDatabaseToAutoscaleSample.ts | 6 +- ...rateSqlDatabaseToManualThroughputSample.ts | 6 +- ...trieveContinuousBackupInformationSample.ts | 6 +- ...qlContainerRedistributeThroughputSample.ts | 60 + ...nerRetrieveThroughputDistributionSample.ts | 50 + ...esourcesSqlDatabasePartitionMergeSample.ts | 43 + ...SqlDatabaseRedistributeThroughputSample.ts | 58 + ...seRetrieveThroughputDistributionSample.ts} | 30 +- ...urcesUpdateSqlContainerThroughputSample.ts | 6 +- ...ourcesUpdateSqlDatabaseThroughputSample.ts | 6 +- ...esCreateUpdateTableRoleAssignmentSample.ts | 56 + ...esCreateUpdateTableRoleDefinitionSample.ts | 66 + .../tableResourcesCreateUpdateTableSample.ts | 6 +- ...esourcesDeleteTableRoleAssignmentSample.ts | 44 + ...esourcesDeleteTableRoleDefinitionSample.ts | 44 + .../tableResourcesDeleteTableSample.ts | 6 +- ...leResourcesGetTableRoleAssignmentSample.ts | 43 + ...leResourcesGetTableRoleDefinitionSample.ts | 43 + .../tableResourcesGetTableSample.ts | 6 +- .../tableResourcesGetTableThroughputSample.ts | 6 +- ...ResourcesListTableRoleAssignmentsSample.ts | 44 + ...ResourcesListTableRoleDefinitionsSample.ts | 44 + .../tableResourcesListTablesSample.ts | 6 +- ...eResourcesMigrateTableToAutoscaleSample.ts | 6 +- ...cesMigrateTableToManualThroughputSample.ts | 6 +- ...trieveContinuousBackupInformationSample.ts | 6 +- ...bleResourcesUpdateTableThroughputSample.ts | 6 +- .../throughputPoolAccountCreateSample.ts | 51 + .../throughputPoolAccountDeleteSample.ts | 42 + .../throughputPoolAccountGetSample.ts | 42 + .../throughputPoolAccountsListSample.ts | 43 + .../throughputPoolCreateOrUpdateSample.ts | 49 + .../samples-dev/throughputPoolDeleteSample.ts | 40 + .../samples-dev/throughputPoolGetSample.ts | 40 + .../samples-dev/throughputPoolUpdateSample.ts | 47 + ...hroughputPoolsListByResourceGroupSample.ts | 41 + .../samples-dev/throughputPoolsListSample.ts | 38 + .../samples/v16-beta/javascript/README.md | 548 ++ .../cassandraClustersCreateUpdateSample.js | 6 +- .../cassandraClustersDeallocateSample.js | 6 +- .../cassandraClustersDeleteSample.js | 4 +- .../cassandraClustersGetBackupSample.js | 37 + .../cassandraClustersGetCommandAsyncSample.js | 41 + .../javascript/cassandraClustersGetSample.js | 4 +- ...ssandraClustersInvokeCommandAsyncSample.js | 45 + .../cassandraClustersInvokeCommandSample.js | 9 +- .../cassandraClustersListBackupsSample.js | 39 + ...sandraClustersListByResourceGroupSample.js | 4 +- ...ssandraClustersListBySubscriptionSample.js | 4 +- .../cassandraClustersListCommandSample.js | 39 + .../cassandraClustersStartSample.js | 6 +- .../cassandraClustersStatusSample.js | 6 +- .../cassandraClustersUpdateSample.js | 4 +- .../cassandraDataCentersCreateUpdateSample.js | 4 +- .../cassandraDataCentersDeleteSample.js | 4 +- .../cassandraDataCentersGetSample.js | 4 +- .../cassandraDataCentersListSample.js | 4 +- .../cassandraDataCentersUpdateSample.js | 4 +- ...rcesCreateUpdateCassandraKeyspaceSample.js | 4 +- ...sourcesCreateUpdateCassandraTableSample.js | 5 +- ...esourcesCreateUpdateCassandraViewSample.js | 52 + ...aResourcesDeleteCassandraKeyspaceSample.js | 4 +- ...ndraResourcesDeleteCassandraTableSample.js | 4 +- ...andraResourcesDeleteCassandraViewSample.js | 42 + ...ndraResourcesGetCassandraKeyspaceSample.js | 4 +- ...cesGetCassandraKeyspaceThroughputSample.js | 4 +- ...ssandraResourcesGetCassandraTableSample.js | 4 +- ...ourcesGetCassandraTableThroughputSample.js | 4 +- ...assandraResourcesGetCassandraViewSample.js | 42 + ...sourcesGetCassandraViewThroughputSample.js | 42 + ...raResourcesListCassandraKeyspacesSample.js | 4 +- ...andraResourcesListCassandraTablesSample.js | 4 +- ...sandraResourcesListCassandraViewsSample.js | 43 + ...grateCassandraKeyspaceToAutoscaleSample.js | 4 +- ...ssandraKeyspaceToManualThroughputSample.js | 4 +- ...sMigrateCassandraTableToAutoscaleSample.js | 4 +- ...eCassandraTableToManualThroughputSample.js | 4 +- ...esMigrateCassandraViewToAutoscaleSample.js | 42 + ...teCassandraViewToManualThroughputSample.js | 42 + ...UpdateCassandraKeyspaceThroughputSample.js | 4 +- ...cesUpdateCassandraTableThroughputSample.js | 4 +- ...rcesUpdateCassandraViewThroughputSample.js | 47 + .../chaosFaultEnableDisableSample.js | 48 + .../javascript/chaosFaultGetSample.js | 37 + .../javascript/chaosFaultListSample.js | 39 + .../collectionListMetricDefinitionsSample.js | 4 +- .../javascript/collectionListMetricsSample.js | 4 +- .../javascript/collectionListUsagesSample.js | 4 +- .../collectionPartitionListMetricsSample.js | 4 +- .../collectionPartitionListUsagesSample.js | 4 +- ...lectionPartitionRegionListMetricsSample.js | 4 +- .../collectionRegionListMetricsSample.js | 4 +- .../dataTransferJobsCancelSample.js | 36 + .../dataTransferJobsCompleteSample.js | 37 + .../dataTransferJobsCreateSample.js | 55 + .../javascript/dataTransferJobsGetSample.js | 36 + ...TransferJobsListByDatabaseAccountSample.js | 41 + .../javascript/dataTransferJobsPauseSample.js | 36 + .../dataTransferJobsResumeSample.js | 36 + .../databaseAccountRegionListMetricsSample.js | 4 +- .../databaseAccountsCheckNameExistsSample.js | 4 +- .../databaseAccountsCreateOrUpdateSample.js | 14 +- .../databaseAccountsDeleteSample.js | 4 +- ...aseAccountsFailoverPriorityChangeSample.js | 4 +- .../databaseAccountsGetReadOnlyKeysSample.js | 4 +- .../javascript/databaseAccountsGetSample.js | 4 +- ...tabaseAccountsListByResourceGroupSample.js | 4 +- ...baseAccountsListConnectionStringsSample.js | 6 +- .../databaseAccountsListKeysSample.js | 4 +- ...baseAccountsListMetricDefinitionsSample.js | 4 +- .../databaseAccountsListMetricsSample.js | 4 +- .../databaseAccountsListReadOnlyKeysSample.js | 4 +- .../javascript/databaseAccountsListSample.js | 4 +- .../databaseAccountsListUsagesSample.js | 4 +- .../databaseAccountsOfflineRegionSample.js | 4 +- .../databaseAccountsOnlineRegionSample.js | 4 +- .../databaseAccountsRegenerateKeySample.js | 4 +- .../databaseAccountsUpdateSample.js | 10 +- .../databaseListMetricDefinitionsSample.js | 4 +- .../javascript/databaseListMetricsSample.js | 4 +- .../javascript/databaseListUsagesSample.js | 4 +- .../graphResourcesCreateUpdateGraphSample.js} | 24 +- ...graphResourcesDeleteGraphResourceSample.js | 40 + .../graphResourcesGetGraphSample.js | 36 + .../graphResourcesListGraphsSample.js | 38 + ...ourcesCreateUpdateGremlinDatabaseSample.js | 4 +- ...ResourcesCreateUpdateGremlinGraphSample.js | 4 +- ...linResourcesDeleteGremlinDatabaseSample.js | 4 +- ...remlinResourcesDeleteGremlinGraphSample.js | 4 +- ...remlinResourcesGetGremlinDatabaseSample.js | 4 +- ...urcesGetGremlinDatabaseThroughputSample.js | 4 +- .../gremlinResourcesGetGremlinGraphSample.js | 4 +- ...esourcesGetGremlinGraphThroughputSample.js | 4 +- ...mlinResourcesListGremlinDatabasesSample.js | 4 +- ...gremlinResourcesListGremlinGraphsSample.js | 4 +- ...MigrateGremlinDatabaseToAutoscaleSample.js | 4 +- ...GremlinDatabaseToManualThroughputSample.js | 4 +- ...cesMigrateGremlinGraphToAutoscaleSample.js | 4 +- ...ateGremlinGraphToManualThroughputSample.js | 4 +- ...trieveContinuousBackupInformationSample.js | 4 +- ...esUpdateGremlinDatabaseThroughputSample.js | 4 +- ...urcesUpdateGremlinGraphThroughputSample.js | 4 +- .../javascript/locationsGetSample.js | 4 +- .../javascript/locationsListSample.js | 4 +- ...rcesCreateUpdateMongoDbcollectionSample.js | 100 + ...ourcesCreateUpdateMongoDbdatabaseSample.js | 85 + ...esCreateUpdateMongoRoleDefinitionSample.js | 4 +- ...esCreateUpdateMongoUserDefinitionSample.js | 4 +- ...bResourcesDeleteMongoDbcollectionSample.js | 4 +- ...oDbResourcesDeleteMongoDbdatabaseSample.js | 4 +- ...esourcesDeleteMongoRoleDefinitionSample.js | 4 +- ...esourcesDeleteMongoUserDefinitionSample.js | 4 +- ...goDbResourcesGetMongoDbcollectionSample.js | 4 +- ...cesGetMongoDbcollectionThroughputSample.js | 4 +- ...ongoDbResourcesGetMongoDbdatabaseSample.js | 4 +- ...urcesGetMongoDbdatabaseThroughputSample.js | 4 +- ...DbResourcesGetMongoRoleDefinitionSample.js | 4 +- ...DbResourcesGetMongoUserDefinitionSample.js | 4 +- ...tMongoDbcollectionPartitionMergeSample.js} | 27 +- ...DbResourcesListMongoDbcollectionsSample.js | 4 +- ...goDbResourcesListMongoDbdatabasesSample.js | 4 +- ...ResourcesListMongoRoleDefinitionsSample.js | 4 +- ...ResourcesListMongoUserDefinitionsSample.js | 4 +- ...grateMongoDbcollectionToAutoscaleSample.js | 4 +- ...ngoDbcollectionToManualThroughputSample.js | 4 +- ...MigrateMongoDbdatabaseToAutoscaleSample.js | 4 +- ...MongoDbdatabaseToManualThroughputSample.js | 4 +- ...bcontainerRedistributeThroughputSample.js} | 34 +- ...nerRetrieveThroughputDistributionSample.js | 47 + ...rcesMongoDbdatabasePartitionMergeSample.js | 42 + ...oDbdatabaseRedistributeThroughputSample.js | 51 + ...aseRetrieveThroughputDistributionSample.js | 45 + ...trieveContinuousBackupInformationSample.js | 4 +- ...UpdateMongoDbcollectionThroughputSample.js | 4 +- ...esUpdateMongoDbdatabaseThroughputSample.js | 4 +- ...ecurityPerimeterConfigurationsGetSample.js | 42 + ...curityPerimeterConfigurationsListSample.js | 42 + ...yPerimeterConfigurationsReconcileSample.js | 42 + .../notebookWorkspacesCreateOrUpdateSample.js | 4 +- .../notebookWorkspacesDeleteSample.js | 4 +- .../javascript/notebookWorkspacesGetSample.js | 4 +- ...okWorkspacesListByDatabaseAccountSample.js | 4 +- ...ebookWorkspacesListConnectionInfoSample.js | 4 +- ...bookWorkspacesRegenerateAuthTokenSample.js | 4 +- .../notebookWorkspacesStartSample.js | 4 +- .../javascript/operationsListSample.js | 4 +- .../{v16 => v16-beta}/javascript/package.json | 6 +- .../partitionKeyRangeIdListMetricsSample.js | 4 +- ...titionKeyRangeIdRegionListMetricsSample.js | 4 +- .../javascript/percentileListMetricsSample.js | 4 +- ...percentileSourceTargetListMetricsSample.js | 4 +- .../percentileTargetListMetricsSample.js | 4 +- ...EndpointConnectionsCreateOrUpdateSample.js | 4 +- .../privateEndpointConnectionsDeleteSample.js | 4 +- .../privateEndpointConnectionsGetSample.js | 4 +- ...tConnectionsListByDatabaseAccountSample.js | 4 +- .../privateLinkResourcesGetSample.js | 4 +- ...inkResourcesListByDatabaseAccountSample.js | 4 +- ...ableDatabaseAccountsGetByLocationSample.js | 4 +- ...bleDatabaseAccountsListByLocationSample.js | 4 +- .../restorableDatabaseAccountsListSample.js | 4 +- .../restorableGremlinDatabasesListSample.js | 4 +- .../restorableGremlinGraphsListSample.js | 4 +- .../restorableGremlinResourcesListSample.js | 4 +- .../restorableMongodbCollectionsListSample.js | 4 +- .../restorableMongodbDatabasesListSample.js | 4 +- .../restorableMongodbResourcesListSample.js | 4 +- .../restorableSqlContainersListSample.js | 4 +- .../restorableSqlDatabasesListSample.js | 4 +- .../restorableSqlResourcesListSample.js | 4 +- .../restorableTableResourcesListSample.js | 4 +- .../javascript/restorableTablesListSample.js | 4 +- .../{v16 => v16-beta}/javascript/sample.env | 0 .../javascript/serviceCreateSample.js | 10 +- .../javascript/serviceDeleteSample.js | 10 +- .../javascript/serviceGetSample.js | 10 +- .../javascript/serviceListSample.js | 4 +- ...esCreateUpdateClientEncryptionKeySample.js | 8 +- ...ResourcesCreateUpdateSqlContainerSample.js | 96 +- ...lResourcesCreateUpdateSqlDatabaseSample.js | 85 + ...rcesCreateUpdateSqlRoleAssignmentSample.js | 4 +- ...rcesCreateUpdateSqlRoleDefinitionSample.js | 4 +- ...cesCreateUpdateSqlStoredProcedureSample.js | 4 +- ...qlResourcesCreateUpdateSqlTriggerSample.js | 4 +- ...reateUpdateSqlUserDefinedFunctionSample.js | 4 +- .../sqlResourcesDeleteSqlContainerSample.js | 4 +- .../sqlResourcesDeleteSqlDatabaseSample.js | 4 +- ...lResourcesDeleteSqlRoleAssignmentSample.js | 4 +- ...lResourcesDeleteSqlRoleDefinitionSample.js | 4 +- ...ResourcesDeleteSqlStoredProcedureSample.js | 4 +- .../sqlResourcesDeleteSqlTriggerSample.js | 4 +- ...urcesDeleteSqlUserDefinedFunctionSample.js | 4 +- ...qlResourcesGetClientEncryptionKeySample.js | 4 +- .../sqlResourcesGetSqlContainerSample.js | 4 +- ...esourcesGetSqlContainerThroughputSample.js | 4 +- .../sqlResourcesGetSqlDatabaseSample.js | 4 +- ...ResourcesGetSqlDatabaseThroughputSample.js | 4 +- .../sqlResourcesGetSqlRoleAssignmentSample.js | 4 +- .../sqlResourcesGetSqlRoleDefinitionSample.js | 4 +- ...sqlResourcesGetSqlStoredProcedureSample.js | 4 +- .../sqlResourcesGetSqlTriggerSample.js | 4 +- ...esourcesGetSqlUserDefinedFunctionSample.js | 4 +- ...ResourcesListClientEncryptionKeysSample.js | 4 +- ...cesListSqlContainerPartitionMergeSample.js | 44 + .../sqlResourcesListSqlContainersSample.js | 4 +- .../sqlResourcesListSqlDatabasesSample.js | 4 +- ...qlResourcesListSqlRoleAssignmentsSample.js | 4 +- ...qlResourcesListSqlRoleDefinitionsSample.js | 4 +- ...lResourcesListSqlStoredProceduresSample.js | 4 +- .../sqlResourcesListSqlTriggersSample.js | 4 +- ...ourcesListSqlUserDefinedFunctionsSample.js | 4 +- ...cesMigrateSqlContainerToAutoscaleSample.js | 4 +- ...ateSqlContainerToManualThroughputSample.js | 4 +- ...rcesMigrateSqlDatabaseToAutoscaleSample.js | 4 +- ...rateSqlDatabaseToManualThroughputSample.js | 4 +- ...trieveContinuousBackupInformationSample.js | 4 +- ...qlContainerRedistributeThroughputSample.js | 53 + ...nerRetrieveThroughputDistributionSample.js | 46 + ...esourcesSqlDatabasePartitionMergeSample.js | 42 + ...SqlDatabaseRedistributeThroughputSample.js | 51 + ...aseRetrieveThroughputDistributionSample.js | 44 + ...urcesUpdateSqlContainerThroughputSample.js | 4 +- ...ourcesUpdateSqlDatabaseThroughputSample.js | 4 +- ...esCreateUpdateTableRoleAssignmentSample.js | 49 + ...esCreateUpdateTableRoleDefinitionSample.js | 59 + .../tableResourcesCreateUpdateTableSample.js | 4 +- ...esourcesDeleteTableRoleAssignmentSample.js | 41 + ...esourcesDeleteTableRoleDefinitionSample.js | 41 + .../tableResourcesDeleteTableSample.js | 4 +- ...leResourcesGetTableRoleAssignmentSample.js | 41 + ...leResourcesGetTableRoleDefinitionSample.js | 41 + .../tableResourcesGetTableSample.js | 4 +- .../tableResourcesGetTableThroughputSample.js | 4 +- ...ResourcesListTableRoleAssignmentsSample.js | 42 + ...ResourcesListTableRoleDefinitionsSample.js | 42 + .../tableResourcesListTablesSample.js | 4 +- ...eResourcesMigrateTableToAutoscaleSample.js | 4 +- ...cesMigrateTableToManualThroughputSample.js | 4 +- ...trieveContinuousBackupInformationSample.js | 4 +- ...bleResourcesUpdateTableThroughputSample.js | 4 +- .../throughputPoolAccountCreateSample.js | 47 + .../throughputPoolAccountDeleteSample.js | 41 + .../throughputPoolAccountGetSample.js | 41 + .../throughputPoolAccountsListSample.js | 42 + .../throughputPoolCreateOrUpdateSample.js | 45 + .../javascript/throughputPoolDeleteSample.js | 39 + .../javascript/throughputPoolGetSample.js | 36 + .../javascript/throughputPoolUpdateSample.js | 42 + ...hroughputPoolsListByResourceGroupSample.js | 38 + .../javascript/throughputPoolsListSample.js | 37 + .../samples/v16-beta/typescript/README.md | 561 ++ .../{v16 => v16-beta}/typescript/package.json | 8 +- .../{v16 => v16-beta}/typescript/sample.env | 0 .../cassandraClustersCreateUpdateSample.ts | 8 +- .../src/cassandraClustersDeallocateSample.ts | 8 +- .../src/cassandraClustersDeleteSample.ts | 6 +- .../src/cassandraClustersGetBackupSample.ts | 43 + .../cassandraClustersGetCommandAsyncSample.ts | 43 + .../src/cassandraClustersGetSample.ts | 6 +- ...ssandraClustersInvokeCommandAsyncSample.ts | 50 + .../cassandraClustersInvokeCommandSample.ts | 11 +- .../src/cassandraClustersListBackupsSample.ts | 44 + ...sandraClustersListByResourceGroupSample.ts | 6 +- ...ssandraClustersListBySubscriptionSample.ts | 6 +- .../src/cassandraClustersListCommandSample.ts | 44 + .../src/cassandraClustersStartSample.ts | 8 +- .../src/cassandraClustersStatusSample.ts | 8 +- .../src/cassandraClustersUpdateSample.ts | 6 +- .../cassandraDataCentersCreateUpdateSample.ts | 6 +- .../src/cassandraDataCentersDeleteSample.ts | 6 +- .../src/cassandraDataCentersGetSample.ts | 6 +- .../src/cassandraDataCentersListSample.ts | 6 +- .../src/cassandraDataCentersUpdateSample.ts | 6 +- ...rcesCreateUpdateCassandraKeyspaceSample.ts | 6 +- ...sourcesCreateUpdateCassandraTableSample.ts | 7 +- ...esourcesCreateUpdateCassandraViewSample.ts | 57 + ...aResourcesDeleteCassandraKeyspaceSample.ts | 6 +- ...ndraResourcesDeleteCassandraTableSample.ts | 6 +- ...andraResourcesDeleteCassandraViewSample.ts | 43 + ...ndraResourcesGetCassandraKeyspaceSample.ts | 6 +- ...cesGetCassandraKeyspaceThroughputSample.ts | 6 +- ...ssandraResourcesGetCassandraTableSample.ts | 6 +- ...ourcesGetCassandraTableThroughputSample.ts | 6 +- ...assandraResourcesGetCassandraViewSample.ts | 42 + ...sourcesGetCassandraViewThroughputSample.ts | 42 + ...raResourcesListCassandraKeyspacesSample.ts | 6 +- ...andraResourcesListCassandraTablesSample.ts | 6 +- ...sandraResourcesListCassandraViewsSample.ts | 43 + ...grateCassandraKeyspaceToAutoscaleSample.ts | 6 +- ...ssandraKeyspaceToManualThroughputSample.ts | 6 +- ...sMigrateCassandraTableToAutoscaleSample.ts | 6 +- ...eCassandraTableToManualThroughputSample.ts | 6 +- ...esMigrateCassandraViewToAutoscaleSample.ts | 43 + ...teCassandraViewToManualThroughputSample.ts | 43 + ...UpdateCassandraKeyspaceThroughputSample.ts | 6 +- ...cesUpdateCassandraTableThroughputSample.ts | 6 +- ...rcesUpdateCassandraViewThroughputSample.ts | 51 + .../src/chaosFaultEnableDisableSample.ts | 53 + .../typescript/src/chaosFaultGetSample.ts | 42 + .../typescript/src/chaosFaultListSample.ts | 43 + .../collectionListMetricDefinitionsSample.ts | 6 +- .../src/collectionListMetricsSample.ts | 6 +- .../src/collectionListUsagesSample.ts | 6 +- .../collectionPartitionListMetricsSample.ts | 6 +- .../collectionPartitionListUsagesSample.ts | 6 +- ...lectionPartitionRegionListMetricsSample.ts | 6 +- .../src/collectionRegionListMetricsSample.ts | 6 +- .../src/dataTransferJobsCancelSample.ts | 40 + .../src/dataTransferJobsCompleteSample.ts | 42 + .../src/dataTransferJobsCreateSample.ts | 58 + .../src/dataTransferJobsGetSample.ts | 40 + ...TransferJobsListByDatabaseAccountSample.ts | 41 + .../src/dataTransferJobsPauseSample.ts | 40 + .../src/dataTransferJobsResumeSample.ts | 40 + .../databaseAccountRegionListMetricsSample.ts | 6 +- .../databaseAccountsCheckNameExistsSample.ts | 6 +- .../databaseAccountsCreateOrUpdateSample.ts | 16 +- .../src/databaseAccountsDeleteSample.ts | 6 +- ...aseAccountsFailoverPriorityChangeSample.ts | 6 +- .../databaseAccountsGetReadOnlyKeysSample.ts | 6 +- .../src/databaseAccountsGetSample.ts | 6 +- ...tabaseAccountsListByResourceGroupSample.ts | 6 +- ...baseAccountsListConnectionStringsSample.ts | 8 +- .../src/databaseAccountsListKeysSample.ts | 6 +- ...baseAccountsListMetricDefinitionsSample.ts | 6 +- .../src/databaseAccountsListMetricsSample.ts | 6 +- .../databaseAccountsListReadOnlyKeysSample.ts | 6 +- .../src/databaseAccountsListSample.ts | 6 +- .../src/databaseAccountsListUsagesSample.ts | 6 +- .../databaseAccountsOfflineRegionSample.ts | 6 +- .../src/databaseAccountsOnlineRegionSample.ts | 6 +- .../databaseAccountsRegenerateKeySample.ts | 6 +- .../src/databaseAccountsUpdateSample.ts | 12 +- .../databaseListMetricDefinitionsSample.ts | 6 +- .../src/databaseListMetricsSample.ts | 6 +- .../src/databaseListUsagesSample.ts | 6 +- .../graphResourcesCreateUpdateGraphSample.ts | 50 + ...graphResourcesDeleteGraphResourceSample.ts | 40 + .../src/graphResourcesGetGraphSample.ts | 40 + .../src/graphResourcesListGraphsSample.ts | 41 + ...ourcesCreateUpdateGremlinDatabaseSample.ts | 6 +- ...ResourcesCreateUpdateGremlinGraphSample.ts | 6 +- ...linResourcesDeleteGremlinDatabaseSample.ts | 6 +- ...remlinResourcesDeleteGremlinGraphSample.ts | 6 +- ...remlinResourcesGetGremlinDatabaseSample.ts | 6 +- ...urcesGetGremlinDatabaseThroughputSample.ts | 6 +- .../gremlinResourcesGetGremlinGraphSample.ts | 6 +- ...esourcesGetGremlinGraphThroughputSample.ts | 6 +- ...mlinResourcesListGremlinDatabasesSample.ts | 6 +- ...gremlinResourcesListGremlinGraphsSample.ts | 6 +- ...MigrateGremlinDatabaseToAutoscaleSample.ts | 6 +- ...GremlinDatabaseToManualThroughputSample.ts | 6 +- ...cesMigrateGremlinGraphToAutoscaleSample.ts | 6 +- ...ateGremlinGraphToManualThroughputSample.ts | 6 +- ...trieveContinuousBackupInformationSample.ts | 6 +- ...esUpdateGremlinDatabaseThroughputSample.ts | 6 +- ...urcesUpdateGremlinGraphThroughputSample.ts | 6 +- .../typescript/src/locationsGetSample.ts | 6 +- .../typescript/src/locationsListSample.ts | 6 +- ...rcesCreateUpdateMongoDbcollectionSample.ts | 49 +- ...ourcesCreateUpdateMongoDbdatabaseSample.ts | 92 + ...esCreateUpdateMongoRoleDefinitionSample.ts | 6 +- ...esCreateUpdateMongoUserDefinitionSample.ts | 6 +- ...bResourcesDeleteMongoDbcollectionSample.ts | 6 +- ...oDbResourcesDeleteMongoDbdatabaseSample.ts | 6 +- ...esourcesDeleteMongoRoleDefinitionSample.ts | 6 +- ...esourcesDeleteMongoUserDefinitionSample.ts | 6 +- ...goDbResourcesGetMongoDbcollectionSample.ts | 6 +- ...cesGetMongoDbcollectionThroughputSample.ts | 6 +- ...ongoDbResourcesGetMongoDbdatabaseSample.ts | 6 +- ...urcesGetMongoDbdatabaseThroughputSample.ts | 6 +- ...DbResourcesGetMongoRoleDefinitionSample.ts | 6 +- ...DbResourcesGetMongoUserDefinitionSample.ts | 6 +- ...stMongoDbcollectionPartitionMergeSample.ts | 45 + ...DbResourcesListMongoDbcollectionsSample.ts | 6 +- ...goDbResourcesListMongoDbdatabasesSample.ts | 6 +- ...ResourcesListMongoRoleDefinitionsSample.ts | 6 +- ...ResourcesListMongoUserDefinitionsSample.ts | 6 +- ...grateMongoDbcollectionToAutoscaleSample.ts | 6 +- ...ngoDbcollectionToManualThroughputSample.ts | 6 +- ...MigrateMongoDbdatabaseToAutoscaleSample.ts | 6 +- ...MongoDbdatabaseToManualThroughputSample.ts | 6 +- ...DbcontainerRedistributeThroughputSample.ts | 60 + ...nerRetrieveThroughputDistributionSample.ts | 50 + ...rcesMongoDbdatabasePartitionMergeSample.ts | 43 + ...oDbdatabaseRedistributeThroughputSample.ts | 58 + ...aseRetrieveThroughputDistributionSample.ts | 48 + ...trieveContinuousBackupInformationSample.ts | 6 +- ...UpdateMongoDbcollectionThroughputSample.ts | 6 +- ...esUpdateMongoDbdatabaseThroughputSample.ts | 6 +- ...ecurityPerimeterConfigurationsGetSample.ts | 43 + ...curityPerimeterConfigurationsListSample.ts | 43 + ...yPerimeterConfigurationsReconcileSample.ts | 44 + .../notebookWorkspacesCreateOrUpdateSample.ts | 6 +- .../src/notebookWorkspacesDeleteSample.ts | 6 +- .../src/notebookWorkspacesGetSample.ts | 6 +- ...okWorkspacesListByDatabaseAccountSample.ts | 6 +- ...ebookWorkspacesListConnectionInfoSample.ts | 6 +- ...bookWorkspacesRegenerateAuthTokenSample.ts | 6 +- .../src/notebookWorkspacesStartSample.ts | 6 +- .../typescript/src/operationsListSample.ts | 6 +- .../partitionKeyRangeIdListMetricsSample.ts | 6 +- ...titionKeyRangeIdRegionListMetricsSample.ts | 6 +- .../src/percentileListMetricsSample.ts | 6 +- ...percentileSourceTargetListMetricsSample.ts | 6 +- .../src/percentileTargetListMetricsSample.ts | 6 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 6 +- .../privateEndpointConnectionsDeleteSample.ts | 6 +- .../privateEndpointConnectionsGetSample.ts | 6 +- ...tConnectionsListByDatabaseAccountSample.ts | 6 +- .../src/privateLinkResourcesGetSample.ts | 6 +- ...inkResourcesListByDatabaseAccountSample.ts | 6 +- ...ableDatabaseAccountsGetByLocationSample.ts | 6 +- ...bleDatabaseAccountsListByLocationSample.ts | 6 +- .../restorableDatabaseAccountsListSample.ts | 6 +- .../restorableGremlinDatabasesListSample.ts | 6 +- .../src/restorableGremlinGraphsListSample.ts | 6 +- .../restorableGremlinResourcesListSample.ts | 6 +- .../restorableMongodbCollectionsListSample.ts | 6 +- .../restorableMongodbDatabasesListSample.ts | 6 +- .../restorableMongodbResourcesListSample.ts | 6 +- .../src/restorableSqlContainersListSample.ts | 6 +- .../src/restorableSqlDatabasesListSample.ts | 6 +- .../src/restorableSqlResourcesListSample.ts | 6 +- .../src/restorableTableResourcesListSample.ts | 6 +- .../src/restorableTablesListSample.ts | 6 +- .../typescript/src/serviceCreateSample.ts | 12 +- .../typescript/src/serviceDeleteSample.ts | 12 +- .../typescript/src/serviceGetSample.ts | 12 +- .../typescript/src/serviceListSample.ts | 6 +- ...esCreateUpdateClientEncryptionKeySample.ts | 10 +- ...ResourcesCreateUpdateSqlContainerSample.ts | 100 +- ...lResourcesCreateUpdateSqlDatabaseSample.ts | 88 + ...rcesCreateUpdateSqlRoleAssignmentSample.ts | 6 +- ...rcesCreateUpdateSqlRoleDefinitionSample.ts | 6 +- ...cesCreateUpdateSqlStoredProcedureSample.ts | 6 +- ...qlResourcesCreateUpdateSqlTriggerSample.ts | 6 +- ...reateUpdateSqlUserDefinedFunctionSample.ts | 6 +- .../sqlResourcesDeleteSqlContainerSample.ts | 6 +- .../sqlResourcesDeleteSqlDatabaseSample.ts | 6 +- ...lResourcesDeleteSqlRoleAssignmentSample.ts | 6 +- ...lResourcesDeleteSqlRoleDefinitionSample.ts | 6 +- ...ResourcesDeleteSqlStoredProcedureSample.ts | 6 +- .../src/sqlResourcesDeleteSqlTriggerSample.ts | 6 +- ...urcesDeleteSqlUserDefinedFunctionSample.ts | 6 +- ...qlResourcesGetClientEncryptionKeySample.ts | 6 +- .../src/sqlResourcesGetSqlContainerSample.ts | 6 +- ...esourcesGetSqlContainerThroughputSample.ts | 6 +- .../src/sqlResourcesGetSqlDatabaseSample.ts | 6 +- ...ResourcesGetSqlDatabaseThroughputSample.ts | 6 +- .../sqlResourcesGetSqlRoleAssignmentSample.ts | 6 +- .../sqlResourcesGetSqlRoleDefinitionSample.ts | 6 +- ...sqlResourcesGetSqlStoredProcedureSample.ts | 6 +- .../src/sqlResourcesGetSqlTriggerSample.ts | 6 +- ...esourcesGetSqlUserDefinedFunctionSample.ts | 6 +- ...ResourcesListClientEncryptionKeysSample.ts | 6 +- ...cesListSqlContainerPartitionMergeSample.ts | 45 + .../sqlResourcesListSqlContainersSample.ts | 6 +- .../src/sqlResourcesListSqlDatabasesSample.ts | 6 +- ...qlResourcesListSqlRoleAssignmentsSample.ts | 6 +- ...qlResourcesListSqlRoleDefinitionsSample.ts | 6 +- ...lResourcesListSqlStoredProceduresSample.ts | 6 +- .../src/sqlResourcesListSqlTriggersSample.ts | 6 +- ...ourcesListSqlUserDefinedFunctionsSample.ts | 6 +- ...cesMigrateSqlContainerToAutoscaleSample.ts | 6 +- ...ateSqlContainerToManualThroughputSample.ts | 6 +- ...rcesMigrateSqlDatabaseToAutoscaleSample.ts | 6 +- ...rateSqlDatabaseToManualThroughputSample.ts | 6 +- ...trieveContinuousBackupInformationSample.ts | 6 +- ...qlContainerRedistributeThroughputSample.ts | 60 + ...nerRetrieveThroughputDistributionSample.ts | 50 + ...esourcesSqlDatabasePartitionMergeSample.ts | 43 + ...SqlDatabaseRedistributeThroughputSample.ts | 58 + ...aseRetrieveThroughputDistributionSample.ts | 48 + ...urcesUpdateSqlContainerThroughputSample.ts | 6 +- ...ourcesUpdateSqlDatabaseThroughputSample.ts | 6 +- ...esCreateUpdateTableRoleAssignmentSample.ts | 56 + ...esCreateUpdateTableRoleDefinitionSample.ts | 66 + .../tableResourcesCreateUpdateTableSample.ts | 6 +- ...esourcesDeleteTableRoleAssignmentSample.ts | 44 + ...esourcesDeleteTableRoleDefinitionSample.ts | 44 + .../src/tableResourcesDeleteTableSample.ts | 6 +- ...leResourcesGetTableRoleAssignmentSample.ts | 43 + ...leResourcesGetTableRoleDefinitionSample.ts | 43 + .../src/tableResourcesGetTableSample.ts | 6 +- .../tableResourcesGetTableThroughputSample.ts | 6 +- ...ResourcesListTableRoleAssignmentsSample.ts | 44 + ...ResourcesListTableRoleDefinitionsSample.ts | 44 + .../src/tableResourcesListTablesSample.ts | 6 +- ...eResourcesMigrateTableToAutoscaleSample.ts | 6 +- ...cesMigrateTableToManualThroughputSample.ts | 6 +- ...trieveContinuousBackupInformationSample.ts | 6 +- ...bleResourcesUpdateTableThroughputSample.ts | 6 +- .../src/throughputPoolAccountCreateSample.ts | 51 + .../src/throughputPoolAccountDeleteSample.ts | 42 + .../src/throughputPoolAccountGetSample.ts | 42 + .../src/throughputPoolAccountsListSample.ts | 43 + .../src/throughputPoolCreateOrUpdateSample.ts | 49 + .../src/throughputPoolDeleteSample.ts | 40 + .../typescript/src/throughputPoolGetSample.ts | 40 + .../src/throughputPoolUpdateSample.ts | 47 + ...hroughputPoolsListByResourceGroupSample.ts | 41 + .../src/throughputPoolsListSample.ts | 38 + .../typescript/tsconfig.json | 0 .../samples/v16/javascript/README.md | 428 -- .../samples/v16/typescript/README.md | 441 -- .../src/cosmosDBManagementClient.ts | 45 +- sdk/cosmosdb/arm-cosmosdb/src/index.ts | 8 +- sdk/cosmosdb/arm-cosmosdb/src/models/index.ts | 2706 +++++++- .../arm-cosmosdb/src/models/mappers.ts | 5820 ++++++++++++----- .../arm-cosmosdb/src/models/parameters.ts | 293 +- .../src/operations/cassandraClusters.ts | 435 +- .../src/operations/cassandraDataCenters.ts | 16 +- .../src/operations/cassandraResources.ts | 1273 +++- .../arm-cosmosdb/src/operations/chaosFault.ts | 383 ++ .../arm-cosmosdb/src/operations/collection.ts | 10 +- .../src/operations/collectionPartition.ts | 10 +- .../operations/collectionPartitionRegion.ts | 10 +- .../src/operations/collectionRegion.ts | 10 +- .../src/operations/dataTransferJobs.ts | 464 ++ .../arm-cosmosdb/src/operations/database.ts | 10 +- .../src/operations/databaseAccountRegion.ts | 10 +- .../src/operations/databaseAccounts.ts | 12 +- .../src/operations/graphResources.ts | 418 ++ .../src/operations/gremlinResources.ts | 28 +- .../arm-cosmosdb/src/operations/index.ts | 82 +- .../arm-cosmosdb/src/operations/locations.ts | 10 +- .../src/operations/mongoDBResources.ts | 995 ++- .../networkSecurityPerimeterConfigurations.ts | 389 ++ .../src/operations/notebookWorkspaces.ts | 12 +- .../arm-cosmosdb/src/operations/operations.ts | 12 +- .../src/operations/partitionKeyRangeId.ts | 10 +- .../operations/partitionKeyRangeIdRegion.ts | 10 +- .../arm-cosmosdb/src/operations/percentile.ts | 10 +- .../src/operations/percentileSourceTarget.ts | 10 +- .../src/operations/percentileTarget.ts | 10 +- .../operations/privateEndpointConnections.ts | 12 +- .../src/operations/privateLinkResources.ts | 10 +- .../operations/restorableDatabaseAccounts.ts | 10 +- .../operations/restorableGremlinDatabases.ts | 10 +- .../src/operations/restorableGremlinGraphs.ts | 10 +- .../operations/restorableGremlinResources.ts | 10 +- .../restorableMongodbCollections.ts | 10 +- .../operations/restorableMongodbDatabases.ts | 10 +- .../operations/restorableMongodbResources.ts | 10 +- .../src/operations/restorableSqlContainers.ts | 10 +- .../src/operations/restorableSqlDatabases.ts | 10 +- .../src/operations/restorableSqlResources.ts | 10 +- .../operations/restorableTableResources.ts | 10 +- .../src/operations/restorableTables.ts | 10 +- .../arm-cosmosdb/src/operations/service.ts | 12 +- .../src/operations/sqlResources.ts | 1772 +++-- .../src/operations/tableResources.ts | 1124 +++- .../src/operations/throughputPool.ts | 454 ++ .../src/operations/throughputPoolAccount.ts | 361 + .../src/operations/throughputPoolAccounts.ts | 197 + .../src/operations/throughputPools.ts | 298 + .../operationsInterfaces/cassandraClusters.ts | 92 +- .../cassandraDataCenters.ts | 2 +- .../cassandraResources.ts | 242 +- .../src/operationsInterfaces/chaosFault.ts | 82 + .../src/operationsInterfaces/collection.ts | 2 +- .../collectionPartition.ts | 2 +- .../collectionPartitionRegion.ts | 2 +- .../operationsInterfaces/collectionRegion.ts | 2 +- .../operationsInterfaces/dataTransferJobs.ts | 122 + .../src/operationsInterfaces/database.ts | 2 +- .../databaseAccountRegion.ts | 2 +- .../operationsInterfaces/databaseAccounts.ts | 2 +- .../operationsInterfaces/graphResources.ts | 110 + .../operationsInterfaces/gremlinResources.ts | 2 +- .../src/operationsInterfaces/index.ts | 82 +- .../src/operationsInterfaces/locations.ts | 2 +- .../operationsInterfaces/mongoDBResources.ts | 247 +- .../networkSecurityPerimeterConfigurations.ts | 81 + .../notebookWorkspaces.ts | 2 +- .../src/operationsInterfaces/operations.ts | 2 +- .../partitionKeyRangeId.ts | 2 +- .../partitionKeyRangeIdRegion.ts | 2 +- .../src/operationsInterfaces/percentile.ts | 2 +- .../percentileSourceTarget.ts | 2 +- .../operationsInterfaces/percentileTarget.ts | 2 +- .../privateEndpointConnections.ts | 2 +- .../privateLinkResources.ts | 2 +- .../restorableDatabaseAccounts.ts | 2 +- .../restorableGremlinDatabases.ts | 2 +- .../restorableGremlinGraphs.ts | 2 +- .../restorableGremlinResources.ts | 2 +- .../restorableMongodbCollections.ts | 2 +- .../restorableMongodbDatabases.ts | 2 +- .../restorableMongodbResources.ts | 2 +- .../restorableSqlContainers.ts | 2 +- .../restorableSqlDatabases.ts | 2 +- .../restorableSqlResources.ts | 2 +- .../restorableTableResources.ts | 2 +- .../operationsInterfaces/restorableTables.ts | 2 +- .../src/operationsInterfaces/service.ts | 2 +- .../src/operationsInterfaces/sqlResources.ts | 331 +- .../operationsInterfaces/tableResources.ts | 190 +- .../operationsInterfaces/throughputPool.ts | 122 + .../throughputPoolAccount.ts | 103 + .../throughputPoolAccounts.ts | 29 + .../operationsInterfaces/throughputPools.ts | 35 + ...ts => cosmosdb_cassandra_examples.spec.ts} | 32 +- ..._examples.ts => cosmosdb_examples.spec.ts} | 24 +- ...s.ts => cosmosdb_mongodb_examples.spec.ts} | 30 +- .../arm-cosmosdb/tsconfig.browser.config.json | 17 + sdk/cosmosdb/arm-cosmosdb/tsconfig.json | 40 +- .../arm-cosmosdb/tsconfig.samples.json | 10 + sdk/cosmosdb/arm-cosmosdb/tsconfig.src.json | 3 + sdk/cosmosdb/arm-cosmosdb/tsconfig.test.json | 6 + .../arm-cosmosdb/vitest.browser.config.ts | 17 + sdk/cosmosdb/arm-cosmosdb/vitest.config.ts | 15 + .../arm-cosmosdb/vitest.esm.config.ts | 12 + 875 files changed, 30081 insertions(+), 6128 deletions(-) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetBackupSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetCommandAsyncSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersInvokeCommandAsyncSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListBackupsSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListCommandSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraViewSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraViewSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraViewSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraViewThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraViewsSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraViewThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultEnableDisableSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultListSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCancelSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCompleteSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCreateSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsListByDatabaseAccountSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsPauseSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsResumeSample.ts rename sdk/cosmosdb/arm-cosmosdb/{samples/v16/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts => samples-dev/graphResourcesCreateUpdateGraphSample.ts} (62%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesDeleteGraphResourceSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesGetGraphSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesListGraphsSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlContainerPartitionMergeSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlContainerRedistributeThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabasePartitionMergeSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabaseRedistributeThroughputSample.ts rename sdk/cosmosdb/arm-cosmosdb/{samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts => samples-dev/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts} (57%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableRoleAssignmentSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableRoleDefinitionSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableRoleAssignmentSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableRoleDefinitionSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableRoleAssignmentSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableRoleDefinitionSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTableRoleAssignmentsSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTableRoleDefinitionsSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountCreateSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountDeleteSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountsListSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolCreateOrUpdateSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolDeleteSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolUpdateSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolsListByResourceGroupSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolsListSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/README.md rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersCreateUpdateSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersDeallocateSample.js (88%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersDeleteSample.js (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetBackupSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetCommandAsyncSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersGetSample.js (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersInvokeCommandAsyncSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersInvokeCommandSample.js (83%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListBackupsSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersListByResourceGroupSample.js (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersListBySubscriptionSample.js (90%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListCommandSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersStartSample.js (88%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersStatusSample.js (86%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraClustersUpdateSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraDataCentersCreateUpdateSample.js (94%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraDataCentersDeleteSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraDataCentersGetSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraDataCentersListSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraDataCentersUpdateSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesCreateUpdateCassandraKeyspaceSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesCreateUpdateCassandraTableSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraViewSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesDeleteCassandraKeyspaceSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesDeleteCassandraTableSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraViewSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesGetCassandraKeyspaceSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesGetCassandraKeyspaceThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesGetCassandraTableSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesGetCassandraTableThroughputSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewThroughputSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesListCassandraKeyspacesSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesListCassandraTablesSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraViewsSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesMigrateCassandraTableToAutoscaleSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesMigrateCassandraTableToManualThroughputSample.js (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToAutoscaleSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToManualThroughputSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/cassandraResourcesUpdateCassandraTableThroughputSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraViewThroughputSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultEnableDisableSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultGetSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultListSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/collectionListMetricDefinitionsSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/collectionListMetricsSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/collectionListUsagesSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/collectionPartitionListMetricsSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/collectionPartitionListUsagesSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/collectionPartitionRegionListMetricsSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/collectionRegionListMetricsSample.js (93%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCancelSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCompleteSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCreateSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsGetSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsListByDatabaseAccountSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsPauseSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsResumeSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountRegionListMetricsSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsCheckNameExistsSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsCreateOrUpdateSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsDeleteSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsFailoverPriorityChangeSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsGetReadOnlyKeysSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsGetSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsListByResourceGroupSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsListConnectionStringsSample.js (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsListKeysSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsListMetricDefinitionsSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsListMetricsSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsListReadOnlyKeysSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsListSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsListUsagesSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsOfflineRegionSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsOnlineRegionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsRegenerateKeySample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseAccountsUpdateSample.js (89%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseListMetricDefinitionsSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseListMetricsSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/databaseListUsagesSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js => v16-beta/javascript/graphResourcesCreateUpdateGraphSample.js} (66%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesDeleteGraphResourceSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesGetGraphSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesListGraphsSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesCreateUpdateGremlinDatabaseSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesCreateUpdateGremlinGraphSample.js (94%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesDeleteGremlinDatabaseSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesDeleteGremlinGraphSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesGetGremlinDatabaseSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesGetGremlinDatabaseThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesGetGremlinGraphSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesGetGremlinGraphThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesListGremlinDatabasesSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesListGremlinGraphsSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesRetrieveContinuousBackupInformationSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesUpdateGremlinDatabaseThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/gremlinResourcesUpdateGremlinGraphThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/locationsGetSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/locationsListSample.js (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesDeleteMongoDbcollectionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesDeleteMongoDbdatabaseSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesDeleteMongoRoleDefinitionSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesDeleteMongoUserDefinitionSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesGetMongoDbcollectionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesGetMongoDbcollectionThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesGetMongoDbdatabaseSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesGetMongoDbdatabaseThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesGetMongoRoleDefinitionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesGetMongoUserDefinitionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js => v16-beta/javascript/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.js} (60%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesListMongoDbcollectionsSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesListMongoDbdatabasesSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesListMongoRoleDefinitionsSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesListMongoUserDefinitionsSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js => v16-beta/javascript/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.js} (56%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabasePartitionMergeSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesRetrieveContinuousBackupInformationSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsGetSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsListSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/notebookWorkspacesCreateOrUpdateSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/notebookWorkspacesDeleteSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/notebookWorkspacesGetSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/notebookWorkspacesListByDatabaseAccountSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/notebookWorkspacesListConnectionInfoSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/notebookWorkspacesRegenerateAuthTokenSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/notebookWorkspacesStartSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/operationsListSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/package.json (81%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/partitionKeyRangeIdListMetricsSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/partitionKeyRangeIdRegionListMetricsSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/percentileListMetricsSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/percentileSourceTargetListMetricsSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/percentileTargetListMetricsSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/privateEndpointConnectionsCreateOrUpdateSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/privateEndpointConnectionsDeleteSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/privateEndpointConnectionsGetSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/privateEndpointConnectionsListByDatabaseAccountSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/privateLinkResourcesGetSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/privateLinkResourcesListByDatabaseAccountSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableDatabaseAccountsGetByLocationSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableDatabaseAccountsListByLocationSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableDatabaseAccountsListSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableGremlinDatabasesListSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableGremlinGraphsListSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableGremlinResourcesListSample.js (94%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableMongodbCollectionsListSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableMongodbDatabasesListSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableMongodbResourcesListSample.js (94%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableSqlContainersListSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableSqlDatabasesListSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableSqlResourcesListSample.js (94%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableTableResourcesListSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/restorableTablesListSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sample.env (100%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/serviceCreateSample.js (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/serviceDeleteSample.js (88%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/serviceGetSample.js (88%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/serviceListSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesCreateUpdateClientEncryptionKeySample.js (84%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesCreateUpdateSqlContainerSample.js (50%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesCreateUpdateSqlRoleAssignmentSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesCreateUpdateSqlRoleDefinitionSample.js (94%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesCreateUpdateSqlStoredProcedureSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesCreateUpdateSqlTriggerSample.js (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesDeleteSqlContainerSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesDeleteSqlDatabaseSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesDeleteSqlRoleAssignmentSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesDeleteSqlRoleDefinitionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesDeleteSqlStoredProcedureSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesDeleteSqlTriggerSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesDeleteSqlUserDefinedFunctionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetClientEncryptionKeySample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetSqlContainerSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetSqlContainerThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetSqlDatabaseSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetSqlDatabaseThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetSqlRoleAssignmentSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetSqlRoleDefinitionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetSqlStoredProcedureSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetSqlTriggerSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesGetSqlUserDefinedFunctionSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesListClientEncryptionKeysSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlContainerPartitionMergeSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesListSqlContainersSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesListSqlDatabasesSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesListSqlRoleAssignmentsSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesListSqlRoleDefinitionsSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesListSqlStoredProceduresSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesListSqlTriggersSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesListSqlUserDefinedFunctionsSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesMigrateSqlContainerToAutoscaleSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesMigrateSqlContainerToManualThroughputSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesRetrieveContinuousBackupInformationSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRedistributeThroughputSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabasePartitionMergeSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRedistributeThroughputSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesUpdateSqlContainerThroughputSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/sqlResourcesUpdateSqlDatabaseThroughputSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleAssignmentSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleDefinitionSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/tableResourcesCreateUpdateTableSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleAssignmentSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleDefinitionSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/tableResourcesDeleteTableSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleAssignmentSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleDefinitionSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/tableResourcesGetTableSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/tableResourcesGetTableThroughputSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleAssignmentsSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleDefinitionsSample.js rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/tableResourcesListTablesSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/tableResourcesMigrateTableToAutoscaleSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/tableResourcesMigrateTableToManualThroughputSample.js (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/tableResourcesRetrieveContinuousBackupInformationSample.js (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/javascript/tableResourcesUpdateTableThroughputSample.js (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountCreateSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountDeleteSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountGetSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountsListSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolCreateOrUpdateSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolDeleteSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolGetSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolUpdateSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListByResourceGroupSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListSample.js create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/README.md rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/package.json (81%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/sample.env (100%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersCreateUpdateSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersDeallocateSample.ts (89%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersDeleteSample.ts (90%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetBackupSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetCommandAsyncSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersGetSample.ts (90%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersInvokeCommandAsyncSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersInvokeCommandSample.ts (86%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListBackupsSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersListByResourceGroupSample.ts (89%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersListBySubscriptionSample.ts (88%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListCommandSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersStartSample.ts (89%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersStatusSample.ts (88%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraClustersUpdateSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraDataCentersCreateUpdateSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraDataCentersDeleteSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraDataCentersGetSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraDataCentersListSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraDataCentersUpdateSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesCreateUpdateCassandraTableSample.ts (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraViewSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesDeleteCassandraKeyspaceSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesDeleteCassandraTableSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraViewSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesGetCassandraKeyspaceSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesGetCassandraTableSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesGetCassandraTableThroughputSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewThroughputSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesListCassandraKeyspacesSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesListCassandraTablesSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraViewsSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts (90%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/cassandraResourcesUpdateCassandraTableThroughputSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraViewThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultEnableDisableSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultListSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/collectionListMetricDefinitionsSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/collectionListMetricsSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/collectionListUsagesSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/collectionPartitionListMetricsSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/collectionPartitionListUsagesSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/collectionPartitionRegionListMetricsSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/collectionRegionListMetricsSample.ts (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCancelSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCompleteSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCreateSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsListByDatabaseAccountSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsPauseSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsResumeSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountRegionListMetricsSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsCheckNameExistsSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsCreateOrUpdateSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsDeleteSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsFailoverPriorityChangeSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsGetReadOnlyKeysSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsGetSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsListByResourceGroupSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsListConnectionStringsSample.ts (89%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsListKeysSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsListMetricDefinitionsSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsListMetricsSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsListReadOnlyKeysSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsListSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsListUsagesSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsOfflineRegionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsOnlineRegionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsRegenerateKeySample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseAccountsUpdateSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseListMetricDefinitionsSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseListMetricsSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/databaseListUsagesSample.ts (92%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesCreateUpdateGraphSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesDeleteGraphResourceSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesGetGraphSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesListGraphsSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesCreateUpdateGremlinGraphSample.ts (94%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesDeleteGremlinDatabaseSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesDeleteGremlinGraphSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesGetGremlinDatabaseSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesGetGremlinDatabaseThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesGetGremlinGraphSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesGetGremlinGraphThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesListGremlinDatabasesSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesListGremlinGraphsSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesRetrieveContinuousBackupInformationSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/gremlinResourcesUpdateGremlinGraphThroughputSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/locationsGetSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/locationsListSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts (52%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesDeleteMongoDbcollectionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesDeleteMongoDbdatabaseSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesDeleteMongoUserDefinitionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesGetMongoDbcollectionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesGetMongoDbdatabaseSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesGetMongoRoleDefinitionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesGetMongoUserDefinitionSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesListMongoDbcollectionsSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesListMongoDbdatabasesSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesListMongoRoleDefinitionsSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesListMongoUserDefinitionsSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts (90%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/notebookWorkspacesCreateOrUpdateSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/notebookWorkspacesDeleteSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/notebookWorkspacesGetSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/notebookWorkspacesListByDatabaseAccountSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/notebookWorkspacesListConnectionInfoSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/notebookWorkspacesRegenerateAuthTokenSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/notebookWorkspacesStartSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/operationsListSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/partitionKeyRangeIdListMetricsSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/partitionKeyRangeIdRegionListMetricsSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/percentileListMetricsSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/percentileSourceTargetListMetricsSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/percentileTargetListMetricsSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/privateEndpointConnectionsDeleteSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/privateEndpointConnectionsGetSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/privateEndpointConnectionsListByDatabaseAccountSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/privateLinkResourcesGetSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/privateLinkResourcesListByDatabaseAccountSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableDatabaseAccountsGetByLocationSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableDatabaseAccountsListByLocationSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableDatabaseAccountsListSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableGremlinDatabasesListSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableGremlinGraphsListSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableGremlinResourcesListSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableMongodbCollectionsListSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableMongodbDatabasesListSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableMongodbResourcesListSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableSqlContainersListSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableSqlDatabasesListSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableSqlResourcesListSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableTableResourcesListSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/restorableTablesListSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/serviceCreateSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/serviceDeleteSample.ts (88%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/serviceGetSample.ts (88%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/serviceListSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesCreateUpdateClientEncryptionKeySample.ts (85%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesCreateUpdateSqlContainerSample.ts (50%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts (93%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts (94%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesCreateUpdateSqlTriggerSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesDeleteSqlContainerSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesDeleteSqlDatabaseSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesDeleteSqlRoleAssignmentSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesDeleteSqlRoleDefinitionSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesDeleteSqlStoredProcedureSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesDeleteSqlTriggerSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetClientEncryptionKeySample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetSqlContainerSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetSqlContainerThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetSqlDatabaseSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetSqlDatabaseThroughputSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetSqlRoleAssignmentSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetSqlRoleDefinitionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetSqlStoredProcedureSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetSqlTriggerSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesGetSqlUserDefinedFunctionSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesListClientEncryptionKeysSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlContainerPartitionMergeSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesListSqlContainersSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesListSqlDatabasesSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesListSqlRoleAssignmentsSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesListSqlRoleDefinitionsSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesListSqlStoredProceduresSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesListSqlTriggersSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesListSqlUserDefinedFunctionsSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesRetrieveContinuousBackupInformationSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRedistributeThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabasePartitionMergeSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRedistributeThroughputSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesUpdateSqlContainerThroughputSample.ts (92%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/sqlResourcesUpdateSqlDatabaseThroughputSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleAssignmentSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleDefinitionSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/tableResourcesCreateUpdateTableSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleAssignmentSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleDefinitionSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/tableResourcesDeleteTableSample.ts (90%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleAssignmentSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleDefinitionSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/tableResourcesGetTableSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/tableResourcesGetTableThroughputSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleAssignmentsSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleDefinitionsSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/tableResourcesListTablesSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/tableResourcesMigrateTableToAutoscaleSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/tableResourcesMigrateTableToManualThroughputSample.ts (90%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/tableResourcesRetrieveContinuousBackupInformationSample.ts (91%) rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/src/tableResourcesUpdateTableThroughputSample.ts (91%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountCreateSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountDeleteSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountsListSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolCreateOrUpdateSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolDeleteSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolGetSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolUpdateSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListByResourceGroupSample.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListSample.ts rename sdk/cosmosdb/arm-cosmosdb/samples/{v16 => v16-beta}/typescript/tsconfig.json (100%) delete mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/README.md delete mode 100644 sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/README.md create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/chaosFault.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/networkSecurityPerimeterConfigurations.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPool.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccount.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccounts.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPools.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/chaosFault.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPool.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccount.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccounts.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPools.ts rename sdk/cosmosdb/arm-cosmosdb/test/{cosmosdb_cassandra_examples.ts => cosmosdb_cassandra_examples.spec.ts} (87%) rename sdk/cosmosdb/arm-cosmosdb/test/{cosmosdb_examples.ts => cosmosdb_examples.spec.ts} (86%) rename sdk/cosmosdb/arm-cosmosdb/test/{cosmosdb_mongodb_examples.ts => cosmosdb_mongodb_examples.spec.ts} (87%) create mode 100644 sdk/cosmosdb/arm-cosmosdb/tsconfig.browser.config.json create mode 100644 sdk/cosmosdb/arm-cosmosdb/tsconfig.samples.json create mode 100644 sdk/cosmosdb/arm-cosmosdb/tsconfig.src.json create mode 100644 sdk/cosmosdb/arm-cosmosdb/tsconfig.test.json create mode 100644 sdk/cosmosdb/arm-cosmosdb/vitest.browser.config.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/vitest.config.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/vitest.esm.config.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 44a647676fd5..654376987382 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -231,7 +231,7 @@ importers: version: file:projects/arm-containerservicefleet.tgz '@rush-temp/arm-cosmosdb': specifier: file:./projects/arm-cosmosdb.tgz - version: file:projects/arm-cosmosdb.tgz + version: file:projects/arm-cosmosdb.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-cosmosdbforpostgresql': specifier: file:./projects/arm-cosmosdbforpostgresql.tgz version: file:projects/arm-cosmosdbforpostgresql.tgz @@ -2732,7 +2732,7 @@ packages: version: 0.0.0 '@rush-temp/arm-cosmosdb@file:projects/arm-cosmosdb.tgz': - resolution: {integrity: sha512-OrO8Gtlec2DgGUqu/bAelwZ/7QtHLWHEO8GRp6leoDkMPWu2CtRgMfNEK1RPhHTdDDmbTxr7H2gM2X6kW5ds5w==, tarball: file:projects/arm-cosmosdb.tgz} + resolution: {integrity: sha512-cSPC4jbGfSubLak2/CA0k7BZPxEe8anbRVm7Yez2jfroCkk37J+YCsulwQrb5B5MBGE2zGVN+HNFJApIh0dvQw==, tarball: file:projects/arm-cosmosdb.tgz} version: 0.0.0 '@rush-temp/arm-cosmosdbforpostgresql@file:projects/arm-cosmosdbforpostgresql.tgz': @@ -11486,25 +11486,37 @@ snapshots: - '@swc/wasm' - supports-color - '@rush-temp/arm-cosmosdb@file:projects/arm-cosmosdb.tgz': + '@rush-temp/arm-cosmosdb@file:projects/arm-cosmosdb.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.7.2 + typescript: 5.6.3 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio '@rush-temp/arm-cosmosdbforpostgresql@file:projects/arm-cosmosdbforpostgresql.tgz': dependencies: @@ -20350,6 +20362,27 @@ snapshots: '@ungap/structured-clone@1.2.1': {} + '@vitest/browser@2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)': + dependencies: + '@testing-library/dom': 10.4.0 + '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) + '@vitest/mocker': 2.1.8(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) + '@vitest/utils': 2.1.8 + magic-string: 0.30.15 + msw: 2.6.8(@types/node@18.19.68)(typescript@5.6.3) + sirv: 3.0.0 + tinyrainbow: 1.2.0 + vitest: 2.1.8(@types/node@22.7.9)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) + ws: 8.18.0 + optionalDependencies: + playwright: 1.49.1 + transitivePeerDependencies: + - '@types/node' + - bufferutil + - typescript + - utf-8-validate + - vite + '@vitest/browser@2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)': dependencies: '@testing-library/dom': 10.4.0 @@ -22745,6 +22778,31 @@ snapshots: ms@2.1.3: {} + msw@2.6.8(@types/node@18.19.68)(typescript@5.6.3): + dependencies: + '@bundled-es-modules/cookie': 2.0.1 + '@bundled-es-modules/statuses': 1.0.1 + '@bundled-es-modules/tough-cookie': 0.1.6 + '@inquirer/confirm': 5.1.0(@types/node@18.19.68) + '@mswjs/interceptors': 0.37.3 + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.5 + chalk: 4.1.2 + graphql: 16.9.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + strict-event-emitter: 0.5.1 + type-fest: 4.30.1 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - '@types/node' + msw@2.6.8(@types/node@18.19.68)(typescript@5.7.2): dependencies: '@bundled-es-modules/cookie': 2.0.1 diff --git a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md index 581fe8bc8146..3eeb4f95b1a0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md +++ b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md @@ -1,5 +1,370 @@ # Release History +## 16.3.0-beta.1 (2024-12-19) +Compared with version 16.2.0 + +### Features Added + + - Added operation group ChaosFault + - Added operation group DataTransferJobs + - Added operation group GraphResources + - Added operation group NetworkSecurityPerimeterConfigurations + - Added operation group ThroughputPool + - Added operation group ThroughputPoolAccount + - Added operation group ThroughputPoolAccounts + - Added operation group ThroughputPools + - Added operation CassandraClusters.beginInvokeCommandAsync + - Added operation CassandraClusters.beginInvokeCommandAsyncAndWait + - Added operation CassandraClusters.getBackup + - Added operation CassandraClusters.getCommandAsync + - Added operation CassandraClusters.listBackups + - Added operation CassandraClusters.listCommand + - Added operation CassandraResources.beginCreateUpdateCassandraView + - Added operation CassandraResources.beginCreateUpdateCassandraViewAndWait + - Added operation CassandraResources.beginDeleteCassandraView + - Added operation CassandraResources.beginDeleteCassandraViewAndWait + - Added operation CassandraResources.beginMigrateCassandraViewToAutoscale + - Added operation CassandraResources.beginMigrateCassandraViewToAutoscaleAndWait + - Added operation CassandraResources.beginMigrateCassandraViewToManualThroughput + - Added operation CassandraResources.beginMigrateCassandraViewToManualThroughputAndWait + - Added operation CassandraResources.beginUpdateCassandraViewThroughput + - Added operation CassandraResources.beginUpdateCassandraViewThroughputAndWait + - Added operation CassandraResources.getCassandraView + - Added operation CassandraResources.getCassandraViewThroughput + - Added operation CassandraResources.listCassandraViews + - Added operation MongoDBResources.beginListMongoDBCollectionPartitionMerge + - Added operation MongoDBResources.beginListMongoDBCollectionPartitionMergeAndWait + - Added operation MongoDBResources.beginMongoDBContainerRedistributeThroughput + - Added operation MongoDBResources.beginMongoDBContainerRedistributeThroughputAndWait + - Added operation MongoDBResources.beginMongoDBContainerRetrieveThroughputDistribution + - Added operation MongoDBResources.beginMongoDBContainerRetrieveThroughputDistributionAndWait + - Added operation MongoDBResources.beginMongoDBDatabasePartitionMerge + - Added operation MongoDBResources.beginMongoDBDatabasePartitionMergeAndWait + - Added operation MongoDBResources.beginMongoDBDatabaseRedistributeThroughput + - Added operation MongoDBResources.beginMongoDBDatabaseRedistributeThroughputAndWait + - Added operation MongoDBResources.beginMongoDBDatabaseRetrieveThroughputDistribution + - Added operation MongoDBResources.beginMongoDBDatabaseRetrieveThroughputDistributionAndWait + - Added operation SqlResources.beginListSqlContainerPartitionMerge + - Added operation SqlResources.beginListSqlContainerPartitionMergeAndWait + - Added operation SqlResources.beginSqlContainerRedistributeThroughput + - Added operation SqlResources.beginSqlContainerRedistributeThroughputAndWait + - Added operation SqlResources.beginSqlContainerRetrieveThroughputDistribution + - Added operation SqlResources.beginSqlContainerRetrieveThroughputDistributionAndWait + - Added operation SqlResources.beginSqlDatabasePartitionMerge + - Added operation SqlResources.beginSqlDatabasePartitionMergeAndWait + - Added operation SqlResources.beginSqlDatabaseRedistributeThroughput + - Added operation SqlResources.beginSqlDatabaseRedistributeThroughputAndWait + - Added operation SqlResources.beginSqlDatabaseRetrieveThroughputDistribution + - Added operation SqlResources.beginSqlDatabaseRetrieveThroughputDistributionAndWait + - Added operation TableResources.beginCreateUpdateTableRoleAssignment + - Added operation TableResources.beginCreateUpdateTableRoleAssignmentAndWait + - Added operation TableResources.beginCreateUpdateTableRoleDefinition + - Added operation TableResources.beginCreateUpdateTableRoleDefinitionAndWait + - Added operation TableResources.beginDeleteTableRoleAssignment + - Added operation TableResources.beginDeleteTableRoleAssignmentAndWait + - Added operation TableResources.beginDeleteTableRoleDefinition + - Added operation TableResources.beginDeleteTableRoleDefinitionAndWait + - Added operation TableResources.getTableRoleAssignment + - Added operation TableResources.getTableRoleDefinition + - Added operation TableResources.listTableRoleAssignments + - Added operation TableResources.listTableRoleDefinitions + - Added Interface AccessRule + - Added Interface AccessRuleProperties + - Added Interface AccessRulePropertiesSubscriptionsItem + - Added Interface AzureBlobDataTransferDataSourceSink + - Added Interface BackupResource + - Added Interface BackupSchedule + - Added Interface BaseCosmosDataTransferDataSourceSink + - Added Interface CapacityModeChangeTransitionState + - Added Interface CassandraClustersGetBackupOptionalParams + - Added Interface CassandraClustersGetCommandAsyncOptionalParams + - Added Interface CassandraClustersInvokeCommandAsyncHeaders + - Added Interface CassandraClustersInvokeCommandAsyncOptionalParams + - Added Interface CassandraClustersListBackupsOptionalParams + - Added Interface CassandraClustersListCommandOptionalParams + - Added Interface CassandraResourcesCreateUpdateCassandraViewHeaders + - Added Interface CassandraResourcesCreateUpdateCassandraViewOptionalParams + - Added Interface CassandraResourcesDeleteCassandraViewHeaders + - Added Interface CassandraResourcesDeleteCassandraViewOptionalParams + - Added Interface CassandraResourcesGetCassandraViewOptionalParams + - Added Interface CassandraResourcesGetCassandraViewThroughputOptionalParams + - Added Interface CassandraResourcesListCassandraViewsOptionalParams + - Added Interface CassandraResourcesMigrateCassandraViewToAutoscaleHeaders + - Added Interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams + - Added Interface CassandraResourcesMigrateCassandraViewToManualThroughputHeaders + - Added Interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams + - Added Interface CassandraResourcesUpdateCassandraViewThroughputHeaders + - Added Interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams + - Added Interface CassandraViewCreateUpdateParameters + - Added Interface CassandraViewGetPropertiesOptions + - Added Interface CassandraViewGetPropertiesResource + - Added Interface CassandraViewGetResults + - Added Interface CassandraViewListResult + - Added Interface CassandraViewResource + - Added Interface ChaosFaultEnableDisableOptionalParams + - Added Interface ChaosFaultGetOptionalParams + - Added Interface ChaosFaultListNextOptionalParams + - Added Interface ChaosFaultListOptionalParams + - Added Interface ChaosFaultListResponse + - Added Interface ChaosFaultResource + - Added Interface CommandAsyncPostBody + - Added Interface CommandPublicResource + - Added Interface CosmosCassandraDataTransferDataSourceSink + - Added Interface CosmosMongoDataTransferDataSourceSink + - Added Interface CosmosMongoVCoreDataTransferDataSourceSink + - Added Interface CosmosSqlDataTransferDataSourceSink + - Added Interface CreateJobRequest + - Added Interface DataTransferDataSourceSink + - Added Interface DataTransferJobFeedResults + - Added Interface DataTransferJobGetResults + - Added Interface DataTransferJobProperties + - Added Interface DataTransferJobsCancelOptionalParams + - Added Interface DataTransferJobsCompleteOptionalParams + - Added Interface DataTransferJobsCreateOptionalParams + - Added Interface DataTransferJobsGetOptionalParams + - Added Interface DataTransferJobsListByDatabaseAccountNextOptionalParams + - Added Interface DataTransferJobsListByDatabaseAccountOptionalParams + - Added Interface DataTransferJobsPauseOptionalParams + - Added Interface DataTransferJobsResumeOptionalParams + - Added Interface DiagnosticLogSettings + - Added Interface GraphResource + - Added Interface GraphResourceCreateUpdateParameters + - Added Interface GraphResourceGetPropertiesOptions + - Added Interface GraphResourceGetPropertiesResource + - Added Interface GraphResourceGetResults + - Added Interface GraphResourcesCreateUpdateGraphHeaders + - Added Interface GraphResourcesCreateUpdateGraphOptionalParams + - Added Interface GraphResourcesDeleteGraphResourceHeaders + - Added Interface GraphResourcesDeleteGraphResourceOptionalParams + - Added Interface GraphResourcesGetGraphOptionalParams + - Added Interface GraphResourcesListGraphsOptionalParams + - Added Interface GraphResourcesListResult + - Added Interface ListBackups + - Added Interface ListCommands + - Added Interface MaterializedViewDefinition + - Added Interface MergeParameters + - Added Interface MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders + - Added Interface MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams + - Added Interface MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders + - Added Interface MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams + - Added Interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders + - Added Interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams + - Added Interface MongoDBResourcesMongoDBDatabasePartitionMergeHeaders + - Added Interface MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams + - Added Interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders + - Added Interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams + - Added Interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders + - Added Interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams + - Added Interface NetworkSecurityPerimeter + - Added Interface NetworkSecurityPerimeterConfiguration + - Added Interface NetworkSecurityPerimeterConfigurationListResult + - Added Interface NetworkSecurityPerimeterConfigurationProperties + - Added Interface NetworkSecurityPerimeterConfigurationsGetOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsListOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsReconcileHeaders + - Added Interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams + - Added Interface NetworkSecurityProfile + - Added Interface PermissionAutoGenerated + - Added Interface PhysicalPartitionId + - Added Interface PhysicalPartitionStorageInfo + - Added Interface PhysicalPartitionStorageInfoCollection + - Added Interface PhysicalPartitionThroughputInfoProperties + - Added Interface PhysicalPartitionThroughputInfoResource + - Added Interface PhysicalPartitionThroughputInfoResult + - Added Interface PhysicalPartitionThroughputInfoResultPropertiesResource + - Added Interface ProvisioningIssue + - Added Interface ProvisioningIssueProperties + - Added Interface RedistributeThroughputParameters + - Added Interface RedistributeThroughputPropertiesResource + - Added Interface ResourceAssociation + - Added Interface RetrieveThroughputParameters + - Added Interface RetrieveThroughputPropertiesResource + - Added Interface SqlResourcesListSqlContainerPartitionMergeHeaders + - Added Interface SqlResourcesListSqlContainerPartitionMergeOptionalParams + - Added Interface SqlResourcesSqlContainerRedistributeThroughputHeaders + - Added Interface SqlResourcesSqlContainerRedistributeThroughputOptionalParams + - Added Interface SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders + - Added Interface SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams + - Added Interface SqlResourcesSqlDatabasePartitionMergeHeaders + - Added Interface SqlResourcesSqlDatabasePartitionMergeOptionalParams + - Added Interface SqlResourcesSqlDatabaseRedistributeThroughputHeaders + - Added Interface SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams + - Added Interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders + - Added Interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams + - Added Interface TableResourcesCreateUpdateTableRoleAssignmentHeaders + - Added Interface TableResourcesCreateUpdateTableRoleAssignmentOptionalParams + - Added Interface TableResourcesCreateUpdateTableRoleDefinitionHeaders + - Added Interface TableResourcesCreateUpdateTableRoleDefinitionOptionalParams + - Added Interface TableResourcesDeleteTableRoleAssignmentHeaders + - Added Interface TableResourcesDeleteTableRoleAssignmentOptionalParams + - Added Interface TableResourcesDeleteTableRoleDefinitionHeaders + - Added Interface TableResourcesDeleteTableRoleDefinitionOptionalParams + - Added Interface TableResourcesGetTableRoleAssignmentOptionalParams + - Added Interface TableResourcesGetTableRoleDefinitionOptionalParams + - Added Interface TableResourcesListTableRoleAssignmentsOptionalParams + - Added Interface TableResourcesListTableRoleDefinitionsOptionalParams + - Added Interface TableRoleAssignmentListResult + - Added Interface TableRoleAssignmentResource + - Added Interface TableRoleDefinitionListResult + - Added Interface TableRoleDefinitionResource + - Added Interface ThroughputBucketResource + - Added Interface ThroughputPoolAccountCreateOptionalParams + - Added Interface ThroughputPoolAccountCreateParameters + - Added Interface ThroughputPoolAccountDeleteHeaders + - Added Interface ThroughputPoolAccountDeleteOptionalParams + - Added Interface ThroughputPoolAccountGetOptionalParams + - Added Interface ThroughputPoolAccountResource + - Added Interface ThroughputPoolAccountsListNextOptionalParams + - Added Interface ThroughputPoolAccountsListOptionalParams + - Added Interface ThroughputPoolAccountsListResult + - Added Interface ThroughputPoolCreateOrUpdateOptionalParams + - Added Interface ThroughputPoolDeleteHeaders + - Added Interface ThroughputPoolDeleteOptionalParams + - Added Interface ThroughputPoolGetOptionalParams + - Added Interface ThroughputPoolResource + - Added Interface ThroughputPoolsListByResourceGroupNextOptionalParams + - Added Interface ThroughputPoolsListByResourceGroupOptionalParams + - Added Interface ThroughputPoolsListNextOptionalParams + - Added Interface ThroughputPoolsListOptionalParams + - Added Interface ThroughputPoolsListResult + - Added Interface ThroughputPoolUpdate + - Added Interface ThroughputPoolUpdateHeaders + - Added Interface ThroughputPoolUpdateOptionalParams + - Added Interface TrackedResource + - Added Type Alias AccessRuleDirection + - Added Type Alias AutoReplicate + - Added Type Alias BackupState + - Added Type Alias BaseCosmosDataTransferDataSourceSinkUnion + - Added Type Alias CapacityMode + - Added Type Alias CapacityModeTransitionStatus + - Added Type Alias CassandraClustersGetBackupResponse + - Added Type Alias CassandraClustersGetCommandAsyncResponse + - Added Type Alias CassandraClustersInvokeCommandAsyncResponse + - Added Type Alias CassandraClustersListBackupsResponse + - Added Type Alias CassandraClustersListCommandResponse + - Added Type Alias CassandraResourcesCreateUpdateCassandraViewResponse + - Added Type Alias CassandraResourcesGetCassandraViewResponse + - Added Type Alias CassandraResourcesGetCassandraViewThroughputResponse + - Added Type Alias CassandraResourcesListCassandraViewsResponse + - Added Type Alias CassandraResourcesMigrateCassandraViewToAutoscaleResponse + - Added Type Alias CassandraResourcesMigrateCassandraViewToManualThroughputResponse + - Added Type Alias CassandraResourcesUpdateCassandraViewThroughputResponse + - Added Type Alias ChaosFaultEnableDisableResponse + - Added Type Alias ChaosFaultGetResponse + - Added Type Alias ChaosFaultListNextResponse + - Added Type Alias ChaosFaultListOperationResponse + - Added Type Alias ClusterType + - Added Type Alias CommandStatus + - Added Type Alias DataTransferComponent + - Added Type Alias DataTransferDataSourceSinkUnion + - Added Type Alias DataTransferJobMode + - Added Type Alias DataTransferJobsCancelResponse + - Added Type Alias DataTransferJobsCompleteResponse + - Added Type Alias DataTransferJobsCreateResponse + - Added Type Alias DataTransferJobsGetResponse + - Added Type Alias DataTransferJobsListByDatabaseAccountNextResponse + - Added Type Alias DataTransferJobsListByDatabaseAccountResponse + - Added Type Alias DataTransferJobsPauseResponse + - Added Type Alias DataTransferJobsResumeResponse + - Added Type Alias DefaultPriorityLevel + - Added Type Alias EnableFullTextQuery + - Added Type Alias GraphResourcesCreateUpdateGraphResponse + - Added Type Alias GraphResourcesGetGraphResponse + - Added Type Alias GraphResourcesListGraphsResponse + - Added Type Alias IssueType + - Added Type Alias MongoDBResourcesListMongoDBCollectionPartitionMergeResponse + - Added Type Alias MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + - Added Type Alias MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + - Added Type Alias MongoDBResourcesMongoDBDatabasePartitionMergeResponse + - Added Type Alias MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + - Added Type Alias MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationProvisioningState + - Added Type Alias NetworkSecurityPerimeterConfigurationsGetResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsListNextResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsListResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsReconcileResponse + - Added Type Alias ResourceAssociationAccessMode + - Added Type Alias ScheduledEventStrategy + - Added Type Alias Severity + - Added Type Alias SqlResourcesListSqlContainerPartitionMergeResponse + - Added Type Alias SqlResourcesSqlContainerRedistributeThroughputResponse + - Added Type Alias SqlResourcesSqlContainerRetrieveThroughputDistributionResponse + - Added Type Alias SqlResourcesSqlDatabasePartitionMergeResponse + - Added Type Alias SqlResourcesSqlDatabaseRedistributeThroughputResponse + - Added Type Alias SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse + - Added Type Alias SupportedActions + - Added Type Alias TableResourcesCreateUpdateTableRoleAssignmentResponse + - Added Type Alias TableResourcesCreateUpdateTableRoleDefinitionResponse + - Added Type Alias TableResourcesGetTableRoleAssignmentResponse + - Added Type Alias TableResourcesGetTableRoleDefinitionResponse + - Added Type Alias TableResourcesListTableRoleAssignmentsResponse + - Added Type Alias TableResourcesListTableRoleDefinitionsResponse + - Added Type Alias ThroughputPolicyType + - Added Type Alias ThroughputPoolAccountCreateResponse + - Added Type Alias ThroughputPoolAccountDeleteResponse + - Added Type Alias ThroughputPoolAccountGetResponse + - Added Type Alias ThroughputPoolAccountsListNextResponse + - Added Type Alias ThroughputPoolAccountsListResponse + - Added Type Alias ThroughputPoolCreateOrUpdateResponse + - Added Type Alias ThroughputPoolDeleteResponse + - Added Type Alias ThroughputPoolGetResponse + - Added Type Alias ThroughputPoolsListByResourceGroupNextResponse + - Added Type Alias ThroughputPoolsListByResourceGroupResponse + - Added Type Alias ThroughputPoolsListNextResponse + - Added Type Alias ThroughputPoolsListResponse + - Added Type Alias ThroughputPoolUpdateResponse + - Interface ARMResourceProperties has a new optional parameter identity + - Interface CassandraClustersDeallocateOptionalParams has a new optional parameter xMsForceDeallocate + - Interface ClusterResourceProperties has a new optional parameter autoReplicate + - Interface ClusterResourceProperties has a new optional parameter backupSchedules + - Interface ClusterResourceProperties has a new optional parameter clusterType + - Interface ClusterResourceProperties has a new optional parameter extensions + - Interface ClusterResourceProperties has a new optional parameter externalDataCenters + - Interface ClusterResourceProperties has a new optional parameter scheduledEventStrategy + - Interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems has a new optional parameter isLatestModel + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter capacityMode + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter defaultPriorityLevel + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter diagnosticLogSettings + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter enablePriorityBasedExecution + - Interface DatabaseAccountGetResults has a new optional parameter capacityMode + - Interface DatabaseAccountGetResults has a new optional parameter capacityModeChangeTransitionState + - Interface DatabaseAccountGetResults has a new optional parameter defaultPriorityLevel + - Interface DatabaseAccountGetResults has a new optional parameter diagnosticLogSettings + - Interface DatabaseAccountGetResults has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountGetResults has a new optional parameter enablePriorityBasedExecution + - Interface DatabaseAccountUpdateParameters has a new optional parameter capacityMode + - Interface DatabaseAccountUpdateParameters has a new optional parameter defaultPriorityLevel + - Interface DatabaseAccountUpdateParameters has a new optional parameter diagnosticLogSettings + - Interface DatabaseAccountUpdateParameters has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountUpdateParameters has a new optional parameter enablePriorityBasedExecution + - Interface Resource has a new optional parameter systemData + - Interface RestoreParameters has a new optional parameter sourceBackupLocation + - Interface SqlContainerResource has a new optional parameter materializedViewDefinition + - Interface ThroughputSettingsResource has a new optional parameter throughputBuckets + - Added Enum KnownAccessRuleDirection + - Added Enum KnownAutoReplicate + - Added Enum KnownBackupState + - Added Enum KnownCapacityMode + - Added Enum KnownCapacityModeTransitionStatus + - Added Enum KnownClusterType + - Added Enum KnownCommandStatus + - Added Enum KnownDataTransferComponent + - Added Enum KnownDataTransferJobMode + - Added Enum KnownDefaultPriorityLevel + - Added Enum KnownIssueType + - Added Enum KnownNetworkSecurityPerimeterConfigurationProvisioningState + - Added Enum KnownResourceAssociationAccessMode + - Added Enum KnownScheduledEventStrategy + - Added Enum KnownSeverity + - Added Enum KnownThroughputPolicyType + - Enum KnownStatus has a new value Canceled + - Enum KnownStatus has a new value Failed + - Enum KnownStatus has a new value Succeeded + - Enum KnownStatus has a new value Updating + + ## 16.2.0 (2024-12-09) ### Features Added diff --git a/sdk/cosmosdb/arm-cosmosdb/README.md b/sdk/cosmosdb/arm-cosmosdb/README.md index 2e2088dfdc04..d91abd9bd72e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/README.md +++ b/sdk/cosmosdb/arm-cosmosdb/README.md @@ -2,11 +2,11 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure CosmosDBManagement client. -Azure Cosmos DB Database Service Resource Provider REST API +Azure Cosmos DB Chaos Fault REST API [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-cosmosdb) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-cosmosdb) | +[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -63,8 +63,8 @@ const client = new CosmosDBManagementClient(new DefaultAzureCredential(), subscr // const client = new CosmosDBManagementClient(credential, subscriptionId); ``` -### JavaScript Bundle +### JavaScript Bundle To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). ## Key concepts diff --git a/sdk/cosmosdb/arm-cosmosdb/_meta.json b/sdk/cosmosdb/arm-cosmosdb/_meta.json index 9d9b3c1c94a7..f0c9be6bb1fa 100644 --- a/sdk/cosmosdb/arm-cosmosdb/_meta.json +++ b/sdk/cosmosdb/arm-cosmosdb/_meta.json @@ -1,5 +1,5 @@ { - "commit": "552b4dd311f90f4a7b2f7adf45461d7a8774a1cc", + "commit": "d811ed172ae395f3849439a305cf25d0eb6a426c", "readme": "specification/cosmos-db/resource-manager/readme.md", "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\cosmos-db\\resource-manager\\readme.md --use=@autorest/typescript@6.0.29 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", diff --git a/sdk/cosmosdb/arm-cosmosdb/api-extractor.json b/sdk/cosmosdb/arm-cosmosdb/api-extractor.json index 0020e5644c49..f3b603c8e745 100644 --- a/sdk/cosmosdb/arm-cosmosdb/api-extractor.json +++ b/sdk/cosmosdb/arm-cosmosdb/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-cosmosdb.d.ts" + "publicTrimmedFilePath": "dist/arm-cosmosdb.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/cosmosdb/arm-cosmosdb/assets.json b/sdk/cosmosdb/arm-cosmosdb/assets.json index 489cff3dcacb..0dc83163032f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/assets.json +++ b/sdk/cosmosdb/arm-cosmosdb/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/cosmosdb/arm-cosmosdb", - "Tag": "js/cosmosdb/arm-cosmosdb_c817010168" + "Tag": "js/cosmosdb/arm-cosmosdb_2c4c765cdb" } diff --git a/sdk/cosmosdb/arm-cosmosdb/package.json b/sdk/cosmosdb/arm-cosmosdb/package.json index 01be1663ec94..1405cae19654 100644 --- a/sdk/cosmosdb/arm-cosmosdb/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/package.json @@ -3,16 +3,16 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for CosmosDBManagementClient.", - "version": "16.2.0", + "version": "16.3.0-beta.1", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^2.1.2", - "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.6.0", + "@azure/core-client": "^1.7.0", + "@azure/core-lro": "^2.5.4", + "@azure/core-paging": "^1.2.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -24,23 +24,23 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-cosmosdb.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "typescript": "~5.7.2", - "dotenv": "^16.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", - "@azure-tools/test-recorder": "^3.0.0", - "@azure-tools/test-credential": "^1.1.0", - "mocha": "^11.0.2", - "@types/mocha": "^10.0.0", - "tsx": "^4.7.1", - "@types/chai": "^4.2.8", - "chai": "^4.2.0", "@types/node": "^18.0.0", - "ts-node": "^10.0.0" + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", + "dotenv": "^16.0.0", + "playwright": "^1.49.1", + "tsx": "^4.7.1", + "typescript": "~5.6.2", + "vitest": "^2.1.8" }, "repository": { "type": "git", @@ -50,46 +50,36 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "prepack": "npm run build", - "pack": "npm pack 2>&1", - "extract-api": "dev-tool run extract-api", - "lint": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "build:node": "echo skipped", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", - "build:test": "echo skipped", + "build:node": "echo skipped", "build:samples": "echo skipped.", + "build:test": "echo skipped", "check-format": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", + "extract-api": "dev-tool run extract-api", "format": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "dev-tool run test:vitest --esm", + "lint": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "pack": "npm pack 2>&1", + "prepack": "npm run build", "test": "npm run integration-test", - "test:node": "echo skipped", "test:browser": "echo skipped", + "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "integration-test:browser": "echo skipped", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -110,5 +100,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview" + }, + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false + }, + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } -} \ No newline at end of file +} diff --git a/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md b/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md index 3d7633b07a87..ac33a7a5bbed 100644 --- a/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md +++ b/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md @@ -10,6 +10,31 @@ import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { SimplePollerLike } from '@azure/core-lro'; +// @public +export interface AccessRule { + name?: string; + properties?: AccessRuleProperties; +} + +// @public +export type AccessRuleDirection = string; + +// @public +export interface AccessRuleProperties { + addressPrefixes?: string[]; + direction?: AccessRuleDirection; + emailAddresses?: string[]; + fullyQualifiedDomainNames?: string[]; + networkSecurityPerimeters?: NetworkSecurityPerimeter[]; + phoneNumbers?: string[]; + subscriptions?: AccessRulePropertiesSubscriptionsItem[]; +} + +// @public +export interface AccessRulePropertiesSubscriptionsItem { + id?: string; +} + // @public export interface AccountKeyMetadata { readonly generationTime?: Date; @@ -41,6 +66,7 @@ export interface ARMProxyResource { // @public export interface ARMResourceProperties { readonly id?: string; + identity?: ManagedServiceIdentity; location?: string; readonly name?: string; tags?: { @@ -65,6 +91,9 @@ export interface AuthenticationMethodLdapProperties { serviceUserPassword?: string; } +// @public +export type AutoReplicate = string; + // @public (undocumented) export interface AutoscaleSettings { maxThroughput?: number; @@ -82,6 +111,15 @@ export interface AutoUpgradePolicyResource { throughputPolicy?: ThroughputPolicyResource; } +// @public +export interface AzureBlobDataTransferDataSourceSink extends DataTransferDataSourceSink { + component: "AzureBlobStorage"; + // (undocumented) + containerName: string; + // (undocumented) + endpointUrl?: string; +} + // @public export type AzureConnectionType = string; @@ -112,9 +150,38 @@ export type BackupPolicyType = string; // @public (undocumented) export type BackupPolicyUnion = BackupPolicy | PeriodicModeBackupPolicy | ContinuousModeBackupPolicy; +// @public +export interface BackupResource { + backupExpiryTimestamp?: Date; + backupId?: string; + backupStartTimestamp?: Date; + backupState?: BackupState; + backupStopTimestamp?: Date; +} + +// @public (undocumented) +export interface BackupSchedule { + cronExpression?: string; + retentionInHours?: number; + scheduleName?: string; +} + +// @public +export type BackupState = string; + // @public export type BackupStorageRedundancy = string; +// @public +export interface BaseCosmosDataTransferDataSourceSink extends DataTransferDataSourceSink { + component: "BaseCosmosDataTransferDataSourceSink" | "CosmosDBCassandra" | "CosmosDBMongo" | "CosmosDBSql"; + // (undocumented) + remoteAccountName?: string; +} + +// @public (undocumented) +export type BaseCosmosDataTransferDataSourceSinkUnion = BaseCosmosDataTransferDataSourceSink | CosmosCassandraDataTransferDataSourceSink | CosmosMongoDataTransferDataSourceSink | CosmosSqlDataTransferDataSourceSink; + // @public export interface Capability { name?: string; @@ -125,6 +192,22 @@ export interface Capacity { totalThroughputLimit?: number; } +// @public +export type CapacityMode = string; + +// @public +export interface CapacityModeChangeTransitionState { + readonly capacityModeLastSuccessfulTransitionEndTimestamp?: Date; + readonly capacityModeTransitionBeginTimestamp?: Date; + readonly capacityModeTransitionEndTimestamp?: Date; + capacityModeTransitionStatus?: CapacityModeTransitionStatus; + currentCapacityMode?: CapacityMode; + previousCapacityMode?: CapacityMode; +} + +// @public +export type CapacityModeTransitionStatus = string; + // @public export interface CassandraClusterPublicStatus { connectionErrors?: ConnectionError[]; @@ -154,13 +237,19 @@ export interface CassandraClusters { beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: CassandraClustersDeleteOptionalParams): Promise; beginInvokeCommand(resourceGroupName: string, clusterName: string, body: CommandPostBody, options?: CassandraClustersInvokeCommandOptionalParams): Promise, CassandraClustersInvokeCommandResponse>>; beginInvokeCommandAndWait(resourceGroupName: string, clusterName: string, body: CommandPostBody, options?: CassandraClustersInvokeCommandOptionalParams): Promise; + beginInvokeCommandAsync(resourceGroupName: string, clusterName: string, body: CommandAsyncPostBody, options?: CassandraClustersInvokeCommandAsyncOptionalParams): Promise, CassandraClustersInvokeCommandAsyncResponse>>; + beginInvokeCommandAsyncAndWait(resourceGroupName: string, clusterName: string, body: CommandAsyncPostBody, options?: CassandraClustersInvokeCommandAsyncOptionalParams): Promise; beginStart(resourceGroupName: string, clusterName: string, options?: CassandraClustersStartOptionalParams): Promise, void>>; beginStartAndWait(resourceGroupName: string, clusterName: string, options?: CassandraClustersStartOptionalParams): Promise; beginUpdate(resourceGroupName: string, clusterName: string, body: ClusterResource, options?: CassandraClustersUpdateOptionalParams): Promise, CassandraClustersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, body: ClusterResource, options?: CassandraClustersUpdateOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, options?: CassandraClustersGetOptionalParams): Promise; + getBackup(resourceGroupName: string, clusterName: string, backupId: string, options?: CassandraClustersGetBackupOptionalParams): Promise; + getCommandAsync(resourceGroupName: string, clusterName: string, commandId: string, options?: CassandraClustersGetCommandAsyncOptionalParams): Promise; + listBackups(resourceGroupName: string, clusterName: string, options?: CassandraClustersListBackupsOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: CassandraClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: CassandraClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listCommand(resourceGroupName: string, clusterName: string, options?: CassandraClustersListCommandOptionalParams): PagedAsyncIterableIterator; status(resourceGroupName: string, clusterName: string, options?: CassandraClustersStatusOptionalParams): Promise; } @@ -177,6 +266,7 @@ export type CassandraClustersCreateUpdateResponse = ClusterResource; export interface CassandraClustersDeallocateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; + xMsForceDeallocate?: string; } // @public @@ -185,6 +275,20 @@ export interface CassandraClustersDeleteOptionalParams extends coreClient.Operat updateIntervalInMs?: number; } +// @public +export interface CassandraClustersGetBackupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersGetBackupResponse = BackupResource; + +// @public +export interface CassandraClustersGetCommandAsyncOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersGetCommandAsyncResponse = CommandPublicResource; + // @public export interface CassandraClustersGetOptionalParams extends coreClient.OperationOptions { } @@ -192,6 +296,21 @@ export interface CassandraClustersGetOptionalParams extends coreClient.Operation // @public export type CassandraClustersGetResponse = ClusterResource; +// @public +export interface CassandraClustersInvokeCommandAsyncHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraClustersInvokeCommandAsyncOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraClustersInvokeCommandAsyncResponse = CommandPublicResource; + // @public export interface CassandraClustersInvokeCommandOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -201,6 +320,13 @@ export interface CassandraClustersInvokeCommandOptionalParams extends coreClient // @public export type CassandraClustersInvokeCommandResponse = CommandOutput; +// @public +export interface CassandraClustersListBackupsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersListBackupsResponse = ListBackups; + // @public export interface CassandraClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { } @@ -215,6 +341,13 @@ export interface CassandraClustersListBySubscriptionOptionalParams extends coreC // @public export type CassandraClustersListBySubscriptionResponse = ListClusters; +// @public +export interface CassandraClustersListCommandOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersListCommandResponse = ListCommands; + // @public export interface CassandraClustersStartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -338,10 +471,14 @@ export interface CassandraResources { beginCreateUpdateCassandraKeyspaceAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, createUpdateCassandraKeyspaceParameters: CassandraKeyspaceCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraKeyspaceOptionalParams): Promise; beginCreateUpdateCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, createUpdateCassandraTableParameters: CassandraTableCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraTableOptionalParams): Promise, CassandraResourcesCreateUpdateCassandraTableResponse>>; beginCreateUpdateCassandraTableAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, createUpdateCassandraTableParameters: CassandraTableCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraTableOptionalParams): Promise; + beginCreateUpdateCassandraView(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams): Promise, CassandraResourcesCreateUpdateCassandraViewResponse>>; + beginCreateUpdateCassandraViewAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams): Promise; beginDeleteCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesDeleteCassandraKeyspaceOptionalParams): Promise, CassandraResourcesDeleteCassandraKeyspaceResponse>>; beginDeleteCassandraKeyspaceAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesDeleteCassandraKeyspaceOptionalParams): Promise; beginDeleteCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesDeleteCassandraTableOptionalParams): Promise, CassandraResourcesDeleteCassandraTableResponse>>; beginDeleteCassandraTableAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesDeleteCassandraTableOptionalParams): Promise; + beginDeleteCassandraView(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesDeleteCassandraViewOptionalParams): Promise, void>>; + beginDeleteCassandraViewAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesDeleteCassandraViewOptionalParams): Promise; beginMigrateCassandraKeyspaceToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams): Promise, CassandraResourcesMigrateCassandraKeyspaceToAutoscaleResponse>>; beginMigrateCassandraKeyspaceToAutoscaleAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams): Promise; beginMigrateCassandraKeyspaceToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesMigrateCassandraKeyspaceToManualThroughputOptionalParams): Promise, CassandraResourcesMigrateCassandraKeyspaceToManualThroughputResponse>>; @@ -350,16 +487,25 @@ export interface CassandraResources { beginMigrateCassandraTableToAutoscaleAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesMigrateCassandraTableToAutoscaleOptionalParams): Promise; beginMigrateCassandraTableToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams): Promise, CassandraResourcesMigrateCassandraTableToManualThroughputResponse>>; beginMigrateCassandraTableToManualThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams): Promise; + beginMigrateCassandraViewToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams): Promise, CassandraResourcesMigrateCassandraViewToAutoscaleResponse>>; + beginMigrateCassandraViewToAutoscaleAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams): Promise; + beginMigrateCassandraViewToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams): Promise, CassandraResourcesMigrateCassandraViewToManualThroughputResponse>>; + beginMigrateCassandraViewToManualThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams): Promise; beginUpdateCassandraKeyspaceThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams): Promise, CassandraResourcesUpdateCassandraKeyspaceThroughputResponse>>; beginUpdateCassandraKeyspaceThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams): Promise; beginUpdateCassandraTableThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraTableThroughputOptionalParams): Promise, CassandraResourcesUpdateCassandraTableThroughputResponse>>; beginUpdateCassandraTableThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraTableThroughputOptionalParams): Promise; + beginUpdateCassandraViewThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams): Promise, CassandraResourcesUpdateCassandraViewThroughputResponse>>; + beginUpdateCassandraViewThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams): Promise; getCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesGetCassandraKeyspaceOptionalParams): Promise; getCassandraKeyspaceThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesGetCassandraKeyspaceThroughputOptionalParams): Promise; getCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesGetCassandraTableOptionalParams): Promise; getCassandraTableThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesGetCassandraTableThroughputOptionalParams): Promise; + getCassandraView(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesGetCassandraViewOptionalParams): Promise; + getCassandraViewThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesGetCassandraViewThroughputOptionalParams): Promise; listCassandraKeyspaces(resourceGroupName: string, accountName: string, options?: CassandraResourcesListCassandraKeyspacesOptionalParams): PagedAsyncIterableIterator; listCassandraTables(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesListCassandraTablesOptionalParams): PagedAsyncIterableIterator; + listCassandraViews(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesListCassandraViewsOptionalParams): PagedAsyncIterableIterator; } // @public @@ -392,6 +538,21 @@ export interface CassandraResourcesCreateUpdateCassandraTableOptionalParams exte // @public export type CassandraResourcesCreateUpdateCassandraTableResponse = CassandraTableGetResults; +// @public +export interface CassandraResourcesCreateUpdateCassandraViewHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesCreateUpdateCassandraViewOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesCreateUpdateCassandraViewResponse = CassandraViewGetResults; + // @public export interface CassandraResourcesDeleteCassandraKeyspaceHeaders { azureAsyncOperation?: string; @@ -422,6 +583,18 @@ export interface CassandraResourcesDeleteCassandraTableOptionalParams extends co // @public export type CassandraResourcesDeleteCassandraTableResponse = CassandraResourcesDeleteCassandraTableHeaders; +// @public +export interface CassandraResourcesDeleteCassandraViewHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesDeleteCassandraViewOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface CassandraResourcesGetCassandraKeyspaceOptionalParams extends coreClient.OperationOptions { } @@ -450,6 +623,20 @@ export interface CassandraResourcesGetCassandraTableThroughputOptionalParams ext // @public export type CassandraResourcesGetCassandraTableThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesGetCassandraViewOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraResourcesGetCassandraViewResponse = CassandraViewGetResults; + +// @public +export interface CassandraResourcesGetCassandraViewThroughputOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraResourcesGetCassandraViewThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraResourcesListCassandraKeyspacesOptionalParams extends coreClient.OperationOptions { } @@ -464,6 +651,13 @@ export interface CassandraResourcesListCassandraTablesOptionalParams extends cor // @public export type CassandraResourcesListCassandraTablesResponse = CassandraTableListResult; +// @public +export interface CassandraResourcesListCassandraViewsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraResourcesListCassandraViewsResponse = CassandraViewListResult; + // @public export interface CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders { azureAsyncOperation?: string; @@ -524,6 +718,36 @@ export interface CassandraResourcesMigrateCassandraTableToManualThroughputOption // @public export type CassandraResourcesMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesMigrateCassandraViewToAutoscaleHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesMigrateCassandraViewToAutoscaleResponse = ThroughputSettingsGetResults; + +// @public +export interface CassandraResourcesMigrateCassandraViewToManualThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesMigrateCassandraViewToManualThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders { azureAsyncOperation?: string; @@ -554,6 +778,21 @@ export interface CassandraResourcesUpdateCassandraTableThroughputOptionalParams // @public export type CassandraResourcesUpdateCassandraTableThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesUpdateCassandraViewThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesUpdateCassandraViewThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraSchema { clusterKeys?: ClusterKey[]; @@ -596,11 +835,97 @@ export interface CassandraTableResource { schema?: CassandraSchema; } +// @public +export interface CassandraViewCreateUpdateParameters extends ARMResourceProperties { + options?: CreateUpdateOptions; + resource: CassandraViewResource; +} + +// @public (undocumented) +export interface CassandraViewGetPropertiesOptions extends OptionsResource { +} + +// @public (undocumented) +export interface CassandraViewGetPropertiesResource extends CassandraViewResource, ExtendedResourceProperties { +} + +// @public +export interface CassandraViewGetResults extends ARMResourceProperties { + // (undocumented) + options?: CassandraViewGetPropertiesOptions; + // (undocumented) + resource?: CassandraViewGetPropertiesResource; +} + +// @public +export interface CassandraViewListResult { + readonly value?: CassandraViewGetResults[]; +} + +// @public +export interface CassandraViewResource { + id: string; + viewDefinition: string; +} + // @public (undocumented) export interface Certificate { pem?: string; } +// @public +export interface ChaosFault { + beginEnableDisable(resourceGroupName: string, accountName: string, chaosFault: string, chaosFaultRequest: ChaosFaultResource, options?: ChaosFaultEnableDisableOptionalParams): Promise, ChaosFaultEnableDisableResponse>>; + beginEnableDisableAndWait(resourceGroupName: string, accountName: string, chaosFault: string, chaosFaultRequest: ChaosFaultResource, options?: ChaosFaultEnableDisableOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, chaosFault: string, options?: ChaosFaultGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: ChaosFaultListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ChaosFaultEnableDisableOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ChaosFaultEnableDisableResponse = ChaosFaultResource; + +// @public +export interface ChaosFaultGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ChaosFaultGetResponse = ChaosFaultResource; + +// @public +export interface ChaosFaultListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ChaosFaultListNextResponse = ChaosFaultListResponse; + +// @public +export type ChaosFaultListOperationResponse = ChaosFaultListResponse; + +// @public +export interface ChaosFaultListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ChaosFaultListResponse { + readonly nextLink?: string; + readonly value?: ChaosFaultResource[]; +} + +// @public +export interface ChaosFaultResource extends ProxyResource { + action?: SupportedActions; + containerName?: string; + databaseName?: string; + readonly provisioningState?: string; + region?: string; +} + // @public (undocumented) export interface ClientEncryptionIncludedPath { clientEncryptionKeyId: string; @@ -657,13 +982,18 @@ export interface ClusterResource extends ManagedCassandraARMResourceProperties { // @public export interface ClusterResourceProperties { authenticationMethod?: AuthenticationMethod; + autoReplicate?: AutoReplicate; azureConnectionMethod?: AzureConnectionType; + backupSchedules?: BackupSchedule[]; cassandraAuditLoggingEnabled?: boolean; cassandraVersion?: string; clientCertificates?: Certificate[]; clusterNameOverride?: string; + clusterType?: ClusterType; deallocated?: boolean; delegatedManagementSubnetId?: string; + extensions?: string[]; + externalDataCenters?: string[]; externalGossipCertificates?: Certificate[]; externalSeedNodes?: SeedNode[]; readonly gossipCertificates?: Certificate[]; @@ -675,9 +1005,13 @@ export interface ClusterResourceProperties { provisioningState?: ManagedCassandraProvisioningState; repairEnabled?: boolean; restoreFromBackupId?: string; + scheduledEventStrategy?: ScheduledEventStrategy; readonly seedNodes?: SeedNode[]; } +// @public +export type ClusterType = string; + // @public export interface Collection { listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: CollectionListMetricDefinitionsOptionalParams): PagedAsyncIterableIterator; @@ -758,6 +1092,15 @@ export interface Column { type?: string; } +// @public +export interface CommandAsyncPostBody { + arguments?: Record; + cassandraStopStart?: boolean; + command: string; + host: string; + readWrite?: boolean; +} + // @public export interface CommandOutput { commandOutput?: string; @@ -774,6 +1117,23 @@ export interface CommandPostBody { readwrite?: boolean; } +// @public +export interface CommandPublicResource { + arguments?: Record; + cassandraStopStart?: boolean; + command?: string; + commandId?: string; + host?: string; + isAdmin?: boolean; + outputFile?: string; + readWrite?: boolean; + result?: string; + status?: CommandStatus; +} + +// @public +export type CommandStatus = string; + // @public (undocumented) export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { readonly clientId?: string; @@ -788,6 +1148,7 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa diskFreeKB?: number; diskUsedKB?: number; hostID?: string; + isLatestModel?: boolean; load?: string; memoryBuffersAndCachedKB?: number; memoryFreeKB?: number; @@ -891,6 +1252,15 @@ export interface CorsPolicy { maxAgeInSeconds?: number; } +// @public +export interface CosmosCassandraDataTransferDataSourceSink extends BaseCosmosDataTransferDataSourceSink { + component: "CosmosDBCassandra"; + // (undocumented) + keyspaceName: string; + // (undocumented) + tableName: string; +} + // @public (undocumented) export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) @@ -905,6 +1275,8 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) cassandraResources: CassandraResources; // (undocumented) + chaosFault: ChaosFault; + // (undocumented) collection: Collection; // (undocumented) collectionPartition: CollectionPartition; @@ -919,12 +1291,18 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) databaseAccounts: DatabaseAccounts; // (undocumented) + dataTransferJobs: DataTransferJobs; + // (undocumented) + graphResources: GraphResources; + // (undocumented) gremlinResources: GremlinResources; // (undocumented) locations: Locations; // (undocumented) mongoDBResources: MongoDBResources; // (undocumented) + networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations; + // (undocumented) notebookWorkspaces: NotebookWorkspaces; // (undocumented) operations: Operations; @@ -974,6 +1352,14 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { subscriptionId: string; // (undocumented) tableResources: TableResources; + // (undocumented) + throughputPool: ThroughputPool; + // (undocumented) + throughputPoolAccount: ThroughputPoolAccount; + // (undocumented) + throughputPoolAccounts: ThroughputPoolAccounts; + // (undocumented) + throughputPools: ThroughputPools; } // @public @@ -983,9 +1369,45 @@ export interface CosmosDBManagementClientOptionalParams extends coreClient.Servi endpoint?: string; } +// @public +export interface CosmosMongoDataTransferDataSourceSink extends BaseCosmosDataTransferDataSourceSink { + // (undocumented) + collectionName: string; + component: "CosmosDBMongo"; + // (undocumented) + databaseName: string; +} + +// @public +export interface CosmosMongoVCoreDataTransferDataSourceSink extends DataTransferDataSourceSink { + // (undocumented) + collectionName: string; + component: "CosmosDBMongoVCore"; + // (undocumented) + connectionStringKeyVaultUri?: string; + // (undocumented) + databaseName: string; + // (undocumented) + hostName?: string; +} + +// @public +export interface CosmosSqlDataTransferDataSourceSink extends BaseCosmosDataTransferDataSourceSink { + component: "CosmosDBSql"; + // (undocumented) + containerName: string; + // (undocumented) + databaseName: string; +} + // @public export type CreatedByType = string; +// @public +export interface CreateJobRequest extends ARMProxyResource { + properties: DataTransferJobProperties; +} + // @public export type CreateMode = string; @@ -1017,6 +1439,7 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper backupPolicy?: BackupPolicyUnion; capabilities?: Capability[]; capacity?: Capacity; + capacityMode?: CapacityMode; connectorOffer?: ConnectorOffer; consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; @@ -1024,6 +1447,8 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper customerManagedKeyStatus?: string; databaseAccountOfferType: "Standard"; defaultIdentity?: string; + defaultPriorityLevel?: DefaultPriorityLevel; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; enableAnalyticalStorage?: boolean; @@ -1031,10 +1456,11 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper enableBurstCapacity?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; enablePerRegionPerPartitionAutoscale?: boolean; - identity?: ManagedServiceIdentity; + enablePriorityBasedExecution?: boolean; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; readonly keysMetadata?: DatabaseAccountKeysMetadata; @@ -1056,6 +1482,8 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { backupPolicy?: BackupPolicyUnion; capabilities?: Capability[]; capacity?: Capacity; + capacityMode?: CapacityMode; + capacityModeChangeTransitionState?: CapacityModeChangeTransitionState; connectorOffer?: ConnectorOffer; consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; @@ -1063,6 +1491,8 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { customerManagedKeyStatus?: string; readonly databaseAccountOfferType?: "Standard"; defaultIdentity?: string; + defaultPriorityLevel?: DefaultPriorityLevel; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; readonly documentEndpoint?: string; @@ -1071,11 +1501,12 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { enableBurstCapacity?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; enablePerRegionPerPartitionAutoscale?: boolean; + enablePriorityBasedExecution?: boolean; readonly failoverPolicies?: FailoverPolicy[]; - identity?: ManagedServiceIdentity; readonly instanceId?: string; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; @@ -1346,11 +1777,14 @@ export interface DatabaseAccountUpdateParameters { backupPolicy?: BackupPolicyUnion; capabilities?: Capability[]; capacity?: Capacity; + capacityMode?: CapacityMode; connectorOffer?: ConnectorOffer; consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; customerManagedKeyStatus?: string; defaultIdentity?: string; + defaultPriorityLevel?: DefaultPriorityLevel; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; enableAnalyticalStorage?: boolean; @@ -1358,9 +1792,11 @@ export interface DatabaseAccountUpdateParameters { enableBurstCapacity?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; enablePerRegionPerPartitionAutoscale?: boolean; + enablePriorityBasedExecution?: boolean; identity?: ManagedServiceIdentity; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; @@ -1432,15 +1868,132 @@ export interface DataCenterResourceProperties { } // @public -export interface DataTransferRegionalServiceResource extends RegionalServiceResource { -} +export type DataTransferComponent = string; // @public -export interface DataTransferServiceResource { - properties?: DataTransferServiceResourceProperties; +export interface DataTransferDataSourceSink { + component: "BaseCosmosDataTransferDataSourceSink" | "CosmosDBCassandra" | "CosmosDBMongo" | "CosmosDBMongoVCore" | "CosmosDBSql" | "AzureBlobStorage"; } -// @public +// @public (undocumented) +export type DataTransferDataSourceSinkUnion = DataTransferDataSourceSink | BaseCosmosDataTransferDataSourceSinkUnion | CosmosMongoVCoreDataTransferDataSourceSink | AzureBlobDataTransferDataSourceSink; + +// @public +export interface DataTransferJobFeedResults { + readonly nextLink?: string; + readonly value?: DataTransferJobGetResults[]; +} + +// @public +export interface DataTransferJobGetResults extends ARMProxyResource { + destination?: DataTransferDataSourceSinkUnion; + readonly duration?: string; + readonly error?: ErrorResponse; + readonly jobName?: string; + readonly lastUpdatedUtcTime?: Date; + mode?: DataTransferJobMode; + readonly processedCount?: number; + source?: DataTransferDataSourceSinkUnion; + readonly status?: string; + readonly totalCount?: number; + workerCount?: number; +} + +// @public +export type DataTransferJobMode = string; + +// @public +export interface DataTransferJobProperties { + destination: DataTransferDataSourceSinkUnion; + readonly duration?: string; + readonly error?: ErrorResponse; + readonly jobName?: string; + readonly lastUpdatedUtcTime?: Date; + mode?: DataTransferJobMode; + readonly processedCount?: number; + source: DataTransferDataSourceSinkUnion; + readonly status?: string; + readonly totalCount?: number; + workerCount?: number; +} + +// @public +export interface DataTransferJobs { + cancel(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsCancelOptionalParams): Promise; + complete(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsCompleteOptionalParams): Promise; + create(resourceGroupName: string, accountName: string, jobName: string, jobCreateParameters: CreateJobRequest, options?: DataTransferJobsCreateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsGetOptionalParams): Promise; + listByDatabaseAccount(resourceGroupName: string, accountName: string, options?: DataTransferJobsListByDatabaseAccountOptionalParams): PagedAsyncIterableIterator; + pause(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsPauseOptionalParams): Promise; + resume(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsResumeOptionalParams): Promise; +} + +// @public +export interface DataTransferJobsCancelOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsCancelResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsCompleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsCompleteResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsCreateResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsGetResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsListByDatabaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsListByDatabaseAccountNextResponse = DataTransferJobFeedResults; + +// @public +export interface DataTransferJobsListByDatabaseAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsListByDatabaseAccountResponse = DataTransferJobFeedResults; + +// @public +export interface DataTransferJobsPauseOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsPauseResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsResumeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsResumeResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferRegionalServiceResource extends RegionalServiceResource { +} + +// @public +export interface DataTransferServiceResource { + properties?: DataTransferServiceResourceProperties; +} + +// @public export interface DataTransferServiceResourceCreateUpdateProperties extends ServiceResourceCreateUpdateProperties { serviceType: "DataTransfer"; } @@ -1460,9 +2013,20 @@ export type DedicatedGatewayType = string; // @public export type DefaultConsistencyLevel = "Eventual" | "Session" | "BoundedStaleness" | "Strong" | "ConsistentPrefix"; +// @public +export type DefaultPriorityLevel = string; + +// @public +export interface DiagnosticLogSettings { + enableFullTextQuery?: EnableFullTextQuery; +} + // @public export type DistanceFunction = string; +// @public +export type EnableFullTextQuery = "None" | "True" | "False"; + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -1532,6 +2096,89 @@ export interface GraphAPIComputeServiceResourceProperties extends ServiceResourc serviceType: "GraphAPICompute"; } +// @public +export interface GraphResource { + id: string; +} + +// @public +export interface GraphResourceCreateUpdateParameters extends ARMResourceProperties { + options?: CreateUpdateOptions; + resource: GraphResource; +} + +// @public (undocumented) +export interface GraphResourceGetPropertiesOptions extends OptionsResource { +} + +// @public (undocumented) +export interface GraphResourceGetPropertiesResource extends GraphResource { +} + +// @public +export interface GraphResourceGetResults extends ARMResourceProperties { + // (undocumented) + options?: GraphResourceGetPropertiesOptions; + // (undocumented) + resource?: GraphResourceGetPropertiesResource; +} + +// @public +export interface GraphResources { + beginCreateUpdateGraph(resourceGroupName: string, accountName: string, graphName: string, createUpdateGraphParameters: GraphResourceCreateUpdateParameters, options?: GraphResourcesCreateUpdateGraphOptionalParams): Promise, GraphResourcesCreateUpdateGraphResponse>>; + beginCreateUpdateGraphAndWait(resourceGroupName: string, accountName: string, graphName: string, createUpdateGraphParameters: GraphResourceCreateUpdateParameters, options?: GraphResourcesCreateUpdateGraphOptionalParams): Promise; + beginDeleteGraphResource(resourceGroupName: string, accountName: string, graphName: string, options?: GraphResourcesDeleteGraphResourceOptionalParams): Promise, void>>; + beginDeleteGraphResourceAndWait(resourceGroupName: string, accountName: string, graphName: string, options?: GraphResourcesDeleteGraphResourceOptionalParams): Promise; + getGraph(resourceGroupName: string, accountName: string, graphName: string, options?: GraphResourcesGetGraphOptionalParams): Promise; + listGraphs(resourceGroupName: string, accountName: string, options?: GraphResourcesListGraphsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GraphResourcesCreateUpdateGraphHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface GraphResourcesCreateUpdateGraphOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GraphResourcesCreateUpdateGraphResponse = GraphResourceGetResults; + +// @public +export interface GraphResourcesDeleteGraphResourceHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface GraphResourcesDeleteGraphResourceOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GraphResourcesGetGraphOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GraphResourcesGetGraphResponse = GraphResourceGetResults; + +// @public +export interface GraphResourcesListGraphsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GraphResourcesListGraphsResponse = GraphResourcesListResult; + +// @public +export interface GraphResourcesListResult { + readonly value?: GraphResourceGetResults[]; +} + // @public export interface GremlinDatabaseCreateUpdateParameters extends ARMResourceProperties { options?: CreateUpdateOptions; @@ -1880,6 +2527,9 @@ export interface IpAddressOrRange { ipAddressOrRange?: string; } +// @public +export type IssueType = string; + // @public export type KeyKind = string; @@ -1894,6 +2544,12 @@ export interface KeyWrapMetadata { // @public export type Kind = string; +// @public +export enum KnownAccessRuleDirection { + Inbound = "Inbound", + Outbound = "Outbound" +} + // @public export enum KnownAnalyticalStorageSchemaType { FullFidelity = "FullFidelity", @@ -1917,6 +2573,13 @@ export enum KnownAuthenticationMethod { None = "None" } +// @public +export enum KnownAutoReplicate { + AllKeyspaces = "AllKeyspaces", + None = "None", + SystemKeyspaces = "SystemKeyspaces" +} + // @public export enum KnownAzureConnectionType { None = "None", @@ -1937,6 +2600,14 @@ export enum KnownBackupPolicyType { Periodic = "Periodic" } +// @public +export enum KnownBackupState { + Failed = "Failed", + Initiated = "Initiated", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownBackupStorageRedundancy { Geo = "Geo", @@ -1944,6 +2615,38 @@ export enum KnownBackupStorageRedundancy { Zone = "Zone" } +// @public +export enum KnownCapacityMode { + None = "None", + Provisioned = "Provisioned", + Serverless = "Serverless" +} + +// @public +export enum KnownCapacityModeTransitionStatus { + Completed = "Completed", + Failed = "Failed", + Initialized = "Initialized", + InProgress = "InProgress", + Invalid = "Invalid" +} + +// @public +export enum KnownClusterType { + NonProduction = "NonProduction", + Production = "Production" +} + +// @public +export enum KnownCommandStatus { + Done = "Done", + Enqueue = "Enqueue", + Failed = "Failed", + Finished = "Finished", + Processing = "Processing", + Running = "Running" +} + // @public export enum KnownCompositePathSortOrder { Ascending = "ascending", @@ -1998,6 +2701,21 @@ export enum KnownDatabaseAccountKind { Parse = "Parse" } +// @public +export enum KnownDataTransferComponent { + AzureBlobStorage = "AzureBlobStorage", + CosmosDBCassandra = "CosmosDBCassandra", + CosmosDBMongo = "CosmosDBMongo", + CosmosDBMongoVCore = "CosmosDBMongoVCore", + CosmosDBSql = "CosmosDBSql" +} + +// @public +export enum KnownDataTransferJobMode { + Offline = "Offline", + Online = "Online" +} + // @public export enum KnownDataType { LineString = "LineString", @@ -2014,6 +2732,12 @@ export enum KnownDedicatedGatewayType { IntegratedCache = "IntegratedCache" } +// @public +export enum KnownDefaultPriorityLevel { + High = "High", + Low = "Low" +} + // @public export enum KnownDistanceFunction { Cosine = "cosine", @@ -2035,6 +2759,14 @@ export enum KnownIndexKind { Spatial = "Spatial" } +// @public +export enum KnownIssueType { + ConfigurationPropagationFailure = "ConfigurationPropagationFailure", + MissingIdentityConfiguration = "MissingIdentityConfiguration", + MissingPerimeterConfiguration = "MissingPerimeterConfiguration", + Unknown = "Unknown" +} + // @public export enum KnownKeyKind { Primary = "primary", @@ -2074,6 +2806,17 @@ export enum KnownMinimalTlsVersion { Tls12 = "Tls12" } +// @public +export enum KnownNetworkSecurityPerimeterConfigurationProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownNodeState { Joining = "Joining", @@ -2127,11 +2870,25 @@ export enum KnownPublicNetworkAccess { SecuredByPerimeter = "SecuredByPerimeter" } +// @public +export enum KnownResourceAssociationAccessMode { + Audit = "Audit", + Enforced = "Enforced", + Learning = "Learning" +} + // @public export enum KnownRestoreMode { PointInTime = "PointInTime" } +// @public +export enum KnownScheduledEventStrategy { + Ignore = "Ignore", + StopAny = "StopAny", + StopByRack = "StopByRack" +} + // @public export enum KnownServerVersion { Five0 = "5.0", @@ -2168,6 +2925,12 @@ export enum KnownServiceType { SqlDedicatedGateway = "SqlDedicatedGateway" } +// @public +export enum KnownSeverity { + Error = "Error", + Warning = "Warning" +} + // @public export enum KnownSpatialType { LineString = "LineString", @@ -2178,11 +2941,22 @@ export enum KnownSpatialType { // @public export enum KnownStatus { + Canceled = "Canceled", Deleting = "Deleting", + Failed = "Failed", Initializing = "Initializing", InternallyReady = "InternallyReady", Online = "Online", - Uninitialized = "Uninitialized" + Succeeded = "Succeeded", + Uninitialized = "Uninitialized", + Updating = "Updating" +} + +// @public +export enum KnownThroughputPolicyType { + Custom = "custom", + Equal = "equal", + None = "none" } // @public @@ -2238,11 +3012,21 @@ export enum KnownVectorIndexType { QuantizedFlat = "quantizedFlat" } +// @public +export interface ListBackups { + readonly value?: BackupResource[]; +} + // @public export interface ListClusters { value?: ClusterResource[]; } +// @public +export interface ListCommands { + readonly value?: CommandPublicResource[]; +} + // @public export interface ListDataCenters { readonly value?: DataCenterResource[]; @@ -2346,6 +3130,13 @@ export interface ManagedServiceIdentity { }; } +// @public +export interface MaterializedViewDefinition { + definition: string; + sourceCollectionId: string; + readonly sourceCollectionRid?: string; +} + // @public export interface MaterializedViewsBuilderRegionalServiceResource extends RegionalServiceResource { } @@ -2366,6 +3157,11 @@ export interface MaterializedViewsBuilderServiceResourceProperties extends Servi serviceType: "MaterializedViewsBuilder"; } +// @public +export interface MergeParameters { + isDryRun?: boolean; +} + // @public export interface Metric { readonly endTime?: Date; @@ -2511,6 +3307,8 @@ export interface MongoDBResources { beginDeleteMongoRoleDefinitionAndWait(mongoRoleDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams): Promise; beginDeleteMongoUserDefinition(mongoUserDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams): Promise, void>>; beginDeleteMongoUserDefinitionAndWait(mongoUserDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams): Promise; + beginListMongoDBCollectionPartitionMerge(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, mergeParameters: MergeParameters, options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams): Promise, MongoDBResourcesListMongoDBCollectionPartitionMergeResponse>>; + beginListMongoDBCollectionPartitionMergeAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, mergeParameters: MergeParameters, options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams): Promise; beginMigrateMongoDBCollectionToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalParams): Promise, MongoDBResourcesMigrateMongoDBCollectionToAutoscaleResponse>>; beginMigrateMongoDBCollectionToAutoscaleAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalParams): Promise; beginMigrateMongoDBCollectionToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesMigrateMongoDBCollectionToManualThroughputOptionalParams): Promise, MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse>>; @@ -2519,6 +3317,16 @@ export interface MongoDBResources { beginMigrateMongoDBDatabaseToAutoscaleAndWait(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleOptionalParams): Promise; beginMigrateMongoDBDatabaseToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams): Promise, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse>>; beginMigrateMongoDBDatabaseToManualThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams): Promise; + beginMongoDBContainerRedistributeThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams): Promise, MongoDBResourcesMongoDBContainerRedistributeThroughputResponse>>; + beginMongoDBContainerRedistributeThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams): Promise; + beginMongoDBContainerRetrieveThroughputDistribution(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams): Promise, MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse>>; + beginMongoDBContainerRetrieveThroughputDistributionAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams): Promise; + beginMongoDBDatabasePartitionMerge(resourceGroupName: string, accountName: string, databaseName: string, mergeParameters: MergeParameters, options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams): Promise, MongoDBResourcesMongoDBDatabasePartitionMergeResponse>>; + beginMongoDBDatabasePartitionMergeAndWait(resourceGroupName: string, accountName: string, databaseName: string, mergeParameters: MergeParameters, options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams): Promise; + beginMongoDBDatabaseRedistributeThroughput(resourceGroupName: string, accountName: string, databaseName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams): Promise, MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse>>; + beginMongoDBDatabaseRedistributeThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams): Promise; + beginMongoDBDatabaseRetrieveThroughputDistribution(resourceGroupName: string, accountName: string, databaseName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams): Promise, MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse>>; + beginMongoDBDatabaseRetrieveThroughputDistributionAndWait(resourceGroupName: string, accountName: string, databaseName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams): Promise; beginRetrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, location: ContinuousBackupRestoreLocation, options?: MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams): Promise, MongoDBResourcesRetrieveContinuousBackupInformationResponse>>; beginRetrieveContinuousBackupInformationAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, location: ContinuousBackupRestoreLocation, options?: MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams): Promise; beginUpdateMongoDBCollectionThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams): Promise, MongoDBResourcesUpdateMongoDBCollectionThroughputResponse>>; @@ -2669,6 +3477,21 @@ export interface MongoDBResourcesGetMongoUserDefinitionOptionalParams extends co // @public export type MongoDBResourcesGetMongoUserDefinitionResponse = MongoUserDefinitionGetResults; +// @public +export interface MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesListMongoDBCollectionPartitionMergeResponse = PhysicalPartitionStorageInfoCollection; + // @public export interface MongoDBResourcesListMongoDBCollectionsOptionalParams extends coreClient.OperationOptions { } @@ -2758,64 +3581,139 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptiona export type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; // @public -export interface MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { +export interface MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type MongoDBResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; +export type MongoDBResourcesMongoDBContainerRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; // @public -export interface MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders { +export interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders { azureAsyncOperation?: string; location?: string; } // @public -export interface MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams extends coreClient.OperationOptions { +export interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type MongoDBResourcesUpdateMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults; +export type MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; // @public -export interface MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders { +export interface MongoDBResourcesMongoDBDatabasePartitionMergeHeaders { azureAsyncOperation?: string; location?: string; } // @public -export interface MongoDBResourcesUpdateMongoDBDatabaseThroughputOptionalParams extends coreClient.OperationOptions { +export interface MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type MongoDBResourcesUpdateMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults; +export type MongoDBResourcesMongoDBDatabasePartitionMergeResponse = PhysicalPartitionStorageInfoCollection; // @public -export interface MongoIndex { - key?: MongoIndexKeys; - options?: MongoIndexOptions; +export interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders { + azureAsyncOperation?: string; + location?: string; } // @public -export interface MongoIndexKeys { - keys?: string[]; +export interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface MongoIndexOptions { - expireAfterSeconds?: number; - unique?: boolean; -} +export type MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; // @public -export interface MongoRoleDefinitionCreateUpdateParameters { - databaseName?: string; +export interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; + +// @public +export interface MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesUpdateMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults; + +// @public +export interface MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesUpdateMongoDBDatabaseThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesUpdateMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults; + +// @public +export interface MongoIndex { + key?: MongoIndexKeys; + options?: MongoIndexOptions; +} + +// @public +export interface MongoIndexKeys { + keys?: string[]; +} + +// @public +export interface MongoIndexOptions { + expireAfterSeconds?: number; + unique?: boolean; +} + +// @public +export interface MongoRoleDefinitionCreateUpdateParameters { + databaseName?: string; privileges?: Privilege[]; roleName?: string; roles?: Role[]; @@ -2867,6 +3765,89 @@ export interface MongoUserDefinitionListResult { // @public export type NetworkAclBypass = "None" | "AzureServices"; +// @public +export interface NetworkSecurityPerimeter { + id?: string; + location?: string; + perimeterGuid?: string; +} + +// @public +export interface NetworkSecurityPerimeterConfiguration extends ProxyResource { + properties?: NetworkSecurityPerimeterConfigurationProperties; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationListResult { + nextLink?: string; + value?: NetworkSecurityPerimeterConfiguration[]; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationProperties { + networkSecurityPerimeter?: NetworkSecurityPerimeter; + profile?: NetworkSecurityProfile; + readonly provisioningIssues?: ProvisioningIssue[]; + readonly provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState; + resourceAssociation?: ResourceAssociation; +} + +// @public +export type NetworkSecurityPerimeterConfigurationProvisioningState = string; + +// @public +export interface NetworkSecurityPerimeterConfigurations { + beginReconcile(resourceGroupName: string, accountName: string, networkSecurityPerimeterConfigurationName: string, options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams): Promise, NetworkSecurityPerimeterConfigurationsReconcileResponse>>; + beginReconcileAndWait(resourceGroupName: string, accountName: string, networkSecurityPerimeterConfigurationName: string, options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, networkSecurityPerimeterConfigurationName: string, options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: NetworkSecurityPerimeterConfigurationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationsGetResponse = NetworkSecurityPerimeterConfiguration; + +// @public +export interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationsListNextResponse = NetworkSecurityPerimeterConfigurationListResult; + +// @public +export interface NetworkSecurityPerimeterConfigurationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationsListResponse = NetworkSecurityPerimeterConfigurationListResult; + +// @public +export interface NetworkSecurityPerimeterConfigurationsReconcileHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkSecurityPerimeterConfigurationsReconcileResponse = NetworkSecurityPerimeterConfigurationsReconcileHeaders; + +// @public +export interface NetworkSecurityProfile { + accessRules?: AccessRule[]; + accessRulesVersion?: number; + diagnosticSettingsVersion?: number; + enabledLogCategories?: string[]; + name?: string; +} + // @public export type NodeState = string; @@ -3138,6 +4119,49 @@ export interface Permission { notDataActions?: string[]; } +// @public +export interface PermissionAutoGenerated { + dataActions?: string[]; + id?: string; + notDataActions?: string[]; +} + +// @public +export interface PhysicalPartitionId { + id: string; +} + +// @public +export interface PhysicalPartitionStorageInfo { + readonly id?: string; + readonly storageInKB?: number; +} + +// @public +export interface PhysicalPartitionStorageInfoCollection { + readonly physicalPartitionStorageInfoCollection?: PhysicalPartitionStorageInfo[]; +} + +// @public +export interface PhysicalPartitionThroughputInfoProperties { + physicalPartitionThroughputInfo?: PhysicalPartitionThroughputInfoResource[]; +} + +// @public +export interface PhysicalPartitionThroughputInfoResource { + id: string; + throughput?: number; +} + +// @public +export interface PhysicalPartitionThroughputInfoResult extends ARMResourceProperties { + resource?: PhysicalPartitionThroughputInfoResultPropertiesResource; +} + +// @public +export interface PhysicalPartitionThroughputInfoResultPropertiesResource extends PhysicalPartitionThroughputInfoProperties { +} + // @public export type PrimaryAggregationType = string; @@ -3249,6 +4273,21 @@ export interface PrivilegeResource { db?: string; } +// @public +export interface ProvisioningIssue { + readonly name?: string; + readonly properties?: ProvisioningIssueProperties; +} + +// @public +export interface ProvisioningIssueProperties { + readonly description?: string; + readonly issueType?: IssueType; + readonly severity?: Severity; + readonly suggestedAccessRules?: AccessRule[]; + readonly suggestedResourceIds?: string[]; +} + // @public export interface ProxyResource extends Resource { } @@ -3256,6 +4295,18 @@ export interface ProxyResource extends Resource { // @public export type PublicNetworkAccess = string; +// @public +export interface RedistributeThroughputParameters extends ARMResourceProperties { + resource: RedistributeThroughputPropertiesResource; +} + +// @public +export interface RedistributeThroughputPropertiesResource { + sourcePhysicalPartitionThroughputInfo: PhysicalPartitionThroughputInfoResource[]; + targetPhysicalPartitionThroughputInfo: PhysicalPartitionThroughputInfoResource[]; + throughputPolicy: ThroughputPolicyType; +} + // @public export interface RegionalServiceResource { readonly location?: string; @@ -3272,9 +4323,19 @@ export interface RegionForOnlineOffline { export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } +// @public +export interface ResourceAssociation { + accessMode?: ResourceAssociationAccessMode; + name?: string; +} + +// @public +export type ResourceAssociationAccessMode = string; + // @public export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "SystemAssigned,UserAssigned" | "None"; @@ -3732,6 +4793,7 @@ export interface RestoreParameters extends RestoreParametersBase { databasesToRestore?: DatabaseRestoreResource[]; gremlinDatabasesToRestore?: GremlinDatabaseRestoreResource[]; restoreMode?: RestoreMode; + sourceBackupLocation?: string; tablesToRestore?: string[]; } @@ -3742,6 +4804,16 @@ export interface RestoreParametersBase { restoreWithTtlDisabled?: boolean; } +// @public +export interface RetrieveThroughputParameters extends ARMResourceProperties { + resource: RetrieveThroughputPropertiesResource; +} + +// @public +export interface RetrieveThroughputPropertiesResource { + physicalPartitionIds: PhysicalPartitionId[]; +} + // @public export interface Role { db?: string; @@ -3751,6 +4823,9 @@ export interface Role { // @public export type RoleDefinitionType = "BuiltInRole" | "CustomRole"; +// @public +export type ScheduledEventStrategy = string; + // @public (undocumented) export interface SeedNode { ipAddress?: string; @@ -3769,12 +4844,6 @@ export interface Service { list(resourceGroupName: string, accountName: string, options?: ServiceListOptionalParams): PagedAsyncIterableIterator; } -// @public -export interface ServiceCreateHeaders { - azureAsyncOperation?: string; - location?: string; -} - // @public export interface ServiceCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3857,6 +4926,9 @@ export type ServiceStatus = string; // @public export type ServiceType = string; +// @public +export type Severity = string; + // @public (undocumented) export interface SpatialSpec { path?: string; @@ -3903,6 +4975,7 @@ export interface SqlContainerResource { defaultTtl?: number; id: string; indexingPolicy?: IndexingPolicy; + materializedViewDefinition?: MaterializedViewDefinition; partitionKey?: ContainerPartitionKey; restoreParameters?: ResourceRestoreParameters; uniqueKeyPolicy?: UniqueKeyPolicy; @@ -4001,6 +5074,8 @@ export interface SqlResources { beginDeleteSqlTriggerAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, triggerName: string, options?: SqlResourcesDeleteSqlTriggerOptionalParams): Promise; beginDeleteSqlUserDefinedFunction(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, userDefinedFunctionName: string, options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams): Promise, SqlResourcesDeleteSqlUserDefinedFunctionResponse>>; beginDeleteSqlUserDefinedFunctionAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, userDefinedFunctionName: string, options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams): Promise; + beginListSqlContainerPartitionMerge(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, mergeParameters: MergeParameters, options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams): Promise, SqlResourcesListSqlContainerPartitionMergeResponse>>; + beginListSqlContainerPartitionMergeAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, mergeParameters: MergeParameters, options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams): Promise; beginMigrateSqlContainerToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams): Promise, SqlResourcesMigrateSqlContainerToAutoscaleResponse>>; beginMigrateSqlContainerToAutoscaleAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams): Promise; beginMigrateSqlContainerToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams): Promise, SqlResourcesMigrateSqlContainerToManualThroughputResponse>>; @@ -4011,6 +5086,16 @@ export interface SqlResources { beginMigrateSqlDatabaseToManualThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, options?: SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams): Promise; beginRetrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, location: ContinuousBackupRestoreLocation, options?: SqlResourcesRetrieveContinuousBackupInformationOptionalParams): Promise, SqlResourcesRetrieveContinuousBackupInformationResponse>>; beginRetrieveContinuousBackupInformationAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, location: ContinuousBackupRestoreLocation, options?: SqlResourcesRetrieveContinuousBackupInformationOptionalParams): Promise; + beginSqlContainerRedistributeThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams): Promise, SqlResourcesSqlContainerRedistributeThroughputResponse>>; + beginSqlContainerRedistributeThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams): Promise; + beginSqlContainerRetrieveThroughputDistribution(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams): Promise, SqlResourcesSqlContainerRetrieveThroughputDistributionResponse>>; + beginSqlContainerRetrieveThroughputDistributionAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams): Promise; + beginSqlDatabasePartitionMerge(resourceGroupName: string, accountName: string, databaseName: string, mergeParameters: MergeParameters, options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams): Promise, SqlResourcesSqlDatabasePartitionMergeResponse>>; + beginSqlDatabasePartitionMergeAndWait(resourceGroupName: string, accountName: string, databaseName: string, mergeParameters: MergeParameters, options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams): Promise; + beginSqlDatabaseRedistributeThroughput(resourceGroupName: string, accountName: string, databaseName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams): Promise, SqlResourcesSqlDatabaseRedistributeThroughputResponse>>; + beginSqlDatabaseRedistributeThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams): Promise; + beginSqlDatabaseRetrieveThroughputDistribution(resourceGroupName: string, accountName: string, databaseName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams): Promise, SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse>>; + beginSqlDatabaseRetrieveThroughputDistributionAndWait(resourceGroupName: string, accountName: string, databaseName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams): Promise; beginUpdateSqlContainerThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlContainerThroughputOptionalParams): Promise, SqlResourcesUpdateSqlContainerThroughputResponse>>; beginUpdateSqlContainerThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlContainerThroughputOptionalParams): Promise; beginUpdateSqlDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlDatabaseThroughputOptionalParams): Promise, SqlResourcesUpdateSqlDatabaseThroughputResponse>>; @@ -4307,6 +5392,21 @@ export interface SqlResourcesListClientEncryptionKeysOptionalParams extends core // @public export type SqlResourcesListClientEncryptionKeysResponse = ClientEncryptionKeysListResult; +// @public +export interface SqlResourcesListSqlContainerPartitionMergeHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesListSqlContainerPartitionMergeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesListSqlContainerPartitionMergeResponse = PhysicalPartitionStorageInfoCollection; + // @public export interface SqlResourcesListSqlContainersOptionalParams extends coreClient.OperationOptions { } @@ -4425,6 +5525,81 @@ export interface SqlResourcesRetrieveContinuousBackupInformationOptionalParams e // @public export type SqlResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; +// @public +export interface SqlResourcesSqlContainerRedistributeThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlContainerRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlContainerRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlContainerRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface SqlResourcesSqlDatabasePartitionMergeHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlDatabasePartitionMergeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlDatabasePartitionMergeResponse = PhysicalPartitionStorageInfoCollection; + +// @public +export interface SqlResourcesSqlDatabaseRedistributeThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlDatabaseRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + // @public export interface SqlResourcesUpdateSqlContainerThroughputHeaders { azureAsyncOperation?: string; @@ -4581,6 +5756,9 @@ export interface SqlUserDefinedFunctionResource { // @public export type Status = string; +// @public +export type SupportedActions = "Enable" | "Disable"; + // @public export interface SystemData { createdAt?: Date; @@ -4629,8 +5807,16 @@ export interface TableResource { export interface TableResources { beginCreateUpdateTable(resourceGroupName: string, accountName: string, tableName: string, createUpdateTableParameters: TableCreateUpdateParameters, options?: TableResourcesCreateUpdateTableOptionalParams): Promise, TableResourcesCreateUpdateTableResponse>>; beginCreateUpdateTableAndWait(resourceGroupName: string, accountName: string, tableName: string, createUpdateTableParameters: TableCreateUpdateParameters, options?: TableResourcesCreateUpdateTableOptionalParams): Promise; + beginCreateUpdateTableRoleAssignment(resourceGroupName: string, accountName: string, roleAssignmentId: string, createUpdateTableRoleAssignmentParameters: TableRoleAssignmentResource, options?: TableResourcesCreateUpdateTableRoleAssignmentOptionalParams): Promise, TableResourcesCreateUpdateTableRoleAssignmentResponse>>; + beginCreateUpdateTableRoleAssignmentAndWait(resourceGroupName: string, accountName: string, roleAssignmentId: string, createUpdateTableRoleAssignmentParameters: TableRoleAssignmentResource, options?: TableResourcesCreateUpdateTableRoleAssignmentOptionalParams): Promise; + beginCreateUpdateTableRoleDefinition(resourceGroupName: string, accountName: string, roleDefinitionId: string, createUpdateTableRoleDefinitionParameters: TableRoleDefinitionResource, options?: TableResourcesCreateUpdateTableRoleDefinitionOptionalParams): Promise, TableResourcesCreateUpdateTableRoleDefinitionResponse>>; + beginCreateUpdateTableRoleDefinitionAndWait(resourceGroupName: string, accountName: string, roleDefinitionId: string, createUpdateTableRoleDefinitionParameters: TableRoleDefinitionResource, options?: TableResourcesCreateUpdateTableRoleDefinitionOptionalParams): Promise; beginDeleteTable(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesDeleteTableOptionalParams): Promise, TableResourcesDeleteTableResponse>>; beginDeleteTableAndWait(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesDeleteTableOptionalParams): Promise; + beginDeleteTableRoleAssignment(resourceGroupName: string, accountName: string, roleAssignmentId: string, options?: TableResourcesDeleteTableRoleAssignmentOptionalParams): Promise, void>>; + beginDeleteTableRoleAssignmentAndWait(resourceGroupName: string, accountName: string, roleAssignmentId: string, options?: TableResourcesDeleteTableRoleAssignmentOptionalParams): Promise; + beginDeleteTableRoleDefinition(resourceGroupName: string, accountName: string, roleDefinitionId: string, options?: TableResourcesDeleteTableRoleDefinitionOptionalParams): Promise, void>>; + beginDeleteTableRoleDefinitionAndWait(resourceGroupName: string, accountName: string, roleDefinitionId: string, options?: TableResourcesDeleteTableRoleDefinitionOptionalParams): Promise; beginMigrateTableToAutoscale(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesMigrateTableToAutoscaleOptionalParams): Promise, TableResourcesMigrateTableToAutoscaleResponse>>; beginMigrateTableToAutoscaleAndWait(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesMigrateTableToAutoscaleOptionalParams): Promise; beginMigrateTableToManualThroughput(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesMigrateTableToManualThroughputOptionalParams): Promise, TableResourcesMigrateTableToManualThroughputResponse>>; @@ -4640,7 +5826,11 @@ export interface TableResources { beginUpdateTableThroughput(resourceGroupName: string, accountName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: TableResourcesUpdateTableThroughputOptionalParams): Promise, TableResourcesUpdateTableThroughputResponse>>; beginUpdateTableThroughputAndWait(resourceGroupName: string, accountName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: TableResourcesUpdateTableThroughputOptionalParams): Promise; getTable(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesGetTableOptionalParams): Promise; + getTableRoleAssignment(resourceGroupName: string, accountName: string, roleAssignmentId: string, options?: TableResourcesGetTableRoleAssignmentOptionalParams): Promise; + getTableRoleDefinition(resourceGroupName: string, accountName: string, roleDefinitionId: string, options?: TableResourcesGetTableRoleDefinitionOptionalParams): Promise; getTableThroughput(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesGetTableThroughputOptionalParams): Promise; + listTableRoleAssignments(resourceGroupName: string, accountName: string, options?: TableResourcesListTableRoleAssignmentsOptionalParams): PagedAsyncIterableIterator; + listTableRoleDefinitions(resourceGroupName: string, accountName: string, options?: TableResourcesListTableRoleDefinitionsOptionalParams): PagedAsyncIterableIterator; listTables(resourceGroupName: string, accountName: string, options?: TableResourcesListTablesOptionalParams): PagedAsyncIterableIterator; } @@ -4659,6 +5849,36 @@ export interface TableResourcesCreateUpdateTableOptionalParams extends coreClien // @public export type TableResourcesCreateUpdateTableResponse = TableGetResults; +// @public +export interface TableResourcesCreateUpdateTableRoleAssignmentHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface TableResourcesCreateUpdateTableRoleAssignmentOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TableResourcesCreateUpdateTableRoleAssignmentResponse = TableRoleAssignmentResource; + +// @public +export interface TableResourcesCreateUpdateTableRoleDefinitionHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface TableResourcesCreateUpdateTableRoleDefinitionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TableResourcesCreateUpdateTableRoleDefinitionResponse = TableRoleDefinitionResource; + // @public export interface TableResourcesDeleteTableHeaders { azureAsyncOperation?: string; @@ -4674,6 +5894,30 @@ export interface TableResourcesDeleteTableOptionalParams extends coreClient.Oper // @public export type TableResourcesDeleteTableResponse = TableResourcesDeleteTableHeaders; +// @public +export interface TableResourcesDeleteTableRoleAssignmentHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface TableResourcesDeleteTableRoleAssignmentOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface TableResourcesDeleteTableRoleDefinitionHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface TableResourcesDeleteTableRoleDefinitionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface TableResourcesGetTableOptionalParams extends coreClient.OperationOptions { } @@ -4681,6 +5925,20 @@ export interface TableResourcesGetTableOptionalParams extends coreClient.Operati // @public export type TableResourcesGetTableResponse = TableGetResults; +// @public +export interface TableResourcesGetTableRoleAssignmentOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TableResourcesGetTableRoleAssignmentResponse = TableRoleAssignmentResource; + +// @public +export interface TableResourcesGetTableRoleDefinitionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TableResourcesGetTableRoleDefinitionResponse = TableRoleDefinitionResource; + // @public export interface TableResourcesGetTableThroughputOptionalParams extends coreClient.OperationOptions { } @@ -4688,6 +5946,20 @@ export interface TableResourcesGetTableThroughputOptionalParams extends coreClie // @public export type TableResourcesGetTableThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface TableResourcesListTableRoleAssignmentsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TableResourcesListTableRoleAssignmentsResponse = TableRoleAssignmentListResult; + +// @public +export interface TableResourcesListTableRoleDefinitionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TableResourcesListTableRoleDefinitionsResponse = TableRoleDefinitionListResult; + // @public export interface TableResourcesListTablesOptionalParams extends coreClient.OperationOptions { } @@ -4749,12 +6021,242 @@ export interface TableResourcesUpdateTableThroughputOptionalParams extends coreC // @public export type TableResourcesUpdateTableThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface TableRoleAssignmentListResult { + readonly nextLink?: string; + readonly value?: TableRoleAssignmentResource[]; +} + +// @public +export interface TableRoleAssignmentResource extends ProxyResource { + principalId?: string; + readonly provisioningState?: string; + roleDefinitionId?: string; + scope?: string; +} + +// @public +export interface TableRoleDefinitionListResult { + readonly nextLink?: string; + readonly value?: TableRoleDefinitionResource[]; +} + +// @public +export interface TableRoleDefinitionResource extends ProxyResource { + assignableScopes?: string[]; + idPropertiesId?: string; + permissions?: PermissionAutoGenerated[]; + roleName?: string; + typePropertiesType?: RoleDefinitionType; +} + +// @public +export interface ThroughputBucketResource { + id: number; + maxThroughputPercentage: number; +} + // @public export interface ThroughputPolicyResource { incrementPercent?: number; isEnabled?: boolean; } +// @public +export type ThroughputPolicyType = string; + +// @public +export interface ThroughputPool { + beginCreateOrUpdate(resourceGroupName: string, throughputPoolName: string, body: ThroughputPoolResource, options?: ThroughputPoolCreateOrUpdateOptionalParams): Promise, ThroughputPoolCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, throughputPoolName: string, body: ThroughputPoolResource, options?: ThroughputPoolCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolDeleteOptionalParams): Promise, ThroughputPoolDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolUpdateOptionalParams): Promise, ThroughputPoolUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolUpdateOptionalParams): Promise; + get(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolGetOptionalParams): Promise; +} + +// @public +export interface ThroughputPoolAccount { + beginCreate(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, body: ThroughputPoolAccountResource, options?: ThroughputPoolAccountCreateOptionalParams): Promise, ThroughputPoolAccountCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, body: ThroughputPoolAccountResource, options?: ThroughputPoolAccountCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, options?: ThroughputPoolAccountDeleteOptionalParams): Promise, ThroughputPoolAccountDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, options?: ThroughputPoolAccountDeleteOptionalParams): Promise; + get(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, options?: ThroughputPoolAccountGetOptionalParams): Promise; +} + +// @public +export interface ThroughputPoolAccountCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ThroughputPoolAccountCreateParameters { + accountLocation?: string; + accountResourceIdentifier?: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type ThroughputPoolAccountCreateResponse = ThroughputPoolAccountResource; + +// @public +export interface ThroughputPoolAccountDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface ThroughputPoolAccountDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ThroughputPoolAccountDeleteResponse = ThroughputPoolAccountDeleteHeaders; + +// @public +export interface ThroughputPoolAccountGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolAccountGetResponse = ThroughputPoolAccountResource; + +// @public +export interface ThroughputPoolAccountResource extends ProxyResource { + readonly accountInstanceId?: string; + accountLocation?: string; + accountResourceIdentifier?: string; + provisioningState?: Status; +} + +// @public +export interface ThroughputPoolAccounts { + list(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolAccountsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ThroughputPoolAccountsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolAccountsListNextResponse = ThroughputPoolAccountsListResult; + +// @public +export interface ThroughputPoolAccountsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolAccountsListResponse = ThroughputPoolAccountsListResult; + +// @public +export interface ThroughputPoolAccountsListResult { + readonly nextLink?: string; + readonly value?: ThroughputPoolAccountResource[]; +} + +// @public +export interface ThroughputPoolCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ThroughputPoolCreateOrUpdateResponse = ThroughputPoolResource; + +// @public +export interface ThroughputPoolDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface ThroughputPoolDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ThroughputPoolDeleteResponse = ThroughputPoolDeleteHeaders; + +// @public +export interface ThroughputPoolGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolGetResponse = ThroughputPoolResource; + +// @public +export interface ThroughputPoolResource extends TrackedResource { + maxThroughput?: number; + provisioningState?: Status; +} + +// @public +export interface ThroughputPools { + list(options?: ThroughputPoolsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ThroughputPoolsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ThroughputPoolsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolsListByResourceGroupNextResponse = ThroughputPoolsListResult; + +// @public +export interface ThroughputPoolsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolsListByResourceGroupResponse = ThroughputPoolsListResult; + +// @public +export interface ThroughputPoolsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolsListNextResponse = ThroughputPoolsListResult; + +// @public +export interface ThroughputPoolsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolsListResponse = ThroughputPoolsListResult; + +// @public +export interface ThroughputPoolsListResult { + readonly nextLink?: string; + readonly value?: ThroughputPoolResource[]; +} + +// @public +export interface ThroughputPoolUpdate { + maxThroughput?: number; + provisioningState?: Status; +} + +// @public +export interface ThroughputPoolUpdateHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface ThroughputPoolUpdateOptionalParams extends coreClient.OperationOptions { + body?: ThroughputPoolUpdate; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ThroughputPoolUpdateResponse = ThroughputPoolResource; + // @public (undocumented) export interface ThroughputSettingsGetPropertiesResource extends ThroughputSettingsResource, ExtendedResourceProperties { } @@ -4773,6 +6275,7 @@ export interface ThroughputSettingsResource { readonly offerReplacePending?: string; readonly softAllowedMaximumThroughput?: string; throughput?: number; + throughputBuckets?: ThroughputBucketResource[]; } // @public @@ -4780,6 +6283,14 @@ export interface ThroughputSettingsUpdateParameters extends ARMResourcePropertie resource: ThroughputSettingsResource; } +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + // @public export type TriggerOperation = string; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersCreateUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersCreateUpdateSample.ts index 8bca62048601..411d70202b20 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersCreateUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersCreateUpdateSample.ts @@ -10,20 +10,18 @@ // Licensed under the MIT License. import { ClusterResource, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. * * @summary Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterCreate.json */ async function cosmosDbManagedCassandraClusterCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeallocateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeallocateSample.ts index f9921c9e8fe1..75d22f0fc4b2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeallocateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeallocateSample.ts @@ -10,20 +10,18 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. * * @summary Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDeallocate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDeallocate.json */ async function cosmosDbManagedCassandraClusterDeallocate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeleteSample.ts index 305528d5a968..e10b930b7720 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a managed Cassandra cluster. * * @summary Deletes a managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDelete.json */ async function cosmosDbManagedCassandraClusterDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetBackupSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetBackupSample.ts new file mode 100644 index 000000000000..f05cbb420245 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetBackupSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get the properties of an individual backup of this cluster that is available to restore. + * + * @summary Get the properties of an individual backup of this cluster that is available to restore. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackup.json + */ +async function cosmosDbManagedCassandraBackup() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const backupId = "1611250348"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraClusters.getBackup( + resourceGroupName, + clusterName, + backupId, + ); + console.log(result); +} + +async function main() { + cosmosDbManagedCassandraBackup(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetCommandAsyncSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetCommandAsyncSample.ts new file mode 100644 index 000000000000..f2437218b52c --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetCommandAsyncSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get details about a specified command that was run asynchronously. + * + * @summary Get details about a specified command that was run asynchronously. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandResult.json + */ +async function cosmosDbManagedCassandraCommandResult() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const commandId = "318653d0-3da5-4814-b8f6-429f2af0b2a4"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraClusters.getCommandAsync( + resourceGroupName, + clusterName, + commandId, + ); + console.log(result); +} + +async function main() { + cosmosDbManagedCassandraCommandResult(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetSample.ts index 6819bbc9eda0..cd610e8f66d7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of a managed Cassandra cluster. * * @summary Get the properties of a managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterGet.json */ async function cosmosDbManagedCassandraClusterGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersInvokeCommandAsyncSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersInvokeCommandAsyncSample.ts new file mode 100644 index 000000000000..ec06e542f3b0 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersInvokeCommandAsyncSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CommandAsyncPostBody, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Invoke a command like nodetool for cassandra maintenance asynchronously + * + * @summary Invoke a command like nodetool for cassandra maintenance asynchronously + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandAsync.json + */ +async function cosmosDbManagedCassandraCommandAsync() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const body: CommandAsyncPostBody = { + arguments: { status: "" }, + command: "nodetool", + host: "10.0.1.12", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraClusters.beginInvokeCommandAsyncAndWait( + resourceGroupName, + clusterName, + body, + ); + console.log(result); +} + +async function main() { + cosmosDbManagedCassandraCommandAsync(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersInvokeCommandSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersInvokeCommandSample.ts index fb53183bd163..d9508c107232 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersInvokeCommandSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersInvokeCommandSample.ts @@ -10,25 +10,24 @@ // Licensed under the MIT License. import { CommandPostBody, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Invoke a command like nodetool for cassandra maintenance * * @summary Invoke a command like nodetool for cassandra maintenance - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraCommand.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommand.json */ async function cosmosDbManagedCassandraCommand() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; const body: CommandPostBody = { - command: "nodetool status", + arguments: { status: "" }, + command: "nodetool", host: "10.0.1.12", }; const credential = new DefaultAzureCredential(); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListBackupsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListBackupsSample.ts new file mode 100644 index 000000000000..43f156df7fa2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListBackupsSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to List the backups of this cluster that are available to restore. + * + * @summary List the backups of this cluster that are available to restore. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackupsList.json + */ +async function cosmosDbManagedCassandraBackupsList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cassandraClusters.listBackups( + resourceGroupName, + clusterName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbManagedCassandraBackupsList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListByResourceGroupSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListByResourceGroupSample.ts index 4c761b69428b..c22224e47a7a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListByResourceGroupSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListByResourceGroupSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all managed Cassandra clusters in this resource group. * * @summary List all managed Cassandra clusters in this resource group. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json */ async function cosmosDbManagedCassandraClusterListByResourceGroup() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListBySubscriptionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListBySubscriptionSample.ts index 6a527fcb2480..8fdfcf27e81e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListBySubscriptionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListBySubscriptionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all managed Cassandra clusters in this subscription. * * @summary List all managed Cassandra clusters in this subscription. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListBySubscription.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListBySubscription.json */ async function cosmosDbManagedCassandraClusterListBySubscription() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListCommandSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListCommandSample.ts new file mode 100644 index 000000000000..c028d0d73de5 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersListCommandSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to List all commands currently running on ring info + * + * @summary List all commands currently running on ring info + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraListCommand.json + */ +async function cosmosDbManagedCassandraListCommand() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cassandraClusters.listCommand( + resourceGroupName, + clusterName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbManagedCassandraListCommand(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersStartSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersStartSample.ts index 01ce3133be11..190c9122fd02 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersStartSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersStartSample.ts @@ -10,20 +10,18 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. * * @summary Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterStart.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterStart.json */ async function cosmosDbManagedCassandraClusterStart() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersStatusSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersStatusSample.ts index 4611df59ed61..ccfc6aea3692 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersStatusSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersStatusSample.ts @@ -10,20 +10,18 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. * * @summary Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraStatus.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraStatus.json */ async function cosmosDbManagedCassandraStatus() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersUpdateSample.ts index 7f32c64094ac..f6b18c085210 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersUpdateSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { ClusterResource, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates some of the properties of a managed Cassandra cluster. * * @summary Updates some of the properties of a managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterPatch.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterPatch.json */ async function cosmosDbManagedCassandraClusterPatch() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersCreateUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersCreateUpdateSample.ts index 0063d200cede..685b80b61a58 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersCreateUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersCreateUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. * * @summary Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterCreate.json */ async function cosmosDbManagedCassandraDataCenterCreate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersDeleteSample.ts index 6fbb7c22e9eb..e92bf2fbaf18 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a managed Cassandra data center. * * @summary Delete a managed Cassandra data center. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterDelete.json */ async function cosmosDbManagedCassandraDataCenterDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersGetSample.ts index 2f318343f58c..5bc746eadf3e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of a managed Cassandra data center. * * @summary Get the properties of a managed Cassandra data center. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterGet.json */ async function cosmosDbManagedCassandraDataCenterGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersListSample.ts index f8785f6bb8d0..3e9c05ba21ea 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all data centers in a particular managed Cassandra cluster. * * @summary List all data centers in a particular managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterList.json */ async function cosmosDbManagedCassandraDataCenterList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersUpdateSample.ts index c5076eef70d5..ca10b79dbbca 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraDataCentersUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update some of the properties of a managed Cassandra data center. * * @summary Update some of the properties of a managed Cassandra data center. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterPatch.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterPatch.json */ async function cosmosDbManagedCassandraDataCenterUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts index 8852b7800b07..850e8554e675 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Cassandra keyspace * * @summary Create or update an Azure Cosmos DB Cassandra keyspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceCreateUpdate.json */ async function cosmosDbCassandraKeyspaceCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraTableSample.ts index 33d54648df1f..04ca68d90a36 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraTableSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Cassandra Table * * @summary Create or update an Azure Cosmos DB Cassandra Table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableCreateUpdate.json */ async function cosmosDbCassandraTableCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -39,6 +37,7 @@ async function cosmosDbCassandraTableCreateUpdate() { columns: [{ name: "columnA", type: "Ascii" }], partitionKeys: [{ name: "columnA" }], }, + analyticalStorageTtl: 500, defaultTtl: 100, id: "tableName", }, diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraViewSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraViewSample.ts new file mode 100644 index 000000000000..7493aa2cb317 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesCreateUpdateCassandraViewSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CassandraViewCreateUpdateParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB Cassandra View + * + * @summary Create or update an Azure Cosmos DB Cassandra View + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewCreateUpdate.json + */ +async function cosmosDbCassandraViewCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters = + { + options: {}, + resource: { + id: "viewname", + viewDefinition: + "SELECT columna, columnb, columnc FROM keyspacename.srctablename WHERE columna IS NOT NULL AND columnc IS NOT NULL PRIMARY (columnc, columna)", + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginCreateUpdateCassandraViewAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraKeyspaceSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraKeyspaceSample.ts index c4da7654f91f..2fa4d45c7121 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraKeyspaceSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraKeyspaceSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Cassandra keyspace. * * @summary Deletes an existing Azure Cosmos DB Cassandra keyspace. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceDelete.json */ async function cosmosDbCassandraKeyspaceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraTableSample.ts index 38f8a1a96595..e301c83486c3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraTableSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Cassandra table. * * @summary Deletes an existing Azure Cosmos DB Cassandra table. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableDelete.json */ async function cosmosDbCassandraTableDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraViewSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraViewSample.ts new file mode 100644 index 000000000000..c6416a7c063e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesDeleteCassandraViewSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Cassandra view. + * + * @summary Deletes an existing Azure Cosmos DB Cassandra view. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewDelete.json + */ +async function cosmosDbCassandraViewDelete() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginDeleteCassandraViewAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraKeyspaceSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraKeyspaceSample.ts index d4409999eff6..522a96117a76 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraKeyspaceSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraKeyspaceSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceGet.json */ async function cosmosDbCassandraKeyspaceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts index 7bcfe6468efa..dbab1b9419f6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputGet.json */ async function cosmosDbCassandraKeyspaceThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraTableSample.ts index 86671e8836bc..2b878e6c585c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraTableSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Cassandra table under an existing Azure Cosmos DB database account. * * @summary Gets the Cassandra table under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableGet.json */ async function cosmosDbCassandraTableGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraTableThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraTableThroughputSample.ts index b7da9da74893..af13cc764f1a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraTableThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraTableThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputGet.json */ async function cosmosDbCassandraTableThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraViewSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraViewSample.ts new file mode 100644 index 000000000000..e3ead5198ba1 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraViewSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the Cassandra view under an existing Azure Cosmos DB database account. + * + * @summary Gets the Cassandra view under an existing Azure Cosmos DB database account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewGet.json + */ +async function cosmosDbCassandraViewGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.getCassandraView( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraViewThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraViewThroughputSample.ts new file mode 100644 index 000000000000..aefdec56e955 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesGetCassandraViewThroughputSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. + * + * @summary Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputGet.json + */ +async function cosmosDbCassandraViewThroughputGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.getCassandraViewThroughput( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewThroughputGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraKeyspacesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraKeyspacesSample.ts index 3528b88c0cd2..eed74e2308c7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraKeyspacesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraKeyspacesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. * * @summary Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceList.json */ async function cosmosDbCassandraKeyspaceList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraTablesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraTablesSample.ts index dec60e9b51ac..5b41a97f2477 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraTablesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraTablesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Cassandra table under an existing Azure Cosmos DB database account. * * @summary Lists the Cassandra table under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableList.json */ async function cosmosDbCassandraTableList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraViewsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraViewsSample.ts new file mode 100644 index 000000000000..89c8a01fad69 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesListCassandraViewsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * + * @summary Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewList.json + */ +async function cosmosDbCassandraViewList() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cassandraResources.listCassandraViews( + resourceGroupName, + accountName, + keyspaceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbCassandraViewList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts index 040aa3e633a6..c06ce968e3bb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json */ async function cosmosDbCassandraKeyspaceMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts index 528ad35b9a01..d97927e0b2fc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json */ async function cosmosDbCassandraKeyspaceMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts index eae2d7bcd56d..5f018418032c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToAutoscale.json */ async function cosmosDbCassandraTableMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts index f8619f3a3ddf..c2a7bfa17349 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToManualThroughput.json */ async function cosmosDbCassandraTableMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts new file mode 100644 index 000000000000..eab726f8ce01 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * + * @summary Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.json + */ +async function cosmosDbCassandraViewMigrateToAutoscale() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginMigrateCassandraViewToAutoscaleAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewMigrateToAutoscale(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts new file mode 100644 index 000000000000..12c2ef9c1cf8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * + * @summary Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.json + */ +async function cosmosDbCassandraViewMigrateToManualThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginMigrateCassandraViewToManualThroughputAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewMigrateToManualThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts index 79380043f650..d04206f87424 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Cassandra Keyspace * * @summary Update RUs per second of an Azure Cosmos DB Cassandra Keyspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json */ async function cosmosDbCassandraKeyspaceThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraTableThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraTableThroughputSample.ts index 4486041f9cac..1abd55d1ccb4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraTableThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraTableThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Cassandra table * * @summary Update RUs per second of an Azure Cosmos DB Cassandra table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputUpdate.json */ async function cosmosDbCassandraTableThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraViewThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraViewThroughputSample.ts new file mode 100644 index 000000000000..43ec3c94e686 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraResourcesUpdateCassandraViewThroughputSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ThroughputSettingsUpdateParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Cassandra view + * + * @summary Update RUs per second of an Azure Cosmos DB Cassandra view + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputUpdate.json + */ +async function cosmosDbCassandraViewThroughputUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const updateThroughputParameters: ThroughputSettingsUpdateParameters = { + resource: { throughput: 400 }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginUpdateCassandraViewThroughputAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewThroughputUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultEnableDisableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultEnableDisableSample.ts new file mode 100644 index 000000000000..feeeed5bf950 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultEnableDisableSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ChaosFaultResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Enable, disable Chaos Fault in a CosmosDB account. + * + * @summary Enable, disable Chaos Fault in a CosmosDB account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultEnableDisable.json + */ +async function chaosFaultEnableDisable() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const chaosFault = "ServiceUnavailability"; + const chaosFaultRequest: ChaosFaultResource = { + action: "Enable", + containerName: "testCollection", + databaseName: "testDatabase", + region: "EastUS", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.chaosFault.beginEnableDisableAndWait( + resourceGroupName, + accountName, + chaosFault, + chaosFaultRequest, + ); + console.log(result); +} + +async function main() { + chaosFaultEnableDisable(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultGetSample.ts new file mode 100644 index 000000000000..00c9822ad5db --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultGetSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * + * @summary Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultGet.json + */ +async function chaosFaultGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const chaosFault = "ServiceUnavailability"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.chaosFault.get( + resourceGroupName, + accountName, + chaosFault, + ); + console.log(result); +} + +async function main() { + chaosFaultGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultListSample.ts new file mode 100644 index 000000000000..c02aaa1aca78 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/chaosFaultListSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to List Chaos Faults for CosmosDB account. + * + * @summary List Chaos Faults for CosmosDB account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultList.json + */ +async function chaosFaultList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.chaosFault.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + chaosFaultList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListMetricDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListMetricDefinitionsSample.ts index 23a5c1caf82b..031f6c048eb7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListMetricDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListMetricDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves metric definitions for the given collection. * * @summary Retrieves metric definitions for the given collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetricDefinitions.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetricDefinitions.json */ async function cosmosDbCollectionGetMetricDefinitions() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListMetricsSample.ts index 309e967251fc..720816bb3971 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account and collection. * * @summary Retrieves the metrics determined by the given filter for the given database account and collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetrics.json */ async function cosmosDbCollectionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListUsagesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListUsagesSample.ts index df5bbd097f9b..52ee5f8c9f28 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListUsagesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionListUsagesSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the usages (most recent storage data) for the given collection. * * @summary Retrieves the usages (most recent storage data) for the given collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetUsages.json */ async function cosmosDbCollectionGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionListMetricsSample.ts index f2dbf377db42..a7b8778715f9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given collection, split by partition. * * @summary Retrieves the metrics determined by the given filter for the given collection, split by partition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionListUsagesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionListUsagesSample.ts index de0deff0d157..767062d1fe30 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionListUsagesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionListUsagesSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the usages (most recent storage data) for the given collection, split by partition. * * @summary Retrieves the usages (most recent storage data) for the given collection, split by partition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetUsages.json */ async function cosmosDbCollectionGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionRegionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionRegionListMetricsSample.ts index 98412819df88..03d29014f5ba 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionRegionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionPartitionRegionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given collection and region, split by partition. * * @summary Retrieves the metrics determined by the given filter for the given collection and region, split by partition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionRegionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionRegionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionRegionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionRegionListMetricsSample.ts index d8f0a40976b7..34206260507c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionRegionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/collectionRegionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account, collection and region. * * @summary Retrieves the metrics determined by the given filter for the given database account, collection and region. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRegionCollectionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRegionCollectionGetMetrics.json */ async function cosmosDbRegionCollectionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCancelSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCancelSample.ts new file mode 100644 index 000000000000..2edc6a3da708 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCancelSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Cancels a Data Transfer Job. + * + * @summary Cancels a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCancel.json + */ +async function cosmosDbDataTransferJobCancel() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.cancel( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobCancel(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCompleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCompleteSample.ts new file mode 100644 index 000000000000..fb60cbec2f20 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCompleteSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Completes a Data Transfer Online Job. + * + * @summary Completes a Data Transfer Online Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobComplete.json + */ +async function cosmosDbDataTransferJobComplete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "e35cc6eb-c8e3-447b-8de6-b83328cd0098"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.complete( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobComplete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCreateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCreateSample.ts new file mode 100644 index 000000000000..32ecbac87cf5 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsCreateSample.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CreateJobRequest, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates a Data Transfer Job. + * + * @summary Creates a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCreate.json + */ +async function cosmosDbDataTransferJobCreate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const jobCreateParameters: CreateJobRequest = { + properties: { + destination: { + component: "AzureBlobStorage", + containerName: "blob_container", + endpointUrl: "https://blob.windows.net", + }, + source: { + component: "CosmosDBCassandra", + keyspaceName: "keyspace", + tableName: "table", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.create( + resourceGroupName, + accountName, + jobName, + jobCreateParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobCreate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsGetSample.ts new file mode 100644 index 000000000000..ed3584988c38 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsGetSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get a Data Transfer Job. + * + * @summary Get a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobGet.json + */ +async function cosmosDbDataTransferJobGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.get( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsListByDatabaseAccountSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsListByDatabaseAccountSample.ts new file mode 100644 index 000000000000..c21ad829039d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsListByDatabaseAccountSample.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get a list of Data Transfer jobs. + * + * @summary Get a list of Data Transfer jobs. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobFeed.json + */ +async function cosmosDbDataTransferJobFeed() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataTransferJobs.listByDatabaseAccount( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbDataTransferJobFeed(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsPauseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsPauseSample.ts new file mode 100644 index 000000000000..53c1763dc616 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsPauseSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Pause a Data Transfer Job. + * + * @summary Pause a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobPause.json + */ +async function cosmosDbDataTransferJobPause() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.pause( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobPause(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsResumeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsResumeSample.ts new file mode 100644 index 000000000000..fc65c0182f23 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/dataTransferJobsResumeSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Resumes a Data Transfer Job. + * + * @summary Resumes a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobResume.json + */ +async function cosmosDbDataTransferJobResume() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.resume( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobResume(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountRegionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountRegionListMetricsSample.ts index 1a6451403d12..cafaf877d6be 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountRegionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountRegionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account and region. * * @summary Retrieves the metrics determined by the given filter for the given database account and region. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsCheckNameExistsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsCheckNameExistsSample.ts index b0c0947cbfb0..d72656f7eaa7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsCheckNameExistsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsCheckNameExistsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. * * @summary Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCheckNameExists.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCheckNameExists.json */ async function cosmosDbDatabaseAccountCheckNameExists() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsCreateOrUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsCreateOrUpdateSample.ts index 681afaed2ad1..7cbae53e8821 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsCreateOrUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsCreateOrUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. * * @summary Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCreateMax.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCreateMax.json */ async function cosmosDbDatabaseAccountCreateMax() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -39,6 +37,7 @@ async function cosmosDbDatabaseAccountCreateMax() { }, }, capacity: { totalThroughputLimit: 2000 }, + capacityMode: "Provisioned", consistencyPolicy: { defaultConsistencyLevel: "BoundedStaleness", maxIntervalInSeconds: 10, @@ -48,10 +47,13 @@ async function cosmosDbDatabaseAccountCreateMax() { createMode: "Default", databaseAccountOfferType: "Standard", defaultIdentity: "FirstPartyIdentity", + defaultPriorityLevel: "Low", enableAnalyticalStorage: true, enableBurstCapacity: true, enableFreeTier: false, + enableMaterializedViews: false, enablePerRegionPerPartitionAutoscale: true, + enablePriorityBasedExecution: true, identity: { type: "SystemAssigned,UserAssigned", userAssignedIdentities: { @@ -103,7 +105,7 @@ async function cosmosDbDatabaseAccountCreateMax() { * This sample demonstrates how to Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. * * @summary Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCreateMin.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCreateMin.json */ async function cosmosDbDatabaseAccountCreateMin() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -135,7 +137,7 @@ async function cosmosDbDatabaseAccountCreateMin() { * This sample demonstrates how to Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. * * @summary Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json */ async function cosmosDbRestoreDatabaseAccountCreateUpdateJson() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -156,6 +158,7 @@ async function cosmosDbRestoreDatabaseAccountCreateUpdateJson() { databaseAccountOfferType: "Standard", enableAnalyticalStorage: true, enableFreeTier: false, + enableMaterializedViews: false, keyVaultKeyUri: "https://myKeyVault.vault.azure.net", kind: "GlobalDocumentDB", location: "westus", @@ -183,6 +186,7 @@ async function cosmosDbRestoreDatabaseAccountCreateUpdateJson() { "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1a97b4bb-f6a0-430e-ade1-638d781830cc", restoreTimestampInUtc: new Date("2021-03-11T22:05:09Z"), restoreWithTtlDisabled: false, + sourceBackupLocation: "westus", }, tags: {}, }; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsDeleteSample.ts index 631a75498e50..d47deda2d086 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB database account. * * @summary Deletes an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountDelete.json */ async function cosmosDbDatabaseAccountDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsFailoverPriorityChangeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsFailoverPriorityChangeSample.ts index 104a6a16a74e..d0c75c20a35b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsFailoverPriorityChangeSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsFailoverPriorityChangeSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. * * @summary Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json */ async function cosmosDbDatabaseAccountFailoverPriorityChange() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsGetReadOnlyKeysSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsGetReadOnlyKeysSample.ts index a6f1ef65d080..e68c747df5aa 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsGetReadOnlyKeysSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsGetReadOnlyKeysSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the read-only access keys for the specified Azure Cosmos DB database account. * * @summary Lists the read-only access keys for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json */ async function cosmosDbDatabaseAccountListReadOnlyKeys() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsGetSample.ts index 50f4f4128aa7..810a9bdc5621 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB database account. * * @summary Retrieves the properties of an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGet.json */ async function cosmosDbDatabaseAccountGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListByResourceGroupSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListByResourceGroupSample.ts index f01e63be0013..fd565e2067db 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListByResourceGroupSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListByResourceGroupSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the Azure Cosmos DB database accounts available under the given resource group. * * @summary Lists all the Azure Cosmos DB database accounts available under the given resource group. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListByResourceGroup.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListByResourceGroup.json */ async function cosmosDbDatabaseAccountListByResourceGroup() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListConnectionStringsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListConnectionStringsSample.ts index 660869b7eaa2..1b4476829790 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListConnectionStringsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListConnectionStringsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the connection strings for the specified Azure Cosmos DB database account. * * @summary Lists the connection strings for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListConnectionStrings.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListConnectionStrings.json */ async function cosmosDbDatabaseAccountListConnectionStrings() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +35,7 @@ async function cosmosDbDatabaseAccountListConnectionStrings() { * This sample demonstrates how to Lists the connection strings for the specified Azure Cosmos DB database account. * * @summary Lists the connection strings for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json */ async function cosmosDbDatabaseAccountListConnectionStringsMongo() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListKeysSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListKeysSample.ts index 36368b5112b7..2ae907d01f01 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListKeysSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListKeysSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the access keys for the specified Azure Cosmos DB database account. * * @summary Lists the access keys for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListKeys.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListKeys.json */ async function cosmosDbDatabaseAccountListKeys() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListMetricDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListMetricDefinitionsSample.ts index 5bba6a6c03cd..502cae4889b9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListMetricDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListMetricDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves metric definitions for the given database account. * * @summary Retrieves metric definitions for the given database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json */ async function cosmosDbDatabaseAccountGetMetricDefinitions() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListMetricsSample.ts index a799ef3a0bb0..542a81fdb045 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account. * * @summary Retrieves the metrics determined by the given filter for the given database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetrics.json */ async function cosmosDbDatabaseAccountGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListReadOnlyKeysSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListReadOnlyKeysSample.ts index 92f9088cc4dd..ffa597bb6dba 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListReadOnlyKeysSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListReadOnlyKeysSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the read-only access keys for the specified Azure Cosmos DB database account. * * @summary Lists the read-only access keys for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json */ async function cosmosDbDatabaseAccountListReadOnlyKeys() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListSample.ts index b03a250e3e6c..11218d77b6d8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the Azure Cosmos DB database accounts available under the subscription. * * @summary Lists all the Azure Cosmos DB database accounts available under the subscription. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountList.json */ async function cosmosDbDatabaseAccountList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListUsagesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListUsagesSample.ts index e90e1b9b51ca..65e393d731ba 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListUsagesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsListUsagesSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the usages (most recent data) for the given database account. * * @summary Retrieves the usages (most recent data) for the given database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetUsages.json */ async function cosmosDbDatabaseAccountGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsOfflineRegionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsOfflineRegionSample.ts index 5af9489949d3..371d0edb3998 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsOfflineRegionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsOfflineRegionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Offline the specified region for the specified Azure Cosmos DB database account. * * @summary Offline the specified region for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOfflineRegion.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOfflineRegion.json */ async function cosmosDbDatabaseAccountOfflineRegion() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsOnlineRegionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsOnlineRegionSample.ts index eb2bc8eb4eef..fccc010916f7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsOnlineRegionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsOnlineRegionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Online the specified region for the specified Azure Cosmos DB database account. * * @summary Online the specified region for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOnlineRegion.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOnlineRegion.json */ async function cosmosDbDatabaseAccountOnlineRegion() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsRegenerateKeySample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsRegenerateKeySample.ts index 9090bfa49673..9f15fde3d8ed 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsRegenerateKeySample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsRegenerateKeySample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates an access key for the specified Azure Cosmos DB database account. * * @summary Regenerates an access key for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegenerateKey.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegenerateKey.json */ async function cosmosDbDatabaseAccountRegenerateKey() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsUpdateSample.ts index 00e20216ed8f..8b83424520b6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseAccountsUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the properties of an existing Azure Cosmos DB database account. * * @summary Updates the properties of an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountPatch.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountPatch.json */ async function cosmosDbDatabaseAccountPatch() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -34,21 +32,25 @@ async function cosmosDbDatabaseAccountPatch() { periodicModeProperties: { backupIntervalInMinutes: 240, backupRetentionIntervalInHours: 720, - backupStorageRedundancy: "Local", + backupStorageRedundancy: "Geo", }, }, capacity: { totalThroughputLimit: 2000 }, + capacityMode: "Provisioned", consistencyPolicy: { defaultConsistencyLevel: "BoundedStaleness", maxIntervalInSeconds: 10, maxStalenessPrefix: 200, }, defaultIdentity: "FirstPartyIdentity", + defaultPriorityLevel: "Low", + diagnosticLogSettings: { enableFullTextQuery: "True" }, enableAnalyticalStorage: true, enableBurstCapacity: true, enableFreeTier: false, enablePartitionMerge: true, enablePerRegionPerPartitionAutoscale: true, + enablePriorityBasedExecution: true, identity: { type: "SystemAssigned,UserAssigned", userAssignedIdentities: { diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListMetricDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListMetricDefinitionsSample.ts index e49a4bab07c5..3276c1511551 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListMetricDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListMetricDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves metric definitions for the given database. * * @summary Retrieves metric definitions for the given database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetricDefinitions.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetricDefinitions.json */ async function cosmosDbDatabaseGetMetricDefinitions() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListMetricsSample.ts index fadb9e342724..1993a8866dca 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account and database. * * @summary Retrieves the metrics determined by the given filter for the given database account and database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetrics.json */ async function cosmosDbDatabaseGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListUsagesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListUsagesSample.ts index cf52875c6d75..3e68b651a35c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListUsagesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/databaseListUsagesSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the usages (most recent data) for the given database. * * @summary Retrieves the usages (most recent data) for the given database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetUsages.json */ async function cosmosDbDatabaseGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesCreateUpdateGraphSample.ts similarity index 62% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesCreateUpdateGraphSample.ts index 4468864647b2..d160d1aefac6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesCreateUpdateGraphSample.ts @@ -9,44 +9,42 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - SqlDatabaseCreateUpdateParameters, + GraphResourceCreateUpdateParameters, CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** - * This sample demonstrates how to Create or update an Azure Cosmos DB SQL database + * This sample demonstrates how to Create or update an Azure Cosmos DB Graph. * - * @summary Create or update an Azure Cosmos DB SQL database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseCreateUpdate.json + * @summary Create or update an Azure Cosmos DB Graph. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceCreateUpdate.json */ -async function cosmosDbSqlDatabaseCreateUpdate() { +async function cosmosDbGraphCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; const accountName = "ddb1"; - const databaseName = "databaseName"; - const createUpdateSqlDatabaseParameters: SqlDatabaseCreateUpdateParameters = { + const graphName = "graphName"; + const createUpdateGraphParameters: GraphResourceCreateUpdateParameters = { location: "West US", options: {}, - resource: { id: "databaseName" }, + resource: { id: "graphName" }, tags: {}, }; const credential = new DefaultAzureCredential(); const client = new CosmosDBManagementClient(credential, subscriptionId); - const result = await client.sqlResources.beginCreateUpdateSqlDatabaseAndWait( + const result = await client.graphResources.beginCreateUpdateGraphAndWait( resourceGroupName, accountName, - databaseName, - createUpdateSqlDatabaseParameters, + graphName, + createUpdateGraphParameters, ); console.log(result); } async function main() { - cosmosDbSqlDatabaseCreateUpdate(); + cosmosDbGraphCreateUpdate(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesDeleteGraphResourceSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesDeleteGraphResourceSample.ts new file mode 100644 index 000000000000..f59275963a22 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesDeleteGraphResourceSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Graph Resource. + * + * @summary Deletes an existing Azure Cosmos DB Graph Resource. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceDelete.json + */ +async function cosmosDbSqlDatabaseDelete() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const graphName = "graphName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.graphResources.beginDeleteGraphResourceAndWait( + resourceGroupName, + accountName, + graphName, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesGetGraphSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesGetGraphSample.ts new file mode 100644 index 000000000000..c1f4d02a26a8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesGetGraphSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * + * @summary Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceGet.json + */ +async function cosmosDbSqlDatabaseGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const graphName = "graphName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.graphResources.getGraph( + resourceGroupName, + accountName, + graphName, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesListGraphsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesListGraphsSample.ts new file mode 100644 index 000000000000..b0b07a0a82c4 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/graphResourcesListGraphsSample.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Lists the graphs under an existing Azure Cosmos DB database account. + * + * @summary Lists the graphs under an existing Azure Cosmos DB database account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceList.json + */ +async function cosmosDbSqlDatabaseList() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.graphResources.listGraphs( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbSqlDatabaseList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts index 1b45231aa4ea..8498b9eec8d9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Gremlin database * * @summary Create or update an Azure Cosmos DB Gremlin database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseCreateUpdate.json */ async function cosmosDbGremlinDatabaseCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesCreateUpdateGremlinGraphSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesCreateUpdateGremlinGraphSample.ts index 782fb365db85..a21aa6a506ae 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesCreateUpdateGremlinGraphSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesCreateUpdateGremlinGraphSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Gremlin graph * * @summary Create or update an Azure Cosmos DB Gremlin graph - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphCreateUpdate.json */ async function cosmosDbGremlinGraphCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesDeleteGremlinDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesDeleteGremlinDatabaseSample.ts index 4fd841d1cf2f..611d288306c0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesDeleteGremlinDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesDeleteGremlinDatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Gremlin database. * * @summary Deletes an existing Azure Cosmos DB Gremlin database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseDelete.json */ async function cosmosDbGremlinDatabaseDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesDeleteGremlinGraphSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesDeleteGremlinGraphSample.ts index 5b79706d064a..eae07c031dd8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesDeleteGremlinGraphSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesDeleteGremlinGraphSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Gremlin graph. * * @summary Deletes an existing Azure Cosmos DB Gremlin graph. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphDelete.json */ async function cosmosDbGremlinGraphDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinDatabaseSample.ts index 80977d644668..8dcfd129cfe4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinDatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseGet.json */ async function cosmosDbGremlinDatabaseGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinDatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinDatabaseThroughputSample.ts index 78194bec956f..307c7e1a9a8e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinDatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinDatabaseThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputGet.json */ async function cosmosDbGremlinDatabaseThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinGraphSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinGraphSample.ts index cb3d6e703415..d99fb8d126a1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinGraphSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinGraphSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Gremlin graph under an existing Azure Cosmos DB database account. * * @summary Gets the Gremlin graph under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphGet.json */ async function cosmosDbGremlinGraphGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinGraphThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinGraphThroughputSample.ts index 453afdb5c155..c716c0e18cae 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinGraphThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesGetGremlinGraphThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputGet.json */ async function cosmosDbGremlinGraphThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesListGremlinDatabasesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesListGremlinDatabasesSample.ts index 4236d592ce70..585723c384d5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesListGremlinDatabasesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesListGremlinDatabasesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Gremlin databases under an existing Azure Cosmos DB database account. * * @summary Lists the Gremlin databases under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseList.json */ async function cosmosDbGremlinDatabaseList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesListGremlinGraphsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesListGremlinGraphsSample.ts index b5ce778c1314..9e7d7c519e2c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesListGremlinGraphsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesListGremlinGraphsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Gremlin graph under an existing Azure Cosmos DB database account. * * @summary Lists the Gremlin graph under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphList.json */ async function cosmosDbGremlinGraphList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts index 69782c4fe58b..5d43d612a65d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json */ async function cosmosDbGremlinDatabaseMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts index d911a37643cb..8d047d30b873 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json */ async function cosmosDbGremlinDatabaseMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts index 67cdaf9dda00..e8eb2236e96d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToAutoscale.json */ async function cosmosDbGremlinGraphMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts index 2ed863ef5b31..46c80d3f3512 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json */ async function cosmosDbGremlinGraphMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesRetrieveContinuousBackupInformationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesRetrieveContinuousBackupInformationSample.ts index ec4373512824..ee399e25decd 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesRetrieveContinuousBackupInformationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesRetrieveContinuousBackupInformationSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves continuous backup information for a gremlin graph. * * @summary Retrieves continuous backup information for a gremlin graph. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphBackupInformation.json */ async function cosmosDbGremlinGraphBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts index 0f5af07bc622..9854ba8010e5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Gremlin database * * @summary Update RUs per second of an Azure Cosmos DB Gremlin database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputUpdate.json */ async function cosmosDbGremlinDatabaseThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesUpdateGremlinGraphThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesUpdateGremlinGraphThroughputSample.ts index 45967ff8146c..33eb36b3f03a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesUpdateGremlinGraphThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/gremlinResourcesUpdateGremlinGraphThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Gremlin graph * * @summary Update RUs per second of an Azure Cosmos DB Gremlin graph - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputUpdate.json */ async function cosmosDbGremlinGraphThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/locationsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/locationsGetSample.ts index 12b11c4a268f..88b93f2cf423 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/locationsGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/locationsGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of an existing Cosmos DB location * * @summary Get the properties of an existing Cosmos DB location - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationGet.json */ async function cosmosDbLocationGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/locationsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/locationsListSample.ts index 827ef42592e3..18cf84ff8a98 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/locationsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/locationsListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Cosmos DB locations and their properties * * @summary List Cosmos DB locations and their properties - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationList.json */ async function cosmosDbLocationList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts index a5f5546a5919..1fc27ea90bb2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB MongoDB Collection * * @summary Create or update an Azure Cosmos DB MongoDB Collection - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionCreateUpdate.json */ async function cosmosDbMongoDbcollectionCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -34,6 +32,7 @@ async function cosmosDbMongoDbcollectionCreateUpdate() { location: "West US", options: {}, resource: { + analyticalStorageTtl: 500, id: "collectionName", indexes: [ { @@ -59,8 +58,50 @@ async function cosmosDbMongoDbcollectionCreateUpdate() { console.log(result); } +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB MongoDB Collection + * + * @summary Create or update an Azure Cosmos DB MongoDB Collection + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRestore.json + */ +async function cosmosDbMongoDbcollectionRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters = + { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "collectionName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: false, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginCreateUpdateMongoDBCollectionAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + createUpdateMongoDBCollectionParameters, + ); + console.log(result); +} + async function main() { cosmosDbMongoDbcollectionCreateUpdate(); + cosmosDbMongoDbcollectionRestore(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts index 3644e29bcd81..ae469d804dd3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or updates Azure Cosmos DB MongoDB database * * @summary Create or updates Azure Cosmos DB MongoDB database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseCreateUpdate.json */ async function cosmosDbMongoDbdatabaseCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -47,8 +45,48 @@ async function cosmosDbMongoDbdatabaseCreateUpdate() { console.log(result); } +/** + * This sample demonstrates how to Create or updates Azure Cosmos DB MongoDB database + * + * @summary Create or updates Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRestore.json + */ +async function cosmosDbMongoDbdatabaseRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateMongoDBDatabaseParameters: MongoDBDatabaseCreateUpdateParameters = + { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "databaseName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: false, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginCreateUpdateMongoDBDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateMongoDBDatabaseParameters, + ); + console.log(result); +} + async function main() { cosmosDbMongoDbdatabaseCreateUpdate(); + cosmosDbMongoDbdatabaseRestore(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts index 9070380cdaec..1df3c212e34d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB Mongo Role Definition. * * @summary Creates or updates an Azure Cosmos DB Mongo Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json */ async function cosmosDbMongoDbroleDefinitionCreateUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts index 80ca764b78bb..87abf73550d2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB Mongo User Definition. * * @summary Creates or updates an Azure Cosmos DB Mongo User Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json */ async function cosmosDbMongoDbuserDefinitionCreateUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoDbcollectionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoDbcollectionSample.ts index c6e379d1fbf9..72582d51c720 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoDbcollectionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoDbcollectionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB MongoDB Collection. * * @summary Deletes an existing Azure Cosmos DB MongoDB Collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionDelete.json */ async function cosmosDbMongoDbcollectionDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoDbdatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoDbdatabaseSample.ts index 7394eb59370d..c9b013246fd1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoDbdatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoDbdatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB MongoDB database. * * @summary Deletes an existing Azure Cosmos DB MongoDB database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseDelete.json */ async function cosmosDbMongoDbdatabaseDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts index 9f6ae4850ed5..f05a2cf85266 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Mongo Role Definition. * * @summary Deletes an existing Azure Cosmos DB Mongo Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.json */ async function cosmosDbMongoDbroleDefinitionDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoUserDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoUserDefinitionSample.ts index 49e8c8b36ef2..ac3c6d24743d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoUserDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesDeleteMongoUserDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Mongo User Definition. * * @summary Deletes an existing Azure Cosmos DB Mongo User Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionDelete.json */ async function cosmosDbMongoDbuserDefinitionDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbcollectionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbcollectionSample.ts index a370166595f7..0cbcbde7ea94 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbcollectionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbcollectionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the MongoDB collection under an existing Azure Cosmos DB database account. * * @summary Gets the MongoDB collection under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionGet.json */ async function cosmosDbMongoDbcollectionGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts index b5f5e06dce9f..4e5d7f523f41 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputGet.json */ async function cosmosDbMongoDbcollectionThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbdatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbdatabaseSample.ts index 14098475bad3..834b853e9612 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbdatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbdatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseGet.json */ async function cosmosDbMongoDbdatabaseGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts index 33c41172b961..fdeaee4e537f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputGet.json */ async function cosmosDbMongoDbdatabaseThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoRoleDefinitionSample.ts index 38cb717370c7..1d23c0c8319f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoRoleDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionGet.json */ async function cosmosDbMongoRoleDefinitionGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoUserDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoUserDefinitionSample.ts index 1c2afd267b4b..062aea39354f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoUserDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesGetMongoUserDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionGet.json */ async function cosmosDbMongoDbuserDefinitionGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts new file mode 100644 index 000000000000..74d56a4b01ba --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { MergeParameters, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Merges the partitions of a MongoDB Collection + * + * @summary Merges the partitions of a MongoDB Collection + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json + */ +async function cosmosDbMongoDbcollectionPartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const mergeParameters: MergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginListMongoDBCollectionPartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbcollectionPartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbcollectionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbcollectionsSample.ts index 54cf10855997..08b2319ec6d1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbcollectionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbcollectionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the MongoDB collection under an existing Azure Cosmos DB database account. * * @summary Lists the MongoDB collection under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionList.json */ async function cosmosDbMongoDbcollectionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbdatabasesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbdatabasesSample.ts index 02c8340434ef..943f38e06594 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbdatabasesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoDbdatabasesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the MongoDB databases under an existing Azure Cosmos DB database account. * * @summary Lists the MongoDB databases under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseList.json */ async function cosmosDbMongoDbdatabaseList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoRoleDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoRoleDefinitionsSample.ts index b75e8679aec0..12b9c855b487 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoRoleDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoRoleDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. * * @summary Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionList.json */ async function cosmosDbMongoDbroleDefinitionList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoUserDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoUserDefinitionsSample.ts index 7c83cd5f9d68..0c2ed7fe6b19 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoUserDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesListMongoUserDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Mongo User Definition. * * @summary Retrieves the list of all Azure Cosmos DB Mongo User Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionList.json */ async function cosmosDbMongoDbuserDefinitionList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts index fad37ea8c404..46d24de98cca 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json */ async function cosmosDbMongoDbcollectionMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts index 36dd9a502a6b..bdbec228a4e5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json */ async function cosmosDbMongoDbcollectionMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts index 1531798ead50..6c5643c14ccf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json */ async function cosmosDbMongoDbdatabaseMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts index 8722cd024afd..9f6a49ed3084 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json */ async function cosmosDbMongoDbdatabaseMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts new file mode 100644 index 000000000000..0aee5ad27e0f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RedistributeThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB MongoDB container + * + * @summary Redistribute throughput for an Azure Cosmos DB MongoDB container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json + */ +async function cosmosDbMongoDbcollectionRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const redistributeThroughputParameters: RedistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [ + { id: "2", throughput: 5000 }, + { id: "3" }, + ], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBContainerRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbcollectionRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts new file mode 100644 index 000000000000..c7c4876f6a66 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RetrieveThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json + */ +async function cosmosDbMongoDbcollectionRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const retrieveThroughputParameters: RetrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBContainerRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbcollectionRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts new file mode 100644 index 000000000000..ba34a200e56d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { MergeParameters, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Merges the partitions of a MongoDB database + * + * @summary Merges the partitions of a MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabasePartitionMerge.json + */ +async function cosmosDbMongoDbdatabasePartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const mergeParameters: MergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBDatabasePartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabasePartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts new file mode 100644 index 000000000000..e2f48b847d79 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RedistributeThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB MongoDB database + * + * @summary Redistribute throughput for an Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRedistributeThroughput.json + */ +async function cosmosDbMongoDbdatabaseRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const redistributeThroughputParameters: RedistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [ + { id: "2", throughput: 5000 }, + { id: "3" }, + ], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBDatabaseRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabaseRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts new file mode 100644 index 000000000000..d4fd58df870e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RetrieveThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRetrieveThroughputDistribution.json + */ +async function cosmosDbMongoDbdatabaseRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const retrieveThroughputParameters: RetrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabaseRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts index a2017db506b0..4dfad00f3ccb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves continuous backup information for a Mongodb collection. * * @summary Retrieves continuous backup information for a Mongodb collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionBackupInformation.json */ async function cosmosDbMongoDbcollectionBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts index 9ee4de8a068e..79bfe48e603e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update the RUs per second of an Azure Cosmos DB MongoDB collection * * @summary Update the RUs per second of an Azure Cosmos DB MongoDB collection - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputUpdate.json */ async function cosmosDbMongoDbcollectionThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts index 2545c1e17d7e..fb5235739b17 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of the an Azure Cosmos DB MongoDB database * * @summary Update RUs per second of the an Azure Cosmos DB MongoDB database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json */ async function cosmosDbMongoDbdatabaseThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts new file mode 100644 index 000000000000..d265f3400e29 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets effective Network Security Perimeter Configuration for association + * + * @summary Gets effective Network Security Perimeter Configuration for association + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationGet.json + */ +async function namspaceNetworkSecurityPerimeterConfigurationList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "res4410"; + const accountName = "cosmosTest"; + const networkSecurityPerimeterConfigurationName = + "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.networkSecurityPerimeterConfigurations.get( + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + ); + console.log(result); +} + +async function main() { + namspaceNetworkSecurityPerimeterConfigurationList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts new file mode 100644 index 000000000000..222b53253c88 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets list of effective Network Security Perimeter Configuration for cosmos db account + * + * @summary Gets list of effective Network Security Perimeter Configuration for cosmos db account + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationList.json + */ +async function namspaceNetworkSecurityPerimeterConfigurationList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "res4410"; + const accountName = "cosmosTest"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkSecurityPerimeterConfigurations.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + namspaceNetworkSecurityPerimeterConfigurationList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts new file mode 100644 index 000000000000..841961eb1bcd --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Refreshes any information about the association. + * + * @summary Refreshes any information about the association. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationReconcile.json + */ +async function networkSecurityPerimeterConfigurationList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "res4410"; + const accountName = "sto8607"; + const networkSecurityPerimeterConfigurationName = + "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.networkSecurityPerimeterConfigurations.beginReconcileAndWait( + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + ); + console.log(result); +} + +async function main() { + networkSecurityPerimeterConfigurationList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesCreateOrUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesCreateOrUpdateSample.ts index 908adf7d05b9..a58b12afe3f5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesCreateOrUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesCreateOrUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates the notebook workspace for a Cosmos DB account. * * @summary Creates the notebook workspace for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceCreate.json */ async function cosmosDbNotebookWorkspaceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesDeleteSample.ts index f9a37b876750..28bf63e7d7e9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the notebook workspace for a Cosmos DB account. * * @summary Deletes the notebook workspace for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceDelete.json */ async function cosmosDbNotebookWorkspaceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesGetSample.ts index 519f9e0a193a..5f18246f505d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the notebook workspace for a Cosmos DB account. * * @summary Gets the notebook workspace for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceGet.json */ async function cosmosDbNotebookWorkspaceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesListByDatabaseAccountSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesListByDatabaseAccountSample.ts index 87539e39c1b3..b6fce49dcc20 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesListByDatabaseAccountSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesListByDatabaseAccountSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the notebook workspace resources of an existing Cosmos DB account. * * @summary Gets the notebook workspace resources of an existing Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceList.json */ async function cosmosDbNotebookWorkspaceList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesListConnectionInfoSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesListConnectionInfoSample.ts index b7b164759ddd..e4e441d1f5f1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesListConnectionInfoSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesListConnectionInfoSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the connection info for the notebook workspace * * @summary Retrieves the connection info for the notebook workspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json */ async function cosmosDbNotebookWorkspaceListConnectionInfo() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesRegenerateAuthTokenSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesRegenerateAuthTokenSample.ts index 680d466acb9d..fe46ba3a17b9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesRegenerateAuthTokenSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesRegenerateAuthTokenSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates the auth token for the notebook workspace * * @summary Regenerates the auth token for the notebook workspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json */ async function cosmosDbNotebookWorkspaceRegenerateAuthToken() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesStartSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesStartSample.ts index fb8d32d9c255..d09bed7afe2a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesStartSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/notebookWorkspacesStartSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Starts the notebook workspace * * @summary Starts the notebook workspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceStart.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceStart.json */ async function cosmosDbNotebookWorkspaceStart() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/operationsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/operationsListSample.ts index 7eceff1a6c29..733fea16797c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/operationsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/operationsListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available Cosmos DB Resource Provider operations. * * @summary Lists all of the available Cosmos DB Resource Provider operations. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBOperationsList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBOperationsList.json */ async function cosmosDbOperationsList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/partitionKeyRangeIdListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/partitionKeyRangeIdListMetricsSample.ts index 091a2619441f..f0ed2c640a53 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/partitionKeyRangeIdListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/partitionKeyRangeIdListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given partition key range id. * * @summary Retrieves the metrics determined by the given filter for the given partition key range id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/partitionKeyRangeIdRegionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/partitionKeyRangeIdRegionListMetricsSample.ts index d2967ae366e7..7f39e7efaebf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/partitionKeyRangeIdRegionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/partitionKeyRangeIdRegionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given partition key range id and region. * * @summary Retrieves the metrics determined by the given filter for the given partition key range id and region. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileListMetricsSample.ts index d69d3e80ccdb..f1194d2cd676 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data * * @summary Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileSourceTargetListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileSourceTargetListMetricsSample.ts index 410612c76e28..b5c0e1e198eb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileSourceTargetListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileSourceTargetListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data * * @summary Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileSourceTargetGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileSourceTargetGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileTargetListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileTargetListMetricsSample.ts index 9fc6e89caba5..965d96d3e603 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileTargetListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/percentileTargetListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data * * @summary Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileTargetGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileTargetGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts index 1a77f6924db1..d8d57c0828c9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. * * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json */ async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsDeleteSample.ts index 4859ab59bcf3..0b99ba22859e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a private endpoint connection with a given name. * * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json */ async function deletesAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsGetSample.ts index 34db25222933..03ad5df6f2e4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a private endpoint connection. * * @summary Gets a private endpoint connection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsListByDatabaseAccountSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsListByDatabaseAccountSample.ts index 182b7d280852..7d603a761440 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsListByDatabaseAccountSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateEndpointConnectionsListByDatabaseAccountSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all private endpoint connections on a Cosmos DB account. * * @summary List all private endpoint connections on a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionListGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateLinkResourcesGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateLinkResourcesGetSample.ts index 0570d1584c85..7a6ffb2aa9bb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateLinkResourcesGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateLinkResourcesGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources that need to be created for a Cosmos DB account. * * @summary Gets the private link resources that need to be created for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateLinkResourcesListByDatabaseAccountSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateLinkResourcesListByDatabaseAccountSample.ts index 5052eaf5ed55..55a971f61b83 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateLinkResourcesListByDatabaseAccountSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/privateLinkResourcesListByDatabaseAccountSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources that need to be created for a Cosmos DB account. * * @summary Gets the private link resources that need to be created for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceListGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceListGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsGetByLocationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsGetByLocationSample.ts index 0a5fa126b434..8a4444b16bf8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsGetByLocationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsGetByLocationSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. * * @summary Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json */ async function cosmosDbRestorableDatabaseAccountGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsListByLocationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsListByLocationSample.ts index a817b37b4407..1cf5a47b5468 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsListByLocationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsListByLocationSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. * * @summary Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json */ async function cosmosDbRestorableDatabaseAccountList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsListSample.ts index 9143ce37a4a6..77543b78e45c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableDatabaseAccountsListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. * * @summary Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json */ async function cosmosDbRestorableDatabaseAccountNoLocationList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinDatabasesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinDatabasesListSample.ts index 5fe1b0512347..7de641246f6d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinDatabasesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinDatabasesListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinDatabaseList.json */ async function cosmosDbRestorableGremlinDatabaseList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinGraphsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinGraphsListSample.ts index d8cb724cbd2d..49e7e79d81f5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinGraphsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinGraphsListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinGraphList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinGraphList.json */ async function cosmosDbRestorableGremlinGraphList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinResourcesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinResourcesListSample.ts index f725472179c5..e2c9f92bd893 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinResourcesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableGremlinResourcesListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinResourceList.json */ async function cosmosDbRestorableGremlinResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbCollectionsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbCollectionsListSample.ts index 3a8481a19a17..2c2664c90be5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbCollectionsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbCollectionsListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbCollectionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json */ async function cosmosDbRestorableMongodbCollectionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbDatabasesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbDatabasesListSample.ts index 2d7f3518b028..bf106fecbbeb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbDatabasesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbDatabasesListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json */ async function cosmosDbRestorableMongodbDatabaseList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbResourcesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbResourcesListSample.ts index 84a4189b2aa1..4ce39ceaf317 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbResourcesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableMongodbResourcesListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbResourceList.json */ async function cosmosDbRestorableMongodbResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlContainersListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlContainersListSample.ts index 6e910768f681..1e817caa3218 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlContainersListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlContainersListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlContainerList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlContainerList.json */ async function cosmosDbRestorableSqlContainerList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlDatabasesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlDatabasesListSample.ts index d6ca881ff59f..7425bab6690e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlDatabasesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlDatabasesListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlDatabaseList.json */ async function cosmosDbRestorableSqlDatabaseList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlResourcesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlResourcesListSample.ts index 743de4fc0c35..04064c971400 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlResourcesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableSqlResourcesListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlResourceList.json */ async function cosmosDbRestorableSqlResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableTableResourcesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableTableResourcesListSample.ts index 411ce12e0ae1..be8694e65316 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableTableResourcesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableTableResourcesListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableResourceList.json */ async function cosmosDbRestorableTableResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableTablesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableTablesListSample.ts index 26c1f355dfbd..d1ef42b4a501 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableTablesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/restorableTablesListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableList.json */ async function cosmosDbRestorableTableList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceCreateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceCreateSample.ts index d1c053d2466c..c4968c07f416 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceCreateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceCreateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceCreate.json */ async function dataTransferServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -50,7 +48,7 @@ async function dataTransferServiceCreate() { * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGraphAPIComputeServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphAPIComputeServiceCreate.json */ async function graphApiComputeServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -79,7 +77,7 @@ async function graphApiComputeServiceCreate() { * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json */ async function materializedViewsBuilderServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -108,7 +106,7 @@ async function materializedViewsBuilderServiceCreate() { * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceCreate.json */ async function sqlDedicatedGatewayServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceDeleteSample.ts index 28833728c1ad..8fdc4d4cb3e6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceDelete.json */ async function dataTransferServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +37,7 @@ async function dataTransferServiceDelete() { * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGraphAPIComputeServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphAPIComputeServiceDelete.json */ async function graphApiComputeServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -60,7 +58,7 @@ async function graphApiComputeServiceDelete() { * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json */ async function materializedViewsBuilderServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -81,7 +79,7 @@ async function materializedViewsBuilderServiceDelete() { * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceDelete.json */ async function sqlDedicatedGatewayServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceGetSample.ts index 390e1ae433c0..9ddc5d21695d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceGet.json */ async function dataTransferServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +37,7 @@ async function dataTransferServiceGet() { * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGraphAPIComputeServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphAPIComputeServiceGet.json */ async function graphApiComputeServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -60,7 +58,7 @@ async function graphApiComputeServiceGet() { * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMaterializedViewsBuilderServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMaterializedViewsBuilderServiceGet.json */ async function materializedViewsBuilderServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -81,7 +79,7 @@ async function materializedViewsBuilderServiceGet() { * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceGet.json */ async function sqlDedicatedGatewayServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceListSample.ts index 5d37ae555d50..26c43e8fc460 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/serviceListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBServicesList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBServicesList.json */ async function cosmosDbServicesList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateClientEncryptionKeySample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateClientEncryptionKeySample.ts index 4249a213b249..69bc19ebcce9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateClientEncryptionKeySample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateClientEncryptionKeySample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). * * @summary Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json */ async function cosmosDbClientEncryptionKeyCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subId"; @@ -40,7 +38,9 @@ async function cosmosDbClientEncryptionKeyCreateUpdate() { algorithm: "RSA-OAEP", value: "AzureKeyVault Key URL", }, - wrappedDataEncryptionKey: Buffer.from("U3dhZ2dlciByb2Nrcw=="), + wrappedDataEncryptionKey: Buffer.from( + "VGhpcyBpcyBhY3R1YWxseSBhbiBhcnJheSBvZiBieXRlcy4gVGhpcyByZXF1ZXN0L3Jlc3BvbnNlIGlzIGJlaW5nIHByZXNlbnRlZCBhcyBhIHN0cmluZyBmb3IgcmVhZGFiaWxpdHkgaW4gdGhlIGV4YW1wbGU=", + ), }, }; const credential = new DefaultAzureCredential(); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlContainerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlContainerSample.ts index 387d67ec459f..93875393b1fc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlContainerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlContainerSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL container * * @summary Create or update an Azure Cosmos DB SQL container - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerCreateUpdate.json */ async function cosmosDbSqlContainerCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -112,8 +110,102 @@ async function cosmosDbSqlContainerCreateUpdate() { console.log(result); } +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL container + * + * @summary Create or update an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRestore.json + */ +async function cosmosDbSqlContainerRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const createUpdateSqlContainerParameters: SqlContainerCreateUpdateParameters = + { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "containerName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: true, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlContainerAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + createUpdateSqlContainerParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL container + * + * @summary Create or update an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlMaterializedViewCreateUpdate.json + */ +async function cosmosDbSqlMaterializedViewCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "mvContainerName"; + const createUpdateSqlContainerParameters: SqlContainerCreateUpdateParameters = + { + location: "West US", + options: {}, + resource: { + id: "mvContainerName", + indexingPolicy: { + automatic: true, + excludedPaths: [], + includedPaths: [ + { + path: "/*", + indexes: [ + { dataType: "String", kind: "Range", precision: -1 }, + { dataType: "Number", kind: "Range", precision: -1 }, + ], + }, + ], + indexingMode: "consistent", + }, + materializedViewDefinition: { + definition: "select * from ROOT", + sourceCollectionId: "sourceContainerName", + }, + partitionKey: { kind: "Hash", paths: ["/mvpk"] }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlContainerAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + createUpdateSqlContainerParameters, + ); + console.log(result); +} + async function main() { cosmosDbSqlContainerCreateUpdate(); + cosmosDbSqlContainerRestore(); + cosmosDbSqlMaterializedViewCreateUpdate(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlDatabaseSample.ts index 4468864647b2..aee41e3e72b1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlDatabaseSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL database * * @summary Create or update an Azure Cosmos DB SQL database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseCreateUpdate.json */ async function cosmosDbSqlDatabaseCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -45,8 +43,46 @@ async function cosmosDbSqlDatabaseCreateUpdate() { console.log(result); } +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL database + * + * @summary Create or update an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRestore.json + */ +async function cosmosDbSqlDatabaseRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateSqlDatabaseParameters: SqlDatabaseCreateUpdateParameters = { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "databaseName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: true, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateSqlDatabaseParameters, + ); + console.log(result); +} + async function main() { cosmosDbSqlDatabaseCreateUpdate(); + cosmosDbSqlDatabaseRestore(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts index 644f2e5587ae..15764416b3fc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB SQL Role Assignment. * * @summary Creates or updates an Azure Cosmos DB SQL Role Assignment. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json */ async function cosmosDbSqlRoleAssignmentCreateUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts index 011fe662c2ce..de46cfe51251 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB SQL Role Definition. * * @summary Creates or updates an Azure Cosmos DB SQL Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json */ async function cosmosDbSqlRoleDefinitionCreateUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts index 9edf562119a7..f6b740de59f9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL storedProcedure * * @summary Create or update an Azure Cosmos DB SQL storedProcedure - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureCreateUpdate.json */ async function cosmosDbSqlStoredProcedureCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlTriggerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlTriggerSample.ts index 1e8055bfa4c3..88601055f5f9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlTriggerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlTriggerSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL trigger * * @summary Create or update an Azure Cosmos DB SQL trigger - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerCreateUpdate.json */ async function cosmosDbSqlTriggerCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts index af7f30a448d9..b98443de1238 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL userDefinedFunction * * @summary Create or update an Azure Cosmos DB SQL userDefinedFunction - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json */ async function cosmosDbSqlUserDefinedFunctionCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlContainerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlContainerSample.ts index 9a72a925498f..c574c9359ab1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlContainerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlContainerSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL container. * * @summary Deletes an existing Azure Cosmos DB SQL container. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerDelete.json */ async function cosmosDbSqlContainerDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlDatabaseSample.ts index 21d9aefcc03c..ff3a5e53f618 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlDatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL database. * * @summary Deletes an existing Azure Cosmos DB SQL database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseDelete.json */ async function cosmosDbSqlDatabaseDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlRoleAssignmentSample.ts index f614dcffb3dc..d40bbe6e8700 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlRoleAssignmentSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlRoleAssignmentSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL Role Assignment. * * @summary Deletes an existing Azure Cosmos DB SQL Role Assignment. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentDelete.json */ async function cosmosDbSqlRoleAssignmentDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlRoleDefinitionSample.ts index 5ae8e0f3f36e..fb5c60bdd580 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlRoleDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL Role Definition. * * @summary Deletes an existing Azure Cosmos DB SQL Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionDelete.json */ async function cosmosDbSqlRoleDefinitionDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlStoredProcedureSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlStoredProcedureSample.ts index 8fe9920e9a59..7a5ae103d0c7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlStoredProcedureSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlStoredProcedureSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL storedProcedure. * * @summary Deletes an existing Azure Cosmos DB SQL storedProcedure. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureDelete.json */ async function cosmosDbSqlStoredProcedureDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlTriggerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlTriggerSample.ts index 1038bf68a3bf..2668b6d00544 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlTriggerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlTriggerSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL trigger. * * @summary Deletes an existing Azure Cosmos DB SQL trigger. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerDelete.json */ async function cosmosDbSqlTriggerDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts index ffa1ce204b3c..7a48e4cc98b9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL userDefinedFunction. * * @summary Deletes an existing Azure Cosmos DB SQL userDefinedFunction. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionDelete.json */ async function cosmosDbSqlUserDefinedFunctionDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetClientEncryptionKeySample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetClientEncryptionKeySample.ts index b9d252657856..776b59511ee5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetClientEncryptionKeySample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetClientEncryptionKeySample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. * * @summary Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyGet.json */ async function cosmosDbClientEncryptionKeyGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlContainerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlContainerSample.ts index a10a556c43e1..a334025b1368 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlContainerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlContainerSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL container under an existing Azure Cosmos DB database account. * * @summary Gets the SQL container under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerGet.json */ async function cosmosDbSqlContainerGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlContainerThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlContainerThroughputSample.ts index 8c1ca6c9cd00..001e6596b1a7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlContainerThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlContainerThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. * * @summary Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputGet.json */ async function cosmosDbSqlContainerThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlDatabaseSample.ts index 773d81ac43fa..b29b4990fb39 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlDatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseGet.json */ async function cosmosDbSqlDatabaseGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlDatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlDatabaseThroughputSample.ts index 99df276c5eb2..a17331412c5f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlDatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlDatabaseThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputGet.json */ async function cosmosDbSqlDatabaseThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlRoleAssignmentSample.ts index c3d3cedb1feb..4f5cf95f2c6b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlRoleAssignmentSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlRoleAssignmentSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentGet.json */ async function cosmosDbSqlRoleAssignmentGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlRoleDefinitionSample.ts index e2c888c6c160..f7cb3a99763a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlRoleDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionGet.json */ async function cosmosDbSqlRoleDefinitionGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlStoredProcedureSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlStoredProcedureSample.ts index 17a3fc0a13d9..d0313a507152 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlStoredProcedureSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlStoredProcedureSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. * * @summary Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureGet.json */ async function cosmosDbSqlStoredProcedureGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlTriggerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlTriggerSample.ts index 0ada7798453f..30ea6fd7e186 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlTriggerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlTriggerSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL trigger under an existing Azure Cosmos DB database account. * * @summary Gets the SQL trigger under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerGet.json */ async function cosmosDbSqlTriggerGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlUserDefinedFunctionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlUserDefinedFunctionSample.ts index 819b3cd55e1b..fc0545fdd179 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlUserDefinedFunctionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesGetSqlUserDefinedFunctionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * * @summary Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionGet.json */ async function cosmosDbSqlUserDefinedFunctionGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListClientEncryptionKeysSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListClientEncryptionKeysSample.ts index 5386fc292734..6e7284e70021 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListClientEncryptionKeysSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListClientEncryptionKeysSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. * * @summary Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeysList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeysList.json */ async function cosmosDbClientEncryptionKeysList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlContainerPartitionMergeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlContainerPartitionMergeSample.ts new file mode 100644 index 000000000000..49d55c241776 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlContainerPartitionMergeSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { MergeParameters, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Merges the partitions of a SQL Container + * + * @summary Merges the partitions of a SQL Container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerPartitionMerge.json + */ +async function cosmosDbSqlContainerPartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const mergeParameters: MergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginListSqlContainerPartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlContainerPartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlContainersSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlContainersSample.ts index c8b4e713a6c8..d7d9c1735cd3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlContainersSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlContainersSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL container under an existing Azure Cosmos DB database account. * * @summary Lists the SQL container under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerList.json */ async function cosmosDbSqlContainerList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlDatabasesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlDatabasesSample.ts index 8fdcbcd5420b..ba8f753263f4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlDatabasesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlDatabasesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL databases under an existing Azure Cosmos DB database account. * * @summary Lists the SQL databases under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseList.json */ async function cosmosDbSqlDatabaseList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlRoleAssignmentsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlRoleAssignmentsSample.ts index 031f8528ffad..bb8baa381290 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlRoleAssignmentsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlRoleAssignmentsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB SQL Role Assignments. * * @summary Retrieves the list of all Azure Cosmos DB SQL Role Assignments. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentList.json */ async function cosmosDbSqlRoleAssignmentList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlRoleDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlRoleDefinitionsSample.ts index 60b680d26aef..8c870d4a7b2e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlRoleDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlRoleDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB SQL Role Definitions. * * @summary Retrieves the list of all Azure Cosmos DB SQL Role Definitions. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionList.json */ async function cosmosDbSqlRoleDefinitionList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlStoredProceduresSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlStoredProceduresSample.ts index 9eab0671efa6..26cdcb0878b9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlStoredProceduresSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlStoredProceduresSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. * * @summary Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureList.json */ async function cosmosDbSqlStoredProcedureList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlTriggersSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlTriggersSample.ts index 135179faf833..ff5316a00a5d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlTriggersSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlTriggersSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL trigger under an existing Azure Cosmos DB database account. * * @summary Lists the SQL trigger under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerList.json */ async function cosmosDbSqlTriggerList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlUserDefinedFunctionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlUserDefinedFunctionsSample.ts index 7310f9cf4445..de73cd31a9a3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlUserDefinedFunctionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesListSqlUserDefinedFunctionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * * @summary Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionList.json */ async function cosmosDbSqlUserDefinedFunctionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts index 749db4702caf..322c116eb11d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToAutoscale.json */ async function cosmosDbSqlContainerMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts index e4d687a7ef15..6ad91194f88a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToManualThroughput.json */ async function cosmosDbSqlContainerMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts index 288e57b80d14..65f5576a47a1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json */ async function cosmosDbSqlDatabaseMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts index 255c4027613b..74617f54969e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json */ async function cosmosDbSqlDatabaseMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesRetrieveContinuousBackupInformationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesRetrieveContinuousBackupInformationSample.ts index 4ed7d80b2fee..1a13a92be337 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesRetrieveContinuousBackupInformationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesRetrieveContinuousBackupInformationSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves continuous backup information for a container resource. * * @summary Retrieves continuous backup information for a container resource. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerBackupInformation.json */ async function cosmosDbSqlContainerBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlContainerRedistributeThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlContainerRedistributeThroughputSample.ts new file mode 100644 index 000000000000..7257e6bd3c10 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlContainerRedistributeThroughputSample.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RedistributeThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB SQL container + * + * @summary Redistribute throughput for an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json + */ +async function cosmosDbSqlContainerRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const redistributeThroughputParameters: RedistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [ + { id: "2", throughput: 5000 }, + { id: "3" }, + ], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginSqlContainerRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlContainerRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts new file mode 100644 index 000000000000..8dd7fcb86703 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RetrieveThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB SQL container + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json + */ +async function cosmosDbSqlContainerRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const retrieveThroughputParameters: RetrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginSqlContainerRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlContainerRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabasePartitionMergeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabasePartitionMergeSample.ts new file mode 100644 index 000000000000..f1fb47d47c7a --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabasePartitionMergeSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { MergeParameters, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Merges the partitions of a SQL database + * + * @summary Merges the partitions of a SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabasePartitionMerge.json + */ +async function cosmosDbSqlDatabasePartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const mergeParameters: MergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginSqlDatabasePartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabasePartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabaseRedistributeThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabaseRedistributeThroughputSample.ts new file mode 100644 index 000000000000..c6b8f6b21750 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabaseRedistributeThroughputSample.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RedistributeThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB SQL database + * + * @summary Redistribute throughput for an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRedistributeThroughput.json + */ +async function cosmosDbSqlDatabaseRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const redistributeThroughputParameters: RedistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [ + { id: "2", throughput: 5000 }, + { id: "3" }, + ], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginSqlDatabaseRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts similarity index 57% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts index 3644e29bcd81..b2fb85392d96 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts @@ -9,46 +9,40 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - MongoDBDatabaseCreateUpdateParameters, + RetrieveThroughputParameters, CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** - * This sample demonstrates how to Create or updates Azure Cosmos DB MongoDB database + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB SQL database * - * @summary Create or updates Azure Cosmos DB MongoDB database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseCreateUpdate.json + * @summary Retrieve throughput distribution for an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRetrieveThroughputDistribution.json */ -async function cosmosDbMongoDbdatabaseCreateUpdate() { +async function cosmosDbSqlDatabaseRetrieveThroughputDistribution() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; const accountName = "ddb1"; const databaseName = "databaseName"; - const createUpdateMongoDBDatabaseParameters: MongoDBDatabaseCreateUpdateParameters = - { - location: "West US", - options: {}, - resource: { id: "databaseName" }, - tags: {}, - }; + const retrieveThroughputParameters: RetrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; const credential = new DefaultAzureCredential(); const client = new CosmosDBManagementClient(credential, subscriptionId); const result = - await client.mongoDBResources.beginCreateUpdateMongoDBDatabaseAndWait( + await client.sqlResources.beginSqlDatabaseRetrieveThroughputDistributionAndWait( resourceGroupName, accountName, databaseName, - createUpdateMongoDBDatabaseParameters, + retrieveThroughputParameters, ); console.log(result); } async function main() { - cosmosDbMongoDbdatabaseCreateUpdate(); + cosmosDbSqlDatabaseRetrieveThroughputDistribution(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesUpdateSqlContainerThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesUpdateSqlContainerThroughputSample.ts index bf09b1bc5192..0871684a0f90 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesUpdateSqlContainerThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesUpdateSqlContainerThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB SQL container * * @summary Update RUs per second of an Azure Cosmos DB SQL container - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputUpdate.json */ async function cosmosDbSqlContainerThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesUpdateSqlDatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesUpdateSqlDatabaseThroughputSample.ts index f938c16ab62d..c7af11ab2ae2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesUpdateSqlDatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/sqlResourcesUpdateSqlDatabaseThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB SQL database * * @summary Update RUs per second of an Azure Cosmos DB SQL database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputUpdate.json */ async function cosmosDbSqlDatabaseThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableRoleAssignmentSample.ts new file mode 100644 index 000000000000..04f9d9ebc582 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableRoleAssignmentSample.ts @@ -0,0 +1,56 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TableRoleAssignmentResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB Table Role Assignment. + * + * @summary Creates or updates an Azure Cosmos DB Table Role Assignment. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentCreateUpdate.json + */ +async function cosmosDbTableRoleAssignmentCreateUpdate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleAssignmentId = "myRoleAssignmentId"; + const createUpdateTableRoleAssignmentParameters: TableRoleAssignmentResource = + { + principalId: "myPrincipalId", + roleDefinitionId: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/tableRoleDefinitions/myRoleDefinitionId", + scope: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.tableResources.beginCreateUpdateTableRoleAssignmentAndWait( + resourceGroupName, + accountName, + roleAssignmentId, + createUpdateTableRoleAssignmentParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleAssignmentCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableRoleDefinitionSample.ts new file mode 100644 index 000000000000..f48634ace8a3 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableRoleDefinitionSample.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TableRoleDefinitionResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB Table Role Definition. + * + * @summary Creates or updates an Azure Cosmos DB Table Role Definition. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionCreateUpdate.json + */ +async function cosmosDbTableRoleDefinitionCreateUpdate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleDefinitionId = "myRoleDefinitionId"; + const createUpdateTableRoleDefinitionParameters: TableRoleDefinitionResource = + { + typePropertiesType: "CustomRole", + assignableScopes: [ + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/sales", + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases", + ], + permissions: [ + { + dataActions: [ + "Microsoft.DocumentDB/databaseAccounts/tableDatabases/containers/entities/create", + "Microsoft.DocumentDB/databaseAccounts/tableDatabases/containers/entities/read", + ], + notDataActions: [], + }, + ], + roleName: "myRoleName", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.tableResources.beginCreateUpdateTableRoleDefinitionAndWait( + resourceGroupName, + accountName, + roleDefinitionId, + createUpdateTableRoleDefinitionParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleDefinitionCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableSample.ts index 7995b7e1dda6..c7603d6ee4a4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesCreateUpdateTableSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Table * * @summary Create or update an Azure Cosmos DB Table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableCreateUpdate.json */ async function cosmosDbTableReplace() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableRoleAssignmentSample.ts new file mode 100644 index 000000000000..472c1e01c61d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableRoleAssignmentSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Table Role Assignment. + * + * @summary Deletes an existing Azure Cosmos DB Table Role Assignment. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentDelete.json + */ +async function cosmosDbTableRoleAssignmentDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleAssignmentId = "myRoleAssignmentId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.tableResources.beginDeleteTableRoleAssignmentAndWait( + resourceGroupName, + accountName, + roleAssignmentId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleAssignmentDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableRoleDefinitionSample.ts new file mode 100644 index 000000000000..24f4abe17266 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableRoleDefinitionSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Table Role Definition. + * + * @summary Deletes an existing Azure Cosmos DB Table Role Definition. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionDelete.json + */ +async function cosmosDbTableRoleDefinitionDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleDefinitionId = "myRoleDefinitionId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.tableResources.beginDeleteTableRoleDefinitionAndWait( + resourceGroupName, + accountName, + roleDefinitionId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleDefinitionDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableSample.ts index 4b98a6e095f9..92d99d92ce01 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesDeleteTableSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Table. * * @summary Deletes an existing Azure Cosmos DB Table. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableDelete.json */ async function cosmosDbTableDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableRoleAssignmentSample.ts new file mode 100644 index 000000000000..bb44542fb9af --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableRoleAssignmentSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentGet.json + */ +async function cosmosDbTableRoleAssignmentGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleAssignmentId = "myRoleAssignmentId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.getTableRoleAssignment( + resourceGroupName, + accountName, + roleAssignmentId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleAssignmentGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableRoleDefinitionSample.ts new file mode 100644 index 000000000000..81a9c5c48808 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableRoleDefinitionSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionGet.json + */ +async function cosmosDbTableRoleDefinitionGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleDefinitionId = "myRoleDefinitionId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.getTableRoleDefinition( + resourceGroupName, + accountName, + roleDefinitionId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleDefinitionGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableSample.ts index a93f754dc1cc..2076eed43f65 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Tables under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Tables under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableGet.json */ async function cosmosDbTableGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableThroughputSample.ts index b69ff7564131..1d0f57c75c1d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesGetTableThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputGet.json */ async function cosmosDbTableThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTableRoleAssignmentsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTableRoleAssignmentsSample.ts new file mode 100644 index 000000000000..34c827de43cc --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTableRoleAssignmentsSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Table Role Assignments. + * + * @summary Retrieves the list of all Azure Cosmos DB Table Role Assignments. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentList.json + */ +async function cosmosDbTableRoleAssignmentList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tableResources.listTableRoleAssignments( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbTableRoleAssignmentList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTableRoleDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTableRoleDefinitionsSample.ts new file mode 100644 index 000000000000..6dd222724d6b --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTableRoleDefinitionsSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Table Role Definitions. + * + * @summary Retrieves the list of all Azure Cosmos DB Table Role Definitions. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionList.json + */ +async function cosmosDbTableRoleDefinitionList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tableResources.listTableRoleDefinitions( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbTableRoleDefinitionList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTablesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTablesSample.ts index 8cc3a8c536ed..f2fade798236 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTablesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesListTablesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Tables under an existing Azure Cosmos DB database account. * * @summary Lists the Tables under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableList.json */ async function cosmosDbTableList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesMigrateTableToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesMigrateTableToAutoscaleSample.ts index 3351c3d2dacc..1a03c2963466 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesMigrateTableToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesMigrateTableToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Table from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Table from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToAutoscale.json */ async function cosmosDbTableMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesMigrateTableToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesMigrateTableToManualThroughputSample.ts index 2f953cc797fc..9bc1e59b13a5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesMigrateTableToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesMigrateTableToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Table from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Table from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToManualThroughput.json */ async function cosmosDbTableMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesRetrieveContinuousBackupInformationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesRetrieveContinuousBackupInformationSample.ts index db5b04471043..d316ed5418e7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesRetrieveContinuousBackupInformationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesRetrieveContinuousBackupInformationSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves continuous backup information for a table. * * @summary Retrieves continuous backup information for a table. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableBackupInformation.json */ async function cosmosDbTableCollectionBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesUpdateTableThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesUpdateTableThroughputSample.ts index 1ea2878e68e3..3f95ed0fa16a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesUpdateTableThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/tableResourcesUpdateTableThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Table * * @summary Update RUs per second of an Azure Cosmos DB Table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputUpdate.json */ async function cosmosDbTableThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountCreateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountCreateSample.ts new file mode 100644 index 000000000000..2b189c064870 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountCreateSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ThroughputPoolAccountResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * + * @summary Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountCreate.json + */ +async function cosmosDbThroughputPoolAccountCreate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const throughputPoolName = "tp1"; + const throughputPoolAccountName = "db1"; + const body: ThroughputPoolAccountResource = { + accountLocation: "West US", + accountResourceIdentifier: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/resourceGroup/rg1/databaseAccounts/db1/", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPoolAccount.beginCreateAndWait( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + body, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolAccountCreate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountDeleteSample.ts new file mode 100644 index 000000000000..2ed118624d0f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountDeleteSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Removes an existing Azure Cosmos DB database account from a throughput pool. + * + * @summary Removes an existing Azure Cosmos DB database account from a throughput pool. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountDelete.json + */ +async function cosmosDbThroughputPoolAccountDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const throughputPoolAccountName = "db1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPoolAccount.beginDeleteAndWait( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolAccountDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountGetSample.ts new file mode 100644 index 000000000000..d5dfc891b6de --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountGetSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountGet.json + */ +async function cosmosDbThroughputPoolAccountGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const throughputPoolAccountName = "db1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPoolAccount.get( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolAccountGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountsListSample.ts new file mode 100644 index 000000000000..9fce3a1d9c6a --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolAccountsListSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Lists all the Azure Cosmos DB accounts available under the subscription. + * + * @summary Lists all the Azure Cosmos DB accounts available under the subscription. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountsList.json + */ +async function cosmosDbThroughputPoolAccountList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.throughputPoolAccounts.list( + resourceGroupName, + throughputPoolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbThroughputPoolAccountList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolCreateOrUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolCreateOrUpdateSample.ts new file mode 100644 index 000000000000..39d55fca4edb --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolCreateOrUpdateSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ThroughputPoolResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * + * @summary Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolCreate.json + */ +async function cosmosDbThroughputPoolCreate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const throughputPoolName = "tp1"; + const body: ThroughputPoolResource = { + location: "westus2", + maxThroughput: 10000, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.beginCreateOrUpdateAndWait( + resourceGroupName, + throughputPoolName, + body, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolCreate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolDeleteSample.ts new file mode 100644 index 000000000000..ba95f40f84c0 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolDeleteSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Throughput Pool. + * + * @summary Deletes an existing Azure Cosmos DB Throughput Pool. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolDelete.json + */ +async function cosmosDbThroughputPoolDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.beginDeleteAndWait( + resourceGroupName, + throughputPoolName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolGetSample.ts new file mode 100644 index 000000000000..f490c3ea474e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolGetSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolGet.json + */ +async function cosmosDbThroughputPoolGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.get( + resourceGroupName, + throughputPoolName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolUpdateSample.ts new file mode 100644 index 000000000000..08a2aeb2813f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolUpdateSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ThroughputPoolUpdate, + ThroughputPoolUpdateOptionalParams, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * + * @summary Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolUpdate.json + */ +async function cosmosDbThroughputPoolUpdate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const throughputPoolName = "tp1"; + const body: ThroughputPoolUpdate = { maxThroughput: 10000 }; + const options: ThroughputPoolUpdateOptionalParams = { body }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.beginUpdateAndWait( + resourceGroupName, + throughputPoolName, + options, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolsListByResourceGroupSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolsListByResourceGroupSample.ts new file mode 100644 index 000000000000..f122758ddbd8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolsListByResourceGroupSample.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to List all the ThroughputPools in a given resource group. + * + * @summary List all the ThroughputPools in a given resource group. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json + */ +async function cosmosDbThroughputPoolListByResourceGroup() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.throughputPools.listByResourceGroup( + resourceGroupName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbThroughputPoolListByResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolsListSample.ts new file mode 100644 index 000000000000..af755a712c72 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples-dev/throughputPoolsListSample.ts @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * + * @summary Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json + */ +async function cosmosDbThroughputPoolList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.throughputPools.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbThroughputPoolList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/README.md b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/README.md new file mode 100644 index 000000000000..09a6a223a3ce --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/README.md @@ -0,0 +1,548 @@ +# client library samples for JavaScript (Beta) + +These sample programs show how to use the JavaScript client libraries for in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [cassandraClustersCreateUpdateSample.js][cassandraclusterscreateupdatesample] | Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterCreate.json | +| [cassandraClustersDeallocateSample.js][cassandraclustersdeallocatesample] | Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDeallocate.json | +| [cassandraClustersDeleteSample.js][cassandraclustersdeletesample] | Deletes a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDelete.json | +| [cassandraClustersGetBackupSample.js][cassandraclustersgetbackupsample] | Get the properties of an individual backup of this cluster that is available to restore. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackup.json | +| [cassandraClustersGetCommandAsyncSample.js][cassandraclustersgetcommandasyncsample] | Get details about a specified command that was run asynchronously. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandResult.json | +| [cassandraClustersGetSample.js][cassandraclustersgetsample] | Get the properties of a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterGet.json | +| [cassandraClustersInvokeCommandAsyncSample.js][cassandraclustersinvokecommandasyncsample] | Invoke a command like nodetool for cassandra maintenance asynchronously x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandAsync.json | +| [cassandraClustersInvokeCommandSample.js][cassandraclustersinvokecommandsample] | Invoke a command like nodetool for cassandra maintenance x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommand.json | +| [cassandraClustersListBackupsSample.js][cassandraclusterslistbackupssample] | List the backups of this cluster that are available to restore. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackupsList.json | +| [cassandraClustersListByResourceGroupSample.js][cassandraclusterslistbyresourcegroupsample] | List all managed Cassandra clusters in this resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json | +| [cassandraClustersListBySubscriptionSample.js][cassandraclusterslistbysubscriptionsample] | List all managed Cassandra clusters in this subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListBySubscription.json | +| [cassandraClustersListCommandSample.js][cassandraclusterslistcommandsample] | List all commands currently running on ring info x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraListCommand.json | +| [cassandraClustersStartSample.js][cassandraclustersstartsample] | Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterStart.json | +| [cassandraClustersStatusSample.js][cassandraclustersstatussample] | Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraStatus.json | +| [cassandraClustersUpdateSample.js][cassandraclustersupdatesample] | Updates some of the properties of a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterPatch.json | +| [cassandraDataCentersCreateUpdateSample.js][cassandradatacenterscreateupdatesample] | Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterCreate.json | +| [cassandraDataCentersDeleteSample.js][cassandradatacentersdeletesample] | Delete a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterDelete.json | +| [cassandraDataCentersGetSample.js][cassandradatacentersgetsample] | Get the properties of a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterGet.json | +| [cassandraDataCentersListSample.js][cassandradatacenterslistsample] | List all data centers in a particular managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterList.json | +| [cassandraDataCentersUpdateSample.js][cassandradatacentersupdatesample] | Update some of the properties of a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterPatch.json | +| [cassandraResourcesCreateUpdateCassandraKeyspaceSample.js][cassandraresourcescreateupdatecassandrakeyspacesample] | Create or update an Azure Cosmos DB Cassandra keyspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceCreateUpdate.json | +| [cassandraResourcesCreateUpdateCassandraTableSample.js][cassandraresourcescreateupdatecassandratablesample] | Create or update an Azure Cosmos DB Cassandra Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableCreateUpdate.json | +| [cassandraResourcesCreateUpdateCassandraViewSample.js][cassandraresourcescreateupdatecassandraviewsample] | Create or update an Azure Cosmos DB Cassandra View x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewCreateUpdate.json | +| [cassandraResourcesDeleteCassandraKeyspaceSample.js][cassandraresourcesdeletecassandrakeyspacesample] | Deletes an existing Azure Cosmos DB Cassandra keyspace. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceDelete.json | +| [cassandraResourcesDeleteCassandraTableSample.js][cassandraresourcesdeletecassandratablesample] | Deletes an existing Azure Cosmos DB Cassandra table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableDelete.json | +| [cassandraResourcesDeleteCassandraViewSample.js][cassandraresourcesdeletecassandraviewsample] | Deletes an existing Azure Cosmos DB Cassandra view. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewDelete.json | +| [cassandraResourcesGetCassandraKeyspaceSample.js][cassandraresourcesgetcassandrakeyspacesample] | Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceGet.json | +| [cassandraResourcesGetCassandraKeyspaceThroughputSample.js][cassandraresourcesgetcassandrakeyspacethroughputsample] | Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputGet.json | +| [cassandraResourcesGetCassandraTableSample.js][cassandraresourcesgetcassandratablesample] | Gets the Cassandra table under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableGet.json | +| [cassandraResourcesGetCassandraTableThroughputSample.js][cassandraresourcesgetcassandratablethroughputsample] | Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputGet.json | +| [cassandraResourcesGetCassandraViewSample.js][cassandraresourcesgetcassandraviewsample] | Gets the Cassandra view under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewGet.json | +| [cassandraResourcesGetCassandraViewThroughputSample.js][cassandraresourcesgetcassandraviewthroughputsample] | Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputGet.json | +| [cassandraResourcesListCassandraKeyspacesSample.js][cassandraresourceslistcassandrakeyspacessample] | Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceList.json | +| [cassandraResourcesListCassandraTablesSample.js][cassandraresourceslistcassandratablessample] | Lists the Cassandra table under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableList.json | +| [cassandraResourcesListCassandraViewsSample.js][cassandraresourceslistcassandraviewssample] | Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewList.json | +| [cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js][cassandraresourcesmigratecassandrakeyspacetoautoscalesample] | Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json | +| [cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js][cassandraresourcesmigratecassandrakeyspacetomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json | +| [cassandraResourcesMigrateCassandraTableToAutoscaleSample.js][cassandraresourcesmigratecassandratabletoautoscalesample] | Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToAutoscale.json | +| [cassandraResourcesMigrateCassandraTableToManualThroughputSample.js][cassandraresourcesmigratecassandratabletomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToManualThroughput.json | +| [cassandraResourcesMigrateCassandraViewToAutoscaleSample.js][cassandraresourcesmigratecassandraviewtoautoscalesample] | Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.json | +| [cassandraResourcesMigrateCassandraViewToManualThroughputSample.js][cassandraresourcesmigratecassandraviewtomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.json | +| [cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js][cassandraresourcesupdatecassandrakeyspacethroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra Keyspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json | +| [cassandraResourcesUpdateCassandraTableThroughputSample.js][cassandraresourcesupdatecassandratablethroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputUpdate.json | +| [cassandraResourcesUpdateCassandraViewThroughputSample.js][cassandraresourcesupdatecassandraviewthroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra view x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputUpdate.json | +| [chaosFaultEnableDisableSample.js][chaosfaultenabledisablesample] | Enable, disable Chaos Fault in a CosmosDB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultEnableDisable.json | +| [chaosFaultGetSample.js][chaosfaultgetsample] | Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultGet.json | +| [chaosFaultListSample.js][chaosfaultlistsample] | List Chaos Faults for CosmosDB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultList.json | +| [collectionListMetricDefinitionsSample.js][collectionlistmetricdefinitionssample] | Retrieves metric definitions for the given collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetricDefinitions.json | +| [collectionListMetricsSample.js][collectionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetrics.json | +| [collectionListUsagesSample.js][collectionlistusagessample] | Retrieves the usages (most recent storage data) for the given collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetUsages.json | +| [collectionPartitionListMetricsSample.js][collectionpartitionlistmetricssample] | Retrieves the metrics determined by the given filter for the given collection, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetMetrics.json | +| [collectionPartitionListUsagesSample.js][collectionpartitionlistusagessample] | Retrieves the usages (most recent storage data) for the given collection, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetUsages.json | +| [collectionPartitionRegionListMetricsSample.js][collectionpartitionregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given collection and region, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionRegionGetMetrics.json | +| [collectionRegionListMetricsSample.js][collectionregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account, collection and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRegionCollectionGetMetrics.json | +| [dataTransferJobsCancelSample.js][datatransferjobscancelsample] | Cancels a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCancel.json | +| [dataTransferJobsCompleteSample.js][datatransferjobscompletesample] | Completes a Data Transfer Online Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobComplete.json | +| [dataTransferJobsCreateSample.js][datatransferjobscreatesample] | Creates a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCreate.json | +| [dataTransferJobsGetSample.js][datatransferjobsgetsample] | Get a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobGet.json | +| [dataTransferJobsListByDatabaseAccountSample.js][datatransferjobslistbydatabaseaccountsample] | Get a list of Data Transfer jobs. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobFeed.json | +| [dataTransferJobsPauseSample.js][datatransferjobspausesample] | Pause a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobPause.json | +| [dataTransferJobsResumeSample.js][datatransferjobsresumesample] | Resumes a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobResume.json | +| [databaseAccountRegionListMetricsSample.js][databaseaccountregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegionGetMetrics.json | +| [databaseAccountsCheckNameExistsSample.js][databaseaccountschecknameexistssample] | Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCheckNameExists.json | +| [databaseAccountsCreateOrUpdateSample.js][databaseaccountscreateorupdatesample] | Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCreateMax.json | +| [databaseAccountsDeleteSample.js][databaseaccountsdeletesample] | Deletes an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountDelete.json | +| [databaseAccountsFailoverPriorityChangeSample.js][databaseaccountsfailoverprioritychangesample] | Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json | +| [databaseAccountsGetReadOnlyKeysSample.js][databaseaccountsgetreadonlykeyssample] | Lists the read-only access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json | +| [databaseAccountsGetSample.js][databaseaccountsgetsample] | Retrieves the properties of an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGet.json | +| [databaseAccountsListByResourceGroupSample.js][databaseaccountslistbyresourcegroupsample] | Lists all the Azure Cosmos DB database accounts available under the given resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListByResourceGroup.json | +| [databaseAccountsListConnectionStringsSample.js][databaseaccountslistconnectionstringssample] | Lists the connection strings for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListConnectionStrings.json | +| [databaseAccountsListKeysSample.js][databaseaccountslistkeyssample] | Lists the access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListKeys.json | +| [databaseAccountsListMetricDefinitionsSample.js][databaseaccountslistmetricdefinitionssample] | Retrieves metric definitions for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json | +| [databaseAccountsListMetricsSample.js][databaseaccountslistmetricssample] | Retrieves the metrics determined by the given filter for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetrics.json | +| [databaseAccountsListReadOnlyKeysSample.js][databaseaccountslistreadonlykeyssample] | Lists the read-only access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json | +| [databaseAccountsListSample.js][databaseaccountslistsample] | Lists all the Azure Cosmos DB database accounts available under the subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountList.json | +| [databaseAccountsListUsagesSample.js][databaseaccountslistusagessample] | Retrieves the usages (most recent data) for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetUsages.json | +| [databaseAccountsOfflineRegionSample.js][databaseaccountsofflineregionsample] | Offline the specified region for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOfflineRegion.json | +| [databaseAccountsOnlineRegionSample.js][databaseaccountsonlineregionsample] | Online the specified region for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOnlineRegion.json | +| [databaseAccountsRegenerateKeySample.js][databaseaccountsregeneratekeysample] | Regenerates an access key for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegenerateKey.json | +| [databaseAccountsUpdateSample.js][databaseaccountsupdatesample] | Updates the properties of an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountPatch.json | +| [databaseListMetricDefinitionsSample.js][databaselistmetricdefinitionssample] | Retrieves metric definitions for the given database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetricDefinitions.json | +| [databaseListMetricsSample.js][databaselistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetrics.json | +| [databaseListUsagesSample.js][databaselistusagessample] | Retrieves the usages (most recent data) for the given database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetUsages.json | +| [graphResourcesCreateUpdateGraphSample.js][graphresourcescreateupdategraphsample] | Create or update an Azure Cosmos DB Graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceCreateUpdate.json | +| [graphResourcesDeleteGraphResourceSample.js][graphresourcesdeletegraphresourcesample] | Deletes an existing Azure Cosmos DB Graph Resource. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceDelete.json | +| [graphResourcesGetGraphSample.js][graphresourcesgetgraphsample] | Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceGet.json | +| [graphResourcesListGraphsSample.js][graphresourceslistgraphssample] | Lists the graphs under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceList.json | +| [gremlinResourcesCreateUpdateGremlinDatabaseSample.js][gremlinresourcescreateupdategremlindatabasesample] | Create or update an Azure Cosmos DB Gremlin database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseCreateUpdate.json | +| [gremlinResourcesCreateUpdateGremlinGraphSample.js][gremlinresourcescreateupdategremlingraphsample] | Create or update an Azure Cosmos DB Gremlin graph x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphCreateUpdate.json | +| [gremlinResourcesDeleteGremlinDatabaseSample.js][gremlinresourcesdeletegremlindatabasesample] | Deletes an existing Azure Cosmos DB Gremlin database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseDelete.json | +| [gremlinResourcesDeleteGremlinGraphSample.js][gremlinresourcesdeletegremlingraphsample] | Deletes an existing Azure Cosmos DB Gremlin graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphDelete.json | +| [gremlinResourcesGetGremlinDatabaseSample.js][gremlinresourcesgetgremlindatabasesample] | Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseGet.json | +| [gremlinResourcesGetGremlinDatabaseThroughputSample.js][gremlinresourcesgetgremlindatabasethroughputsample] | Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputGet.json | +| [gremlinResourcesGetGremlinGraphSample.js][gremlinresourcesgetgremlingraphsample] | Gets the Gremlin graph under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphGet.json | +| [gremlinResourcesGetGremlinGraphThroughputSample.js][gremlinresourcesgetgremlingraphthroughputsample] | Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputGet.json | +| [gremlinResourcesListGremlinDatabasesSample.js][gremlinresourceslistgremlindatabasessample] | Lists the Gremlin databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseList.json | +| [gremlinResourcesListGremlinGraphsSample.js][gremlinresourceslistgremlingraphssample] | Lists the Gremlin graph under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphList.json | +| [gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js][gremlinresourcesmigrategremlindatabasetoautoscalesample] | Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json | +| [gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js][gremlinresourcesmigrategremlindatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json | +| [gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js][gremlinresourcesmigrategremlingraphtoautoscalesample] | Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToAutoscale.json | +| [gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js][gremlinresourcesmigrategremlingraphtomanualthroughputsample] | Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json | +| [gremlinResourcesRetrieveContinuousBackupInformationSample.js][gremlinresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a gremlin graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphBackupInformation.json | +| [gremlinResourcesUpdateGremlinDatabaseThroughputSample.js][gremlinresourcesupdategremlindatabasethroughputsample] | Update RUs per second of an Azure Cosmos DB Gremlin database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputUpdate.json | +| [gremlinResourcesUpdateGremlinGraphThroughputSample.js][gremlinresourcesupdategremlingraphthroughputsample] | Update RUs per second of an Azure Cosmos DB Gremlin graph x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputUpdate.json | +| [locationsGetSample.js][locationsgetsample] | Get the properties of an existing Cosmos DB location x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationGet.json | +| [locationsListSample.js][locationslistsample] | List Cosmos DB locations and their properties x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationList.json | +| [mongoDbResourcesCreateUpdateMongoDbcollectionSample.js][mongodbresourcescreateupdatemongodbcollectionsample] | Create or update an Azure Cosmos DB MongoDB Collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionCreateUpdate.json | +| [mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js][mongodbresourcescreateupdatemongodbdatabasesample] | Create or updates Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseCreateUpdate.json | +| [mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js][mongodbresourcescreateupdatemongoroledefinitionsample] | Creates or updates an Azure Cosmos DB Mongo Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json | +| [mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js][mongodbresourcescreateupdatemongouserdefinitionsample] | Creates or updates an Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json | +| [mongoDbResourcesDeleteMongoDbcollectionSample.js][mongodbresourcesdeletemongodbcollectionsample] | Deletes an existing Azure Cosmos DB MongoDB Collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionDelete.json | +| [mongoDbResourcesDeleteMongoDbdatabaseSample.js][mongodbresourcesdeletemongodbdatabasesample] | Deletes an existing Azure Cosmos DB MongoDB database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseDelete.json | +| [mongoDbResourcesDeleteMongoRoleDefinitionSample.js][mongodbresourcesdeletemongoroledefinitionsample] | Deletes an existing Azure Cosmos DB Mongo Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.json | +| [mongoDbResourcesDeleteMongoUserDefinitionSample.js][mongodbresourcesdeletemongouserdefinitionsample] | Deletes an existing Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionDelete.json | +| [mongoDbResourcesGetMongoDbcollectionSample.js][mongodbresourcesgetmongodbcollectionsample] | Gets the MongoDB collection under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionGet.json | +| [mongoDbResourcesGetMongoDbcollectionThroughputSample.js][mongodbresourcesgetmongodbcollectionthroughputsample] | Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputGet.json | +| [mongoDbResourcesGetMongoDbdatabaseSample.js][mongodbresourcesgetmongodbdatabasesample] | Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseGet.json | +| [mongoDbResourcesGetMongoDbdatabaseThroughputSample.js][mongodbresourcesgetmongodbdatabasethroughputsample] | Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputGet.json | +| [mongoDbResourcesGetMongoRoleDefinitionSample.js][mongodbresourcesgetmongoroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionGet.json | +| [mongoDbResourcesGetMongoUserDefinitionSample.js][mongodbresourcesgetmongouserdefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionGet.json | +| [mongoDbResourcesListMongoDbcollectionPartitionMergeSample.js][mongodbresourceslistmongodbcollectionpartitionmergesample] | Merges the partitions of a MongoDB Collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json | +| [mongoDbResourcesListMongoDbcollectionsSample.js][mongodbresourceslistmongodbcollectionssample] | Lists the MongoDB collection under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionList.json | +| [mongoDbResourcesListMongoDbdatabasesSample.js][mongodbresourceslistmongodbdatabasessample] | Lists the MongoDB databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseList.json | +| [mongoDbResourcesListMongoRoleDefinitionsSample.js][mongodbresourceslistmongoroledefinitionssample] | Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionList.json | +| [mongoDbResourcesListMongoUserDefinitionsSample.js][mongodbresourceslistmongouserdefinitionssample] | Retrieves the list of all Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionList.json | +| [mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js][mongodbresourcesmigratemongodbcollectiontoautoscalesample] | Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json | +| [mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js][mongodbresourcesmigratemongodbcollectiontomanualthroughputsample] | Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json | +| [mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js][mongodbresourcesmigratemongodbdatabasetoautoscalesample] | Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json | +| [mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js][mongodbresourcesmigratemongodbdatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json | +| [mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.js][mongodbresourcesmongodbcontainerredistributethroughputsample] | Redistribute throughput for an Azure Cosmos DB MongoDB container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json | +| [mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.js][mongodbresourcesmongodbcontainerretrievethroughputdistributionsample] | Retrieve throughput distribution for an Azure Cosmos DB MongoDB container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json | +| [mongoDbResourcesMongoDbdatabasePartitionMergeSample.js][mongodbresourcesmongodbdatabasepartitionmergesample] | Merges the partitions of a MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabasePartitionMerge.json | +| [mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.js][mongodbresourcesmongodbdatabaseredistributethroughputsample] | Redistribute throughput for an Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRedistributeThroughput.json | +| [mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.js][mongodbresourcesmongodbdatabaseretrievethroughputdistributionsample] | Retrieve throughput distribution for an Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRetrieveThroughputDistribution.json | +| [mongoDbResourcesRetrieveContinuousBackupInformationSample.js][mongodbresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a Mongodb collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionBackupInformation.json | +| [mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js][mongodbresourcesupdatemongodbcollectionthroughputsample] | Update the RUs per second of an Azure Cosmos DB MongoDB collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputUpdate.json | +| [mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js][mongodbresourcesupdatemongodbdatabasethroughputsample] | Update RUs per second of the an Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json | +| [networkSecurityPerimeterConfigurationsGetSample.js][networksecurityperimeterconfigurationsgetsample] | Gets effective Network Security Perimeter Configuration for association x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationGet.json | +| [networkSecurityPerimeterConfigurationsListSample.js][networksecurityperimeterconfigurationslistsample] | Gets list of effective Network Security Perimeter Configuration for cosmos db account x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationList.json | +| [networkSecurityPerimeterConfigurationsReconcileSample.js][networksecurityperimeterconfigurationsreconcilesample] | Refreshes any information about the association. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationReconcile.json | +| [notebookWorkspacesCreateOrUpdateSample.js][notebookworkspacescreateorupdatesample] | Creates the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceCreate.json | +| [notebookWorkspacesDeleteSample.js][notebookworkspacesdeletesample] | Deletes the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceDelete.json | +| [notebookWorkspacesGetSample.js][notebookworkspacesgetsample] | Gets the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceGet.json | +| [notebookWorkspacesListByDatabaseAccountSample.js][notebookworkspaceslistbydatabaseaccountsample] | Gets the notebook workspace resources of an existing Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceList.json | +| [notebookWorkspacesListConnectionInfoSample.js][notebookworkspaceslistconnectioninfosample] | Retrieves the connection info for the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json | +| [notebookWorkspacesRegenerateAuthTokenSample.js][notebookworkspacesregenerateauthtokensample] | Regenerates the auth token for the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json | +| [notebookWorkspacesStartSample.js][notebookworkspacesstartsample] | Starts the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceStart.json | +| [operationsListSample.js][operationslistsample] | Lists all of the available Cosmos DB Resource Provider operations. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBOperationsList.json | +| [partitionKeyRangeIdListMetricsSample.js][partitionkeyrangeidlistmetricssample] | Retrieves the metrics determined by the given filter for the given partition key range id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdGetMetrics.json | +| [partitionKeyRangeIdRegionListMetricsSample.js][partitionkeyrangeidregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given partition key range id and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json | +| [percentileListMetricsSample.js][percentilelistmetricssample] | Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileGetMetrics.json | +| [percentileSourceTargetListMetricsSample.js][percentilesourcetargetlistmetricssample] | Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileSourceTargetGetMetrics.json | +| [percentileTargetListMetricsSample.js][percentiletargetlistmetricssample] | Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileTargetGetMetrics.json | +| [privateEndpointConnectionsCreateOrUpdateSample.js][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionGet.json | +| [privateEndpointConnectionsListByDatabaseAccountSample.js][privateendpointconnectionslistbydatabaseaccountsample] | List all private endpoint connections on a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json | +| [privateLinkResourcesGetSample.js][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceGet.json | +| [privateLinkResourcesListByDatabaseAccountSample.js][privatelinkresourceslistbydatabaseaccountsample] | Gets the private link resources that need to be created for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceListGet.json | +| [restorableDatabaseAccountsGetByLocationSample.js][restorabledatabaseaccountsgetbylocationsample] | Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/\*' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json | +| [restorableDatabaseAccountsListByLocationSample.js][restorabledatabaseaccountslistbylocationsample] | Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json | +| [restorableDatabaseAccountsListSample.js][restorabledatabaseaccountslistsample] | Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json | +| [restorableGremlinDatabasesListSample.js][restorablegremlindatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinDatabaseList.json | +| [restorableGremlinGraphsListSample.js][restorablegremlingraphslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinGraphList.json | +| [restorableGremlinResourcesListSample.js][restorablegremlinresourceslistsample] | Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinResourceList.json | +| [restorableMongodbCollectionsListSample.js][restorablemongodbcollectionslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json | +| [restorableMongodbDatabasesListSample.js][restorablemongodbdatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json | +| [restorableMongodbResourcesListSample.js][restorablemongodbresourceslistsample] | Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbResourceList.json | +| [restorableSqlContainersListSample.js][restorablesqlcontainerslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlContainerList.json | +| [restorableSqlDatabasesListSample.js][restorablesqldatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlDatabaseList.json | +| [restorableSqlResourcesListSample.js][restorablesqlresourceslistsample] | Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlResourceList.json | +| [restorableTableResourcesListSample.js][restorabletableresourceslistsample] | Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableResourceList.json | +| [restorableTablesListSample.js][restorabletableslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableList.json | +| [serviceCreateSample.js][servicecreatesample] | Creates a service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceCreate.json | +| [serviceDeleteSample.js][servicedeletesample] | Deletes service with the given serviceName. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceDelete.json | +| [serviceGetSample.js][servicegetsample] | Gets the status of service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceGet.json | +| [serviceListSample.js][servicelistsample] | Gets the status of service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBServicesList.json | +| [sqlResourcesCreateUpdateClientEncryptionKeySample.js][sqlresourcescreateupdateclientencryptionkeysample] | Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlContainerSample.js][sqlresourcescreateupdatesqlcontainersample] | Create or update an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlDatabaseSample.js][sqlresourcescreateupdatesqldatabasesample] | Create or update an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlRoleAssignmentSample.js][sqlresourcescreateupdatesqlroleassignmentsample] | Creates or updates an Azure Cosmos DB SQL Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlRoleDefinitionSample.js][sqlresourcescreateupdatesqlroledefinitionsample] | Creates or updates an Azure Cosmos DB SQL Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlStoredProcedureSample.js][sqlresourcescreateupdatesqlstoredproceduresample] | Create or update an Azure Cosmos DB SQL storedProcedure x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlTriggerSample.js][sqlresourcescreateupdatesqltriggersample] | Create or update an Azure Cosmos DB SQL trigger x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js][sqlresourcescreateupdatesqluserdefinedfunctionsample] | Create or update an Azure Cosmos DB SQL userDefinedFunction x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json | +| [sqlResourcesDeleteSqlContainerSample.js][sqlresourcesdeletesqlcontainersample] | Deletes an existing Azure Cosmos DB SQL container. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerDelete.json | +| [sqlResourcesDeleteSqlDatabaseSample.js][sqlresourcesdeletesqldatabasesample] | Deletes an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseDelete.json | +| [sqlResourcesDeleteSqlRoleAssignmentSample.js][sqlresourcesdeletesqlroleassignmentsample] | Deletes an existing Azure Cosmos DB SQL Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentDelete.json | +| [sqlResourcesDeleteSqlRoleDefinitionSample.js][sqlresourcesdeletesqlroledefinitionsample] | Deletes an existing Azure Cosmos DB SQL Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionDelete.json | +| [sqlResourcesDeleteSqlStoredProcedureSample.js][sqlresourcesdeletesqlstoredproceduresample] | Deletes an existing Azure Cosmos DB SQL storedProcedure. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureDelete.json | +| [sqlResourcesDeleteSqlTriggerSample.js][sqlresourcesdeletesqltriggersample] | Deletes an existing Azure Cosmos DB SQL trigger. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerDelete.json | +| [sqlResourcesDeleteSqlUserDefinedFunctionSample.js][sqlresourcesdeletesqluserdefinedfunctionsample] | Deletes an existing Azure Cosmos DB SQL userDefinedFunction. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionDelete.json | +| [sqlResourcesGetClientEncryptionKeySample.js][sqlresourcesgetclientencryptionkeysample] | Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyGet.json | +| [sqlResourcesGetSqlContainerSample.js][sqlresourcesgetsqlcontainersample] | Gets the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerGet.json | +| [sqlResourcesGetSqlContainerThroughputSample.js][sqlresourcesgetsqlcontainerthroughputsample] | Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputGet.json | +| [sqlResourcesGetSqlDatabaseSample.js][sqlresourcesgetsqldatabasesample] | Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseGet.json | +| [sqlResourcesGetSqlDatabaseThroughputSample.js][sqlresourcesgetsqldatabasethroughputsample] | Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputGet.json | +| [sqlResourcesGetSqlRoleAssignmentSample.js][sqlresourcesgetsqlroleassignmentsample] | Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentGet.json | +| [sqlResourcesGetSqlRoleDefinitionSample.js][sqlresourcesgetsqlroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionGet.json | +| [sqlResourcesGetSqlStoredProcedureSample.js][sqlresourcesgetsqlstoredproceduresample] | Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureGet.json | +| [sqlResourcesGetSqlTriggerSample.js][sqlresourcesgetsqltriggersample] | Gets the SQL trigger under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerGet.json | +| [sqlResourcesGetSqlUserDefinedFunctionSample.js][sqlresourcesgetsqluserdefinedfunctionsample] | Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionGet.json | +| [sqlResourcesListClientEncryptionKeysSample.js][sqlresourceslistclientencryptionkeyssample] | Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeysList.json | +| [sqlResourcesListSqlContainerPartitionMergeSample.js][sqlresourceslistsqlcontainerpartitionmergesample] | Merges the partitions of a SQL Container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerPartitionMerge.json | +| [sqlResourcesListSqlContainersSample.js][sqlresourceslistsqlcontainerssample] | Lists the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerList.json | +| [sqlResourcesListSqlDatabasesSample.js][sqlresourceslistsqldatabasessample] | Lists the SQL databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseList.json | +| [sqlResourcesListSqlRoleAssignmentsSample.js][sqlresourceslistsqlroleassignmentssample] | Retrieves the list of all Azure Cosmos DB SQL Role Assignments. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentList.json | +| [sqlResourcesListSqlRoleDefinitionsSample.js][sqlresourceslistsqlroledefinitionssample] | Retrieves the list of all Azure Cosmos DB SQL Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionList.json | +| [sqlResourcesListSqlStoredProceduresSample.js][sqlresourceslistsqlstoredproceduressample] | Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureList.json | +| [sqlResourcesListSqlTriggersSample.js][sqlresourceslistsqltriggerssample] | Lists the SQL trigger under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerList.json | +| [sqlResourcesListSqlUserDefinedFunctionsSample.js][sqlresourceslistsqluserdefinedfunctionssample] | Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionList.json | +| [sqlResourcesMigrateSqlContainerToAutoscaleSample.js][sqlresourcesmigratesqlcontainertoautoscalesample] | Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToAutoscale.json | +| [sqlResourcesMigrateSqlContainerToManualThroughputSample.js][sqlresourcesmigratesqlcontainertomanualthroughputsample] | Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToManualThroughput.json | +| [sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js][sqlresourcesmigratesqldatabasetoautoscalesample] | Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json | +| [sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js][sqlresourcesmigratesqldatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json | +| [sqlResourcesRetrieveContinuousBackupInformationSample.js][sqlresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a container resource. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerBackupInformation.json | +| [sqlResourcesSqlContainerRedistributeThroughputSample.js][sqlresourcessqlcontainerredistributethroughputsample] | Redistribute throughput for an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json | +| [sqlResourcesSqlContainerRetrieveThroughputDistributionSample.js][sqlresourcessqlcontainerretrievethroughputdistributionsample] | Retrieve throughput distribution for an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json | +| [sqlResourcesSqlDatabasePartitionMergeSample.js][sqlresourcessqldatabasepartitionmergesample] | Merges the partitions of a SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabasePartitionMerge.json | +| [sqlResourcesSqlDatabaseRedistributeThroughputSample.js][sqlresourcessqldatabaseredistributethroughputsample] | Redistribute throughput for an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRedistributeThroughput.json | +| [sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.js][sqlresourcessqldatabaseretrievethroughputdistributionsample] | Retrieve throughput distribution for an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRetrieveThroughputDistribution.json | +| [sqlResourcesUpdateSqlContainerThroughputSample.js][sqlresourcesupdatesqlcontainerthroughputsample] | Update RUs per second of an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputUpdate.json | +| [sqlResourcesUpdateSqlDatabaseThroughputSample.js][sqlresourcesupdatesqldatabasethroughputsample] | Update RUs per second of an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputUpdate.json | +| [tableResourcesCreateUpdateTableRoleAssignmentSample.js][tableresourcescreateupdatetableroleassignmentsample] | Creates or updates an Azure Cosmos DB Table Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentCreateUpdate.json | +| [tableResourcesCreateUpdateTableRoleDefinitionSample.js][tableresourcescreateupdatetableroledefinitionsample] | Creates or updates an Azure Cosmos DB Table Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionCreateUpdate.json | +| [tableResourcesCreateUpdateTableSample.js][tableresourcescreateupdatetablesample] | Create or update an Azure Cosmos DB Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableCreateUpdate.json | +| [tableResourcesDeleteTableRoleAssignmentSample.js][tableresourcesdeletetableroleassignmentsample] | Deletes an existing Azure Cosmos DB Table Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentDelete.json | +| [tableResourcesDeleteTableRoleDefinitionSample.js][tableresourcesdeletetableroledefinitionsample] | Deletes an existing Azure Cosmos DB Table Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionDelete.json | +| [tableResourcesDeleteTableSample.js][tableresourcesdeletetablesample] | Deletes an existing Azure Cosmos DB Table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableDelete.json | +| [tableResourcesGetTableRoleAssignmentSample.js][tableresourcesgettableroleassignmentsample] | Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentGet.json | +| [tableResourcesGetTableRoleDefinitionSample.js][tableresourcesgettableroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionGet.json | +| [tableResourcesGetTableSample.js][tableresourcesgettablesample] | Gets the Tables under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableGet.json | +| [tableResourcesGetTableThroughputSample.js][tableresourcesgettablethroughputsample] | Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputGet.json | +| [tableResourcesListTableRoleAssignmentsSample.js][tableresourceslisttableroleassignmentssample] | Retrieves the list of all Azure Cosmos DB Table Role Assignments. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentList.json | +| [tableResourcesListTableRoleDefinitionsSample.js][tableresourceslisttableroledefinitionssample] | Retrieves the list of all Azure Cosmos DB Table Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionList.json | +| [tableResourcesListTablesSample.js][tableresourceslisttablessample] | Lists the Tables under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableList.json | +| [tableResourcesMigrateTableToAutoscaleSample.js][tableresourcesmigratetabletoautoscalesample] | Migrate an Azure Cosmos DB Table from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToAutoscale.json | +| [tableResourcesMigrateTableToManualThroughputSample.js][tableresourcesmigratetabletomanualthroughputsample] | Migrate an Azure Cosmos DB Table from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToManualThroughput.json | +| [tableResourcesRetrieveContinuousBackupInformationSample.js][tableresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableBackupInformation.json | +| [tableResourcesUpdateTableThroughputSample.js][tableresourcesupdatetablethroughputsample] | Update RUs per second of an Azure Cosmos DB Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputUpdate.json | +| [throughputPoolAccountCreateSample.js][throughputpoolaccountcreatesample] | Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountCreate.json | +| [throughputPoolAccountDeleteSample.js][throughputpoolaccountdeletesample] | Removes an existing Azure Cosmos DB database account from a throughput pool. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountDelete.json | +| [throughputPoolAccountGetSample.js][throughputpoolaccountgetsample] | Retrieves the properties of an existing Azure Cosmos DB Throughput Pool x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountGet.json | +| [throughputPoolAccountsListSample.js][throughputpoolaccountslistsample] | Lists all the Azure Cosmos DB accounts available under the subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountsList.json | +| [throughputPoolCreateOrUpdateSample.js][throughputpoolcreateorupdatesample] | Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolCreate.json | +| [throughputPoolDeleteSample.js][throughputpooldeletesample] | Deletes an existing Azure Cosmos DB Throughput Pool. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolDelete.json | +| [throughputPoolGetSample.js][throughputpoolgetsample] | Retrieves the properties of an existing Azure Cosmos DB Throughput Pool x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolGet.json | +| [throughputPoolUpdateSample.js][throughputpoolupdatesample] | Updates the properties of an existing Azure Cosmos DB Throughput Pool. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolUpdate.json | +| [throughputPoolsListByResourceGroupSample.js][throughputpoolslistbyresourcegroupsample] | List all the ThroughputPools in a given resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json | +| [throughputPoolsListSample.js][throughputpoolslistsample] | Lists all the Azure Cosmos DB Throughput Pools available under the subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node cassandraClustersCreateUpdateSample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx dev-tool run vendored cross-env COSMOSDB_SUBSCRIPTION_ID="" COSMOSDB_RESOURCE_GROUP="" node cassandraClustersCreateUpdateSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[cassandraclusterscreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersCreateUpdateSample.js +[cassandraclustersdeallocatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersDeallocateSample.js +[cassandraclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersDeleteSample.js +[cassandraclustersgetbackupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetBackupSample.js +[cassandraclustersgetcommandasyncsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetCommandAsyncSample.js +[cassandraclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetSample.js +[cassandraclustersinvokecommandasyncsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersInvokeCommandAsyncSample.js +[cassandraclustersinvokecommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersInvokeCommandSample.js +[cassandraclusterslistbackupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListBackupsSample.js +[cassandraclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListByResourceGroupSample.js +[cassandraclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListBySubscriptionSample.js +[cassandraclusterslistcommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListCommandSample.js +[cassandraclustersstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersStartSample.js +[cassandraclustersstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersStatusSample.js +[cassandraclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersUpdateSample.js +[cassandradatacenterscreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersCreateUpdateSample.js +[cassandradatacentersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersDeleteSample.js +[cassandradatacentersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersGetSample.js +[cassandradatacenterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersListSample.js +[cassandradatacentersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersUpdateSample.js +[cassandraresourcescreateupdatecassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraKeyspaceSample.js +[cassandraresourcescreateupdatecassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraTableSample.js +[cassandraresourcescreateupdatecassandraviewsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraViewSample.js +[cassandraresourcesdeletecassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraKeyspaceSample.js +[cassandraresourcesdeletecassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraTableSample.js +[cassandraresourcesdeletecassandraviewsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraViewSample.js +[cassandraresourcesgetcassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraKeyspaceSample.js +[cassandraresourcesgetcassandrakeyspacethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraKeyspaceThroughputSample.js +[cassandraresourcesgetcassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraTableSample.js +[cassandraresourcesgetcassandratablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraTableThroughputSample.js +[cassandraresourcesgetcassandraviewsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewSample.js +[cassandraresourcesgetcassandraviewthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewThroughputSample.js +[cassandraresourceslistcassandrakeyspacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraKeyspacesSample.js +[cassandraresourceslistcassandratablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraTablesSample.js +[cassandraresourceslistcassandraviewssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraViewsSample.js +[cassandraresourcesmigratecassandrakeyspacetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js +[cassandraresourcesmigratecassandrakeyspacetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js +[cassandraresourcesmigratecassandratabletoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraTableToAutoscaleSample.js +[cassandraresourcesmigratecassandratabletomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraTableToManualThroughputSample.js +[cassandraresourcesmigratecassandraviewtoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToAutoscaleSample.js +[cassandraresourcesmigratecassandraviewtomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToManualThroughputSample.js +[cassandraresourcesupdatecassandrakeyspacethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js +[cassandraresourcesupdatecassandratablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraTableThroughputSample.js +[cassandraresourcesupdatecassandraviewthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraViewThroughputSample.js +[chaosfaultenabledisablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultEnableDisableSample.js +[chaosfaultgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultGetSample.js +[chaosfaultlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultListSample.js +[collectionlistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListMetricDefinitionsSample.js +[collectionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListMetricsSample.js +[collectionlistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListUsagesSample.js +[collectionpartitionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionListMetricsSample.js +[collectionpartitionlistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionListUsagesSample.js +[collectionpartitionregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionRegionListMetricsSample.js +[collectionregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionRegionListMetricsSample.js +[datatransferjobscancelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCancelSample.js +[datatransferjobscompletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCompleteSample.js +[datatransferjobscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCreateSample.js +[datatransferjobsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsGetSample.js +[datatransferjobslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsListByDatabaseAccountSample.js +[datatransferjobspausesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsPauseSample.js +[datatransferjobsresumesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsResumeSample.js +[databaseaccountregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountRegionListMetricsSample.js +[databaseaccountschecknameexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsCheckNameExistsSample.js +[databaseaccountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsCreateOrUpdateSample.js +[databaseaccountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsDeleteSample.js +[databaseaccountsfailoverprioritychangesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsFailoverPriorityChangeSample.js +[databaseaccountsgetreadonlykeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsGetReadOnlyKeysSample.js +[databaseaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsGetSample.js +[databaseaccountslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListByResourceGroupSample.js +[databaseaccountslistconnectionstringssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListConnectionStringsSample.js +[databaseaccountslistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListKeysSample.js +[databaseaccountslistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListMetricDefinitionsSample.js +[databaseaccountslistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListMetricsSample.js +[databaseaccountslistreadonlykeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListReadOnlyKeysSample.js +[databaseaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListSample.js +[databaseaccountslistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListUsagesSample.js +[databaseaccountsofflineregionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsOfflineRegionSample.js +[databaseaccountsonlineregionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsOnlineRegionSample.js +[databaseaccountsregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsRegenerateKeySample.js +[databaseaccountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsUpdateSample.js +[databaselistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListMetricDefinitionsSample.js +[databaselistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListMetricsSample.js +[databaselistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListUsagesSample.js +[graphresourcescreateupdategraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesCreateUpdateGraphSample.js +[graphresourcesdeletegraphresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesDeleteGraphResourceSample.js +[graphresourcesgetgraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesGetGraphSample.js +[graphresourceslistgraphssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesListGraphsSample.js +[gremlinresourcescreateupdategremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesCreateUpdateGremlinDatabaseSample.js +[gremlinresourcescreateupdategremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesCreateUpdateGremlinGraphSample.js +[gremlinresourcesdeletegremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesDeleteGremlinDatabaseSample.js +[gremlinresourcesdeletegremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesDeleteGremlinGraphSample.js +[gremlinresourcesgetgremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinDatabaseSample.js +[gremlinresourcesgetgremlindatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinDatabaseThroughputSample.js +[gremlinresourcesgetgremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinGraphSample.js +[gremlinresourcesgetgremlingraphthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinGraphThroughputSample.js +[gremlinresourceslistgremlindatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesListGremlinDatabasesSample.js +[gremlinresourceslistgremlingraphssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesListGremlinGraphsSample.js +[gremlinresourcesmigrategremlindatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js +[gremlinresourcesmigrategremlindatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js +[gremlinresourcesmigrategremlingraphtoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js +[gremlinresourcesmigrategremlingraphtomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js +[gremlinresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesRetrieveContinuousBackupInformationSample.js +[gremlinresourcesupdategremlindatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesUpdateGremlinDatabaseThroughputSample.js +[gremlinresourcesupdategremlingraphthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesUpdateGremlinGraphThroughputSample.js +[locationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/locationsGetSample.js +[locationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/locationsListSample.js +[mongodbresourcescreateupdatemongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js +[mongodbresourcescreateupdatemongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js +[mongodbresourcescreateupdatemongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js +[mongodbresourcescreateupdatemongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js +[mongodbresourcesdeletemongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoDbcollectionSample.js +[mongodbresourcesdeletemongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoDbdatabaseSample.js +[mongodbresourcesdeletemongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoRoleDefinitionSample.js +[mongodbresourcesdeletemongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoUserDefinitionSample.js +[mongodbresourcesgetmongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbcollectionSample.js +[mongodbresourcesgetmongodbcollectionthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbcollectionThroughputSample.js +[mongodbresourcesgetmongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbdatabaseSample.js +[mongodbresourcesgetmongodbdatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbdatabaseThroughputSample.js +[mongodbresourcesgetmongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoRoleDefinitionSample.js +[mongodbresourcesgetmongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoUserDefinitionSample.js +[mongodbresourceslistmongodbcollectionpartitionmergesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.js +[mongodbresourceslistmongodbcollectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbcollectionsSample.js +[mongodbresourceslistmongodbdatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbdatabasesSample.js +[mongodbresourceslistmongoroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoRoleDefinitionsSample.js +[mongodbresourceslistmongouserdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoUserDefinitionsSample.js +[mongodbresourcesmigratemongodbcollectiontoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js +[mongodbresourcesmigratemongodbcollectiontomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js +[mongodbresourcesmigratemongodbdatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js +[mongodbresourcesmigratemongodbdatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js +[mongodbresourcesmongodbcontainerredistributethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.js +[mongodbresourcesmongodbcontainerretrievethroughputdistributionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.js +[mongodbresourcesmongodbdatabasepartitionmergesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabasePartitionMergeSample.js +[mongodbresourcesmongodbdatabaseredistributethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.js +[mongodbresourcesmongodbdatabaseretrievethroughputdistributionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.js +[mongodbresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesRetrieveContinuousBackupInformationSample.js +[mongodbresourcesupdatemongodbcollectionthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js +[mongodbresourcesupdatemongodbdatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js +[networksecurityperimeterconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsGetSample.js +[networksecurityperimeterconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsListSample.js +[networksecurityperimeterconfigurationsreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js +[notebookworkspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesCreateOrUpdateSample.js +[notebookworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesDeleteSample.js +[notebookworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesGetSample.js +[notebookworkspaceslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesListByDatabaseAccountSample.js +[notebookworkspaceslistconnectioninfosample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesListConnectionInfoSample.js +[notebookworkspacesregenerateauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesRegenerateAuthTokenSample.js +[notebookworkspacesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesStartSample.js +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/operationsListSample.js +[partitionkeyrangeidlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/partitionKeyRangeIdListMetricsSample.js +[partitionkeyrangeidregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/partitionKeyRangeIdRegionListMetricsSample.js +[percentilelistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileListMetricsSample.js +[percentilesourcetargetlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileSourceTargetListMetricsSample.js +[percentiletargetlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileTargetListMetricsSample.js +[privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js +[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsDeleteSample.js +[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsGetSample.js +[privateendpointconnectionslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsListByDatabaseAccountSample.js +[privatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateLinkResourcesGetSample.js +[privatelinkresourceslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateLinkResourcesListByDatabaseAccountSample.js +[restorabledatabaseaccountsgetbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsGetByLocationSample.js +[restorabledatabaseaccountslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsListByLocationSample.js +[restorabledatabaseaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsListSample.js +[restorablegremlindatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinDatabasesListSample.js +[restorablegremlingraphslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinGraphsListSample.js +[restorablegremlinresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinResourcesListSample.js +[restorablemongodbcollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbCollectionsListSample.js +[restorablemongodbdatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbDatabasesListSample.js +[restorablemongodbresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbResourcesListSample.js +[restorablesqlcontainerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlContainersListSample.js +[restorablesqldatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlDatabasesListSample.js +[restorablesqlresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlResourcesListSample.js +[restorabletableresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableTableResourcesListSample.js +[restorabletableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableTablesListSample.js +[servicecreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceCreateSample.js +[servicedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceDeleteSample.js +[servicegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceGetSample.js +[servicelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceListSample.js +[sqlresourcescreateupdateclientencryptionkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateClientEncryptionKeySample.js +[sqlresourcescreateupdatesqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlContainerSample.js +[sqlresourcescreateupdatesqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js +[sqlresourcescreateupdatesqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlRoleAssignmentSample.js +[sqlresourcescreateupdatesqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlRoleDefinitionSample.js +[sqlresourcescreateupdatesqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlStoredProcedureSample.js +[sqlresourcescreateupdatesqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlTriggerSample.js +[sqlresourcescreateupdatesqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js +[sqlresourcesdeletesqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlContainerSample.js +[sqlresourcesdeletesqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlDatabaseSample.js +[sqlresourcesdeletesqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlRoleAssignmentSample.js +[sqlresourcesdeletesqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlRoleDefinitionSample.js +[sqlresourcesdeletesqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlStoredProcedureSample.js +[sqlresourcesdeletesqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlTriggerSample.js +[sqlresourcesdeletesqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlUserDefinedFunctionSample.js +[sqlresourcesgetclientencryptionkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetClientEncryptionKeySample.js +[sqlresourcesgetsqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlContainerSample.js +[sqlresourcesgetsqlcontainerthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlContainerThroughputSample.js +[sqlresourcesgetsqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlDatabaseSample.js +[sqlresourcesgetsqldatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlDatabaseThroughputSample.js +[sqlresourcesgetsqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlRoleAssignmentSample.js +[sqlresourcesgetsqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlRoleDefinitionSample.js +[sqlresourcesgetsqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlStoredProcedureSample.js +[sqlresourcesgetsqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlTriggerSample.js +[sqlresourcesgetsqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlUserDefinedFunctionSample.js +[sqlresourceslistclientencryptionkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListClientEncryptionKeysSample.js +[sqlresourceslistsqlcontainerpartitionmergesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlContainerPartitionMergeSample.js +[sqlresourceslistsqlcontainerssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlContainersSample.js +[sqlresourceslistsqldatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlDatabasesSample.js +[sqlresourceslistsqlroleassignmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlRoleAssignmentsSample.js +[sqlresourceslistsqlroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlRoleDefinitionsSample.js +[sqlresourceslistsqlstoredproceduressample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlStoredProceduresSample.js +[sqlresourceslistsqltriggerssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlTriggersSample.js +[sqlresourceslistsqluserdefinedfunctionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlUserDefinedFunctionsSample.js +[sqlresourcesmigratesqlcontainertoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlContainerToAutoscaleSample.js +[sqlresourcesmigratesqlcontainertomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlContainerToManualThroughputSample.js +[sqlresourcesmigratesqldatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js +[sqlresourcesmigratesqldatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js +[sqlresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesRetrieveContinuousBackupInformationSample.js +[sqlresourcessqlcontainerredistributethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRedistributeThroughputSample.js +[sqlresourcessqlcontainerretrievethroughputdistributionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.js +[sqlresourcessqldatabasepartitionmergesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabasePartitionMergeSample.js +[sqlresourcessqldatabaseredistributethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRedistributeThroughputSample.js +[sqlresourcessqldatabaseretrievethroughputdistributionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.js +[sqlresourcesupdatesqlcontainerthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesUpdateSqlContainerThroughputSample.js +[sqlresourcesupdatesqldatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesUpdateSqlDatabaseThroughputSample.js +[tableresourcescreateupdatetableroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleAssignmentSample.js +[tableresourcescreateupdatetableroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleDefinitionSample.js +[tableresourcescreateupdatetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableSample.js +[tableresourcesdeletetableroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleAssignmentSample.js +[tableresourcesdeletetableroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleDefinitionSample.js +[tableresourcesdeletetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableSample.js +[tableresourcesgettableroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleAssignmentSample.js +[tableresourcesgettableroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleDefinitionSample.js +[tableresourcesgettablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableSample.js +[tableresourcesgettablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableThroughputSample.js +[tableresourceslisttableroleassignmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleAssignmentsSample.js +[tableresourceslisttableroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleDefinitionsSample.js +[tableresourceslisttablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTablesSample.js +[tableresourcesmigratetabletoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesMigrateTableToAutoscaleSample.js +[tableresourcesmigratetabletomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesMigrateTableToManualThroughputSample.js +[tableresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesRetrieveContinuousBackupInformationSample.js +[tableresourcesupdatetablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesUpdateTableThroughputSample.js +[throughputpoolaccountcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountCreateSample.js +[throughputpoolaccountdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountDeleteSample.js +[throughputpoolaccountgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountGetSample.js +[throughputpoolaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountsListSample.js +[throughputpoolcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolCreateOrUpdateSample.js +[throughputpooldeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolDeleteSample.js +[throughputpoolgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolGetSample.js +[throughputpoolupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolUpdateSample.js +[throughputpoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListByResourceGroupSample.js +[throughputpoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListSample.js +[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb/README.md diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersCreateUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersCreateUpdateSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersCreateUpdateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersCreateUpdateSample.js index b9fd3bf98cbe..6cbafba5e941 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersCreateUpdateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersCreateUpdateSample.js @@ -10,17 +10,17 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. * * @summary Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterCreate.json */ async function cosmosDbManagedCassandraClusterCreate() { const subscriptionId = - process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; const body = { diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersDeallocateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersDeallocateSample.js similarity index 88% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersDeallocateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersDeallocateSample.js index b7ada7bcf8ac..2361019c05d8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersDeallocateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersDeallocateSample.js @@ -10,17 +10,17 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. * * @summary Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDeallocate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDeallocate.json */ async function cosmosDbManagedCassandraClusterDeallocate() { const subscriptionId = - process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; const credential = new DefaultAzureCredential(); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersDeleteSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersDeleteSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersDeleteSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersDeleteSample.js index fdeb0a5f6047..586c04039edb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersDeleteSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersDeleteSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes a managed Cassandra cluster. * * @summary Deletes a managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDelete.json */ async function cosmosDbManagedCassandraClusterDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetBackupSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetBackupSample.js new file mode 100644 index 000000000000..aeecd2c2f81a --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetBackupSample.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Get the properties of an individual backup of this cluster that is available to restore. + * + * @summary Get the properties of an individual backup of this cluster that is available to restore. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackup.json + */ +async function cosmosDbManagedCassandraBackup() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const backupId = "1611250348"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraClusters.getBackup(resourceGroupName, clusterName, backupId); + console.log(result); +} + +async function main() { + cosmosDbManagedCassandraBackup(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetCommandAsyncSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetCommandAsyncSample.js new file mode 100644 index 000000000000..f6cc7b9e2b98 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetCommandAsyncSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Get details about a specified command that was run asynchronously. + * + * @summary Get details about a specified command that was run asynchronously. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandResult.json + */ +async function cosmosDbManagedCassandraCommandResult() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const commandId = "318653d0-3da5-4814-b8f6-429f2af0b2a4"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraClusters.getCommandAsync( + resourceGroupName, + clusterName, + commandId, + ); + console.log(result); +} + +async function main() { + cosmosDbManagedCassandraCommandResult(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersGetSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetSample.js index 3566f8c70cf6..bc372675e4a5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersGetSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersGetSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Get the properties of a managed Cassandra cluster. * * @summary Get the properties of a managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterGet.json */ async function cosmosDbManagedCassandraClusterGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersInvokeCommandAsyncSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersInvokeCommandAsyncSample.js new file mode 100644 index 000000000000..5bfd236a3d28 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersInvokeCommandAsyncSample.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Invoke a command like nodetool for cassandra maintenance asynchronously + * + * @summary Invoke a command like nodetool for cassandra maintenance asynchronously + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandAsync.json + */ +async function cosmosDbManagedCassandraCommandAsync() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const body = { + arguments: { status: "" }, + command: "nodetool", + host: "10.0.1.12", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraClusters.beginInvokeCommandAsyncAndWait( + resourceGroupName, + clusterName, + body, + ); + console.log(result); +} + +async function main() { + cosmosDbManagedCassandraCommandAsync(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersInvokeCommandSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersInvokeCommandSample.js similarity index 83% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersInvokeCommandSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersInvokeCommandSample.js index 30c74dfc0a81..94074755210f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersInvokeCommandSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersInvokeCommandSample.js @@ -10,21 +10,22 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Invoke a command like nodetool for cassandra maintenance * * @summary Invoke a command like nodetool for cassandra maintenance - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraCommand.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommand.json */ async function cosmosDbManagedCassandraCommand() { const subscriptionId = - process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; const body = { - command: "nodetool status", + arguments: { status: "" }, + command: "nodetool", host: "10.0.1.12", }; const credential = new DefaultAzureCredential(); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListBackupsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListBackupsSample.js new file mode 100644 index 000000000000..22d2c8081f5d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListBackupsSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to List the backups of this cluster that are available to restore. + * + * @summary List the backups of this cluster that are available to restore. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackupsList.json + */ +async function cosmosDbManagedCassandraBackupsList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cassandraClusters.listBackups(resourceGroupName, clusterName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbManagedCassandraBackupsList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersListByResourceGroupSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListByResourceGroupSample.js similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersListByResourceGroupSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListByResourceGroupSample.js index 03be7bb3238c..23ed8c642f22 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersListByResourceGroupSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListByResourceGroupSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List all managed Cassandra clusters in this resource group. * * @summary List all managed Cassandra clusters in this resource group. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json */ async function cosmosDbManagedCassandraClusterListByResourceGroup() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersListBySubscriptionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListBySubscriptionSample.js similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersListBySubscriptionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListBySubscriptionSample.js index 99fd406183cb..fed61defac12 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersListBySubscriptionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListBySubscriptionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List all managed Cassandra clusters in this subscription. * * @summary List all managed Cassandra clusters in this subscription. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListBySubscription.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListBySubscription.json */ async function cosmosDbManagedCassandraClusterListBySubscription() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListCommandSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListCommandSample.js new file mode 100644 index 000000000000..90f4a24f6199 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersListCommandSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to List all commands currently running on ring info + * + * @summary List all commands currently running on ring info + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraListCommand.json + */ +async function cosmosDbManagedCassandraListCommand() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cassandraClusters.listCommand(resourceGroupName, clusterName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbManagedCassandraListCommand(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersStartSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersStartSample.js similarity index 88% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersStartSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersStartSample.js index 8cee7e883ba3..89e4553c649d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersStartSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersStartSample.js @@ -10,17 +10,17 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. * * @summary Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterStart.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterStart.json */ async function cosmosDbManagedCassandraClusterStart() { const subscriptionId = - process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; const credential = new DefaultAzureCredential(); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersStatusSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersStatusSample.js similarity index 86% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersStatusSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersStatusSample.js index d423f93c98f0..c0d6a7231ec7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersStatusSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersStatusSample.js @@ -10,17 +10,17 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. * * @summary Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraStatus.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraStatus.json */ async function cosmosDbManagedCassandraStatus() { const subscriptionId = - process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; const credential = new DefaultAzureCredential(); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersUpdateSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersUpdateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersUpdateSample.js index 3e832bee71f6..02ed12fcdd98 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersUpdateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraClustersUpdateSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Updates some of the properties of a managed Cassandra cluster. * * @summary Updates some of the properties of a managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterPatch.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterPatch.json */ async function cosmosDbManagedCassandraClusterPatch() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersCreateUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersCreateUpdateSample.js similarity index 94% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersCreateUpdateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersCreateUpdateSample.js index 8c2cc790ffef..2705bc688d11 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersCreateUpdateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersCreateUpdateSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. * * @summary Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterCreate.json */ async function cosmosDbManagedCassandraDataCenterCreate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersDeleteSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersDeleteSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersDeleteSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersDeleteSample.js index 92ed4b1fddba..a29ba38b9e15 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersDeleteSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersDeleteSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Delete a managed Cassandra data center. * * @summary Delete a managed Cassandra data center. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterDelete.json */ async function cosmosDbManagedCassandraDataCenterDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersGetSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersGetSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersGetSample.js index becaeb9348b8..7b0486f9aab5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersGetSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersGetSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Get the properties of a managed Cassandra data center. * * @summary Get the properties of a managed Cassandra data center. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterGet.json */ async function cosmosDbManagedCassandraDataCenterGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersListSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersListSample.js index eadfb139da3c..9a53a7cd5f7e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List all data centers in a particular managed Cassandra cluster. * * @summary List all data centers in a particular managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterList.json */ async function cosmosDbManagedCassandraDataCenterList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersUpdateSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersUpdateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersUpdateSample.js index 14a98fdf2a5d..a5b72e52281a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersUpdateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraDataCentersUpdateSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update some of the properties of a managed Cassandra data center. * * @summary Update some of the properties of a managed Cassandra data center. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterPatch.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterPatch.json */ async function cosmosDbManagedCassandraDataCenterUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesCreateUpdateCassandraKeyspaceSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraKeyspaceSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesCreateUpdateCassandraKeyspaceSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraKeyspaceSample.js index 75c872a1fd63..f5602c677470 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesCreateUpdateCassandraKeyspaceSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraKeyspaceSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update an Azure Cosmos DB Cassandra keyspace * * @summary Create or update an Azure Cosmos DB Cassandra keyspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceCreateUpdate.json */ async function cosmosDbCassandraKeyspaceCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesCreateUpdateCassandraTableSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraTableSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesCreateUpdateCassandraTableSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraTableSample.js index 7572b969c298..01e8c44a81b1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesCreateUpdateCassandraTableSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraTableSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update an Azure Cosmos DB Cassandra Table * * @summary Create or update an Azure Cosmos DB Cassandra Table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableCreateUpdate.json */ async function cosmosDbCassandraTableCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -33,6 +33,7 @@ async function cosmosDbCassandraTableCreateUpdate() { columns: [{ name: "columnA", type: "Ascii" }], partitionKeys: [{ name: "columnA" }], }, + analyticalStorageTtl: 500, defaultTtl: 100, id: "tableName", }, diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraViewSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraViewSample.js new file mode 100644 index 000000000000..6dca97ad3950 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesCreateUpdateCassandraViewSample.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB Cassandra View + * + * @summary Create or update an Azure Cosmos DB Cassandra View + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewCreateUpdate.json + */ +async function cosmosDbCassandraViewCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const createUpdateCassandraViewParameters = { + options: {}, + resource: { + id: "viewname", + viewDefinition: + "SELECT columna, columnb, columnc FROM keyspacename.srctablename WHERE columna IS NOT NULL AND columnc IS NOT NULL PRIMARY (columnc, columna)", + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.beginCreateUpdateCassandraViewAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesDeleteCassandraKeyspaceSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraKeyspaceSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesDeleteCassandraKeyspaceSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraKeyspaceSample.js index 6f047987ac1e..7746cb2ecca8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesDeleteCassandraKeyspaceSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraKeyspaceSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Cassandra keyspace. * * @summary Deletes an existing Azure Cosmos DB Cassandra keyspace. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceDelete.json */ async function cosmosDbCassandraKeyspaceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesDeleteCassandraTableSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraTableSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesDeleteCassandraTableSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraTableSample.js index 90e0557713e9..6effd6ebdce1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesDeleteCassandraTableSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraTableSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Cassandra table. * * @summary Deletes an existing Azure Cosmos DB Cassandra table. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableDelete.json */ async function cosmosDbCassandraTableDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraViewSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraViewSample.js new file mode 100644 index 000000000000..0b8358701b9a --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesDeleteCassandraViewSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Cassandra view. + * + * @summary Deletes an existing Azure Cosmos DB Cassandra view. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewDelete.json + */ +async function cosmosDbCassandraViewDelete() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.beginDeleteCassandraViewAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraKeyspaceSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraKeyspaceSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraKeyspaceSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraKeyspaceSample.js index 98e2fc5c2414..c1a87bcd7d80 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraKeyspaceSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraKeyspaceSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceGet.json */ async function cosmosDbCassandraKeyspaceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraKeyspaceThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraKeyspaceThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraKeyspaceThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraKeyspaceThroughputSample.js index b4c8bc3fb92f..4603bd2481d3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraKeyspaceThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraKeyspaceThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputGet.json */ async function cosmosDbCassandraKeyspaceThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraTableSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraTableSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraTableSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraTableSample.js index 09b1283dbf61..e164bff1374e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraTableSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraTableSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the Cassandra table under an existing Azure Cosmos DB database account. * * @summary Gets the Cassandra table under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableGet.json */ async function cosmosDbCassandraTableGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraTableThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraTableThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraTableThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraTableThroughputSample.js index dc70546f10bf..05eecb07404e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraTableThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraTableThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputGet.json */ async function cosmosDbCassandraTableThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewSample.js new file mode 100644 index 000000000000..6cc1c04cf897 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Gets the Cassandra view under an existing Azure Cosmos DB database account. + * + * @summary Gets the Cassandra view under an existing Azure Cosmos DB database account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewGet.json + */ +async function cosmosDbCassandraViewGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.getCassandraView( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewThroughputSample.js new file mode 100644 index 000000000000..c4159ec8453c --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesGetCassandraViewThroughputSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. + * + * @summary Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputGet.json + */ +async function cosmosDbCassandraViewThroughputGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.getCassandraViewThroughput( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewThroughputGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesListCassandraKeyspacesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraKeyspacesSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesListCassandraKeyspacesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraKeyspacesSample.js index 2a3b276b60d4..4eb40b44a809 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesListCassandraKeyspacesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraKeyspacesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. * * @summary Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceList.json */ async function cosmosDbCassandraKeyspaceList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesListCassandraTablesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraTablesSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesListCassandraTablesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraTablesSample.js index 56032010ba7e..9d9187d69543 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesListCassandraTablesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraTablesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the Cassandra table under an existing Azure Cosmos DB database account. * * @summary Lists the Cassandra table under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableList.json */ async function cosmosDbCassandraTableList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraViewsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraViewsSample.js new file mode 100644 index 000000000000..227caab0fd93 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesListCassandraViewsSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * + * @summary Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewList.json + */ +async function cosmosDbCassandraViewList() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cassandraResources.listCassandraViews( + resourceGroupName, + accountName, + keyspaceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbCassandraViewList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js index 188d47c3e3f6..fe1547b16d8d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json */ async function cosmosDbCassandraKeyspaceMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js index a90830bb40bc..73731dd98b5b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json */ async function cosmosDbCassandraKeyspaceMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraTableToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraTableToAutoscaleSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraTableToAutoscaleSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraTableToAutoscaleSample.js index 8cf37c1ccbd0..23f2b37aecbf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraTableToAutoscaleSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraTableToAutoscaleSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToAutoscale.json */ async function cosmosDbCassandraTableMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraTableToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraTableToManualThroughputSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraTableToManualThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraTableToManualThroughputSample.js index 2fb2d22f9345..084a6da18313 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraTableToManualThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraTableToManualThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToManualThroughput.json */ async function cosmosDbCassandraTableMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToAutoscaleSample.js new file mode 100644 index 000000000000..f6685caa48da --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToAutoscaleSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * + * @summary Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.json + */ +async function cosmosDbCassandraViewMigrateToAutoscale() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.beginMigrateCassandraViewToAutoscaleAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewMigrateToAutoscale(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToManualThroughputSample.js new file mode 100644 index 000000000000..133b04fab9a5 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesMigrateCassandraViewToManualThroughputSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * + * @summary Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.json + */ +async function cosmosDbCassandraViewMigrateToManualThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.beginMigrateCassandraViewToManualThroughputAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewMigrateToManualThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js index 4df94f50fe18..5ba9f3e5ce1a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Cassandra Keyspace * * @summary Update RUs per second of an Azure Cosmos DB Cassandra Keyspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json */ async function cosmosDbCassandraKeyspaceThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesUpdateCassandraTableThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraTableThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesUpdateCassandraTableThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraTableThroughputSample.js index ddc84da0b7bd..dfa669e4c491 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesUpdateCassandraTableThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraTableThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Cassandra table * * @summary Update RUs per second of an Azure Cosmos DB Cassandra table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputUpdate.json */ async function cosmosDbCassandraTableThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraViewThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraViewThroughputSample.js new file mode 100644 index 000000000000..a3d6b822e84a --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/cassandraResourcesUpdateCassandraViewThroughputSample.js @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Cassandra view + * + * @summary Update RUs per second of an Azure Cosmos DB Cassandra view + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputUpdate.json + */ +async function cosmosDbCassandraViewThroughputUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const updateThroughputParameters = { + resource: { throughput: 400 }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.beginUpdateCassandraViewThroughputAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewThroughputUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultEnableDisableSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultEnableDisableSample.js new file mode 100644 index 000000000000..af3e49a33865 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultEnableDisableSample.js @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Enable, disable Chaos Fault in a CosmosDB account. + * + * @summary Enable, disable Chaos Fault in a CosmosDB account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultEnableDisable.json + */ +async function chaosFaultEnableDisable() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const chaosFault = "ServiceUnavailability"; + const chaosFaultRequest = { + action: "Enable", + containerName: "testCollection", + databaseName: "testDatabase", + region: "EastUS", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.chaosFault.beginEnableDisableAndWait( + resourceGroupName, + accountName, + chaosFault, + chaosFaultRequest, + ); + console.log(result); +} + +async function main() { + chaosFaultEnableDisable(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultGetSample.js new file mode 100644 index 000000000000..36925c68c9ee --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultGetSample.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * + * @summary Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultGet.json + */ +async function chaosFaultGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const chaosFault = "ServiceUnavailability"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.chaosFault.get(resourceGroupName, accountName, chaosFault); + console.log(result); +} + +async function main() { + chaosFaultGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultListSample.js new file mode 100644 index 000000000000..81e4afda8247 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/chaosFaultListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to List Chaos Faults for CosmosDB account. + * + * @summary List Chaos Faults for CosmosDB account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultList.json + */ +async function chaosFaultList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.chaosFault.list(resourceGroupName, accountName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + chaosFaultList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListMetricDefinitionsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListMetricDefinitionsSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListMetricDefinitionsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListMetricDefinitionsSample.js index 4c7ac855a649..73aeeb568158 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListMetricDefinitionsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListMetricDefinitionsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves metric definitions for the given collection. * * @summary Retrieves metric definitions for the given collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetricDefinitions.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetricDefinitions.json */ async function cosmosDbCollectionGetMetricDefinitions() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListMetricsSample.js index bc2c1612c4f0..8714948cd16a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account and collection. * * @summary Retrieves the metrics determined by the given filter for the given database account and collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetrics.json */ async function cosmosDbCollectionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListUsagesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListUsagesSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListUsagesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListUsagesSample.js index 57ac3cd4bfe9..a82f6bee6885 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListUsagesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionListUsagesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the usages (most recent storage data) for the given collection. * * @summary Retrieves the usages (most recent storage data) for the given collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetUsages.json */ async function cosmosDbCollectionGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionListMetricsSample.js index 4dcb270f8b6c..7b0c993581fc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given collection, split by partition. * * @summary Retrieves the metrics determined by the given filter for the given collection, split by partition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionListUsagesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionListUsagesSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionListUsagesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionListUsagesSample.js index a4d77dd966fa..1558088c4d49 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionListUsagesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionListUsagesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the usages (most recent storage data) for the given collection, split by partition. * * @summary Retrieves the usages (most recent storage data) for the given collection, split by partition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetUsages.json */ async function cosmosDbCollectionGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionRegionListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionRegionListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionRegionListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionRegionListMetricsSample.js index 935206c99c42..684f273b1a69 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionRegionListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionPartitionRegionListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given collection and region, split by partition. * * @summary Retrieves the metrics determined by the given filter for the given collection and region, split by partition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionRegionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionRegionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionRegionListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionRegionListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionRegionListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionRegionListMetricsSample.js index c1f64fb6f1c2..a636f928c4d1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionRegionListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/collectionRegionListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account, collection and region. * * @summary Retrieves the metrics determined by the given filter for the given database account, collection and region. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRegionCollectionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRegionCollectionGetMetrics.json */ async function cosmosDbRegionCollectionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCancelSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCancelSample.js new file mode 100644 index 000000000000..20128e8a854d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCancelSample.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Cancels a Data Transfer Job. + * + * @summary Cancels a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCancel.json + */ +async function cosmosDbDataTransferJobCancel() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.cancel(resourceGroupName, accountName, jobName); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobCancel(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCompleteSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCompleteSample.js new file mode 100644 index 000000000000..efbb3ea56d91 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCompleteSample.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Completes a Data Transfer Online Job. + * + * @summary Completes a Data Transfer Online Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobComplete.json + */ +async function cosmosDbDataTransferJobComplete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "e35cc6eb-c8e3-447b-8de6-b83328cd0098"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.complete(resourceGroupName, accountName, jobName); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobComplete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCreateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCreateSample.js new file mode 100644 index 000000000000..f259d7471591 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsCreateSample.js @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Creates a Data Transfer Job. + * + * @summary Creates a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCreate.json + */ +async function cosmosDbDataTransferJobCreate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const jobCreateParameters = { + properties: { + destination: { + component: "AzureBlobStorage", + containerName: "blob_container", + endpointUrl: "https://blob.windows.net", + }, + source: { + component: "CosmosDBCassandra", + keyspaceName: "keyspace", + tableName: "table", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.create( + resourceGroupName, + accountName, + jobName, + jobCreateParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobCreate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsGetSample.js new file mode 100644 index 000000000000..da3e92ee839c --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsGetSample.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Get a Data Transfer Job. + * + * @summary Get a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobGet.json + */ +async function cosmosDbDataTransferJobGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.get(resourceGroupName, accountName, jobName); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsListByDatabaseAccountSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsListByDatabaseAccountSample.js new file mode 100644 index 000000000000..cc8ae47a8c76 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsListByDatabaseAccountSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Get a list of Data Transfer jobs. + * + * @summary Get a list of Data Transfer jobs. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobFeed.json + */ +async function cosmosDbDataTransferJobFeed() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataTransferJobs.listByDatabaseAccount( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbDataTransferJobFeed(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsPauseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsPauseSample.js new file mode 100644 index 000000000000..b8ec2ad887c3 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsPauseSample.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Pause a Data Transfer Job. + * + * @summary Pause a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobPause.json + */ +async function cosmosDbDataTransferJobPause() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.pause(resourceGroupName, accountName, jobName); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobPause(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsResumeSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsResumeSample.js new file mode 100644 index 000000000000..1a482c71f5be --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/dataTransferJobsResumeSample.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Resumes a Data Transfer Job. + * + * @summary Resumes a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobResume.json + */ +async function cosmosDbDataTransferJobResume() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.resume(resourceGroupName, accountName, jobName); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobResume(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountRegionListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountRegionListMetricsSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountRegionListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountRegionListMetricsSample.js index dddb22d2e741..42ea940bf34d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountRegionListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountRegionListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account and region. * * @summary Retrieves the metrics determined by the given filter for the given database account and region. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsCheckNameExistsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsCheckNameExistsSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsCheckNameExistsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsCheckNameExistsSample.js index a67689832f97..36f30ab019c9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsCheckNameExistsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsCheckNameExistsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. * * @summary Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCheckNameExists.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCheckNameExists.json */ async function cosmosDbDatabaseAccountCheckNameExists() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsCreateOrUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsCreateOrUpdateSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsCreateOrUpdateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsCreateOrUpdateSample.js index 51cfc4b060ec..958a10cd2dbb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsCreateOrUpdateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsCreateOrUpdateSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. * * @summary Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCreateMax.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCreateMax.json */ async function cosmosDbDatabaseAccountCreateMax() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -34,6 +34,7 @@ async function cosmosDbDatabaseAccountCreateMax() { }, }, capacity: { totalThroughputLimit: 2000 }, + capacityMode: "Provisioned", consistencyPolicy: { defaultConsistencyLevel: "BoundedStaleness", maxIntervalInSeconds: 10, @@ -43,10 +44,13 @@ async function cosmosDbDatabaseAccountCreateMax() { createMode: "Default", databaseAccountOfferType: "Standard", defaultIdentity: "FirstPartyIdentity", + defaultPriorityLevel: "Low", enableAnalyticalStorage: true, enableBurstCapacity: true, enableFreeTier: false, + enableMaterializedViews: false, enablePerRegionPerPartitionAutoscale: true, + enablePriorityBasedExecution: true, identity: { type: "SystemAssigned,UserAssigned", userAssignedIdentities: { @@ -95,7 +99,7 @@ async function cosmosDbDatabaseAccountCreateMax() { * This sample demonstrates how to Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. * * @summary Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCreateMin.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCreateMin.json */ async function cosmosDbDatabaseAccountCreateMin() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -127,7 +131,7 @@ async function cosmosDbDatabaseAccountCreateMin() { * This sample demonstrates how to Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. * * @summary Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json */ async function cosmosDbRestoreDatabaseAccountCreateUpdateJson() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -148,6 +152,7 @@ async function cosmosDbRestoreDatabaseAccountCreateUpdateJson() { databaseAccountOfferType: "Standard", enableAnalyticalStorage: true, enableFreeTier: false, + enableMaterializedViews: false, keyVaultKeyUri: "https://myKeyVault.vault.azure.net", kind: "GlobalDocumentDB", location: "westus", @@ -175,6 +180,7 @@ async function cosmosDbRestoreDatabaseAccountCreateUpdateJson() { "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1a97b4bb-f6a0-430e-ade1-638d781830cc", restoreTimestampInUtc: new Date("2021-03-11T22:05:09Z"), restoreWithTtlDisabled: false, + sourceBackupLocation: "westus", }, tags: {}, }; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsDeleteSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsDeleteSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsDeleteSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsDeleteSample.js index 5eec7aaca868..60f058c3817f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsDeleteSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsDeleteSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB database account. * * @summary Deletes an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountDelete.json */ async function cosmosDbDatabaseAccountDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsFailoverPriorityChangeSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsFailoverPriorityChangeSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsFailoverPriorityChangeSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsFailoverPriorityChangeSample.js index e03b58f1a047..97c8a6bcc513 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsFailoverPriorityChangeSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsFailoverPriorityChangeSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. * * @summary Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json */ async function cosmosDbDatabaseAccountFailoverPriorityChange() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsGetReadOnlyKeysSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsGetReadOnlyKeysSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsGetReadOnlyKeysSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsGetReadOnlyKeysSample.js index 7ed19166ab2f..a0bf63364b18 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsGetReadOnlyKeysSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsGetReadOnlyKeysSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the read-only access keys for the specified Azure Cosmos DB database account. * * @summary Lists the read-only access keys for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json */ async function cosmosDbDatabaseAccountListReadOnlyKeys() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsGetSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsGetSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsGetSample.js index bc52be9e90cd..13321e50bfda 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsGetSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsGetSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB database account. * * @summary Retrieves the properties of an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGet.json */ async function cosmosDbDatabaseAccountGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListByResourceGroupSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListByResourceGroupSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListByResourceGroupSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListByResourceGroupSample.js index 6604863eba9f..c01e7e93f3ea 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListByResourceGroupSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListByResourceGroupSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all the Azure Cosmos DB database accounts available under the given resource group. * * @summary Lists all the Azure Cosmos DB database accounts available under the given resource group. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListByResourceGroup.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListByResourceGroup.json */ async function cosmosDbDatabaseAccountListByResourceGroup() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListConnectionStringsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListConnectionStringsSample.js similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListConnectionStringsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListConnectionStringsSample.js index 486628d9f778..57032fbb6d70 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListConnectionStringsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListConnectionStringsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the connection strings for the specified Azure Cosmos DB database account. * * @summary Lists the connection strings for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListConnectionStrings.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListConnectionStrings.json */ async function cosmosDbDatabaseAccountListConnectionStrings() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -35,7 +35,7 @@ async function cosmosDbDatabaseAccountListConnectionStrings() { * This sample demonstrates how to Lists the connection strings for the specified Azure Cosmos DB database account. * * @summary Lists the connection strings for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json */ async function cosmosDbDatabaseAccountListConnectionStringsMongo() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListKeysSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListKeysSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListKeysSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListKeysSample.js index 9eba471449e5..55a505301cf6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListKeysSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListKeysSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the access keys for the specified Azure Cosmos DB database account. * * @summary Lists the access keys for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListKeys.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListKeys.json */ async function cosmosDbDatabaseAccountListKeys() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListMetricDefinitionsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListMetricDefinitionsSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListMetricDefinitionsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListMetricDefinitionsSample.js index 3a8933cc23d6..56201d655130 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListMetricDefinitionsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListMetricDefinitionsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves metric definitions for the given database account. * * @summary Retrieves metric definitions for the given database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json */ async function cosmosDbDatabaseAccountGetMetricDefinitions() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListMetricsSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListMetricsSample.js index ed94f5fddfd4..7eb52e6ad474 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account. * * @summary Retrieves the metrics determined by the given filter for the given database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetrics.json */ async function cosmosDbDatabaseAccountGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListReadOnlyKeysSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListReadOnlyKeysSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListReadOnlyKeysSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListReadOnlyKeysSample.js index 0a07d7188641..05a73820466f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListReadOnlyKeysSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListReadOnlyKeysSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the read-only access keys for the specified Azure Cosmos DB database account. * * @summary Lists the read-only access keys for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json */ async function cosmosDbDatabaseAccountListReadOnlyKeys() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListSample.js index 3d35a656a638..60c69f7bc282 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all the Azure Cosmos DB database accounts available under the subscription. * * @summary Lists all the Azure Cosmos DB database accounts available under the subscription. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountList.json */ async function cosmosDbDatabaseAccountList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListUsagesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListUsagesSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListUsagesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListUsagesSample.js index ce296c465d90..256f4231ac7c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListUsagesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsListUsagesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the usages (most recent data) for the given database account. * * @summary Retrieves the usages (most recent data) for the given database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetUsages.json */ async function cosmosDbDatabaseAccountGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsOfflineRegionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsOfflineRegionSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsOfflineRegionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsOfflineRegionSample.js index c3542abbe5e7..72b8d7039845 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsOfflineRegionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsOfflineRegionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Offline the specified region for the specified Azure Cosmos DB database account. * * @summary Offline the specified region for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOfflineRegion.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOfflineRegion.json */ async function cosmosDbDatabaseAccountOfflineRegion() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsOnlineRegionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsOnlineRegionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsOnlineRegionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsOnlineRegionSample.js index 2c5565f9d774..5bd874f7512d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsOnlineRegionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsOnlineRegionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Online the specified region for the specified Azure Cosmos DB database account. * * @summary Online the specified region for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOnlineRegion.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOnlineRegion.json */ async function cosmosDbDatabaseAccountOnlineRegion() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsRegenerateKeySample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsRegenerateKeySample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsRegenerateKeySample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsRegenerateKeySample.js index ad241fc09daa..836004bec25f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsRegenerateKeySample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsRegenerateKeySample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Regenerates an access key for the specified Azure Cosmos DB database account. * * @summary Regenerates an access key for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegenerateKey.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegenerateKey.json */ async function cosmosDbDatabaseAccountRegenerateKey() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsUpdateSample.js similarity index 89% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsUpdateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsUpdateSample.js index 0a00976fa205..8f893d206049 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsUpdateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseAccountsUpdateSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Updates the properties of an existing Azure Cosmos DB database account. * * @summary Updates the properties of an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountPatch.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountPatch.json */ async function cosmosDbDatabaseAccountPatch() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -29,21 +29,25 @@ async function cosmosDbDatabaseAccountPatch() { periodicModeProperties: { backupIntervalInMinutes: 240, backupRetentionIntervalInHours: 720, - backupStorageRedundancy: "Local", + backupStorageRedundancy: "Geo", }, }, capacity: { totalThroughputLimit: 2000 }, + capacityMode: "Provisioned", consistencyPolicy: { defaultConsistencyLevel: "BoundedStaleness", maxIntervalInSeconds: 10, maxStalenessPrefix: 200, }, defaultIdentity: "FirstPartyIdentity", + defaultPriorityLevel: "Low", + diagnosticLogSettings: { enableFullTextQuery: "True" }, enableAnalyticalStorage: true, enableBurstCapacity: true, enableFreeTier: false, enablePartitionMerge: true, enablePerRegionPerPartitionAutoscale: true, + enablePriorityBasedExecution: true, identity: { type: "SystemAssigned,UserAssigned", userAssignedIdentities: { diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListMetricDefinitionsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListMetricDefinitionsSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListMetricDefinitionsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListMetricDefinitionsSample.js index b1afc78064f6..0b497d2a9f1b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListMetricDefinitionsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListMetricDefinitionsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves metric definitions for the given database. * * @summary Retrieves metric definitions for the given database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetricDefinitions.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetricDefinitions.json */ async function cosmosDbDatabaseGetMetricDefinitions() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListMetricsSample.js index 3f43a4147c5e..bb3b0cefa93b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account and database. * * @summary Retrieves the metrics determined by the given filter for the given database account and database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetrics.json */ async function cosmosDbDatabaseGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListUsagesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListUsagesSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListUsagesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListUsagesSample.js index 14fc2168d90f..ecb4d6c2b088 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListUsagesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/databaseListUsagesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the usages (most recent data) for the given database. * * @summary Retrieves the usages (most recent data) for the given database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetUsages.json */ async function cosmosDbDatabaseGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesCreateUpdateGraphSample.js similarity index 66% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesCreateUpdateGraphSample.js index 8669e8137620..95d37d93ef28 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesCreateUpdateGraphSample.js @@ -10,38 +10,38 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** - * This sample demonstrates how to Create or update an Azure Cosmos DB SQL database + * This sample demonstrates how to Create or update an Azure Cosmos DB Graph. * - * @summary Create or update an Azure Cosmos DB SQL database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseCreateUpdate.json + * @summary Create or update an Azure Cosmos DB Graph. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceCreateUpdate.json */ -async function cosmosDbSqlDatabaseCreateUpdate() { +async function cosmosDbGraphCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; const accountName = "ddb1"; - const databaseName = "databaseName"; - const createUpdateSqlDatabaseParameters = { + const graphName = "graphName"; + const createUpdateGraphParameters = { location: "West US", options: {}, - resource: { id: "databaseName" }, + resource: { id: "graphName" }, tags: {}, }; const credential = new DefaultAzureCredential(); const client = new CosmosDBManagementClient(credential, subscriptionId); - const result = await client.sqlResources.beginCreateUpdateSqlDatabaseAndWait( + const result = await client.graphResources.beginCreateUpdateGraphAndWait( resourceGroupName, accountName, - databaseName, - createUpdateSqlDatabaseParameters, + graphName, + createUpdateGraphParameters, ); console.log(result); } async function main() { - cosmosDbSqlDatabaseCreateUpdate(); + cosmosDbGraphCreateUpdate(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesDeleteGraphResourceSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesDeleteGraphResourceSample.js new file mode 100644 index 000000000000..bbbee1260e4d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesDeleteGraphResourceSample.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Graph Resource. + * + * @summary Deletes an existing Azure Cosmos DB Graph Resource. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceDelete.json + */ +async function cosmosDbSqlDatabaseDelete() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const graphName = "graphName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.graphResources.beginDeleteGraphResourceAndWait( + resourceGroupName, + accountName, + graphName, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesGetGraphSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesGetGraphSample.js new file mode 100644 index 000000000000..f46cc313de1d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesGetGraphSample.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * + * @summary Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceGet.json + */ +async function cosmosDbSqlDatabaseGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const graphName = "graphName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.graphResources.getGraph(resourceGroupName, accountName, graphName); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesListGraphsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesListGraphsSample.js new file mode 100644 index 000000000000..6bcd5abffba9 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/graphResourcesListGraphsSample.js @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Lists the graphs under an existing Azure Cosmos DB database account. + * + * @summary Lists the graphs under an existing Azure Cosmos DB database account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceList.json + */ +async function cosmosDbSqlDatabaseList() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.graphResources.listGraphs(resourceGroupName, accountName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbSqlDatabaseList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesCreateUpdateGremlinDatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesCreateUpdateGremlinDatabaseSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesCreateUpdateGremlinDatabaseSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesCreateUpdateGremlinDatabaseSample.js index f108fd6366a5..d5565d88ba79 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesCreateUpdateGremlinDatabaseSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesCreateUpdateGremlinDatabaseSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update an Azure Cosmos DB Gremlin database * * @summary Create or update an Azure Cosmos DB Gremlin database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseCreateUpdate.json */ async function cosmosDbGremlinDatabaseCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesCreateUpdateGremlinGraphSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesCreateUpdateGremlinGraphSample.js similarity index 94% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesCreateUpdateGremlinGraphSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesCreateUpdateGremlinGraphSample.js index 18076e859b7d..cfe7bf6aafef 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesCreateUpdateGremlinGraphSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesCreateUpdateGremlinGraphSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update an Azure Cosmos DB Gremlin graph * * @summary Create or update an Azure Cosmos DB Gremlin graph - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphCreateUpdate.json */ async function cosmosDbGremlinGraphCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesDeleteGremlinDatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesDeleteGremlinDatabaseSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesDeleteGremlinDatabaseSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesDeleteGremlinDatabaseSample.js index f55b844e37cd..26a5ee087a9f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesDeleteGremlinDatabaseSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesDeleteGremlinDatabaseSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Gremlin database. * * @summary Deletes an existing Azure Cosmos DB Gremlin database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseDelete.json */ async function cosmosDbGremlinDatabaseDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesDeleteGremlinGraphSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesDeleteGremlinGraphSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesDeleteGremlinGraphSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesDeleteGremlinGraphSample.js index 7e70a4586b00..a0a4a9a1f0fa 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesDeleteGremlinGraphSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesDeleteGremlinGraphSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Gremlin graph. * * @summary Deletes an existing Azure Cosmos DB Gremlin graph. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphDelete.json */ async function cosmosDbGremlinGraphDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinDatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinDatabaseSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinDatabaseSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinDatabaseSample.js index 7c74817f39b9..b106070b3924 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinDatabaseSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinDatabaseSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseGet.json */ async function cosmosDbGremlinDatabaseGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinDatabaseThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinDatabaseThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinDatabaseThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinDatabaseThroughputSample.js index 18a1ad773fcd..e07be0ffeee6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinDatabaseThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinDatabaseThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputGet.json */ async function cosmosDbGremlinDatabaseThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinGraphSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinGraphSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinGraphSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinGraphSample.js index 3349f7dbb8c8..5e0a78080e03 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinGraphSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinGraphSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the Gremlin graph under an existing Azure Cosmos DB database account. * * @summary Gets the Gremlin graph under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphGet.json */ async function cosmosDbGremlinGraphGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinGraphThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinGraphThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinGraphThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinGraphThroughputSample.js index 86a75584baf7..7c0d94263388 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinGraphThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesGetGremlinGraphThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputGet.json */ async function cosmosDbGremlinGraphThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesListGremlinDatabasesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesListGremlinDatabasesSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesListGremlinDatabasesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesListGremlinDatabasesSample.js index 9264558c56b7..c179708b1198 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesListGremlinDatabasesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesListGremlinDatabasesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the Gremlin databases under an existing Azure Cosmos DB database account. * * @summary Lists the Gremlin databases under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseList.json */ async function cosmosDbGremlinDatabaseList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesListGremlinGraphsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesListGremlinGraphsSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesListGremlinGraphsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesListGremlinGraphsSample.js index 7f1c5ab7f880..562ae12e8909 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesListGremlinGraphsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesListGremlinGraphsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the Gremlin graph under an existing Azure Cosmos DB database account. * * @summary Lists the Gremlin graph under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphList.json */ async function cosmosDbGremlinGraphList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js index 7219ffe3fc9f..8397cc4b18f6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json */ async function cosmosDbGremlinDatabaseMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js index 316330a34e53..045ad59d0c2a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json */ async function cosmosDbGremlinDatabaseMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js index d0e478238f72..5efdb3a74ea4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToAutoscale.json */ async function cosmosDbGremlinGraphMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js index 539c09c4ef4a..c48bf94d9c27 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json */ async function cosmosDbGremlinGraphMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesRetrieveContinuousBackupInformationSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesRetrieveContinuousBackupInformationSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesRetrieveContinuousBackupInformationSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesRetrieveContinuousBackupInformationSample.js index db0a3108b677..0b523a3dc24b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesRetrieveContinuousBackupInformationSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesRetrieveContinuousBackupInformationSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves continuous backup information for a gremlin graph. * * @summary Retrieves continuous backup information for a gremlin graph. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphBackupInformation.json */ async function cosmosDbGremlinGraphBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesUpdateGremlinDatabaseThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesUpdateGremlinDatabaseThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesUpdateGremlinDatabaseThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesUpdateGremlinDatabaseThroughputSample.js index a71d570d0341..ab8795eed207 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesUpdateGremlinDatabaseThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesUpdateGremlinDatabaseThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Gremlin database * * @summary Update RUs per second of an Azure Cosmos DB Gremlin database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputUpdate.json */ async function cosmosDbGremlinDatabaseThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesUpdateGremlinGraphThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesUpdateGremlinGraphThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesUpdateGremlinGraphThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesUpdateGremlinGraphThroughputSample.js index 2555ace08cf6..ab1d95054cd6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesUpdateGremlinGraphThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/gremlinResourcesUpdateGremlinGraphThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Gremlin graph * * @summary Update RUs per second of an Azure Cosmos DB Gremlin graph - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputUpdate.json */ async function cosmosDbGremlinGraphThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/locationsGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/locationsGetSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/locationsGetSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/locationsGetSample.js index 590eb249205e..c51ba01f03d8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/locationsGetSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/locationsGetSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Get the properties of an existing Cosmos DB location * * @summary Get the properties of an existing Cosmos DB location - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationGet.json */ async function cosmosDbLocationGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/locationsListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/locationsListSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/locationsListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/locationsListSample.js index 471d4b9efee6..a0840725df04 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/locationsListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/locationsListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List Cosmos DB locations and their properties * * @summary List Cosmos DB locations and their properties - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationList.json */ async function cosmosDbLocationList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js new file mode 100644 index 000000000000..11a745354d7e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js @@ -0,0 +1,100 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB MongoDB Collection + * + * @summary Create or update an Azure Cosmos DB MongoDB Collection + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionCreateUpdate.json + */ +async function cosmosDbMongoDbcollectionCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const createUpdateMongoDBCollectionParameters = { + location: "West US", + options: {}, + resource: { + analyticalStorageTtl: 500, + id: "collectionName", + indexes: [ + { + key: { keys: ["_ts"] }, + options: { expireAfterSeconds: 100, unique: true }, + }, + { key: { keys: ["_id"] } }, + ], + shardKey: { testKey: "Hash" }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.mongoDBResources.beginCreateUpdateMongoDBCollectionAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + createUpdateMongoDBCollectionParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB MongoDB Collection + * + * @summary Create or update an Azure Cosmos DB MongoDB Collection + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRestore.json + */ +async function cosmosDbMongoDbcollectionRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const createUpdateMongoDBCollectionParameters = { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "collectionName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: false, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.mongoDBResources.beginCreateUpdateMongoDBCollectionAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + createUpdateMongoDBCollectionParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbcollectionCreateUpdate(); + cosmosDbMongoDbcollectionRestore(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js new file mode 100644 index 000000000000..eb435883f72f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Create or updates Azure Cosmos DB MongoDB database + * + * @summary Create or updates Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseCreateUpdate.json + */ +async function cosmosDbMongoDbdatabaseCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateMongoDBDatabaseParameters = { + location: "West US", + options: {}, + resource: { id: "databaseName" }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.mongoDBResources.beginCreateUpdateMongoDBDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateMongoDBDatabaseParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or updates Azure Cosmos DB MongoDB database + * + * @summary Create or updates Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRestore.json + */ +async function cosmosDbMongoDbdatabaseRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateMongoDBDatabaseParameters = { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "databaseName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: false, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.mongoDBResources.beginCreateUpdateMongoDBDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateMongoDBDatabaseParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabaseCreateUpdate(); + cosmosDbMongoDbdatabaseRestore(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js index 155ac2841980..a94ccd9748f7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB Mongo Role Definition. * * @summary Creates or updates an Azure Cosmos DB Mongo Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json */ async function cosmosDbMongoDbroleDefinitionCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js index 1e58ef79efa8..48c5499d0d2e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB Mongo User Definition. * * @summary Creates or updates an Azure Cosmos DB Mongo User Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json */ async function cosmosDbMongoDbuserDefinitionCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoDbcollectionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoDbcollectionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoDbcollectionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoDbcollectionSample.js index c7ccec5db59c..74a0415c7acb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoDbcollectionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoDbcollectionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB MongoDB Collection. * * @summary Deletes an existing Azure Cosmos DB MongoDB Collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionDelete.json */ async function cosmosDbMongoDbcollectionDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoDbdatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoDbdatabaseSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoDbdatabaseSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoDbdatabaseSample.js index 7a69cbe5d03d..67222cdc1337 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoDbdatabaseSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoDbdatabaseSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB MongoDB database. * * @summary Deletes an existing Azure Cosmos DB MongoDB database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseDelete.json */ async function cosmosDbMongoDbdatabaseDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoRoleDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoRoleDefinitionSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoRoleDefinitionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoRoleDefinitionSample.js index eb1d422d0d7f..99055ee1949c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoRoleDefinitionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoRoleDefinitionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Mongo Role Definition. * * @summary Deletes an existing Azure Cosmos DB Mongo Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.json */ async function cosmosDbMongoDbroleDefinitionDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoUserDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoUserDefinitionSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoUserDefinitionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoUserDefinitionSample.js index 57381afaf976..b07bfe9a1b42 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoUserDefinitionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesDeleteMongoUserDefinitionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Mongo User Definition. * * @summary Deletes an existing Azure Cosmos DB Mongo User Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionDelete.json */ async function cosmosDbMongoDbuserDefinitionDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbcollectionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbcollectionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbcollectionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbcollectionSample.js index 2402e6ea469c..be4e945692e3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbcollectionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbcollectionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the MongoDB collection under an existing Azure Cosmos DB database account. * * @summary Gets the MongoDB collection under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionGet.json */ async function cosmosDbMongoDbcollectionGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbcollectionThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbcollectionThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbcollectionThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbcollectionThroughputSample.js index d39057ebaa35..7194224880bf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbcollectionThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbcollectionThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputGet.json */ async function cosmosDbMongoDbcollectionThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbdatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbdatabaseSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbdatabaseSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbdatabaseSample.js index 43215a8864b5..b0e921dd085f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbdatabaseSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbdatabaseSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseGet.json */ async function cosmosDbMongoDbdatabaseGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbdatabaseThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbdatabaseThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbdatabaseThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbdatabaseThroughputSample.js index 414ac58f5f73..a035bc1ea464 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbdatabaseThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoDbdatabaseThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputGet.json */ async function cosmosDbMongoDbdatabaseThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoRoleDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoRoleDefinitionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoRoleDefinitionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoRoleDefinitionSample.js index 59362a08037f..8031d96b84ae 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoRoleDefinitionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoRoleDefinitionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionGet.json */ async function cosmosDbMongoRoleDefinitionGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoUserDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoUserDefinitionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoUserDefinitionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoUserDefinitionSample.js index bd0f5d4e0bba..efcbae015de3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoUserDefinitionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesGetMongoUserDefinitionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionGet.json */ async function cosmosDbMongoDbuserDefinitionGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.js similarity index 60% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.js index 664f2d6326d8..1ec7149c2b18 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.js @@ -10,38 +10,35 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** - * This sample demonstrates how to Create or updates Azure Cosmos DB MongoDB database + * This sample demonstrates how to Merges the partitions of a MongoDB Collection * - * @summary Create or updates Azure Cosmos DB MongoDB database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseCreateUpdate.json + * @summary Merges the partitions of a MongoDB Collection + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json */ -async function cosmosDbMongoDbdatabaseCreateUpdate() { +async function cosmosDbMongoDbcollectionPartitionMerge() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; const accountName = "ddb1"; const databaseName = "databaseName"; - const createUpdateMongoDBDatabaseParameters = { - location: "West US", - options: {}, - resource: { id: "databaseName" }, - tags: {}, - }; + const collectionName = "collectionName"; + const mergeParameters = { isDryRun: false }; const credential = new DefaultAzureCredential(); const client = new CosmosDBManagementClient(credential, subscriptionId); - const result = await client.mongoDBResources.beginCreateUpdateMongoDBDatabaseAndWait( + const result = await client.mongoDBResources.beginListMongoDBCollectionPartitionMergeAndWait( resourceGroupName, accountName, databaseName, - createUpdateMongoDBDatabaseParameters, + collectionName, + mergeParameters, ); console.log(result); } async function main() { - cosmosDbMongoDbdatabaseCreateUpdate(); + cosmosDbMongoDbcollectionPartitionMerge(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoDbcollectionsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbcollectionsSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoDbcollectionsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbcollectionsSample.js index a3b307a7b07f..9f14775843f3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoDbcollectionsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbcollectionsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the MongoDB collection under an existing Azure Cosmos DB database account. * * @summary Lists the MongoDB collection under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionList.json */ async function cosmosDbMongoDbcollectionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoDbdatabasesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbdatabasesSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoDbdatabasesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbdatabasesSample.js index e4e62c26e83d..32273f0bd85f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoDbdatabasesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoDbdatabasesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the MongoDB databases under an existing Azure Cosmos DB database account. * * @summary Lists the MongoDB databases under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseList.json */ async function cosmosDbMongoDbdatabaseList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoRoleDefinitionsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoRoleDefinitionsSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoRoleDefinitionsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoRoleDefinitionsSample.js index 1df1f54db5ee..ad67e55d5ca0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoRoleDefinitionsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoRoleDefinitionsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. * * @summary Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionList.json */ async function cosmosDbMongoDbroleDefinitionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoUserDefinitionsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoUserDefinitionsSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoUserDefinitionsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoUserDefinitionsSample.js index 3e2565d5129c..2ab824ed2a5a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoUserDefinitionsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesListMongoUserDefinitionsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Mongo User Definition. * * @summary Retrieves the list of all Azure Cosmos DB Mongo User Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionList.json */ async function cosmosDbMongoDbuserDefinitionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js index 3e791ac43939..492625d93d33 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json */ async function cosmosDbMongoDbcollectionMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js index d270376e15f8..7f328c86701b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json */ async function cosmosDbMongoDbcollectionMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js index 0fda11c6df2c..3f0212548752 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json */ async function cosmosDbMongoDbdatabaseMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js index 3eb78fd2ed25..2495e76e2a82 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json */ async function cosmosDbMongoDbdatabaseMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.js similarity index 56% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.js index 8b2328380bb8..0f088c08b824 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.js @@ -10,50 +10,44 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** - * This sample demonstrates how to Create or update an Azure Cosmos DB MongoDB Collection + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB MongoDB container * - * @summary Create or update an Azure Cosmos DB MongoDB Collection - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionCreateUpdate.json + * @summary Redistribute throughput for an Azure Cosmos DB MongoDB container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json */ -async function cosmosDbMongoDbcollectionCreateUpdate() { +async function cosmosDbMongoDbcollectionRedistributeThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; const accountName = "ddb1"; const databaseName = "databaseName"; const collectionName = "collectionName"; - const createUpdateMongoDBCollectionParameters = { - location: "West US", - options: {}, + const redistributeThroughputParameters = { resource: { - id: "collectionName", - indexes: [ - { - key: { keys: ["_ts"] }, - options: { expireAfterSeconds: 100, unique: true }, - }, - { key: { keys: ["_id"] } }, + sourcePhysicalPartitionThroughputInfo: [{ id: "2", throughput: 5000 }, { id: "3" }], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, ], - shardKey: { testKey: "Hash" }, + throughputPolicy: "custom", }, - tags: {}, }; const credential = new DefaultAzureCredential(); const client = new CosmosDBManagementClient(credential, subscriptionId); - const result = await client.mongoDBResources.beginCreateUpdateMongoDBCollectionAndWait( + const result = await client.mongoDBResources.beginMongoDBContainerRedistributeThroughputAndWait( resourceGroupName, accountName, databaseName, collectionName, - createUpdateMongoDBCollectionParameters, + redistributeThroughputParameters, ); console.log(result); } async function main() { - cosmosDbMongoDbcollectionCreateUpdate(); + cosmosDbMongoDbcollectionRedistributeThroughput(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.js new file mode 100644 index 000000000000..9e99462f6589 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.js @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json + */ +async function cosmosDbMongoDbcollectionRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const retrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBContainerRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbcollectionRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabasePartitionMergeSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabasePartitionMergeSample.js new file mode 100644 index 000000000000..a92660b37022 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabasePartitionMergeSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Merges the partitions of a MongoDB database + * + * @summary Merges the partitions of a MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabasePartitionMerge.json + */ +async function cosmosDbMongoDbdatabasePartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const mergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.mongoDBResources.beginMongoDBDatabasePartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabasePartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.js new file mode 100644 index 000000000000..357eed0c0770 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB MongoDB database + * + * @summary Redistribute throughput for an Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRedistributeThroughput.json + */ +async function cosmosDbMongoDbdatabaseRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const redistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [{ id: "2", throughput: 5000 }, { id: "3" }], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.mongoDBResources.beginMongoDBDatabaseRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabaseRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.js new file mode 100644 index 000000000000..ba3d38f07121 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRetrieveThroughputDistribution.json + */ +async function cosmosDbMongoDbdatabaseRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const retrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabaseRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesRetrieveContinuousBackupInformationSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesRetrieveContinuousBackupInformationSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesRetrieveContinuousBackupInformationSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesRetrieveContinuousBackupInformationSample.js index 72e5bcc1f955..81391bfe5fbe 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesRetrieveContinuousBackupInformationSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesRetrieveContinuousBackupInformationSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves continuous backup information for a Mongodb collection. * * @summary Retrieves continuous backup information for a Mongodb collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionBackupInformation.json */ async function cosmosDbMongoDbcollectionBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js index 2723e479b74e..23ef3dda0e74 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update the RUs per second of an Azure Cosmos DB MongoDB collection * * @summary Update the RUs per second of an Azure Cosmos DB MongoDB collection - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputUpdate.json */ async function cosmosDbMongoDbcollectionThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js index be74156bfe16..d5aea2c83f1f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update RUs per second of the an Azure Cosmos DB MongoDB database * * @summary Update RUs per second of the an Azure Cosmos DB MongoDB database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json */ async function cosmosDbMongoDbdatabaseThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsGetSample.js new file mode 100644 index 000000000000..a8f06b151e30 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsGetSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Gets effective Network Security Perimeter Configuration for association + * + * @summary Gets effective Network Security Perimeter Configuration for association + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationGet.json + */ +async function namspaceNetworkSecurityPerimeterConfigurationList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "res4410"; + const accountName = "cosmosTest"; + const networkSecurityPerimeterConfigurationName = + "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.networkSecurityPerimeterConfigurations.get( + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + ); + console.log(result); +} + +async function main() { + namspaceNetworkSecurityPerimeterConfigurationList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsListSample.js new file mode 100644 index 000000000000..0f5abb37b137 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsListSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Gets list of effective Network Security Perimeter Configuration for cosmos db account + * + * @summary Gets list of effective Network Security Perimeter Configuration for cosmos db account + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationList.json + */ +async function namspaceNetworkSecurityPerimeterConfigurationList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "res4410"; + const accountName = "cosmosTest"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkSecurityPerimeterConfigurations.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + namspaceNetworkSecurityPerimeterConfigurationList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js new file mode 100644 index 000000000000..b33d61825760 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Refreshes any information about the association. + * + * @summary Refreshes any information about the association. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationReconcile.json + */ +async function networkSecurityPerimeterConfigurationList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "res4410"; + const accountName = "sto8607"; + const networkSecurityPerimeterConfigurationName = + "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.networkSecurityPerimeterConfigurations.beginReconcileAndWait( + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + ); + console.log(result); +} + +async function main() { + networkSecurityPerimeterConfigurationList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesCreateOrUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesCreateOrUpdateSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesCreateOrUpdateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesCreateOrUpdateSample.js index c383405001bd..413f6f90f02b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesCreateOrUpdateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesCreateOrUpdateSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates the notebook workspace for a Cosmos DB account. * * @summary Creates the notebook workspace for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceCreate.json */ async function cosmosDbNotebookWorkspaceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesDeleteSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesDeleteSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesDeleteSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesDeleteSample.js index e10477a9f31c..395150416e0f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesDeleteSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesDeleteSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes the notebook workspace for a Cosmos DB account. * * @summary Deletes the notebook workspace for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceDelete.json */ async function cosmosDbNotebookWorkspaceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesGetSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesGetSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesGetSample.js index 2676c701ee40..dadd8c4b290b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesGetSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesGetSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the notebook workspace for a Cosmos DB account. * * @summary Gets the notebook workspace for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceGet.json */ async function cosmosDbNotebookWorkspaceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesListByDatabaseAccountSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesListByDatabaseAccountSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesListByDatabaseAccountSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesListByDatabaseAccountSample.js index 13f0f78dda26..dd41dc949c77 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesListByDatabaseAccountSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesListByDatabaseAccountSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the notebook workspace resources of an existing Cosmos DB account. * * @summary Gets the notebook workspace resources of an existing Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceList.json */ async function cosmosDbNotebookWorkspaceList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesListConnectionInfoSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesListConnectionInfoSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesListConnectionInfoSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesListConnectionInfoSample.js index 0e5aa1e81eb3..3e46aa01a541 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesListConnectionInfoSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesListConnectionInfoSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the connection info for the notebook workspace * * @summary Retrieves the connection info for the notebook workspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json */ async function cosmosDbNotebookWorkspaceListConnectionInfo() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesRegenerateAuthTokenSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesRegenerateAuthTokenSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesRegenerateAuthTokenSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesRegenerateAuthTokenSample.js index edd51413b696..e8e62e47751c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesRegenerateAuthTokenSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesRegenerateAuthTokenSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Regenerates the auth token for the notebook workspace * * @summary Regenerates the auth token for the notebook workspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json */ async function cosmosDbNotebookWorkspaceRegenerateAuthToken() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesStartSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesStartSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesStartSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesStartSample.js index 874ae75f8948..883e35627157 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesStartSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/notebookWorkspacesStartSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Starts the notebook workspace * * @summary Starts the notebook workspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceStart.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceStart.json */ async function cosmosDbNotebookWorkspaceStart() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/operationsListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/operationsListSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/operationsListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/operationsListSample.js index d9ff430aeb0f..636a9075619a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/operationsListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/operationsListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all of the available Cosmos DB Resource Provider operations. * * @summary Lists all of the available Cosmos DB Resource Provider operations. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBOperationsList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBOperationsList.json */ async function cosmosDbOperationsList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/package.json b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/package.json similarity index 81% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/package.json rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/package.json index 9c55bdd39071..aab6362d0b05 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-cosmosdb-js", + "name": "@azure-samples/arm-cosmosdb-js-beta", "private": true, "version": "1.0.0", - "description": " client library samples for JavaScript", + "description": " client library samples for JavaScript (Beta)", "engines": { "node": ">=18.0.0" }, @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb", "dependencies": { - "@azure/arm-cosmosdb": "latest", + "@azure/arm-cosmosdb": "next", "dotenv": "latest", "@azure/identity": "^4.2.1" } diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/partitionKeyRangeIdListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/partitionKeyRangeIdListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/partitionKeyRangeIdListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/partitionKeyRangeIdListMetricsSample.js index 41765ddea78c..e700ea84093f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/partitionKeyRangeIdListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/partitionKeyRangeIdListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given partition key range id. * * @summary Retrieves the metrics determined by the given filter for the given partition key range id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/partitionKeyRangeIdRegionListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/partitionKeyRangeIdRegionListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/partitionKeyRangeIdRegionListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/partitionKeyRangeIdRegionListMetricsSample.js index 2e7707500855..49b95b289212 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/partitionKeyRangeIdRegionListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/partitionKeyRangeIdRegionListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given partition key range id and region. * * @summary Retrieves the metrics determined by the given filter for the given partition key range id and region. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileListMetricsSample.js index 00334cc73dd9..2f73a2816c88 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data * * @summary Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileSourceTargetListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileSourceTargetListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileSourceTargetListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileSourceTargetListMetricsSample.js index 0110282ff179..5e749ebe7514 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileSourceTargetListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileSourceTargetListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data * * @summary Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileSourceTargetGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileSourceTargetGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileTargetListMetricsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileTargetListMetricsSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileTargetListMetricsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileTargetListMetricsSample.js index f257b862495a..03046ccb1a83 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileTargetListMetricsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/percentileTargetListMetricsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data * * @summary Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileTargetGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileTargetGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsCreateOrUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsCreateOrUpdateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js index e778c6513bed..4acab13ae1c7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsCreateOrUpdateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. * * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json */ async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsDeleteSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsDeleteSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsDeleteSample.js index 45bf69e33f5f..02dded9cc211 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsDeleteSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsDeleteSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes a private endpoint connection with a given name. * * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json */ async function deletesAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsGetSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsGetSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsGetSample.js index 802608d9393d..d03fccef270e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsGetSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsGetSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets a private endpoint connection. * * @summary Gets a private endpoint connection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsListByDatabaseAccountSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsListByDatabaseAccountSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsListByDatabaseAccountSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsListByDatabaseAccountSample.js index f0fe7b198428..b535f228d707 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsListByDatabaseAccountSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateEndpointConnectionsListByDatabaseAccountSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List all private endpoint connections on a Cosmos DB account. * * @summary List all private endpoint connections on a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionListGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateLinkResourcesGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateLinkResourcesGetSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateLinkResourcesGetSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateLinkResourcesGetSample.js index 2dfbadfa0540..a93143e1a356 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateLinkResourcesGetSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateLinkResourcesGetSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the private link resources that need to be created for a Cosmos DB account. * * @summary Gets the private link resources that need to be created for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateLinkResourcesListByDatabaseAccountSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateLinkResourcesListByDatabaseAccountSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateLinkResourcesListByDatabaseAccountSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateLinkResourcesListByDatabaseAccountSample.js index 54e709d33e26..61fd9f2f660a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateLinkResourcesListByDatabaseAccountSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/privateLinkResourcesListByDatabaseAccountSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the private link resources that need to be created for a Cosmos DB account. * * @summary Gets the private link resources that need to be created for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceListGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceListGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsGetByLocationSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsGetByLocationSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsGetByLocationSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsGetByLocationSample.js index 621d60008d43..a33f661831c2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsGetByLocationSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsGetByLocationSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. * * @summary Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json */ async function cosmosDbRestorableDatabaseAccountGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsListByLocationSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsListByLocationSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsListByLocationSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsListByLocationSample.js index 3358eb658bc2..e218ca1b5aeb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsListByLocationSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsListByLocationSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. * * @summary Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json */ async function cosmosDbRestorableDatabaseAccountList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsListSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsListSample.js index 599de972d089..eb055de2d181 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableDatabaseAccountsListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. * * @summary Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json */ async function cosmosDbRestorableDatabaseAccountNoLocationList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinDatabasesListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinDatabasesListSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinDatabasesListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinDatabasesListSample.js index c8daac3d6d69..53636c7d2b20 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinDatabasesListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinDatabasesListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinDatabaseList.json */ async function cosmosDbRestorableGremlinDatabaseList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinGraphsListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinGraphsListSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinGraphsListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinGraphsListSample.js index a7432bfcb92d..0bddd4982da3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinGraphsListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinGraphsListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinGraphList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinGraphList.json */ async function cosmosDbRestorableGremlinGraphList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinResourcesListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinResourcesListSample.js similarity index 94% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinResourcesListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinResourcesListSample.js index 56d737f5734f..81bd48622ade 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinResourcesListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableGremlinResourcesListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinResourceList.json */ async function cosmosDbRestorableGremlinResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbCollectionsListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbCollectionsListSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbCollectionsListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbCollectionsListSample.js index 558b21319e60..cec5808097b9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbCollectionsListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbCollectionsListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbCollectionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json */ async function cosmosDbRestorableMongodbCollectionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbDatabasesListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbDatabasesListSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbDatabasesListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbDatabasesListSample.js index bd5dd03e24c7..f1d25e7dfce9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbDatabasesListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbDatabasesListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json */ async function cosmosDbRestorableMongodbDatabaseList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbResourcesListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbResourcesListSample.js similarity index 94% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbResourcesListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbResourcesListSample.js index fb06f32fc31a..e2dc5180d040 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbResourcesListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableMongodbResourcesListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbResourceList.json */ async function cosmosDbRestorableMongodbResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlContainersListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlContainersListSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlContainersListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlContainersListSample.js index 9a2132828c7a..d76fed88c410 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlContainersListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlContainersListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlContainerList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlContainerList.json */ async function cosmosDbRestorableSqlContainerList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlDatabasesListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlDatabasesListSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlDatabasesListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlDatabasesListSample.js index 551bfbade006..2a6f06d94a8e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlDatabasesListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlDatabasesListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlDatabaseList.json */ async function cosmosDbRestorableSqlDatabaseList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlResourcesListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlResourcesListSample.js similarity index 94% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlResourcesListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlResourcesListSample.js index d283c0f070e7..cd6d673e54ff 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlResourcesListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableSqlResourcesListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlResourceList.json */ async function cosmosDbRestorableSqlResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableTableResourcesListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableTableResourcesListSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableTableResourcesListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableTableResourcesListSample.js index c425d6bca770..701a1887c69c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableTableResourcesListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableTableResourcesListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableResourceList.json */ async function cosmosDbRestorableTableResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableTablesListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableTablesListSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableTablesListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableTablesListSample.js index 10b1b75a8d5e..9923e0ead19e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableTablesListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/restorableTablesListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableList.json */ async function cosmosDbRestorableTableList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sample.env b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sample.env similarity index 100% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sample.env rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sample.env diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceCreateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceCreateSample.js similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceCreateSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceCreateSample.js index 0960c1038857..4d69f2d32d61 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceCreateSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceCreateSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceCreate.json */ async function dataTransferServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -45,7 +45,7 @@ async function dataTransferServiceCreate() { * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGraphAPIComputeServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphAPIComputeServiceCreate.json */ async function graphApiComputeServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -74,7 +74,7 @@ async function graphApiComputeServiceCreate() { * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json */ async function materializedViewsBuilderServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -103,7 +103,7 @@ async function materializedViewsBuilderServiceCreate() { * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceCreate.json */ async function sqlDedicatedGatewayServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceDeleteSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceDeleteSample.js similarity index 88% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceDeleteSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceDeleteSample.js index a9e6a7683fd3..6844b5d3caff 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceDeleteSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceDeleteSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceDelete.json */ async function dataTransferServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +37,7 @@ async function dataTransferServiceDelete() { * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGraphAPIComputeServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphAPIComputeServiceDelete.json */ async function graphApiComputeServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -58,7 +58,7 @@ async function graphApiComputeServiceDelete() { * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json */ async function materializedViewsBuilderServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -79,7 +79,7 @@ async function materializedViewsBuilderServiceDelete() { * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceDelete.json */ async function sqlDedicatedGatewayServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceGetSample.js similarity index 88% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceGetSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceGetSample.js index 312c6a2c6b9e..5056cf962fe2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceGetSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceGetSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceGet.json */ async function dataTransferServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -33,7 +33,7 @@ async function dataTransferServiceGet() { * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGraphAPIComputeServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphAPIComputeServiceGet.json */ async function graphApiComputeServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -50,7 +50,7 @@ async function graphApiComputeServiceGet() { * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMaterializedViewsBuilderServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMaterializedViewsBuilderServiceGet.json */ async function materializedViewsBuilderServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -67,7 +67,7 @@ async function materializedViewsBuilderServiceGet() { * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceGet.json */ async function sqlDedicatedGatewayServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceListSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceListSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceListSample.js index 57771160366c..c240843453fa 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceListSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/serviceListSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBServicesList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBServicesList.json */ async function cosmosDbServicesList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateClientEncryptionKeySample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateClientEncryptionKeySample.js similarity index 84% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateClientEncryptionKeySample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateClientEncryptionKeySample.js index c360e42b7adb..ca995c3db001 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateClientEncryptionKeySample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateClientEncryptionKeySample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). * * @summary Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json */ async function cosmosDbClientEncryptionKeyCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subId"; @@ -34,7 +34,9 @@ async function cosmosDbClientEncryptionKeyCreateUpdate() { algorithm: "RSA-OAEP", value: "AzureKeyVault Key URL", }, - wrappedDataEncryptionKey: Buffer.from("U3dhZ2dlciByb2Nrcw=="), + wrappedDataEncryptionKey: Buffer.from( + "VGhpcyBpcyBhY3R1YWxseSBhbiBhcnJheSBvZiBieXRlcy4gVGhpcyByZXF1ZXN0L3Jlc3BvbnNlIGlzIGJlaW5nIHByZXNlbnRlZCBhcyBhIHN0cmluZyBmb3IgcmVhZGFiaWxpdHkgaW4gdGhlIGV4YW1wbGU=", + ), }, }; const credential = new DefaultAzureCredential(); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlContainerSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlContainerSample.js similarity index 50% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlContainerSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlContainerSample.js index 9506a2bab704..b2df1827752b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlContainerSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlContainerSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL container * * @summary Create or update an Azure Cosmos DB SQL container - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerCreateUpdate.json */ async function cosmosDbSqlContainerCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -104,8 +104,100 @@ async function cosmosDbSqlContainerCreateUpdate() { console.log(result); } +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL container + * + * @summary Create or update an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRestore.json + */ +async function cosmosDbSqlContainerRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const createUpdateSqlContainerParameters = { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "containerName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: true, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlContainerAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + createUpdateSqlContainerParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL container + * + * @summary Create or update an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlMaterializedViewCreateUpdate.json + */ +async function cosmosDbSqlMaterializedViewCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "mvContainerName"; + const createUpdateSqlContainerParameters = { + location: "West US", + options: {}, + resource: { + id: "mvContainerName", + indexingPolicy: { + automatic: true, + excludedPaths: [], + includedPaths: [ + { + path: "/*", + indexes: [ + { dataType: "String", kind: "Range", precision: -1 }, + { dataType: "Number", kind: "Range", precision: -1 }, + ], + }, + ], + indexingMode: "consistent", + }, + materializedViewDefinition: { + definition: "select * from ROOT", + sourceCollectionId: "sourceContainerName", + }, + partitionKey: { kind: "Hash", paths: ["/mvpk"] }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlContainerAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + createUpdateSqlContainerParameters, + ); + console.log(result); +} + async function main() { cosmosDbSqlContainerCreateUpdate(); + cosmosDbSqlContainerRestore(); + cosmosDbSqlMaterializedViewCreateUpdate(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js new file mode 100644 index 000000000000..d153d5d06394 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL database + * + * @summary Create or update an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseCreateUpdate.json + */ +async function cosmosDbSqlDatabaseCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateSqlDatabaseParameters = { + location: "West US", + options: {}, + resource: { id: "databaseName" }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateSqlDatabaseParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL database + * + * @summary Create or update an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRestore.json + */ +async function cosmosDbSqlDatabaseRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateSqlDatabaseParameters = { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "databaseName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: true, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateSqlDatabaseParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseCreateUpdate(); + cosmosDbSqlDatabaseRestore(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlRoleAssignmentSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlRoleAssignmentSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlRoleAssignmentSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlRoleAssignmentSample.js index 746a99ef711e..4cad5896d433 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlRoleAssignmentSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlRoleAssignmentSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB SQL Role Assignment. * * @summary Creates or updates an Azure Cosmos DB SQL Role Assignment. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json */ async function cosmosDbSqlRoleAssignmentCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlRoleDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlRoleDefinitionSample.js similarity index 94% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlRoleDefinitionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlRoleDefinitionSample.js index d1b7f7a861c0..d15797e14649 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlRoleDefinitionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlRoleDefinitionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB SQL Role Definition. * * @summary Creates or updates an Azure Cosmos DB SQL Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json */ async function cosmosDbSqlRoleDefinitionCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlStoredProcedureSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlStoredProcedureSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlStoredProcedureSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlStoredProcedureSample.js index bc16a7c359af..035420f6e02a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlStoredProcedureSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlStoredProcedureSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL storedProcedure * * @summary Create or update an Azure Cosmos DB SQL storedProcedure - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureCreateUpdate.json */ async function cosmosDbSqlStoredProcedureCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlTriggerSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlTriggerSample.js similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlTriggerSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlTriggerSample.js index 8aca545ca589..bba8f9c4c5ff 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlTriggerSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlTriggerSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL trigger * * @summary Create or update an Azure Cosmos DB SQL trigger - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerCreateUpdate.json */ async function cosmosDbSqlTriggerCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js index afa5206baaae..49fd9057a917 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL userDefinedFunction * * @summary Create or update an Azure Cosmos DB SQL userDefinedFunction - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json */ async function cosmosDbSqlUserDefinedFunctionCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlContainerSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlContainerSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlContainerSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlContainerSample.js index 6d0b6702b945..e12dda56033b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlContainerSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlContainerSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL container. * * @summary Deletes an existing Azure Cosmos DB SQL container. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerDelete.json */ async function cosmosDbSqlContainerDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlDatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlDatabaseSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlDatabaseSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlDatabaseSample.js index ddf621158520..64ce7cb80462 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlDatabaseSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlDatabaseSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL database. * * @summary Deletes an existing Azure Cosmos DB SQL database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseDelete.json */ async function cosmosDbSqlDatabaseDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlRoleAssignmentSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlRoleAssignmentSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlRoleAssignmentSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlRoleAssignmentSample.js index 0ff31c91f9bb..49d93c0e6f7e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlRoleAssignmentSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlRoleAssignmentSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL Role Assignment. * * @summary Deletes an existing Azure Cosmos DB SQL Role Assignment. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentDelete.json */ async function cosmosDbSqlRoleAssignmentDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlRoleDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlRoleDefinitionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlRoleDefinitionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlRoleDefinitionSample.js index f5695ac3abfa..706b6b19dbd6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlRoleDefinitionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlRoleDefinitionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL Role Definition. * * @summary Deletes an existing Azure Cosmos DB SQL Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionDelete.json */ async function cosmosDbSqlRoleDefinitionDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlStoredProcedureSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlStoredProcedureSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlStoredProcedureSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlStoredProcedureSample.js index 94206b5fdcf4..62144497f946 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlStoredProcedureSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlStoredProcedureSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL storedProcedure. * * @summary Deletes an existing Azure Cosmos DB SQL storedProcedure. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureDelete.json */ async function cosmosDbSqlStoredProcedureDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlTriggerSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlTriggerSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlTriggerSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlTriggerSample.js index 323cbba510da..da100d1d78e2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlTriggerSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlTriggerSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL trigger. * * @summary Deletes an existing Azure Cosmos DB SQL trigger. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerDelete.json */ async function cosmosDbSqlTriggerDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlUserDefinedFunctionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlUserDefinedFunctionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlUserDefinedFunctionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlUserDefinedFunctionSample.js index b36d6a732f5b..8d1a97bc2f6d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlUserDefinedFunctionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesDeleteSqlUserDefinedFunctionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL userDefinedFunction. * * @summary Deletes an existing Azure Cosmos DB SQL userDefinedFunction. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionDelete.json */ async function cosmosDbSqlUserDefinedFunctionDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetClientEncryptionKeySample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetClientEncryptionKeySample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetClientEncryptionKeySample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetClientEncryptionKeySample.js index 851aa47b7357..07117baf8a83 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetClientEncryptionKeySample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetClientEncryptionKeySample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. * * @summary Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyGet.json */ async function cosmosDbClientEncryptionKeyGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlContainerSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlContainerSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlContainerSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlContainerSample.js index 2162f5ca9e2f..cd1432129ce7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlContainerSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlContainerSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the SQL container under an existing Azure Cosmos DB database account. * * @summary Gets the SQL container under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerGet.json */ async function cosmosDbSqlContainerGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlContainerThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlContainerThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlContainerThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlContainerThroughputSample.js index cb5d2f27c9aa..4024e6bb440d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlContainerThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlContainerThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. * * @summary Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputGet.json */ async function cosmosDbSqlContainerThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlDatabaseSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlDatabaseSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlDatabaseSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlDatabaseSample.js index 62e0058917f0..31f678c58e14 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlDatabaseSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlDatabaseSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseGet.json */ async function cosmosDbSqlDatabaseGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlDatabaseThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlDatabaseThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlDatabaseThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlDatabaseThroughputSample.js index c411b4e5de78..fb5042e82bf3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlDatabaseThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlDatabaseThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputGet.json */ async function cosmosDbSqlDatabaseThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlRoleAssignmentSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlRoleAssignmentSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlRoleAssignmentSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlRoleAssignmentSample.js index 246a5f6b727e..b2e0d7c377f5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlRoleAssignmentSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlRoleAssignmentSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentGet.json */ async function cosmosDbSqlRoleAssignmentGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlRoleDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlRoleDefinitionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlRoleDefinitionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlRoleDefinitionSample.js index c367a646883e..3be75cb0cb48 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlRoleDefinitionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlRoleDefinitionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionGet.json */ async function cosmosDbSqlRoleDefinitionGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlStoredProcedureSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlStoredProcedureSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlStoredProcedureSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlStoredProcedureSample.js index a69967fdd7db..e1de5a157af6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlStoredProcedureSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlStoredProcedureSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. * * @summary Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureGet.json */ async function cosmosDbSqlStoredProcedureGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlTriggerSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlTriggerSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlTriggerSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlTriggerSample.js index cbdeabe551a7..0cedf119e794 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlTriggerSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlTriggerSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the SQL trigger under an existing Azure Cosmos DB database account. * * @summary Gets the SQL trigger under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerGet.json */ async function cosmosDbSqlTriggerGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlUserDefinedFunctionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlUserDefinedFunctionSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlUserDefinedFunctionSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlUserDefinedFunctionSample.js index 8c042931dbc9..ffe192a3daba 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlUserDefinedFunctionSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesGetSqlUserDefinedFunctionSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * * @summary Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionGet.json */ async function cosmosDbSqlUserDefinedFunctionGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListClientEncryptionKeysSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListClientEncryptionKeysSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListClientEncryptionKeysSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListClientEncryptionKeysSample.js index 551934752f9f..25e701cc4505 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListClientEncryptionKeysSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListClientEncryptionKeysSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. * * @summary Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeysList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeysList.json */ async function cosmosDbClientEncryptionKeysList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlContainerPartitionMergeSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlContainerPartitionMergeSample.js new file mode 100644 index 000000000000..de01e3b1a90f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlContainerPartitionMergeSample.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Merges the partitions of a SQL Container + * + * @summary Merges the partitions of a SQL Container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerPartitionMerge.json + */ +async function cosmosDbSqlContainerPartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const mergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginListSqlContainerPartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlContainerPartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlContainersSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlContainersSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlContainersSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlContainersSample.js index 8d7acac8e12f..87cc987e4f6f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlContainersSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlContainersSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the SQL container under an existing Azure Cosmos DB database account. * * @summary Lists the SQL container under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerList.json */ async function cosmosDbSqlContainerList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlDatabasesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlDatabasesSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlDatabasesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlDatabasesSample.js index 3d56df278011..a9629432f4e1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlDatabasesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlDatabasesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the SQL databases under an existing Azure Cosmos DB database account. * * @summary Lists the SQL databases under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseList.json */ async function cosmosDbSqlDatabaseList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlRoleAssignmentsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlRoleAssignmentsSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlRoleAssignmentsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlRoleAssignmentsSample.js index b067d669bd64..cf6a8d117f41 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlRoleAssignmentsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlRoleAssignmentsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB SQL Role Assignments. * * @summary Retrieves the list of all Azure Cosmos DB SQL Role Assignments. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentList.json */ async function cosmosDbSqlRoleAssignmentList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlRoleDefinitionsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlRoleDefinitionsSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlRoleDefinitionsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlRoleDefinitionsSample.js index 9e3e8d577553..c64df84d2bf1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlRoleDefinitionsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlRoleDefinitionsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB SQL Role Definitions. * * @summary Retrieves the list of all Azure Cosmos DB SQL Role Definitions. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionList.json */ async function cosmosDbSqlRoleDefinitionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "mySubscriptionId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlStoredProceduresSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlStoredProceduresSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlStoredProceduresSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlStoredProceduresSample.js index bb39f9ccc576..fc623287e504 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlStoredProceduresSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlStoredProceduresSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. * * @summary Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureList.json */ async function cosmosDbSqlStoredProcedureList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlTriggersSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlTriggersSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlTriggersSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlTriggersSample.js index 4986eecfc79e..fae03bd55ea5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlTriggersSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlTriggersSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the SQL trigger under an existing Azure Cosmos DB database account. * * @summary Lists the SQL trigger under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerList.json */ async function cosmosDbSqlTriggerList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlUserDefinedFunctionsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlUserDefinedFunctionsSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlUserDefinedFunctionsSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlUserDefinedFunctionsSample.js index f228aa2c0e37..d0734179adc2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlUserDefinedFunctionsSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesListSqlUserDefinedFunctionsSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * * @summary Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionList.json */ async function cosmosDbSqlUserDefinedFunctionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlContainerToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlContainerToAutoscaleSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlContainerToAutoscaleSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlContainerToAutoscaleSample.js index 6b900f75d476..a0179fa2365a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlContainerToAutoscaleSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlContainerToAutoscaleSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToAutoscale.json */ async function cosmosDbSqlContainerMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlContainerToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlContainerToManualThroughputSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlContainerToManualThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlContainerToManualThroughputSample.js index 64c27f3cd7a5..ec728c5b9f60 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlContainerToManualThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlContainerToManualThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToManualThroughput.json */ async function cosmosDbSqlContainerMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js index bc87569d4947..f30038919d93 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json */ async function cosmosDbSqlDatabaseMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js index fbd8f664fc78..10d57531e497 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json */ async function cosmosDbSqlDatabaseMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesRetrieveContinuousBackupInformationSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesRetrieveContinuousBackupInformationSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesRetrieveContinuousBackupInformationSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesRetrieveContinuousBackupInformationSample.js index 1f9a52eae7c5..53b10a948671 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesRetrieveContinuousBackupInformationSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesRetrieveContinuousBackupInformationSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves continuous backup information for a container resource. * * @summary Retrieves continuous backup information for a container resource. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerBackupInformation.json */ async function cosmosDbSqlContainerBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRedistributeThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRedistributeThroughputSample.js new file mode 100644 index 000000000000..96940ce4a565 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRedistributeThroughputSample.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB SQL container + * + * @summary Redistribute throughput for an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json + */ +async function cosmosDbSqlContainerRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const redistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [{ id: "2", throughput: 5000 }, { id: "3" }], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginSqlContainerRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlContainerRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.js new file mode 100644 index 000000000000..0869034a1a20 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.js @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB SQL container + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json + */ +async function cosmosDbSqlContainerRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const retrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginSqlContainerRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlContainerRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabasePartitionMergeSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabasePartitionMergeSample.js new file mode 100644 index 000000000000..925b47c4a1b5 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabasePartitionMergeSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Merges the partitions of a SQL database + * + * @summary Merges the partitions of a SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabasePartitionMerge.json + */ +async function cosmosDbSqlDatabasePartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const mergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginSqlDatabasePartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabasePartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRedistributeThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRedistributeThroughputSample.js new file mode 100644 index 000000000000..3d19fe64b28c --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRedistributeThroughputSample.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB SQL database + * + * @summary Redistribute throughput for an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRedistributeThroughput.json + */ +async function cosmosDbSqlDatabaseRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const redistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [{ id: "2", throughput: 5000 }, { id: "3" }], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginSqlDatabaseRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.js new file mode 100644 index 000000000000..fa23dc53c0d2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB SQL database + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRetrieveThroughputDistribution.json + */ +async function cosmosDbSqlDatabaseRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const retrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginSqlDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesUpdateSqlContainerThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesUpdateSqlContainerThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesUpdateSqlContainerThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesUpdateSqlContainerThroughputSample.js index 74deb7f3695b..9b460eef6ec5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesUpdateSqlContainerThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesUpdateSqlContainerThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB SQL container * * @summary Update RUs per second of an Azure Cosmos DB SQL container - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputUpdate.json */ async function cosmosDbSqlContainerThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesUpdateSqlDatabaseThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesUpdateSqlDatabaseThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesUpdateSqlDatabaseThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesUpdateSqlDatabaseThroughputSample.js index 067d3b329e1f..08726d072dec 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesUpdateSqlDatabaseThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/sqlResourcesUpdateSqlDatabaseThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB SQL database * * @summary Update RUs per second of an Azure Cosmos DB SQL database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputUpdate.json */ async function cosmosDbSqlDatabaseThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleAssignmentSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleAssignmentSample.js new file mode 100644 index 000000000000..b19201a6524c --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleAssignmentSample.js @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB Table Role Assignment. + * + * @summary Creates or updates an Azure Cosmos DB Table Role Assignment. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentCreateUpdate.json + */ +async function cosmosDbTableRoleAssignmentCreateUpdate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleAssignmentId = "myRoleAssignmentId"; + const createUpdateTableRoleAssignmentParameters = { + principalId: "myPrincipalId", + roleDefinitionId: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/tableRoleDefinitions/myRoleDefinitionId", + scope: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.beginCreateUpdateTableRoleAssignmentAndWait( + resourceGroupName, + accountName, + roleAssignmentId, + createUpdateTableRoleAssignmentParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleAssignmentCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleDefinitionSample.js new file mode 100644 index 000000000000..d17b7cbed3d2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableRoleDefinitionSample.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB Table Role Definition. + * + * @summary Creates or updates an Azure Cosmos DB Table Role Definition. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionCreateUpdate.json + */ +async function cosmosDbTableRoleDefinitionCreateUpdate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleDefinitionId = "myRoleDefinitionId"; + const createUpdateTableRoleDefinitionParameters = { + typePropertiesType: "CustomRole", + assignableScopes: [ + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/sales", + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases", + ], + permissions: [ + { + dataActions: [ + "Microsoft.DocumentDB/databaseAccounts/tableDatabases/containers/entities/create", + "Microsoft.DocumentDB/databaseAccounts/tableDatabases/containers/entities/read", + ], + notDataActions: [], + }, + ], + roleName: "myRoleName", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.beginCreateUpdateTableRoleDefinitionAndWait( + resourceGroupName, + accountName, + roleDefinitionId, + createUpdateTableRoleDefinitionParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleDefinitionCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesCreateUpdateTableSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesCreateUpdateTableSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableSample.js index 00340cbf704b..fb29eb49e656 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesCreateUpdateTableSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesCreateUpdateTableSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update an Azure Cosmos DB Table * * @summary Create or update an Azure Cosmos DB Table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableCreateUpdate.json */ async function cosmosDbTableReplace() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleAssignmentSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleAssignmentSample.js new file mode 100644 index 000000000000..2af0b975a8df --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleAssignmentSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Table Role Assignment. + * + * @summary Deletes an existing Azure Cosmos DB Table Role Assignment. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentDelete.json + */ +async function cosmosDbTableRoleAssignmentDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleAssignmentId = "myRoleAssignmentId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.beginDeleteTableRoleAssignmentAndWait( + resourceGroupName, + accountName, + roleAssignmentId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleAssignmentDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleDefinitionSample.js new file mode 100644 index 000000000000..f76438a0063b --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableRoleDefinitionSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Table Role Definition. + * + * @summary Deletes an existing Azure Cosmos DB Table Role Definition. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionDelete.json + */ +async function cosmosDbTableRoleDefinitionDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleDefinitionId = "myRoleDefinitionId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.beginDeleteTableRoleDefinitionAndWait( + resourceGroupName, + accountName, + roleDefinitionId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleDefinitionDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesDeleteTableSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesDeleteTableSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableSample.js index 4439bdb7ccaa..e4c5a7d50d97 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesDeleteTableSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesDeleteTableSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Table. * * @summary Deletes an existing Azure Cosmos DB Table. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableDelete.json */ async function cosmosDbTableDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleAssignmentSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleAssignmentSample.js new file mode 100644 index 000000000000..9b6d7b887f64 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleAssignmentSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentGet.json + */ +async function cosmosDbTableRoleAssignmentGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleAssignmentId = "myRoleAssignmentId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.getTableRoleAssignment( + resourceGroupName, + accountName, + roleAssignmentId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleAssignmentGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleDefinitionSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleDefinitionSample.js new file mode 100644 index 000000000000..bffd551f7dcd --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableRoleDefinitionSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionGet.json + */ +async function cosmosDbTableRoleDefinitionGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleDefinitionId = "myRoleDefinitionId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.getTableRoleDefinition( + resourceGroupName, + accountName, + roleDefinitionId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleDefinitionGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesGetTableSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesGetTableSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableSample.js index 0c74e91bec19..a0da2e80fc54 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesGetTableSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the Tables under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Tables under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableGet.json */ async function cosmosDbTableGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesGetTableThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesGetTableThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableThroughputSample.js index cae2b8e475a0..a222127a9f88 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesGetTableThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesGetTableThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputGet.json */ async function cosmosDbTableThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleAssignmentsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleAssignmentsSample.js new file mode 100644 index 000000000000..318f2e2105ca --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleAssignmentsSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Table Role Assignments. + * + * @summary Retrieves the list of all Azure Cosmos DB Table Role Assignments. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentList.json + */ +async function cosmosDbTableRoleAssignmentList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tableResources.listTableRoleAssignments( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbTableRoleAssignmentList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleDefinitionsSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleDefinitionsSample.js new file mode 100644 index 000000000000..4d3f3a863fab --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTableRoleDefinitionsSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Table Role Definitions. + * + * @summary Retrieves the list of all Azure Cosmos DB Table Role Definitions. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionList.json + */ +async function cosmosDbTableRoleDefinitionList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tableResources.listTableRoleDefinitions( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbTableRoleDefinitionList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesListTablesSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTablesSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesListTablesSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTablesSample.js index 79234ec6bc98..30106cb9d621 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesListTablesSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesListTablesSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the Tables under an existing Azure Cosmos DB database account. * * @summary Lists the Tables under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableList.json */ async function cosmosDbTableList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesMigrateTableToAutoscaleSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesMigrateTableToAutoscaleSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesMigrateTableToAutoscaleSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesMigrateTableToAutoscaleSample.js index 84b7776599b8..596e2058e5be 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesMigrateTableToAutoscaleSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesMigrateTableToAutoscaleSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Table from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Table from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToAutoscale.json */ async function cosmosDbTableMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesMigrateTableToManualThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesMigrateTableToManualThroughputSample.js similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesMigrateTableToManualThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesMigrateTableToManualThroughputSample.js index a34d79d8c331..7adf15b1f0b5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesMigrateTableToManualThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesMigrateTableToManualThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Migrate an Azure Cosmos DB Table from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Table from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToManualThroughput.json */ async function cosmosDbTableMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesRetrieveContinuousBackupInformationSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesRetrieveContinuousBackupInformationSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesRetrieveContinuousBackupInformationSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesRetrieveContinuousBackupInformationSample.js index 39def80d9ee6..4f4bce9a9343 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesRetrieveContinuousBackupInformationSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesRetrieveContinuousBackupInformationSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Retrieves continuous backup information for a table. * * @summary Retrieves continuous backup information for a table. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableBackupInformation.json */ async function cosmosDbTableCollectionBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesUpdateTableThroughputSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesUpdateTableThroughputSample.js similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesUpdateTableThroughputSample.js rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesUpdateTableThroughputSample.js index 3847e8a5963b..443d49a76767 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesUpdateTableThroughputSample.js +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/tableResourcesUpdateTableThroughputSample.js @@ -10,13 +10,13 @@ // Licensed under the MIT License. const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Table * * @summary Update RUs per second of an Azure Cosmos DB Table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputUpdate.json */ async function cosmosDbTableThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountCreateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountCreateSample.js new file mode 100644 index 000000000000..884e46a90138 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountCreateSample.js @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * + * @summary Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountCreate.json + */ +async function cosmosDbThroughputPoolAccountCreate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const throughputPoolName = "tp1"; + const throughputPoolAccountName = "db1"; + const body = { + accountLocation: "West US", + accountResourceIdentifier: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/resourceGroup/rg1/databaseAccounts/db1/", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPoolAccount.beginCreateAndWait( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + body, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolAccountCreate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountDeleteSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountDeleteSample.js new file mode 100644 index 000000000000..f2a4201082ed --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountDeleteSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Removes an existing Azure Cosmos DB database account from a throughput pool. + * + * @summary Removes an existing Azure Cosmos DB database account from a throughput pool. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountDelete.json + */ +async function cosmosDbThroughputPoolAccountDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const throughputPoolAccountName = "db1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPoolAccount.beginDeleteAndWait( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolAccountDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountGetSample.js new file mode 100644 index 000000000000..353562731057 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountGetSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountGet.json + */ +async function cosmosDbThroughputPoolAccountGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const throughputPoolAccountName = "db1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPoolAccount.get( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolAccountGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountsListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountsListSample.js new file mode 100644 index 000000000000..5dd97ecd2bc2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolAccountsListSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Lists all the Azure Cosmos DB accounts available under the subscription. + * + * @summary Lists all the Azure Cosmos DB accounts available under the subscription. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountsList.json + */ +async function cosmosDbThroughputPoolAccountList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.throughputPoolAccounts.list( + resourceGroupName, + throughputPoolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbThroughputPoolAccountList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolCreateOrUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolCreateOrUpdateSample.js new file mode 100644 index 000000000000..8b7abe6f745d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolCreateOrUpdateSample.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * + * @summary Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolCreate.json + */ +async function cosmosDbThroughputPoolCreate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const throughputPoolName = "tp1"; + const body = { + location: "westus2", + maxThroughput: 10000, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.beginCreateOrUpdateAndWait( + resourceGroupName, + throughputPoolName, + body, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolCreate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolDeleteSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolDeleteSample.js new file mode 100644 index 000000000000..9c6296c794be --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolDeleteSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Throughput Pool. + * + * @summary Deletes an existing Azure Cosmos DB Throughput Pool. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolDelete.json + */ +async function cosmosDbThroughputPoolDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.beginDeleteAndWait( + resourceGroupName, + throughputPoolName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolGetSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolGetSample.js new file mode 100644 index 000000000000..c47d105d38e2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolGetSample.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolGet.json + */ +async function cosmosDbThroughputPoolGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.get(resourceGroupName, throughputPoolName); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolUpdateSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolUpdateSample.js new file mode 100644 index 000000000000..4dcc6f12c3c6 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolUpdateSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * + * @summary Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolUpdate.json + */ +async function cosmosDbThroughputPoolUpdate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const throughputPoolName = "tp1"; + const body = { maxThroughput: 10000 }; + const options = { body }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.beginUpdateAndWait( + resourceGroupName, + throughputPoolName, + options, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListByResourceGroupSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListByResourceGroupSample.js new file mode 100644 index 000000000000..2414137286fb --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListByResourceGroupSample.js @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to List all the ThroughputPools in a given resource group. + * + * @summary List all the ThroughputPools in a given resource group. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json + */ +async function cosmosDbThroughputPoolListByResourceGroup() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.throughputPools.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbThroughputPoolListByResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListSample.js b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListSample.js new file mode 100644 index 000000000000..5f73738e36b0 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/javascript/throughputPoolsListSample.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * + * @summary Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json + */ +async function cosmosDbThroughputPoolList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.throughputPools.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbThroughputPoolList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/README.md b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/README.md new file mode 100644 index 000000000000..73784bfec0e8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/README.md @@ -0,0 +1,561 @@ +# client library samples for TypeScript (Beta) + +These sample programs show how to use the TypeScript client libraries for in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [cassandraClustersCreateUpdateSample.ts][cassandraclusterscreateupdatesample] | Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterCreate.json | +| [cassandraClustersDeallocateSample.ts][cassandraclustersdeallocatesample] | Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDeallocate.json | +| [cassandraClustersDeleteSample.ts][cassandraclustersdeletesample] | Deletes a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDelete.json | +| [cassandraClustersGetBackupSample.ts][cassandraclustersgetbackupsample] | Get the properties of an individual backup of this cluster that is available to restore. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackup.json | +| [cassandraClustersGetCommandAsyncSample.ts][cassandraclustersgetcommandasyncsample] | Get details about a specified command that was run asynchronously. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandResult.json | +| [cassandraClustersGetSample.ts][cassandraclustersgetsample] | Get the properties of a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterGet.json | +| [cassandraClustersInvokeCommandAsyncSample.ts][cassandraclustersinvokecommandasyncsample] | Invoke a command like nodetool for cassandra maintenance asynchronously x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandAsync.json | +| [cassandraClustersInvokeCommandSample.ts][cassandraclustersinvokecommandsample] | Invoke a command like nodetool for cassandra maintenance x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommand.json | +| [cassandraClustersListBackupsSample.ts][cassandraclusterslistbackupssample] | List the backups of this cluster that are available to restore. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackupsList.json | +| [cassandraClustersListByResourceGroupSample.ts][cassandraclusterslistbyresourcegroupsample] | List all managed Cassandra clusters in this resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json | +| [cassandraClustersListBySubscriptionSample.ts][cassandraclusterslistbysubscriptionsample] | List all managed Cassandra clusters in this subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListBySubscription.json | +| [cassandraClustersListCommandSample.ts][cassandraclusterslistcommandsample] | List all commands currently running on ring info x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraListCommand.json | +| [cassandraClustersStartSample.ts][cassandraclustersstartsample] | Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterStart.json | +| [cassandraClustersStatusSample.ts][cassandraclustersstatussample] | Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraStatus.json | +| [cassandraClustersUpdateSample.ts][cassandraclustersupdatesample] | Updates some of the properties of a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterPatch.json | +| [cassandraDataCentersCreateUpdateSample.ts][cassandradatacenterscreateupdatesample] | Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterCreate.json | +| [cassandraDataCentersDeleteSample.ts][cassandradatacentersdeletesample] | Delete a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterDelete.json | +| [cassandraDataCentersGetSample.ts][cassandradatacentersgetsample] | Get the properties of a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterGet.json | +| [cassandraDataCentersListSample.ts][cassandradatacenterslistsample] | List all data centers in a particular managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterList.json | +| [cassandraDataCentersUpdateSample.ts][cassandradatacentersupdatesample] | Update some of the properties of a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterPatch.json | +| [cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts][cassandraresourcescreateupdatecassandrakeyspacesample] | Create or update an Azure Cosmos DB Cassandra keyspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceCreateUpdate.json | +| [cassandraResourcesCreateUpdateCassandraTableSample.ts][cassandraresourcescreateupdatecassandratablesample] | Create or update an Azure Cosmos DB Cassandra Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableCreateUpdate.json | +| [cassandraResourcesCreateUpdateCassandraViewSample.ts][cassandraresourcescreateupdatecassandraviewsample] | Create or update an Azure Cosmos DB Cassandra View x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewCreateUpdate.json | +| [cassandraResourcesDeleteCassandraKeyspaceSample.ts][cassandraresourcesdeletecassandrakeyspacesample] | Deletes an existing Azure Cosmos DB Cassandra keyspace. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceDelete.json | +| [cassandraResourcesDeleteCassandraTableSample.ts][cassandraresourcesdeletecassandratablesample] | Deletes an existing Azure Cosmos DB Cassandra table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableDelete.json | +| [cassandraResourcesDeleteCassandraViewSample.ts][cassandraresourcesdeletecassandraviewsample] | Deletes an existing Azure Cosmos DB Cassandra view. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewDelete.json | +| [cassandraResourcesGetCassandraKeyspaceSample.ts][cassandraresourcesgetcassandrakeyspacesample] | Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceGet.json | +| [cassandraResourcesGetCassandraKeyspaceThroughputSample.ts][cassandraresourcesgetcassandrakeyspacethroughputsample] | Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputGet.json | +| [cassandraResourcesGetCassandraTableSample.ts][cassandraresourcesgetcassandratablesample] | Gets the Cassandra table under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableGet.json | +| [cassandraResourcesGetCassandraTableThroughputSample.ts][cassandraresourcesgetcassandratablethroughputsample] | Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputGet.json | +| [cassandraResourcesGetCassandraViewSample.ts][cassandraresourcesgetcassandraviewsample] | Gets the Cassandra view under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewGet.json | +| [cassandraResourcesGetCassandraViewThroughputSample.ts][cassandraresourcesgetcassandraviewthroughputsample] | Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputGet.json | +| [cassandraResourcesListCassandraKeyspacesSample.ts][cassandraresourceslistcassandrakeyspacessample] | Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceList.json | +| [cassandraResourcesListCassandraTablesSample.ts][cassandraresourceslistcassandratablessample] | Lists the Cassandra table under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableList.json | +| [cassandraResourcesListCassandraViewsSample.ts][cassandraresourceslistcassandraviewssample] | Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewList.json | +| [cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts][cassandraresourcesmigratecassandrakeyspacetoautoscalesample] | Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json | +| [cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts][cassandraresourcesmigratecassandrakeyspacetomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json | +| [cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts][cassandraresourcesmigratecassandratabletoautoscalesample] | Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToAutoscale.json | +| [cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts][cassandraresourcesmigratecassandratabletomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToManualThroughput.json | +| [cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts][cassandraresourcesmigratecassandraviewtoautoscalesample] | Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.json | +| [cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts][cassandraresourcesmigratecassandraviewtomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.json | +| [cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts][cassandraresourcesupdatecassandrakeyspacethroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra Keyspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json | +| [cassandraResourcesUpdateCassandraTableThroughputSample.ts][cassandraresourcesupdatecassandratablethroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputUpdate.json | +| [cassandraResourcesUpdateCassandraViewThroughputSample.ts][cassandraresourcesupdatecassandraviewthroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra view x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputUpdate.json | +| [chaosFaultEnableDisableSample.ts][chaosfaultenabledisablesample] | Enable, disable Chaos Fault in a CosmosDB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultEnableDisable.json | +| [chaosFaultGetSample.ts][chaosfaultgetsample] | Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultGet.json | +| [chaosFaultListSample.ts][chaosfaultlistsample] | List Chaos Faults for CosmosDB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultList.json | +| [collectionListMetricDefinitionsSample.ts][collectionlistmetricdefinitionssample] | Retrieves metric definitions for the given collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetricDefinitions.json | +| [collectionListMetricsSample.ts][collectionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetrics.json | +| [collectionListUsagesSample.ts][collectionlistusagessample] | Retrieves the usages (most recent storage data) for the given collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetUsages.json | +| [collectionPartitionListMetricsSample.ts][collectionpartitionlistmetricssample] | Retrieves the metrics determined by the given filter for the given collection, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetMetrics.json | +| [collectionPartitionListUsagesSample.ts][collectionpartitionlistusagessample] | Retrieves the usages (most recent storage data) for the given collection, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetUsages.json | +| [collectionPartitionRegionListMetricsSample.ts][collectionpartitionregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given collection and region, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionRegionGetMetrics.json | +| [collectionRegionListMetricsSample.ts][collectionregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account, collection and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRegionCollectionGetMetrics.json | +| [dataTransferJobsCancelSample.ts][datatransferjobscancelsample] | Cancels a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCancel.json | +| [dataTransferJobsCompleteSample.ts][datatransferjobscompletesample] | Completes a Data Transfer Online Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobComplete.json | +| [dataTransferJobsCreateSample.ts][datatransferjobscreatesample] | Creates a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCreate.json | +| [dataTransferJobsGetSample.ts][datatransferjobsgetsample] | Get a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobGet.json | +| [dataTransferJobsListByDatabaseAccountSample.ts][datatransferjobslistbydatabaseaccountsample] | Get a list of Data Transfer jobs. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobFeed.json | +| [dataTransferJobsPauseSample.ts][datatransferjobspausesample] | Pause a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobPause.json | +| [dataTransferJobsResumeSample.ts][datatransferjobsresumesample] | Resumes a Data Transfer Job. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobResume.json | +| [databaseAccountRegionListMetricsSample.ts][databaseaccountregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegionGetMetrics.json | +| [databaseAccountsCheckNameExistsSample.ts][databaseaccountschecknameexistssample] | Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCheckNameExists.json | +| [databaseAccountsCreateOrUpdateSample.ts][databaseaccountscreateorupdatesample] | Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCreateMax.json | +| [databaseAccountsDeleteSample.ts][databaseaccountsdeletesample] | Deletes an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountDelete.json | +| [databaseAccountsFailoverPriorityChangeSample.ts][databaseaccountsfailoverprioritychangesample] | Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json | +| [databaseAccountsGetReadOnlyKeysSample.ts][databaseaccountsgetreadonlykeyssample] | Lists the read-only access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json | +| [databaseAccountsGetSample.ts][databaseaccountsgetsample] | Retrieves the properties of an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGet.json | +| [databaseAccountsListByResourceGroupSample.ts][databaseaccountslistbyresourcegroupsample] | Lists all the Azure Cosmos DB database accounts available under the given resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListByResourceGroup.json | +| [databaseAccountsListConnectionStringsSample.ts][databaseaccountslistconnectionstringssample] | Lists the connection strings for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListConnectionStrings.json | +| [databaseAccountsListKeysSample.ts][databaseaccountslistkeyssample] | Lists the access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListKeys.json | +| [databaseAccountsListMetricDefinitionsSample.ts][databaseaccountslistmetricdefinitionssample] | Retrieves metric definitions for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json | +| [databaseAccountsListMetricsSample.ts][databaseaccountslistmetricssample] | Retrieves the metrics determined by the given filter for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetrics.json | +| [databaseAccountsListReadOnlyKeysSample.ts][databaseaccountslistreadonlykeyssample] | Lists the read-only access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json | +| [databaseAccountsListSample.ts][databaseaccountslistsample] | Lists all the Azure Cosmos DB database accounts available under the subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountList.json | +| [databaseAccountsListUsagesSample.ts][databaseaccountslistusagessample] | Retrieves the usages (most recent data) for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetUsages.json | +| [databaseAccountsOfflineRegionSample.ts][databaseaccountsofflineregionsample] | Offline the specified region for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOfflineRegion.json | +| [databaseAccountsOnlineRegionSample.ts][databaseaccountsonlineregionsample] | Online the specified region for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOnlineRegion.json | +| [databaseAccountsRegenerateKeySample.ts][databaseaccountsregeneratekeysample] | Regenerates an access key for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegenerateKey.json | +| [databaseAccountsUpdateSample.ts][databaseaccountsupdatesample] | Updates the properties of an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountPatch.json | +| [databaseListMetricDefinitionsSample.ts][databaselistmetricdefinitionssample] | Retrieves metric definitions for the given database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetricDefinitions.json | +| [databaseListMetricsSample.ts][databaselistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetrics.json | +| [databaseListUsagesSample.ts][databaselistusagessample] | Retrieves the usages (most recent data) for the given database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetUsages.json | +| [graphResourcesCreateUpdateGraphSample.ts][graphresourcescreateupdategraphsample] | Create or update an Azure Cosmos DB Graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceCreateUpdate.json | +| [graphResourcesDeleteGraphResourceSample.ts][graphresourcesdeletegraphresourcesample] | Deletes an existing Azure Cosmos DB Graph Resource. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceDelete.json | +| [graphResourcesGetGraphSample.ts][graphresourcesgetgraphsample] | Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceGet.json | +| [graphResourcesListGraphsSample.ts][graphresourceslistgraphssample] | Lists the graphs under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceList.json | +| [gremlinResourcesCreateUpdateGremlinDatabaseSample.ts][gremlinresourcescreateupdategremlindatabasesample] | Create or update an Azure Cosmos DB Gremlin database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseCreateUpdate.json | +| [gremlinResourcesCreateUpdateGremlinGraphSample.ts][gremlinresourcescreateupdategremlingraphsample] | Create or update an Azure Cosmos DB Gremlin graph x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphCreateUpdate.json | +| [gremlinResourcesDeleteGremlinDatabaseSample.ts][gremlinresourcesdeletegremlindatabasesample] | Deletes an existing Azure Cosmos DB Gremlin database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseDelete.json | +| [gremlinResourcesDeleteGremlinGraphSample.ts][gremlinresourcesdeletegremlingraphsample] | Deletes an existing Azure Cosmos DB Gremlin graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphDelete.json | +| [gremlinResourcesGetGremlinDatabaseSample.ts][gremlinresourcesgetgremlindatabasesample] | Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseGet.json | +| [gremlinResourcesGetGremlinDatabaseThroughputSample.ts][gremlinresourcesgetgremlindatabasethroughputsample] | Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputGet.json | +| [gremlinResourcesGetGremlinGraphSample.ts][gremlinresourcesgetgremlingraphsample] | Gets the Gremlin graph under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphGet.json | +| [gremlinResourcesGetGremlinGraphThroughputSample.ts][gremlinresourcesgetgremlingraphthroughputsample] | Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputGet.json | +| [gremlinResourcesListGremlinDatabasesSample.ts][gremlinresourceslistgremlindatabasessample] | Lists the Gremlin databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseList.json | +| [gremlinResourcesListGremlinGraphsSample.ts][gremlinresourceslistgremlingraphssample] | Lists the Gremlin graph under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphList.json | +| [gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts][gremlinresourcesmigrategremlindatabasetoautoscalesample] | Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json | +| [gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts][gremlinresourcesmigrategremlindatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json | +| [gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts][gremlinresourcesmigrategremlingraphtoautoscalesample] | Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToAutoscale.json | +| [gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts][gremlinresourcesmigrategremlingraphtomanualthroughputsample] | Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json | +| [gremlinResourcesRetrieveContinuousBackupInformationSample.ts][gremlinresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a gremlin graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphBackupInformation.json | +| [gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts][gremlinresourcesupdategremlindatabasethroughputsample] | Update RUs per second of an Azure Cosmos DB Gremlin database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputUpdate.json | +| [gremlinResourcesUpdateGremlinGraphThroughputSample.ts][gremlinresourcesupdategremlingraphthroughputsample] | Update RUs per second of an Azure Cosmos DB Gremlin graph x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputUpdate.json | +| [locationsGetSample.ts][locationsgetsample] | Get the properties of an existing Cosmos DB location x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationGet.json | +| [locationsListSample.ts][locationslistsample] | List Cosmos DB locations and their properties x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationList.json | +| [mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts][mongodbresourcescreateupdatemongodbcollectionsample] | Create or update an Azure Cosmos DB MongoDB Collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionCreateUpdate.json | +| [mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts][mongodbresourcescreateupdatemongodbdatabasesample] | Create or updates Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseCreateUpdate.json | +| [mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts][mongodbresourcescreateupdatemongoroledefinitionsample] | Creates or updates an Azure Cosmos DB Mongo Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json | +| [mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts][mongodbresourcescreateupdatemongouserdefinitionsample] | Creates or updates an Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json | +| [mongoDbResourcesDeleteMongoDbcollectionSample.ts][mongodbresourcesdeletemongodbcollectionsample] | Deletes an existing Azure Cosmos DB MongoDB Collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionDelete.json | +| [mongoDbResourcesDeleteMongoDbdatabaseSample.ts][mongodbresourcesdeletemongodbdatabasesample] | Deletes an existing Azure Cosmos DB MongoDB database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseDelete.json | +| [mongoDbResourcesDeleteMongoRoleDefinitionSample.ts][mongodbresourcesdeletemongoroledefinitionsample] | Deletes an existing Azure Cosmos DB Mongo Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.json | +| [mongoDbResourcesDeleteMongoUserDefinitionSample.ts][mongodbresourcesdeletemongouserdefinitionsample] | Deletes an existing Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionDelete.json | +| [mongoDbResourcesGetMongoDbcollectionSample.ts][mongodbresourcesgetmongodbcollectionsample] | Gets the MongoDB collection under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionGet.json | +| [mongoDbResourcesGetMongoDbcollectionThroughputSample.ts][mongodbresourcesgetmongodbcollectionthroughputsample] | Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputGet.json | +| [mongoDbResourcesGetMongoDbdatabaseSample.ts][mongodbresourcesgetmongodbdatabasesample] | Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseGet.json | +| [mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts][mongodbresourcesgetmongodbdatabasethroughputsample] | Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputGet.json | +| [mongoDbResourcesGetMongoRoleDefinitionSample.ts][mongodbresourcesgetmongoroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionGet.json | +| [mongoDbResourcesGetMongoUserDefinitionSample.ts][mongodbresourcesgetmongouserdefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionGet.json | +| [mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts][mongodbresourceslistmongodbcollectionpartitionmergesample] | Merges the partitions of a MongoDB Collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json | +| [mongoDbResourcesListMongoDbcollectionsSample.ts][mongodbresourceslistmongodbcollectionssample] | Lists the MongoDB collection under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionList.json | +| [mongoDbResourcesListMongoDbdatabasesSample.ts][mongodbresourceslistmongodbdatabasessample] | Lists the MongoDB databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseList.json | +| [mongoDbResourcesListMongoRoleDefinitionsSample.ts][mongodbresourceslistmongoroledefinitionssample] | Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionList.json | +| [mongoDbResourcesListMongoUserDefinitionsSample.ts][mongodbresourceslistmongouserdefinitionssample] | Retrieves the list of all Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionList.json | +| [mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts][mongodbresourcesmigratemongodbcollectiontoautoscalesample] | Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json | +| [mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts][mongodbresourcesmigratemongodbcollectiontomanualthroughputsample] | Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json | +| [mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts][mongodbresourcesmigratemongodbdatabasetoautoscalesample] | Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json | +| [mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts][mongodbresourcesmigratemongodbdatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json | +| [mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts][mongodbresourcesmongodbcontainerredistributethroughputsample] | Redistribute throughput for an Azure Cosmos DB MongoDB container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json | +| [mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts][mongodbresourcesmongodbcontainerretrievethroughputdistributionsample] | Retrieve throughput distribution for an Azure Cosmos DB MongoDB container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json | +| [mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts][mongodbresourcesmongodbdatabasepartitionmergesample] | Merges the partitions of a MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabasePartitionMerge.json | +| [mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts][mongodbresourcesmongodbdatabaseredistributethroughputsample] | Redistribute throughput for an Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRedistributeThroughput.json | +| [mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts][mongodbresourcesmongodbdatabaseretrievethroughputdistributionsample] | Retrieve throughput distribution for an Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRetrieveThroughputDistribution.json | +| [mongoDbResourcesRetrieveContinuousBackupInformationSample.ts][mongodbresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a Mongodb collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionBackupInformation.json | +| [mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts][mongodbresourcesupdatemongodbcollectionthroughputsample] | Update the RUs per second of an Azure Cosmos DB MongoDB collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputUpdate.json | +| [mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts][mongodbresourcesupdatemongodbdatabasethroughputsample] | Update RUs per second of the an Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json | +| [networkSecurityPerimeterConfigurationsGetSample.ts][networksecurityperimeterconfigurationsgetsample] | Gets effective Network Security Perimeter Configuration for association x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationGet.json | +| [networkSecurityPerimeterConfigurationsListSample.ts][networksecurityperimeterconfigurationslistsample] | Gets list of effective Network Security Perimeter Configuration for cosmos db account x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationList.json | +| [networkSecurityPerimeterConfigurationsReconcileSample.ts][networksecurityperimeterconfigurationsreconcilesample] | Refreshes any information about the association. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationReconcile.json | +| [notebookWorkspacesCreateOrUpdateSample.ts][notebookworkspacescreateorupdatesample] | Creates the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceCreate.json | +| [notebookWorkspacesDeleteSample.ts][notebookworkspacesdeletesample] | Deletes the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceDelete.json | +| [notebookWorkspacesGetSample.ts][notebookworkspacesgetsample] | Gets the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceGet.json | +| [notebookWorkspacesListByDatabaseAccountSample.ts][notebookworkspaceslistbydatabaseaccountsample] | Gets the notebook workspace resources of an existing Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceList.json | +| [notebookWorkspacesListConnectionInfoSample.ts][notebookworkspaceslistconnectioninfosample] | Retrieves the connection info for the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json | +| [notebookWorkspacesRegenerateAuthTokenSample.ts][notebookworkspacesregenerateauthtokensample] | Regenerates the auth token for the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json | +| [notebookWorkspacesStartSample.ts][notebookworkspacesstartsample] | Starts the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceStart.json | +| [operationsListSample.ts][operationslistsample] | Lists all of the available Cosmos DB Resource Provider operations. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBOperationsList.json | +| [partitionKeyRangeIdListMetricsSample.ts][partitionkeyrangeidlistmetricssample] | Retrieves the metrics determined by the given filter for the given partition key range id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdGetMetrics.json | +| [partitionKeyRangeIdRegionListMetricsSample.ts][partitionkeyrangeidregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given partition key range id and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json | +| [percentileListMetricsSample.ts][percentilelistmetricssample] | Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileGetMetrics.json | +| [percentileSourceTargetListMetricsSample.ts][percentilesourcetargetlistmetricssample] | Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileSourceTargetGetMetrics.json | +| [percentileTargetListMetricsSample.ts][percentiletargetlistmetricssample] | Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileTargetGetMetrics.json | +| [privateEndpointConnectionsCreateOrUpdateSample.ts][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionGet.json | +| [privateEndpointConnectionsListByDatabaseAccountSample.ts][privateendpointconnectionslistbydatabaseaccountsample] | List all private endpoint connections on a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json | +| [privateLinkResourcesGetSample.ts][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceGet.json | +| [privateLinkResourcesListByDatabaseAccountSample.ts][privatelinkresourceslistbydatabaseaccountsample] | Gets the private link resources that need to be created for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceListGet.json | +| [restorableDatabaseAccountsGetByLocationSample.ts][restorabledatabaseaccountsgetbylocationsample] | Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/\*' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json | +| [restorableDatabaseAccountsListByLocationSample.ts][restorabledatabaseaccountslistbylocationsample] | Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json | +| [restorableDatabaseAccountsListSample.ts][restorabledatabaseaccountslistsample] | Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json | +| [restorableGremlinDatabasesListSample.ts][restorablegremlindatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinDatabaseList.json | +| [restorableGremlinGraphsListSample.ts][restorablegremlingraphslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinGraphList.json | +| [restorableGremlinResourcesListSample.ts][restorablegremlinresourceslistsample] | Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinResourceList.json | +| [restorableMongodbCollectionsListSample.ts][restorablemongodbcollectionslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json | +| [restorableMongodbDatabasesListSample.ts][restorablemongodbdatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json | +| [restorableMongodbResourcesListSample.ts][restorablemongodbresourceslistsample] | Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbResourceList.json | +| [restorableSqlContainersListSample.ts][restorablesqlcontainerslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlContainerList.json | +| [restorableSqlDatabasesListSample.ts][restorablesqldatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlDatabaseList.json | +| [restorableSqlResourcesListSample.ts][restorablesqlresourceslistsample] | Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlResourceList.json | +| [restorableTableResourcesListSample.ts][restorabletableresourceslistsample] | Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableResourceList.json | +| [restorableTablesListSample.ts][restorabletableslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableList.json | +| [serviceCreateSample.ts][servicecreatesample] | Creates a service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceCreate.json | +| [serviceDeleteSample.ts][servicedeletesample] | Deletes service with the given serviceName. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceDelete.json | +| [serviceGetSample.ts][servicegetsample] | Gets the status of service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceGet.json | +| [serviceListSample.ts][servicelistsample] | Gets the status of service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBServicesList.json | +| [sqlResourcesCreateUpdateClientEncryptionKeySample.ts][sqlresourcescreateupdateclientencryptionkeysample] | Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlContainerSample.ts][sqlresourcescreateupdatesqlcontainersample] | Create or update an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlDatabaseSample.ts][sqlresourcescreateupdatesqldatabasesample] | Create or update an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts][sqlresourcescreateupdatesqlroleassignmentsample] | Creates or updates an Azure Cosmos DB SQL Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts][sqlresourcescreateupdatesqlroledefinitionsample] | Creates or updates an Azure Cosmos DB SQL Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlStoredProcedureSample.ts][sqlresourcescreateupdatesqlstoredproceduresample] | Create or update an Azure Cosmos DB SQL storedProcedure x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlTriggerSample.ts][sqlresourcescreateupdatesqltriggersample] | Create or update an Azure Cosmos DB SQL trigger x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerCreateUpdate.json | +| [sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts][sqlresourcescreateupdatesqluserdefinedfunctionsample] | Create or update an Azure Cosmos DB SQL userDefinedFunction x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json | +| [sqlResourcesDeleteSqlContainerSample.ts][sqlresourcesdeletesqlcontainersample] | Deletes an existing Azure Cosmos DB SQL container. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerDelete.json | +| [sqlResourcesDeleteSqlDatabaseSample.ts][sqlresourcesdeletesqldatabasesample] | Deletes an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseDelete.json | +| [sqlResourcesDeleteSqlRoleAssignmentSample.ts][sqlresourcesdeletesqlroleassignmentsample] | Deletes an existing Azure Cosmos DB SQL Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentDelete.json | +| [sqlResourcesDeleteSqlRoleDefinitionSample.ts][sqlresourcesdeletesqlroledefinitionsample] | Deletes an existing Azure Cosmos DB SQL Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionDelete.json | +| [sqlResourcesDeleteSqlStoredProcedureSample.ts][sqlresourcesdeletesqlstoredproceduresample] | Deletes an existing Azure Cosmos DB SQL storedProcedure. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureDelete.json | +| [sqlResourcesDeleteSqlTriggerSample.ts][sqlresourcesdeletesqltriggersample] | Deletes an existing Azure Cosmos DB SQL trigger. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerDelete.json | +| [sqlResourcesDeleteSqlUserDefinedFunctionSample.ts][sqlresourcesdeletesqluserdefinedfunctionsample] | Deletes an existing Azure Cosmos DB SQL userDefinedFunction. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionDelete.json | +| [sqlResourcesGetClientEncryptionKeySample.ts][sqlresourcesgetclientencryptionkeysample] | Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyGet.json | +| [sqlResourcesGetSqlContainerSample.ts][sqlresourcesgetsqlcontainersample] | Gets the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerGet.json | +| [sqlResourcesGetSqlContainerThroughputSample.ts][sqlresourcesgetsqlcontainerthroughputsample] | Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputGet.json | +| [sqlResourcesGetSqlDatabaseSample.ts][sqlresourcesgetsqldatabasesample] | Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseGet.json | +| [sqlResourcesGetSqlDatabaseThroughputSample.ts][sqlresourcesgetsqldatabasethroughputsample] | Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputGet.json | +| [sqlResourcesGetSqlRoleAssignmentSample.ts][sqlresourcesgetsqlroleassignmentsample] | Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentGet.json | +| [sqlResourcesGetSqlRoleDefinitionSample.ts][sqlresourcesgetsqlroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionGet.json | +| [sqlResourcesGetSqlStoredProcedureSample.ts][sqlresourcesgetsqlstoredproceduresample] | Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureGet.json | +| [sqlResourcesGetSqlTriggerSample.ts][sqlresourcesgetsqltriggersample] | Gets the SQL trigger under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerGet.json | +| [sqlResourcesGetSqlUserDefinedFunctionSample.ts][sqlresourcesgetsqluserdefinedfunctionsample] | Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionGet.json | +| [sqlResourcesListClientEncryptionKeysSample.ts][sqlresourceslistclientencryptionkeyssample] | Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeysList.json | +| [sqlResourcesListSqlContainerPartitionMergeSample.ts][sqlresourceslistsqlcontainerpartitionmergesample] | Merges the partitions of a SQL Container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerPartitionMerge.json | +| [sqlResourcesListSqlContainersSample.ts][sqlresourceslistsqlcontainerssample] | Lists the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerList.json | +| [sqlResourcesListSqlDatabasesSample.ts][sqlresourceslistsqldatabasessample] | Lists the SQL databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseList.json | +| [sqlResourcesListSqlRoleAssignmentsSample.ts][sqlresourceslistsqlroleassignmentssample] | Retrieves the list of all Azure Cosmos DB SQL Role Assignments. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentList.json | +| [sqlResourcesListSqlRoleDefinitionsSample.ts][sqlresourceslistsqlroledefinitionssample] | Retrieves the list of all Azure Cosmos DB SQL Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionList.json | +| [sqlResourcesListSqlStoredProceduresSample.ts][sqlresourceslistsqlstoredproceduressample] | Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureList.json | +| [sqlResourcesListSqlTriggersSample.ts][sqlresourceslistsqltriggerssample] | Lists the SQL trigger under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerList.json | +| [sqlResourcesListSqlUserDefinedFunctionsSample.ts][sqlresourceslistsqluserdefinedfunctionssample] | Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionList.json | +| [sqlResourcesMigrateSqlContainerToAutoscaleSample.ts][sqlresourcesmigratesqlcontainertoautoscalesample] | Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToAutoscale.json | +| [sqlResourcesMigrateSqlContainerToManualThroughputSample.ts][sqlresourcesmigratesqlcontainertomanualthroughputsample] | Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToManualThroughput.json | +| [sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts][sqlresourcesmigratesqldatabasetoautoscalesample] | Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json | +| [sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts][sqlresourcesmigratesqldatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json | +| [sqlResourcesRetrieveContinuousBackupInformationSample.ts][sqlresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a container resource. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerBackupInformation.json | +| [sqlResourcesSqlContainerRedistributeThroughputSample.ts][sqlresourcessqlcontainerredistributethroughputsample] | Redistribute throughput for an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json | +| [sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts][sqlresourcessqlcontainerretrievethroughputdistributionsample] | Retrieve throughput distribution for an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json | +| [sqlResourcesSqlDatabasePartitionMergeSample.ts][sqlresourcessqldatabasepartitionmergesample] | Merges the partitions of a SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabasePartitionMerge.json | +| [sqlResourcesSqlDatabaseRedistributeThroughputSample.ts][sqlresourcessqldatabaseredistributethroughputsample] | Redistribute throughput for an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRedistributeThroughput.json | +| [sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts][sqlresourcessqldatabaseretrievethroughputdistributionsample] | Retrieve throughput distribution for an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRetrieveThroughputDistribution.json | +| [sqlResourcesUpdateSqlContainerThroughputSample.ts][sqlresourcesupdatesqlcontainerthroughputsample] | Update RUs per second of an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputUpdate.json | +| [sqlResourcesUpdateSqlDatabaseThroughputSample.ts][sqlresourcesupdatesqldatabasethroughputsample] | Update RUs per second of an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputUpdate.json | +| [tableResourcesCreateUpdateTableRoleAssignmentSample.ts][tableresourcescreateupdatetableroleassignmentsample] | Creates or updates an Azure Cosmos DB Table Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentCreateUpdate.json | +| [tableResourcesCreateUpdateTableRoleDefinitionSample.ts][tableresourcescreateupdatetableroledefinitionsample] | Creates or updates an Azure Cosmos DB Table Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionCreateUpdate.json | +| [tableResourcesCreateUpdateTableSample.ts][tableresourcescreateupdatetablesample] | Create or update an Azure Cosmos DB Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableCreateUpdate.json | +| [tableResourcesDeleteTableRoleAssignmentSample.ts][tableresourcesdeletetableroleassignmentsample] | Deletes an existing Azure Cosmos DB Table Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentDelete.json | +| [tableResourcesDeleteTableRoleDefinitionSample.ts][tableresourcesdeletetableroledefinitionsample] | Deletes an existing Azure Cosmos DB Table Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionDelete.json | +| [tableResourcesDeleteTableSample.ts][tableresourcesdeletetablesample] | Deletes an existing Azure Cosmos DB Table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableDelete.json | +| [tableResourcesGetTableRoleAssignmentSample.ts][tableresourcesgettableroleassignmentsample] | Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentGet.json | +| [tableResourcesGetTableRoleDefinitionSample.ts][tableresourcesgettableroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionGet.json | +| [tableResourcesGetTableSample.ts][tableresourcesgettablesample] | Gets the Tables under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableGet.json | +| [tableResourcesGetTableThroughputSample.ts][tableresourcesgettablethroughputsample] | Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputGet.json | +| [tableResourcesListTableRoleAssignmentsSample.ts][tableresourceslisttableroleassignmentssample] | Retrieves the list of all Azure Cosmos DB Table Role Assignments. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentList.json | +| [tableResourcesListTableRoleDefinitionsSample.ts][tableresourceslisttableroledefinitionssample] | Retrieves the list of all Azure Cosmos DB Table Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionList.json | +| [tableResourcesListTablesSample.ts][tableresourceslisttablessample] | Lists the Tables under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableList.json | +| [tableResourcesMigrateTableToAutoscaleSample.ts][tableresourcesmigratetabletoautoscalesample] | Migrate an Azure Cosmos DB Table from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToAutoscale.json | +| [tableResourcesMigrateTableToManualThroughputSample.ts][tableresourcesmigratetabletomanualthroughputsample] | Migrate an Azure Cosmos DB Table from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToManualThroughput.json | +| [tableResourcesRetrieveContinuousBackupInformationSample.ts][tableresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableBackupInformation.json | +| [tableResourcesUpdateTableThroughputSample.ts][tableresourcesupdatetablethroughputsample] | Update RUs per second of an Azure Cosmos DB Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputUpdate.json | +| [throughputPoolAccountCreateSample.ts][throughputpoolaccountcreatesample] | Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountCreate.json | +| [throughputPoolAccountDeleteSample.ts][throughputpoolaccountdeletesample] | Removes an existing Azure Cosmos DB database account from a throughput pool. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountDelete.json | +| [throughputPoolAccountGetSample.ts][throughputpoolaccountgetsample] | Retrieves the properties of an existing Azure Cosmos DB Throughput Pool x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountGet.json | +| [throughputPoolAccountsListSample.ts][throughputpoolaccountslistsample] | Lists all the Azure Cosmos DB accounts available under the subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountsList.json | +| [throughputPoolCreateOrUpdateSample.ts][throughputpoolcreateorupdatesample] | Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolCreate.json | +| [throughputPoolDeleteSample.ts][throughputpooldeletesample] | Deletes an existing Azure Cosmos DB Throughput Pool. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolDelete.json | +| [throughputPoolGetSample.ts][throughputpoolgetsample] | Retrieves the properties of an existing Azure Cosmos DB Throughput Pool x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolGet.json | +| [throughputPoolUpdateSample.ts][throughputpoolupdatesample] | Updates the properties of an existing Azure Cosmos DB Throughput Pool. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolUpdate.json | +| [throughputPoolsListByResourceGroupSample.ts][throughputpoolslistbyresourcegroupsample] | List all the ThroughputPools in a given resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json | +| [throughputPoolsListSample.ts][throughputpoolslistsample] | Lists all the Azure Cosmos DB Throughput Pools available under the subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/cassandraClustersCreateUpdateSample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx dev-tool run vendored cross-env COSMOSDB_SUBSCRIPTION_ID="" COSMOSDB_RESOURCE_GROUP="" node dist/cassandraClustersCreateUpdateSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[cassandraclusterscreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersCreateUpdateSample.ts +[cassandraclustersdeallocatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersDeallocateSample.ts +[cassandraclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersDeleteSample.ts +[cassandraclustersgetbackupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetBackupSample.ts +[cassandraclustersgetcommandasyncsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetCommandAsyncSample.ts +[cassandraclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetSample.ts +[cassandraclustersinvokecommandasyncsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersInvokeCommandAsyncSample.ts +[cassandraclustersinvokecommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersInvokeCommandSample.ts +[cassandraclusterslistbackupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListBackupsSample.ts +[cassandraclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListByResourceGroupSample.ts +[cassandraclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListBySubscriptionSample.ts +[cassandraclusterslistcommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListCommandSample.ts +[cassandraclustersstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersStartSample.ts +[cassandraclustersstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersStatusSample.ts +[cassandraclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersUpdateSample.ts +[cassandradatacenterscreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersCreateUpdateSample.ts +[cassandradatacentersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersDeleteSample.ts +[cassandradatacentersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersGetSample.ts +[cassandradatacenterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersListSample.ts +[cassandradatacentersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersUpdateSample.ts +[cassandraresourcescreateupdatecassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts +[cassandraresourcescreateupdatecassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraTableSample.ts +[cassandraresourcescreateupdatecassandraviewsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraViewSample.ts +[cassandraresourcesdeletecassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraKeyspaceSample.ts +[cassandraresourcesdeletecassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraTableSample.ts +[cassandraresourcesdeletecassandraviewsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraViewSample.ts +[cassandraresourcesgetcassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraKeyspaceSample.ts +[cassandraresourcesgetcassandrakeyspacethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts +[cassandraresourcesgetcassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraTableSample.ts +[cassandraresourcesgetcassandratablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraTableThroughputSample.ts +[cassandraresourcesgetcassandraviewsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewSample.ts +[cassandraresourcesgetcassandraviewthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewThroughputSample.ts +[cassandraresourceslistcassandrakeyspacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraKeyspacesSample.ts +[cassandraresourceslistcassandratablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraTablesSample.ts +[cassandraresourceslistcassandraviewssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraViewsSample.ts +[cassandraresourcesmigratecassandrakeyspacetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts +[cassandraresourcesmigratecassandrakeyspacetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts +[cassandraresourcesmigratecassandratabletoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts +[cassandraresourcesmigratecassandratabletomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts +[cassandraresourcesmigratecassandraviewtoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts +[cassandraresourcesmigratecassandraviewtomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts +[cassandraresourcesupdatecassandrakeyspacethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts +[cassandraresourcesupdatecassandratablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraTableThroughputSample.ts +[cassandraresourcesupdatecassandraviewthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraViewThroughputSample.ts +[chaosfaultenabledisablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultEnableDisableSample.ts +[chaosfaultgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultGetSample.ts +[chaosfaultlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultListSample.ts +[collectionlistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListMetricDefinitionsSample.ts +[collectionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListMetricsSample.ts +[collectionlistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListUsagesSample.ts +[collectionpartitionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionListMetricsSample.ts +[collectionpartitionlistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionListUsagesSample.ts +[collectionpartitionregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionRegionListMetricsSample.ts +[collectionregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionRegionListMetricsSample.ts +[datatransferjobscancelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCancelSample.ts +[datatransferjobscompletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCompleteSample.ts +[datatransferjobscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCreateSample.ts +[datatransferjobsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsGetSample.ts +[datatransferjobslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsListByDatabaseAccountSample.ts +[datatransferjobspausesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsPauseSample.ts +[datatransferjobsresumesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsResumeSample.ts +[databaseaccountregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountRegionListMetricsSample.ts +[databaseaccountschecknameexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsCheckNameExistsSample.ts +[databaseaccountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsCreateOrUpdateSample.ts +[databaseaccountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsDeleteSample.ts +[databaseaccountsfailoverprioritychangesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsFailoverPriorityChangeSample.ts +[databaseaccountsgetreadonlykeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsGetReadOnlyKeysSample.ts +[databaseaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsGetSample.ts +[databaseaccountslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListByResourceGroupSample.ts +[databaseaccountslistconnectionstringssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListConnectionStringsSample.ts +[databaseaccountslistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListKeysSample.ts +[databaseaccountslistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListMetricDefinitionsSample.ts +[databaseaccountslistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListMetricsSample.ts +[databaseaccountslistreadonlykeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListReadOnlyKeysSample.ts +[databaseaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListSample.ts +[databaseaccountslistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListUsagesSample.ts +[databaseaccountsofflineregionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsOfflineRegionSample.ts +[databaseaccountsonlineregionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsOnlineRegionSample.ts +[databaseaccountsregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsRegenerateKeySample.ts +[databaseaccountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsUpdateSample.ts +[databaselistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListMetricDefinitionsSample.ts +[databaselistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListMetricsSample.ts +[databaselistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListUsagesSample.ts +[graphresourcescreateupdategraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesCreateUpdateGraphSample.ts +[graphresourcesdeletegraphresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesDeleteGraphResourceSample.ts +[graphresourcesgetgraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesGetGraphSample.ts +[graphresourceslistgraphssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesListGraphsSample.ts +[gremlinresourcescreateupdategremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts +[gremlinresourcescreateupdategremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesCreateUpdateGremlinGraphSample.ts +[gremlinresourcesdeletegremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesDeleteGremlinDatabaseSample.ts +[gremlinresourcesdeletegremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesDeleteGremlinGraphSample.ts +[gremlinresourcesgetgremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinDatabaseSample.ts +[gremlinresourcesgetgremlindatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinDatabaseThroughputSample.ts +[gremlinresourcesgetgremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinGraphSample.ts +[gremlinresourcesgetgremlingraphthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinGraphThroughputSample.ts +[gremlinresourceslistgremlindatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesListGremlinDatabasesSample.ts +[gremlinresourceslistgremlingraphssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesListGremlinGraphsSample.ts +[gremlinresourcesmigrategremlindatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts +[gremlinresourcesmigrategremlindatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts +[gremlinresourcesmigrategremlingraphtoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts +[gremlinresourcesmigrategremlingraphtomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts +[gremlinresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesRetrieveContinuousBackupInformationSample.ts +[gremlinresourcesupdategremlindatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts +[gremlinresourcesupdategremlingraphthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesUpdateGremlinGraphThroughputSample.ts +[locationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/locationsGetSample.ts +[locationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/locationsListSample.ts +[mongodbresourcescreateupdatemongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts +[mongodbresourcescreateupdatemongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts +[mongodbresourcescreateupdatemongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts +[mongodbresourcescreateupdatemongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts +[mongodbresourcesdeletemongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoDbcollectionSample.ts +[mongodbresourcesdeletemongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoDbdatabaseSample.ts +[mongodbresourcesdeletemongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts +[mongodbresourcesdeletemongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoUserDefinitionSample.ts +[mongodbresourcesgetmongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbcollectionSample.ts +[mongodbresourcesgetmongodbcollectionthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts +[mongodbresourcesgetmongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbdatabaseSample.ts +[mongodbresourcesgetmongodbdatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts +[mongodbresourcesgetmongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoRoleDefinitionSample.ts +[mongodbresourcesgetmongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoUserDefinitionSample.ts +[mongodbresourceslistmongodbcollectionpartitionmergesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts +[mongodbresourceslistmongodbcollectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbcollectionsSample.ts +[mongodbresourceslistmongodbdatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbdatabasesSample.ts +[mongodbresourceslistmongoroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoRoleDefinitionsSample.ts +[mongodbresourceslistmongouserdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoUserDefinitionsSample.ts +[mongodbresourcesmigratemongodbcollectiontoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts +[mongodbresourcesmigratemongodbcollectiontomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts +[mongodbresourcesmigratemongodbdatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts +[mongodbresourcesmigratemongodbdatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts +[mongodbresourcesmongodbcontainerredistributethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts +[mongodbresourcesmongodbcontainerretrievethroughputdistributionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts +[mongodbresourcesmongodbdatabasepartitionmergesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts +[mongodbresourcesmongodbdatabaseredistributethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts +[mongodbresourcesmongodbdatabaseretrievethroughputdistributionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts +[mongodbresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts +[mongodbresourcesupdatemongodbcollectionthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts +[mongodbresourcesupdatemongodbdatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts +[networksecurityperimeterconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts +[networksecurityperimeterconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts +[networksecurityperimeterconfigurationsreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts +[notebookworkspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesCreateOrUpdateSample.ts +[notebookworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesDeleteSample.ts +[notebookworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesGetSample.ts +[notebookworkspaceslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesListByDatabaseAccountSample.ts +[notebookworkspaceslistconnectioninfosample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesListConnectionInfoSample.ts +[notebookworkspacesregenerateauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesRegenerateAuthTokenSample.ts +[notebookworkspacesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesStartSample.ts +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/operationsListSample.ts +[partitionkeyrangeidlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/partitionKeyRangeIdListMetricsSample.ts +[partitionkeyrangeidregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/partitionKeyRangeIdRegionListMetricsSample.ts +[percentilelistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileListMetricsSample.ts +[percentilesourcetargetlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileSourceTargetListMetricsSample.ts +[percentiletargetlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileTargetListMetricsSample.ts +[privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts +[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts +[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsGetSample.ts +[privateendpointconnectionslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsListByDatabaseAccountSample.ts +[privatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateLinkResourcesGetSample.ts +[privatelinkresourceslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateLinkResourcesListByDatabaseAccountSample.ts +[restorabledatabaseaccountsgetbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsGetByLocationSample.ts +[restorabledatabaseaccountslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsListByLocationSample.ts +[restorabledatabaseaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsListSample.ts +[restorablegremlindatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinDatabasesListSample.ts +[restorablegremlingraphslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinGraphsListSample.ts +[restorablegremlinresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinResourcesListSample.ts +[restorablemongodbcollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbCollectionsListSample.ts +[restorablemongodbdatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbDatabasesListSample.ts +[restorablemongodbresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbResourcesListSample.ts +[restorablesqlcontainerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlContainersListSample.ts +[restorablesqldatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlDatabasesListSample.ts +[restorablesqlresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlResourcesListSample.ts +[restorabletableresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableTableResourcesListSample.ts +[restorabletableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableTablesListSample.ts +[servicecreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceCreateSample.ts +[servicedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceDeleteSample.ts +[servicegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceGetSample.ts +[servicelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceListSample.ts +[sqlresourcescreateupdateclientencryptionkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateClientEncryptionKeySample.ts +[sqlresourcescreateupdatesqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlContainerSample.ts +[sqlresourcescreateupdatesqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts +[sqlresourcescreateupdatesqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts +[sqlresourcescreateupdatesqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts +[sqlresourcescreateupdatesqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts +[sqlresourcescreateupdatesqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlTriggerSample.ts +[sqlresourcescreateupdatesqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts +[sqlresourcesdeletesqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlContainerSample.ts +[sqlresourcesdeletesqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlDatabaseSample.ts +[sqlresourcesdeletesqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlRoleAssignmentSample.ts +[sqlresourcesdeletesqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlRoleDefinitionSample.ts +[sqlresourcesdeletesqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlStoredProcedureSample.ts +[sqlresourcesdeletesqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlTriggerSample.ts +[sqlresourcesdeletesqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts +[sqlresourcesgetclientencryptionkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetClientEncryptionKeySample.ts +[sqlresourcesgetsqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlContainerSample.ts +[sqlresourcesgetsqlcontainerthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlContainerThroughputSample.ts +[sqlresourcesgetsqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlDatabaseSample.ts +[sqlresourcesgetsqldatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlDatabaseThroughputSample.ts +[sqlresourcesgetsqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlRoleAssignmentSample.ts +[sqlresourcesgetsqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlRoleDefinitionSample.ts +[sqlresourcesgetsqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlStoredProcedureSample.ts +[sqlresourcesgetsqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlTriggerSample.ts +[sqlresourcesgetsqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlUserDefinedFunctionSample.ts +[sqlresourceslistclientencryptionkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListClientEncryptionKeysSample.ts +[sqlresourceslistsqlcontainerpartitionmergesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlContainerPartitionMergeSample.ts +[sqlresourceslistsqlcontainerssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlContainersSample.ts +[sqlresourceslistsqldatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlDatabasesSample.ts +[sqlresourceslistsqlroleassignmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlRoleAssignmentsSample.ts +[sqlresourceslistsqlroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlRoleDefinitionsSample.ts +[sqlresourceslistsqlstoredproceduressample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlStoredProceduresSample.ts +[sqlresourceslistsqltriggerssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlTriggersSample.ts +[sqlresourceslistsqluserdefinedfunctionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlUserDefinedFunctionsSample.ts +[sqlresourcesmigratesqlcontainertoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts +[sqlresourcesmigratesqlcontainertomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts +[sqlresourcesmigratesqldatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts +[sqlresourcesmigratesqldatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts +[sqlresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesRetrieveContinuousBackupInformationSample.ts +[sqlresourcessqlcontainerredistributethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRedistributeThroughputSample.ts +[sqlresourcessqlcontainerretrievethroughputdistributionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts +[sqlresourcessqldatabasepartitionmergesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabasePartitionMergeSample.ts +[sqlresourcessqldatabaseredistributethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRedistributeThroughputSample.ts +[sqlresourcessqldatabaseretrievethroughputdistributionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts +[sqlresourcesupdatesqlcontainerthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesUpdateSqlContainerThroughputSample.ts +[sqlresourcesupdatesqldatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesUpdateSqlDatabaseThroughputSample.ts +[tableresourcescreateupdatetableroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleAssignmentSample.ts +[tableresourcescreateupdatetableroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleDefinitionSample.ts +[tableresourcescreateupdatetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableSample.ts +[tableresourcesdeletetableroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleAssignmentSample.ts +[tableresourcesdeletetableroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleDefinitionSample.ts +[tableresourcesdeletetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableSample.ts +[tableresourcesgettableroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleAssignmentSample.ts +[tableresourcesgettableroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleDefinitionSample.ts +[tableresourcesgettablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableSample.ts +[tableresourcesgettablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableThroughputSample.ts +[tableresourceslisttableroleassignmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleAssignmentsSample.ts +[tableresourceslisttableroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleDefinitionsSample.ts +[tableresourceslisttablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTablesSample.ts +[tableresourcesmigratetabletoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesMigrateTableToAutoscaleSample.ts +[tableresourcesmigratetabletomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesMigrateTableToManualThroughputSample.ts +[tableresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesRetrieveContinuousBackupInformationSample.ts +[tableresourcesupdatetablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesUpdateTableThroughputSample.ts +[throughputpoolaccountcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountCreateSample.ts +[throughputpoolaccountdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountDeleteSample.ts +[throughputpoolaccountgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountGetSample.ts +[throughputpoolaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountsListSample.ts +[throughputpoolcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolCreateOrUpdateSample.ts +[throughputpooldeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolDeleteSample.ts +[throughputpoolgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolGetSample.ts +[throughputpoolupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolUpdateSample.ts +[throughputpoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListByResourceGroupSample.ts +[throughputpoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListSample.ts +[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/package.json b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/package.json similarity index 81% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/package.json rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/package.json index 8bb3e6ea8d4a..ec1f97a8dbe6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-cosmosdb-ts", + "name": "@azure-samples/arm-cosmosdb-ts-beta", "private": true, "version": "1.0.0", - "description": " client library samples for TypeScript", + "description": " client library samples for TypeScript (Beta)", "engines": { "node": ">=18.0.0" }, @@ -29,13 +29,13 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb", "dependencies": { - "@azure/arm-cosmosdb": "latest", + "@azure/arm-cosmosdb": "next", "dotenv": "latest", "@azure/identity": "^4.2.1" }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.7.2", + "typescript": "~5.6.2", "rimraf": "latest" } } diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/sample.env b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/sample.env similarity index 100% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/sample.env rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/sample.env diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersCreateUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersCreateUpdateSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersCreateUpdateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersCreateUpdateSample.ts index 8bca62048601..411d70202b20 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersCreateUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersCreateUpdateSample.ts @@ -10,20 +10,18 @@ // Licensed under the MIT License. import { ClusterResource, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. * * @summary Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterCreate.json */ async function cosmosDbManagedCassandraClusterCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersDeallocateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersDeallocateSample.ts similarity index 89% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersDeallocateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersDeallocateSample.ts index f9921c9e8fe1..75d22f0fc4b2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersDeallocateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersDeallocateSample.ts @@ -10,20 +10,18 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. * * @summary Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDeallocate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDeallocate.json */ async function cosmosDbManagedCassandraClusterDeallocate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersDeleteSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersDeleteSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersDeleteSample.ts index 305528d5a968..e10b930b7720 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a managed Cassandra cluster. * * @summary Deletes a managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterDelete.json */ async function cosmosDbManagedCassandraClusterDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetBackupSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetBackupSample.ts new file mode 100644 index 000000000000..f05cbb420245 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetBackupSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get the properties of an individual backup of this cluster that is available to restore. + * + * @summary Get the properties of an individual backup of this cluster that is available to restore. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackup.json + */ +async function cosmosDbManagedCassandraBackup() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const backupId = "1611250348"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraClusters.getBackup( + resourceGroupName, + clusterName, + backupId, + ); + console.log(result); +} + +async function main() { + cosmosDbManagedCassandraBackup(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetCommandAsyncSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetCommandAsyncSample.ts new file mode 100644 index 000000000000..f2437218b52c --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetCommandAsyncSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get details about a specified command that was run asynchronously. + * + * @summary Get details about a specified command that was run asynchronously. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandResult.json + */ +async function cosmosDbManagedCassandraCommandResult() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const commandId = "318653d0-3da5-4814-b8f6-429f2af0b2a4"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraClusters.getCommandAsync( + resourceGroupName, + clusterName, + commandId, + ); + console.log(result); +} + +async function main() { + cosmosDbManagedCassandraCommandResult(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersGetSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetSample.ts index 6819bbc9eda0..cd610e8f66d7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of a managed Cassandra cluster. * * @summary Get the properties of a managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterGet.json */ async function cosmosDbManagedCassandraClusterGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersInvokeCommandAsyncSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersInvokeCommandAsyncSample.ts new file mode 100644 index 000000000000..ec06e542f3b0 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersInvokeCommandAsyncSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CommandAsyncPostBody, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Invoke a command like nodetool for cassandra maintenance asynchronously + * + * @summary Invoke a command like nodetool for cassandra maintenance asynchronously + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommandAsync.json + */ +async function cosmosDbManagedCassandraCommandAsync() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const body: CommandAsyncPostBody = { + arguments: { status: "" }, + command: "nodetool", + host: "10.0.1.12", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraClusters.beginInvokeCommandAsyncAndWait( + resourceGroupName, + clusterName, + body, + ); + console.log(result); +} + +async function main() { + cosmosDbManagedCassandraCommandAsync(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersInvokeCommandSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersInvokeCommandSample.ts similarity index 86% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersInvokeCommandSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersInvokeCommandSample.ts index fb53183bd163..d9508c107232 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersInvokeCommandSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersInvokeCommandSample.ts @@ -10,25 +10,24 @@ // Licensed under the MIT License. import { CommandPostBody, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Invoke a command like nodetool for cassandra maintenance * * @summary Invoke a command like nodetool for cassandra maintenance - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraCommand.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraCommand.json */ async function cosmosDbManagedCassandraCommand() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; const body: CommandPostBody = { - command: "nodetool status", + arguments: { status: "" }, + command: "nodetool", host: "10.0.1.12", }; const credential = new DefaultAzureCredential(); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListBackupsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListBackupsSample.ts new file mode 100644 index 000000000000..43f156df7fa2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListBackupsSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to List the backups of this cluster that are available to restore. + * + * @summary List the backups of this cluster that are available to restore. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraBackupsList.json + */ +async function cosmosDbManagedCassandraBackupsList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cassandraClusters.listBackups( + resourceGroupName, + clusterName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbManagedCassandraBackupsList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersListByResourceGroupSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListByResourceGroupSample.ts similarity index 89% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersListByResourceGroupSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListByResourceGroupSample.ts index 4c761b69428b..c22224e47a7a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersListByResourceGroupSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListByResourceGroupSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all managed Cassandra clusters in this resource group. * * @summary List all managed Cassandra clusters in this resource group. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json */ async function cosmosDbManagedCassandraClusterListByResourceGroup() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersListBySubscriptionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListBySubscriptionSample.ts similarity index 88% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersListBySubscriptionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListBySubscriptionSample.ts index 6a527fcb2480..8fdfcf27e81e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersListBySubscriptionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListBySubscriptionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all managed Cassandra clusters in this subscription. * * @summary List all managed Cassandra clusters in this subscription. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListBySubscription.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterListBySubscription.json */ async function cosmosDbManagedCassandraClusterListBySubscription() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListCommandSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListCommandSample.ts new file mode 100644 index 000000000000..c028d0d73de5 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersListCommandSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to List all commands currently running on ring info + * + * @summary List all commands currently running on ring info + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraListCommand.json + */ +async function cosmosDbManagedCassandraListCommand() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; + const clusterName = "cassandra-prod"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cassandraClusters.listCommand( + resourceGroupName, + clusterName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbManagedCassandraListCommand(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersStartSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersStartSample.ts similarity index 89% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersStartSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersStartSample.ts index 01ce3133be11..190c9122fd02 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersStartSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersStartSample.ts @@ -10,20 +10,18 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. * * @summary Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterStart.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterStart.json */ async function cosmosDbManagedCassandraClusterStart() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersStatusSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersStatusSample.ts similarity index 88% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersStatusSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersStatusSample.ts index 4611df59ed61..ccfc6aea3692 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersStatusSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersStatusSample.ts @@ -10,20 +10,18 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. * * @summary Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraStatus.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraStatus.json */ async function cosmosDbManagedCassandraStatus() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || - "ffffffff-ffff-ffff-ffff-ffffffffffff"; + "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg"; const clusterName = "cassandra-prod"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersUpdateSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersUpdateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersUpdateSample.ts index 7f32c64094ac..f6b18c085210 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraClustersUpdateSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { ClusterResource, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates some of the properties of a managed Cassandra cluster. * * @summary Updates some of the properties of a managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterPatch.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraClusterPatch.json */ async function cosmosDbManagedCassandraClusterPatch() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersCreateUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersCreateUpdateSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersCreateUpdateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersCreateUpdateSample.ts index 0063d200cede..685b80b61a58 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersCreateUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersCreateUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. * * @summary Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterCreate.json */ async function cosmosDbManagedCassandraDataCenterCreate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersDeleteSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersDeleteSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersDeleteSample.ts index 6fbb7c22e9eb..e92bf2fbaf18 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a managed Cassandra data center. * * @summary Delete a managed Cassandra data center. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterDelete.json */ async function cosmosDbManagedCassandraDataCenterDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersGetSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersGetSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersGetSample.ts index 2f318343f58c..5bc746eadf3e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of a managed Cassandra data center. * * @summary Get the properties of a managed Cassandra data center. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterGet.json */ async function cosmosDbManagedCassandraDataCenterGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersListSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersListSample.ts index f8785f6bb8d0..3e9c05ba21ea 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all data centers in a particular managed Cassandra cluster. * * @summary List all data centers in a particular managed Cassandra cluster. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterList.json */ async function cosmosDbManagedCassandraDataCenterList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersUpdateSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersUpdateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersUpdateSample.ts index c5076eef70d5..ca10b79dbbca 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraDataCentersUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update some of the properties of a managed Cassandra data center. * * @summary Update some of the properties of a managed Cassandra data center. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterPatch.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBManagedCassandraDataCenterPatch.json */ async function cosmosDbManagedCassandraDataCenterUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts index 8852b7800b07..850e8554e675 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Cassandra keyspace * * @summary Create or update an Azure Cosmos DB Cassandra keyspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceCreateUpdate.json */ async function cosmosDbCassandraKeyspaceCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesCreateUpdateCassandraTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraTableSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesCreateUpdateCassandraTableSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraTableSample.ts index 33d54648df1f..04ca68d90a36 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesCreateUpdateCassandraTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraTableSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Cassandra Table * * @summary Create or update an Azure Cosmos DB Cassandra Table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableCreateUpdate.json */ async function cosmosDbCassandraTableCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -39,6 +37,7 @@ async function cosmosDbCassandraTableCreateUpdate() { columns: [{ name: "columnA", type: "Ascii" }], partitionKeys: [{ name: "columnA" }], }, + analyticalStorageTtl: 500, defaultTtl: 100, id: "tableName", }, diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraViewSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraViewSample.ts new file mode 100644 index 000000000000..7493aa2cb317 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesCreateUpdateCassandraViewSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CassandraViewCreateUpdateParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB Cassandra View + * + * @summary Create or update an Azure Cosmos DB Cassandra View + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewCreateUpdate.json + */ +async function cosmosDbCassandraViewCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters = + { + options: {}, + resource: { + id: "viewname", + viewDefinition: + "SELECT columna, columnb, columnc FROM keyspacename.srctablename WHERE columna IS NOT NULL AND columnc IS NOT NULL PRIMARY (columnc, columna)", + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginCreateUpdateCassandraViewAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesDeleteCassandraKeyspaceSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraKeyspaceSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesDeleteCassandraKeyspaceSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraKeyspaceSample.ts index c4da7654f91f..2fa4d45c7121 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesDeleteCassandraKeyspaceSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraKeyspaceSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Cassandra keyspace. * * @summary Deletes an existing Azure Cosmos DB Cassandra keyspace. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceDelete.json */ async function cosmosDbCassandraKeyspaceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesDeleteCassandraTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraTableSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesDeleteCassandraTableSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraTableSample.ts index 38f8a1a96595..e301c83486c3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesDeleteCassandraTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraTableSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Cassandra table. * * @summary Deletes an existing Azure Cosmos DB Cassandra table. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableDelete.json */ async function cosmosDbCassandraTableDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraViewSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraViewSample.ts new file mode 100644 index 000000000000..c6416a7c063e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesDeleteCassandraViewSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Cassandra view. + * + * @summary Deletes an existing Azure Cosmos DB Cassandra view. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewDelete.json + */ +async function cosmosDbCassandraViewDelete() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginDeleteCassandraViewAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraKeyspaceSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraKeyspaceSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraKeyspaceSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraKeyspaceSample.ts index d4409999eff6..522a96117a76 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraKeyspaceSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraKeyspaceSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceGet.json */ async function cosmosDbCassandraKeyspaceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts index 7bcfe6468efa..dbab1b9419f6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputGet.json */ async function cosmosDbCassandraKeyspaceThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraTableSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraTableSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraTableSample.ts index 86671e8836bc..2b878e6c585c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraTableSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Cassandra table under an existing Azure Cosmos DB database account. * * @summary Gets the Cassandra table under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableGet.json */ async function cosmosDbCassandraTableGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraTableThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraTableThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraTableThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraTableThroughputSample.ts index b7da9da74893..af13cc764f1a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraTableThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraTableThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputGet.json */ async function cosmosDbCassandraTableThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewSample.ts new file mode 100644 index 000000000000..e3ead5198ba1 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the Cassandra view under an existing Azure Cosmos DB database account. + * + * @summary Gets the Cassandra view under an existing Azure Cosmos DB database account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewGet.json + */ +async function cosmosDbCassandraViewGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.getCassandraView( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewThroughputSample.ts new file mode 100644 index 000000000000..aefdec56e955 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesGetCassandraViewThroughputSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. + * + * @summary Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputGet.json + */ +async function cosmosDbCassandraViewThroughputGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.cassandraResources.getCassandraViewThroughput( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewThroughputGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesListCassandraKeyspacesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraKeyspacesSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesListCassandraKeyspacesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraKeyspacesSample.ts index 3528b88c0cd2..eed74e2308c7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesListCassandraKeyspacesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraKeyspacesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. * * @summary Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceList.json */ async function cosmosDbCassandraKeyspaceList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesListCassandraTablesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraTablesSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesListCassandraTablesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraTablesSample.ts index dec60e9b51ac..5b41a97f2477 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesListCassandraTablesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraTablesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Cassandra table under an existing Azure Cosmos DB database account. * * @summary Lists the Cassandra table under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableList.json */ async function cosmosDbCassandraTableList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraViewsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraViewsSample.ts new file mode 100644 index 000000000000..89c8a01fad69 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesListCassandraViewsSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * + * @summary Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewList.json + */ +async function cosmosDbCassandraViewList() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cassandraResources.listCassandraViews( + resourceGroupName, + accountName, + keyspaceName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbCassandraViewList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts index 040aa3e633a6..c06ce968e3bb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json */ async function cosmosDbCassandraKeyspaceMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts index 528ad35b9a01..d97927e0b2fc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json */ async function cosmosDbCassandraKeyspaceMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts index eae2d7bcd56d..5f018418032c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToAutoscale.json */ async function cosmosDbCassandraTableMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts index f8619f3a3ddf..c2a7bfa17349 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableMigrateToManualThroughput.json */ async function cosmosDbCassandraTableMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts new file mode 100644 index 000000000000..eab726f8ce01 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToAutoscaleSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * + * @summary Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.json + */ +async function cosmosDbCassandraViewMigrateToAutoscale() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginMigrateCassandraViewToAutoscaleAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewMigrateToAutoscale(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts new file mode 100644 index 000000000000..12c2ef9c1cf8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesMigrateCassandraViewToManualThroughputSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * + * @summary Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.json + */ +async function cosmosDbCassandraViewMigrateToManualThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginMigrateCassandraViewToManualThroughputAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewMigrateToManualThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts index 79380043f650..d04206f87424 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Cassandra Keyspace * * @summary Update RUs per second of an Azure Cosmos DB Cassandra Keyspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json */ async function cosmosDbCassandraKeyspaceThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesUpdateCassandraTableThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraTableThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesUpdateCassandraTableThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraTableThroughputSample.ts index 4486041f9cac..1abd55d1ccb4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesUpdateCassandraTableThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraTableThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Cassandra table * * @summary Update RUs per second of an Azure Cosmos DB Cassandra table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraTableThroughputUpdate.json */ async function cosmosDbCassandraTableThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraViewThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraViewThroughputSample.ts new file mode 100644 index 000000000000..43ec3c94e686 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/cassandraResourcesUpdateCassandraViewThroughputSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ThroughputSettingsUpdateParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Cassandra view + * + * @summary Update RUs per second of an Azure Cosmos DB Cassandra view + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCassandraViewThroughputUpdate.json + */ +async function cosmosDbCassandraViewThroughputUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const keyspaceName = "keyspacename"; + const viewName = "viewname"; + const updateThroughputParameters: ThroughputSettingsUpdateParameters = { + resource: { throughput: 400 }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.cassandraResources.beginUpdateCassandraViewThroughputAndWait( + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbCassandraViewThroughputUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultEnableDisableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultEnableDisableSample.ts new file mode 100644 index 000000000000..feeeed5bf950 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultEnableDisableSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ChaosFaultResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Enable, disable Chaos Fault in a CosmosDB account. + * + * @summary Enable, disable Chaos Fault in a CosmosDB account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultEnableDisable.json + */ +async function chaosFaultEnableDisable() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const chaosFault = "ServiceUnavailability"; + const chaosFaultRequest: ChaosFaultResource = { + action: "Enable", + containerName: "testCollection", + databaseName: "testDatabase", + region: "EastUS", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.chaosFault.beginEnableDisableAndWait( + resourceGroupName, + accountName, + chaosFault, + chaosFaultRequest, + ); + console.log(result); +} + +async function main() { + chaosFaultEnableDisable(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultGetSample.ts new file mode 100644 index 000000000000..00c9822ad5db --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultGetSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * + * @summary Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultGet.json + */ +async function chaosFaultGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const chaosFault = "ServiceUnavailability"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.chaosFault.get( + resourceGroupName, + accountName, + chaosFault, + ); + console.log(result); +} + +async function main() { + chaosFaultGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultListSample.ts new file mode 100644 index 000000000000..c02aaa1aca78 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/chaosFaultListSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to List Chaos Faults for CosmosDB account. + * + * @summary List Chaos Faults for CosmosDB account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/ChaosFaultList.json + */ +async function chaosFaultList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.chaosFault.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + chaosFaultList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListMetricDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListMetricDefinitionsSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListMetricDefinitionsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListMetricDefinitionsSample.ts index 23a5c1caf82b..031f6c048eb7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListMetricDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListMetricDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves metric definitions for the given collection. * * @summary Retrieves metric definitions for the given collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetricDefinitions.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetricDefinitions.json */ async function cosmosDbCollectionGetMetricDefinitions() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListMetricsSample.ts index 309e967251fc..720816bb3971 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account and collection. * * @summary Retrieves the metrics determined by the given filter for the given database account and collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetMetrics.json */ async function cosmosDbCollectionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListUsagesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListUsagesSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListUsagesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListUsagesSample.ts index df5bbd097f9b..52ee5f8c9f28 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListUsagesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionListUsagesSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the usages (most recent storage data) for the given collection. * * @summary Retrieves the usages (most recent storage data) for the given collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionGetUsages.json */ async function cosmosDbCollectionGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionListMetricsSample.ts index f2dbf377db42..a7b8778715f9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given collection, split by partition. * * @summary Retrieves the metrics determined by the given filter for the given collection, split by partition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionListUsagesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionListUsagesSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionListUsagesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionListUsagesSample.ts index de0deff0d157..767062d1fe30 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionListUsagesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionListUsagesSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the usages (most recent storage data) for the given collection, split by partition. * * @summary Retrieves the usages (most recent storage data) for the given collection, split by partition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionGetUsages.json */ async function cosmosDbCollectionGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionRegionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionRegionListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionRegionListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionRegionListMetricsSample.ts index 98412819df88..03d29014f5ba 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionRegionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionPartitionRegionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given collection and region, split by partition. * * @summary Retrieves the metrics determined by the given filter for the given collection and region, split by partition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionRegionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBCollectionPartitionRegionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionRegionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionRegionListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionRegionListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionRegionListMetricsSample.ts index d8f0a40976b7..34206260507c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionRegionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/collectionRegionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account, collection and region. * * @summary Retrieves the metrics determined by the given filter for the given database account, collection and region. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRegionCollectionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRegionCollectionGetMetrics.json */ async function cosmosDbRegionCollectionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCancelSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCancelSample.ts new file mode 100644 index 000000000000..2edc6a3da708 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCancelSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Cancels a Data Transfer Job. + * + * @summary Cancels a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCancel.json + */ +async function cosmosDbDataTransferJobCancel() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.cancel( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobCancel(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCompleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCompleteSample.ts new file mode 100644 index 000000000000..fb60cbec2f20 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCompleteSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Completes a Data Transfer Online Job. + * + * @summary Completes a Data Transfer Online Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobComplete.json + */ +async function cosmosDbDataTransferJobComplete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "e35cc6eb-c8e3-447b-8de6-b83328cd0098"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.complete( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobComplete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCreateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCreateSample.ts new file mode 100644 index 000000000000..32ecbac87cf5 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsCreateSample.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CreateJobRequest, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates a Data Transfer Job. + * + * @summary Creates a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobCreate.json + */ +async function cosmosDbDataTransferJobCreate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const jobCreateParameters: CreateJobRequest = { + properties: { + destination: { + component: "AzureBlobStorage", + containerName: "blob_container", + endpointUrl: "https://blob.windows.net", + }, + source: { + component: "CosmosDBCassandra", + keyspaceName: "keyspace", + tableName: "table", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.create( + resourceGroupName, + accountName, + jobName, + jobCreateParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobCreate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsGetSample.ts new file mode 100644 index 000000000000..ed3584988c38 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsGetSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get a Data Transfer Job. + * + * @summary Get a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobGet.json + */ +async function cosmosDbDataTransferJobGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.get( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsListByDatabaseAccountSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsListByDatabaseAccountSample.ts new file mode 100644 index 000000000000..c21ad829039d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsListByDatabaseAccountSample.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Get a list of Data Transfer jobs. + * + * @summary Get a list of Data Transfer jobs. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobFeed.json + */ +async function cosmosDbDataTransferJobFeed() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataTransferJobs.listByDatabaseAccount( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbDataTransferJobFeed(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsPauseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsPauseSample.ts new file mode 100644 index 000000000000..53c1763dc616 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsPauseSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Pause a Data Transfer Job. + * + * @summary Pause a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobPause.json + */ +async function cosmosDbDataTransferJobPause() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.pause( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobPause(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsResumeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsResumeSample.ts new file mode 100644 index 000000000000..fc65c0182f23 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/dataTransferJobsResumeSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Resumes a Data Transfer Job. + * + * @summary Resumes a Data Transfer Job. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/data-transfer-service/CosmosDBDataTransferJobResume.json + */ +async function cosmosDbDataTransferJobResume() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const jobName = "j1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.dataTransferJobs.resume( + resourceGroupName, + accountName, + jobName, + ); + console.log(result); +} + +async function main() { + cosmosDbDataTransferJobResume(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountRegionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountRegionListMetricsSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountRegionListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountRegionListMetricsSample.ts index 1a6451403d12..cafaf877d6be 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountRegionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountRegionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account and region. * * @summary Retrieves the metrics determined by the given filter for the given database account and region. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsCheckNameExistsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsCheckNameExistsSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsCheckNameExistsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsCheckNameExistsSample.ts index b0c0947cbfb0..d72656f7eaa7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsCheckNameExistsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsCheckNameExistsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. * * @summary Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCheckNameExists.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCheckNameExists.json */ async function cosmosDbDatabaseAccountCheckNameExists() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsCreateOrUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsCreateOrUpdateSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsCreateOrUpdateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsCreateOrUpdateSample.ts index 681afaed2ad1..7cbae53e8821 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsCreateOrUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsCreateOrUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. * * @summary Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCreateMax.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCreateMax.json */ async function cosmosDbDatabaseAccountCreateMax() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -39,6 +37,7 @@ async function cosmosDbDatabaseAccountCreateMax() { }, }, capacity: { totalThroughputLimit: 2000 }, + capacityMode: "Provisioned", consistencyPolicy: { defaultConsistencyLevel: "BoundedStaleness", maxIntervalInSeconds: 10, @@ -48,10 +47,13 @@ async function cosmosDbDatabaseAccountCreateMax() { createMode: "Default", databaseAccountOfferType: "Standard", defaultIdentity: "FirstPartyIdentity", + defaultPriorityLevel: "Low", enableAnalyticalStorage: true, enableBurstCapacity: true, enableFreeTier: false, + enableMaterializedViews: false, enablePerRegionPerPartitionAutoscale: true, + enablePriorityBasedExecution: true, identity: { type: "SystemAssigned,UserAssigned", userAssignedIdentities: { @@ -103,7 +105,7 @@ async function cosmosDbDatabaseAccountCreateMax() { * This sample demonstrates how to Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. * * @summary Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCreateMin.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountCreateMin.json */ async function cosmosDbDatabaseAccountCreateMin() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -135,7 +137,7 @@ async function cosmosDbDatabaseAccountCreateMin() { * This sample demonstrates how to Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. * * @summary Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json */ async function cosmosDbRestoreDatabaseAccountCreateUpdateJson() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -156,6 +158,7 @@ async function cosmosDbRestoreDatabaseAccountCreateUpdateJson() { databaseAccountOfferType: "Standard", enableAnalyticalStorage: true, enableFreeTier: false, + enableMaterializedViews: false, keyVaultKeyUri: "https://myKeyVault.vault.azure.net", kind: "GlobalDocumentDB", location: "westus", @@ -183,6 +186,7 @@ async function cosmosDbRestoreDatabaseAccountCreateUpdateJson() { "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1a97b4bb-f6a0-430e-ade1-638d781830cc", restoreTimestampInUtc: new Date("2021-03-11T22:05:09Z"), restoreWithTtlDisabled: false, + sourceBackupLocation: "westus", }, tags: {}, }; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsDeleteSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsDeleteSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsDeleteSample.ts index 631a75498e50..d47deda2d086 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB database account. * * @summary Deletes an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountDelete.json */ async function cosmosDbDatabaseAccountDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsFailoverPriorityChangeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsFailoverPriorityChangeSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsFailoverPriorityChangeSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsFailoverPriorityChangeSample.ts index 104a6a16a74e..d0c75c20a35b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsFailoverPriorityChangeSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsFailoverPriorityChangeSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. * * @summary Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json */ async function cosmosDbDatabaseAccountFailoverPriorityChange() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsGetReadOnlyKeysSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsGetReadOnlyKeysSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsGetReadOnlyKeysSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsGetReadOnlyKeysSample.ts index a6f1ef65d080..e68c747df5aa 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsGetReadOnlyKeysSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsGetReadOnlyKeysSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the read-only access keys for the specified Azure Cosmos DB database account. * * @summary Lists the read-only access keys for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json */ async function cosmosDbDatabaseAccountListReadOnlyKeys() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsGetSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsGetSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsGetSample.ts index 50f4f4128aa7..810a9bdc5621 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB database account. * * @summary Retrieves the properties of an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGet.json */ async function cosmosDbDatabaseAccountGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListByResourceGroupSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListByResourceGroupSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListByResourceGroupSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListByResourceGroupSample.ts index f01e63be0013..fd565e2067db 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListByResourceGroupSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListByResourceGroupSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the Azure Cosmos DB database accounts available under the given resource group. * * @summary Lists all the Azure Cosmos DB database accounts available under the given resource group. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListByResourceGroup.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListByResourceGroup.json */ async function cosmosDbDatabaseAccountListByResourceGroup() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListConnectionStringsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListConnectionStringsSample.ts similarity index 89% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListConnectionStringsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListConnectionStringsSample.ts index 660869b7eaa2..1b4476829790 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListConnectionStringsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListConnectionStringsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the connection strings for the specified Azure Cosmos DB database account. * * @summary Lists the connection strings for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListConnectionStrings.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListConnectionStrings.json */ async function cosmosDbDatabaseAccountListConnectionStrings() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -37,7 +35,7 @@ async function cosmosDbDatabaseAccountListConnectionStrings() { * This sample demonstrates how to Lists the connection strings for the specified Azure Cosmos DB database account. * * @summary Lists the connection strings for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json */ async function cosmosDbDatabaseAccountListConnectionStringsMongo() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListKeysSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListKeysSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListKeysSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListKeysSample.ts index 36368b5112b7..2ae907d01f01 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListKeysSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListKeysSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the access keys for the specified Azure Cosmos DB database account. * * @summary Lists the access keys for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListKeys.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListKeys.json */ async function cosmosDbDatabaseAccountListKeys() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListMetricDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListMetricDefinitionsSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListMetricDefinitionsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListMetricDefinitionsSample.ts index 5bba6a6c03cd..502cae4889b9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListMetricDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListMetricDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves metric definitions for the given database account. * * @summary Retrieves metric definitions for the given database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json */ async function cosmosDbDatabaseAccountGetMetricDefinitions() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListMetricsSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListMetricsSample.ts index a799ef3a0bb0..542a81fdb045 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account. * * @summary Retrieves the metrics determined by the given filter for the given database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetMetrics.json */ async function cosmosDbDatabaseAccountGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListReadOnlyKeysSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListReadOnlyKeysSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListReadOnlyKeysSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListReadOnlyKeysSample.ts index 92f9088cc4dd..ffa597bb6dba 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListReadOnlyKeysSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListReadOnlyKeysSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the read-only access keys for the specified Azure Cosmos DB database account. * * @summary Lists the read-only access keys for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json */ async function cosmosDbDatabaseAccountListReadOnlyKeys() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListSample.ts index b03a250e3e6c..11218d77b6d8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the Azure Cosmos DB database accounts available under the subscription. * * @summary Lists all the Azure Cosmos DB database accounts available under the subscription. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountList.json */ async function cosmosDbDatabaseAccountList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListUsagesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListUsagesSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListUsagesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListUsagesSample.ts index e90e1b9b51ca..65e393d731ba 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListUsagesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsListUsagesSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the usages (most recent data) for the given database account. * * @summary Retrieves the usages (most recent data) for the given database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountGetUsages.json */ async function cosmosDbDatabaseAccountGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsOfflineRegionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsOfflineRegionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsOfflineRegionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsOfflineRegionSample.ts index 5af9489949d3..371d0edb3998 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsOfflineRegionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsOfflineRegionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Offline the specified region for the specified Azure Cosmos DB database account. * * @summary Offline the specified region for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOfflineRegion.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOfflineRegion.json */ async function cosmosDbDatabaseAccountOfflineRegion() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsOnlineRegionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsOnlineRegionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsOnlineRegionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsOnlineRegionSample.ts index eb2bc8eb4eef..fccc010916f7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsOnlineRegionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsOnlineRegionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Online the specified region for the specified Azure Cosmos DB database account. * * @summary Online the specified region for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOnlineRegion.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountOnlineRegion.json */ async function cosmosDbDatabaseAccountOnlineRegion() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsRegenerateKeySample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsRegenerateKeySample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsRegenerateKeySample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsRegenerateKeySample.ts index 9090bfa49673..9f15fde3d8ed 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsRegenerateKeySample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsRegenerateKeySample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates an access key for the specified Azure Cosmos DB database account. * * @summary Regenerates an access key for the specified Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegenerateKey.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountRegenerateKey.json */ async function cosmosDbDatabaseAccountRegenerateKey() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsUpdateSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsUpdateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsUpdateSample.ts index 00e20216ed8f..8b83424520b6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseAccountsUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the properties of an existing Azure Cosmos DB database account. * * @summary Updates the properties of an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountPatch.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseAccountPatch.json */ async function cosmosDbDatabaseAccountPatch() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -34,21 +32,25 @@ async function cosmosDbDatabaseAccountPatch() { periodicModeProperties: { backupIntervalInMinutes: 240, backupRetentionIntervalInHours: 720, - backupStorageRedundancy: "Local", + backupStorageRedundancy: "Geo", }, }, capacity: { totalThroughputLimit: 2000 }, + capacityMode: "Provisioned", consistencyPolicy: { defaultConsistencyLevel: "BoundedStaleness", maxIntervalInSeconds: 10, maxStalenessPrefix: 200, }, defaultIdentity: "FirstPartyIdentity", + defaultPriorityLevel: "Low", + diagnosticLogSettings: { enableFullTextQuery: "True" }, enableAnalyticalStorage: true, enableBurstCapacity: true, enableFreeTier: false, enablePartitionMerge: true, enablePerRegionPerPartitionAutoscale: true, + enablePriorityBasedExecution: true, identity: { type: "SystemAssigned,UserAssigned", userAssignedIdentities: { diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListMetricDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListMetricDefinitionsSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListMetricDefinitionsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListMetricDefinitionsSample.ts index e49a4bab07c5..3276c1511551 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListMetricDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListMetricDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves metric definitions for the given database. * * @summary Retrieves metric definitions for the given database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetricDefinitions.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetricDefinitions.json */ async function cosmosDbDatabaseGetMetricDefinitions() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListMetricsSample.ts index fadb9e342724..1993a8866dca 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account and database. * * @summary Retrieves the metrics determined by the given filter for the given database account and database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetMetrics.json */ async function cosmosDbDatabaseGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListUsagesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListUsagesSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListUsagesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListUsagesSample.ts index cf52875c6d75..3e68b651a35c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListUsagesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/databaseListUsagesSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the usages (most recent data) for the given database. * * @summary Retrieves the usages (most recent data) for the given database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetUsages.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDatabaseGetUsages.json */ async function cosmosDbDatabaseGetUsages() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesCreateUpdateGraphSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesCreateUpdateGraphSample.ts new file mode 100644 index 000000000000..d160d1aefac6 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesCreateUpdateGraphSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GraphResourceCreateUpdateParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB Graph. + * + * @summary Create or update an Azure Cosmos DB Graph. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceCreateUpdate.json + */ +async function cosmosDbGraphCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const graphName = "graphName"; + const createUpdateGraphParameters: GraphResourceCreateUpdateParameters = { + location: "West US", + options: {}, + resource: { id: "graphName" }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.graphResources.beginCreateUpdateGraphAndWait( + resourceGroupName, + accountName, + graphName, + createUpdateGraphParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbGraphCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesDeleteGraphResourceSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesDeleteGraphResourceSample.ts new file mode 100644 index 000000000000..f59275963a22 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesDeleteGraphResourceSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Graph Resource. + * + * @summary Deletes an existing Azure Cosmos DB Graph Resource. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceDelete.json + */ +async function cosmosDbSqlDatabaseDelete() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const graphName = "graphName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.graphResources.beginDeleteGraphResourceAndWait( + resourceGroupName, + accountName, + graphName, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesGetGraphSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesGetGraphSample.ts new file mode 100644 index 000000000000..c1f4d02a26a8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesGetGraphSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * + * @summary Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceGet.json + */ +async function cosmosDbSqlDatabaseGet() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const graphName = "graphName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.graphResources.getGraph( + resourceGroupName, + accountName, + graphName, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesListGraphsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesListGraphsSample.ts new file mode 100644 index 000000000000..b0b07a0a82c4 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/graphResourcesListGraphsSample.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Lists the graphs under an existing Azure Cosmos DB database account. + * + * @summary Lists the graphs under an existing Azure Cosmos DB database account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphResourceList.json + */ +async function cosmosDbSqlDatabaseList() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.graphResources.listGraphs( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbSqlDatabaseList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts index 1b45231aa4ea..8498b9eec8d9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Gremlin database * * @summary Create or update an Azure Cosmos DB Gremlin database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseCreateUpdate.json */ async function cosmosDbGremlinDatabaseCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesCreateUpdateGremlinGraphSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesCreateUpdateGremlinGraphSample.ts similarity index 94% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesCreateUpdateGremlinGraphSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesCreateUpdateGremlinGraphSample.ts index 782fb365db85..a21aa6a506ae 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesCreateUpdateGremlinGraphSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesCreateUpdateGremlinGraphSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Gremlin graph * * @summary Create or update an Azure Cosmos DB Gremlin graph - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphCreateUpdate.json */ async function cosmosDbGremlinGraphCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesDeleteGremlinDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesDeleteGremlinDatabaseSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesDeleteGremlinDatabaseSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesDeleteGremlinDatabaseSample.ts index 4fd841d1cf2f..611d288306c0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesDeleteGremlinDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesDeleteGremlinDatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Gremlin database. * * @summary Deletes an existing Azure Cosmos DB Gremlin database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseDelete.json */ async function cosmosDbGremlinDatabaseDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesDeleteGremlinGraphSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesDeleteGremlinGraphSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesDeleteGremlinGraphSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesDeleteGremlinGraphSample.ts index 5b79706d064a..eae07c031dd8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesDeleteGremlinGraphSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesDeleteGremlinGraphSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Gremlin graph. * * @summary Deletes an existing Azure Cosmos DB Gremlin graph. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphDelete.json */ async function cosmosDbGremlinGraphDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinDatabaseSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinDatabaseSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinDatabaseSample.ts index 80977d644668..8dcfd129cfe4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinDatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseGet.json */ async function cosmosDbGremlinDatabaseGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinDatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinDatabaseThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinDatabaseThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinDatabaseThroughputSample.ts index 78194bec956f..307c7e1a9a8e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinDatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinDatabaseThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputGet.json */ async function cosmosDbGremlinDatabaseThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinGraphSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinGraphSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinGraphSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinGraphSample.ts index cb3d6e703415..d99fb8d126a1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinGraphSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinGraphSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Gremlin graph under an existing Azure Cosmos DB database account. * * @summary Gets the Gremlin graph under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphGet.json */ async function cosmosDbGremlinGraphGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinGraphThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinGraphThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinGraphThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinGraphThroughputSample.ts index 453afdb5c155..c716c0e18cae 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinGraphThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesGetGremlinGraphThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputGet.json */ async function cosmosDbGremlinGraphThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesListGremlinDatabasesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesListGremlinDatabasesSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesListGremlinDatabasesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesListGremlinDatabasesSample.ts index 4236d592ce70..585723c384d5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesListGremlinDatabasesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesListGremlinDatabasesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Gremlin databases under an existing Azure Cosmos DB database account. * * @summary Lists the Gremlin databases under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseList.json */ async function cosmosDbGremlinDatabaseList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesListGremlinGraphsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesListGremlinGraphsSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesListGremlinGraphsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesListGremlinGraphsSample.ts index b5ce778c1314..9e7d7c519e2c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesListGremlinGraphsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesListGremlinGraphsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Gremlin graph under an existing Azure Cosmos DB database account. * * @summary Lists the Gremlin graph under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphList.json */ async function cosmosDbGremlinGraphList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts index 69782c4fe58b..5d43d612a65d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json */ async function cosmosDbGremlinDatabaseMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts index d911a37643cb..8d047d30b873 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json */ async function cosmosDbGremlinDatabaseMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts index 67cdaf9dda00..e8eb2236e96d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToAutoscale.json */ async function cosmosDbGremlinGraphMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts index 2ed863ef5b31..46c80d3f3512 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json */ async function cosmosDbGremlinGraphMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesRetrieveContinuousBackupInformationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesRetrieveContinuousBackupInformationSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesRetrieveContinuousBackupInformationSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesRetrieveContinuousBackupInformationSample.ts index ec4373512824..ee399e25decd 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesRetrieveContinuousBackupInformationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesRetrieveContinuousBackupInformationSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves continuous backup information for a gremlin graph. * * @summary Retrieves continuous backup information for a gremlin graph. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphBackupInformation.json */ async function cosmosDbGremlinGraphBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts index 0f5af07bc622..9854ba8010e5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Gremlin database * * @summary Update RUs per second of an Azure Cosmos DB Gremlin database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinDatabaseThroughputUpdate.json */ async function cosmosDbGremlinDatabaseThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesUpdateGremlinGraphThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesUpdateGremlinGraphThroughputSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesUpdateGremlinGraphThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesUpdateGremlinGraphThroughputSample.ts index 45967ff8146c..33eb36b3f03a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesUpdateGremlinGraphThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/gremlinResourcesUpdateGremlinGraphThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Gremlin graph * * @summary Update RUs per second of an Azure Cosmos DB Gremlin graph - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGremlinGraphThroughputUpdate.json */ async function cosmosDbGremlinGraphThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/locationsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/locationsGetSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/locationsGetSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/locationsGetSample.ts index 12b11c4a268f..88b93f2cf423 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/locationsGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/locationsGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of an existing Cosmos DB location * * @summary Get the properties of an existing Cosmos DB location - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationGet.json */ async function cosmosDbLocationGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/locationsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/locationsListSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/locationsListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/locationsListSample.ts index 827ef42592e3..18cf84ff8a98 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/locationsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/locationsListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Cosmos DB locations and their properties * * @summary List Cosmos DB locations and their properties - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBLocationList.json */ async function cosmosDbLocationList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts similarity index 52% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts index a5f5546a5919..1fc27ea90bb2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB MongoDB Collection * * @summary Create or update an Azure Cosmos DB MongoDB Collection - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionCreateUpdate.json */ async function cosmosDbMongoDbcollectionCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -34,6 +32,7 @@ async function cosmosDbMongoDbcollectionCreateUpdate() { location: "West US", options: {}, resource: { + analyticalStorageTtl: 500, id: "collectionName", indexes: [ { @@ -59,8 +58,50 @@ async function cosmosDbMongoDbcollectionCreateUpdate() { console.log(result); } +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB MongoDB Collection + * + * @summary Create or update an Azure Cosmos DB MongoDB Collection + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRestore.json + */ +async function cosmosDbMongoDbcollectionRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters = + { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "collectionName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: false, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginCreateUpdateMongoDBCollectionAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + createUpdateMongoDBCollectionParameters, + ); + console.log(result); +} + async function main() { cosmosDbMongoDbcollectionCreateUpdate(); + cosmosDbMongoDbcollectionRestore(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts new file mode 100644 index 000000000000..ae469d804dd3 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + MongoDBDatabaseCreateUpdateParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Create or updates Azure Cosmos DB MongoDB database + * + * @summary Create or updates Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseCreateUpdate.json + */ +async function cosmosDbMongoDbdatabaseCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateMongoDBDatabaseParameters: MongoDBDatabaseCreateUpdateParameters = + { + location: "West US", + options: {}, + resource: { id: "databaseName" }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginCreateUpdateMongoDBDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateMongoDBDatabaseParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or updates Azure Cosmos DB MongoDB database + * + * @summary Create or updates Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRestore.json + */ +async function cosmosDbMongoDbdatabaseRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateMongoDBDatabaseParameters: MongoDBDatabaseCreateUpdateParameters = + { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "databaseName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: false, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginCreateUpdateMongoDBDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateMongoDBDatabaseParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabaseCreateUpdate(); + cosmosDbMongoDbdatabaseRestore(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts index 9070380cdaec..1df3c212e34d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB Mongo Role Definition. * * @summary Creates or updates an Azure Cosmos DB Mongo Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json */ async function cosmosDbMongoDbroleDefinitionCreateUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts index 80ca764b78bb..87abf73550d2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB Mongo User Definition. * * @summary Creates or updates an Azure Cosmos DB Mongo User Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json */ async function cosmosDbMongoDbuserDefinitionCreateUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoDbcollectionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoDbcollectionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoDbcollectionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoDbcollectionSample.ts index c6e379d1fbf9..72582d51c720 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoDbcollectionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoDbcollectionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB MongoDB Collection. * * @summary Deletes an existing Azure Cosmos DB MongoDB Collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionDelete.json */ async function cosmosDbMongoDbcollectionDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoDbdatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoDbdatabaseSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoDbdatabaseSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoDbdatabaseSample.ts index 7394eb59370d..c9b013246fd1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoDbdatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoDbdatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB MongoDB database. * * @summary Deletes an existing Azure Cosmos DB MongoDB database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseDelete.json */ async function cosmosDbMongoDbdatabaseDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts index 9f6ae4850ed5..f05a2cf85266 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Mongo Role Definition. * * @summary Deletes an existing Azure Cosmos DB Mongo Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.json */ async function cosmosDbMongoDbroleDefinitionDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoUserDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoUserDefinitionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoUserDefinitionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoUserDefinitionSample.ts index 49e8c8b36ef2..ac3c6d24743d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoUserDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesDeleteMongoUserDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Mongo User Definition. * * @summary Deletes an existing Azure Cosmos DB Mongo User Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionDelete.json */ async function cosmosDbMongoDbuserDefinitionDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbcollectionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbcollectionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbcollectionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbcollectionSample.ts index a370166595f7..0cbcbde7ea94 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbcollectionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbcollectionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the MongoDB collection under an existing Azure Cosmos DB database account. * * @summary Gets the MongoDB collection under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionGet.json */ async function cosmosDbMongoDbcollectionGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts index b5f5e06dce9f..4e5d7f523f41 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputGet.json */ async function cosmosDbMongoDbcollectionThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbdatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbdatabaseSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbdatabaseSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbdatabaseSample.ts index 14098475bad3..834b853e9612 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbdatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbdatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseGet.json */ async function cosmosDbMongoDbdatabaseGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts index 33c41172b961..fdeaee4e537f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputGet.json */ async function cosmosDbMongoDbdatabaseThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoRoleDefinitionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoRoleDefinitionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoRoleDefinitionSample.ts index 38cb717370c7..1d23c0c8319f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoRoleDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionGet.json */ async function cosmosDbMongoRoleDefinitionGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoUserDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoUserDefinitionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoUserDefinitionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoUserDefinitionSample.ts index 1c2afd267b4b..062aea39354f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoUserDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesGetMongoUserDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionGet.json */ async function cosmosDbMongoDbuserDefinitionGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts new file mode 100644 index 000000000000..74d56a4b01ba --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbcollectionPartitionMergeSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { MergeParameters, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Merges the partitions of a MongoDB Collection + * + * @summary Merges the partitions of a MongoDB Collection + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json + */ +async function cosmosDbMongoDbcollectionPartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const mergeParameters: MergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginListMongoDBCollectionPartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbcollectionPartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoDbcollectionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbcollectionsSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoDbcollectionsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbcollectionsSample.ts index 54cf10855997..08b2319ec6d1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoDbcollectionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbcollectionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the MongoDB collection under an existing Azure Cosmos DB database account. * * @summary Lists the MongoDB collection under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionList.json */ async function cosmosDbMongoDbcollectionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoDbdatabasesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbdatabasesSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoDbdatabasesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbdatabasesSample.ts index 02c8340434ef..943f38e06594 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoDbdatabasesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoDbdatabasesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the MongoDB databases under an existing Azure Cosmos DB database account. * * @summary Lists the MongoDB databases under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseList.json */ async function cosmosDbMongoDbdatabaseList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoRoleDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoRoleDefinitionsSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoRoleDefinitionsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoRoleDefinitionsSample.ts index b75e8679aec0..12b9c855b487 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoRoleDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoRoleDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. * * @summary Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBRoleDefinitionList.json */ async function cosmosDbMongoDbroleDefinitionList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoUserDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoUserDefinitionsSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoUserDefinitionsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoUserDefinitionsSample.ts index 7c83cd5f9d68..0c2ed7fe6b19 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoUserDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesListMongoUserDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Mongo User Definition. * * @summary Retrieves the list of all Azure Cosmos DB Mongo User Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBUserDefinitionList.json */ async function cosmosDbMongoDbuserDefinitionList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts index fad37ea8c404..46d24de98cca 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json */ async function cosmosDbMongoDbcollectionMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts index 36dd9a502a6b..bdbec228a4e5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json */ async function cosmosDbMongoDbcollectionMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts index 1531798ead50..6c5643c14ccf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json */ async function cosmosDbMongoDbdatabaseMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts index 8722cd024afd..9f6a49ed3084 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json */ async function cosmosDbMongoDbdatabaseMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts new file mode 100644 index 000000000000..0aee5ad27e0f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRedistributeThroughputSample.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RedistributeThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB MongoDB container + * + * @summary Redistribute throughput for an Azure Cosmos DB MongoDB container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json + */ +async function cosmosDbMongoDbcollectionRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const redistributeThroughputParameters: RedistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [ + { id: "2", throughput: 5000 }, + { id: "3" }, + ], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBContainerRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbcollectionRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts new file mode 100644 index 000000000000..c7c4876f6a66 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbcontainerRetrieveThroughputDistributionSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RetrieveThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json + */ +async function cosmosDbMongoDbcollectionRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const collectionName = "collectionName"; + const retrieveThroughputParameters: RetrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBContainerRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + collectionName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbcollectionRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts new file mode 100644 index 000000000000..ba34a200e56d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabasePartitionMergeSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { MergeParameters, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Merges the partitions of a MongoDB database + * + * @summary Merges the partitions of a MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabasePartitionMerge.json + */ +async function cosmosDbMongoDbdatabasePartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const mergeParameters: MergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBDatabasePartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabasePartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts new file mode 100644 index 000000000000..e2f48b847d79 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRedistributeThroughputSample.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RedistributeThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB MongoDB database + * + * @summary Redistribute throughput for an Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRedistributeThroughput.json + */ +async function cosmosDbMongoDbdatabaseRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const redistributeThroughputParameters: RedistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [ + { id: "2", throughput: 5000 }, + { id: "3" }, + ], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBDatabaseRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabaseRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts new file mode 100644 index 000000000000..d4fd58df870e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesMongoDbdatabaseRetrieveThroughputDistributionSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RetrieveThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseRetrieveThroughputDistribution.json + */ +async function cosmosDbMongoDbdatabaseRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const retrieveThroughputParameters: RetrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.mongoDBResources.beginMongoDBDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbMongoDbdatabaseRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts index a2017db506b0..4dfad00f3ccb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves continuous backup information for a Mongodb collection. * * @summary Retrieves continuous backup information for a Mongodb collection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionBackupInformation.json */ async function cosmosDbMongoDbcollectionBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts index 9ee4de8a068e..79bfe48e603e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update the RUs per second of an Azure Cosmos DB MongoDB collection * * @summary Update the RUs per second of an Azure Cosmos DB MongoDB collection - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBCollectionThroughputUpdate.json */ async function cosmosDbMongoDbcollectionThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts index 2545c1e17d7e..fb5235739b17 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of the an Azure Cosmos DB MongoDB database * * @summary Update RUs per second of the an Azure Cosmos DB MongoDB database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json */ async function cosmosDbMongoDbdatabaseThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts new file mode 100644 index 000000000000..d265f3400e29 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets effective Network Security Perimeter Configuration for association + * + * @summary Gets effective Network Security Perimeter Configuration for association + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationGet.json + */ +async function namspaceNetworkSecurityPerimeterConfigurationList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "res4410"; + const accountName = "cosmosTest"; + const networkSecurityPerimeterConfigurationName = + "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.networkSecurityPerimeterConfigurations.get( + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + ); + console.log(result); +} + +async function main() { + namspaceNetworkSecurityPerimeterConfigurationList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts new file mode 100644 index 000000000000..222b53253c88 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets list of effective Network Security Perimeter Configuration for cosmos db account + * + * @summary Gets list of effective Network Security Perimeter Configuration for cosmos db account + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationList.json + */ +async function namspaceNetworkSecurityPerimeterConfigurationList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "res4410"; + const accountName = "cosmosTest"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkSecurityPerimeterConfigurations.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + namspaceNetworkSecurityPerimeterConfigurationList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts new file mode 100644 index 000000000000..841961eb1bcd --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Refreshes any information about the association. + * + * @summary Refreshes any information about the association. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/NetworkSecurityPerimeterConfigurationReconcile.json + */ +async function networkSecurityPerimeterConfigurationList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "res4410"; + const accountName = "sto8607"; + const networkSecurityPerimeterConfigurationName = + "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.networkSecurityPerimeterConfigurations.beginReconcileAndWait( + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + ); + console.log(result); +} + +async function main() { + networkSecurityPerimeterConfigurationList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesCreateOrUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesCreateOrUpdateSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesCreateOrUpdateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesCreateOrUpdateSample.ts index 908adf7d05b9..a58b12afe3f5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesCreateOrUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesCreateOrUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates the notebook workspace for a Cosmos DB account. * * @summary Creates the notebook workspace for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceCreate.json */ async function cosmosDbNotebookWorkspaceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesDeleteSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesDeleteSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesDeleteSample.ts index f9a37b876750..28bf63e7d7e9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the notebook workspace for a Cosmos DB account. * * @summary Deletes the notebook workspace for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceDelete.json */ async function cosmosDbNotebookWorkspaceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesGetSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesGetSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesGetSample.ts index 519f9e0a193a..5f18246f505d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the notebook workspace for a Cosmos DB account. * * @summary Gets the notebook workspace for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceGet.json */ async function cosmosDbNotebookWorkspaceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesListByDatabaseAccountSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesListByDatabaseAccountSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesListByDatabaseAccountSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesListByDatabaseAccountSample.ts index 87539e39c1b3..b6fce49dcc20 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesListByDatabaseAccountSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesListByDatabaseAccountSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the notebook workspace resources of an existing Cosmos DB account. * * @summary Gets the notebook workspace resources of an existing Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceList.json */ async function cosmosDbNotebookWorkspaceList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesListConnectionInfoSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesListConnectionInfoSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesListConnectionInfoSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesListConnectionInfoSample.ts index b7b164759ddd..e4e441d1f5f1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesListConnectionInfoSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesListConnectionInfoSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the connection info for the notebook workspace * * @summary Retrieves the connection info for the notebook workspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json */ async function cosmosDbNotebookWorkspaceListConnectionInfo() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesRegenerateAuthTokenSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesRegenerateAuthTokenSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesRegenerateAuthTokenSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesRegenerateAuthTokenSample.ts index 680d466acb9d..fe46ba3a17b9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesRegenerateAuthTokenSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesRegenerateAuthTokenSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates the auth token for the notebook workspace * * @summary Regenerates the auth token for the notebook workspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json */ async function cosmosDbNotebookWorkspaceRegenerateAuthToken() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesStartSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesStartSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesStartSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesStartSample.ts index fb8d32d9c255..d09bed7afe2a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesStartSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/notebookWorkspacesStartSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Starts the notebook workspace * * @summary Starts the notebook workspace - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceStart.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBNotebookWorkspaceStart.json */ async function cosmosDbNotebookWorkspaceStart() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/operationsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/operationsListSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/operationsListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/operationsListSample.ts index 7eceff1a6c29..733fea16797c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/operationsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/operationsListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available Cosmos DB Resource Provider operations. * * @summary Lists all of the available Cosmos DB Resource Provider operations. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBOperationsList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBOperationsList.json */ async function cosmosDbOperationsList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/partitionKeyRangeIdListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/partitionKeyRangeIdListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/partitionKeyRangeIdListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/partitionKeyRangeIdListMetricsSample.ts index 091a2619441f..f0ed2c640a53 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/partitionKeyRangeIdListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/partitionKeyRangeIdListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given partition key range id. * * @summary Retrieves the metrics determined by the given filter for the given partition key range id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/partitionKeyRangeIdRegionListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/partitionKeyRangeIdRegionListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/partitionKeyRangeIdRegionListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/partitionKeyRangeIdRegionListMetricsSample.ts index d2967ae366e7..7f39e7efaebf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/partitionKeyRangeIdRegionListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/partitionKeyRangeIdRegionListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given partition key range id and region. * * @summary Retrieves the metrics determined by the given filter for the given partition key range id and region. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileListMetricsSample.ts index d69d3e80ccdb..f1194d2cd676 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data * * @summary Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileSourceTargetListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileSourceTargetListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileSourceTargetListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileSourceTargetListMetricsSample.ts index 410612c76e28..b5c0e1e198eb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileSourceTargetListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileSourceTargetListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data * * @summary Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileSourceTargetGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileSourceTargetGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileTargetListMetricsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileTargetListMetricsSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileTargetListMetricsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileTargetListMetricsSample.ts index 9fc6e89caba5..965d96d3e603 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileTargetListMetricsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/percentileTargetListMetricsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data * * @summary Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileTargetGetMetrics.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPercentileTargetGetMetrics.json */ async function cosmosDbDatabaseAccountRegionGetMetrics() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts index 1a77f6924db1..d8d57c0828c9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. * * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json */ async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsDeleteSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts index 4859ab59bcf3..0b99ba22859e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a private endpoint connection with a given name. * * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json */ async function deletesAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsGetSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsGetSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsGetSample.ts index 34db25222933..03ad5df6f2e4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a private endpoint connection. * * @summary Gets a private endpoint connection. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsListByDatabaseAccountSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsListByDatabaseAccountSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsListByDatabaseAccountSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsListByDatabaseAccountSample.ts index 182b7d280852..7d603a761440 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsListByDatabaseAccountSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateEndpointConnectionsListByDatabaseAccountSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all private endpoint connections on a Cosmos DB account. * * @summary List all private endpoint connections on a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionListGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateLinkResourcesGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateLinkResourcesGetSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateLinkResourcesGetSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateLinkResourcesGetSample.ts index 0570d1584c85..7a6ffb2aa9bb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateLinkResourcesGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateLinkResourcesGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources that need to be created for a Cosmos DB account. * * @summary Gets the private link resources that need to be created for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateLinkResourcesListByDatabaseAccountSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateLinkResourcesListByDatabaseAccountSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateLinkResourcesListByDatabaseAccountSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateLinkResourcesListByDatabaseAccountSample.ts index 5052eaf5ed55..55a971f61b83 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateLinkResourcesListByDatabaseAccountSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/privateLinkResourcesListByDatabaseAccountSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources that need to be created for a Cosmos DB account. * * @summary Gets the private link resources that need to be created for a Cosmos DB account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceListGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBPrivateLinkResourceListGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsGetByLocationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsGetByLocationSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsGetByLocationSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsGetByLocationSample.ts index 0a5fa126b434..8a4444b16bf8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsGetByLocationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsGetByLocationSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. * * @summary Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json */ async function cosmosDbRestorableDatabaseAccountGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsListByLocationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsListByLocationSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsListByLocationSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsListByLocationSample.ts index a817b37b4407..1cf5a47b5468 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsListByLocationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsListByLocationSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. * * @summary Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json */ async function cosmosDbRestorableDatabaseAccountList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsListSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsListSample.ts index 9143ce37a4a6..77543b78e45c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableDatabaseAccountsListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. * * @summary Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json */ async function cosmosDbRestorableDatabaseAccountNoLocationList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinDatabasesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinDatabasesListSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinDatabasesListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinDatabasesListSample.ts index 5fe1b0512347..7de641246f6d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinDatabasesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinDatabasesListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinDatabaseList.json */ async function cosmosDbRestorableGremlinDatabaseList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinGraphsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinGraphsListSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinGraphsListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinGraphsListSample.ts index d8cb724cbd2d..49e7e79d81f5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinGraphsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinGraphsListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinGraphList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinGraphList.json */ async function cosmosDbRestorableGremlinGraphList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinResourcesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinResourcesListSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinResourcesListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinResourcesListSample.ts index f725472179c5..e2c9f92bd893 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinResourcesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableGremlinResourcesListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableGremlinResourceList.json */ async function cosmosDbRestorableGremlinResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbCollectionsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbCollectionsListSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbCollectionsListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbCollectionsListSample.ts index 3a8481a19a17..2c2664c90be5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbCollectionsListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbCollectionsListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbCollectionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json */ async function cosmosDbRestorableMongodbCollectionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbDatabasesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbDatabasesListSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbDatabasesListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbDatabasesListSample.ts index 2d7f3518b028..bf106fecbbeb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbDatabasesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbDatabasesListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json */ async function cosmosDbRestorableMongodbDatabaseList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbResourcesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbResourcesListSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbResourcesListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbResourcesListSample.ts index 84a4189b2aa1..4ce39ceaf317 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbResourcesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableMongodbResourcesListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableMongodbResourceList.json */ async function cosmosDbRestorableMongodbResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlContainersListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlContainersListSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlContainersListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlContainersListSample.ts index 6e910768f681..1e817caa3218 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlContainersListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlContainersListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlContainerList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlContainerList.json */ async function cosmosDbRestorableSqlContainerList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlDatabasesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlDatabasesListSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlDatabasesListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlDatabasesListSample.ts index d6ca881ff59f..7425bab6690e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlDatabasesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlDatabasesListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlDatabaseList.json */ async function cosmosDbRestorableSqlDatabaseList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlResourcesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlResourcesListSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlResourcesListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlResourcesListSample.ts index 743de4fc0c35..04064c971400 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlResourcesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableSqlResourcesListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableSqlResourceList.json */ async function cosmosDbRestorableSqlResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableTableResourcesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableTableResourcesListSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableTableResourcesListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableTableResourcesListSample.ts index 411ce12e0ae1..be8694e65316 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableTableResourcesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableTableResourcesListSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. * * @summary Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableResourceList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableResourceList.json */ async function cosmosDbRestorableTableResourceList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableTablesListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableTablesListSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableTablesListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableTablesListSample.ts index 26c1f355dfbd..d1ef42b4a501 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableTablesListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/restorableTablesListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission * * @summary Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBRestorableTableList.json */ async function cosmosDbRestorableTableList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceCreateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceCreateSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceCreateSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceCreateSample.ts index d1c053d2466c..c4968c07f416 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceCreateSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceCreateSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceCreate.json */ async function dataTransferServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -50,7 +48,7 @@ async function dataTransferServiceCreate() { * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGraphAPIComputeServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphAPIComputeServiceCreate.json */ async function graphApiComputeServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -79,7 +77,7 @@ async function graphApiComputeServiceCreate() { * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json */ async function materializedViewsBuilderServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -108,7 +106,7 @@ async function materializedViewsBuilderServiceCreate() { * This sample demonstrates how to Creates a service. * * @summary Creates a service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceCreate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceCreate.json */ async function sqlDedicatedGatewayServiceCreate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceDeleteSample.ts similarity index 88% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceDeleteSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceDeleteSample.ts index 28833728c1ad..8fdc4d4cb3e6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceDeleteSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceDeleteSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceDelete.json */ async function dataTransferServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +37,7 @@ async function dataTransferServiceDelete() { * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGraphAPIComputeServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphAPIComputeServiceDelete.json */ async function graphApiComputeServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -60,7 +58,7 @@ async function graphApiComputeServiceDelete() { * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json */ async function materializedViewsBuilderServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -81,7 +79,7 @@ async function materializedViewsBuilderServiceDelete() { * This sample demonstrates how to Deletes service with the given serviceName. * * @summary Deletes service with the given serviceName. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceDelete.json */ async function sqlDedicatedGatewayServiceDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceGetSample.ts similarity index 88% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceGetSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceGetSample.ts index 390e1ae433c0..9ddc5d21695d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceGetSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceGetSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBDataTransferServiceGet.json */ async function dataTransferServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -39,7 +37,7 @@ async function dataTransferServiceGet() { * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGraphAPIComputeServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBGraphAPIComputeServiceGet.json */ async function graphApiComputeServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -60,7 +58,7 @@ async function graphApiComputeServiceGet() { * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMaterializedViewsBuilderServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBMaterializedViewsBuilderServiceGet.json */ async function materializedViewsBuilderServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -81,7 +79,7 @@ async function materializedViewsBuilderServiceGet() { * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceGet.json */ async function sqlDedicatedGatewayServiceGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceListSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceListSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceListSample.ts index 5d37ae555d50..26c43e8fc460 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceListSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/serviceListSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the status of service. * * @summary Gets the status of service. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBServicesList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBServicesList.json */ async function cosmosDbServicesList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateClientEncryptionKeySample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateClientEncryptionKeySample.ts similarity index 85% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateClientEncryptionKeySample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateClientEncryptionKeySample.ts index 4249a213b249..69bc19ebcce9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateClientEncryptionKeySample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateClientEncryptionKeySample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). * * @summary Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json */ async function cosmosDbClientEncryptionKeyCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subId"; @@ -40,7 +38,9 @@ async function cosmosDbClientEncryptionKeyCreateUpdate() { algorithm: "RSA-OAEP", value: "AzureKeyVault Key URL", }, - wrappedDataEncryptionKey: Buffer.from("U3dhZ2dlciByb2Nrcw=="), + wrappedDataEncryptionKey: Buffer.from( + "VGhpcyBpcyBhY3R1YWxseSBhbiBhcnJheSBvZiBieXRlcy4gVGhpcyByZXF1ZXN0L3Jlc3BvbnNlIGlzIGJlaW5nIHByZXNlbnRlZCBhcyBhIHN0cmluZyBmb3IgcmVhZGFiaWxpdHkgaW4gdGhlIGV4YW1wbGU=", + ), }, }; const credential = new DefaultAzureCredential(); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlContainerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlContainerSample.ts similarity index 50% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlContainerSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlContainerSample.ts index 387d67ec459f..93875393b1fc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlContainerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlContainerSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL container * * @summary Create or update an Azure Cosmos DB SQL container - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerCreateUpdate.json */ async function cosmosDbSqlContainerCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; @@ -112,8 +110,102 @@ async function cosmosDbSqlContainerCreateUpdate() { console.log(result); } +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL container + * + * @summary Create or update an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRestore.json + */ +async function cosmosDbSqlContainerRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const createUpdateSqlContainerParameters: SqlContainerCreateUpdateParameters = + { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "containerName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: true, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlContainerAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + createUpdateSqlContainerParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL container + * + * @summary Create or update an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlMaterializedViewCreateUpdate.json + */ +async function cosmosDbSqlMaterializedViewCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "mvContainerName"; + const createUpdateSqlContainerParameters: SqlContainerCreateUpdateParameters = + { + location: "West US", + options: {}, + resource: { + id: "mvContainerName", + indexingPolicy: { + automatic: true, + excludedPaths: [], + includedPaths: [ + { + path: "/*", + indexes: [ + { dataType: "String", kind: "Range", precision: -1 }, + { dataType: "Number", kind: "Range", precision: -1 }, + ], + }, + ], + indexingMode: "consistent", + }, + materializedViewDefinition: { + definition: "select * from ROOT", + sourceCollectionId: "sourceContainerName", + }, + partitionKey: { kind: "Hash", paths: ["/mvpk"] }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlContainerAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + createUpdateSqlContainerParameters, + ); + console.log(result); +} + async function main() { cosmosDbSqlContainerCreateUpdate(); + cosmosDbSqlContainerRestore(); + cosmosDbSqlMaterializedViewCreateUpdate(); } main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts new file mode 100644 index 000000000000..aee41e3e72b1 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + SqlDatabaseCreateUpdateParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL database + * + * @summary Create or update an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseCreateUpdate.json + */ +async function cosmosDbSqlDatabaseCreateUpdate() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateSqlDatabaseParameters: SqlDatabaseCreateUpdateParameters = { + location: "West US", + options: {}, + resource: { id: "databaseName" }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateSqlDatabaseParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Create or update an Azure Cosmos DB SQL database + * + * @summary Create or update an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRestore.json + */ +async function cosmosDbSqlDatabaseRestore() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const createUpdateSqlDatabaseParameters: SqlDatabaseCreateUpdateParameters = { + location: "West US", + options: {}, + resource: { + createMode: "Restore", + id: "databaseName", + restoreParameters: { + restoreSource: + "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/restorableDatabaseAccountId", + restoreTimestampInUtc: new Date("2022-07-20T18:28:00Z"), + restoreWithTtlDisabled: true, + }, + }, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.sqlResources.beginCreateUpdateSqlDatabaseAndWait( + resourceGroupName, + accountName, + databaseName, + createUpdateSqlDatabaseParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseCreateUpdate(); + cosmosDbSqlDatabaseRestore(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts similarity index 93% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts index 644f2e5587ae..15764416b3fc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB SQL Role Assignment. * * @summary Creates or updates an Azure Cosmos DB SQL Role Assignment. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json */ async function cosmosDbSqlRoleAssignmentCreateUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts similarity index 94% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts index 011fe662c2ce..de46cfe51251 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an Azure Cosmos DB SQL Role Definition. * * @summary Creates or updates an Azure Cosmos DB SQL Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json */ async function cosmosDbSqlRoleDefinitionCreateUpdate() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts index 9edf562119a7..f6b740de59f9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL storedProcedure * * @summary Create or update an Azure Cosmos DB SQL storedProcedure - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureCreateUpdate.json */ async function cosmosDbSqlStoredProcedureCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlTriggerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlTriggerSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlTriggerSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlTriggerSample.ts index 1e8055bfa4c3..88601055f5f9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlTriggerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlTriggerSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL trigger * * @summary Create or update an Azure Cosmos DB SQL trigger - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerCreateUpdate.json */ async function cosmosDbSqlTriggerCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts index af7f30a448d9..b98443de1238 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB SQL userDefinedFunction * * @summary Create or update an Azure Cosmos DB SQL userDefinedFunction - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json */ async function cosmosDbSqlUserDefinedFunctionCreateUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlContainerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlContainerSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlContainerSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlContainerSample.ts index 9a72a925498f..c574c9359ab1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlContainerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlContainerSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL container. * * @summary Deletes an existing Azure Cosmos DB SQL container. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerDelete.json */ async function cosmosDbSqlContainerDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlDatabaseSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlDatabaseSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlDatabaseSample.ts index 21d9aefcc03c..ff3a5e53f618 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlDatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL database. * * @summary Deletes an existing Azure Cosmos DB SQL database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseDelete.json */ async function cosmosDbSqlDatabaseDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlRoleAssignmentSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlRoleAssignmentSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlRoleAssignmentSample.ts index f614dcffb3dc..d40bbe6e8700 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlRoleAssignmentSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlRoleAssignmentSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL Role Assignment. * * @summary Deletes an existing Azure Cosmos DB SQL Role Assignment. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentDelete.json */ async function cosmosDbSqlRoleAssignmentDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlRoleDefinitionSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlRoleDefinitionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlRoleDefinitionSample.ts index 5ae8e0f3f36e..fb5c60bdd580 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlRoleDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL Role Definition. * * @summary Deletes an existing Azure Cosmos DB SQL Role Definition. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionDelete.json */ async function cosmosDbSqlRoleDefinitionDelete() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlStoredProcedureSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlStoredProcedureSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlStoredProcedureSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlStoredProcedureSample.ts index 8fe9920e9a59..7a5ae103d0c7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlStoredProcedureSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlStoredProcedureSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL storedProcedure. * * @summary Deletes an existing Azure Cosmos DB SQL storedProcedure. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureDelete.json */ async function cosmosDbSqlStoredProcedureDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlTriggerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlTriggerSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlTriggerSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlTriggerSample.ts index 1038bf68a3bf..2668b6d00544 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlTriggerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlTriggerSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL trigger. * * @summary Deletes an existing Azure Cosmos DB SQL trigger. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerDelete.json */ async function cosmosDbSqlTriggerDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts index ffa1ce204b3c..7a48e4cc98b9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB SQL userDefinedFunction. * * @summary Deletes an existing Azure Cosmos DB SQL userDefinedFunction. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionDelete.json */ async function cosmosDbSqlUserDefinedFunctionDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetClientEncryptionKeySample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetClientEncryptionKeySample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetClientEncryptionKeySample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetClientEncryptionKeySample.ts index b9d252657856..776b59511ee5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetClientEncryptionKeySample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetClientEncryptionKeySample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. * * @summary Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeyGet.json */ async function cosmosDbClientEncryptionKeyGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlContainerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlContainerSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlContainerSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlContainerSample.ts index a10a556c43e1..a334025b1368 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlContainerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlContainerSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL container under an existing Azure Cosmos DB database account. * * @summary Gets the SQL container under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerGet.json */ async function cosmosDbSqlContainerGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlContainerThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlContainerThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlContainerThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlContainerThroughputSample.ts index 8c1ca6c9cd00..001e6596b1a7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlContainerThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlContainerThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. * * @summary Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputGet.json */ async function cosmosDbSqlContainerThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlDatabaseSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlDatabaseSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlDatabaseSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlDatabaseSample.ts index 773d81ac43fa..b29b4990fb39 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlDatabaseSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlDatabaseSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseGet.json */ async function cosmosDbSqlDatabaseGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlDatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlDatabaseThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlDatabaseThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlDatabaseThroughputSample.ts index 99df276c5eb2..a17331412c5f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlDatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlDatabaseThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputGet.json */ async function cosmosDbSqlDatabaseThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlRoleAssignmentSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlRoleAssignmentSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlRoleAssignmentSample.ts index c3d3cedb1feb..4f5cf95f2c6b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlRoleAssignmentSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlRoleAssignmentSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentGet.json */ async function cosmosDbSqlRoleAssignmentGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlRoleDefinitionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlRoleDefinitionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlRoleDefinitionSample.ts index e2c888c6c160..f7cb3a99763a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlRoleDefinitionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlRoleDefinitionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. * * @summary Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionGet.json */ async function cosmosDbSqlRoleDefinitionGet() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlStoredProcedureSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlStoredProcedureSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlStoredProcedureSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlStoredProcedureSample.ts index 17a3fc0a13d9..d0313a507152 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlStoredProcedureSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlStoredProcedureSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. * * @summary Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureGet.json */ async function cosmosDbSqlStoredProcedureGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlTriggerSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlTriggerSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlTriggerSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlTriggerSample.ts index 0ada7798453f..30ea6fd7e186 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlTriggerSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlTriggerSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL trigger under an existing Azure Cosmos DB database account. * * @summary Gets the SQL trigger under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerGet.json */ async function cosmosDbSqlTriggerGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlUserDefinedFunctionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlUserDefinedFunctionSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlUserDefinedFunctionSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlUserDefinedFunctionSample.ts index 819b3cd55e1b..fc0545fdd179 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlUserDefinedFunctionSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesGetSqlUserDefinedFunctionSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * * @summary Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionGet.json */ async function cosmosDbSqlUserDefinedFunctionGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListClientEncryptionKeysSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListClientEncryptionKeysSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListClientEncryptionKeysSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListClientEncryptionKeysSample.ts index 5386fc292734..6e7284e70021 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListClientEncryptionKeysSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListClientEncryptionKeysSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. * * @summary Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeysList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlClientEncryptionKeysList.json */ async function cosmosDbClientEncryptionKeysList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subId"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlContainerPartitionMergeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlContainerPartitionMergeSample.ts new file mode 100644 index 000000000000..49d55c241776 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlContainerPartitionMergeSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { MergeParameters, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Merges the partitions of a SQL Container + * + * @summary Merges the partitions of a SQL Container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerPartitionMerge.json + */ +async function cosmosDbSqlContainerPartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const mergeParameters: MergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginListSqlContainerPartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlContainerPartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlContainersSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlContainersSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlContainersSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlContainersSample.ts index c8b4e713a6c8..d7d9c1735cd3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlContainersSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlContainersSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL container under an existing Azure Cosmos DB database account. * * @summary Lists the SQL container under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerList.json */ async function cosmosDbSqlContainerList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlDatabasesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlDatabasesSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlDatabasesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlDatabasesSample.ts index 8fdcbcd5420b..ba8f753263f4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlDatabasesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlDatabasesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL databases under an existing Azure Cosmos DB database account. * * @summary Lists the SQL databases under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseList.json */ async function cosmosDbSqlDatabaseList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlRoleAssignmentsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlRoleAssignmentsSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlRoleAssignmentsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlRoleAssignmentsSample.ts index 031f8528ffad..bb8baa381290 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlRoleAssignmentsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlRoleAssignmentsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB SQL Role Assignments. * * @summary Retrieves the list of all Azure Cosmos DB SQL Role Assignments. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleAssignmentList.json */ async function cosmosDbSqlRoleAssignmentList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlRoleDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlRoleDefinitionsSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlRoleDefinitionsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlRoleDefinitionsSample.ts index 60b680d26aef..8c870d4a7b2e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlRoleDefinitionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlRoleDefinitionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB SQL Role Definitions. * * @summary Retrieves the list of all Azure Cosmos DB SQL Role Definitions. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlRoleDefinitionList.json */ async function cosmosDbSqlRoleDefinitionList() { const subscriptionId = diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlStoredProceduresSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlStoredProceduresSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlStoredProceduresSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlStoredProceduresSample.ts index 9eab0671efa6..26cdcb0878b9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlStoredProceduresSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlStoredProceduresSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. * * @summary Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlStoredProcedureList.json */ async function cosmosDbSqlStoredProcedureList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlTriggersSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlTriggersSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlTriggersSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlTriggersSample.ts index 135179faf833..ff5316a00a5d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlTriggersSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlTriggersSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL trigger under an existing Azure Cosmos DB database account. * * @summary Lists the SQL trigger under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlTriggerList.json */ async function cosmosDbSqlTriggerList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlUserDefinedFunctionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlUserDefinedFunctionsSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlUserDefinedFunctionsSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlUserDefinedFunctionsSample.ts index 7310f9cf4445..de73cd31a9a3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlUserDefinedFunctionsSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesListSqlUserDefinedFunctionsSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * * @summary Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlUserDefinedFunctionList.json */ async function cosmosDbSqlUserDefinedFunctionList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts index 749db4702caf..322c116eb11d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToAutoscale.json */ async function cosmosDbSqlContainerMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts index e4d687a7ef15..6ad91194f88a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerMigrateToManualThroughput.json */ async function cosmosDbSqlContainerMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts index 288e57b80d14..65f5576a47a1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json */ async function cosmosDbSqlDatabaseMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts index 255c4027613b..74617f54969e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json */ async function cosmosDbSqlDatabaseMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesRetrieveContinuousBackupInformationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesRetrieveContinuousBackupInformationSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesRetrieveContinuousBackupInformationSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesRetrieveContinuousBackupInformationSample.ts index 4ed7d80b2fee..1a13a92be337 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesRetrieveContinuousBackupInformationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesRetrieveContinuousBackupInformationSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves continuous backup information for a container resource. * * @summary Retrieves continuous backup information for a container resource. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerBackupInformation.json */ async function cosmosDbSqlContainerBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRedistributeThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRedistributeThroughputSample.ts new file mode 100644 index 000000000000..7257e6bd3c10 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRedistributeThroughputSample.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RedistributeThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB SQL container + * + * @summary Redistribute throughput for an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json + */ +async function cosmosDbSqlContainerRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const redistributeThroughputParameters: RedistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [ + { id: "2", throughput: 5000 }, + { id: "3" }, + ], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginSqlContainerRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlContainerRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts new file mode 100644 index 000000000000..8dd7fcb86703 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlContainerRetrieveThroughputDistributionSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RetrieveThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB SQL container + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB SQL container + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json + */ +async function cosmosDbSqlContainerRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const containerName = "containerName"; + const retrieveThroughputParameters: RetrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginSqlContainerRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + containerName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlContainerRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabasePartitionMergeSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabasePartitionMergeSample.ts new file mode 100644 index 000000000000..f1fb47d47c7a --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabasePartitionMergeSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { MergeParameters, CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Merges the partitions of a SQL database + * + * @summary Merges the partitions of a SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabasePartitionMerge.json + */ +async function cosmosDbSqlDatabasePartitionMerge() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const mergeParameters: MergeParameters = { isDryRun: false }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginSqlDatabasePartitionMergeAndWait( + resourceGroupName, + accountName, + databaseName, + mergeParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabasePartitionMerge(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRedistributeThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRedistributeThroughputSample.ts new file mode 100644 index 000000000000..c6b8f6b21750 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRedistributeThroughputSample.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RedistributeThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Redistribute throughput for an Azure Cosmos DB SQL database + * + * @summary Redistribute throughput for an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRedistributeThroughput.json + */ +async function cosmosDbSqlDatabaseRedistributeThroughput() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const redistributeThroughputParameters: RedistributeThroughputParameters = { + resource: { + sourcePhysicalPartitionThroughputInfo: [ + { id: "2", throughput: 5000 }, + { id: "3" }, + ], + targetPhysicalPartitionThroughputInfo: [ + { id: "0", throughput: 5000 }, + { id: "1", throughput: 5000 }, + ], + throughputPolicy: "custom", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginSqlDatabaseRedistributeThroughputAndWait( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseRedistributeThroughput(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts new file mode 100644 index 000000000000..b2fb85392d96 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesSqlDatabaseRetrieveThroughputDistributionSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RetrieveThroughputParameters, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieve throughput distribution for an Azure Cosmos DB SQL database + * + * @summary Retrieve throughput distribution for an Azure Cosmos DB SQL database + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseRetrieveThroughputDistribution.json + */ +async function cosmosDbSqlDatabaseRetrieveThroughputDistribution() { + const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const accountName = "ddb1"; + const databaseName = "databaseName"; + const retrieveThroughputParameters: RetrieveThroughputParameters = { + resource: { physicalPartitionIds: [{ id: "0" }, { id: "1" }] }, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.sqlResources.beginSqlDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbSqlDatabaseRetrieveThroughputDistribution(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesUpdateSqlContainerThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesUpdateSqlContainerThroughputSample.ts similarity index 92% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesUpdateSqlContainerThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesUpdateSqlContainerThroughputSample.ts index bf09b1bc5192..0871684a0f90 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesUpdateSqlContainerThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesUpdateSqlContainerThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB SQL container * * @summary Update RUs per second of an Azure Cosmos DB SQL container - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlContainerThroughputUpdate.json */ async function cosmosDbSqlContainerThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesUpdateSqlDatabaseThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesUpdateSqlDatabaseThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesUpdateSqlDatabaseThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesUpdateSqlDatabaseThroughputSample.ts index f938c16ab62d..c7af11ab2ae2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesUpdateSqlDatabaseThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/sqlResourcesUpdateSqlDatabaseThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB SQL database * * @summary Update RUs per second of an Azure Cosmos DB SQL database - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBSqlDatabaseThroughputUpdate.json */ async function cosmosDbSqlDatabaseThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleAssignmentSample.ts new file mode 100644 index 000000000000..04f9d9ebc582 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleAssignmentSample.ts @@ -0,0 +1,56 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TableRoleAssignmentResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB Table Role Assignment. + * + * @summary Creates or updates an Azure Cosmos DB Table Role Assignment. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentCreateUpdate.json + */ +async function cosmosDbTableRoleAssignmentCreateUpdate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleAssignmentId = "myRoleAssignmentId"; + const createUpdateTableRoleAssignmentParameters: TableRoleAssignmentResource = + { + principalId: "myPrincipalId", + roleDefinitionId: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/tableRoleDefinitions/myRoleDefinitionId", + scope: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.tableResources.beginCreateUpdateTableRoleAssignmentAndWait( + resourceGroupName, + accountName, + roleAssignmentId, + createUpdateTableRoleAssignmentParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleAssignmentCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleDefinitionSample.ts new file mode 100644 index 000000000000..f48634ace8a3 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableRoleDefinitionSample.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TableRoleDefinitionResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB Table Role Definition. + * + * @summary Creates or updates an Azure Cosmos DB Table Role Definition. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionCreateUpdate.json + */ +async function cosmosDbTableRoleDefinitionCreateUpdate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleDefinitionId = "myRoleDefinitionId"; + const createUpdateTableRoleDefinitionParameters: TableRoleDefinitionResource = + { + typePropertiesType: "CustomRole", + assignableScopes: [ + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/sales", + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases", + ], + permissions: [ + { + dataActions: [ + "Microsoft.DocumentDB/databaseAccounts/tableDatabases/containers/entities/create", + "Microsoft.DocumentDB/databaseAccounts/tableDatabases/containers/entities/read", + ], + notDataActions: [], + }, + ], + roleName: "myRoleName", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.tableResources.beginCreateUpdateTableRoleDefinitionAndWait( + resourceGroupName, + accountName, + roleDefinitionId, + createUpdateTableRoleDefinitionParameters, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleDefinitionCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesCreateUpdateTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesCreateUpdateTableSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableSample.ts index 7995b7e1dda6..c7603d6ee4a4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesCreateUpdateTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesCreateUpdateTableSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update an Azure Cosmos DB Table * * @summary Create or update an Azure Cosmos DB Table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableCreateUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableCreateUpdate.json */ async function cosmosDbTableReplace() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleAssignmentSample.ts new file mode 100644 index 000000000000..472c1e01c61d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleAssignmentSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Table Role Assignment. + * + * @summary Deletes an existing Azure Cosmos DB Table Role Assignment. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentDelete.json + */ +async function cosmosDbTableRoleAssignmentDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleAssignmentId = "myRoleAssignmentId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.tableResources.beginDeleteTableRoleAssignmentAndWait( + resourceGroupName, + accountName, + roleAssignmentId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleAssignmentDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleDefinitionSample.ts new file mode 100644 index 000000000000..24f4abe17266 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableRoleDefinitionSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Table Role Definition. + * + * @summary Deletes an existing Azure Cosmos DB Table Role Definition. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionDelete.json + */ +async function cosmosDbTableRoleDefinitionDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleDefinitionId = "myRoleDefinitionId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = + await client.tableResources.beginDeleteTableRoleDefinitionAndWait( + resourceGroupName, + accountName, + roleDefinitionId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleDefinitionDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesDeleteTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesDeleteTableSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableSample.ts index 4b98a6e095f9..92d99d92ce01 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesDeleteTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesDeleteTableSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing Azure Cosmos DB Table. * * @summary Deletes an existing Azure Cosmos DB Table. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableDelete.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableDelete.json */ async function cosmosDbTableDelete() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleAssignmentSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleAssignmentSample.ts new file mode 100644 index 000000000000..bb44542fb9af --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleAssignmentSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentGet.json + */ +async function cosmosDbTableRoleAssignmentGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleAssignmentId = "myRoleAssignmentId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.getTableRoleAssignment( + resourceGroupName, + accountName, + roleAssignmentId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleAssignmentGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleDefinitionSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleDefinitionSample.ts new file mode 100644 index 000000000000..81a9c5c48808 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableRoleDefinitionSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionGet.json + */ +async function cosmosDbTableRoleDefinitionGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const roleDefinitionId = "myRoleDefinitionId"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.tableResources.getTableRoleDefinition( + resourceGroupName, + accountName, + roleDefinitionId, + ); + console.log(result); +} + +async function main() { + cosmosDbTableRoleDefinitionGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesGetTableSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesGetTableSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableSample.ts index a93f754dc1cc..2076eed43f65 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesGetTableSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Tables under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the Tables under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableGet.json */ async function cosmosDbTableGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesGetTableThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesGetTableThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableThroughputSample.ts index b69ff7564131..1d0f57c75c1d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesGetTableThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesGetTableThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. * * @summary Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputGet.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputGet.json */ async function cosmosDbTableThroughputGet() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleAssignmentsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleAssignmentsSample.ts new file mode 100644 index 000000000000..34c827de43cc --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleAssignmentsSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Table Role Assignments. + * + * @summary Retrieves the list of all Azure Cosmos DB Table Role Assignments. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleAssignmentList.json + */ +async function cosmosDbTableRoleAssignmentList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tableResources.listTableRoleAssignments( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbTableRoleAssignmentList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleDefinitionsSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleDefinitionsSample.ts new file mode 100644 index 000000000000..6dd222724d6b --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTableRoleDefinitionsSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the list of all Azure Cosmos DB Table Role Definitions. + * + * @summary Retrieves the list of all Azure Cosmos DB Table Role Definitions. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/tablerbac/CosmosDBTableRoleDefinitionList.json + */ +async function cosmosDbTableRoleDefinitionList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = + process.env["COSMOSDB_RESOURCE_GROUP"] || "myResourceGroupName"; + const accountName = "myAccountName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tableResources.listTableRoleDefinitions( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbTableRoleDefinitionList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesListTablesSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTablesSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesListTablesSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTablesSample.ts index 8cc3a8c536ed..f2fade798236 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesListTablesSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesListTablesSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Tables under an existing Azure Cosmos DB database account. * * @summary Lists the Tables under an existing Azure Cosmos DB database account. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableList.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableList.json */ async function cosmosDbTableList() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesMigrateTableToAutoscaleSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesMigrateTableToAutoscaleSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesMigrateTableToAutoscaleSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesMigrateTableToAutoscaleSample.ts index 3351c3d2dacc..1a03c2963466 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesMigrateTableToAutoscaleSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesMigrateTableToAutoscaleSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Table from manual throughput to autoscale * * @summary Migrate an Azure Cosmos DB Table from manual throughput to autoscale - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToAutoscale.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToAutoscale.json */ async function cosmosDbTableMigrateToAutoscale() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesMigrateTableToManualThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesMigrateTableToManualThroughputSample.ts similarity index 90% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesMigrateTableToManualThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesMigrateTableToManualThroughputSample.ts index 2f953cc797fc..9bc1e59b13a5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesMigrateTableToManualThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesMigrateTableToManualThroughputSample.ts @@ -10,15 +10,13 @@ // Licensed under the MIT License. import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Migrate an Azure Cosmos DB Table from autoscale to manual throughput * * @summary Migrate an Azure Cosmos DB Table from autoscale to manual throughput - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToManualThroughput.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableMigrateToManualThroughput.json */ async function cosmosDbTableMigrateToManualThroughput() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesRetrieveContinuousBackupInformationSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesRetrieveContinuousBackupInformationSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesRetrieveContinuousBackupInformationSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesRetrieveContinuousBackupInformationSample.ts index db5b04471043..d316ed5418e7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesRetrieveContinuousBackupInformationSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesRetrieveContinuousBackupInformationSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves continuous backup information for a table. * * @summary Retrieves continuous backup information for a table. - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableBackupInformation.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableBackupInformation.json */ async function cosmosDbTableCollectionBackupInformation() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesUpdateTableThroughputSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesUpdateTableThroughputSample.ts similarity index 91% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesUpdateTableThroughputSample.ts rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesUpdateTableThroughputSample.ts index 1ea2878e68e3..3f95ed0fa16a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesUpdateTableThroughputSample.ts +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/tableResourcesUpdateTableThroughputSample.ts @@ -13,15 +13,13 @@ import { CosmosDBManagementClient, } from "@azure/arm-cosmosdb"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update RUs per second of an Azure Cosmos DB Table * * @summary Update RUs per second of an Azure Cosmos DB Table - * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputUpdate.json + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/CosmosDBTableThroughputUpdate.json */ async function cosmosDbTableThroughputUpdate() { const subscriptionId = process.env["COSMOSDB_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountCreateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountCreateSample.ts new file mode 100644 index 000000000000..2b189c064870 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountCreateSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ThroughputPoolAccountResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * + * @summary Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountCreate.json + */ +async function cosmosDbThroughputPoolAccountCreate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const throughputPoolName = "tp1"; + const throughputPoolAccountName = "db1"; + const body: ThroughputPoolAccountResource = { + accountLocation: "West US", + accountResourceIdentifier: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/resourceGroup/rg1/databaseAccounts/db1/", + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPoolAccount.beginCreateAndWait( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + body, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolAccountCreate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountDeleteSample.ts new file mode 100644 index 000000000000..2ed118624d0f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountDeleteSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Removes an existing Azure Cosmos DB database account from a throughput pool. + * + * @summary Removes an existing Azure Cosmos DB database account from a throughput pool. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountDelete.json + */ +async function cosmosDbThroughputPoolAccountDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const throughputPoolAccountName = "db1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPoolAccount.beginDeleteAndWait( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolAccountDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountGetSample.ts new file mode 100644 index 000000000000..d5dfc891b6de --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountGetSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountGet.json + */ +async function cosmosDbThroughputPoolAccountGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const throughputPoolAccountName = "db1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPoolAccount.get( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolAccountGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountsListSample.ts new file mode 100644 index 000000000000..9fce3a1d9c6a --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolAccountsListSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Lists all the Azure Cosmos DB accounts available under the subscription. + * + * @summary Lists all the Azure Cosmos DB accounts available under the subscription. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolAccountsList.json + */ +async function cosmosDbThroughputPoolAccountList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.throughputPoolAccounts.list( + resourceGroupName, + throughputPoolName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbThroughputPoolAccountList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolCreateOrUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolCreateOrUpdateSample.ts new file mode 100644 index 000000000000..39d55fca4edb --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolCreateOrUpdateSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ThroughputPoolResource, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * + * @summary Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when performing updates on an account. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolCreate.json + */ +async function cosmosDbThroughputPoolCreate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const throughputPoolName = "tp1"; + const body: ThroughputPoolResource = { + location: "westus2", + maxThroughput: 10000, + tags: {}, + }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.beginCreateOrUpdateAndWait( + resourceGroupName, + throughputPoolName, + body, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolCreate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolDeleteSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolDeleteSample.ts new file mode 100644 index 000000000000..ba95f40f84c0 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolDeleteSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Deletes an existing Azure Cosmos DB Throughput Pool. + * + * @summary Deletes an existing Azure Cosmos DB Throughput Pool. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolDelete.json + */ +async function cosmosDbThroughputPoolDelete() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.beginDeleteAndWait( + resourceGroupName, + throughputPoolName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolDelete(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolGetSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolGetSample.ts new file mode 100644 index 000000000000..f490c3ea474e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolGetSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * + * @summary Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolGet.json + */ +async function cosmosDbThroughputPoolGet() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const throughputPoolName = "tp1"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.get( + resourceGroupName, + throughputPoolName, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolGet(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolUpdateSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolUpdateSample.ts new file mode 100644 index 000000000000..08a2aeb2813f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolUpdateSample.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + ThroughputPoolUpdate, + ThroughputPoolUpdateOptionalParams, + CosmosDBManagementClient, +} from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * + * @summary Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolUpdate.json + */ +async function cosmosDbThroughputPoolUpdate() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1"; + const throughputPoolName = "tp1"; + const body: ThroughputPoolUpdate = { maxThroughput: 10000 }; + const options: ThroughputPoolUpdateOptionalParams = { body }; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const result = await client.throughputPool.beginUpdateAndWait( + resourceGroupName, + throughputPoolName, + options, + ); + console.log(result); +} + +async function main() { + cosmosDbThroughputPoolUpdate(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListByResourceGroupSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListByResourceGroupSample.ts new file mode 100644 index 000000000000..f122758ddbd8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListByResourceGroupSample.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to List all the ThroughputPools in a given resource group. + * + * @summary List all the ThroughputPools in a given resource group. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json + */ +async function cosmosDbThroughputPoolListByResourceGroup() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rgName"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.throughputPools.listByResourceGroup( + resourceGroupName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbThroughputPoolListByResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListSample.ts b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListSample.ts new file mode 100644 index 000000000000..af755a712c72 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/src/throughputPoolsListSample.ts @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CosmosDBManagementClient } from "@azure/arm-cosmosdb"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * + * @summary Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-12-01-preview/examples/throughputPool/CosmosDBThroughputPoolList.json + */ +async function cosmosDbThroughputPoolList() { + const subscriptionId = + process.env["COSMOSDB_SUBSCRIPTION_ID"] || + "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const credential = new DefaultAzureCredential(); + const client = new CosmosDBManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.throughputPools.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + cosmosDbThroughputPoolList(); +} + +main().catch(console.error); diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/tsconfig.json b/sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/tsconfig.json similarity index 100% rename from sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/tsconfig.json rename to sdk/cosmosdb/arm-cosmosdb/samples/v16-beta/typescript/tsconfig.json diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/README.md b/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/README.md deleted file mode 100644 index 4f59f05c8f8c..000000000000 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/README.md +++ /dev/null @@ -1,428 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [cassandraClustersCreateUpdateSample.js][cassandraclusterscreateupdatesample] | Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterCreate.json | -| [cassandraClustersDeallocateSample.js][cassandraclustersdeallocatesample] | Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDeallocate.json | -| [cassandraClustersDeleteSample.js][cassandraclustersdeletesample] | Deletes a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDelete.json | -| [cassandraClustersGetSample.js][cassandraclustersgetsample] | Get the properties of a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterGet.json | -| [cassandraClustersInvokeCommandSample.js][cassandraclustersinvokecommandsample] | Invoke a command like nodetool for cassandra maintenance x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraCommand.json | -| [cassandraClustersListByResourceGroupSample.js][cassandraclusterslistbyresourcegroupsample] | List all managed Cassandra clusters in this resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json | -| [cassandraClustersListBySubscriptionSample.js][cassandraclusterslistbysubscriptionsample] | List all managed Cassandra clusters in this subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListBySubscription.json | -| [cassandraClustersStartSample.js][cassandraclustersstartsample] | Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterStart.json | -| [cassandraClustersStatusSample.js][cassandraclustersstatussample] | Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraStatus.json | -| [cassandraClustersUpdateSample.js][cassandraclustersupdatesample] | Updates some of the properties of a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterPatch.json | -| [cassandraDataCentersCreateUpdateSample.js][cassandradatacenterscreateupdatesample] | Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterCreate.json | -| [cassandraDataCentersDeleteSample.js][cassandradatacentersdeletesample] | Delete a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterDelete.json | -| [cassandraDataCentersGetSample.js][cassandradatacentersgetsample] | Get the properties of a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterGet.json | -| [cassandraDataCentersListSample.js][cassandradatacenterslistsample] | List all data centers in a particular managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterList.json | -| [cassandraDataCentersUpdateSample.js][cassandradatacentersupdatesample] | Update some of the properties of a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterPatch.json | -| [cassandraResourcesCreateUpdateCassandraKeyspaceSample.js][cassandraresourcescreateupdatecassandrakeyspacesample] | Create or update an Azure Cosmos DB Cassandra keyspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceCreateUpdate.json | -| [cassandraResourcesCreateUpdateCassandraTableSample.js][cassandraresourcescreateupdatecassandratablesample] | Create or update an Azure Cosmos DB Cassandra Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableCreateUpdate.json | -| [cassandraResourcesDeleteCassandraKeyspaceSample.js][cassandraresourcesdeletecassandrakeyspacesample] | Deletes an existing Azure Cosmos DB Cassandra keyspace. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceDelete.json | -| [cassandraResourcesDeleteCassandraTableSample.js][cassandraresourcesdeletecassandratablesample] | Deletes an existing Azure Cosmos DB Cassandra table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableDelete.json | -| [cassandraResourcesGetCassandraKeyspaceSample.js][cassandraresourcesgetcassandrakeyspacesample] | Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceGet.json | -| [cassandraResourcesGetCassandraKeyspaceThroughputSample.js][cassandraresourcesgetcassandrakeyspacethroughputsample] | Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputGet.json | -| [cassandraResourcesGetCassandraTableSample.js][cassandraresourcesgetcassandratablesample] | Gets the Cassandra table under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableGet.json | -| [cassandraResourcesGetCassandraTableThroughputSample.js][cassandraresourcesgetcassandratablethroughputsample] | Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputGet.json | -| [cassandraResourcesListCassandraKeyspacesSample.js][cassandraresourceslistcassandrakeyspacessample] | Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceList.json | -| [cassandraResourcesListCassandraTablesSample.js][cassandraresourceslistcassandratablessample] | Lists the Cassandra table under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableList.json | -| [cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js][cassandraresourcesmigratecassandrakeyspacetoautoscalesample] | Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json | -| [cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js][cassandraresourcesmigratecassandrakeyspacetomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json | -| [cassandraResourcesMigrateCassandraTableToAutoscaleSample.js][cassandraresourcesmigratecassandratabletoautoscalesample] | Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToAutoscale.json | -| [cassandraResourcesMigrateCassandraTableToManualThroughputSample.js][cassandraresourcesmigratecassandratabletomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToManualThroughput.json | -| [cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js][cassandraresourcesupdatecassandrakeyspacethroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra Keyspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json | -| [cassandraResourcesUpdateCassandraTableThroughputSample.js][cassandraresourcesupdatecassandratablethroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputUpdate.json | -| [collectionListMetricDefinitionsSample.js][collectionlistmetricdefinitionssample] | Retrieves metric definitions for the given collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetricDefinitions.json | -| [collectionListMetricsSample.js][collectionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetrics.json | -| [collectionListUsagesSample.js][collectionlistusagessample] | Retrieves the usages (most recent storage data) for the given collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetUsages.json | -| [collectionPartitionListMetricsSample.js][collectionpartitionlistmetricssample] | Retrieves the metrics determined by the given filter for the given collection, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetMetrics.json | -| [collectionPartitionListUsagesSample.js][collectionpartitionlistusagessample] | Retrieves the usages (most recent storage data) for the given collection, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetUsages.json | -| [collectionPartitionRegionListMetricsSample.js][collectionpartitionregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given collection and region, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionRegionGetMetrics.json | -| [collectionRegionListMetricsSample.js][collectionregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account, collection and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRegionCollectionGetMetrics.json | -| [databaseAccountRegionListMetricsSample.js][databaseaccountregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegionGetMetrics.json | -| [databaseAccountsCheckNameExistsSample.js][databaseaccountschecknameexistssample] | Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCheckNameExists.json | -| [databaseAccountsCreateOrUpdateSample.js][databaseaccountscreateorupdatesample] | Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCreateMax.json | -| [databaseAccountsDeleteSample.js][databaseaccountsdeletesample] | Deletes an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountDelete.json | -| [databaseAccountsFailoverPriorityChangeSample.js][databaseaccountsfailoverprioritychangesample] | Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json | -| [databaseAccountsGetReadOnlyKeysSample.js][databaseaccountsgetreadonlykeyssample] | Lists the read-only access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json | -| [databaseAccountsGetSample.js][databaseaccountsgetsample] | Retrieves the properties of an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGet.json | -| [databaseAccountsListByResourceGroupSample.js][databaseaccountslistbyresourcegroupsample] | Lists all the Azure Cosmos DB database accounts available under the given resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListByResourceGroup.json | -| [databaseAccountsListConnectionStringsSample.js][databaseaccountslistconnectionstringssample] | Lists the connection strings for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListConnectionStrings.json | -| [databaseAccountsListKeysSample.js][databaseaccountslistkeyssample] | Lists the access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListKeys.json | -| [databaseAccountsListMetricDefinitionsSample.js][databaseaccountslistmetricdefinitionssample] | Retrieves metric definitions for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json | -| [databaseAccountsListMetricsSample.js][databaseaccountslistmetricssample] | Retrieves the metrics determined by the given filter for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetrics.json | -| [databaseAccountsListReadOnlyKeysSample.js][databaseaccountslistreadonlykeyssample] | Lists the read-only access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json | -| [databaseAccountsListSample.js][databaseaccountslistsample] | Lists all the Azure Cosmos DB database accounts available under the subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountList.json | -| [databaseAccountsListUsagesSample.js][databaseaccountslistusagessample] | Retrieves the usages (most recent data) for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetUsages.json | -| [databaseAccountsOfflineRegionSample.js][databaseaccountsofflineregionsample] | Offline the specified region for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOfflineRegion.json | -| [databaseAccountsOnlineRegionSample.js][databaseaccountsonlineregionsample] | Online the specified region for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOnlineRegion.json | -| [databaseAccountsRegenerateKeySample.js][databaseaccountsregeneratekeysample] | Regenerates an access key for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegenerateKey.json | -| [databaseAccountsUpdateSample.js][databaseaccountsupdatesample] | Updates the properties of an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountPatch.json | -| [databaseListMetricDefinitionsSample.js][databaselistmetricdefinitionssample] | Retrieves metric definitions for the given database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetricDefinitions.json | -| [databaseListMetricsSample.js][databaselistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetrics.json | -| [databaseListUsagesSample.js][databaselistusagessample] | Retrieves the usages (most recent data) for the given database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetUsages.json | -| [gremlinResourcesCreateUpdateGremlinDatabaseSample.js][gremlinresourcescreateupdategremlindatabasesample] | Create or update an Azure Cosmos DB Gremlin database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseCreateUpdate.json | -| [gremlinResourcesCreateUpdateGremlinGraphSample.js][gremlinresourcescreateupdategremlingraphsample] | Create or update an Azure Cosmos DB Gremlin graph x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphCreateUpdate.json | -| [gremlinResourcesDeleteGremlinDatabaseSample.js][gremlinresourcesdeletegremlindatabasesample] | Deletes an existing Azure Cosmos DB Gremlin database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseDelete.json | -| [gremlinResourcesDeleteGremlinGraphSample.js][gremlinresourcesdeletegremlingraphsample] | Deletes an existing Azure Cosmos DB Gremlin graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphDelete.json | -| [gremlinResourcesGetGremlinDatabaseSample.js][gremlinresourcesgetgremlindatabasesample] | Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseGet.json | -| [gremlinResourcesGetGremlinDatabaseThroughputSample.js][gremlinresourcesgetgremlindatabasethroughputsample] | Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputGet.json | -| [gremlinResourcesGetGremlinGraphSample.js][gremlinresourcesgetgremlingraphsample] | Gets the Gremlin graph under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphGet.json | -| [gremlinResourcesGetGremlinGraphThroughputSample.js][gremlinresourcesgetgremlingraphthroughputsample] | Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputGet.json | -| [gremlinResourcesListGremlinDatabasesSample.js][gremlinresourceslistgremlindatabasessample] | Lists the Gremlin databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseList.json | -| [gremlinResourcesListGremlinGraphsSample.js][gremlinresourceslistgremlingraphssample] | Lists the Gremlin graph under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphList.json | -| [gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js][gremlinresourcesmigrategremlindatabasetoautoscalesample] | Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json | -| [gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js][gremlinresourcesmigrategremlindatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json | -| [gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js][gremlinresourcesmigrategremlingraphtoautoscalesample] | Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToAutoscale.json | -| [gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js][gremlinresourcesmigrategremlingraphtomanualthroughputsample] | Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json | -| [gremlinResourcesRetrieveContinuousBackupInformationSample.js][gremlinresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a gremlin graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphBackupInformation.json | -| [gremlinResourcesUpdateGremlinDatabaseThroughputSample.js][gremlinresourcesupdategremlindatabasethroughputsample] | Update RUs per second of an Azure Cosmos DB Gremlin database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputUpdate.json | -| [gremlinResourcesUpdateGremlinGraphThroughputSample.js][gremlinresourcesupdategremlingraphthroughputsample] | Update RUs per second of an Azure Cosmos DB Gremlin graph x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputUpdate.json | -| [locationsGetSample.js][locationsgetsample] | Get the properties of an existing Cosmos DB location x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationGet.json | -| [locationsListSample.js][locationslistsample] | List Cosmos DB locations and their properties x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationList.json | -| [mongoDbResourcesCreateUpdateMongoDbcollectionSample.js][mongodbresourcescreateupdatemongodbcollectionsample] | Create or update an Azure Cosmos DB MongoDB Collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionCreateUpdate.json | -| [mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js][mongodbresourcescreateupdatemongodbdatabasesample] | Create or updates Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseCreateUpdate.json | -| [mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js][mongodbresourcescreateupdatemongoroledefinitionsample] | Creates or updates an Azure Cosmos DB Mongo Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json | -| [mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js][mongodbresourcescreateupdatemongouserdefinitionsample] | Creates or updates an Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json | -| [mongoDbResourcesDeleteMongoDbcollectionSample.js][mongodbresourcesdeletemongodbcollectionsample] | Deletes an existing Azure Cosmos DB MongoDB Collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionDelete.json | -| [mongoDbResourcesDeleteMongoDbdatabaseSample.js][mongodbresourcesdeletemongodbdatabasesample] | Deletes an existing Azure Cosmos DB MongoDB database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseDelete.json | -| [mongoDbResourcesDeleteMongoRoleDefinitionSample.js][mongodbresourcesdeletemongoroledefinitionsample] | Deletes an existing Azure Cosmos DB Mongo Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionDelete.json | -| [mongoDbResourcesDeleteMongoUserDefinitionSample.js][mongodbresourcesdeletemongouserdefinitionsample] | Deletes an existing Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionDelete.json | -| [mongoDbResourcesGetMongoDbcollectionSample.js][mongodbresourcesgetmongodbcollectionsample] | Gets the MongoDB collection under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionGet.json | -| [mongoDbResourcesGetMongoDbcollectionThroughputSample.js][mongodbresourcesgetmongodbcollectionthroughputsample] | Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputGet.json | -| [mongoDbResourcesGetMongoDbdatabaseSample.js][mongodbresourcesgetmongodbdatabasesample] | Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseGet.json | -| [mongoDbResourcesGetMongoDbdatabaseThroughputSample.js][mongodbresourcesgetmongodbdatabasethroughputsample] | Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputGet.json | -| [mongoDbResourcesGetMongoRoleDefinitionSample.js][mongodbresourcesgetmongoroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionGet.json | -| [mongoDbResourcesGetMongoUserDefinitionSample.js][mongodbresourcesgetmongouserdefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionGet.json | -| [mongoDbResourcesListMongoDbcollectionsSample.js][mongodbresourceslistmongodbcollectionssample] | Lists the MongoDB collection under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionList.json | -| [mongoDbResourcesListMongoDbdatabasesSample.js][mongodbresourceslistmongodbdatabasessample] | Lists the MongoDB databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseList.json | -| [mongoDbResourcesListMongoRoleDefinitionsSample.js][mongodbresourceslistmongoroledefinitionssample] | Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionList.json | -| [mongoDbResourcesListMongoUserDefinitionsSample.js][mongodbresourceslistmongouserdefinitionssample] | Retrieves the list of all Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionList.json | -| [mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js][mongodbresourcesmigratemongodbcollectiontoautoscalesample] | Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json | -| [mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js][mongodbresourcesmigratemongodbcollectiontomanualthroughputsample] | Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json | -| [mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js][mongodbresourcesmigratemongodbdatabasetoautoscalesample] | Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json | -| [mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js][mongodbresourcesmigratemongodbdatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json | -| [mongoDbResourcesRetrieveContinuousBackupInformationSample.js][mongodbresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a Mongodb collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionBackupInformation.json | -| [mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js][mongodbresourcesupdatemongodbcollectionthroughputsample] | Update the RUs per second of an Azure Cosmos DB MongoDB collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputUpdate.json | -| [mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js][mongodbresourcesupdatemongodbdatabasethroughputsample] | Update RUs per second of the an Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json | -| [notebookWorkspacesCreateOrUpdateSample.js][notebookworkspacescreateorupdatesample] | Creates the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceCreate.json | -| [notebookWorkspacesDeleteSample.js][notebookworkspacesdeletesample] | Deletes the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceDelete.json | -| [notebookWorkspacesGetSample.js][notebookworkspacesgetsample] | Gets the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceGet.json | -| [notebookWorkspacesListByDatabaseAccountSample.js][notebookworkspaceslistbydatabaseaccountsample] | Gets the notebook workspace resources of an existing Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceList.json | -| [notebookWorkspacesListConnectionInfoSample.js][notebookworkspaceslistconnectioninfosample] | Retrieves the connection info for the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json | -| [notebookWorkspacesRegenerateAuthTokenSample.js][notebookworkspacesregenerateauthtokensample] | Regenerates the auth token for the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json | -| [notebookWorkspacesStartSample.js][notebookworkspacesstartsample] | Starts the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceStart.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available Cosmos DB Resource Provider operations. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBOperationsList.json | -| [partitionKeyRangeIdListMetricsSample.js][partitionkeyrangeidlistmetricssample] | Retrieves the metrics determined by the given filter for the given partition key range id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdGetMetrics.json | -| [partitionKeyRangeIdRegionListMetricsSample.js][partitionkeyrangeidregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given partition key range id and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json | -| [percentileListMetricsSample.js][percentilelistmetricssample] | Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileGetMetrics.json | -| [percentileSourceTargetListMetricsSample.js][percentilesourcetargetlistmetricssample] | Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileSourceTargetGetMetrics.json | -| [percentileTargetListMetricsSample.js][percentiletargetlistmetricssample] | Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileTargetGetMetrics.json | -| [privateEndpointConnectionsCreateOrUpdateSample.js][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionUpdate.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionGet.json | -| [privateEndpointConnectionsListByDatabaseAccountSample.js][privateendpointconnectionslistbydatabaseaccountsample] | List all private endpoint connections on a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionListGet.json | -| [privateLinkResourcesGetSample.js][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceGet.json | -| [privateLinkResourcesListByDatabaseAccountSample.js][privatelinkresourceslistbydatabaseaccountsample] | Gets the private link resources that need to be created for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceListGet.json | -| [restorableDatabaseAccountsGetByLocationSample.js][restorabledatabaseaccountsgetbylocationsample] | Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/\*' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountGet.json | -| [restorableDatabaseAccountsListByLocationSample.js][restorabledatabaseaccountslistbylocationsample] | Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountList.json | -| [restorableDatabaseAccountsListSample.js][restorabledatabaseaccountslistsample] | Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json | -| [restorableGremlinDatabasesListSample.js][restorablegremlindatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinDatabaseList.json | -| [restorableGremlinGraphsListSample.js][restorablegremlingraphslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinGraphList.json | -| [restorableGremlinResourcesListSample.js][restorablegremlinresourceslistsample] | Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinResourceList.json | -| [restorableMongodbCollectionsListSample.js][restorablemongodbcollectionslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbCollectionList.json | -| [restorableMongodbDatabasesListSample.js][restorablemongodbdatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbDatabaseList.json | -| [restorableMongodbResourcesListSample.js][restorablemongodbresourceslistsample] | Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbResourceList.json | -| [restorableSqlContainersListSample.js][restorablesqlcontainerslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlContainerList.json | -| [restorableSqlDatabasesListSample.js][restorablesqldatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlDatabaseList.json | -| [restorableSqlResourcesListSample.js][restorablesqlresourceslistsample] | Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlResourceList.json | -| [restorableTableResourcesListSample.js][restorabletableresourceslistsample] | Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableResourceList.json | -| [restorableTablesListSample.js][restorabletableslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableList.json | -| [serviceCreateSample.js][servicecreatesample] | Creates a service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceCreate.json | -| [serviceDeleteSample.js][servicedeletesample] | Deletes service with the given serviceName. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceDelete.json | -| [serviceGetSample.js][servicegetsample] | Gets the status of service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceGet.json | -| [serviceListSample.js][servicelistsample] | Gets the status of service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBServicesList.json | -| [sqlResourcesCreateUpdateClientEncryptionKeySample.js][sqlresourcescreateupdateclientencryptionkeysample] | Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlContainerSample.js][sqlresourcescreateupdatesqlcontainersample] | Create or update an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlDatabaseSample.js][sqlresourcescreateupdatesqldatabasesample] | Create or update an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlRoleAssignmentSample.js][sqlresourcescreateupdatesqlroleassignmentsample] | Creates or updates an Azure Cosmos DB SQL Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlRoleDefinitionSample.js][sqlresourcescreateupdatesqlroledefinitionsample] | Creates or updates an Azure Cosmos DB SQL Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlStoredProcedureSample.js][sqlresourcescreateupdatesqlstoredproceduresample] | Create or update an Azure Cosmos DB SQL storedProcedure x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlTriggerSample.js][sqlresourcescreateupdatesqltriggersample] | Create or update an Azure Cosmos DB SQL trigger x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js][sqlresourcescreateupdatesqluserdefinedfunctionsample] | Create or update an Azure Cosmos DB SQL userDefinedFunction x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json | -| [sqlResourcesDeleteSqlContainerSample.js][sqlresourcesdeletesqlcontainersample] | Deletes an existing Azure Cosmos DB SQL container. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerDelete.json | -| [sqlResourcesDeleteSqlDatabaseSample.js][sqlresourcesdeletesqldatabasesample] | Deletes an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseDelete.json | -| [sqlResourcesDeleteSqlRoleAssignmentSample.js][sqlresourcesdeletesqlroleassignmentsample] | Deletes an existing Azure Cosmos DB SQL Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentDelete.json | -| [sqlResourcesDeleteSqlRoleDefinitionSample.js][sqlresourcesdeletesqlroledefinitionsample] | Deletes an existing Azure Cosmos DB SQL Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionDelete.json | -| [sqlResourcesDeleteSqlStoredProcedureSample.js][sqlresourcesdeletesqlstoredproceduresample] | Deletes an existing Azure Cosmos DB SQL storedProcedure. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureDelete.json | -| [sqlResourcesDeleteSqlTriggerSample.js][sqlresourcesdeletesqltriggersample] | Deletes an existing Azure Cosmos DB SQL trigger. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerDelete.json | -| [sqlResourcesDeleteSqlUserDefinedFunctionSample.js][sqlresourcesdeletesqluserdefinedfunctionsample] | Deletes an existing Azure Cosmos DB SQL userDefinedFunction. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionDelete.json | -| [sqlResourcesGetClientEncryptionKeySample.js][sqlresourcesgetclientencryptionkeysample] | Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyGet.json | -| [sqlResourcesGetSqlContainerSample.js][sqlresourcesgetsqlcontainersample] | Gets the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerGet.json | -| [sqlResourcesGetSqlContainerThroughputSample.js][sqlresourcesgetsqlcontainerthroughputsample] | Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputGet.json | -| [sqlResourcesGetSqlDatabaseSample.js][sqlresourcesgetsqldatabasesample] | Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseGet.json | -| [sqlResourcesGetSqlDatabaseThroughputSample.js][sqlresourcesgetsqldatabasethroughputsample] | Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputGet.json | -| [sqlResourcesGetSqlRoleAssignmentSample.js][sqlresourcesgetsqlroleassignmentsample] | Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentGet.json | -| [sqlResourcesGetSqlRoleDefinitionSample.js][sqlresourcesgetsqlroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionGet.json | -| [sqlResourcesGetSqlStoredProcedureSample.js][sqlresourcesgetsqlstoredproceduresample] | Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureGet.json | -| [sqlResourcesGetSqlTriggerSample.js][sqlresourcesgetsqltriggersample] | Gets the SQL trigger under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerGet.json | -| [sqlResourcesGetSqlUserDefinedFunctionSample.js][sqlresourcesgetsqluserdefinedfunctionsample] | Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionGet.json | -| [sqlResourcesListClientEncryptionKeysSample.js][sqlresourceslistclientencryptionkeyssample] | Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeysList.json | -| [sqlResourcesListSqlContainersSample.js][sqlresourceslistsqlcontainerssample] | Lists the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerList.json | -| [sqlResourcesListSqlDatabasesSample.js][sqlresourceslistsqldatabasessample] | Lists the SQL databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseList.json | -| [sqlResourcesListSqlRoleAssignmentsSample.js][sqlresourceslistsqlroleassignmentssample] | Retrieves the list of all Azure Cosmos DB SQL Role Assignments. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentList.json | -| [sqlResourcesListSqlRoleDefinitionsSample.js][sqlresourceslistsqlroledefinitionssample] | Retrieves the list of all Azure Cosmos DB SQL Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionList.json | -| [sqlResourcesListSqlStoredProceduresSample.js][sqlresourceslistsqlstoredproceduressample] | Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureList.json | -| [sqlResourcesListSqlTriggersSample.js][sqlresourceslistsqltriggerssample] | Lists the SQL trigger under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerList.json | -| [sqlResourcesListSqlUserDefinedFunctionsSample.js][sqlresourceslistsqluserdefinedfunctionssample] | Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionList.json | -| [sqlResourcesMigrateSqlContainerToAutoscaleSample.js][sqlresourcesmigratesqlcontainertoautoscalesample] | Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToAutoscale.json | -| [sqlResourcesMigrateSqlContainerToManualThroughputSample.js][sqlresourcesmigratesqlcontainertomanualthroughputsample] | Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToManualThroughput.json | -| [sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js][sqlresourcesmigratesqldatabasetoautoscalesample] | Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json | -| [sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js][sqlresourcesmigratesqldatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json | -| [sqlResourcesRetrieveContinuousBackupInformationSample.js][sqlresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a container resource. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerBackupInformation.json | -| [sqlResourcesUpdateSqlContainerThroughputSample.js][sqlresourcesupdatesqlcontainerthroughputsample] | Update RUs per second of an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputUpdate.json | -| [sqlResourcesUpdateSqlDatabaseThroughputSample.js][sqlresourcesupdatesqldatabasethroughputsample] | Update RUs per second of an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputUpdate.json | -| [tableResourcesCreateUpdateTableSample.js][tableresourcescreateupdatetablesample] | Create or update an Azure Cosmos DB Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableCreateUpdate.json | -| [tableResourcesDeleteTableSample.js][tableresourcesdeletetablesample] | Deletes an existing Azure Cosmos DB Table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableDelete.json | -| [tableResourcesGetTableSample.js][tableresourcesgettablesample] | Gets the Tables under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableGet.json | -| [tableResourcesGetTableThroughputSample.js][tableresourcesgettablethroughputsample] | Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputGet.json | -| [tableResourcesListTablesSample.js][tableresourceslisttablessample] | Lists the Tables under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableList.json | -| [tableResourcesMigrateTableToAutoscaleSample.js][tableresourcesmigratetabletoautoscalesample] | Migrate an Azure Cosmos DB Table from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToAutoscale.json | -| [tableResourcesMigrateTableToManualThroughputSample.js][tableresourcesmigratetabletomanualthroughputsample] | Migrate an Azure Cosmos DB Table from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToManualThroughput.json | -| [tableResourcesRetrieveContinuousBackupInformationSample.js][tableresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableBackupInformation.json | -| [tableResourcesUpdateTableThroughputSample.js][tableresourcesupdatetablethroughputsample] | Update RUs per second of an Azure Cosmos DB Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputUpdate.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node cassandraClustersCreateUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env COSMOSDB_SUBSCRIPTION_ID="" COSMOSDB_RESOURCE_GROUP="" node cassandraClustersCreateUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[cassandraclusterscreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersCreateUpdateSample.js -[cassandraclustersdeallocatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersDeallocateSample.js -[cassandraclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersDeleteSample.js -[cassandraclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersGetSample.js -[cassandraclustersinvokecommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersInvokeCommandSample.js -[cassandraclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersListByResourceGroupSample.js -[cassandraclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersListBySubscriptionSample.js -[cassandraclustersstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersStartSample.js -[cassandraclustersstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersStatusSample.js -[cassandraclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraClustersUpdateSample.js -[cassandradatacenterscreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersCreateUpdateSample.js -[cassandradatacentersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersDeleteSample.js -[cassandradatacentersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersGetSample.js -[cassandradatacenterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersListSample.js -[cassandradatacentersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraDataCentersUpdateSample.js -[cassandraresourcescreateupdatecassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesCreateUpdateCassandraKeyspaceSample.js -[cassandraresourcescreateupdatecassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesCreateUpdateCassandraTableSample.js -[cassandraresourcesdeletecassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesDeleteCassandraKeyspaceSample.js -[cassandraresourcesdeletecassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesDeleteCassandraTableSample.js -[cassandraresourcesgetcassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraKeyspaceSample.js -[cassandraresourcesgetcassandrakeyspacethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraKeyspaceThroughputSample.js -[cassandraresourcesgetcassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraTableSample.js -[cassandraresourcesgetcassandratablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesGetCassandraTableThroughputSample.js -[cassandraresourceslistcassandrakeyspacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesListCassandraKeyspacesSample.js -[cassandraresourceslistcassandratablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesListCassandraTablesSample.js -[cassandraresourcesmigratecassandrakeyspacetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.js -[cassandraresourcesmigratecassandrakeyspacetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.js -[cassandraresourcesmigratecassandratabletoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraTableToAutoscaleSample.js -[cassandraresourcesmigratecassandratabletomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesMigrateCassandraTableToManualThroughputSample.js -[cassandraresourcesupdatecassandrakeyspacethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.js -[cassandraresourcesupdatecassandratablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/cassandraResourcesUpdateCassandraTableThroughputSample.js -[collectionlistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListMetricDefinitionsSample.js -[collectionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListMetricsSample.js -[collectionlistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionListUsagesSample.js -[collectionpartitionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionListMetricsSample.js -[collectionpartitionlistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionListUsagesSample.js -[collectionpartitionregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionPartitionRegionListMetricsSample.js -[collectionregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/collectionRegionListMetricsSample.js -[databaseaccountregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountRegionListMetricsSample.js -[databaseaccountschecknameexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsCheckNameExistsSample.js -[databaseaccountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsCreateOrUpdateSample.js -[databaseaccountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsDeleteSample.js -[databaseaccountsfailoverprioritychangesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsFailoverPriorityChangeSample.js -[databaseaccountsgetreadonlykeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsGetReadOnlyKeysSample.js -[databaseaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsGetSample.js -[databaseaccountslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListByResourceGroupSample.js -[databaseaccountslistconnectionstringssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListConnectionStringsSample.js -[databaseaccountslistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListKeysSample.js -[databaseaccountslistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListMetricDefinitionsSample.js -[databaseaccountslistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListMetricsSample.js -[databaseaccountslistreadonlykeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListReadOnlyKeysSample.js -[databaseaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListSample.js -[databaseaccountslistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsListUsagesSample.js -[databaseaccountsofflineregionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsOfflineRegionSample.js -[databaseaccountsonlineregionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsOnlineRegionSample.js -[databaseaccountsregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsRegenerateKeySample.js -[databaseaccountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseAccountsUpdateSample.js -[databaselistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListMetricDefinitionsSample.js -[databaselistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListMetricsSample.js -[databaselistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/databaseListUsagesSample.js -[gremlinresourcescreateupdategremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesCreateUpdateGremlinDatabaseSample.js -[gremlinresourcescreateupdategremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesCreateUpdateGremlinGraphSample.js -[gremlinresourcesdeletegremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesDeleteGremlinDatabaseSample.js -[gremlinresourcesdeletegremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesDeleteGremlinGraphSample.js -[gremlinresourcesgetgremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinDatabaseSample.js -[gremlinresourcesgetgremlindatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinDatabaseThroughputSample.js -[gremlinresourcesgetgremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinGraphSample.js -[gremlinresourcesgetgremlingraphthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesGetGremlinGraphThroughputSample.js -[gremlinresourceslistgremlindatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesListGremlinDatabasesSample.js -[gremlinresourceslistgremlingraphssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesListGremlinGraphsSample.js -[gremlinresourcesmigrategremlindatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.js -[gremlinresourcesmigrategremlindatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.js -[gremlinresourcesmigrategremlingraphtoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.js -[gremlinresourcesmigrategremlingraphtomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.js -[gremlinresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesRetrieveContinuousBackupInformationSample.js -[gremlinresourcesupdategremlindatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesUpdateGremlinDatabaseThroughputSample.js -[gremlinresourcesupdategremlingraphthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/gremlinResourcesUpdateGremlinGraphThroughputSample.js -[locationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/locationsGetSample.js -[locationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/locationsListSample.js -[mongodbresourcescreateupdatemongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoDbcollectionSample.js -[mongodbresourcescreateupdatemongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.js -[mongodbresourcescreateupdatemongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.js -[mongodbresourcescreateupdatemongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.js -[mongodbresourcesdeletemongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoDbcollectionSample.js -[mongodbresourcesdeletemongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoDbdatabaseSample.js -[mongodbresourcesdeletemongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoRoleDefinitionSample.js -[mongodbresourcesdeletemongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesDeleteMongoUserDefinitionSample.js -[mongodbresourcesgetmongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbcollectionSample.js -[mongodbresourcesgetmongodbcollectionthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbcollectionThroughputSample.js -[mongodbresourcesgetmongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbdatabaseSample.js -[mongodbresourcesgetmongodbdatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoDbdatabaseThroughputSample.js -[mongodbresourcesgetmongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoRoleDefinitionSample.js -[mongodbresourcesgetmongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesGetMongoUserDefinitionSample.js -[mongodbresourceslistmongodbcollectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoDbcollectionsSample.js -[mongodbresourceslistmongodbdatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoDbdatabasesSample.js -[mongodbresourceslistmongoroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoRoleDefinitionsSample.js -[mongodbresourceslistmongouserdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesListMongoUserDefinitionsSample.js -[mongodbresourcesmigratemongodbcollectiontoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.js -[mongodbresourcesmigratemongodbcollectiontomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.js -[mongodbresourcesmigratemongodbdatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.js -[mongodbresourcesmigratemongodbdatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.js -[mongodbresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesRetrieveContinuousBackupInformationSample.js -[mongodbresourcesupdatemongodbcollectionthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.js -[mongodbresourcesupdatemongodbdatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.js -[notebookworkspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesCreateOrUpdateSample.js -[notebookworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesDeleteSample.js -[notebookworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesGetSample.js -[notebookworkspaceslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesListByDatabaseAccountSample.js -[notebookworkspaceslistconnectioninfosample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesListConnectionInfoSample.js -[notebookworkspacesregenerateauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesRegenerateAuthTokenSample.js -[notebookworkspacesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/notebookWorkspacesStartSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/operationsListSample.js -[partitionkeyrangeidlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/partitionKeyRangeIdListMetricsSample.js -[partitionkeyrangeidregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/partitionKeyRangeIdRegionListMetricsSample.js -[percentilelistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileListMetricsSample.js -[percentilesourcetargetlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileSourceTargetListMetricsSample.js -[percentiletargetlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/percentileTargetListMetricsSample.js -[privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsCreateOrUpdateSample.js -[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsDeleteSample.js -[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsGetSample.js -[privateendpointconnectionslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateEndpointConnectionsListByDatabaseAccountSample.js -[privatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateLinkResourcesGetSample.js -[privatelinkresourceslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/privateLinkResourcesListByDatabaseAccountSample.js -[restorabledatabaseaccountsgetbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsGetByLocationSample.js -[restorabledatabaseaccountslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsListByLocationSample.js -[restorabledatabaseaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableDatabaseAccountsListSample.js -[restorablegremlindatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinDatabasesListSample.js -[restorablegremlingraphslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinGraphsListSample.js -[restorablegremlinresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableGremlinResourcesListSample.js -[restorablemongodbcollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbCollectionsListSample.js -[restorablemongodbdatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbDatabasesListSample.js -[restorablemongodbresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableMongodbResourcesListSample.js -[restorablesqlcontainerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlContainersListSample.js -[restorablesqldatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlDatabasesListSample.js -[restorablesqlresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableSqlResourcesListSample.js -[restorabletableresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableTableResourcesListSample.js -[restorabletableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/restorableTablesListSample.js -[servicecreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceCreateSample.js -[servicedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceDeleteSample.js -[servicegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceGetSample.js -[servicelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/serviceListSample.js -[sqlresourcescreateupdateclientencryptionkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateClientEncryptionKeySample.js -[sqlresourcescreateupdatesqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlContainerSample.js -[sqlresourcescreateupdatesqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlDatabaseSample.js -[sqlresourcescreateupdatesqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlRoleAssignmentSample.js -[sqlresourcescreateupdatesqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlRoleDefinitionSample.js -[sqlresourcescreateupdatesqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlStoredProcedureSample.js -[sqlresourcescreateupdatesqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlTriggerSample.js -[sqlresourcescreateupdatesqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.js -[sqlresourcesdeletesqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlContainerSample.js -[sqlresourcesdeletesqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlDatabaseSample.js -[sqlresourcesdeletesqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlRoleAssignmentSample.js -[sqlresourcesdeletesqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlRoleDefinitionSample.js -[sqlresourcesdeletesqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlStoredProcedureSample.js -[sqlresourcesdeletesqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlTriggerSample.js -[sqlresourcesdeletesqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesDeleteSqlUserDefinedFunctionSample.js -[sqlresourcesgetclientencryptionkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetClientEncryptionKeySample.js -[sqlresourcesgetsqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlContainerSample.js -[sqlresourcesgetsqlcontainerthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlContainerThroughputSample.js -[sqlresourcesgetsqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlDatabaseSample.js -[sqlresourcesgetsqldatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlDatabaseThroughputSample.js -[sqlresourcesgetsqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlRoleAssignmentSample.js -[sqlresourcesgetsqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlRoleDefinitionSample.js -[sqlresourcesgetsqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlStoredProcedureSample.js -[sqlresourcesgetsqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlTriggerSample.js -[sqlresourcesgetsqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesGetSqlUserDefinedFunctionSample.js -[sqlresourceslistclientencryptionkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListClientEncryptionKeysSample.js -[sqlresourceslistsqlcontainerssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlContainersSample.js -[sqlresourceslistsqldatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlDatabasesSample.js -[sqlresourceslistsqlroleassignmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlRoleAssignmentsSample.js -[sqlresourceslistsqlroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlRoleDefinitionsSample.js -[sqlresourceslistsqlstoredproceduressample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlStoredProceduresSample.js -[sqlresourceslistsqltriggerssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlTriggersSample.js -[sqlresourceslistsqluserdefinedfunctionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesListSqlUserDefinedFunctionsSample.js -[sqlresourcesmigratesqlcontainertoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlContainerToAutoscaleSample.js -[sqlresourcesmigratesqlcontainertomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlContainerToManualThroughputSample.js -[sqlresourcesmigratesqldatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.js -[sqlresourcesmigratesqldatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.js -[sqlresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesRetrieveContinuousBackupInformationSample.js -[sqlresourcesupdatesqlcontainerthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesUpdateSqlContainerThroughputSample.js -[sqlresourcesupdatesqldatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/sqlResourcesUpdateSqlDatabaseThroughputSample.js -[tableresourcescreateupdatetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesCreateUpdateTableSample.js -[tableresourcesdeletetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesDeleteTableSample.js -[tableresourcesgettablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesGetTableSample.js -[tableresourcesgettablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesGetTableThroughputSample.js -[tableresourceslisttablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesListTablesSample.js -[tableresourcesmigratetabletoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesMigrateTableToAutoscaleSample.js -[tableresourcesmigratetabletomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesMigrateTableToManualThroughputSample.js -[tableresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesRetrieveContinuousBackupInformationSample.js -[tableresourcesupdatetablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/javascript/tableResourcesUpdateTableThroughputSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb/README.md diff --git a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/README.md b/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/README.md deleted file mode 100644 index 2bcee4557cbd..000000000000 --- a/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/README.md +++ /dev/null @@ -1,441 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [cassandraClustersCreateUpdateSample.ts][cassandraclusterscreateupdatesample] | Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterCreate.json | -| [cassandraClustersDeallocateSample.ts][cassandraclustersdeallocatesample] | Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDeallocate.json | -| [cassandraClustersDeleteSample.ts][cassandraclustersdeletesample] | Deletes a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterDelete.json | -| [cassandraClustersGetSample.ts][cassandraclustersgetsample] | Get the properties of a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterGet.json | -| [cassandraClustersInvokeCommandSample.ts][cassandraclustersinvokecommandsample] | Invoke a command like nodetool for cassandra maintenance x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraCommand.json | -| [cassandraClustersListByResourceGroupSample.ts][cassandraclusterslistbyresourcegroupsample] | List all managed Cassandra clusters in this resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json | -| [cassandraClustersListBySubscriptionSample.ts][cassandraclusterslistbysubscriptionsample] | List all managed Cassandra clusters in this subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterListBySubscription.json | -| [cassandraClustersStartSample.ts][cassandraclustersstartsample] | Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterStart.json | -| [cassandraClustersStatusSample.ts][cassandraclustersstatussample] | Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraStatus.json | -| [cassandraClustersUpdateSample.ts][cassandraclustersupdatesample] | Updates some of the properties of a managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraClusterPatch.json | -| [cassandraDataCentersCreateUpdateSample.ts][cassandradatacenterscreateupdatesample] | Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterCreate.json | -| [cassandraDataCentersDeleteSample.ts][cassandradatacentersdeletesample] | Delete a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterDelete.json | -| [cassandraDataCentersGetSample.ts][cassandradatacentersgetsample] | Get the properties of a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterGet.json | -| [cassandraDataCentersListSample.ts][cassandradatacenterslistsample] | List all data centers in a particular managed Cassandra cluster. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterList.json | -| [cassandraDataCentersUpdateSample.ts][cassandradatacentersupdatesample] | Update some of the properties of a managed Cassandra data center. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBManagedCassandraDataCenterPatch.json | -| [cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts][cassandraresourcescreateupdatecassandrakeyspacesample] | Create or update an Azure Cosmos DB Cassandra keyspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceCreateUpdate.json | -| [cassandraResourcesCreateUpdateCassandraTableSample.ts][cassandraresourcescreateupdatecassandratablesample] | Create or update an Azure Cosmos DB Cassandra Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableCreateUpdate.json | -| [cassandraResourcesDeleteCassandraKeyspaceSample.ts][cassandraresourcesdeletecassandrakeyspacesample] | Deletes an existing Azure Cosmos DB Cassandra keyspace. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceDelete.json | -| [cassandraResourcesDeleteCassandraTableSample.ts][cassandraresourcesdeletecassandratablesample] | Deletes an existing Azure Cosmos DB Cassandra table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableDelete.json | -| [cassandraResourcesGetCassandraKeyspaceSample.ts][cassandraresourcesgetcassandrakeyspacesample] | Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceGet.json | -| [cassandraResourcesGetCassandraKeyspaceThroughputSample.ts][cassandraresourcesgetcassandrakeyspacethroughputsample] | Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputGet.json | -| [cassandraResourcesGetCassandraTableSample.ts][cassandraresourcesgetcassandratablesample] | Gets the Cassandra table under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableGet.json | -| [cassandraResourcesGetCassandraTableThroughputSample.ts][cassandraresourcesgetcassandratablethroughputsample] | Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputGet.json | -| [cassandraResourcesListCassandraKeyspacesSample.ts][cassandraresourceslistcassandrakeyspacessample] | Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceList.json | -| [cassandraResourcesListCassandraTablesSample.ts][cassandraresourceslistcassandratablessample] | Lists the Cassandra table under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableList.json | -| [cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts][cassandraresourcesmigratecassandrakeyspacetoautoscalesample] | Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json | -| [cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts][cassandraresourcesmigratecassandrakeyspacetomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json | -| [cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts][cassandraresourcesmigratecassandratabletoautoscalesample] | Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToAutoscale.json | -| [cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts][cassandraresourcesmigratecassandratabletomanualthroughputsample] | Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableMigrateToManualThroughput.json | -| [cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts][cassandraresourcesupdatecassandrakeyspacethroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra Keyspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json | -| [cassandraResourcesUpdateCassandraTableThroughputSample.ts][cassandraresourcesupdatecassandratablethroughputsample] | Update RUs per second of an Azure Cosmos DB Cassandra table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCassandraTableThroughputUpdate.json | -| [collectionListMetricDefinitionsSample.ts][collectionlistmetricdefinitionssample] | Retrieves metric definitions for the given collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetricDefinitions.json | -| [collectionListMetricsSample.ts][collectionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetMetrics.json | -| [collectionListUsagesSample.ts][collectionlistusagessample] | Retrieves the usages (most recent storage data) for the given collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionGetUsages.json | -| [collectionPartitionListMetricsSample.ts][collectionpartitionlistmetricssample] | Retrieves the metrics determined by the given filter for the given collection, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetMetrics.json | -| [collectionPartitionListUsagesSample.ts][collectionpartitionlistusagessample] | Retrieves the usages (most recent storage data) for the given collection, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionGetUsages.json | -| [collectionPartitionRegionListMetricsSample.ts][collectionpartitionregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given collection and region, split by partition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBCollectionPartitionRegionGetMetrics.json | -| [collectionRegionListMetricsSample.ts][collectionregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account, collection and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRegionCollectionGetMetrics.json | -| [databaseAccountRegionListMetricsSample.ts][databaseaccountregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegionGetMetrics.json | -| [databaseAccountsCheckNameExistsSample.ts][databaseaccountschecknameexistssample] | Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCheckNameExists.json | -| [databaseAccountsCreateOrUpdateSample.ts][databaseaccountscreateorupdatesample] | Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountCreateMax.json | -| [databaseAccountsDeleteSample.ts][databaseaccountsdeletesample] | Deletes an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountDelete.json | -| [databaseAccountsFailoverPriorityChangeSample.ts][databaseaccountsfailoverprioritychangesample] | Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json | -| [databaseAccountsGetReadOnlyKeysSample.ts][databaseaccountsgetreadonlykeyssample] | Lists the read-only access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json | -| [databaseAccountsGetSample.ts][databaseaccountsgetsample] | Retrieves the properties of an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGet.json | -| [databaseAccountsListByResourceGroupSample.ts][databaseaccountslistbyresourcegroupsample] | Lists all the Azure Cosmos DB database accounts available under the given resource group. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListByResourceGroup.json | -| [databaseAccountsListConnectionStringsSample.ts][databaseaccountslistconnectionstringssample] | Lists the connection strings for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListConnectionStrings.json | -| [databaseAccountsListKeysSample.ts][databaseaccountslistkeyssample] | Lists the access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListKeys.json | -| [databaseAccountsListMetricDefinitionsSample.ts][databaseaccountslistmetricdefinitionssample] | Retrieves metric definitions for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json | -| [databaseAccountsListMetricsSample.ts][databaseaccountslistmetricssample] | Retrieves the metrics determined by the given filter for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetMetrics.json | -| [databaseAccountsListReadOnlyKeysSample.ts][databaseaccountslistreadonlykeyssample] | Lists the read-only access keys for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json | -| [databaseAccountsListSample.ts][databaseaccountslistsample] | Lists all the Azure Cosmos DB database accounts available under the subscription. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountList.json | -| [databaseAccountsListUsagesSample.ts][databaseaccountslistusagessample] | Retrieves the usages (most recent data) for the given database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountGetUsages.json | -| [databaseAccountsOfflineRegionSample.ts][databaseaccountsofflineregionsample] | Offline the specified region for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOfflineRegion.json | -| [databaseAccountsOnlineRegionSample.ts][databaseaccountsonlineregionsample] | Online the specified region for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountOnlineRegion.json | -| [databaseAccountsRegenerateKeySample.ts][databaseaccountsregeneratekeysample] | Regenerates an access key for the specified Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountRegenerateKey.json | -| [databaseAccountsUpdateSample.ts][databaseaccountsupdatesample] | Updates the properties of an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseAccountPatch.json | -| [databaseListMetricDefinitionsSample.ts][databaselistmetricdefinitionssample] | Retrieves metric definitions for the given database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetricDefinitions.json | -| [databaseListMetricsSample.ts][databaselistmetricssample] | Retrieves the metrics determined by the given filter for the given database account and database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetMetrics.json | -| [databaseListUsagesSample.ts][databaselistusagessample] | Retrieves the usages (most recent data) for the given database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDatabaseGetUsages.json | -| [gremlinResourcesCreateUpdateGremlinDatabaseSample.ts][gremlinresourcescreateupdategremlindatabasesample] | Create or update an Azure Cosmos DB Gremlin database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseCreateUpdate.json | -| [gremlinResourcesCreateUpdateGremlinGraphSample.ts][gremlinresourcescreateupdategremlingraphsample] | Create or update an Azure Cosmos DB Gremlin graph x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphCreateUpdate.json | -| [gremlinResourcesDeleteGremlinDatabaseSample.ts][gremlinresourcesdeletegremlindatabasesample] | Deletes an existing Azure Cosmos DB Gremlin database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseDelete.json | -| [gremlinResourcesDeleteGremlinGraphSample.ts][gremlinresourcesdeletegremlingraphsample] | Deletes an existing Azure Cosmos DB Gremlin graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphDelete.json | -| [gremlinResourcesGetGremlinDatabaseSample.ts][gremlinresourcesgetgremlindatabasesample] | Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseGet.json | -| [gremlinResourcesGetGremlinDatabaseThroughputSample.ts][gremlinresourcesgetgremlindatabasethroughputsample] | Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputGet.json | -| [gremlinResourcesGetGremlinGraphSample.ts][gremlinresourcesgetgremlingraphsample] | Gets the Gremlin graph under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphGet.json | -| [gremlinResourcesGetGremlinGraphThroughputSample.ts][gremlinresourcesgetgremlingraphthroughputsample] | Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputGet.json | -| [gremlinResourcesListGremlinDatabasesSample.ts][gremlinresourceslistgremlindatabasessample] | Lists the Gremlin databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseList.json | -| [gremlinResourcesListGremlinGraphsSample.ts][gremlinresourceslistgremlingraphssample] | Lists the Gremlin graph under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphList.json | -| [gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts][gremlinresourcesmigrategremlindatabasetoautoscalesample] | Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json | -| [gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts][gremlinresourcesmigrategremlindatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json | -| [gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts][gremlinresourcesmigrategremlingraphtoautoscalesample] | Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToAutoscale.json | -| [gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts][gremlinresourcesmigrategremlingraphtomanualthroughputsample] | Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json | -| [gremlinResourcesRetrieveContinuousBackupInformationSample.ts][gremlinresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a gremlin graph. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphBackupInformation.json | -| [gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts][gremlinresourcesupdategremlindatabasethroughputsample] | Update RUs per second of an Azure Cosmos DB Gremlin database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinDatabaseThroughputUpdate.json | -| [gremlinResourcesUpdateGremlinGraphThroughputSample.ts][gremlinresourcesupdategremlingraphthroughputsample] | Update RUs per second of an Azure Cosmos DB Gremlin graph x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBGremlinGraphThroughputUpdate.json | -| [locationsGetSample.ts][locationsgetsample] | Get the properties of an existing Cosmos DB location x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationGet.json | -| [locationsListSample.ts][locationslistsample] | List Cosmos DB locations and their properties x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBLocationList.json | -| [mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts][mongodbresourcescreateupdatemongodbcollectionsample] | Create or update an Azure Cosmos DB MongoDB Collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionCreateUpdate.json | -| [mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts][mongodbresourcescreateupdatemongodbdatabasesample] | Create or updates Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseCreateUpdate.json | -| [mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts][mongodbresourcescreateupdatemongoroledefinitionsample] | Creates or updates an Azure Cosmos DB Mongo Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json | -| [mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts][mongodbresourcescreateupdatemongouserdefinitionsample] | Creates or updates an Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json | -| [mongoDbResourcesDeleteMongoDbcollectionSample.ts][mongodbresourcesdeletemongodbcollectionsample] | Deletes an existing Azure Cosmos DB MongoDB Collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionDelete.json | -| [mongoDbResourcesDeleteMongoDbdatabaseSample.ts][mongodbresourcesdeletemongodbdatabasesample] | Deletes an existing Azure Cosmos DB MongoDB database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseDelete.json | -| [mongoDbResourcesDeleteMongoRoleDefinitionSample.ts][mongodbresourcesdeletemongoroledefinitionsample] | Deletes an existing Azure Cosmos DB Mongo Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionDelete.json | -| [mongoDbResourcesDeleteMongoUserDefinitionSample.ts][mongodbresourcesdeletemongouserdefinitionsample] | Deletes an existing Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionDelete.json | -| [mongoDbResourcesGetMongoDbcollectionSample.ts][mongodbresourcesgetmongodbcollectionsample] | Gets the MongoDB collection under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionGet.json | -| [mongoDbResourcesGetMongoDbcollectionThroughputSample.ts][mongodbresourcesgetmongodbcollectionthroughputsample] | Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputGet.json | -| [mongoDbResourcesGetMongoDbdatabaseSample.ts][mongodbresourcesgetmongodbdatabasesample] | Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseGet.json | -| [mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts][mongodbresourcesgetmongodbdatabasethroughputsample] | Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputGet.json | -| [mongoDbResourcesGetMongoRoleDefinitionSample.ts][mongodbresourcesgetmongoroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionGet.json | -| [mongoDbResourcesGetMongoUserDefinitionSample.ts][mongodbresourcesgetmongouserdefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionGet.json | -| [mongoDbResourcesListMongoDbcollectionsSample.ts][mongodbresourceslistmongodbcollectionssample] | Lists the MongoDB collection under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionList.json | -| [mongoDbResourcesListMongoDbdatabasesSample.ts][mongodbresourceslistmongodbdatabasessample] | Lists the MongoDB databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseList.json | -| [mongoDbResourcesListMongoRoleDefinitionsSample.ts][mongodbresourceslistmongoroledefinitionssample] | Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBRoleDefinitionList.json | -| [mongoDbResourcesListMongoUserDefinitionsSample.ts][mongodbresourceslistmongouserdefinitionssample] | Retrieves the list of all Azure Cosmos DB Mongo User Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBUserDefinitionList.json | -| [mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts][mongodbresourcesmigratemongodbcollectiontoautoscalesample] | Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json | -| [mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts][mongodbresourcesmigratemongodbcollectiontomanualthroughputsample] | Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json | -| [mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts][mongodbresourcesmigratemongodbdatabasetoautoscalesample] | Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json | -| [mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts][mongodbresourcesmigratemongodbdatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json | -| [mongoDbResourcesRetrieveContinuousBackupInformationSample.ts][mongodbresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a Mongodb collection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionBackupInformation.json | -| [mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts][mongodbresourcesupdatemongodbcollectionthroughputsample] | Update the RUs per second of an Azure Cosmos DB MongoDB collection x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBCollectionThroughputUpdate.json | -| [mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts][mongodbresourcesupdatemongodbdatabasethroughputsample] | Update RUs per second of the an Azure Cosmos DB MongoDB database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json | -| [notebookWorkspacesCreateOrUpdateSample.ts][notebookworkspacescreateorupdatesample] | Creates the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceCreate.json | -| [notebookWorkspacesDeleteSample.ts][notebookworkspacesdeletesample] | Deletes the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceDelete.json | -| [notebookWorkspacesGetSample.ts][notebookworkspacesgetsample] | Gets the notebook workspace for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceGet.json | -| [notebookWorkspacesListByDatabaseAccountSample.ts][notebookworkspaceslistbydatabaseaccountsample] | Gets the notebook workspace resources of an existing Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceList.json | -| [notebookWorkspacesListConnectionInfoSample.ts][notebookworkspaceslistconnectioninfosample] | Retrieves the connection info for the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json | -| [notebookWorkspacesRegenerateAuthTokenSample.ts][notebookworkspacesregenerateauthtokensample] | Regenerates the auth token for the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json | -| [notebookWorkspacesStartSample.ts][notebookworkspacesstartsample] | Starts the notebook workspace x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBNotebookWorkspaceStart.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available Cosmos DB Resource Provider operations. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBOperationsList.json | -| [partitionKeyRangeIdListMetricsSample.ts][partitionkeyrangeidlistmetricssample] | Retrieves the metrics determined by the given filter for the given partition key range id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdGetMetrics.json | -| [partitionKeyRangeIdRegionListMetricsSample.ts][partitionkeyrangeidregionlistmetricssample] | Retrieves the metrics determined by the given filter for the given partition key range id and region. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json | -| [percentileListMetricsSample.ts][percentilelistmetricssample] | Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileGetMetrics.json | -| [percentileSourceTargetListMetricsSample.ts][percentilesourcetargetlistmetricssample] | Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileSourceTargetGetMetrics.json | -| [percentileTargetListMetricsSample.ts][percentiletargetlistmetricssample] | Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPercentileTargetGetMetrics.json | -| [privateEndpointConnectionsCreateOrUpdateSample.ts][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionUpdate.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionGet.json | -| [privateEndpointConnectionsListByDatabaseAccountSample.ts][privateendpointconnectionslistbydatabaseaccountsample] | List all private endpoint connections on a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateEndpointConnectionListGet.json | -| [privateLinkResourcesGetSample.ts][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceGet.json | -| [privateLinkResourcesListByDatabaseAccountSample.ts][privatelinkresourceslistbydatabaseaccountsample] | Gets the private link resources that need to be created for a Cosmos DB account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBPrivateLinkResourceListGet.json | -| [restorableDatabaseAccountsGetByLocationSample.ts][restorabledatabaseaccountsgetbylocationsample] | Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/\*' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountGet.json | -| [restorableDatabaseAccountsListByLocationSample.ts][restorabledatabaseaccountslistbylocationsample] | Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountList.json | -| [restorableDatabaseAccountsListSample.ts][restorabledatabaseaccountslistsample] | Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json | -| [restorableGremlinDatabasesListSample.ts][restorablegremlindatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinDatabaseList.json | -| [restorableGremlinGraphsListSample.ts][restorablegremlingraphslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinGraphList.json | -| [restorableGremlinResourcesListSample.ts][restorablegremlinresourceslistsample] | Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableGremlinResourceList.json | -| [restorableMongodbCollectionsListSample.ts][restorablemongodbcollectionslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbCollectionList.json | -| [restorableMongodbDatabasesListSample.ts][restorablemongodbdatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbDatabaseList.json | -| [restorableMongodbResourcesListSample.ts][restorablemongodbresourceslistsample] | Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableMongodbResourceList.json | -| [restorableSqlContainersListSample.ts][restorablesqlcontainerslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlContainerList.json | -| [restorableSqlDatabasesListSample.ts][restorablesqldatabaseslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlDatabaseList.json | -| [restorableSqlResourcesListSample.ts][restorablesqlresourceslistsample] | Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableSqlResourceList.json | -| [restorableTableResourcesListSample.ts][restorabletableresourceslistsample] | Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableResourceList.json | -| [restorableTablesListSample.ts][restorabletableslistsample] | Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBRestorableTableList.json | -| [serviceCreateSample.ts][servicecreatesample] | Creates a service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceCreate.json | -| [serviceDeleteSample.ts][servicedeletesample] | Deletes service with the given serviceName. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceDelete.json | -| [serviceGetSample.ts][servicegetsample] | Gets the status of service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBDataTransferServiceGet.json | -| [serviceListSample.ts][servicelistsample] | Gets the status of service. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBServicesList.json | -| [sqlResourcesCreateUpdateClientEncryptionKeySample.ts][sqlresourcescreateupdateclientencryptionkeysample] | Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlContainerSample.ts][sqlresourcescreateupdatesqlcontainersample] | Create or update an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlDatabaseSample.ts][sqlresourcescreateupdatesqldatabasesample] | Create or update an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts][sqlresourcescreateupdatesqlroleassignmentsample] | Creates or updates an Azure Cosmos DB SQL Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts][sqlresourcescreateupdatesqlroledefinitionsample] | Creates or updates an Azure Cosmos DB SQL Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlStoredProcedureSample.ts][sqlresourcescreateupdatesqlstoredproceduresample] | Create or update an Azure Cosmos DB SQL storedProcedure x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlTriggerSample.ts][sqlresourcescreateupdatesqltriggersample] | Create or update an Azure Cosmos DB SQL trigger x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerCreateUpdate.json | -| [sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts][sqlresourcescreateupdatesqluserdefinedfunctionsample] | Create or update an Azure Cosmos DB SQL userDefinedFunction x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json | -| [sqlResourcesDeleteSqlContainerSample.ts][sqlresourcesdeletesqlcontainersample] | Deletes an existing Azure Cosmos DB SQL container. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerDelete.json | -| [sqlResourcesDeleteSqlDatabaseSample.ts][sqlresourcesdeletesqldatabasesample] | Deletes an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseDelete.json | -| [sqlResourcesDeleteSqlRoleAssignmentSample.ts][sqlresourcesdeletesqlroleassignmentsample] | Deletes an existing Azure Cosmos DB SQL Role Assignment. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentDelete.json | -| [sqlResourcesDeleteSqlRoleDefinitionSample.ts][sqlresourcesdeletesqlroledefinitionsample] | Deletes an existing Azure Cosmos DB SQL Role Definition. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionDelete.json | -| [sqlResourcesDeleteSqlStoredProcedureSample.ts][sqlresourcesdeletesqlstoredproceduresample] | Deletes an existing Azure Cosmos DB SQL storedProcedure. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureDelete.json | -| [sqlResourcesDeleteSqlTriggerSample.ts][sqlresourcesdeletesqltriggersample] | Deletes an existing Azure Cosmos DB SQL trigger. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerDelete.json | -| [sqlResourcesDeleteSqlUserDefinedFunctionSample.ts][sqlresourcesdeletesqluserdefinedfunctionsample] | Deletes an existing Azure Cosmos DB SQL userDefinedFunction. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionDelete.json | -| [sqlResourcesGetClientEncryptionKeySample.ts][sqlresourcesgetclientencryptionkeysample] | Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeyGet.json | -| [sqlResourcesGetSqlContainerSample.ts][sqlresourcesgetsqlcontainersample] | Gets the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerGet.json | -| [sqlResourcesGetSqlContainerThroughputSample.ts][sqlresourcesgetsqlcontainerthroughputsample] | Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputGet.json | -| [sqlResourcesGetSqlDatabaseSample.ts][sqlresourcesgetsqldatabasesample] | Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseGet.json | -| [sqlResourcesGetSqlDatabaseThroughputSample.ts][sqlresourcesgetsqldatabasethroughputsample] | Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputGet.json | -| [sqlResourcesGetSqlRoleAssignmentSample.ts][sqlresourcesgetsqlroleassignmentsample] | Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentGet.json | -| [sqlResourcesGetSqlRoleDefinitionSample.ts][sqlresourcesgetsqlroledefinitionsample] | Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionGet.json | -| [sqlResourcesGetSqlStoredProcedureSample.ts][sqlresourcesgetsqlstoredproceduresample] | Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureGet.json | -| [sqlResourcesGetSqlTriggerSample.ts][sqlresourcesgetsqltriggersample] | Gets the SQL trigger under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerGet.json | -| [sqlResourcesGetSqlUserDefinedFunctionSample.ts][sqlresourcesgetsqluserdefinedfunctionsample] | Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionGet.json | -| [sqlResourcesListClientEncryptionKeysSample.ts][sqlresourceslistclientencryptionkeyssample] | Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlClientEncryptionKeysList.json | -| [sqlResourcesListSqlContainersSample.ts][sqlresourceslistsqlcontainerssample] | Lists the SQL container under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerList.json | -| [sqlResourcesListSqlDatabasesSample.ts][sqlresourceslistsqldatabasessample] | Lists the SQL databases under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseList.json | -| [sqlResourcesListSqlRoleAssignmentsSample.ts][sqlresourceslistsqlroleassignmentssample] | Retrieves the list of all Azure Cosmos DB SQL Role Assignments. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleAssignmentList.json | -| [sqlResourcesListSqlRoleDefinitionsSample.ts][sqlresourceslistsqlroledefinitionssample] | Retrieves the list of all Azure Cosmos DB SQL Role Definitions. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlRoleDefinitionList.json | -| [sqlResourcesListSqlStoredProceduresSample.ts][sqlresourceslistsqlstoredproceduressample] | Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlStoredProcedureList.json | -| [sqlResourcesListSqlTriggersSample.ts][sqlresourceslistsqltriggerssample] | Lists the SQL trigger under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlTriggerList.json | -| [sqlResourcesListSqlUserDefinedFunctionsSample.ts][sqlresourceslistsqluserdefinedfunctionssample] | Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlUserDefinedFunctionList.json | -| [sqlResourcesMigrateSqlContainerToAutoscaleSample.ts][sqlresourcesmigratesqlcontainertoautoscalesample] | Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToAutoscale.json | -| [sqlResourcesMigrateSqlContainerToManualThroughputSample.ts][sqlresourcesmigratesqlcontainertomanualthroughputsample] | Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerMigrateToManualThroughput.json | -| [sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts][sqlresourcesmigratesqldatabasetoautoscalesample] | Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json | -| [sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts][sqlresourcesmigratesqldatabasetomanualthroughputsample] | Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json | -| [sqlResourcesRetrieveContinuousBackupInformationSample.ts][sqlresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a container resource. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerBackupInformation.json | -| [sqlResourcesUpdateSqlContainerThroughputSample.ts][sqlresourcesupdatesqlcontainerthroughputsample] | Update RUs per second of an Azure Cosmos DB SQL container x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlContainerThroughputUpdate.json | -| [sqlResourcesUpdateSqlDatabaseThroughputSample.ts][sqlresourcesupdatesqldatabasethroughputsample] | Update RUs per second of an Azure Cosmos DB SQL database x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBSqlDatabaseThroughputUpdate.json | -| [tableResourcesCreateUpdateTableSample.ts][tableresourcescreateupdatetablesample] | Create or update an Azure Cosmos DB Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableCreateUpdate.json | -| [tableResourcesDeleteTableSample.ts][tableresourcesdeletetablesample] | Deletes an existing Azure Cosmos DB Table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableDelete.json | -| [tableResourcesGetTableSample.ts][tableresourcesgettablesample] | Gets the Tables under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableGet.json | -| [tableResourcesGetTableThroughputSample.ts][tableresourcesgettablethroughputsample] | Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputGet.json | -| [tableResourcesListTablesSample.ts][tableresourceslisttablessample] | Lists the Tables under an existing Azure Cosmos DB database account. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableList.json | -| [tableResourcesMigrateTableToAutoscaleSample.ts][tableresourcesmigratetabletoautoscalesample] | Migrate an Azure Cosmos DB Table from manual throughput to autoscale x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToAutoscale.json | -| [tableResourcesMigrateTableToManualThroughputSample.ts][tableresourcesmigratetabletomanualthroughputsample] | Migrate an Azure Cosmos DB Table from autoscale to manual throughput x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableMigrateToManualThroughput.json | -| [tableResourcesRetrieveContinuousBackupInformationSample.ts][tableresourcesretrievecontinuousbackupinformationsample] | Retrieves continuous backup information for a table. x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableBackupInformation.json | -| [tableResourcesUpdateTableThroughputSample.ts][tableresourcesupdatetablethroughputsample] | Update RUs per second of an Azure Cosmos DB Table x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-11-15/examples/CosmosDBTableThroughputUpdate.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/cassandraClustersCreateUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env COSMOSDB_SUBSCRIPTION_ID="" COSMOSDB_RESOURCE_GROUP="" node dist/cassandraClustersCreateUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[cassandraclusterscreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersCreateUpdateSample.ts -[cassandraclustersdeallocatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersDeallocateSample.ts -[cassandraclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersDeleteSample.ts -[cassandraclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersGetSample.ts -[cassandraclustersinvokecommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersInvokeCommandSample.ts -[cassandraclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersListByResourceGroupSample.ts -[cassandraclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersListBySubscriptionSample.ts -[cassandraclustersstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersStartSample.ts -[cassandraclustersstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersStatusSample.ts -[cassandraclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraClustersUpdateSample.ts -[cassandradatacenterscreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersCreateUpdateSample.ts -[cassandradatacentersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersDeleteSample.ts -[cassandradatacentersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersGetSample.ts -[cassandradatacenterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersListSample.ts -[cassandradatacentersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraDataCentersUpdateSample.ts -[cassandraresourcescreateupdatecassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesCreateUpdateCassandraKeyspaceSample.ts -[cassandraresourcescreateupdatecassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesCreateUpdateCassandraTableSample.ts -[cassandraresourcesdeletecassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesDeleteCassandraKeyspaceSample.ts -[cassandraresourcesdeletecassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesDeleteCassandraTableSample.ts -[cassandraresourcesgetcassandrakeyspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraKeyspaceSample.ts -[cassandraresourcesgetcassandrakeyspacethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraKeyspaceThroughputSample.ts -[cassandraresourcesgetcassandratablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraTableSample.ts -[cassandraresourcesgetcassandratablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesGetCassandraTableThroughputSample.ts -[cassandraresourceslistcassandrakeyspacessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesListCassandraKeyspacesSample.ts -[cassandraresourceslistcassandratablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesListCassandraTablesSample.ts -[cassandraresourcesmigratecassandrakeyspacetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToAutoscaleSample.ts -[cassandraresourcesmigratecassandrakeyspacetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraKeyspaceToManualThroughputSample.ts -[cassandraresourcesmigratecassandratabletoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraTableToAutoscaleSample.ts -[cassandraresourcesmigratecassandratabletomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesMigrateCassandraTableToManualThroughputSample.ts -[cassandraresourcesupdatecassandrakeyspacethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesUpdateCassandraKeyspaceThroughputSample.ts -[cassandraresourcesupdatecassandratablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/cassandraResourcesUpdateCassandraTableThroughputSample.ts -[collectionlistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListMetricDefinitionsSample.ts -[collectionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListMetricsSample.ts -[collectionlistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionListUsagesSample.ts -[collectionpartitionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionListMetricsSample.ts -[collectionpartitionlistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionListUsagesSample.ts -[collectionpartitionregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionPartitionRegionListMetricsSample.ts -[collectionregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/collectionRegionListMetricsSample.ts -[databaseaccountregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountRegionListMetricsSample.ts -[databaseaccountschecknameexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsCheckNameExistsSample.ts -[databaseaccountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsCreateOrUpdateSample.ts -[databaseaccountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsDeleteSample.ts -[databaseaccountsfailoverprioritychangesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsFailoverPriorityChangeSample.ts -[databaseaccountsgetreadonlykeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsGetReadOnlyKeysSample.ts -[databaseaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsGetSample.ts -[databaseaccountslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListByResourceGroupSample.ts -[databaseaccountslistconnectionstringssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListConnectionStringsSample.ts -[databaseaccountslistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListKeysSample.ts -[databaseaccountslistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListMetricDefinitionsSample.ts -[databaseaccountslistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListMetricsSample.ts -[databaseaccountslistreadonlykeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListReadOnlyKeysSample.ts -[databaseaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListSample.ts -[databaseaccountslistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsListUsagesSample.ts -[databaseaccountsofflineregionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsOfflineRegionSample.ts -[databaseaccountsonlineregionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsOnlineRegionSample.ts -[databaseaccountsregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsRegenerateKeySample.ts -[databaseaccountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseAccountsUpdateSample.ts -[databaselistmetricdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListMetricDefinitionsSample.ts -[databaselistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListMetricsSample.ts -[databaselistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/databaseListUsagesSample.ts -[gremlinresourcescreateupdategremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesCreateUpdateGremlinDatabaseSample.ts -[gremlinresourcescreateupdategremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesCreateUpdateGremlinGraphSample.ts -[gremlinresourcesdeletegremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesDeleteGremlinDatabaseSample.ts -[gremlinresourcesdeletegremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesDeleteGremlinGraphSample.ts -[gremlinresourcesgetgremlindatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinDatabaseSample.ts -[gremlinresourcesgetgremlindatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinDatabaseThroughputSample.ts -[gremlinresourcesgetgremlingraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinGraphSample.ts -[gremlinresourcesgetgremlingraphthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesGetGremlinGraphThroughputSample.ts -[gremlinresourceslistgremlindatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesListGremlinDatabasesSample.ts -[gremlinresourceslistgremlingraphssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesListGremlinGraphsSample.ts -[gremlinresourcesmigrategremlindatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinDatabaseToAutoscaleSample.ts -[gremlinresourcesmigrategremlindatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinDatabaseToManualThroughputSample.ts -[gremlinresourcesmigrategremlingraphtoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinGraphToAutoscaleSample.ts -[gremlinresourcesmigrategremlingraphtomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesMigrateGremlinGraphToManualThroughputSample.ts -[gremlinresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesRetrieveContinuousBackupInformationSample.ts -[gremlinresourcesupdategremlindatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesUpdateGremlinDatabaseThroughputSample.ts -[gremlinresourcesupdategremlingraphthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/gremlinResourcesUpdateGremlinGraphThroughputSample.ts -[locationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/locationsGetSample.ts -[locationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/locationsListSample.ts -[mongodbresourcescreateupdatemongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoDbcollectionSample.ts -[mongodbresourcescreateupdatemongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoDbdatabaseSample.ts -[mongodbresourcescreateupdatemongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoRoleDefinitionSample.ts -[mongodbresourcescreateupdatemongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesCreateUpdateMongoUserDefinitionSample.ts -[mongodbresourcesdeletemongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoDbcollectionSample.ts -[mongodbresourcesdeletemongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoDbdatabaseSample.ts -[mongodbresourcesdeletemongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoRoleDefinitionSample.ts -[mongodbresourcesdeletemongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesDeleteMongoUserDefinitionSample.ts -[mongodbresourcesgetmongodbcollectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbcollectionSample.ts -[mongodbresourcesgetmongodbcollectionthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbcollectionThroughputSample.ts -[mongodbresourcesgetmongodbdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbdatabaseSample.ts -[mongodbresourcesgetmongodbdatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoDbdatabaseThroughputSample.ts -[mongodbresourcesgetmongoroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoRoleDefinitionSample.ts -[mongodbresourcesgetmongouserdefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesGetMongoUserDefinitionSample.ts -[mongodbresourceslistmongodbcollectionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoDbcollectionsSample.ts -[mongodbresourceslistmongodbdatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoDbdatabasesSample.ts -[mongodbresourceslistmongoroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoRoleDefinitionsSample.ts -[mongodbresourceslistmongouserdefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesListMongoUserDefinitionsSample.ts -[mongodbresourcesmigratemongodbcollectiontoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToAutoscaleSample.ts -[mongodbresourcesmigratemongodbcollectiontomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbcollectionToManualThroughputSample.ts -[mongodbresourcesmigratemongodbdatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToAutoscaleSample.ts -[mongodbresourcesmigratemongodbdatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesMigrateMongoDbdatabaseToManualThroughputSample.ts -[mongodbresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesRetrieveContinuousBackupInformationSample.ts -[mongodbresourcesupdatemongodbcollectionthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesUpdateMongoDbcollectionThroughputSample.ts -[mongodbresourcesupdatemongodbdatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/mongoDbResourcesUpdateMongoDbdatabaseThroughputSample.ts -[notebookworkspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesCreateOrUpdateSample.ts -[notebookworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesDeleteSample.ts -[notebookworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesGetSample.ts -[notebookworkspaceslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesListByDatabaseAccountSample.ts -[notebookworkspaceslistconnectioninfosample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesListConnectionInfoSample.ts -[notebookworkspacesregenerateauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesRegenerateAuthTokenSample.ts -[notebookworkspacesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/notebookWorkspacesStartSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/operationsListSample.ts -[partitionkeyrangeidlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/partitionKeyRangeIdListMetricsSample.ts -[partitionkeyrangeidregionlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/partitionKeyRangeIdRegionListMetricsSample.ts -[percentilelistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileListMetricsSample.ts -[percentilesourcetargetlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileSourceTargetListMetricsSample.ts -[percentiletargetlistmetricssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/percentileTargetListMetricsSample.ts -[privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts -[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsDeleteSample.ts -[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsGetSample.ts -[privateendpointconnectionslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateEndpointConnectionsListByDatabaseAccountSample.ts -[privatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateLinkResourcesGetSample.ts -[privatelinkresourceslistbydatabaseaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/privateLinkResourcesListByDatabaseAccountSample.ts -[restorabledatabaseaccountsgetbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsGetByLocationSample.ts -[restorabledatabaseaccountslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsListByLocationSample.ts -[restorabledatabaseaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableDatabaseAccountsListSample.ts -[restorablegremlindatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinDatabasesListSample.ts -[restorablegremlingraphslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinGraphsListSample.ts -[restorablegremlinresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableGremlinResourcesListSample.ts -[restorablemongodbcollectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbCollectionsListSample.ts -[restorablemongodbdatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbDatabasesListSample.ts -[restorablemongodbresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableMongodbResourcesListSample.ts -[restorablesqlcontainerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlContainersListSample.ts -[restorablesqldatabaseslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlDatabasesListSample.ts -[restorablesqlresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableSqlResourcesListSample.ts -[restorabletableresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableTableResourcesListSample.ts -[restorabletableslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/restorableTablesListSample.ts -[servicecreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceCreateSample.ts -[servicedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceDeleteSample.ts -[servicegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceGetSample.ts -[servicelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/serviceListSample.ts -[sqlresourcescreateupdateclientencryptionkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateClientEncryptionKeySample.ts -[sqlresourcescreateupdatesqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlContainerSample.ts -[sqlresourcescreateupdatesqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlDatabaseSample.ts -[sqlresourcescreateupdatesqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlRoleAssignmentSample.ts -[sqlresourcescreateupdatesqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlRoleDefinitionSample.ts -[sqlresourcescreateupdatesqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlStoredProcedureSample.ts -[sqlresourcescreateupdatesqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlTriggerSample.ts -[sqlresourcescreateupdatesqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesCreateUpdateSqlUserDefinedFunctionSample.ts -[sqlresourcesdeletesqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlContainerSample.ts -[sqlresourcesdeletesqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlDatabaseSample.ts -[sqlresourcesdeletesqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlRoleAssignmentSample.ts -[sqlresourcesdeletesqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlRoleDefinitionSample.ts -[sqlresourcesdeletesqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlStoredProcedureSample.ts -[sqlresourcesdeletesqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlTriggerSample.ts -[sqlresourcesdeletesqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesDeleteSqlUserDefinedFunctionSample.ts -[sqlresourcesgetclientencryptionkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetClientEncryptionKeySample.ts -[sqlresourcesgetsqlcontainersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlContainerSample.ts -[sqlresourcesgetsqlcontainerthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlContainerThroughputSample.ts -[sqlresourcesgetsqldatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlDatabaseSample.ts -[sqlresourcesgetsqldatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlDatabaseThroughputSample.ts -[sqlresourcesgetsqlroleassignmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlRoleAssignmentSample.ts -[sqlresourcesgetsqlroledefinitionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlRoleDefinitionSample.ts -[sqlresourcesgetsqlstoredproceduresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlStoredProcedureSample.ts -[sqlresourcesgetsqltriggersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlTriggerSample.ts -[sqlresourcesgetsqluserdefinedfunctionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesGetSqlUserDefinedFunctionSample.ts -[sqlresourceslistclientencryptionkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListClientEncryptionKeysSample.ts -[sqlresourceslistsqlcontainerssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlContainersSample.ts -[sqlresourceslistsqldatabasessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlDatabasesSample.ts -[sqlresourceslistsqlroleassignmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlRoleAssignmentsSample.ts -[sqlresourceslistsqlroledefinitionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlRoleDefinitionsSample.ts -[sqlresourceslistsqlstoredproceduressample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlStoredProceduresSample.ts -[sqlresourceslistsqltriggerssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlTriggersSample.ts -[sqlresourceslistsqluserdefinedfunctionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesListSqlUserDefinedFunctionsSample.ts -[sqlresourcesmigratesqlcontainertoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlContainerToAutoscaleSample.ts -[sqlresourcesmigratesqlcontainertomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlContainerToManualThroughputSample.ts -[sqlresourcesmigratesqldatabasetoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlDatabaseToAutoscaleSample.ts -[sqlresourcesmigratesqldatabasetomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesMigrateSqlDatabaseToManualThroughputSample.ts -[sqlresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesRetrieveContinuousBackupInformationSample.ts -[sqlresourcesupdatesqlcontainerthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesUpdateSqlContainerThroughputSample.ts -[sqlresourcesupdatesqldatabasethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/sqlResourcesUpdateSqlDatabaseThroughputSample.ts -[tableresourcescreateupdatetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesCreateUpdateTableSample.ts -[tableresourcesdeletetablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesDeleteTableSample.ts -[tableresourcesgettablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesGetTableSample.ts -[tableresourcesgettablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesGetTableThroughputSample.ts -[tableresourceslisttablessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesListTablesSample.ts -[tableresourcesmigratetabletoautoscalesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesMigrateTableToAutoscaleSample.ts -[tableresourcesmigratetabletomanualthroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesMigrateTableToManualThroughputSample.ts -[tableresourcesretrievecontinuousbackupinformationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesRetrieveContinuousBackupInformationSample.ts -[tableresourcesupdatetablethroughputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/arm-cosmosdb/samples/v16/typescript/src/tableResourcesUpdateTableThroughputSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts index e3a6c1e8d423..a630556bdd2a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts @@ -15,6 +15,7 @@ import { } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { + ChaosFaultImpl, DatabaseAccountsImpl, OperationsImpl, DatabaseImpl, @@ -28,14 +29,17 @@ import { CollectionPartitionImpl, PartitionKeyRangeIdImpl, PartitionKeyRangeIdRegionImpl, + GraphResourcesImpl, SqlResourcesImpl, MongoDBResourcesImpl, TableResourcesImpl, CassandraResourcesImpl, GremlinResourcesImpl, LocationsImpl, + DataTransferJobsImpl, CassandraClustersImpl, CassandraDataCentersImpl, + NetworkSecurityPerimeterConfigurationsImpl, NotebookWorkspacesImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, @@ -52,8 +56,13 @@ import { RestorableTablesImpl, RestorableTableResourcesImpl, ServiceImpl, -} from "./operations"; + ThroughputPoolsImpl, + ThroughputPoolImpl, + ThroughputPoolAccountsImpl, + ThroughputPoolAccountImpl, +} from "./operations/index.js"; import { + ChaosFault, DatabaseAccounts, Operations, Database, @@ -67,14 +76,17 @@ import { CollectionPartition, PartitionKeyRangeId, PartitionKeyRangeIdRegion, + GraphResources, SqlResources, MongoDBResources, TableResources, CassandraResources, GremlinResources, Locations, + DataTransferJobs, CassandraClusters, CassandraDataCenters, + NetworkSecurityPerimeterConfigurations, NotebookWorkspaces, PrivateEndpointConnections, PrivateLinkResources, @@ -91,8 +103,12 @@ import { RestorableTables, RestorableTableResources, Service, -} from "./operationsInterfaces"; -import { CosmosDBManagementClientOptionalParams } from "./models"; + ThroughputPools, + ThroughputPool, + ThroughputPoolAccounts, + ThroughputPoolAccount, +} from "./operationsInterfaces/index.js"; +import { CosmosDBManagementClientOptionalParams } from "./models/index.js"; export class CosmosDBManagementClient extends coreClient.ServiceClient { $host: string; @@ -102,7 +118,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { /** * Initializes a new instance of the CosmosDBManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( @@ -126,7 +142,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-cosmosdb/16.2.0`; + const packageDetails = `azsdk-js-arm-cosmosdb/16.3.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -180,7 +196,8 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-11-15"; + this.apiVersion = options.apiVersion || "2024-12-01-preview"; + this.chaosFault = new ChaosFaultImpl(this); this.databaseAccounts = new DatabaseAccountsImpl(this); this.operations = new OperationsImpl(this); this.database = new DatabaseImpl(this); @@ -194,14 +211,18 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { this.collectionPartition = new CollectionPartitionImpl(this); this.partitionKeyRangeId = new PartitionKeyRangeIdImpl(this); this.partitionKeyRangeIdRegion = new PartitionKeyRangeIdRegionImpl(this); + this.graphResources = new GraphResourcesImpl(this); this.sqlResources = new SqlResourcesImpl(this); this.mongoDBResources = new MongoDBResourcesImpl(this); this.tableResources = new TableResourcesImpl(this); this.cassandraResources = new CassandraResourcesImpl(this); this.gremlinResources = new GremlinResourcesImpl(this); this.locations = new LocationsImpl(this); + this.dataTransferJobs = new DataTransferJobsImpl(this); this.cassandraClusters = new CassandraClustersImpl(this); this.cassandraDataCenters = new CassandraDataCentersImpl(this); + this.networkSecurityPerimeterConfigurations = + new NetworkSecurityPerimeterConfigurationsImpl(this); this.notebookWorkspaces = new NotebookWorkspacesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); @@ -220,6 +241,10 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { this.restorableTables = new RestorableTablesImpl(this); this.restorableTableResources = new RestorableTableResourcesImpl(this); this.service = new ServiceImpl(this); + this.throughputPools = new ThroughputPoolsImpl(this); + this.throughputPool = new ThroughputPoolImpl(this); + this.throughputPoolAccounts = new ThroughputPoolAccountsImpl(this); + this.throughputPoolAccount = new ThroughputPoolAccountImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -251,6 +276,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { this.pipeline.addPolicy(apiVersionPolicy); } + chaosFault: ChaosFault; databaseAccounts: DatabaseAccounts; operations: Operations; database: Database; @@ -264,14 +290,17 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { collectionPartition: CollectionPartition; partitionKeyRangeId: PartitionKeyRangeId; partitionKeyRangeIdRegion: PartitionKeyRangeIdRegion; + graphResources: GraphResources; sqlResources: SqlResources; mongoDBResources: MongoDBResources; tableResources: TableResources; cassandraResources: CassandraResources; gremlinResources: GremlinResources; locations: Locations; + dataTransferJobs: DataTransferJobs; cassandraClusters: CassandraClusters; cassandraDataCenters: CassandraDataCenters; + networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations; notebookWorkspaces: NotebookWorkspaces; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; @@ -288,4 +317,8 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { restorableTables: RestorableTables; restorableTableResources: RestorableTableResources; service: Service; + throughputPools: ThroughputPools; + throughputPool: ThroughputPool; + throughputPoolAccounts: ThroughputPoolAccounts; + throughputPoolAccount: ThroughputPoolAccount; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/index.ts index b4d35fbb2d75..8b9e6e85a797 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { CosmosDBManagementClient } from "./cosmosDBManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { CosmosDBManagementClient } from "./cosmosDBManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts index 2f59ae1aa644..3317f770cd4f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts @@ -12,6 +12,11 @@ export type BackupPolicyUnion = | BackupPolicy | PeriodicModeBackupPolicy | ContinuousModeBackupPolicy; +export type DataTransferDataSourceSinkUnion = + | DataTransferDataSourceSink + | BaseCosmosDataTransferDataSourceSinkUnion + | CosmosMongoVCoreDataTransferDataSourceSink + | AzureBlobDataTransferDataSourceSink; export type ServiceResourcePropertiesUnion = | ServiceResourceProperties | DataTransferServiceResourceProperties @@ -24,40 +29,113 @@ export type ServiceResourceCreateUpdatePropertiesUnion = | SqlDedicatedGatewayServiceResourceCreateUpdateProperties | GraphAPIComputeServiceResourceCreateUpdateProperties | MaterializedViewsBuilderServiceResourceCreateUpdateProperties; +export type BaseCosmosDataTransferDataSourceSinkUnion = + | BaseCosmosDataTransferDataSourceSink + | CosmosCassandraDataTransferDataSourceSink + | CosmosMongoDataTransferDataSourceSink + | CosmosSqlDataTransferDataSourceSink; -/** Identity for the resource. */ -export interface ManagedServiceIdentity { +/** Chaos Fault List Response. */ +export interface ChaosFaultListResponse { /** - * The principal id of the system assigned identity. This property will only be provided for a system assigned identity. + * List of Chaos Faults. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly value?: ChaosFaultResource[]; /** - * The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. + * The link used to get the next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; - /** The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ - type?: ResourceIdentityType; - /** The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: { - [ - propertyName: string - ]: Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties; - }; + readonly nextLink?: string; } -export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * The principal id of user assigned identity. + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly id?: string; /** - * The client id of user assigned identity. + * The name of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clientId?: string; + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; } /** IpAddressOrRange object */ @@ -97,7 +175,7 @@ export interface Location { */ readonly documentEndpoint?: string; /** - * The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – the Cosmos DB account deletion failed. + * The provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; @@ -147,25 +225,6 @@ export interface PrivateLinkServiceConnectionStateProperty { readonly actionsRequired?: string; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} - export interface ApiProperties { /** Describes the version of the MongoDB account. */ serverVersion?: ServerVersion; @@ -235,12 +294,43 @@ export interface CorsPolicy { maxAgeInSeconds?: number; } +/** Indicates what diagnostic log settings are to be enabled. */ +export interface DiagnosticLogSettings { + /** Describe the level of detail with which queries are to be logged. */ + enableFullTextQuery?: EnableFullTextQuery; +} + /** The object that represents all properties related to capacity enforcement on an account. */ export interface Capacity { /** The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of throughput. */ totalThroughputLimit?: number; } +/** The transition state information related capacity mode change with update request. */ +export interface CapacityModeChangeTransitionState { + /** The transition status of capacity mode. */ + capacityModeTransitionStatus?: CapacityModeTransitionStatus; + /** Indicates the current capacity mode of the account. */ + currentCapacityMode?: CapacityMode; + /** Indicates the previous capacity mode of the account before successful transition. */ + previousCapacityMode?: CapacityMode; + /** + * Begin time in UTC of the capacity mode change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityModeTransitionBeginTimestamp?: Date; + /** + * End time in UTC of the capacity mode change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityModeTransitionEndTimestamp?: Date; + /** + * End time in UTC of the last successful capacity mode change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityModeLastSuccessfulTransitionEndTimestamp?: Date; +} + /** The metadata related to each access key for the given Cosmos DB database account. */ export interface DatabaseAccountKeysMetadata { /** @@ -274,22 +364,6 @@ export interface AccountKeyMetadata { readonly generationTime?: Date; } -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - /** The core properties of ARM resources. */ export interface ARMResourceProperties { /** @@ -311,6 +385,43 @@ export interface ARMResourceProperties { location?: string; /** Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */ tags?: { [propertyName: string]: string }; + /** Identity for the resource. */ + identity?: ManagedServiceIdentity; +} + +/** Identity for the resource. */ +export interface ManagedServiceIdentity { + /** + * The principal id of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ + type?: ResourceIdentityType; + /** The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + userAssignedIdentities?: { + [ + propertyName: string + ]: Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties; + }; +} + +export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { + /** + * The principal id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; } /** Parameters for patching Azure Cosmos DB database account properties. */ @@ -365,10 +476,16 @@ export interface DatabaseAccountUpdateParameters { networkAclBypass?: NetworkAclBypass; /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ networkAclBypassResourceIds?: string[]; + /** The Object representing the different Diagnostic log settings for the Cosmos DB Account. */ + diagnosticLogSettings?: DiagnosticLogSettings; /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ disableLocalAuth?: boolean; /** The object that represents all properties related to capacity enforcement on an account. */ capacity?: Capacity; + /** Indicates the capacityMode of the Cosmos DB account. */ + capacityMode?: CapacityMode; + /** Flag to indicate whether to enable MaterializedViews on the Cosmos DB account */ + enableMaterializedViews?: boolean; /** * This property is ignored during the update operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -376,13 +493,17 @@ export interface DatabaseAccountUpdateParameters { readonly keysMetadata?: DatabaseAccountKeysMetadata; /** Flag to indicate enabling/disabling of Partition Merge feature on the account */ enablePartitionMerge?: boolean; - /** Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */ - minimalTlsVersion?: MinimalTlsVersion; - /** Flag to indicate enabling/disabling of Burst Capacity feature on the account */ + /** Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account */ enableBurstCapacity?: boolean; + /** Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. */ + minimalTlsVersion?: MinimalTlsVersion; /** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ customerManagedKeyStatus?: string; - /** Flag to indicate enabling/disabling of PerRegionPerPartitionAutoscale feature on the account */ + /** Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account */ + enablePriorityBasedExecution?: boolean; + /** Enum to indicate default Priority Level of request for Priority Based Execution. */ + defaultPriorityLevel?: DefaultPriorityLevel; + /** Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account */ enablePerRegionPerPartitionAutoscale?: boolean; } @@ -451,55 +572,6 @@ export interface RegionForOnlineOffline { region: string; } -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - /** Parameters to regenerate the keys within the database account. */ export interface DatabaseAccountRegenerateKeyParameters { /** The access key to regenerate. */ @@ -776,42 +848,19 @@ export interface MetricAvailability { readonly retention?: string; } -/** The List operation response, that contains the SQL databases and their properties. */ -export interface SqlDatabaseListResult { +/** The List operation response, that contains the Graph resource and their properties. */ +export interface GraphResourcesListResult { /** - * List of SQL databases and their properties. + * List of Graph resource and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SqlDatabaseGetResults[]; + readonly value?: GraphResourceGetResults[]; } -/** Cosmos DB SQL database resource object */ -export interface SqlDatabaseResource { - /** Name of the Cosmos DB SQL database */ +/** Cosmos DB Graph resource object */ +export interface GraphResource { + /** Name of the Cosmos DB Graph */ id: string; - /** Parameters to indicate the information about the restore */ - restoreParameters?: ResourceRestoreParameters; - /** Enum to indicate the mode of resource creation. */ - createMode?: CreateMode; -} - -/** The system generated resource properties associated with SQL databases, SQL containers, Gremlin databases and Gremlin graphs. */ -export interface ExtendedResourceProperties { - /** - * A system generated property. A unique identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rid?: string; - /** - * A system generated property that denotes the last updated timestamp of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ts?: number; - /** - * A system generated property representing the resource etag required for optimistic concurrency control. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; } /** Cosmos DB options resource object */ @@ -835,6 +884,44 @@ export interface CreateUpdateOptions { autoscaleSettings?: AutoscaleSettings; } +/** The List operation response, that contains the SQL databases and their properties. */ +export interface SqlDatabaseListResult { + /** + * List of SQL databases and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: SqlDatabaseGetResults[]; +} + +/** Cosmos DB SQL database resource object */ +export interface SqlDatabaseResource { + /** Name of the Cosmos DB SQL database */ + id: string; + /** Parameters to indicate the information about the restore */ + restoreParameters?: ResourceRestoreParameters; + /** Enum to indicate the mode of resource creation. */ + createMode?: CreateMode; +} + +/** The system generated resource properties associated with SQL databases, SQL containers, Gremlin databases and Gremlin graphs. */ +export interface ExtendedResourceProperties { + /** + * A system generated property. A unique identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rid?: string; + /** + * A system generated property that denotes the last updated timestamp of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ts?: number; + /** + * A system generated property representing the resource etag required for optimistic concurrency control. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; +} + /** Cosmos DB resource throughput object. Either throughput is required or autoscaleSettings is required, but not both. */ export interface ThroughputSettingsResource { /** Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. */ @@ -861,6 +948,8 @@ export interface ThroughputSettingsResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly softAllowedMaximumThroughput?: string; + /** Array of Throughput Bucket limits to be applied to the Cosmos DB container */ + throughputBuckets?: ThroughputBucketResource[]; } /** Cosmos DB provisioned throughput settings object */ @@ -890,6 +979,72 @@ export interface ThroughputPolicyResource { incrementPercent?: number; } +/** Cosmos DB throughput bucket object */ +export interface ThroughputBucketResource { + /** Represents the throughput bucket id */ + id: number; + /** Represents maximum percentage throughput that can be used by the bucket */ + maxThroughputPercentage: number; +} + +/** The List operation response, that contains the client encryption keys and their properties. */ +export interface ClientEncryptionKeysListResult { + /** + * List of client encryption keys and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ClientEncryptionKeyGetResults[]; +} + +/** Cosmos DB client encryption key resource object. */ +export interface ClientEncryptionKeyResource { + /** Name of the ClientEncryptionKey */ + id?: string; + /** Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data. */ + encryptionAlgorithm?: string; + /** Wrapped (encrypted) form of the key represented as a byte array. */ + wrappedDataEncryptionKey?: Uint8Array; + /** Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. */ + keyWrapMetadata?: KeyWrapMetadata; +} + +/** Represents key wrap metadata that a key wrapping provider can use to wrap/unwrap a client encryption key. */ +export interface KeyWrapMetadata { + /** The name of associated KeyEncryptionKey (aka CustomerManagedKey). */ + name?: string; + /** ProviderName of KeyStoreProvider. */ + type?: string; + /** Reference / link to the KeyEncryptionKey. */ + value?: string; + /** Algorithm used in wrapping and unwrapping of the data encryption key. */ + algorithm?: string; +} + +/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ +export interface ARMProxyResource { + /** + * The unique resource identifier of the database account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the database account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** Parameters to create and update ClientEncryptionKey. */ +export interface ClientEncryptionKeyCreateUpdateParameters { + /** The standard JSON format of a ClientEncryptionKey */ + resource: ClientEncryptionKeyResource; +} + /** The List operation response, that contains the containers and their properties. */ export interface SqlContainerListResult { /** @@ -921,6 +1076,8 @@ export interface SqlContainerResource { restoreParameters?: ResourceRestoreParameters; /** Enum to indicate the mode of resource creation. */ createMode?: CreateMode; + /** The configuration for defining Materialized Views. This must be specified only for creating a Materialized View container. */ + materializedViewDefinition?: MaterializedViewDefinition; /** List of computed properties */ computedProperties?: ComputedProperty[]; /** The vector embedding policy for the container. */ @@ -1046,6 +1203,19 @@ export interface ClientEncryptionIncludedPath { encryptionAlgorithm: string; } +/** Materialized View definition for the container. */ +export interface MaterializedViewDefinition { + /** + * An unique identifier for the source collection. This is a system generated property. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceCollectionRid?: string; + /** The name of the source container on which the Materialized View will be created. */ + sourceCollectionId: string; + /** The definition should be an SQL query which would be used to fetch data from the source container to populate into the Materialized View container. */ + definition: string; +} + /** The definition of a computed property */ export interface ComputedProperty { /** The name of a computed property, for example - "cp_lowerName" */ @@ -1072,62 +1242,69 @@ export interface VectorEmbedding { dimensions: number; } -/** The List operation response, that contains the client encryption keys and their properties. */ -export interface ClientEncryptionKeysListResult { +/** The properties of an Azure Cosmos DB merge operations */ +export interface MergeParameters { + /** Specifies whether the operation is a real merge operation or a simulation. */ + isDryRun?: boolean; +} + +/** List of physical partitions and their properties returned by a merge operation. */ +export interface PhysicalPartitionStorageInfoCollection { /** - * List of client encryption keys and their properties. + * List of physical partitions and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ClientEncryptionKeyGetResults[]; -} - -/** Cosmos DB client encryption key resource object. */ -export interface ClientEncryptionKeyResource { - /** Name of the ClientEncryptionKey */ - id?: string; - /** Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data. */ - encryptionAlgorithm?: string; - /** Wrapped (encrypted) form of the key represented as a byte array. */ - wrappedDataEncryptionKey?: Uint8Array; - /** Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. */ - keyWrapMetadata?: KeyWrapMetadata; + readonly physicalPartitionStorageInfoCollection?: PhysicalPartitionStorageInfo[]; } -/** Represents key wrap metadata that a key wrapping provider can use to wrap/unwrap a client encryption key. */ -export interface KeyWrapMetadata { - /** The name of associated KeyEncryptionKey (aka CustomerManagedKey). */ - name?: string; - /** ProviderName of KeyStoreProvider. */ - type?: string; - /** Reference / link to the KeyEncryptionKey. */ - value?: string; - /** Algorithm used in wrapping and unwrapping of the data encryption key. */ - algorithm?: string; -} - -/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ -export interface ARMProxyResource { +/** The storage of a physical partition */ +export interface PhysicalPartitionStorageInfo { /** - * The unique resource identifier of the database account. + * The unique identifier of the partition. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * The name of the database account. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of Azure resource. + * The storage in KB for the physical partition. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly storageInKB?: number; } -/** Parameters to create and update ClientEncryptionKey. */ -export interface ClientEncryptionKeyCreateUpdateParameters { - /** The standard JSON format of a ClientEncryptionKey */ - resource: ClientEncryptionKeyResource; +/** Resource to retrieve throughput information for Cosmos DB resource */ +export interface RetrieveThroughputPropertiesResource { + /** Array of PhysicalPartitionId objects. */ + physicalPartitionIds: PhysicalPartitionId[]; +} + +/** PhysicalPartitionId object */ +export interface PhysicalPartitionId { + /** Id of a physical partition */ + id: string; +} + +/** The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoProperties object */ +export interface PhysicalPartitionThroughputInfoProperties { + /** Array of physical partition throughput info objects */ + physicalPartitionThroughputInfo?: PhysicalPartitionThroughputInfoResource[]; +} + +/** PhysicalPartitionThroughputInfo object */ +export interface PhysicalPartitionThroughputInfoResource { + /** Id of a physical partition */ + id: string; + /** Throughput of a physical partition */ + throughput?: number; +} + +/** Resource to redistribute throughput for Azure Cosmos DB resource */ +export interface RedistributeThroughputPropertiesResource { + /** ThroughputPolicy to apply for throughput redistribution */ + throughputPolicy: ThroughputPolicyType; + /** Array of PhysicalPartitionThroughputInfoResource objects. */ + targetPhysicalPartitionThroughputInfo: PhysicalPartitionThroughputInfoResource[]; + /** Array of PhysicalPartitionThroughputInfoResource objects. */ + sourcePhysicalPartitionThroughputInfo: PhysicalPartitionThroughputInfoResource[]; } /** The List operation response, that contains the storedProcedures and their properties. */ @@ -1431,6 +1608,96 @@ export interface LocationProperties { readonly status?: Status; } +/** The List operation response, that contains the Cassandra views and their properties. */ +export interface CassandraViewListResult { + /** + * List of Cassandra views and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: CassandraViewGetResults[]; +} + +/** Cosmos DB Cassandra view resource object */ +export interface CassandraViewResource { + /** Name of the Cosmos DB Cassandra view */ + id: string; + /** View Definition of the Cosmos DB Cassandra view */ + viewDefinition: string; +} + +/** The properties of a DataTransfer Job */ +export interface DataTransferJobProperties { + /** + * Job Name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly jobName?: string; + /** Source DataStore details */ + source: DataTransferDataSourceSinkUnion; + /** Destination DataStore details */ + destination: DataTransferDataSourceSinkUnion; + /** + * Job Status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Processed Count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly processedCount?: number; + /** + * Total Count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalCount?: number; + /** + * Last Updated Time (ISO-8601 format). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdatedUtcTime?: Date; + /** Worker count */ + workerCount?: number; + /** + * Error response for Faulted job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: ErrorResponse; + /** + * Total Duration of Job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly duration?: string; + /** Mode of job execution */ + mode?: DataTransferJobMode; +} + +/** Base class for all DataTransfer source/sink */ +export interface DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: + | "BaseCosmosDataTransferDataSourceSink" + | "CosmosDBCassandra" + | "CosmosDBMongo" + | "CosmosDBMongoVCore" + | "CosmosDBSql" + | "AzureBlobStorage"; +} + +/** The List operation response, that contains the Data Transfer jobs and their properties. */ +export interface DataTransferJobFeedResults { + /** + * List of Data Transfer jobs and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DataTransferJobGetResults[]; + /** + * URL to get the next set of Data Transfer job list results if there are any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** List of managed Cassandra clusters. */ export interface ListClusters { /** Container for the array of clusters. */ @@ -1457,6 +1724,8 @@ export interface ClusterResourceProperties { prometheusEndpoint?: SeedNode; /** Should automatic repairs run on this cluster? If omitted, this is true, and should stay true unless you are running a hybrid cluster where you are already doing your own repairs. */ repairEnabled?: boolean; + /** The form of AutoReplicate that is being used by this cluster. */ + autoReplicate?: AutoReplicate; /** List of TLS certificates used to authorize clients connecting to the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if clientCertificates is set, the managed Cassandra cluster will reject all connections not bearing a TLS client certificate that can be validated from one or more of the public certificates in this property. */ clientCertificates?: Certificate[]; /** List of TLS certificates used to authorize gossip from unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be verifiable using one of the certificates provided in this property. */ @@ -1473,18 +1742,28 @@ export interface ClusterResourceProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly seedNodes?: SeedNode[]; + /** List of the data center names for unmanaged data centers in this cluster to be included in auto-replication. */ + externalDataCenters?: string[]; /** (Deprecated) Number of hours to wait between taking a backup of the cluster. */ hoursBetweenBackups?: number; /** Whether the cluster and associated data centers has been deallocated. */ deallocated?: boolean; /** Whether Cassandra audit logging is enabled */ cassandraAuditLoggingEnabled?: boolean; + /** Type of the cluster. If set to Production, some operations might not be permitted on cluster. */ + clusterType?: ClusterType; /** Error related to resource provisioning. */ provisionError?: CassandraError; + /** Extensions to be added or updated on cluster. */ + extensions?: string[]; + /** List of backup schedules that define when you want to back up your data. */ + backupSchedules?: BackupSchedule[]; + /** How the nodes in the cluster react to scheduled events */ + scheduledEventStrategy?: ScheduledEventStrategy; /** How to connect to the azure services needed for running the cluster */ azureConnectionMethod?: AzureConnectionType; /** - * If the Connection Method is VPN, this is the Id of the private link resource that the datacenters need to connect to. + * If the Connection Method is Vpn, this is the Id of the private link resource that the datacenters need to connect to. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateLinkResourceId?: string; @@ -1511,6 +1790,15 @@ export interface CassandraError { additionalErrorInfo?: string; } +export interface BackupSchedule { + /** The unique identifier of backup schedule. */ + scheduleName?: string; + /** The cron expression that defines when you want to back up your data. */ + cronExpression?: string; + /** The retention period (hours) of the backups. If you want to retain data forever, set retention to 0. */ + retentionInHours?: number; +} + /** The core properties of ARM resources. */ export interface ManagedCassandraARMResourceProperties { /** @@ -1572,6 +1860,76 @@ export interface CommandOutput { commandOutput?: string; } +/** Specification of which command to run where */ +export interface CommandAsyncPostBody { + /** The command which should be run */ + command: string; + /** The arguments for the command to be run */ + arguments?: Record; + /** IP address of the cassandra host to run the command on */ + host: string; + /** If true, stops cassandra before executing the command and then start it again */ + cassandraStopStart?: boolean; + /** If true, allows the command to *write* to the cassandra directory, otherwise read-only. */ + readWrite?: boolean; +} + +/** resource representing a command */ +export interface CommandPublicResource { + /** The command which should be run */ + command?: string; + /** The unique id of command */ + commandId?: string; + /** The arguments for the command to be run */ + arguments?: Record; + /** IP address of the cassandra host to run the command on */ + host?: string; + /** Whether command has admin privileges */ + isAdmin?: boolean; + /** If true, stops cassandra before executing the command and then start it again */ + cassandraStopStart?: boolean; + /** If true, allows the command to *write* to the cassandra directory, otherwise read-only. */ + readWrite?: boolean; + /** Result output of the command. */ + result?: string; + /** Status of the command. */ + status?: CommandStatus; + /** The name of the file where the result is written. */ + outputFile?: string; +} + +/** List of commands for cluster. */ +export interface ListCommands { + /** + * Container for array of commands. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: CommandPublicResource[]; +} + +/** List of restorable backups for a Cassandra cluster. */ +export interface ListBackups { + /** + * Container for array of backups. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: BackupResource[]; +} + +/** A restorable backup of a Cassandra cluster. */ +export interface BackupResource { + /** The unique identifier of backup. */ + backupId?: string; + /** The current state of the backup. */ + backupState?: BackupState; + /** The time at which the backup process begins. */ + backupStartTimestamp?: Date; + /** The time at which the backup process ends. */ + backupStopTimestamp?: Date; + /** The time at which the backup will expire. */ + backupExpiryTimestamp?: Date; +} + /** List of managed Cassandra data centers and their properties. */ export interface ListDataCenters { /** @@ -1713,6 +2071,8 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa memoryTotalKB?: number; /** A float representing the current system-wide CPU utilization as a percentage. */ cpuUsage?: number; + /** If node has been updated to latest model */ + isLatestModel?: boolean; } /** The set of data plane operations permitted through this Role Definition. */ @@ -1787,30 +2147,165 @@ export interface MongoUserDefinitionListResult { readonly value?: MongoUserDefinitionGetResults[]; } -/** A list of notebook workspace resources */ -export interface NotebookWorkspaceListResult { - /** Array of notebook workspace resources */ - value?: NotebookWorkspace[]; +/** Result of a list NSP (network security perimeter) configurations request. */ +export interface NetworkSecurityPerimeterConfigurationListResult { + /** Array of network security perimeter results. */ + value?: NetworkSecurityPerimeterConfiguration[]; + /** The link used to get the next page of results. */ + nextLink?: string; } -/** The connection info for the given notebook workspace */ -export interface NotebookWorkspaceConnectionInfoResult { +/** Network security configuration properties. */ +export interface NetworkSecurityPerimeterConfigurationProperties { /** - * Specifies auth token used for connecting to Notebook server (uses token-based auth). + * Provisioning state of a network security perimeter configuration that is being created or updated. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly authToken?: string; + readonly provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState; /** - * Specifies the endpoint of Notebook server. + * List of provisioning issues, if any * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly notebookServerEndpoint?: string; + readonly provisioningIssues?: ProvisioningIssue[]; + /** Information about a network security perimeter (NSP) */ + networkSecurityPerimeter?: NetworkSecurityPerimeter; + /** Information about resource association */ + resourceAssociation?: ResourceAssociation; + /** Network security perimeter configuration profile */ + profile?: NetworkSecurityProfile; } -/** A list of private endpoint connections */ -export interface PrivateEndpointConnectionListResult { - /** Array of private endpoint connections */ - value?: PrivateEndpointConnection[]; +/** Describes a provisioning issue for a network security perimeter configuration */ +export interface ProvisioningIssue { + /** + * Name of the issue + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource providers should generate separate provisioning issue elements for each separate issue detected, and include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly properties?: ProvisioningIssueProperties; +} + +/** Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource providers should generate separate provisioning issue elements for each separate issue detected, and include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules */ +export interface ProvisioningIssueProperties { + /** + * Type of issue + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issueType?: IssueType; + /** + * Severity of the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly severity?: Severity; + /** + * Description of the issue + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Fully qualified resource IDs of suggested resources that can be associated to the network security perimeter (NSP) to remediate the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly suggestedResourceIds?: string[]; + /** + * Access rules that can be added to the network security profile (NSP) to remediate the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly suggestedAccessRules?: AccessRule[]; +} + +/** Access rule in a network security perimeter configuration profile */ +export interface AccessRule { + /** Name of the access rule */ + name?: string; + /** Properties of Access Rule */ + properties?: AccessRuleProperties; +} + +/** Properties of Access Rule */ +export interface AccessRuleProperties { + /** Direction of Access Rule */ + direction?: AccessRuleDirection; + /** Address prefixes in the CIDR format for inbound rules */ + addressPrefixes?: string[]; + /** Subscriptions for inbound rules */ + subscriptions?: AccessRulePropertiesSubscriptionsItem[]; + /** Network security perimeters for inbound rules */ + networkSecurityPerimeters?: NetworkSecurityPerimeter[]; + /** Fully qualified domain names (FQDN) for outbound rules */ + fullyQualifiedDomainNames?: string[]; + /** Email addresses for outbound rules */ + emailAddresses?: string[]; + /** Phone numbers for outbound rules */ + phoneNumbers?: string[]; +} + +/** Subscription identifiers */ +export interface AccessRulePropertiesSubscriptionsItem { + /** The fully qualified Azure resource ID of the subscription e.g. ('/subscriptions/00000000-0000-0000-0000-000000000000') */ + id?: string; +} + +/** Information about a network security perimeter (NSP) */ +export interface NetworkSecurityPerimeter { + /** Fully qualified Azure resource ID of the NSP resource */ + id?: string; + /** Universal unique ID (UUID) of the network security perimeter */ + perimeterGuid?: string; + /** Location of the network security perimeter */ + location?: string; +} + +/** Information about resource association */ +export interface ResourceAssociation { + /** Name of the resource association */ + name?: string; + /** Access mode of the resource association */ + accessMode?: ResourceAssociationAccessMode; +} + +/** Network security perimeter configuration profile */ +export interface NetworkSecurityProfile { + /** Name of the profile */ + name?: string; + /** Current access rules version */ + accessRulesVersion?: number; + /** List of Access Rules */ + accessRules?: AccessRule[]; + /** Current diagnostic settings version */ + diagnosticSettingsVersion?: number; + /** List of log categories that are enabled */ + enabledLogCategories?: string[]; +} + +/** A list of notebook workspace resources */ +export interface NotebookWorkspaceListResult { + /** Array of notebook workspace resources */ + value?: NotebookWorkspace[]; +} + +/** The connection info for the given notebook workspace */ +export interface NotebookWorkspaceConnectionInfoResult { + /** + * Specifies auth token used for connecting to Notebook server (uses token-based auth). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly authToken?: string; + /** + * Specifies the endpoint of Notebook server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly notebookServerEndpoint?: string; +} + +/** A list of private endpoint connections */ +export interface PrivateEndpointConnectionListResult { + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; } /** A list of private link resources */ @@ -1899,10 +2394,10 @@ export interface RestorableDatabaseAccountGetResult { accountName?: string; /** The creation time of the restorable database account (ISO-8601 format). */ creationTime?: Date; - /** The time at which the restorable database account has been deleted (ISO-8601 format). */ - deletionTime?: Date; /** The least recent time at which the database account can be restored to (ISO-8601 format). */ oldestRestorableTime?: Date; + /** The time at which the restorable database account has been deleted (ISO-8601 format). */ + deletionTime?: Date; /** * The API type of the restorable database account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2626,6 +3121,80 @@ export interface ServiceResourceCreateUpdateProperties { instanceCount?: number; } +/** The List operation response, that contains the throughput pools and their properties. */ +export interface ThroughputPoolsListResult { + /** + * List of throughput pools and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ThroughputPoolResource[]; + /** + * The link used to get the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Represents a throughput pool resource for updates. */ +export interface ThroughputPoolUpdate { + /** A provisioning state of the ThroughputPool. */ + provisioningState?: Status; + /** Value for throughput to be shared among CosmosDB resources in the pool. */ + maxThroughput?: number; +} + +/** The List operation response, that contains the global database accounts and their properties. */ +export interface ThroughputPoolAccountsListResult { + /** + * List of global database accounts in a throughput pool and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ThroughputPoolAccountResource[]; + /** + * The link used to get the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The set of data plane operations permitted through this Role Definition. */ +export interface PermissionAutoGenerated { + /** The id for the permission. */ + id?: string; + /** An array of data actions that are allowed. */ + dataActions?: string[]; + /** An array of data actions that are denied. */ + notDataActions?: string[]; +} + +/** The relevant Role Definitions. */ +export interface TableRoleDefinitionListResult { + /** + * List of Role Definitions and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: TableRoleDefinitionResource[]; + /** + * The link used to get the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The relevant Role Assignments. */ +export interface TableRoleAssignmentListResult { + /** + * List of Role Assignments and their properties + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: TableRoleAssignmentResource[]; + /** + * The link used to get the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** Configuration values for periodic mode backup */ export interface PeriodicModeProperties { /** An integer representing the interval in minutes between two backups */ @@ -2638,7 +3207,7 @@ export interface PeriodicModeProperties { /** Configuration values for periodic mode backup */ export interface ContinuousModeProperties { - /** Enum to indicate type of Continuous backup mode */ + /** Enum to indicate type of Continuos backup mode */ tier?: ContinuousTier; } @@ -2685,9 +3254,27 @@ export interface MaterializedViewsBuilderServiceResource { properties?: MaterializedViewsBuilderServiceResourceProperties; } +/** Parameters for creating a Azure Cosmos DB throughput pool account. */ +export interface ThroughputPoolAccountCreateParameters { + /** Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */ + tags?: { [propertyName: string]: string }; + /** The resource identifier of global database account in the throughputPool. */ + accountResourceIdentifier?: string; + /** The location of global database account in the throughputPool. */ + accountLocation?: string; +} + /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + /** Parameters to indicate the information about the restore. */ export interface RestoreParameters extends RestoreParametersBase { /** Describes the mode of the restore. */ @@ -2698,6 +3285,8 @@ export interface RestoreParameters extends RestoreParametersBase { gremlinDatabasesToRestore?: GremlinDatabaseRestoreResource[]; /** List of specific tables available for restore. */ tablesToRestore?: string[]; + /** The source backup location for restore. */ + sourceBackupLocation?: string; } /** Parameters to indicate the information about the restore. */ @@ -2723,15 +3312,13 @@ export interface ContinuousModeBackupPolicy extends BackupPolicy { export interface DatabaseAccountGetResults extends ARMResourceProperties { /** Indicates the type of database account. This can only be set at database account creation. */ kind?: DatabaseAccountKind; - /** Identity for the resource. */ - identity?: ManagedServiceIdentity; /** * The system meta data relating to this resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; /** - * The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – the Cosmos DB account deletion failed. + * The provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; @@ -2821,10 +3408,18 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { networkAclBypass?: NetworkAclBypass; /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ networkAclBypassResourceIds?: string[]; + /** The Object representing the different Diagnostic log settings for the Cosmos DB Account. */ + diagnosticLogSettings?: DiagnosticLogSettings; /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ disableLocalAuth?: boolean; /** The object that represents all properties related to capacity enforcement on an account. */ capacity?: Capacity; + /** Indicates the capacityMode of the Cosmos DB account. */ + capacityMode?: CapacityMode; + /** The object that represents the migration state for the CapacityMode of the Cosmos DB account. */ + capacityModeChangeTransitionState?: CapacityModeChangeTransitionState; + /** Flag to indicate whether to enable MaterializedViews on the Cosmos DB account */ + enableMaterializedViews?: boolean; /** * The object that represents the metadata for the Account Keys of the Cosmos DB account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2832,13 +3427,17 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { readonly keysMetadata?: DatabaseAccountKeysMetadata; /** Flag to indicate enabling/disabling of Partition Merge feature on the account */ enablePartitionMerge?: boolean; - /** Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */ - minimalTlsVersion?: MinimalTlsVersion; - /** Flag to indicate enabling/disabling of Burst Capacity feature on the account */ + /** Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account */ enableBurstCapacity?: boolean; + /** Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. */ + minimalTlsVersion?: MinimalTlsVersion; /** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ customerManagedKeyStatus?: string; - /** Flag to indicate enabling/disabling of PerRegionPerPartitionAutoscale feature on the account */ + /** Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account */ + enablePriorityBasedExecution?: boolean; + /** Enum to indicate default Priority Level of request for Priority Based Execution. */ + defaultPriorityLevel?: DefaultPriorityLevel; + /** Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account */ enablePerRegionPerPartitionAutoscale?: boolean; } @@ -2847,8 +3446,6 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProperties { /** Indicates the type of database account. This can only be set at database account creation. */ kind?: DatabaseAccountKind; - /** Identity for the resource. */ - identity?: ManagedServiceIdentity; /** The consistency policy for the Cosmos DB account. */ consistencyPolicy?: ConsistencyPolicy; /** An array that contains the georeplication locations enabled for the Cosmos DB account. */ @@ -2897,12 +3494,18 @@ export interface DatabaseAccountCreateUpdateParameters networkAclBypass?: NetworkAclBypass; /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ networkAclBypassResourceIds?: string[]; + /** The Object representing the different Diagnostic log settings for the Cosmos DB Account. */ + diagnosticLogSettings?: DiagnosticLogSettings; /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ disableLocalAuth?: boolean; /** Parameters to indicate the information about the restore. */ restoreParameters?: RestoreParameters; /** The object that represents all properties related to capacity enforcement on an account. */ capacity?: Capacity; + /** Indicates the capacityMode of the Cosmos DB account. */ + capacityMode?: CapacityMode; + /** Flag to indicate whether to enable MaterializedViews on the Cosmos DB account */ + enableMaterializedViews?: boolean; /** * This property is ignored during the update/create operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2910,16 +3513,35 @@ export interface DatabaseAccountCreateUpdateParameters readonly keysMetadata?: DatabaseAccountKeysMetadata; /** Flag to indicate enabling/disabling of Partition Merge feature on the account */ enablePartitionMerge?: boolean; - /** Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */ - minimalTlsVersion?: MinimalTlsVersion; - /** Flag to indicate enabling/disabling of Burst Capacity feature on the account */ + /** Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account */ enableBurstCapacity?: boolean; + /** Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. */ + minimalTlsVersion?: MinimalTlsVersion; /** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ customerManagedKeyStatus?: string; - /** Flag to indicate enabling/disabling of PerRegionPerPartitionAutoscale feature on the account */ + /** Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account */ + enablePriorityBasedExecution?: boolean; + /** Enum to indicate default Priority Level of request for Priority Based Execution. */ + defaultPriorityLevel?: DefaultPriorityLevel; + /** Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account */ enablePerRegionPerPartitionAutoscale?: boolean; } +/** An Azure Cosmos DB Graph resource. */ +export interface GraphResourceGetResults extends ARMResourceProperties { + resource?: GraphResourceGetPropertiesResource; + options?: GraphResourceGetPropertiesOptions; +} + +/** Parameters to create and update Cosmos DB Graph resource. */ +export interface GraphResourceCreateUpdateParameters + extends ARMResourceProperties { + /** The standard JSON format of a Graph resource */ + resource: GraphResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +} + /** An Azure Cosmos DB SQL database. */ export interface SqlDatabaseGetResults extends ARMResourceProperties { resource?: SqlDatabaseGetPropertiesResource; @@ -2962,6 +3584,26 @@ export interface SqlContainerCreateUpdateParameters options?: CreateUpdateOptions; } +/** Cosmos DB retrieve throughput parameters object */ +export interface RetrieveThroughputParameters extends ARMResourceProperties { + /** The standard JSON format of a resource throughput */ + resource: RetrieveThroughputPropertiesResource; +} + +/** An Azure Cosmos DB PhysicalPartitionThroughputInfoResult object. */ +export interface PhysicalPartitionThroughputInfoResult + extends ARMResourceProperties { + /** properties of physical partition throughput info */ + resource?: PhysicalPartitionThroughputInfoResultPropertiesResource; +} + +/** Cosmos DB redistribute throughput parameters object */ +export interface RedistributeThroughputParameters + extends ARMResourceProperties { + /** The standard JSON format of a resource throughput */ + resource: RedistributeThroughputPropertiesResource; +} + /** An Azure Cosmos DB storedProcedure. */ export interface SqlStoredProcedureGetResults extends ARMResourceProperties { resource?: SqlStoredProcedureGetPropertiesResource; @@ -3109,6 +3751,21 @@ export interface GremlinGraphCreateUpdateParameters options?: CreateUpdateOptions; } +/** An Azure Cosmos DB Cassandra view. */ +export interface CassandraViewGetResults extends ARMResourceProperties { + resource?: CassandraViewGetPropertiesResource; + options?: CassandraViewGetPropertiesOptions; +} + +/** Parameters to create and update Cosmos DB Cassandra view. */ +export interface CassandraViewCreateUpdateParameters + extends ARMResourceProperties { + /** The standard JSON format of a Cassandra view */ + resource: CassandraViewResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +} + /** The access keys for the given database account. */ export interface DatabaseAccountListKeysResult extends DatabaseAccountListReadOnlyKeysResult { @@ -3191,6 +3848,32 @@ export interface PartitionUsage extends Usage { readonly partitionKeyRangeId?: string; } +export interface GraphResourceGetPropertiesResource extends GraphResource {} + +export interface GraphResourceGetPropertiesOptions extends OptionsResource {} + +export interface SqlDatabaseGetPropertiesOptions extends OptionsResource {} + +export interface SqlContainerGetPropertiesOptions extends OptionsResource {} + +export interface MongoDBDatabaseGetPropertiesOptions extends OptionsResource {} + +export interface MongoDBCollectionGetPropertiesOptions + extends OptionsResource {} + +export interface TableGetPropertiesOptions extends OptionsResource {} + +export interface CassandraKeyspaceGetPropertiesOptions + extends OptionsResource {} + +export interface CassandraTableGetPropertiesOptions extends OptionsResource {} + +export interface GremlinDatabaseGetPropertiesOptions extends OptionsResource {} + +export interface GremlinGraphGetPropertiesOptions extends OptionsResource {} + +export interface CassandraViewGetPropertiesOptions extends OptionsResource {} + export interface SqlDatabaseGetPropertiesResource extends SqlDatabaseResource, ExtendedResourceProperties { @@ -3225,14 +3908,14 @@ export interface ThroughputSettingsGetPropertiesResource extends ThroughputSettingsResource, ExtendedResourceProperties {} -export interface SqlContainerGetPropertiesResource - extends SqlContainerResource, - ExtendedResourceProperties {} - export interface ClientEncryptionKeyGetPropertiesResource extends ClientEncryptionKeyResource, ExtendedResourceProperties {} +export interface SqlContainerGetPropertiesResource + extends SqlContainerResource, + ExtendedResourceProperties {} + export interface SqlStoredProcedureGetPropertiesResource extends SqlStoredProcedureResource, ExtendedResourceProperties {} @@ -3273,6 +3956,10 @@ export interface GremlinGraphGetPropertiesResource extends GremlinGraphResource, ExtendedResourceProperties {} +export interface CassandraViewGetPropertiesResource + extends CassandraViewResource, + ExtendedResourceProperties {} + /** Cosmos DB SQL container resource object */ export interface RestorableSqlContainerPropertiesResourceContainer extends SqlContainerResource, @@ -3284,26 +3971,6 @@ export interface RestorableSqlContainerPropertiesResourceContainer readonly self?: string; } -export interface SqlDatabaseGetPropertiesOptions extends OptionsResource {} - -export interface SqlContainerGetPropertiesOptions extends OptionsResource {} - -export interface MongoDBDatabaseGetPropertiesOptions extends OptionsResource {} - -export interface MongoDBCollectionGetPropertiesOptions - extends OptionsResource {} - -export interface TableGetPropertiesOptions extends OptionsResource {} - -export interface CassandraKeyspaceGetPropertiesOptions - extends OptionsResource {} - -export interface CassandraTableGetPropertiesOptions extends OptionsResource {} - -export interface GremlinDatabaseGetPropertiesOptions extends OptionsResource {} - -export interface GremlinGraphGetPropertiesOptions extends OptionsResource {} - /** Client Encryption Key. */ export interface ClientEncryptionKeyGetResults extends ARMProxyResource { resource?: ClientEncryptionKeyGetPropertiesResource; @@ -3315,6 +3982,59 @@ export interface LocationGetResult extends ARMProxyResource { properties?: LocationProperties; } +/** Parameters to create Data Transfer Job */ +export interface CreateJobRequest extends ARMProxyResource { + /** Data Transfer Create Job Properties */ + properties: DataTransferJobProperties; +} + +/** A Cosmos DB Data Transfer Job */ +export interface DataTransferJobGetResults extends ARMProxyResource { + /** + * Job Name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly jobName?: string; + /** Source DataStore details */ + source?: DataTransferDataSourceSinkUnion; + /** Destination DataStore details */ + destination?: DataTransferDataSourceSinkUnion; + /** + * Job Status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Processed Count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly processedCount?: number; + /** + * Total Count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalCount?: number; + /** + * Last Updated Time (ISO-8601 format). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdatedUtcTime?: Date; + /** Worker count */ + workerCount?: number; + /** + * Error response for Faulted job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: ErrorResponse; + /** + * Total Duration of Job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly duration?: string; + /** Mode of job execution */ + mode?: DataTransferJobMode; +} + /** A managed Cassandra data center. */ export interface DataCenterResource extends ARMProxyResource { /** Properties of a managed Cassandra data center. */ @@ -3416,6 +4136,42 @@ export interface ServiceResource extends ARMProxyResource { properties?: ServiceResourcePropertiesUnion; } +/** properties of physical partition throughput info */ +export interface PhysicalPartitionThroughputInfoResultPropertiesResource + extends PhysicalPartitionThroughputInfoProperties {} + +/** A base CosmosDB data source/sink */ +export interface BaseCosmosDataTransferDataSourceSink + extends DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: + | "BaseCosmosDataTransferDataSourceSink" + | "CosmosDBCassandra" + | "CosmosDBMongo" + | "CosmosDBSql"; + remoteAccountName?: string; +} + +/** A CosmosDB Mongo vCore API data source/sink */ +export interface CosmosMongoVCoreDataTransferDataSourceSink + extends DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBMongoVCore"; + databaseName: string; + collectionName: string; + hostName?: string; + connectionStringKeyVaultUri?: string; +} + +/** An Azure Blob Storage data source/sink */ +export interface AzureBlobDataTransferDataSourceSink + extends DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "AzureBlobStorage"; + containerName: string; + endpointUrl?: string; +} + /** Representation of a managed Cassandra cluster. */ export interface ClusterResource extends ManagedCassandraARMResourceProperties { /** Properties of a managed Cassandra cluster. */ @@ -3534,6 +4290,23 @@ export interface GraphAPIComputeRegionalServiceResource export interface MaterializedViewsBuilderRegionalServiceResource extends RegionalServiceResource {} +/** A request object to enable/disable the chaos fault */ +export interface ChaosFaultResource extends ProxyResource { + /** Indicates whether what action to take for the Chaos Fault. */ + action?: SupportedActions; + /** Region of the account where the Chaos Fault is to be enabled/disabled. */ + region?: string; + /** Database name. */ + databaseName?: string; + /** Container name. */ + containerName?: string; + /** + * A provisioning state of the Chaos Fault. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +} + /** A private endpoint connection */ export interface PrivateEndpointConnection extends ProxyResource { /** Private endpoint which the connection belongs to. */ @@ -3546,6 +4319,91 @@ export interface PrivateEndpointConnection extends ProxyResource { provisioningState?: string; } +/** Network security perimeter (NSP) configuration resource */ +export interface NetworkSecurityPerimeterConfiguration extends ProxyResource { + /** Network security configuration properties. */ + properties?: NetworkSecurityPerimeterConfigurationProperties; +} + +/** An Azure Cosmos DB Throughputpool Account */ +export interface ThroughputPoolAccountResource extends ProxyResource { + /** A provisioning state of the ThroughputPool Account. */ + provisioningState?: Status; + /** The resource identifier of global database account in the throughputPool. */ + accountResourceIdentifier?: string; + /** The location of global database account in the throughputPool. */ + accountLocation?: string; + /** + * The instance id of global database account in the throughputPool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accountInstanceId?: string; +} + +/** Parameters to create and update an Azure Cosmos DB Table Role Definition. */ +export interface TableRoleDefinitionResource extends ProxyResource { + /** The path id for the Role Definition. */ + idPropertiesId?: string; + /** A user-friendly name for the Role Definition. Must be unique for the database account. */ + roleName?: string; + /** Indicates whether the Role Definition was built-in or user created. */ + typePropertiesType?: RoleDefinitionType; + /** A set of fully qualified Scopes at or below which Table Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist. */ + assignableScopes?: string[]; + /** The set of operations allowed through this Role Definition. */ + permissions?: PermissionAutoGenerated[]; +} + +/** Parameters to create and update an Azure Cosmos DB Table Role Assignment. */ +export interface TableRoleAssignmentResource extends ProxyResource { + /** The unique identifier for the associated Role Definition. */ + roleDefinitionId?: string; + /** The data plane resource path for which access is being granted through this Table Role Assignment. */ + scope?: string; + /** The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Table Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription. */ + principalId?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +} + +/** An Azure Cosmos DB Throughputpool. */ +export interface ThroughputPoolResource extends TrackedResource { + /** A provisioning state of the ThroughputPool. */ + provisioningState?: Status; + /** Value for throughput to be shared among CosmosDB resources in the pool. */ + maxThroughput?: number; +} + +/** A CosmosDB Cassandra API data source/sink */ +export interface CosmosCassandraDataTransferDataSourceSink + extends BaseCosmosDataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBCassandra"; + keyspaceName: string; + tableName: string; +} + +/** A CosmosDB Mongo API data source/sink */ +export interface CosmosMongoDataTransferDataSourceSink + extends BaseCosmosDataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBMongo"; + databaseName: string; + collectionName: string; +} + +/** A CosmosDB No Sql API data source/sink */ +export interface CosmosSqlDataTransferDataSourceSink + extends BaseCosmosDataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBSql"; + databaseName: string; + containerName: string; +} + /** Defines headers for DatabaseAccounts_delete operation. */ export interface DatabaseAccountsDeleteHeaders { /** URI to poll for completion status. */ @@ -3586,6 +4444,22 @@ export interface DatabaseAccountsRegenerateKeyHeaders { location?: string; } +/** Defines headers for GraphResources_createUpdateGraph operation. */ +export interface GraphResourcesCreateUpdateGraphHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for GraphResources_deleteGraphResource operation. */ +export interface GraphResourcesDeleteGraphResourceHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for SqlResources_createUpdateSqlDatabase operation. */ export interface SqlResourcesCreateUpdateSqlDatabaseHeaders { /** URI to poll for completion status. */ @@ -3626,6 +4500,14 @@ export interface SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders { location?: string; } +/** Defines headers for SqlResources_createUpdateClientEncryptionKey operation. */ +export interface SqlResourcesCreateUpdateClientEncryptionKeyHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for SqlResources_createUpdateSqlContainer operation. */ export interface SqlResourcesCreateUpdateSqlContainerHeaders { /** URI to poll for completion status. */ @@ -3642,6 +4524,22 @@ export interface SqlResourcesDeleteSqlContainerHeaders { location?: string; } +/** Defines headers for SqlResources_sqlDatabasePartitionMerge operation. */ +export interface SqlResourcesSqlDatabasePartitionMergeHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for SqlResources_listSqlContainerPartitionMerge operation. */ +export interface SqlResourcesListSqlContainerPartitionMergeHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for SqlResources_updateSqlContainerThroughput operation. */ export interface SqlResourcesUpdateSqlContainerThroughputHeaders { /** URI to poll for completion status. */ @@ -3666,8 +4564,32 @@ export interface SqlResourcesMigrateSqlContainerToManualThroughputHeaders { location?: string; } -/** Defines headers for SqlResources_createUpdateClientEncryptionKey operation. */ -export interface SqlResourcesCreateUpdateClientEncryptionKeyHeaders { +/** Defines headers for SqlResources_sqlDatabaseRetrieveThroughputDistribution operation. */ +export interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for SqlResources_sqlDatabaseRedistributeThroughput operation. */ +export interface SqlResourcesSqlDatabaseRedistributeThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for SqlResources_sqlContainerRetrieveThroughputDistribution operation. */ +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for SqlResources_sqlContainerRedistributeThroughput operation. */ +export interface SqlResourcesSqlContainerRedistributeThroughputHeaders { /** URI to poll for completion status. */ azureAsyncOperation?: string; /** URI to poll for completion status. */ @@ -3762,6 +4684,38 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders location?: string; } +/** Defines headers for MongoDBResources_mongoDBDatabaseRetrieveThroughputDistribution operation. */ +export interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for MongoDBResources_mongoDBDatabaseRedistributeThroughput operation. */ +export interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for MongoDBResources_mongoDBContainerRetrieveThroughputDistribution operation. */ +export interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for MongoDBResources_mongoDBContainerRedistributeThroughput operation. */ +export interface MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for MongoDBResources_createUpdateMongoDBCollection operation. */ export interface MongoDBResourcesCreateUpdateMongoDBCollectionHeaders { /** URI to poll for completion status. */ @@ -3778,6 +4732,22 @@ export interface MongoDBResourcesDeleteMongoDBCollectionHeaders { location?: string; } +/** Defines headers for MongoDBResources_mongoDBDatabasePartitionMerge operation. */ +export interface MongoDBResourcesMongoDBDatabasePartitionMergeHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for MongoDBResources_listMongoDBCollectionPartitionMerge operation. */ +export interface MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for MongoDBResources_updateMongoDBCollectionThroughput operation. */ export interface MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders { /** URI to poll for completion status. */ @@ -3842,6 +4812,38 @@ export interface TableResourcesMigrateTableToManualThroughputHeaders { location?: string; } +/** Defines headers for TableResources_createUpdateTableRoleDefinition operation. */ +export interface TableResourcesCreateUpdateTableRoleDefinitionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for TableResources_deleteTableRoleDefinition operation. */ +export interface TableResourcesDeleteTableRoleDefinitionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for TableResources_createUpdateTableRoleAssignment operation. */ +export interface TableResourcesCreateUpdateTableRoleAssignmentHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for TableResources_deleteTableRoleAssignment operation. */ +export interface TableResourcesDeleteTableRoleAssignmentHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for CassandraResources_createUpdateCassandraKeyspace operation. */ export interface CassandraResourcesCreateUpdateCassandraKeyspaceHeaders { /** URI to poll for completion status. */ @@ -3882,40 +4884,80 @@ export interface CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHea location?: string; } -/** Defines headers for CassandraResources_createUpdateCassandraTable operation. */ -export interface CassandraResourcesCreateUpdateCassandraTableHeaders { +/** Defines headers for CassandraResources_createUpdateCassandraTable operation. */ +export interface CassandraResourcesCreateUpdateCassandraTableHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for CassandraResources_deleteCassandraTable operation. */ +export interface CassandraResourcesDeleteCassandraTableHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for CassandraResources_updateCassandraTableThroughput operation. */ +export interface CassandraResourcesUpdateCassandraTableThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for CassandraResources_migrateCassandraTableToAutoscale operation. */ +export interface CassandraResourcesMigrateCassandraTableToAutoscaleHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for CassandraResources_migrateCassandraTableToManualThroughput operation. */ +export interface CassandraResourcesMigrateCassandraTableToManualThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for CassandraResources_createUpdateCassandraView operation. */ +export interface CassandraResourcesCreateUpdateCassandraViewHeaders { /** URI to poll for completion status. */ azureAsyncOperation?: string; /** URI to poll for completion status. */ location?: string; } -/** Defines headers for CassandraResources_deleteCassandraTable operation. */ -export interface CassandraResourcesDeleteCassandraTableHeaders { +/** Defines headers for CassandraResources_deleteCassandraView operation. */ +export interface CassandraResourcesDeleteCassandraViewHeaders { /** URI to poll for completion status. */ azureAsyncOperation?: string; /** URI to poll for completion status. */ location?: string; } -/** Defines headers for CassandraResources_updateCassandraTableThroughput operation. */ -export interface CassandraResourcesUpdateCassandraTableThroughputHeaders { +/** Defines headers for CassandraResources_updateCassandraViewThroughput operation. */ +export interface CassandraResourcesUpdateCassandraViewThroughputHeaders { /** URI to poll for completion status. */ azureAsyncOperation?: string; /** URI to poll for completion status. */ location?: string; } -/** Defines headers for CassandraResources_migrateCassandraTableToAutoscale operation. */ -export interface CassandraResourcesMigrateCassandraTableToAutoscaleHeaders { +/** Defines headers for CassandraResources_migrateCassandraViewToAutoscale operation. */ +export interface CassandraResourcesMigrateCassandraViewToAutoscaleHeaders { /** URI to poll for completion status. */ azureAsyncOperation?: string; /** URI to poll for completion status. */ location?: string; } -/** Defines headers for CassandraResources_migrateCassandraTableToManualThroughput operation. */ -export interface CassandraResourcesMigrateCassandraTableToManualThroughputHeaders { +/** Defines headers for CassandraResources_migrateCassandraViewToManualThroughput operation. */ +export interface CassandraResourcesMigrateCassandraViewToManualThroughputHeaders { /** URI to poll for completion status. */ azureAsyncOperation?: string; /** URI to poll for completion status. */ @@ -4002,14 +5044,19 @@ export interface GremlinResourcesMigrateGremlinGraphToManualThroughputHeaders { location?: string; } -/** Defines headers for Service_create operation. */ -export interface ServiceCreateHeaders { +/** Defines headers for CassandraClusters_invokeCommandAsync operation. */ +export interface CassandraClustersInvokeCommandAsyncHeaders { /** URI to poll for completion status. */ azureAsyncOperation?: string; /** URI to poll for completion status. */ location?: string; } +/** Defines headers for NetworkSecurityPerimeterConfigurations_reconcile operation. */ +export interface NetworkSecurityPerimeterConfigurationsReconcileHeaders { + location?: string; +} + /** Defines headers for Service_delete operation. */ export interface ServiceDeleteHeaders { /** URI to poll for completion status. */ @@ -4018,6 +5065,54 @@ export interface ServiceDeleteHeaders { location?: string; } +/** Defines headers for ThroughputPool_update operation. */ +export interface ThroughputPoolUpdateHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for ThroughputPool_delete operation. */ +export interface ThroughputPoolDeleteHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for ThroughputPoolAccount_delete operation. */ +export interface ThroughputPoolAccountDeleteHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key", +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + /** Known values of {@link DatabaseAccountKind} that the service accepts. */ export enum KnownDatabaseAccountKind { /** GlobalDocumentDB */ @@ -4201,6 +5296,54 @@ export enum KnownBackupPolicyMigrationStatus { */ export type BackupPolicyMigrationStatus = string; +/** Known values of {@link CapacityMode} that the service accepts. */ +export enum KnownCapacityMode { + /** None */ + None = "None", + /** Provisioned */ + Provisioned = "Provisioned", + /** Serverless */ + Serverless = "Serverless", +} + +/** + * Defines values for CapacityMode. \ + * {@link KnownCapacityMode} can be used interchangeably with CapacityMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Provisioned** \ + * **Serverless** + */ +export type CapacityMode = string; + +/** Known values of {@link CapacityModeTransitionStatus} that the service accepts. */ +export enum KnownCapacityModeTransitionStatus { + /** Invalid */ + Invalid = "Invalid", + /** Initialized */ + Initialized = "Initialized", + /** InProgress */ + InProgress = "InProgress", + /** Completed */ + Completed = "Completed", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for CapacityModeTransitionStatus. \ + * {@link KnownCapacityModeTransitionStatus} can be used interchangeably with CapacityModeTransitionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Initialized** \ + * **InProgress** \ + * **Completed** \ + * **Failed** + */ +export type CapacityModeTransitionStatus = string; + /** Known values of {@link MinimalTlsVersion} that the service accepts. */ export enum KnownMinimalTlsVersion { /** Tls */ @@ -4222,29 +5365,23 @@ export enum KnownMinimalTlsVersion { */ export type MinimalTlsVersion = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key", +/** Known values of {@link DefaultPriorityLevel} that the service accepts. */ +export enum KnownDefaultPriorityLevel { + /** High */ + High = "High", + /** Low */ + Low = "Low", } /** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * Defines values for DefaultPriorityLevel. \ + * {@link KnownDefaultPriorityLevel} can be used interchangeably with DefaultPriorityLevel, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** + * **High** \ + * **Low** */ -export type CreatedByType = string; +export type DefaultPriorityLevel = string; /** Known values of {@link Kind} that the service accepts. */ export enum KnownKind { @@ -4612,6 +5749,27 @@ export enum KnownDistanceFunction { */ export type DistanceFunction = string; +/** Known values of {@link ThroughputPolicyType} that the service accepts. */ +export enum KnownThroughputPolicyType { + /** None */ + None = "none", + /** Equal */ + Equal = "equal", + /** Custom */ + Custom = "custom", +} + +/** + * Defines values for ThroughputPolicyType. \ + * {@link KnownThroughputPolicyType} can be used interchangeably with ThroughputPolicyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **none** \ + * **equal** \ + * **custom** + */ +export type ThroughputPolicyType = string; + /** Known values of {@link TriggerType} that the service accepts. */ export enum KnownTriggerType { /** Pre */ @@ -4690,6 +5848,14 @@ export enum KnownStatus { Online = "Online", /** Deleting */ Deleting = "Deleting", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Updating */ + Updating = "Updating", } /** @@ -4701,10 +5867,59 @@ export enum KnownStatus { * **Initializing** \ * **InternallyReady** \ * **Online** \ - * **Deleting** + * **Deleting** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Updating** */ export type Status = string; +/** Known values of {@link DataTransferComponent} that the service accepts. */ +export enum KnownDataTransferComponent { + /** CosmosDBCassandra */ + CosmosDBCassandra = "CosmosDBCassandra", + /** CosmosDBMongo */ + CosmosDBMongo = "CosmosDBMongo", + /** CosmosDBMongoVCore */ + CosmosDBMongoVCore = "CosmosDBMongoVCore", + /** CosmosDBSql */ + CosmosDBSql = "CosmosDBSql", + /** AzureBlobStorage */ + AzureBlobStorage = "AzureBlobStorage", +} + +/** + * Defines values for DataTransferComponent. \ + * {@link KnownDataTransferComponent} can be used interchangeably with DataTransferComponent, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CosmosDBCassandra** \ + * **CosmosDBMongo** \ + * **CosmosDBMongoVCore** \ + * **CosmosDBSql** \ + * **AzureBlobStorage** + */ +export type DataTransferComponent = string; + +/** Known values of {@link DataTransferJobMode} that the service accepts. */ +export enum KnownDataTransferJobMode { + /** Offline */ + Offline = "Offline", + /** Online */ + Online = "Online", +} + +/** + * Defines values for DataTransferJobMode. \ + * {@link KnownDataTransferJobMode} can be used interchangeably with DataTransferJobMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Offline** \ + * **Online** + */ +export type DataTransferJobMode = string; + /** Known values of {@link ManagedCassandraProvisioningState} that the service accepts. */ export enum KnownManagedCassandraProvisioningState { /** Creating */ @@ -4756,6 +5971,66 @@ export enum KnownAuthenticationMethod { */ export type AuthenticationMethod = string; +/** Known values of {@link AutoReplicate} that the service accepts. */ +export enum KnownAutoReplicate { + /** None */ + None = "None", + /** SystemKeyspaces */ + SystemKeyspaces = "SystemKeyspaces", + /** AllKeyspaces */ + AllKeyspaces = "AllKeyspaces", +} + +/** + * Defines values for AutoReplicate. \ + * {@link KnownAutoReplicate} can be used interchangeably with AutoReplicate, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemKeyspaces** \ + * **AllKeyspaces** + */ +export type AutoReplicate = string; + +/** Known values of {@link ClusterType} that the service accepts. */ +export enum KnownClusterType { + /** Production */ + Production = "Production", + /** NonProduction */ + NonProduction = "NonProduction", +} + +/** + * Defines values for ClusterType. \ + * {@link KnownClusterType} can be used interchangeably with ClusterType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Production** \ + * **NonProduction** + */ +export type ClusterType = string; + +/** Known values of {@link ScheduledEventStrategy} that the service accepts. */ +export enum KnownScheduledEventStrategy { + /** Ignore */ + Ignore = "Ignore", + /** StopAny */ + StopAny = "StopAny", + /** StopByRack */ + StopByRack = "StopByRack", +} + +/** + * Defines values for ScheduledEventStrategy. \ + * {@link KnownScheduledEventStrategy} can be used interchangeably with ScheduledEventStrategy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Ignore** \ + * **StopAny** \ + * **StopByRack** + */ +export type ScheduledEventStrategy = string; + /** Known values of {@link AzureConnectionType} that the service accepts. */ export enum KnownAzureConnectionType { /** None */ @@ -4792,6 +6067,60 @@ export enum KnownManagedCassandraResourceIdentityType { */ export type ManagedCassandraResourceIdentityType = string; +/** Known values of {@link CommandStatus} that the service accepts. */ +export enum KnownCommandStatus { + /** Done */ + Done = "Done", + /** Running */ + Running = "Running", + /** Enqueue */ + Enqueue = "Enqueue", + /** Processing */ + Processing = "Processing", + /** Finished */ + Finished = "Finished", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for CommandStatus. \ + * {@link KnownCommandStatus} can be used interchangeably with CommandStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Done** \ + * **Running** \ + * **Enqueue** \ + * **Processing** \ + * **Finished** \ + * **Failed** + */ +export type CommandStatus = string; + +/** Known values of {@link BackupState} that the service accepts. */ +export enum KnownBackupState { + /** Initiated */ + Initiated = "Initiated", + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for BackupState. \ + * {@link KnownBackupState} can be used interchangeably with BackupState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Initiated** \ + * **InProgress** \ + * **Succeeded** \ + * **Failed** + */ +export type BackupState = string; + /** Known values of {@link ConnectionState} that the service accepts. */ export enum KnownConnectionState { /** Unknown */ @@ -4837,17 +6166,131 @@ export enum KnownNodeState { } /** - * Defines values for NodeState. \ - * {@link KnownNodeState} can be used interchangeably with NodeState, + * Defines values for NodeState. \ + * {@link KnownNodeState} can be used interchangeably with NodeState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Normal** \ + * **Leaving** \ + * **Joining** \ + * **Moving** \ + * **Stopped** + */ +export type NodeState = string; + +/** Known values of {@link NetworkSecurityPerimeterConfigurationProvisioningState} that the service accepts. */ +export enum KnownNetworkSecurityPerimeterConfigurationProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Accepted */ + Accepted = "Accepted", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", +} + +/** + * Defines values for NetworkSecurityPerimeterConfigurationProvisioningState. \ + * {@link KnownNetworkSecurityPerimeterConfigurationProvisioningState} can be used interchangeably with NetworkSecurityPerimeterConfigurationProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Creating** \ + * **Updating** \ + * **Deleting** \ + * **Accepted** \ + * **Failed** \ + * **Canceled** + */ +export type NetworkSecurityPerimeterConfigurationProvisioningState = string; + +/** Known values of {@link IssueType} that the service accepts. */ +export enum KnownIssueType { + /** Unknown issue type */ + Unknown = "Unknown", + /** An error occurred while applying the network security perimeter (NSP) configuration. */ + ConfigurationPropagationFailure = "ConfigurationPropagationFailure", + /** A network connectivity issue is happening on the resource which could be addressed either by adding new resources to the network security perimeter (NSP) or by modifying access rules. */ + MissingPerimeterConfiguration = "MissingPerimeterConfiguration", + /** An managed identity hasn't been associated with the resource. The resource will still be able to validate inbound traffic from the network security perimeter (NSP) or matching inbound access rules, but it won't be able to perform outbound access as a member of the NSP. */ + MissingIdentityConfiguration = "MissingIdentityConfiguration", +} + +/** + * Defines values for IssueType. \ + * {@link KnownIssueType} can be used interchangeably with IssueType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown issue type \ + * **ConfigurationPropagationFailure**: An error occurred while applying the network security perimeter (NSP) configuration. \ + * **MissingPerimeterConfiguration**: A network connectivity issue is happening on the resource which could be addressed either by adding new resources to the network security perimeter (NSP) or by modifying access rules. \ + * **MissingIdentityConfiguration**: An managed identity hasn't been associated with the resource. The resource will still be able to validate inbound traffic from the network security perimeter (NSP) or matching inbound access rules, but it won't be able to perform outbound access as a member of the NSP. + */ +export type IssueType = string; + +/** Known values of {@link Severity} that the service accepts. */ +export enum KnownSeverity { + /** Warning */ + Warning = "Warning", + /** Error */ + Error = "Error", +} + +/** + * Defines values for Severity. \ + * {@link KnownSeverity} can be used interchangeably with Severity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Warning** \ + * **Error** + */ +export type Severity = string; + +/** Known values of {@link AccessRuleDirection} that the service accepts. */ +export enum KnownAccessRuleDirection { + /** Applies to inbound network traffic to the secured resources. */ + Inbound = "Inbound", + /** Applies to outbound network traffic from the secured resources */ + Outbound = "Outbound", +} + +/** + * Defines values for AccessRuleDirection. \ + * {@link KnownAccessRuleDirection} can be used interchangeably with AccessRuleDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound**: Applies to inbound network traffic to the secured resources. \ + * **Outbound**: Applies to outbound network traffic from the secured resources + */ +export type AccessRuleDirection = string; + +/** Known values of {@link ResourceAssociationAccessMode} that the service accepts. */ +export enum KnownResourceAssociationAccessMode { + /** Enforced access mode - traffic to the resource that failed access checks is blocked */ + Enforced = "Enforced", + /** Learning access mode - traffic to the resource is enabled for analysis but not blocked */ + Learning = "Learning", + /** Audit access mode - traffic to the resource that fails access checks is logged but not blocked */ + Audit = "Audit", +} + +/** + * Defines values for ResourceAssociationAccessMode. \ + * {@link KnownResourceAssociationAccessMode} can be used interchangeably with ResourceAssociationAccessMode, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Normal** \ - * **Leaving** \ - * **Joining** \ - * **Moving** \ - * **Stopped** + * **Enforced**: Enforced access mode - traffic to the resource that failed access checks is blocked \ + * **Learning**: Learning access mode - traffic to the resource is enabled for analysis but not blocked \ + * **Audit**: Audit access mode - traffic to the resource that fails access checks is logged but not blocked */ -export type NodeState = string; +export type ResourceAssociationAccessMode = string; /** Known values of {@link NotebookWorkspaceName} that the service accepts. */ export enum KnownNotebookWorkspaceName { @@ -5049,12 +6492,8 @@ export enum KnownNodeStatus { * **Down** */ export type NodeStatus = string; -/** Defines values for ResourceIdentityType. */ -export type ResourceIdentityType = - | "SystemAssigned" - | "UserAssigned" - | "SystemAssigned,UserAssigned" - | "None"; +/** Defines values for SupportedActions. */ +export type SupportedActions = "Enable" | "Disable"; /** Defines values for DefaultConsistencyLevel. */ export type DefaultConsistencyLevel = | "Eventual" @@ -5064,11 +6503,52 @@ export type DefaultConsistencyLevel = | "ConsistentPrefix"; /** Defines values for NetworkAclBypass. */ export type NetworkAclBypass = "None" | "AzureServices"; +/** Defines values for EnableFullTextQuery. */ +export type EnableFullTextQuery = "None" | "True" | "False"; +/** Defines values for ResourceIdentityType. */ +export type ResourceIdentityType = + | "SystemAssigned" + | "UserAssigned" + | "SystemAssigned,UserAssigned" + | "None"; /** Defines values for MongoRoleDefinitionType. */ export type MongoRoleDefinitionType = "BuiltInRole" | "CustomRole"; /** Defines values for RoleDefinitionType. */ export type RoleDefinitionType = "BuiltInRole" | "CustomRole"; +/** Optional parameters. */ +export interface ChaosFaultListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ChaosFaultListOperationResponse = ChaosFaultListResponse; + +/** Optional parameters. */ +export interface ChaosFaultEnableDisableOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the enableDisable operation. */ +export type ChaosFaultEnableDisableResponse = ChaosFaultResource; + +/** Optional parameters. */ +export interface ChaosFaultGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ChaosFaultGetResponse = ChaosFaultResource; + +/** Optional parameters. */ +export interface ChaosFaultListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ChaosFaultListNextResponse = ChaosFaultListResponse; + /** Optional parameters. */ export interface DatabaseAccountsGetOptionalParams extends coreClient.OperationOptions {} @@ -5371,6 +6851,41 @@ export interface PartitionKeyRangeIdRegionListMetricsOptionalParams export type PartitionKeyRangeIdRegionListMetricsResponse = PartitionMetricListResult; +/** Optional parameters. */ +export interface GraphResourcesListGraphsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listGraphs operation. */ +export type GraphResourcesListGraphsResponse = GraphResourcesListResult; + +/** Optional parameters. */ +export interface GraphResourcesGetGraphOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getGraph operation. */ +export type GraphResourcesGetGraphResponse = GraphResourceGetResults; + +/** Optional parameters. */ +export interface GraphResourcesCreateUpdateGraphOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createUpdateGraph operation. */ +export type GraphResourcesCreateUpdateGraphResponse = GraphResourceGetResults; + +/** Optional parameters. */ +export interface GraphResourcesDeleteGraphResourceOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface SqlResourcesListSqlDatabasesOptionalParams extends coreClient.OperationOptions {} @@ -5457,6 +6972,35 @@ export interface SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams export type SqlResourcesMigrateSqlDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface SqlResourcesListClientEncryptionKeysOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listClientEncryptionKeys operation. */ +export type SqlResourcesListClientEncryptionKeysResponse = + ClientEncryptionKeysListResult; + +/** Optional parameters. */ +export interface SqlResourcesGetClientEncryptionKeyOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getClientEncryptionKey operation. */ +export type SqlResourcesGetClientEncryptionKeyResponse = + ClientEncryptionKeyGetResults; + +/** Optional parameters. */ +export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createUpdateClientEncryptionKey operation. */ +export type SqlResourcesCreateUpdateClientEncryptionKeyResponse = + ClientEncryptionKeyGetResults; + /** Optional parameters. */ export interface SqlResourcesListSqlContainersOptionalParams extends coreClient.OperationOptions {} @@ -5497,6 +7041,32 @@ export interface SqlResourcesDeleteSqlContainerOptionalParams export type SqlResourcesDeleteSqlContainerResponse = SqlResourcesDeleteSqlContainerHeaders; +/** Optional parameters. */ +export interface SqlResourcesSqlDatabasePartitionMergeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the sqlDatabasePartitionMerge operation. */ +export type SqlResourcesSqlDatabasePartitionMergeResponse = + PhysicalPartitionStorageInfoCollection; + +/** Optional parameters. */ +export interface SqlResourcesListSqlContainerPartitionMergeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the listSqlContainerPartitionMerge operation. */ +export type SqlResourcesListSqlContainerPartitionMergeResponse = + PhysicalPartitionStorageInfoCollection; + /** Optional parameters. */ export interface SqlResourcesGetSqlContainerThroughputOptionalParams extends coreClient.OperationOptions {} @@ -5545,23 +7115,33 @@ export type SqlResourcesMigrateSqlContainerToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesListClientEncryptionKeysOptionalParams - extends coreClient.OperationOptions {} +export interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listClientEncryptionKeys operation. */ -export type SqlResourcesListClientEncryptionKeysResponse = - ClientEncryptionKeysListResult; +/** Contains response data for the sqlDatabaseRetrieveThroughputDistribution operation. */ +export type SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse = + PhysicalPartitionThroughputInfoResult; /** Optional parameters. */ -export interface SqlResourcesGetClientEncryptionKeyOptionalParams - extends coreClient.OperationOptions {} +export interface SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the getClientEncryptionKey operation. */ -export type SqlResourcesGetClientEncryptionKeyResponse = - ClientEncryptionKeyGetResults; +/** Contains response data for the sqlDatabaseRedistributeThroughput operation. */ +export type SqlResourcesSqlDatabaseRedistributeThroughputResponse = + PhysicalPartitionThroughputInfoResult; /** Optional parameters. */ -export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -5569,9 +7149,22 @@ export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateClientEncryptionKey operation. */ -export type SqlResourcesCreateUpdateClientEncryptionKeyResponse = - ClientEncryptionKeyGetResults; +/** Contains response data for the sqlContainerRetrieveThroughputDistribution operation. */ +export type SqlResourcesSqlContainerRetrieveThroughputDistributionResponse = + PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +export interface SqlResourcesSqlContainerRedistributeThroughputOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the sqlContainerRedistributeThroughput operation. */ +export type SqlResourcesSqlContainerRedistributeThroughputResponse = + PhysicalPartitionThroughputInfoResult; /** Optional parameters. */ export interface SqlResourcesListSqlStoredProceduresOptionalParams @@ -5874,6 +7467,58 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptiona export type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the mongoDBDatabaseRetrieveThroughputDistribution operation. */ +export type MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse = + PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the mongoDBDatabaseRedistributeThroughput operation. */ +export type MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse = + PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the mongoDBContainerRetrieveThroughputDistribution operation. */ +export type MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse = + PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the mongoDBContainerRedistributeThroughput operation. */ +export type MongoDBResourcesMongoDBContainerRedistributeThroughputResponse = + PhysicalPartitionThroughputInfoResult; + /** Optional parameters. */ export interface MongoDBResourcesListMongoDBCollectionsOptionalParams extends coreClient.OperationOptions {} @@ -5916,6 +7561,32 @@ export interface MongoDBResourcesDeleteMongoDBCollectionOptionalParams export type MongoDBResourcesDeleteMongoDBCollectionResponse = MongoDBResourcesDeleteMongoDBCollectionHeaders; +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the mongoDBDatabasePartitionMerge operation. */ +export type MongoDBResourcesMongoDBDatabasePartitionMergeResponse = + PhysicalPartitionStorageInfoCollection; + +/** Optional parameters. */ +export interface MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the listMongoDBCollectionPartitionMerge operation. */ +export type MongoDBResourcesListMongoDBCollectionPartitionMergeResponse = + PhysicalPartitionStorageInfoCollection; + /** Optional parameters. */ export interface MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams extends coreClient.OperationOptions {} @@ -6113,7 +7784,67 @@ export type TableResourcesUpdateTableThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface TableResourcesMigrateTableToAutoscaleOptionalParams +export interface TableResourcesMigrateTableToAutoscaleOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the migrateTableToAutoscale operation. */ +export type TableResourcesMigrateTableToAutoscaleResponse = + ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface TableResourcesMigrateTableToManualThroughputOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the migrateTableToManualThroughput operation. */ +export type TableResourcesMigrateTableToManualThroughputResponse = + ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface TableResourcesRetrieveContinuousBackupInformationOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the retrieveContinuousBackupInformation operation. */ +export type TableResourcesRetrieveContinuousBackupInformationResponse = + BackupInformation; + +/** Optional parameters. */ +export interface TableResourcesGetTableRoleDefinitionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getTableRoleDefinition operation. */ +export type TableResourcesGetTableRoleDefinitionResponse = + TableRoleDefinitionResource; + +/** Optional parameters. */ +export interface TableResourcesCreateUpdateTableRoleDefinitionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createUpdateTableRoleDefinition operation. */ +export type TableResourcesCreateUpdateTableRoleDefinitionResponse = + TableRoleDefinitionResource; + +/** Optional parameters. */ +export interface TableResourcesDeleteTableRoleDefinitionOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -6121,12 +7852,24 @@ export interface TableResourcesMigrateTableToAutoscaleOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateTableToAutoscale operation. */ -export type TableResourcesMigrateTableToAutoscaleResponse = - ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface TableResourcesListTableRoleDefinitionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listTableRoleDefinitions operation. */ +export type TableResourcesListTableRoleDefinitionsResponse = + TableRoleDefinitionListResult; /** Optional parameters. */ -export interface TableResourcesMigrateTableToManualThroughputOptionalParams +export interface TableResourcesGetTableRoleAssignmentOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getTableRoleAssignment operation. */ +export type TableResourcesGetTableRoleAssignmentResponse = + TableRoleAssignmentResource; + +/** Optional parameters. */ +export interface TableResourcesCreateUpdateTableRoleAssignmentOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -6134,12 +7877,12 @@ export interface TableResourcesMigrateTableToManualThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateTableToManualThroughput operation. */ -export type TableResourcesMigrateTableToManualThroughputResponse = - ThroughputSettingsGetResults; +/** Contains response data for the createUpdateTableRoleAssignment operation. */ +export type TableResourcesCreateUpdateTableRoleAssignmentResponse = + TableRoleAssignmentResource; /** Optional parameters. */ -export interface TableResourcesRetrieveContinuousBackupInformationOptionalParams +export interface TableResourcesDeleteTableRoleAssignmentOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -6147,9 +7890,13 @@ export interface TableResourcesRetrieveContinuousBackupInformationOptionalParams resumeFrom?: string; } -/** Contains response data for the retrieveContinuousBackupInformation operation. */ -export type TableResourcesRetrieveContinuousBackupInformationResponse = - BackupInformation; +/** Optional parameters. */ +export interface TableResourcesListTableRoleAssignmentsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listTableRoleAssignments operation. */ +export type TableResourcesListTableRoleAssignmentsResponse = + TableRoleAssignmentListResult; /** Optional parameters. */ export interface CassandraResourcesListCassandraKeyspacesOptionalParams @@ -6329,6 +8076,91 @@ export interface CassandraResourcesMigrateCassandraTableToManualThroughputOption export type CassandraResourcesMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface CassandraResourcesListCassandraViewsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listCassandraViews operation. */ +export type CassandraResourcesListCassandraViewsResponse = + CassandraViewListResult; + +/** Optional parameters. */ +export interface CassandraResourcesGetCassandraViewOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getCassandraView operation. */ +export type CassandraResourcesGetCassandraViewResponse = + CassandraViewGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesCreateUpdateCassandraViewOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createUpdateCassandraView operation. */ +export type CassandraResourcesCreateUpdateCassandraViewResponse = + CassandraViewGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesDeleteCassandraViewOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface CassandraResourcesGetCassandraViewThroughputOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getCassandraViewThroughput operation. */ +export type CassandraResourcesGetCassandraViewThroughputResponse = + ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateCassandraViewThroughput operation. */ +export type CassandraResourcesUpdateCassandraViewThroughputResponse = + ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the migrateCassandraViewToAutoscale operation. */ +export type CassandraResourcesMigrateCassandraViewToAutoscaleResponse = + ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the migrateCassandraViewToManualThroughput operation. */ +export type CassandraResourcesMigrateCassandraViewToManualThroughputResponse = + ThroughputSettingsGetResults; + /** Optional parameters. */ export interface GremlinResourcesListGremlinDatabasesOptionalParams extends coreClient.OperationOptions {} @@ -6532,6 +8364,64 @@ export interface LocationsGetOptionalParams /** Contains response data for the get operation. */ export type LocationsGetResponse = LocationGetResult; +/** Optional parameters. */ +export interface DataTransferJobsCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type DataTransferJobsCreateResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DataTransferJobsGetResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsPauseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the pause operation. */ +export type DataTransferJobsPauseResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsResumeOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the resume operation. */ +export type DataTransferJobsResumeResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsCancelOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the cancel operation. */ +export type DataTransferJobsCancelResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsCompleteOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the complete operation. */ +export type DataTransferJobsCompleteResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsListByDatabaseAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseAccount operation. */ +export type DataTransferJobsListByDatabaseAccountResponse = + DataTransferJobFeedResults; + +/** Optional parameters. */ +export interface DataTransferJobsListByDatabaseAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseAccountNext operation. */ +export type DataTransferJobsListByDatabaseAccountNextResponse = + DataTransferJobFeedResults; + /** Optional parameters. */ export interface CassandraClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions {} @@ -6598,9 +8488,51 @@ export interface CassandraClustersInvokeCommandOptionalParams /** Contains response data for the invokeCommand operation. */ export type CassandraClustersInvokeCommandResponse = CommandOutput; +/** Optional parameters. */ +export interface CassandraClustersInvokeCommandAsyncOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the invokeCommandAsync operation. */ +export type CassandraClustersInvokeCommandAsyncResponse = CommandPublicResource; + +/** Optional parameters. */ +export interface CassandraClustersListCommandOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listCommand operation. */ +export type CassandraClustersListCommandResponse = ListCommands; + +/** Optional parameters. */ +export interface CassandraClustersGetCommandAsyncOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getCommandAsync operation. */ +export type CassandraClustersGetCommandAsyncResponse = CommandPublicResource; + +/** Optional parameters. */ +export interface CassandraClustersListBackupsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBackups operation. */ +export type CassandraClustersListBackupsResponse = ListBackups; + +/** Optional parameters. */ +export interface CassandraClustersGetBackupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getBackup operation. */ +export type CassandraClustersGetBackupResponse = BackupResource; + /** Optional parameters. */ export interface CassandraClustersDeallocateOptionalParams extends coreClient.OperationOptions { + /** Force to deallocate a cluster of Cluster Type Production. Force to deallocate a cluster of Cluster Type Production might cause data loss */ + xMsForceDeallocate?: string; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -6670,6 +8602,43 @@ export interface CassandraDataCentersUpdateOptionalParams /** Contains response data for the update operation. */ export type CassandraDataCentersUpdateResponse = DataCenterResource; +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type NetworkSecurityPerimeterConfigurationsListResponse = + NetworkSecurityPerimeterConfigurationListResult; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkSecurityPerimeterConfigurationsGetResponse = + NetworkSecurityPerimeterConfiguration; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the reconcile operation. */ +export type NetworkSecurityPerimeterConfigurationsReconcileResponse = + NetworkSecurityPerimeterConfigurationsReconcileHeaders; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type NetworkSecurityPerimeterConfigurationsListNextResponse = + NetworkSecurityPerimeterConfigurationListResult; + /** Optional parameters. */ export interface NotebookWorkspacesListByDatabaseAccountOptionalParams extends coreClient.OperationOptions {} @@ -6975,6 +8944,129 @@ export interface ServiceDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ThroughputPoolsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ThroughputPoolsListResponse = ThroughputPoolsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ThroughputPoolsListByResourceGroupResponse = + ThroughputPoolsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ThroughputPoolsListNextResponse = ThroughputPoolsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ThroughputPoolsListByResourceGroupNextResponse = + ThroughputPoolsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ThroughputPoolGetResponse = ThroughputPoolResource; + +/** Optional parameters. */ +export interface ThroughputPoolCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ThroughputPoolCreateOrUpdateResponse = ThroughputPoolResource; + +/** Optional parameters. */ +export interface ThroughputPoolUpdateOptionalParams + extends coreClient.OperationOptions { + /** The parameters to provide for the current Throughput Pool. */ + body?: ThroughputPoolUpdate; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type ThroughputPoolUpdateResponse = ThroughputPoolResource; + +/** Optional parameters. */ +export interface ThroughputPoolDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ThroughputPoolDeleteResponse = ThroughputPoolDeleteHeaders; + +/** Optional parameters. */ +export interface ThroughputPoolAccountsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ThroughputPoolAccountsListResponse = + ThroughputPoolAccountsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolAccountsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ThroughputPoolAccountsListNextResponse = + ThroughputPoolAccountsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolAccountGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ThroughputPoolAccountGetResponse = ThroughputPoolAccountResource; + +/** Optional parameters. */ +export interface ThroughputPoolAccountCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type ThroughputPoolAccountCreateResponse = ThroughputPoolAccountResource; + +/** Optional parameters. */ +export interface ThroughputPoolAccountDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ThroughputPoolAccountDeleteResponse = + ThroughputPoolAccountDeleteHeaders; + /** Optional parameters. */ export interface CosmosDBManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts index 81db239e449a..43074b0cbe21 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts @@ -8,20 +8,49 @@ import * as coreClient from "@azure/core-client"; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { +export const ChaosFaultListResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServiceIdentity", + className: "ChaosFaultListResponse", modelProperties: { - principalId: { - serializedName: "principalId", + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ChaosFaultResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String", }, }, - tenantId: { - serializedName: "tenantId", + }, + }, +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", readOnly: true, type: { name: "String", @@ -29,25 +58,131 @@ export const ManagedServiceIdentity: coreClient.CompositeMapper = { }, type: { serializedName: "type", + readOnly: true, type: { - name: "Enum", - allowedValues: [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned,UserAssigned", - "None", - ], + name: "String", }, }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + systemData: { + serializedName: "systemData", type: { - name: "Dictionary", - value: { + name: "Composite", + className: "SystemData", + }, + }, + }, + }, +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String", + }, + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String", + }, + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime", + }, + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String", + }, + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String", + }, + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { type: { name: "Composite", - className: - "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", + className: "ErrorDetail", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", }, }, }, @@ -56,30 +191,29 @@ export const ManagedServiceIdentity: coreClient.CompositeMapper = { }, }; -export const Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: - "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String", - }, +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "String", - }, + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } }, }, }, }, - }; + }, +}; export const IpAddressOrRange: coreClient.CompositeMapper = { type: { @@ -301,36 +435,6 @@ export const PrivateLinkServiceConnectionStateProperty: coreClient.CompositeMapp }, }; -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - export const ApiProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -539,6 +643,22 @@ export const CorsPolicy: coreClient.CompositeMapper = { }, }; +export const DiagnosticLogSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticLogSettings", + modelProperties: { + enableFullTextQuery: { + serializedName: "enableFullTextQuery", + type: { + name: "Enum", + allowedValues: ["None", "True", "False"], + }, + }, + }, + }, +}; + export const Capacity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -557,16 +677,64 @@ export const Capacity: coreClient.CompositeMapper = { }, }; -export const DatabaseAccountKeysMetadata: coreClient.CompositeMapper = { +export const CapacityModeChangeTransitionState: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountKeysMetadata", + className: "CapacityModeChangeTransitionState", modelProperties: { - primaryMasterKey: { - serializedName: "primaryMasterKey", + capacityModeTransitionStatus: { + serializedName: "capacityModeTransitionStatus", type: { - name: "Composite", - className: "AccountKeyMetadata", + name: "String", + }, + }, + currentCapacityMode: { + serializedName: "currentCapacityMode", + type: { + name: "String", + }, + }, + previousCapacityMode: { + serializedName: "previousCapacityMode", + type: { + name: "String", + }, + }, + capacityModeTransitionBeginTimestamp: { + serializedName: "capacityModeTransitionBeginTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, + }, + capacityModeTransitionEndTimestamp: { + serializedName: "capacityModeTransitionEndTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, + }, + capacityModeLastSuccessfulTransitionEndTimestamp: { + serializedName: "capacityModeLastSuccessfulTransitionEndTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const DatabaseAccountKeysMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAccountKeysMetadata", + modelProperties: { + primaryMasterKey: { + serializedName: "primaryMasterKey", + type: { + name: "Composite", + className: "AccountKeyMetadata", }, }, secondaryMasterKey: { @@ -610,65 +778,70 @@ export const AccountKeyMetadata: coreClient.CompositeMapper = { }, }; -export const SystemData: coreClient.CompositeMapper = { +export const ARMResourceProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "ARMResourceProperties", modelProperties: { - createdBy: { - serializedName: "createdBy", + id: { + serializedName: "id", + readOnly: true, type: { name: "String", }, }, - createdByType: { - serializedName: "createdByType", + name: { + serializedName: "name", + readOnly: true, type: { name: "String", }, }, - createdAt: { - serializedName: "createdAt", + type: { + serializedName: "type", + readOnly: true, type: { - name: "DateTime", + name: "String", }, }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + location: { + serializedName: "location", type: { name: "String", }, }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + tags: { + serializedName: "tags", type: { - name: "String", + name: "Dictionary", + value: { type: { name: "String" } }, }, }, - lastModifiedAt: { - serializedName: "lastModifiedAt", + identity: { + serializedName: "identity", type: { - name: "DateTime", + name: "Composite", + className: "ManagedServiceIdentity", }, }, }, }, }; -export const ARMResourceProperties: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ARMResourceProperties", + className: "ManagedServiceIdentity", modelProperties: { - id: { - serializedName: "id", + principalId: { + serializedName: "principalId", readOnly: true, type: { name: "String", }, }, - name: { - serializedName: "name", + tenantId: { + serializedName: "tenantId", readOnly: true, type: { name: "String", @@ -676,28 +849,58 @@ export const ARMResourceProperties: coreClient.CompositeMapper = { }, type: { serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - location: { - serializedName: "location", type: { - name: "String", + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned,UserAssigned", + "None", + ], }, }, - tags: { - serializedName: "tags", + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { name: "Dictionary", - value: { type: { name: "String" } }, + value: { + type: { + name: "Composite", + className: + "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", + }, + }, }, }, }, }, }; +export const Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String", + }, + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -895,6 +1098,13 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { }, }, }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings", + }, + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -908,6 +1118,18 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { className: "Capacity", }, }, + capacityMode: { + serializedName: "properties.capacityMode", + type: { + name: "String", + }, + }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean", + }, + }, keysMetadata: { serializedName: "properties.keysMetadata", type: { @@ -921,20 +1143,32 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { name: "Boolean", }, }, + enableBurstCapacity: { + serializedName: "properties.enableBurstCapacity", + type: { + name: "Boolean", + }, + }, minimalTlsVersion: { serializedName: "properties.minimalTlsVersion", type: { name: "String", }, }, - enableBurstCapacity: { - serializedName: "properties.enableBurstCapacity", + customerManagedKeyStatus: { + serializedName: "properties.customerManagedKeyStatus", + type: { + name: "String", + }, + }, + enablePriorityBasedExecution: { + serializedName: "properties.enablePriorityBasedExecution", type: { name: "Boolean", }, }, - customerManagedKeyStatus: { - serializedName: "properties.customerManagedKeyStatus", + defaultPriorityLevel: { + serializedName: "properties.defaultPriorityLevel", type: { name: "String", }, @@ -1092,159 +1326,63 @@ export const RegionForOnlineOffline: coreClient.CompositeMapper = { }, }; -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", +export const DatabaseAccountRegenerateKeyParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DatabaseAccountRegenerateKeyParameters", + modelProperties: { + keyKind: { + serializedName: "keyKind", + required: true, + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const ErrorDetail: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDetail", + className: "OperationListResult", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ErrorDetail", + className: "Operation", }, }, }, }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - }, - }, + name: "String", }, }, }, }, }; -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorAdditionalInfo", + className: "Operation", modelProperties: { - type: { - serializedName: "type", - readOnly: true, + name: { + serializedName: "name", type: { name: "String", }, }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const DatabaseAccountRegenerateKeyParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "DatabaseAccountRegenerateKeyParameters", - modelProperties: { - keyKind: { - serializedName: "keyKind", - required: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - display: { - serializedName: "display", + display: { + serializedName: "display", type: { name: "Composite", className: "OperationDisplay", @@ -1724,10 +1862,10 @@ export const MetricAvailability: coreClient.CompositeMapper = { }, }; -export const SqlDatabaseListResult: coreClient.CompositeMapper = { +export const GraphResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDatabaseListResult", + className: "GraphResourcesListResult", modelProperties: { value: { serializedName: "value", @@ -1737,7 +1875,7 @@ export const SqlDatabaseListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SqlDatabaseGetResults", + className: "GraphResourceGetResults", }, }, }, @@ -1746,10 +1884,10 @@ export const SqlDatabaseListResult: coreClient.CompositeMapper = { }, }; -export const SqlDatabaseResource: coreClient.CompositeMapper = { +export const GraphResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDatabaseResource", + className: "GraphResource", modelProperties: { id: { serializedName: "id", @@ -1758,58 +1896,51 @@ export const SqlDatabaseResource: coreClient.CompositeMapper = { name: "String", }, }, - restoreParameters: { - serializedName: "restoreParameters", + }, + }, +}; + +export const OptionsResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OptionsResource", + modelProperties: { + throughput: { + serializedName: "throughput", type: { - name: "Composite", - className: "ResourceRestoreParameters", + name: "Number", }, }, - createMode: { - defaultValue: "Default", - serializedName: "createMode", + autoscaleSettings: { + serializedName: "autoscaleSettings", type: { - name: "String", + name: "Composite", + className: "AutoscaleSettings", }, }, }, }, }; -export const ExtendedResourceProperties: coreClient.CompositeMapper = { +export const AutoscaleSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedResourceProperties", + className: "AutoscaleSettings", modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, - type: { - name: "String", - }, - }, - ts: { - serializedName: "_ts", - readOnly: true, + maxThroughput: { + serializedName: "maxThroughput", type: { name: "Number", }, }, - etag: { - serializedName: "_etag", - readOnly: true, - type: { - name: "String", - }, - }, }, }, }; -export const OptionsResource: coreClient.CompositeMapper = { +export const CreateUpdateOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OptionsResource", + className: "CreateUpdateOptions", modelProperties: { throughput: { serializedName: "throughput", @@ -1828,37 +1959,82 @@ export const OptionsResource: coreClient.CompositeMapper = { }, }; -export const AutoscaleSettings: coreClient.CompositeMapper = { +export const SqlDatabaseListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AutoscaleSettings", + className: "SqlDatabaseListResult", modelProperties: { - maxThroughput: { - serializedName: "maxThroughput", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlDatabaseGetResults", + }, + }, }, }, }, }, }; -export const CreateUpdateOptions: coreClient.CompositeMapper = { +export const SqlDatabaseResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CreateUpdateOptions", + className: "SqlDatabaseResource", modelProperties: { - throughput: { - serializedName: "throughput", + id: { + serializedName: "id", + required: true, type: { - name: "Number", + name: "String", }, }, - autoscaleSettings: { - serializedName: "autoscaleSettings", + restoreParameters: { + serializedName: "restoreParameters", type: { name: "Composite", - className: "AutoscaleSettings", + className: "ResourceRestoreParameters", + }, + }, + createMode: { + defaultValue: "Default", + serializedName: "createMode", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ExtendedResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedResourceProperties", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String", + }, + }, + ts: { + serializedName: "_ts", + readOnly: true, + type: { + name: "Number", + }, + }, + etag: { + serializedName: "_etag", + readOnly: true, + type: { + name: "String", }, }, }, @@ -1911,6 +2087,18 @@ export const ThroughputSettingsResource: coreClient.CompositeMapper = { name: "String", }, }, + throughputBuckets: { + serializedName: "throughputBuckets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ThroughputBucketResource", + }, + }, + }, + }, }, }, }; @@ -1982,10 +2170,33 @@ export const ThroughputPolicyResource: coreClient.CompositeMapper = { }, }; -export const SqlContainerListResult: coreClient.CompositeMapper = { +export const ThroughputBucketResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlContainerListResult", + className: "ThroughputBucketResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "Number", + }, + }, + maxThroughputPercentage: { + serializedName: "maxThroughputPercentage", + required: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const ClientEncryptionKeysListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClientEncryptionKeysListResult", modelProperties: { value: { serializedName: "value", @@ -1995,7 +2206,7 @@ export const SqlContainerListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SqlContainerGetResults", + className: "ClientEncryptionKeyGetResults", }, }, }, @@ -2004,42 +2215,178 @@ export const SqlContainerListResult: coreClient.CompositeMapper = { }, }; -export const SqlContainerResource: coreClient.CompositeMapper = { +export const ClientEncryptionKeyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlContainerResource", + className: "ClientEncryptionKeyResource", modelProperties: { id: { serializedName: "id", - required: true, type: { name: "String", }, }, - indexingPolicy: { - serializedName: "indexingPolicy", + encryptionAlgorithm: { + serializedName: "encryptionAlgorithm", type: { - name: "Composite", - className: "IndexingPolicy", + name: "String", }, }, - partitionKey: { - serializedName: "partitionKey", + wrappedDataEncryptionKey: { + serializedName: "wrappedDataEncryptionKey", type: { - name: "Composite", - className: "ContainerPartitionKey", + name: "ByteArray", }, }, - defaultTtl: { - serializedName: "defaultTtl", + keyWrapMetadata: { + serializedName: "keyWrapMetadata", type: { - name: "Number", + name: "Composite", + className: "KeyWrapMetadata", }, }, - uniqueKeyPolicy: { - serializedName: "uniqueKeyPolicy", - type: { - name: "Composite", + }, + }, +}; + +export const KeyWrapMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyWrapMetadata", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + algorithm: { + serializedName: "algorithm", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ARMProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ARMProxyResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ClientEncryptionKeyCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ClientEncryptionKeyCreateUpdateParameters", + modelProperties: { + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "ClientEncryptionKeyResource", + }, + }, + }, + }, + }; + +export const SqlContainerListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlContainerGetResults", + }, + }, + }, + }, + }, + }, +}; + +export const SqlContainerResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, + }, + indexingPolicy: { + serializedName: "indexingPolicy", + type: { + name: "Composite", + className: "IndexingPolicy", + }, + }, + partitionKey: { + serializedName: "partitionKey", + type: { + name: "Composite", + className: "ContainerPartitionKey", + }, + }, + defaultTtl: { + serializedName: "defaultTtl", + type: { + name: "Number", + }, + }, + uniqueKeyPolicy: { + serializedName: "uniqueKeyPolicy", + type: { + name: "Composite", className: "UniqueKeyPolicy", }, }, @@ -2077,6 +2424,13 @@ export const SqlContainerResource: coreClient.CompositeMapper = { name: "String", }, }, + materializedViewDefinition: { + serializedName: "materializedViewDefinition", + type: { + name: "Composite", + className: "MaterializedViewDefinition", + }, + }, computedProperties: { serializedName: "computedProperties", type: { @@ -2511,6 +2865,36 @@ export const ClientEncryptionIncludedPath: coreClient.CompositeMapper = { }, }; +export const MaterializedViewDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MaterializedViewDefinition", + modelProperties: { + sourceCollectionRid: { + serializedName: "sourceCollectionRid", + readOnly: true, + type: { + name: "String", + }, + }, + sourceCollectionId: { + serializedName: "sourceCollectionId", + required: true, + type: { + name: "String", + }, + }, + definition: { + serializedName: "definition", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const ComputedProperty: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2590,87 +2974,98 @@ export const VectorEmbedding: coreClient.CompositeMapper = { }, }; -export const ClientEncryptionKeysListResult: coreClient.CompositeMapper = { +export const MergeParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClientEncryptionKeysListResult", + className: "MergeParameters", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + isDryRun: { + serializedName: "isDryRun", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClientEncryptionKeyGetResults", - }, - }, + name: "Boolean", }, }, }, }, }; -export const ClientEncryptionKeyResource: coreClient.CompositeMapper = { +export const PhysicalPartitionStorageInfoCollection: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PhysicalPartitionStorageInfoCollection", + modelProperties: { + physicalPartitionStorageInfoCollection: { + serializedName: "physicalPartitionStorageInfoCollection", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionStorageInfo", + }, + }, + }, + }, + }, + }, + }; + +export const PhysicalPartitionStorageInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClientEncryptionKeyResource", + className: "PhysicalPartitionStorageInfo", modelProperties: { id: { serializedName: "id", + readOnly: true, type: { name: "String", }, }, - encryptionAlgorithm: { - serializedName: "encryptionAlgorithm", - type: { - name: "String", - }, - }, - wrappedDataEncryptionKey: { - serializedName: "wrappedDataEncryptionKey", - type: { - name: "ByteArray", - }, - }, - keyWrapMetadata: { - serializedName: "keyWrapMetadata", + storageInKB: { + serializedName: "storageInKB", + readOnly: true, type: { - name: "Composite", - className: "KeyWrapMetadata", + name: "Number", }, }, }, }, }; -export const KeyWrapMetadata: coreClient.CompositeMapper = { +export const RetrieveThroughputPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RetrieveThroughputPropertiesResource", + modelProperties: { + physicalPartitionIds: { + serializedName: "physicalPartitionIds", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionId", + }, + }, + }, + }, + }, + }, + }; + +export const PhysicalPartitionId: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KeyWrapMetadata", + className: "PhysicalPartitionId", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "String", - }, - }, - algorithm: { - serializedName: "algorithm", + id: { + serializedName: "id", + required: true, type: { name: "String", }, @@ -2679,47 +3074,88 @@ export const KeyWrapMetadata: coreClient.CompositeMapper = { }, }; -export const ARMProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ARMProxyResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", +export const PhysicalPartitionThroughputInfoProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoProperties", + modelProperties: { + physicalPartitionThroughputInfo: { + serializedName: "physicalPartitionThroughputInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResource", + }, + }, + }, }, }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", + }, + }; + +export const PhysicalPartitionThroughputInfoResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", + throughput: { + serializedName: "throughput", + type: { + name: "Number", + }, }, }, }, - }, -}; + }; -export const ClientEncryptionKeyCreateUpdateParameters: coreClient.CompositeMapper = +export const RedistributeThroughputPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClientEncryptionKeyCreateUpdateParameters", + className: "RedistributeThroughputPropertiesResource", modelProperties: { - resource: { - serializedName: "properties.resource", + throughputPolicy: { + serializedName: "throughputPolicy", + required: true, type: { - name: "Composite", - className: "ClientEncryptionKeyResource", + name: "String", + }, + }, + targetPhysicalPartitionThroughputInfo: { + serializedName: "targetPhysicalPartitionThroughputInfo", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResource", + }, + }, + }, + }, + sourcePhysicalPartitionThroughputInfo: { + serializedName: "sourcePhysicalPartitionThroughputInfo", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResource", + }, + }, }, }, }, @@ -3534,6 +3970,189 @@ export const LocationProperties: coreClient.CompositeMapper = { }, }; +export const CassandraViewListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CassandraViewGetResults", + }, + }, + }, + }, + }, + }, +}; + +export const CassandraViewResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, + }, + viewDefinition: { + serializedName: "viewDefinition", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DataTransferJobProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferJobProperties", + modelProperties: { + jobName: { + serializedName: "jobName", + readOnly: true, + type: { + name: "String", + }, + }, + source: { + serializedName: "source", + type: { + name: "Composite", + className: "DataTransferDataSourceSink", + }, + }, + destination: { + serializedName: "destination", + type: { + name: "Composite", + className: "DataTransferDataSourceSink", + }, + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String", + }, + }, + processedCount: { + serializedName: "processedCount", + readOnly: true, + type: { + name: "Number", + }, + }, + totalCount: { + serializedName: "totalCount", + readOnly: true, + type: { + name: "Number", + }, + }, + lastUpdatedUtcTime: { + serializedName: "lastUpdatedUtcTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + workerCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "workerCount", + type: { + name: "Number", + }, + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse", + }, + }, + duration: { + serializedName: "duration", + readOnly: true, + type: { + name: "String", + }, + }, + mode: { + serializedName: "mode", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DataTransferDataSourceSink: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: { + serializedName: "component", + clientName: "component", + }, + modelProperties: { + component: { + defaultValue: "CosmosDBCassandra", + serializedName: "component", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DataTransferJobFeedResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferJobFeedResults", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataTransferJobGetResults", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const ListClusters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3615,6 +4234,12 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { name: "Boolean", }, }, + autoReplicate: { + serializedName: "autoReplicate", + type: { + name: "String", + }, + }, clientCertificates: { serializedName: "clientCertificates", type: { @@ -3677,6 +4302,17 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { }, }, }, + externalDataCenters: { + serializedName: "externalDataCenters", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, hoursBetweenBackups: { serializedName: "hoursBetweenBackups", type: { @@ -3695,6 +4331,12 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { name: "Boolean", }, }, + clusterType: { + serializedName: "clusterType", + type: { + name: "String", + }, + }, provisionError: { serializedName: "provisionError", type: { @@ -3702,15 +4344,44 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { className: "CassandraError", }, }, - azureConnectionMethod: { - serializedName: "azureConnectionMethod", + extensions: { + serializedName: "extensions", type: { - name: "String", - }, - }, - privateLinkResourceId: { - serializedName: "privateLinkResourceId", - readOnly: true, + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + backupSchedules: { + serializedName: "backupSchedules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupSchedule", + }, + }, + }, + }, + scheduledEventStrategy: { + serializedName: "scheduledEventStrategy", + type: { + name: "String", + }, + }, + azureConnectionMethod: { + serializedName: "azureConnectionMethod", + type: { + name: "String", + }, + }, + privateLinkResourceId: { + serializedName: "privateLinkResourceId", + readOnly: true, type: { name: "String", }, @@ -3782,6 +4453,33 @@ export const CassandraError: coreClient.CompositeMapper = { }, }; +export const BackupSchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupSchedule", + modelProperties: { + scheduleName: { + serializedName: "scheduleName", + type: { + name: "String", + }, + }, + cronExpression: { + serializedName: "cronExpression", + type: { + name: "String", + }, + }, + retentionInHours: { + serializedName: "retentionInHours", + type: { + name: "Number", + }, + }, + }, + }, +}; + export const ManagedCassandraARMResourceProperties: coreClient.CompositeMapper = { type: { @@ -3920,6 +4618,201 @@ export const CommandOutput: coreClient.CompositeMapper = { }, }; +export const CommandAsyncPostBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommandAsyncPostBody", + modelProperties: { + command: { + serializedName: "command", + required: true, + type: { + name: "String", + }, + }, + arguments: { + serializedName: "arguments", + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + host: { + serializedName: "host", + required: true, + type: { + name: "String", + }, + }, + cassandraStopStart: { + serializedName: "cassandra-stop-start", + type: { + name: "Boolean", + }, + }, + readWrite: { + serializedName: "readWrite", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const CommandPublicResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommandPublicResource", + modelProperties: { + command: { + serializedName: "command", + type: { + name: "String", + }, + }, + commandId: { + serializedName: "commandId", + type: { + name: "String", + }, + }, + arguments: { + serializedName: "arguments", + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + host: { + serializedName: "host", + type: { + name: "String", + }, + }, + isAdmin: { + serializedName: "isAdmin", + type: { + name: "Boolean", + }, + }, + cassandraStopStart: { + serializedName: "cassandraStopStart", + type: { + name: "Boolean", + }, + }, + readWrite: { + serializedName: "readWrite", + type: { + name: "Boolean", + }, + }, + result: { + serializedName: "result", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + outputFile: { + serializedName: "outputFile", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ListCommands: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListCommands", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CommandPublicResource", + }, + }, + }, + }, + }, + }, +}; + +export const ListBackups: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListBackups", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupResource", + }, + }, + }, + }, + }, + }, +}; + +export const BackupResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupResource", + modelProperties: { + backupId: { + serializedName: "backupId", + type: { + name: "String", + }, + }, + backupState: { + serializedName: "backupState", + type: { + name: "String", + }, + }, + backupStartTimestamp: { + serializedName: "backupStartTimestamp", + type: { + name: "DateTime", + }, + }, + backupStopTimestamp: { + serializedName: "backupStopTimestamp", + type: { + name: "DateTime", + }, + }, + backupExpiryTimestamp: { + serializedName: "backupExpiryTimestamp", + type: { + name: "DateTime", + }, + }, + }, + }, +}; + export const ListDataCenters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4399,6 +5292,12 @@ export const ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatace name: "Number", }, }, + isLatestModel: { + serializedName: "isLatestModel", + type: { + name: "Boolean", + }, + }, }, }, }; @@ -4621,100 +5520,137 @@ export const MongoUserDefinitionListResult: coreClient.CompositeMapper = { }, }; -export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NotebookWorkspaceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NotebookWorkspace", +export const NetworkSecurityPerimeterConfigurationListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfiguration", + }, }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, - }, -}; + }; -export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = +export const NetworkSecurityPerimeterConfigurationProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotebookWorkspaceConnectionInfoResult", + className: "NetworkSecurityPerimeterConfigurationProperties", modelProperties: { - authToken: { - serializedName: "authToken", + provisioningState: { + serializedName: "provisioningState", readOnly: true, type: { name: "String", }, }, - notebookServerEndpoint: { - serializedName: "notebookServerEndpoint", + provisioningIssues: { + serializedName: "provisioningIssues", readOnly: true, type: { - name: "String", - }, - }, - }, - }, - }; - -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProvisioningIssue", + }, }, }, }, + networkSecurityPerimeter: { + serializedName: "networkSecurityPerimeter", + type: { + name: "Composite", + className: "NetworkSecurityPerimeter", + }, + }, + resourceAssociation: { + serializedName: "resourceAssociation", + type: { + name: "Composite", + className: "ResourceAssociation", + }, + }, + profile: { + serializedName: "profile", + type: { + name: "Composite", + className: "NetworkSecurityProfile", + }, + }, }, }, - }, -}; + }; -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { +export const ProvisioningIssue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceListResult", + className: "ProvisioningIssue", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource", - }, - }, + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ProvisioningIssueProperties", }, }, }, }, }; -export const Permission: coreClient.CompositeMapper = { +export const ProvisioningIssueProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Permission", + className: "ProvisioningIssueProperties", modelProperties: { - dataActions: { - serializedName: "dataActions", + issueType: { + serializedName: "issueType", + readOnly: true, + type: { + name: "String", + }, + }, + severity: { + serializedName: "severity", + readOnly: true, + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String", + }, + }, + suggestedResourceIds: { + serializedName: "suggestedResourceIds", + readOnly: true, type: { name: "Sequence", element: { @@ -4724,13 +5660,15 @@ export const Permission: coreClient.CompositeMapper = { }, }, }, - notDataActions: { - serializedName: "notDataActions", + suggestedAccessRules: { + serializedName: "suggestedAccessRules", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "AccessRule", }, }, }, @@ -4739,116 +5677,103 @@ export const Permission: coreClient.CompositeMapper = { }, }; -export const SqlRoleDefinitionCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SqlRoleDefinitionCreateUpdateParameters", - modelProperties: { - roleName: { - serializedName: "properties.roleName", - type: { - name: "String", - }, - }, +export const AccessRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessRule", + modelProperties: { + name: { + serializedName: "name", type: { - serializedName: "properties.type", - type: { - name: "Enum", - allowedValues: ["BuiltInRole", "CustomRole"], - }, - }, - assignableScopes: { - serializedName: "properties.assignableScopes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, + name: "String", }, - permissions: { - serializedName: "properties.permissions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Permission", - }, - }, - }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AccessRuleProperties", }, }, }, - }; + }, +}; -export const SqlRoleDefinitionListResult: coreClient.CompositeMapper = { +export const AccessRuleProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlRoleDefinitionListResult", + className: "AccessRuleProperties", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + direction: { + serializedName: "direction", + type: { + name: "String", + }, + }, + addressPrefixes: { + serializedName: "addressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + subscriptions: { + serializedName: "subscriptions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SqlRoleDefinitionGetResults", + className: "AccessRulePropertiesSubscriptionsItem", }, }, }, }, - }, - }, -}; - -export const SqlRoleAssignmentCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SqlRoleAssignmentCreateUpdateParameters", - modelProperties: { - roleDefinitionId: { - serializedName: "properties.roleDefinitionId", - type: { - name: "String", + networkSecurityPerimeters: { + serializedName: "networkSecurityPerimeters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeter", + }, }, }, - scope: { - serializedName: "properties.scope", - type: { - name: "String", + }, + fullyQualifiedDomainNames: { + serializedName: "fullyQualifiedDomainNames", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, }, }, - principalId: { - serializedName: "properties.principalId", - type: { - name: "String", + }, + emailAddresses: { + serializedName: "emailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, }, }, }, - }, - }; - -export const SqlRoleAssignmentListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlRoleAssignmentListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + phoneNumbers: { + serializedName: "phoneNumbers", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "SqlRoleAssignmentGetResults", + name: "String", }, }, }, @@ -4857,53 +5782,37 @@ export const SqlRoleAssignmentListResult: coreClient.CompositeMapper = { }, }; -export const RestorableDatabaseAccountsListResult: coreClient.CompositeMapper = +export const AccessRulePropertiesSubscriptionsItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableDatabaseAccountsListResult", + className: "AccessRulePropertiesSubscriptionsItem", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + id: { + serializedName: "id", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableDatabaseAccountGetResult", - }, - }, + name: "String", }, }, }, }, }; -export const RestorableDatabaseAccountGetResult: coreClient.CompositeMapper = { +export const NetworkSecurityPerimeter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableDatabaseAccountGetResult", + className: "NetworkSecurityPerimeter", modelProperties: { id: { serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, type: { name: "String", }, }, - type: { - serializedName: "type", - readOnly: true, + perimeterGuid: { + serializedName: "perimeterGuid", type: { - name: "String", + name: "Uuid", }, }, location: { @@ -4912,151 +5821,160 @@ export const RestorableDatabaseAccountGetResult: coreClient.CompositeMapper = { name: "String", }, }, - accountName: { - serializedName: "properties.accountName", + }, + }, +}; + +export const ResourceAssociation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceAssociation", + modelProperties: { + name: { + serializedName: "name", type: { name: "String", }, }, - creationTime: { - serializedName: "properties.creationTime", + accessMode: { + serializedName: "accessMode", type: { - name: "DateTime", + name: "String", }, }, - deletionTime: { - serializedName: "properties.deletionTime", - type: { - name: "DateTime", - }, - }, - oldestRestorableTime: { - serializedName: "properties.oldestRestorableTime", + }, + }, +}; + +export const NetworkSecurityProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkSecurityProfile", + modelProperties: { + name: { + serializedName: "name", type: { - name: "DateTime", + name: "String", }, }, - apiType: { - serializedName: "properties.apiType", - readOnly: true, + accessRulesVersion: { + serializedName: "accessRulesVersion", type: { - name: "String", + name: "Number", }, }, - restorableLocations: { - serializedName: "properties.restorableLocations", - readOnly: true, + accessRules: { + serializedName: "accessRules", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RestorableLocationResource", + className: "AccessRule", }, }, }, }, - }, - }, -}; - -export const RestorableLocationResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableLocationResource", - modelProperties: { - locationName: { - serializedName: "locationName", - readOnly: true, - type: { - name: "String", - }, - }, - regionalDatabaseAccountInstanceId: { - serializedName: "regionalDatabaseAccountInstanceId", - readOnly: true, - type: { - name: "String", - }, - }, - creationTime: { - serializedName: "creationTime", - readOnly: true, + diagnosticSettingsVersion: { + serializedName: "diagnosticSettingsVersion", type: { - name: "DateTime", + name: "Number", }, }, - deletionTime: { - serializedName: "deletionTime", - readOnly: true, + enabledLogCategories: { + serializedName: "enabledLogCategories", type: { - name: "DateTime", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, }, }, }; -export const ContinuousBackupRestoreLocation: coreClient.CompositeMapper = { +export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContinuousBackupRestoreLocation", + className: "NotebookWorkspaceListResult", modelProperties: { - location: { - serializedName: "location", + value: { + serializedName: "value", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NotebookWorkspace", + }, + }, }, }, }, }, }; -export const BackupInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BackupInformation", - modelProperties: { - continuousBackupInformation: { - serializedName: "continuousBackupInformation", - type: { - name: "Composite", - className: "ContinuousBackupInformation", +export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NotebookWorkspaceConnectionInfoResult", + modelProperties: { + authToken: { + serializedName: "authToken", + readOnly: true, + type: { + name: "String", + }, + }, + notebookServerEndpoint: { + serializedName: "notebookServerEndpoint", + readOnly: true, + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const ContinuousBackupInformation: coreClient.CompositeMapper = { +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContinuousBackupInformation", + className: "PrivateEndpointConnectionListResult", modelProperties: { - latestRestorableTimestamp: { - serializedName: "latestRestorableTimestamp", + value: { + serializedName: "value", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + }, + }, }, }, }, }, }; -export const RestorableSqlDatabasesListResult: coreClient.CompositeMapper = { +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlDatabasesListResult", + className: "PrivateLinkResourceListResult", modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RestorableSqlDatabaseGetResult", + className: "PrivateLinkResource", }, }, }, @@ -5065,113 +5983,87 @@ export const RestorableSqlDatabasesListResult: coreClient.CompositeMapper = { }, }; -export const RestorableSqlDatabaseGetResult: coreClient.CompositeMapper = { +export const Permission: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlDatabaseGetResult", + className: "Permission", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, + dataActions: { + serializedName: "dataActions", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - resource: { - serializedName: "properties.resource", + notDataActions: { + serializedName: "notDataActions", type: { - name: "Composite", - className: "RestorableSqlDatabasePropertiesResource", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, }, }, }; -export const RestorableSqlDatabasePropertiesResource: coreClient.CompositeMapper = +export const SqlRoleDefinitionCreateUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlDatabasePropertiesResource", + className: "SqlRoleDefinitionCreateUpdateParameters", modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, - type: { - name: "String", - }, - }, - operationType: { - serializedName: "operationType", - readOnly: true, - type: { - name: "String", - }, - }, - canUndelete: { - serializedName: "canUndelete", - readOnly: true, - type: { - name: "String", - }, - }, - canUndeleteReason: { - serializedName: "canUndeleteReason", - readOnly: true, - type: { - name: "String", - }, - }, - eventTimestamp: { - serializedName: "eventTimestamp", - readOnly: true, + roleName: { + serializedName: "properties.roleName", type: { name: "String", }, }, - ownerId: { - serializedName: "ownerId", - readOnly: true, + type: { + serializedName: "properties.type", type: { - name: "String", + name: "Enum", + allowedValues: ["BuiltInRole", "CustomRole"], }, }, - ownerResourceId: { - serializedName: "ownerResourceId", - readOnly: true, + assignableScopes: { + serializedName: "properties.assignableScopes", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - database: { - serializedName: "database", + permissions: { + serializedName: "properties.permissions", type: { - name: "Composite", - className: "RestorableSqlDatabasePropertiesResourceDatabase", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Permission", + }, + }, }, }, }, }, }; -export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { +export const SqlRoleDefinitionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlContainersListResult", + className: "SqlRoleDefinitionListResult", modelProperties: { value: { serializedName: "value", @@ -5181,7 +6073,7 @@ export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RestorableSqlContainerGetResult", + className: "SqlRoleDefinitionGetResults", }, }, }, @@ -5190,113 +6082,38 @@ export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { }, }; -export const RestorableSqlContainerGetResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableSqlContainerGetResult", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "RestorableSqlContainerPropertiesResource", - }, - }, - }, - }, -}; - -export const RestorableSqlContainerPropertiesResource: coreClient.CompositeMapper = +export const SqlRoleAssignmentCreateUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlContainerPropertiesResource", + className: "SqlRoleAssignmentCreateUpdateParameters", modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, - type: { - name: "String", - }, - }, - operationType: { - serializedName: "operationType", - readOnly: true, - type: { - name: "String", - }, - }, - canUndelete: { - serializedName: "canUndelete", - readOnly: true, - type: { - name: "String", - }, - }, - canUndeleteReason: { - serializedName: "canUndeleteReason", - readOnly: true, - type: { - name: "String", - }, - }, - eventTimestamp: { - serializedName: "eventTimestamp", - readOnly: true, + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", type: { name: "String", }, }, - ownerId: { - serializedName: "ownerId", - readOnly: true, + scope: { + serializedName: "properties.scope", type: { name: "String", }, }, - ownerResourceId: { - serializedName: "ownerResourceId", - readOnly: true, + principalId: { + serializedName: "properties.principalId", type: { name: "String", }, }, - container: { - serializedName: "container", - type: { - name: "Composite", - className: "RestorableSqlContainerPropertiesResourceContainer", - }, - }, }, }, }; -export const RestorableSqlResourcesListResult: coreClient.CompositeMapper = { +export const SqlRoleAssignmentListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlResourcesListResult", + className: "SqlRoleAssignmentListResult", modelProperties: { value: { serializedName: "value", @@ -5306,7 +6123,7 @@ export const RestorableSqlResourcesListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RestorableSqlResourcesGetResult", + className: "SqlRoleAssignmentGetResults", }, }, }, @@ -5315,10 +6132,33 @@ export const RestorableSqlResourcesListResult: coreClient.CompositeMapper = { }, }; -export const RestorableSqlResourcesGetResult: coreClient.CompositeMapper = { +export const RestorableDatabaseAccountsListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableDatabaseAccountsListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableDatabaseAccountGetResult", + }, + }, + }, + }, + }, + }, + }; + +export const RestorableDatabaseAccountGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlResourcesGetResult", + className: "RestorableDatabaseAccountGetResult", modelProperties: { id: { serializedName: "id", @@ -5341,19 +6181,52 @@ export const RestorableSqlResourcesGetResult: coreClient.CompositeMapper = { name: "String", }, }, - databaseName: { - serializedName: "databaseName", + location: { + serializedName: "location", type: { name: "String", }, }, - collectionNames: { - serializedName: "collectionNames", + accountName: { + serializedName: "properties.accountName", + type: { + name: "String", + }, + }, + creationTime: { + serializedName: "properties.creationTime", + type: { + name: "DateTime", + }, + }, + oldestRestorableTime: { + serializedName: "properties.oldestRestorableTime", + type: { + name: "DateTime", + }, + }, + deletionTime: { + serializedName: "properties.deletionTime", + type: { + name: "DateTime", + }, + }, + apiType: { + serializedName: "properties.apiType", + readOnly: true, + type: { + name: "String", + }, + }, + restorableLocations: { + serializedName: "properties.restorableLocations", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "RestorableLocationResource", }, }, }, @@ -5362,85 +6235,167 @@ export const RestorableSqlResourcesGetResult: coreClient.CompositeMapper = { }, }; -export const RestorableMongodbDatabasesListResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableMongodbDatabasesListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableMongodbDatabaseGetResult", - }, - }, - }, - }, - }, - }, - }; - -export const RestorableMongodbDatabaseGetResult: coreClient.CompositeMapper = { +export const RestorableLocationResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbDatabaseGetResult", + className: "RestorableLocationResource", modelProperties: { - id: { - serializedName: "id", + locationName: { + serializedName: "locationName", readOnly: true, type: { name: "String", }, }, - name: { - serializedName: "name", + regionalDatabaseAccountInstanceId: { + serializedName: "regionalDatabaseAccountInstanceId", readOnly: true, type: { name: "String", }, }, - type: { - serializedName: "type", + creationTime: { + serializedName: "creationTime", readOnly: true, type: { - name: "String", + name: "DateTime", }, }, - resource: { - serializedName: "properties.resource", + deletionTime: { + serializedName: "deletionTime", + readOnly: true, type: { - name: "Composite", - className: "RestorableMongodbDatabasePropertiesResource", + name: "DateTime", }, }, }, }, }; -export const RestorableMongodbDatabasePropertiesResource: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableMongodbDatabasePropertiesResource", - modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, - type: { - name: "String", - }, +export const ContinuousBackupRestoreLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContinuousBackupRestoreLocation", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", }, - operationType: { - serializedName: "operationType", - readOnly: true, - type: { - name: "String", - }, + }, + }, + }, +}; + +export const BackupInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupInformation", + modelProperties: { + continuousBackupInformation: { + serializedName: "continuousBackupInformation", + type: { + name: "Composite", + className: "ContinuousBackupInformation", + }, + }, + }, + }, +}; + +export const ContinuousBackupInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContinuousBackupInformation", + modelProperties: { + latestRestorableTimestamp: { + serializedName: "latestRestorableTimestamp", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RestorableSqlDatabasesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableSqlDatabasesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableSqlDatabaseGetResult", + }, + }, + }, + }, + }, + }, +}; + +export const RestorableSqlDatabaseGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableSqlDatabaseGetResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RestorableSqlDatabasePropertiesResource", + }, + }, + }, + }, +}; + +export const RestorableSqlDatabasePropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableSqlDatabasePropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String", + }, + }, + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + name: "String", + }, }, canUndelete: { serializedName: "canUndelete", @@ -5477,76 +6432,81 @@ export const RestorableMongodbDatabasePropertiesResource: coreClient.CompositeMa name: "String", }, }, + database: { + serializedName: "database", + type: { + name: "Composite", + className: "RestorableSqlDatabasePropertiesResourceDatabase", + }, + }, }, }, }; -export const RestorableMongodbCollectionsListResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableMongodbCollectionsListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableMongodbCollectionGetResult", - }, +export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableSqlContainersListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableSqlContainerGetResult", }, }, }, }, }, - }; + }, +}; -export const RestorableMongodbCollectionGetResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableMongodbCollectionGetResult", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, +export const RestorableSqlContainerGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableSqlContainerGetResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", }, + }, + type: { + serializedName: "type", + readOnly: true, type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, + name: "String", }, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "RestorableMongodbCollectionPropertiesResource", - }, + }, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RestorableSqlContainerPropertiesResource", }, }, }, - }; + }, +}; -export const RestorableMongodbCollectionPropertiesResource: coreClient.CompositeMapper = +export const RestorableSqlContainerPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbCollectionPropertiesResource", + className: "RestorableSqlContainerPropertiesResource", modelProperties: { rid: { serializedName: "_rid", @@ -5597,37 +6557,43 @@ export const RestorableMongodbCollectionPropertiesResource: coreClient.Composite name: "String", }, }, + container: { + serializedName: "container", + type: { + name: "Composite", + className: "RestorableSqlContainerPropertiesResourceContainer", + }, + }, }, }, }; -export const RestorableMongodbResourcesListResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableMongodbResourcesListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableMongodbResourcesGetResult", - }, +export const RestorableSqlResourcesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableSqlResourcesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableSqlResourcesGetResult", }, }, }, }, }, - }; + }, +}; -export const RestorableMongodbResourcesGetResult: coreClient.CompositeMapper = { +export const RestorableSqlResourcesGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbResourcesGetResult", + className: "RestorableSqlResourcesGetResult", modelProperties: { id: { serializedName: "id", @@ -5671,11 +6637,11 @@ export const RestorableMongodbResourcesGetResult: coreClient.CompositeMapper = { }, }; -export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = +export const RestorableMongodbDatabasesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinDatabasesListResult", + className: "RestorableMongodbDatabasesListResult", modelProperties: { value: { serializedName: "value", @@ -5685,7 +6651,7 @@ export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "RestorableGremlinDatabaseGetResult", + className: "RestorableMongodbDatabaseGetResult", }, }, }, @@ -5694,10 +6660,10 @@ export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = }, }; -export const RestorableGremlinDatabaseGetResult: coreClient.CompositeMapper = { +export const RestorableMongodbDatabaseGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinDatabaseGetResult", + className: "RestorableMongodbDatabaseGetResult", modelProperties: { id: { serializedName: "id", @@ -5724,18 +6690,18 @@ export const RestorableGremlinDatabaseGetResult: coreClient.CompositeMapper = { serializedName: "properties.resource", type: { name: "Composite", - className: "RestorableGremlinDatabasePropertiesResource", + className: "RestorableMongodbDatabasePropertiesResource", }, }, }, }, }; -export const RestorableGremlinDatabasePropertiesResource: coreClient.CompositeMapper = +export const RestorableMongodbDatabasePropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinDatabasePropertiesResource", + className: "RestorableMongodbDatabasePropertiesResource", modelProperties: { rid: { serializedName: "_rid", @@ -5790,70 +6756,72 @@ export const RestorableGremlinDatabasePropertiesResource: coreClient.CompositeMa }, }; -export const RestorableGremlinGraphsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableGremlinGraphsListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableGremlinGraphGetResult", +export const RestorableMongodbCollectionsListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableMongodbCollectionsListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableMongodbCollectionGetResult", + }, }, }, }, }, }, - }, -}; + }; -export const RestorableGremlinGraphGetResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableGremlinGraphGetResult", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", +export const RestorableMongodbCollectionGetResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableMongodbCollectionGetResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, }, - }, - type: { - serializedName: "type", - readOnly: true, type: { - name: "String", + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, }, - }, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "RestorableGremlinGraphPropertiesResource", + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RestorableMongodbCollectionPropertiesResource", + }, }, }, }, - }, -}; + }; -export const RestorableGremlinGraphPropertiesResource: coreClient.CompositeMapper = +export const RestorableMongodbCollectionPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinGraphPropertiesResource", + className: "RestorableMongodbCollectionPropertiesResource", modelProperties: { rid: { serializedName: "_rid", @@ -5908,11 +6876,11 @@ export const RestorableGremlinGraphPropertiesResource: coreClient.CompositeMappe }, }; -export const RestorableGremlinResourcesListResult: coreClient.CompositeMapper = +export const RestorableMongodbResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinResourcesListResult", + className: "RestorableMongodbResourcesListResult", modelProperties: { value: { serializedName: "value", @@ -5922,7 +6890,7 @@ export const RestorableGremlinResourcesListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "RestorableGremlinResourcesGetResult", + className: "RestorableMongodbResourcesGetResult", }, }, }, @@ -5931,10 +6899,10 @@ export const RestorableGremlinResourcesListResult: coreClient.CompositeMapper = }, }; -export const RestorableGremlinResourcesGetResult: coreClient.CompositeMapper = { +export const RestorableMongodbResourcesGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinResourcesGetResult", + className: "RestorableMongodbResourcesGetResult", modelProperties: { id: { serializedName: "id", @@ -5963,8 +6931,8 @@ export const RestorableGremlinResourcesGetResult: coreClient.CompositeMapper = { name: "String", }, }, - graphNames: { - serializedName: "graphNames", + collectionNames: { + serializedName: "collectionNames", type: { name: "Sequence", element: { @@ -5978,32 +6946,33 @@ export const RestorableGremlinResourcesGetResult: coreClient.CompositeMapper = { }, }; -export const RestorableTablesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableTablesListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableTableGetResult", +export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableGremlinDatabasesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableGremlinDatabaseGetResult", + }, }, }, }, }, }, - }, -}; + }; -export const RestorableTableGetResult: coreClient.CompositeMapper = { +export const RestorableGremlinDatabaseGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableTableGetResult", + className: "RestorableGremlinDatabaseGetResult", modelProperties: { id: { serializedName: "id", @@ -6030,49 +6999,355 @@ export const RestorableTableGetResult: coreClient.CompositeMapper = { serializedName: "properties.resource", type: { name: "Composite", - className: "RestorableTablePropertiesResource", + className: "RestorableGremlinDatabasePropertiesResource", }, }, }, }, }; -export const RestorableTablePropertiesResource: coreClient.CompositeMapper = { +export const RestorableGremlinDatabasePropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableGremlinDatabasePropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String", + }, + }, + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + name: "String", + }, + }, + canUndelete: { + serializedName: "canUndelete", + readOnly: true, + type: { + name: "String", + }, + }, + canUndeleteReason: { + serializedName: "canUndeleteReason", + readOnly: true, + type: { + name: "String", + }, + }, + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, + type: { + name: "String", + }, + }, + ownerId: { + serializedName: "ownerId", + readOnly: true, + type: { + name: "String", + }, + }, + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const RestorableGremlinGraphsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableTablePropertiesResource", + className: "RestorableGremlinGraphsListResult", modelProperties: { - rid: { - serializedName: "_rid", + value: { + serializedName: "value", readOnly: true, type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableGremlinGraphGetResult", + }, + }, }, }, - operationType: { - serializedName: "operationType", + }, + }, +}; + +export const RestorableGremlinGraphGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableGremlinGraphGetResult", + modelProperties: { + id: { + serializedName: "id", readOnly: true, type: { name: "String", }, }, - canUndelete: { - serializedName: "canUndelete", + name: { + serializedName: "name", readOnly: true, type: { name: "String", }, }, - canUndeleteReason: { - serializedName: "canUndeleteReason", + type: { + serializedName: "type", readOnly: true, type: { name: "String", }, }, - eventTimestamp: { - serializedName: "eventTimestamp", - readOnly: true, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RestorableGremlinGraphPropertiesResource", + }, + }, + }, + }, +}; + +export const RestorableGremlinGraphPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableGremlinGraphPropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String", + }, + }, + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + name: "String", + }, + }, + canUndelete: { + serializedName: "canUndelete", + readOnly: true, + type: { + name: "String", + }, + }, + canUndeleteReason: { + serializedName: "canUndeleteReason", + readOnly: true, + type: { + name: "String", + }, + }, + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, + type: { + name: "String", + }, + }, + ownerId: { + serializedName: "ownerId", + readOnly: true, + type: { + name: "String", + }, + }, + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const RestorableGremlinResourcesListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableGremlinResourcesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableGremlinResourcesGetResult", + }, + }, + }, + }, + }, + }, + }; + +export const RestorableGremlinResourcesGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableGremlinResourcesGetResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + databaseName: { + serializedName: "databaseName", + type: { + name: "String", + }, + }, + graphNames: { + serializedName: "graphNames", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const RestorableTablesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableTablesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableTableGetResult", + }, + }, + }, + }, + }, + }, +}; + +export const RestorableTableGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableTableGetResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RestorableTablePropertiesResource", + }, + }, + }, + }, +}; + +export const RestorableTablePropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableTablePropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String", + }, + }, + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + name: "String", + }, + }, + canUndelete: { + serializedName: "canUndelete", + readOnly: true, + type: { + name: "String", + }, + }, + canUndeleteReason: { + serializedName: "canUndeleteReason", + readOnly: true, + type: { + name: "String", + }, + }, + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, type: { name: "String", }, @@ -6275,21 +7550,195 @@ export const ServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = }, }; -export const PeriodicModeProperties: coreClient.CompositeMapper = { +export const ThroughputPoolsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PeriodicModeProperties", + className: "ThroughputPoolsListResult", modelProperties: { - backupIntervalInMinutes: { - constraints: { - InclusiveMinimum: 0, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ThroughputPoolResource", + }, + }, }, - serializedName: "backupIntervalInMinutes", + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Number", + name: "String", }, }, - backupRetentionIntervalInHours: { + }, + }, +}; + +export const ThroughputPoolUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolUpdate", + modelProperties: { + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String", + }, + }, + maxThroughput: { + serializedName: "properties.maxThroughput", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const ThroughputPoolAccountsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolAccountsListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ThroughputPoolAccountResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PermissionAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PermissionAutoGenerated", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + dataActions: { + serializedName: "dataActions", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + notDataActions: { + serializedName: "notDataActions", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const TableRoleDefinitionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableRoleDefinitionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TableRoleDefinitionResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TableRoleAssignmentListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableRoleAssignmentListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TableRoleAssignmentResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PeriodicModeProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PeriodicModeProperties", + modelProperties: { + backupIntervalInMinutes: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "backupIntervalInMinutes", + type: { + name: "Number", + }, + }, + backupRetentionIntervalInHours: { constraints: { InclusiveMinimum: 0, }, @@ -6418,6 +7867,35 @@ export const MaterializedViewsBuilderServiceResource: coreClient.CompositeMapper }, }; +export const ThroughputPoolAccountCreateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ThroughputPoolAccountCreateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + accountResourceIdentifier: { + serializedName: "properties.accountResourceIdentifier", + type: { + name: "String", + }, + }, + accountLocation: { + serializedName: "properties.accountLocation", + type: { + name: "String", + }, + }, + }, + }, + }; + export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6428,6 +7906,30 @@ export const ProxyResource: coreClient.CompositeMapper = { }, }; +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const RestoreParameters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6475,6 +7977,12 @@ export const RestoreParameters: coreClient.CompositeMapper = { }, }, }, + sourceBackupLocation: { + serializedName: "sourceBackupLocation", + type: { + name: "String", + }, + }, }, }, }; @@ -6541,13 +8049,6 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { name: "String", }, }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, systemData: { serializedName: "systemData", type: { @@ -6823,6 +8324,13 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { }, }, }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings", + }, + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -6836,6 +8344,25 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { className: "Capacity", }, }, + capacityMode: { + serializedName: "properties.capacityMode", + type: { + name: "String", + }, + }, + capacityModeChangeTransitionState: { + serializedName: "properties.capacityModeChangeTransitionState", + type: { + name: "Composite", + className: "CapacityModeChangeTransitionState", + }, + }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean", + }, + }, keysMetadata: { serializedName: "properties.keysMetadata", type: { @@ -6849,20 +8376,32 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { name: "Boolean", }, }, + enableBurstCapacity: { + serializedName: "properties.enableBurstCapacity", + type: { + name: "Boolean", + }, + }, minimalTlsVersion: { serializedName: "properties.minimalTlsVersion", type: { name: "String", }, }, - enableBurstCapacity: { - serializedName: "properties.enableBurstCapacity", + customerManagedKeyStatus: { + serializedName: "properties.customerManagedKeyStatus", + type: { + name: "String", + }, + }, + enablePriorityBasedExecution: { + serializedName: "properties.enablePriorityBasedExecution", type: { name: "Boolean", }, }, - customerManagedKeyStatus: { - serializedName: "properties.customerManagedKeyStatus", + defaultPriorityLevel: { + serializedName: "properties.defaultPriorityLevel", type: { name: "String", }, @@ -6890,13 +8429,6 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = name: "String", }, }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, consistencyPolicy: { serializedName: "properties.consistencyPolicy", type: { @@ -7085,6 +8617,13 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = }, }, }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings", + }, + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -7105,6 +8644,18 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = className: "Capacity", }, }, + capacityMode: { + serializedName: "properties.capacityMode", + type: { + name: "String", + }, + }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean", + }, + }, keysMetadata: { serializedName: "properties.keysMetadata", type: { @@ -7118,20 +8669,32 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = name: "Boolean", }, }, + enableBurstCapacity: { + serializedName: "properties.enableBurstCapacity", + type: { + name: "Boolean", + }, + }, minimalTlsVersion: { serializedName: "properties.minimalTlsVersion", type: { name: "String", }, }, - enableBurstCapacity: { - serializedName: "properties.enableBurstCapacity", + customerManagedKeyStatus: { + serializedName: "properties.customerManagedKeyStatus", + type: { + name: "String", + }, + }, + enablePriorityBasedExecution: { + serializedName: "properties.enablePriorityBasedExecution", type: { name: "Boolean", }, }, - customerManagedKeyStatus: { - serializedName: "properties.customerManagedKeyStatus", + defaultPriorityLevel: { + serializedName: "properties.defaultPriorityLevel", type: { name: "String", }, @@ -7146,6 +8709,54 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = }, }; +export const GraphResourceGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GraphResourceGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "GraphResourceGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const GraphResourceCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GraphResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, +}; + export const SqlDatabaseGetResults: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7276,6 +8887,59 @@ export const SqlContainerCreateUpdateParameters: coreClient.CompositeMapper = { }, }; +export const RetrieveThroughputParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RetrieveThroughputParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RetrieveThroughputPropertiesResource", + }, + }, + }, + }, +}; + +export const PhysicalPartitionThroughputInfoResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResult", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: + "PhysicalPartitionThroughputInfoResultPropertiesResource", + }, + }, + }, + }, + }; + +export const RedistributeThroughputParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedistributeThroughputParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RedistributeThroughputPropertiesResource", + }, + }, + }, + }, +}; + export const SqlStoredProcedureGetResults: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7742,6 +9406,54 @@ export const GremlinGraphCreateUpdateParameters: coreClient.CompositeMapper = { }, }; +export const CassandraViewGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraViewGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CassandraViewGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const CassandraViewCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraViewResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, +}; + export const DatabaseAccountListKeysResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7873,6 +9585,128 @@ export const PartitionUsage: coreClient.CompositeMapper = { }, }; +export const GraphResourceGetPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceGetPropertiesResource", + modelProperties: { + ...GraphResource.type.modelProperties, + }, + }, +}; + +export const GraphResourceGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const SqlDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDatabaseGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const SqlContainerGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const MongoDBDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoDBDatabaseGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const MongoDBCollectionGetPropertiesOptions: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "MongoDBCollectionGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, + }; + +export const TableGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const CassandraKeyspaceGetPropertiesOptions: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CassandraKeyspaceGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, + }; + +export const CassandraTableGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraTableGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const GremlinDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinDatabaseGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const GremlinGraphGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinGraphGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const CassandraViewGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + export const SqlDatabaseGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7941,17 +9775,6 @@ export const ThroughputSettingsGetPropertiesResource: coreClient.CompositeMapper }, }; -export const SqlContainerGetPropertiesResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlContainerGetPropertiesResource", - modelProperties: { - ...SqlContainerResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, - }, - }, -}; - export const ClientEncryptionKeyGetPropertiesResource: coreClient.CompositeMapper = { type: { @@ -7964,6 +9787,17 @@ export const ClientEncryptionKeyGetPropertiesResource: coreClient.CompositeMappe }, }; +export const SqlContainerGetPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerGetPropertiesResource", + modelProperties: { + ...SqlContainerResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, +}; + export const SqlStoredProcedureGetPropertiesResource: coreClient.CompositeMapper = { type: { @@ -8080,6 +9914,17 @@ export const GremlinGraphGetPropertiesResource: coreClient.CompositeMapper = { }, }; +export const CassandraViewGetPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewGetPropertiesResource", + modelProperties: { + ...CassandraViewResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, +}; + export const RestorableSqlContainerPropertiesResourceContainer: coreClient.CompositeMapper = { type: { @@ -8099,126 +9944,139 @@ export const RestorableSqlContainerPropertiesResourceContainer: coreClient.Compo }, }; -export const SqlDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlDatabaseGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const SqlContainerGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlContainerGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const MongoDBDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MongoDBDatabaseGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const MongoDBCollectionGetPropertiesOptions: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "MongoDBCollectionGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, - }; - -export const TableGetPropertiesOptions: coreClient.CompositeMapper = { +export const ClientEncryptionKeyGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableGetPropertiesOptions", + className: "ClientEncryptionKeyGetResults", modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const CassandraKeyspaceGetPropertiesOptions: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "CassandraKeyspaceGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, + ...ARMProxyResource.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "ClientEncryptionKeyGetPropertiesResource", + }, }, }, - }; - -export const CassandraTableGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CassandraTableGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const GremlinDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GremlinDatabaseGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, }, }; -export const GremlinGraphGetPropertiesOptions: coreClient.CompositeMapper = { +export const LocationGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinGraphGetPropertiesOptions", + className: "LocationGetResult", modelProperties: { - ...OptionsResource.type.modelProperties, + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "LocationProperties", + }, + }, }, }, }; -export const ClientEncryptionKeyGetResults: coreClient.CompositeMapper = { +export const CreateJobRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClientEncryptionKeyGetResults", + className: "CreateJobRequest", modelProperties: { ...ARMProxyResource.type.modelProperties, - resource: { - serializedName: "properties.resource", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "ClientEncryptionKeyGetPropertiesResource", + className: "DataTransferJobProperties", }, }, }, }, }; -export const LocationGetResult: coreClient.CompositeMapper = { +export const DataTransferJobGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LocationGetResult", + className: "DataTransferJobGetResults", modelProperties: { ...ARMProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + jobName: { + serializedName: "properties.jobName", + readOnly: true, + type: { + name: "String", + }, + }, + source: { + serializedName: "properties.source", type: { name: "Composite", - className: "LocationProperties", + className: "DataTransferDataSourceSink", + }, + }, + destination: { + serializedName: "properties.destination", + type: { + name: "Composite", + className: "DataTransferDataSourceSink", + }, + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String", + }, + }, + processedCount: { + serializedName: "properties.processedCount", + readOnly: true, + type: { + name: "Number", + }, + }, + totalCount: { + serializedName: "properties.totalCount", + readOnly: true, + type: { + name: "Number", + }, + }, + lastUpdatedUtcTime: { + serializedName: "properties.lastUpdatedUtcTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + workerCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "properties.workerCount", + type: { + name: "Number", + }, + }, + error: { + serializedName: "properties.error", + type: { + name: "Composite", + className: "ErrorResponse", + }, + }, + duration: { + serializedName: "properties.duration", + readOnly: true, + type: { + name: "String", + }, + }, + mode: { + serializedName: "properties.mode", + type: { + name: "String", }, }, }, @@ -8514,87 +10372,189 @@ export const ServiceResource: coreClient.CompositeMapper = { }, }; -export const ClusterResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterResource", - modelProperties: { - ...ManagedCassandraARMResourceProperties.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterResourceProperties", - }, +export const PhysicalPartitionThroughputInfoResultPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResultPropertiesResource", + modelProperties: { + ...PhysicalPartitionThroughputInfoProperties.type.modelProperties, }, }, - }, -}; + }; -export const DataTransferServiceResourceProperties: coreClient.CompositeMapper = +export const BaseCosmosDataTransferDataSourceSink: coreClient.CompositeMapper = { - serializedName: "DataTransfer", + serializedName: "BaseCosmosDataTransferDataSourceSink", type: { name: "Composite", - className: "DataTransferServiceResourceProperties", - uberParent: "ServiceResourceProperties", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: - ServiceResourceProperties.type.polymorphicDiscriminator, + className: "BaseCosmosDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: { + serializedName: "component", + clientName: "component", + }, modelProperties: { - ...ServiceResourceProperties.type.modelProperties, - locations: { - serializedName: "locations", - readOnly: true, + ...DataTransferDataSourceSink.type.modelProperties, + remoteAccountName: { + serializedName: "remoteAccountName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataTransferRegionalServiceResource", - }, - }, + name: "String", }, }, }, }, }; -export const SqlDedicatedGatewayServiceResourceProperties: coreClient.CompositeMapper = +export const CosmosMongoVCoreDataTransferDataSourceSink: coreClient.CompositeMapper = { - serializedName: "SqlDedicatedGateway", + serializedName: "CosmosDBMongoVCore", type: { name: "Composite", - className: "SqlDedicatedGatewayServiceResourceProperties", - uberParent: "ServiceResourceProperties", - additionalProperties: { type: { name: "Object" } }, + className: "CosmosMongoVCoreDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", polymorphicDiscriminator: - ServiceResourceProperties.type.polymorphicDiscriminator, + DataTransferDataSourceSink.type.polymorphicDiscriminator, modelProperties: { - ...ServiceResourceProperties.type.modelProperties, - sqlDedicatedGatewayEndpoint: { - serializedName: "sqlDedicatedGatewayEndpoint", + ...DataTransferDataSourceSink.type.modelProperties, + databaseName: { + serializedName: "databaseName", + required: true, type: { name: "String", }, }, - dedicatedGatewayType: { - serializedName: "dedicatedGatewayType", + collectionName: { + serializedName: "collectionName", + required: true, type: { name: "String", }, }, - locations: { - serializedName: "locations", - readOnly: true, + hostName: { + serializedName: "hostName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SqlDedicatedGatewayRegionalServiceResource", - }, - }, + name: "String", + }, + }, + connectionStringKeyVaultUri: { + serializedName: "connectionStringKeyVaultUri", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const AzureBlobDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "AzureBlobStorage", + type: { + name: "Composite", + className: "AzureBlobDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: + DataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...DataTransferDataSourceSink.type.modelProperties, + containerName: { + serializedName: "containerName", + required: true, + type: { + name: "String", + }, + }, + endpointUrl: { + serializedName: "endpointUrl", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ClusterResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterResource", + modelProperties: { + ...ManagedCassandraARMResourceProperties.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ClusterResourceProperties", + }, + }, + }, + }, +}; + +export const DataTransferServiceResourceProperties: coreClient.CompositeMapper = + { + serializedName: "DataTransfer", + type: { + name: "Composite", + className: "DataTransferServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceProperties.type.modelProperties, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataTransferRegionalServiceResource", + }, + }, + }, + }, + }, + }, + }; + +export const SqlDedicatedGatewayServiceResourceProperties: coreClient.CompositeMapper = + { + serializedName: "SqlDedicatedGateway", + type: { + name: "Composite", + className: "SqlDedicatedGatewayServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceProperties.type.modelProperties, + sqlDedicatedGatewayEndpoint: { + serializedName: "sqlDedicatedGatewayEndpoint", + type: { + name: "String", + }, + }, + dedicatedGatewayType: { + serializedName: "dedicatedGatewayType", + type: { + name: "String", + }, + }, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlDedicatedGatewayRegionalServiceResource", + }, + }, }, }, }, @@ -8619,80 +10579,954 @@ export const GraphAPIComputeServiceResourceProperties: coreClient.CompositeMappe name: "String", }, }, - locations: { - serializedName: "locations", - readOnly: true, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GraphAPIComputeRegionalServiceResource", + }, + }, + }, + }, + }, + }, + }; + +export const MaterializedViewsBuilderServiceResourceProperties: coreClient.CompositeMapper = + { + serializedName: "MaterializedViewsBuilder", + type: { + name: "Composite", + className: "MaterializedViewsBuilderServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceProperties.type.modelProperties, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaterializedViewsBuilderRegionalServiceResource", + }, + }, + }, + }, + }, + }, + }; + +export const DataTransferServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = + { + serializedName: "DataTransfer", + type: { + name: "Composite", + className: "DataTransferServiceResourceCreateUpdateProperties", + uberParent: "ServiceResourceCreateUpdateProperties", + polymorphicDiscriminator: + ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceCreateUpdateProperties.type.modelProperties, + }, + }, + }; + +export const SqlDedicatedGatewayServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = + { + serializedName: "SqlDedicatedGateway", + type: { + name: "Composite", + className: "SqlDedicatedGatewayServiceResourceCreateUpdateProperties", + uberParent: "ServiceResourceCreateUpdateProperties", + polymorphicDiscriminator: + ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceCreateUpdateProperties.type.modelProperties, + dedicatedGatewayType: { + serializedName: "dedicatedGatewayType", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const GraphAPIComputeServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = + { + serializedName: "GraphAPICompute", + type: { + name: "Composite", + className: "GraphAPIComputeServiceResourceCreateUpdateProperties", + uberParent: "ServiceResourceCreateUpdateProperties", + polymorphicDiscriminator: + ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceCreateUpdateProperties.type.modelProperties, + }, + }, + }; + +export const MaterializedViewsBuilderServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = + { + serializedName: "MaterializedViewsBuilder", + type: { + name: "Composite", + className: + "MaterializedViewsBuilderServiceResourceCreateUpdateProperties", + uberParent: "ServiceResourceCreateUpdateProperties", + polymorphicDiscriminator: + ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceCreateUpdateProperties.type.modelProperties, + }, + }, + }; + +export const DataTransferRegionalServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferRegionalServiceResource", + modelProperties: { + ...RegionalServiceResource.type.modelProperties, + }, + }, +}; + +export const SqlDedicatedGatewayRegionalServiceResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlDedicatedGatewayRegionalServiceResource", + modelProperties: { + ...RegionalServiceResource.type.modelProperties, + sqlDedicatedGatewayEndpoint: { + serializedName: "sqlDedicatedGatewayEndpoint", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const GraphAPIComputeRegionalServiceResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GraphAPIComputeRegionalServiceResource", + modelProperties: { + ...RegionalServiceResource.type.modelProperties, + graphApiComputeEndpoint: { + serializedName: "graphApiComputeEndpoint", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const MaterializedViewsBuilderRegionalServiceResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "MaterializedViewsBuilderRegionalServiceResource", + modelProperties: { + ...RegionalServiceResource.type.modelProperties, + }, + }, + }; + +export const ChaosFaultResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ChaosFaultResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + action: { + serializedName: "properties.action", + type: { + name: "Enum", + allowedValues: ["Enable", "Disable"], + }, + }, + region: { + serializedName: "properties.region", + type: { + name: "String", + }, + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String", + }, + }, + containerName: { + serializedName: "properties.containerName", + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty", + }, + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty", + }, + }, + groupId: { + serializedName: "properties.groupId", + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const NetworkSecurityPerimeterConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfiguration", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationProperties", + }, + }, + }, + }, + }; + +export const ThroughputPoolAccountResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolAccountResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String", + }, + }, + accountResourceIdentifier: { + serializedName: "properties.accountResourceIdentifier", + type: { + name: "String", + }, + }, + accountLocation: { + serializedName: "properties.accountLocation", + type: { + name: "String", + }, + }, + accountInstanceId: { + serializedName: "properties.accountInstanceId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TableRoleDefinitionResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableRoleDefinitionResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + type: { + name: "String", + }, + }, + roleName: { + serializedName: "properties.roleName", + type: { + name: "String", + }, + }, + typePropertiesType: { + serializedName: "properties.type", + type: { + name: "Enum", + allowedValues: ["BuiltInRole", "CustomRole"], + }, + }, + assignableScopes: { + serializedName: "properties.assignableScopes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + permissions: { + serializedName: "properties.permissions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PermissionAutoGenerated", + }, + }, + }, + }, + }, + }, +}; + +export const TableRoleAssignmentResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableRoleAssignmentResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", + type: { + name: "String", + }, + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String", + }, + }, + principalId: { + serializedName: "properties.principalId", + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ThroughputPoolResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String", + }, + }, + maxThroughput: { + serializedName: "properties.maxThroughput", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const CosmosCassandraDataTransferDataSourceSink: coreClient.CompositeMapper = + { + serializedName: "CosmosDBCassandra", + type: { + name: "Composite", + className: "CosmosCassandraDataTransferDataSourceSink", + uberParent: "BaseCosmosDataTransferDataSourceSink", + polymorphicDiscriminator: + BaseCosmosDataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...BaseCosmosDataTransferDataSourceSink.type.modelProperties, + keyspaceName: { + serializedName: "keyspaceName", + required: true, + type: { + name: "String", + }, + }, + tableName: { + serializedName: "tableName", + required: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const CosmosMongoDataTransferDataSourceSink: coreClient.CompositeMapper = + { + serializedName: "CosmosDBMongo", + type: { + name: "Composite", + className: "CosmosMongoDataTransferDataSourceSink", + uberParent: "BaseCosmosDataTransferDataSourceSink", + polymorphicDiscriminator: + BaseCosmosDataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...BaseCosmosDataTransferDataSourceSink.type.modelProperties, + databaseName: { + serializedName: "databaseName", + required: true, + type: { + name: "String", + }, + }, + collectionName: { + serializedName: "collectionName", + required: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const CosmosSqlDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "CosmosDBSql", + type: { + name: "Composite", + className: "CosmosSqlDataTransferDataSourceSink", + uberParent: "BaseCosmosDataTransferDataSourceSink", + polymorphicDiscriminator: + BaseCosmosDataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...BaseCosmosDataTransferDataSourceSink.type.modelProperties, + databaseName: { + serializedName: "databaseName", + required: true, + type: { + name: "String", + }, + }, + containerName: { + serializedName: "containerName", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DatabaseAccountsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAccountsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DatabaseAccountsFailoverPriorityChangeHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DatabaseAccountsFailoverPriorityChangeHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const DatabaseAccountsOfflineRegionHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DatabaseAccountsOfflineRegionHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const DatabaseAccountsOnlineRegionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAccountsOnlineRegionHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DatabaseAccountsRegenerateKeyHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DatabaseAccountsRegenerateKeyHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const GraphResourcesCreateUpdateGraphHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GraphResourcesCreateUpdateGraphHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const GraphResourcesDeleteGraphResourceHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GraphResourcesDeleteGraphResourceHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesCreateUpdateSqlDatabaseHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesCreateUpdateSqlDatabaseHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesDeleteSqlDatabaseHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesDeleteSqlDatabaseHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesUpdateSqlDatabaseThroughputHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesUpdateSqlDatabaseThroughputHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesCreateUpdateClientEncryptionKeyHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesCreateUpdateClientEncryptionKeyHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesCreateUpdateSqlContainerHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesCreateUpdateSqlContainerHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesDeleteSqlContainerHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesDeleteSqlContainerHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesSqlDatabasePartitionMergeHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesSqlDatabasePartitionMergeHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesListSqlContainerPartitionMergeHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesListSqlContainerPartitionMergeHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesUpdateSqlContainerThroughputHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesUpdateSqlContainerThroughputHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GraphAPIComputeRegionalServiceResource", - }, - }, + name: "String", }, }, }, }, }; -export const MaterializedViewsBuilderServiceResourceProperties: coreClient.CompositeMapper = +export const SqlResourcesMigrateSqlContainerToAutoscaleHeaders: coreClient.CompositeMapper = { - serializedName: "MaterializedViewsBuilder", type: { name: "Composite", - className: "MaterializedViewsBuilderServiceResourceProperties", - uberParent: "ServiceResourceProperties", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: - ServiceResourceProperties.type.polymorphicDiscriminator, + className: "SqlResourcesMigrateSqlContainerToAutoscaleHeaders", modelProperties: { - ...ServiceResourceProperties.type.modelProperties, - locations: { - serializedName: "locations", - readOnly: true, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MaterializedViewsBuilderRegionalServiceResource", - }, - }, + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", }, }, }, }, }; -export const DataTransferServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = +export const SqlResourcesMigrateSqlContainerToManualThroughputHeaders: coreClient.CompositeMapper = { - serializedName: "DataTransfer", type: { name: "Composite", - className: "DataTransferServiceResourceCreateUpdateProperties", - uberParent: "ServiceResourceCreateUpdateProperties", - polymorphicDiscriminator: - ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + className: "SqlResourcesMigrateSqlContainerToManualThroughputHeaders", modelProperties: { - ...ServiceResourceCreateUpdateProperties.type.modelProperties, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, }, }, }; -export const SqlDedicatedGatewayServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = +export const SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders: coreClient.CompositeMapper = { - serializedName: "SqlDedicatedGateway", type: { name: "Composite", - className: "SqlDedicatedGatewayServiceResourceCreateUpdateProperties", - uberParent: "ServiceResourceCreateUpdateProperties", - polymorphicDiscriminator: - ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + className: "SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders", modelProperties: { - ...ServiceResourceCreateUpdateProperties.type.modelProperties, - dedicatedGatewayType: { - serializedName: "dedicatedGatewayType", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", type: { name: "String", }, @@ -8701,57 +11535,65 @@ export const SqlDedicatedGatewayServiceResourceCreateUpdateProperties: coreClien }, }; -export const GraphAPIComputeServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = +export const SqlResourcesSqlDatabaseRedistributeThroughputHeaders: coreClient.CompositeMapper = { - serializedName: "GraphAPICompute", type: { name: "Composite", - className: "GraphAPIComputeServiceResourceCreateUpdateProperties", - uberParent: "ServiceResourceCreateUpdateProperties", - polymorphicDiscriminator: - ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + className: "SqlResourcesSqlDatabaseRedistributeThroughputHeaders", modelProperties: { - ...ServiceResourceCreateUpdateProperties.type.modelProperties, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, }, }, }; -export const MaterializedViewsBuilderServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = +export const SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders: coreClient.CompositeMapper = { - serializedName: "MaterializedViewsBuilder", type: { name: "Composite", className: - "MaterializedViewsBuilderServiceResourceCreateUpdateProperties", - uberParent: "ServiceResourceCreateUpdateProperties", - polymorphicDiscriminator: - ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + "SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders", modelProperties: { - ...ServiceResourceCreateUpdateProperties.type.modelProperties, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, }, }, }; -export const DataTransferRegionalServiceResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataTransferRegionalServiceResource", - modelProperties: { - ...RegionalServiceResource.type.modelProperties, - }, - }, -}; - -export const SqlDedicatedGatewayRegionalServiceResource: coreClient.CompositeMapper = +export const SqlResourcesSqlContainerRedistributeThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDedicatedGatewayRegionalServiceResource", + className: "SqlResourcesSqlContainerRedistributeThroughputHeaders", modelProperties: { - ...RegionalServiceResource.type.modelProperties, - sqlDedicatedGatewayEndpoint: { - serializedName: "sqlDedicatedGatewayEndpoint", - readOnly: true, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", type: { name: "String", }, @@ -8760,16 +11602,20 @@ export const SqlDedicatedGatewayRegionalServiceResource: coreClient.CompositeMap }, }; -export const GraphAPIComputeRegionalServiceResource: coreClient.CompositeMapper = +export const SqlResourcesCreateUpdateSqlStoredProcedureHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GraphAPIComputeRegionalServiceResource", + className: "SqlResourcesCreateUpdateSqlStoredProcedureHeaders", modelProperties: { - ...RegionalServiceResource.type.modelProperties, - graphApiComputeEndpoint: { - serializedName: "graphApiComputeEndpoint", - readOnly: true, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", type: { name: "String", }, @@ -8778,79 +11624,55 @@ export const GraphAPIComputeRegionalServiceResource: coreClient.CompositeMapper }, }; -export const MaterializedViewsBuilderRegionalServiceResource: coreClient.CompositeMapper = +export const SqlResourcesDeleteSqlStoredProcedureHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MaterializedViewsBuilderRegionalServiceResource", + className: "SqlResourcesDeleteSqlStoredProcedureHeaders", modelProperties: { - ...RegionalServiceResource.type.modelProperties, - }, - }, - }; - -export const PrivateEndpointConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - ...ProxyResource.type.modelProperties, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpointProperty", - }, - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty", - }, - }, - groupId: { - serializedName: "properties.groupId", - type: { - name: "String", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - type: { - name: "String", + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const DatabaseAccountsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatabaseAccountsDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", +export const SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, }, - }, - location: { - serializedName: "location", - type: { - name: "String", + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const DatabaseAccountsFailoverPriorityChangeHeaders: coreClient.CompositeMapper = +export const SqlResourcesDeleteSqlUserDefinedFunctionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountsFailoverPriorityChangeHeaders", + className: "SqlResourcesDeleteSqlUserDefinedFunctionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8868,11 +11690,11 @@ export const DatabaseAccountsFailoverPriorityChangeHeaders: coreClient.Composite }, }; -export const DatabaseAccountsOfflineRegionHeaders: coreClient.CompositeMapper = +export const SqlResourcesCreateUpdateSqlTriggerHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountsOfflineRegionHeaders", + className: "SqlResourcesCreateUpdateSqlTriggerHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8890,10 +11712,10 @@ export const DatabaseAccountsOfflineRegionHeaders: coreClient.CompositeMapper = }, }; -export const DatabaseAccountsOnlineRegionHeaders: coreClient.CompositeMapper = { +export const SqlResourcesDeleteSqlTriggerHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountsOnlineRegionHeaders", + className: "SqlResourcesDeleteSqlTriggerHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8911,11 +11733,11 @@ export const DatabaseAccountsOnlineRegionHeaders: coreClient.CompositeMapper = { }, }; -export const DatabaseAccountsRegenerateKeyHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountsRegenerateKeyHeaders", + className: "MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8933,11 +11755,11 @@ export const DatabaseAccountsRegenerateKeyHeaders: coreClient.CompositeMapper = }, }; -export const SqlResourcesCreateUpdateSqlDatabaseHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesDeleteMongoDBDatabaseHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlDatabaseHeaders", + className: "MongoDBResourcesDeleteMongoDBDatabaseHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8955,11 +11777,11 @@ export const SqlResourcesCreateUpdateSqlDatabaseHeaders: coreClient.CompositeMap }, }; -export const SqlResourcesDeleteSqlDatabaseHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesDeleteSqlDatabaseHeaders", + className: "MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8977,11 +11799,11 @@ export const SqlResourcesDeleteSqlDatabaseHeaders: coreClient.CompositeMapper = }, }; -export const SqlResourcesUpdateSqlDatabaseThroughputHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesUpdateSqlDatabaseThroughputHeaders", + className: "MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8999,11 +11821,12 @@ export const SqlResourcesUpdateSqlDatabaseThroughputHeaders: coreClient.Composit }, }; -export const SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders", + className: + "MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9021,11 +11844,12 @@ export const SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders: coreClient.Compos }, }; -export const SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders", + className: + "MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9043,11 +11867,11 @@ export const SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders: coreClient }, }; -export const SqlResourcesCreateUpdateSqlContainerHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlContainerHeaders", + className: "MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9065,11 +11889,12 @@ export const SqlResourcesCreateUpdateSqlContainerHeaders: coreClient.CompositeMa }, }; -export const SqlResourcesDeleteSqlContainerHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesDeleteSqlContainerHeaders", + className: + "MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9087,11 +11912,12 @@ export const SqlResourcesDeleteSqlContainerHeaders: coreClient.CompositeMapper = }, }; -export const SqlResourcesUpdateSqlContainerThroughputHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesUpdateSqlContainerThroughputHeaders", + className: + "MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9109,11 +11935,11 @@ export const SqlResourcesUpdateSqlContainerThroughputHeaders: coreClient.Composi }, }; -export const SqlResourcesMigrateSqlContainerToAutoscaleHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesCreateUpdateMongoDBCollectionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesMigrateSqlContainerToAutoscaleHeaders", + className: "MongoDBResourcesCreateUpdateMongoDBCollectionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9131,11 +11957,11 @@ export const SqlResourcesMigrateSqlContainerToAutoscaleHeaders: coreClient.Compo }, }; -export const SqlResourcesMigrateSqlContainerToManualThroughputHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesDeleteMongoDBCollectionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesMigrateSqlContainerToManualThroughputHeaders", + className: "MongoDBResourcesDeleteMongoDBCollectionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9153,11 +11979,11 @@ export const SqlResourcesMigrateSqlContainerToManualThroughputHeaders: coreClien }, }; -export const SqlResourcesCreateUpdateClientEncryptionKeyHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBDatabasePartitionMergeHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateClientEncryptionKeyHeaders", + className: "MongoDBResourcesMongoDBDatabasePartitionMergeHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9175,11 +12001,11 @@ export const SqlResourcesCreateUpdateClientEncryptionKeyHeaders: coreClient.Comp }, }; -export const SqlResourcesCreateUpdateSqlStoredProcedureHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlStoredProcedureHeaders", + className: "MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9197,11 +12023,11 @@ export const SqlResourcesCreateUpdateSqlStoredProcedureHeaders: coreClient.Compo }, }; -export const SqlResourcesDeleteSqlStoredProcedureHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesDeleteSqlStoredProcedureHeaders", + className: "MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9219,11 +12045,11 @@ export const SqlResourcesDeleteSqlStoredProcedureHeaders: coreClient.CompositeMa }, }; -export const SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders", + className: "MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9241,11 +12067,12 @@ export const SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders: coreClient.C }, }; -export const SqlResourcesDeleteSqlUserDefinedFunctionHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesDeleteSqlUserDefinedFunctionHeaders", + className: + "MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9263,11 +12090,11 @@ export const SqlResourcesDeleteSqlUserDefinedFunctionHeaders: coreClient.Composi }, }; -export const SqlResourcesCreateUpdateSqlTriggerHeaders: coreClient.CompositeMapper = +export const TableResourcesCreateUpdateTableHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlTriggerHeaders", + className: "TableResourcesCreateUpdateTableHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9285,10 +12112,10 @@ export const SqlResourcesCreateUpdateSqlTriggerHeaders: coreClient.CompositeMapp }, }; -export const SqlResourcesDeleteSqlTriggerHeaders: coreClient.CompositeMapper = { +export const TableResourcesDeleteTableHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesDeleteSqlTriggerHeaders", + className: "TableResourcesDeleteTableHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9306,11 +12133,11 @@ export const SqlResourcesDeleteSqlTriggerHeaders: coreClient.CompositeMapper = { }, }; -export const MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders: coreClient.CompositeMapper = +export const TableResourcesUpdateTableThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders", + className: "TableResourcesUpdateTableThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9328,11 +12155,11 @@ export const MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders: coreClient.Comp }, }; -export const MongoDBResourcesDeleteMongoDBDatabaseHeaders: coreClient.CompositeMapper = +export const TableResourcesMigrateTableToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesDeleteMongoDBDatabaseHeaders", + className: "TableResourcesMigrateTableToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9350,11 +12177,11 @@ export const MongoDBResourcesDeleteMongoDBDatabaseHeaders: coreClient.CompositeM }, }; -export const MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders: coreClient.CompositeMapper = +export const TableResourcesMigrateTableToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders", + className: "TableResourcesMigrateTableToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9372,11 +12199,11 @@ export const MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders: coreClient. }, }; -export const MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = +export const TableResourcesCreateUpdateTableRoleDefinitionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders", + className: "TableResourcesCreateUpdateTableRoleDefinitionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9394,12 +12221,11 @@ export const MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders: coreClien }, }; -export const MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = +export const TableResourcesDeleteTableRoleDefinitionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders", + className: "TableResourcesDeleteTableRoleDefinitionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9417,11 +12243,11 @@ export const MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders: co }, }; -export const MongoDBResourcesCreateUpdateMongoDBCollectionHeaders: coreClient.CompositeMapper = +export const TableResourcesCreateUpdateTableRoleAssignmentHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesCreateUpdateMongoDBCollectionHeaders", + className: "TableResourcesCreateUpdateTableRoleAssignmentHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9439,11 +12265,11 @@ export const MongoDBResourcesCreateUpdateMongoDBCollectionHeaders: coreClient.Co }, }; -export const MongoDBResourcesDeleteMongoDBCollectionHeaders: coreClient.CompositeMapper = +export const TableResourcesDeleteTableRoleAssignmentHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesDeleteMongoDBCollectionHeaders", + className: "TableResourcesDeleteTableRoleAssignmentHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9461,11 +12287,11 @@ export const MongoDBResourcesDeleteMongoDBCollectionHeaders: coreClient.Composit }, }; -export const MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesCreateUpdateCassandraKeyspaceHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders", + className: "CassandraResourcesCreateUpdateCassandraKeyspaceHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9483,11 +12309,11 @@ export const MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders: coreClien }, }; -export const MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders: coreClient.CompositeMapper = +export const CassandraResourcesDeleteCassandraKeyspaceHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders", + className: "CassandraResourcesDeleteCassandraKeyspaceHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9505,12 +12331,11 @@ export const MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders: coreCli }, }; -export const MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders", + className: "CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9528,11 +12353,11 @@ export const MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders: }, }; -export const TableResourcesCreateUpdateTableHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableResourcesCreateUpdateTableHeaders", + className: "CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9550,32 +12375,12 @@ export const TableResourcesCreateUpdateTableHeaders: coreClient.CompositeMapper }, }; -export const TableResourcesDeleteTableHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TableResourcesDeleteTableHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TableResourcesUpdateTableThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableResourcesUpdateTableThroughputHeaders", + className: + "CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9593,11 +12398,11 @@ export const TableResourcesUpdateTableThroughputHeaders: coreClient.CompositeMap }, }; -export const TableResourcesMigrateTableToAutoscaleHeaders: coreClient.CompositeMapper = +export const CassandraResourcesCreateUpdateCassandraTableHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableResourcesMigrateTableToAutoscaleHeaders", + className: "CassandraResourcesCreateUpdateCassandraTableHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9615,11 +12420,11 @@ export const TableResourcesMigrateTableToAutoscaleHeaders: coreClient.CompositeM }, }; -export const TableResourcesMigrateTableToManualThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesDeleteCassandraTableHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableResourcesMigrateTableToManualThroughputHeaders", + className: "CassandraResourcesDeleteCassandraTableHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9637,11 +12442,11 @@ export const TableResourcesMigrateTableToManualThroughputHeaders: coreClient.Com }, }; -export const CassandraResourcesCreateUpdateCassandraKeyspaceHeaders: coreClient.CompositeMapper = +export const CassandraResourcesUpdateCassandraTableThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesCreateUpdateCassandraKeyspaceHeaders", + className: "CassandraResourcesUpdateCassandraTableThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9659,11 +12464,11 @@ export const CassandraResourcesCreateUpdateCassandraKeyspaceHeaders: coreClient. }, }; -export const CassandraResourcesDeleteCassandraKeyspaceHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraTableToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesDeleteCassandraKeyspaceHeaders", + className: "CassandraResourcesMigrateCassandraTableToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9681,11 +12486,12 @@ export const CassandraResourcesDeleteCassandraKeyspaceHeaders: coreClient.Compos }, }; -export const CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraTableToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders", + className: + "CassandraResourcesMigrateCassandraTableToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9703,11 +12509,11 @@ export const CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders: coreCli }, }; -export const CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders: coreClient.CompositeMapper = +export const CassandraResourcesCreateUpdateCassandraViewHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders", + className: "CassandraResourcesCreateUpdateCassandraViewHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9725,12 +12531,11 @@ export const CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders: coreC }, }; -export const CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesDeleteCassandraViewHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders", + className: "CassandraResourcesDeleteCassandraViewHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9748,11 +12553,11 @@ export const CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders }, }; -export const CassandraResourcesCreateUpdateCassandraTableHeaders: coreClient.CompositeMapper = +export const CassandraResourcesUpdateCassandraViewThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesCreateUpdateCassandraTableHeaders", + className: "CassandraResourcesUpdateCassandraViewThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9770,11 +12575,11 @@ export const CassandraResourcesCreateUpdateCassandraTableHeaders: coreClient.Com }, }; -export const CassandraResourcesDeleteCassandraTableHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraViewToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesDeleteCassandraTableHeaders", + className: "CassandraResourcesMigrateCassandraViewToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9792,11 +12597,12 @@ export const CassandraResourcesDeleteCassandraTableHeaders: coreClient.Composite }, }; -export const CassandraResourcesUpdateCassandraTableThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraViewToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesUpdateCassandraTableThroughputHeaders", + className: + "CassandraResourcesMigrateCassandraViewToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9814,11 +12620,11 @@ export const CassandraResourcesUpdateCassandraTableThroughputHeaders: coreClient }, }; -export const CassandraResourcesMigrateCassandraTableToAutoscaleHeaders: coreClient.CompositeMapper = +export const GremlinResourcesCreateUpdateGremlinDatabaseHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesMigrateCassandraTableToAutoscaleHeaders", + className: "GremlinResourcesCreateUpdateGremlinDatabaseHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9836,12 +12642,11 @@ export const CassandraResourcesMigrateCassandraTableToAutoscaleHeaders: coreClie }, }; -export const CassandraResourcesMigrateCassandraTableToManualThroughputHeaders: coreClient.CompositeMapper = +export const GremlinResourcesDeleteGremlinDatabaseHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "CassandraResourcesMigrateCassandraTableToManualThroughputHeaders", + className: "GremlinResourcesDeleteGremlinDatabaseHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9859,11 +12664,11 @@ export const CassandraResourcesMigrateCassandraTableToManualThroughputHeaders: c }, }; -export const GremlinResourcesCreateUpdateGremlinDatabaseHeaders: coreClient.CompositeMapper = +export const GremlinResourcesUpdateGremlinDatabaseThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinResourcesCreateUpdateGremlinDatabaseHeaders", + className: "GremlinResourcesUpdateGremlinDatabaseThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9881,11 +12686,11 @@ export const GremlinResourcesCreateUpdateGremlinDatabaseHeaders: coreClient.Comp }, }; -export const GremlinResourcesDeleteGremlinDatabaseHeaders: coreClient.CompositeMapper = +export const GremlinResourcesMigrateGremlinDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinResourcesDeleteGremlinDatabaseHeaders", + className: "GremlinResourcesMigrateGremlinDatabaseToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9903,11 +12708,12 @@ export const GremlinResourcesDeleteGremlinDatabaseHeaders: coreClient.CompositeM }, }; -export const GremlinResourcesUpdateGremlinDatabaseThroughputHeaders: coreClient.CompositeMapper = +export const GremlinResourcesMigrateGremlinDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinResourcesUpdateGremlinDatabaseThroughputHeaders", + className: + "GremlinResourcesMigrateGremlinDatabaseToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9925,11 +12731,11 @@ export const GremlinResourcesUpdateGremlinDatabaseThroughputHeaders: coreClient. }, }; -export const GremlinResourcesMigrateGremlinDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = +export const GremlinResourcesCreateUpdateGremlinGraphHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinResourcesMigrateGremlinDatabaseToAutoscaleHeaders", + className: "GremlinResourcesCreateUpdateGremlinGraphHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9947,12 +12753,11 @@ export const GremlinResourcesMigrateGremlinDatabaseToAutoscaleHeaders: coreClien }, }; -export const GremlinResourcesMigrateGremlinDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = +export const GremlinResourcesDeleteGremlinGraphHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "GremlinResourcesMigrateGremlinDatabaseToManualThroughputHeaders", + className: "GremlinResourcesDeleteGremlinGraphHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9970,11 +12775,11 @@ export const GremlinResourcesMigrateGremlinDatabaseToManualThroughputHeaders: co }, }; -export const GremlinResourcesCreateUpdateGremlinGraphHeaders: coreClient.CompositeMapper = +export const GremlinResourcesUpdateGremlinGraphThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinResourcesCreateUpdateGremlinGraphHeaders", + className: "GremlinResourcesUpdateGremlinGraphThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9992,11 +12797,11 @@ export const GremlinResourcesCreateUpdateGremlinGraphHeaders: coreClient.Composi }, }; -export const GremlinResourcesDeleteGremlinGraphHeaders: coreClient.CompositeMapper = +export const GremlinResourcesMigrateGremlinGraphToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinResourcesDeleteGremlinGraphHeaders", + className: "GremlinResourcesMigrateGremlinGraphToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -10014,11 +12819,11 @@ export const GremlinResourcesDeleteGremlinGraphHeaders: coreClient.CompositeMapp }, }; -export const GremlinResourcesUpdateGremlinGraphThroughputHeaders: coreClient.CompositeMapper = +export const GremlinResourcesMigrateGremlinGraphToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinResourcesUpdateGremlinGraphThroughputHeaders", + className: "GremlinResourcesMigrateGremlinGraphToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -10036,11 +12841,11 @@ export const GremlinResourcesUpdateGremlinGraphThroughputHeaders: coreClient.Com }, }; -export const GremlinResourcesMigrateGremlinGraphToAutoscaleHeaders: coreClient.CompositeMapper = +export const CassandraClustersInvokeCommandAsyncHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinResourcesMigrateGremlinGraphToAutoscaleHeaders", + className: "CassandraClustersInvokeCommandAsyncHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -10058,18 +12863,12 @@ export const GremlinResourcesMigrateGremlinGraphToAutoscaleHeaders: coreClient.C }, }; -export const GremlinResourcesMigrateGremlinGraphToManualThroughputHeaders: coreClient.CompositeMapper = +export const NetworkSecurityPerimeterConfigurationsReconcileHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinResourcesMigrateGremlinGraphToManualThroughputHeaders", + className: "NetworkSecurityPerimeterConfigurationsReconcileHeaders", modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, location: { serializedName: "location", type: { @@ -10080,10 +12879,10 @@ export const GremlinResourcesMigrateGremlinGraphToManualThroughputHeaders: coreC }, }; -export const ServiceCreateHeaders: coreClient.CompositeMapper = { +export const ServiceDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceCreateHeaders", + className: "ServiceDeleteHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -10101,10 +12900,52 @@ export const ServiceCreateHeaders: coreClient.CompositeMapper = { }, }; -export const ServiceDeleteHeaders: coreClient.CompositeMapper = { +export const ThroughputPoolUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceDeleteHeaders", + className: "ThroughputPoolUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ThroughputPoolDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ThroughputPoolAccountDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolAccountDeleteHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -10124,10 +12965,17 @@ export const ServiceDeleteHeaders: coreClient.CompositeMapper = { export let discriminators = { BackupPolicy: BackupPolicy, + DataTransferDataSourceSink: DataTransferDataSourceSink, ServiceResourceProperties: ServiceResourceProperties, ServiceResourceCreateUpdateProperties: ServiceResourceCreateUpdateProperties, "BackupPolicy.Periodic": PeriodicModeBackupPolicy, "BackupPolicy.Continuous": ContinuousModeBackupPolicy, + "DataTransferDataSourceSink.BaseCosmosDataTransferDataSourceSink": + BaseCosmosDataTransferDataSourceSink, + "DataTransferDataSourceSink.CosmosDBMongoVCore": + CosmosMongoVCoreDataTransferDataSourceSink, + "DataTransferDataSourceSink.AzureBlobStorage": + AzureBlobDataTransferDataSourceSink, "ServiceResourceProperties.DataTransfer": DataTransferServiceResourceProperties, "ServiceResourceProperties.SqlDedicatedGateway": @@ -10144,4 +12992,10 @@ export let discriminators = { GraphAPIComputeServiceResourceCreateUpdateProperties, "ServiceResourceCreateUpdateProperties.MaterializedViewsBuilder": MaterializedViewsBuilderServiceResourceCreateUpdateProperties, + "BaseCosmosDataTransferDataSourceSink.CosmosDBCassandra": + CosmosCassandraDataTransferDataSourceSink, + "BaseCosmosDataTransferDataSourceSink.CosmosDBMongo": + CosmosMongoDataTransferDataSourceSink, + "BaseCosmosDataTransferDataSourceSink.CosmosDBSql": + CosmosSqlDataTransferDataSourceSink, }; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts index 206c48236b51..f82f19b026cf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts @@ -12,15 +12,20 @@ import { OperationQueryParameter, } from "@azure/core-client"; import { + ChaosFaultResource as ChaosFaultResourceMapper, DatabaseAccountUpdateParameters as DatabaseAccountUpdateParametersMapper, DatabaseAccountCreateUpdateParameters as DatabaseAccountCreateUpdateParametersMapper, FailoverPolicies as FailoverPoliciesMapper, RegionForOnlineOffline as RegionForOnlineOfflineMapper, DatabaseAccountRegenerateKeyParameters as DatabaseAccountRegenerateKeyParametersMapper, + GraphResourceCreateUpdateParameters as GraphResourceCreateUpdateParametersMapper, SqlDatabaseCreateUpdateParameters as SqlDatabaseCreateUpdateParametersMapper, ThroughputSettingsUpdateParameters as ThroughputSettingsUpdateParametersMapper, - SqlContainerCreateUpdateParameters as SqlContainerCreateUpdateParametersMapper, ClientEncryptionKeyCreateUpdateParameters as ClientEncryptionKeyCreateUpdateParametersMapper, + SqlContainerCreateUpdateParameters as SqlContainerCreateUpdateParametersMapper, + MergeParameters as MergeParametersMapper, + RetrieveThroughputParameters as RetrieveThroughputParametersMapper, + RedistributeThroughputParameters as RedistributeThroughputParametersMapper, SqlStoredProcedureCreateUpdateParameters as SqlStoredProcedureCreateUpdateParametersMapper, SqlUserDefinedFunctionCreateUpdateParameters as SqlUserDefinedFunctionCreateUpdateParametersMapper, SqlTriggerCreateUpdateParameters as SqlTriggerCreateUpdateParametersMapper, @@ -32,17 +37,25 @@ import { MongoRoleDefinitionCreateUpdateParameters as MongoRoleDefinitionCreateUpdateParametersMapper, MongoUserDefinitionCreateUpdateParameters as MongoUserDefinitionCreateUpdateParametersMapper, TableCreateUpdateParameters as TableCreateUpdateParametersMapper, + TableRoleDefinitionResource as TableRoleDefinitionResourceMapper, + TableRoleAssignmentResource as TableRoleAssignmentResourceMapper, CassandraKeyspaceCreateUpdateParameters as CassandraKeyspaceCreateUpdateParametersMapper, CassandraTableCreateUpdateParameters as CassandraTableCreateUpdateParametersMapper, + CassandraViewCreateUpdateParameters as CassandraViewCreateUpdateParametersMapper, GremlinDatabaseCreateUpdateParameters as GremlinDatabaseCreateUpdateParametersMapper, GremlinGraphCreateUpdateParameters as GremlinGraphCreateUpdateParametersMapper, + CreateJobRequest as CreateJobRequestMapper, ClusterResource as ClusterResourceMapper, CommandPostBody as CommandPostBodyMapper, + CommandAsyncPostBody as CommandAsyncPostBodyMapper, DataCenterResource as DataCenterResourceMapper, NotebookWorkspaceCreateUpdateParameters as NotebookWorkspaceCreateUpdateParametersMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, ServiceResourceCreateUpdateParameters as ServiceResourceCreateUpdateParametersMapper, -} from "../models/mappers"; + ThroughputPoolResource as ThroughputPoolResourceMapper, + ThroughputPoolUpdate as ThroughputPoolUpdateMapper, + ThroughputPoolAccountResource as ThroughputPoolAccountResourceMapper, +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", @@ -71,13 +84,10 @@ export const $host: OperationURLParameter = { export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { - constraints: { - MinLength: 1, - }, serializedName: "subscriptionId", required: true, type: { - name: "String", + name: "Uuid", }, }, }; @@ -97,6 +107,18 @@ export const resourceGroupName: OperationURLParameter = { }, }; +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2024-12-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String", + }, + }, +}; + export const accountName: OperationURLParameter = { parameterPath: "accountName", mapper: { @@ -113,30 +135,46 @@ export const accountName: OperationURLParameter = { }, }; -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - defaultValue: "2024-11-15", + defaultValue: "application/json", isConstant: true, - serializedName: "api-version", + serializedName: "Content-Type", type: { name: "String", }, }, }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], +export const chaosFaultRequest: OperationParameter = { + parameterPath: "chaosFaultRequest", + mapper: ChaosFaultResourceMapper, +}; + +export const chaosFault: OperationURLParameter = { + parameterPath: "chaosFault", mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", + serializedName: "chaosFault", + required: true, type: { name: "String", }, }, }; +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String", + }, + }, + skipEncoding: true, +}; + export const updateParameters: OperationParameter = { parameterPath: "updateParameters", mapper: DatabaseAccountUpdateParametersMapper, @@ -188,18 +226,6 @@ export const filter1: OperationQueryParameter = { }, }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - export const databaseRid: OperationURLParameter = { parameterPath: "databaseRid", mapper: { @@ -266,6 +292,22 @@ export const partitionKeyRangeId: OperationURLParameter = { }, }; +export const graphName: OperationURLParameter = { + parameterPath: "graphName", + mapper: { + serializedName: "graphName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const createUpdateGraphParameters: OperationParameter = { + parameterPath: "createUpdateGraphParameters", + mapper: GraphResourceCreateUpdateParametersMapper, +}; + export const databaseName: OperationURLParameter = { parameterPath: "databaseName", mapper: { @@ -287,10 +329,10 @@ export const updateThroughputParameters: OperationParameter = { mapper: ThroughputSettingsUpdateParametersMapper, }; -export const containerName: OperationURLParameter = { - parameterPath: "containerName", +export const clientEncryptionKeyName: OperationURLParameter = { + parameterPath: "clientEncryptionKeyName", mapper: { - serializedName: "containerName", + serializedName: "clientEncryptionKeyName", required: true, type: { name: "String", @@ -298,15 +340,15 @@ export const containerName: OperationURLParameter = { }, }; -export const createUpdateSqlContainerParameters: OperationParameter = { - parameterPath: "createUpdateSqlContainerParameters", - mapper: SqlContainerCreateUpdateParametersMapper, +export const createUpdateClientEncryptionKeyParameters: OperationParameter = { + parameterPath: "createUpdateClientEncryptionKeyParameters", + mapper: ClientEncryptionKeyCreateUpdateParametersMapper, }; -export const clientEncryptionKeyName: OperationURLParameter = { - parameterPath: "clientEncryptionKeyName", +export const containerName: OperationURLParameter = { + parameterPath: "containerName", mapper: { - serializedName: "clientEncryptionKeyName", + serializedName: "containerName", required: true, type: { name: "String", @@ -314,9 +356,24 @@ export const clientEncryptionKeyName: OperationURLParameter = { }, }; -export const createUpdateClientEncryptionKeyParameters: OperationParameter = { - parameterPath: "createUpdateClientEncryptionKeyParameters", - mapper: ClientEncryptionKeyCreateUpdateParametersMapper, +export const createUpdateSqlContainerParameters: OperationParameter = { + parameterPath: "createUpdateSqlContainerParameters", + mapper: SqlContainerCreateUpdateParametersMapper, +}; + +export const mergeParameters: OperationParameter = { + parameterPath: "mergeParameters", + mapper: MergeParametersMapper, +}; + +export const retrieveThroughputParameters: OperationParameter = { + parameterPath: "retrieveThroughputParameters", + mapper: RetrieveThroughputParametersMapper, +}; + +export const redistributeThroughputParameters: OperationParameter = { + parameterPath: "redistributeThroughputParameters", + mapper: RedistributeThroughputParametersMapper, }; export const storedProcedureName: OperationURLParameter = { @@ -474,6 +531,16 @@ export const createUpdateTableParameters: OperationParameter = { mapper: TableCreateUpdateParametersMapper, }; +export const createUpdateTableRoleDefinitionParameters: OperationParameter = { + parameterPath: "createUpdateTableRoleDefinitionParameters", + mapper: TableRoleDefinitionResourceMapper, +}; + +export const createUpdateTableRoleAssignmentParameters: OperationParameter = { + parameterPath: "createUpdateTableRoleAssignmentParameters", + mapper: TableRoleAssignmentResourceMapper, +}; + export const keyspaceName: OperationURLParameter = { parameterPath: "keyspaceName", mapper: { @@ -495,15 +562,10 @@ export const createUpdateCassandraTableParameters: OperationParameter = { mapper: CassandraTableCreateUpdateParametersMapper, }; -export const createUpdateGremlinDatabaseParameters: OperationParameter = { - parameterPath: "createUpdateGremlinDatabaseParameters", - mapper: GremlinDatabaseCreateUpdateParametersMapper, -}; - -export const graphName: OperationURLParameter = { - parameterPath: "graphName", +export const viewName: OperationURLParameter = { + parameterPath: "viewName", mapper: { - serializedName: "graphName", + serializedName: "viewName", required: true, type: { name: "String", @@ -511,6 +573,16 @@ export const graphName: OperationURLParameter = { }, }; +export const createUpdateCassandraViewParameters: OperationParameter = { + parameterPath: "createUpdateCassandraViewParameters", + mapper: CassandraViewCreateUpdateParametersMapper, +}; + +export const createUpdateGremlinDatabaseParameters: OperationParameter = { + parameterPath: "createUpdateGremlinDatabaseParameters", + mapper: GremlinDatabaseCreateUpdateParametersMapper, +}; + export const createUpdateGremlinGraphParameters: OperationParameter = { parameterPath: "createUpdateGremlinGraphParameters", mapper: GremlinGraphCreateUpdateParametersMapper, @@ -527,6 +599,22 @@ export const location1: OperationURLParameter = { }, }; +export const jobCreateParameters: OperationParameter = { + parameterPath: "jobCreateParameters", + mapper: CreateJobRequestMapper, +}; + +export const jobName: OperationURLParameter = { + parameterPath: "jobName", + mapper: { + serializedName: "jobName", + required: true, + type: { + name: "String", + }, + }, +}; + export const clusterName: OperationURLParameter = { parameterPath: "clusterName", mapper: { @@ -553,6 +641,53 @@ export const body1: OperationParameter = { mapper: CommandPostBodyMapper, }; +export const body2: OperationParameter = { + parameterPath: "body", + mapper: CommandAsyncPostBodyMapper, +}; + +export const commandId: OperationURLParameter = { + parameterPath: "commandId", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$"), + MaxLength: 100, + MinLength: 1, + }, + serializedName: "commandId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const backupId: OperationURLParameter = { + parameterPath: "backupId", + mapper: { + constraints: { + Pattern: new RegExp("^[0-9]+$"), + MaxLength: 15, + MinLength: 1, + }, + serializedName: "backupId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const xMsForceDeallocate: OperationParameter = { + parameterPath: ["options", "xMsForceDeallocate"], + mapper: { + serializedName: "x-ms-force-deallocate", + type: { + name: "String", + }, + }, +}; + export const dataCenterName: OperationURLParameter = { parameterPath: "dataCenterName", mapper: { @@ -569,11 +704,26 @@ export const dataCenterName: OperationURLParameter = { }, }; -export const body2: OperationParameter = { +export const body3: OperationParameter = { parameterPath: "body", mapper: DataCenterResourceMapper, }; +export const networkSecurityPerimeterConfigurationName: OperationURLParameter = + { + parameterPath: "networkSecurityPerimeterConfigurationName", + mapper: { + constraints: { + Pattern: new RegExp("^.*$"), + }, + serializedName: "networkSecurityPerimeterConfigurationName", + required: true, + type: { + name: "String", + }, + }, + }; + export const notebookWorkspaceName: OperationURLParameter = { parameterPath: "notebookWorkspaceName", mapper: { @@ -717,3 +867,50 @@ export const serviceName: OperationURLParameter = { }, }, }; + +export const throughputPoolName: OperationURLParameter = { + parameterPath: "throughputPoolName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z0-9]+(-[a-z0-9]+)*"), + MaxLength: 50, + MinLength: 3, + }, + serializedName: "throughputPoolName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body4: OperationParameter = { + parameterPath: "body", + mapper: ThroughputPoolResourceMapper, +}; + +export const body5: OperationParameter = { + parameterPath: ["options", "body"], + mapper: ThroughputPoolUpdateMapper, +}; + +export const throughputPoolAccountName: OperationURLParameter = { + parameterPath: "throughputPoolAccountName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z0-9]+(-[a-z0-9]+)*"), + MaxLength: 50, + MinLength: 3, + }, + serializedName: "throughputPoolAccountName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body6: OperationParameter = { + parameterPath: "body", + mapper: ThroughputPoolAccountResourceMapper, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts index 4b3062258ec8..c713dd9c55cb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts @@ -7,23 +7,29 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { CassandraClusters } from "../operationsInterfaces"; +import { CassandraClusters } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { ClusterResource, CassandraClustersListBySubscriptionOptionalParams, CassandraClustersListBySubscriptionResponse, CassandraClustersListByResourceGroupOptionalParams, CassandraClustersListByResourceGroupResponse, + CommandPublicResource, + CassandraClustersListCommandOptionalParams, + CassandraClustersListCommandResponse, + BackupResource, + CassandraClustersListBackupsOptionalParams, + CassandraClustersListBackupsResponse, CassandraClustersGetOptionalParams, CassandraClustersGetResponse, CassandraClustersDeleteOptionalParams, @@ -34,11 +40,18 @@ import { CommandPostBody, CassandraClustersInvokeCommandOptionalParams, CassandraClustersInvokeCommandResponse, + CommandAsyncPostBody, + CassandraClustersInvokeCommandAsyncOptionalParams, + CassandraClustersInvokeCommandAsyncResponse, + CassandraClustersGetCommandAsyncOptionalParams, + CassandraClustersGetCommandAsyncResponse, + CassandraClustersGetBackupOptionalParams, + CassandraClustersGetBackupResponse, CassandraClustersDeallocateOptionalParams, CassandraClustersStartOptionalParams, CassandraClustersStatusOptionalParams, CassandraClustersStatusResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CassandraClusters operations. */ @@ -146,6 +159,130 @@ export class CassandraClustersImpl implements CassandraClusters { } } + /** + * List all commands currently running on ring info + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + public listCommand( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listCommandPagingAll( + resourceGroupName, + clusterName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listCommandPagingPage( + resourceGroupName, + clusterName, + options, + settings, + ); + }, + }; + } + + private async *listCommandPagingPage( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: CassandraClustersListCommandResponse; + result = await this._listCommand(resourceGroupName, clusterName, options); + yield result.value || []; + } + + private async *listCommandPagingAll( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listCommandPagingPage( + resourceGroupName, + clusterName, + options, + )) { + yield* page; + } + } + + /** + * List the backups of this cluster that are available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + public listBackups( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listBackupsPagingAll( + resourceGroupName, + clusterName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBackupsPagingPage( + resourceGroupName, + clusterName, + options, + settings, + ); + }, + }; + } + + private async *listBackupsPagingPage( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: CassandraClustersListBackupsResponse; + result = await this._listBackups(resourceGroupName, clusterName, options); + yield result.value || []; + } + + private async *listBackupsPagingAll( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listBackupsPagingPage( + resourceGroupName, + clusterName, + options, + )) { + yield* page; + } + } + /** * List all managed Cassandra clusters in this subscription. * @param options The options parameters. @@ -556,6 +693,172 @@ export class CassandraClustersImpl implements CassandraClusters { return poller.pollUntilDone(); } + /** + * Invoke a command like nodetool for cassandra maintenance asynchronously + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param options The options parameters. + */ + async beginInvokeCommandAsync( + resourceGroupName: string, + clusterName: string, + body: CommandAsyncPostBody, + options?: CassandraClustersInvokeCommandAsyncOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraClustersInvokeCommandAsyncResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, body, options }, + spec: invokeCommandAsyncOperationSpec, + }); + const poller = await createHttpPoller< + CassandraClustersInvokeCommandAsyncResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Invoke a command like nodetool for cassandra maintenance asynchronously + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param options The options parameters. + */ + async beginInvokeCommandAsyncAndWait( + resourceGroupName: string, + clusterName: string, + body: CommandAsyncPostBody, + options?: CassandraClustersInvokeCommandAsyncOptionalParams, + ): Promise { + const poller = await this.beginInvokeCommandAsync( + resourceGroupName, + clusterName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * List all commands currently running on ring info + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + private _listCommand( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + listCommandOperationSpec, + ); + } + + /** + * Get details about a specified command that was run asynchronously. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param commandId Managed Cassandra cluster command id. + * @param options The options parameters. + */ + getCommandAsync( + resourceGroupName: string, + clusterName: string, + commandId: string, + options?: CassandraClustersGetCommandAsyncOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, commandId, options }, + getCommandAsyncOperationSpec, + ); + } + + /** + * List the backups of this cluster that are available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + private _listBackups( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + listBackupsOperationSpec, + ); + } + + /** + * Get the properties of an individual backup of this cluster that is available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param backupId Id of a restorable backup of a Cassandra cluster. + * @param options The options parameters. + */ + getBackup( + resourceGroupName: string, + clusterName: string, + backupId: string, + options?: CassandraClustersGetBackupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, backupId, options }, + getBackupOperationSpec, + ); + } + /** * Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate * the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an @@ -921,6 +1224,124 @@ const invokeCommandOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer, }; +const invokeCommandAsyncOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommandAsync", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CommandPublicResource, + }, + 201: { + bodyMapper: Mappers.CommandPublicResource, + }, + 202: { + bodyMapper: Mappers.CommandPublicResource, + }, + 204: { + bodyMapper: Mappers.CommandPublicResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listCommandOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/commands", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListCommands, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getCommandAsyncOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/commands/{commandId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CommandPublicResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.commandId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listBackupsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListBackups, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getBackupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BackupResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.backupId, + ], + headerParameters: [Parameters.accept], + serializer, +}; const deallocateOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate", httpMethod: "POST", @@ -940,7 +1361,7 @@ const deallocateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.clusterName, ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.xMsForceDeallocate], serializer, }; const startOperationSpec: coreClient.OperationSpec = { diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraDataCenters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraDataCenters.ts index a0dd87df8fe5..182eeae0ae8f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraDataCenters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraDataCenters.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { CassandraDataCenters } from "../operationsInterfaces"; +import { CassandraDataCenters } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { DataCenterResource, CassandraDataCentersListOptionalParams, @@ -29,7 +29,7 @@ import { CassandraDataCentersCreateUpdateResponse, CassandraDataCentersUpdateOptionalParams, CassandraDataCentersUpdateResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CassandraDataCenters operations. */ @@ -513,7 +513,7 @@ const createUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse, }, }, - requestBody: Parameters.body2, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -546,7 +546,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse, }, }, - requestBody: Parameters.body2, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts index c3cb5c29a452..ef7ab44f6ffc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { CassandraResources } from "../operationsInterfaces"; +import { CassandraResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { CassandraKeyspaceGetResults, CassandraResourcesListCassandraKeyspacesOptionalParams, @@ -25,6 +25,9 @@ import { CassandraTableGetResults, CassandraResourcesListCassandraTablesOptionalParams, CassandraResourcesListCassandraTablesResponse, + CassandraViewGetResults, + CassandraResourcesListCassandraViewsOptionalParams, + CassandraResourcesListCassandraViewsResponse, CassandraResourcesGetCassandraKeyspaceOptionalParams, CassandraResourcesGetCassandraKeyspaceResponse, CassandraKeyspaceCreateUpdateParameters, @@ -56,7 +59,21 @@ import { CassandraResourcesMigrateCassandraTableToAutoscaleResponse, CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, CassandraResourcesMigrateCassandraTableToManualThroughputResponse, -} from "../models"; + CassandraResourcesGetCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewResponse, + CassandraViewCreateUpdateParameters, + CassandraResourcesCreateUpdateCassandraViewOptionalParams, + CassandraResourcesCreateUpdateCassandraViewResponse, + CassandraResourcesDeleteCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewThroughputOptionalParams, + CassandraResourcesGetCassandraViewThroughputResponse, + CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + CassandraResourcesUpdateCassandraViewThroughputResponse, + CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse, +} from "../models/index.js"; /// /** Class containing CassandraResources operations. */ @@ -211,6 +228,80 @@ export class CassandraResourcesImpl implements CassandraResources { } } + /** + * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The options parameters. + */ + public listCassandraViews( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listCassandraViewsPagingAll( + resourceGroupName, + accountName, + keyspaceName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listCassandraViewsPagingPage( + resourceGroupName, + accountName, + keyspaceName, + options, + settings, + ); + }, + }; + } + + private async *listCassandraViewsPagingPage( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: CassandraResourcesListCassandraViewsResponse; + result = await this._listCassandraViews( + resourceGroupName, + accountName, + keyspaceName, + options, + ); + yield result.value || []; + } + + private async *listCassandraViewsPagingAll( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listCassandraViewsPagingPage( + resourceGroupName, + accountName, + keyspaceName, + options, + )) { + yield* page; + } + } + /** * Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1366,204 +1457,779 @@ export class CassandraResourcesImpl implements CassandraResources { ); return poller.pollUntilDone(); } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listCassandraKeyspacesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CassandraKeyspaceListResult, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createUpdateCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - 201: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - 202: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - 204: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - }, - requestBody: Parameters.createUpdateCassandraKeyspaceParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, - }, - 201: { - headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, - }, - 202: { - headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, - }, - 204: { - headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - serializer, -}; -const getCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = - { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - }, - requestBody: Parameters.updateThroughputParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, - }; -const migrateCassandraKeyspaceToAutoscaleOperationSpec: coreClient.OperationSpec = - { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept], - serializer, - }; -const migrateCassandraKeyspaceToManualThroughputOperationSpec: coreClient.OperationSpec = - { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - default: { + /** + * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The options parameters. + */ + private _listCassandraViews( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, keyspaceName, options }, + listCassandraViewsOperationSpec, + ); + } + + /** + * Gets the Cassandra view under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, keyspaceName, viewName, options }, + getCassandraViewOperationSpec, + ); + } + + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + async beginCreateUpdateCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesCreateUpdateCassandraViewResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + options, + }, + spec: createUpdateCassandraViewOperationSpec, + }); + const poller = await createHttpPoller< + CassandraResourcesCreateUpdateCassandraViewResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + async beginCreateUpdateCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateCassandraView( + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginDeleteCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams, + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, keyspaceName, viewName, options }, + spec: deleteCassandraViewOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginDeleteCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams, + ): Promise { + const poller = await this.beginDeleteCassandraView( + resourceGroupName, + accountName, + keyspaceName, + viewName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account + * with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewThroughputOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, keyspaceName, viewName, options }, + getCassandraViewThroughputOperationSpec, + ); + } + + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + async beginUpdateCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesUpdateCassandraViewThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + options, + }, + spec: updateCassandraViewThroughputOperationSpec, + }); + const poller = await createHttpPoller< + CassandraResourcesUpdateCassandraViewThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + async beginUpdateCassandraViewThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + ): Promise { + const poller = await this.beginUpdateCassandraViewThroughput( + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToAutoscale( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, keyspaceName, viewName, options }, + spec: migrateCassandraViewToAutoscaleOperationSpec, + }); + const poller = await createHttpPoller< + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToAutoscaleAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + ): Promise { + const poller = await this.beginMigrateCassandraViewToAutoscale( + resourceGroupName, + accountName, + keyspaceName, + viewName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToManualThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, keyspaceName, viewName, options }, + spec: migrateCassandraViewToManualThroughputOperationSpec, + }); + const poller = await createHttpPoller< + CassandraResourcesMigrateCassandraViewToManualThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToManualThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + ): Promise { + const poller = await this.beginMigrateCassandraViewToManualThroughput( + resourceGroupName, + accountName, + keyspaceName, + viewName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listCassandraKeyspacesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceListResult, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + 201: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + 202: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + 204: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + }, + requestBody: Parameters.createUpdateCassandraKeyspaceParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, + }, + 201: { + headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, + }, + 202: { + headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, + }, + 204: { + headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + serializer, +}; +const getCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const updateCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + requestBody: Parameters.updateThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const migrateCassandraKeyspaceToAutoscaleOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept], + serializer, + }; +const migrateCassandraKeyspaceToManualThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + default: { bodyMapper: Mappers.ErrorResponse, }, }, @@ -1793,3 +2459,204 @@ const migrateCassandraTableToManualThroughputOperationSpec: coreClient.Operation headerParameters: [Parameters.accept], serializer, }; +const listCassandraViewsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraViewListResult, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getCassandraViewOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateCassandraViewOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + 201: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + 202: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + 204: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + }, + requestBody: Parameters.createUpdateCassandraViewParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteCassandraViewOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + serializer, +}; +const getCassandraViewThroughputOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const updateCassandraViewThroughputOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + requestBody: Parameters.updateThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const migrateCassandraViewToAutoscaleOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const migrateCassandraViewToManualThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept], + serializer, + }; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/chaosFault.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/chaosFault.ts new file mode 100644 index 000000000000..0e2c3a8dfe7b --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/chaosFault.ts @@ -0,0 +1,383 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ChaosFault } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl.js"; +import { + ChaosFaultResource, + ChaosFaultListNextOptionalParams, + ChaosFaultListOptionalParams, + ChaosFaultListOperationResponse, + ChaosFaultEnableDisableOptionalParams, + ChaosFaultEnableDisableResponse, + ChaosFaultGetOptionalParams, + ChaosFaultGetResponse, + ChaosFaultListNextResponse, +} from "../models/index.js"; + +/// +/** Class containing ChaosFault operations. */ +export class ChaosFaultImpl implements ChaosFault { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ChaosFault class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * List Chaos Faults for CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ChaosFaultListOperationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, accountName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * List Chaos Faults for CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec, + ); + } + + /** + * Enable, disable Chaos Fault in a CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param chaosFaultRequest A request object to enable/disable the chaos fault. + * @param options The options parameters. + */ + async beginEnableDisable( + resourceGroupName: string, + accountName: string, + chaosFault: string, + chaosFaultRequest: ChaosFaultResource, + options?: ChaosFaultEnableDisableOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ChaosFaultEnableDisableResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + chaosFault, + chaosFaultRequest, + options, + }, + spec: enableDisableOperationSpec, + }); + const poller = await createHttpPoller< + ChaosFaultEnableDisableResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Enable, disable Chaos Fault in a CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param chaosFaultRequest A request object to enable/disable the chaos fault. + * @param options The options parameters. + */ + async beginEnableDisableAndWait( + resourceGroupName: string, + accountName: string, + chaosFault: string, + chaosFaultRequest: ChaosFaultResource, + options?: ChaosFaultEnableDisableOptionalParams, + ): Promise { + const poller = await this.beginEnableDisable( + resourceGroupName, + accountName, + chaosFault, + chaosFaultRequest, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + chaosFault: string, + options?: ChaosFaultGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, chaosFault, options }, + getOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: ChaosFaultListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/chaosFaults", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ChaosFaultListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const enableDisableOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/chaosFaults/{chaosFault}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ChaosFaultResource, + }, + 201: { + bodyMapper: Mappers.ChaosFaultResource, + }, + 202: { + bodyMapper: Mappers.ChaosFaultResource, + }, + 204: { + bodyMapper: Mappers.ChaosFaultResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.chaosFaultRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.chaosFault, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/chaosFaults/{chaosFault}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ChaosFaultResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.chaosFault, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ChaosFaultListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts index 646b11f5d368..b72ba7b8e1f2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts @@ -7,11 +7,11 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Collection } from "../operationsInterfaces"; +import { Collection } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { Metric, CollectionListMetricsOptionalParams, @@ -22,7 +22,7 @@ import { MetricDefinition, CollectionListMetricDefinitionsOptionalParams, CollectionListMetricDefinitionsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Collection operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartition.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartition.ts index 544d6aeaf798..e6ed4dd9d0c1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartition.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartition.ts @@ -7,11 +7,11 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { CollectionPartition } from "../operationsInterfaces"; +import { CollectionPartition } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { PartitionMetric, CollectionPartitionListMetricsOptionalParams, @@ -19,7 +19,7 @@ import { PartitionUsage, CollectionPartitionListUsagesOptionalParams, CollectionPartitionListUsagesResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CollectionPartition operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartitionRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartitionRegion.ts index d998b5fddd65..aac35ee7ffde 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartitionRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartitionRegion.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { CollectionPartitionRegion } from "../operationsInterfaces"; +import { CollectionPartitionRegion } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { PartitionMetric, CollectionPartitionRegionListMetricsOptionalParams, CollectionPartitionRegionListMetricsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CollectionPartitionRegion operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionRegion.ts index 922009fa47ac..a11599359ab1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionRegion.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { CollectionRegion } from "../operationsInterfaces"; +import { CollectionRegion } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { Metric, CollectionRegionListMetricsOptionalParams, CollectionRegionListMetricsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CollectionRegion operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts new file mode 100644 index 000000000000..9dddb77dc269 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts @@ -0,0 +1,464 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; +import { DataTransferJobs } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; +import { + DataTransferJobGetResults, + DataTransferJobsListByDatabaseAccountNextOptionalParams, + DataTransferJobsListByDatabaseAccountOptionalParams, + DataTransferJobsListByDatabaseAccountResponse, + CreateJobRequest, + DataTransferJobsCreateOptionalParams, + DataTransferJobsCreateResponse, + DataTransferJobsGetOptionalParams, + DataTransferJobsGetResponse, + DataTransferJobsPauseOptionalParams, + DataTransferJobsPauseResponse, + DataTransferJobsResumeOptionalParams, + DataTransferJobsResumeResponse, + DataTransferJobsCancelOptionalParams, + DataTransferJobsCancelResponse, + DataTransferJobsCompleteOptionalParams, + DataTransferJobsCompleteResponse, + DataTransferJobsListByDatabaseAccountNextResponse, +} from "../models/index.js"; + +/// +/** Class containing DataTransferJobs operations. */ +export class DataTransferJobsImpl implements DataTransferJobs { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class DataTransferJobs class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Get a list of Data Transfer jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public listByDatabaseAccount( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByDatabaseAccountPagingAll( + resourceGroupName, + accountName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByDatabaseAccountPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listByDatabaseAccountPagingPage( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DataTransferJobsListByDatabaseAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabaseAccount( + resourceGroupName, + accountName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseAccountNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByDatabaseAccountPagingAll( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByDatabaseAccountPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Creates a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param jobCreateParameters Parameters to create Data Transfer Job + * @param options The options parameters. + */ + create( + resourceGroupName: string, + accountName: string, + jobName: string, + jobCreateParameters: CreateJobRequest, + options?: DataTransferJobsCreateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, jobCreateParameters, options }, + createOperationSpec, + ); + } + + /** + * Get a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + getOperationSpec, + ); + } + + /** + * Pause a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + pause( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsPauseOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + pauseOperationSpec, + ); + } + + /** + * Resumes a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + resume( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsResumeOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + resumeOperationSpec, + ); + } + + /** + * Cancels a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + cancel( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsCancelOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + cancelOperationSpec, + ); + } + + /** + * Completes a Data Transfer Online Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + complete( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsCompleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + completeOperationSpec, + ); + } + + /** + * Get a list of Data Transfer jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _listByDatabaseAccount( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listByDatabaseAccountOperationSpec, + ); + } + + /** + * ListByDatabaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param nextLink The nextLink from the previous successful call to the ListByDatabaseAccount method. + * @param options The options parameters. + */ + private _listByDatabaseAccountNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: DataTransferJobsListByDatabaseAccountNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listByDatabaseAccountNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.jobCreateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const pauseOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const resumeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const cancelOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const completeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/complete", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByDatabaseAccountOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobFeedResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByDatabaseAccountNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobFeedResults, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts index 4996c2462b08..57fd4610ed12 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts @@ -7,11 +7,11 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Database } from "../operationsInterfaces"; +import { Database } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { Metric, DatabaseListMetricsOptionalParams, @@ -22,7 +22,7 @@ import { MetricDefinition, DatabaseListMetricDefinitionsOptionalParams, DatabaseListMetricDefinitionsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Database operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccountRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccountRegion.ts index 8b9ba595e626..aece68991e75 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccountRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccountRegion.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { DatabaseAccountRegion } from "../operationsInterfaces"; +import { DatabaseAccountRegion } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { Metric, DatabaseAccountRegionListMetricsOptionalParams, DatabaseAccountRegionListMetricsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing DatabaseAccountRegion operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts index 7e73c2a3e68f..baa6491cdf36 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { DatabaseAccounts } from "../operationsInterfaces"; +import { DatabaseAccounts } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { DatabaseAccountGetResults, DatabaseAccountsListOptionalParams, @@ -61,7 +61,7 @@ import { DatabaseAccountsRegenerateKeyOptionalParams, DatabaseAccountsCheckNameExistsOptionalParams, DatabaseAccountsCheckNameExistsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing DatabaseAccounts operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts new file mode 100644 index 000000000000..8990a2ff42d9 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts @@ -0,0 +1,418 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { GraphResources } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl.js"; +import { + GraphResourceGetResults, + GraphResourcesListGraphsOptionalParams, + GraphResourcesListGraphsResponse, + GraphResourcesGetGraphOptionalParams, + GraphResourcesGetGraphResponse, + GraphResourceCreateUpdateParameters, + GraphResourcesCreateUpdateGraphOptionalParams, + GraphResourcesCreateUpdateGraphResponse, + GraphResourcesDeleteGraphResourceOptionalParams, +} from "../models/index.js"; + +/// +/** Class containing GraphResources operations. */ +export class GraphResourcesImpl implements GraphResources { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class GraphResources class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Lists the graphs under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public listGraphs( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listGraphsPagingAll( + resourceGroupName, + accountName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listGraphsPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listGraphsPagingPage( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: GraphResourcesListGraphsResponse; + result = await this._listGraphs(resourceGroupName, accountName, options); + yield result.value || []; + } + + private async *listGraphsPagingAll( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listGraphsPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Lists the graphs under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _listGraphs( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listGraphsOperationSpec, + ); + } + + /** + * Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + getGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesGetGraphOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, graphName, options }, + getGraphOperationSpec, + ); + } + + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + async beginCreateUpdateGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GraphResourcesCreateUpdateGraphResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + graphName, + createUpdateGraphParameters, + options, + }, + spec: createUpdateGraphOperationSpec, + }); + const poller = await createHttpPoller< + GraphResourcesCreateUpdateGraphResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + async beginCreateUpdateGraphAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateGraph( + resourceGroupName, + accountName, + graphName, + createUpdateGraphParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + async beginDeleteGraphResource( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams, + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, graphName, options }, + spec: deleteGraphResourceOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + async beginDeleteGraphResourceAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams, + ): Promise { + const poller = await this.beginDeleteGraphResource( + resourceGroupName, + accountName, + graphName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listGraphsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GraphResourcesListResult, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getGraphOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateGraphOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + 201: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + 202: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + 204: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + }, + requestBody: Parameters.createUpdateGraphParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteGraphResourceOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName, + ], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts index 9b77aec8a3ca..a390f09ac9ca 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { GremlinResources } from "../operationsInterfaces"; +import { GremlinResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { GremlinDatabaseGetResults, GremlinResourcesListGremlinDatabasesOptionalParams, @@ -59,7 +59,7 @@ import { ContinuousBackupRestoreLocation, GremlinResourcesRetrieveContinuousBackupInformationOptionalParams, GremlinResourcesRetrieveContinuousBackupInformationResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing GremlinResources operations. */ @@ -1723,8 +1723,8 @@ const getGremlinGraphOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept], serializer, @@ -1753,8 +1753,8 @@ const createUpdateGremlinGraphOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1783,8 +1783,8 @@ const deleteGremlinGraphOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], serializer, }; @@ -1802,8 +1802,8 @@ const getGremlinGraphThroughputOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept], serializer, @@ -1832,8 +1832,8 @@ const updateGremlinGraphThroughputOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1865,8 +1865,8 @@ const migrateGremlinGraphToAutoscaleOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept], serializer, @@ -1898,8 +1898,8 @@ const migrateGremlinGraphToManualThroughputOperationSpec: coreClient.OperationSp Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept], serializer, @@ -1932,8 +1932,8 @@ const retrieveContinuousBackupInformationOperationSpec: coreClient.OperationSpec Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts index 96531b8c1b96..1aa7da1805c7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts @@ -6,40 +6,48 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./databaseAccounts"; -export * from "./operations"; -export * from "./database"; -export * from "./collection"; -export * from "./collectionRegion"; -export * from "./databaseAccountRegion"; -export * from "./percentileSourceTarget"; -export * from "./percentileTarget"; -export * from "./percentile"; -export * from "./collectionPartitionRegion"; -export * from "./collectionPartition"; -export * from "./partitionKeyRangeId"; -export * from "./partitionKeyRangeIdRegion"; -export * from "./sqlResources"; -export * from "./mongoDBResources"; -export * from "./tableResources"; -export * from "./cassandraResources"; -export * from "./gremlinResources"; -export * from "./locations"; -export * from "./cassandraClusters"; -export * from "./cassandraDataCenters"; -export * from "./notebookWorkspaces"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; -export * from "./restorableDatabaseAccounts"; -export * from "./restorableSqlDatabases"; -export * from "./restorableSqlContainers"; -export * from "./restorableSqlResources"; -export * from "./restorableMongodbDatabases"; -export * from "./restorableMongodbCollections"; -export * from "./restorableMongodbResources"; -export * from "./restorableGremlinDatabases"; -export * from "./restorableGremlinGraphs"; -export * from "./restorableGremlinResources"; -export * from "./restorableTables"; -export * from "./restorableTableResources"; -export * from "./service"; +export * from "./chaosFault.js"; +export * from "./databaseAccounts.js"; +export * from "./operations.js"; +export * from "./database.js"; +export * from "./collection.js"; +export * from "./collectionRegion.js"; +export * from "./databaseAccountRegion.js"; +export * from "./percentileSourceTarget.js"; +export * from "./percentileTarget.js"; +export * from "./percentile.js"; +export * from "./collectionPartitionRegion.js"; +export * from "./collectionPartition.js"; +export * from "./partitionKeyRangeId.js"; +export * from "./partitionKeyRangeIdRegion.js"; +export * from "./graphResources.js"; +export * from "./sqlResources.js"; +export * from "./mongoDBResources.js"; +export * from "./tableResources.js"; +export * from "./cassandraResources.js"; +export * from "./gremlinResources.js"; +export * from "./locations.js"; +export * from "./dataTransferJobs.js"; +export * from "./cassandraClusters.js"; +export * from "./cassandraDataCenters.js"; +export * from "./networkSecurityPerimeterConfigurations.js"; +export * from "./notebookWorkspaces.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; +export * from "./restorableDatabaseAccounts.js"; +export * from "./restorableSqlDatabases.js"; +export * from "./restorableSqlContainers.js"; +export * from "./restorableSqlResources.js"; +export * from "./restorableMongodbDatabases.js"; +export * from "./restorableMongodbCollections.js"; +export * from "./restorableMongodbResources.js"; +export * from "./restorableGremlinDatabases.js"; +export * from "./restorableGremlinGraphs.js"; +export * from "./restorableGremlinResources.js"; +export * from "./restorableTables.js"; +export * from "./restorableTableResources.js"; +export * from "./service.js"; +export * from "./throughputPools.js"; +export * from "./throughputPool.js"; +export * from "./throughputPoolAccounts.js"; +export * from "./throughputPoolAccount.js"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/locations.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/locations.ts index 8862acdaa757..8f062c99597e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/locations.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/locations.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Locations } from "../operationsInterfaces"; +import { Locations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { LocationGetResult, LocationsListOptionalParams, LocationsListResponse, LocationsGetOptionalParams, LocationsGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Locations operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts index c300057bce97..6b3151e84d2a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { MongoDBResources } from "../operationsInterfaces"; +import { MongoDBResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { MongoDBDatabaseGetResults, MongoDBResourcesListMongoDBDatabasesOptionalParams, @@ -47,6 +47,16 @@ import { MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleResponse, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse, + RetrieveThroughputParameters, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse, + MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse, MongoDBResourcesGetMongoDBCollectionOptionalParams, MongoDBResourcesGetMongoDBCollectionResponse, MongoDBCollectionCreateUpdateParameters, @@ -54,6 +64,11 @@ import { MongoDBResourcesCreateUpdateMongoDBCollectionResponse, MongoDBResourcesDeleteMongoDBCollectionOptionalParams, MongoDBResourcesDeleteMongoDBCollectionResponse, + MergeParameters, + MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + MongoDBResourcesMongoDBDatabasePartitionMergeResponse, + MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse, MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams, MongoDBResourcesGetMongoDBCollectionThroughputResponse, MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams, @@ -77,7 +92,7 @@ import { ContinuousBackupRestoreLocation, MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams, MongoDBResourcesRetrieveContinuousBackupInformationResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing MongoDBResources operations. */ @@ -917,6 +932,452 @@ export class MongoDBResourcesImpl implements MongoDBResources { return poller.pollUntilDone(); } + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB database. + * @param options The options parameters. + */ + async beginMongoDBDatabaseRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + options, + }, + spec: mongoDBDatabaseRetrieveThroughputDistributionOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB database. + * @param options The options parameters. + */ + async beginMongoDBDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise { + const poller = + await this.beginMongoDBDatabaseRetrieveThroughputDistribution( + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB database. + * @param options The options parameters. + */ + async beginMongoDBDatabaseRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options, + }, + spec: mongoDBDatabaseRedistributeThroughputOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB database. + * @param options The options parameters. + */ + async beginMongoDBDatabaseRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + ): Promise { + const poller = await this.beginMongoDBDatabaseRedistributeThroughput( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB container. + * @param options The options parameters. + */ + async beginMongoDBContainerRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + collectionName, + retrieveThroughputParameters, + options, + }, + spec: mongoDBContainerRetrieveThroughputDistributionOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB container. + * @param options The options parameters. + */ + async beginMongoDBContainerRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + ): Promise { + const poller = + await this.beginMongoDBContainerRetrieveThroughputDistribution( + resourceGroupName, + accountName, + databaseName, + collectionName, + retrieveThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB container. + * @param options The options parameters. + */ + async beginMongoDBContainerRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + collectionName, + redistributeThroughputParameters, + options, + }, + spec: mongoDBContainerRedistributeThroughputOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB container. + * @param options The options parameters. + */ + async beginMongoDBContainerRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + ): Promise { + const poller = await this.beginMongoDBContainerRedistributeThroughput( + resourceGroupName, + accountName, + databaseName, + collectionName, + redistributeThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + /** * Lists the MongoDB collection under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -937,53 +1398,268 @@ export class MongoDBResourcesImpl implements MongoDBResources { } /** - * Gets the MongoDB collection under an existing Azure Cosmos DB database account. + * Gets the MongoDB collection under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param options The options parameters. + */ + getMongoDBCollection( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + options?: MongoDBResourcesGetMongoDBCollectionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, databaseName, collectionName, options }, + getMongoDBCollectionOperationSpec, + ); + } + + /** + * Create or update an Azure Cosmos DB MongoDB Collection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB + * Collection. + * @param options The options parameters. + */ + async beginCreateUpdateMongoDBCollection( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters, + options?: MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesCreateUpdateMongoDBCollectionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + collectionName, + createUpdateMongoDBCollectionParameters, + options, + }, + spec: createUpdateMongoDBCollectionOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesCreateUpdateMongoDBCollectionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update an Azure Cosmos DB MongoDB Collection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB + * Collection. + * @param options The options parameters. + */ + async beginCreateUpdateMongoDBCollectionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters, + options?: MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateMongoDBCollection( + resourceGroupName, + accountName, + databaseName, + collectionName, + createUpdateMongoDBCollectionParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB MongoDB Collection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param options The options parameters. + */ + async beginDeleteMongoDBCollection( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesDeleteMongoDBCollectionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + collectionName, + options, + }, + spec: deleteMongoDBCollectionOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesDeleteMongoDBCollectionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB MongoDB Collection. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. * @param options The options parameters. */ - getMongoDBCollection( + async beginDeleteMongoDBCollectionAndWait( resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, - options?: MongoDBResourcesGetMongoDBCollectionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, accountName, databaseName, collectionName, options }, - getMongoDBCollectionOperationSpec, + options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, + ): Promise { + const poller = await this.beginDeleteMongoDBCollection( + resourceGroupName, + accountName, + databaseName, + collectionName, + options, ); + return poller.pollUntilDone(); } /** - * Create or update an Azure Cosmos DB MongoDB Collection + * Merges the partitions of a MongoDB database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param collectionName Cosmos DB collection name. - * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB - * Collection. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - async beginCreateUpdateMongoDBCollection( + async beginMongoDBDatabasePartitionMerge( resourceGroupName: string, accountName: string, databaseName: string, - collectionName: string, - createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters, - options?: MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, + mergeParameters: MergeParameters, + options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, ): Promise< SimplePollerLike< - OperationState, - MongoDBResourcesCreateUpdateMongoDBCollectionResponse + OperationState, + MongoDBResourcesMongoDBDatabasePartitionMergeResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -1024,76 +1700,74 @@ export class MongoDBResourcesImpl implements MongoDBResources { resourceGroupName, accountName, databaseName, - collectionName, - createUpdateMongoDBCollectionParameters, + mergeParameters, options, }, - spec: createUpdateMongoDBCollectionOperationSpec, + spec: mongoDBDatabasePartitionMergeOperationSpec, }); const poller = await createHttpPoller< - MongoDBResourcesCreateUpdateMongoDBCollectionResponse, - OperationState + MongoDBResourcesMongoDBDatabasePartitionMergeResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Create or update an Azure Cosmos DB MongoDB Collection + * Merges the partitions of a MongoDB database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param collectionName Cosmos DB collection name. - * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB - * Collection. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - async beginCreateUpdateMongoDBCollectionAndWait( + async beginMongoDBDatabasePartitionMergeAndWait( resourceGroupName: string, accountName: string, databaseName: string, - collectionName: string, - createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters, - options?: MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateMongoDBCollection( + mergeParameters: MergeParameters, + options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + ): Promise { + const poller = await this.beginMongoDBDatabasePartitionMerge( resourceGroupName, accountName, databaseName, - collectionName, - createUpdateMongoDBCollectionParameters, + mergeParameters, options, ); return poller.pollUntilDone(); } /** - * Deletes an existing Azure Cosmos DB MongoDB Collection. + * Merges the partitions of a MongoDB Collection * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - async beginDeleteMongoDBCollection( + async beginListMongoDBCollectionPartitionMerge( resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, - options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, ): Promise< SimplePollerLike< - OperationState, - MongoDBResourcesDeleteMongoDBCollectionResponse + OperationState, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -1135,41 +1809,46 @@ export class MongoDBResourcesImpl implements MongoDBResources { accountName, databaseName, collectionName, + mergeParameters, options, }, - spec: deleteMongoDBCollectionOperationSpec, + spec: listMongoDBCollectionPartitionMergeOperationSpec, }); const poller = await createHttpPoller< - MongoDBResourcesDeleteMongoDBCollectionResponse, - OperationState + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Deletes an existing Azure Cosmos DB MongoDB Collection. + * Merges the partitions of a MongoDB Collection * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - async beginDeleteMongoDBCollectionAndWait( + async beginListMongoDBCollectionPartitionMergeAndWait( resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, - options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, - ): Promise { - const poller = await this.beginDeleteMongoDBCollection( + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + ): Promise { + const poller = await this.beginListMongoDBCollectionPartitionMerge( resourceGroupName, accountName, databaseName, collectionName, + mergeParameters, options, ); return poller.pollUntilDone(); @@ -2303,6 +2982,144 @@ const migrateMongoDBDatabaseToManualThroughputOperationSpec: coreClient.Operatio headerParameters: [Parameters.accept], serializer, }; +const mongoDBDatabaseRetrieveThroughputDistributionOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.retrieveThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const mongoDBDatabaseRedistributeThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.redistributeThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const mongoDBContainerRetrieveThroughputDistributionOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.retrieveThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const mongoDBContainerRedistributeThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.redistributeThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; const listMongoDBCollectionsOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections", httpMethod: "GET", @@ -2401,6 +3218,74 @@ const deleteMongoDBCollectionOperationSpec: coreClient.OperationSpec = { ], serializer, }; +const mongoDBDatabasePartitionMergeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/partitionMerge", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.mergeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listMongoDBCollectionPartitionMergeOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.mergeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; const getMongoDBCollectionThroughputOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default", httpMethod: "GET", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/networkSecurityPerimeterConfigurations.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/networkSecurityPerimeterConfigurations.ts new file mode 100644 index 000000000000..106ce77d679c --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/networkSecurityPerimeterConfigurations.ts @@ -0,0 +1,389 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; +import { NetworkSecurityPerimeterConfigurations } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl.js"; +import { + NetworkSecurityPerimeterConfiguration, + NetworkSecurityPerimeterConfigurationsListNextOptionalParams, + NetworkSecurityPerimeterConfigurationsListOptionalParams, + NetworkSecurityPerimeterConfigurationsListResponse, + NetworkSecurityPerimeterConfigurationsGetOptionalParams, + NetworkSecurityPerimeterConfigurationsGetResponse, + NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + NetworkSecurityPerimeterConfigurationsReconcileResponse, + NetworkSecurityPerimeterConfigurationsListNextResponse, +} from "../models/index.js"; + +/// +/** Class containing NetworkSecurityPerimeterConfigurations operations. */ +export class NetworkSecurityPerimeterConfigurationsImpl + implements NetworkSecurityPerimeterConfigurations +{ + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class NetworkSecurityPerimeterConfigurations class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Gets list of effective Network Security Perimeter Configuration for cosmos db account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: NetworkSecurityPerimeterConfigurationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, accountName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Gets list of effective Network Security Perimeter Configuration for cosmos db account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec, + ); + } + + /** + * Gets effective Network Security Perimeter Configuration for association + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + options, + }, + getOperationSpec, + ); + } + + /** + * Refreshes any information about the association. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + async beginReconcile( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + NetworkSecurityPerimeterConfigurationsReconcileResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + options, + }, + spec: reconcileOperationSpec, + }); + const poller = await createHttpPoller< + NetworkSecurityPerimeterConfigurationsReconcileResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Refreshes any information about the association. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + async beginReconcileAndWait( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise { + const poller = await this.beginReconcile( + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: NetworkSecurityPerimeterConfigurationsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/networkSecurityPerimeterConfigurations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.networkSecurityPerimeterConfigurationName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const reconcileOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders, + }, + 201: { + headersMapper: + Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders, + }, + 202: { + headersMapper: + Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders, + }, + 204: { + headersMapper: + Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.networkSecurityPerimeterConfigurationName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/notebookWorkspaces.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/notebookWorkspaces.ts index 5958792308a6..ffd2d6c1db54 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/notebookWorkspaces.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/notebookWorkspaces.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { NotebookWorkspaces } from "../operationsInterfaces"; +import { NotebookWorkspaces } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { NotebookWorkspace, NotebookWorkspacesListByDatabaseAccountOptionalParams, @@ -33,7 +33,7 @@ import { NotebookWorkspacesListConnectionInfoResponse, NotebookWorkspacesRegenerateAuthTokenOptionalParams, NotebookWorkspacesStartOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Class containing NotebookWorkspaces operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/operations.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/operations.ts index 7fc96a8c3844..3f041859ab68 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/operations.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeId.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeId.ts index 33850a65c078..3b95dea053c0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeId.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeId.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PartitionKeyRangeId } from "../operationsInterfaces"; +import { PartitionKeyRangeId } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { PartitionMetric, PartitionKeyRangeIdListMetricsOptionalParams, PartitionKeyRangeIdListMetricsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PartitionKeyRangeId operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeIdRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeIdRegion.ts index a73f1bb8999f..f9ffe1a9320f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeIdRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeIdRegion.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PartitionKeyRangeIdRegion } from "../operationsInterfaces"; +import { PartitionKeyRangeIdRegion } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { PartitionMetric, PartitionKeyRangeIdRegionListMetricsOptionalParams, PartitionKeyRangeIdRegionListMetricsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PartitionKeyRangeIdRegion operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentile.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentile.ts index 5bc80391ddd9..c8c3d7b219ad 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentile.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentile.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Percentile } from "../operationsInterfaces"; +import { Percentile } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { PercentileMetric, PercentileListMetricsOptionalParams, PercentileListMetricsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Percentile operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileSourceTarget.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileSourceTarget.ts index 7cae76929a24..73837a319950 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileSourceTarget.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileSourceTarget.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PercentileSourceTarget } from "../operationsInterfaces"; +import { PercentileSourceTarget } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { PercentileMetric, PercentileSourceTargetListMetricsOptionalParams, PercentileSourceTargetListMetricsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PercentileSourceTarget operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileTarget.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileTarget.ts index 26b515a1aa20..055759598b53 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileTarget.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileTarget.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PercentileTarget } from "../operationsInterfaces"; +import { PercentileTarget } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { PercentileMetric, PercentileTargetListMetricsOptionalParams, PercentileTargetListMetricsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PercentileTarget operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts index 181a58c003e3..a74096ea0b3f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateEndpointConnections } from "../operationsInterfaces"; +import { PrivateEndpointConnections } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByDatabaseAccountOptionalParams, @@ -27,7 +27,7 @@ import { PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, PrivateEndpointConnectionsDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateEndpointConnections operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateLinkResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateLinkResources.ts index b547cb9473bd..eb6870439d73 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateLinkResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateLinkResources.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateLinkResources } from "../operationsInterfaces"; +import { PrivateLinkResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { PrivateLinkResource, PrivateLinkResourcesListByDatabaseAccountOptionalParams, PrivateLinkResourcesListByDatabaseAccountResponse, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateLinkResources operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableDatabaseAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableDatabaseAccounts.ts index 242010d63096..fee0e173b070 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableDatabaseAccounts.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableDatabaseAccounts.ts @@ -7,11 +7,11 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableDatabaseAccounts } from "../operationsInterfaces"; +import { RestorableDatabaseAccounts } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableDatabaseAccountGetResult, RestorableDatabaseAccountsListByLocationOptionalParams, @@ -20,7 +20,7 @@ import { RestorableDatabaseAccountsListResponse, RestorableDatabaseAccountsGetByLocationOptionalParams, RestorableDatabaseAccountsGetByLocationResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableDatabaseAccounts operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts index c024a18ae97b..116cad705e73 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableGremlinDatabases } from "../operationsInterfaces"; +import { RestorableGremlinDatabases } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableGremlinDatabaseGetResult, RestorableGremlinDatabasesListOptionalParams, RestorableGremlinDatabasesListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableGremlinDatabases operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts index 4117ada1d84e..5b9cda792836 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableGremlinGraphs } from "../operationsInterfaces"; +import { RestorableGremlinGraphs } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableGremlinGraphGetResult, RestorableGremlinGraphsListOptionalParams, RestorableGremlinGraphsListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableGremlinGraphs operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts index 1ba63556b391..ed1325ee67e3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableGremlinResources } from "../operationsInterfaces"; +import { RestorableGremlinResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableGremlinResourcesGetResult, RestorableGremlinResourcesListOptionalParams, RestorableGremlinResourcesListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableGremlinResources operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts index 6ceb9521c6b3..3c3e84b7dd0d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableMongodbCollections } from "../operationsInterfaces"; +import { RestorableMongodbCollections } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableMongodbCollectionGetResult, RestorableMongodbCollectionsListOptionalParams, RestorableMongodbCollectionsListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableMongodbCollections operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbDatabases.ts index 5a5f8334c7f1..192e5fe916a5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbDatabases.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbDatabases.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableMongodbDatabases } from "../operationsInterfaces"; +import { RestorableMongodbDatabases } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableMongodbDatabaseGetResult, RestorableMongodbDatabasesListOptionalParams, RestorableMongodbDatabasesListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableMongodbDatabases operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbResources.ts index 074e5fbaa01d..b3f1a902d968 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbResources.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableMongodbResources } from "../operationsInterfaces"; +import { RestorableMongodbResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableMongodbResourcesGetResult, RestorableMongodbResourcesListOptionalParams, RestorableMongodbResourcesListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableMongodbResources operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlContainers.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlContainers.ts index 170c9ab3514e..2de88b147ad9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlContainers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlContainers.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableSqlContainers } from "../operationsInterfaces"; +import { RestorableSqlContainers } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableSqlContainerGetResult, RestorableSqlContainersListOptionalParams, RestorableSqlContainersListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableSqlContainers operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlDatabases.ts index 950816ebbc68..853f6c98f1f8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlDatabases.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlDatabases.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableSqlDatabases } from "../operationsInterfaces"; +import { RestorableSqlDatabases } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableSqlDatabaseGetResult, RestorableSqlDatabasesListOptionalParams, RestorableSqlDatabasesListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableSqlDatabases operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlResources.ts index bd7e4bd02bae..440938d80724 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableSqlResources.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableSqlResources } from "../operationsInterfaces"; +import { RestorableSqlResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableSqlResourcesGetResult, RestorableSqlResourcesListOptionalParams, RestorableSqlResourcesListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableSqlResources operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts index 665da79b4ef6..e7908bf65f99 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableTableResources } from "../operationsInterfaces"; +import { RestorableTableResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableTableResourcesGetResult, RestorableTableResourcesListOptionalParams, RestorableTableResourcesListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableTableResources operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts index f1091686d3aa..e43182540102 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { RestorableTables } from "../operationsInterfaces"; +import { RestorableTables } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { RestorableTableGetResult, RestorableTablesListOptionalParams, RestorableTablesListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RestorableTables operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/service.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/service.ts index 33db45e5a8a7..447edf69b0b2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/service.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/service.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Service } from "../operationsInterfaces"; +import { Service } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { ServiceResource, ServiceListOptionalParams, @@ -28,7 +28,7 @@ import { ServiceGetOptionalParams, ServiceGetResponse, ServiceDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Service operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts index 014f07fa1589..5c2d123528b4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts @@ -7,27 +7,27 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { SqlResources } from "../operationsInterfaces"; +import { SqlResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { SqlDatabaseGetResults, SqlResourcesListSqlDatabasesOptionalParams, SqlResourcesListSqlDatabasesResponse, - SqlContainerGetResults, - SqlResourcesListSqlContainersOptionalParams, - SqlResourcesListSqlContainersResponse, ClientEncryptionKeyGetResults, SqlResourcesListClientEncryptionKeysOptionalParams, SqlResourcesListClientEncryptionKeysResponse, + SqlContainerGetResults, + SqlResourcesListSqlContainersOptionalParams, + SqlResourcesListSqlContainersResponse, SqlStoredProcedureGetResults, SqlResourcesListSqlStoredProceduresOptionalParams, SqlResourcesListSqlStoredProceduresResponse, @@ -59,6 +59,11 @@ import { SqlResourcesMigrateSqlDatabaseToAutoscaleResponse, SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams, SqlResourcesMigrateSqlDatabaseToManualThroughputResponse, + SqlResourcesGetClientEncryptionKeyOptionalParams, + SqlResourcesGetClientEncryptionKeyResponse, + ClientEncryptionKeyCreateUpdateParameters, + SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + SqlResourcesCreateUpdateClientEncryptionKeyResponse, SqlResourcesGetSqlContainerOptionalParams, SqlResourcesGetSqlContainerResponse, SqlContainerCreateUpdateParameters, @@ -66,6 +71,11 @@ import { SqlResourcesCreateUpdateSqlContainerResponse, SqlResourcesDeleteSqlContainerOptionalParams, SqlResourcesDeleteSqlContainerResponse, + MergeParameters, + SqlResourcesSqlDatabasePartitionMergeOptionalParams, + SqlResourcesSqlDatabasePartitionMergeResponse, + SqlResourcesListSqlContainerPartitionMergeOptionalParams, + SqlResourcesListSqlContainerPartitionMergeResponse, SqlResourcesGetSqlContainerThroughputOptionalParams, SqlResourcesGetSqlContainerThroughputResponse, SqlResourcesUpdateSqlContainerThroughputOptionalParams, @@ -74,11 +84,16 @@ import { SqlResourcesMigrateSqlContainerToAutoscaleResponse, SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams, SqlResourcesMigrateSqlContainerToManualThroughputResponse, - SqlResourcesGetClientEncryptionKeyOptionalParams, - SqlResourcesGetClientEncryptionKeyResponse, - ClientEncryptionKeyCreateUpdateParameters, - SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, - SqlResourcesCreateUpdateClientEncryptionKeyResponse, + RetrieveThroughputParameters, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + SqlResourcesSqlDatabaseRedistributeThroughputResponse, + SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse, + SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + SqlResourcesSqlContainerRedistributeThroughputResponse, SqlResourcesGetSqlStoredProcedureOptionalParams, SqlResourcesGetSqlStoredProcedureResponse, SqlStoredProcedureCreateUpdateParameters, @@ -115,7 +130,7 @@ import { ContinuousBackupRestoreLocation, SqlResourcesRetrieveContinuousBackupInformationOptionalParams, SqlResourcesRetrieveContinuousBackupInformationResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing SqlResources operations. */ @@ -197,19 +212,19 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Lists the SQL container under an existing Azure Cosmos DB database account. + * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The options parameters. */ - public listSqlContainers( + public listClientEncryptionKeys( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListSqlContainersOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listSqlContainersPagingAll( + options?: SqlResourcesListClientEncryptionKeysOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listClientEncryptionKeysPagingAll( resourceGroupName, accountName, databaseName, @@ -226,7 +241,7 @@ export class SqlResourcesImpl implements SqlResources { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listSqlContainersPagingPage( + return this.listClientEncryptionKeysPagingPage( resourceGroupName, accountName, databaseName, @@ -237,15 +252,15 @@ export class SqlResourcesImpl implements SqlResources { }; } - private async *listSqlContainersPagingPage( + private async *listClientEncryptionKeysPagingPage( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListSqlContainersOptionalParams, + options?: SqlResourcesListClientEncryptionKeysOptionalParams, _settings?: PageSettings, - ): AsyncIterableIterator { - let result: SqlResourcesListSqlContainersResponse; - result = await this._listSqlContainers( + ): AsyncIterableIterator { + let result: SqlResourcesListClientEncryptionKeysResponse; + result = await this._listClientEncryptionKeys( resourceGroupName, accountName, databaseName, @@ -254,13 +269,13 @@ export class SqlResourcesImpl implements SqlResources { yield result.value || []; } - private async *listSqlContainersPagingAll( + private async *listClientEncryptionKeysPagingAll( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListSqlContainersOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listSqlContainersPagingPage( + options?: SqlResourcesListClientEncryptionKeysOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listClientEncryptionKeysPagingPage( resourceGroupName, accountName, databaseName, @@ -271,19 +286,19 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. + * Lists the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The options parameters. */ - public listClientEncryptionKeys( + public listSqlContainers( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listClientEncryptionKeysPagingAll( + options?: SqlResourcesListSqlContainersOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listSqlContainersPagingAll( resourceGroupName, accountName, databaseName, @@ -300,7 +315,7 @@ export class SqlResourcesImpl implements SqlResources { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listClientEncryptionKeysPagingPage( + return this.listSqlContainersPagingPage( resourceGroupName, accountName, databaseName, @@ -311,15 +326,15 @@ export class SqlResourcesImpl implements SqlResources { }; } - private async *listClientEncryptionKeysPagingPage( + private async *listSqlContainersPagingPage( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, + options?: SqlResourcesListSqlContainersOptionalParams, _settings?: PageSettings, - ): AsyncIterableIterator { - let result: SqlResourcesListClientEncryptionKeysResponse; - result = await this._listClientEncryptionKeys( + ): AsyncIterableIterator { + let result: SqlResourcesListSqlContainersResponse; + result = await this._listSqlContainers( resourceGroupName, accountName, databaseName, @@ -328,13 +343,13 @@ export class SqlResourcesImpl implements SqlResources { yield result.value || []; } - private async *listClientEncryptionKeysPagingAll( + private async *listSqlContainersPagingAll( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listClientEncryptionKeysPagingPage( + options?: SqlResourcesListSqlContainersOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listSqlContainersPagingPage( resourceGroupName, accountName, databaseName, @@ -1272,6 +1287,167 @@ export class SqlResourcesImpl implements SqlResources { return poller.pollUntilDone(); } + /** + * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param options The options parameters. + */ + private _listClientEncryptionKeys( + resourceGroupName: string, + accountName: string, + databaseName: string, + options?: SqlResourcesListClientEncryptionKeysOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, databaseName, options }, + listClientEncryptionKeysOperationSpec, + ); + } + + /** + * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param options The options parameters. + */ + getClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + options?: SqlResourcesGetClientEncryptionKeyOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + databaseName, + clientEncryptionKeyName, + options, + }, + getClientEncryptionKeyOperationSpec, + ); + } + + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + async beginCreateUpdateClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesCreateUpdateClientEncryptionKeyResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + clientEncryptionKeyName, + createUpdateClientEncryptionKeyParameters, + options, + }, + spec: createUpdateClientEncryptionKeyOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesCreateUpdateClientEncryptionKeyResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + async beginCreateUpdateClientEncryptionKeyAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateClientEncryptionKey( + resourceGroupName, + accountName, + databaseName, + clientEncryptionKeyName, + createUpdateClientEncryptionKeyParameters, + options, + ); + return poller.pollUntilDone(); + } + /** * Lists the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1529,33 +1705,251 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. + * Merges the partitions of a SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - getSqlContainerThroughput( + async beginSqlDatabasePartitionMerge( resourceGroupName: string, accountName: string, databaseName: string, - containerName: string, - options?: SqlResourcesGetSqlContainerThroughputOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, accountName, databaseName, containerName, options }, - getSqlContainerThroughputOperationSpec, - ); - } - - /** - * Update RUs per second of an Azure Cosmos DB SQL container - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Cosmos DB database account name. - * @param databaseName Cosmos DB database name. - * @param containerName Cosmos DB container name. - * @param updateThroughputParameters The parameters to provide for the RUs per second of the current + mergeParameters: MergeParameters, + options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlDatabasePartitionMergeResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + mergeParameters, + options, + }, + spec: sqlDatabasePartitionMergeOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesSqlDatabasePartitionMergeResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Merges the partitions of a SQL database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + async beginSqlDatabasePartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams, + ): Promise { + const poller = await this.beginSqlDatabasePartitionMerge( + resourceGroupName, + accountName, + databaseName, + mergeParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Merges the partitions of a SQL Container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + async beginListSqlContainerPartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesListSqlContainerPartitionMergeResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + containerName, + mergeParameters, + options, + }, + spec: listSqlContainerPartitionMergeOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesListSqlContainerPartitionMergeResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Merges the partitions of a SQL Container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + async beginListSqlContainerPartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams, + ): Promise { + const poller = await this.beginListSqlContainerPartitionMerge( + resourceGroupName, + accountName, + databaseName, + containerName, + mergeParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param options The options parameters. + */ + getSqlContainerThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + options?: SqlResourcesGetSqlContainerThroughputOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, databaseName, containerName, options }, + getSqlContainerThroughputOperationSpec, + ); + } + + /** + * Update RUs per second of an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param updateThroughputParameters The parameters to provide for the RUs per second of the current * SQL container. * @param options The options parameters. */ @@ -1873,79 +2267,30 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Cosmos DB database account name. - * @param databaseName Cosmos DB database name. - * @param options The options parameters. - */ - private _listClientEncryptionKeys( - resourceGroupName: string, - accountName: string, - databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, accountName, databaseName, options }, - listClientEncryptionKeysOperationSpec, - ); - } - - /** - * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Cosmos DB database account name. - * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param options The options parameters. - */ - getClientEncryptionKey( - resourceGroupName: string, - accountName: string, - databaseName: string, - clientEncryptionKeyName: string, - options?: SqlResourcesGetClientEncryptionKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - databaseName, - clientEncryptionKeyName, - options, - }, - getClientEncryptionKeyOperationSpec, - ); - } - - /** - * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure - * Powershell (instead of directly). + * Retrieve throughput distribution for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption - * key. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. * @param options The options parameters. */ - async beginCreateUpdateClientEncryptionKey( + async beginSqlDatabaseRetrieveThroughputDistribution( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, - options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateClientEncryptionKeyResponse + OperationState, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -1986,133 +2331,184 @@ export class SqlResourcesImpl implements SqlResources { resourceGroupName, accountName, databaseName, - clientEncryptionKeyName, - createUpdateClientEncryptionKeyParameters, + retrieveThroughputParameters, options, }, - spec: createUpdateClientEncryptionKeyOperationSpec, + spec: sqlDatabaseRetrieveThroughputDistributionOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateClientEncryptionKeyResponse, - OperationState + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure - * Powershell (instead of directly). + * Retrieve throughput distribution for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption - * key. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. * @param options The options parameters. */ - async beginCreateUpdateClientEncryptionKeyAndWait( + async beginSqlDatabaseRetrieveThroughputDistributionAndWait( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, - options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateClientEncryptionKey( + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise { + const poller = await this.beginSqlDatabaseRetrieveThroughputDistribution( resourceGroupName, accountName, databaseName, - clientEncryptionKeyName, - createUpdateClientEncryptionKeyParameters, + retrieveThroughputParameters, options, ); return poller.pollUntilDone(); } /** - * Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. + * Redistribute throughput for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param containerName Cosmos DB container name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL database. * @param options The options parameters. */ - private _listSqlStoredProcedures( + async beginSqlDatabaseRedistributeThroughput( resourceGroupName: string, accountName: string, databaseName: string, - containerName: string, - options?: SqlResourcesListSqlStoredProceduresOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, accountName, databaseName, containerName, options }, - listSqlStoredProceduresOperationSpec, - ); + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlDatabaseRedistributeThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options, + }, + spec: sqlDatabaseRedistributeThroughputOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesSqlDatabaseRedistributeThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; } /** - * Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. + * Redistribute throughput for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL database. * @param options The options parameters. */ - getSqlStoredProcedure( + async beginSqlDatabaseRedistributeThroughputAndWait( resourceGroupName: string, accountName: string, databaseName: string, - containerName: string, - storedProcedureName: string, - options?: SqlResourcesGetSqlStoredProcedureOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - databaseName, - containerName, - storedProcedureName, - options, - }, - getSqlStoredProcedureOperationSpec, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + ): Promise { + const poller = await this.beginSqlDatabaseRedistributeThroughput( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options, ); + return poller.pollUntilDone(); } /** - * Create or update an Azure Cosmos DB SQL storedProcedure + * Retrieve throughput distribution for an Azure Cosmos DB SQL container * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. - * @param createUpdateSqlStoredProcedureParameters The parameters to provide for the current SQL - * storedProcedure. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL container. * @param options The options parameters. */ - async beginCreateUpdateSqlStoredProcedure( + async beginSqlContainerRetrieveThroughputDistribution( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - storedProcedureName: string, - createUpdateSqlStoredProcedureParameters: SqlStoredProcedureCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateSqlStoredProcedureResponse + OperationState, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2154,81 +2550,79 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - storedProcedureName, - createUpdateSqlStoredProcedureParameters, + retrieveThroughputParameters, options, }, - spec: createUpdateSqlStoredProcedureOperationSpec, + spec: sqlContainerRetrieveThroughputDistributionOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateSqlStoredProcedureResponse, - OperationState + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Create or update an Azure Cosmos DB SQL storedProcedure + * Retrieve throughput distribution for an Azure Cosmos DB SQL container * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. - * @param createUpdateSqlStoredProcedureParameters The parameters to provide for the current SQL - * storedProcedure. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL container. * @param options The options parameters. */ - async beginCreateUpdateSqlStoredProcedureAndWait( + async beginSqlContainerRetrieveThroughputDistributionAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - storedProcedureName: string, - createUpdateSqlStoredProcedureParameters: SqlStoredProcedureCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateSqlStoredProcedure( + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + ): Promise { + const poller = await this.beginSqlContainerRetrieveThroughputDistribution( resourceGroupName, accountName, databaseName, containerName, - storedProcedureName, - createUpdateSqlStoredProcedureParameters, + retrieveThroughputParameters, options, ); return poller.pollUntilDone(); } /** - * Deletes an existing Azure Cosmos DB SQL storedProcedure. + * Redistribute throughput for an Azure Cosmos DB SQL container * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL container. * @param options The options parameters. */ - async beginDeleteSqlStoredProcedure( + async beginSqlContainerRedistributeThroughput( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - storedProcedureName: string, - options?: SqlResourcesDeleteSqlStoredProcedureOptionalParams, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesDeleteSqlStoredProcedureResponse + OperationState, + SqlResourcesSqlContainerRedistributeThroughputResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2270,130 +2664,132 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - storedProcedureName, + redistributeThroughputParameters, options, }, - spec: deleteSqlStoredProcedureOperationSpec, + spec: sqlContainerRedistributeThroughputOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesDeleteSqlStoredProcedureResponse, - OperationState + SqlResourcesSqlContainerRedistributeThroughputResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Deletes an existing Azure Cosmos DB SQL storedProcedure. + * Redistribute throughput for an Azure Cosmos DB SQL container * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL container. * @param options The options parameters. */ - async beginDeleteSqlStoredProcedureAndWait( + async beginSqlContainerRedistributeThroughputAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - storedProcedureName: string, - options?: SqlResourcesDeleteSqlStoredProcedureOptionalParams, - ): Promise { - const poller = await this.beginDeleteSqlStoredProcedure( + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + ): Promise { + const poller = await this.beginSqlContainerRedistributeThroughput( resourceGroupName, accountName, databaseName, containerName, - storedProcedureName, + redistributeThroughputParameters, options, ); return poller.pollUntilDone(); } /** - * Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. + * Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. * @param options The options parameters. */ - private _listSqlUserDefinedFunctions( + private _listSqlStoredProcedures( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - options?: SqlResourcesListSqlUserDefinedFunctionsOptionalParams, - ): Promise { + options?: SqlResourcesListSqlStoredProceduresOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, databaseName, containerName, options }, - listSqlUserDefinedFunctionsOperationSpec, + listSqlStoredProceduresOperationSpec, ); } /** - * Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. + * Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param storedProcedureName Cosmos DB storedProcedure name. * @param options The options parameters. */ - getSqlUserDefinedFunction( + getSqlStoredProcedure( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - options?: SqlResourcesGetSqlUserDefinedFunctionOptionalParams, - ): Promise { + storedProcedureName: string, + options?: SqlResourcesGetSqlStoredProcedureOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, databaseName, containerName, - userDefinedFunctionName, + storedProcedureName, options, }, - getSqlUserDefinedFunctionOperationSpec, + getSqlStoredProcedureOperationSpec, ); } /** - * Create or update an Azure Cosmos DB SQL userDefinedFunction + * Create or update an Azure Cosmos DB SQL storedProcedure * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. - * @param createUpdateSqlUserDefinedFunctionParameters The parameters to provide for the current SQL - * userDefinedFunction. + * @param storedProcedureName Cosmos DB storedProcedure name. + * @param createUpdateSqlStoredProcedureParameters The parameters to provide for the current SQL + * storedProcedure. * @param options The options parameters. */ - async beginCreateUpdateSqlUserDefinedFunction( + async beginCreateUpdateSqlStoredProcedure( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - createUpdateSqlUserDefinedFunctionParameters: SqlUserDefinedFunctionCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams, + storedProcedureName: string, + createUpdateSqlStoredProcedureParameters: SqlStoredProcedureCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse + OperationState, + SqlResourcesCreateUpdateSqlStoredProcedureResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2435,15 +2831,15 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - userDefinedFunctionName, - createUpdateSqlUserDefinedFunctionParameters, + storedProcedureName, + createUpdateSqlStoredProcedureParameters, options, }, - spec: createUpdateSqlUserDefinedFunctionOperationSpec, + spec: createUpdateSqlStoredProcedureOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse, - OperationState + SqlResourcesCreateUpdateSqlStoredProcedureResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2453,63 +2849,63 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Create or update an Azure Cosmos DB SQL userDefinedFunction + * Create or update an Azure Cosmos DB SQL storedProcedure * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. - * @param createUpdateSqlUserDefinedFunctionParameters The parameters to provide for the current SQL - * userDefinedFunction. + * @param storedProcedureName Cosmos DB storedProcedure name. + * @param createUpdateSqlStoredProcedureParameters The parameters to provide for the current SQL + * storedProcedure. * @param options The options parameters. */ - async beginCreateUpdateSqlUserDefinedFunctionAndWait( + async beginCreateUpdateSqlStoredProcedureAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - createUpdateSqlUserDefinedFunctionParameters: SqlUserDefinedFunctionCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateSqlUserDefinedFunction( + storedProcedureName: string, + createUpdateSqlStoredProcedureParameters: SqlStoredProcedureCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateSqlStoredProcedure( resourceGroupName, accountName, databaseName, containerName, - userDefinedFunctionName, - createUpdateSqlUserDefinedFunctionParameters, + storedProcedureName, + createUpdateSqlStoredProcedureParameters, options, ); return poller.pollUntilDone(); } /** - * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. + * Deletes an existing Azure Cosmos DB SQL storedProcedure. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param storedProcedureName Cosmos DB storedProcedure name. * @param options The options parameters. */ - async beginDeleteSqlUserDefinedFunction( + async beginDeleteSqlStoredProcedure( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams, + storedProcedureName: string, + options?: SqlResourcesDeleteSqlStoredProcedureOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesDeleteSqlUserDefinedFunctionResponse + OperationState, + SqlResourcesDeleteSqlStoredProcedureResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2551,14 +2947,14 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - userDefinedFunctionName, + storedProcedureName, options, }, - spec: deleteSqlUserDefinedFunctionOperationSpec, + spec: deleteSqlStoredProcedureOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesDeleteSqlUserDefinedFunctionResponse, - OperationState + SqlResourcesDeleteSqlStoredProcedureResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2568,112 +2964,113 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. + * Deletes an existing Azure Cosmos DB SQL storedProcedure. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param storedProcedureName Cosmos DB storedProcedure name. * @param options The options parameters. */ - async beginDeleteSqlUserDefinedFunctionAndWait( + async beginDeleteSqlStoredProcedureAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams, - ): Promise { - const poller = await this.beginDeleteSqlUserDefinedFunction( + storedProcedureName: string, + options?: SqlResourcesDeleteSqlStoredProcedureOptionalParams, + ): Promise { + const poller = await this.beginDeleteSqlStoredProcedure( resourceGroupName, accountName, databaseName, containerName, - userDefinedFunctionName, + storedProcedureName, options, ); return poller.pollUntilDone(); } /** - * Lists the SQL trigger under an existing Azure Cosmos DB database account. + * Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. * @param options The options parameters. */ - private _listSqlTriggers( + private _listSqlUserDefinedFunctions( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - options?: SqlResourcesListSqlTriggersOptionalParams, - ): Promise { + options?: SqlResourcesListSqlUserDefinedFunctionsOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, databaseName, containerName, options }, - listSqlTriggersOperationSpec, + listSqlUserDefinedFunctionsOperationSpec, ); } /** - * Gets the SQL trigger under an existing Azure Cosmos DB database account. + * Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. * @param options The options parameters. */ - getSqlTrigger( + getSqlUserDefinedFunction( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - options?: SqlResourcesGetSqlTriggerOptionalParams, - ): Promise { + userDefinedFunctionName: string, + options?: SqlResourcesGetSqlUserDefinedFunctionOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, databaseName, containerName, - triggerName, + userDefinedFunctionName, options, }, - getSqlTriggerOperationSpec, + getSqlUserDefinedFunctionOperationSpec, ); } /** - * Create or update an Azure Cosmos DB SQL trigger + * Create or update an Azure Cosmos DB SQL userDefinedFunction * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. - * @param createUpdateSqlTriggerParameters The parameters to provide for the current SQL trigger. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param createUpdateSqlUserDefinedFunctionParameters The parameters to provide for the current SQL + * userDefinedFunction. * @param options The options parameters. */ - async beginCreateUpdateSqlTrigger( + async beginCreateUpdateSqlUserDefinedFunction( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - createUpdateSqlTriggerParameters: SqlTriggerCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlTriggerOptionalParams, + userDefinedFunctionName: string, + createUpdateSqlUserDefinedFunctionParameters: SqlUserDefinedFunctionCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateSqlTriggerResponse + OperationState, + SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2715,15 +3112,15 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - triggerName, - createUpdateSqlTriggerParameters, + userDefinedFunctionName, + createUpdateSqlUserDefinedFunctionParameters, options, }, - spec: createUpdateSqlTriggerOperationSpec, + spec: createUpdateSqlUserDefinedFunctionOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateSqlTriggerResponse, - OperationState + SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2733,62 +3130,63 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Create or update an Azure Cosmos DB SQL trigger + * Create or update an Azure Cosmos DB SQL userDefinedFunction * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. - * @param createUpdateSqlTriggerParameters The parameters to provide for the current SQL trigger. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param createUpdateSqlUserDefinedFunctionParameters The parameters to provide for the current SQL + * userDefinedFunction. * @param options The options parameters. */ - async beginCreateUpdateSqlTriggerAndWait( + async beginCreateUpdateSqlUserDefinedFunctionAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - createUpdateSqlTriggerParameters: SqlTriggerCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlTriggerOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateSqlTrigger( + userDefinedFunctionName: string, + createUpdateSqlUserDefinedFunctionParameters: SqlUserDefinedFunctionCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateSqlUserDefinedFunction( resourceGroupName, accountName, databaseName, containerName, - triggerName, - createUpdateSqlTriggerParameters, + userDefinedFunctionName, + createUpdateSqlUserDefinedFunctionParameters, options, ); return poller.pollUntilDone(); } /** - * Deletes an existing Azure Cosmos DB SQL trigger. + * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. * @param options The options parameters. */ - async beginDeleteSqlTrigger( + async beginDeleteSqlUserDefinedFunction( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - options?: SqlResourcesDeleteSqlTriggerOptionalParams, + userDefinedFunctionName: string, + options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesDeleteSqlTriggerResponse + OperationState, + SqlResourcesDeleteSqlUserDefinedFunctionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2830,14 +3228,14 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - triggerName, + userDefinedFunctionName, options, }, - spec: deleteSqlTriggerOperationSpec, + spec: deleteSqlUserDefinedFunctionOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesDeleteSqlTriggerResponse, - OperationState + SqlResourcesDeleteSqlUserDefinedFunctionResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2847,77 +3245,112 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Deletes an existing Azure Cosmos DB SQL trigger. + * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. * @param options The options parameters. */ - async beginDeleteSqlTriggerAndWait( + async beginDeleteSqlUserDefinedFunctionAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - options?: SqlResourcesDeleteSqlTriggerOptionalParams, - ): Promise { - const poller = await this.beginDeleteSqlTrigger( + userDefinedFunctionName: string, + options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams, + ): Promise { + const poller = await this.beginDeleteSqlUserDefinedFunction( resourceGroupName, accountName, databaseName, containerName, - triggerName, + userDefinedFunctionName, options, ); return poller.pollUntilDone(); } /** - * Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. - * @param roleDefinitionId The GUID for the Role Definition. + * Lists the SQL trigger under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. * @param options The options parameters. */ - getSqlRoleDefinition( - roleDefinitionId: string, + private _listSqlTriggers( resourceGroupName: string, accountName: string, - options?: SqlResourcesGetSqlRoleDefinitionOptionalParams, - ): Promise { + databaseName: string, + containerName: string, + options?: SqlResourcesListSqlTriggersOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { roleDefinitionId, resourceGroupName, accountName, options }, - getSqlRoleDefinitionOperationSpec, + { resourceGroupName, accountName, databaseName, containerName, options }, + listSqlTriggersOperationSpec, ); } /** - * Creates or updates an Azure Cosmos DB SQL Role Definition. - * @param roleDefinitionId The GUID for the Role Definition. + * Gets the SQL trigger under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. - * @param createUpdateSqlRoleDefinitionParameters The properties required to create or update a Role - * Definition. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. * @param options The options parameters. */ - async beginCreateUpdateSqlRoleDefinition( - roleDefinitionId: string, + getSqlTrigger( resourceGroupName: string, accountName: string, - createUpdateSqlRoleDefinitionParameters: SqlRoleDefinitionCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams, + databaseName: string, + containerName: string, + triggerName: string, + options?: SqlResourcesGetSqlTriggerOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + databaseName, + containerName, + triggerName, + options, + }, + getSqlTriggerOperationSpec, + ); + } + + /** + * Create or update an Azure Cosmos DB SQL trigger + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. + * @param createUpdateSqlTriggerParameters The parameters to provide for the current SQL trigger. + * @param options The options parameters. + */ + async beginCreateUpdateSqlTrigger( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + triggerName: string, + createUpdateSqlTriggerParameters: SqlTriggerCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlTriggerOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateSqlRoleDefinitionResponse + OperationState, + SqlResourcesCreateUpdateSqlTriggerResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2955,17 +3388,19 @@ export class SqlResourcesImpl implements SqlResources { const lro = createLroSpec({ sendOperationFn, args: { - roleDefinitionId, resourceGroupName, accountName, - createUpdateSqlRoleDefinitionParameters, + databaseName, + containerName, + triggerName, + createUpdateSqlTriggerParameters, options, }, - spec: createUpdateSqlRoleDefinitionOperationSpec, + spec: createUpdateSqlTriggerOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateSqlRoleDefinitionResponse, - OperationState + SqlResourcesCreateUpdateSqlTriggerResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2975,27 +3410,269 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Creates or updates an Azure Cosmos DB SQL Role Definition. - * @param roleDefinitionId The GUID for the Role Definition. + * Create or update an Azure Cosmos DB SQL trigger * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. - * @param createUpdateSqlRoleDefinitionParameters The properties required to create or update a Role - * Definition. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. + * @param createUpdateSqlTriggerParameters The parameters to provide for the current SQL trigger. * @param options The options parameters. */ - async beginCreateUpdateSqlRoleDefinitionAndWait( - roleDefinitionId: string, + async beginCreateUpdateSqlTriggerAndWait( resourceGroupName: string, accountName: string, - createUpdateSqlRoleDefinitionParameters: SqlRoleDefinitionCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateSqlRoleDefinition( - roleDefinitionId, + databaseName: string, + containerName: string, + triggerName: string, + createUpdateSqlTriggerParameters: SqlTriggerCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlTriggerOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateSqlTrigger( resourceGroupName, accountName, - createUpdateSqlRoleDefinitionParameters, - options, + databaseName, + containerName, + triggerName, + createUpdateSqlTriggerParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB SQL trigger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. + * @param options The options parameters. + */ + async beginDeleteSqlTrigger( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + triggerName: string, + options?: SqlResourcesDeleteSqlTriggerOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesDeleteSqlTriggerResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + containerName, + triggerName, + options, + }, + spec: deleteSqlTriggerOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesDeleteSqlTriggerResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB SQL trigger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. + * @param options The options parameters. + */ + async beginDeleteSqlTriggerAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + triggerName: string, + options?: SqlResourcesDeleteSqlTriggerOptionalParams, + ): Promise { + const poller = await this.beginDeleteSqlTrigger( + resourceGroupName, + accountName, + databaseName, + containerName, + triggerName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. + * @param roleDefinitionId The GUID for the Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + getSqlRoleDefinition( + roleDefinitionId: string, + resourceGroupName: string, + accountName: string, + options?: SqlResourcesGetSqlRoleDefinitionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { roleDefinitionId, resourceGroupName, accountName, options }, + getSqlRoleDefinitionOperationSpec, + ); + } + + /** + * Creates or updates an Azure Cosmos DB SQL Role Definition. + * @param roleDefinitionId The GUID for the Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param createUpdateSqlRoleDefinitionParameters The properties required to create or update a Role + * Definition. + * @param options The options parameters. + */ + async beginCreateUpdateSqlRoleDefinition( + roleDefinitionId: string, + resourceGroupName: string, + accountName: string, + createUpdateSqlRoleDefinitionParameters: SqlRoleDefinitionCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesCreateUpdateSqlRoleDefinitionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + roleDefinitionId, + resourceGroupName, + accountName, + createUpdateSqlRoleDefinitionParameters, + options, + }, + spec: createUpdateSqlRoleDefinitionOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesCreateUpdateSqlRoleDefinitionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an Azure Cosmos DB SQL Role Definition. + * @param roleDefinitionId The GUID for the Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param createUpdateSqlRoleDefinitionParameters The properties required to create or update a Role + * Definition. + * @param options The options parameters. + */ + async beginCreateUpdateSqlRoleDefinitionAndWait( + roleDefinitionId: string, + resourceGroupName: string, + accountName: string, + createUpdateSqlRoleDefinitionParameters: SqlRoleDefinitionCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateSqlRoleDefinition( + roleDefinitionId, + resourceGroupName, + accountName, + createUpdateSqlRoleDefinitionParameters, + options, ); return poller.pollUntilDone(); } @@ -3653,12 +4330,12 @@ const migrateSqlDatabaseToManualThroughputOperationSpec: coreClient.OperationSpe headerParameters: [Parameters.accept], serializer, }; -const listSqlContainersOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers", +const listClientEncryptionKeysOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SqlContainerListResult, + bodyMapper: Mappers.ClientEncryptionKeysListResult, }, }, queryParameters: [Parameters.apiVersion], @@ -3672,12 +4349,12 @@ const listSqlContainersOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; -const getSqlContainerOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", +const getClientEncryptionKeyOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SqlContainerGetResults, + bodyMapper: Mappers.ClientEncryptionKeyGetResults, }, }, queryParameters: [Parameters.apiVersion], @@ -3687,7 +4364,77 @@ const getSqlContainerOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, - Parameters.containerName, + Parameters.clientEncryptionKeyName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateClientEncryptionKeyOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ClientEncryptionKeyGetResults, + }, + 201: { + bodyMapper: Mappers.ClientEncryptionKeyGetResults, + }, + 202: { + bodyMapper: Mappers.ClientEncryptionKeyGetResults, + }, + 204: { + bodyMapper: Mappers.ClientEncryptionKeyGetResults, + }, + }, + requestBody: Parameters.createUpdateClientEncryptionKeyParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.clientEncryptionKeyName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listSqlContainersOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlContainerListResult, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getSqlContainerOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlContainerGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName, ], headerParameters: [Parameters.accept], serializer, @@ -3751,6 +4498,73 @@ const deleteSqlContainerOperationSpec: coreClient.OperationSpec = { ], serializer, }; +const sqlDatabasePartitionMergeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/partitionMerge", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.mergeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listSqlContainerPartitionMergeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.mergeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; const getSqlContainerThroughputOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default", httpMethod: "GET", @@ -3867,76 +4681,144 @@ const migrateSqlContainerToManualThroughputOperationSpec: coreClient.OperationSp headerParameters: [Parameters.accept], serializer, }; -const listClientEncryptionKeysOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClientEncryptionKeysListResult, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getClientEncryptionKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName, - Parameters.clientEncryptionKeyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createUpdateClientEncryptionKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, +const sqlDatabaseRetrieveThroughputDistributionOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, - 201: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, + requestBody: Parameters.retrieveThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const sqlDatabaseRedistributeThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, - 202: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, + requestBody: Parameters.redistributeThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const sqlContainerRetrieveThroughputDistributionOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, - 204: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, + requestBody: Parameters.retrieveThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const sqlContainerRedistributeThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, - }, - requestBody: Parameters.createUpdateClientEncryptionKeyParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName, - Parameters.clientEncryptionKeyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; + requestBody: Parameters.redistributeThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; const listSqlStoredProceduresOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures", httpMethod: "GET", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts index 5b17b76a2f61..dcf0ea61a392 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts @@ -7,21 +7,27 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { TableResources } from "../operationsInterfaces"; +import { TableResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { TableGetResults, TableResourcesListTablesOptionalParams, TableResourcesListTablesResponse, + TableRoleDefinitionResource, + TableResourcesListTableRoleDefinitionsOptionalParams, + TableResourcesListTableRoleDefinitionsResponse, + TableRoleAssignmentResource, + TableResourcesListTableRoleAssignmentsOptionalParams, + TableResourcesListTableRoleAssignmentsResponse, TableResourcesGetTableOptionalParams, TableResourcesGetTableResponse, TableCreateUpdateParameters, @@ -41,7 +47,17 @@ import { ContinuousBackupRestoreLocation, TableResourcesRetrieveContinuousBackupInformationOptionalParams, TableResourcesRetrieveContinuousBackupInformationResponse, -} from "../models"; + TableResourcesGetTableRoleDefinitionOptionalParams, + TableResourcesGetTableRoleDefinitionResponse, + TableResourcesCreateUpdateTableRoleDefinitionOptionalParams, + TableResourcesCreateUpdateTableRoleDefinitionResponse, + TableResourcesDeleteTableRoleDefinitionOptionalParams, + TableResourcesGetTableRoleAssignmentOptionalParams, + TableResourcesGetTableRoleAssignmentResponse, + TableResourcesCreateUpdateTableRoleAssignmentOptionalParams, + TableResourcesCreateUpdateTableRoleAssignmentResponse, + TableResourcesDeleteTableRoleAssignmentOptionalParams, +} from "../models/index.js"; /// /** Class containing TableResources operations. */ @@ -118,6 +134,138 @@ export class TableResourcesImpl implements TableResources { } } + /** + * Retrieves the list of all Azure Cosmos DB Table Role Definitions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public listTableRoleDefinitions( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleDefinitionsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listTableRoleDefinitionsPagingAll( + resourceGroupName, + accountName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listTableRoleDefinitionsPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listTableRoleDefinitionsPagingPage( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleDefinitionsOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: TableResourcesListTableRoleDefinitionsResponse; + result = await this._listTableRoleDefinitions( + resourceGroupName, + accountName, + options, + ); + yield result.value || []; + } + + private async *listTableRoleDefinitionsPagingAll( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleDefinitionsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listTableRoleDefinitionsPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Retrieves the list of all Azure Cosmos DB Table Role Assignments. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public listTableRoleAssignments( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleAssignmentsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listTableRoleAssignmentsPagingAll( + resourceGroupName, + accountName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listTableRoleAssignmentsPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listTableRoleAssignmentsPagingPage( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleAssignmentsOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: TableResourcesListTableRoleAssignmentsResponse; + result = await this._listTableRoleAssignments( + resourceGroupName, + accountName, + options, + ); + yield result.value || []; + } + + private async *listTableRoleAssignmentsPagingAll( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleAssignmentsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listTableRoleAssignmentsPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + /** * Lists the Tables under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -767,161 +915,619 @@ export class TableResourcesImpl implements TableResources { ); return poller.pollUntilDone(); } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listTablesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TableListResult, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getTableOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TableGetResults, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.tableName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createUpdateTableOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TableGetResults, - }, - 201: { - bodyMapper: Mappers.TableGetResults, - }, - 202: { - bodyMapper: Mappers.TableGetResults, - }, - 204: { - bodyMapper: Mappers.TableGetResults, - }, - }, - requestBody: Parameters.createUpdateTableParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.tableName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteTableOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.TableResourcesDeleteTableHeaders, - }, - 201: { - headersMapper: Mappers.TableResourcesDeleteTableHeaders, - }, - 202: { - headersMapper: Mappers.TableResourcesDeleteTableHeaders, - }, - 204: { - headersMapper: Mappers.TableResourcesDeleteTableHeaders, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.tableName, - ], - serializer, -}; -const getTableThroughputOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.tableName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateTableThroughputOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - }, - requestBody: Parameters.updateThroughputParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.tableName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const migrateTableToAutoscaleOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 201: { + /** + * Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param options The options parameters. + */ + getTableRoleDefinition( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + options?: TableResourcesGetTableRoleDefinitionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, roleDefinitionId, options }, + getTableRoleDefinitionOperationSpec, + ); + } + + /** + * Creates or updates an Azure Cosmos DB Table Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param createUpdateTableRoleDefinitionParameters The properties required to create or update a Role + * Definition. + * @param options The options parameters. + */ + async beginCreateUpdateTableRoleDefinition( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + createUpdateTableRoleDefinitionParameters: TableRoleDefinitionResource, + options?: TableResourcesCreateUpdateTableRoleDefinitionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + TableResourcesCreateUpdateTableRoleDefinitionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + roleDefinitionId, + createUpdateTableRoleDefinitionParameters, + options, + }, + spec: createUpdateTableRoleDefinitionOperationSpec, + }); + const poller = await createHttpPoller< + TableResourcesCreateUpdateTableRoleDefinitionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an Azure Cosmos DB Table Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param createUpdateTableRoleDefinitionParameters The properties required to create or update a Role + * Definition. + * @param options The options parameters. + */ + async beginCreateUpdateTableRoleDefinitionAndWait( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + createUpdateTableRoleDefinitionParameters: TableRoleDefinitionResource, + options?: TableResourcesCreateUpdateTableRoleDefinitionOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateTableRoleDefinition( + resourceGroupName, + accountName, + roleDefinitionId, + createUpdateTableRoleDefinitionParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Table Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param options The options parameters. + */ + async beginDeleteTableRoleDefinition( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + options?: TableResourcesDeleteTableRoleDefinitionOptionalParams, + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, roleDefinitionId, options }, + spec: deleteTableRoleDefinitionOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB Table Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param options The options parameters. + */ + async beginDeleteTableRoleDefinitionAndWait( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + options?: TableResourcesDeleteTableRoleDefinitionOptionalParams, + ): Promise { + const poller = await this.beginDeleteTableRoleDefinition( + resourceGroupName, + accountName, + roleDefinitionId, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves the list of all Azure Cosmos DB Table Role Definitions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _listTableRoleDefinitions( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleDefinitionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listTableRoleDefinitionsOperationSpec, + ); + } + + /** + * Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param options The options parameters. + */ + getTableRoleAssignment( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + options?: TableResourcesGetTableRoleAssignmentOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, roleAssignmentId, options }, + getTableRoleAssignmentOperationSpec, + ); + } + + /** + * Creates or updates an Azure Cosmos DB Table Role Assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param createUpdateTableRoleAssignmentParameters The properties required to create or update a Role + * Assignment. + * @param options The options parameters. + */ + async beginCreateUpdateTableRoleAssignment( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + createUpdateTableRoleAssignmentParameters: TableRoleAssignmentResource, + options?: TableResourcesCreateUpdateTableRoleAssignmentOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + TableResourcesCreateUpdateTableRoleAssignmentResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + roleAssignmentId, + createUpdateTableRoleAssignmentParameters, + options, + }, + spec: createUpdateTableRoleAssignmentOperationSpec, + }); + const poller = await createHttpPoller< + TableResourcesCreateUpdateTableRoleAssignmentResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an Azure Cosmos DB Table Role Assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param createUpdateTableRoleAssignmentParameters The properties required to create or update a Role + * Assignment. + * @param options The options parameters. + */ + async beginCreateUpdateTableRoleAssignmentAndWait( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + createUpdateTableRoleAssignmentParameters: TableRoleAssignmentResource, + options?: TableResourcesCreateUpdateTableRoleAssignmentOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateTableRoleAssignment( + resourceGroupName, + accountName, + roleAssignmentId, + createUpdateTableRoleAssignmentParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Table Role Assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param options The options parameters. + */ + async beginDeleteTableRoleAssignment( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + options?: TableResourcesDeleteTableRoleAssignmentOptionalParams, + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, roleAssignmentId, options }, + spec: deleteTableRoleAssignmentOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB Table Role Assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param options The options parameters. + */ + async beginDeleteTableRoleAssignmentAndWait( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + options?: TableResourcesDeleteTableRoleAssignmentOptionalParams, + ): Promise { + const poller = await this.beginDeleteTableRoleAssignment( + resourceGroupName, + accountName, + roleAssignmentId, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves the list of all Azure Cosmos DB Table Role Assignments. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _listTableRoleAssignments( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleAssignmentsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listTableRoleAssignmentsOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listTablesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TableListResult, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getTableOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TableGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.tableName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateTableOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TableGetResults, + }, + 201: { + bodyMapper: Mappers.TableGetResults, + }, + 202: { + bodyMapper: Mappers.TableGetResults, + }, + 204: { + bodyMapper: Mappers.TableGetResults, + }, + }, + requestBody: Parameters.createUpdateTableParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.tableName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteTableOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.TableResourcesDeleteTableHeaders, + }, + 201: { + headersMapper: Mappers.TableResourcesDeleteTableHeaders, + }, + 202: { + headersMapper: Mappers.TableResourcesDeleteTableHeaders, + }, + 204: { + headersMapper: Mappers.TableResourcesDeleteTableHeaders, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.tableName, + ], + serializer, +}; +const getTableThroughputOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.tableName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const updateTableThroughputOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + requestBody: Parameters.updateThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.tableName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const migrateTableToAutoscaleOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { bodyMapper: Mappers.ThroughputSettingsGetResults, }, 202: { @@ -1010,3 +1616,201 @@ const retrieveContinuousBackupInformationOperationSpec: coreClient.OperationSpec mediaType: "json", serializer, }; +const getTableRoleDefinitionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tableRoleDefinitions/{roleDefinitionId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TableRoleDefinitionResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.roleDefinitionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateTableRoleDefinitionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tableRoleDefinitions/{roleDefinitionId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TableRoleDefinitionResource, + }, + 201: { + bodyMapper: Mappers.TableRoleDefinitionResource, + }, + 202: { + bodyMapper: Mappers.TableRoleDefinitionResource, + }, + 204: { + bodyMapper: Mappers.TableRoleDefinitionResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.createUpdateTableRoleDefinitionParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.roleDefinitionId, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteTableRoleDefinitionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tableRoleDefinitions/{roleDefinitionId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.roleDefinitionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listTableRoleDefinitionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tableRoleDefinitions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TableRoleDefinitionListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getTableRoleAssignmentOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tableRoleAssignments/{roleAssignmentId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TableRoleAssignmentResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.roleAssignmentId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateTableRoleAssignmentOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tableRoleAssignments/{roleAssignmentId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TableRoleAssignmentResource, + }, + 201: { + bodyMapper: Mappers.TableRoleAssignmentResource, + }, + 202: { + bodyMapper: Mappers.TableRoleAssignmentResource, + }, + 204: { + bodyMapper: Mappers.TableRoleAssignmentResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.createUpdateTableRoleAssignmentParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.roleAssignmentId, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteTableRoleAssignmentOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tableRoleAssignments/{roleAssignmentId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.roleAssignmentId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listTableRoleAssignmentsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tableRoleAssignments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TableRoleAssignmentListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPool.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPool.ts new file mode 100644 index 000000000000..07814530ccf8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPool.ts @@ -0,0 +1,454 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { ThroughputPool } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl.js"; +import { + ThroughputPoolGetOptionalParams, + ThroughputPoolGetResponse, + ThroughputPoolResource, + ThroughputPoolCreateOrUpdateOptionalParams, + ThroughputPoolCreateOrUpdateResponse, + ThroughputPoolUpdateOptionalParams, + ThroughputPoolUpdateResponse, + ThroughputPoolDeleteOptionalParams, + ThroughputPoolDeleteResponse, +} from "../models/index.js"; + +/** Class containing ThroughputPool operations. */ +export class ThroughputPoolImpl implements ThroughputPool { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ThroughputPool class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, throughputPoolName, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param body The parameters to provide for the current ThroughputPool. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + throughputPoolName: string, + body: ThroughputPoolResource, + options?: ThroughputPoolCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, throughputPoolName, body, options }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param body The parameters to provide for the current ThroughputPool. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + throughputPoolName: string, + body: ThroughputPoolResource, + options?: ThroughputPoolCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + throughputPoolName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, throughputPoolName, options }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + throughputPoolName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, throughputPoolName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + throughputPoolName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 201: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 202: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 204: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 201: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 202: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 204: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ThroughputPoolDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ThroughputPoolDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ThroughputPoolDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ThroughputPoolDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccount.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccount.ts new file mode 100644 index 000000000000..b85a8eca6434 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccount.ts @@ -0,0 +1,361 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { ThroughputPoolAccount } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl.js"; +import { + ThroughputPoolAccountGetOptionalParams, + ThroughputPoolAccountGetResponse, + ThroughputPoolAccountResource, + ThroughputPoolAccountCreateOptionalParams, + ThroughputPoolAccountCreateResponse, + ThroughputPoolAccountDeleteOptionalParams, + ThroughputPoolAccountDeleteResponse, +} from "../models/index.js"; + +/** Class containing ThroughputPoolAccount operations. */ +export class ThroughputPoolAccountImpl implements ThroughputPoolAccount { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ThroughputPoolAccount class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + options, + }, + getOperationSpec, + ); + } + + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param body The parameters to provide for the current ThroughputPoolAccount. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + body: ThroughputPoolAccountResource, + options?: ThroughputPoolAccountCreateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolAccountCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + body, + options, + }, + spec: createOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolAccountCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param body The parameters to provide for the current ThroughputPoolAccount. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + body: ThroughputPoolAccountResource, + options?: ThroughputPoolAccountCreateOptionalParams, + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Removes an existing Azure Cosmos DB database account from a throughput pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolAccountDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolAccountDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Removes an existing Azure Cosmos DB database account from a throughput pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}/throughputPoolAccounts/{throughputPoolAccountName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + Parameters.throughputPoolAccountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}/throughputPoolAccounts/{throughputPoolAccountName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + 201: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + 202: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + 204: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + Parameters.throughputPoolAccountName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}/throughputPoolAccounts/{throughputPoolAccountName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ThroughputPoolAccountDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ThroughputPoolAccountDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ThroughputPoolAccountDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ThroughputPoolAccountDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + Parameters.throughputPoolAccountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccounts.ts new file mode 100644 index 000000000000..50f48cf5604e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccounts.ts @@ -0,0 +1,197 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ThroughputPoolAccounts } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; +import { + ThroughputPoolAccountResource, + ThroughputPoolAccountsListNextOptionalParams, + ThroughputPoolAccountsListOptionalParams, + ThroughputPoolAccountsListResponse, + ThroughputPoolAccountsListNextResponse, +} from "../models/index.js"; + +/// +/** Class containing ThroughputPoolAccounts operations. */ +export class ThroughputPoolAccountsImpl implements ThroughputPoolAccounts { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ThroughputPoolAccounts class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Lists all the Azure Cosmos DB accounts available under the subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + throughputPoolName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + throughputPoolName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ThroughputPoolAccountsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, throughputPoolName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + throughputPoolName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + throughputPoolName, + options, + )) { + yield* page; + } + } + + /** + * Lists all the Azure Cosmos DB accounts available under the subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, throughputPoolName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + throughputPoolName: string, + nextLink: string, + options?: ThroughputPoolAccountsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, throughputPoolName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}/throughputPoolAccounts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolAccountsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolAccountsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPools.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPools.ts new file mode 100644 index 000000000000..2e4ba1d240f1 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPools.ts @@ -0,0 +1,298 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ThroughputPools } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient.js"; +import { + ThroughputPoolResource, + ThroughputPoolsListNextOptionalParams, + ThroughputPoolsListOptionalParams, + ThroughputPoolsListResponse, + ThroughputPoolsListByResourceGroupNextOptionalParams, + ThroughputPoolsListByResourceGroupOptionalParams, + ThroughputPoolsListByResourceGroupResponse, + ThroughputPoolsListNextResponse, + ThroughputPoolsListByResourceGroupNextResponse, +} from "../models/index.js"; + +/// +/** Class containing ThroughputPools operations. */ +export class ThroughputPoolsImpl implements ThroughputPools { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ThroughputPools class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * @param options The options parameters. + */ + public list( + options?: ThroughputPoolsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + }, + }; + } + + private async *listPagingPage( + options?: ThroughputPoolsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ThroughputPoolsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: ThroughputPoolsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List all the ThroughputPools in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings, + ); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ThroughputPoolsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options, + )) { + yield* page; + } + } + + /** + * Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * @param options The options parameters. + */ + private _list( + options?: ThroughputPoolsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * List all the ThroughputPools in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ThroughputPoolsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec, + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ThroughputPoolsListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/throughputPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts index ee04087b70ce..ef5892b03e67 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts @@ -12,6 +12,10 @@ import { ClusterResource, CassandraClustersListBySubscriptionOptionalParams, CassandraClustersListByResourceGroupOptionalParams, + CommandPublicResource, + CassandraClustersListCommandOptionalParams, + BackupResource, + CassandraClustersListBackupsOptionalParams, CassandraClustersGetOptionalParams, CassandraClustersGetResponse, CassandraClustersDeleteOptionalParams, @@ -22,11 +26,18 @@ import { CommandPostBody, CassandraClustersInvokeCommandOptionalParams, CassandraClustersInvokeCommandResponse, + CommandAsyncPostBody, + CassandraClustersInvokeCommandAsyncOptionalParams, + CassandraClustersInvokeCommandAsyncResponse, + CassandraClustersGetCommandAsyncOptionalParams, + CassandraClustersGetCommandAsyncResponse, + CassandraClustersGetBackupOptionalParams, + CassandraClustersGetBackupResponse, CassandraClustersDeallocateOptionalParams, CassandraClustersStartOptionalParams, CassandraClustersStatusOptionalParams, CassandraClustersStatusResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a CassandraClusters. */ @@ -47,6 +58,28 @@ export interface CassandraClusters { resourceGroupName: string, options?: CassandraClustersListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; + /** + * List all commands currently running on ring info + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + listCommand( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + ): PagedAsyncIterableIterator; + /** + * List the backups of this cluster that are available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + listBackups( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + ): PagedAsyncIterableIterator; /** * Get the properties of a managed Cassandra cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,6 +208,63 @@ export interface CassandraClusters { body: CommandPostBody, options?: CassandraClustersInvokeCommandOptionalParams, ): Promise; + /** + * Invoke a command like nodetool for cassandra maintenance asynchronously + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param options The options parameters. + */ + beginInvokeCommandAsync( + resourceGroupName: string, + clusterName: string, + body: CommandAsyncPostBody, + options?: CassandraClustersInvokeCommandAsyncOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraClustersInvokeCommandAsyncResponse + > + >; + /** + * Invoke a command like nodetool for cassandra maintenance asynchronously + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param options The options parameters. + */ + beginInvokeCommandAsyncAndWait( + resourceGroupName: string, + clusterName: string, + body: CommandAsyncPostBody, + options?: CassandraClustersInvokeCommandAsyncOptionalParams, + ): Promise; + /** + * Get details about a specified command that was run asynchronously. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param commandId Managed Cassandra cluster command id. + * @param options The options parameters. + */ + getCommandAsync( + resourceGroupName: string, + clusterName: string, + commandId: string, + options?: CassandraClustersGetCommandAsyncOptionalParams, + ): Promise; + /** + * Get the properties of an individual backup of this cluster that is available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param backupId Id of a restorable backup of a Cassandra cluster. + * @param options The options parameters. + */ + getBackup( + resourceGroupName: string, + clusterName: string, + backupId: string, + options?: CassandraClustersGetBackupOptionalParams, + ): Promise; /** * Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate * the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraDataCenters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraDataCenters.ts index c929b878db6f..8f703f6c188e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraDataCenters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraDataCenters.ts @@ -18,7 +18,7 @@ import { CassandraDataCentersCreateUpdateResponse, CassandraDataCentersUpdateOptionalParams, CassandraDataCentersUpdateResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a CassandraDataCenters. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts index 6b9eeca3a70d..334515a1e0b7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts @@ -13,6 +13,8 @@ import { CassandraResourcesListCassandraKeyspacesOptionalParams, CassandraTableGetResults, CassandraResourcesListCassandraTablesOptionalParams, + CassandraViewGetResults, + CassandraResourcesListCassandraViewsOptionalParams, CassandraResourcesGetCassandraKeyspaceOptionalParams, CassandraResourcesGetCassandraKeyspaceResponse, CassandraKeyspaceCreateUpdateParameters, @@ -44,7 +46,21 @@ import { CassandraResourcesMigrateCassandraTableToAutoscaleResponse, CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, CassandraResourcesMigrateCassandraTableToManualThroughputResponse, -} from "../models"; + CassandraResourcesGetCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewResponse, + CassandraViewCreateUpdateParameters, + CassandraResourcesCreateUpdateCassandraViewOptionalParams, + CassandraResourcesCreateUpdateCassandraViewResponse, + CassandraResourcesDeleteCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewThroughputOptionalParams, + CassandraResourcesGetCassandraViewThroughputResponse, + CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + CassandraResourcesUpdateCassandraViewThroughputResponse, + CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse, +} from "../models/index.js"; /// /** Interface representing a CassandraResources. */ @@ -73,6 +89,19 @@ export interface CassandraResources { keyspaceName: string, options?: CassandraResourcesListCassandraTablesOptionalParams, ): PagedAsyncIterableIterator; + /** + * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The options parameters. + */ + listCassandraViews( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + ): PagedAsyncIterableIterator; /** * Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided * name. @@ -486,4 +515,215 @@ export interface CassandraResources { tableName: string, options?: CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, ): Promise; + /** + * Gets the Cassandra view under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewOptionalParams, + ): Promise; + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + beginCreateUpdateCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesCreateUpdateCassandraViewResponse + > + >; + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + beginCreateUpdateCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams, + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginDeleteCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams, + ): Promise, void>>; + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginDeleteCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams, + ): Promise; + /** + * Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account + * with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewThroughputOptionalParams, + ): Promise; + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + beginUpdateCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesUpdateCassandraViewThroughputResponse + > + >; + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + beginUpdateCassandraViewThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + ): Promise; + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToAutoscale( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + > + >; + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToAutoscaleAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + ): Promise; + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToManualThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + > + >; + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToManualThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + ): Promise; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/chaosFault.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/chaosFault.ts new file mode 100644 index 000000000000..6aae84ad8a85 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/chaosFault.ts @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ChaosFaultResource, + ChaosFaultListOptionalParams, + ChaosFaultEnableDisableOptionalParams, + ChaosFaultEnableDisableResponse, + ChaosFaultGetOptionalParams, + ChaosFaultGetResponse, +} from "../models/index.js"; + +/// +/** Interface representing a ChaosFault. */ +export interface ChaosFault { + /** + * List Chaos Faults for CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Enable, disable Chaos Fault in a CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param chaosFaultRequest A request object to enable/disable the chaos fault. + * @param options The options parameters. + */ + beginEnableDisable( + resourceGroupName: string, + accountName: string, + chaosFault: string, + chaosFaultRequest: ChaosFaultResource, + options?: ChaosFaultEnableDisableOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ChaosFaultEnableDisableResponse + > + >; + /** + * Enable, disable Chaos Fault in a CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param chaosFaultRequest A request object to enable/disable the chaos fault. + * @param options The options parameters. + */ + beginEnableDisableAndWait( + resourceGroupName: string, + accountName: string, + chaosFault: string, + chaosFaultRequest: ChaosFaultResource, + options?: ChaosFaultEnableDisableOptionalParams, + ): Promise; + /** + * Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + chaosFault: string, + options?: ChaosFaultGetOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collection.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collection.ts index 3a96611aeab1..bf4269cc3f17 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collection.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collection.ts @@ -14,7 +14,7 @@ import { CollectionListUsagesOptionalParams, MetricDefinition, CollectionListMetricDefinitionsOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Collection. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionPartition.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionPartition.ts index af7c4203cef8..4c6358d6b652 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionPartition.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionPartition.ts @@ -12,7 +12,7 @@ import { CollectionPartitionListMetricsOptionalParams, PartitionUsage, CollectionPartitionListUsagesOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a CollectionPartition. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionPartitionRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionPartitionRegion.ts index 54236e4084f7..eefda134c5ac 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionPartitionRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionPartitionRegion.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PartitionMetric, CollectionPartitionRegionListMetricsOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a CollectionPartitionRegion. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionRegion.ts index a36e1d297b66..db7c567f1248 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/collectionRegion.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Metric, CollectionRegionListMetricsOptionalParams } from "../models"; +import { Metric, CollectionRegionListMetricsOptionalParams } from "../models/index.js"; /// /** Interface representing a CollectionRegion. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts new file mode 100644 index 000000000000..b8f3107289ab --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DataTransferJobGetResults, + DataTransferJobsListByDatabaseAccountOptionalParams, + CreateJobRequest, + DataTransferJobsCreateOptionalParams, + DataTransferJobsCreateResponse, + DataTransferJobsGetOptionalParams, + DataTransferJobsGetResponse, + DataTransferJobsPauseOptionalParams, + DataTransferJobsPauseResponse, + DataTransferJobsResumeOptionalParams, + DataTransferJobsResumeResponse, + DataTransferJobsCancelOptionalParams, + DataTransferJobsCancelResponse, + DataTransferJobsCompleteOptionalParams, + DataTransferJobsCompleteResponse, +} from "../models/index.js"; + +/// +/** Interface representing a DataTransferJobs. */ +export interface DataTransferJobs { + /** + * Get a list of Data Transfer jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + listByDatabaseAccount( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Creates a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param jobCreateParameters Parameters to create Data Transfer Job + * @param options The options parameters. + */ + create( + resourceGroupName: string, + accountName: string, + jobName: string, + jobCreateParameters: CreateJobRequest, + options?: DataTransferJobsCreateOptionalParams, + ): Promise; + /** + * Get a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsGetOptionalParams, + ): Promise; + /** + * Pause a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + pause( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsPauseOptionalParams, + ): Promise; + /** + * Resumes a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + resume( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsResumeOptionalParams, + ): Promise; + /** + * Cancels a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + cancel( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsCancelOptionalParams, + ): Promise; + /** + * Completes a Data Transfer Online Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + complete( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsCompleteOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/database.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/database.ts index 77bf37090799..c3c4e3fe5027 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/database.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/database.ts @@ -14,7 +14,7 @@ import { DatabaseListUsagesOptionalParams, MetricDefinition, DatabaseListMetricDefinitionsOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Database. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/databaseAccountRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/databaseAccountRegion.ts index dd2daa4e9cb2..5354e94d1520 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/databaseAccountRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/databaseAccountRegion.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Metric, DatabaseAccountRegionListMetricsOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a DatabaseAccountRegion. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/databaseAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/databaseAccounts.ts index 8b15b7f1faf8..a8df42bdaf9f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/databaseAccounts.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/databaseAccounts.ts @@ -46,7 +46,7 @@ import { DatabaseAccountsRegenerateKeyOptionalParams, DatabaseAccountsCheckNameExistsOptionalParams, DatabaseAccountsCheckNameExistsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a DatabaseAccounts. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts new file mode 100644 index 000000000000..7adeeb5f8c0a --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts @@ -0,0 +1,110 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + GraphResourceGetResults, + GraphResourcesListGraphsOptionalParams, + GraphResourcesGetGraphOptionalParams, + GraphResourcesGetGraphResponse, + GraphResourceCreateUpdateParameters, + GraphResourcesCreateUpdateGraphOptionalParams, + GraphResourcesCreateUpdateGraphResponse, + GraphResourcesDeleteGraphResourceOptionalParams, +} from "../models/index.js"; + +/// +/** Interface representing a GraphResources. */ +export interface GraphResources { + /** + * Lists the graphs under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + listGraphs( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + getGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesGetGraphOptionalParams, + ): Promise; + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + beginCreateUpdateGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GraphResourcesCreateUpdateGraphResponse + > + >; + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + beginCreateUpdateGraphAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams, + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + beginDeleteGraphResource( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams, + ): Promise, void>>; + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + beginDeleteGraphResourceAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts index ed1fac2bbdef..fc58d9e65549 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts @@ -47,7 +47,7 @@ import { ContinuousBackupRestoreLocation, GremlinResourcesRetrieveContinuousBackupInformationOptionalParams, GremlinResourcesRetrieveContinuousBackupInformationResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a GremlinResources. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts index 96531b8c1b96..1aa7da1805c7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts @@ -6,40 +6,48 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./databaseAccounts"; -export * from "./operations"; -export * from "./database"; -export * from "./collection"; -export * from "./collectionRegion"; -export * from "./databaseAccountRegion"; -export * from "./percentileSourceTarget"; -export * from "./percentileTarget"; -export * from "./percentile"; -export * from "./collectionPartitionRegion"; -export * from "./collectionPartition"; -export * from "./partitionKeyRangeId"; -export * from "./partitionKeyRangeIdRegion"; -export * from "./sqlResources"; -export * from "./mongoDBResources"; -export * from "./tableResources"; -export * from "./cassandraResources"; -export * from "./gremlinResources"; -export * from "./locations"; -export * from "./cassandraClusters"; -export * from "./cassandraDataCenters"; -export * from "./notebookWorkspaces"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; -export * from "./restorableDatabaseAccounts"; -export * from "./restorableSqlDatabases"; -export * from "./restorableSqlContainers"; -export * from "./restorableSqlResources"; -export * from "./restorableMongodbDatabases"; -export * from "./restorableMongodbCollections"; -export * from "./restorableMongodbResources"; -export * from "./restorableGremlinDatabases"; -export * from "./restorableGremlinGraphs"; -export * from "./restorableGremlinResources"; -export * from "./restorableTables"; -export * from "./restorableTableResources"; -export * from "./service"; +export * from "./chaosFault.js"; +export * from "./databaseAccounts.js"; +export * from "./operations.js"; +export * from "./database.js"; +export * from "./collection.js"; +export * from "./collectionRegion.js"; +export * from "./databaseAccountRegion.js"; +export * from "./percentileSourceTarget.js"; +export * from "./percentileTarget.js"; +export * from "./percentile.js"; +export * from "./collectionPartitionRegion.js"; +export * from "./collectionPartition.js"; +export * from "./partitionKeyRangeId.js"; +export * from "./partitionKeyRangeIdRegion.js"; +export * from "./graphResources.js"; +export * from "./sqlResources.js"; +export * from "./mongoDBResources.js"; +export * from "./tableResources.js"; +export * from "./cassandraResources.js"; +export * from "./gremlinResources.js"; +export * from "./locations.js"; +export * from "./dataTransferJobs.js"; +export * from "./cassandraClusters.js"; +export * from "./cassandraDataCenters.js"; +export * from "./networkSecurityPerimeterConfigurations.js"; +export * from "./notebookWorkspaces.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; +export * from "./restorableDatabaseAccounts.js"; +export * from "./restorableSqlDatabases.js"; +export * from "./restorableSqlContainers.js"; +export * from "./restorableSqlResources.js"; +export * from "./restorableMongodbDatabases.js"; +export * from "./restorableMongodbCollections.js"; +export * from "./restorableMongodbResources.js"; +export * from "./restorableGremlinDatabases.js"; +export * from "./restorableGremlinGraphs.js"; +export * from "./restorableGremlinResources.js"; +export * from "./restorableTables.js"; +export * from "./restorableTableResources.js"; +export * from "./service.js"; +export * from "./throughputPools.js"; +export * from "./throughputPool.js"; +export * from "./throughputPoolAccounts.js"; +export * from "./throughputPoolAccount.js"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/locations.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/locations.ts index 7c3ccc19615e..b4b9b466be6d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/locations.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/locations.ts @@ -12,7 +12,7 @@ import { LocationsListOptionalParams, LocationsGetOptionalParams, LocationsGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Locations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts index 4c31b6974452..292286281111 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts @@ -33,6 +33,16 @@ import { MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleResponse, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse, + RetrieveThroughputParameters, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse, + MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse, MongoDBResourcesGetMongoDBCollectionOptionalParams, MongoDBResourcesGetMongoDBCollectionResponse, MongoDBCollectionCreateUpdateParameters, @@ -40,6 +50,11 @@ import { MongoDBResourcesCreateUpdateMongoDBCollectionResponse, MongoDBResourcesDeleteMongoDBCollectionOptionalParams, MongoDBResourcesDeleteMongoDBCollectionResponse, + MergeParameters, + MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + MongoDBResourcesMongoDBDatabasePartitionMergeResponse, + MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse, MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams, MongoDBResourcesGetMongoDBCollectionThroughputResponse, MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams, @@ -63,7 +78,7 @@ import { ContinuousBackupRestoreLocation, MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams, MongoDBResourcesRetrieveContinuousBackupInformationResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a MongoDBResources. */ @@ -309,6 +324,162 @@ export interface MongoDBResources { databaseName: string, options?: MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams, ): Promise; + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB database. + * @param options The options parameters. + */ + beginMongoDBDatabaseRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + > + >; + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB database. + * @param options The options parameters. + */ + beginMongoDBDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise; + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB database. + * @param options The options parameters. + */ + beginMongoDBDatabaseRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + > + >; + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB database. + * @param options The options parameters. + */ + beginMongoDBDatabaseRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + ): Promise; + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB container. + * @param options The options parameters. + */ + beginMongoDBContainerRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + > + >; + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB container. + * @param options The options parameters. + */ + beginMongoDBContainerRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + ): Promise; + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB container. + * @param options The options parameters. + */ + beginMongoDBContainerRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + > + >; + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB container. + * @param options The options parameters. + */ + beginMongoDBContainerRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + ): Promise; /** * Gets the MongoDB collection under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -400,6 +571,80 @@ export interface MongoDBResources { collectionName: string, options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, ): Promise; + /** + * Merges the partitions of a MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginMongoDBDatabasePartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabasePartitionMergeResponse + > + >; + /** + * Merges the partitions of a MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginMongoDBDatabasePartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + ): Promise; + /** + * Merges the partitions of a MongoDB Collection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginListMongoDBCollectionPartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse + > + >; + /** + * Merges the partitions of a MongoDB Collection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginListMongoDBCollectionPartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + ): Promise; /** * Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account * with the provided name. diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts new file mode 100644 index 000000000000..fb7222345482 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkSecurityPerimeterConfiguration, + NetworkSecurityPerimeterConfigurationsListOptionalParams, + NetworkSecurityPerimeterConfigurationsGetOptionalParams, + NetworkSecurityPerimeterConfigurationsGetResponse, + NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + NetworkSecurityPerimeterConfigurationsReconcileResponse, +} from "../models/index.js"; + +/// +/** Interface representing a NetworkSecurityPerimeterConfigurations. */ +export interface NetworkSecurityPerimeterConfigurations { + /** + * Gets list of effective Network Security Perimeter Configuration for cosmos db account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets effective Network Security Perimeter Configuration for association + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams, + ): Promise; + /** + * Refreshes any information about the association. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + beginReconcile( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + NetworkSecurityPerimeterConfigurationsReconcileResponse + > + >; + /** + * Refreshes any information about the association. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + beginReconcileAndWait( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/notebookWorkspaces.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/notebookWorkspaces.ts index ae886fb25b3f..9320dd34074d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/notebookWorkspaces.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/notebookWorkspaces.ts @@ -22,7 +22,7 @@ import { NotebookWorkspacesListConnectionInfoResponse, NotebookWorkspacesRegenerateAuthTokenOptionalParams, NotebookWorkspacesStartOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a NotebookWorkspaces. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/operations.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/operations.ts index c4dd742bf954..598d80324483 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/operations.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/partitionKeyRangeId.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/partitionKeyRangeId.ts index 15162462d1b4..97bf1c3b380a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/partitionKeyRangeId.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/partitionKeyRangeId.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PartitionMetric, PartitionKeyRangeIdListMetricsOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PartitionKeyRangeId. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/partitionKeyRangeIdRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/partitionKeyRangeIdRegion.ts index a0087fc7a71f..8e8f76e1fe05 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/partitionKeyRangeIdRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/partitionKeyRangeIdRegion.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PartitionMetric, PartitionKeyRangeIdRegionListMetricsOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PartitionKeyRangeIdRegion. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentile.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentile.ts index 31a07df9951e..5944c27c113d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentile.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentile.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PercentileMetric, PercentileListMetricsOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Percentile. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentileSourceTarget.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentileSourceTarget.ts index 8af6fcf22a55..731d4d980d90 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentileSourceTarget.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentileSourceTarget.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PercentileMetric, PercentileSourceTargetListMetricsOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PercentileSourceTarget. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentileTarget.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentileTarget.ts index 393868aba642..61390716e298 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentileTarget.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/percentileTarget.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PercentileMetric, PercentileTargetListMetricsOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PercentileTarget. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/privateEndpointConnections.ts index 4e1715ece2ad..c5dfe0719bb6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/privateEndpointConnections.ts @@ -16,7 +16,7 @@ import { PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, PrivateEndpointConnectionsDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateEndpointConnections. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/privateLinkResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/privateLinkResources.ts index 232ba7cdca0f..1f916ffa5196 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/privateLinkResources.ts @@ -12,7 +12,7 @@ import { PrivateLinkResourcesListByDatabaseAccountOptionalParams, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateLinkResources. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableDatabaseAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableDatabaseAccounts.ts index 8b96fe9a2703..2c67fabc6b3b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableDatabaseAccounts.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableDatabaseAccounts.ts @@ -13,7 +13,7 @@ import { RestorableDatabaseAccountsListOptionalParams, RestorableDatabaseAccountsGetByLocationOptionalParams, RestorableDatabaseAccountsGetByLocationResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableDatabaseAccounts. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinDatabases.ts index a12218e78ad3..ac529a06a288 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinDatabases.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinDatabases.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableGremlinDatabaseGetResult, RestorableGremlinDatabasesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableGremlinDatabases. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts index 7498e2850609..2b58879cc322 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableGremlinGraphGetResult, RestorableGremlinGraphsListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableGremlinGraphs. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts index ec9031d6d7e8..5e951d172982 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableGremlinResourcesGetResult, RestorableGremlinResourcesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableGremlinResources. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbCollections.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbCollections.ts index 188f8c8f8508..4f92693267ed 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbCollections.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbCollections.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableMongodbCollectionGetResult, RestorableMongodbCollectionsListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableMongodbCollections. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbDatabases.ts index f066af4e6ad0..1d76dd032716 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbDatabases.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbDatabases.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableMongodbDatabaseGetResult, RestorableMongodbDatabasesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableMongodbDatabases. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbResources.ts index 1b9ecab9db4c..6d00a7cab0b3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableMongodbResources.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableMongodbResourcesGetResult, RestorableMongodbResourcesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableMongodbResources. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlContainers.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlContainers.ts index 7608e770c85a..6b10b870c071 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlContainers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlContainers.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableSqlContainerGetResult, RestorableSqlContainersListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableSqlContainers. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlDatabases.ts index 6ab3c433d61c..35ae6733a6c5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlDatabases.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlDatabases.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableSqlDatabaseGetResult, RestorableSqlDatabasesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableSqlDatabases. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlResources.ts index e147f4ecab9f..0dac18eb174a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableSqlResources.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableSqlResourcesGetResult, RestorableSqlResourcesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableSqlResources. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts index f82dd0498677..57f7168c25da 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableTableResourcesGetResult, RestorableTableResourcesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableTableResources. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts index 124a063682c5..8e22bf641efa 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { RestorableTableGetResult, RestorableTablesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RestorableTables. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/service.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/service.ts index 4827aae7ff76..fc16ab1569fd 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/service.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/service.ts @@ -17,7 +17,7 @@ import { ServiceGetOptionalParams, ServiceGetResponse, ServiceDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Service. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts index e2a536558478..9519671bdd23 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts @@ -11,10 +11,10 @@ import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SqlDatabaseGetResults, SqlResourcesListSqlDatabasesOptionalParams, - SqlContainerGetResults, - SqlResourcesListSqlContainersOptionalParams, ClientEncryptionKeyGetResults, SqlResourcesListClientEncryptionKeysOptionalParams, + SqlContainerGetResults, + SqlResourcesListSqlContainersOptionalParams, SqlStoredProcedureGetResults, SqlResourcesListSqlStoredProceduresOptionalParams, SqlUserDefinedFunctionGetResults, @@ -41,6 +41,11 @@ import { SqlResourcesMigrateSqlDatabaseToAutoscaleResponse, SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams, SqlResourcesMigrateSqlDatabaseToManualThroughputResponse, + SqlResourcesGetClientEncryptionKeyOptionalParams, + SqlResourcesGetClientEncryptionKeyResponse, + ClientEncryptionKeyCreateUpdateParameters, + SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + SqlResourcesCreateUpdateClientEncryptionKeyResponse, SqlResourcesGetSqlContainerOptionalParams, SqlResourcesGetSqlContainerResponse, SqlContainerCreateUpdateParameters, @@ -48,6 +53,11 @@ import { SqlResourcesCreateUpdateSqlContainerResponse, SqlResourcesDeleteSqlContainerOptionalParams, SqlResourcesDeleteSqlContainerResponse, + MergeParameters, + SqlResourcesSqlDatabasePartitionMergeOptionalParams, + SqlResourcesSqlDatabasePartitionMergeResponse, + SqlResourcesListSqlContainerPartitionMergeOptionalParams, + SqlResourcesListSqlContainerPartitionMergeResponse, SqlResourcesGetSqlContainerThroughputOptionalParams, SqlResourcesGetSqlContainerThroughputResponse, SqlResourcesUpdateSqlContainerThroughputOptionalParams, @@ -56,11 +66,16 @@ import { SqlResourcesMigrateSqlContainerToAutoscaleResponse, SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams, SqlResourcesMigrateSqlContainerToManualThroughputResponse, - SqlResourcesGetClientEncryptionKeyOptionalParams, - SqlResourcesGetClientEncryptionKeyResponse, - ClientEncryptionKeyCreateUpdateParameters, - SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, - SqlResourcesCreateUpdateClientEncryptionKeyResponse, + RetrieveThroughputParameters, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + SqlResourcesSqlDatabaseRedistributeThroughputResponse, + SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse, + SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + SqlResourcesSqlContainerRedistributeThroughputResponse, SqlResourcesGetSqlStoredProcedureOptionalParams, SqlResourcesGetSqlStoredProcedureResponse, SqlStoredProcedureCreateUpdateParameters, @@ -97,7 +112,7 @@ import { ContinuousBackupRestoreLocation, SqlResourcesRetrieveContinuousBackupInformationOptionalParams, SqlResourcesRetrieveContinuousBackupInformationResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a SqlResources. */ @@ -114,31 +129,31 @@ export interface SqlResources { options?: SqlResourcesListSqlDatabasesOptionalParams, ): PagedAsyncIterableIterator; /** - * Lists the SQL container under an existing Azure Cosmos DB database account. + * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The options parameters. */ - listSqlContainers( + listClientEncryptionKeys( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListSqlContainersOptionalParams, - ): PagedAsyncIterableIterator; + options?: SqlResourcesListClientEncryptionKeysOptionalParams, + ): PagedAsyncIterableIterator; /** - * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. + * Lists the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The options parameters. */ - listClientEncryptionKeys( + listSqlContainers( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, - ): PagedAsyncIterableIterator; + options?: SqlResourcesListSqlContainersOptionalParams, + ): PagedAsyncIterableIterator; /** * Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -398,6 +413,64 @@ export interface SqlResources { databaseName: string, options?: SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams, ): Promise; + /** + * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param options The options parameters. + */ + getClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + options?: SqlResourcesGetClientEncryptionKeyOptionalParams, + ): Promise; + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + beginCreateUpdateClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesCreateUpdateClientEncryptionKeyResponse + > + >; + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + beginCreateUpdateClientEncryptionKeyAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + ): Promise; /** * Gets the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -487,6 +560,80 @@ export interface SqlResources { containerName: string, options?: SqlResourcesDeleteSqlContainerOptionalParams, ): Promise; + /** + * Merges the partitions of a SQL database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginSqlDatabasePartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlDatabasePartitionMergeResponse + > + >; + /** + * Merges the partitions of a SQL database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginSqlDatabasePartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams, + ): Promise; + /** + * Merges the partitions of a SQL Container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginListSqlContainerPartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesListSqlContainerPartitionMergeResponse + > + >; + /** + * Merges the partitions of a SQL Container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginListSqlContainerPartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams, + ): Promise; /** * Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -614,63 +761,161 @@ export interface SqlResources { options?: SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams, ): Promise; /** - * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + * Retrieve throughput distribution for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. * @param options The options parameters. */ - getClientEncryptionKey( + beginSqlDatabaseRetrieveThroughputDistribution( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - options?: SqlResourcesGetClientEncryptionKeyOptionalParams, - ): Promise; + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse + > + >; /** - * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure - * Powershell (instead of directly). + * Retrieve throughput distribution for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption - * key. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. * @param options The options parameters. */ - beginCreateUpdateClientEncryptionKey( + beginSqlDatabaseRetrieveThroughputDistributionAndWait( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, - options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise; + /** + * Redistribute throughput for an Azure Cosmos DB SQL database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL database. + * @param options The options parameters. + */ + beginSqlDatabaseRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateClientEncryptionKeyResponse + OperationState, + SqlResourcesSqlDatabaseRedistributeThroughputResponse > >; /** - * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure - * Powershell (instead of directly). + * Redistribute throughput for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption - * key. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL database. * @param options The options parameters. */ - beginCreateUpdateClientEncryptionKeyAndWait( + beginSqlDatabaseRedistributeThroughputAndWait( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, - options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, - ): Promise; + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + ): Promise; + /** + * Retrieve throughput distribution for an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL container. + * @param options The options parameters. + */ + beginSqlContainerRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse + > + >; + /** + * Retrieve throughput distribution for an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL container. + * @param options The options parameters. + */ + beginSqlContainerRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + ): Promise; + /** + * Redistribute throughput for an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL container. + * @param options The options parameters. + */ + beginSqlContainerRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlContainerRedistributeThroughputResponse + > + >; + /** + * Redistribute throughput for an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL container. + * @param options The options parameters. + */ + beginSqlContainerRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + ): Promise; /** * Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts index 4359d0166d6b..1a4816213001 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts @@ -11,6 +11,10 @@ import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { TableGetResults, TableResourcesListTablesOptionalParams, + TableRoleDefinitionResource, + TableResourcesListTableRoleDefinitionsOptionalParams, + TableRoleAssignmentResource, + TableResourcesListTableRoleAssignmentsOptionalParams, TableResourcesGetTableOptionalParams, TableResourcesGetTableResponse, TableCreateUpdateParameters, @@ -30,7 +34,17 @@ import { ContinuousBackupRestoreLocation, TableResourcesRetrieveContinuousBackupInformationOptionalParams, TableResourcesRetrieveContinuousBackupInformationResponse, -} from "../models"; + TableResourcesGetTableRoleDefinitionOptionalParams, + TableResourcesGetTableRoleDefinitionResponse, + TableResourcesCreateUpdateTableRoleDefinitionOptionalParams, + TableResourcesCreateUpdateTableRoleDefinitionResponse, + TableResourcesDeleteTableRoleDefinitionOptionalParams, + TableResourcesGetTableRoleAssignmentOptionalParams, + TableResourcesGetTableRoleAssignmentResponse, + TableResourcesCreateUpdateTableRoleAssignmentOptionalParams, + TableResourcesCreateUpdateTableRoleAssignmentResponse, + TableResourcesDeleteTableRoleAssignmentOptionalParams, +} from "../models/index.js"; /// /** Interface representing a TableResources. */ @@ -46,6 +60,28 @@ export interface TableResources { accountName: string, options?: TableResourcesListTablesOptionalParams, ): PagedAsyncIterableIterator; + /** + * Retrieves the list of all Azure Cosmos DB Table Role Definitions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + listTableRoleDefinitions( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleDefinitionsOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Retrieves the list of all Azure Cosmos DB Table Role Assignments. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + listTableRoleAssignments( + resourceGroupName: string, + accountName: string, + options?: TableResourcesListTableRoleAssignmentsOptionalParams, + ): PagedAsyncIterableIterator; /** * Gets the Tables under an existing Azure Cosmos DB database account with the provided name. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -273,4 +309,156 @@ export interface TableResources { location: ContinuousBackupRestoreLocation, options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams, ): Promise; + /** + * Retrieves the properties of an existing Azure Cosmos DB Table Role Definition with the given Id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param options The options parameters. + */ + getTableRoleDefinition( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + options?: TableResourcesGetTableRoleDefinitionOptionalParams, + ): Promise; + /** + * Creates or updates an Azure Cosmos DB Table Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param createUpdateTableRoleDefinitionParameters The properties required to create or update a Role + * Definition. + * @param options The options parameters. + */ + beginCreateUpdateTableRoleDefinition( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + createUpdateTableRoleDefinitionParameters: TableRoleDefinitionResource, + options?: TableResourcesCreateUpdateTableRoleDefinitionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + TableResourcesCreateUpdateTableRoleDefinitionResponse + > + >; + /** + * Creates or updates an Azure Cosmos DB Table Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param createUpdateTableRoleDefinitionParameters The properties required to create or update a Role + * Definition. + * @param options The options parameters. + */ + beginCreateUpdateTableRoleDefinitionAndWait( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + createUpdateTableRoleDefinitionParameters: TableRoleDefinitionResource, + options?: TableResourcesCreateUpdateTableRoleDefinitionOptionalParams, + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Table Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param options The options parameters. + */ + beginDeleteTableRoleDefinition( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + options?: TableResourcesDeleteTableRoleDefinitionOptionalParams, + ): Promise, void>>; + /** + * Deletes an existing Azure Cosmos DB Table Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleDefinitionId The GUID for the Role Definition. + * @param options The options parameters. + */ + beginDeleteTableRoleDefinitionAndWait( + resourceGroupName: string, + accountName: string, + roleDefinitionId: string, + options?: TableResourcesDeleteTableRoleDefinitionOptionalParams, + ): Promise; + /** + * Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment with the given Id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param options The options parameters. + */ + getTableRoleAssignment( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + options?: TableResourcesGetTableRoleAssignmentOptionalParams, + ): Promise; + /** + * Creates or updates an Azure Cosmos DB Table Role Assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param createUpdateTableRoleAssignmentParameters The properties required to create or update a Role + * Assignment. + * @param options The options parameters. + */ + beginCreateUpdateTableRoleAssignment( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + createUpdateTableRoleAssignmentParameters: TableRoleAssignmentResource, + options?: TableResourcesCreateUpdateTableRoleAssignmentOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + TableResourcesCreateUpdateTableRoleAssignmentResponse + > + >; + /** + * Creates or updates an Azure Cosmos DB Table Role Assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param createUpdateTableRoleAssignmentParameters The properties required to create or update a Role + * Assignment. + * @param options The options parameters. + */ + beginCreateUpdateTableRoleAssignmentAndWait( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + createUpdateTableRoleAssignmentParameters: TableRoleAssignmentResource, + options?: TableResourcesCreateUpdateTableRoleAssignmentOptionalParams, + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Table Role Assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param options The options parameters. + */ + beginDeleteTableRoleAssignment( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + options?: TableResourcesDeleteTableRoleAssignmentOptionalParams, + ): Promise, void>>; + /** + * Deletes an existing Azure Cosmos DB Table Role Assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param roleAssignmentId The GUID for the Role Assignment. + * @param options The options parameters. + */ + beginDeleteTableRoleAssignmentAndWait( + resourceGroupName: string, + accountName: string, + roleAssignmentId: string, + options?: TableResourcesDeleteTableRoleAssignmentOptionalParams, + ): Promise; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPool.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPool.ts new file mode 100644 index 000000000000..6818eed29064 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPool.ts @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ThroughputPoolGetOptionalParams, + ThroughputPoolGetResponse, + ThroughputPoolResource, + ThroughputPoolCreateOrUpdateOptionalParams, + ThroughputPoolCreateOrUpdateResponse, + ThroughputPoolUpdateOptionalParams, + ThroughputPoolUpdateResponse, + ThroughputPoolDeleteOptionalParams, + ThroughputPoolDeleteResponse, +} from "../models/index.js"; + +/** Interface representing a ThroughputPool. */ +export interface ThroughputPool { + /** + * Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolGetOptionalParams, + ): Promise; + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param body The parameters to provide for the current ThroughputPool. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + throughputPoolName: string, + body: ThroughputPoolResource, + options?: ThroughputPoolCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolCreateOrUpdateResponse + > + >; + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param body The parameters to provide for the current ThroughputPool. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + throughputPoolName: string, + body: ThroughputPoolResource, + options?: ThroughputPoolCreateOrUpdateOptionalParams, + ): Promise; + /** + * Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolUpdateResponse + > + >; + /** + * Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolUpdateOptionalParams, + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolDeleteResponse + > + >; + /** + * Deletes an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccount.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccount.ts new file mode 100644 index 000000000000..1a1b94f0eb90 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccount.ts @@ -0,0 +1,103 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ThroughputPoolAccountGetOptionalParams, + ThroughputPoolAccountGetResponse, + ThroughputPoolAccountResource, + ThroughputPoolAccountCreateOptionalParams, + ThroughputPoolAccountCreateResponse, + ThroughputPoolAccountDeleteOptionalParams, + ThroughputPoolAccountDeleteResponse, +} from "../models/index.js"; + +/** Interface representing a ThroughputPoolAccount. */ +export interface ThroughputPoolAccount { + /** + * Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountGetOptionalParams, + ): Promise; + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param body The parameters to provide for the current ThroughputPoolAccount. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + body: ThroughputPoolAccountResource, + options?: ThroughputPoolAccountCreateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolAccountCreateResponse + > + >; + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param body The parameters to provide for the current ThroughputPoolAccount. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + body: ThroughputPoolAccountResource, + options?: ThroughputPoolAccountCreateOptionalParams, + ): Promise; + /** + * Removes an existing Azure Cosmos DB database account from a throughput pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolAccountDeleteResponse + > + >; + /** + * Removes an existing Azure Cosmos DB database account from a throughput pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccounts.ts new file mode 100644 index 000000000000..7cf0a0cdf1a2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccounts.ts @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ThroughputPoolAccountResource, + ThroughputPoolAccountsListOptionalParams, +} from "../models/index.js"; + +/// +/** Interface representing a ThroughputPoolAccounts. */ +export interface ThroughputPoolAccounts { + /** + * Lists all the Azure Cosmos DB accounts available under the subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPools.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPools.ts new file mode 100644 index 000000000000..2ce03d70a1f8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPools.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ThroughputPoolResource, + ThroughputPoolsListOptionalParams, + ThroughputPoolsListByResourceGroupOptionalParams, +} from "../models/index.js"; + +/// +/** Interface representing a ThroughputPools. */ +export interface ThroughputPools { + /** + * Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * @param options The options parameters. + */ + list( + options?: ThroughputPoolsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * List all the ThroughputPools in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_cassandra_examples.ts b/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_cassandra_examples.spec.ts similarity index 87% rename from sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_cassandra_examples.ts rename to sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_cassandra_examples.spec.ts index 9e5f1f4ffb93..4c59c9b0dcdc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_cassandra_examples.ts +++ b/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_cassandra_examples.spec.ts @@ -10,15 +10,11 @@ import { env, Recorder, RecorderStartOptions, - delay, isPlaybackMode, } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { CosmosDBManagementClient } from "../src/cosmosDBManagementClient"; - - +import { CosmosDBManagementClient } from "../src/cosmosDBManagementClient.js"; +import { afterEach, assert, beforeEach, describe, it } from "vitest"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888" @@ -36,7 +32,7 @@ export const testPollingOptions = { updateIntervalInMs: isPlaybackMode() ? 0 : undefined, }; -describe.only("Cosmosdb test", () => { +describe("Cosmosdb test", () => { let recorder: Recorder; let client: CosmosDBManagementClient; let subscriptionId: string; @@ -45,8 +41,8 @@ describe.only("Cosmosdb test", () => { let accountName: string; let keyspaceName: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async function (ctx) { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); subscriptionId = env.SUBSCRIPTION_ID || ''; // This is an example of how the environment variables are used @@ -58,11 +54,11 @@ describe.only("Cosmosdb test", () => { keyspaceName = "mykeyspacexxx"; }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - it("databaseAccounts create for cassandraResources test", async function () { + it("databaseAccounts create for cassandraResources test", async () => { const res = await client.databaseAccounts.beginCreateOrUpdateAndWait(resourceGroupName, accountName, { kind: "GlobalDocumentDB", databaseAccountOfferType: "Standard", @@ -85,7 +81,7 @@ describe.only("Cosmosdb test", () => { assert.equal(res.name, accountName); }); - it("cassandraResources create test", async function () { + it("cassandraResources create test", async () => { const res = await client.cassandraResources.beginCreateUpdateCassandraKeyspaceAndWait(resourceGroupName, accountName, keyspaceName, { location: location, resource: { @@ -98,7 +94,7 @@ describe.only("Cosmosdb test", () => { assert.equal(res.type, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces"); }); - it("cassandraResources update test", async function () { + it("cassandraResources update test", async () => { const res = await client.cassandraResources.beginUpdateCassandraKeyspaceThroughputAndWait(resourceGroupName, accountName, keyspaceName, { location: location, resource: { @@ -108,12 +104,12 @@ describe.only("Cosmosdb test", () => { assert.equal(res.resource?.throughput, 400); }); - it("cassandraResources get test", async function () { + it("cassandraResources get test", async () => { const res = await client.cassandraResources.getCassandraKeyspace(resourceGroupName, accountName, keyspaceName); assert.equal(res.type, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces"); }); - it("cassandraResources list test", async function () { + it("cassandraResources list test", async () => { const resArray = new Array(); for await (let item of client.cassandraResources.listCassandraKeyspaces(resourceGroupName, accountName)) { resArray.push(item); @@ -121,12 +117,12 @@ describe.only("Cosmosdb test", () => { assert.equal(resArray.length, 1); }); - it("cassandraResources MigrateCassandra test", async function () { + it("cassandraResources MigrateCassandra test", async () => { const res = await client.cassandraResources.beginMigrateCassandraKeyspaceToAutoscaleAndWait(resourceGroupName, accountName, keyspaceName, testPollingOptions); assert.equal(res.type, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/throughputSettings/migrateToAutoscale") }); - it("cassandraResources delete test", async function () { + it("cassandraResources delete test", async () => { await client.cassandraResources.beginDeleteCassandraKeyspaceAndWait(resourceGroupName, accountName, keyspaceName, testPollingOptions); const resArray = new Array(); for await (let item of client.cassandraResources.listCassandraKeyspaces(resourceGroupName, accountName)) { @@ -135,7 +131,7 @@ describe.only("Cosmosdb test", () => { assert.equal(resArray.length, 0); }); - it("databaseAccount delete for cassandraResources test", async function () { + it("databaseAccount delete for cassandraResources test", async () => { await client.databaseAccounts.beginDeleteAndWait( resourceGroupName, accountName, diff --git a/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_examples.ts b/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_examples.spec.ts similarity index 86% rename from sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_examples.ts rename to sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_examples.spec.ts index 5e9dc490d284..a7d4ca829ef8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_examples.ts +++ b/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_examples.spec.ts @@ -10,15 +10,11 @@ import { env, Recorder, RecorderStartOptions, - delay, isPlaybackMode, } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { CosmosDBManagementClient } from "../src/cosmosDBManagementClient"; - - +import { CosmosDBManagementClient } from "../src/cosmosDBManagementClient.js"; +import { afterEach, assert, beforeEach, describe, it } from "vitest"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888" @@ -45,8 +41,8 @@ describe("Cosmosdb test", () => { let resourceGroupName: string; let accountName: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async function (ctx) { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); subscriptionId = env.SUBSCRIPTION_ID || ''; // This is an example of how the environment variables are used @@ -57,11 +53,11 @@ describe("Cosmosdb test", () => { accountName = "myaccountxxyz2"; }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - it("databaseAccounts create test", async function () { + it("databaseAccounts create test", async () => { const res = await client.databaseAccounts.beginCreateOrUpdateAndWait(resourceGroupName, accountName, { databaseAccountOfferType: "Standard", locations: [ @@ -85,12 +81,12 @@ describe("Cosmosdb test", () => { assert.equal(res.name, accountName); }); - it("databaseAccounts get test", async function () { + it("databaseAccounts get test", async () => { const res = await client.databaseAccounts.get(resourceGroupName, accountName); assert.equal(res.name, accountName); }); - it("databaseAccounts list test", async function () { + it("databaseAccounts list test", async () => { const resArray = new Array(); for await (let item of client.databaseAccounts.listByResourceGroup(resourceGroupName)) { resArray.push(item); @@ -98,12 +94,12 @@ describe("Cosmosdb test", () => { assert.equal(resArray.length, 1); }); - it("databaseAccounts delete test", async function () { + it("databaseAccounts delete test", { timeout: 3600000 }, async () => { await client.databaseAccounts.beginDeleteAndWait(resourceGroupName, accountName, testPollingOptions); const resArray = new Array(); for await (let item of client.databaseAccounts.listByResourceGroup(resourceGroupName)) { resArray.push(item); } assert.equal(resArray.length, 0); - }).timeout(3600000); + }); }); diff --git a/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_mongodb_examples.ts b/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_mongodb_examples.spec.ts similarity index 87% rename from sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_mongodb_examples.ts rename to sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_mongodb_examples.spec.ts index cb0063827c82..4578818d85d2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_mongodb_examples.ts +++ b/sdk/cosmosdb/arm-cosmosdb/test/cosmosdb_mongodb_examples.spec.ts @@ -10,15 +10,11 @@ import { env, Recorder, RecorderStartOptions, - delay, isPlaybackMode, } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { CosmosDBManagementClient } from "../src/cosmosDBManagementClient"; - - +import { CosmosDBManagementClient } from "../src/cosmosDBManagementClient.js"; +import { afterEach, assert, beforeEach, describe, it } from "vitest"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888" @@ -44,8 +40,8 @@ describe("Cosmosdb test", () => { let accountName: string; let databaseName: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async function (ctx) { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); subscriptionId = env.SUBSCRIPTION_ID || ''; // This is an example of how the environment variables are used @@ -57,11 +53,11 @@ describe("Cosmosdb test", () => { databaseName = "mydatabasexxxx"; }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - it("databaseAccounts create for mongoDBResources test", async function () { + it("databaseAccounts create for mongoDBResources test", async () => { const res = await client.databaseAccounts.beginCreateOrUpdateAndWait(resourceGroupName, accountName, { kind: "MongoDB", databaseAccountOfferType: "Standard", @@ -79,7 +75,7 @@ describe("Cosmosdb test", () => { assert.equal(res.name, accountName); }); - it("mongoDBResources create test", async function () { + it("mongoDBResources create test", async () => { const res = await client.mongoDBResources.beginCreateUpdateMongoDBDatabaseAndWait(resourceGroupName, accountName, databaseName, { location: location, resource: { @@ -92,7 +88,7 @@ describe("Cosmosdb test", () => { assert.equal(res.type, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases") }); - it("mongoDBResources update test", async function () { + it("mongoDBResources update test", async () => { const res = await client.mongoDBResources.beginUpdateMongoDBDatabaseThroughputAndWait(resourceGroupName, accountName, databaseName, { location: location, resource: { @@ -102,23 +98,23 @@ describe("Cosmosdb test", () => { assert.equal(res.resource?.throughput, 400); }); - it("mongoDBResources get test", async function () { + it("mongoDBResources get test", async () => { const res = await client.mongoDBResources.getMongoDBDatabase(resourceGroupName, accountName, databaseName); assert.equal(res.type, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases"); }); - it("mongoDBResources list test", async function () { + it("mongoDBResources list test", async () => { for await (let item of client.mongoDBResources.listMongoDBDatabases(resourceGroupName, accountName)) { assert.equal(item.type, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases"); } }); - it("mongoDBResources migrate test", async function () { + it("mongoDBResources migrate test", async () => { const res = await client.mongoDBResources.beginMigrateMongoDBDatabaseToAutoscaleAndWait(resourceGroupName, accountName, databaseName, testPollingOptions); assert.equal(res.type, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings/migrateToAutoscale"); }); - it("mongoDBResources delete test", async function () { + it("mongoDBResources delete test", async () => { await client.mongoDBResources.beginDeleteMongoDBDatabaseAndWait(resourceGroupName, accountName, databaseName, testPollingOptions); const resArray = new Array(); for await (let item of client.mongoDBResources.listMongoDBDatabases(resourceGroupName, accountName)) { @@ -127,7 +123,7 @@ describe("Cosmosdb test", () => { assert.equal(resArray.length, 0); }); - it("databaseAccount delete for mongoDBResources test", async function () { + it("databaseAccount delete for mongoDBResources test", async () => { await client.databaseAccounts.beginDeleteAndWait( resourceGroupName, accountName, diff --git a/sdk/cosmosdb/arm-cosmosdb/tsconfig.browser.config.json b/sdk/cosmosdb/arm-cosmosdb/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/tsconfig.browser.config.json @@ -0,0 +1,17 @@ +{ + "extends": "./.tshy/build.json", + "include": [ + "./src/**/*.ts", + "./src/**/*.mts", + "./test/**/*.spec.ts", + "./test/**/*.mts" + ], + "exclude": [ + "./test/**/node/**/*.ts" + ], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } +} diff --git a/sdk/cosmosdb/arm-cosmosdb/tsconfig.json b/sdk/cosmosdb/arm-cosmosdb/tsconfig.json index 4c414734673e..19ceb382b521 100644 --- a/sdk/cosmosdb/arm-cosmosdb/tsconfig.json +++ b/sdk/cosmosdb/arm-cosmosdb/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-cosmosdb": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "src/**/*.ts", - "test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/cosmosdb/arm-cosmosdb/tsconfig.samples.json b/sdk/cosmosdb/arm-cosmosdb/tsconfig.samples.json new file mode 100644 index 000000000000..f1aa81d8336e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-cosmosdb": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/cosmosdb/arm-cosmosdb/tsconfig.src.json b/sdk/cosmosdb/arm-cosmosdb/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/cosmosdb/arm-cosmosdb/tsconfig.test.json b/sdk/cosmosdb/arm-cosmosdb/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/cosmosdb/arm-cosmosdb/vitest.browser.config.ts b/sdk/cosmosdb/arm-cosmosdb/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: [ + "dist-test/browser/test/**/*.spec.js", + ], + }, + }), +); diff --git a/sdk/cosmosdb/arm-cosmosdb/vitest.config.ts b/sdk/cosmosdb/arm-cosmosdb/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/cosmosdb/arm-cosmosdb/vitest.esm.config.ts b/sdk/cosmosdb/arm-cosmosdb/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); From 340cf3af23cbe5d5380b149a239fda4af10a80e0 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:05:38 +0800 Subject: [PATCH 17/55] [mgmt] deviceregistry release (#32190) https://github.com/Azure/sdk-release-request/issues/5760 --- common/config/rush/pnpm-lock.yaml | 41 +- .../arm-deviceregistry/CHANGELOG.md | 195 +- .../arm-deviceregistry/README.md | 19 +- .../arm-deviceregistry/_meta.json | 8 - .../arm-deviceregistry/api-extractor.json | 6 +- .../arm-deviceregistry/assets.json | 2 +- .../arm-deviceregistry/eslint.config.mjs | 17 + .../arm-deviceregistry/package.json | 203 +- .../review/arm-deviceregistry-models.api.md | 582 +++++ .../review/arm-deviceregistry.api.md | 809 ++++-- .../arm-deviceregistry/sample.env | 5 +- ...etEndpointProfilesCreateOrReplaceSample.ts | 96 +- .../assetEndpointProfilesDeleteSample.ts | 35 +- .../assetEndpointProfilesGetSample.ts | 49 +- ...dpointProfilesListByResourceGroupSample.ts | 33 +- ...ndpointProfilesListBySubscriptionSample.ts | 27 +- .../assetEndpointProfilesUpdateSample.ts | 47 +- .../assetsCreateOrReplaceSample.ts | 424 +-- .../samples-dev/assetsDeleteSample.ts | 35 +- .../samples-dev/assetsGetSample.ts | 50 +- .../assetsListByResourceGroupSample.ts | 31 +- .../assetsListBySubscriptionSample.ts | 27 +- .../samples-dev/assetsUpdateSample.ts | 45 +- .../samples-dev/billingContainersGetSample.ts | 25 + ...llingContainersListBySubscriptionSample.ts | 29 + ...etEndpointProfilesCreateOrReplaceSample.ts | 44 + ...overedAssetEndpointProfilesDeleteSample.ts | 27 + ...iscoveredAssetEndpointProfilesGetSample.ts | 28 + ...dpointProfilesListByResourceGroupSample.ts | 31 + ...ndpointProfilesListBySubscriptionSample.ts | 29 + ...overedAssetEndpointProfilesUpdateSample.ts | 38 + .../discoveredAssetsCreateOrReplaceSample.ts | 88 + .../discoveredAssetsDeleteSample.ts | 24 + .../samples-dev/discoveredAssetsGetSample.ts | 25 + ...scoveredAssetsListByResourceGroupSample.ts | 29 + ...iscoveredAssetsListBySubscriptionSample.ts | 29 + .../discoveredAssetsUpdateSample.ts | 30 + .../samples-dev/operationStatusGetSample.ts | 33 +- .../samples-dev/operationsListSample.ts | 27 +- .../schemaRegistriesCreateOrReplaceSample.ts | 39 + .../schemaRegistriesDeleteSample.ts | 24 + .../samples-dev/schemaRegistriesGetSample.ts | 25 + ...hemaRegistriesListByResourceGroupSample.ts | 29 + ...chemaRegistriesListBySubscriptionSample.ts | 29 + .../schemaRegistriesUpdateSample.ts | 31 + .../schemaVersionsCreateOrReplaceSample.ts | 37 + .../samples-dev/schemaVersionsDeleteSample.ts | 24 + .../samples-dev/schemaVersionsGetSample.ts | 30 + .../schemaVersionsListBySchemaSample.ts | 33 + .../schemasCreateOrReplaceSample.ts | 38 + .../samples-dev/schemasDeleteSample.ts | 24 + .../samples-dev/schemasGetSample.ts | 25 + .../schemasListBySchemaRegistrySample.ts | 32 + .../samples/v1-beta/javascript/README.md | 98 +- ...etEndpointProfilesCreateOrReplaceSample.js | 87 +- .../assetEndpointProfilesDeleteSample.js | 31 +- .../assetEndpointProfilesGetSample.js | 47 +- ...dpointProfilesListByResourceGroupSample.js | 27 +- ...ndpointProfilesListBySubscriptionSample.js | 24 +- .../assetEndpointProfilesUpdateSample.js | 38 +- .../javascript/assetsCreateOrReplaceSample.js | 396 +-- .../v1-beta/javascript/assetsDeleteSample.js | 28 +- .../v1-beta/javascript/assetsGetSample.js | 44 +- .../assetsListByResourceGroupSample.js | 27 +- .../assetsListBySubscriptionSample.js | 24 +- .../v1-beta/javascript/assetsUpdateSample.js | 32 +- .../javascript/billingContainersGetSample.js | 25 + ...llingContainersListBySubscriptionSample.js | 29 + ...etEndpointProfilesCreateOrReplaceSample.js | 44 + ...overedAssetEndpointProfilesDeleteSample.js | 27 + ...iscoveredAssetEndpointProfilesGetSample.js | 28 + ...dpointProfilesListByResourceGroupSample.js | 31 + ...ndpointProfilesListBySubscriptionSample.js | 29 + ...overedAssetEndpointProfilesUpdateSample.js | 38 + .../discoveredAssetsCreateOrReplaceSample.js | 88 + .../discoveredAssetsDeleteSample.js | 24 + .../javascript/discoveredAssetsGetSample.js | 25 + ...scoveredAssetsListByResourceGroupSample.js | 29 + ...iscoveredAssetsListBySubscriptionSample.js | 29 + .../discoveredAssetsUpdateSample.js | 30 + .../javascript/operationStatusGetSample.js | 30 +- .../javascript/operationsListSample.js | 24 +- .../samples/v1-beta/javascript/package.json | 3 +- .../samples/v1-beta/javascript/sample.env | 5 +- .../schemaRegistriesCreateOrReplaceSample.js | 39 + .../schemaRegistriesDeleteSample.js | 24 + .../javascript/schemaRegistriesGetSample.js | 25 + ...hemaRegistriesListByResourceGroupSample.js | 29 + ...chemaRegistriesListBySubscriptionSample.js | 29 + .../schemaRegistriesUpdateSample.js | 31 + .../schemaVersionsCreateOrReplaceSample.js | 37 + .../javascript/schemaVersionsDeleteSample.js | 24 + .../javascript/schemaVersionsGetSample.js | 30 + .../schemaVersionsListBySchemaSample.js | 33 + .../schemasCreateOrReplaceSample.js | 38 + .../v1-beta/javascript/schemasDeleteSample.js | 24 + .../v1-beta/javascript/schemasGetSample.js | 25 + .../schemasListBySchemaRegistrySample.js | 32 + .../samples/v1-beta/typescript/README.md | 98 +- .../samples/v1-beta/typescript/package.json | 3 +- .../samples/v1-beta/typescript/sample.env | 5 +- ...etEndpointProfilesCreateOrReplaceSample.ts | 96 +- .../src/assetEndpointProfilesDeleteSample.ts | 35 +- .../src/assetEndpointProfilesGetSample.ts | 49 +- ...dpointProfilesListByResourceGroupSample.ts | 33 +- ...ndpointProfilesListBySubscriptionSample.ts | 27 +- .../src/assetEndpointProfilesUpdateSample.ts | 47 +- .../src/assetsCreateOrReplaceSample.ts | 424 +-- .../typescript/src/assetsDeleteSample.ts | 35 +- .../v1-beta/typescript/src/assetsGetSample.ts | 50 +- .../src/assetsListByResourceGroupSample.ts | 31 +- .../src/assetsListBySubscriptionSample.ts | 27 +- .../typescript/src/assetsUpdateSample.ts | 45 +- .../src/billingContainersGetSample.ts | 25 + ...llingContainersListBySubscriptionSample.ts | 29 + ...etEndpointProfilesCreateOrReplaceSample.ts | 44 + ...overedAssetEndpointProfilesDeleteSample.ts | 27 + ...iscoveredAssetEndpointProfilesGetSample.ts | 28 + ...dpointProfilesListByResourceGroupSample.ts | 31 + ...ndpointProfilesListBySubscriptionSample.ts | 29 + ...overedAssetEndpointProfilesUpdateSample.ts | 38 + .../discoveredAssetsCreateOrReplaceSample.ts | 88 + .../src/discoveredAssetsDeleteSample.ts | 24 + .../src/discoveredAssetsGetSample.ts | 25 + ...scoveredAssetsListByResourceGroupSample.ts | 29 + ...iscoveredAssetsListBySubscriptionSample.ts | 29 + .../src/discoveredAssetsUpdateSample.ts | 30 + .../src/operationStatusGetSample.ts | 33 +- .../typescript/src/operationsListSample.ts | 27 +- .../schemaRegistriesCreateOrReplaceSample.ts | 39 + .../src/schemaRegistriesDeleteSample.ts | 24 + .../src/schemaRegistriesGetSample.ts | 25 + ...hemaRegistriesListByResourceGroupSample.ts | 29 + ...chemaRegistriesListBySubscriptionSample.ts | 29 + .../src/schemaRegistriesUpdateSample.ts | 31 + .../schemaVersionsCreateOrReplaceSample.ts | 37 + .../src/schemaVersionsDeleteSample.ts | 24 + .../typescript/src/schemaVersionsGetSample.ts | 30 + .../src/schemaVersionsListBySchemaSample.ts | 33 + .../src/schemasCreateOrReplaceSample.ts | 38 + .../typescript/src/schemasDeleteSample.ts | 24 + .../typescript/src/schemasGetSample.ts | 25 + .../src/schemasListBySchemaRegistrySample.ts | 32 + .../src/api/assetEndpointProfiles/index.ts | 353 +++ .../src/api/assets/index.ts | 306 +++ .../src/api/billingContainers/index.ts | 109 + .../api/deviceRegistryManagementContext.ts | 57 + .../discoveredAssetEndpointProfiles/index.ts | 370 +++ .../src/api/discoveredAssets/index.ts | 343 +++ .../arm-deviceregistry/src/api/index.ts | 110 + .../src/api/operationStatus/index.ts | 60 + .../src/api/operations/index.ts | 56 + .../arm-deviceregistry/src/api/options.ts | 178 ++ .../src/api/schemaRegistries/index.ts | 343 +++ .../src/api/schemaVersions/index.ts | 251 ++ .../src/api/schemas/index.ts | 231 ++ .../classic/assetEndpointProfiles/index.ts | 138 + .../src/classic/assets/index.ts | 106 + .../src/classic/billingContainers/index.ts | 48 + .../discoveredAssetEndpointProfiles/index.ts | 147 ++ .../src/classic/discoveredAssets/index.ts | 131 + .../arm-deviceregistry/src/classic/index.ts | 13 + .../src/classic/operationStatus/index.ts | 36 + .../src/classic/operations/index.ts | 28 + .../src/classic/schemaRegistries/index.ts | 131 + .../src/classic/schemaVersions/index.ts | 135 + .../src/classic/schemas/index.ts | 120 + .../src/deviceRegistryManagementClient.ts | 231 +- .../src/helpers/serializerHelpers.ts | 36 + .../arm-deviceregistry/src/index.ts | 161 +- .../arm-deviceregistry/src/logger.ts | 5 + .../arm-deviceregistry/src/lroImpl.ts | 42 - .../arm-deviceregistry/src/models/index.ts | 950 +------ .../arm-deviceregistry/src/models/mappers.ts | 1387 ---------- .../arm-deviceregistry/src/models/models.ts | 2294 +++++++++++++++++ .../src/models/parameters.ts | 188 -- .../src/operations/assetEndpointProfiles.ts | 733 ------ .../src/operations/assets.ts | 722 ------ .../src/operations/index.ts | 12 - .../src/operations/operationStatus.ts | 71 - .../src/operations/operations.ts | 149 -- .../assetEndpointProfiles.ts | 145 -- .../src/operationsInterfaces/assets.ts | 139 - .../src/operationsInterfaces/index.ts | 12 - .../operationsInterfaces/operationStatus.ts | 27 - .../src/operationsInterfaces/operations.ts | 22 - .../arm-deviceregistry/src/pagingHelper.ts | 39 - .../src/restorePollerHelpers.ts | 248 ++ .../src/static-helpers/pagingHelpers.ts | 241 ++ .../src/static-helpers/pollingHelpers.ts | 126 + .../deviceregistry_operations_test.spec.ts | 70 - .../deviceregistry_operations_test.spec.ts | 46 + .../test/public/utils/recordedClient.ts | 23 + .../tsconfig.browser.config.json | 3 + .../arm-deviceregistry/tsconfig.json | 40 +- .../arm-deviceregistry/tsconfig.samples.json | 8 + .../arm-deviceregistry/tsconfig.src.json | 3 + .../arm-deviceregistry/tsconfig.test.json | 3 + .../arm-deviceregistry/tsp-location.yaml | 4 + .../vitest.browser.config.ts | 17 + .../arm-deviceregistry/vitest.config.ts | 15 + .../arm-deviceregistry/vitest.esm.config.ts | 12 + sdk/deviceregistry/ci.mgmt.yml | 5 +- 203 files changed, 12837 insertions(+), 6756 deletions(-) delete mode 100644 sdk/deviceregistry/arm-deviceregistry/_meta.json create mode 100644 sdk/deviceregistry/arm-deviceregistry/eslint.config.mjs create mode 100644 sdk/deviceregistry/arm-deviceregistry/review/arm-deviceregistry-models.api.md create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/billingContainersGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/billingContainersListBySubscriptionSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesListByResourceGroupSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesListBySubscriptionSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesUpdateSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsListByResourceGroupSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsListBySubscriptionSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsUpdateSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesListByResourceGroupSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesListBySubscriptionSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesUpdateSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsListBySchemaSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasListBySchemaRegistrySample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersGetSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersListBySubscriptionSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesCreateOrReplaceSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesDeleteSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesGetSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListByResourceGroupSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListBySubscriptionSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesUpdateSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsCreateOrReplaceSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsDeleteSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsGetSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListByResourceGroupSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListBySubscriptionSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsUpdateSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesCreateOrReplaceSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesDeleteSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesGetSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListByResourceGroupSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListBySubscriptionSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesUpdateSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsCreateOrReplaceSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsDeleteSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsGetSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsListBySchemaSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasCreateOrReplaceSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasDeleteSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasGetSample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasListBySchemaRegistrySample.js create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersListBySubscriptionSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListByResourceGroupSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListBySubscriptionSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesUpdateSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListByResourceGroupSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListBySubscriptionSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsUpdateSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListByResourceGroupSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListBySubscriptionSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesUpdateSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsListBySchemaSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasCreateOrReplaceSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasDeleteSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasGetSample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasListBySchemaRegistrySample.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/assetEndpointProfiles/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/assets/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/billingContainers/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/deviceRegistryManagementContext.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/discoveredAssetEndpointProfiles/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/discoveredAssets/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/operationStatus/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/operations/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/options.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/schemaRegistries/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/schemaVersions/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/api/schemas/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/assetEndpointProfiles/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/assets/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/billingContainers/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/discoveredAssetEndpointProfiles/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/discoveredAssets/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/operationStatus/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/operations/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/schemaRegistries/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/schemaVersions/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/classic/schemas/index.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/helpers/serializerHelpers.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/logger.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/lroImpl.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/models/mappers.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/models/models.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/models/parameters.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operations/assetEndpointProfiles.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operations/assets.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operations/index.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operations/operationStatus.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operations/operations.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/assetEndpointProfiles.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/assets.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/index.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/operationStatus.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/operations.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/src/pagingHelper.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/restorePollerHelpers.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/static-helpers/pagingHelpers.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/src/static-helpers/pollingHelpers.ts delete mode 100644 sdk/deviceregistry/arm-deviceregistry/test/deviceregistry_operations_test.spec.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/test/public/deviceregistry_operations_test.spec.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/test/public/utils/recordedClient.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/tsconfig.browser.config.json create mode 100644 sdk/deviceregistry/arm-deviceregistry/tsconfig.samples.json create mode 100644 sdk/deviceregistry/arm-deviceregistry/tsconfig.src.json create mode 100644 sdk/deviceregistry/arm-deviceregistry/tsconfig.test.json create mode 100644 sdk/deviceregistry/arm-deviceregistry/tsp-location.yaml create mode 100644 sdk/deviceregistry/arm-deviceregistry/vitest.browser.config.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/vitest.config.ts create mode 100644 sdk/deviceregistry/arm-deviceregistry/vitest.esm.config.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 654376987382..f52e8265a995 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -297,7 +297,7 @@ importers: version: file:projects/arm-deviceprovisioningservices.tgz '@rush-temp/arm-deviceregistry': specifier: file:./projects/arm-deviceregistry.tgz - version: file:projects/arm-deviceregistry.tgz + version: file:projects/arm-deviceregistry.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-deviceupdate': specifier: file:./projects/arm-deviceupdate.tgz version: file:projects/arm-deviceupdate.tgz @@ -2820,7 +2820,7 @@ packages: version: 0.0.0 '@rush-temp/arm-deviceregistry@file:projects/arm-deviceregistry.tgz': - resolution: {integrity: sha512-0bWMD74mBtOu2gcjb2Sv8ItM8hzu8pOfQHcKge9qnAoL+F/a9AVxjZLbr/jiA/o0RFMWJEtWgeDUeM6HRg4+7g==, tarball: file:projects/arm-deviceregistry.tgz} + resolution: {integrity: sha512-WsvlPu2XOJPM8ZI54Vv/iib89sHtQPriX+B/LoO5w0UkU9WyV8bjcYbCi/cCOYYMLcsi5dWvyfRU20a6BLppFA==, tarball: file:projects/arm-deviceregistry.tgz} version: 0.0.0 '@rush-temp/arm-deviceupdate@file:projects/arm-deviceupdate.tgz': @@ -11931,25 +11931,38 @@ snapshots: - '@swc/wasm' - supports-color - '@rush-temp/arm-deviceregistry@file:projects/arm-deviceregistry.tgz': + '@rush-temp/arm-deviceregistry@file:projects/arm-deviceregistry.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 - '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 + '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + eslint: 9.17.0 + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jiti + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio '@rush-temp/arm-deviceupdate@file:projects/arm-deviceupdate.tgz': dependencies: diff --git a/sdk/deviceregistry/arm-deviceregistry/CHANGELOG.md b/sdk/deviceregistry/arm-deviceregistry/CHANGELOG.md index 451e413291cf..28f77ed8869f 100644 --- a/sdk/deviceregistry/arm-deviceregistry/CHANGELOG.md +++ b/sdk/deviceregistry/arm-deviceregistry/CHANGELOG.md @@ -1,15 +1,196 @@ # Release History - -## 1.0.0-beta.2 (Unreleased) - + +## 1.0.0-beta.2 (2024-12-12) +Compared with version 1.0.0-beta.1 + ### Features Added -### Breaking Changes + - Added operation group BillingContainersOperations + - Added operation group DiscoveredAssetEndpointProfilesOperations + - Added operation group DiscoveredAssetsOperations + - Added operation group SchemaRegistriesOperations + - Added operation group SchemasOperations + - Added operation group SchemaVersionsOperations + - Added operation AssetEndpointProfilesOperations.createOrReplace + - Added operation AssetEndpointProfilesOperations.delete + - Added operation AssetEndpointProfilesOperations.update + - Added operation AssetsOperations.createOrReplace + - Added operation AssetsOperations.delete + - Added operation AssetsOperations.update + - Added Interface AssetEndpointProfileStatus + - Added Interface AssetEndpointProfileStatusError + - Added Interface AssetStatusDataset + - Added Interface AssetStatusEvent + - Added Interface Authentication + - Added Interface BillingContainer + - Added Interface BillingContainerProperties + - Added Interface BillingContainersGetOptionalParams + - Added Interface BillingContainersListBySubscriptionOptionalParams + - Added Interface DataPointBase + - Added Interface Dataset + - Added Interface DiscoveredAsset + - Added Interface DiscoveredAssetEndpointProfile + - Added Interface DiscoveredAssetEndpointProfileProperties + - Added Interface DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams + - Added Interface DiscoveredAssetEndpointProfilesDeleteOptionalParams + - Added Interface DiscoveredAssetEndpointProfilesGetOptionalParams + - Added Interface DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams + - Added Interface DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams + - Added Interface DiscoveredAssetEndpointProfilesUpdateOptionalParams + - Added Interface DiscoveredAssetEndpointProfileUpdate + - Added Interface DiscoveredAssetEndpointProfileUpdateProperties + - Added Interface DiscoveredAssetProperties + - Added Interface DiscoveredAssetsCreateOrReplaceOptionalParams + - Added Interface DiscoveredAssetsDeleteOptionalParams + - Added Interface DiscoveredAssetsGetOptionalParams + - Added Interface DiscoveredAssetsListByResourceGroupOptionalParams + - Added Interface DiscoveredAssetsListBySubscriptionOptionalParams + - Added Interface DiscoveredAssetsUpdateOptionalParams + - Added Interface DiscoveredAssetUpdate + - Added Interface DiscoveredAssetUpdateProperties + - Added Interface DiscoveredDataPoint + - Added Interface DiscoveredDataset + - Added Interface DiscoveredEvent + - Added Interface EventBase + - Added Interface MessageSchemaReference + - Added Interface PagedAsyncIterableIterator + - Added Interface PageSettings + - Added Interface ProxyResource + - Added Interface RestorePollerOptions + - Added Interface Schema + - Added Interface SchemaProperties + - Added Interface SchemaRegistriesCreateOrReplaceOptionalParams + - Added Interface SchemaRegistriesDeleteOptionalParams + - Added Interface SchemaRegistriesGetOptionalParams + - Added Interface SchemaRegistriesListByResourceGroupOptionalParams + - Added Interface SchemaRegistriesListBySubscriptionOptionalParams + - Added Interface SchemaRegistriesUpdateOptionalParams + - Added Interface SchemaRegistry + - Added Interface SchemaRegistryProperties + - Added Interface SchemaRegistryUpdate + - Added Interface SchemaRegistryUpdateProperties + - Added Interface SchemasCreateOrReplaceOptionalParams + - Added Interface SchemasDeleteOptionalParams + - Added Interface SchemasGetOptionalParams + - Added Interface SchemasListBySchemaRegistryOptionalParams + - Added Interface SchemaVersion + - Added Interface SchemaVersionProperties + - Added Interface SchemaVersionsCreateOrReplaceOptionalParams + - Added Interface SchemaVersionsDeleteOptionalParams + - Added Interface SchemaVersionsGetOptionalParams + - Added Interface SchemaVersionsListBySchemaOptionalParams + - Added Interface SystemAssignedServiceIdentity + - Added Interface Topic + - Added Type Alias AuthenticationMethod + - Added Type Alias ContinuablePage + - Added Type Alias DataPointObservabilityMode + - Added Type Alias EventObservabilityMode + - Added Type Alias Format + - Added Type Alias SchemaType + - Added Type Alias SystemAssignedServiceIdentityType + - Added Type Alias TopicRetainType + - Interface AssetEndpointProfileProperties has a new optional parameter authentication + - Interface AssetEndpointProfileProperties has a new optional parameter discoveredAssetEndpointProfileRef + - Interface AssetEndpointProfileProperties has a new optional parameter status + - Interface AssetEndpointProfileUpdateProperties has a new optional parameter authentication + - Interface AssetEndpointProfileUpdateProperties has a new optional parameter endpointProfileType + - Interface AssetProperties has a new optional parameter datasets + - Interface AssetProperties has a new optional parameter defaultDatasetsConfiguration + - Interface AssetProperties has a new optional parameter defaultTopic + - Interface AssetProperties has a new optional parameter discoveredAssetRefs + - Interface AssetStatus has a new optional parameter datasets + - Interface AssetStatus has a new optional parameter events + - Interface AssetUpdateProperties has a new optional parameter datasets + - Interface AssetUpdateProperties has a new optional parameter defaultDatasetsConfiguration + - Interface AssetUpdateProperties has a new optional parameter defaultTopic + - Added Enum KnownAuthenticationMethod + - Added Enum KnownDataPointObservabilityMode + - Added Enum KnownEventObservabilityMode + - Added Enum KnownFormat + - Added Enum KnownSchemaType + - Added Enum KnownSystemAssignedServiceIdentityType + - Added Enum KnownTopicRetainType + - Added Enum KnownVersions + - Enum KnownOrigin has a new value "user,system" + - Enum KnownOrigin has a new value system + - Enum KnownOrigin has a new value user + - Enum KnownProvisioningState has a new value Deleting + - Added function restorePoller -### Bugs Fixed - -### Other Changes +### Breaking Changes + - Removed operation AssetEndpointProfiles.beginCreateOrReplace + - Removed operation AssetEndpointProfiles.beginCreateOrReplaceAndWait + - Removed operation AssetEndpointProfiles.beginDelete + - Removed operation AssetEndpointProfiles.beginDeleteAndWait + - Removed operation AssetEndpointProfiles.beginUpdate + - Removed operation AssetEndpointProfiles.beginUpdateAndWait + - Removed operation Assets.beginCreateOrReplace + - Removed operation Assets.beginCreateOrReplaceAndWait + - Removed operation Assets.beginDelete + - Removed operation Assets.beginDeleteAndWait + - Removed operation Assets.beginUpdate + - Removed operation Assets.beginUpdateAndWait + - Class DeviceRegistryManagementClient has a new signature + - Interface AssetEndpointProfileProperties no longer has parameter transportAuthentication + - Interface AssetEndpointProfileProperties no longer has parameter userAuthentication + - Interface AssetEndpointProfilesCreateOrReplaceOptionalParams no longer has parameter resumeFrom + - Interface AssetEndpointProfilesDeleteOptionalParams no longer has parameter resumeFrom + - Interface AssetEndpointProfilesUpdateOptionalParams no longer has parameter resumeFrom + - Interface AssetEndpointProfileUpdateProperties no longer has parameter transportAuthentication + - Interface AssetEndpointProfileUpdateProperties no longer has parameter userAuthentication + - Interface AssetProperties no longer has parameter assetEndpointProfileUri + - Interface AssetProperties no longer has parameter assetType + - Interface AssetProperties no longer has parameter dataPoints + - Interface AssetProperties no longer has parameter defaultDataPointsConfiguration + - Interface AssetsCreateOrReplaceOptionalParams no longer has parameter resumeFrom + - Interface AssetsDeleteOptionalParams no longer has parameter resumeFrom + - Interface AssetsUpdateOptionalParams no longer has parameter resumeFrom + - Interface AssetUpdateProperties no longer has parameter assetType + - Interface AssetUpdateProperties no longer has parameter dataPoints + - Interface AssetUpdateProperties no longer has parameter defaultDataPointsConfiguration + - Interface DataPoint no longer has parameter capabilityId + - Interface DeviceRegistryManagementClientOptionalParams no longer has parameter $host + - Interface DeviceRegistryManagementClientOptionalParams no longer has parameter endpoint + - Interface Event_2 no longer has parameter capabilityId + - Interface UsernamePasswordCredentials no longer has parameter passwordReference + - Interface UsernamePasswordCredentials no longer has parameter usernameReference + - Interface X509Credentials no longer has parameter certificateReference + - Interface AssetEndpointProfileProperties has a new required parameter endpointProfileType + - Interface AssetProperties has a new required parameter assetEndpointProfileRef + - Interface UsernamePasswordCredentials has a new required parameter passwordSecretName + - Interface UsernamePasswordCredentials has a new required parameter usernameSecretName + - Interface X509Credentials has a new required parameter certificateSecretName + - Type of parameter tags of interface AssetEndpointProfileUpdate is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter attributes of interface AssetProperties is changed from { + [propertyName: string]: any; + } to Record + - Type of parameter tags of interface AssetUpdate is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter attributes of interface AssetUpdateProperties is changed from { + [propertyName: string]: any; + } to Record + - Type of parameter observabilityMode of interface DataPoint is changed from DataPointsObservabilityMode to DataPointObservabilityMode + - Type of parameter info of interface ErrorAdditionalInfo is changed from Record to Record + - Type of parameter observabilityMode of interface Event_2 is changed from EventsObservabilityMode to EventObservabilityMode + - Type of parameter tags of interface TrackedResource is changed from { + [propertyName: string]: string; + } to Record + - Class DeviceRegistryManagementClient no longer has parameter $host + - Class DeviceRegistryManagementClient no longer has parameter apiVersion + - Class DeviceRegistryManagementClient no longer has parameter subscriptionId + - Removed Enum KnownDataPointsObservabilityMode + - Removed Enum KnownEventsObservabilityMode + - Removed Enum KnownUserAuthenticationMode + - Enum KnownOrigin no longer has value System + - Enum KnownOrigin no longer has value User + - Enum KnownOrigin no longer has value UserSystem + - Removed function getContinuationToken + + ## 1.0.0-beta.1 (2024-04-15) The package of @azure/arm-deviceregistry is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/deviceregistry/arm-deviceregistry/README.md b/sdk/deviceregistry/arm-deviceregistry/README.md index 5fdede41e847..810113aa7ae2 100644 --- a/sdk/deviceregistry/arm-deviceregistry/README.md +++ b/sdk/deviceregistry/arm-deviceregistry/README.md @@ -4,10 +4,12 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f Microsoft.DeviceRegistry Resource Provider management API. -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deviceregistry/arm-deviceregistry) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-deviceregistry) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-deviceregistry?view=azure-node-preview) | -[Samples](https://github.com/Azure-Samples/azure-samples-js-management) +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deviceregistry/arm-deviceregistry) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-deviceregistry) +- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-deviceregistry?view=azure-node-preview) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deviceregistry/arm-deviceregistry/samples) ## Getting started @@ -43,8 +45,7 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below npm install @azure/identity ``` -You will also need to **register a new AAD application and grant access to Azure DeviceRegistryManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. +You will also need to **register a new AAD application and grant access to Azure DeviceRegistry** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). @@ -89,7 +90,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur ## Next steps -Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deviceregistry/arm-deviceregistry/samples) directory for detailed examples on how to use this library. ## Contributing @@ -99,10 +100,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fdeviceregistry%2Farm-deviceregistry%2FREADME.png) - -[azure_cli]: https://docs.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ [azure_portal]: https://portal.azure.com [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity diff --git a/sdk/deviceregistry/arm-deviceregistry/_meta.json b/sdk/deviceregistry/arm-deviceregistry/_meta.json deleted file mode 100644 index 06e92ef5e81a..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "59c04c61a355af4b56dd91a4b9b5eefe76e2f0cd", - "readme": "specification/deviceregistry/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\deviceregistry\\resource-manager\\readme.md --use=@autorest/typescript@6.0.20 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.5", - "use": "@autorest/typescript@6.0.20" -} \ No newline at end of file diff --git a/sdk/deviceregistry/arm-deviceregistry/api-extractor.json b/sdk/deviceregistry/arm-deviceregistry/api-extractor.json index ed3e5d0b3bec..467572d0991e 100644 --- a/sdk/deviceregistry/arm-deviceregistry/api-extractor.json +++ b/sdk/deviceregistry/arm-deviceregistry/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-deviceregistry.d.ts" + "publicTrimmedFilePath": "dist/arm-deviceregistry.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/deviceregistry/arm-deviceregistry/assets.json b/sdk/deviceregistry/arm-deviceregistry/assets.json index 323a06e785ca..47173e93dfa2 100644 --- a/sdk/deviceregistry/arm-deviceregistry/assets.json +++ b/sdk/deviceregistry/arm-deviceregistry/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/deviceregistry/arm-deviceregistry", - "Tag": "js/deviceregistry/arm-deviceregistry_e400d2d01c" + "Tag": "js/deviceregistry/arm-deviceregistry_efa8d0494f" } diff --git a/sdk/deviceregistry/arm-deviceregistry/eslint.config.mjs b/sdk/deviceregistry/arm-deviceregistry/eslint.config.mjs new file mode 100644 index 000000000000..03244d34a19f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/eslint.config.mjs @@ -0,0 +1,17 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default [ + ...azsdkEslint.configs.recommended, + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]; diff --git a/sdk/deviceregistry/arm-deviceregistry/package.json b/sdk/deviceregistry/arm-deviceregistry/package.json index d043095db8f8..ac267840483c 100644 --- a/sdk/deviceregistry/arm-deviceregistry/package.json +++ b/sdk/deviceregistry/arm-deviceregistry/package.json @@ -1,113 +1,164 @@ { "name": "@azure/arm-deviceregistry", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for DeviceRegistryManagementClient.", "version": "1.0.0-beta.2", + "description": "A generated SDK for DeviceRegistryClient.", "engines": { "node": ">=18.0.0" }, - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.14.0", - "tslib": "^2.2.0" + "sideEffects": false, + "autoPublish": false, + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts", + "./models": "./src/models/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false }, + "type": "module", "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-deviceregistry.d.ts", + "files": [ + "dist/", + "README.md", + "LICENSE", + "review/", + "CHANGELOG.md" + ], + "sdk-type": "mgmt", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deviceregistry/arm-deviceregistry/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/deviceRegistryManagementContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure-rest/core-client": "^2.3.1", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.6.0", + "@azure/core-lro": "^3.1.0", + "@azure/core-rest-pipeline": "^1.5.0", + "@azure/core-util": "^1.9.2", + "@azure/logger": "^1.0.0", + "tslib": "^2.6.2" + }, "devDependencies": { - "@azure-tools/test-credential": "^1.1.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.2.1", + "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "eslint": "^9.9.0", + "playwright": "^1.49.1", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", - "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" - ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", - "build:node": "echo skipped", - "build:samples": "echo skipped.", - "build:test": "echo skipped", - "check-format": "echo skipped", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", - "format": "echo skipped", + "execute:samples": "dev-tool samples run samples-dev", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "generate:client": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "echo skipped", "lint": "echo skipped", + "lint:fix": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", - "prepack": "npm run build", - "test": "npm run integration-test", - "test:browser": "echo skipped", - "test:node": "echo skipped", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/deviceRegistryManagementClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deviceregistry/arm-deviceregistry", "//sampleConfiguration": { - "productName": "", + "productName": "@azure/arm-deviceregistry", "productSlugs": [ "azure" ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-deviceregistry?view=azure-node-preview" - } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./models": { + "browser": { + "types": "./dist/browser/models/index.d.ts", + "default": "./dist/browser/models/index.js" + }, + "react-native": { + "types": "./dist/react-native/models/index.d.ts", + "default": "./dist/react-native/models/index.js" + }, + "import": { + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js", + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js" } diff --git a/sdk/deviceregistry/arm-deviceregistry/review/arm-deviceregistry-models.api.md b/sdk/deviceregistry/arm-deviceregistry/review/arm-deviceregistry-models.api.md new file mode 100644 index 000000000000..29a23986e6fb --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/review/arm-deviceregistry-models.api.md @@ -0,0 +1,582 @@ +## API Report File for "@azure/arm-deviceregistry" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export type ActionType = string; + +// @public +export interface Asset extends TrackedResource { + extendedLocation: ExtendedLocation; + properties?: AssetProperties; +} + +// @public +export interface AssetEndpointProfile extends TrackedResource { + extendedLocation: ExtendedLocation; + properties?: AssetEndpointProfileProperties; +} + +// @public +export interface AssetEndpointProfileProperties { + additionalConfiguration?: string; + authentication?: Authentication; + discoveredAssetEndpointProfileRef?: string; + endpointProfileType: string; + readonly provisioningState?: ProvisioningState; + readonly status?: AssetEndpointProfileStatus; + targetAddress: string; + readonly uuid?: string; +} + +// @public +export interface AssetEndpointProfileStatus { + readonly errors?: AssetEndpointProfileStatusError[]; +} + +// @public +export interface AssetEndpointProfileStatusError { + readonly code?: number; + readonly message?: string; +} + +// @public +export interface AssetEndpointProfileUpdate { + properties?: AssetEndpointProfileUpdateProperties; + tags?: Record; +} + +// @public +export interface AssetEndpointProfileUpdateProperties { + additionalConfiguration?: string; + authentication?: Authentication; + endpointProfileType?: string; + targetAddress?: string; +} + +// @public +export interface AssetProperties { + assetEndpointProfileRef: string; + attributes?: Record; + datasets?: Dataset[]; + defaultDatasetsConfiguration?: string; + defaultEventsConfiguration?: string; + defaultTopic?: Topic; + description?: string; + discoveredAssetRefs?: string[]; + displayName?: string; + documentationUri?: string; + enabled?: boolean; + events?: Event_2[]; + externalAssetId?: string; + hardwareRevision?: string; + manufacturer?: string; + manufacturerUri?: string; + model?: string; + productCode?: string; + readonly provisioningState?: ProvisioningState; + serialNumber?: string; + softwareRevision?: string; + readonly status?: AssetStatus; + readonly uuid?: string; + readonly version?: number; +} + +// @public +export interface AssetStatus { + readonly datasets?: AssetStatusDataset[]; + readonly errors?: AssetStatusError[]; + readonly events?: AssetStatusEvent[]; + readonly version?: number; +} + +// @public +export interface AssetStatusDataset { + readonly messageSchemaReference?: MessageSchemaReference; + readonly name: string; +} + +// @public +export interface AssetStatusError { + readonly code?: number; + readonly message?: string; +} + +// @public +export interface AssetStatusEvent { + readonly messageSchemaReference?: MessageSchemaReference; + readonly name: string; +} + +// @public +export interface AssetUpdate { + properties?: AssetUpdateProperties; + tags?: Record; +} + +// @public +export interface AssetUpdateProperties { + attributes?: Record; + datasets?: Dataset[]; + defaultDatasetsConfiguration?: string; + defaultEventsConfiguration?: string; + defaultTopic?: Topic; + description?: string; + displayName?: string; + documentationUri?: string; + enabled?: boolean; + events?: Event_2[]; + hardwareRevision?: string; + manufacturer?: string; + manufacturerUri?: string; + model?: string; + productCode?: string; + serialNumber?: string; + softwareRevision?: string; +} + +// @public +export interface Authentication { + method: AuthenticationMethod; + usernamePasswordCredentials?: UsernamePasswordCredentials; + x509Credentials?: X509Credentials; +} + +// @public +export type AuthenticationMethod = string; + +// @public +export interface BillingContainer extends ProxyResource { + readonly etag?: string; + properties?: BillingContainerProperties; +} + +// @public +export interface BillingContainerProperties { + readonly provisioningState?: ProvisioningState; +} + +// @public +export type CreatedByType = string; + +// @public +export interface DataPoint extends DataPointBase { + observabilityMode?: DataPointObservabilityMode; +} + +// @public +export interface DataPointBase { + dataPointConfiguration?: string; + dataSource: string; + name: string; +} + +// @public +export type DataPointObservabilityMode = string; + +// @public +export interface Dataset { + dataPoints?: DataPoint[]; + datasetConfiguration?: string; + name: string; + topic?: Topic; +} + +// @public +export interface DiscoveredAsset extends TrackedResource { + extendedLocation: ExtendedLocation; + properties?: DiscoveredAssetProperties; +} + +// @public +export interface DiscoveredAssetEndpointProfile extends TrackedResource { + extendedLocation: ExtendedLocation; + properties?: DiscoveredAssetEndpointProfileProperties; +} + +// @public +export interface DiscoveredAssetEndpointProfileProperties { + additionalConfiguration?: string; + discoveryId: string; + endpointProfileType: string; + readonly provisioningState?: ProvisioningState; + supportedAuthenticationMethods?: AuthenticationMethod[]; + targetAddress: string; + version: number; +} + +// @public +export interface DiscoveredAssetEndpointProfileUpdate { + properties?: DiscoveredAssetEndpointProfileUpdateProperties; + tags?: Record; +} + +// @public +export interface DiscoveredAssetEndpointProfileUpdateProperties { + additionalConfiguration?: string; + discoveryId?: string; + endpointProfileType?: string; + supportedAuthenticationMethods?: AuthenticationMethod[]; + targetAddress?: string; + version?: number; +} + +// @public +export interface DiscoveredAssetProperties { + assetEndpointProfileRef: string; + datasets?: DiscoveredDataset[]; + defaultDatasetsConfiguration?: string; + defaultEventsConfiguration?: string; + defaultTopic?: Topic; + discoveryId: string; + documentationUri?: string; + events?: DiscoveredEvent[]; + hardwareRevision?: string; + manufacturer?: string; + manufacturerUri?: string; + model?: string; + productCode?: string; + readonly provisioningState?: ProvisioningState; + serialNumber?: string; + softwareRevision?: string; + version: number; +} + +// @public +export interface DiscoveredAssetUpdate { + properties?: DiscoveredAssetUpdateProperties; + tags?: Record; +} + +// @public +export interface DiscoveredAssetUpdateProperties { + datasets?: DiscoveredDataset[]; + defaultDatasetsConfiguration?: string; + defaultEventsConfiguration?: string; + defaultTopic?: Topic; + discoveryId?: string; + documentationUri?: string; + events?: DiscoveredEvent[]; + hardwareRevision?: string; + manufacturer?: string; + manufacturerUri?: string; + model?: string; + productCode?: string; + serialNumber?: string; + softwareRevision?: string; + version?: number; +} + +// @public +export interface DiscoveredDataPoint { + dataPointConfiguration?: string; + dataSource: string; + lastUpdatedOn?: Date; + name: string; +} + +// @public +export interface DiscoveredDataset { + dataPoints?: DiscoveredDataPoint[]; + datasetConfiguration?: string; + name: string; + topic?: Topic; +} + +// @public +export interface DiscoveredEvent { + eventConfiguration?: string; + eventNotifier: string; + lastUpdatedOn?: Date; + name: string; + topic?: Topic; +} + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +interface Event_2 extends EventBase { + observabilityMode?: EventObservabilityMode; +} +export { Event_2 as Event } + +// @public +export interface EventBase { + eventConfiguration?: string; + eventNotifier: string; + name: string; + topic?: Topic; +} + +// @public +export type EventObservabilityMode = string; + +// @public +export interface ExtendedLocation { + name: string; + type: string; +} + +// @public +export type Format = string; + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownAuthenticationMethod { + Anonymous = "Anonymous", + Certificate = "Certificate", + UsernamePassword = "UsernamePassword" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownDataPointObservabilityMode { + Counter = "Counter", + Gauge = "Gauge", + Histogram = "Histogram", + Log = "Log", + None = "None" +} + +// @public +export enum KnownEventObservabilityMode { + Log = "Log", + None = "None" +} + +// @public +export enum KnownFormat { + Delta_1_0 = "Delta/1.0", + JsonSchemaDraft7 = "JsonSchema/draft-07" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownSchemaType { + MessageSchema = "MessageSchema" +} + +// @public +export enum KnownSystemAssignedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned" +} + +// @public +export enum KnownTopicRetainType { + Keep = "Keep", + Never = "Never" +} + +// @public +export enum KnownVersions { + V2023_11_01_Preview = "2023-11-01-preview", + V2024_09_01_Preview = "2024-09-01-preview" +} + +// @public +export interface MessageSchemaReference { + readonly schemaName: string; + readonly schemaRegistryNamespace: string; + readonly schemaVersion: string; +} + +// @public +export interface Operation { + actionType?: ActionType; + readonly display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationStatusResult { + endTime?: Date; + error?: ErrorDetail; + id?: string; + name?: string; + operations?: OperationStatusResult[]; + percentComplete?: number; + startTime?: Date; + status: string; +} + +// @public +export type Origin = string; + +// @public +export type ProvisioningState = string; + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface Schema extends ProxyResource { + properties?: SchemaProperties; +} + +// @public +export interface SchemaProperties { + description?: string; + displayName?: string; + format: Format; + readonly provisioningState?: ProvisioningState; + schemaType: SchemaType; + tags?: Record; + readonly uuid?: string; +} + +// @public +export interface SchemaRegistry extends TrackedResource { + identity?: SystemAssignedServiceIdentity; + properties?: SchemaRegistryProperties; +} + +// @public +export interface SchemaRegistryProperties { + description?: string; + displayName?: string; + namespace: string; + readonly provisioningState?: ProvisioningState; + storageAccountContainerUrl: string; + readonly uuid?: string; +} + +// @public +export interface SchemaRegistryUpdate { + identity?: SystemAssignedServiceIdentity; + properties?: SchemaRegistryUpdateProperties; + tags?: Record; +} + +// @public +export interface SchemaRegistryUpdateProperties { + description?: string; + displayName?: string; +} + +// @public +export type SchemaType = string; + +// @public +export interface SchemaVersion extends ProxyResource { + properties?: SchemaVersionProperties; +} + +// @public +export interface SchemaVersionProperties { + description?: string; + readonly hash?: string; + readonly provisioningState?: ProvisioningState; + schemaContent: string; + readonly uuid?: string; +} + +// @public +export interface SystemAssignedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: SystemAssignedServiceIdentityType; +} + +// @public +export type SystemAssignedServiceIdentityType = string; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface Topic { + path: string; + retain?: TopicRetainType; +} + +// @public +export type TopicRetainType = string; + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: Record; +} + +// @public +export interface UsernamePasswordCredentials { + passwordSecretName: string; + usernameSecretName: string; +} + +// @public +export interface X509Credentials { + certificateSecretName: string; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/deviceregistry/arm-deviceregistry/review/arm-deviceregistry.api.md b/sdk/deviceregistry/arm-deviceregistry/review/arm-deviceregistry.api.md index 5d9d5b6b4e9b..8c452d271d93 100644 --- a/sdk/deviceregistry/arm-deviceregistry/review/arm-deviceregistry.api.md +++ b/sdk/deviceregistry/arm-deviceregistry/review/arm-deviceregistry.api.md @@ -4,11 +4,14 @@ ```ts -import * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; +import { AbortSignalLike } from '@azure/abort-controller'; +import { ClientOptions } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; import { OperationState } from '@azure/core-lro'; -import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { SimplePollerLike } from '@azure/core-lro'; +import { PathUncheckedResponse } from '@azure-rest/core-client'; +import { Pipeline } from '@azure/core-rest-pipeline'; +import { PollerLike } from '@azure/core-lro'; +import { TokenCredential } from '@azure/core-auth'; // @public export type ActionType = string; @@ -25,344 +28,472 @@ export interface AssetEndpointProfile extends TrackedResource { properties?: AssetEndpointProfileProperties; } -// @public -export interface AssetEndpointProfileListResult { - nextLink?: string; - value: AssetEndpointProfile[]; -} - // @public export interface AssetEndpointProfileProperties { additionalConfiguration?: string; + authentication?: Authentication; + discoveredAssetEndpointProfileRef?: string; + endpointProfileType: string; readonly provisioningState?: ProvisioningState; + readonly status?: AssetEndpointProfileStatus; targetAddress: string; - transportAuthentication?: TransportAuthentication; - userAuthentication?: UserAuthentication; readonly uuid?: string; } // @public -export interface AssetEndpointProfiles { - beginCreateOrReplace(resourceGroupName: string, assetEndpointProfileName: string, resource: AssetEndpointProfile, options?: AssetEndpointProfilesCreateOrReplaceOptionalParams): Promise, AssetEndpointProfilesCreateOrReplaceResponse>>; - beginCreateOrReplaceAndWait(resourceGroupName: string, assetEndpointProfileName: string, resource: AssetEndpointProfile, options?: AssetEndpointProfilesCreateOrReplaceOptionalParams): Promise; - beginDelete(resourceGroupName: string, assetEndpointProfileName: string, options?: AssetEndpointProfilesDeleteOptionalParams): Promise, AssetEndpointProfilesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, assetEndpointProfileName: string, options?: AssetEndpointProfilesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, assetEndpointProfileName: string, properties: AssetEndpointProfileUpdate, options?: AssetEndpointProfilesUpdateOptionalParams): Promise, AssetEndpointProfilesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, assetEndpointProfileName: string, properties: AssetEndpointProfileUpdate, options?: AssetEndpointProfilesUpdateOptionalParams): Promise; - get(resourceGroupName: string, assetEndpointProfileName: string, options?: AssetEndpointProfilesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: AssetEndpointProfilesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: AssetEndpointProfilesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface AssetEndpointProfilesCreateOrReplaceOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface AssetEndpointProfilesCreateOrReplaceHeaders { - retryAfter?: number; +export interface AssetEndpointProfilesDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface AssetEndpointProfilesCreateOrReplaceOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface AssetEndpointProfilesGetOptionalParams extends OperationOptions { } // @public -export type AssetEndpointProfilesCreateOrReplaceResponse = AssetEndpointProfile; +export interface AssetEndpointProfilesListByResourceGroupOptionalParams extends OperationOptions { +} // @public -export interface AssetEndpointProfilesDeleteHeaders { - location?: string; - retryAfter?: number; +export interface AssetEndpointProfilesListBySubscriptionOptionalParams extends OperationOptions { } // @public -export interface AssetEndpointProfilesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface AssetEndpointProfilesOperations { + createOrReplace: (resourceGroupName: string, assetEndpointProfileName: string, resource: AssetEndpointProfile, options?: AssetEndpointProfilesCreateOrReplaceOptionalParams) => PollerLike, AssetEndpointProfile>; + delete: (resourceGroupName: string, assetEndpointProfileName: string, options?: AssetEndpointProfilesDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, assetEndpointProfileName: string, options?: AssetEndpointProfilesGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: AssetEndpointProfilesListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: AssetEndpointProfilesListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, assetEndpointProfileName: string, properties: AssetEndpointProfileUpdate, options?: AssetEndpointProfilesUpdateOptionalParams) => PollerLike, AssetEndpointProfile>; } // @public -export type AssetEndpointProfilesDeleteResponse = AssetEndpointProfilesDeleteHeaders; +export interface AssetEndpointProfileStatus { + readonly errors?: AssetEndpointProfileStatusError[]; +} // @public -export interface AssetEndpointProfilesGetOptionalParams extends coreClient.OperationOptions { +export interface AssetEndpointProfileStatusError { + readonly code?: number; + readonly message?: string; } // @public -export type AssetEndpointProfilesGetResponse = AssetEndpointProfile; +export interface AssetEndpointProfilesUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public -export interface AssetEndpointProfilesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface AssetEndpointProfileUpdate { + properties?: AssetEndpointProfileUpdateProperties; + tags?: Record; } // @public -export type AssetEndpointProfilesListByResourceGroupNextResponse = AssetEndpointProfileListResult; +export interface AssetEndpointProfileUpdateProperties { + additionalConfiguration?: string; + authentication?: Authentication; + endpointProfileType?: string; + targetAddress?: string; +} // @public -export interface AssetEndpointProfilesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface AssetProperties { + assetEndpointProfileRef: string; + attributes?: Record; + datasets?: Dataset[]; + defaultDatasetsConfiguration?: string; + defaultEventsConfiguration?: string; + defaultTopic?: Topic; + description?: string; + discoveredAssetRefs?: string[]; + displayName?: string; + documentationUri?: string; + enabled?: boolean; + events?: Event_2[]; + externalAssetId?: string; + hardwareRevision?: string; + manufacturer?: string; + manufacturerUri?: string; + model?: string; + productCode?: string; + readonly provisioningState?: ProvisioningState; + serialNumber?: string; + softwareRevision?: string; + readonly status?: AssetStatus; + readonly uuid?: string; + readonly version?: number; } // @public -export type AssetEndpointProfilesListByResourceGroupResponse = AssetEndpointProfileListResult; +export interface AssetsCreateOrReplaceOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public -export interface AssetEndpointProfilesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface AssetsDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type AssetEndpointProfilesListBySubscriptionNextResponse = AssetEndpointProfileListResult; +export interface AssetsGetOptionalParams extends OperationOptions { +} // @public -export interface AssetEndpointProfilesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface AssetsListByResourceGroupOptionalParams extends OperationOptions { } // @public -export type AssetEndpointProfilesListBySubscriptionResponse = AssetEndpointProfileListResult; +export interface AssetsListBySubscriptionOptionalParams extends OperationOptions { +} // @public -export interface AssetEndpointProfilesUpdateHeaders { - location?: string; - retryAfter?: number; +export interface AssetsOperations { + createOrReplace: (resourceGroupName: string, assetName: string, resource: Asset, options?: AssetsCreateOrReplaceOptionalParams) => PollerLike, Asset>; + delete: (resourceGroupName: string, assetName: string, options?: AssetsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, assetName: string, options?: AssetsGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: AssetsListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: AssetsListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, assetName: string, properties: AssetUpdate, options?: AssetsUpdateOptionalParams) => PollerLike, Asset>; } // @public -export interface AssetEndpointProfilesUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface AssetStatus { + readonly datasets?: AssetStatusDataset[]; + readonly errors?: AssetStatusError[]; + readonly events?: AssetStatusEvent[]; + readonly version?: number; } // @public -export type AssetEndpointProfilesUpdateResponse = AssetEndpointProfile; +export interface AssetStatusDataset { + readonly messageSchemaReference?: MessageSchemaReference; + readonly name: string; +} // @public -export interface AssetEndpointProfileUpdate { - properties?: AssetEndpointProfileUpdateProperties; - tags?: { - [propertyName: string]: string; - }; +export interface AssetStatusError { + readonly code?: number; + readonly message?: string; } // @public -export interface AssetEndpointProfileUpdateProperties { - additionalConfiguration?: string; - targetAddress?: string; - transportAuthentication?: TransportAuthenticationUpdate; - userAuthentication?: UserAuthenticationUpdate; +export interface AssetStatusEvent { + readonly messageSchemaReference?: MessageSchemaReference; + readonly name: string; } // @public -export interface AssetListResult { - nextLink?: string; - value: Asset[]; +export interface AssetsUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface AssetProperties { - assetEndpointProfileUri: string; - assetType?: string; - attributes?: { - [propertyName: string]: any; - }; - dataPoints?: DataPoint[]; - defaultDataPointsConfiguration?: string; +export interface AssetUpdate { + properties?: AssetUpdateProperties; + tags?: Record; +} + +// @public +export interface AssetUpdateProperties { + attributes?: Record; + datasets?: Dataset[]; + defaultDatasetsConfiguration?: string; defaultEventsConfiguration?: string; + defaultTopic?: Topic; description?: string; displayName?: string; documentationUri?: string; enabled?: boolean; events?: Event_2[]; - externalAssetId?: string; hardwareRevision?: string; manufacturer?: string; manufacturerUri?: string; model?: string; productCode?: string; - readonly provisioningState?: ProvisioningState; serialNumber?: string; softwareRevision?: string; - readonly status?: AssetStatus; - readonly uuid?: string; - readonly version?: number; } // @public -export interface Assets { - beginCreateOrReplace(resourceGroupName: string, assetName: string, resource: Asset, options?: AssetsCreateOrReplaceOptionalParams): Promise, AssetsCreateOrReplaceResponse>>; - beginCreateOrReplaceAndWait(resourceGroupName: string, assetName: string, resource: Asset, options?: AssetsCreateOrReplaceOptionalParams): Promise; - beginDelete(resourceGroupName: string, assetName: string, options?: AssetsDeleteOptionalParams): Promise, AssetsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, assetName: string, options?: AssetsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, assetName: string, properties: AssetUpdate, options?: AssetsUpdateOptionalParams): Promise, AssetsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, assetName: string, properties: AssetUpdate, options?: AssetsUpdateOptionalParams): Promise; - get(resourceGroupName: string, assetName: string, options?: AssetsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: AssetsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: AssetsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface Authentication { + method: AuthenticationMethod; + usernamePasswordCredentials?: UsernamePasswordCredentials; + x509Credentials?: X509Credentials; } // @public -export interface AssetsCreateOrReplaceHeaders { - retryAfter?: number; +export type AuthenticationMethod = string; + +// @public +export interface BillingContainer extends ProxyResource { + readonly etag?: string; + properties?: BillingContainerProperties; } // @public -export interface AssetsCreateOrReplaceOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface BillingContainerProperties { + readonly provisioningState?: ProvisioningState; } // @public -export type AssetsCreateOrReplaceResponse = Asset; +export interface BillingContainersGetOptionalParams extends OperationOptions { +} // @public -export interface AssetsDeleteHeaders { - location?: string; - retryAfter?: number; +export interface BillingContainersListBySubscriptionOptionalParams extends OperationOptions { } // @public -export interface AssetsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface BillingContainersOperations { + get: (billingContainerName: string, options?: BillingContainersGetOptionalParams) => Promise; + listBySubscription: (options?: BillingContainersListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; } // @public -export type AssetsDeleteResponse = AssetsDeleteHeaders; +export type ContinuablePage = TPage & { + continuationToken?: string; +}; // @public -export interface AssetsGetOptionalParams extends coreClient.OperationOptions { -} +export type CreatedByType = string; // @public -export type AssetsGetResponse = Asset; +export interface DataPoint extends DataPointBase { + observabilityMode?: DataPointObservabilityMode; +} // @public -export interface AssetsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface DataPointBase { + dataPointConfiguration?: string; + dataSource: string; + name: string; } // @public -export type AssetsListByResourceGroupNextResponse = AssetListResult; +export type DataPointObservabilityMode = string; // @public -export interface AssetsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface Dataset { + dataPoints?: DataPoint[]; + datasetConfiguration?: string; + name: string; + topic?: Topic; +} + +// @public (undocumented) +export class DeviceRegistryManagementClient { + constructor(credential: TokenCredential, subscriptionId: string, options?: DeviceRegistryManagementClientOptionalParams); + readonly assetEndpointProfiles: AssetEndpointProfilesOperations; + readonly assets: AssetsOperations; + readonly billingContainers: BillingContainersOperations; + readonly discoveredAssetEndpointProfiles: DiscoveredAssetEndpointProfilesOperations; + readonly discoveredAssets: DiscoveredAssetsOperations; + readonly operations: OperationsOperations; + readonly operationStatus: OperationStatusOperations; + readonly pipeline: Pipeline; + readonly schemaRegistries: SchemaRegistriesOperations; + readonly schemas: SchemasOperations; + readonly schemaVersions: SchemaVersionsOperations; +} + +// @public +export interface DeviceRegistryManagementClientOptionalParams extends ClientOptions { + apiVersion?: string; } // @public -export type AssetsListByResourceGroupResponse = AssetListResult; +export interface DiscoveredAsset extends TrackedResource { + extendedLocation: ExtendedLocation; + properties?: DiscoveredAssetProperties; +} // @public -export interface AssetsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface DiscoveredAssetEndpointProfile extends TrackedResource { + extendedLocation: ExtendedLocation; + properties?: DiscoveredAssetEndpointProfileProperties; } // @public -export type AssetsListBySubscriptionNextResponse = AssetListResult; +export interface DiscoveredAssetEndpointProfileProperties { + additionalConfiguration?: string; + discoveryId: string; + endpointProfileType: string; + readonly provisioningState?: ProvisioningState; + supportedAuthenticationMethods?: AuthenticationMethod[]; + targetAddress: string; + version: number; +} // @public -export interface AssetsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type AssetsListBySubscriptionResponse = AssetListResult; +export interface DiscoveredAssetEndpointProfilesDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public -export interface AssetStatus { - errors?: AssetStatusError[]; - version?: number; +export interface DiscoveredAssetEndpointProfilesGetOptionalParams extends OperationOptions { } // @public -export interface AssetStatusError { - code?: number; - message?: string; +export interface DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams extends OperationOptions { } // @public -export interface AssetsUpdateHeaders { - location?: string; - retryAfter?: number; +export interface DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams extends OperationOptions { } // @public -export interface AssetsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface DiscoveredAssetEndpointProfilesOperations { + createOrReplace: (resourceGroupName: string, discoveredAssetEndpointProfileName: string, resource: DiscoveredAssetEndpointProfile, options?: DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams) => PollerLike, DiscoveredAssetEndpointProfile>; + delete: (resourceGroupName: string, discoveredAssetEndpointProfileName: string, options?: DiscoveredAssetEndpointProfilesDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, discoveredAssetEndpointProfileName: string, options?: DiscoveredAssetEndpointProfilesGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, discoveredAssetEndpointProfileName: string, properties: DiscoveredAssetEndpointProfileUpdate, options?: DiscoveredAssetEndpointProfilesUpdateOptionalParams) => PollerLike, DiscoveredAssetEndpointProfile>; +} + +// @public +export interface DiscoveredAssetEndpointProfilesUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type AssetsUpdateResponse = Asset; +export interface DiscoveredAssetEndpointProfileUpdate { + properties?: DiscoveredAssetEndpointProfileUpdateProperties; + tags?: Record; +} // @public -export interface AssetUpdate { - properties?: AssetUpdateProperties; - tags?: { - [propertyName: string]: string; - }; +export interface DiscoveredAssetEndpointProfileUpdateProperties { + additionalConfiguration?: string; + discoveryId?: string; + endpointProfileType?: string; + supportedAuthenticationMethods?: AuthenticationMethod[]; + targetAddress?: string; + version?: number; } // @public -export interface AssetUpdateProperties { - assetType?: string; - attributes?: { - [propertyName: string]: any; - }; - dataPoints?: DataPoint[]; - defaultDataPointsConfiguration?: string; +export interface DiscoveredAssetProperties { + assetEndpointProfileRef: string; + datasets?: DiscoveredDataset[]; + defaultDatasetsConfiguration?: string; defaultEventsConfiguration?: string; - description?: string; - displayName?: string; + defaultTopic?: Topic; + discoveryId: string; documentationUri?: string; - enabled?: boolean; - events?: Event_2[]; + events?: DiscoveredEvent[]; hardwareRevision?: string; manufacturer?: string; manufacturerUri?: string; model?: string; productCode?: string; + readonly provisioningState?: ProvisioningState; serialNumber?: string; softwareRevision?: string; + version: number; } // @public -export type CreatedByType = string; +export interface DiscoveredAssetsCreateOrReplaceOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public -export interface DataPoint { - capabilityId?: string; +export interface DiscoveredAssetsDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface DiscoveredAssetsGetOptionalParams extends OperationOptions { +} + +// @public +export interface DiscoveredAssetsListByResourceGroupOptionalParams extends OperationOptions { +} + +// @public +export interface DiscoveredAssetsListBySubscriptionOptionalParams extends OperationOptions { +} + +// @public +export interface DiscoveredAssetsOperations { + createOrReplace: (resourceGroupName: string, discoveredAssetName: string, resource: DiscoveredAsset, options?: DiscoveredAssetsCreateOrReplaceOptionalParams) => PollerLike, DiscoveredAsset>; + delete: (resourceGroupName: string, discoveredAssetName: string, options?: DiscoveredAssetsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, discoveredAssetName: string, options?: DiscoveredAssetsGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: DiscoveredAssetsListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: DiscoveredAssetsListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, discoveredAssetName: string, properties: DiscoveredAssetUpdate, options?: DiscoveredAssetsUpdateOptionalParams) => PollerLike, DiscoveredAsset>; +} + +// @public +export interface DiscoveredAssetsUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface DiscoveredAssetUpdate { + properties?: DiscoveredAssetUpdateProperties; + tags?: Record; +} + +// @public +export interface DiscoveredAssetUpdateProperties { + datasets?: DiscoveredDataset[]; + defaultDatasetsConfiguration?: string; + defaultEventsConfiguration?: string; + defaultTopic?: Topic; + discoveryId?: string; + documentationUri?: string; + events?: DiscoveredEvent[]; + hardwareRevision?: string; + manufacturer?: string; + manufacturerUri?: string; + model?: string; + productCode?: string; + serialNumber?: string; + softwareRevision?: string; + version?: number; +} + +// @public +export interface DiscoveredDataPoint { dataPointConfiguration?: string; dataSource: string; - name?: string; - observabilityMode?: DataPointsObservabilityMode; + lastUpdatedOn?: Date; + name: string; } // @public -export type DataPointsObservabilityMode = string; +export interface DiscoveredDataset { + dataPoints?: DiscoveredDataPoint[]; + datasetConfiguration?: string; + name: string; + topic?: Topic; +} -// @public (undocumented) -export class DeviceRegistryManagementClient extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DeviceRegistryManagementClientOptionalParams); - // (undocumented) - apiVersion: string; - // (undocumented) - assetEndpointProfiles: AssetEndpointProfiles; - // (undocumented) - assets: Assets; - // (undocumented) - operations: Operations; - // (undocumented) - operationStatus: OperationStatus; - // (undocumented) - subscriptionId: string; -} - -// @public -export interface DeviceRegistryManagementClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; +// @public +export interface DiscoveredEvent { + eventConfiguration?: string; + eventNotifier: string; + lastUpdatedOn?: Date; + name: string; + topic?: Topic; } // @public export interface ErrorAdditionalInfo { - readonly info?: Record; + readonly info?: Record; readonly type?: string; } @@ -376,22 +507,21 @@ export interface ErrorDetail { } // @public -export interface ErrorResponse { - error?: ErrorDetail; +interface Event_2 extends EventBase { + observabilityMode?: EventObservabilityMode; } +export { Event_2 as Event } // @public -interface Event_2 { - capabilityId?: string; +export interface EventBase { eventConfiguration?: string; eventNotifier: string; - name?: string; - observabilityMode?: EventsObservabilityMode; + name: string; + topic?: Topic; } -export { Event_2 as Event } // @public -export type EventsObservabilityMode = string; +export type EventObservabilityMode = string; // @public export interface ExtendedLocation { @@ -400,13 +530,20 @@ export interface ExtendedLocation { } // @public -export function getContinuationToken(page: unknown): string | undefined; +export type Format = string; // @public export enum KnownActionType { Internal = "Internal" } +// @public +export enum KnownAuthenticationMethod { + Anonymous = "Anonymous", + Certificate = "Certificate", + UsernamePassword = "UsernamePassword" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -416,18 +553,24 @@ export enum KnownCreatedByType { } // @public -export enum KnownDataPointsObservabilityMode { - Counter = "counter", - Gauge = "gauge", - Histogram = "histogram", - Log = "log", - None = "none" +export enum KnownDataPointObservabilityMode { + Counter = "Counter", + Gauge = "Gauge", + Histogram = "Histogram", + Log = "Log", + None = "None" +} + +// @public +export enum KnownEventObservabilityMode { + Log = "Log", + None = "None" } // @public -export enum KnownEventsObservabilityMode { - Log = "log", - None = "none" +export enum KnownFormat { + Delta_1_0 = "Delta/1.0", + JsonSchemaDraft7 = "JsonSchema/draft-07" } // @public @@ -441,70 +584,75 @@ export enum KnownOrigin { export enum KnownProvisioningState { Accepted = "Accepted", Canceled = "Canceled", + Deleting = "Deleting", Failed = "Failed", Succeeded = "Succeeded" } // @public -export enum KnownUserAuthenticationMode { - Anonymous = "Anonymous", - Certificate = "Certificate", - UsernamePassword = "UsernamePassword" +export enum KnownSchemaType { + MessageSchema = "MessageSchema" } // @public -export interface Operation { - readonly actionType?: ActionType; - display?: OperationDisplay; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; +export enum KnownSystemAssignedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned" } // @public -export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; +export enum KnownTopicRetainType { + Keep = "Keep", + Never = "Never" } // @public -export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; +export enum KnownVersions { + V2023_11_01_Preview = "2023-11-01-preview", + V2024_09_01_Preview = "2024-09-01-preview" } // @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +export interface MessageSchemaReference { + readonly schemaName: string; + readonly schemaRegistryNamespace: string; + readonly schemaVersion: string; } // @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +export interface Operation { + actionType?: ActionType; + readonly display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; } // @public -export type OperationsListNextResponse = OperationListResult; - -// @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; } // @public -export type OperationsListResponse = OperationListResult; +export interface OperationsListOptionalParams extends OperationOptions { +} // @public -export interface OperationStatus { - get(location: string, operationId: string, options?: OperationStatusGetOptionalParams): Promise; +export interface OperationsOperations { + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface OperationStatusGetOptionalParams extends coreClient.OperationOptions { +export interface OperationStatusGetOptionalParams extends OperationOptions { } // @public -export type OperationStatusGetResponse = OperationStatusResult; +export interface OperationStatusOperations { + get: (location: string, operationId: string, options?: OperationStatusGetOptionalParams) => Promise; +} // @public export interface OperationStatusResult { @@ -522,15 +670,24 @@ export interface OperationStatusResult { export type Origin = string; // @public -export interface OwnCertificate { - certPasswordReference?: string; - certSecretReference?: string; - certThumbprint?: string; +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; + next(): Promise>; +} + +// @public +export interface PageSettings { + continuationToken?: string; } // @public export type ProvisioningState = string; +// @public +export interface ProxyResource extends Resource { +} + // @public export interface Resource { readonly id?: string; @@ -540,70 +697,206 @@ export interface Resource { } // @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; +export function restorePoller(client: DeviceRegistryManagementClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike, TResult>, options?: RestorePollerOptions): PollerLike, TResult>; + +// @public (undocumented) +export interface RestorePollerOptions extends OperationOptions { + abortSignal?: AbortSignalLike; + processResponseBody?: (result: TResponse) => Promise; + updateIntervalInMs?: number; } // @public -export interface TrackedResource extends Resource { - location: string; - tags?: { - [propertyName: string]: string; - }; +export interface Schema extends ProxyResource { + properties?: SchemaProperties; +} + +// @public +export interface SchemaProperties { + description?: string; + displayName?: string; + format: Format; + readonly provisioningState?: ProvisioningState; + schemaType: SchemaType; + tags?: Record; + readonly uuid?: string; } // @public -export interface TransportAuthentication { - ownCertificates: OwnCertificate[]; +export interface SchemaRegistriesCreateOrReplaceOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface TransportAuthenticationUpdate { - ownCertificates?: OwnCertificate[]; +export interface SchemaRegistriesDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface UserAuthentication { - mode: UserAuthenticationMode; - usernamePasswordCredentials?: UsernamePasswordCredentials; - x509Credentials?: X509Credentials; +export interface SchemaRegistriesGetOptionalParams extends OperationOptions { } // @public -export type UserAuthenticationMode = string; +export interface SchemaRegistriesListByResourceGroupOptionalParams extends OperationOptions { +} // @public -export interface UserAuthenticationUpdate { - mode?: UserAuthenticationMode; - usernamePasswordCredentials?: UsernamePasswordCredentialsUpdate; - x509Credentials?: X509CredentialsUpdate; +export interface SchemaRegistriesListBySubscriptionOptionalParams extends OperationOptions { } // @public -export interface UsernamePasswordCredentials { - passwordReference: string; - usernameReference: string; +export interface SchemaRegistriesOperations { + createOrReplace: (resourceGroupName: string, schemaRegistryName: string, resource: SchemaRegistry, options?: SchemaRegistriesCreateOrReplaceOptionalParams) => PollerLike, SchemaRegistry>; + delete: (resourceGroupName: string, schemaRegistryName: string, options?: SchemaRegistriesDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, schemaRegistryName: string, options?: SchemaRegistriesGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: SchemaRegistriesListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: SchemaRegistriesListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, schemaRegistryName: string, properties: SchemaRegistryUpdate, options?: SchemaRegistriesUpdateOptionalParams) => PollerLike, SchemaRegistry>; } // @public -export interface UsernamePasswordCredentialsUpdate { - passwordReference?: string; - usernameReference?: string; +export interface SchemaRegistriesUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface X509Credentials { - certificateReference: string; +export interface SchemaRegistry extends TrackedResource { + identity?: SystemAssignedServiceIdentity; + properties?: SchemaRegistryProperties; } // @public -export interface X509CredentialsUpdate { - certificateReference?: string; +export interface SchemaRegistryProperties { + description?: string; + displayName?: string; + namespace: string; + readonly provisioningState?: ProvisioningState; + storageAccountContainerUrl: string; + readonly uuid?: string; +} + +// @public +export interface SchemaRegistryUpdate { + identity?: SystemAssignedServiceIdentity; + properties?: SchemaRegistryUpdateProperties; + tags?: Record; +} + +// @public +export interface SchemaRegistryUpdateProperties { + description?: string; + displayName?: string; +} + +// @public +export interface SchemasCreateOrReplaceOptionalParams extends OperationOptions { +} + +// @public +export interface SchemasDeleteOptionalParams extends OperationOptions { +} + +// @public +export interface SchemasGetOptionalParams extends OperationOptions { +} + +// @public +export interface SchemasListBySchemaRegistryOptionalParams extends OperationOptions { +} + +// @public +export interface SchemasOperations { + createOrReplace: (resourceGroupName: string, schemaRegistryName: string, schemaName: string, resource: Schema, options?: SchemasCreateOrReplaceOptionalParams) => Promise; + delete: (resourceGroupName: string, schemaRegistryName: string, schemaName: string, options?: SchemasDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, schemaRegistryName: string, schemaName: string, options?: SchemasGetOptionalParams) => Promise; + listBySchemaRegistry: (resourceGroupName: string, schemaRegistryName: string, options?: SchemasListBySchemaRegistryOptionalParams) => PagedAsyncIterableIterator; +} + +// @public +export type SchemaType = string; + +// @public +export interface SchemaVersion extends ProxyResource { + properties?: SchemaVersionProperties; +} + +// @public +export interface SchemaVersionProperties { + description?: string; + readonly hash?: string; + readonly provisioningState?: ProvisioningState; + schemaContent: string; + readonly uuid?: string; +} + +// @public +export interface SchemaVersionsCreateOrReplaceOptionalParams extends OperationOptions { +} + +// @public +export interface SchemaVersionsDeleteOptionalParams extends OperationOptions { +} + +// @public +export interface SchemaVersionsGetOptionalParams extends OperationOptions { +} + +// @public +export interface SchemaVersionsListBySchemaOptionalParams extends OperationOptions { +} + +// @public +export interface SchemaVersionsOperations { + createOrReplace: (resourceGroupName: string, schemaRegistryName: string, schemaName: string, schemaVersionName: string, resource: SchemaVersion, options?: SchemaVersionsCreateOrReplaceOptionalParams) => Promise; + delete: (resourceGroupName: string, schemaRegistryName: string, schemaName: string, schemaVersionName: string, options?: SchemaVersionsDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, schemaRegistryName: string, schemaName: string, schemaVersionName: string, options?: SchemaVersionsGetOptionalParams) => Promise; + listBySchema: (resourceGroupName: string, schemaRegistryName: string, schemaName: string, options?: SchemaVersionsListBySchemaOptionalParams) => PagedAsyncIterableIterator; +} + +// @public +export interface SystemAssignedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: SystemAssignedServiceIdentityType; +} + +// @public +export type SystemAssignedServiceIdentityType = string; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface Topic { + path: string; + retain?: TopicRetainType; +} + +// @public +export type TopicRetainType = string; + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: Record; +} + +// @public +export interface UsernamePasswordCredentials { + passwordSecretName: string; + usernameSecretName: string; +} + +// @public +export interface X509Credentials { + certificateSecretName: string; } // (No @packageDocumentation comment for this package) diff --git a/sdk/deviceregistry/arm-deviceregistry/sample.env b/sdk/deviceregistry/arm-deviceregistry/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/deviceregistry/arm-deviceregistry/sample.env +++ b/sdk/deviceregistry/arm-deviceregistry/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesCreateOrReplaceSample.ts index 1197ba9e9f47..e227fded3b47 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesCreateOrReplaceSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesCreateOrReplaceSample.ts @@ -1,59 +1,73 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - AssetEndpointProfile, - DeviceRegistryManagementClient, -} from "@azure/arm-deviceregistry"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Create a AssetEndpointProfile + * This sample demonstrates how to create a AssetEndpointProfile * - * @summary Create a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_AssetEndpointProfile.json + * @summary create a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile.json */ -async function createAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; - const resource: AssetEndpointProfile = { - extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", - type: "CustomLocation", - }, - location: "West Europe", - properties: { - targetAddress: "https://www.example.com/myTargetAddress", - userAuthentication: { mode: "Anonymous" }, +async function createAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assetEndpointProfiles.createOrReplace( + "myResourceGroup", + "my-assetendpointprofile", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + endpointProfileType: "myEndpointProfileType", + authentication: { method: "Anonymous" }, + }, }, - tags: { site: "building-1" }, - }; + ); + console.log(result); +} + +/** + * This sample demonstrates how to create a AssetEndpointProfile + * + * @summary create a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile_With_DiscoveredAepRef.json + */ +async function createAssetEndpointProfileWithDiscoveredAepRef() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assetEndpointProfiles.beginCreateOrReplaceAndWait( - resourceGroupName, - assetEndpointProfileName, - resource, + const result = await client.assetEndpointProfiles.createOrReplace( + "myResourceGroup", + "my-assetendpointprofile", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + endpointProfileType: "myEndpointProfileType", + discoveredAssetEndpointProfileRef: "discoveredAssetEndpointProfile1", + authentication: { method: "Anonymous" }, + }, + }, ); console.log(result); } async function main() { - createAnAssetEndpointProfile(); + createAssetEndpointProfile(); + createAssetEndpointProfileWithDiscoveredAepRef(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesDeleteSample.ts index 3f2ea9fa342a..ede7746b3e31 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesDeleteSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesDeleteSample.ts @@ -1,43 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to Delete a AssetEndpointProfile + * This sample demonstrates how to delete a AssetEndpointProfile * - * @summary Delete a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_AssetEndpointProfile.json + * @summary delete a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Delete_AssetEndpointProfile.json */ -async function deleteAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; +async function deleteAssetEndpointProfile() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assetEndpointProfiles.beginDeleteAndWait( - resourceGroupName, - assetEndpointProfileName, - ); - console.log(result); + await client.assetEndpointProfiles.delete("myResourceGroup", "my-assetendpointprofile"); } async function main() { - deleteAnAssetEndpointProfile(); + deleteAssetEndpointProfile(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesGetSample.ts index 407685d90fab..9482215dc4c3 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesGetSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesGetSample.ts @@ -1,43 +1,46 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +/** + * This sample demonstrates how to get a AssetEndpointProfile + * + * @summary get a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile.json + */ +async function getAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assetEndpointProfiles.get( + "myResourceGroup", + "my-assetendpointprofile", + ); + console.log(result); +} /** - * This sample demonstrates how to Get a AssetEndpointProfile + * This sample demonstrates how to get a AssetEndpointProfile * - * @summary Get a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_AssetEndpointProfile.json + * @summary get a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile_With_SyncStatus.json */ -async function getAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; +async function getAssetEndpointProfileWithSyncStatus() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const result = await client.assetEndpointProfiles.get( - resourceGroupName, - assetEndpointProfileName, + "myResourceGroup", + "my-assetendpointprofile", ); console.log(result); } async function main() { - getAnAssetEndpointProfile(); + getAssetEndpointProfile(); + getAssetEndpointProfileWithSyncStatus(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesListByResourceGroupSample.ts index 14413102b08f..2230794efd42 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesListByResourceGroupSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesListByResourceGroupSample.ts @@ -1,44 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List AssetEndpointProfile resources by resource group + * This sample demonstrates how to list AssetEndpointProfile resources by resource group * - * @summary List AssetEndpointProfile resources by resource group - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_ResourceGroup.json + * @summary list AssetEndpointProfile resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_ResourceGroup.json */ -async function listAssetEndpointProfilesInAResourceGroup() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; +async function listAssetEndpointProfilesResourceGroup() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.assetEndpointProfiles.listByResourceGroup( - resourceGroupName, - )) { + for await (let item of client.assetEndpointProfiles.listByResourceGroup("myResourceGroup")) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetEndpointProfilesInAResourceGroup(); + listAssetEndpointProfilesResourceGroup(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesListBySubscriptionSample.ts index 83e5236f301a..00f8a5204e2d 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesListBySubscriptionSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesListBySubscriptionSample.ts @@ -1,40 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List AssetEndpointProfile resources by subscription ID + * This sample demonstrates how to list AssetEndpointProfile resources by subscription ID * - * @summary List AssetEndpointProfile resources by subscription ID - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_Subscription.json + * @summary list AssetEndpointProfile resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_Subscription.json */ -async function listAssetEndpointProfilesInASubscription() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; +async function listAssetEndpointProfilesSubscription() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.assetEndpointProfiles.listBySubscription()) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetEndpointProfilesInASubscription(); + listAssetEndpointProfilesSubscription(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesUpdateSample.ts index 409b09e06b37..eac50c7e76c5 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesUpdateSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetEndpointProfilesUpdateSample.ts @@ -1,50 +1,31 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - AssetEndpointProfileUpdate, - DeviceRegistryManagementClient, -} from "@azure/arm-deviceregistry"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Update a AssetEndpointProfile + * This sample demonstrates how to update a AssetEndpointProfile * - * @summary Update a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_AssetEndpointProfile.json + * @summary update a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Update_AssetEndpointProfile.json */ -async function patchAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; - const properties: AssetEndpointProfileUpdate = { - properties: { targetAddress: "https://www.example.com/myTargetAddress" }, - }; +async function updateAssetEndpointProfile() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assetEndpointProfiles.beginUpdateAndWait( - resourceGroupName, - assetEndpointProfileName, - properties, + const result = await client.assetEndpointProfiles.update( + "myResourceGroup", + "my-assetendpointprofile", + { + properties: { targetAddress: "https://www.example.com/myTargetAddress" }, + }, ); console.log(result); } async function main() { - patchAnAssetEndpointProfile(); + updateAssetEndpointProfile(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsCreateOrReplaceSample.ts index 407f10ef31a8..92c1be902948 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsCreateOrReplaceSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsCreateOrReplaceSample.ts @@ -1,273 +1,317 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - Asset, - DeviceRegistryManagementClient, -} from "@azure/arm-deviceregistry"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Create a Asset + * This sample demonstrates how to create a Asset * - * @summary Create a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_With_ExternalAssetId.json + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_DisplayName.json */ -async function createAnAssetWithExternalAssetId() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const resource: Asset = { +async function createAssetWithoutDisplayName() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", }, - location: "West Europe", + tags: { site: "building-1" }, properties: { + enabled: true, + externalAssetId: "8ZBA6LRHU0A458969", description: "This is a sample Asset", - assetEndpointProfileUri: "https://www.example.com/myAssetEndpointProfile", - assetType: "MyAssetType", - dataPoints: [ - { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - dataPointConfiguration: - '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", - observabilityMode: "counter", - }, + assetEndpointProfileRef: "myAssetEndpointProfile", + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - dataPointConfiguration: - '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", - observabilityMode: "none", + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], }, ], - defaultDataPointsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - defaultEventsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - displayName: "AssetDisplayName", - documentationUri: "https://www.example.com/manual", - enabled: true, events: [ { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + name: "event1", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", - observabilityMode: "none", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, }, { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + name: "event2", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", - observabilityMode: "log", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', }, ], - externalAssetId: "8ZBA6LRHU0A458969", - hardwareRevision: "1.0", - manufacturer: "Contoso", - manufacturerUri: "https://www.contoso.com/manufacturerUri", - model: "ContosoModel", - productCode: "SA34VDG", - serialNumber: "64-103816-519918-8", - softwareRevision: "2.0", }, - tags: { site: "building-1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginCreateOrReplaceAndWait( - resourceGroupName, - assetName, - resource, - ); + }); console.log(result); } /** - * This sample demonstrates how to Create a Asset + * This sample demonstrates how to create a Asset * - * @summary Create a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_Without_DisplayName.json + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_ExternalAssetId.json */ -async function createAnAssetWithoutDisplayName() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const resource: Asset = { +async function createAssetWithoutExternalAssetId() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", }, - location: "West Europe", + tags: { site: "building-1" }, properties: { + enabled: true, + displayName: "AssetDisplayName", description: "This is a sample Asset", - assetEndpointProfileUri: "https://www.example.com/myAssetEndpointProfile", - assetType: "MyAssetType", - dataPoints: [ - { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - dataPointConfiguration: - '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", - observabilityMode: "counter", - }, + assetEndpointProfileRef: "myAssetEndpointProfile", + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - dataPointConfiguration: - '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", - observabilityMode: "none", + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], }, ], - defaultDataPointsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - defaultEventsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - documentationUri: "https://www.example.com/manual", - enabled: true, events: [ { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + name: "event1", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", - observabilityMode: "none", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, }, { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + name: "event2", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", - observabilityMode: "log", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', }, ], + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to create a Asset + * + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_With_DiscoveredAssetRef.json + */ +async function createAssetWithDiscoveredAssetRefs() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + enabled: true, externalAssetId: "8ZBA6LRHU0A458969", - hardwareRevision: "1.0", + displayName: "AssetDisplayName", + description: "This is a sample Asset", + assetEndpointProfileRef: "myAssetEndpointProfile", manufacturer: "Contoso", manufacturerUri: "https://www.contoso.com/manufacturerUri", model: "ContosoModel", productCode: "SA34VDG", - serialNumber: "64-103816-519918-8", + hardwareRevision: "1.0", softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + discoveredAssetRefs: ["discoveredAsset1", "discoveredAsset2"], + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ + { + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], + }, + ], + events: [ + { + name: "event1", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, + }, + { + name: "event2", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + }, + ], }, - tags: { site: "building-1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginCreateOrReplaceAndWait( - resourceGroupName, - assetName, - resource, - ); + }); console.log(result); } /** - * This sample demonstrates how to Create a Asset + * This sample demonstrates how to create a Asset * - * @summary Create a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_Without_ExternalAssetId.json + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_With_ExternalAssetId.json */ -async function createAnAssetWithoutExternalAssetId() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const resource: Asset = { +async function createAssetWithExternalAssetId() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", }, - location: "West Europe", + tags: { site: "building-1" }, properties: { + enabled: true, + externalAssetId: "8ZBA6LRHU0A458969", + displayName: "AssetDisplayName", description: "This is a sample Asset", - assetEndpointProfileUri: "https://www.example.com/myAssetEndpointProfile", - assetType: "MyAssetType", - dataPoints: [ - { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - dataPointConfiguration: - '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", - observabilityMode: "counter", - }, + assetEndpointProfileRef: "myAssetEndpointProfile", + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - dataPointConfiguration: - '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", - observabilityMode: "none", + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], }, ], - defaultDataPointsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - defaultEventsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - displayName: "AssetDisplayName", - documentationUri: "https://www.example.com/manual", - enabled: true, events: [ { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + name: "event1", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", - observabilityMode: "none", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, }, { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + name: "event2", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", - observabilityMode: "log", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', }, ], - hardwareRevision: "1.0", - manufacturer: "Contoso", - manufacturerUri: "https://www.contoso.com/manufacturerUri", - model: "ContosoModel", - productCode: "SA34VDG", - serialNumber: "64-103816-519918-8", - softwareRevision: "2.0", }, - tags: { site: "building-1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginCreateOrReplaceAndWait( - resourceGroupName, - assetName, - resource, - ); + }); console.log(result); } async function main() { - createAnAssetWithExternalAssetId(); - createAnAssetWithoutDisplayName(); - createAnAssetWithoutExternalAssetId(); + createAssetWithoutDisplayName(); + createAssetWithoutExternalAssetId(); + createAssetWithDiscoveredAssetRefs(); + createAssetWithExternalAssetId(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsDeleteSample.ts index 0d62e48d59bb..f302477cced6 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsDeleteSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsDeleteSample.ts @@ -1,43 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to Delete a Asset + * This sample demonstrates how to delete a Asset * - * @summary Delete a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_Asset.json + * @summary delete a Asset + * x-ms-original-file: 2024-09-01-preview/Delete_Asset.json */ -async function deleteAnAsset() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; +async function deleteAsset() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginDeleteAndWait( - resourceGroupName, - assetName, - ); - console.log(result); + await client.assets.delete("myResourceGroup", "my-asset"); } async function main() { - deleteAnAsset(); + deleteAsset(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsGetSample.ts index c341d40c0391..c685134701e6 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsGetSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsGetSample.ts @@ -1,60 +1,40 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to Get a Asset + * This sample demonstrates how to get a Asset * - * @summary Get a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_Asset.json + * @summary get a Asset + * x-ms-original-file: 2024-09-01-preview/Get_Asset.json */ -async function getAnAsset() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; +async function getAsset() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.get(resourceGroupName, assetName); + const result = await client.assets.get("myResourceGroup", "my-asset"); console.log(result); } /** - * This sample demonstrates how to Get a Asset + * This sample demonstrates how to get a Asset * - * @summary Get a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_Asset_With_SyncStatus.json + * @summary get a Asset + * x-ms-original-file: 2024-09-01-preview/Get_Asset_With_SyncStatus.json */ -async function getAnAssetWithSyncStatus() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; +async function getAssetWithSyncStatus() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.get(resourceGroupName, assetName); + const result = await client.assets.get("myResourceGroup", "my-asset"); console.log(result); } async function main() { - getAnAsset(); - getAnAssetWithSyncStatus(); + getAsset(); + getAssetWithSyncStatus(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsListByResourceGroupSample.ts index 8d358c701a19..9d566ed9eab1 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsListByResourceGroupSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsListByResourceGroupSample.ts @@ -1,42 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List Asset resources by resource group + * This sample demonstrates how to list Asset resources by resource group * - * @summary List Asset resources by resource group - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_ResourceGroup.json + * @summary list Asset resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_Assets_ResourceGroup.json */ -async function listAssetsInAResourceGroup() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; +async function listAssetsResourceGroup() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.assets.listByResourceGroup(resourceGroupName)) { + for await (let item of client.assets.listByResourceGroup("myResourceGroup")) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetsInAResourceGroup(); + listAssetsResourceGroup(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsListBySubscriptionSample.ts index 078c4c0cbcf7..75b639ef299e 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsListBySubscriptionSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsListBySubscriptionSample.ts @@ -1,40 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List Asset resources by subscription ID + * This sample demonstrates how to list Asset resources by subscription ID * - * @summary List Asset resources by subscription ID - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_Subscription.json + * @summary list Asset resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_Assets_Subscription.json */ -async function listAssetsInASubscription() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; +async function listAssetsSubscription() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.assets.listBySubscription()) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetsInASubscription(); + listAssetsSubscription(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsUpdateSample.ts index 9a752eec406e..4ef904672419 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsUpdateSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/assetsUpdateSample.ts @@ -1,50 +1,27 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - AssetUpdate, - DeviceRegistryManagementClient, -} from "@azure/arm-deviceregistry"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Update a Asset + * This sample demonstrates how to update a Asset * - * @summary Update a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_Asset.json + * @summary update a Asset + * x-ms-original-file: 2024-09-01-preview/Update_Asset.json */ -async function patchAnAsset() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const properties: AssetUpdate = { - properties: { displayName: "NewAssetDisplayName", enabled: false }, - }; +async function updateAsset() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginUpdateAndWait( - resourceGroupName, - assetName, - properties, - ); + const result = await client.assets.update("myResourceGroup", "my-asset", { + properties: { enabled: false, displayName: "NewAssetDisplayName" }, + }); console.log(result); } async function main() { - patchAnAsset(); + updateAsset(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/billingContainersGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/billingContainersGetSample.ts new file mode 100644 index 000000000000..efe39790bb6f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/billingContainersGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a BillingContainer + * + * @summary get a BillingContainer + * x-ms-original-file: 2024-09-01-preview/Get_BillingContainer.json + */ +async function getBillingContainer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.billingContainers.get("my-billingContainer"); + console.log(result); +} + +async function main() { + getBillingContainer(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/billingContainersListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/billingContainersListBySubscriptionSample.ts new file mode 100644 index 000000000000..1d4acb1d43d2 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/billingContainersListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list BillingContainer resources by subscription ID + * + * @summary list BillingContainer resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_BillingContainers_Subscription.json + */ +async function listBillingContainersSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.billingContainers.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listBillingContainersSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesCreateOrReplaceSample.ts new file mode 100644 index 000000000000..5bbe2710dd6f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesCreateOrReplaceSample.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a DiscoveredAssetEndpointProfile + * + * @summary create a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAssetEndpointProfile.json + */ +async function createDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssetEndpointProfiles.createOrReplace( + "myResourceGroup", + "my-discoveredassetendpointprofile", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + additionalConfiguration: '{"foo": "bar"}', + discoveryId: "11111111-1111-1111-1111-111111111111", + version: 73766, + endpointProfileType: "myEndpointProfileType", + supportedAuthenticationMethods: ["Anonymous", "Certificate", "UsernamePassword"], + }, + }, + ); + console.log(result); +} + +async function main() { + createDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesDeleteSample.ts new file mode 100644 index 000000000000..c10a87be60fe --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesDeleteSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a DiscoveredAssetEndpointProfile + * + * @summary delete a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAssetEndpointProfile.json + */ +async function deleteDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.discoveredAssetEndpointProfiles.delete( + "myResourceGroup", + "my-discoveredassetendpointprofile", + ); +} + +async function main() { + deleteDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesGetSample.ts new file mode 100644 index 000000000000..6d661f7023d4 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesGetSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a DiscoveredAssetEndpointProfile + * + * @summary get a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAssetEndpointProfile.json + */ +async function getDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssetEndpointProfiles.get( + "myResourceGroup", + "my-discoveredassetendpointprofile", + ); + console.log(result); +} + +async function main() { + getDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesListByResourceGroupSample.ts new file mode 100644 index 000000000000..3d9ad21b61d3 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesListByResourceGroupSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list DiscoveredAssetEndpointProfile resources by resource group + * + * @summary list DiscoveredAssetEndpointProfile resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_ResourceGroup.json + */ +async function listDiscoveredAssetEndpointProfilesResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssetEndpointProfiles.listByResourceGroup( + "myResourceGroup", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetEndpointProfilesResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesListBySubscriptionSample.ts new file mode 100644 index 000000000000..623bbae63b2f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list DiscoveredAssetEndpointProfile resources by subscription ID + * + * @summary list DiscoveredAssetEndpointProfile resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_Subscription.json + */ +async function listDiscoveredAssetEndpointProfilesSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssetEndpointProfiles.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetEndpointProfilesSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesUpdateSample.ts new file mode 100644 index 000000000000..2a4301998470 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetEndpointProfilesUpdateSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a DiscoveredAssetEndpointProfile + * + * @summary update a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAssetEndpointProfile.json + */ +async function updateDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssetEndpointProfiles.update( + "myResourceGroup", + "my-discoveredassetendpointprofile", + { + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + additionalConfiguration: '{"foo": "bar"}', + discoveryId: "11111111-1111-1111-1111-111111111111", + version: 73766, + endpointProfileType: "myEndpointProfileType", + supportedAuthenticationMethods: ["Anonymous", "Certificate"], + }, + }, + ); + console.log(result); +} + +async function main() { + updateDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsCreateOrReplaceSample.ts new file mode 100644 index 000000000000..708945264822 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsCreateOrReplaceSample.ts @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a DiscoveredAsset + * + * @summary create a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAsset.json + */ +async function createDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssets.createOrReplace( + "myResourceGroup", + "my-discoveredasset", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + assetEndpointProfileRef: "myAssetEndpointProfile", + discoveryId: "11111111-1111-1111-1111-111111111111", + version: 73766, + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ + { + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + dataPointConfiguration: + '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + dataPointConfiguration: + '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], + }, + ], + events: [ + { + name: "event1", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, + }, + { + name: "event2", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + }, + ], + }, + }, + ); + console.log(result); +} + +async function main() { + createDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsDeleteSample.ts new file mode 100644 index 000000000000..0846c4ee1563 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a DiscoveredAsset + * + * @summary delete a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAsset.json + */ +async function deleteDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.discoveredAssets.delete("myResourceGroup", "my-discoveredasset"); +} + +async function main() { + deleteDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsGetSample.ts new file mode 100644 index 000000000000..8d4d09baca68 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a DiscoveredAsset + * + * @summary get a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAsset.json + */ +async function getDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssets.get("myResourceGroup", "my-discoveredasset"); + console.log(result); +} + +async function main() { + getDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsListByResourceGroupSample.ts new file mode 100644 index 000000000000..89afb36c8dbd --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list DiscoveredAsset resources by resource group + * + * @summary list DiscoveredAsset resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_ResourceGroup.json + */ +async function listDiscoveredAssetsResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssets.listByResourceGroup("myResourceGroup")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetsResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsListBySubscriptionSample.ts new file mode 100644 index 000000000000..e0e20846efa9 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list DiscoveredAsset resources by subscription ID + * + * @summary list DiscoveredAsset resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_Subscription.json + */ +async function listDiscoveredAssetsSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssets.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetsSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsUpdateSample.ts new file mode 100644 index 000000000000..74ff2a691925 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/discoveredAssetsUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a DiscoveredAsset + * + * @summary update a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAsset.json + */ +async function updateDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssets.update("myResourceGroup", "my-discoveredasset", { + properties: { + documentationUri: "https://www.example.com/manual-2", + defaultTopic: { path: "/path/defaultTopic", retain: "Never" }, + }, + }); + console.log(result); +} + +async function main() { + updateDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/operationStatusGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/operationStatusGetSample.ts index c862e9c73e4c..c04f619a8821 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/operationStatusGetSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/operationStatusGetSample.ts @@ -1,39 +1,28 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to Returns the current status of an async operation. + * This sample demonstrates how to returns the current status of an async operation. * - * @summary Returns the current status of an async operation. - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_OperationStatus.json + * @summary returns the current status of an async operation. + * x-ms-original-file: 2024-09-01-preview/Get_OperationStatus.json */ -async function getTheStatusOfAnAsyncOperation() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "testLocation"; - const operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; +async function getOperationStatus() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); + const result = await client.operationStatus.get( + "testLocation", + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + ); console.log(result); } async function main() { - getTheStatusOfAnAsyncOperation(); + getOperationStatus(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/operationsListSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/operationsListSample.ts index 9c360acf4650..6bc18411adcb 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples-dev/operationsListSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/operationsListSample.ts @@ -1,40 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List the operations for the provider + * This sample demonstrates how to list the operations for the provider * - * @summary List the operations for the provider - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Operations.json + * @summary list the operations for the provider + * x-ms-original-file: 2024-09-01-preview/List_Operations.json */ -async function returnsListOfOperations() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; +async function listOperations() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } async function main() { - returnsListOfOperations(); + listOperations(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesCreateOrReplaceSample.ts new file mode 100644 index 000000000000..3bd30a5556da --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesCreateOrReplaceSample.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a SchemaRegistry + * + * @summary create a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Create_SchemaRegistry.json + */ +async function createSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaRegistries.createOrReplace( + "myResourceGroup", + "my-schema-registry", + { + properties: { + namespace: "sr-namespace-001", + displayName: "Schema Registry namespace 001", + description: "This is a sample Schema Registry", + storageAccountContainerUrl: "my-blob-storage.blob.core.windows.net/my-container", + }, + tags: {}, + location: "West Europe", + identity: { type: "None" }, + }, + ); + console.log(result); +} + +async function main() { + createSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesDeleteSample.ts new file mode 100644 index 000000000000..a1d15652899a --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a SchemaRegistry + * + * @summary delete a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Delete_SchemaRegistry.json + */ +async function deleteSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.schemaRegistries.delete("myResourceGroup", "my-schema-registry"); +} + +async function main() { + deleteSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesGetSample.ts new file mode 100644 index 000000000000..b9c5229b78f4 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a SchemaRegistry + * + * @summary get a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Get_SchemaRegistry.json + */ +async function getSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaRegistries.get("myResourceGroup", "my-schema-registry"); + console.log(result); +} + +async function main() { + getSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesListByResourceGroupSample.ts new file mode 100644 index 000000000000..b2d9091a84f5 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list SchemaRegistry resources by resource group + * + * @summary list SchemaRegistry resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_ResourceGroup.json + */ +async function listSchemaRegistriesResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemaRegistries.listByResourceGroup("myResourceGroup")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemaRegistriesResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesListBySubscriptionSample.ts new file mode 100644 index 000000000000..184ad0890610 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list SchemaRegistry resources by subscription ID + * + * @summary list SchemaRegistry resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_Subscription.json + */ +async function listSchemaRegistriesSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemaRegistries.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemaRegistriesSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesUpdateSample.ts new file mode 100644 index 000000000000..5b337962de49 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaRegistriesUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a SchemaRegistry + * + * @summary update a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Update_SchemaRegistry.json + */ +async function updateSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaRegistries.update("myResourceGroup", "my-schema-registry", { + properties: { + displayName: "Schema Registry namespace 001", + description: "This is a sample Schema Registry", + }, + tags: {}, + }); + console.log(result); +} + +async function main() { + updateSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsCreateOrReplaceSample.ts new file mode 100644 index 000000000000..756eb65ac8b2 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsCreateOrReplaceSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a SchemaVersion + * + * @summary create a SchemaVersion + * x-ms-original-file: 2024-09-01-preview/Create_SchemaVersion.json + */ +async function createSchemaVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaVersions.createOrReplace( + "myResourceGroup", + "my-schema-registry", + "my-schema", + "1", + { + properties: { + description: "Schema version 1", + schemaContent: + '{"$schema": "http://json-schema.org/draft-07/schema#","type": "object","properties": {"humidity": {"type": "string"},"temperature": {"type":"number"}}}', + }, + }, + ); + console.log(result); +} + +async function main() { + createSchemaVersion(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsDeleteSample.ts new file mode 100644 index 000000000000..7a9b8f4e750f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a SchemaVersion + * + * @summary delete a SchemaVersion + * x-ms-original-file: 2024-09-01-preview/Delete_SchemaVersion.json + */ +async function deleteSchemaVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.schemaVersions.delete("myResourceGroup", "my-schema-registry", "my-schema", "1"); +} + +async function main() { + deleteSchemaVersion(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsGetSample.ts new file mode 100644 index 000000000000..e923b34c9dd9 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a SchemaVersion + * + * @summary get a SchemaVersion + * x-ms-original-file: 2024-09-01-preview/Get_SchemaVersion.json + */ +async function getSchemaVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaVersions.get( + "myResourceGroup", + "my-schema-registry", + "my-schema", + "1", + ); + console.log(result); +} + +async function main() { + getSchemaVersion(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsListBySchemaSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsListBySchemaSample.ts new file mode 100644 index 000000000000..fcf3833e595f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemaVersionsListBySchemaSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list SchemaVersion resources by Schema + * + * @summary list SchemaVersion resources by Schema + * x-ms-original-file: 2024-09-01-preview/List_SchemaVersions_Schema.json + */ +async function listSchemaVersionsSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemaVersions.listBySchema( + "myResourceGroup", + "my-schema-registry", + "my-schema", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemaVersionsSchema(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasCreateOrReplaceSample.ts new file mode 100644 index 000000000000..10c843389179 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasCreateOrReplaceSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a Schema + * + * @summary create a Schema + * x-ms-original-file: 2024-09-01-preview/Create_Schema.json + */ +async function createSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemas.createOrReplace( + "myResourceGroup", + "my-schema-registry", + "my-schema", + { + properties: { + displayName: "My Schema", + description: "This is a sample Schema", + format: "JsonSchema/draft-07", + schemaType: "MessageSchema", + tags: { sampleKey: "sampleValue" }, + }, + }, + ); + console.log(result); +} + +async function main() { + createSchema(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasDeleteSample.ts new file mode 100644 index 000000000000..7f68fe71513a --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a Schema + * + * @summary delete a Schema + * x-ms-original-file: 2024-09-01-preview/Delete_Schema.json + */ +async function deleteSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.schemas.delete("myResourceGroup", "my-schema-registry", "my-schema"); +} + +async function main() { + deleteSchema(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasGetSample.ts new file mode 100644 index 000000000000..1eaec80dd028 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a Schema + * + * @summary get a Schema + * x-ms-original-file: 2024-09-01-preview/Get_Schema.json + */ +async function schemasGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemas.get("myResourceGroup", "my-schema-registry", "my-schema"); + console.log(result); +} + +async function main() { + schemasGet(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasListBySchemaRegistrySample.ts b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasListBySchemaRegistrySample.ts new file mode 100644 index 000000000000..fb60e26a5a40 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples-dev/schemasListBySchemaRegistrySample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list Schema resources by SchemaRegistry + * + * @summary list Schema resources by SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/List_Schemas_SchemaRegistry.json + */ +async function listSchemasSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemas.listBySchemaRegistry( + "myResourceGroup", + "my-schema-registry", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemasSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/README.md b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/README.md index cd70b4d9ffe8..ae9f650c52e2 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/README.md +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/README.md @@ -1,23 +1,51 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [assetEndpointProfilesCreateOrReplaceSample.js][assetendpointprofilescreateorreplacesample] | Create a AssetEndpointProfile x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_AssetEndpointProfile.json | -| [assetEndpointProfilesDeleteSample.js][assetendpointprofilesdeletesample] | Delete a AssetEndpointProfile x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_AssetEndpointProfile.json | -| [assetEndpointProfilesGetSample.js][assetendpointprofilesgetsample] | Get a AssetEndpointProfile x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_AssetEndpointProfile.json | -| [assetEndpointProfilesListByResourceGroupSample.js][assetendpointprofileslistbyresourcegroupsample] | List AssetEndpointProfile resources by resource group x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_ResourceGroup.json | -| [assetEndpointProfilesListBySubscriptionSample.js][assetendpointprofileslistbysubscriptionsample] | List AssetEndpointProfile resources by subscription ID x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_Subscription.json | -| [assetEndpointProfilesUpdateSample.js][assetendpointprofilesupdatesample] | Update a AssetEndpointProfile x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_AssetEndpointProfile.json | -| [assetsCreateOrReplaceSample.js][assetscreateorreplacesample] | Create a Asset x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_With_ExternalAssetId.json | -| [assetsDeleteSample.js][assetsdeletesample] | Delete a Asset x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_Asset.json | -| [assetsGetSample.js][assetsgetsample] | Get a Asset x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_Asset.json | -| [assetsListByResourceGroupSample.js][assetslistbyresourcegroupsample] | List Asset resources by resource group x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_ResourceGroup.json | -| [assetsListBySubscriptionSample.js][assetslistbysubscriptionsample] | List Asset resources by subscription ID x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_Subscription.json | -| [assetsUpdateSample.js][assetsupdatesample] | Update a Asset x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_Asset.json | -| [operationStatusGetSample.js][operationstatusgetsample] | Returns the current status of an async operation. x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_OperationStatus.json | -| [operationsListSample.js][operationslistsample] | List the operations for the provider x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Operations.json | +# @azure/arm-deviceregistry client library samples for JavaScript (Beta) + +These sample programs show how to use the JavaScript client libraries for @azure/arm-deviceregistry in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [assetEndpointProfilesCreateOrReplaceSample.js][assetendpointprofilescreateorreplacesample] | create a AssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile.json | +| [assetEndpointProfilesDeleteSample.js][assetendpointprofilesdeletesample] | delete a AssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Delete_AssetEndpointProfile.json | +| [assetEndpointProfilesGetSample.js][assetendpointprofilesgetsample] | get a AssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile.json | +| [assetEndpointProfilesListByResourceGroupSample.js][assetendpointprofileslistbyresourcegroupsample] | list AssetEndpointProfile resources by resource group x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_ResourceGroup.json | +| [assetEndpointProfilesListBySubscriptionSample.js][assetendpointprofileslistbysubscriptionsample] | list AssetEndpointProfile resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_Subscription.json | +| [assetEndpointProfilesUpdateSample.js][assetendpointprofilesupdatesample] | update a AssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Update_AssetEndpointProfile.json | +| [assetsCreateOrReplaceSample.js][assetscreateorreplacesample] | create a Asset x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_DisplayName.json | +| [assetsDeleteSample.js][assetsdeletesample] | delete a Asset x-ms-original-file: 2024-09-01-preview/Delete_Asset.json | +| [assetsGetSample.js][assetsgetsample] | get a Asset x-ms-original-file: 2024-09-01-preview/Get_Asset.json | +| [assetsListByResourceGroupSample.js][assetslistbyresourcegroupsample] | list Asset resources by resource group x-ms-original-file: 2024-09-01-preview/List_Assets_ResourceGroup.json | +| [assetsListBySubscriptionSample.js][assetslistbysubscriptionsample] | list Asset resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_Assets_Subscription.json | +| [assetsUpdateSample.js][assetsupdatesample] | update a Asset x-ms-original-file: 2024-09-01-preview/Update_Asset.json | +| [billingContainersGetSample.js][billingcontainersgetsample] | get a BillingContainer x-ms-original-file: 2024-09-01-preview/Get_BillingContainer.json | +| [billingContainersListBySubscriptionSample.js][billingcontainerslistbysubscriptionsample] | list BillingContainer resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_BillingContainers_Subscription.json | +| [discoveredAssetEndpointProfilesCreateOrReplaceSample.js][discoveredassetendpointprofilescreateorreplacesample] | create a DiscoveredAssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAssetEndpointProfile.json | +| [discoveredAssetEndpointProfilesDeleteSample.js][discoveredassetendpointprofilesdeletesample] | delete a DiscoveredAssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAssetEndpointProfile.json | +| [discoveredAssetEndpointProfilesGetSample.js][discoveredassetendpointprofilesgetsample] | get a DiscoveredAssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAssetEndpointProfile.json | +| [discoveredAssetEndpointProfilesListByResourceGroupSample.js][discoveredassetendpointprofileslistbyresourcegroupsample] | list DiscoveredAssetEndpointProfile resources by resource group x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_ResourceGroup.json | +| [discoveredAssetEndpointProfilesListBySubscriptionSample.js][discoveredassetendpointprofileslistbysubscriptionsample] | list DiscoveredAssetEndpointProfile resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_Subscription.json | +| [discoveredAssetEndpointProfilesUpdateSample.js][discoveredassetendpointprofilesupdatesample] | update a DiscoveredAssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAssetEndpointProfile.json | +| [discoveredAssetsCreateOrReplaceSample.js][discoveredassetscreateorreplacesample] | create a DiscoveredAsset x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAsset.json | +| [discoveredAssetsDeleteSample.js][discoveredassetsdeletesample] | delete a DiscoveredAsset x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAsset.json | +| [discoveredAssetsGetSample.js][discoveredassetsgetsample] | get a DiscoveredAsset x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAsset.json | +| [discoveredAssetsListByResourceGroupSample.js][discoveredassetslistbyresourcegroupsample] | list DiscoveredAsset resources by resource group x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_ResourceGroup.json | +| [discoveredAssetsListBySubscriptionSample.js][discoveredassetslistbysubscriptionsample] | list DiscoveredAsset resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_Subscription.json | +| [discoveredAssetsUpdateSample.js][discoveredassetsupdatesample] | update a DiscoveredAsset x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAsset.json | +| [operationStatusGetSample.js][operationstatusgetsample] | returns the current status of an async operation. x-ms-original-file: 2024-09-01-preview/Get_OperationStatus.json | +| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-09-01-preview/List_Operations.json | +| [schemaRegistriesCreateOrReplaceSample.js][schemaregistriescreateorreplacesample] | create a SchemaRegistry x-ms-original-file: 2024-09-01-preview/Create_SchemaRegistry.json | +| [schemaRegistriesDeleteSample.js][schemaregistriesdeletesample] | delete a SchemaRegistry x-ms-original-file: 2024-09-01-preview/Delete_SchemaRegistry.json | +| [schemaRegistriesGetSample.js][schemaregistriesgetsample] | get a SchemaRegistry x-ms-original-file: 2024-09-01-preview/Get_SchemaRegistry.json | +| [schemaRegistriesListByResourceGroupSample.js][schemaregistrieslistbyresourcegroupsample] | list SchemaRegistry resources by resource group x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_ResourceGroup.json | +| [schemaRegistriesListBySubscriptionSample.js][schemaregistrieslistbysubscriptionsample] | list SchemaRegistry resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_Subscription.json | +| [schemaRegistriesUpdateSample.js][schemaregistriesupdatesample] | update a SchemaRegistry x-ms-original-file: 2024-09-01-preview/Update_SchemaRegistry.json | +| [schemaVersionsCreateOrReplaceSample.js][schemaversionscreateorreplacesample] | create a SchemaVersion x-ms-original-file: 2024-09-01-preview/Create_SchemaVersion.json | +| [schemaVersionsDeleteSample.js][schemaversionsdeletesample] | delete a SchemaVersion x-ms-original-file: 2024-09-01-preview/Delete_SchemaVersion.json | +| [schemaVersionsGetSample.js][schemaversionsgetsample] | get a SchemaVersion x-ms-original-file: 2024-09-01-preview/Get_SchemaVersion.json | +| [schemaVersionsListBySchemaSample.js][schemaversionslistbyschemasample] | list SchemaVersion resources by Schema x-ms-original-file: 2024-09-01-preview/List_SchemaVersions_Schema.json | +| [schemasCreateOrReplaceSample.js][schemascreateorreplacesample] | create a Schema x-ms-original-file: 2024-09-01-preview/Create_Schema.json | +| [schemasDeleteSample.js][schemasdeletesample] | delete a Schema x-ms-original-file: 2024-09-01-preview/Delete_Schema.json | +| [schemasGetSample.js][schemasgetsample] | get a Schema x-ms-original-file: 2024-09-01-preview/Get_Schema.json | +| [schemasListBySchemaRegistrySample.js][schemaslistbyschemaregistrysample] | list Schema resources by SchemaRegistry x-ms-original-file: 2024-09-01-preview/List_Schemas_SchemaRegistry.json | ## Prerequisites @@ -50,7 +78,7 @@ node assetEndpointProfilesCreateOrReplaceSample.js Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx dev-tool run vendored cross-env DEVICEREGISTRY_SUBSCRIPTION_ID="" DEVICEREGISTRY_RESOURCE_GROUP="" node assetEndpointProfilesCreateOrReplaceSample.js +npx dev-tool run vendored cross-env node assetEndpointProfilesCreateOrReplaceSample.js ``` ## Next Steps @@ -69,8 +97,36 @@ Take a look at our [API Documentation][apiref] for more information about the AP [assetslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListByResourceGroupSample.js [assetslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListBySubscriptionSample.js [assetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsUpdateSample.js +[billingcontainersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersGetSample.js +[billingcontainerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersListBySubscriptionSample.js +[discoveredassetendpointprofilescreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesCreateOrReplaceSample.js +[discoveredassetendpointprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesDeleteSample.js +[discoveredassetendpointprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesGetSample.js +[discoveredassetendpointprofileslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListByResourceGroupSample.js +[discoveredassetendpointprofileslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListBySubscriptionSample.js +[discoveredassetendpointprofilesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesUpdateSample.js +[discoveredassetscreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsCreateOrReplaceSample.js +[discoveredassetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsDeleteSample.js +[discoveredassetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsGetSample.js +[discoveredassetslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListByResourceGroupSample.js +[discoveredassetslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListBySubscriptionSample.js +[discoveredassetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsUpdateSample.js [operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationStatusGetSample.js [operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationsListSample.js +[schemaregistriescreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesCreateOrReplaceSample.js +[schemaregistriesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesDeleteSample.js +[schemaregistriesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesGetSample.js +[schemaregistrieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListByResourceGroupSample.js +[schemaregistrieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListBySubscriptionSample.js +[schemaregistriesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesUpdateSample.js +[schemaversionscreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsCreateOrReplaceSample.js +[schemaversionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsDeleteSample.js +[schemaversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsGetSample.js +[schemaversionslistbyschemasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsListBySchemaSample.js +[schemascreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasCreateOrReplaceSample.js +[schemasdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasDeleteSample.js +[schemasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasGetSample.js +[schemaslistbyschemaregistrysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasListBySchemaRegistrySample.js [apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-deviceregistry?view=azure-node-preview [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deviceregistry/arm-deviceregistry/README.md diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesCreateOrReplaceSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesCreateOrReplaceSample.js index 86f9d3073f97..49cc2d4cb45d 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesCreateOrReplaceSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesCreateOrReplaceSample.js @@ -1,52 +1,73 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Create a AssetEndpointProfile + * This sample demonstrates how to create a AssetEndpointProfile * - * @summary Create a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_AssetEndpointProfile.json + * @summary create a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile.json */ -async function createAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; - const resource = { - extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", - type: "CustomLocation", - }, - location: "West Europe", - properties: { - targetAddress: "https://www.example.com/myTargetAddress", - userAuthentication: { mode: "Anonymous" }, +async function createAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assetEndpointProfiles.createOrReplace( + "myResourceGroup", + "my-assetendpointprofile", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + endpointProfileType: "myEndpointProfileType", + authentication: { method: "Anonymous" }, + }, }, - tags: { site: "building-1" }, - }; + ); + console.log(result); +} + +/** + * This sample demonstrates how to create a AssetEndpointProfile + * + * @summary create a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile_With_DiscoveredAepRef.json + */ +async function createAssetEndpointProfileWithDiscoveredAepRef() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assetEndpointProfiles.beginCreateOrReplaceAndWait( - resourceGroupName, - assetEndpointProfileName, - resource, + const result = await client.assetEndpointProfiles.createOrReplace( + "myResourceGroup", + "my-assetendpointprofile", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + endpointProfileType: "myEndpointProfileType", + discoveredAssetEndpointProfileRef: "discoveredAssetEndpointProfile1", + authentication: { method: "Anonymous" }, + }, + }, ); console.log(result); } async function main() { - createAnAssetEndpointProfile(); + createAssetEndpointProfile(); + createAssetEndpointProfileWithDiscoveredAepRef(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesDeleteSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesDeleteSample.js index e300baa8d740..af9d90ab55ba 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesDeleteSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesDeleteSample.js @@ -1,39 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Delete a AssetEndpointProfile + * This sample demonstrates how to delete a AssetEndpointProfile * - * @summary Delete a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_AssetEndpointProfile.json + * @summary delete a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Delete_AssetEndpointProfile.json */ -async function deleteAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; +async function deleteAssetEndpointProfile() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assetEndpointProfiles.beginDeleteAndWait( - resourceGroupName, - assetEndpointProfileName, - ); - console.log(result); + await client.assetEndpointProfiles.delete("myResourceGroup", "my-assetendpointprofile"); } async function main() { - deleteAnAssetEndpointProfile(); + deleteAssetEndpointProfile(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesGetSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesGetSample.js index 27f1b063d10a..667daf23051d 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesGetSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesGetSample.js @@ -1,39 +1,46 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Get a AssetEndpointProfile + * This sample demonstrates how to get a AssetEndpointProfile + * + * @summary get a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile.json + */ +async function getAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assetEndpointProfiles.get( + "myResourceGroup", + "my-assetendpointprofile", + ); + console.log(result); +} + +/** + * This sample demonstrates how to get a AssetEndpointProfile * - * @summary Get a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_AssetEndpointProfile.json + * @summary get a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile_With_SyncStatus.json */ -async function getAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; +async function getAssetEndpointProfileWithSyncStatus() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const result = await client.assetEndpointProfiles.get( - resourceGroupName, - assetEndpointProfileName, + "myResourceGroup", + "my-assetendpointprofile", ); console.log(result); } async function main() { - getAnAssetEndpointProfile(); + getAssetEndpointProfile(); + getAssetEndpointProfileWithSyncStatus(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesListByResourceGroupSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesListByResourceGroupSample.js index 931157af7239..0d77c7942296 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesListByResourceGroupSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesListByResourceGroupSample.js @@ -1,38 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to List AssetEndpointProfile resources by resource group + * This sample demonstrates how to list AssetEndpointProfile resources by resource group * - * @summary List AssetEndpointProfile resources by resource group - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_ResourceGroup.json + * @summary list AssetEndpointProfile resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_ResourceGroup.json */ -async function listAssetEndpointProfilesInAResourceGroup() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; +async function listAssetEndpointProfilesResourceGroup() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.assetEndpointProfiles.listByResourceGroup(resourceGroupName)) { + for await (let item of client.assetEndpointProfiles.listByResourceGroup("myResourceGroup")) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetEndpointProfilesInAResourceGroup(); + listAssetEndpointProfilesResourceGroup(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesListBySubscriptionSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesListBySubscriptionSample.js index c70e6c0fbf2e..ec9ddcd1518a 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesListBySubscriptionSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesListBySubscriptionSample.js @@ -1,37 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to List AssetEndpointProfile resources by subscription ID + * This sample demonstrates how to list AssetEndpointProfile resources by subscription ID * - * @summary List AssetEndpointProfile resources by subscription ID - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_Subscription.json + * @summary list AssetEndpointProfile resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_Subscription.json */ -async function listAssetEndpointProfilesInASubscription() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; +async function listAssetEndpointProfilesSubscription() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.assetEndpointProfiles.listBySubscription()) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetEndpointProfilesInASubscription(); + listAssetEndpointProfilesSubscription(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesUpdateSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesUpdateSample.js index a9ac59527622..402979e13375 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesUpdateSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetEndpointProfilesUpdateSample.js @@ -1,43 +1,31 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Update a AssetEndpointProfile + * This sample demonstrates how to update a AssetEndpointProfile * - * @summary Update a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_AssetEndpointProfile.json + * @summary update a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Update_AssetEndpointProfile.json */ -async function patchAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; - const properties = { - properties: { targetAddress: "https://www.example.com/myTargetAddress" }, - }; +async function updateAssetEndpointProfile() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assetEndpointProfiles.beginUpdateAndWait( - resourceGroupName, - assetEndpointProfileName, - properties, + const result = await client.assetEndpointProfiles.update( + "myResourceGroup", + "my-assetendpointprofile", + { + properties: { targetAddress: "https://www.example.com/myTargetAddress" }, + }, ); console.log(result); } async function main() { - patchAnAssetEndpointProfile(); + updateAssetEndpointProfile(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsCreateOrReplaceSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsCreateOrReplaceSample.js index 2ce823e81f03..8aad2b73f37d 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsCreateOrReplaceSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsCreateOrReplaceSample.js @@ -1,247 +1,317 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Create a Asset + * This sample demonstrates how to create a Asset * - * @summary Create a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_With_ExternalAssetId.json + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_DisplayName.json */ -async function createAnAssetWithExternalAssetId() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const resource = { +async function createAssetWithoutDisplayName() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", }, - location: "West Europe", + tags: { site: "building-1" }, properties: { + enabled: true, + externalAssetId: "8ZBA6LRHU0A458969", description: "This is a sample Asset", - assetEndpointProfileUri: "https://www.example.com/myAssetEndpointProfile", - assetType: "MyAssetType", - dataPoints: [ - { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", - observabilityMode: "counter", - }, + assetEndpointProfileRef: "myAssetEndpointProfile", + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", - observabilityMode: "none", + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], }, ], - defaultDataPointsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - displayName: "AssetDisplayName", - documentationUri: "https://www.example.com/manual", - enabled: true, events: [ { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + name: "event1", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", - observabilityMode: "none", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, }, { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + name: "event2", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", - observabilityMode: "log", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', }, ], - externalAssetId: "8ZBA6LRHU0A458969", - hardwareRevision: "1.0", - manufacturer: "Contoso", - manufacturerUri: "https://www.contoso.com/manufacturerUri", - model: "ContosoModel", - productCode: "SA34VDG", - serialNumber: "64-103816-519918-8", - softwareRevision: "2.0", }, - tags: { site: "building-1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginCreateOrReplaceAndWait( - resourceGroupName, - assetName, - resource, - ); + }); console.log(result); } /** - * This sample demonstrates how to Create a Asset + * This sample demonstrates how to create a Asset * - * @summary Create a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_Without_DisplayName.json + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_ExternalAssetId.json */ -async function createAnAssetWithoutDisplayName() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const resource = { +async function createAssetWithoutExternalAssetId() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", }, - location: "West Europe", + tags: { site: "building-1" }, properties: { + enabled: true, + displayName: "AssetDisplayName", description: "This is a sample Asset", - assetEndpointProfileUri: "https://www.example.com/myAssetEndpointProfile", - assetType: "MyAssetType", - dataPoints: [ - { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", - observabilityMode: "counter", - }, + assetEndpointProfileRef: "myAssetEndpointProfile", + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", - observabilityMode: "none", + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], }, ], - defaultDataPointsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - documentationUri: "https://www.example.com/manual", - enabled: true, events: [ { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + name: "event1", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", - observabilityMode: "none", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, }, { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + name: "event2", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", - observabilityMode: "log", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', }, ], + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to create a Asset + * + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_With_DiscoveredAssetRef.json + */ +async function createAssetWithDiscoveredAssetRefs() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + enabled: true, externalAssetId: "8ZBA6LRHU0A458969", - hardwareRevision: "1.0", + displayName: "AssetDisplayName", + description: "This is a sample Asset", + assetEndpointProfileRef: "myAssetEndpointProfile", manufacturer: "Contoso", manufacturerUri: "https://www.contoso.com/manufacturerUri", model: "ContosoModel", productCode: "SA34VDG", - serialNumber: "64-103816-519918-8", + hardwareRevision: "1.0", softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + discoveredAssetRefs: ["discoveredAsset1", "discoveredAsset2"], + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ + { + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], + }, + ], + events: [ + { + name: "event1", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, + }, + { + name: "event2", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + }, + ], }, - tags: { site: "building-1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginCreateOrReplaceAndWait( - resourceGroupName, - assetName, - resource, - ); + }); console.log(result); } /** - * This sample demonstrates how to Create a Asset + * This sample demonstrates how to create a Asset * - * @summary Create a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_Without_ExternalAssetId.json + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_With_ExternalAssetId.json */ -async function createAnAssetWithoutExternalAssetId() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const resource = { +async function createAssetWithExternalAssetId() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", }, - location: "West Europe", + tags: { site: "building-1" }, properties: { + enabled: true, + externalAssetId: "8ZBA6LRHU0A458969", + displayName: "AssetDisplayName", description: "This is a sample Asset", - assetEndpointProfileUri: "https://www.example.com/myAssetEndpointProfile", - assetType: "MyAssetType", - dataPoints: [ - { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", - observabilityMode: "counter", - }, + assetEndpointProfileRef: "myAssetEndpointProfile", + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", - observabilityMode: "none", + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], }, ], - defaultDataPointsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - displayName: "AssetDisplayName", - documentationUri: "https://www.example.com/manual", - enabled: true, events: [ { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + name: "event1", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", - observabilityMode: "none", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, }, { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + name: "event2", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", - observabilityMode: "log", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', }, ], - hardwareRevision: "1.0", - manufacturer: "Contoso", - manufacturerUri: "https://www.contoso.com/manufacturerUri", - model: "ContosoModel", - productCode: "SA34VDG", - serialNumber: "64-103816-519918-8", - softwareRevision: "2.0", }, - tags: { site: "building-1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginCreateOrReplaceAndWait( - resourceGroupName, - assetName, - resource, - ); + }); console.log(result); } async function main() { - createAnAssetWithExternalAssetId(); - createAnAssetWithoutDisplayName(); - createAnAssetWithoutExternalAssetId(); + createAssetWithoutDisplayName(); + createAssetWithoutExternalAssetId(); + createAssetWithDiscoveredAssetRefs(); + createAssetWithExternalAssetId(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsDeleteSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsDeleteSample.js index 6772d00e3c02..2f352e52287b 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsDeleteSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsDeleteSample.js @@ -1,36 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Delete a Asset + * This sample demonstrates how to delete a Asset * - * @summary Delete a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_Asset.json + * @summary delete a Asset + * x-ms-original-file: 2024-09-01-preview/Delete_Asset.json */ -async function deleteAnAsset() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; +async function deleteAsset() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginDeleteAndWait(resourceGroupName, assetName); - console.log(result); + await client.assets.delete("myResourceGroup", "my-asset"); } async function main() { - deleteAnAsset(); + deleteAsset(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsGetSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsGetSample.js index f9b7c6691abd..cd12248da968 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsGetSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsGetSample.js @@ -1,54 +1,40 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Get a Asset + * This sample demonstrates how to get a Asset * - * @summary Get a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_Asset.json + * @summary get a Asset + * x-ms-original-file: 2024-09-01-preview/Get_Asset.json */ -async function getAnAsset() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; +async function getAsset() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.get(resourceGroupName, assetName); + const result = await client.assets.get("myResourceGroup", "my-asset"); console.log(result); } /** - * This sample demonstrates how to Get a Asset + * This sample demonstrates how to get a Asset * - * @summary Get a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_Asset_With_SyncStatus.json + * @summary get a Asset + * x-ms-original-file: 2024-09-01-preview/Get_Asset_With_SyncStatus.json */ -async function getAnAssetWithSyncStatus() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; +async function getAssetWithSyncStatus() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.get(resourceGroupName, assetName); + const result = await client.assets.get("myResourceGroup", "my-asset"); console.log(result); } async function main() { - getAnAsset(); - getAnAssetWithSyncStatus(); + getAsset(); + getAssetWithSyncStatus(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListByResourceGroupSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListByResourceGroupSample.js index 465c9e43679a..6dc75487a3fa 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListByResourceGroupSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListByResourceGroupSample.js @@ -1,38 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to List Asset resources by resource group + * This sample demonstrates how to list Asset resources by resource group * - * @summary List Asset resources by resource group - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_ResourceGroup.json + * @summary list Asset resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_Assets_ResourceGroup.json */ -async function listAssetsInAResourceGroup() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; +async function listAssetsResourceGroup() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.assets.listByResourceGroup(resourceGroupName)) { + for await (let item of client.assets.listByResourceGroup("myResourceGroup")) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetsInAResourceGroup(); + listAssetsResourceGroup(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListBySubscriptionSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListBySubscriptionSample.js index 367fcc37795e..bed170f4a7f6 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListBySubscriptionSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsListBySubscriptionSample.js @@ -1,37 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to List Asset resources by subscription ID + * This sample demonstrates how to list Asset resources by subscription ID * - * @summary List Asset resources by subscription ID - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_Subscription.json + * @summary list Asset resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_Assets_Subscription.json */ -async function listAssetsInASubscription() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; +async function listAssetsSubscription() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.assets.listBySubscription()) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetsInASubscription(); + listAssetsSubscription(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsUpdateSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsUpdateSample.js index fa3bfae65866..765b4df23fab 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsUpdateSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/assetsUpdateSample.js @@ -1,39 +1,27 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Update a Asset + * This sample demonstrates how to update a Asset * - * @summary Update a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_Asset.json + * @summary update a Asset + * x-ms-original-file: 2024-09-01-preview/Update_Asset.json */ -async function patchAnAsset() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const properties = { - properties: { displayName: "NewAssetDisplayName", enabled: false }, - }; +async function updateAsset() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginUpdateAndWait(resourceGroupName, assetName, properties); + const result = await client.assets.update("myResourceGroup", "my-asset", { + properties: { enabled: false, displayName: "NewAssetDisplayName" }, + }); console.log(result); } async function main() { - patchAnAsset(); + updateAsset(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersGetSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersGetSample.js new file mode 100644 index 000000000000..5a92ff71dfb7 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a BillingContainer + * + * @summary get a BillingContainer + * x-ms-original-file: 2024-09-01-preview/Get_BillingContainer.json + */ +async function getBillingContainer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.billingContainers.get("my-billingContainer"); + console.log(result); +} + +async function main() { + getBillingContainer(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersListBySubscriptionSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersListBySubscriptionSample.js new file mode 100644 index 000000000000..0226afc800e4 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/billingContainersListBySubscriptionSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list BillingContainer resources by subscription ID + * + * @summary list BillingContainer resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_BillingContainers_Subscription.json + */ +async function listBillingContainersSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.billingContainers.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listBillingContainersSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesCreateOrReplaceSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesCreateOrReplaceSample.js new file mode 100644 index 000000000000..180be1cf4944 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesCreateOrReplaceSample.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a DiscoveredAssetEndpointProfile + * + * @summary create a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAssetEndpointProfile.json + */ +async function createDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssetEndpointProfiles.createOrReplace( + "myResourceGroup", + "my-discoveredassetendpointprofile", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + additionalConfiguration: '{"foo": "bar"}', + discoveryId: "11111111-1111-1111-1111-111111111111", + version: 73766, + endpointProfileType: "myEndpointProfileType", + supportedAuthenticationMethods: ["Anonymous", "Certificate", "UsernamePassword"], + }, + }, + ); + console.log(result); +} + +async function main() { + createDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesDeleteSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesDeleteSample.js new file mode 100644 index 000000000000..e5242879e3db --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesDeleteSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a DiscoveredAssetEndpointProfile + * + * @summary delete a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAssetEndpointProfile.json + */ +async function deleteDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.discoveredAssetEndpointProfiles.delete( + "myResourceGroup", + "my-discoveredassetendpointprofile", + ); +} + +async function main() { + deleteDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesGetSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesGetSample.js new file mode 100644 index 000000000000..9eea8afe04cc --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesGetSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a DiscoveredAssetEndpointProfile + * + * @summary get a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAssetEndpointProfile.json + */ +async function getDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssetEndpointProfiles.get( + "myResourceGroup", + "my-discoveredassetendpointprofile", + ); + console.log(result); +} + +async function main() { + getDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListByResourceGroupSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListByResourceGroupSample.js new file mode 100644 index 000000000000..60351227caf6 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListByResourceGroupSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list DiscoveredAssetEndpointProfile resources by resource group + * + * @summary list DiscoveredAssetEndpointProfile resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_ResourceGroup.json + */ +async function listDiscoveredAssetEndpointProfilesResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssetEndpointProfiles.listByResourceGroup( + "myResourceGroup", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetEndpointProfilesResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListBySubscriptionSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListBySubscriptionSample.js new file mode 100644 index 000000000000..3f3d0e6b5e6b --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesListBySubscriptionSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list DiscoveredAssetEndpointProfile resources by subscription ID + * + * @summary list DiscoveredAssetEndpointProfile resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_Subscription.json + */ +async function listDiscoveredAssetEndpointProfilesSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssetEndpointProfiles.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetEndpointProfilesSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesUpdateSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesUpdateSample.js new file mode 100644 index 000000000000..b9b4cf5d9507 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetEndpointProfilesUpdateSample.js @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update a DiscoveredAssetEndpointProfile + * + * @summary update a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAssetEndpointProfile.json + */ +async function updateDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssetEndpointProfiles.update( + "myResourceGroup", + "my-discoveredassetendpointprofile", + { + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + additionalConfiguration: '{"foo": "bar"}', + discoveryId: "11111111-1111-1111-1111-111111111111", + version: 73766, + endpointProfileType: "myEndpointProfileType", + supportedAuthenticationMethods: ["Anonymous", "Certificate"], + }, + }, + ); + console.log(result); +} + +async function main() { + updateDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsCreateOrReplaceSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsCreateOrReplaceSample.js new file mode 100644 index 000000000000..16093d8f9bd8 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsCreateOrReplaceSample.js @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a DiscoveredAsset + * + * @summary create a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAsset.json + */ +async function createDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssets.createOrReplace( + "myResourceGroup", + "my-discoveredasset", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + assetEndpointProfileRef: "myAssetEndpointProfile", + discoveryId: "11111111-1111-1111-1111-111111111111", + version: 73766, + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ + { + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + dataPointConfiguration: + '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + dataPointConfiguration: + '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], + }, + ], + events: [ + { + name: "event1", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, + }, + { + name: "event2", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + }, + ], + }, + }, + ); + console.log(result); +} + +async function main() { + createDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsDeleteSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsDeleteSample.js new file mode 100644 index 000000000000..64d3144d00f9 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a DiscoveredAsset + * + * @summary delete a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAsset.json + */ +async function deleteDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.discoveredAssets.delete("myResourceGroup", "my-discoveredasset"); +} + +async function main() { + deleteDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsGetSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsGetSample.js new file mode 100644 index 000000000000..fc36e5b5d9f5 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a DiscoveredAsset + * + * @summary get a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAsset.json + */ +async function getDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssets.get("myResourceGroup", "my-discoveredasset"); + console.log(result); +} + +async function main() { + getDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListByResourceGroupSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListByResourceGroupSample.js new file mode 100644 index 000000000000..caaac050dbef --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListByResourceGroupSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list DiscoveredAsset resources by resource group + * + * @summary list DiscoveredAsset resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_ResourceGroup.json + */ +async function listDiscoveredAssetsResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssets.listByResourceGroup("myResourceGroup")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetsResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListBySubscriptionSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListBySubscriptionSample.js new file mode 100644 index 000000000000..d33294eda4ef --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsListBySubscriptionSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list DiscoveredAsset resources by subscription ID + * + * @summary list DiscoveredAsset resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_Subscription.json + */ +async function listDiscoveredAssetsSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssets.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetsSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsUpdateSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsUpdateSample.js new file mode 100644 index 000000000000..9cee40089185 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/discoveredAssetsUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update a DiscoveredAsset + * + * @summary update a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAsset.json + */ +async function updateDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssets.update("myResourceGroup", "my-discoveredasset", { + properties: { + documentationUri: "https://www.example.com/manual-2", + defaultTopic: { path: "/path/defaultTopic", retain: "Never" }, + }, + }); + console.log(result); +} + +async function main() { + updateDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationStatusGetSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationStatusGetSample.js index cf6504429031..3a2b2b843b18 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationStatusGetSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationStatusGetSample.js @@ -1,36 +1,28 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Returns the current status of an async operation. + * This sample demonstrates how to returns the current status of an async operation. * - * @summary Returns the current status of an async operation. - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_OperationStatus.json + * @summary returns the current status of an async operation. + * x-ms-original-file: 2024-09-01-preview/Get_OperationStatus.json */ -async function getTheStatusOfAnAsyncOperation() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const location = "testLocation"; - const operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; +async function getOperationStatus() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); + const result = await client.operationStatus.get( + "testLocation", + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + ); console.log(result); } async function main() { - getTheStatusOfAnAsyncOperation(); + getOperationStatus(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationsListSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationsListSample.js index 1f8dd777d263..9b3177c792af 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationsListSample.js +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/operationsListSample.js @@ -1,37 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to List the operations for the provider + * This sample demonstrates how to list the operations for the provider * - * @summary List the operations for the provider - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Operations.json + * @summary list the operations for the provider + * x-ms-original-file: 2024-09-01-preview/List_Operations.json */ -async function returnsListOfOperations() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; +async function listOperations() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } async function main() { - returnsListOfOperations(); + listOperations(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/package.json b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/package.json index d863eaf7502a..e8c5480a8aa9 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/package.json +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/package.json @@ -2,7 +2,7 @@ "name": "@azure-samples/arm-deviceregistry-js-beta", "private": true, "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", + "description": "@azure/arm-deviceregistry client library samples for JavaScript (Beta)", "engines": { "node": ">=18.0.0" }, @@ -14,6 +14,7 @@ "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/sample.env b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/sample.env +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesCreateOrReplaceSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesCreateOrReplaceSample.js new file mode 100644 index 000000000000..c44a30117d8d --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesCreateOrReplaceSample.js @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a SchemaRegistry + * + * @summary create a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Create_SchemaRegistry.json + */ +async function createSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaRegistries.createOrReplace( + "myResourceGroup", + "my-schema-registry", + { + properties: { + namespace: "sr-namespace-001", + displayName: "Schema Registry namespace 001", + description: "This is a sample Schema Registry", + storageAccountContainerUrl: "my-blob-storage.blob.core.windows.net/my-container", + }, + tags: {}, + location: "West Europe", + identity: { type: "None" }, + }, + ); + console.log(result); +} + +async function main() { + createSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesDeleteSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesDeleteSample.js new file mode 100644 index 000000000000..13aaa83ad97f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a SchemaRegistry + * + * @summary delete a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Delete_SchemaRegistry.json + */ +async function deleteSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.schemaRegistries.delete("myResourceGroup", "my-schema-registry"); +} + +async function main() { + deleteSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesGetSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesGetSample.js new file mode 100644 index 000000000000..5979c48eecf1 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a SchemaRegistry + * + * @summary get a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Get_SchemaRegistry.json + */ +async function getSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaRegistries.get("myResourceGroup", "my-schema-registry"); + console.log(result); +} + +async function main() { + getSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListByResourceGroupSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListByResourceGroupSample.js new file mode 100644 index 000000000000..6e0aaf0caad9 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListByResourceGroupSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list SchemaRegistry resources by resource group + * + * @summary list SchemaRegistry resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_ResourceGroup.json + */ +async function listSchemaRegistriesResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemaRegistries.listByResourceGroup("myResourceGroup")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemaRegistriesResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListBySubscriptionSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListBySubscriptionSample.js new file mode 100644 index 000000000000..d03f9f223a68 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesListBySubscriptionSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list SchemaRegistry resources by subscription ID + * + * @summary list SchemaRegistry resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_Subscription.json + */ +async function listSchemaRegistriesSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemaRegistries.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemaRegistriesSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesUpdateSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesUpdateSample.js new file mode 100644 index 000000000000..db30bb882af1 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaRegistriesUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update a SchemaRegistry + * + * @summary update a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Update_SchemaRegistry.json + */ +async function updateSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaRegistries.update("myResourceGroup", "my-schema-registry", { + properties: { + displayName: "Schema Registry namespace 001", + description: "This is a sample Schema Registry", + }, + tags: {}, + }); + console.log(result); +} + +async function main() { + updateSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsCreateOrReplaceSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsCreateOrReplaceSample.js new file mode 100644 index 000000000000..032d3c093e77 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsCreateOrReplaceSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a SchemaVersion + * + * @summary create a SchemaVersion + * x-ms-original-file: 2024-09-01-preview/Create_SchemaVersion.json + */ +async function createSchemaVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaVersions.createOrReplace( + "myResourceGroup", + "my-schema-registry", + "my-schema", + "1", + { + properties: { + description: "Schema version 1", + schemaContent: + '{"$schema": "http://json-schema.org/draft-07/schema#","type": "object","properties": {"humidity": {"type": "string"},"temperature": {"type":"number"}}}', + }, + }, + ); + console.log(result); +} + +async function main() { + createSchemaVersion(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsDeleteSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsDeleteSample.js new file mode 100644 index 000000000000..e87630351b59 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a SchemaVersion + * + * @summary delete a SchemaVersion + * x-ms-original-file: 2024-09-01-preview/Delete_SchemaVersion.json + */ +async function deleteSchemaVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.schemaVersions.delete("myResourceGroup", "my-schema-registry", "my-schema", "1"); +} + +async function main() { + deleteSchemaVersion(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsGetSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsGetSample.js new file mode 100644 index 000000000000..91761d24c83f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a SchemaVersion + * + * @summary get a SchemaVersion + * x-ms-original-file: 2024-09-01-preview/Get_SchemaVersion.json + */ +async function getSchemaVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaVersions.get( + "myResourceGroup", + "my-schema-registry", + "my-schema", + "1", + ); + console.log(result); +} + +async function main() { + getSchemaVersion(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsListBySchemaSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsListBySchemaSample.js new file mode 100644 index 000000000000..79767d288be2 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemaVersionsListBySchemaSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list SchemaVersion resources by Schema + * + * @summary list SchemaVersion resources by Schema + * x-ms-original-file: 2024-09-01-preview/List_SchemaVersions_Schema.json + */ +async function listSchemaVersionsSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemaVersions.listBySchema( + "myResourceGroup", + "my-schema-registry", + "my-schema", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemaVersionsSchema(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasCreateOrReplaceSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasCreateOrReplaceSample.js new file mode 100644 index 000000000000..7763f32483fb --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasCreateOrReplaceSample.js @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a Schema + * + * @summary create a Schema + * x-ms-original-file: 2024-09-01-preview/Create_Schema.json + */ +async function createSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemas.createOrReplace( + "myResourceGroup", + "my-schema-registry", + "my-schema", + { + properties: { + displayName: "My Schema", + description: "This is a sample Schema", + format: "JsonSchema/draft-07", + schemaType: "MessageSchema", + tags: { sampleKey: "sampleValue" }, + }, + }, + ); + console.log(result); +} + +async function main() { + createSchema(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasDeleteSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasDeleteSample.js new file mode 100644 index 000000000000..5daefd70f31d --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a Schema + * + * @summary delete a Schema + * x-ms-original-file: 2024-09-01-preview/Delete_Schema.json + */ +async function deleteSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.schemas.delete("myResourceGroup", "my-schema-registry", "my-schema"); +} + +async function main() { + deleteSchema(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasGetSample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasGetSample.js new file mode 100644 index 000000000000..e4bdf2bcc5e5 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a Schema + * + * @summary get a Schema + * x-ms-original-file: 2024-09-01-preview/Get_Schema.json + */ +async function schemasGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemas.get("myResourceGroup", "my-schema-registry", "my-schema"); + console.log(result); +} + +async function main() { + schemasGet(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasListBySchemaRegistrySample.js b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasListBySchemaRegistrySample.js new file mode 100644 index 000000000000..a2e435a6aa8a --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/javascript/schemasListBySchemaRegistrySample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list Schema resources by SchemaRegistry + * + * @summary list Schema resources by SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/List_Schemas_SchemaRegistry.json + */ +async function listSchemasSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemas.listBySchemaRegistry( + "myResourceGroup", + "my-schema-registry", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemasSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/README.md b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/README.md index 4b3cf2b4ea77..2ce172c2d87a 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/README.md +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/README.md @@ -1,23 +1,51 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [assetEndpointProfilesCreateOrReplaceSample.ts][assetendpointprofilescreateorreplacesample] | Create a AssetEndpointProfile x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_AssetEndpointProfile.json | -| [assetEndpointProfilesDeleteSample.ts][assetendpointprofilesdeletesample] | Delete a AssetEndpointProfile x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_AssetEndpointProfile.json | -| [assetEndpointProfilesGetSample.ts][assetendpointprofilesgetsample] | Get a AssetEndpointProfile x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_AssetEndpointProfile.json | -| [assetEndpointProfilesListByResourceGroupSample.ts][assetendpointprofileslistbyresourcegroupsample] | List AssetEndpointProfile resources by resource group x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_ResourceGroup.json | -| [assetEndpointProfilesListBySubscriptionSample.ts][assetendpointprofileslistbysubscriptionsample] | List AssetEndpointProfile resources by subscription ID x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_Subscription.json | -| [assetEndpointProfilesUpdateSample.ts][assetendpointprofilesupdatesample] | Update a AssetEndpointProfile x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_AssetEndpointProfile.json | -| [assetsCreateOrReplaceSample.ts][assetscreateorreplacesample] | Create a Asset x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_With_ExternalAssetId.json | -| [assetsDeleteSample.ts][assetsdeletesample] | Delete a Asset x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_Asset.json | -| [assetsGetSample.ts][assetsgetsample] | Get a Asset x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_Asset.json | -| [assetsListByResourceGroupSample.ts][assetslistbyresourcegroupsample] | List Asset resources by resource group x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_ResourceGroup.json | -| [assetsListBySubscriptionSample.ts][assetslistbysubscriptionsample] | List Asset resources by subscription ID x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_Subscription.json | -| [assetsUpdateSample.ts][assetsupdatesample] | Update a Asset x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_Asset.json | -| [operationStatusGetSample.ts][operationstatusgetsample] | Returns the current status of an async operation. x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_OperationStatus.json | -| [operationsListSample.ts][operationslistsample] | List the operations for the provider x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Operations.json | +# @azure/arm-deviceregistry client library samples for TypeScript (Beta) + +These sample programs show how to use the TypeScript client libraries for @azure/arm-deviceregistry in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [assetEndpointProfilesCreateOrReplaceSample.ts][assetendpointprofilescreateorreplacesample] | create a AssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile.json | +| [assetEndpointProfilesDeleteSample.ts][assetendpointprofilesdeletesample] | delete a AssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Delete_AssetEndpointProfile.json | +| [assetEndpointProfilesGetSample.ts][assetendpointprofilesgetsample] | get a AssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile.json | +| [assetEndpointProfilesListByResourceGroupSample.ts][assetendpointprofileslistbyresourcegroupsample] | list AssetEndpointProfile resources by resource group x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_ResourceGroup.json | +| [assetEndpointProfilesListBySubscriptionSample.ts][assetendpointprofileslistbysubscriptionsample] | list AssetEndpointProfile resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_Subscription.json | +| [assetEndpointProfilesUpdateSample.ts][assetendpointprofilesupdatesample] | update a AssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Update_AssetEndpointProfile.json | +| [assetsCreateOrReplaceSample.ts][assetscreateorreplacesample] | create a Asset x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_DisplayName.json | +| [assetsDeleteSample.ts][assetsdeletesample] | delete a Asset x-ms-original-file: 2024-09-01-preview/Delete_Asset.json | +| [assetsGetSample.ts][assetsgetsample] | get a Asset x-ms-original-file: 2024-09-01-preview/Get_Asset.json | +| [assetsListByResourceGroupSample.ts][assetslistbyresourcegroupsample] | list Asset resources by resource group x-ms-original-file: 2024-09-01-preview/List_Assets_ResourceGroup.json | +| [assetsListBySubscriptionSample.ts][assetslistbysubscriptionsample] | list Asset resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_Assets_Subscription.json | +| [assetsUpdateSample.ts][assetsupdatesample] | update a Asset x-ms-original-file: 2024-09-01-preview/Update_Asset.json | +| [billingContainersGetSample.ts][billingcontainersgetsample] | get a BillingContainer x-ms-original-file: 2024-09-01-preview/Get_BillingContainer.json | +| [billingContainersListBySubscriptionSample.ts][billingcontainerslistbysubscriptionsample] | list BillingContainer resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_BillingContainers_Subscription.json | +| [discoveredAssetEndpointProfilesCreateOrReplaceSample.ts][discoveredassetendpointprofilescreateorreplacesample] | create a DiscoveredAssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAssetEndpointProfile.json | +| [discoveredAssetEndpointProfilesDeleteSample.ts][discoveredassetendpointprofilesdeletesample] | delete a DiscoveredAssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAssetEndpointProfile.json | +| [discoveredAssetEndpointProfilesGetSample.ts][discoveredassetendpointprofilesgetsample] | get a DiscoveredAssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAssetEndpointProfile.json | +| [discoveredAssetEndpointProfilesListByResourceGroupSample.ts][discoveredassetendpointprofileslistbyresourcegroupsample] | list DiscoveredAssetEndpointProfile resources by resource group x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_ResourceGroup.json | +| [discoveredAssetEndpointProfilesListBySubscriptionSample.ts][discoveredassetendpointprofileslistbysubscriptionsample] | list DiscoveredAssetEndpointProfile resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_Subscription.json | +| [discoveredAssetEndpointProfilesUpdateSample.ts][discoveredassetendpointprofilesupdatesample] | update a DiscoveredAssetEndpointProfile x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAssetEndpointProfile.json | +| [discoveredAssetsCreateOrReplaceSample.ts][discoveredassetscreateorreplacesample] | create a DiscoveredAsset x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAsset.json | +| [discoveredAssetsDeleteSample.ts][discoveredassetsdeletesample] | delete a DiscoveredAsset x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAsset.json | +| [discoveredAssetsGetSample.ts][discoveredassetsgetsample] | get a DiscoveredAsset x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAsset.json | +| [discoveredAssetsListByResourceGroupSample.ts][discoveredassetslistbyresourcegroupsample] | list DiscoveredAsset resources by resource group x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_ResourceGroup.json | +| [discoveredAssetsListBySubscriptionSample.ts][discoveredassetslistbysubscriptionsample] | list DiscoveredAsset resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_Subscription.json | +| [discoveredAssetsUpdateSample.ts][discoveredassetsupdatesample] | update a DiscoveredAsset x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAsset.json | +| [operationStatusGetSample.ts][operationstatusgetsample] | returns the current status of an async operation. x-ms-original-file: 2024-09-01-preview/Get_OperationStatus.json | +| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-09-01-preview/List_Operations.json | +| [schemaRegistriesCreateOrReplaceSample.ts][schemaregistriescreateorreplacesample] | create a SchemaRegistry x-ms-original-file: 2024-09-01-preview/Create_SchemaRegistry.json | +| [schemaRegistriesDeleteSample.ts][schemaregistriesdeletesample] | delete a SchemaRegistry x-ms-original-file: 2024-09-01-preview/Delete_SchemaRegistry.json | +| [schemaRegistriesGetSample.ts][schemaregistriesgetsample] | get a SchemaRegistry x-ms-original-file: 2024-09-01-preview/Get_SchemaRegistry.json | +| [schemaRegistriesListByResourceGroupSample.ts][schemaregistrieslistbyresourcegroupsample] | list SchemaRegistry resources by resource group x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_ResourceGroup.json | +| [schemaRegistriesListBySubscriptionSample.ts][schemaregistrieslistbysubscriptionsample] | list SchemaRegistry resources by subscription ID x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_Subscription.json | +| [schemaRegistriesUpdateSample.ts][schemaregistriesupdatesample] | update a SchemaRegistry x-ms-original-file: 2024-09-01-preview/Update_SchemaRegistry.json | +| [schemaVersionsCreateOrReplaceSample.ts][schemaversionscreateorreplacesample] | create a SchemaVersion x-ms-original-file: 2024-09-01-preview/Create_SchemaVersion.json | +| [schemaVersionsDeleteSample.ts][schemaversionsdeletesample] | delete a SchemaVersion x-ms-original-file: 2024-09-01-preview/Delete_SchemaVersion.json | +| [schemaVersionsGetSample.ts][schemaversionsgetsample] | get a SchemaVersion x-ms-original-file: 2024-09-01-preview/Get_SchemaVersion.json | +| [schemaVersionsListBySchemaSample.ts][schemaversionslistbyschemasample] | list SchemaVersion resources by Schema x-ms-original-file: 2024-09-01-preview/List_SchemaVersions_Schema.json | +| [schemasCreateOrReplaceSample.ts][schemascreateorreplacesample] | create a Schema x-ms-original-file: 2024-09-01-preview/Create_Schema.json | +| [schemasDeleteSample.ts][schemasdeletesample] | delete a Schema x-ms-original-file: 2024-09-01-preview/Delete_Schema.json | +| [schemasGetSample.ts][schemasgetsample] | get a Schema x-ms-original-file: 2024-09-01-preview/Get_Schema.json | +| [schemasListBySchemaRegistrySample.ts][schemaslistbyschemaregistrysample] | list Schema resources by SchemaRegistry x-ms-original-file: 2024-09-01-preview/List_Schemas_SchemaRegistry.json | ## Prerequisites @@ -62,7 +90,7 @@ node dist/assetEndpointProfilesCreateOrReplaceSample.js Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx dev-tool run vendored cross-env DEVICEREGISTRY_SUBSCRIPTION_ID="" DEVICEREGISTRY_RESOURCE_GROUP="" node dist/assetEndpointProfilesCreateOrReplaceSample.js +npx dev-tool run vendored cross-env node dist/assetEndpointProfilesCreateOrReplaceSample.js ``` ## Next Steps @@ -81,8 +109,36 @@ Take a look at our [API Documentation][apiref] for more information about the AP [assetslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListByResourceGroupSample.ts [assetslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListBySubscriptionSample.ts [assetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsUpdateSample.ts +[billingcontainersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersGetSample.ts +[billingcontainerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersListBySubscriptionSample.ts +[discoveredassetendpointprofilescreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesCreateOrReplaceSample.ts +[discoveredassetendpointprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesDeleteSample.ts +[discoveredassetendpointprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesGetSample.ts +[discoveredassetendpointprofileslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListByResourceGroupSample.ts +[discoveredassetendpointprofileslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListBySubscriptionSample.ts +[discoveredassetendpointprofilesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesUpdateSample.ts +[discoveredassetscreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsCreateOrReplaceSample.ts +[discoveredassetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsDeleteSample.ts +[discoveredassetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsGetSample.ts +[discoveredassetslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListByResourceGroupSample.ts +[discoveredassetslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListBySubscriptionSample.ts +[discoveredassetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsUpdateSample.ts [operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationStatusGetSample.ts [operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationsListSample.ts +[schemaregistriescreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesCreateOrReplaceSample.ts +[schemaregistriesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesDeleteSample.ts +[schemaregistriesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesGetSample.ts +[schemaregistrieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListByResourceGroupSample.ts +[schemaregistrieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListBySubscriptionSample.ts +[schemaregistriesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesUpdateSample.ts +[schemaversionscreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsCreateOrReplaceSample.ts +[schemaversionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsDeleteSample.ts +[schemaversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsGetSample.ts +[schemaversionslistbyschemasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsListBySchemaSample.ts +[schemascreateorreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasCreateOrReplaceSample.ts +[schemasdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasDeleteSample.ts +[schemasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasGetSample.ts +[schemaslistbyschemaregistrysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasListBySchemaRegistrySample.ts [apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-deviceregistry?view=azure-node-preview [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deviceregistry/arm-deviceregistry/README.md diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/package.json b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/package.json index 5b4de3351c5a..c0f6b5eb574a 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/package.json +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/package.json @@ -2,7 +2,7 @@ "name": "@azure-samples/arm-deviceregistry-ts-beta", "private": true, "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", + "description": "@azure/arm-deviceregistry client library samples for TypeScript (Beta)", "engines": { "node": ">=18.0.0" }, @@ -18,6 +18,7 @@ "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/sample.env b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/sample.env +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesCreateOrReplaceSample.ts index 1197ba9e9f47..e227fded3b47 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesCreateOrReplaceSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesCreateOrReplaceSample.ts @@ -1,59 +1,73 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - AssetEndpointProfile, - DeviceRegistryManagementClient, -} from "@azure/arm-deviceregistry"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Create a AssetEndpointProfile + * This sample demonstrates how to create a AssetEndpointProfile * - * @summary Create a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_AssetEndpointProfile.json + * @summary create a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile.json */ -async function createAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; - const resource: AssetEndpointProfile = { - extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", - type: "CustomLocation", - }, - location: "West Europe", - properties: { - targetAddress: "https://www.example.com/myTargetAddress", - userAuthentication: { mode: "Anonymous" }, +async function createAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assetEndpointProfiles.createOrReplace( + "myResourceGroup", + "my-assetendpointprofile", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + endpointProfileType: "myEndpointProfileType", + authentication: { method: "Anonymous" }, + }, }, - tags: { site: "building-1" }, - }; + ); + console.log(result); +} + +/** + * This sample demonstrates how to create a AssetEndpointProfile + * + * @summary create a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile_With_DiscoveredAepRef.json + */ +async function createAssetEndpointProfileWithDiscoveredAepRef() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assetEndpointProfiles.beginCreateOrReplaceAndWait( - resourceGroupName, - assetEndpointProfileName, - resource, + const result = await client.assetEndpointProfiles.createOrReplace( + "myResourceGroup", + "my-assetendpointprofile", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + endpointProfileType: "myEndpointProfileType", + discoveredAssetEndpointProfileRef: "discoveredAssetEndpointProfile1", + authentication: { method: "Anonymous" }, + }, + }, ); console.log(result); } async function main() { - createAnAssetEndpointProfile(); + createAssetEndpointProfile(); + createAssetEndpointProfileWithDiscoveredAepRef(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesDeleteSample.ts index 3f2ea9fa342a..ede7746b3e31 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesDeleteSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesDeleteSample.ts @@ -1,43 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to Delete a AssetEndpointProfile + * This sample demonstrates how to delete a AssetEndpointProfile * - * @summary Delete a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_AssetEndpointProfile.json + * @summary delete a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Delete_AssetEndpointProfile.json */ -async function deleteAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; +async function deleteAssetEndpointProfile() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assetEndpointProfiles.beginDeleteAndWait( - resourceGroupName, - assetEndpointProfileName, - ); - console.log(result); + await client.assetEndpointProfiles.delete("myResourceGroup", "my-assetendpointprofile"); } async function main() { - deleteAnAssetEndpointProfile(); + deleteAssetEndpointProfile(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesGetSample.ts index 407685d90fab..9482215dc4c3 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesGetSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesGetSample.ts @@ -1,43 +1,46 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +/** + * This sample demonstrates how to get a AssetEndpointProfile + * + * @summary get a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile.json + */ +async function getAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assetEndpointProfiles.get( + "myResourceGroup", + "my-assetendpointprofile", + ); + console.log(result); +} /** - * This sample demonstrates how to Get a AssetEndpointProfile + * This sample demonstrates how to get a AssetEndpointProfile * - * @summary Get a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_AssetEndpointProfile.json + * @summary get a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile_With_SyncStatus.json */ -async function getAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; +async function getAssetEndpointProfileWithSyncStatus() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const result = await client.assetEndpointProfiles.get( - resourceGroupName, - assetEndpointProfileName, + "myResourceGroup", + "my-assetendpointprofile", ); console.log(result); } async function main() { - getAnAssetEndpointProfile(); + getAssetEndpointProfile(); + getAssetEndpointProfileWithSyncStatus(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesListByResourceGroupSample.ts index 14413102b08f..2230794efd42 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesListByResourceGroupSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesListByResourceGroupSample.ts @@ -1,44 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List AssetEndpointProfile resources by resource group + * This sample demonstrates how to list AssetEndpointProfile resources by resource group * - * @summary List AssetEndpointProfile resources by resource group - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_ResourceGroup.json + * @summary list AssetEndpointProfile resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_ResourceGroup.json */ -async function listAssetEndpointProfilesInAResourceGroup() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; +async function listAssetEndpointProfilesResourceGroup() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.assetEndpointProfiles.listByResourceGroup( - resourceGroupName, - )) { + for await (let item of client.assetEndpointProfiles.listByResourceGroup("myResourceGroup")) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetEndpointProfilesInAResourceGroup(); + listAssetEndpointProfilesResourceGroup(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesListBySubscriptionSample.ts index 83e5236f301a..00f8a5204e2d 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesListBySubscriptionSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesListBySubscriptionSample.ts @@ -1,40 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List AssetEndpointProfile resources by subscription ID + * This sample demonstrates how to list AssetEndpointProfile resources by subscription ID * - * @summary List AssetEndpointProfile resources by subscription ID - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_AssetEndpointProfiles_Subscription.json + * @summary list AssetEndpointProfile resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_Subscription.json */ -async function listAssetEndpointProfilesInASubscription() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; +async function listAssetEndpointProfilesSubscription() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.assetEndpointProfiles.listBySubscription()) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetEndpointProfilesInASubscription(); + listAssetEndpointProfilesSubscription(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesUpdateSample.ts index 409b09e06b37..eac50c7e76c5 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesUpdateSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetEndpointProfilesUpdateSample.ts @@ -1,50 +1,31 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - AssetEndpointProfileUpdate, - DeviceRegistryManagementClient, -} from "@azure/arm-deviceregistry"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Update a AssetEndpointProfile + * This sample demonstrates how to update a AssetEndpointProfile * - * @summary Update a AssetEndpointProfile - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_AssetEndpointProfile.json + * @summary update a AssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Update_AssetEndpointProfile.json */ -async function patchAnAssetEndpointProfile() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetEndpointProfileName = "my-assetendpointprofile"; - const properties: AssetEndpointProfileUpdate = { - properties: { targetAddress: "https://www.example.com/myTargetAddress" }, - }; +async function updateAssetEndpointProfile() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assetEndpointProfiles.beginUpdateAndWait( - resourceGroupName, - assetEndpointProfileName, - properties, + const result = await client.assetEndpointProfiles.update( + "myResourceGroup", + "my-assetendpointprofile", + { + properties: { targetAddress: "https://www.example.com/myTargetAddress" }, + }, ); console.log(result); } async function main() { - patchAnAssetEndpointProfile(); + updateAssetEndpointProfile(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsCreateOrReplaceSample.ts index 407f10ef31a8..92c1be902948 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsCreateOrReplaceSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsCreateOrReplaceSample.ts @@ -1,273 +1,317 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - Asset, - DeviceRegistryManagementClient, -} from "@azure/arm-deviceregistry"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Create a Asset + * This sample demonstrates how to create a Asset * - * @summary Create a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_With_ExternalAssetId.json + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_DisplayName.json */ -async function createAnAssetWithExternalAssetId() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const resource: Asset = { +async function createAssetWithoutDisplayName() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", }, - location: "West Europe", + tags: { site: "building-1" }, properties: { + enabled: true, + externalAssetId: "8ZBA6LRHU0A458969", description: "This is a sample Asset", - assetEndpointProfileUri: "https://www.example.com/myAssetEndpointProfile", - assetType: "MyAssetType", - dataPoints: [ - { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - dataPointConfiguration: - '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", - observabilityMode: "counter", - }, + assetEndpointProfileRef: "myAssetEndpointProfile", + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - dataPointConfiguration: - '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", - observabilityMode: "none", + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], }, ], - defaultDataPointsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - defaultEventsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - displayName: "AssetDisplayName", - documentationUri: "https://www.example.com/manual", - enabled: true, events: [ { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + name: "event1", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", - observabilityMode: "none", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, }, { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + name: "event2", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", - observabilityMode: "log", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', }, ], - externalAssetId: "8ZBA6LRHU0A458969", - hardwareRevision: "1.0", - manufacturer: "Contoso", - manufacturerUri: "https://www.contoso.com/manufacturerUri", - model: "ContosoModel", - productCode: "SA34VDG", - serialNumber: "64-103816-519918-8", - softwareRevision: "2.0", }, - tags: { site: "building-1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginCreateOrReplaceAndWait( - resourceGroupName, - assetName, - resource, - ); + }); console.log(result); } /** - * This sample demonstrates how to Create a Asset + * This sample demonstrates how to create a Asset * - * @summary Create a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_Without_DisplayName.json + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_ExternalAssetId.json */ -async function createAnAssetWithoutDisplayName() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const resource: Asset = { +async function createAssetWithoutExternalAssetId() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", }, - location: "West Europe", + tags: { site: "building-1" }, properties: { + enabled: true, + displayName: "AssetDisplayName", description: "This is a sample Asset", - assetEndpointProfileUri: "https://www.example.com/myAssetEndpointProfile", - assetType: "MyAssetType", - dataPoints: [ - { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - dataPointConfiguration: - '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", - observabilityMode: "counter", - }, + assetEndpointProfileRef: "myAssetEndpointProfile", + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - dataPointConfiguration: - '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", - observabilityMode: "none", + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], }, ], - defaultDataPointsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - defaultEventsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - documentationUri: "https://www.example.com/manual", - enabled: true, events: [ { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + name: "event1", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", - observabilityMode: "none", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, }, { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + name: "event2", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", - observabilityMode: "log", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', }, ], + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to create a Asset + * + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_With_DiscoveredAssetRef.json + */ +async function createAssetWithDiscoveredAssetRefs() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + enabled: true, externalAssetId: "8ZBA6LRHU0A458969", - hardwareRevision: "1.0", + displayName: "AssetDisplayName", + description: "This is a sample Asset", + assetEndpointProfileRef: "myAssetEndpointProfile", manufacturer: "Contoso", manufacturerUri: "https://www.contoso.com/manufacturerUri", model: "ContosoModel", productCode: "SA34VDG", - serialNumber: "64-103816-519918-8", + hardwareRevision: "1.0", softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + discoveredAssetRefs: ["discoveredAsset1", "discoveredAsset2"], + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ + { + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], + }, + ], + events: [ + { + name: "event1", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, + }, + { + name: "event2", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + }, + ], }, - tags: { site: "building-1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginCreateOrReplaceAndWait( - resourceGroupName, - assetName, - resource, - ); + }); console.log(result); } /** - * This sample demonstrates how to Create a Asset + * This sample demonstrates how to create a Asset * - * @summary Create a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Create_Asset_Without_ExternalAssetId.json + * @summary create a Asset + * x-ms-original-file: 2024-09-01-preview/Create_Asset_With_ExternalAssetId.json */ -async function createAnAssetWithoutExternalAssetId() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const resource: Asset = { +async function createAssetWithExternalAssetId() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.assets.createOrReplace("myResourceGroup", "my-asset", { + location: "West Europe", extendedLocation: { - name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", }, - location: "West Europe", + tags: { site: "building-1" }, properties: { + enabled: true, + externalAssetId: "8ZBA6LRHU0A458969", + displayName: "AssetDisplayName", description: "This is a sample Asset", - assetEndpointProfileUri: "https://www.example.com/myAssetEndpointProfile", - assetType: "MyAssetType", - dataPoints: [ - { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - dataPointConfiguration: - '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", - observabilityMode: "counter", - }, + assetEndpointProfileRef: "myAssetEndpointProfile", + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - dataPointConfiguration: - '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', - dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", - observabilityMode: "none", + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + observabilityMode: "Counter", + dataPointConfiguration: '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + observabilityMode: "None", + dataPointConfiguration: '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], }, ], - defaultDataPointsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - defaultEventsConfiguration: - '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', - displayName: "AssetDisplayName", - documentationUri: "https://www.example.com/manual", - enabled: true, events: [ { - capabilityId: "dtmi:com:example:Thermostat:__temperature;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + name: "event1", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", - observabilityMode: "none", + observabilityMode: "None", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, }, { - capabilityId: "dtmi:com:example:Thermostat:__pressure;1", - eventConfiguration: - '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + name: "event2", eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", - observabilityMode: "log", + observabilityMode: "Log", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', }, ], - hardwareRevision: "1.0", - manufacturer: "Contoso", - manufacturerUri: "https://www.contoso.com/manufacturerUri", - model: "ContosoModel", - productCode: "SA34VDG", - serialNumber: "64-103816-519918-8", - softwareRevision: "2.0", }, - tags: { site: "building-1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginCreateOrReplaceAndWait( - resourceGroupName, - assetName, - resource, - ); + }); console.log(result); } async function main() { - createAnAssetWithExternalAssetId(); - createAnAssetWithoutDisplayName(); - createAnAssetWithoutExternalAssetId(); + createAssetWithoutDisplayName(); + createAssetWithoutExternalAssetId(); + createAssetWithDiscoveredAssetRefs(); + createAssetWithExternalAssetId(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsDeleteSample.ts index 0d62e48d59bb..f302477cced6 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsDeleteSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsDeleteSample.ts @@ -1,43 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to Delete a Asset + * This sample demonstrates how to delete a Asset * - * @summary Delete a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Delete_Asset.json + * @summary delete a Asset + * x-ms-original-file: 2024-09-01-preview/Delete_Asset.json */ -async function deleteAnAsset() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; +async function deleteAsset() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginDeleteAndWait( - resourceGroupName, - assetName, - ); - console.log(result); + await client.assets.delete("myResourceGroup", "my-asset"); } async function main() { - deleteAnAsset(); + deleteAsset(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsGetSample.ts index c341d40c0391..c685134701e6 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsGetSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsGetSample.ts @@ -1,60 +1,40 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to Get a Asset + * This sample demonstrates how to get a Asset * - * @summary Get a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_Asset.json + * @summary get a Asset + * x-ms-original-file: 2024-09-01-preview/Get_Asset.json */ -async function getAnAsset() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; +async function getAsset() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.get(resourceGroupName, assetName); + const result = await client.assets.get("myResourceGroup", "my-asset"); console.log(result); } /** - * This sample demonstrates how to Get a Asset + * This sample demonstrates how to get a Asset * - * @summary Get a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_Asset_With_SyncStatus.json + * @summary get a Asset + * x-ms-original-file: 2024-09-01-preview/Get_Asset_With_SyncStatus.json */ -async function getAnAssetWithSyncStatus() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; +async function getAssetWithSyncStatus() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.get(resourceGroupName, assetName); + const result = await client.assets.get("myResourceGroup", "my-asset"); console.log(result); } async function main() { - getAnAsset(); - getAnAssetWithSyncStatus(); + getAsset(); + getAssetWithSyncStatus(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListByResourceGroupSample.ts index 8d358c701a19..9d566ed9eab1 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListByResourceGroupSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListByResourceGroupSample.ts @@ -1,42 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List Asset resources by resource group + * This sample demonstrates how to list Asset resources by resource group * - * @summary List Asset resources by resource group - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_ResourceGroup.json + * @summary list Asset resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_Assets_ResourceGroup.json */ -async function listAssetsInAResourceGroup() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; +async function listAssetsResourceGroup() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.assets.listByResourceGroup(resourceGroupName)) { + for await (let item of client.assets.listByResourceGroup("myResourceGroup")) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetsInAResourceGroup(); + listAssetsResourceGroup(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListBySubscriptionSample.ts index 078c4c0cbcf7..75b639ef299e 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListBySubscriptionSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsListBySubscriptionSample.ts @@ -1,40 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List Asset resources by subscription ID + * This sample demonstrates how to list Asset resources by subscription ID * - * @summary List Asset resources by subscription ID - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Assets_Subscription.json + * @summary list Asset resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_Assets_Subscription.json */ -async function listAssetsInASubscription() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; +async function listAssetsSubscription() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.assets.listBySubscription()) { resArray.push(item); } + console.log(resArray); } async function main() { - listAssetsInASubscription(); + listAssetsSubscription(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsUpdateSample.ts index 9a752eec406e..4ef904672419 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsUpdateSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/assetsUpdateSample.ts @@ -1,50 +1,27 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - AssetUpdate, - DeviceRegistryManagementClient, -} from "@azure/arm-deviceregistry"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Update a Asset + * This sample demonstrates how to update a Asset * - * @summary Update a Asset - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Update_Asset.json + * @summary update a Asset + * x-ms-original-file: 2024-09-01-preview/Update_Asset.json */ -async function patchAnAsset() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["DEVICEREGISTRY_RESOURCE_GROUP"] || "myResourceGroup"; - const assetName = "my-asset"; - const properties: AssetUpdate = { - properties: { displayName: "NewAssetDisplayName", enabled: false }, - }; +async function updateAsset() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.assets.beginUpdateAndWait( - resourceGroupName, - assetName, - properties, - ); + const result = await client.assets.update("myResourceGroup", "my-asset", { + properties: { enabled: false, displayName: "NewAssetDisplayName" }, + }); console.log(result); } async function main() { - patchAnAsset(); + updateAsset(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersGetSample.ts new file mode 100644 index 000000000000..efe39790bb6f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a BillingContainer + * + * @summary get a BillingContainer + * x-ms-original-file: 2024-09-01-preview/Get_BillingContainer.json + */ +async function getBillingContainer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.billingContainers.get("my-billingContainer"); + console.log(result); +} + +async function main() { + getBillingContainer(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersListBySubscriptionSample.ts new file mode 100644 index 000000000000..1d4acb1d43d2 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/billingContainersListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list BillingContainer resources by subscription ID + * + * @summary list BillingContainer resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_BillingContainers_Subscription.json + */ +async function listBillingContainersSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.billingContainers.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listBillingContainersSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesCreateOrReplaceSample.ts new file mode 100644 index 000000000000..5bbe2710dd6f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesCreateOrReplaceSample.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a DiscoveredAssetEndpointProfile + * + * @summary create a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAssetEndpointProfile.json + */ +async function createDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssetEndpointProfiles.createOrReplace( + "myResourceGroup", + "my-discoveredassetendpointprofile", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + additionalConfiguration: '{"foo": "bar"}', + discoveryId: "11111111-1111-1111-1111-111111111111", + version: 73766, + endpointProfileType: "myEndpointProfileType", + supportedAuthenticationMethods: ["Anonymous", "Certificate", "UsernamePassword"], + }, + }, + ); + console.log(result); +} + +async function main() { + createDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesDeleteSample.ts new file mode 100644 index 000000000000..c10a87be60fe --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesDeleteSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a DiscoveredAssetEndpointProfile + * + * @summary delete a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAssetEndpointProfile.json + */ +async function deleteDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.discoveredAssetEndpointProfiles.delete( + "myResourceGroup", + "my-discoveredassetendpointprofile", + ); +} + +async function main() { + deleteDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesGetSample.ts new file mode 100644 index 000000000000..6d661f7023d4 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesGetSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a DiscoveredAssetEndpointProfile + * + * @summary get a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAssetEndpointProfile.json + */ +async function getDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssetEndpointProfiles.get( + "myResourceGroup", + "my-discoveredassetendpointprofile", + ); + console.log(result); +} + +async function main() { + getDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListByResourceGroupSample.ts new file mode 100644 index 000000000000..3d9ad21b61d3 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListByResourceGroupSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list DiscoveredAssetEndpointProfile resources by resource group + * + * @summary list DiscoveredAssetEndpointProfile resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_ResourceGroup.json + */ +async function listDiscoveredAssetEndpointProfilesResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssetEndpointProfiles.listByResourceGroup( + "myResourceGroup", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetEndpointProfilesResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListBySubscriptionSample.ts new file mode 100644 index 000000000000..623bbae63b2f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list DiscoveredAssetEndpointProfile resources by subscription ID + * + * @summary list DiscoveredAssetEndpointProfile resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_Subscription.json + */ +async function listDiscoveredAssetEndpointProfilesSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssetEndpointProfiles.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetEndpointProfilesSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesUpdateSample.ts new file mode 100644 index 000000000000..2a4301998470 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetEndpointProfilesUpdateSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a DiscoveredAssetEndpointProfile + * + * @summary update a DiscoveredAssetEndpointProfile + * x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAssetEndpointProfile.json + */ +async function updateDiscoveredAssetEndpointProfile() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssetEndpointProfiles.update( + "myResourceGroup", + "my-discoveredassetendpointprofile", + { + properties: { + targetAddress: "https://www.example.com/myTargetAddress", + additionalConfiguration: '{"foo": "bar"}', + discoveryId: "11111111-1111-1111-1111-111111111111", + version: 73766, + endpointProfileType: "myEndpointProfileType", + supportedAuthenticationMethods: ["Anonymous", "Certificate"], + }, + }, + ); + console.log(result); +} + +async function main() { + updateDiscoveredAssetEndpointProfile(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsCreateOrReplaceSample.ts new file mode 100644 index 000000000000..708945264822 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsCreateOrReplaceSample.ts @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a DiscoveredAsset + * + * @summary create a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAsset.json + */ +async function createDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssets.createOrReplace( + "myResourceGroup", + "my-discoveredasset", + { + location: "West Europe", + extendedLocation: { + type: "CustomLocation", + name: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1", + }, + tags: { site: "building-1" }, + properties: { + assetEndpointProfileRef: "myAssetEndpointProfile", + discoveryId: "11111111-1111-1111-1111-111111111111", + version: 73766, + manufacturer: "Contoso", + manufacturerUri: "https://www.contoso.com/manufacturerUri", + model: "ContosoModel", + productCode: "SA34VDG", + hardwareRevision: "1.0", + softwareRevision: "2.0", + documentationUri: "https://www.example.com/manual", + serialNumber: "64-103816-519918-8", + defaultDatasetsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultEventsConfiguration: + '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + defaultTopic: { path: "/path/defaultTopic", retain: "Keep" }, + datasets: [ + { + name: "dataset1", + datasetConfiguration: '{"publishingInterval":10,"samplingInterval":15,"queueSize":20}', + topic: { path: "/path/dataset1", retain: "Keep" }, + dataPoints: [ + { + name: "dataPoint1", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1", + dataPointConfiguration: + '{"publishingInterval":8,"samplingInterval":8,"queueSize":4}', + }, + { + name: "dataPoint2", + dataSource: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2", + dataPointConfiguration: + '{"publishingInterval":4,"samplingInterval":4,"queueSize":7}', + }, + ], + }, + ], + events: [ + { + name: "event1", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":1,"queueSize":8}', + topic: { path: "/path/event1", retain: "Keep" }, + }, + { + name: "event2", + eventNotifier: "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4", + eventConfiguration: '{"publishingInterval":7,"samplingInterval":8,"queueSize":4}', + }, + ], + }, + }, + ); + console.log(result); +} + +async function main() { + createDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsDeleteSample.ts new file mode 100644 index 000000000000..0846c4ee1563 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a DiscoveredAsset + * + * @summary delete a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAsset.json + */ +async function deleteDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.discoveredAssets.delete("myResourceGroup", "my-discoveredasset"); +} + +async function main() { + deleteDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsGetSample.ts new file mode 100644 index 000000000000..8d4d09baca68 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a DiscoveredAsset + * + * @summary get a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAsset.json + */ +async function getDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssets.get("myResourceGroup", "my-discoveredasset"); + console.log(result); +} + +async function main() { + getDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListByResourceGroupSample.ts new file mode 100644 index 000000000000..89afb36c8dbd --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list DiscoveredAsset resources by resource group + * + * @summary list DiscoveredAsset resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_ResourceGroup.json + */ +async function listDiscoveredAssetsResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssets.listByResourceGroup("myResourceGroup")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetsResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListBySubscriptionSample.ts new file mode 100644 index 000000000000..e0e20846efa9 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list DiscoveredAsset resources by subscription ID + * + * @summary list DiscoveredAsset resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_Subscription.json + */ +async function listDiscoveredAssetsSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.discoveredAssets.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listDiscoveredAssetsSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsUpdateSample.ts new file mode 100644 index 000000000000..74ff2a691925 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/discoveredAssetsUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a DiscoveredAsset + * + * @summary update a DiscoveredAsset + * x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAsset.json + */ +async function updateDiscoveredAsset() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.discoveredAssets.update("myResourceGroup", "my-discoveredasset", { + properties: { + documentationUri: "https://www.example.com/manual-2", + defaultTopic: { path: "/path/defaultTopic", retain: "Never" }, + }, + }); + console.log(result); +} + +async function main() { + updateDiscoveredAsset(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationStatusGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationStatusGetSample.ts index c862e9c73e4c..c04f619a8821 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationStatusGetSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationStatusGetSample.ts @@ -1,39 +1,28 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to Returns the current status of an async operation. + * This sample demonstrates how to returns the current status of an async operation. * - * @summary Returns the current status of an async operation. - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/Get_OperationStatus.json + * @summary returns the current status of an async operation. + * x-ms-original-file: 2024-09-01-preview/Get_OperationStatus.json */ -async function getTheStatusOfAnAsyncOperation() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "testLocation"; - const operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; +async function getOperationStatus() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); + const result = await client.operationStatus.get( + "testLocation", + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + ); console.log(result); } async function main() { - getTheStatusOfAnAsyncOperation(); + getOperationStatus(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationsListSample.ts index 9c360acf4650..6bc18411adcb 100644 --- a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/operationsListSample.ts @@ -1,40 +1,29 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); /** - * This sample demonstrates how to List the operations for the provider + * This sample demonstrates how to list the operations for the provider * - * @summary List the operations for the provider - * x-ms-original-file: specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/preview/2023-11-01-preview/examples/List_Operations.json + * @summary list the operations for the provider + * x-ms-original-file: 2024-09-01-preview/List_Operations.json */ -async function returnsListOfOperations() { - const subscriptionId = - process.env["DEVICEREGISTRY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; +async function listOperations() { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; const client = new DeviceRegistryManagementClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } async function main() { - returnsListOfOperations(); + listOperations(); } main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesCreateOrReplaceSample.ts new file mode 100644 index 000000000000..3bd30a5556da --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesCreateOrReplaceSample.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a SchemaRegistry + * + * @summary create a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Create_SchemaRegistry.json + */ +async function createSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaRegistries.createOrReplace( + "myResourceGroup", + "my-schema-registry", + { + properties: { + namespace: "sr-namespace-001", + displayName: "Schema Registry namespace 001", + description: "This is a sample Schema Registry", + storageAccountContainerUrl: "my-blob-storage.blob.core.windows.net/my-container", + }, + tags: {}, + location: "West Europe", + identity: { type: "None" }, + }, + ); + console.log(result); +} + +async function main() { + createSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesDeleteSample.ts new file mode 100644 index 000000000000..a1d15652899a --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a SchemaRegistry + * + * @summary delete a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Delete_SchemaRegistry.json + */ +async function deleteSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.schemaRegistries.delete("myResourceGroup", "my-schema-registry"); +} + +async function main() { + deleteSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesGetSample.ts new file mode 100644 index 000000000000..b9c5229b78f4 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a SchemaRegistry + * + * @summary get a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Get_SchemaRegistry.json + */ +async function getSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaRegistries.get("myResourceGroup", "my-schema-registry"); + console.log(result); +} + +async function main() { + getSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListByResourceGroupSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListByResourceGroupSample.ts new file mode 100644 index 000000000000..b2d9091a84f5 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list SchemaRegistry resources by resource group + * + * @summary list SchemaRegistry resources by resource group + * x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_ResourceGroup.json + */ +async function listSchemaRegistriesResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemaRegistries.listByResourceGroup("myResourceGroup")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemaRegistriesResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListBySubscriptionSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListBySubscriptionSample.ts new file mode 100644 index 000000000000..184ad0890610 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list SchemaRegistry resources by subscription ID + * + * @summary list SchemaRegistry resources by subscription ID + * x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_Subscription.json + */ +async function listSchemaRegistriesSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemaRegistries.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemaRegistriesSubscription(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesUpdateSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesUpdateSample.ts new file mode 100644 index 000000000000..5b337962de49 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaRegistriesUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a SchemaRegistry + * + * @summary update a SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/Update_SchemaRegistry.json + */ +async function updateSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaRegistries.update("myResourceGroup", "my-schema-registry", { + properties: { + displayName: "Schema Registry namespace 001", + description: "This is a sample Schema Registry", + }, + tags: {}, + }); + console.log(result); +} + +async function main() { + updateSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsCreateOrReplaceSample.ts new file mode 100644 index 000000000000..756eb65ac8b2 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsCreateOrReplaceSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a SchemaVersion + * + * @summary create a SchemaVersion + * x-ms-original-file: 2024-09-01-preview/Create_SchemaVersion.json + */ +async function createSchemaVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaVersions.createOrReplace( + "myResourceGroup", + "my-schema-registry", + "my-schema", + "1", + { + properties: { + description: "Schema version 1", + schemaContent: + '{"$schema": "http://json-schema.org/draft-07/schema#","type": "object","properties": {"humidity": {"type": "string"},"temperature": {"type":"number"}}}', + }, + }, + ); + console.log(result); +} + +async function main() { + createSchemaVersion(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsDeleteSample.ts new file mode 100644 index 000000000000..7a9b8f4e750f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a SchemaVersion + * + * @summary delete a SchemaVersion + * x-ms-original-file: 2024-09-01-preview/Delete_SchemaVersion.json + */ +async function deleteSchemaVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.schemaVersions.delete("myResourceGroup", "my-schema-registry", "my-schema", "1"); +} + +async function main() { + deleteSchemaVersion(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsGetSample.ts new file mode 100644 index 000000000000..e923b34c9dd9 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a SchemaVersion + * + * @summary get a SchemaVersion + * x-ms-original-file: 2024-09-01-preview/Get_SchemaVersion.json + */ +async function getSchemaVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemaVersions.get( + "myResourceGroup", + "my-schema-registry", + "my-schema", + "1", + ); + console.log(result); +} + +async function main() { + getSchemaVersion(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsListBySchemaSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsListBySchemaSample.ts new file mode 100644 index 000000000000..fcf3833e595f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemaVersionsListBySchemaSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list SchemaVersion resources by Schema + * + * @summary list SchemaVersion resources by Schema + * x-ms-original-file: 2024-09-01-preview/List_SchemaVersions_Schema.json + */ +async function listSchemaVersionsSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemaVersions.listBySchema( + "myResourceGroup", + "my-schema-registry", + "my-schema", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemaVersionsSchema(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasCreateOrReplaceSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasCreateOrReplaceSample.ts new file mode 100644 index 000000000000..10c843389179 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasCreateOrReplaceSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a Schema + * + * @summary create a Schema + * x-ms-original-file: 2024-09-01-preview/Create_Schema.json + */ +async function createSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemas.createOrReplace( + "myResourceGroup", + "my-schema-registry", + "my-schema", + { + properties: { + displayName: "My Schema", + description: "This is a sample Schema", + format: "JsonSchema/draft-07", + schemaType: "MessageSchema", + tags: { sampleKey: "sampleValue" }, + }, + }, + ); + console.log(result); +} + +async function main() { + createSchema(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasDeleteSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasDeleteSample.ts new file mode 100644 index 000000000000..7f68fe71513a --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a Schema + * + * @summary delete a Schema + * x-ms-original-file: 2024-09-01-preview/Delete_Schema.json + */ +async function deleteSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + await client.schemas.delete("myResourceGroup", "my-schema-registry", "my-schema"); +} + +async function main() { + deleteSchema(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasGetSample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasGetSample.ts new file mode 100644 index 000000000000..1eaec80dd028 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a Schema + * + * @summary get a Schema + * x-ms-original-file: 2024-09-01-preview/Get_Schema.json + */ +async function schemasGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const result = await client.schemas.get("myResourceGroup", "my-schema-registry", "my-schema"); + console.log(result); +} + +async function main() { + schemasGet(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasListBySchemaRegistrySample.ts b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasListBySchemaRegistrySample.ts new file mode 100644 index 000000000000..fb60e26a5a40 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/samples/v1-beta/typescript/src/schemasListBySchemaRegistrySample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "@azure/arm-deviceregistry"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list Schema resources by SchemaRegistry + * + * @summary list Schema resources by SchemaRegistry + * x-ms-original-file: 2024-09-01-preview/List_Schemas_SchemaRegistry.json + */ +async function listSchemasSchemaRegistry() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DeviceRegistryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.schemas.listBySchemaRegistry( + "myResourceGroup", + "my-schema-registry", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + listSchemasSchemaRegistry(); +} + +main().catch(console.error); diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/assetEndpointProfiles/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/assetEndpointProfiles/index.ts new file mode 100644 index 000000000000..d1b0d72e63b6 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/assetEndpointProfiles/index.ts @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AssetEndpointProfilesCreateOrReplaceOptionalParams, + AssetEndpointProfilesDeleteOptionalParams, + AssetEndpointProfilesGetOptionalParams, + AssetEndpointProfilesListByResourceGroupOptionalParams, + AssetEndpointProfilesListBySubscriptionOptionalParams, + AssetEndpointProfilesUpdateOptionalParams, + DeviceRegistryManagementContext as Client, +} from "../index.js"; +import { + AssetEndpointProfile, + assetEndpointProfileSerializer, + assetEndpointProfileDeserializer, + AssetEndpointProfileUpdate, + assetEndpointProfileUpdateSerializer, + _AssetEndpointProfileListResult, + _assetEndpointProfileListResultDeserializer, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _assetEndpointProfilesGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetEndpointProfileName: string, + options: AssetEndpointProfilesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _assetEndpointProfilesGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return assetEndpointProfileDeserializer(result.body); +} + +/** Get a AssetEndpointProfile */ +export async function assetEndpointProfilesGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetEndpointProfileName: string, + options: AssetEndpointProfilesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _assetEndpointProfilesGetSend( + context, + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + options, + ); + return _assetEndpointProfilesGetDeserialize(result); +} + +export function _assetEndpointProfilesCreateOrReplaceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetEndpointProfileName: string, + resource: AssetEndpointProfile, + options: AssetEndpointProfilesCreateOrReplaceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: assetEndpointProfileSerializer(resource), + }); +} + +export async function _assetEndpointProfilesCreateOrReplaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return assetEndpointProfileDeserializer(result.body); +} + +/** Create a AssetEndpointProfile */ +export function assetEndpointProfilesCreateOrReplace( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetEndpointProfileName: string, + resource: AssetEndpointProfile, + options: AssetEndpointProfilesCreateOrReplaceOptionalParams = { + requestOptions: {}, + }, +): PollerLike, AssetEndpointProfile> { + return getLongRunningPoller( + context, + _assetEndpointProfilesCreateOrReplaceDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _assetEndpointProfilesCreateOrReplaceSend( + context, + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, AssetEndpointProfile>; +} + +export function _assetEndpointProfilesUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetEndpointProfileName: string, + properties: AssetEndpointProfileUpdate, + options: AssetEndpointProfilesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: assetEndpointProfileUpdateSerializer(properties), + }); +} + +export async function _assetEndpointProfilesUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return assetEndpointProfileDeserializer(result.body); +} + +/** Update a AssetEndpointProfile */ +export function assetEndpointProfilesUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetEndpointProfileName: string, + properties: AssetEndpointProfileUpdate, + options: AssetEndpointProfilesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, AssetEndpointProfile> { + return getLongRunningPoller(context, _assetEndpointProfilesUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _assetEndpointProfilesUpdateSend( + context, + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + properties, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, AssetEndpointProfile>; +} + +export function _assetEndpointProfilesDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetEndpointProfileName: string, + options: AssetEndpointProfilesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _assetEndpointProfilesDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a AssetEndpointProfile */ +export function assetEndpointProfilesDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetEndpointProfileName: string, + options: AssetEndpointProfilesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _assetEndpointProfilesDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _assetEndpointProfilesDeleteSend( + context, + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _assetEndpointProfilesListByResourceGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: AssetEndpointProfilesListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles", + subscriptionId, + resourceGroupName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _assetEndpointProfilesListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_AssetEndpointProfileListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _assetEndpointProfileListResultDeserializer(result.body); +} + +/** List AssetEndpointProfile resources by resource group */ +export function assetEndpointProfilesListByResourceGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: AssetEndpointProfilesListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _assetEndpointProfilesListByResourceGroupSend( + context, + subscriptionId, + resourceGroupName, + options, + ), + _assetEndpointProfilesListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _assetEndpointProfilesListBySubscriptionSend( + context: Client, + subscriptionId: string, + options: AssetEndpointProfilesListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles", + subscriptionId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _assetEndpointProfilesListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_AssetEndpointProfileListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _assetEndpointProfileListResultDeserializer(result.body); +} + +/** List AssetEndpointProfile resources by subscription ID */ +export function assetEndpointProfilesListBySubscription( + context: Client, + subscriptionId: string, + options: AssetEndpointProfilesListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _assetEndpointProfilesListBySubscriptionSend(context, subscriptionId, options), + _assetEndpointProfilesListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/assets/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/assets/index.ts new file mode 100644 index 000000000000..1b4505957ea4 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/assets/index.ts @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AssetsCreateOrReplaceOptionalParams, + AssetsDeleteOptionalParams, + AssetsGetOptionalParams, + AssetsListByResourceGroupOptionalParams, + AssetsListBySubscriptionOptionalParams, + AssetsUpdateOptionalParams, + DeviceRegistryManagementContext as Client, +} from "../index.js"; +import { + Asset, + assetSerializer, + assetDeserializer, + AssetUpdate, + assetUpdateSerializer, + _AssetListResult, + _assetListResultDeserializer, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _assetsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetName: string, + options: AssetsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + subscriptionId, + resourceGroupName, + assetName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _assetsGetDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return assetDeserializer(result.body); +} + +/** Get a Asset */ +export async function assetsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetName: string, + options: AssetsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _assetsGetSend( + context, + subscriptionId, + resourceGroupName, + assetName, + options, + ); + return _assetsGetDeserialize(result); +} + +export function _assetsCreateOrReplaceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetName: string, + resource: Asset, + options: AssetsCreateOrReplaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + subscriptionId, + resourceGroupName, + assetName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: assetSerializer(resource), + }); +} + +export async function _assetsCreateOrReplaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return assetDeserializer(result.body); +} + +/** Create a Asset */ +export function assetsCreateOrReplace( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetName: string, + resource: Asset, + options: AssetsCreateOrReplaceOptionalParams = { requestOptions: {} }, +): PollerLike, Asset> { + return getLongRunningPoller(context, _assetsCreateOrReplaceDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _assetsCreateOrReplaceSend( + context, + subscriptionId, + resourceGroupName, + assetName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, Asset>; +} + +export function _assetsUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetName: string, + properties: AssetUpdate, + options: AssetsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + subscriptionId, + resourceGroupName, + assetName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: assetUpdateSerializer(properties), + }); +} + +export async function _assetsUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return assetDeserializer(result.body); +} + +/** Update a Asset */ +export function assetsUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetName: string, + properties: AssetUpdate, + options: AssetsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Asset> { + return getLongRunningPoller(context, _assetsUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _assetsUpdateSend(context, subscriptionId, resourceGroupName, assetName, properties, options), + resourceLocationConfig: "location", + }) as PollerLike, Asset>; +} + +export function _assetsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetName: string, + options: AssetsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + subscriptionId, + resourceGroupName, + assetName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _assetsDeleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a Asset */ +export function assetsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + assetName: string, + options: AssetsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _assetsDeleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _assetsDeleteSend(context, subscriptionId, resourceGroupName, assetName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _assetsListByResourceGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: AssetsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets", + subscriptionId, + resourceGroupName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _assetsListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_AssetListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _assetListResultDeserializer(result.body); +} + +/** List Asset resources by resource group */ +export function assetsListByResourceGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: AssetsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _assetsListByResourceGroupSend(context, subscriptionId, resourceGroupName, options), + _assetsListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _assetsListBySubscriptionSend( + context: Client, + subscriptionId: string, + options: AssetsListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/assets", + subscriptionId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _assetsListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_AssetListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _assetListResultDeserializer(result.body); +} + +/** List Asset resources by subscription ID */ +export function assetsListBySubscription( + context: Client, + subscriptionId: string, + options: AssetsListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _assetsListBySubscriptionSend(context, subscriptionId, options), + _assetsListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/billingContainers/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/billingContainers/index.ts new file mode 100644 index 000000000000..3dac52cb152e --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/billingContainers/index.ts @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + BillingContainersGetOptionalParams, + BillingContainersListBySubscriptionOptionalParams, + DeviceRegistryManagementContext as Client, +} from "../index.js"; +import { + BillingContainer, + billingContainerDeserializer, + _BillingContainerListResult, + _billingContainerListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _billingContainersGetSend( + context: Client, + subscriptionId: string, + billingContainerName: string, + options: BillingContainersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers/{billingContainerName}", + subscriptionId, + billingContainerName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _billingContainersGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return billingContainerDeserializer(result.body); +} + +/** Get a BillingContainer */ +export async function billingContainersGet( + context: Client, + subscriptionId: string, + billingContainerName: string, + options: BillingContainersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _billingContainersGetSend( + context, + subscriptionId, + billingContainerName, + options, + ); + return _billingContainersGetDeserialize(result); +} + +export function _billingContainersListBySubscriptionSend( + context: Client, + subscriptionId: string, + options: BillingContainersListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers", + subscriptionId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _billingContainersListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_BillingContainerListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _billingContainerListResultDeserializer(result.body); +} + +/** List BillingContainer resources by subscription ID */ +export function billingContainersListBySubscription( + context: Client, + subscriptionId: string, + options: BillingContainersListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _billingContainersListBySubscriptionSend(context, subscriptionId, options), + _billingContainersListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/deviceRegistryManagementContext.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/deviceRegistryManagementContext.ts new file mode 100644 index 000000000000..efa73f921ea3 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/deviceRegistryManagementContext.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { KnownVersions } from "../models/models.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +/** Microsoft.DeviceRegistry Resource Provider management API. */ +export interface DeviceRegistryManagementContext extends Client {} + +/** Optional parameters for the client. */ +export interface DeviceRegistryManagementClientOptionalParams extends ClientOptions { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion?: string; +} + +/** Microsoft.DeviceRegistry Resource Provider management API. */ +export function createDeviceRegistryManagement( + credential: TokenCredential, + options: DeviceRegistryManagementClientOptionalParams = {}, +): DeviceRegistryManagementContext { + const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-arm-deviceregistry/1.0.0-beta.2`; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` + : `azsdk-js-api ${userAgentInfo}`; + const { apiVersion: _, ...updatedOptions } = { + ...options, + userAgentOptions: { userAgentPrefix }, + loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, + credentials: { + scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`], + }, + }; + const clientContext = getClient(endpointUrl, credential, updatedOptions); + clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + const apiVersion = options.apiVersion ?? "2024-09-01-preview"; + clientContext.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version")) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + return clientContext; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/discoveredAssetEndpointProfiles/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/discoveredAssetEndpointProfiles/index.ts new file mode 100644 index 000000000000..137fe71bcc36 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/discoveredAssetEndpointProfiles/index.ts @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + DeviceRegistryManagementContext as Client, + DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams, + DiscoveredAssetEndpointProfilesDeleteOptionalParams, + DiscoveredAssetEndpointProfilesGetOptionalParams, + DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams, + DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams, + DiscoveredAssetEndpointProfilesUpdateOptionalParams, +} from "../index.js"; +import { + DiscoveredAssetEndpointProfile, + discoveredAssetEndpointProfileSerializer, + discoveredAssetEndpointProfileDeserializer, + DiscoveredAssetEndpointProfileUpdate, + discoveredAssetEndpointProfileUpdateSerializer, + _DiscoveredAssetEndpointProfileListResult, + _discoveredAssetEndpointProfileListResultDeserializer, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _discoveredAssetEndpointProfilesGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + options: DiscoveredAssetEndpointProfilesGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}", + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _discoveredAssetEndpointProfilesGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return discoveredAssetEndpointProfileDeserializer(result.body); +} + +/** Get a DiscoveredAssetEndpointProfile */ +export async function discoveredAssetEndpointProfilesGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + options: DiscoveredAssetEndpointProfilesGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _discoveredAssetEndpointProfilesGetSend( + context, + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + options, + ); + return _discoveredAssetEndpointProfilesGetDeserialize(result); +} + +export function _discoveredAssetEndpointProfilesCreateOrReplaceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + resource: DiscoveredAssetEndpointProfile, + options: DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}", + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: discoveredAssetEndpointProfileSerializer(resource), + }); +} + +export async function _discoveredAssetEndpointProfilesCreateOrReplaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return discoveredAssetEndpointProfileDeserializer(result.body); +} + +/** Create a DiscoveredAssetEndpointProfile */ +export function discoveredAssetEndpointProfilesCreateOrReplace( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + resource: DiscoveredAssetEndpointProfile, + options: DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams = { + requestOptions: {}, + }, +): PollerLike, DiscoveredAssetEndpointProfile> { + return getLongRunningPoller( + context, + _discoveredAssetEndpointProfilesCreateOrReplaceDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _discoveredAssetEndpointProfilesCreateOrReplaceSend( + context, + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, DiscoveredAssetEndpointProfile>; +} + +export function _discoveredAssetEndpointProfilesUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + properties: DiscoveredAssetEndpointProfileUpdate, + options: DiscoveredAssetEndpointProfilesUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}", + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: discoveredAssetEndpointProfileUpdateSerializer(properties), + }); +} + +export async function _discoveredAssetEndpointProfilesUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return discoveredAssetEndpointProfileDeserializer(result.body); +} + +/** Update a DiscoveredAssetEndpointProfile */ +export function discoveredAssetEndpointProfilesUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + properties: DiscoveredAssetEndpointProfileUpdate, + options: DiscoveredAssetEndpointProfilesUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, DiscoveredAssetEndpointProfile> { + return getLongRunningPoller( + context, + _discoveredAssetEndpointProfilesUpdateDeserialize, + ["200", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _discoveredAssetEndpointProfilesUpdateSend( + context, + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + properties, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, DiscoveredAssetEndpointProfile>; +} + +export function _discoveredAssetEndpointProfilesDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + options: DiscoveredAssetEndpointProfilesDeleteOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}", + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _discoveredAssetEndpointProfilesDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a DiscoveredAssetEndpointProfile */ +export function discoveredAssetEndpointProfilesDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + options: DiscoveredAssetEndpointProfilesDeleteOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _discoveredAssetEndpointProfilesDeleteDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _discoveredAssetEndpointProfilesDeleteSend( + context, + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _discoveredAssetEndpointProfilesListByResourceGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles", + subscriptionId, + resourceGroupName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _discoveredAssetEndpointProfilesListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_DiscoveredAssetEndpointProfileListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _discoveredAssetEndpointProfileListResultDeserializer(result.body); +} + +/** List DiscoveredAssetEndpointProfile resources by resource group */ +export function discoveredAssetEndpointProfilesListByResourceGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _discoveredAssetEndpointProfilesListByResourceGroupSend( + context, + subscriptionId, + resourceGroupName, + options, + ), + _discoveredAssetEndpointProfilesListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _discoveredAssetEndpointProfilesListBySubscriptionSend( + context: Client, + subscriptionId: string, + options: DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles", + subscriptionId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _discoveredAssetEndpointProfilesListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_DiscoveredAssetEndpointProfileListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _discoveredAssetEndpointProfileListResultDeserializer(result.body); +} + +/** List DiscoveredAssetEndpointProfile resources by subscription ID */ +export function discoveredAssetEndpointProfilesListBySubscription( + context: Client, + subscriptionId: string, + options: DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _discoveredAssetEndpointProfilesListBySubscriptionSend(context, subscriptionId, options), + _discoveredAssetEndpointProfilesListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/discoveredAssets/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/discoveredAssets/index.ts new file mode 100644 index 000000000000..5e22b1d5e5ef --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/discoveredAssets/index.ts @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + DeviceRegistryManagementContext as Client, + DiscoveredAssetsCreateOrReplaceOptionalParams, + DiscoveredAssetsDeleteOptionalParams, + DiscoveredAssetsGetOptionalParams, + DiscoveredAssetsListByResourceGroupOptionalParams, + DiscoveredAssetsListBySubscriptionOptionalParams, + DiscoveredAssetsUpdateOptionalParams, +} from "../index.js"; +import { + DiscoveredAsset, + discoveredAssetSerializer, + discoveredAssetDeserializer, + DiscoveredAssetUpdate, + discoveredAssetUpdateSerializer, + _DiscoveredAssetListResult, + _discoveredAssetListResultDeserializer, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _discoveredAssetsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetName: string, + options: DiscoveredAssetsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}", + subscriptionId, + resourceGroupName, + discoveredAssetName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _discoveredAssetsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return discoveredAssetDeserializer(result.body); +} + +/** Get a DiscoveredAsset */ +export async function discoveredAssetsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetName: string, + options: DiscoveredAssetsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _discoveredAssetsGetSend( + context, + subscriptionId, + resourceGroupName, + discoveredAssetName, + options, + ); + return _discoveredAssetsGetDeserialize(result); +} + +export function _discoveredAssetsCreateOrReplaceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetName: string, + resource: DiscoveredAsset, + options: DiscoveredAssetsCreateOrReplaceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}", + subscriptionId, + resourceGroupName, + discoveredAssetName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: discoveredAssetSerializer(resource), + }); +} + +export async function _discoveredAssetsCreateOrReplaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return discoveredAssetDeserializer(result.body); +} + +/** Create a DiscoveredAsset */ +export function discoveredAssetsCreateOrReplace( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetName: string, + resource: DiscoveredAsset, + options: DiscoveredAssetsCreateOrReplaceOptionalParams = { + requestOptions: {}, + }, +): PollerLike, DiscoveredAsset> { + return getLongRunningPoller( + context, + _discoveredAssetsCreateOrReplaceDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _discoveredAssetsCreateOrReplaceSend( + context, + subscriptionId, + resourceGroupName, + discoveredAssetName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, DiscoveredAsset>; +} + +export function _discoveredAssetsUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetName: string, + properties: DiscoveredAssetUpdate, + options: DiscoveredAssetsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}", + subscriptionId, + resourceGroupName, + discoveredAssetName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: discoveredAssetUpdateSerializer(properties), + }); +} + +export async function _discoveredAssetsUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return discoveredAssetDeserializer(result.body); +} + +/** Update a DiscoveredAsset */ +export function discoveredAssetsUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetName: string, + properties: DiscoveredAssetUpdate, + options: DiscoveredAssetsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, DiscoveredAsset> { + return getLongRunningPoller(context, _discoveredAssetsUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _discoveredAssetsUpdateSend( + context, + subscriptionId, + resourceGroupName, + discoveredAssetName, + properties, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, DiscoveredAsset>; +} + +export function _discoveredAssetsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetName: string, + options: DiscoveredAssetsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}", + subscriptionId, + resourceGroupName, + discoveredAssetName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _discoveredAssetsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a DiscoveredAsset */ +export function discoveredAssetsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + discoveredAssetName: string, + options: DiscoveredAssetsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _discoveredAssetsDeleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _discoveredAssetsDeleteSend( + context, + subscriptionId, + resourceGroupName, + discoveredAssetName, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _discoveredAssetsListByResourceGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: DiscoveredAssetsListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets", + subscriptionId, + resourceGroupName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _discoveredAssetsListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_DiscoveredAssetListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _discoveredAssetListResultDeserializer(result.body); +} + +/** List DiscoveredAsset resources by resource group */ +export function discoveredAssetsListByResourceGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: DiscoveredAssetsListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _discoveredAssetsListByResourceGroupSend(context, subscriptionId, resourceGroupName, options), + _discoveredAssetsListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _discoveredAssetsListBySubscriptionSend( + context: Client, + subscriptionId: string, + options: DiscoveredAssetsListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/discoveredAssets", + subscriptionId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _discoveredAssetsListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_DiscoveredAssetListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _discoveredAssetListResultDeserializer(result.body); +} + +/** List DiscoveredAsset resources by subscription ID */ +export function discoveredAssetsListBySubscription( + context: Client, + subscriptionId: string, + options: DiscoveredAssetsListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _discoveredAssetsListBySubscriptionSend(context, subscriptionId, options), + _discoveredAssetsListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/index.ts new file mode 100644 index 000000000000..48753155e02b --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/index.ts @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + createDeviceRegistryManagement, + DeviceRegistryManagementContext, + DeviceRegistryManagementClientOptionalParams, +} from "./deviceRegistryManagementContext.js"; +export { + OperationsListOptionalParams, + OperationStatusGetOptionalParams, + AssetsGetOptionalParams, + AssetsCreateOrReplaceOptionalParams, + AssetsUpdateOptionalParams, + AssetsDeleteOptionalParams, + AssetsListByResourceGroupOptionalParams, + AssetsListBySubscriptionOptionalParams, + AssetEndpointProfilesGetOptionalParams, + AssetEndpointProfilesCreateOrReplaceOptionalParams, + AssetEndpointProfilesUpdateOptionalParams, + AssetEndpointProfilesDeleteOptionalParams, + AssetEndpointProfilesListByResourceGroupOptionalParams, + AssetEndpointProfilesListBySubscriptionOptionalParams, + BillingContainersGetOptionalParams, + BillingContainersListBySubscriptionOptionalParams, + DiscoveredAssetsGetOptionalParams, + DiscoveredAssetsCreateOrReplaceOptionalParams, + DiscoveredAssetsUpdateOptionalParams, + DiscoveredAssetsDeleteOptionalParams, + DiscoveredAssetsListByResourceGroupOptionalParams, + DiscoveredAssetsListBySubscriptionOptionalParams, + DiscoveredAssetEndpointProfilesGetOptionalParams, + DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams, + DiscoveredAssetEndpointProfilesUpdateOptionalParams, + DiscoveredAssetEndpointProfilesDeleteOptionalParams, + DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams, + DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams, + SchemaRegistriesGetOptionalParams, + SchemaRegistriesCreateOrReplaceOptionalParams, + SchemaRegistriesUpdateOptionalParams, + SchemaRegistriesDeleteOptionalParams, + SchemaRegistriesListByResourceGroupOptionalParams, + SchemaRegistriesListBySubscriptionOptionalParams, + SchemasGetOptionalParams, + SchemasCreateOrReplaceOptionalParams, + SchemasDeleteOptionalParams, + SchemasListBySchemaRegistryOptionalParams, + SchemaVersionsGetOptionalParams, + SchemaVersionsCreateOrReplaceOptionalParams, + SchemaVersionsDeleteOptionalParams, + SchemaVersionsListBySchemaOptionalParams, +} from "./options.js"; +export { + assetEndpointProfilesGet, + assetEndpointProfilesCreateOrReplace, + assetEndpointProfilesUpdate, + assetEndpointProfilesDelete, + assetEndpointProfilesListByResourceGroup, + assetEndpointProfilesListBySubscription, +} from "./assetEndpointProfiles/index.js"; +export { + assetsGet, + assetsCreateOrReplace, + assetsUpdate, + assetsDelete, + assetsListByResourceGroup, + assetsListBySubscription, +} from "./assets/index.js"; +export { + billingContainersGet, + billingContainersListBySubscription, +} from "./billingContainers/index.js"; +export { + discoveredAssetEndpointProfilesGet, + discoveredAssetEndpointProfilesCreateOrReplace, + discoveredAssetEndpointProfilesUpdate, + discoveredAssetEndpointProfilesDelete, + discoveredAssetEndpointProfilesListByResourceGroup, + discoveredAssetEndpointProfilesListBySubscription, +} from "./discoveredAssetEndpointProfiles/index.js"; +export { + discoveredAssetsGet, + discoveredAssetsCreateOrReplace, + discoveredAssetsUpdate, + discoveredAssetsDelete, + discoveredAssetsListByResourceGroup, + discoveredAssetsListBySubscription, +} from "./discoveredAssets/index.js"; +export { operationsList } from "./operations/index.js"; +export { operationStatusGet } from "./operationStatus/index.js"; +export { + schemaRegistriesGet, + schemaRegistriesCreateOrReplace, + schemaRegistriesUpdate, + schemaRegistriesDelete, + schemaRegistriesListByResourceGroup, + schemaRegistriesListBySubscription, +} from "./schemaRegistries/index.js"; +export { + schemasGet, + schemasCreateOrReplace, + schemasDelete, + schemasListBySchemaRegistry, +} from "./schemas/index.js"; +export { + schemaVersionsGet, + schemaVersionsCreateOrReplace, + schemaVersionsDelete, + schemaVersionsListBySchema, +} from "./schemaVersions/index.js"; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/operationStatus/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/operationStatus/index.ts new file mode 100644 index 000000000000..900bdc397216 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/operationStatus/index.ts @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + DeviceRegistryManagementContext as Client, + OperationStatusGetOptionalParams, +} from "../index.js"; +import { OperationStatusResult, operationStatusResultDeserializer } from "../../models/models.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _operationStatusGetSend( + context: Client, + subscriptionId: string, + location: string, + operationId: string, + options: OperationStatusGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/locations/{location}/operationStatuses/{operationId}", + subscriptionId, + location, + operationId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _operationStatusGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return operationStatusResultDeserializer(result.body); +} + +/** Returns the current status of an async operation. */ +export async function operationStatusGet( + context: Client, + subscriptionId: string, + location: string, + operationId: string, + options: OperationStatusGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _operationStatusGetSend( + context, + subscriptionId, + location, + operationId, + options, + ); + return _operationStatusGetDeserialize(result); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/operations/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/operations/index.ts new file mode 100644 index 000000000000..417ac844c11a --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/operations/index.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + DeviceRegistryManagementContext as Client, + OperationsListOptionalParams, +} from "../index.js"; +import { + _OperationListResult, + _operationListResultDeserializer, + Operation, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _operationsListSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path("/providers/Microsoft.DeviceRegistry/operations") + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _operationsListDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _operationListResultDeserializer(result.body); +} + +/** List the operations for the provider */ +export function operationsList( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _operationsListSend(context, options), + _operationsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/options.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/options.ts new file mode 100644 index 000000000000..66c2f00f80cb --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/options.ts @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface OperationStatusGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AssetsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AssetsCreateOrReplaceOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AssetsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AssetsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AssetsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AssetsListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AssetEndpointProfilesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AssetEndpointProfilesCreateOrReplaceOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AssetEndpointProfilesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AssetEndpointProfilesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AssetEndpointProfilesListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AssetEndpointProfilesListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface BillingContainersGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface BillingContainersListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DiscoveredAssetsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DiscoveredAssetsCreateOrReplaceOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DiscoveredAssetsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DiscoveredAssetsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DiscoveredAssetsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DiscoveredAssetsListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DiscoveredAssetEndpointProfilesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DiscoveredAssetEndpointProfilesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DiscoveredAssetEndpointProfilesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemaRegistriesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemaRegistriesCreateOrReplaceOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SchemaRegistriesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SchemaRegistriesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface SchemaRegistriesListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemaRegistriesListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemasGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemasCreateOrReplaceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemasDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemasListBySchemaRegistryOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemaVersionsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemaVersionsCreateOrReplaceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemaVersionsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SchemaVersionsListBySchemaOptionalParams extends OperationOptions {} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/schemaRegistries/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/schemaRegistries/index.ts new file mode 100644 index 000000000000..e8a38a57f31c --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/schemaRegistries/index.ts @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + DeviceRegistryManagementContext as Client, + SchemaRegistriesCreateOrReplaceOptionalParams, + SchemaRegistriesDeleteOptionalParams, + SchemaRegistriesGetOptionalParams, + SchemaRegistriesListByResourceGroupOptionalParams, + SchemaRegistriesListBySubscriptionOptionalParams, + SchemaRegistriesUpdateOptionalParams, +} from "../index.js"; +import { + SchemaRegistry, + schemaRegistrySerializer, + schemaRegistryDeserializer, + SchemaRegistryUpdate, + schemaRegistryUpdateSerializer, + _SchemaRegistryListResult, + _schemaRegistryListResultDeserializer, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _schemaRegistriesGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + options: SchemaRegistriesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemaRegistriesGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return schemaRegistryDeserializer(result.body); +} + +/** Get a SchemaRegistry */ +export async function schemaRegistriesGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + options: SchemaRegistriesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _schemaRegistriesGetSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + options, + ); + return _schemaRegistriesGetDeserialize(result); +} + +export function _schemaRegistriesCreateOrReplaceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + resource: SchemaRegistry, + options: SchemaRegistriesCreateOrReplaceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: schemaRegistrySerializer(resource), + }); +} + +export async function _schemaRegistriesCreateOrReplaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return schemaRegistryDeserializer(result.body); +} + +/** Create a SchemaRegistry */ +export function schemaRegistriesCreateOrReplace( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + resource: SchemaRegistry, + options: SchemaRegistriesCreateOrReplaceOptionalParams = { + requestOptions: {}, + }, +): PollerLike, SchemaRegistry> { + return getLongRunningPoller( + context, + _schemaRegistriesCreateOrReplaceDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _schemaRegistriesCreateOrReplaceSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, SchemaRegistry>; +} + +export function _schemaRegistriesUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + properties: SchemaRegistryUpdate, + options: SchemaRegistriesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: schemaRegistryUpdateSerializer(properties), + }); +} + +export async function _schemaRegistriesUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return schemaRegistryDeserializer(result.body); +} + +/** Update a SchemaRegistry */ +export function schemaRegistriesUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + properties: SchemaRegistryUpdate, + options: SchemaRegistriesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, SchemaRegistry> { + return getLongRunningPoller(context, _schemaRegistriesUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _schemaRegistriesUpdateSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + properties, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, SchemaRegistry>; +} + +export function _schemaRegistriesDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + options: SchemaRegistriesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemaRegistriesDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a SchemaRegistry */ +export function schemaRegistriesDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + options: SchemaRegistriesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _schemaRegistriesDeleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _schemaRegistriesDeleteSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _schemaRegistriesListByResourceGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: SchemaRegistriesListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries", + subscriptionId, + resourceGroupName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemaRegistriesListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_SchemaRegistryListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _schemaRegistryListResultDeserializer(result.body); +} + +/** List SchemaRegistry resources by resource group */ +export function schemaRegistriesListByResourceGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: SchemaRegistriesListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _schemaRegistriesListByResourceGroupSend(context, subscriptionId, resourceGroupName, options), + _schemaRegistriesListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _schemaRegistriesListBySubscriptionSend( + context: Client, + subscriptionId: string, + options: SchemaRegistriesListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/schemaRegistries", + subscriptionId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemaRegistriesListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_SchemaRegistryListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _schemaRegistryListResultDeserializer(result.body); +} + +/** List SchemaRegistry resources by subscription ID */ +export function schemaRegistriesListBySubscription( + context: Client, + subscriptionId: string, + options: SchemaRegistriesListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _schemaRegistriesListBySubscriptionSend(context, subscriptionId, options), + _schemaRegistriesListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/schemaVersions/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/schemaVersions/index.ts new file mode 100644 index 000000000000..441580b2629f --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/schemaVersions/index.ts @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + DeviceRegistryManagementContext as Client, + SchemaVersionsCreateOrReplaceOptionalParams, + SchemaVersionsDeleteOptionalParams, + SchemaVersionsGetOptionalParams, + SchemaVersionsListBySchemaOptionalParams, +} from "../index.js"; +import { + SchemaVersion, + schemaVersionSerializer, + schemaVersionDeserializer, + _SchemaVersionListResult, + _schemaVersionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _schemaVersionsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + options: SchemaVersionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}/schemas/{schemaName}/schemaVersions/{schemaVersionName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + schemaVersionName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemaVersionsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return schemaVersionDeserializer(result.body); +} + +/** Get a SchemaVersion */ +export async function schemaVersionsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + options: SchemaVersionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _schemaVersionsGetSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + schemaVersionName, + options, + ); + return _schemaVersionsGetDeserialize(result); +} + +export function _schemaVersionsCreateOrReplaceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + resource: SchemaVersion, + options: SchemaVersionsCreateOrReplaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}/schemas/{schemaName}/schemaVersions/{schemaVersionName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + schemaVersionName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: schemaVersionSerializer(resource), + }); +} + +export async function _schemaVersionsCreateOrReplaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return schemaVersionDeserializer(result.body); +} + +/** Create a SchemaVersion */ +export async function schemaVersionsCreateOrReplace( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + resource: SchemaVersion, + options: SchemaVersionsCreateOrReplaceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _schemaVersionsCreateOrReplaceSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + schemaVersionName, + resource, + options, + ); + return _schemaVersionsCreateOrReplaceDeserialize(result); +} + +export function _schemaVersionsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + options: SchemaVersionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}/schemas/{schemaName}/schemaVersions/{schemaVersionName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + schemaVersionName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemaVersionsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a SchemaVersion */ +export async function schemaVersionsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + options: SchemaVersionsDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _schemaVersionsDeleteSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + schemaVersionName, + options, + ); + return _schemaVersionsDeleteDeserialize(result); +} + +export function _schemaVersionsListBySchemaSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options: SchemaVersionsListBySchemaOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}/schemas/{schemaName}/schemaVersions", + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemaVersionsListBySchemaDeserialize( + result: PathUncheckedResponse, +): Promise<_SchemaVersionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _schemaVersionListResultDeserializer(result.body); +} + +/** List SchemaVersion resources by Schema */ +export function schemaVersionsListBySchema( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options: SchemaVersionsListBySchemaOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _schemaVersionsListBySchemaSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + options, + ), + _schemaVersionsListBySchemaDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/api/schemas/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/api/schemas/index.ts new file mode 100644 index 000000000000..02e6987dea30 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/api/schemas/index.ts @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + DeviceRegistryManagementContext as Client, + SchemasCreateOrReplaceOptionalParams, + SchemasDeleteOptionalParams, + SchemasGetOptionalParams, + SchemasListBySchemaRegistryOptionalParams, +} from "../index.js"; +import { + Schema, + schemaSerializer, + schemaDeserializer, + _SchemaListResult, + _schemaListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _schemasGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options: SchemasGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}/schemas/{schemaName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemasGetDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return schemaDeserializer(result.body); +} + +/** Get a Schema */ +export async function schemasGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options: SchemasGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _schemasGetSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + options, + ); + return _schemasGetDeserialize(result); +} + +export function _schemasCreateOrReplaceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + resource: Schema, + options: SchemasCreateOrReplaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}/schemas/{schemaName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: schemaSerializer(resource), + }); +} + +export async function _schemasCreateOrReplaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return schemaDeserializer(result.body); +} + +/** Create a Schema */ +export async function schemasCreateOrReplace( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + resource: Schema, + options: SchemasCreateOrReplaceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _schemasCreateOrReplaceSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + resource, + options, + ); + return _schemasCreateOrReplaceDeserialize(result); +} + +export function _schemasDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options: SchemasDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}/schemas/{schemaName}", + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemasDeleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a Schema */ +export async function schemasDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options: SchemasDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _schemasDeleteSend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + options, + ); + return _schemasDeleteDeserialize(result); +} + +export function _schemasListBySchemaRegistrySend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + options: SchemasListBySchemaRegistryOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}/schemas", + subscriptionId, + resourceGroupName, + schemaRegistryName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _schemasListBySchemaRegistryDeserialize( + result: PathUncheckedResponse, +): Promise<_SchemaListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _schemaListResultDeserializer(result.body); +} + +/** List Schema resources by SchemaRegistry */ +export function schemasListBySchemaRegistry( + context: Client, + subscriptionId: string, + resourceGroupName: string, + schemaRegistryName: string, + options: SchemasListBySchemaRegistryOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _schemasListBySchemaRegistrySend( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + options, + ), + _schemasListBySchemaRegistryDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/assetEndpointProfiles/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/assetEndpointProfiles/index.ts new file mode 100644 index 000000000000..d95f640203b7 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/assetEndpointProfiles/index.ts @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { + assetEndpointProfilesGet, + assetEndpointProfilesCreateOrReplace, + assetEndpointProfilesUpdate, + assetEndpointProfilesDelete, + assetEndpointProfilesListByResourceGroup, + assetEndpointProfilesListBySubscription, +} from "../../api/assetEndpointProfiles/index.js"; +import { AssetEndpointProfile, AssetEndpointProfileUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + AssetEndpointProfilesGetOptionalParams, + AssetEndpointProfilesCreateOrReplaceOptionalParams, + AssetEndpointProfilesUpdateOptionalParams, + AssetEndpointProfilesDeleteOptionalParams, + AssetEndpointProfilesListByResourceGroupOptionalParams, + AssetEndpointProfilesListBySubscriptionOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a AssetEndpointProfiles operations. */ +export interface AssetEndpointProfilesOperations { + /** Get a AssetEndpointProfile */ + get: ( + resourceGroupName: string, + assetEndpointProfileName: string, + options?: AssetEndpointProfilesGetOptionalParams, + ) => Promise; + /** Create a AssetEndpointProfile */ + createOrReplace: ( + resourceGroupName: string, + assetEndpointProfileName: string, + resource: AssetEndpointProfile, + options?: AssetEndpointProfilesCreateOrReplaceOptionalParams, + ) => PollerLike, AssetEndpointProfile>; + /** Update a AssetEndpointProfile */ + update: ( + resourceGroupName: string, + assetEndpointProfileName: string, + properties: AssetEndpointProfileUpdate, + options?: AssetEndpointProfilesUpdateOptionalParams, + ) => PollerLike, AssetEndpointProfile>; + /** Delete a AssetEndpointProfile */ + delete: ( + resourceGroupName: string, + assetEndpointProfileName: string, + options?: AssetEndpointProfilesDeleteOptionalParams, + ) => PollerLike, void>; + /** List AssetEndpointProfile resources by resource group */ + listByResourceGroup: ( + resourceGroupName: string, + options?: AssetEndpointProfilesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** List AssetEndpointProfile resources by subscription ID */ + listBySubscription: ( + options?: AssetEndpointProfilesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getAssetEndpointProfiles( + context: DeviceRegistryManagementContext, + subscriptionId: string, +) { + return { + get: ( + resourceGroupName: string, + assetEndpointProfileName: string, + options?: AssetEndpointProfilesGetOptionalParams, + ) => + assetEndpointProfilesGet( + context, + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + options, + ), + createOrReplace: ( + resourceGroupName: string, + assetEndpointProfileName: string, + resource: AssetEndpointProfile, + options?: AssetEndpointProfilesCreateOrReplaceOptionalParams, + ) => + assetEndpointProfilesCreateOrReplace( + context, + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + resource, + options, + ), + update: ( + resourceGroupName: string, + assetEndpointProfileName: string, + properties: AssetEndpointProfileUpdate, + options?: AssetEndpointProfilesUpdateOptionalParams, + ) => + assetEndpointProfilesUpdate( + context, + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + properties, + options, + ), + delete: ( + resourceGroupName: string, + assetEndpointProfileName: string, + options?: AssetEndpointProfilesDeleteOptionalParams, + ) => + assetEndpointProfilesDelete( + context, + subscriptionId, + resourceGroupName, + assetEndpointProfileName, + options, + ), + listByResourceGroup: ( + resourceGroupName: string, + options?: AssetEndpointProfilesListByResourceGroupOptionalParams, + ) => + assetEndpointProfilesListByResourceGroup(context, subscriptionId, resourceGroupName, options), + listBySubscription: (options?: AssetEndpointProfilesListBySubscriptionOptionalParams) => + assetEndpointProfilesListBySubscription(context, subscriptionId, options), + }; +} + +export function getAssetEndpointProfilesOperations( + context: DeviceRegistryManagementContext, + subscriptionId: string, +): AssetEndpointProfilesOperations { + return { + ...getAssetEndpointProfiles(context, subscriptionId), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/assets/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/assets/index.ts new file mode 100644 index 000000000000..895744a22854 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/assets/index.ts @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { + assetsGet, + assetsCreateOrReplace, + assetsUpdate, + assetsDelete, + assetsListByResourceGroup, + assetsListBySubscription, +} from "../../api/assets/index.js"; +import { Asset, AssetUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + AssetsGetOptionalParams, + AssetsCreateOrReplaceOptionalParams, + AssetsUpdateOptionalParams, + AssetsDeleteOptionalParams, + AssetsListByResourceGroupOptionalParams, + AssetsListBySubscriptionOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a Assets operations. */ +export interface AssetsOperations { + /** Get a Asset */ + get: ( + resourceGroupName: string, + assetName: string, + options?: AssetsGetOptionalParams, + ) => Promise; + /** Create a Asset */ + createOrReplace: ( + resourceGroupName: string, + assetName: string, + resource: Asset, + options?: AssetsCreateOrReplaceOptionalParams, + ) => PollerLike, Asset>; + /** Update a Asset */ + update: ( + resourceGroupName: string, + assetName: string, + properties: AssetUpdate, + options?: AssetsUpdateOptionalParams, + ) => PollerLike, Asset>; + /** Delete a Asset */ + delete: ( + resourceGroupName: string, + assetName: string, + options?: AssetsDeleteOptionalParams, + ) => PollerLike, void>; + /** List Asset resources by resource group */ + listByResourceGroup: ( + resourceGroupName: string, + options?: AssetsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** List Asset resources by subscription ID */ + listBySubscription: ( + options?: AssetsListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getAssets(context: DeviceRegistryManagementContext, subscriptionId: string) { + return { + get: (resourceGroupName: string, assetName: string, options?: AssetsGetOptionalParams) => + assetsGet(context, subscriptionId, resourceGroupName, assetName, options), + createOrReplace: ( + resourceGroupName: string, + assetName: string, + resource: Asset, + options?: AssetsCreateOrReplaceOptionalParams, + ) => + assetsCreateOrReplace( + context, + subscriptionId, + resourceGroupName, + assetName, + resource, + options, + ), + update: ( + resourceGroupName: string, + assetName: string, + properties: AssetUpdate, + options?: AssetsUpdateOptionalParams, + ) => assetsUpdate(context, subscriptionId, resourceGroupName, assetName, properties, options), + delete: (resourceGroupName: string, assetName: string, options?: AssetsDeleteOptionalParams) => + assetsDelete(context, subscriptionId, resourceGroupName, assetName, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: AssetsListByResourceGroupOptionalParams, + ) => assetsListByResourceGroup(context, subscriptionId, resourceGroupName, options), + listBySubscription: (options?: AssetsListBySubscriptionOptionalParams) => + assetsListBySubscription(context, subscriptionId, options), + }; +} + +export function getAssetsOperations( + context: DeviceRegistryManagementContext, + subscriptionId: string, +): AssetsOperations { + return { + ...getAssets(context, subscriptionId), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/billingContainers/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/billingContainers/index.ts new file mode 100644 index 000000000000..c93104da6feb --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/billingContainers/index.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { + billingContainersGet, + billingContainersListBySubscription, +} from "../../api/billingContainers/index.js"; +import { BillingContainer } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { + BillingContainersGetOptionalParams, + BillingContainersListBySubscriptionOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a BillingContainers operations. */ +export interface BillingContainersOperations { + /** Get a BillingContainer */ + get: ( + billingContainerName: string, + options?: BillingContainersGetOptionalParams, + ) => Promise; + /** List BillingContainer resources by subscription ID */ + listBySubscription: ( + options?: BillingContainersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getBillingContainers( + context: DeviceRegistryManagementContext, + subscriptionId: string, +) { + return { + get: (billingContainerName: string, options?: BillingContainersGetOptionalParams) => + billingContainersGet(context, subscriptionId, billingContainerName, options), + listBySubscription: (options?: BillingContainersListBySubscriptionOptionalParams) => + billingContainersListBySubscription(context, subscriptionId, options), + }; +} + +export function getBillingContainersOperations( + context: DeviceRegistryManagementContext, + subscriptionId: string, +): BillingContainersOperations { + return { + ...getBillingContainers(context, subscriptionId), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/discoveredAssetEndpointProfiles/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/discoveredAssetEndpointProfiles/index.ts new file mode 100644 index 000000000000..2eff295abc90 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/discoveredAssetEndpointProfiles/index.ts @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { + discoveredAssetEndpointProfilesGet, + discoveredAssetEndpointProfilesCreateOrReplace, + discoveredAssetEndpointProfilesUpdate, + discoveredAssetEndpointProfilesDelete, + discoveredAssetEndpointProfilesListByResourceGroup, + discoveredAssetEndpointProfilesListBySubscription, +} from "../../api/discoveredAssetEndpointProfiles/index.js"; +import { + DiscoveredAssetEndpointProfilesGetOptionalParams, + DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams, + DiscoveredAssetEndpointProfilesUpdateOptionalParams, + DiscoveredAssetEndpointProfilesDeleteOptionalParams, + DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams, + DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams, +} from "../../api/options.js"; +import { + DiscoveredAssetEndpointProfile, + DiscoveredAssetEndpointProfileUpdate, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a DiscoveredAssetEndpointProfiles operations. */ +export interface DiscoveredAssetEndpointProfilesOperations { + /** Get a DiscoveredAssetEndpointProfile */ + get: ( + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + options?: DiscoveredAssetEndpointProfilesGetOptionalParams, + ) => Promise; + /** Create a DiscoveredAssetEndpointProfile */ + createOrReplace: ( + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + resource: DiscoveredAssetEndpointProfile, + options?: DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams, + ) => PollerLike, DiscoveredAssetEndpointProfile>; + /** Update a DiscoveredAssetEndpointProfile */ + update: ( + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + properties: DiscoveredAssetEndpointProfileUpdate, + options?: DiscoveredAssetEndpointProfilesUpdateOptionalParams, + ) => PollerLike, DiscoveredAssetEndpointProfile>; + /** Delete a DiscoveredAssetEndpointProfile */ + delete: ( + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + options?: DiscoveredAssetEndpointProfilesDeleteOptionalParams, + ) => PollerLike, void>; + /** List DiscoveredAssetEndpointProfile resources by resource group */ + listByResourceGroup: ( + resourceGroupName: string, + options?: DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** List DiscoveredAssetEndpointProfile resources by subscription ID */ + listBySubscription: ( + options?: DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getDiscoveredAssetEndpointProfiles( + context: DeviceRegistryManagementContext, + subscriptionId: string, +) { + return { + get: ( + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + options?: DiscoveredAssetEndpointProfilesGetOptionalParams, + ) => + discoveredAssetEndpointProfilesGet( + context, + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + options, + ), + createOrReplace: ( + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + resource: DiscoveredAssetEndpointProfile, + options?: DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams, + ) => + discoveredAssetEndpointProfilesCreateOrReplace( + context, + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + resource, + options, + ), + update: ( + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + properties: DiscoveredAssetEndpointProfileUpdate, + options?: DiscoveredAssetEndpointProfilesUpdateOptionalParams, + ) => + discoveredAssetEndpointProfilesUpdate( + context, + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + properties, + options, + ), + delete: ( + resourceGroupName: string, + discoveredAssetEndpointProfileName: string, + options?: DiscoveredAssetEndpointProfilesDeleteOptionalParams, + ) => + discoveredAssetEndpointProfilesDelete( + context, + subscriptionId, + resourceGroupName, + discoveredAssetEndpointProfileName, + options, + ), + listByResourceGroup: ( + resourceGroupName: string, + options?: DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams, + ) => + discoveredAssetEndpointProfilesListByResourceGroup( + context, + subscriptionId, + resourceGroupName, + options, + ), + listBySubscription: ( + options?: DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams, + ) => discoveredAssetEndpointProfilesListBySubscription(context, subscriptionId, options), + }; +} + +export function getDiscoveredAssetEndpointProfilesOperations( + context: DeviceRegistryManagementContext, + subscriptionId: string, +): DiscoveredAssetEndpointProfilesOperations { + return { + ...getDiscoveredAssetEndpointProfiles(context, subscriptionId), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/discoveredAssets/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/discoveredAssets/index.ts new file mode 100644 index 000000000000..1f9e8ee33534 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/discoveredAssets/index.ts @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { + discoveredAssetsGet, + discoveredAssetsCreateOrReplace, + discoveredAssetsUpdate, + discoveredAssetsDelete, + discoveredAssetsListByResourceGroup, + discoveredAssetsListBySubscription, +} from "../../api/discoveredAssets/index.js"; +import { + DiscoveredAssetsGetOptionalParams, + DiscoveredAssetsCreateOrReplaceOptionalParams, + DiscoveredAssetsUpdateOptionalParams, + DiscoveredAssetsDeleteOptionalParams, + DiscoveredAssetsListByResourceGroupOptionalParams, + DiscoveredAssetsListBySubscriptionOptionalParams, +} from "../../api/options.js"; +import { DiscoveredAsset, DiscoveredAssetUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a DiscoveredAssets operations. */ +export interface DiscoveredAssetsOperations { + /** Get a DiscoveredAsset */ + get: ( + resourceGroupName: string, + discoveredAssetName: string, + options?: DiscoveredAssetsGetOptionalParams, + ) => Promise; + /** Create a DiscoveredAsset */ + createOrReplace: ( + resourceGroupName: string, + discoveredAssetName: string, + resource: DiscoveredAsset, + options?: DiscoveredAssetsCreateOrReplaceOptionalParams, + ) => PollerLike, DiscoveredAsset>; + /** Update a DiscoveredAsset */ + update: ( + resourceGroupName: string, + discoveredAssetName: string, + properties: DiscoveredAssetUpdate, + options?: DiscoveredAssetsUpdateOptionalParams, + ) => PollerLike, DiscoveredAsset>; + /** Delete a DiscoveredAsset */ + delete: ( + resourceGroupName: string, + discoveredAssetName: string, + options?: DiscoveredAssetsDeleteOptionalParams, + ) => PollerLike, void>; + /** List DiscoveredAsset resources by resource group */ + listByResourceGroup: ( + resourceGroupName: string, + options?: DiscoveredAssetsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** List DiscoveredAsset resources by subscription ID */ + listBySubscription: ( + options?: DiscoveredAssetsListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getDiscoveredAssets( + context: DeviceRegistryManagementContext, + subscriptionId: string, +) { + return { + get: ( + resourceGroupName: string, + discoveredAssetName: string, + options?: DiscoveredAssetsGetOptionalParams, + ) => + discoveredAssetsGet(context, subscriptionId, resourceGroupName, discoveredAssetName, options), + createOrReplace: ( + resourceGroupName: string, + discoveredAssetName: string, + resource: DiscoveredAsset, + options?: DiscoveredAssetsCreateOrReplaceOptionalParams, + ) => + discoveredAssetsCreateOrReplace( + context, + subscriptionId, + resourceGroupName, + discoveredAssetName, + resource, + options, + ), + update: ( + resourceGroupName: string, + discoveredAssetName: string, + properties: DiscoveredAssetUpdate, + options?: DiscoveredAssetsUpdateOptionalParams, + ) => + discoveredAssetsUpdate( + context, + subscriptionId, + resourceGroupName, + discoveredAssetName, + properties, + options, + ), + delete: ( + resourceGroupName: string, + discoveredAssetName: string, + options?: DiscoveredAssetsDeleteOptionalParams, + ) => + discoveredAssetsDelete( + context, + subscriptionId, + resourceGroupName, + discoveredAssetName, + options, + ), + listByResourceGroup: ( + resourceGroupName: string, + options?: DiscoveredAssetsListByResourceGroupOptionalParams, + ) => discoveredAssetsListByResourceGroup(context, subscriptionId, resourceGroupName, options), + listBySubscription: (options?: DiscoveredAssetsListBySubscriptionOptionalParams) => + discoveredAssetsListBySubscription(context, subscriptionId, options), + }; +} + +export function getDiscoveredAssetsOperations( + context: DeviceRegistryManagementContext, + subscriptionId: string, +): DiscoveredAssetsOperations { + return { + ...getDiscoveredAssets(context, subscriptionId), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/index.ts new file mode 100644 index 000000000000..26cef27446ea --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/index.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { AssetEndpointProfilesOperations } from "./assetEndpointProfiles/index.js"; +export { AssetsOperations } from "./assets/index.js"; +export { BillingContainersOperations } from "./billingContainers/index.js"; +export { DiscoveredAssetEndpointProfilesOperations } from "./discoveredAssetEndpointProfiles/index.js"; +export { DiscoveredAssetsOperations } from "./discoveredAssets/index.js"; +export { OperationsOperations } from "./operations/index.js"; +export { OperationStatusOperations } from "./operationStatus/index.js"; +export { SchemaRegistriesOperations } from "./schemaRegistries/index.js"; +export { SchemasOperations } from "./schemas/index.js"; +export { SchemaVersionsOperations } from "./schemaVersions/index.js"; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/operationStatus/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/operationStatus/index.ts new file mode 100644 index 000000000000..a64b63c9899d --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/operationStatus/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { operationStatusGet } from "../../api/operationStatus/index.js"; +import { OperationStatusGetOptionalParams } from "../../api/options.js"; +import { OperationStatusResult } from "../../models/models.js"; + +/** Interface representing a OperationStatus operations. */ +export interface OperationStatusOperations { + /** Returns the current status of an async operation. */ + get: ( + location: string, + operationId: string, + options?: OperationStatusGetOptionalParams, + ) => Promise; +} + +export function getOperationStatus( + context: DeviceRegistryManagementContext, + subscriptionId: string, +) { + return { + get: (location: string, operationId: string, options?: OperationStatusGetOptionalParams) => + operationStatusGet(context, subscriptionId, location, operationId, options), + }; +} + +export function getOperationStatusOperations( + context: DeviceRegistryManagementContext, + subscriptionId: string, +): OperationStatusOperations { + return { + ...getOperationStatus(context, subscriptionId), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/operations/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/operations/index.ts new file mode 100644 index 000000000000..173fa4f5feaa --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/operations/index.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { operationsList } from "../../api/operations/index.js"; +import { OperationsListOptionalParams } from "../../api/options.js"; +import { Operation } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Operations operations. */ +export interface OperationsOperations { + /** List the operations for the provider */ + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; +} + +export function getOperations(context: DeviceRegistryManagementContext) { + return { + list: (options?: OperationsListOptionalParams) => operationsList(context, options), + }; +} + +export function getOperationsOperations( + context: DeviceRegistryManagementContext, +): OperationsOperations { + return { + ...getOperations(context), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/schemaRegistries/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/schemaRegistries/index.ts new file mode 100644 index 000000000000..36b541503ed4 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/schemaRegistries/index.ts @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { + SchemaRegistriesGetOptionalParams, + SchemaRegistriesCreateOrReplaceOptionalParams, + SchemaRegistriesUpdateOptionalParams, + SchemaRegistriesDeleteOptionalParams, + SchemaRegistriesListByResourceGroupOptionalParams, + SchemaRegistriesListBySubscriptionOptionalParams, +} from "../../api/options.js"; +import { + schemaRegistriesGet, + schemaRegistriesCreateOrReplace, + schemaRegistriesUpdate, + schemaRegistriesDelete, + schemaRegistriesListByResourceGroup, + schemaRegistriesListBySubscription, +} from "../../api/schemaRegistries/index.js"; +import { SchemaRegistry, SchemaRegistryUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a SchemaRegistries operations. */ +export interface SchemaRegistriesOperations { + /** Get a SchemaRegistry */ + get: ( + resourceGroupName: string, + schemaRegistryName: string, + options?: SchemaRegistriesGetOptionalParams, + ) => Promise; + /** Create a SchemaRegistry */ + createOrReplace: ( + resourceGroupName: string, + schemaRegistryName: string, + resource: SchemaRegistry, + options?: SchemaRegistriesCreateOrReplaceOptionalParams, + ) => PollerLike, SchemaRegistry>; + /** Update a SchemaRegistry */ + update: ( + resourceGroupName: string, + schemaRegistryName: string, + properties: SchemaRegistryUpdate, + options?: SchemaRegistriesUpdateOptionalParams, + ) => PollerLike, SchemaRegistry>; + /** Delete a SchemaRegistry */ + delete: ( + resourceGroupName: string, + schemaRegistryName: string, + options?: SchemaRegistriesDeleteOptionalParams, + ) => PollerLike, void>; + /** List SchemaRegistry resources by resource group */ + listByResourceGroup: ( + resourceGroupName: string, + options?: SchemaRegistriesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** List SchemaRegistry resources by subscription ID */ + listBySubscription: ( + options?: SchemaRegistriesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getSchemaRegistries( + context: DeviceRegistryManagementContext, + subscriptionId: string, +) { + return { + get: ( + resourceGroupName: string, + schemaRegistryName: string, + options?: SchemaRegistriesGetOptionalParams, + ) => + schemaRegistriesGet(context, subscriptionId, resourceGroupName, schemaRegistryName, options), + createOrReplace: ( + resourceGroupName: string, + schemaRegistryName: string, + resource: SchemaRegistry, + options?: SchemaRegistriesCreateOrReplaceOptionalParams, + ) => + schemaRegistriesCreateOrReplace( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + resource, + options, + ), + update: ( + resourceGroupName: string, + schemaRegistryName: string, + properties: SchemaRegistryUpdate, + options?: SchemaRegistriesUpdateOptionalParams, + ) => + schemaRegistriesUpdate( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + properties, + options, + ), + delete: ( + resourceGroupName: string, + schemaRegistryName: string, + options?: SchemaRegistriesDeleteOptionalParams, + ) => + schemaRegistriesDelete( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + options, + ), + listByResourceGroup: ( + resourceGroupName: string, + options?: SchemaRegistriesListByResourceGroupOptionalParams, + ) => schemaRegistriesListByResourceGroup(context, subscriptionId, resourceGroupName, options), + listBySubscription: (options?: SchemaRegistriesListBySubscriptionOptionalParams) => + schemaRegistriesListBySubscription(context, subscriptionId, options), + }; +} + +export function getSchemaRegistriesOperations( + context: DeviceRegistryManagementContext, + subscriptionId: string, +): SchemaRegistriesOperations { + return { + ...getSchemaRegistries(context, subscriptionId), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/schemaVersions/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/schemaVersions/index.ts new file mode 100644 index 000000000000..5a6b9ac3275e --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/schemaVersions/index.ts @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { + SchemaVersionsGetOptionalParams, + SchemaVersionsCreateOrReplaceOptionalParams, + SchemaVersionsDeleteOptionalParams, + SchemaVersionsListBySchemaOptionalParams, +} from "../../api/options.js"; +import { + schemaVersionsGet, + schemaVersionsCreateOrReplace, + schemaVersionsDelete, + schemaVersionsListBySchema, +} from "../../api/schemaVersions/index.js"; +import { SchemaVersion } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a SchemaVersions operations. */ +export interface SchemaVersionsOperations { + /** Get a SchemaVersion */ + get: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + options?: SchemaVersionsGetOptionalParams, + ) => Promise; + /** Create a SchemaVersion */ + createOrReplace: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + resource: SchemaVersion, + options?: SchemaVersionsCreateOrReplaceOptionalParams, + ) => Promise; + /** Delete a SchemaVersion */ + delete: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + options?: SchemaVersionsDeleteOptionalParams, + ) => Promise; + /** List SchemaVersion resources by Schema */ + listBySchema: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options?: SchemaVersionsListBySchemaOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getSchemaVersions( + context: DeviceRegistryManagementContext, + subscriptionId: string, +) { + return { + get: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + options?: SchemaVersionsGetOptionalParams, + ) => + schemaVersionsGet( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + schemaVersionName, + options, + ), + createOrReplace: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + resource: SchemaVersion, + options?: SchemaVersionsCreateOrReplaceOptionalParams, + ) => + schemaVersionsCreateOrReplace( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + schemaVersionName, + resource, + options, + ), + delete: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + schemaVersionName: string, + options?: SchemaVersionsDeleteOptionalParams, + ) => + schemaVersionsDelete( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + schemaVersionName, + options, + ), + listBySchema: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options?: SchemaVersionsListBySchemaOptionalParams, + ) => + schemaVersionsListBySchema( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + options, + ), + }; +} + +export function getSchemaVersionsOperations( + context: DeviceRegistryManagementContext, + subscriptionId: string, +): SchemaVersionsOperations { + return { + ...getSchemaVersions(context, subscriptionId), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/classic/schemas/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/classic/schemas/index.ts new file mode 100644 index 000000000000..d727e71ce43a --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/classic/schemas/index.ts @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementContext } from "../../api/deviceRegistryManagementContext.js"; +import { + SchemasGetOptionalParams, + SchemasCreateOrReplaceOptionalParams, + SchemasDeleteOptionalParams, + SchemasListBySchemaRegistryOptionalParams, +} from "../../api/options.js"; +import { + schemasGet, + schemasCreateOrReplace, + schemasDelete, + schemasListBySchemaRegistry, +} from "../../api/schemas/index.js"; +import { Schema } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Schemas operations. */ +export interface SchemasOperations { + /** Get a Schema */ + get: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options?: SchemasGetOptionalParams, + ) => Promise; + /** Create a Schema */ + createOrReplace: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + resource: Schema, + options?: SchemasCreateOrReplaceOptionalParams, + ) => Promise; + /** Delete a Schema */ + delete: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options?: SchemasDeleteOptionalParams, + ) => Promise; + /** List Schema resources by SchemaRegistry */ + listBySchemaRegistry: ( + resourceGroupName: string, + schemaRegistryName: string, + options?: SchemasListBySchemaRegistryOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getSchemas(context: DeviceRegistryManagementContext, subscriptionId: string) { + return { + get: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options?: SchemasGetOptionalParams, + ) => + schemasGet( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + options, + ), + createOrReplace: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + resource: Schema, + options?: SchemasCreateOrReplaceOptionalParams, + ) => + schemasCreateOrReplace( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + resource, + options, + ), + delete: ( + resourceGroupName: string, + schemaRegistryName: string, + schemaName: string, + options?: SchemasDeleteOptionalParams, + ) => + schemasDelete( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + schemaName, + options, + ), + listBySchemaRegistry: ( + resourceGroupName: string, + schemaRegistryName: string, + options?: SchemasListBySchemaRegistryOptionalParams, + ) => + schemasListBySchemaRegistry( + context, + subscriptionId, + resourceGroupName, + schemaRegistryName, + options, + ), + }; +} + +export function getSchemasOperations( + context: DeviceRegistryManagementContext, + subscriptionId: string, +): SchemasOperations { + return { + ...getSchemas(context, subscriptionId), + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/deviceRegistryManagementClient.ts b/sdk/deviceregistry/arm-deviceregistry/src/deviceRegistryManagementClient.ts index 75bf41a030a9..1bb328d05126 100644 --- a/sdk/deviceregistry/arm-deviceregistry/src/deviceRegistryManagementClient.ts +++ b/sdk/deviceregistry/arm-deviceregistry/src/deviceRegistryManagementClient.ts @@ -1,157 +1,100 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. -import * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { getOperationsOperations, OperationsOperations } from "./classic/operations/index.js"; import { - PipelineRequest, - PipelineResponse, - SendRequest, -} from "@azure/core-rest-pipeline"; -import * as coreAuth from "@azure/core-auth"; + getOperationStatusOperations, + OperationStatusOperations, +} from "./classic/operationStatus/index.js"; +import { getAssetsOperations, AssetsOperations } from "./classic/assets/index.js"; import { - OperationsImpl, - AssetEndpointProfilesImpl, - AssetsImpl, - OperationStatusImpl, -} from "./operations"; + getAssetEndpointProfilesOperations, + AssetEndpointProfilesOperations, +} from "./classic/assetEndpointProfiles/index.js"; import { - Operations, - AssetEndpointProfiles, - Assets, - OperationStatus, -} from "./operationsInterfaces"; -import { DeviceRegistryManagementClientOptionalParams } from "./models"; + getBillingContainersOperations, + BillingContainersOperations, +} from "./classic/billingContainers/index.js"; +import { + getDiscoveredAssetsOperations, + DiscoveredAssetsOperations, +} from "./classic/discoveredAssets/index.js"; +import { + getDiscoveredAssetEndpointProfilesOperations, + DiscoveredAssetEndpointProfilesOperations, +} from "./classic/discoveredAssetEndpointProfiles/index.js"; +import { + getSchemaRegistriesOperations, + SchemaRegistriesOperations, +} from "./classic/schemaRegistries/index.js"; +import { getSchemasOperations, SchemasOperations } from "./classic/schemas/index.js"; +import { + getSchemaVersionsOperations, + SchemaVersionsOperations, +} from "./classic/schemaVersions/index.js"; +import { + createDeviceRegistryManagement, + DeviceRegistryManagementContext, + DeviceRegistryManagementClientOptionalParams, +} from "./api/index.js"; +import { Pipeline } from "@azure/core-rest-pipeline"; +import { TokenCredential } from "@azure/core-auth"; + +export { DeviceRegistryManagementClientOptionalParams } from "./api/deviceRegistryManagementContext.js"; -export class DeviceRegistryManagementClient extends coreClient.ServiceClient { - $host: string; - apiVersion: string; - subscriptionId: string; +export class DeviceRegistryManagementClient { + private _client: DeviceRegistryManagementContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; - /** - * Initializes a new instance of the DeviceRegistryManagementClient class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. - * @param options The parameter options - */ + /** Microsoft.DeviceRegistry Resource Provider management API. */ constructor( - credentials: coreAuth.TokenCredential, + credential: TokenCredential, subscriptionId: string, - options?: DeviceRegistryManagementClientOptionalParams, + options: DeviceRegistryManagementClientOptionalParams = {}, ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); - } - - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: DeviceRegistryManagementClientOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials, - }; - - const packageDetails = `azsdk-js-arm-deviceregistry/1.0.0-beta.2`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createDeviceRegistryManagement(credential, { ...options, - userAgentOptions: { - userAgentPrefix, - }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com", - }; - super(optionsWithDefaults); - - let bearerTokenAuthenticationPolicyFound: boolean = false; - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = - options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName, - ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName, - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge, - }, - }), - ); - } - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-11-01-preview"; - this.operations = new OperationsImpl(this); - this.assetEndpointProfiles = new AssetEndpointProfilesImpl(this); - this.assets = new AssetsImpl(this); - this.operationStatus = new OperationStatusImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } - - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; - } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest, - ): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - }, - }; - this.pipeline.addPolicy(apiVersionPolicy); + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.operations = getOperationsOperations(this._client); + this.operationStatus = getOperationStatusOperations(this._client, subscriptionId); + this.assets = getAssetsOperations(this._client, subscriptionId); + this.assetEndpointProfiles = getAssetEndpointProfilesOperations(this._client, subscriptionId); + this.billingContainers = getBillingContainersOperations(this._client, subscriptionId); + this.discoveredAssets = getDiscoveredAssetsOperations(this._client, subscriptionId); + this.discoveredAssetEndpointProfiles = getDiscoveredAssetEndpointProfilesOperations( + this._client, + subscriptionId, + ); + this.schemaRegistries = getSchemaRegistriesOperations(this._client, subscriptionId); + this.schemas = getSchemasOperations(this._client, subscriptionId); + this.schemaVersions = getSchemaVersionsOperations(this._client, subscriptionId); } - operations: Operations; - assetEndpointProfiles: AssetEndpointProfiles; - assets: Assets; - operationStatus: OperationStatus; + /** The operation groups for Operations */ + public readonly operations: OperationsOperations; + /** The operation groups for OperationStatus */ + public readonly operationStatus: OperationStatusOperations; + /** The operation groups for Assets */ + public readonly assets: AssetsOperations; + /** The operation groups for AssetEndpointProfiles */ + public readonly assetEndpointProfiles: AssetEndpointProfilesOperations; + /** The operation groups for BillingContainers */ + public readonly billingContainers: BillingContainersOperations; + /** The operation groups for DiscoveredAssets */ + public readonly discoveredAssets: DiscoveredAssetsOperations; + /** The operation groups for DiscoveredAssetEndpointProfiles */ + public readonly discoveredAssetEndpointProfiles: DiscoveredAssetEndpointProfilesOperations; + /** The operation groups for SchemaRegistries */ + public readonly schemaRegistries: SchemaRegistriesOperations; + /** The operation groups for Schemas */ + public readonly schemas: SchemasOperations; + /** The operation groups for SchemaVersions */ + public readonly schemaVersions: SchemaVersionsOperations; } diff --git a/sdk/deviceregistry/arm-deviceregistry/src/helpers/serializerHelpers.ts b/sdk/deviceregistry/arm-deviceregistry/src/helpers/serializerHelpers.ts new file mode 100644 index 000000000000..7518a16c2ee9 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/helpers/serializerHelpers.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export function serializeRecord( + item: Record, +): Record; +export function serializeRecord( + item: Record, + serializer: (item: T) => R, +): Record; +export function serializeRecord( + item: Record, + serializer?: (item: T) => R, +): Record { + return Object.keys(item).reduce( + (acc, key) => { + if (isSupportedRecordType(item[key])) { + acc[key] = item[key] as any; + } else if (serializer) { + const value = item[key]; + if (value !== undefined) { + acc[key] = serializer(value); + } + } else { + console.warn(`Don't know how to serialize ${item[key]}`); + acc[key] = item[key] as any; + } + return acc; + }, + {} as Record, + ); +} + +function isSupportedRecordType(t: any) { + return ["number", "string", "boolean", "null"].includes(typeof t) || t instanceof Date; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/index.ts index 282aa26cdb42..46a6f6570713 100644 --- a/sdk/deviceregistry/arm-deviceregistry/src/index.ts +++ b/sdk/deviceregistry/arm-deviceregistry/src/index.ts @@ -1,13 +1,150 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. -/// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { DeviceRegistryManagementClient } from "./deviceRegistryManagementClient"; -export * from "./operationsInterfaces"; +import { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; + +export { DeviceRegistryManagementClient } from "./deviceRegistryManagementClient.js"; +export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js"; +export { + SchemaVersion, + SchemaVersionProperties, + KnownProvisioningState, + ProvisioningState, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + ErrorDetail, + ErrorAdditionalInfo, + Schema, + SchemaProperties, + KnownFormat, + Format, + KnownSchemaType, + SchemaType, + SchemaRegistry, + SchemaRegistryProperties, + SystemAssignedServiceIdentity, + KnownSystemAssignedServiceIdentityType, + SystemAssignedServiceIdentityType, + TrackedResource, + SchemaRegistryUpdate, + SchemaRegistryUpdateProperties, + DiscoveredAssetEndpointProfile, + DiscoveredAssetEndpointProfileProperties, + KnownAuthenticationMethod, + AuthenticationMethod, + ExtendedLocation, + DiscoveredAssetEndpointProfileUpdate, + DiscoveredAssetEndpointProfileUpdateProperties, + DiscoveredAsset, + DiscoveredAssetProperties, + Topic, + KnownTopicRetainType, + TopicRetainType, + DiscoveredDataset, + DiscoveredDataPoint, + DiscoveredEvent, + DiscoveredAssetUpdate, + DiscoveredAssetUpdateProperties, + BillingContainer, + BillingContainerProperties, + AssetEndpointProfile, + AssetEndpointProfileProperties, + Authentication, + UsernamePasswordCredentials, + X509Credentials, + AssetEndpointProfileStatus, + AssetEndpointProfileStatusError, + AssetEndpointProfileUpdate, + AssetEndpointProfileUpdateProperties, + Asset, + AssetProperties, + Dataset, + DataPoint, + KnownDataPointObservabilityMode, + DataPointObservabilityMode, + Event, + KnownEventObservabilityMode, + EventObservabilityMode, + AssetStatus, + AssetStatusError, + AssetStatusDataset, + MessageSchemaReference, + AssetStatusEvent, + DataPointBase, + EventBase, + AssetUpdate, + AssetUpdateProperties, + OperationStatusResult, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + KnownVersions, +} from "./models/index.js"; +export { + DeviceRegistryManagementClientOptionalParams, + OperationsListOptionalParams, + OperationStatusGetOptionalParams, + AssetsGetOptionalParams, + AssetsCreateOrReplaceOptionalParams, + AssetsUpdateOptionalParams, + AssetsDeleteOptionalParams, + AssetsListByResourceGroupOptionalParams, + AssetsListBySubscriptionOptionalParams, + AssetEndpointProfilesGetOptionalParams, + AssetEndpointProfilesCreateOrReplaceOptionalParams, + AssetEndpointProfilesUpdateOptionalParams, + AssetEndpointProfilesDeleteOptionalParams, + AssetEndpointProfilesListByResourceGroupOptionalParams, + AssetEndpointProfilesListBySubscriptionOptionalParams, + BillingContainersGetOptionalParams, + BillingContainersListBySubscriptionOptionalParams, + DiscoveredAssetsGetOptionalParams, + DiscoveredAssetsCreateOrReplaceOptionalParams, + DiscoveredAssetsUpdateOptionalParams, + DiscoveredAssetsDeleteOptionalParams, + DiscoveredAssetsListByResourceGroupOptionalParams, + DiscoveredAssetsListBySubscriptionOptionalParams, + DiscoveredAssetEndpointProfilesGetOptionalParams, + DiscoveredAssetEndpointProfilesCreateOrReplaceOptionalParams, + DiscoveredAssetEndpointProfilesUpdateOptionalParams, + DiscoveredAssetEndpointProfilesDeleteOptionalParams, + DiscoveredAssetEndpointProfilesListByResourceGroupOptionalParams, + DiscoveredAssetEndpointProfilesListBySubscriptionOptionalParams, + SchemaRegistriesGetOptionalParams, + SchemaRegistriesCreateOrReplaceOptionalParams, + SchemaRegistriesUpdateOptionalParams, + SchemaRegistriesDeleteOptionalParams, + SchemaRegistriesListByResourceGroupOptionalParams, + SchemaRegistriesListBySubscriptionOptionalParams, + SchemasGetOptionalParams, + SchemasCreateOrReplaceOptionalParams, + SchemasDeleteOptionalParams, + SchemasListBySchemaRegistryOptionalParams, + SchemaVersionsGetOptionalParams, + SchemaVersionsCreateOrReplaceOptionalParams, + SchemaVersionsDeleteOptionalParams, + SchemaVersionsListBySchemaOptionalParams, +} from "./api/index.js"; +export { + AssetEndpointProfilesOperations, + AssetsOperations, + BillingContainersOperations, + DiscoveredAssetEndpointProfilesOperations, + DiscoveredAssetsOperations, + OperationsOperations, + OperationStatusOperations, + SchemaRegistriesOperations, + SchemasOperations, + SchemaVersionsOperations, +} from "./classic/index.js"; +export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/logger.ts b/sdk/deviceregistry/arm-deviceregistry/src/logger.ts new file mode 100644 index 000000000000..4ed09ebc54a8 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("arm-deviceregistry"); diff --git a/sdk/deviceregistry/arm-deviceregistry/src/lroImpl.ts b/sdk/deviceregistry/arm-deviceregistry/src/lroImpl.ts deleted file mode 100644 index 5f88efab981b..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/lroImpl.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { AbortSignalLike } from "@azure/abort-controller"; -import { LongRunningOperation, LroResponse } from "@azure/core-lro"; - -export function createLroSpec(inputs: { - sendOperationFn: (args: any, spec: any) => Promise>; - args: Record; - spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record; -}): LongRunningOperation { - const { args, spec, sendOperationFn } = inputs; - return { - requestMethod: spec.httpMethod, - requestPath: spec.path!, - sendInitialRequest: () => sendOperationFn(args, spec), - sendPollRequest: ( - path: string, - options?: { abortSignal?: AbortSignalLike }, - ) => { - const { requestBody, ...restSpec } = spec; - return sendOperationFn(args, { - ...restSpec, - httpMethod: "GET", - path, - abortSignal: options?.abortSignal, - }); - }, - }; -} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/models/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/models/index.ts index 9f8fc1b8b7ee..9d74b2d78782 100644 --- a/sdk/deviceregistry/arm-deviceregistry/src/models/index.ts +++ b/sdk/deviceregistry/arm-deviceregistry/src/models/index.ts @@ -1,866 +1,84 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ -export interface OperationListResult { - /** - * List of operations supported by the resource provider - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Operation[]; - /** - * URL to get the next set of operation list results (if there are any). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Details of a REST API operation, returned from the Resource Provider Operations API */ -export interface Operation { - /** - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDataAction?: boolean; - /** Localized display information for this particular operation. */ - display?: OperationDisplay; - /** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionType?: ActionType; -} - -/** Localized display information for this particular operation. */ -export interface OperationDisplay { - /** - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: string; - /** - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; - /** - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** The response of a AssetEndpointProfile list operation. */ -export interface AssetEndpointProfileListResult { - /** The AssetEndpointProfile items on this page */ - value: AssetEndpointProfile[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** Defines the Asset Endpoint Profile properties. */ -export interface AssetEndpointProfileProperties { - /** - * Globally unique, immutable, non-reusable id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uuid?: string; - /** The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration. */ - targetAddress: string; - /** Defines the client authentication mechanism to the server. */ - userAuthentication?: UserAuthentication; - /** Defines the authentication mechanism for the southbound connector connecting to the shop floor/OT device. */ - transportAuthentication?: TransportAuthentication; - /** Contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). */ - additionalConfiguration?: string; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Definition of the client authentication mechanism to the server. */ -export interface UserAuthentication { - /** Defines the mode to authenticate the user of the client at the server. */ - mode: UserAuthenticationMode; - /** Defines the username and password references when UsernamePassword user authentication mode is selected. */ - usernamePasswordCredentials?: UsernamePasswordCredentials; - /** Defines the certificate reference when Certificate user authentication mode is selected. */ - x509Credentials?: X509Credentials; -} - -/** The credentials for authentication mode UsernamePassword. */ -export interface UsernamePasswordCredentials { - /** A reference to secret containing the username. */ - usernameReference: string; - /** A reference to secret containing the password. */ - passwordReference: string; -} - -/** The x509 certificate for authentication mode Certificate. */ -export interface X509Credentials { - /** A reference to secret containing the certificate and private key (e.g. stored as .der/.pem or .der/.pfx). */ - certificateReference: string; -} - -/** Definition of the authentication mechanism for the southbound connector. */ -export interface TransportAuthentication { - /** Defines a reference to a secret which contains all certificates and private keys that can be used by the southbound connector connecting to the shop floor/OT device. The accepted extensions are .der for certificates and .pfx/.pem for private keys. */ - ownCertificates: OwnCertificate[]; -} - -/** Certificate or private key that can be used by the southbound connector connecting to the shop floor/OT device. The accepted extensions are .der for certificates and .pfx/.pem for private keys. */ -export interface OwnCertificate { - /** Certificate thumbprint. */ - certThumbprint?: string; - /** Secret Reference name (cert and private key). */ - certSecretReference?: string; - /** Secret Reference Name (Pfx or Pem password). */ - certPasswordReference?: string; -} - -/** The extended location. */ -export interface ExtendedLocation { - /** The extended location type. */ - type: string; - /** The extended location name. */ - name: string; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** The response of a Asset list operation. */ -export interface AssetListResult { - /** The Asset items on this page */ - value: Asset[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** Defines the asset properties. */ -export interface AssetProperties { - /** - * Globally unique, immutable, non-reusable id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uuid?: string; - /** Resource path to asset type (model) definition. */ - assetType?: string; - /** Enabled/Disabled status of the asset. */ - enabled?: boolean; - /** Asset id provided by the customer. */ - externalAssetId?: string; - /** Human-readable display name. */ - displayName?: string; - /** Human-readable description of the asset. */ - description?: string; - /** A reference to the asset endpoint profile (connection information) used by brokers to connect to an endpoint that provides data points for this asset. Must have the format /. */ - assetEndpointProfileUri: string; - /** - * An integer that is incremented each time the resource is modified. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly version?: number; - /** Asset manufacturer name. */ - manufacturer?: string; - /** Asset manufacturer URI. */ - manufacturerUri?: string; - /** Asset model name. */ - model?: string; - /** Asset product code. */ - productCode?: string; - /** Revision number of the hardware. */ - hardwareRevision?: string; - /** Revision number of the software. */ - softwareRevision?: string; - /** Reference to the documentation. */ - documentationUri?: string; - /** Asset serial number. */ - serialNumber?: string; - /** A set of key-value pairs that contain custom attributes set by the customer. */ - attributes?: { [propertyName: string]: any }; - /** Protocol-specific default configuration for all data points. Each data point can have its own configuration that overrides the default settings here. This assumes that each asset instance has one protocol. */ - defaultDataPointsConfiguration?: string; - /** Protocol-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. This assumes that each asset instance has one protocol. */ - defaultEventsConfiguration?: string; - /** Array of data points that are part of the asset. Each data point can reference an asset type capability and have per-data point configuration. See below for more details for the definition of the dataPoints element. */ - dataPoints?: DataPoint[]; - /** Array of events that are part of the asset. Each event can reference an asset type capability and have per-event configuration. See below for more details about the definition of the events element. */ - events?: Event[]; - /** - * Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: AssetStatus; - /** - * Provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Defines the data point properties. */ -export interface DataPoint { - /** The name of the data point. */ - name?: string; - /** The address of the source of the data in the asset (e.g. URL) so that a client can access the data source on the asset. */ - dataSource: string; - /** The path to the type definition of the capability (e.g. DTMI, OPC UA information model node id, etc.), for example dtmi:com:example:Robot:_contents:__prop1;1. */ - capabilityId?: string; - /** An indication of how the data point should be mapped to OpenTelemetry. */ - observabilityMode?: DataPointsObservabilityMode; - /** Protocol-specific configuration for the data point. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize. */ - dataPointConfiguration?: string; -} - -/** Defines the event properties. */ -export interface Event { - /** The name of the event. */ - name?: string; - /** The address of the notifier of the event in the asset (e.g. URL) so that a client can access the event on the asset. */ - eventNotifier: string; - /** The path to the type definition of the capability (e.g. DTMI, OPC UA information model node id, etc.), for example dtmi:com:example:Robot:_contents:__prop1;1. */ - capabilityId?: string; - /** An indication of how the event should be mapped to OpenTelemetry. */ - observabilityMode?: EventsObservabilityMode; - /** Protocol-specific configuration for the event. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize. */ - eventConfiguration?: string; -} - -/** Defines the asset status properties. */ -export interface AssetStatus { - /** Array object to transfer and persist errors that originate from the Edge. */ - errors?: AssetStatusError[]; - /** A read only incremental counter indicating the number of times the configuration has been modified from the perspective of the current actual (Edge) state of the Asset. Edge would be the only writer of this value and would sync back up to the cloud. In steady state, this should equal version. */ - version?: number; -} - -/** Defines the asset status error properties. */ -export interface AssetStatusError { - /** Error code for classification of errors (ex: 400, 404, 500, etc.). */ - code?: number; - /** Human readable helpful error message to provide additional context for error (ex: “capability Id 'foo' does not exist”). */ - message?: string; -} - -/** The current status of an async operation. */ -export interface OperationStatusResult { - /** Fully qualified ID for the async operation. */ - id?: string; - /** Name of the async operation. */ - name?: string; - /** Operation status. */ - status: string; - /** Percent of the operation that is complete. */ - percentComplete?: number; - /** The start time of the operation. */ - startTime?: Date; - /** The end time of the operation. */ - endTime?: Date; - /** The operations list. */ - operations?: OperationStatusResult[]; - /** If present, details of the operation error. */ - error?: ErrorDetail; -} - -/** The type used for update operations of the AssetEndpointProfile. */ -export interface AssetEndpointProfileUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The updatable properties of the AssetEndpointProfile. */ - properties?: AssetEndpointProfileUpdateProperties; -} - -/** The updatable properties of the AssetEndpointProfile. */ -export interface AssetEndpointProfileUpdateProperties { - /** The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration. */ - targetAddress?: string; - /** Defines the client authentication mechanism to the server. */ - userAuthentication?: UserAuthenticationUpdate; - /** Defines the authentication mechanism for the southbound connector connecting to the shop floor/OT device. */ - transportAuthentication?: TransportAuthenticationUpdate; - /** Contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). */ - additionalConfiguration?: string; -} - -/** Definition of the client authentication mechanism to the server. */ -export interface UserAuthenticationUpdate { - /** Defines the mode to authenticate the user of the client at the server. */ - mode?: UserAuthenticationMode; - /** Defines the username and password references when UsernamePassword user authentication mode is selected. */ - usernamePasswordCredentials?: UsernamePasswordCredentialsUpdate; - /** Defines the certificate reference when Certificate user authentication mode is selected. */ - x509Credentials?: X509CredentialsUpdate; -} - -/** The credentials for authentication mode UsernamePassword. */ -export interface UsernamePasswordCredentialsUpdate { - /** A reference to secret containing the username. */ - usernameReference?: string; - /** A reference to secret containing the password. */ - passwordReference?: string; -} - -/** The x509 certificate for authentication mode Certificate. */ -export interface X509CredentialsUpdate { - /** A reference to secret containing the certificate and private key (e.g. stored as .der/.pem or .der/.pfx). */ - certificateReference?: string; -} - -/** Definition of the authentication mechanism for the southbound connector. */ -export interface TransportAuthenticationUpdate { - /** Defines a reference to a secret which contains all certificates and private keys that can be used by the southbound connector connecting to the shop floor/OT device. The accepted extensions are .der for certificates and .pfx/.pem for private keys. */ - ownCertificates?: OwnCertificate[]; -} - -/** The type used for update operations of the Asset. */ -export interface AssetUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The updatable properties of the Asset. */ - properties?: AssetUpdateProperties; -} - -/** The updatable properties of the Asset. */ -export interface AssetUpdateProperties { - /** Resource path to asset type (model) definition. */ - assetType?: string; - /** Enabled/Disabled status of the asset. */ - enabled?: boolean; - /** Human-readable display name. */ - displayName?: string; - /** Human-readable description of the asset. */ - description?: string; - /** Asset manufacturer name. */ - manufacturer?: string; - /** Asset manufacturer URI. */ - manufacturerUri?: string; - /** Asset model name. */ - model?: string; - /** Asset product code. */ - productCode?: string; - /** Revision number of the hardware. */ - hardwareRevision?: string; - /** Revision number of the software. */ - softwareRevision?: string; - /** Reference to the documentation. */ - documentationUri?: string; - /** Asset serial number. */ - serialNumber?: string; - /** A set of key-value pairs that contain custom attributes set by the customer. */ - attributes?: { [propertyName: string]: any }; - /** Protocol-specific default configuration for all data points. Each data point can have its own configuration that overrides the default settings here. This assumes that each asset instance has one protocol. */ - defaultDataPointsConfiguration?: string; - /** Protocol-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. This assumes that each asset instance has one protocol. */ - defaultEventsConfiguration?: string; - /** Array of data points that are part of the asset. Each data point can reference an asset type capability and have per-data point configuration. See below for more details for the definition of the dataPoints element. */ - dataPoints?: DataPoint[]; - /** Array of events that are part of the asset. Each event can reference an asset type capability and have per-event configuration. See below for more details about the definition of the events element. */ - events?: Event[]; -} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** Asset Endpoint Profile definition. */ -export interface AssetEndpointProfile extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: AssetEndpointProfileProperties; - /** The extended location. */ - extendedLocation: ExtendedLocation; -} - -/** Asset definition. */ -export interface Asset extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: AssetProperties; - /** The extended location. */ - extendedLocation: ExtendedLocation; -} - -/** Defines headers for AssetEndpointProfiles_createOrReplace operation. */ -export interface AssetEndpointProfilesCreateOrReplaceHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for AssetEndpointProfiles_update operation. */ -export interface AssetEndpointProfilesUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for AssetEndpointProfiles_delete operation. */ -export interface AssetEndpointProfilesDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Assets_createOrReplace operation. */ -export interface AssetsCreateOrReplaceHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Assets_update operation. */ -export interface AssetsUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Assets_delete operation. */ -export interface AssetsDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** User */ - User = "user", - /** System */ - System = "system", - /** UserSystem */ - UserSystem = "user,system", -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** \ - * **user,system** - */ -export type Origin = string; - -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** Internal */ - Internal = "Internal", -} - -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal** - */ -export type ActionType = string; - -/** Known values of {@link UserAuthenticationMode} that the service accepts. */ -export enum KnownUserAuthenticationMode { - /** The user authentication mode is anonymous. */ - Anonymous = "Anonymous", - /** The user authentication mode is an x509 certificate. */ - Certificate = "Certificate", - /** The user authentication mode is a username and password. */ - UsernamePassword = "UsernamePassword", -} - -/** - * Defines values for UserAuthenticationMode. \ - * {@link KnownUserAuthenticationMode} can be used interchangeably with UserAuthenticationMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Anonymous**: The user authentication mode is anonymous. \ - * **Certificate**: The user authentication mode is an x509 certificate. \ - * **UsernamePassword**: The user authentication mode is a username and password. - */ -export type UserAuthenticationMode = string; - -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** Resource has been accepted by the server. */ - Accepted = "Accepted", -} - -/** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Accepted**: Resource has been accepted by the server. - */ -export type ProvisioningState = string; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key", -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - -/** Known values of {@link DataPointsObservabilityMode} that the service accepts. */ -export enum KnownDataPointsObservabilityMode { - /** No mapping to OpenTelemetry. */ - None = "none", - /** Map as counter to OpenTelemetry. */ - Counter = "counter", - /** Map as gauge to OpenTelemetry. */ - Gauge = "gauge", - /** Map as histogram to OpenTelemetry. */ - Histogram = "histogram", - /** Map as log to OpenTelemetry. */ - Log = "log", -} - -/** - * Defines values for DataPointsObservabilityMode. \ - * {@link KnownDataPointsObservabilityMode} can be used interchangeably with DataPointsObservabilityMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **none**: No mapping to OpenTelemetry. \ - * **counter**: Map as counter to OpenTelemetry. \ - * **gauge**: Map as gauge to OpenTelemetry. \ - * **histogram**: Map as histogram to OpenTelemetry. \ - * **log**: Map as log to OpenTelemetry. - */ -export type DataPointsObservabilityMode = string; - -/** Known values of {@link EventsObservabilityMode} that the service accepts. */ -export enum KnownEventsObservabilityMode { - /** No mapping to OpenTelemetry. */ - None = "none", - /** Map as log to OpenTelemetry. */ - Log = "log", -} - -/** - * Defines values for EventsObservabilityMode. \ - * {@link KnownEventsObservabilityMode} can be used interchangeably with EventsObservabilityMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **none**: No mapping to OpenTelemetry. \ - * **log**: Map as log to OpenTelemetry. - */ -export type EventsObservabilityMode = string; - -/** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; - -/** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; - -/** Optional parameters. */ -export interface AssetEndpointProfilesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type AssetEndpointProfilesListBySubscriptionResponse = - AssetEndpointProfileListResult; - -/** Optional parameters. */ -export interface AssetEndpointProfilesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type AssetEndpointProfilesListByResourceGroupResponse = - AssetEndpointProfileListResult; - -/** Optional parameters. */ -export interface AssetEndpointProfilesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AssetEndpointProfilesGetResponse = AssetEndpointProfile; - -/** Optional parameters. */ -export interface AssetEndpointProfilesCreateOrReplaceOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrReplace operation. */ -export type AssetEndpointProfilesCreateOrReplaceResponse = AssetEndpointProfile; - -/** Optional parameters. */ -export interface AssetEndpointProfilesUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type AssetEndpointProfilesUpdateResponse = AssetEndpointProfile; - -/** Optional parameters. */ -export interface AssetEndpointProfilesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type AssetEndpointProfilesDeleteResponse = - AssetEndpointProfilesDeleteHeaders; - -/** Optional parameters. */ -export interface AssetEndpointProfilesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type AssetEndpointProfilesListBySubscriptionNextResponse = - AssetEndpointProfileListResult; - -/** Optional parameters. */ -export interface AssetEndpointProfilesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type AssetEndpointProfilesListByResourceGroupNextResponse = - AssetEndpointProfileListResult; - -/** Optional parameters. */ -export interface AssetsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type AssetsListBySubscriptionResponse = AssetListResult; - -/** Optional parameters. */ -export interface AssetsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type AssetsListByResourceGroupResponse = AssetListResult; - -/** Optional parameters. */ -export interface AssetsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AssetsGetResponse = Asset; - -/** Optional parameters. */ -export interface AssetsCreateOrReplaceOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrReplace operation. */ -export type AssetsCreateOrReplaceResponse = Asset; - -/** Optional parameters. */ -export interface AssetsUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type AssetsUpdateResponse = Asset; - -/** Optional parameters. */ -export interface AssetsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type AssetsDeleteResponse = AssetsDeleteHeaders; - -/** Optional parameters. */ -export interface AssetsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type AssetsListBySubscriptionNextResponse = AssetListResult; - -/** Optional parameters. */ -export interface AssetsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type AssetsListByResourceGroupNextResponse = AssetListResult; - -/** Optional parameters. */ -export interface OperationStatusGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type OperationStatusGetResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface DeviceRegistryManagementClientOptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + SchemaVersion, + SchemaVersionProperties, + KnownProvisioningState, + ProvisioningState, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + ErrorDetail, + ErrorAdditionalInfo, + Schema, + SchemaProperties, + KnownFormat, + Format, + KnownSchemaType, + SchemaType, + SchemaRegistry, + SchemaRegistryProperties, + SystemAssignedServiceIdentity, + KnownSystemAssignedServiceIdentityType, + SystemAssignedServiceIdentityType, + TrackedResource, + SchemaRegistryUpdate, + SchemaRegistryUpdateProperties, + DiscoveredAssetEndpointProfile, + DiscoveredAssetEndpointProfileProperties, + KnownAuthenticationMethod, + AuthenticationMethod, + ExtendedLocation, + DiscoveredAssetEndpointProfileUpdate, + DiscoveredAssetEndpointProfileUpdateProperties, + DiscoveredAsset, + DiscoveredAssetProperties, + Topic, + KnownTopicRetainType, + TopicRetainType, + DiscoveredDataset, + DiscoveredDataPoint, + DiscoveredEvent, + DiscoveredAssetUpdate, + DiscoveredAssetUpdateProperties, + BillingContainer, + BillingContainerProperties, + AssetEndpointProfile, + AssetEndpointProfileProperties, + Authentication, + UsernamePasswordCredentials, + X509Credentials, + AssetEndpointProfileStatus, + AssetEndpointProfileStatusError, + AssetEndpointProfileUpdate, + AssetEndpointProfileUpdateProperties, + Asset, + AssetProperties, + Dataset, + DataPoint, + KnownDataPointObservabilityMode, + DataPointObservabilityMode, + Event, + KnownEventObservabilityMode, + EventObservabilityMode, + AssetStatus, + AssetStatusError, + AssetStatusDataset, + MessageSchemaReference, + AssetStatusEvent, + DataPointBase, + EventBase, + AssetUpdate, + AssetUpdateProperties, + OperationStatusResult, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + KnownVersions, +} from "./models.js"; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/models/mappers.ts b/sdk/deviceregistry/arm-deviceregistry/src/models/mappers.ts deleted file mode 100644 index ecf36abc97fc..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/models/mappers.ts +++ /dev/null @@ -1,1387 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, - type: { - name: "Boolean", - }, - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay", - }, - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String", - }, - }, - actionType: { - serializedName: "actionType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String", - }, - }, - resource: { - serializedName: "resource", - readOnly: true, - type: { - name: "String", - }, - }, - operation: { - serializedName: "operation", - readOnly: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - }, - }, - }, - }, - }, - }, -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const AssetEndpointProfileListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetEndpointProfileListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AssetEndpointProfile", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AssetEndpointProfileProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetEndpointProfileProperties", - modelProperties: { - uuid: { - serializedName: "uuid", - readOnly: true, - type: { - name: "String", - }, - }, - targetAddress: { - serializedName: "targetAddress", - required: true, - type: { - name: "String", - }, - }, - userAuthentication: { - serializedName: "userAuthentication", - type: { - name: "Composite", - className: "UserAuthentication", - }, - }, - transportAuthentication: { - serializedName: "transportAuthentication", - type: { - name: "Composite", - className: "TransportAuthentication", - }, - }, - additionalConfiguration: { - serializedName: "additionalConfiguration", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserAuthentication: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAuthentication", - modelProperties: { - mode: { - serializedName: "mode", - required: true, - type: { - name: "String", - }, - }, - usernamePasswordCredentials: { - serializedName: "usernamePasswordCredentials", - type: { - name: "Composite", - className: "UsernamePasswordCredentials", - }, - }, - x509Credentials: { - serializedName: "x509Credentials", - type: { - name: "Composite", - className: "X509Credentials", - }, - }, - }, - }, -}; - -export const UsernamePasswordCredentials: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UsernamePasswordCredentials", - modelProperties: { - usernameReference: { - serializedName: "usernameReference", - required: true, - type: { - name: "String", - }, - }, - passwordReference: { - serializedName: "passwordReference", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const X509Credentials: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "X509Credentials", - modelProperties: { - certificateReference: { - serializedName: "certificateReference", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TransportAuthentication: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TransportAuthentication", - modelProperties: { - ownCertificates: { - serializedName: "ownCertificates", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OwnCertificate", - }, - }, - }, - }, - }, - }, -}; - -export const OwnCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OwnCertificate", - modelProperties: { - certThumbprint: { - serializedName: "certThumbprint", - type: { - name: "String", - }, - }, - certSecretReference: { - serializedName: "certSecretReference", - type: { - name: "String", - }, - }, - certPasswordReference: { - serializedName: "certPasswordReference", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExtendedLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtendedLocation", - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - }, - }, -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String", - }, - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime", - }, - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const AssetListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Asset", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AssetProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetProperties", - modelProperties: { - uuid: { - serializedName: "uuid", - readOnly: true, - type: { - name: "String", - }, - }, - assetType: { - serializedName: "assetType", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "enabled", - type: { - name: "Boolean", - }, - }, - externalAssetId: { - serializedName: "externalAssetId", - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - assetEndpointProfileUri: { - serializedName: "assetEndpointProfileUri", - required: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "version", - readOnly: true, - type: { - name: "Number", - }, - }, - manufacturer: { - serializedName: "manufacturer", - type: { - name: "String", - }, - }, - manufacturerUri: { - serializedName: "manufacturerUri", - type: { - name: "String", - }, - }, - model: { - serializedName: "model", - type: { - name: "String", - }, - }, - productCode: { - serializedName: "productCode", - type: { - name: "String", - }, - }, - hardwareRevision: { - serializedName: "hardwareRevision", - type: { - name: "String", - }, - }, - softwareRevision: { - serializedName: "softwareRevision", - type: { - name: "String", - }, - }, - documentationUri: { - serializedName: "documentationUri", - type: { - name: "String", - }, - }, - serialNumber: { - serializedName: "serialNumber", - type: { - name: "String", - }, - }, - attributes: { - serializedName: "attributes", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - defaultDataPointsConfiguration: { - serializedName: "defaultDataPointsConfiguration", - type: { - name: "String", - }, - }, - defaultEventsConfiguration: { - serializedName: "defaultEventsConfiguration", - type: { - name: "String", - }, - }, - dataPoints: { - serializedName: "dataPoints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataPoint", - }, - }, - }, - }, - events: { - serializedName: "events", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Event", - }, - }, - }, - }, - status: { - serializedName: "status", - type: { - name: "Composite", - className: "AssetStatus", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DataPoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataPoint", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - dataSource: { - serializedName: "dataSource", - required: true, - type: { - name: "String", - }, - }, - capabilityId: { - serializedName: "capabilityId", - type: { - name: "String", - }, - }, - observabilityMode: { - defaultValue: "none", - serializedName: "observabilityMode", - type: { - name: "String", - }, - }, - dataPointConfiguration: { - serializedName: "dataPointConfiguration", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Event: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Event", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - eventNotifier: { - serializedName: "eventNotifier", - required: true, - type: { - name: "String", - }, - }, - capabilityId: { - serializedName: "capabilityId", - type: { - name: "String", - }, - }, - observabilityMode: { - defaultValue: "none", - serializedName: "observabilityMode", - type: { - name: "String", - }, - }, - eventConfiguration: { - serializedName: "eventConfiguration", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AssetStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetStatus", - modelProperties: { - errors: { - serializedName: "errors", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AssetStatusError", - }, - }, - }, - }, - version: { - serializedName: "version", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AssetStatusError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetStatusError", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "Number", - }, - }, - message: { - serializedName: "message", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationStatusResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationStatusResult", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - required: true, - type: { - name: "String", - }, - }, - percentComplete: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "percentComplete", - type: { - name: "Number", - }, - }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime", - }, - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime", - }, - }, - operations: { - serializedName: "operations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationStatusResult", - }, - }, - }, - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const AssetEndpointProfileUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetEndpointProfileUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AssetEndpointProfileUpdateProperties", - }, - }, - }, - }, -}; - -export const AssetEndpointProfileUpdateProperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "AssetEndpointProfileUpdateProperties", - modelProperties: { - targetAddress: { - serializedName: "targetAddress", - type: { - name: "String", - }, - }, - userAuthentication: { - serializedName: "userAuthentication", - type: { - name: "Composite", - className: "UserAuthenticationUpdate", - }, - }, - transportAuthentication: { - serializedName: "transportAuthentication", - type: { - name: "Composite", - className: "TransportAuthenticationUpdate", - }, - }, - additionalConfiguration: { - serializedName: "additionalConfiguration", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const UserAuthenticationUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAuthenticationUpdate", - modelProperties: { - mode: { - serializedName: "mode", - type: { - name: "String", - }, - }, - usernamePasswordCredentials: { - serializedName: "usernamePasswordCredentials", - type: { - name: "Composite", - className: "UsernamePasswordCredentialsUpdate", - }, - }, - x509Credentials: { - serializedName: "x509Credentials", - type: { - name: "Composite", - className: "X509CredentialsUpdate", - }, - }, - }, - }, -}; - -export const UsernamePasswordCredentialsUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UsernamePasswordCredentialsUpdate", - modelProperties: { - usernameReference: { - serializedName: "usernameReference", - type: { - name: "String", - }, - }, - passwordReference: { - serializedName: "passwordReference", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const X509CredentialsUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "X509CredentialsUpdate", - modelProperties: { - certificateReference: { - serializedName: "certificateReference", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TransportAuthenticationUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TransportAuthenticationUpdate", - modelProperties: { - ownCertificates: { - serializedName: "ownCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OwnCertificate", - }, - }, - }, - }, - }, - }, -}; - -export const AssetUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AssetUpdateProperties", - }, - }, - }, - }, -}; - -export const AssetUpdateProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetUpdateProperties", - modelProperties: { - assetType: { - serializedName: "assetType", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "enabled", - type: { - name: "Boolean", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - manufacturer: { - serializedName: "manufacturer", - type: { - name: "String", - }, - }, - manufacturerUri: { - serializedName: "manufacturerUri", - type: { - name: "String", - }, - }, - model: { - serializedName: "model", - type: { - name: "String", - }, - }, - productCode: { - serializedName: "productCode", - type: { - name: "String", - }, - }, - hardwareRevision: { - serializedName: "hardwareRevision", - type: { - name: "String", - }, - }, - softwareRevision: { - serializedName: "softwareRevision", - type: { - name: "String", - }, - }, - documentationUri: { - serializedName: "documentationUri", - type: { - name: "String", - }, - }, - serialNumber: { - serializedName: "serialNumber", - type: { - name: "String", - }, - }, - attributes: { - serializedName: "attributes", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - defaultDataPointsConfiguration: { - serializedName: "defaultDataPointsConfiguration", - type: { - name: "String", - }, - }, - defaultEventsConfiguration: { - serializedName: "defaultEventsConfiguration", - type: { - name: "String", - }, - }, - dataPoints: { - serializedName: "dataPoints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataPoint", - }, - }, - }, - }, - events: { - serializedName: "events", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Event", - }, - }, - }, - }, - }, - }, -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AssetEndpointProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetEndpointProfile", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AssetEndpointProfileProperties", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - }, - }, -}; - -export const Asset: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Asset", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AssetProperties", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - }, - }, -}; - -export const AssetEndpointProfilesCreateOrReplaceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "AssetEndpointProfilesCreateOrReplaceHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const AssetEndpointProfilesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetEndpointProfilesUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AssetEndpointProfilesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetEndpointProfilesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AssetsCreateOrReplaceHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetsCreateOrReplaceHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AssetsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetsUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AssetsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/models/models.ts b/sdk/deviceregistry/arm-deviceregistry/src/models/models.ts new file mode 100644 index 000000000000..0702d93da894 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/models/models.ts @@ -0,0 +1,2294 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** Schema version's definition. */ +export interface SchemaVersion extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: SchemaVersionProperties; +} + +export function schemaVersionSerializer(item: SchemaVersion): any { + return { + properties: !item["properties"] + ? item["properties"] + : schemaVersionPropertiesSerializer(item["properties"]), + }; +} + +export function schemaVersionDeserializer(item: any): SchemaVersion { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : schemaVersionPropertiesDeserializer(item["properties"]), + }; +} + +/** Defines the schema version properties. */ +export interface SchemaVersionProperties { + /** Globally unique, immutable, non-reusable id. */ + readonly uuid?: string; + /** Human-readable description of the schema. */ + description?: string; + /** Schema content. */ + schemaContent: string; + /** Hash of the schema content. */ + readonly hash?: string; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function schemaVersionPropertiesSerializer(item: SchemaVersionProperties): any { + return { + description: item["description"], + schemaContent: item["schemaContent"], + }; +} + +export function schemaVersionPropertiesDeserializer(item: any): SchemaVersionProperties { + return { + uuid: item["uuid"], + description: item["description"], + schemaContent: item["schemaContent"], + hash: item["hash"], + provisioningState: item["provisioningState"], + }; +} + +/** The provisioning status of the resource. */ +export enum KnownProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** Resource has been accepted by the server. */ + Accepted = "Accepted", + /** Resource is deleting. */ + Deleting = "Deleting", +} + +/** + * The provisioning status of the resource. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Accepted**: Resource has been accepted by the server. \ + * **Deleting**: Resource is deleting. + */ +export type ProvisioningState = string; + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +export function proxyResourceSerializer(item: ProxyResource): any { + return item; +} + +export function proxyResourceDeserializer(item: any): ProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */ + readonly id?: string; + /** The name of the resource */ + readonly name?: string; + /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ + readonly type?: string; + /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemData; +} + +export function resourceSerializer(item: Resource): any { + return item; +} + +export function resourceDeserializer(item: any): Resource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +export function systemDataDeserializer(item: any): SystemData { + return { + createdBy: item["createdBy"], + createdByType: item["createdByType"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + lastModifiedBy: item["lastModifiedBy"], + lastModifiedByType: item["lastModifiedByType"], + lastModifiedAt: !item["lastModifiedAt"] + ? item["lastModifiedAt"] + : new Date(item["lastModifiedAt"]), + }; +} + +/** The kind of entity that created the resource. */ +export enum KnownCreatedByType { + /** The entity was created by a user. */ + User = "User", + /** The entity was created by an application. */ + Application = "Application", + /** The entity was created by a managed identity. */ + ManagedIdentity = "ManagedIdentity", + /** The entity was created by a key. */ + Key = "Key", +} + +/** + * The kind of entity that created the resource. \ + * {@link KnowncreatedByType} can be used interchangeably with createdByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User**: The entity was created by a user. \ + * **Application**: The entity was created by an application. \ + * **ManagedIdentity**: The entity was created by a managed identity. \ + * **Key**: The entity was created by a key. + */ +export type CreatedByType = string; + +/** The error detail. */ +export interface ErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: ErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +export function errorDetailDeserializer(item: any): ErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function errorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: Record; +} + +export function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo { + return { + type: item["type"], + info: !item["info"] ? item["info"] : _errorAdditionalInfoInfoDeserializer(item["info"]), + }; +} + +/** model interface _ErrorAdditionalInfoInfo */ +export interface _ErrorAdditionalInfoInfo {} + +export function _errorAdditionalInfoInfoDeserializer(item: any): _ErrorAdditionalInfoInfo { + return item; +} + +/** The response of a SchemaVersion list operation. */ +export interface _SchemaVersionListResult { + /** The SchemaVersion items on this page */ + value: SchemaVersion[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _schemaVersionListResultDeserializer(item: any): _SchemaVersionListResult { + return { + value: schemaVersionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function schemaVersionArraySerializer(result: Array): any[] { + return result.map((item) => { + return schemaVersionSerializer(item); + }); +} + +export function schemaVersionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return schemaVersionDeserializer(item); + }); +} + +/** Schema definition. */ +export interface Schema extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: SchemaProperties; +} + +export function schemaSerializer(item: Schema): any { + return { + properties: !item["properties"] + ? item["properties"] + : schemaPropertiesSerializer(item["properties"]), + }; +} + +export function schemaDeserializer(item: any): Schema { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : schemaPropertiesDeserializer(item["properties"]), + }; +} + +/** Defines the schema properties. */ +export interface SchemaProperties { + /** Globally unique, immutable, non-reusable id. */ + readonly uuid?: string; + /** Human-readable display name. */ + displayName?: string; + /** Human-readable description of the schema. */ + description?: string; + /** Format of the schema. */ + format: Format; + /** Type of the schema. */ + schemaType: SchemaType; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; + /** Schema tags. */ + tags?: Record; +} + +export function schemaPropertiesSerializer(item: SchemaProperties): any { + return { + displayName: item["displayName"], + description: item["description"], + format: item["format"], + schemaType: item["schemaType"], + tags: item["tags"], + }; +} + +export function schemaPropertiesDeserializer(item: any): SchemaProperties { + return { + uuid: item["uuid"], + displayName: item["displayName"], + description: item["description"], + format: item["format"], + schemaType: item["schemaType"], + provisioningState: item["provisioningState"], + tags: item["tags"], + }; +} + +/** Defines the schema format. */ +export enum KnownFormat { + /** JSON Schema version draft 7 format */ + JsonSchemaDraft7 = "JsonSchema/draft-07", + /** Delta format */ + Delta_1_0 = "Delta/1.0", +} + +/** + * Defines the schema format. \ + * {@link KnownFormat} can be used interchangeably with Format, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **JsonSchema\/draft-07**: JSON Schema version draft 7 format \ + * **Delta\/1.0**: Delta format + */ +export type Format = string; + +/** Defines the schema type. */ +export enum KnownSchemaType { + /** Message Schema schema type */ + MessageSchema = "MessageSchema", +} + +/** + * Defines the schema type. \ + * {@link KnownSchemaType} can be used interchangeably with SchemaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MessageSchema**: Message Schema schema type + */ +export type SchemaType = string; + +/** The response of a Schema list operation. */ +export interface _SchemaListResult { + /** The Schema items on this page */ + value: Schema[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _schemaListResultDeserializer(item: any): _SchemaListResult { + return { + value: schemaArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function schemaArraySerializer(result: Array): any[] { + return result.map((item) => { + return schemaSerializer(item); + }); +} + +export function schemaArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return schemaDeserializer(item); + }); +} + +/** Schema registry definition. */ +export interface SchemaRegistry extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: SchemaRegistryProperties; + /** The managed service identities assigned to this resource. */ + identity?: SystemAssignedServiceIdentity; +} + +export function schemaRegistrySerializer(item: SchemaRegistry): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : schemaRegistryPropertiesSerializer(item["properties"]), + identity: !item["identity"] + ? item["identity"] + : systemAssignedServiceIdentitySerializer(item["identity"]), + }; +} + +export function schemaRegistryDeserializer(item: any): SchemaRegistry { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : schemaRegistryPropertiesDeserializer(item["properties"]), + identity: !item["identity"] + ? item["identity"] + : systemAssignedServiceIdentityDeserializer(item["identity"]), + }; +} + +/** Defines the schema registry properties. */ +export interface SchemaRegistryProperties { + /** Globally unique, immutable, non-reusable id. */ + readonly uuid?: string; + /** Schema registry namespace. Uniquely identifies a schema registry within a tenant. */ + namespace: string; + /** Human-readable display name. */ + displayName?: string; + /** Human-readable description of the schema registry. */ + description?: string; + /** The Storage Account's Container URL where schemas will be stored. */ + storageAccountContainerUrl: string; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function schemaRegistryPropertiesSerializer(item: SchemaRegistryProperties): any { + return { + namespace: item["namespace"], + displayName: item["displayName"], + description: item["description"], + storageAccountContainerUrl: item["storageAccountContainerUrl"], + }; +} + +export function schemaRegistryPropertiesDeserializer(item: any): SchemaRegistryProperties { + return { + uuid: item["uuid"], + namespace: item["namespace"], + displayName: item["displayName"], + description: item["description"], + storageAccountContainerUrl: item["storageAccountContainerUrl"], + provisioningState: item["provisioningState"], + }; +} + +/** Managed service identity (either system assigned, or none) */ +export interface SystemAssignedServiceIdentity { + /** The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. */ + readonly principalId?: string; + /** The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. */ + readonly tenantId?: string; + /** The type of managed identity assigned to this resource. */ + type: SystemAssignedServiceIdentityType; +} + +export function systemAssignedServiceIdentitySerializer(item: SystemAssignedServiceIdentity): any { + return { type: item["type"] }; +} + +export function systemAssignedServiceIdentityDeserializer( + item: any, +): SystemAssignedServiceIdentity { + return { + principalId: item["principalId"], + tenantId: item["tenantId"], + type: item["type"], + }; +} + +/** Type of managed service identity (either system assigned, or none). */ +export enum KnownSystemAssignedServiceIdentityType { + /** No managed system identity. */ + None = "None", + /** System assigned managed system identity. */ + SystemAssigned = "SystemAssigned", +} + +/** + * Type of managed service identity (either system assigned, or none). \ + * {@link KnownSystemAssignedServiceIdentityType} can be used interchangeably with SystemAssignedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No managed system identity. \ + * **SystemAssigned**: System assigned managed system identity. + */ +export type SystemAssignedServiceIdentityType = string; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location: string; +} + +export function trackedResourceSerializer(item: TrackedResource): any { + return { tags: item["tags"], location: item["location"] }; +} + +export function trackedResourceDeserializer(item: any): TrackedResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + tags: item["tags"], + location: item["location"], + }; +} + +/** The type used for update operations of the SchemaRegistry. */ +export interface SchemaRegistryUpdate { + /** The managed service identities assigned to this resource. */ + identity?: SystemAssignedServiceIdentity; + /** Resource tags. */ + tags?: Record; + /** The resource-specific properties for this resource. */ + properties?: SchemaRegistryUpdateProperties; +} + +export function schemaRegistryUpdateSerializer(item: SchemaRegistryUpdate): any { + return { + identity: !item["identity"] + ? item["identity"] + : systemAssignedServiceIdentitySerializer(item["identity"]), + tags: item["tags"], + properties: !item["properties"] + ? item["properties"] + : schemaRegistryUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** The updatable properties of the SchemaRegistry. */ +export interface SchemaRegistryUpdateProperties { + /** Human-readable display name. */ + displayName?: string; + /** Human-readable description of the schema registry. */ + description?: string; +} + +export function schemaRegistryUpdatePropertiesSerializer( + item: SchemaRegistryUpdateProperties, +): any { + return { displayName: item["displayName"], description: item["description"] }; +} + +/** The response of a SchemaRegistry list operation. */ +export interface _SchemaRegistryListResult { + /** The SchemaRegistry items on this page */ + value: SchemaRegistry[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _schemaRegistryListResultDeserializer(item: any): _SchemaRegistryListResult { + return { + value: schemaRegistryArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function schemaRegistryArraySerializer(result: Array): any[] { + return result.map((item) => { + return schemaRegistrySerializer(item); + }); +} + +export function schemaRegistryArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return schemaRegistryDeserializer(item); + }); +} + +/** Discovered Asset Endpoint Profile definition. */ +export interface DiscoveredAssetEndpointProfile extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: DiscoveredAssetEndpointProfileProperties; + /** The extended location. */ + extendedLocation: ExtendedLocation; +} + +export function discoveredAssetEndpointProfileSerializer( + item: DiscoveredAssetEndpointProfile, +): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : discoveredAssetEndpointProfilePropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function discoveredAssetEndpointProfileDeserializer( + item: any, +): DiscoveredAssetEndpointProfile { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : discoveredAssetEndpointProfilePropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the Discovered Asset Endpoint Profile properties. */ +export interface DiscoveredAssetEndpointProfileProperties { + /** The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration. */ + targetAddress: string; + /** Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). */ + additionalConfiguration?: string; + /** List of supported authentication methods supported by the target server. */ + supportedAuthenticationMethods?: AuthenticationMethod[]; + /** Defines the configuration for the connector type that is being used with the endpoint profile. */ + endpointProfileType: string; + /** Identifier used to detect changes in the asset endpoint profile. */ + discoveryId: string; + /** An integer that is incremented each time the resource is modified. */ + version: number; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function discoveredAssetEndpointProfilePropertiesSerializer( + item: DiscoveredAssetEndpointProfileProperties, +): any { + return { + targetAddress: item["targetAddress"], + additionalConfiguration: item["additionalConfiguration"], + supportedAuthenticationMethods: !item["supportedAuthenticationMethods"] + ? item["supportedAuthenticationMethods"] + : item["supportedAuthenticationMethods"].map((p: any) => { + return p; + }), + endpointProfileType: item["endpointProfileType"], + discoveryId: item["discoveryId"], + version: item["version"], + }; +} + +export function discoveredAssetEndpointProfilePropertiesDeserializer( + item: any, +): DiscoveredAssetEndpointProfileProperties { + return { + targetAddress: item["targetAddress"], + additionalConfiguration: item["additionalConfiguration"], + supportedAuthenticationMethods: !item["supportedAuthenticationMethods"] + ? item["supportedAuthenticationMethods"] + : item["supportedAuthenticationMethods"].map((p: any) => { + return p; + }), + endpointProfileType: item["endpointProfileType"], + discoveryId: item["discoveryId"], + version: item["version"], + provisioningState: item["provisioningState"], + }; +} + +/** The method to authenticate the user of the client at the server. */ +export enum KnownAuthenticationMethod { + /** The user authentication method is anonymous. */ + Anonymous = "Anonymous", + /** The user authentication method is an x509 certificate. */ + Certificate = "Certificate", + /** The user authentication method is a username and password. */ + UsernamePassword = "UsernamePassword", +} + +/** + * The method to authenticate the user of the client at the server. \ + * {@link KnownAuthenticationMethod} can be used interchangeably with AuthenticationMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Anonymous**: The user authentication method is anonymous. \ + * **Certificate**: The user authentication method is an x509 certificate. \ + * **UsernamePassword**: The user authentication method is a username and password. + */ +export type AuthenticationMethod = string; + +/** The extended location. */ +export interface ExtendedLocation { + /** The extended location type. */ + type: string; + /** The extended location name. */ + name: string; +} + +export function extendedLocationSerializer(item: ExtendedLocation): any { + return { type: item["type"], name: item["name"] }; +} + +export function extendedLocationDeserializer(item: any): ExtendedLocation { + return { + type: item["type"], + name: item["name"], + }; +} + +/** The type used for update operations of the DiscoveredAssetEndpointProfile. */ +export interface DiscoveredAssetEndpointProfileUpdate { + /** Resource tags. */ + tags?: Record; + /** The resource-specific properties for this resource. */ + properties?: DiscoveredAssetEndpointProfileUpdateProperties; +} + +export function discoveredAssetEndpointProfileUpdateSerializer( + item: DiscoveredAssetEndpointProfileUpdate, +): any { + return { + tags: item["tags"], + properties: !item["properties"] + ? item["properties"] + : discoveredAssetEndpointProfileUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** The updatable properties of the DiscoveredAssetEndpointProfile. */ +export interface DiscoveredAssetEndpointProfileUpdateProperties { + /** The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration. */ + targetAddress?: string; + /** Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). */ + additionalConfiguration?: string; + /** List of supported authentication methods supported by the target server. */ + supportedAuthenticationMethods?: AuthenticationMethod[]; + /** Defines the configuration for the connector type that is being used with the endpoint profile. */ + endpointProfileType?: string; + /** Identifier used to detect changes in the asset endpoint profile. */ + discoveryId?: string; + /** An integer that is incremented each time the resource is modified. */ + version?: number; +} + +export function discoveredAssetEndpointProfileUpdatePropertiesSerializer( + item: DiscoveredAssetEndpointProfileUpdateProperties, +): any { + return { + targetAddress: item["targetAddress"], + additionalConfiguration: item["additionalConfiguration"], + supportedAuthenticationMethods: !item["supportedAuthenticationMethods"] + ? item["supportedAuthenticationMethods"] + : item["supportedAuthenticationMethods"].map((p: any) => { + return p; + }), + endpointProfileType: item["endpointProfileType"], + discoveryId: item["discoveryId"], + version: item["version"], + }; +} + +/** The response of a DiscoveredAssetEndpointProfile list operation. */ +export interface _DiscoveredAssetEndpointProfileListResult { + /** The DiscoveredAssetEndpointProfile items on this page */ + value: DiscoveredAssetEndpointProfile[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _discoveredAssetEndpointProfileListResultDeserializer( + item: any, +): _DiscoveredAssetEndpointProfileListResult { + return { + value: discoveredAssetEndpointProfileArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function discoveredAssetEndpointProfileArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return discoveredAssetEndpointProfileSerializer(item); + }); +} + +export function discoveredAssetEndpointProfileArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return discoveredAssetEndpointProfileDeserializer(item); + }); +} + +/** Discovered Asset definition. */ +export interface DiscoveredAsset extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: DiscoveredAssetProperties; + /** The extended location. */ + extendedLocation: ExtendedLocation; +} + +export function discoveredAssetSerializer(item: DiscoveredAsset): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : discoveredAssetPropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function discoveredAssetDeserializer(item: any): DiscoveredAsset { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : discoveredAssetPropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the discovered asset properties. */ +export interface DiscoveredAssetProperties { + /** A reference to the asset endpoint profile (connection information) used by brokers to connect to an endpoint that provides data points for this asset. Must provide asset endpoint profile name. */ + assetEndpointProfileRef: string; + /** Identifier used to detect changes in the asset. */ + discoveryId: string; + /** An integer that is incremented each time the resource is modified. */ + version: number; + /** Asset manufacturer name. */ + manufacturer?: string; + /** Asset manufacturer URI. */ + manufacturerUri?: string; + /** Asset model name. */ + model?: string; + /** Asset product code. */ + productCode?: string; + /** Revision number of the hardware. */ + hardwareRevision?: string; + /** Revision number of the software. */ + softwareRevision?: string; + /** Reference to the documentation. */ + documentationUri?: string; + /** Asset serial number. */ + serialNumber?: string; + /** Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here. */ + defaultDatasetsConfiguration?: string; + /** Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. */ + defaultEventsConfiguration?: string; + /** Object that describes the default topic information for the asset. */ + defaultTopic?: Topic; + /** Array of datasets that are part of the asset. Each dataset spec describes the data points that make up the set. */ + datasets?: DiscoveredDataset[]; + /** Array of events that are part of the asset. Each event can have per-event configuration. */ + events?: DiscoveredEvent[]; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function discoveredAssetPropertiesSerializer(item: DiscoveredAssetProperties): any { + return { + assetEndpointProfileRef: item["assetEndpointProfileRef"], + discoveryId: item["discoveryId"], + version: item["version"], + manufacturer: item["manufacturer"], + manufacturerUri: item["manufacturerUri"], + model: item["model"], + productCode: item["productCode"], + hardwareRevision: item["hardwareRevision"], + softwareRevision: item["softwareRevision"], + documentationUri: item["documentationUri"], + serialNumber: item["serialNumber"], + defaultDatasetsConfiguration: item["defaultDatasetsConfiguration"], + defaultEventsConfiguration: item["defaultEventsConfiguration"], + defaultTopic: !item["defaultTopic"] + ? item["defaultTopic"] + : topicSerializer(item["defaultTopic"]), + datasets: !item["datasets"] + ? item["datasets"] + : discoveredDatasetArraySerializer(item["datasets"]), + events: !item["events"] ? item["events"] : discoveredEventArraySerializer(item["events"]), + }; +} + +export function discoveredAssetPropertiesDeserializer(item: any): DiscoveredAssetProperties { + return { + assetEndpointProfileRef: item["assetEndpointProfileRef"], + discoveryId: item["discoveryId"], + version: item["version"], + manufacturer: item["manufacturer"], + manufacturerUri: item["manufacturerUri"], + model: item["model"], + productCode: item["productCode"], + hardwareRevision: item["hardwareRevision"], + softwareRevision: item["softwareRevision"], + documentationUri: item["documentationUri"], + serialNumber: item["serialNumber"], + defaultDatasetsConfiguration: item["defaultDatasetsConfiguration"], + defaultEventsConfiguration: item["defaultEventsConfiguration"], + defaultTopic: !item["defaultTopic"] + ? item["defaultTopic"] + : topicDeserializer(item["defaultTopic"]), + datasets: !item["datasets"] + ? item["datasets"] + : discoveredDatasetArrayDeserializer(item["datasets"]), + events: !item["events"] ? item["events"] : discoveredEventArrayDeserializer(item["events"]), + provisioningState: item["provisioningState"], + }; +} + +/** Object that describes the topic information. */ +export interface Topic { + /** The topic path for messages published to an MQTT broker. */ + path: string; + /** When set to 'Keep', messages published to an MQTT broker will have the retain flag set. Default: 'Never'. */ + retain?: TopicRetainType; +} + +export function topicSerializer(item: Topic): any { + return { path: item["path"], retain: item["retain"] }; +} + +export function topicDeserializer(item: any): Topic { + return { + path: item["path"], + retain: item["retain"], + }; +} + +/** Topic retain types. */ +export enum KnownTopicRetainType { + /** Retain the messages. */ + Keep = "Keep", + /** Never retain messages. */ + Never = "Never", +} + +/** + * Topic retain types. \ + * {@link KnownTopicRetainType} can be used interchangeably with TopicRetainType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Keep**: Retain the messages. \ + * **Never**: Never retain messages. + */ +export type TopicRetainType = string; + +export function discoveredDatasetArraySerializer(result: Array): any[] { + return result.map((item) => { + return discoveredDatasetSerializer(item); + }); +} + +export function discoveredDatasetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return discoveredDatasetDeserializer(item); + }); +} + +/** Defines the dataset properties. */ +export interface DiscoveredDataset { + /** Name of the dataset. */ + name: string; + /** Stringified JSON that contains connector-specific properties that describes configuration for the specific dataset. */ + datasetConfiguration?: string; + /** Object that describes the topic information for the specific dataset. */ + topic?: Topic; + /** Array of data points that are part of the dataset. Each data point can have per-data point configuration. */ + dataPoints?: DiscoveredDataPoint[]; +} + +export function discoveredDatasetSerializer(item: DiscoveredDataset): any { + return { + name: item["name"], + datasetConfiguration: item["datasetConfiguration"], + topic: !item["topic"] ? item["topic"] : topicSerializer(item["topic"]), + dataPoints: !item["dataPoints"] + ? item["dataPoints"] + : discoveredDataPointArraySerializer(item["dataPoints"]), + }; +} + +export function discoveredDatasetDeserializer(item: any): DiscoveredDataset { + return { + name: item["name"], + datasetConfiguration: item["datasetConfiguration"], + topic: !item["topic"] ? item["topic"] : topicDeserializer(item["topic"]), + dataPoints: !item["dataPoints"] + ? item["dataPoints"] + : discoveredDataPointArrayDeserializer(item["dataPoints"]), + }; +} + +export function discoveredDataPointArraySerializer(result: Array): any[] { + return result.map((item) => { + return discoveredDataPointSerializer(item); + }); +} + +export function discoveredDataPointArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return discoveredDataPointDeserializer(item); + }); +} + +/** Defines the data point properties. */ +export interface DiscoveredDataPoint { + /** The name of the data point. */ + name: string; + /** The address of the source of the data in the asset (e.g. URL) so that a client can access the data source on the asset. */ + dataSource: string; + /** Stringified JSON that contains connector-specific configuration for the data point. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize. */ + dataPointConfiguration?: string; + /** UTC timestamp indicating when the data point was added or modified. */ + lastUpdatedOn?: Date; +} + +export function discoveredDataPointSerializer(item: DiscoveredDataPoint): any { + return { + name: item["name"], + dataSource: item["dataSource"], + dataPointConfiguration: item["dataPointConfiguration"], + lastUpdatedOn: item["lastUpdatedOn"]?.toISOString(), + }; +} + +export function discoveredDataPointDeserializer(item: any): DiscoveredDataPoint { + return { + name: item["name"], + dataSource: item["dataSource"], + dataPointConfiguration: item["dataPointConfiguration"], + lastUpdatedOn: !item["lastUpdatedOn"] ? item["lastUpdatedOn"] : new Date(item["lastUpdatedOn"]), + }; +} + +export function discoveredEventArraySerializer(result: Array): any[] { + return result.map((item) => { + return discoveredEventSerializer(item); + }); +} + +export function discoveredEventArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return discoveredEventDeserializer(item); + }); +} + +/** Defines the event properties. */ +export interface DiscoveredEvent { + /** The name of the event. */ + name: string; + /** The address of the notifier of the event in the asset (e.g. URL) so that a client can access the event on the asset. */ + eventNotifier: string; + /** Stringified JSON that contains connector-specific configuration for the event. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize. */ + eventConfiguration?: string; + /** Object that describes the topic information for the specific event. */ + topic?: Topic; + /** UTC timestamp indicating when the event was added or modified. */ + lastUpdatedOn?: Date; +} + +export function discoveredEventSerializer(item: DiscoveredEvent): any { + return { + name: item["name"], + eventNotifier: item["eventNotifier"], + eventConfiguration: item["eventConfiguration"], + topic: !item["topic"] ? item["topic"] : topicSerializer(item["topic"]), + lastUpdatedOn: item["lastUpdatedOn"]?.toISOString(), + }; +} + +export function discoveredEventDeserializer(item: any): DiscoveredEvent { + return { + name: item["name"], + eventNotifier: item["eventNotifier"], + eventConfiguration: item["eventConfiguration"], + topic: !item["topic"] ? item["topic"] : topicDeserializer(item["topic"]), + lastUpdatedOn: !item["lastUpdatedOn"] ? item["lastUpdatedOn"] : new Date(item["lastUpdatedOn"]), + }; +} + +/** The type used for update operations of the DiscoveredAsset. */ +export interface DiscoveredAssetUpdate { + /** Resource tags. */ + tags?: Record; + /** The resource-specific properties for this resource. */ + properties?: DiscoveredAssetUpdateProperties; +} + +export function discoveredAssetUpdateSerializer(item: DiscoveredAssetUpdate): any { + return { + tags: item["tags"], + properties: !item["properties"] + ? item["properties"] + : discoveredAssetUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** The updatable properties of the DiscoveredAsset. */ +export interface DiscoveredAssetUpdateProperties { + /** Identifier used to detect changes in the asset. */ + discoveryId?: string; + /** An integer that is incremented each time the resource is modified. */ + version?: number; + /** Asset manufacturer name. */ + manufacturer?: string; + /** Asset manufacturer URI. */ + manufacturerUri?: string; + /** Asset model name. */ + model?: string; + /** Asset product code. */ + productCode?: string; + /** Revision number of the hardware. */ + hardwareRevision?: string; + /** Revision number of the software. */ + softwareRevision?: string; + /** Reference to the documentation. */ + documentationUri?: string; + /** Asset serial number. */ + serialNumber?: string; + /** Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here. */ + defaultDatasetsConfiguration?: string; + /** Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. */ + defaultEventsConfiguration?: string; + /** Object that describes the default topic information for the asset. */ + defaultTopic?: Topic; + /** Array of datasets that are part of the asset. Each dataset spec describes the data points that make up the set. */ + datasets?: DiscoveredDataset[]; + /** Array of events that are part of the asset. Each event can have per-event configuration. */ + events?: DiscoveredEvent[]; +} + +export function discoveredAssetUpdatePropertiesSerializer( + item: DiscoveredAssetUpdateProperties, +): any { + return { + discoveryId: item["discoveryId"], + version: item["version"], + manufacturer: item["manufacturer"], + manufacturerUri: item["manufacturerUri"], + model: item["model"], + productCode: item["productCode"], + hardwareRevision: item["hardwareRevision"], + softwareRevision: item["softwareRevision"], + documentationUri: item["documentationUri"], + serialNumber: item["serialNumber"], + defaultDatasetsConfiguration: item["defaultDatasetsConfiguration"], + defaultEventsConfiguration: item["defaultEventsConfiguration"], + defaultTopic: !item["defaultTopic"] + ? item["defaultTopic"] + : topicSerializer(item["defaultTopic"]), + datasets: !item["datasets"] + ? item["datasets"] + : discoveredDatasetArraySerializer(item["datasets"]), + events: !item["events"] ? item["events"] : discoveredEventArraySerializer(item["events"]), + }; +} + +/** The response of a DiscoveredAsset list operation. */ +export interface _DiscoveredAssetListResult { + /** The DiscoveredAsset items on this page */ + value: DiscoveredAsset[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _discoveredAssetListResultDeserializer(item: any): _DiscoveredAssetListResult { + return { + value: discoveredAssetArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function discoveredAssetArraySerializer(result: Array): any[] { + return result.map((item) => { + return discoveredAssetSerializer(item); + }); +} + +export function discoveredAssetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return discoveredAssetDeserializer(item); + }); +} + +/** billingContainer Model as Azure resource whose sole purpose is to keep track of billables resources under a subscription. */ +export interface BillingContainer extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: BillingContainerProperties; + /** Resource ETag */ + readonly etag?: string; +} + +export function billingContainerDeserializer(item: any): BillingContainer { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : billingContainerPropertiesDeserializer(item["properties"]), + etag: item["etag"], + }; +} + +/** Defines the billingContainer properties. */ +export interface BillingContainerProperties { + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function billingContainerPropertiesDeserializer(item: any): BillingContainerProperties { + return { + provisioningState: item["provisioningState"], + }; +} + +/** The response of a BillingContainer list operation. */ +export interface _BillingContainerListResult { + /** The BillingContainer items on this page */ + value: BillingContainer[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _billingContainerListResultDeserializer(item: any): _BillingContainerListResult { + return { + value: billingContainerArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function billingContainerArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return billingContainerDeserializer(item); + }); +} + +/** Asset Endpoint Profile definition. */ +export interface AssetEndpointProfile extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: AssetEndpointProfileProperties; + /** The extended location. */ + extendedLocation: ExtendedLocation; +} + +export function assetEndpointProfileSerializer(item: AssetEndpointProfile): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : assetEndpointProfilePropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function assetEndpointProfileDeserializer(item: any): AssetEndpointProfile { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : assetEndpointProfilePropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the Asset Endpoint Profile properties. */ +export interface AssetEndpointProfileProperties { + /** Globally unique, immutable, non-reusable id. */ + readonly uuid?: string; + /** The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration. */ + targetAddress: string; + /** Defines the configuration for the connector type that is being used with the endpoint profile. */ + endpointProfileType: string; + /** Defines the client authentication mechanism to the server. */ + authentication?: Authentication; + /** Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). */ + additionalConfiguration?: string; + /** Reference to a discovered asset endpoint profile. Populated only if the asset endpoint profile has been created from discovery flow. Discovered asset endpoint profile name must be provided. */ + discoveredAssetEndpointProfileRef?: string; + /** Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources. */ + readonly status?: AssetEndpointProfileStatus; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function assetEndpointProfilePropertiesSerializer( + item: AssetEndpointProfileProperties, +): any { + return { + targetAddress: item["targetAddress"], + endpointProfileType: item["endpointProfileType"], + authentication: !item["authentication"] + ? item["authentication"] + : authenticationSerializer(item["authentication"]), + additionalConfiguration: item["additionalConfiguration"], + discoveredAssetEndpointProfileRef: item["discoveredAssetEndpointProfileRef"], + }; +} + +export function assetEndpointProfilePropertiesDeserializer( + item: any, +): AssetEndpointProfileProperties { + return { + uuid: item["uuid"], + targetAddress: item["targetAddress"], + endpointProfileType: item["endpointProfileType"], + authentication: !item["authentication"] + ? item["authentication"] + : authenticationDeserializer(item["authentication"]), + additionalConfiguration: item["additionalConfiguration"], + discoveredAssetEndpointProfileRef: item["discoveredAssetEndpointProfileRef"], + status: !item["status"] + ? item["status"] + : assetEndpointProfileStatusDeserializer(item["status"]), + provisioningState: item["provisioningState"], + }; +} + +/** Definition of the client authentication mechanism to the server. */ +export interface Authentication { + /** Defines the method to authenticate the user of the client at the server. */ + method: AuthenticationMethod; + /** Defines the username and password references when UsernamePassword user authentication mode is selected. */ + usernamePasswordCredentials?: UsernamePasswordCredentials; + /** Defines the certificate reference when Certificate user authentication mode is selected. */ + x509Credentials?: X509Credentials; +} + +export function authenticationSerializer(item: Authentication): any { + return { + method: item["method"], + usernamePasswordCredentials: !item["usernamePasswordCredentials"] + ? item["usernamePasswordCredentials"] + : usernamePasswordCredentialsSerializer(item["usernamePasswordCredentials"]), + x509Credentials: !item["x509Credentials"] + ? item["x509Credentials"] + : x509CredentialsSerializer(item["x509Credentials"]), + }; +} + +export function authenticationDeserializer(item: any): Authentication { + return { + method: item["method"], + usernamePasswordCredentials: !item["usernamePasswordCredentials"] + ? item["usernamePasswordCredentials"] + : usernamePasswordCredentialsDeserializer(item["usernamePasswordCredentials"]), + x509Credentials: !item["x509Credentials"] + ? item["x509Credentials"] + : x509CredentialsDeserializer(item["x509Credentials"]), + }; +} + +/** The credentials for authentication mode UsernamePassword. */ +export interface UsernamePasswordCredentials { + /** The name of the secret containing the username. */ + usernameSecretName: string; + /** The name of the secret containing the password. */ + passwordSecretName: string; +} + +export function usernamePasswordCredentialsSerializer(item: UsernamePasswordCredentials): any { + return { + usernameSecretName: item["usernameSecretName"], + passwordSecretName: item["passwordSecretName"], + }; +} + +export function usernamePasswordCredentialsDeserializer(item: any): UsernamePasswordCredentials { + return { + usernameSecretName: item["usernameSecretName"], + passwordSecretName: item["passwordSecretName"], + }; +} + +/** The x509 certificate for authentication mode Certificate. */ +export interface X509Credentials { + /** The name of the secret containing the certificate and private key (e.g. stored as .der/.pem or .der/.pfx). */ + certificateSecretName: string; +} + +export function x509CredentialsSerializer(item: X509Credentials): any { + return { certificateSecretName: item["certificateSecretName"] }; +} + +export function x509CredentialsDeserializer(item: any): X509Credentials { + return { + certificateSecretName: item["certificateSecretName"], + }; +} + +/** Defines the asset endpoint profile status properties. */ +export interface AssetEndpointProfileStatus { + /** Array object to transfer and persist errors that originate from the Edge. */ + readonly errors?: AssetEndpointProfileStatusError[]; +} + +export function assetEndpointProfileStatusDeserializer(item: any): AssetEndpointProfileStatus { + return { + errors: !item["errors"] + ? item["errors"] + : assetEndpointProfileStatusErrorArrayDeserializer(item["errors"]), + }; +} + +export function assetEndpointProfileStatusErrorArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return assetEndpointProfileStatusErrorDeserializer(item); + }); +} + +/** Defines the asset endpoint profile status error properties. */ +export interface AssetEndpointProfileStatusError { + /** Error code for classification of errors (ex: 400, 404, 500, etc.). */ + readonly code?: number; + /** Human readable helpful error message to provide additional context for error (ex: “targetAddress 'foo' is not a valid url”). */ + readonly message?: string; +} + +export function assetEndpointProfileStatusErrorDeserializer( + item: any, +): AssetEndpointProfileStatusError { + return { + code: item["code"], + message: item["message"], + }; +} + +/** The type used for update operations of the AssetEndpointProfile. */ +export interface AssetEndpointProfileUpdate { + /** Resource tags. */ + tags?: Record; + /** The resource-specific properties for this resource. */ + properties?: AssetEndpointProfileUpdateProperties; +} + +export function assetEndpointProfileUpdateSerializer(item: AssetEndpointProfileUpdate): any { + return { + tags: item["tags"], + properties: !item["properties"] + ? item["properties"] + : assetEndpointProfileUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** The updatable properties of the AssetEndpointProfile. */ +export interface AssetEndpointProfileUpdateProperties { + /** The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration. */ + targetAddress?: string; + /** Defines the configuration for the connector type that is being used with the endpoint profile. */ + endpointProfileType?: string; + /** Defines the client authentication mechanism to the server. */ + authentication?: Authentication; + /** Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). */ + additionalConfiguration?: string; +} + +export function assetEndpointProfileUpdatePropertiesSerializer( + item: AssetEndpointProfileUpdateProperties, +): any { + return { + targetAddress: item["targetAddress"], + endpointProfileType: item["endpointProfileType"], + authentication: !item["authentication"] + ? item["authentication"] + : authenticationSerializer(item["authentication"]), + additionalConfiguration: item["additionalConfiguration"], + }; +} + +/** The response of a AssetEndpointProfile list operation. */ +export interface _AssetEndpointProfileListResult { + /** The AssetEndpointProfile items on this page */ + value: AssetEndpointProfile[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _assetEndpointProfileListResultDeserializer( + item: any, +): _AssetEndpointProfileListResult { + return { + value: assetEndpointProfileArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function assetEndpointProfileArraySerializer(result: Array): any[] { + return result.map((item) => { + return assetEndpointProfileSerializer(item); + }); +} + +export function assetEndpointProfileArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return assetEndpointProfileDeserializer(item); + }); +} + +/** Asset definition. */ +export interface Asset extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: AssetProperties; + /** The extended location. */ + extendedLocation: ExtendedLocation; +} + +export function assetSerializer(item: Asset): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : assetPropertiesSerializer(item["properties"]), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function assetDeserializer(item: any): Asset { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : assetPropertiesDeserializer(item["properties"]), + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** Defines the asset properties. */ +export interface AssetProperties { + /** Globally unique, immutable, non-reusable id. */ + readonly uuid?: string; + /** Enabled/Disabled status of the asset. */ + enabled?: boolean; + /** Asset id provided by the customer. */ + externalAssetId?: string; + /** Human-readable display name. */ + displayName?: string; + /** Human-readable description of the asset. */ + description?: string; + /** A reference to the asset endpoint profile (connection information) used by brokers to connect to an endpoint that provides data points for this asset. Must provide asset endpoint profile name. */ + assetEndpointProfileRef: string; + /** An integer that is incremented each time the resource is modified. */ + readonly version?: number; + /** Asset manufacturer name. */ + manufacturer?: string; + /** Asset manufacturer URI. */ + manufacturerUri?: string; + /** Asset model name. */ + model?: string; + /** Asset product code. */ + productCode?: string; + /** Revision number of the hardware. */ + hardwareRevision?: string; + /** Revision number of the software. */ + softwareRevision?: string; + /** Reference to the documentation. */ + documentationUri?: string; + /** Asset serial number. */ + serialNumber?: string; + /** A set of key-value pairs that contain custom attributes set by the customer. */ + attributes?: Record; + /** Reference to a list of discovered assets. Populated only if the asset has been created from discovery flow. Discovered asset names must be provided. */ + discoveredAssetRefs?: string[]; + /** Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here. */ + defaultDatasetsConfiguration?: string; + /** Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. */ + defaultEventsConfiguration?: string; + /** Object that describes the default topic information for the asset. */ + defaultTopic?: Topic; + /** Array of datasets that are part of the asset. Each dataset describes the data points that make up the set. */ + datasets?: Dataset[]; + /** Array of events that are part of the asset. Each event can have per-event configuration. */ + events?: Event[]; + /** Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources. */ + readonly status?: AssetStatus; + /** Provisioning state of the resource. */ + readonly provisioningState?: ProvisioningState; +} + +export function assetPropertiesSerializer(item: AssetProperties): any { + return { + enabled: item["enabled"], + externalAssetId: item["externalAssetId"], + displayName: item["displayName"], + description: item["description"], + assetEndpointProfileRef: item["assetEndpointProfileRef"], + manufacturer: item["manufacturer"], + manufacturerUri: item["manufacturerUri"], + model: item["model"], + productCode: item["productCode"], + hardwareRevision: item["hardwareRevision"], + softwareRevision: item["softwareRevision"], + documentationUri: item["documentationUri"], + serialNumber: item["serialNumber"], + attributes: item["attributes"], + discoveredAssetRefs: !item["discoveredAssetRefs"] + ? item["discoveredAssetRefs"] + : item["discoveredAssetRefs"].map((p: any) => { + return p; + }), + defaultDatasetsConfiguration: item["defaultDatasetsConfiguration"], + defaultEventsConfiguration: item["defaultEventsConfiguration"], + defaultTopic: !item["defaultTopic"] + ? item["defaultTopic"] + : topicSerializer(item["defaultTopic"]), + datasets: !item["datasets"] ? item["datasets"] : datasetArraySerializer(item["datasets"]), + events: !item["events"] ? item["events"] : eventArraySerializer(item["events"]), + }; +} + +export function assetPropertiesDeserializer(item: any): AssetProperties { + return { + uuid: item["uuid"], + enabled: item["enabled"], + externalAssetId: item["externalAssetId"], + displayName: item["displayName"], + description: item["description"], + assetEndpointProfileRef: item["assetEndpointProfileRef"], + version: item["version"], + manufacturer: item["manufacturer"], + manufacturerUri: item["manufacturerUri"], + model: item["model"], + productCode: item["productCode"], + hardwareRevision: item["hardwareRevision"], + softwareRevision: item["softwareRevision"], + documentationUri: item["documentationUri"], + serialNumber: item["serialNumber"], + attributes: item["attributes"], + discoveredAssetRefs: !item["discoveredAssetRefs"] + ? item["discoveredAssetRefs"] + : item["discoveredAssetRefs"].map((p: any) => { + return p; + }), + defaultDatasetsConfiguration: item["defaultDatasetsConfiguration"], + defaultEventsConfiguration: item["defaultEventsConfiguration"], + defaultTopic: !item["defaultTopic"] + ? item["defaultTopic"] + : topicDeserializer(item["defaultTopic"]), + datasets: !item["datasets"] ? item["datasets"] : datasetArrayDeserializer(item["datasets"]), + events: !item["events"] ? item["events"] : eventArrayDeserializer(item["events"]), + status: !item["status"] ? item["status"] : assetStatusDeserializer(item["status"]), + provisioningState: item["provisioningState"], + }; +} + +export function datasetArraySerializer(result: Array): any[] { + return result.map((item) => { + return datasetSerializer(item); + }); +} + +export function datasetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return datasetDeserializer(item); + }); +} + +/** Defines the dataset properties. */ +export interface Dataset { + /** Name of the dataset. */ + name: string; + /** Stringified JSON that contains connector-specific JSON string that describes configuration for the specific dataset. */ + datasetConfiguration?: string; + /** Object that describes the topic information for the specific dataset. */ + topic?: Topic; + /** Array of data points that are part of the dataset. Each data point can have per-data point configuration. */ + dataPoints?: DataPoint[]; +} + +export function datasetSerializer(item: Dataset): any { + return { + name: item["name"], + datasetConfiguration: item["datasetConfiguration"], + topic: !item["topic"] ? item["topic"] : topicSerializer(item["topic"]), + dataPoints: !item["dataPoints"] + ? item["dataPoints"] + : dataPointArraySerializer(item["dataPoints"]), + }; +} + +export function datasetDeserializer(item: any): Dataset { + return { + name: item["name"], + datasetConfiguration: item["datasetConfiguration"], + topic: !item["topic"] ? item["topic"] : topicDeserializer(item["topic"]), + dataPoints: !item["dataPoints"] + ? item["dataPoints"] + : dataPointArrayDeserializer(item["dataPoints"]), + }; +} + +export function dataPointArraySerializer(result: Array): any[] { + return result.map((item) => { + return dataPointSerializer(item); + }); +} + +export function dataPointArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return dataPointDeserializer(item); + }); +} + +/** Defines the data point properties. */ +export interface DataPoint extends DataPointBase { + /** An indication of how the data point should be mapped to OpenTelemetry. */ + observabilityMode?: DataPointObservabilityMode; +} + +export function dataPointSerializer(item: DataPoint): any { + return { + name: item["name"], + dataSource: item["dataSource"], + dataPointConfiguration: item["dataPointConfiguration"], + observabilityMode: item["observabilityMode"], + }; +} + +export function dataPointDeserializer(item: any): DataPoint { + return { + name: item["name"], + dataSource: item["dataSource"], + dataPointConfiguration: item["dataPointConfiguration"], + observabilityMode: item["observabilityMode"], + }; +} + +/** Defines the data point observability mode. */ +export enum KnownDataPointObservabilityMode { + /** No mapping to OpenTelemetry. */ + None = "None", + /** Map as counter to OpenTelemetry. */ + Counter = "Counter", + /** Map as gauge to OpenTelemetry. */ + Gauge = "Gauge", + /** Map as histogram to OpenTelemetry. */ + Histogram = "Histogram", + /** Map as log to OpenTelemetry. */ + Log = "Log", +} + +/** + * Defines the data point observability mode. \ + * {@link KnownDataPointObservabilityMode} can be used interchangeably with DataPointObservabilityMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No mapping to OpenTelemetry. \ + * **Counter**: Map as counter to OpenTelemetry. \ + * **Gauge**: Map as gauge to OpenTelemetry. \ + * **Histogram**: Map as histogram to OpenTelemetry. \ + * **Log**: Map as log to OpenTelemetry. + */ +export type DataPointObservabilityMode = string; + +export function eventArraySerializer(result: Array): any[] { + return result.map((item) => { + return eventSerializer(item); + }); +} + +export function eventArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return eventDeserializer(item); + }); +} + +/** Defines the event properties. */ +export interface Event extends EventBase { + /** An indication of how the event should be mapped to OpenTelemetry. */ + observabilityMode?: EventObservabilityMode; +} + +export function eventSerializer(item: Event): any { + return { + name: item["name"], + eventNotifier: item["eventNotifier"], + eventConfiguration: item["eventConfiguration"], + topic: !item["topic"] ? item["topic"] : topicSerializer(item["topic"]), + observabilityMode: item["observabilityMode"], + }; +} + +export function eventDeserializer(item: any): Event { + return { + name: item["name"], + eventNotifier: item["eventNotifier"], + eventConfiguration: item["eventConfiguration"], + topic: !item["topic"] ? item["topic"] : topicDeserializer(item["topic"]), + observabilityMode: item["observabilityMode"], + }; +} + +/** Defines the event observability mode. */ +export enum KnownEventObservabilityMode { + /** No mapping to OpenTelemetry. */ + None = "None", + /** Map as log to OpenTelemetry. */ + Log = "Log", +} + +/** + * Defines the event observability mode. \ + * {@link KnownEventObservabilityMode} can be used interchangeably with EventObservabilityMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No mapping to OpenTelemetry. \ + * **Log**: Map as log to OpenTelemetry. + */ +export type EventObservabilityMode = string; + +/** Defines the asset status properties. */ +export interface AssetStatus { + /** Array object to transfer and persist errors that originate from the Edge. */ + readonly errors?: AssetStatusError[]; + /** A read only incremental counter indicating the number of times the configuration has been modified from the perspective of the current actual (Edge) state of the Asset. Edge would be the only writer of this value and would sync back up to the cloud. In steady state, this should equal version. */ + readonly version?: number; + /** Array of dataset statuses that describe the status of each dataset. */ + readonly datasets?: AssetStatusDataset[]; + /** Array of event statuses that describe the status of each event. */ + readonly events?: AssetStatusEvent[]; +} + +export function assetStatusDeserializer(item: any): AssetStatus { + return { + errors: !item["errors"] ? item["errors"] : assetStatusErrorArrayDeserializer(item["errors"]), + version: item["version"], + datasets: !item["datasets"] + ? item["datasets"] + : assetStatusDatasetArrayDeserializer(item["datasets"]), + events: !item["events"] ? item["events"] : assetStatusEventArrayDeserializer(item["events"]), + }; +} + +export function assetStatusErrorArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return assetStatusErrorDeserializer(item); + }); +} + +/** Defines the asset status error properties. */ +export interface AssetStatusError { + /** Error code for classification of errors (ex: 400, 404, 500, etc.). */ + readonly code?: number; + /** Human readable helpful error message to provide additional context for error (ex: “capability Id 'foo' does not exist”). */ + readonly message?: string; +} + +export function assetStatusErrorDeserializer(item: any): AssetStatusError { + return { + code: item["code"], + message: item["message"], + }; +} + +export function assetStatusDatasetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return assetStatusDatasetDeserializer(item); + }); +} + +/** Defines the asset status dataset properties. */ +export interface AssetStatusDataset { + /** The name of the dataset. Must be unique within the status.datasets array. This name is used to correlate between the spec and status dataset information. */ + readonly name: string; + /** The message schema reference object. */ + readonly messageSchemaReference?: MessageSchemaReference; +} + +export function assetStatusDatasetDeserializer(item: any): AssetStatusDataset { + return { + name: item["name"], + messageSchemaReference: !item["messageSchemaReference"] + ? item["messageSchemaReference"] + : messageSchemaReferenceDeserializer(item["messageSchemaReference"]), + }; +} + +/** Defines the message schema reference properties. */ +export interface MessageSchemaReference { + /** The message schema registry namespace. */ + readonly schemaRegistryNamespace: string; + /** The message schema name. */ + readonly schemaName: string; + /** The message schema version. */ + readonly schemaVersion: string; +} + +export function messageSchemaReferenceDeserializer(item: any): MessageSchemaReference { + return { + schemaRegistryNamespace: item["schemaRegistryNamespace"], + schemaName: item["schemaName"], + schemaVersion: item["schemaVersion"], + }; +} + +export function assetStatusEventArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return assetStatusEventDeserializer(item); + }); +} + +/** Defines the asset status event properties. */ +export interface AssetStatusEvent { + /** The name of the event. Must be unique within the status.events array. This name is used to correlate between the spec and status event information. */ + readonly name: string; + /** The message schema reference object. */ + readonly messageSchemaReference?: MessageSchemaReference; +} + +export function assetStatusEventDeserializer(item: any): AssetStatusEvent { + return { + name: item["name"], + messageSchemaReference: !item["messageSchemaReference"] + ? item["messageSchemaReference"] + : messageSchemaReferenceDeserializer(item["messageSchemaReference"]), + }; +} + +/** Defines the data point properties. */ +export interface DataPointBase { + /** The name of the data point. */ + name: string; + /** The address of the source of the data in the asset (e.g. URL) so that a client can access the data source on the asset. */ + dataSource: string; + /** Stringified JSON that contains connector-specific configuration for the data point. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize. */ + dataPointConfiguration?: string; +} + +export function dataPointBaseSerializer(item: DataPointBase): any { + return { + name: item["name"], + dataSource: item["dataSource"], + dataPointConfiguration: item["dataPointConfiguration"], + }; +} + +export function dataPointBaseDeserializer(item: any): DataPointBase { + return { + name: item["name"], + dataSource: item["dataSource"], + dataPointConfiguration: item["dataPointConfiguration"], + }; +} + +/** Defines the event properties. */ +export interface EventBase { + /** The name of the event. */ + name: string; + /** The address of the notifier of the event in the asset (e.g. URL) so that a client can access the event on the asset. */ + eventNotifier: string; + /** Stringified JSON that contains connector-specific configuration for the event. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize. */ + eventConfiguration?: string; + /** Object that describes the topic information for the specific event. */ + topic?: Topic; +} + +export function eventBaseSerializer(item: EventBase): any { + return { + name: item["name"], + eventNotifier: item["eventNotifier"], + eventConfiguration: item["eventConfiguration"], + topic: !item["topic"] ? item["topic"] : topicSerializer(item["topic"]), + }; +} + +export function eventBaseDeserializer(item: any): EventBase { + return { + name: item["name"], + eventNotifier: item["eventNotifier"], + eventConfiguration: item["eventConfiguration"], + topic: !item["topic"] ? item["topic"] : topicDeserializer(item["topic"]), + }; +} + +/** The type used for update operations of the Asset. */ +export interface AssetUpdate { + /** Resource tags. */ + tags?: Record; + /** The resource-specific properties for this resource. */ + properties?: AssetUpdateProperties; +} + +export function assetUpdateSerializer(item: AssetUpdate): any { + return { + tags: item["tags"], + properties: !item["properties"] + ? item["properties"] + : assetUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** The updatable properties of the Asset. */ +export interface AssetUpdateProperties { + /** Enabled/Disabled status of the asset. */ + enabled?: boolean; + /** Human-readable display name. */ + displayName?: string; + /** Human-readable description of the asset. */ + description?: string; + /** Asset manufacturer name. */ + manufacturer?: string; + /** Asset manufacturer URI. */ + manufacturerUri?: string; + /** Asset model name. */ + model?: string; + /** Asset product code. */ + productCode?: string; + /** Revision number of the hardware. */ + hardwareRevision?: string; + /** Revision number of the software. */ + softwareRevision?: string; + /** Reference to the documentation. */ + documentationUri?: string; + /** Asset serial number. */ + serialNumber?: string; + /** A set of key-value pairs that contain custom attributes set by the customer. */ + attributes?: Record; + /** Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here. */ + defaultDatasetsConfiguration?: string; + /** Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. */ + defaultEventsConfiguration?: string; + /** Object that describes the default topic information for the asset. */ + defaultTopic?: Topic; + /** Array of datasets that are part of the asset. Each dataset describes the data points that make up the set. */ + datasets?: Dataset[]; + /** Array of events that are part of the asset. Each event can have per-event configuration. */ + events?: Event[]; +} + +export function assetUpdatePropertiesSerializer(item: AssetUpdateProperties): any { + return { + enabled: item["enabled"], + displayName: item["displayName"], + description: item["description"], + manufacturer: item["manufacturer"], + manufacturerUri: item["manufacturerUri"], + model: item["model"], + productCode: item["productCode"], + hardwareRevision: item["hardwareRevision"], + softwareRevision: item["softwareRevision"], + documentationUri: item["documentationUri"], + serialNumber: item["serialNumber"], + attributes: item["attributes"], + defaultDatasetsConfiguration: item["defaultDatasetsConfiguration"], + defaultEventsConfiguration: item["defaultEventsConfiguration"], + defaultTopic: !item["defaultTopic"] + ? item["defaultTopic"] + : topicSerializer(item["defaultTopic"]), + datasets: !item["datasets"] ? item["datasets"] : datasetArraySerializer(item["datasets"]), + events: !item["events"] ? item["events"] : eventArraySerializer(item["events"]), + }; +} + +/** The response of a Asset list operation. */ +export interface _AssetListResult { + /** The Asset items on this page */ + value: Asset[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _assetListResultDeserializer(item: any): _AssetListResult { + return { + value: assetArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function assetArraySerializer(result: Array): any[] { + return result.map((item) => { + return assetSerializer(item); + }); +} + +export function assetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return assetDeserializer(item); + }); +} + +/** The current status of an async operation. */ +export interface OperationStatusResult { + /** Fully qualified ID for the async operation. */ + id?: string; + /** Name of the async operation. */ + name?: string; + /** Operation status. */ + status: string; + /** Percent of the operation that is complete. */ + percentComplete?: number; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** The operations list. */ + operations?: OperationStatusResult[]; + /** If present, details of the operation error. */ + error?: ErrorDetail; +} + +export function operationStatusResultDeserializer(item: any): OperationStatusResult { + return { + id: item["id"], + name: item["name"], + status: item["status"], + percentComplete: item["percentComplete"], + startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]), + endTime: !item["endTime"] ? item["endTime"] : new Date(item["endTime"]), + operations: !item["operations"] + ? item["operations"] + : operationStatusResultArrayDeserializer(item["operations"]), + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + }; +} + +export function operationStatusResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return operationStatusResultDeserializer(item); + }); +} + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface _OperationListResult { + /** The Operation items on this page */ + value: Operation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _operationListResultDeserializer(item: any): _OperationListResult { + return { + value: operationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ + readonly name?: string; + /** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + readonly display?: OperationDisplay; + /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ + readonly origin?: Origin; + /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ + actionType?: ActionType; +} + +export function operationDeserializer(item: any): Operation { + return { + name: item["name"], + isDataAction: item["isDataAction"], + display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + origin: item["origin"], + actionType: item["actionType"], + }; +} + +/** Localized display information for and operation. */ +export interface OperationDisplay { + /** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ + readonly provider?: string; + /** The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ + readonly resource?: string; + /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ + readonly operation?: string; + /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ + readonly description?: string; +} + +export function operationDisplayDeserializer(item: any): OperationDisplay { + return { + provider: item["provider"], + resource: item["resource"], + operation: item["operation"], + description: item["description"], + }; +} + +/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ +export enum KnownOrigin { + /** Indicates the operation is initiated by a user. */ + User = "user", + /** Indicates the operation is initiated by a system. */ + System = "system", + /** Indicates the operation is initiated by a user or system. */ + UserSystem = "user,system", +} + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user**: Indicates the operation is initiated by a user. \ + * **system**: Indicates the operation is initiated by a system. \ + * **user,system**: Indicates the operation is initiated by a user or system. + */ +export type Origin = string; + +/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +export enum KnownActionType { + /** Actions are for internal-only APIs. */ + Internal = "Internal", +} + +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal**: Actions are for internal-only APIs. + */ +export type ActionType = string; + +/** Microsoft.DeviceRegistry Resource Provider supported API versions. */ +export enum KnownVersions { + /** Microsoft.DeviceRegistry Resource Provider management API version 2023-11-01-preview. */ + V2023_11_01_Preview = "2023-11-01-preview", + /** Microsoft.DeviceRegistry Resource Provider management API version 2024-09-01-preview. */ + V2024_09_01_Preview = "2024-09-01-preview", +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/models/parameters.ts b/sdk/deviceregistry/arm-deviceregistry/src/models/parameters.ts deleted file mode 100644 index c0afb0c27f7c..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/models/parameters.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationParameter, - OperationURLParameter, - OperationQueryParameter, -} from "@azure/core-client"; -import { - AssetEndpointProfile as AssetEndpointProfileMapper, - AssetEndpointProfileUpdate as AssetEndpointProfileUpdateMapper, - Asset as AssetMapper, - AssetUpdate as AssetUpdateMapper, -} from "../models/mappers"; - -export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; - -export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2023-11-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String", - }, - }, -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - constraints: { - MinLength: 1, - }, - serializedName: "subscriptionId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1, - }, - serializedName: "resourceGroupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const assetEndpointProfileName: OperationURLParameter = { - parameterPath: "assetEndpointProfileName", - mapper: { - constraints: { - Pattern: new RegExp("^[a-z0-9][a-z0-9-]*[a-z0-9]$"), - MaxLength: 63, - MinLength: 3, - }, - serializedName: "assetEndpointProfileName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; - -export const resource: OperationParameter = { - parameterPath: "resource", - mapper: AssetEndpointProfileMapper, -}; - -export const properties: OperationParameter = { - parameterPath: "properties", - mapper: AssetEndpointProfileUpdateMapper, -}; - -export const assetName: OperationURLParameter = { - parameterPath: "assetName", - mapper: { - constraints: { - Pattern: new RegExp("^[a-z0-9][a-z0-9-]*[a-z0-9]$"), - MaxLength: 63, - MinLength: 3, - }, - serializedName: "assetName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const resource1: OperationParameter = { - parameterPath: "resource", - mapper: AssetMapper, -}; - -export const properties1: OperationParameter = { - parameterPath: "properties", - mapper: AssetUpdateMapper, -}; - -export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - constraints: { - MinLength: 1, - }, - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, -}; - -export const operationId: OperationURLParameter = { - parameterPath: "operationId", - mapper: { - constraints: { - MinLength: 1, - }, - serializedName: "operationId", - required: true, - type: { - name: "String", - }, - }, -}; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operations/assetEndpointProfiles.ts b/sdk/deviceregistry/arm-deviceregistry/src/operations/assetEndpointProfiles.ts deleted file mode 100644 index 39cdec0e920b..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operations/assetEndpointProfiles.ts +++ /dev/null @@ -1,733 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { AssetEndpointProfiles } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DeviceRegistryManagementClient } from "../deviceRegistryManagementClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - AssetEndpointProfile, - AssetEndpointProfilesListBySubscriptionNextOptionalParams, - AssetEndpointProfilesListBySubscriptionOptionalParams, - AssetEndpointProfilesListBySubscriptionResponse, - AssetEndpointProfilesListByResourceGroupNextOptionalParams, - AssetEndpointProfilesListByResourceGroupOptionalParams, - AssetEndpointProfilesListByResourceGroupResponse, - AssetEndpointProfilesGetOptionalParams, - AssetEndpointProfilesGetResponse, - AssetEndpointProfilesCreateOrReplaceOptionalParams, - AssetEndpointProfilesCreateOrReplaceResponse, - AssetEndpointProfileUpdate, - AssetEndpointProfilesUpdateOptionalParams, - AssetEndpointProfilesUpdateResponse, - AssetEndpointProfilesDeleteOptionalParams, - AssetEndpointProfilesDeleteResponse, - AssetEndpointProfilesListBySubscriptionNextResponse, - AssetEndpointProfilesListByResourceGroupNextResponse, -} from "../models"; - -/// -/** Class containing AssetEndpointProfiles operations. */ -export class AssetEndpointProfilesImpl implements AssetEndpointProfiles { - private readonly client: DeviceRegistryManagementClient; - - /** - * Initialize a new instance of the class AssetEndpointProfiles class. - * @param client Reference to the service client - */ - constructor(client: DeviceRegistryManagementClient) { - this.client = client; - } - - /** - * List AssetEndpointProfile resources by subscription ID - * @param options The options parameters. - */ - public listBySubscription( - options?: AssetEndpointProfilesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: AssetEndpointProfilesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AssetEndpointProfilesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: AssetEndpointProfilesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List AssetEndpointProfile resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: AssetEndpointProfilesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings, - ); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: AssetEndpointProfilesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AssetEndpointProfilesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: AssetEndpointProfilesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * List AssetEndpointProfile resources by subscription ID - * @param options The options parameters. - */ - private _listBySubscription( - options?: AssetEndpointProfilesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * List AssetEndpointProfile resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: AssetEndpointProfilesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - assetEndpointProfileName: string, - options?: AssetEndpointProfilesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, assetEndpointProfileName, options }, - getOperationSpec, - ); - } - - /** - * Create a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrReplace( - resourceGroupName: string, - assetEndpointProfileName: string, - resource: AssetEndpointProfile, - options?: AssetEndpointProfilesCreateOrReplaceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AssetEndpointProfilesCreateOrReplaceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, assetEndpointProfileName, resource, options }, - spec: createOrReplaceOperationSpec, - }); - const poller = await createHttpPoller< - AssetEndpointProfilesCreateOrReplaceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrReplaceAndWait( - resourceGroupName: string, - assetEndpointProfileName: string, - resource: AssetEndpointProfile, - options?: AssetEndpointProfilesCreateOrReplaceOptionalParams, - ): Promise { - const poller = await this.beginCreateOrReplace( - resourceGroupName, - assetEndpointProfileName, - resource, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - assetEndpointProfileName: string, - properties: AssetEndpointProfileUpdate, - options?: AssetEndpointProfilesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AssetEndpointProfilesUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - assetEndpointProfileName, - properties, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - AssetEndpointProfilesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - assetEndpointProfileName: string, - properties: AssetEndpointProfileUpdate, - options?: AssetEndpointProfilesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - assetEndpointProfileName, - properties, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - assetEndpointProfileName: string, - options?: AssetEndpointProfilesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AssetEndpointProfilesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, assetEndpointProfileName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - AssetEndpointProfilesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - assetEndpointProfileName: string, - options?: AssetEndpointProfilesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - assetEndpointProfileName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: AssetEndpointProfilesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: AssetEndpointProfilesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssetEndpointProfileListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssetEndpointProfileListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssetEndpointProfile, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.assetEndpointProfileName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrReplaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AssetEndpointProfile, - }, - 201: { - bodyMapper: Mappers.AssetEndpointProfile, - }, - 202: { - bodyMapper: Mappers.AssetEndpointProfile, - }, - 204: { - bodyMapper: Mappers.AssetEndpointProfile, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.assetEndpointProfileName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AssetEndpointProfile, - }, - 201: { - bodyMapper: Mappers.AssetEndpointProfile, - }, - 202: { - bodyMapper: Mappers.AssetEndpointProfile, - }, - 204: { - bodyMapper: Mappers.AssetEndpointProfile, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.properties, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.assetEndpointProfileName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.AssetEndpointProfilesDeleteHeaders, - }, - 201: { - headersMapper: Mappers.AssetEndpointProfilesDeleteHeaders, - }, - 202: { - headersMapper: Mappers.AssetEndpointProfilesDeleteHeaders, - }, - 204: { - headersMapper: Mappers.AssetEndpointProfilesDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.assetEndpointProfileName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssetEndpointProfileListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssetEndpointProfileListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operations/assets.ts b/sdk/deviceregistry/arm-deviceregistry/src/operations/assets.ts deleted file mode 100644 index d09b14681f07..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operations/assets.ts +++ /dev/null @@ -1,722 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Assets } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DeviceRegistryManagementClient } from "../deviceRegistryManagementClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - Asset, - AssetsListBySubscriptionNextOptionalParams, - AssetsListBySubscriptionOptionalParams, - AssetsListBySubscriptionResponse, - AssetsListByResourceGroupNextOptionalParams, - AssetsListByResourceGroupOptionalParams, - AssetsListByResourceGroupResponse, - AssetsGetOptionalParams, - AssetsGetResponse, - AssetsCreateOrReplaceOptionalParams, - AssetsCreateOrReplaceResponse, - AssetUpdate, - AssetsUpdateOptionalParams, - AssetsUpdateResponse, - AssetsDeleteOptionalParams, - AssetsDeleteResponse, - AssetsListBySubscriptionNextResponse, - AssetsListByResourceGroupNextResponse, -} from "../models"; - -/// -/** Class containing Assets operations. */ -export class AssetsImpl implements Assets { - private readonly client: DeviceRegistryManagementClient; - - /** - * Initialize a new instance of the class Assets class. - * @param client Reference to the service client - */ - constructor(client: DeviceRegistryManagementClient) { - this.client = client; - } - - /** - * List Asset resources by subscription ID - * @param options The options parameters. - */ - public listBySubscription( - options?: AssetsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: AssetsListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AssetsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: AssetsListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List Asset resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: AssetsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings, - ); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: AssetsListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AssetsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: AssetsListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * List Asset resources by subscription ID - * @param options The options parameters. - */ - private _listBySubscription( - options?: AssetsListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * List Asset resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: AssetsListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - assetName: string, - options?: AssetsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, assetName, options }, - getOperationSpec, - ); - } - - /** - * Create a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrReplace( - resourceGroupName: string, - assetName: string, - resource: Asset, - options?: AssetsCreateOrReplaceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AssetsCreateOrReplaceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, assetName, resource, options }, - spec: createOrReplaceOperationSpec, - }); - const poller = await createHttpPoller< - AssetsCreateOrReplaceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrReplaceAndWait( - resourceGroupName: string, - assetName: string, - resource: Asset, - options?: AssetsCreateOrReplaceOptionalParams, - ): Promise { - const poller = await this.beginCreateOrReplace( - resourceGroupName, - assetName, - resource, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - assetName: string, - properties: AssetUpdate, - options?: AssetsUpdateOptionalParams, - ): Promise< - SimplePollerLike, AssetsUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, assetName, properties, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - AssetsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - assetName: string, - properties: AssetUpdate, - options?: AssetsUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - assetName, - properties, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - assetName: string, - options?: AssetsDeleteOptionalParams, - ): Promise< - SimplePollerLike, AssetsDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, assetName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - AssetsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - assetName: string, - options?: AssetsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - assetName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: AssetsListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: AssetsListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/assets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssetListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssetListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Asset, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.assetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrReplaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Asset, - }, - 201: { - bodyMapper: Mappers.Asset, - }, - 202: { - bodyMapper: Mappers.Asset, - }, - 204: { - bodyMapper: Mappers.Asset, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.assetName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Asset, - }, - 201: { - bodyMapper: Mappers.Asset, - }, - 202: { - bodyMapper: Mappers.Asset, - }, - 204: { - bodyMapper: Mappers.Asset, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.properties1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.assetName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.AssetsDeleteHeaders, - }, - 201: { - headersMapper: Mappers.AssetsDeleteHeaders, - }, - 202: { - headersMapper: Mappers.AssetsDeleteHeaders, - }, - 204: { - headersMapper: Mappers.AssetsDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.assetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssetListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssetListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operations/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/operations/index.ts deleted file mode 100644 index a5b6de543e80..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operations/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./operations"; -export * from "./assetEndpointProfiles"; -export * from "./assets"; -export * from "./operationStatus"; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operations/operationStatus.ts b/sdk/deviceregistry/arm-deviceregistry/src/operations/operationStatus.ts deleted file mode 100644 index b192ce24790d..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operations/operationStatus.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { OperationStatus } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DeviceRegistryManagementClient } from "../deviceRegistryManagementClient"; -import { - OperationStatusGetOptionalParams, - OperationStatusGetResponse, -} from "../models"; - -/** Class containing OperationStatus operations. */ -export class OperationStatusImpl implements OperationStatus { - private readonly client: DeviceRegistryManagementClient; - - /** - * Initialize a new instance of the class OperationStatus class. - * @param client Reference to the service client - */ - constructor(client: DeviceRegistryManagementClient) { - this.client = client; - } - - /** - * Returns the current status of an async operation. - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationStatusGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, operationId, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/locations/{location}/operationStatuses/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.operationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operations/operations.ts b/sdk/deviceregistry/arm-deviceregistry/src/operations/operations.ts deleted file mode 100644 index 221d98ab21a2..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operations/operations.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DeviceRegistryManagementClient } from "../deviceRegistryManagementClient"; -import { - Operation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse, -} from "../models"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: DeviceRegistryManagementClient; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: DeviceRegistryManagementClient) { - this.client = client; - } - - /** - * List the operations for the provider - * @param options The options parameters. - */ - public list( - options?: OperationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: OperationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: OperationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: OperationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * List the operations for the provider - * @param options The options parameters. - */ - private _list( - options?: OperationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: OperationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.DeviceRegistry/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/assetEndpointProfiles.ts b/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/assetEndpointProfiles.ts deleted file mode 100644 index 95f8f1046d85..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/assetEndpointProfiles.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - AssetEndpointProfile, - AssetEndpointProfilesListBySubscriptionOptionalParams, - AssetEndpointProfilesListByResourceGroupOptionalParams, - AssetEndpointProfilesGetOptionalParams, - AssetEndpointProfilesGetResponse, - AssetEndpointProfilesCreateOrReplaceOptionalParams, - AssetEndpointProfilesCreateOrReplaceResponse, - AssetEndpointProfileUpdate, - AssetEndpointProfilesUpdateOptionalParams, - AssetEndpointProfilesUpdateResponse, - AssetEndpointProfilesDeleteOptionalParams, - AssetEndpointProfilesDeleteResponse, -} from "../models"; - -/// -/** Interface representing a AssetEndpointProfiles. */ -export interface AssetEndpointProfiles { - /** - * List AssetEndpointProfile resources by subscription ID - * @param options The options parameters. - */ - listBySubscription( - options?: AssetEndpointProfilesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List AssetEndpointProfile resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: AssetEndpointProfilesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - assetEndpointProfileName: string, - options?: AssetEndpointProfilesGetOptionalParams, - ): Promise; - /** - * Create a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrReplace( - resourceGroupName: string, - assetEndpointProfileName: string, - resource: AssetEndpointProfile, - options?: AssetEndpointProfilesCreateOrReplaceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AssetEndpointProfilesCreateOrReplaceResponse - > - >; - /** - * Create a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrReplaceAndWait( - resourceGroupName: string, - assetEndpointProfileName: string, - resource: AssetEndpointProfile, - options?: AssetEndpointProfilesCreateOrReplaceOptionalParams, - ): Promise; - /** - * Update a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - assetEndpointProfileName: string, - properties: AssetEndpointProfileUpdate, - options?: AssetEndpointProfilesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AssetEndpointProfilesUpdateResponse - > - >; - /** - * Update a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - assetEndpointProfileName: string, - properties: AssetEndpointProfileUpdate, - options?: AssetEndpointProfilesUpdateOptionalParams, - ): Promise; - /** - * Delete a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - assetEndpointProfileName: string, - options?: AssetEndpointProfilesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AssetEndpointProfilesDeleteResponse - > - >; - /** - * Delete a AssetEndpointProfile - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetEndpointProfileName Asset Endpoint Profile name parameter. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - assetEndpointProfileName: string, - options?: AssetEndpointProfilesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/assets.ts b/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/assets.ts deleted file mode 100644 index 1c8ea67be71a..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/assets.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - Asset, - AssetsListBySubscriptionOptionalParams, - AssetsListByResourceGroupOptionalParams, - AssetsGetOptionalParams, - AssetsGetResponse, - AssetsCreateOrReplaceOptionalParams, - AssetsCreateOrReplaceResponse, - AssetUpdate, - AssetsUpdateOptionalParams, - AssetsUpdateResponse, - AssetsDeleteOptionalParams, - AssetsDeleteResponse, -} from "../models"; - -/// -/** Interface representing a Assets. */ -export interface Assets { - /** - * List Asset resources by subscription ID - * @param options The options parameters. - */ - listBySubscription( - options?: AssetsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List Asset resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: AssetsListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - assetName: string, - options?: AssetsGetOptionalParams, - ): Promise; - /** - * Create a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrReplace( - resourceGroupName: string, - assetName: string, - resource: Asset, - options?: AssetsCreateOrReplaceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AssetsCreateOrReplaceResponse - > - >; - /** - * Create a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrReplaceAndWait( - resourceGroupName: string, - assetName: string, - resource: Asset, - options?: AssetsCreateOrReplaceOptionalParams, - ): Promise; - /** - * Update a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - assetName: string, - properties: AssetUpdate, - options?: AssetsUpdateOptionalParams, - ): Promise< - SimplePollerLike, AssetsUpdateResponse> - >; - /** - * Update a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - assetName: string, - properties: AssetUpdate, - options?: AssetsUpdateOptionalParams, - ): Promise; - /** - * Delete a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - assetName: string, - options?: AssetsDeleteOptionalParams, - ): Promise< - SimplePollerLike, AssetsDeleteResponse> - >; - /** - * Delete a Asset - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param assetName Asset name parameter. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - assetName: string, - options?: AssetsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/index.ts b/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/index.ts deleted file mode 100644 index a5b6de543e80..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./operations"; -export * from "./assetEndpointProfiles"; -export * from "./assets"; -export * from "./operationStatus"; diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/operationStatus.ts b/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/operationStatus.ts deleted file mode 100644 index e2a1a2c1cda1..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/operationStatus.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationStatusGetOptionalParams, - OperationStatusGetResponse, -} from "../models"; - -/** Interface representing a OperationStatus. */ -export interface OperationStatus { - /** - * Returns the current status of an async operation. - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationStatusGetOptionalParams, - ): Promise; -} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/operations.ts b/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/operations.ts deleted file mode 100644 index 251f5f582e64..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * List the operations for the provider - * @param options The options parameters. - */ - list( - options?: OperationsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/pagingHelper.ts b/sdk/deviceregistry/arm-deviceregistry/src/pagingHelper.ts deleted file mode 100644 index 205cccc26592..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/src/pagingHelper.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export interface PageInfo { - continuationToken?: string; -} - -const pageMap = new WeakMap(); - -/** - * Given the last `.value` produced by the `byPage` iterator, - * returns a continuation token that can be used to begin paging from - * that point later. - * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. - * @returns The continuation token that can be passed into byPage() during future calls. - */ -export function getContinuationToken(page: unknown): string | undefined { - if (typeof page !== "object" || page === null) { - return undefined; - } - return pageMap.get(page)?.continuationToken; -} - -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined, -): void { - if (typeof page !== "object" || page === null || !continuationToken) { - return; - } - const pageInfo = pageMap.get(page) ?? {}; - pageInfo.continuationToken = continuationToken; - pageMap.set(page, pageInfo); -} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/restorePollerHelpers.ts b/sdk/deviceregistry/arm-deviceregistry/src/restorePollerHelpers.ts new file mode 100644 index 000000000000..bc6b8e91f298 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/restorePollerHelpers.ts @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { DeviceRegistryManagementClient } from "./deviceRegistryManagementClient.js"; +import { + _assetsCreateOrReplaceDeserialize, + _assetsUpdateDeserialize, + _assetsDeleteDeserialize, +} from "./api/assets/index.js"; +import { + _assetEndpointProfilesCreateOrReplaceDeserialize, + _assetEndpointProfilesUpdateDeserialize, + _assetEndpointProfilesDeleteDeserialize, +} from "./api/assetEndpointProfiles/index.js"; +import { + _discoveredAssetsCreateOrReplaceDeserialize, + _discoveredAssetsUpdateDeserialize, + _discoveredAssetsDeleteDeserialize, +} from "./api/discoveredAssets/index.js"; +import { + _discoveredAssetEndpointProfilesCreateOrReplaceDeserialize, + _discoveredAssetEndpointProfilesUpdateDeserialize, + _discoveredAssetEndpointProfilesDeleteDeserialize, +} from "./api/discoveredAssetEndpointProfiles/index.js"; +import { + _schemaRegistriesCreateOrReplaceDeserialize, + _schemaRegistriesUpdateDeserialize, + _schemaRegistriesDeleteDeserialize, +} from "./api/schemaRegistries/index.js"; +import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; +import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { + PollerLike, + OperationState, + deserializeState, + ResourceLocationConfig, +} from "@azure/core-lro"; + +export interface RestorePollerOptions< + TResult, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +> extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** Deserialization function for raw response body */ + processResponseBody?: (result: TResponse) => Promise; +} + +/** + * Creates a poller from the serialized state of another poller. This can be + * useful when you want to create pollers on a different host or a poller + * needs to be constructed after the original one is not in scope. + */ +export function restorePoller( + client: DeviceRegistryManagementClient, + serializedState: string, + sourceOperation: (...args: any[]) => PollerLike, TResult>, + options?: RestorePollerOptions, +): PollerLike, TResult> { + const pollerConfig = deserializeState(serializedState).config; + const { initialRequestUrl, requestMethod, metadata } = pollerConfig; + if (!initialRequestUrl || !requestMethod) { + throw new Error( + `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`, + ); + } + const resourceLocationConfig = metadata?.["resourceLocationConfig"] as + | ResourceLocationConfig + | undefined; + const { deserializer, expectedStatuses = [] } = + getDeserializationHelper(initialRequestUrl, requestMethod) ?? {}; + const deserializeHelper = options?.processResponseBody ?? deserializer; + if (!deserializeHelper) { + throw new Error( + `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`, + ); + } + return getLongRunningPoller( + (client as any)["_client"] ?? client, + deserializeHelper as (result: TResponse) => Promise, + expectedStatuses, + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + resourceLocationConfig, + restoreFrom: serializedState, + initialRequestUrl, + }, + ); +} + +interface DeserializationHelper { + deserializer: Function; + expectedStatuses: string[]; +} + +const deserializeMap: Record = { + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}": + { + deserializer: _assetsCreateOrReplaceDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}": + { + deserializer: _assetsUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}": + { + deserializer: _assetsDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}": + { + deserializer: _assetEndpointProfilesCreateOrReplaceDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}": + { + deserializer: _assetEndpointProfilesUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}": + { + deserializer: _assetEndpointProfilesDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}": + { + deserializer: _discoveredAssetsCreateOrReplaceDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}": + { + deserializer: _discoveredAssetsUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}": + { + deserializer: _discoveredAssetsDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}": + { + deserializer: _discoveredAssetEndpointProfilesCreateOrReplaceDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}": + { + deserializer: _discoveredAssetEndpointProfilesUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}": + { + deserializer: _discoveredAssetEndpointProfilesDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}": + { + deserializer: _schemaRegistriesCreateOrReplaceDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}": + { + deserializer: _schemaRegistriesUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}": + { + deserializer: _schemaRegistriesDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, +}; + +function getDeserializationHelper( + urlStr: string, + method: string, +): DeserializationHelper | undefined { + const path = new URL(urlStr).pathname; + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: DeserializationHelper | undefined; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(deserializeMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/static-helpers/pagingHelpers.ts b/sdk/deviceregistry/arm-deviceregistry/src/static-helpers/pagingHelpers.ts new file mode 100644 index 000000000000..ce33af5f4178 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; + +/** + * Options for the byPage method + */ +export interface PageSettings { + /** + * A reference to a specific page to start iterating from. + */ + continuationToken?: string; +} + +/** + * An interface that describes a page of results. + */ +export type ContinuablePage = TPage & { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +}; + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; +} + +/** + * An interface that describes how to communicate with the service. + */ +export interface PagedResult< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * Link to the first page of results. + */ + firstPageLink?: string; + /** + * A method that returns a page of results. + */ + getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => TElement[]; +} + +/** + * Options for the paging helper + */ +export interface BuildPagedAsyncIteratorOptions { + itemName?: string; + nextLinkName?: string; +} + +/** + * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator + */ +export function buildPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +>( + client: Client, + getInitialResponse: () => PromiseLike, + processResponseBody: (result: TResponse) => PromiseLike, + expectedStatuses: string[], + options: BuildPagedAsyncIteratorOptions = {}, +): PagedAsyncIterableIterator { + const itemName = options.itemName ?? "value"; + const nextLinkName = options.nextLinkName ?? "nextLink"; + const pagedResult: PagedResult = { + getPage: async (pageLink?: string) => { + const result = + pageLink === undefined + ? await getInitialResponse() + : await client.pathUnchecked(pageLink).get(); + checkPagingRequest(result, expectedStatuses); + const results = await processResponseBody(result as TResponse); + const nextLink = getNextLink(results, nextLinkName); + const values = getElements(results, itemName) as TPage; + return { + page: values, + nextPageLink: nextLink, + }; + }, + byPage: (settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }, + }; + return getPagedAsyncIterator(pagedResult); +} + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ + +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + ((settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: string; + } = {}, +): AsyncIterableIterator> { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + let result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + } +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + throw new RestError( + `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, + ); + } + + if (nextLink === null) { + return undefined; + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + if (!Array.isArray(value)) { + throw new RestError( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { + if (!expectedStatuses.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} diff --git a/sdk/deviceregistry/arm-deviceregistry/src/static-helpers/pollingHelpers.ts b/sdk/deviceregistry/arm-deviceregistry/src/static-helpers/pollingHelpers.ts new file mode 100644 index 000000000000..f01c41bab69d --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + PollerLike, + OperationState, + ResourceLocationConfig, + RunningOperation, + createHttpPoller, + OperationResponse, +} from "@azure/core-lro"; + +import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; + +export interface GetLongRunningPollerOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The potential location of the result of the LRO if specified by the LRO extension in the swagger. + */ + resourceLocationConfig?: ResourceLocationConfig; + /** + * The original url of the LRO + * Should not be null when restoreFrom is set + */ + initialRequestUrl?: string; + /** + * A serialized poller which can be used to resume an existing paused Long-Running-Operation. + */ + restoreFrom?: string; + /** + * The function to get the initial response + */ + getInitialResponse?: () => PromiseLike; +} +export function getLongRunningPoller( + client: Client, + processResponseBody: (result: TResponse) => Promise, + expectedStatuses: string[], + options: GetLongRunningPollerOptions, +): PollerLike, TResult> { + const { restoreFrom, getInitialResponse } = options; + if (!restoreFrom && !getInitialResponse) { + throw new Error("Either restoreFrom or getInitialResponse must be specified"); + } + let initialResponse: TResponse | undefined = undefined; + const pollAbortController = new AbortController(); + const poller: RunningOperation = { + sendInitialRequest: async () => { + if (!getInitialResponse) { + throw new Error("getInitialResponse is required when initializing a new poller"); + } + initialResponse = await getInitialResponse(); + return getLroResponse(initialResponse, expectedStatuses); + }, + sendPollRequest: async ( + path: string, + pollOptions?: { + abortSignal?: AbortSignalLike; + }, + ) => { + // The poll request would both listen to the user provided abort signal and the poller's own abort signal + function abortListener(): void { + pollAbortController.abort(); + } + const abortSignal = pollAbortController.signal; + if (options.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (pollOptions?.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (!abortSignal.aborted) { + options.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + pollOptions?.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + response = await client.pathUnchecked(path).get({ abortSignal }); + } finally { + options.abortSignal?.removeEventListener("abort", abortListener); + pollOptions?.abortSignal?.removeEventListener("abort", abortListener); + } + + return getLroResponse(response as TResponse, expectedStatuses); + }, + }; + return createHttpPoller(poller, { + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: options?.resourceLocationConfig, + restoreFrom: options?.restoreFrom, + processResult: (result: unknown) => { + return processResponseBody(result as TResponse); + }, + }); +} +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @param deserializeFn - deserialize function to convert Rest response to modular output + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResponse, + expectedStatuses: string[], +): OperationResponse { + if (!expectedStatuses.includes(response.status)) { + throw createRestError(response); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/test/deviceregistry_operations_test.spec.ts b/sdk/deviceregistry/arm-deviceregistry/test/deviceregistry_operations_test.spec.ts deleted file mode 100644 index bf71c8103a26..000000000000 --- a/sdk/deviceregistry/arm-deviceregistry/test/deviceregistry_operations_test.spec.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { DeviceRegistryManagementClient } from "../src/deviceRegistryManagementClient"; - -const replaceableVariables: Record = { - SUBSCRIPTION_ID: "azure_subscription_id" -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("DeviceRegistry test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: DeviceRegistryManagementClient; - let location: string; - let resourceGroup: string; - let resourcename: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new DeviceRegistryManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("operations list test", async function () { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); - -}) diff --git a/sdk/deviceregistry/arm-deviceregistry/test/public/deviceregistry_operations_test.spec.ts b/sdk/deviceregistry/arm-deviceregistry/test/public/deviceregistry_operations_test.spec.ts new file mode 100644 index 000000000000..bd3a4a21047d --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/test/public/deviceregistry_operations_test.spec.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { env, Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; +import { createTestCredential } from "@azure-tools/test-credential"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; +import { createRecorder } from "./utils/recordedClient.js"; +import { DeviceRegistryManagementClient } from "../../src/deviceRegistryManagementClient.js"; + +export const testPollingOptions = { + updateIntervalInMs: isPlaybackMode() ? 0 : undefined, +}; + +describe("DeviceRegistry test", () => { + let recorder: Recorder; + let subscriptionId: string; + let client: DeviceRegistryManagementClient; + + beforeEach(async (context) => { + process.env.SystemRoot = process.env.SystemRoot || "C:\\Windows"; + recorder = await createRecorder(context); + subscriptionId = env.SUBSCRIPTION_ID || ""; + // This is an example of how the environment variables are used + const credential = createTestCredential(); + client = new DeviceRegistryManagementClient( + credential, + subscriptionId, + recorder.configureClientOptions({}), + ); + }); + + afterEach(async function () { + await recorder.stop(); + }); + it("operations list test", async function () { + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + assert.notEqual(resArray.length, 0); + }); +}); diff --git a/sdk/deviceregistry/arm-deviceregistry/test/public/utils/recordedClient.ts b/sdk/deviceregistry/arm-deviceregistry/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..14dcd9fa397c --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/test/public/utils/recordedClient.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder(context: VitestTestContext): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderEnvSetup); + return recorder; +} diff --git a/sdk/deviceregistry/arm-deviceregistry/tsconfig.browser.config.json b/sdk/deviceregistry/arm-deviceregistry/tsconfig.browser.config.json new file mode 100644 index 000000000000..75871518e3a0 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/tsconfig.browser.config.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] +} diff --git a/sdk/deviceregistry/arm-deviceregistry/tsconfig.json b/sdk/deviceregistry/arm-deviceregistry/tsconfig.json index 0eb02e213670..19ceb382b521 100644 --- a/sdk/deviceregistry/arm-deviceregistry/tsconfig.json +++ b/sdk/deviceregistry/arm-deviceregistry/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-deviceregistry": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/deviceregistry/arm-deviceregistry/tsconfig.samples.json b/sdk/deviceregistry/arm-deviceregistry/tsconfig.samples.json new file mode 100644 index 000000000000..08116b2e9189 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/tsconfig.samples.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-deviceregistry": ["./dist/esm"] + } + } +} diff --git a/sdk/deviceregistry/arm-deviceregistry/tsconfig.src.json b/sdk/deviceregistry/arm-deviceregistry/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/deviceregistry/arm-deviceregistry/tsconfig.test.json b/sdk/deviceregistry/arm-deviceregistry/tsconfig.test.json new file mode 100644 index 000000000000..290ca214aebc --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/tsconfig.test.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] +} diff --git a/sdk/deviceregistry/arm-deviceregistry/tsp-location.yaml b/sdk/deviceregistry/arm-deviceregistry/tsp-location.yaml new file mode 100644 index 000000000000..dbbdd96677a7 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/deviceregistry/DeviceRegistry.Management +commit: 6132d27fe22b7876e0064827a5ac70f7a6166ab9 +repo: ../azure-rest-api-specs +additionalDirectories: diff --git a/sdk/deviceregistry/arm-deviceregistry/vitest.browser.config.ts b/sdk/deviceregistry/arm-deviceregistry/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: [ + "dist-test/browser/test/**/*.spec.js", + ], + }, + }), +); diff --git a/sdk/deviceregistry/arm-deviceregistry/vitest.config.ts b/sdk/deviceregistry/arm-deviceregistry/vitest.config.ts new file mode 100644 index 000000000000..86a71911ccc2 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + testTimeout: 1200000, + hookTimeout: 1200000, + }, + }), +); diff --git a/sdk/deviceregistry/arm-deviceregistry/vitest.esm.config.ts b/sdk/deviceregistry/arm-deviceregistry/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/deviceregistry/arm-deviceregistry/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/deviceregistry/ci.mgmt.yml b/sdk/deviceregistry/ci.mgmt.yml index 9ff6e9b200e1..4637b02a4997 100644 --- a/sdk/deviceregistry/ci.mgmt.yml +++ b/sdk/deviceregistry/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -13,7 +13,6 @@ trigger: include: - sdk/deviceregistry/arm-deviceregistry - sdk/deviceregistry/ci.mgmt.yml - pr: branches: include: @@ -27,7 +26,6 @@ pr: include: - sdk/deviceregistry/arm-deviceregistry - sdk/deviceregistry/ci.mgmt.yml - extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: @@ -35,4 +33,3 @@ extends: Artifacts: - name: azure-arm-deviceregistry safeName: azurearmdeviceregistry - \ No newline at end of file From 2aa1f318a0c7f02e3ba992840f4582a26c02bd1b Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Thu, 19 Dec 2024 09:29:38 -0800 Subject: [PATCH 18/55] [EngSys][rush-runner] refactor for test-ability (#32148) - Extract several helpers into helpers.js so that it is easier to add tests for them. - update jsdoc to support TypeScript checks - add some tests of expetations (currently failing) --- eng/tools/rush-runner/helpers.js | 147 ++++++++++++++ eng/tools/rush-runner/index.js | 212 ++++++--------------- eng/tools/rush-runner/package.json | 1 + eng/tools/rush-runner/test/helper.spec.js | 7 - eng/tools/rush-runner/test/helpers.spec.js | 41 ++++ 5 files changed, 252 insertions(+), 156 deletions(-) create mode 100644 eng/tools/rush-runner/helpers.js delete mode 100644 eng/tools/rush-runner/test/helper.spec.js create mode 100644 eng/tools/rush-runner/test/helpers.spec.js diff --git a/eng/tools/rush-runner/helpers.js b/eng/tools/rush-runner/helpers.js new file mode 100644 index 000000000000..9b07f31ed6d4 --- /dev/null +++ b/eng/tools/rush-runner/helpers.js @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// @ts-check + +import * as fs from "node:fs"; +import * as path from "node:path"; + +/** @type {Record<"core"|"test-utils"|"identity", string[]>} */ +export const reducedDependencyTestMatrix = { + core: [ + "@azure-rest/synapse-access-control", + "@azure/arm-resources", + "@azure/identity", + "@azure/service-bus", + "@azure/template", + ], + "test-utils": [ + "@azure-tests/perf-storage-blob", + "@azure/arm-eventgrid", + "@azure/ai-text-analytics", + "@azure/identity", + "@azure/template", + ], + identity: [ + "@azure-tests/perf-storage-blob", + "@azure/ai-text-analytics", + "@azure/arm-resources", + "@azure/identity-cache-persistence", + "@azure/identity-vscode", + "@azure/storage-blob", + "@azure/template", + ], +}; + +/** @type {string[]} */ +const restrictedToPackages = [ + "@azure/abort-controller", + "@azure/core-amqp", + "@azure/core-auth", + "@azure/core-client", + "@azure/core-http-compat", + "@azure/core-lro", + "@azure/core-paging", + "@azure/core-rest-pipeline", + "@azure/core-sse", + "@azure/core-tracing", + "@azure/core-util", + "@azure/core-xml", + "@azure/logger", + "@azure-rest/core-client", + "@typespec/ts-http-runtime", + "@azure/identity", + "@azure/arm-resources", + "@azure-tools/test-perf", + "@azure-tools/test-recorder", + "@azure-tools/test-credential", + "@azure-tools/test-utils", + "@azure-tools/test-utils-vitest", +]; + +/** + * Helper function that determines the rush command flag to use based on each individual package name for the 'build' check. + * + * If the targeted package is one of the restricted packages with a ton of dependents, we only want to run that package + * and not all of its dependents. + * @param {string[]} packageNames - An array of strings containing the packages names to run the action on. + * @param {string[]} actionComponents - An array of strings containing the packages names to run the action on. + */ +export const getDirectionMappedPackages = (packageNames, actionComponents) => { + const mappedPackages = []; + + for (const packageName of packageNames) { + // Build command without any additional option should build the project and downstream + // If service is configured to run only a set of downstream projects then build all projects leading to them to support testing + // If the package is a core package, azure-identity or arm-resources then build only the package, + // otherwise build the package and all its dependents + var rushCommandFlag = "--impacted-by"; + + if (restrictedToPackages.includes(packageName)) { + // if this is one of our restricted packages with a ton of deps, make it targeted + // as including all dependents will be too much + rushCommandFlag = "--to"; + } else if (actionComponents.length == 1) { + // else we are building the project and its dependents + rushCommandFlag = "--from"; + } + + mappedPackages.push([rushCommandFlag, packageName]); + } + + return mappedPackages; +}; + +/** + * Returns an array of full paths to package.json files under a directory + * + * @param {string} searchDir - directory to search + */ +const getPackageJSONs = (searchDir) => { + // This gets all the directories with package.json at the `sdk//` level excluding "arm-" packages + const sdkDirectories = fs + .readdirSync(searchDir) + .map((f) => path.join(searchDir, f, "package.json")); // turn potential directory names into package.json paths + + // This gets all the directories with package.json at the `sdk///perf-tests` level excluding "-track-1" perf test packages + let perfTestDirectories = []; + const searchPerfTestDir = path.join(searchDir, "perf-tests"); + if (fs.existsSync(searchPerfTestDir)) { + perfTestDirectories = fs + .readdirSync(searchPerfTestDir) + .filter((f) => !f.endsWith("-track-1")) // exclude libraries ending with "-track-1" (perf test projects) + .map((f) => path.join(searchPerfTestDir, f, "package.json")); // turn potential directory names into package.json paths + } + + return sdkDirectories.concat(perfTestDirectories).filter((f) => fs.existsSync(f)); // only keep paths for files that actually exist +}; + +/** + * Returns package names and package dirs arrays + * + * @param {string} baseDir - + * @param {string[]} serviceDirs - + * @param {string} artifactNames - + */ +export const getServicePackages = (baseDir, serviceDirs, artifactNames) => { + const packageNames = []; + const packageDirs = []; + let validSdkTypes = ["client", "mgmt", "perf-test", "utility"]; // valid "sdk-type"s that we are looking for, to be able to apply rush-runner jobs on + const artifacts = artifactNames.split(","); + for (const serviceDir of serviceDirs) { + const searchDir = path.resolve(path.join(baseDir, "sdk", serviceDir)); + const packageJSONs = getPackageJSONs(searchDir); + for (const filePath of packageJSONs) { + const contents = JSON.parse(fs.readFileSync(filePath, "utf8")); + const artifactName = contents.name.replace("@", "").replace("/", "-"); + if ( + validSdkTypes.includes(contents["sdk-type"]) && + (artifactNames.length === 0 || artifacts.includes(artifactName)) + ) { + packageNames.push(contents.name); + packageDirs.push(path.dirname(filePath)); + } + } + } + return {packageNames, packageDirs}; +}; diff --git a/eng/tools/rush-runner/index.js b/eng/tools/rush-runner/index.js index cb76c449818e..b394e044ecab 100644 --- a/eng/tools/rush-runner/index.js +++ b/eng/tools/rush-runner/index.js @@ -3,37 +3,14 @@ // @ts-check -import * as fs from "node:fs"; import * as path from "node:path"; import * as process from "node:process"; import { spawnSync } from "node:child_process"; - -/** @type {Record<"core"|"test-utils"|"identity", string[]>} */ -const reducedDependencyTestMatrix = { - core: [ - "@azure-rest/synapse-access-control", - "@azure/arm-resources", - "@azure/identity", - "@azure/service-bus", - "@azure/template", - ], - "test-utils": [ - "@azure-tests/perf-storage-blob", - "@azure/arm-eventgrid", - "@azure/ai-text-analytics", - "@azure/identity", - "@azure/template", - ], - identity: [ - "@azure-tests/perf-storage-blob", - "@azure/ai-text-analytics", - "@azure/arm-resources", - "@azure/identity-cache-persistence", - "@azure/identity-vscode", - "@azure/storage-blob", - "@azure/template", - ], -}; +import { + getDirectionMappedPackages, + getServicePackages, + reducedDependencyTestMatrix, +} from "./helpers.js"; const parseArgs = () => { if ( @@ -69,160 +46,81 @@ const parseArgs = () => { } else { if (arg && arg !== "*") { // exclude empty value and special value "*" meaning all libraries - arg.split(" ").forEach((serviceDirectory) => services.push(serviceDirectory)); + services.push(...arg.split(" ")); } } } - return [baseDir, action, services, flags, artifactNames]; -}; - -const getPackageJSONs = (searchDir) => { - // This gets all the directories with package.json at the `sdk//` level excluding "arm-" packages - const sdkDirectories = fs - .readdirSync(searchDir) - .map((f) => path.join(searchDir, f, "package.json")); // turn potential directory names into package.json paths - - // This gets all the directories with package.json at the `sdk///perf-tests` level excluding "-track-1" perf test packages - let perfTestDirectories = []; - const searchPerfTestDir = path.join(searchDir, "perf-tests"); - if (fs.existsSync(searchPerfTestDir)) { - perfTestDirectories = fs - .readdirSync(searchPerfTestDir) - .filter((f) => !f.endsWith("-track-1")) // exclude libraries ending with "-track-1" (perf test projects) - .map((f) => path.join(searchPerfTestDir, f, "package.json")); // turn potential directory names into package.json paths - } - return sdkDirectories.concat(perfTestDirectories).filter((f) => fs.existsSync(f)); // only keep paths for files that actually exist + return { baseDir, action, services, flags, artifactNames }; }; -/** @type {string[]} */ -const restrictedToPackages = [ - "@azure/abort-controller", - "@azure/core-amqp", - "@azure/core-auth", - "@azure/core-client", - "@azure/core-http-compat", - "@azure/core-lro", - "@azure/core-paging", - "@azure/core-rest-pipeline", - "@azure/core-sse", - "@azure/core-tracing", - "@azure/core-util", - "@azure/core-xml", - "@azure/logger", - "@azure-rest/core-client", - "@typespec/ts-http-runtime", - "@azure/identity", - "@azure/arm-resources", - "@azure-tools/test-perf", - "@azure-tools/test-recorder", - "@azure-tools/test-credential", - "@azure-tools/test-utils", - "@azure-tools/test-utils-vitest" -]; - /** - * Helper function that determines the rush command flag to use based on each individual package name for the 'build' check. + * Helper function to spawn NodeJS programs * - * If the targeted package is one of the restricted packages with a ton of dependents, we only want to run that package - * and not all of its dependents. - * @param packageNames string[] An array of strings containing the packages names to run the action on. + * @param {string} cwd - current working directory + * @param {string[]} args - rest of arguments */ -const getDirectionMappedPackages = (packageNames) => { - const mappedPackages = []; - - for (const packageName of packageNames) { - // Build command without any additional option should build the project and downstream - // If service is configured to run only a set of downstream projects then build all projects leading to them to support testing - // If the package is a core package, azure-identity or arm-resources then build only the package, - // otherwise build the package and all its dependents - var rushCommandFlag = "--impacted-by"; - - if (restrictedToPackages.includes(packageName)) { - // if this is one of our restricted packages with a ton of deps, make it targeted - // as including all dependents will be too much - rushCommandFlag = "--to"; - } else if (actionComponents.length == 1) { - // else we are building the project and its dependents - rushCommandFlag = "--from"; - } - - mappedPackages.push([rushCommandFlag, packageName]); - } - - return mappedPackages; -}; - -const getServicePackages = (baseDir, serviceDirs, artifactNames) => { - const packageNames = []; - const packageDirs = []; - let validSdkTypes = ["client", "mgmt", "perf-test", "utility"]; // valid "sdk-type"s that we are looking for, to be able to apply rush-runner jobs on - console.log(`Packages to build: ${artifactNames}`); - const artifacts = artifactNames.split(","); - for (const serviceDir of serviceDirs) { - const searchDir = path.resolve(path.join(baseDir, "sdk", serviceDir)); - const packageJSONs = getPackageJSONs(searchDir); - for (const filePath of packageJSONs) { - const contents = JSON.parse(fs.readFileSync(filePath, "utf8")); - const artifactName = contents.name.replace("@", "").replace("/", "-"); - if ( - validSdkTypes.includes(contents["sdk-type"]) && - (artifactNames.length === 0 || artifacts.includes(artifactName)) - ) { - packageNames.push(contents.name); - packageDirs.push(path.dirname(filePath)); - } - } - } - console.log(`Packages eligible to run rush task: ${packageNames}`); - return [packageNames, packageDirs]; -}; - const spawnNode = (cwd, ...args) => { console.log(`Executing: "node ${args.join(" ")}" in ${cwd}\n\n`); const proc = spawnSync("node", args, { cwd, stdio: "inherit" }); console.log(`\n\nNode process exited with code ${proc.status} `); - if (proc.status !== 0) { - // proc.status will be null if the subprocess terminated due to a signal, which I don't think - // should ever happen, but if it does it's safer to fail. - process.exitCode = proc.status || 1; - } - return proc.status; + return proc.status ?? 1; }; +/** + * flatMap + * + * @param {string[]} arr - string array + * @param {(a: string) => string[]} f - function + */ const flatMap = (arr, f) => { const result = arr.map(f); return [].concat(...result); }; -const [baseDir, action, serviceDirs, rushParams, artifactNames] = parseArgs(); +const { baseDir, action, services: serviceDirs, flags: rushParams, artifactNames } = parseArgs(); const actionComponents = action.toLowerCase().split(":"); -const [packageNames, packageDirs] = getServicePackages(baseDir, serviceDirs, artifactNames); +console.log(`Packages to build: ${artifactNames}`); +const { packageNames, packageDirs } = getServicePackages(baseDir, serviceDirs, artifactNames); +console.log(`Packages eligible to run rush task: ${packageNames}`); /** * Helper function to provide the rush logic that is used frequently below * - * @param direction string which kind of rush tree selector to run (either "--from" or "--to") - * @param packages string[] the names of the packages to run the action on + * @param {string} direction - which kind of rush tree selector to run (either "--from" or "--to") + * @param {string[]} packages - the names of the packages to run the action on */ function rushRunAll(direction, packages) { const params = flatMap(packages, (p) => [direction, p]); - spawnNode(baseDir, "common/scripts/install-run-rush.js", action, ...params, ...rushParams); + return spawnNode(baseDir, "common/scripts/install-run-rush.js", action, ...params, ...rushParams); } /** * Helper function to invoke the rush logic split up by direction. * - * @param packagesWithDirection string[] Any array of strings containing ["direction packageName"...] + * @param {string[][]} packagesWithDirection - Any array of strings containing ["direction packageName"...] */ function rushRunAllWithDirection(packagesWithDirection) { const invocation = packagesWithDirection.flatMap(([direction, packageName]) => [ direction, packageName, ]); + console.dir({ + l: `rushRunAllWithDirection - 1`, + packagesWithDirection, + invocation, + }); spawnNode(baseDir, "common/scripts/install-run-rush.js", action, ...invocation, ...rushParams); + + return spawnNode( + baseDir, + "common/scripts/install-run-rush.js", + action, + ...invocation, + ...rushParams, + ); } /** @@ -240,16 +138,25 @@ function tryGetPkgRelativePath(absolutePath) { : absolutePath.substring(sdkDirectoryPathStartIndex); } -const isReducedTestScopeEnabled = reducedDependencyTestMatrix[serviceDirs]; -if (isReducedTestScopeEnabled) { - // If a service is configured to have reduced test matrix then run rush for those reduced projects - console.log(`Found reduced test matrix configured for ${serviceDirs}.`); - packageNames.push(...reducedDependencyTestMatrix[serviceDirs]); +let isReducedTestScopeEnabled = false; + +for (const dir of serviceDirs) { + if (reducedDependencyTestMatrix[dir]) { + isReducedTestScopeEnabled = true; + // If a service is configured to have reduced test matrix then run rush for those reduced projects + console.log(`Found reduced test matrix configured for ${serviceDirs}.`); + packageNames.push(...reducedDependencyTestMatrix[dir]); + } } -const packagesWithDirection = getDirectionMappedPackages(packageNames); + +const packagesWithDirection = getDirectionMappedPackages(packageNames, actionComponents); const rushx_runner_path = path.join(baseDir, "common/scripts/install-run-rushx.js"); +let exitCode = 0; if (serviceDirs.length === 0) { - spawnNode(baseDir, "common/scripts/install-run-rush.js", action, ...rushParams); + exitCode = spawnNode(baseDir, "common/scripts/install-run-rush.js", action, ...rushParams); + if (exitCode) { + process.exit(exitCode); + } } else { switch (actionComponents[0]) { case "build": @@ -271,15 +178,20 @@ if (serviceDirs.length === 0) { case "lint": for (const packageDir of packageDirs) { - spawnNode(packageDir, rushx_runner_path, action); + const code = spawnNode(packageDir, rushx_runner_path, action); + if (code) { + exitCode = code; + } } break; case "check-format": for (const packageDir of packageDirs) { - if (spawnNode(packageDir, rushx_runner_path, action) !== 0) { + const code = spawnNode(packageDir, rushx_runner_path, action); + if (code !== 0) { console.log( `\nInvoke "rushx format" inside ${tryGetPkgRelativePath(packageDir)} to fix formatting\n`, ); + exitCode = code; } } break; @@ -289,3 +201,5 @@ if (serviceDirs.length === 0) { break; } } + +process.exit(exitCode); diff --git a/eng/tools/rush-runner/package.json b/eng/tools/rush-runner/package.json index fb1819ed0aae..213f849c16dd 100644 --- a/eng/tools/rush-runner/package.json +++ b/eng/tools/rush-runner/package.json @@ -3,6 +3,7 @@ "type": "module", "prettier": "../../../common/tools/eslint-plugin-azure-sdk/prettier.json", "scripts": { + "build": "npm run format && npm run lint && npm run typecheck && npm run test", "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore index.js \"test/**/*.js\"", "typecheck": "tsc", "lint": "eslint index.js test", diff --git a/eng/tools/rush-runner/test/helper.spec.js b/eng/tools/rush-runner/test/helper.spec.js deleted file mode 100644 index 7b4995559f82..000000000000 --- a/eng/tools/rush-runner/test/helper.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -import { assert, describe, it } from "vitest"; - -describe("helper", () => { - it("should pass", () => { - assert(true); - }); -}); diff --git a/eng/tools/rush-runner/test/helpers.spec.js b/eng/tools/rush-runner/test/helpers.spec.js new file mode 100644 index 000000000000..911222050953 --- /dev/null +++ b/eng/tools/rush-runner/test/helpers.spec.js @@ -0,0 +1,41 @@ +import { assert, describe, it } from "vitest"; +import { getDirectionMappedPackages, reducedDependencyTestMatrix } from "../helpers.js"; + +describe("getDirectionMappedPackages", () => { + it("should use --to reduced core scope for changed core package", () => { + const changed = ["@azure/core-client"]; + const mapped = getDirectionMappedPackages(changed, ["unit-test"]); + + assert.deepStrictEqual( + mapped, + reducedDependencyTestMatrix["core"].map((p) => ["--to", p]), + ); + }); + + it("should use --to reduced core scope for changed test-util package", () => { + const changed = ["@azure-tool/test-utils-vitest"]; + const mapped = getDirectionMappedPackages(changed, ["unit-test"]); + + assert.deepStrictEqual( + mapped, + reducedDependencyTestMatrix["core"].map((p) => ["--to", p]), + ); + }); + + it("should use --from for changed non-core packages", () => { + const changed = ["@azure/app-configuration"]; + const mapped = getDirectionMappedPackages(changed, ["unit-test"]); + + const expected = [["--from", "@azure/app-configuration"]]; + assert.deepStrictEqual(mapped, expected); + }); + + it("should use --to and --from for mixed packages", () => { + const changed = ["@azure/core-rest-pipeline", "@azure/app-configuration"]; + const mapped = getDirectionMappedPackages(changed, ["lint"]); + + const expected = reducedDependencyTestMatrix["core"].map((p) => ["--to", p]); + expected.push(["--from", "@azure/app-configuration"]); + assert.deepStrictEqual(mapped, expected); + }); +}); From 3366272697803383ec4a2687011dc6c886180fbf Mon Sep 17 00:00:00 2001 From: Pavlo Hermanov <117445225+phermanov-msft@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:46:31 +0200 Subject: [PATCH 19/55] [communication]-[sms] Fix opt out remove action (#32298) ### Packages impacted by this PR communication-sms ### Issues associated with this PR ### Describe the problem that is addressed by this PR Fix the error in optOut.remove method ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary) --- .../communication-sms/CHANGELOG.md | 9 +-- .../communication-sms/assets.json | 2 +- .../samples/v1/typescript/README.md | 6 ++ .../samples/v1/typescript/src/optOutAdd.ts | 57 +++++++++++++++++++ .../samples/v1/typescript/src/optOutCheck.ts | 57 +++++++++++++++++++ .../samples/v1/typescript/src/optOutRemove.ts | 57 +++++++++++++++++++ .../communication-sms/src/optOutsClient.ts | 5 +- 7 files changed, 185 insertions(+), 8 deletions(-) create mode 100644 sdk/communication/communication-sms/samples/v1/typescript/src/optOutAdd.ts create mode 100644 sdk/communication/communication-sms/samples/v1/typescript/src/optOutCheck.ts create mode 100644 sdk/communication/communication-sms/samples/v1/typescript/src/optOutRemove.ts diff --git a/sdk/communication/communication-sms/CHANGELOG.md b/sdk/communication/communication-sms/CHANGELOG.md index f34fe3cc195f..43d2f563c639 100644 --- a/sdk/communication/communication-sms/CHANGELOG.md +++ b/sdk/communication/communication-sms/CHANGELOG.md @@ -1,14 +1,11 @@ # Release History -## 1.2.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.2.0-beta.3 (2024-12-19) ### Bugs Fixed -### Other Changes +- Fixed Opt Out Remove action + ## 1.2.0-beta.2 (2024-12-10) diff --git a/sdk/communication/communication-sms/assets.json b/sdk/communication/communication-sms/assets.json index 58fc59782111..994158f9d237 100644 --- a/sdk/communication/communication-sms/assets.json +++ b/sdk/communication/communication-sms/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/communication/communication-sms", - "Tag": "js/communication/communication-sms_128752023a" + "Tag": "js/communication/communication-sms_49df303bfc" } diff --git a/sdk/communication/communication-sms/samples/v1/typescript/README.md b/sdk/communication/communication-sms/samples/v1/typescript/README.md index 344a4ee8b510..e4a2d007829e 100644 --- a/sdk/communication/communication-sms/samples/v1/typescript/README.md +++ b/sdk/communication/communication-sms/samples/v1/typescript/README.md @@ -17,6 +17,9 @@ These sample programs show how to use the TypeScript client libraries for Azure | [sendSms.ts][sendsms] | Send an SMS message to 1 or more recipients | | [sendSmsWithOptions.ts][sendsmswithoptions] | Configure SMS options when sending a message | | [usingAadAuth.ts][usingaadauth] | Use AAD token credentials when sending a SMS message. | +| [optOutCheck.ts][optoutcheck] | Check if recipients opted out of receiving messages | +| [optOutAdd.ts][optoutadd] | Opt out recipients from receiving messages | +| [optOutRemove.ts][optoutremove] | Remove recipients from Opt Out list | ## Prerequisites @@ -78,3 +81,6 @@ Take a look at our [API Documentation][apiref] for more information about the AP [createinstance_azurecommunicationservicesaccount]: https://learn.microsoft.com/azure/communication-services/quickstarts/create-communication-resource [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-sms/README.md [typescript]: https://www.typescriptlang.org/docs/home.html +[optoutcheck]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/communication/communication-sms/samples/v1/typescript/src/optOutCheck.ts +[optoutadd]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/communication/communication-sms/samples/v1/typescript/src/optOutAdd.ts +[optoutremove]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/communication/communication-sms/samples/v1/typescript/src/optOutRemove.ts diff --git a/sdk/communication/communication-sms/samples/v1/typescript/src/optOutAdd.ts b/sdk/communication/communication-sms/samples/v1/typescript/src/optOutAdd.ts new file mode 100644 index 000000000000..d19d810944f3 --- /dev/null +++ b/sdk/communication/communication-sms/samples/v1/typescript/src/optOutAdd.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * @summary Opt out 1 or more recipients from receiving SMS messages + */ + +import { SmsClient } from "@azure/communication-sms"; + +// Load the .env file if it exists +import * as dotenv from "dotenv"; +dotenv.config(); + +export async function main() { + console.log("== Opt Out Add =="); + + // You will need to set this environment variable or edit the following values + const connectionString = + process.env.COMMUNICATION_SAMPLES_CONNECTION_STRING || + "endpoint=https://.communication.azure.com/;"; + + // create new client + const client = new SmsClient(connectionString); + + // construct send parameters + const from = process.env.FROM_PHONE_NUMBER || process.env.AZURE_PHONE_NUMBER || ""; + let phoneNumbers: string[]; + if (process.env.TO_PHONE_NUMBERS !== undefined) { + phoneNumbers = process.env.TO_PHONE_NUMBERS.split(","); + } else if (process.env.AZURE_PHONE_NUMBER !== undefined) { + phoneNumbers = [process.env.AZURE_PHONE_NUMBER]; + } else { + phoneNumbers = ["", ""]; + } + + // send add opt out request + const optOutAddResults = await client.optOuts.add( + from, + phoneNumbers); + + // individual requests can encounter errors during sending + // use the "httpStatusCode" property to verify + for (const optOutAddResult of optOutAddResults) { + if (optOutAddResult.httpStatusCode == 200) { + console.log("Success: ", optOutAddResult); + } else { + console.error("Something went wrong when trying to send opt out add request: ", optOutAddResult); + } + } + + console.log("== Done: Opt Out Add =="); +} + +main().catch((error) => { + console.error("Encountered an error while sending opt out add request: ", error); + process.exit(1); +}); diff --git a/sdk/communication/communication-sms/samples/v1/typescript/src/optOutCheck.ts b/sdk/communication/communication-sms/samples/v1/typescript/src/optOutCheck.ts new file mode 100644 index 000000000000..cb7d80329ea2 --- /dev/null +++ b/sdk/communication/communication-sms/samples/v1/typescript/src/optOutCheck.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * @summary Check if 1 or more recipients are opted out of receiving SMS messages + */ + +import { SmsClient } from "@azure/communication-sms"; + +// Load the .env file if it exists +import * as dotenv from "dotenv"; +dotenv.config(); + +export async function main() { + console.log("== Opt Out Check =="); + + // You will need to set this environment variable or edit the following values + const connectionString = + process.env.COMMUNICATION_SAMPLES_CONNECTION_STRING || + "endpoint=https://.communication.azure.com/;"; + + // create new client + const client = new SmsClient(connectionString); + + // construct send parameters + const from = process.env.FROM_PHONE_NUMBER || process.env.AZURE_PHONE_NUMBER || ""; + let phoneNumbers: string[]; + if (process.env.TO_PHONE_NUMBERS !== undefined) { + phoneNumbers = process.env.TO_PHONE_NUMBERS.split(","); + } else if (process.env.AZURE_PHONE_NUMBER !== undefined) { + phoneNumbers = [process.env.AZURE_PHONE_NUMBER]; + } else { + phoneNumbers = ["", ""]; + } + + // send check opt out request + const optOutCheckResults = await client.optOuts.check( + from, + phoneNumbers); + + // individual requests can encounter errors during sending + // use the "httpStatusCode" property to verify + for (const optOutCheckResult of optOutCheckResults) { + if (optOutCheckResult.httpStatusCode == 200) { + console.log("Success: ", optOutCheckResult); + } else { + console.error("Something went wrong when trying to send opt out check request: ", optOutCheckResult); + } + } + + console.log("== Done: Opt Out Check =="); +} + +main().catch((error) => { + console.error("Encountered an error while sending Opt Out Check request: ", error); + process.exit(1); +}); diff --git a/sdk/communication/communication-sms/samples/v1/typescript/src/optOutRemove.ts b/sdk/communication/communication-sms/samples/v1/typescript/src/optOutRemove.ts new file mode 100644 index 000000000000..86dce22d3c99 --- /dev/null +++ b/sdk/communication/communication-sms/samples/v1/typescript/src/optOutRemove.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * @summary Remove 1 or more recipients from Opt Out list + */ + +import { SmsClient } from "@azure/communication-sms"; + +// Load the .env file if it exists +import * as dotenv from "dotenv"; +dotenv.config(); + +export async function main() { + console.log("== Opt Out Remove =="); + + // You will need to set this environment variable or edit the following values + const connectionString = + process.env.COMMUNICATION_SAMPLES_CONNECTION_STRING || + "endpoint=https://.communication.azure.com/;"; + + // create new client + const client = new SmsClient(connectionString); + + // construct send parameters + const from = process.env.FROM_PHONE_NUMBER || process.env.AZURE_PHONE_NUMBER || ""; + let phoneNumbers: string[]; + if (process.env.TO_PHONE_NUMBERS !== undefined) { + phoneNumbers = process.env.TO_PHONE_NUMBERS.split(","); + } else if (process.env.AZURE_PHONE_NUMBER !== undefined) { + phoneNumbers = [process.env.AZURE_PHONE_NUMBER]; + } else { + phoneNumbers = ["", ""]; + } + + // send add opt out request + const optOutRemoveResults = await client.optOuts.remove( + from, + phoneNumbers); + + // individual requests can encounter errors during sending + // use the "httpStatusCode" property to verify + for (const optOutRemoveResult of optOutRemoveResults) { + if (optOutRemoveResult.httpStatusCode == 200) { + console.log("Success: ", optOutRemoveResult); + } else { + console.error("Something went wrong when trying to send opt out remove request: ", optOutRemoveResult); + } + } + + console.log("== Done: Opt Out Remove =="); +} + +main().catch((error) => { + console.error("Encountered an error while sending opt out remove request: ", error); + process.exit(1); +}); diff --git a/sdk/communication/communication-sms/src/optOutsClient.ts b/sdk/communication/communication-sms/src/optOutsClient.ts index 53ba488551aa..10829a2f59f6 100644 --- a/sdk/communication/communication-sms/src/optOutsClient.ts +++ b/sdk/communication/communication-sms/src/optOutsClient.ts @@ -106,7 +106,10 @@ export class OptOutsClient { ): Promise { const { operationOptions } = extractOperationOptions(options); return tracingClient.withSpan("OptOuts-Remove", operationOptions, async (updatedOptions) => { - const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions); + const response = await this.api.optOuts.remove( + generateOptOutRequest(from, to), + updatedOptions, + ); return response.value.map((optOutResponseItem: OptOutResponseItem) => { return { From 7e136ccbc1ed941aaf4ad96b3892d57e85e2241d Mon Sep 17 00:00:00 2001 From: Juntu Chen Date: Thu, 19 Dec 2024 14:11:19 -0500 Subject: [PATCH 20/55] updated to fix pipeline --- .../review/communication-call-automation.api.md | 2 +- .../src/generated/src/callAutomationApiClient.ts | 10 +++++----- .../src/generated/src/index.ts | 8 ++++---- .../src/generated/src/models/parameters.ts | 2 +- .../src/generated/src/operations/callConnection.ts | 12 ++++++------ .../src/generated/src/operations/callDialog.ts | 10 +++++----- .../src/generated/src/operations/callMedia.ts | 10 +++++----- .../src/generated/src/operations/callRecording.ts | 10 +++++----- .../src/generated/src/operations/index.ts | 8 ++++---- .../src/operationsInterfaces/callConnection.ts | 2 +- .../generated/src/operationsInterfaces/callDialog.ts | 2 +- .../generated/src/operationsInterfaces/callMedia.ts | 2 +- .../src/operationsInterfaces/callRecording.ts | 2 +- .../src/generated/src/operationsInterfaces/index.ts | 8 ++++---- 14 files changed, 44 insertions(+), 44 deletions(-) diff --git a/sdk/communication/communication-call-automation/review/communication-call-automation.api.md b/sdk/communication/communication-call-automation/review/communication-call-automation.api.md index eac7bb5359db..9f10248409c0 100644 --- a/sdk/communication/communication-call-automation/review/communication-call-automation.api.md +++ b/sdk/communication/communication-call-automation/review/communication-call-automation.api.md @@ -113,7 +113,6 @@ export class CallAutomationClient { // @public export interface CallAutomationClientOptions extends CommonClientOptions { - opsSourceIdentity?: MicrosoftTeamsAppIdentifier; sourceIdentity?: CommunicationUserIdentifier; } @@ -464,6 +463,7 @@ export interface CreateCallOptions extends OperationOptions { operationContext?: string; sourceCallIdNumber?: PhoneNumberIdentifier; sourceDisplayName?: string; + teamsAppSource?: MicrosoftTeamsAppIdentifier; transcriptionConfiguration?: TranscriptionConfiguration; } diff --git a/sdk/communication/communication-call-automation/src/generated/src/callAutomationApiClient.ts b/sdk/communication/communication-call-automation/src/generated/src/callAutomationApiClient.ts index 017c7964ea4f..cd760b618a22 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/callAutomationApiClient.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/callAutomationApiClient.ts @@ -17,15 +17,15 @@ import { CallMediaImpl, CallDialogImpl, CallRecordingImpl, -} from "./operations"; +} from "./operations/index.js"; import { CallConnection, CallMedia, CallDialog, CallRecording, -} from "./operationsInterfaces"; -import * as Parameters from "./models/parameters"; -import * as Mappers from "./models/mappers"; +} from "./operationsInterfaces/index.js"; +import * as Parameters from "./models/parameters.js"; +import * as Mappers from "./models/mappers.js"; import { CallAutomationApiClientOptionalParams, CreateCallRequest, @@ -38,7 +38,7 @@ import { RedirectCallOptionalParams, RejectCallRequest, RejectCallOptionalParams, -} from "./models"; +} from "./models/index.js"; export class CallAutomationApiClient extends coreClient.ServiceClient { endpoint: string; diff --git a/sdk/communication/communication-call-automation/src/generated/src/index.ts b/sdk/communication/communication-call-automation/src/generated/src/index.ts index 9e17818e8dd7..25051937501e 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/index.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { CallAutomationApiClient } from "./callAutomationApiClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { CallAutomationApiClient } from "./callAutomationApiClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/communication/communication-call-automation/src/generated/src/models/parameters.ts b/sdk/communication/communication-call-automation/src/generated/src/models/parameters.ts index 955b0b20b73f..e78989bb9ef8 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/models/parameters.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/models/parameters.ts @@ -38,7 +38,7 @@ import { StartDialogRequest as StartDialogRequestMapper, UpdateDialogRequest as UpdateDialogRequestMapper, StartCallRecordingRequest as StartCallRecordingRequestMapper, -} from "../models/mappers"; +} from "../models/mappers.js"; export const contentType: OperationParameter = { parameterPath: ["options", "contentType"], diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/callConnection.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/callConnection.ts index bee6ed521a63..cab5532a9e38 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/callConnection.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/callConnection.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { CallConnection } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { CallConnection } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CallAutomationApiClient } from "../callAutomationApiClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CallAutomationApiClient } from "../callAutomationApiClient.js"; import { CallParticipantInternal, CallConnectionGetParticipantsNextOptionalParams, @@ -43,7 +43,7 @@ import { CallConnectionGetParticipantOptionalParams, CallConnectionGetParticipantResponse, CallConnectionGetParticipantsNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CallConnection operations. */ diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/callDialog.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/callDialog.ts index 02330c389d27..8d3a768299bb 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/callDialog.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/callDialog.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { CallDialog } from "../operationsInterfaces"; +import { CallDialog } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CallAutomationApiClient } from "../callAutomationApiClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CallAutomationApiClient } from "../callAutomationApiClient.js"; import { StartDialogRequest, CallDialogStartDialogOptionalParams, @@ -18,7 +18,7 @@ import { CallDialogStopDialogOptionalParams, UpdateDialogRequest, CallDialogUpdateDialogOptionalParams, -} from "../models"; +} from "../models/index.js"; /** Class containing CallDialog operations. */ export class CallDialogImpl implements CallDialog { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/callMedia.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/callMedia.ts index 222203b43c57..b563938d3763 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/callMedia.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/callMedia.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { CallMedia } from "../operationsInterfaces"; +import { CallMedia } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CallAutomationApiClient } from "../callAutomationApiClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CallAutomationApiClient } from "../callAutomationApiClient.js"; import { PlayRequest, CallMediaPlayOptionalParams, @@ -41,7 +41,7 @@ import { CallMediaStartMediaStreamingOptionalParams, StopMediaStreamingRequest, CallMediaStopMediaStreamingOptionalParams, -} from "../models"; +} from "../models/index.js"; /** Class containing CallMedia operations. */ export class CallMediaImpl implements CallMedia { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/callRecording.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/callRecording.ts index 77a91a7b2a67..8059b42bc4b6 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/callRecording.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/callRecording.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { CallRecording } from "../operationsInterfaces"; +import { CallRecording } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CallAutomationApiClient } from "../callAutomationApiClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CallAutomationApiClient } from "../callAutomationApiClient.js"; import { StartCallRecordingRequest, CallRecordingStartRecordingOptionalParams, @@ -20,7 +20,7 @@ import { CallRecordingStopRecordingOptionalParams, CallRecordingPauseRecordingOptionalParams, CallRecordingResumeRecordingOptionalParams, -} from "../models"; +} from "../models/index.js"; /** Class containing CallRecording operations. */ export class CallRecordingImpl implements CallRecording { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operations/index.ts b/sdk/communication/communication-call-automation/src/generated/src/operations/index.ts index 0e60c378238d..829c6a0bef97 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operations/index.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operations/index.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./callConnection"; -export * from "./callMedia"; -export * from "./callDialog"; -export * from "./callRecording"; +export * from "./callConnection.js"; +export * from "./callMedia.js"; +export * from "./callDialog.js"; +export * from "./callRecording.js"; diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callConnection.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callConnection.ts index abf0d138172f..65e3d775b292 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callConnection.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callConnection.ts @@ -34,7 +34,7 @@ import { CallConnectionCancelAddParticipantResponse, CallConnectionGetParticipantOptionalParams, CallConnectionGetParticipantResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a CallConnection. */ diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callDialog.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callDialog.ts index 4fccc524812b..9099de30b228 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callDialog.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callDialog.ts @@ -13,7 +13,7 @@ import { CallDialogStopDialogOptionalParams, UpdateDialogRequest, CallDialogUpdateDialogOptionalParams, -} from "../models"; +} from "../models/index.js"; /** Interface representing a CallDialog. */ export interface CallDialog { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callMedia.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callMedia.ts index 6f2b4f3f461a..8391e8d95f38 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callMedia.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callMedia.ts @@ -36,7 +36,7 @@ import { CallMediaStartMediaStreamingOptionalParams, StopMediaStreamingRequest, CallMediaStopMediaStreamingOptionalParams, -} from "../models"; +} from "../models/index.js"; /** Interface representing a CallMedia. */ export interface CallMedia { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts index 4b783a500955..b4dd60293ae8 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts @@ -15,7 +15,7 @@ import { CallRecordingStopRecordingOptionalParams, CallRecordingPauseRecordingOptionalParams, CallRecordingResumeRecordingOptionalParams, -} from "../models"; +} from "../models/index.js"; /** Interface representing a CallRecording. */ export interface CallRecording { diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/index.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/index.ts index 0e60c378238d..829c6a0bef97 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/index.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/index.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./callConnection"; -export * from "./callMedia"; -export * from "./callDialog"; -export * from "./callRecording"; +export * from "./callConnection.js"; +export * from "./callMedia.js"; +export * from "./callDialog.js"; +export * from "./callRecording.js"; From b47efecd2a526e686ed746d5a58b1b8e6d9b5651 Mon Sep 17 00:00:00 2001 From: Matthew Podwysocki Date: Thu, 19 Dec 2024 14:29:09 -0500 Subject: [PATCH 21/55] [test-utils-vitest] Add multiversion testing to vitest (#32299) ### Packages impacted by this PR - @azure-tools/test-utils-vitest ### Issues associated with this PR ### Describe the problem that is addressed by this PR Adds multi-version testing to vitest, which requires globals in order to work. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary) --------- Co-authored-by: Jeremy Meng --- .../recorder/src/utils/env-browser.mts | 4 + .../test-utils-vitest/src/multiVersion.ts | 288 ++++++++++++++++++ .../test/multiVersion.spec.ts | 85 ++++++ 3 files changed, 377 insertions(+) create mode 100644 sdk/test-utils/recorder/src/utils/env-browser.mts create mode 100644 sdk/test-utils/test-utils-vitest/src/multiVersion.ts create mode 100644 sdk/test-utils/test-utils-vitest/test/multiVersion.spec.ts diff --git a/sdk/test-utils/recorder/src/utils/env-browser.mts b/sdk/test-utils/recorder/src/utils/env-browser.mts new file mode 100644 index 000000000000..ea6ffee01997 --- /dev/null +++ b/sdk/test-utils/recorder/src/utils/env-browser.mts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export const env = globalThis.process?.env ?? {} as Record; diff --git a/sdk/test-utils/test-utils-vitest/src/multiVersion.ts b/sdk/test-utils/test-utils-vitest/src/multiVersion.ts new file mode 100644 index 000000000000..f49094b05447 --- /dev/null +++ b/sdk/test-utils/test-utils-vitest/src/multiVersion.ts @@ -0,0 +1,288 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { env, isLiveMode } from "@azure-tools/test-recorder"; +import { + describe as vitestDescribe, + it as vitestIt, + SuiteFactory, + TestFunction, + TestOptions, +} from "vitest"; + +// eslint-disable-next-line @typescript-eslint/no-namespace +declare namespace globalThis { + let describe: typeof vitestDescribe; + let it: typeof vitestIt; + let xit: typeof vitestIt.skip; + let xdescribe: typeof vitestDescribe.skip; +} + +globalThis.describe = vitestDescribe; +globalThis.it = vitestIt; +globalThis.xit = vitestIt.skip; +globalThis.xdescribe = vitestDescribe.skip; + +export interface TestFunctionWrapper { + it: typeof vitestIt; + xit: typeof vitestIt.skip; + describe: typeof vitestDescribe; + xdescribe: typeof vitestDescribe.skip; +} + +/** + * Specifies service versions that a test/test suite supports. This can be a list of + * version strings, or a range of versions denoted by minVer/maxVer. + */ +export type SupportedVersions = + | string[] + | { + minVer?: string; + maxVer?: string; + }; + +function skipReason(currentVersion: string, supported: SupportedVersions): string { + if (supported instanceof Array) { + return `skipping for version ${currentVersion} as it is not in the list [${supported.join()}]`; + } else { + return `skipping for version ${currentVersion} as it is not in the range: [min ${ + supported.minVer ?? "" + }, max ${supported.maxVer ?? ""}]`; + } +} + +/** + * + * @param currentVersion current service version to run test with + * @param supported service versions supported by a test suite or test case + * @param allVersions all service versions supported by the SDK library being tested. + * NOTE: The versions must be in order from oldest to latest. + */ +export function isVersionInSupportedRange( + currentVersion: string, + supported: SupportedVersions, + allVersions: ReadonlyArray, +): { isSupported: boolean; skipReason?: string } { + const lessThanOrEqual = function (a: string, b: string) { + const idxA = allVersions.indexOf(a); + const idxB = allVersions.indexOf(b); + if (idxA === -1) { + throw new Error(`version '${a}' is not in versions supported by the SDK`); + } + if (idxB === -1) { + throw new Error(`version '${b}' is not in versions supported by the SDK`); + } + return idxA <= idxB; + }; + let run: boolean; + if (supported instanceof Array) { + // console.log(`Test ${currentVersion} for supported versions [${supported.join()}]?`); + + run = supported.includes(currentVersion); + + if (run) { + // console.log(` Running test on ${currentVersion}`); + return { isSupported: true }; + } else { + // console.log(` Skipping test on ${currentVersion}`); + return { + isSupported: false, + skipReason: skipReason(currentVersion, supported), + }; + } + } else { + // console.log( + // `Test ${currentVersion} for supported version range: [min ${supported.minVer} max ${supported.maxVer}]?` + // ); + if (supported.minVer && supported.maxVer) { + if ( + lessThanOrEqual(supported.minVer, currentVersion) && + lessThanOrEqual(currentVersion, supported.maxVer) + ) { + // console.log(` Test ${currentVersion} because it is within range`); + return { isSupported: true }; + } else { + // console.log(` Skipping ${currentVersion} because it is out of range`); + return { + isSupported: false, + skipReason: skipReason(currentVersion, supported), + }; + } + } else if (supported.minVer) { + if (lessThanOrEqual(supported.minVer, currentVersion)) { + // console.log(` Test ${currentVersion} because it's above minVer`); + return { isSupported: true }; + } else { + // console.log(` Skip ${currentVersion} because it's below minVer`); + return { + isSupported: false, + skipReason: skipReason(currentVersion, supported), + }; + } + } else if (supported.maxVer) { + if (lessThanOrEqual(currentVersion, supported.maxVer)) { + // console.log(` Test ${currentVersion} because it's below maxVer`); + return { isSupported: true }; + } else { + // console.log(` Skip ${currentVersion} because it's above maxVer`); + return { + isSupported: false, + skipReason: skipReason(currentVersion, supported), + }; + } + } else { + throw new Error( + "Must use either minVer, or maxVer, or both to specify supported version range.", + ); + } + } +} + +/** + * Returns a Vitest wrapper that runs or skips a test/test suite for currentVersion, given a list + * of versions or a range of versions supported by the test/test suite. + * @param currentVersion version to check wether to run or skip + * @param supported supported versions for a test/test suite + * @param allVersions all service versions supported by the SDK library being tested. + * NOTE: The versions must be in order from oldest to latest. + */ +export function supports( + currentVersion: string, + supported: SupportedVersions, + allVersions: ReadonlyArray, +): TestFunctionWrapper { + const run = isVersionInSupportedRange(currentVersion, supported, allVersions); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const either = function (match: any, skip: any) { + return run.isSupported + ? match + : isLiveMode() + ? // only append skip reason to titles in live TEST_MODE. + // Record and playback depends on titles for recording file names so keeping them + // in order to be compatible with existing recordings. + function ( + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + title: string | Function, + fn?: TestFunction | undefined, + options?: number | TestOptions, + ) { + return skip(`${title} (${run.skipReason})`, fn, options); + } + : skip; + }; + + const it = either(supports.global.it, supports.global.xit); + Object.defineProperty(it, "onlyWithReason", { + value: either(supports.global.it.only, supports.global.xit), + configurable: true, + }); + Object.defineProperty(it, "skipWithReason", { + value: supports.global.it.skip, + configurable: true, + }); + + // add current service version to suite titles in Live TEST_MODE + // Record and playback depends on titles for recording file names so keeping them + // in order to be compatible with existing recordings. + const wrappedDescribe = isLiveMode() + ? function ( + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + title: string | Function, + fn?: SuiteFactory | undefined, + options?: number | TestOptions, + ) { + return supports.global.describe( + `${title} (service version ${currentVersion})`, + fn, + options, + ); + } + : supports.global.describe; + const wrappedDescribeOnly = isLiveMode() + ? function ( + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + title: string | Function, + fn?: SuiteFactory | undefined, + options?: number | TestOptions, + ) { + return supports.global.describe.only( + `${title} (service version ${currentVersion})`, + fn, + options, + ); + } + : supports.global.describe.only; + + const describe = either(wrappedDescribe, supports.global.xdescribe); + Object.defineProperty(describe, "onlyWithReason", { + value: either(wrappedDescribeOnly, supports.global.xdescribe), + configurable: true, + }); + Object.defineProperty(describe, "skipWithReason", { + value: supports.global.describe.skip, + configurable: true, + }); + + const chain: TestFunctionWrapper = { + it, + xit: supports.global.xit, + describe, + xdescribe: supports.global.xdescribe, + }; + + return chain; +} + +supports.global = globalThis; + +/** + * Options to multi-service-version tests + */ +export interface MultiVersionTestOptions { + /** + * version to used for record/playback + */ + versionForRecording?: string; +} + +function isMultiVersionDisabled(): boolean { + return Boolean(env.DISABLE_MULTI_VERSION_TESTING); +} + +/** + * Determines the set of service versions used to run tests based on TEST_MODE + * - For live tests loop through all the versions and run tests for each version. + * - For record and playback, use the defaultVersion in options if specified, otherwise use the latest version. + * @param versions list of service versions to run the tests + * @param options Optional settings such as version to use for record/playback, and + * custom string comparison function to determines order of version strings. + * @param handler the function to run with each service version + */ +export function versionsToTest( + versions: ReadonlyArray, + options: MultiVersionTestOptions = {}, + handler: ( + serviceVersion: string, + onVersions: (supported: SupportedVersions) => TestFunctionWrapper, + ) => void, +): void { + if (versions.length <= 0) { + throw new Error("invalid list of service versions to run the tests."); + } + let toTest: ReadonlyArray; + // all versions are used in live TEST_MODE + if (isLiveMode() && !isMultiVersionDisabled()) { + toTest = versions; + } else { + toTest = options.versionForRecording + ? [options.versionForRecording] + : versions.slice(versions.length - 1); + } + + toTest.forEach((serviceVersion) => { + const onVersions = function (supported: SupportedVersions) { + return supports(serviceVersion, supported, versions); + }; + handler(serviceVersion, onVersions); + }); +} diff --git a/sdk/test-utils/test-utils-vitest/test/multiVersion.spec.ts b/sdk/test-utils/test-utils-vitest/test/multiVersion.spec.ts new file mode 100644 index 000000000000..de7eb8d0d4db --- /dev/null +++ b/sdk/test-utils/test-utils-vitest/test/multiVersion.spec.ts @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { describe, it, assert, beforeEach, afterEach } from "vitest"; +import { isVersionInSupportedRange, versionsToTest } from "../src/multiVersion.js"; + +describe("Multi-service-version test support", () => { + const allVersions = ["1.0", "1.1", "1.2"]; + describe("isVersionInSupportedRange() on version list", () => { + [ + { currentVersion: "1.0", supported: ["1.0", "1.1"], expected: true }, + { currentVersion: "1.2", supported: ["1.0", "1.1"], expected: false }, + { currentVersion: "1.0", supported: { minVer: "1.0", maxVer: undefined }, expected: true }, + { currentVersion: "1.1", supported: { minVer: "1.0", maxVer: undefined }, expected: true }, + { currentVersion: "1.0", supported: { minVer: "1.1", maxVer: undefined }, expected: false }, + { currentVersion: "1.0", supported: { minVer: undefined, maxVer: "1.1" }, expected: true }, + { currentVersion: "1.1", supported: { minVer: undefined, maxVer: "1.1" }, expected: true }, + { currentVersion: "1.2", supported: { minVer: undefined, maxVer: "1.1" }, expected: false }, + ].forEach((arg) => { + const { currentVersion, supported, expected } = arg; + let versions: string; + if (supported instanceof Array) { + versions = `[${supported.join()}]`; + } else { + versions = `[min ${supported.minVer ?? ""}, max ${ + supported.maxVer ?? "" + }]`; + } + it(`returns ${expected} for ${currentVersion} and supported versions ${versions}`, () => { + const result = isVersionInSupportedRange(currentVersion, supported, allVersions); + assert.equal(result.isSupported, expected); + }); + }); + }); +}); + +const serviceVersions = ["7.0", "7.1"] as const; +versionsToTest(serviceVersions, {}, (serviceVersion, onVersions) => { + describe("test suite 1", () => { + beforeEach(async () => { + console.log(`creating test client for service version ${serviceVersion}`); + }); + + afterEach(async () => { + /** empty */ + }); + + it("test case 2", () => { + if (serviceVersion === "7.0") { + console.log(`verifying behavior specific to ${serviceVersion}`); + } + }); + + describe("nested test suite 3a", () => { + it("nested test 4a", () => { + /** empty */ + }); + }); + + onVersions(["7.0"]).describe("nested test suite 3b", () => { + it("nested test 4b", () => { + assert.equal(serviceVersion, "7.0"); + }); + }); + + onVersions(["7.0"]).it("test case 5 only runs on 7.0", () => { + assert.equal(serviceVersion, "7.0"); + }); + + onVersions({ minVer: "7.1" }).it("test case 6 only runs on 7.1", async () => { + assert.notEqual(serviceVersion, "7.0"); + }); + + onVersions({ minVer: "7.1" }).it.skip("test case 7 should be skipped", async () => { + throw new Error("Test should have been skipped."); + }); + }); + + onVersions(["7.0"]).describe("test suite 2", async () => { + console.log(`onVersions() can be added to top-level describe as well to have nicer test title`); + it("test case 8", () => { + assert.equal(serviceVersion, "7.0"); + }); + }); +}); From cbd2b87f97f5c463cc3e647b4cf35cd907a45d69 Mon Sep 17 00:00:00 2001 From: Deyaaeldeen Almahallawi Date: Thu, 19 Dec 2024 12:49:28 -0800 Subject: [PATCH 22/55] [Event Hubs] Fix type (#32303) After upgrade to TS 5.7.2. --- .../event-hubs/test/internal/node/partitionKeyHashMap.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/eventhub/event-hubs/test/internal/node/partitionKeyHashMap.spec.ts b/sdk/eventhub/event-hubs/test/internal/node/partitionKeyHashMap.spec.ts index f276065689a9..fce3f0fc1cb9 100644 --- a/sdk/eventhub/event-hubs/test/internal/node/partitionKeyHashMap.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/node/partitionKeyHashMap.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { hashPartitionKey } from "../../../src/impl/partitionKeyToIdMapper.js"; -import expectations from "./partitionKeyHashMap.json"; +import expectations from "./partitionKeyHashMap.json" assert { type: "json" }; import { assert } from "../../utils/chai.js"; import { describe, it } from "vitest"; From 2faafa932c60df84b7c1197f06e25d5d8f955492 Mon Sep 17 00:00:00 2001 From: Ganesh Bheemarasetty <1634042+ganeshyb@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:55:34 -0800 Subject: [PATCH 23/55] Azure AI Foundary - Projects JS SDK - Agents Preview (#32301) ### Packages impacted by this PR New package @azure/ai-projects ### Issues associated with this PR ### Describe the problem that is addressed by this PR AI Projects with Agent capabilities more details here https://learn.microsoft.com/en-us/azure/ai-studio/how-to/create-projects?tabs=ai-studio https://learn.microsoft.com/en-us/azure/ai-studio/how-to/develop/sdk-overview ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [x ] Added impacted package name to the issue description - [ x] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x ] Added a changelog (if necessary) --------- Co-authored-by: Grace Brigham <30578281+GraceBrigham@users.noreply.github.com> Co-authored-by: Grace Brigham Co-authored-by: ZachhK <112514790+ZachhK@users.noreply.github.com> Co-authored-by: Zachary King Co-authored-by: ansaxena1 <72756698+ansaxena1@users.noreply.github.com> Co-authored-by: Jeremy Meng Co-authored-by: Jeff Fisher --- common/config/rush/pnpm-lock.yaml | 97 + rush.json | 5 + sdk/ai/ai-projects/CHANGELOG.md | 7 + sdk/ai/ai-projects/LICENSE | 21 + sdk/ai/ai-projects/README.md | 710 ++++++ sdk/ai/ai-projects/api-extractor.json | 18 + sdk/ai/ai-projects/assets.json | 6 + sdk/ai/ai-projects/eslint.config.mjs | 17 + sdk/ai/ai-projects/package.json | 160 ++ sdk/ai/ai-projects/review/ai-projects.api.md | 1969 +++++++++++++++++ sdk/ai/ai-projects/sample.env | 3 + .../agents/agentCreateWithTracingConsole.ts | 101 + .../samples-dev/agents/agentsAzureAiSearch.ts | 83 + .../samples-dev/agents/agentsBasics.ts | 40 + .../samples-dev/agents/agentsBingGrounding.ts | 92 + .../agentsBingGroundingWithStreaming.ts | 122 + .../agents/agentsWithFunctionTool.ts | 206 ++ .../samples-dev/agents/agentsWithToolset.ts | 74 + .../agents/batchVectorStoreWithFiles.ts | 89 + .../batchVectorStoreWithFilesAndPolling.ts | 90 + .../samples-dev/agents/codeInterpreter.ts | 139 ++ .../agents/codeInterpreterWithStreaming.ts | 173 ++ .../samples-dev/agents/fileSearch.ts | 104 + .../ai-projects/samples-dev/agents/files.ts | 52 + .../agents/filesWithLocalUpload.ts | 50 + .../samples-dev/agents/filesWithPolling.ts | 46 + .../samples-dev/agents/messages.ts | 57 + .../samples-dev/agents/runSteps.ts | 72 + .../samples-dev/agents/streaming.ts | 90 + .../ai-projects/samples-dev/agents/threads.ts | 41 + .../agents/vectorStoreWithFiles.ts | 72 + .../agents/vectorStoreWithFilesAndPolling.ts | 66 + .../samples-dev/agents/vectorStores.ts | 51 + .../agents/vectorStoresWithPolling.ts | 52 + .../connections/connectionsBasics.ts | 47 + .../samples-dev/data/localFile.txt | 1 + .../data/nifty500QuarterlyResults.csv | 502 +++++ .../samples-dev/data/sampleFileForUpload.txt | 1 + .../samples/v1-beta/javascript/README.md | 109 + .../agents/agentCreateWithTracingConsole.js | 102 + .../javascript/agents/agentsAzureAiSearch.js | 73 + .../v1-beta/javascript/agents/agentsBasics.js | 40 + .../javascript/agents/agentsBingGrounding.js | 81 + .../agentsBingGroundingWithStreaming.js | 105 + .../agents/agentsWithFunctionTool.js | 181 ++ .../javascript/agents/agentsWithToolset.js | 75 + .../agents/batchVectorStoreWithFiles.js | 90 + .../batchVectorStoreWithFilesAndPolling.js | 91 + .../javascript/agents/codeInterpreter.js | 128 ++ .../agents/codeInterpreterWithStreaming.js | 156 ++ .../v1-beta/javascript/agents/fileSearch.js | 91 + .../v1-beta/javascript/agents/files.js | 54 + .../javascript/agents/filesWithLocalUpload.js | 51 + .../javascript/agents/filesWithPolling.js | 47 + .../v1-beta/javascript/agents/messages.js | 45 + .../v1-beta/javascript/agents/runSteps.js | 70 + .../v1-beta/javascript/agents/streaming.js | 76 + .../v1-beta/javascript/agents/threads.js | 41 + .../javascript/agents/vectorStoreWithFiles.js | 73 + .../agents/vectorStoreWithFilesAndPolling.js | 67 + .../v1-beta/javascript/agents/vectorStores.js | 51 + .../agents/vectorStoresWithPolling.js | 52 + .../connections/connectionsBasics.js | 47 + .../v1-beta/javascript/data/localFile.txt | 1 + .../data/nifty500QuarterlyResults.csv | 502 +++++ .../javascript/data/sampleFileForUpload.txt | 1 + .../samples/v1-beta/javascript/package.json | 39 + .../samples/v1-beta/javascript/sample.env | 3 + .../samples/v1-beta/typescript/README.md | 122 + .../samples/v1-beta/typescript/package.json | 48 + .../samples/v1-beta/typescript/sample.env | 3 + .../agents/agentCreateWithTracingConsole.ts | 101 + .../src/agents/agentsAzureAiSearch.ts | 82 + .../typescript/src/agents/agentsBasics.ts | 39 + .../src/agents/agentsBingGrounding.ts | 91 + .../agentsBingGroundingWithStreaming.ts | 121 + .../src/agents/agentsWithFunctionTool.ts | 207 ++ .../src/agents/agentsWithToolset.ts | 73 + .../src/agents/batchVectorStoreWithFiles.ts | 88 + .../batchVectorStoreWithFilesAndPolling.ts | 89 + .../typescript/src/agents/codeInterpreter.ts | 138 ++ .../agents/codeInterpreterWithStreaming.ts | 172 ++ .../typescript/src/agents/fileSearch.ts | 103 + .../v1-beta/typescript/src/agents/files.ts | 52 + .../src/agents/filesWithLocalUpload.ts | 49 + .../typescript/src/agents/filesWithPolling.ts | 45 + .../v1-beta/typescript/src/agents/messages.ts | 56 + .../v1-beta/typescript/src/agents/runSteps.ts | 71 + .../typescript/src/agents/streaming.ts | 89 + .../v1-beta/typescript/src/agents/threads.ts | 40 + .../src/agents/vectorStoreWithFiles.ts | 71 + .../agents/vectorStoreWithFilesAndPolling.ts | 65 + .../typescript/src/agents/vectorStores.ts | 50 + .../src/agents/vectorStoresWithPolling.ts | 51 + .../src/connections/connectionsBasics.ts | 46 + .../v1-beta/typescript/src/data/localFile.txt | 1 + .../src/data/nifty500QuarterlyResults.csv | 502 +++++ .../src/data/sampleFileForUpload.txt | 1 + .../samples/v1-beta/typescript/tsconfig.json | 17 + sdk/ai/ai-projects/src/agents/assistants.ts | 279 +++ .../ai-projects/src/agents/assistantsTrace.ts | 62 + sdk/ai/ai-projects/src/agents/customModels.ts | 352 +++ sdk/ai/ai-projects/src/agents/files.ts | 165 ++ sdk/ai/ai-projects/src/agents/index.ts | 489 ++++ sdk/ai/ai-projects/src/agents/inputOutputs.ts | 274 +++ .../src/agents/inputValidations.ts | 141 ++ sdk/ai/ai-projects/src/agents/messages.ts | 191 ++ .../ai-projects/src/agents/messagesTrace.ts | 58 + sdk/ai/ai-projects/src/agents/openAIError.ts | 36 + sdk/ai/ai-projects/src/agents/poller.ts | 112 + sdk/ai/ai-projects/src/agents/runSteps.ts | 96 + sdk/ai/ai-projects/src/agents/runTrace.ts | 106 + sdk/ai/ai-projects/src/agents/runs.ts | 404 ++++ sdk/ai/ai-projects/src/agents/streaming.ts | 179 ++ .../ai-projects/src/agents/streamingModels.ts | 150 ++ sdk/ai/ai-projects/src/agents/threads.ts | 184 ++ sdk/ai/ai-projects/src/agents/threadsTrace.ts | 32 + sdk/ai/ai-projects/src/agents/traceUtility.ts | 170 ++ sdk/ai/ai-projects/src/agents/utils.ts | 235 ++ sdk/ai/ai-projects/src/agents/vectorStores.ts | 199 ++ .../src/agents/vectorStoresFileBatches.ts | 186 ++ .../src/agents/vectorStoresFiles.ts | 173 ++ .../src/agents/vectorStoresModels.ts | 40 + sdk/ai/ai-projects/src/aiProjectsClient.ts | 122 + .../src/connections/connections.ts | 95 + .../src/connections/customModels.ts | 40 + sdk/ai/ai-projects/src/connections/index.ts | 44 + .../src/connections/inputOutput.ts | 18 + .../src/connections/internalModels.ts | 10 + sdk/ai/ai-projects/src/constants.ts | 12 + .../src/customization/convertModelsToWrite.ts | 624 ++++++ .../convertOutputModelsFromWire.ts | 1354 ++++++++++++ .../customization/convertParametersToWire.ts | 79 + .../ai-projects/src/customization/models.ts | 902 ++++++++ .../src/customization/outputModels.ts | 1498 +++++++++++++ .../src/customization/parameters.ts | 491 ++++ .../src/customization/streamingModels.ts | 307 +++ .../src/customization/streamingWireModels.ts | 303 +++ .../src/generated/src/clientDefinitions.ts | 672 ++++++ sdk/ai/ai-projects/src/generated/src/index.ts | 15 + .../src/generated/src/isUnexpected.ts | 586 +++++ .../ai-projects/src/generated/src/logger.ts | 5 + .../ai-projects/src/generated/src/models.ts | 910 ++++++++ .../src/generated/src/outputModels.ts | 1527 +++++++++++++ .../src/generated/src/paginateHelper.ts | 154 ++ .../src/generated/src/parameters.ts | 509 +++++ .../src/generated/src/projectsClient.ts | 75 + .../src/generated/src/responses.ts | 976 ++++++++ sdk/ai/ai-projects/src/index.ts | 13 + sdk/ai/ai-projects/src/logger.ts | 6 + sdk/ai/ai-projects/src/telemetry/index.ts | 56 + sdk/ai/ai-projects/src/telemetry/telemetry.ts | 74 + sdk/ai/ai-projects/src/tracing.ts | 318 +++ sdk/ai/ai-projects/test.env | 1 + .../test/public/agents/assistants.spec.ts | 95 + .../test/public/agents/files.spec.ts | 86 + .../test/public/agents/functionTool.spec.ts | 152 ++ .../test/public/agents/messages.spec.ts | 104 + .../test/public/agents/runSteps.spec.ts | 120 + .../test/public/agents/runs.spec.ts | 253 +++ .../test/public/agents/streaming.spec.ts | 110 + .../test/public/agents/threads.spec.ts | 87 + .../test/public/agents/tracing.spec.ts | 233 ++ .../test/public/agents/vectorStores.spec.ts | 114 + .../agents/vectorStoresFileBatches.spec.ts | 270 +++ .../public/agents/vectorStoresFiles.spec.ts | 185 ++ .../public/connections/connections.spec.ts | 68 + .../test/public/telemetry/telemetry.spec.ts | 46 + .../test/public/utils/createClient.ts | 130 ++ sdk/ai/ai-projects/test/public/utils/env.ts | 6 + .../ai-projects/tsconfig.browser.config.json | 10 + sdk/ai/ai-projects/tsconfig.json | 18 + sdk/ai/ai-projects/tsp-location.yaml | 4 + sdk/ai/ai-projects/vitest.browser.config.ts | 37 + sdk/ai/ai-projects/vitest.config.ts | 15 + sdk/ai/ci.yml | 3 + 176 files changed, 29006 insertions(+) create mode 100644 sdk/ai/ai-projects/CHANGELOG.md create mode 100644 sdk/ai/ai-projects/LICENSE create mode 100644 sdk/ai/ai-projects/README.md create mode 100644 sdk/ai/ai-projects/api-extractor.json create mode 100644 sdk/ai/ai-projects/assets.json create mode 100644 sdk/ai/ai-projects/eslint.config.mjs create mode 100644 sdk/ai/ai-projects/package.json create mode 100644 sdk/ai/ai-projects/review/ai-projects.api.md create mode 100644 sdk/ai/ai-projects/sample.env create mode 100644 sdk/ai/ai-projects/samples-dev/agents/agentCreateWithTracingConsole.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/agentsAzureAiSearch.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/agentsBasics.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/agentsBingGrounding.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/agentsBingGroundingWithStreaming.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/agentsWithFunctionTool.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/agentsWithToolset.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/batchVectorStoreWithFiles.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/batchVectorStoreWithFilesAndPolling.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/codeInterpreter.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/codeInterpreterWithStreaming.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/fileSearch.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/files.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/filesWithLocalUpload.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/filesWithPolling.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/messages.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/runSteps.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/streaming.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/threads.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/vectorStoreWithFiles.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/vectorStoreWithFilesAndPolling.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/vectorStores.ts create mode 100644 sdk/ai/ai-projects/samples-dev/agents/vectorStoresWithPolling.ts create mode 100644 sdk/ai/ai-projects/samples-dev/connections/connectionsBasics.ts create mode 100644 sdk/ai/ai-projects/samples-dev/data/localFile.txt create mode 100644 sdk/ai/ai-projects/samples-dev/data/nifty500QuarterlyResults.csv create mode 100644 sdk/ai/ai-projects/samples-dev/data/sampleFileForUpload.txt create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/README.md create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentCreateWithTracingConsole.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsAzureAiSearch.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBasics.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBingGrounding.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBingGroundingWithStreaming.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithFunctionTool.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithToolset.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/batchVectorStoreWithFiles.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/batchVectorStoreWithFilesAndPolling.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/codeInterpreter.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/codeInterpreterWithStreaming.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/fileSearch.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/files.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/filesWithLocalUpload.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/filesWithPolling.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/messages.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/runSteps.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/streaming.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/threads.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoreWithFiles.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoreWithFilesAndPolling.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStores.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoresWithPolling.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/connections/connectionsBasics.js create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/data/localFile.txt create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/data/nifty500QuarterlyResults.csv create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/data/sampleFileForUpload.txt create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/package.json create mode 100644 sdk/ai/ai-projects/samples/v1-beta/javascript/sample.env create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/README.md create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/package.json create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/sample.env create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentCreateWithTracingConsole.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsAzureAiSearch.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBasics.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBingGrounding.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBingGroundingWithStreaming.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithFunctionTool.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithToolset.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/batchVectorStoreWithFiles.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/batchVectorStoreWithFilesAndPolling.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/codeInterpreter.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/codeInterpreterWithStreaming.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/fileSearch.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/files.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/filesWithLocalUpload.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/filesWithPolling.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/messages.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/runSteps.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/streaming.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/threads.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoreWithFiles.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoreWithFilesAndPolling.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStores.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoresWithPolling.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/connections/connectionsBasics.ts create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/localFile.txt create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/nifty500QuarterlyResults.csv create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/sampleFileForUpload.txt create mode 100644 sdk/ai/ai-projects/samples/v1-beta/typescript/tsconfig.json create mode 100644 sdk/ai/ai-projects/src/agents/assistants.ts create mode 100644 sdk/ai/ai-projects/src/agents/assistantsTrace.ts create mode 100644 sdk/ai/ai-projects/src/agents/customModels.ts create mode 100644 sdk/ai/ai-projects/src/agents/files.ts create mode 100644 sdk/ai/ai-projects/src/agents/index.ts create mode 100644 sdk/ai/ai-projects/src/agents/inputOutputs.ts create mode 100644 sdk/ai/ai-projects/src/agents/inputValidations.ts create mode 100644 sdk/ai/ai-projects/src/agents/messages.ts create mode 100644 sdk/ai/ai-projects/src/agents/messagesTrace.ts create mode 100644 sdk/ai/ai-projects/src/agents/openAIError.ts create mode 100644 sdk/ai/ai-projects/src/agents/poller.ts create mode 100644 sdk/ai/ai-projects/src/agents/runSteps.ts create mode 100644 sdk/ai/ai-projects/src/agents/runTrace.ts create mode 100644 sdk/ai/ai-projects/src/agents/runs.ts create mode 100644 sdk/ai/ai-projects/src/agents/streaming.ts create mode 100644 sdk/ai/ai-projects/src/agents/streamingModels.ts create mode 100644 sdk/ai/ai-projects/src/agents/threads.ts create mode 100644 sdk/ai/ai-projects/src/agents/threadsTrace.ts create mode 100644 sdk/ai/ai-projects/src/agents/traceUtility.ts create mode 100644 sdk/ai/ai-projects/src/agents/utils.ts create mode 100644 sdk/ai/ai-projects/src/agents/vectorStores.ts create mode 100644 sdk/ai/ai-projects/src/agents/vectorStoresFileBatches.ts create mode 100644 sdk/ai/ai-projects/src/agents/vectorStoresFiles.ts create mode 100644 sdk/ai/ai-projects/src/agents/vectorStoresModels.ts create mode 100644 sdk/ai/ai-projects/src/aiProjectsClient.ts create mode 100644 sdk/ai/ai-projects/src/connections/connections.ts create mode 100644 sdk/ai/ai-projects/src/connections/customModels.ts create mode 100644 sdk/ai/ai-projects/src/connections/index.ts create mode 100644 sdk/ai/ai-projects/src/connections/inputOutput.ts create mode 100644 sdk/ai/ai-projects/src/connections/internalModels.ts create mode 100644 sdk/ai/ai-projects/src/constants.ts create mode 100644 sdk/ai/ai-projects/src/customization/convertModelsToWrite.ts create mode 100644 sdk/ai/ai-projects/src/customization/convertOutputModelsFromWire.ts create mode 100644 sdk/ai/ai-projects/src/customization/convertParametersToWire.ts create mode 100644 sdk/ai/ai-projects/src/customization/models.ts create mode 100644 sdk/ai/ai-projects/src/customization/outputModels.ts create mode 100644 sdk/ai/ai-projects/src/customization/parameters.ts create mode 100644 sdk/ai/ai-projects/src/customization/streamingModels.ts create mode 100644 sdk/ai/ai-projects/src/customization/streamingWireModels.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/clientDefinitions.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/index.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/isUnexpected.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/logger.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/models.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/outputModels.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/paginateHelper.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/parameters.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/projectsClient.ts create mode 100644 sdk/ai/ai-projects/src/generated/src/responses.ts create mode 100644 sdk/ai/ai-projects/src/index.ts create mode 100644 sdk/ai/ai-projects/src/logger.ts create mode 100644 sdk/ai/ai-projects/src/telemetry/index.ts create mode 100644 sdk/ai/ai-projects/src/telemetry/telemetry.ts create mode 100644 sdk/ai/ai-projects/src/tracing.ts create mode 100644 sdk/ai/ai-projects/test.env create mode 100644 sdk/ai/ai-projects/test/public/agents/assistants.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/files.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/functionTool.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/messages.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/runSteps.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/runs.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/streaming.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/threads.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/tracing.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/vectorStores.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/vectorStoresFileBatches.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/agents/vectorStoresFiles.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/connections/connections.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/telemetry/telemetry.spec.ts create mode 100644 sdk/ai/ai-projects/test/public/utils/createClient.ts create mode 100644 sdk/ai/ai-projects/test/public/utils/env.ts create mode 100644 sdk/ai/ai-projects/tsconfig.browser.config.json create mode 100644 sdk/ai/ai-projects/tsconfig.json create mode 100644 sdk/ai/ai-projects/tsp-location.yaml create mode 100644 sdk/ai/ai-projects/vitest.browser.config.ts create mode 100644 sdk/ai/ai-projects/vitest.config.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index f52e8265a995..db2ac9704e38 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -46,6 +46,9 @@ importers: '@rush-temp/ai-metrics-advisor': specifier: file:./projects/ai-metrics-advisor.tgz version: file:projects/ai-metrics-advisor.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) + '@rush-temp/ai-projects': + specifier: file:./projects/ai-projects.tgz + version: file:projects/ai-projects.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/ai-text-analytics': specifier: file:./projects/ai-text-analytics.tgz version: file:projects/ai-text-analytics.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) @@ -2487,6 +2490,10 @@ packages: resolution: {integrity: sha512-AxwsBkChyxD6pZwEvGZ+wI+pSeBCd+DeIa57nIIJdvZnIE2o/FE14B7NU1lPMlPPm7nYtXzixlZveFP1FhdOLw==, tarball: file:projects/ai-metrics-advisor.tgz} version: 0.0.0 + '@rush-temp/ai-projects@file:projects/ai-projects.tgz': + resolution: {integrity: sha512-MHA7Kt2tqwvLRvZ8tqSYg5ywDUVvYQGbF/4tq1SOyNXe23XTezXT/sg6LlVZBe/i1UiDm3PzT5ExyC/Iqoamqw==, tarball: file:projects/ai-projects.tgz} + version: 0.0.0 + '@rush-temp/ai-text-analytics@file:projects/ai-text-analytics.tgz': resolution: {integrity: sha512-W8zFnKDK545BnmEU/GV8nawA/ylUxHQR4U05wtmWfIvk0x1CsQGhzy+OljNVuZjYqiWwixK5yrRRaxfWUHifAw==, tarball: file:projects/ai-text-analytics.tgz} version: 0.0.0 @@ -7819,6 +7826,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + engines: {node: '>=14.17'} + hasBin: true + typescript@5.6.1-rc: resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} engines: {node: '>=14.17'} @@ -10040,6 +10052,43 @@ snapshots: - vite - webdriverio + '@rush-temp/ai-projects@file:projects/ai-projects.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': + dependencies: + '@azure/core-lro': 2.7.2 + '@opentelemetry/api': 1.9.0 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-node': 1.29.0(@opentelemetry/api@1.9.0) + '@types/node': 18.19.68 + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.5.4)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) + dotenv: 16.4.7 + eslint: 8.57.1 + playwright: 1.49.1 + prettier: 3.4.2 + tshy: 1.18.0 + tslib: 2.8.1 + typescript: 5.5.4 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - utf-8-validate + - vite + - webdriverio + '@rush-temp/ai-text-analytics@file:projects/ai-text-analytics.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@azure/core-lro': 2.7.2 @@ -20375,6 +20424,27 @@ snapshots: '@ungap/structured-clone@1.2.1': {} + '@vitest/browser@2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.5.4)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)': + dependencies: + '@testing-library/dom': 10.4.0 + '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) + '@vitest/mocker': 2.1.8(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) + '@vitest/utils': 2.1.8 + magic-string: 0.30.15 + msw: 2.6.8(@types/node@18.19.68)(typescript@5.5.4) + sirv: 3.0.0 + tinyrainbow: 1.2.0 + vitest: 2.1.8(@types/node@22.7.9)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) + ws: 8.18.0 + optionalDependencies: + playwright: 1.49.1 + transitivePeerDependencies: + - '@types/node' + - bufferutil + - typescript + - utf-8-validate + - vite + '@vitest/browser@2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)': dependencies: '@testing-library/dom': 10.4.0 @@ -22791,6 +22861,31 @@ snapshots: ms@2.1.3: {} + msw@2.6.8(@types/node@18.19.68)(typescript@5.5.4): + dependencies: + '@bundled-es-modules/cookie': 2.0.1 + '@bundled-es-modules/statuses': 1.0.1 + '@bundled-es-modules/tough-cookie': 0.1.6 + '@inquirer/confirm': 5.1.0(@types/node@18.19.68) + '@mswjs/interceptors': 0.37.3 + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.5 + chalk: 4.1.2 + graphql: 16.9.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + strict-event-emitter: 0.5.1 + type-fest: 4.30.1 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - '@types/node' + msw@2.6.8(@types/node@18.19.68)(typescript@5.6.3): dependencies: '@bundled-es-modules/cookie': 2.0.1 @@ -24241,6 +24336,8 @@ snapshots: typescript@5.4.2: {} + typescript@5.5.4: {} + typescript@5.6.1-rc: {} typescript@5.6.3: {} diff --git a/rush.json b/rush.json index 83e7e8d4d442..33ba5b5cdfa1 100644 --- a/rush.json +++ b/rush.json @@ -2322,6 +2322,11 @@ "packageName": "@azure/arm-connectedcache", "projectFolder": "sdk/connectedcache/arm-connectedcache", "versionPolicyName": "management" + }, + { + "packageName": "@azure/ai-projects", + "projectFolder": "sdk/ai/ai-projects", + "versionPolicyName": "client" } ] } diff --git a/sdk/ai/ai-projects/CHANGELOG.md b/sdk/ai/ai-projects/CHANGELOG.md new file mode 100644 index 000000000000..05ec9e787339 --- /dev/null +++ b/sdk/ai/ai-projects/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release History + +## 1.0.0-beta.1 (2024-12-19) + +### Features Added + +- This is the initial beta release for the Azure AI Projects SDK diff --git a/sdk/ai/ai-projects/LICENSE b/sdk/ai/ai-projects/LICENSE new file mode 100644 index 000000000000..7d5934740965 --- /dev/null +++ b/sdk/ai/ai-projects/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2024 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/ai/ai-projects/README.md b/sdk/ai/ai-projects/README.md new file mode 100644 index 000000000000..6ed95a9cf8f6 --- /dev/null +++ b/sdk/ai/ai-projects/README.md @@ -0,0 +1,710 @@ +# Azure AI Projects client library for JavaScript + +Use the AI Projects client library (in preview) to: + +- **Enumerate connections** in your Azure AI Foundry project and get connection properties. + For example, get the inference endpoint URL and credentials associated with your Azure OpenAI connection. +- **Develop Agents using the Azure AI Agent Service**, leveraging an extensive ecosystem of models, tools, and capabilities from OpenAI, Microsoft, and other LLM providers. The Azure AI Agent Service enables the building of Agents for a wide range of generative AI use cases. The package is currently in private preview. +- **Enable OpenTelemetry tracing**. + +[Product documentation](https://aka.ms/azsdk/azure-ai-projects/product-doc) + + + + + +## Table of contents + +- [Getting started](#getting-started) + - [Prerequisite](#prerequisite) + - [Install the package](#install-the-package) +- [Key concepts](#key-concepts) + - [Create and authenticate the client](#create-and-authenticate-the-client) +- [Examples](#examples) + - [Enumerate connections](#enumerate-connections) + - [Get properties of all connections](#get-properties-of-all-connections) + - [Get properties of all connections of a particular type](#get-properties-of-all-connections-of-a-particular-type) + - [Get properties of a default connection](#get-properties-of-a-default-connection) + - [Get properties of a connection by its connection name](#get-properties-of-a-connection-by-its-connection-name) + - [Agents (Preview)](#agents-private-preview) + - [Create an Agent](#create-agent) with: + - [File Search](#create-agent-with-file-search) + - [Code interpreter](#create-agent-with-code-interpreter) + - [Bing grounding](#create-agent-with-bing-grounding) + - [Azure AI Search](#create-agent-with-azure-ai-search) + - [Function call](#create-agent-with-function-call) + - [Create thread](#create-thread) with + - [Tool resource](#create-thread-with-tool-resource) + - [Create message](#create-message) with: + - [File search attachment](#create-message-with-file-search-attachment) + - [Code interpreter attachment](#create-message-with-code-interpreter-attachment) + - [Execute Run, Create Thread and Run, or Stream](#create-run-run_and_process-or-stream) + - [Retrieve message](#retrieve-message) + - [Retrieve file](#retrieve-file) + - [Tear down by deleting resource](#teardown) + - [Tracing](#tracing) + - [Tracing](#tracing) + - [Installation](#installation) + - [Tracing example](#tracing-example) +- [Troubleshooting](#troubleshooting) + - [Exceptions](#exceptions) + - [Reporting issues](#reporting-issues) + +- [Contributing](#contributing) + +## Getting started + +### Prerequisite + +- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- An [Azure subscription][azure_sub]. +- A [project in Azure AI Foundry](https://learn.microsoft.com/azure/ai-studio/how-to/create-projects?tabs=ai-studio). +- The project connection string. It can be found in your Azure AI Foundry project overview page, under "Project details". Below we will assume the environment variable `AZURE_AI_PROJECTS_CONNECTION_STRING` was defined to hold this value. +- Entra ID is needed to authenticate the client. Your application needs an object that implements the [TokenCredential](https://learn.microsoft.com/javascript/api/@azure/core-auth/tokencredential) interface. Code samples here use [DefaultAzureCredential](https://learn.microsoft.com/javascript/api/@azure/identity/defaultazurecredential?view=azure-node-latest). To get that working, you will need: + - The `Contributor` role. Role assigned can be done via the "Access Control (IAM)" tab of your Azure AI Project resource in the Azure portal. + - [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli) installed. + - You are logged into your Azure account by running `az login`. + - Note that if you have multiple Azure subscriptions, the subscription that contains your Azure AI Project resource must be your default subscription. Run `az account list --output table` to list all your subscription and see which one is the default. Run `az account set --subscription "Your Subscription ID or Name"` to change your default subscription. + +### Install the package + +```bash +npm install @azure/ai-projects +``` + +## Key concepts + +### Create and authenticate the client + +The class factory method `fromConnectionString` is used to construct the client. To construct a client: + +```javascript +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import "dotenv/config"; + +const connectionString = process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +const client = AIProjectsClient.fromConnectionString( + connectionString, + new DefaultAzureCredential(), +); +``` + +## Examples + +### Enumerate connections + +Your Azure AI Foundry project has a "Management center". When you enter it, you will see a tab named "Connected resources" under your project. The `.connections` operations on the client allow you to enumerate the connections and get connection properties. Connection properties include the resource URL and authentication credentials, among other things. + +Below are code examples of the connection operations. Full samples can be found under the "connections" folder in the [package samples][samples]. + +#### Get properties of all connections + +To list the properties of all the connections in the Azure AI Foundry project: + +```javascript +const connections = await client.connections.listConnections(); +for (const connection of connections) { + console.log(connection); +} +``` + +#### Get properties of all connections of a particular type + +To list the properties of connections of a certain type (here Azure OpenAI): + +```javascript +const connections = await client.connections.listConnections({ category: "AzureOpenAI" }); +for (const connection of connections) { + console.log(connection); +} +``` + +#### Get properties of a connection by its connection name + +To get the connection properties of a connection named `connectionName`: + +```javascript +const connection = await client.connections.getConnection("connectionName"); +console.log(connection); +``` + +To get the connection properties with its authentication credentials: + +```javascript +const connection = await client.connections.getConnectionWithSecrets("connectionName"); +console.log(connection); +``` + +### Agents (Preview) + +Agents in the Azure AI Projects client library are designed to facilitate various interactions and operations within your AI projects. They serve as the core components that manage and execute tasks, leveraging different tools and resources to achieve specific goals. The following steps outline the typical sequence for interacting with Agents. See the "agents" folder in the [package samples][samples] for additional Agent samples. + +Agents are actively being developed. A sign-up form for private preview is coming soon. + +#### Create Agent + +Here is an example of how to create an Agent: + +```javascript +const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful assistant", +}); +``` + +To allow Agents to access your resources or custom functions, you need tools. You can pass tools to `createAgent` through the `tools` and `toolResources` arguments. + +You can use `ToolSet` to do this: + +```javascript +const toolSet = new ToolSet(); +toolSet.addFileSearchTool([vectorStore.id]); +toolSet.addCodeInterpreterTool([codeInterpreterFile.id]); + +// Create agent with tool set +const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: toolSet.toolDefinitions, + toolResources: toolSet.toolResources, +}); +console.log(`Created agent, agent ID: ${agent.id}`); +``` + +#### Create Agent with File Search + +To perform file search by an Agent, we first need to upload a file, create a vector store, and associate the file to the vector store. Here is an example: + +```javascript +const localFileStream = fs.createReadStream("sample_file_for_upload.txt"); +const file = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "sample_file_for_upload.txt", +}); +console.log(`Uploaded file, ID: ${file.id}`); + +const vectorStore = await client.agents.createVectorStore({ + fileIds: [file.id], + name: "my_vector_store", +}); +console.log(`Created vector store, ID: ${vectorStore.id}`); + +const fileSearchTool = ToolUtility.createFileSearchTool([vectorStore.id]); + +const agent = await client.agents.createAgent("gpt-4o", { + name: "SDK Test Agent - Retrieval", + instructions: "You are helpful agent that can help fetch data from files you know about.", + tools: [fileSearchTool.definition], + toolResources: fileSearchTool.resources, +}); +console.log(`Created agent, agent ID : ${agent.id}`); +``` + +#### Create Agent with Code Interpreter + +Here is an example to upload a file and use it for code interpreter by an Agent: + +```javascript +const fileStream = fs.createReadStream("nifty_500_quarterly_results.csv"); +const fFile = await client.agents.uploadFile(fileStream, "assistants", { + fileName: "nifty_500_quarterly_results.csv", +}); +console.log(`Uploaded local file, file ID : ${file.id}`); + +const codeInterpreterTool = ToolUtility.createCodeInterpreterTool([file.id]); + +// Notice that CodeInterpreter must be enabled in the agent creation, otherwise the agent will not be able to see the file attachment +const agent = await client.agents.createAgent("gpt-4o-mini", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [codeInterpreterTool.definition], + toolResources: codeInterpreterTool.resources, +}); +console.log(`Created agent, agent ID: ${agent.id}`); +``` + +#### Create Agent with Bing Grounding + +To enable your Agent to perform search through Bing search API, you use `ToolUtility.createConnectionTool()` along with a connection. + +Here is an example: + +```javascript +const bingGroundingConnectionId = ""; +const bingTool = ToolUtility.createConnectionTool(connectionToolType.BingGrounding, [ + bingGroundingConnectionId, +]); + +const agent = await client.agents.createAgent("gpt-4-0125-preview", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [bingTool.definition], +}); +console.log(`Created agent, agent ID : ${agent.id}`); +``` + +#### Create Agent with Azure AI Search + +Azure AI Search is an enterprise search system for high-performance applications. It integrates with Azure OpenAI Service and Azure Machine Learning, offering advanced search technologies like vector search and full-text search. Ideal for knowledge base insights, information discovery, and automation + +Here is an example to integrate Azure AI Search: + +```javascript +const cognitiveServicesConnectionName = ""; +const cognitiveServicesConnection = await client.connections.getConnection( + cognitiveServicesConnectionName, +); +const azureAISearchTool = ToolUtility.createAzureAISearchTool( + cognitiveServicesConnection.id, + cognitiveServicesConnection.name, +); + +// Create agent with the Azure AI search tool +const agent = await client.agents.createAgent("gpt-4-0125-preview", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [azureAISearchTool.definition], + toolResources: azureAISearchTool.resources, +}); +console.log(`Created agent, agent ID : ${agent.id}`); +``` + +#### Create Agent with Function Call + +You can enhance your Agents by defining callback functions as function tools. These can be provided to `createAgent` via the combination of `tools` and `toolResources`. Only the function definitions and descriptions are provided to `createAgent`, without the implementations. The `Run` or `event handler of stream` will raise a `requires_action` status based on the function definitions. Your code must handle this status and call the appropriate functions. + +Here is an example: + +```javascript +class FunctionToolExecutor { + private functionTools: { func: Function, definition: FunctionToolDefinition }[]; + + constructor() { + this.functionTools = [{ + func: this.getUserFavoriteCity, + ...ToolUtility.createFunctionTool({ + name: "getUserFavoriteCity", + description: "Gets the user's favorite city.", + parameters: {} + }) + }, { + func: this.getCityNickname, + ...ToolUtility.createFunctionTool({ + name: "getCityNickname", + description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", + parameters: { type: "object", properties: { location: { type: "string", description: "The city and state, e.g. Seattle, Wa" } } } + }) + }, { + func: this.getWeather, + ...ToolUtility.createFunctionTool({ + name: "getWeather", + description: "Gets the weather for a location.", + parameters: { type: "object", properties: { location: { type: "string", description: "The city and state, e.g. Seattle, Wa" }, unit: { type: "string", enum: ['c', 'f'] } } } + }) + }]; + } + + private getUserFavoriteCity(): {} { + return { "location": "Seattle, WA" }; + } + + private getCityNickname(location: string): {} { + return { "nickname": "The Emerald City" }; + } + + private getWeather(location: string, unit: string): {} { + return { "weather": unit === "f" ? "72f" : "22c" }; + } + + public invokeTool(toolCall: RequiredToolCallOutput & FunctionToolDefinitionOutput): ToolOutput | undefined { + console.log(`Function tool call - ${toolCall.function.name}`); + const args = []; + if (toolCall.function.parameters) { + try { + const params = JSON.parse(toolCall.function.parameters); + for (const key in params) { + if (Object.prototype.hasOwnProperty.call(params, key)) { + args.push(params[key]); + } + } + } catch (error) { + console.error(`Failed to parse parameters: ${toolCall.function.parameters}`, error); + return undefined; + } + } + const result = this.functionTools.find((tool) => tool.definition.function.name === toolCall.function.name)?.func(...args); + return result ? { + toolCallId: toolCall.id, + output: JSON.stringify(result) + } : undefined; + } + + public getFunctionDefinitions(): FunctionToolDefinition[] { + return this.functionTools.map(tool => {return tool.definition}); + } +} + +const functionToolExecutor = new FunctionToolExecutor(); +const functionTools = functionToolExecutor.getFunctionDefinitions(); +const agent = await client.agents.createAgent("gpt-4o", + { + name: "my-agent", + instructions: "You are a weather bot. Use the provided functions to help answer questions. Customize your responses to the user's preferences as much as possible and use friendly nicknames for cities whenever possible.", + tools: functionTools + }); +console.log(`Created agent, agent ID: ${agent.id}`); +``` + +#### Create Thread + +For each session or conversation, a thread is required. Here is an example: + +```javascript +const thread = await client.agents.createThread(); +``` + +#### Create Thread with Tool Resource + +In some scenarios, you might need to assign specific resources to individual threads. To achieve this, you provide the `toolResources` argument to `createThread`. In the following example, you create a vector store and upload a file, enable an Agent for file search using the `tools` argument, and then associate the file with the thread using the `toolResources` argument. + +```javascript +const localFileStream = fs.createReadStream("sample_file_for_upload.txt"); +const file = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "sample_file_for_upload.txt", +}); +console.log(`Uploaded file, ID: ${file.id}`); + +const vectorStore = await client.agents.createVectorStore({ + fileIds: [file.id], + name: "my_vector_store", +}); +console.log(`Created vector store, ID: ${vectorStore.id}`); + +const fileSearchTool = ToolUtility.createFileSearchTool([vectorStore.id]); + +const agent = await client.agents.createAgent("gpt-4o", { + name: "SDK Test Agent - Retrieval", + instructions: "You are helpful agent that can help fetch data from files you know about.", + tools: [fileSearchTool.definition], +}); +console.log(`Created agent, agent ID : ${agent.id}`); + +// Create thread with file resources. +// If the agent has multiple threads, only this thread can search this file. +const thread = await client.agents.createThread({ toolResources: fileSearchTool.resources }); +``` + +#### Create Message + +To create a message for assistant to process, you pass `user` as `role` and a question as `content`: + +```javascript +const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", +}); +``` + +#### Create Message with File Search Attachment + +To attach a file to a message for content searching, you use `ToolUtility.createFileSearchTool()` and the `attachments` argument: + +```javascript +const fileSearchTool = ToolUtility.createFileSearchTool(); +const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "What feature does Smart Eyewear offer?", + attachments: { + fileId: file.id, + tools: [fileSearchTool.definition], + }, +}); +``` + +#### Create Message with Code Interpreter Attachment + +To attach a file to a message for data analysis, you use `ToolUtility.createCodeInterpreterTool()` and the `attachment` argument. + +Here is an example: + +```javascript +// notice that CodeInterpreter must be enabled in the agent creation, +// otherwise the agent will not be able to see the file attachment for code interpretation +const codeInterpreterTool = ToolUtility.createCodeInterpreterTool(); +const agent = await client.agents.createAgent("gpt-4-1106-preview", { + name: "my-assistant", + instructions: "You are helpful assistant", + tools: [codeInterpreterTool.definition], +}); +console.log(`Created agent, agent ID: ${agent.id}`); + +const thread = client.agents.createThread(); +console.log(`Created thread, thread ID: ${thread.id}`); + +const message = await client.agents.createMessage(thread.id, { + role: "user", + content: + "Could you please create bar chart in TRANSPORTATION sector for the operating profit from the uploaded csv file and provide file to me?", + attachments: { + fileId: file.id, + tools: [codeInterpreterTool.definition], + }, +}); +console.log(`Created message, message ID: ${message.id}`); +``` + +#### Create Run, Run_and_Process, or Stream + +Here is an example of `createRun` and poll until the run is completed: + +```javascript +let run = await client.agents.createRun(thread.id, agent.id); + +// Poll the run as long as run status is queued or in progress +while ( + run.status === "queued" || + run.status === "in_progress" || + run.status === "requires_action" +) { + // Wait for a second + await new Promise((resolve) => setTimeout(resolve, 1000)); + run = await client.agents.getRun(thread.id, run.id); +} +``` + +To have the SDK poll on your behalf, use the `createThreadAndRun` method. + +Here is an example: + +```javascript +const run = await client.agents.createThreadAndRun(thread.id, agent.id); +``` + +With streaming, polling also need not be considered. + +Here is an example: + +```javascript +const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); +``` + +Event handling can be done as follows: + +```javascript +for await (const eventMessage of streamEventMessages) { +switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${(eventMessage.data as ThreadRunOutput).status}`) + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data as MessageDeltaChunk; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart as MessageDeltaTextContent + const textValue = textContent.text?.value || "No text" + console.log(`Text delta received:: ${textValue}`) + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } +} +``` + +#### Retrieve Message + +To retrieve messages from agents, use the following example: + +```javascript +const messages = await client.agents.listMessages(thread.id); + +// The messages are following in the reverse order, +// we will iterate them and output only text contents. +for (const dataPoint of messages.data.reverse()) { + const lastMessageContent: MessageContentOutput = dataPoint.content[dataPoint.content.length - 1]; + console.log( lastMessageContent); + if (isOutputOfType(lastMessageContent, "text")) { + console.log(`${dataPoint.role}: ${(lastMessageContent as MessageTextContentOutput).text.value}`); + } + } +``` + +### Retrieve File + +Files uploaded by Agents cannot be retrieved back. If your use case needs to access the file content uploaded by the Agents, you are advised to keep an additional copy accessible by your application. However, files generated by Agents are retrievable by `getFileContent`. + +Here is an example retrieving file ids from messages: + +```javascript +const messages = await client.agents.listMessages(thread.id); +const imageFile = (messages.data[0].content[0] as MessageImageFileContentOutput).imageFile; +const imageFileName = (await client.agents.getFile(imageFile.fileId)).filename; + +const fileContent = await (await client.agents.getFileContent(imageFile.fileId).asNodeStream()).body; +if (fileContent) { + const chunks: Buffer[] = []; + for await (const chunk of fileContent) { + chunks.push(Buffer.from(chunk)); + } + const buffer = Buffer.concat(chunks); + fs.writeFileSync(imageFileName, buffer); +} else { + console.error("Failed to retrieve file content: fileContent is undefined"); +} +console.log(`Saved image file to: ${imageFileName}`); +``` + +#### Teardown + +To remove resources after completing tasks, use the following functions: + +```javascript +await client.agents.deleteVectorStore(vectorStore.id); +console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + +await client.agents.deleteFile(file.id); +console.log(`Deleted file, file ID: ${file.id}`); + +client.agents.deleteAgent(agent.id); +console.log(`Deleted agent, agent ID: ${agent.id}`); +``` + +### Tracing + +You can add an Application Insights Azure resource to your Azure AI Foundry project. See the Tracing tab in your studio. If one was enabled, you can get the Application Insights connection string, configure your Agents, and observe the full execution path through Azure Monitor. Typically, you might want to start tracing before you create an Agent. + +#### Installation + +Make sure to install OpenTelemetry and the Azure SDK tracing plugin via + +```bash +npm install @opentelemetry/api \ + @opentelemetry/instrumentation \ + @opentelemetry/sdk-trace-node \ + @azure/opentelemetry-instrumentation-azure-sdk \ + @azure/monitor-opentelemetry-exporter +``` + +You will also need an exporter to send telemetry to your observability backend. You can print traces to the console or use a local viewer such as [Aspire Dashboard](https://learn.microsoft.com/dotnet/aspire/fundamentals/dashboard/standalone?tabs=bash). + +To connect to Aspire Dashboard or another OpenTelemetry compatible backend, install OTLP exporter: + +```bash +npm install @opentelemetry/exporter-trace-otlp-proto \ + @opentelemetry/exporter-metrics-otlp-proto +``` + +#### Tracing example + +Here is a code sample to be included above `createAgent`: + +```javascript +import { trace } from "@opentelemetry/api"; +import { AzureMonitorTraceExporter } from "@azure/monitor-opentelemetry-exporter" +import { + ConsoleSpanExporter, + NodeTracerProvider, + SimpleSpanProcessor, +} from "@opentelemetry/sdk-trace-node"; + +const provider = new NodeTracerProvider(); +provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +provider.register(); + +const tracer = trace.getTracer("Agents Sample", "1.0.0"); + +const client = AIProjectsClient.fromConnectionString( + connectionString || "", new DefaultAzureCredential() +); + +if (!appInsightsConnectionString) { + appInsightsConnectionString = await client.telemetry.getConnectionString(); +} + +if (appInsightsConnectionString) { + const exporter = new AzureMonitorTraceExporter({ + connectionString: appInsightsConnectionString + }); + provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); +} + +await tracer.startActiveSpan("main", async (span) => { + client.telemetry.updateSettings({enableContentRecording: true}) +// ... +``` + +## Troubleshooting + +### Exceptions + +Client methods that make service calls raise an [RestError](https://learn.microsoft.com/javascript/api/%40azure/core-rest-pipeline/resterror) for a non-success HTTP status code response from the service. The exception's `code` will hold the HTTP response status code. The exception's `error.message` contains a detailed message that may be helpful in diagnosing the issue: + +```javascript +import { RestError } from "@azure/core-rest-pipeline" + +// ... + +try { + const result = await client.connections.listConnections(); +} catch (e as RestError) { + console.log(`Status code: ${e.code}`); + console.log(e.message); +} +``` + +For example, when you provide wrong credentials: + +```text +Status code: 401 (Unauthorized) +Operation returned an invalid status 'Unauthorized' +``` + +### Reporting issues + +To report issues with the client library, or request additional features, please open a GitHub issue [here](https://github.com/Azure/azure-sdk-for-js/issues) + + + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + + + + + +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[entra_id]: https://learn.microsoft.com/azure/ai-services/authentication?tabs=powershell#authenticate-with-microsoft-entra-id +[azure_identity_npm]: https://www.npmjs.com/package/@azure/identity +[default_azure_credential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential +[azure_sub]: https://azure.microsoft.com/free/ +[evaluators]: https://learn.microsoft.com/azure/ai-studio/how-to/develop/evaluate-sdk +[evaluator_library]: https://learn.microsoft.com/azure/ai-studio/how-to/evaluate-generative-ai-app#view-and-manage-the-evaluators-in-the-evaluator-library diff --git a/sdk/ai/ai-projects/api-extractor.json b/sdk/ai/ai-projects/api-extractor.json new file mode 100644 index 000000000000..d61912ac5bee --- /dev/null +++ b/sdk/ai/ai-projects/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist/esm/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/ai-projects.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/ai/ai-projects/assets.json b/sdk/ai/ai-projects/assets.json new file mode 100644 index 000000000000..edf359fcc1e6 --- /dev/null +++ b/sdk/ai/ai-projects/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "js", + "TagPrefix": "js/ai/ai-projects", + "Tag": "js/ai/ai-projects_72a043e1dd" +} diff --git a/sdk/ai/ai-projects/eslint.config.mjs b/sdk/ai/ai-projects/eslint.config.mjs new file mode 100644 index 000000000000..03244d34a19f --- /dev/null +++ b/sdk/ai/ai-projects/eslint.config.mjs @@ -0,0 +1,17 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default [ + ...azsdkEslint.configs.recommended, + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]; diff --git a/sdk/ai/ai-projects/package.json b/sdk/ai/ai-projects/package.json new file mode 100644 index 000000000000..00ced68ae72d --- /dev/null +++ b/sdk/ai/ai-projects/package.json @@ -0,0 +1,160 @@ +{ + "name": "@azure/ai-projects", + "version": "1.0.0-beta.1", + "description": "A generated SDK for ProjectsClient.", + "engines": { + "node": ">=18.0.0" + }, + "sideEffects": false, + "autoPublish": false, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false + }, + "type": "module", + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "files": [ + "dist", + "README.md", + "LICENSE" + ], + "sdk-type": "client", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/generated/src/projectsClient.ts", + "prefix": "userAgentInfo" + }, + { + "path": "src/constants.ts", + "prefix": "SDK_VERSION" + } + ] + }, + "dependencies": { + "@azure-rest/core-client": "^2.1.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.5.0", + "@azure/core-util": "^1.9.0", + "@azure/logger": "^1.1.4", + "@azure/core-lro": "^2.0.0", + "tslib": "^2.6.2", + "@azure/core-paging": "^1.5.0", + "@azure/core-sse": "^2.1.3", + "@azure/core-tracing": "^1.2.0" + }, + "devDependencies": { + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.3.0", + "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.7", + "@azure/monitor-opentelemetry-exporter": "^1.0.0-beta.27", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/instrumentation": "0.53.0", + "@opentelemetry/sdk-trace-node": "^1.9.0", + "@vitest/browser": "^2.0.5", + "@vitest/coverage-istanbul": "^2.0.5", + "@types/node": "^18.0.0", + "dotenv": "^16.0.0", + "eslint": "^8.55.0", + "prettier": "^3.2.5", + "playwright": "^1.41.2", + "typescript": "~5.5.3", + "tshy": "^1.11.1", + "vitest": "^2.0.5" + }, + "scripts": { + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "pack": "npm pack 2>&1", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build:samples": "echo skipped", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"samples-dev/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "execute:samples": "dev-tool samples run samples-dev", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"samples-dev/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --no-test-proxy --browser", + "integration-test:node": "dev-tool run test:vitest --no-test-proxy", + "generate:client": "echo skipped", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "build:test": "npm run clean && tshy && dev-tool run build-test", + "build": "npm run clean && tshy && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node", + "test": "npm run clean && tshy && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest" + }, + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "source": "./src/index.ts", + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "source": "./src/index.ts", + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/index.js" + }, + "import": { + "source": "./src/index.ts", + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "source": "./src/index.ts", + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + }, + "//sampleConfiguration": { + "productName": "Azure AI Projects", + "productSlugs": [ + "azure" + ], + "extraFiles": { + "./samples-dev/data": [ + "javascript/data", + "typescript/src/data" + ] + }, + "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/ai-projects" + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js" +} diff --git a/sdk/ai/ai-projects/review/ai-projects.api.md b/sdk/ai/ai-projects/review/ai-projects.api.md new file mode 100644 index 000000000000..a13ea46e411c --- /dev/null +++ b/sdk/ai/ai-projects/review/ai-projects.api.md @@ -0,0 +1,1969 @@ +## API Report File for "@azure/ai-projects" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { AbortSignalLike } from '@azure/abort-controller'; +import { ClientOptions } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { PollerLike } from '@azure/core-lro'; +import type { PollOperationState } from '@azure/core-lro'; +import { StreamableMethod } from '@azure-rest/core-client'; +import type { TokenCredential } from '@azure/core-auth'; + +// @public +export interface AgentDeletionStatusOutput { + deleted: boolean; + id: string; + object: "assistant.deleted"; +} + +// @public +export interface AgentEventMessage { + data: AgentEventStreamDataOutput; + event: AgentStreamEventType | string; +} + +// @public +export interface AgentEventMessageStream extends AsyncDisposable, AsyncIterable { +} + +// @public +export type AgentEventStreamDataOutput = AgentThreadOutput | ThreadRunOutput | RunStepOutput | ThreadMessageOutput | MessageDeltaChunk | RunStepDeltaChunk | string; + +// @public +export interface AgentOutput { + createdAt: Date; + description: string | null; + id: string; + instructions: string | null; + metadata: Record | null; + model: string; + name: string | null; + object: "assistant"; + responseFormat?: AgentsApiResponseFormatOptionOutput | null; + temperature: number | null; + toolResources: ToolResourcesOutput | null; + tools: Array; + topP: number | null; +} + +// @public +export type AgentRunResponse = PromiseLike & { + stream: () => Promise; +}; + +// @public +export interface AgentsApiResponseFormat { + type?: ApiResponseFormat; +} + +// @public +export type AgentsApiResponseFormatMode = string; + +// @public +export type AgentsApiResponseFormatModeOutput = string; + +// @public +export type AgentsApiResponseFormatOption = string | AgentsApiResponseFormatMode | AgentsApiResponseFormat; + +// @public +export type AgentsApiResponseFormatOptionOutput = string | AgentsApiResponseFormatModeOutput | AgentsApiResponseFormatOutput; + +// @public +export interface AgentsApiResponseFormatOutput { + type?: ApiResponseFormatOutput; +} + +// @public +export type AgentsApiToolChoiceOption = string | AgentsApiToolChoiceOptionMode | AgentsNamedToolChoice; + +// @public +export type AgentsApiToolChoiceOptionMode = string; + +// @public +export type AgentsApiToolChoiceOptionModeOutput = string; + +// @public +export type AgentsApiToolChoiceOptionOutput = string | AgentsApiToolChoiceOptionModeOutput | AgentsNamedToolChoiceOutput; + +// @public +export interface AgentsNamedToolChoice { + function?: FunctionName; + type: AgentsNamedToolChoiceType; +} + +// @public +export interface AgentsNamedToolChoiceOutput { + function?: FunctionNameOutput; + type: AgentsNamedToolChoiceTypeOutput; +} + +// @public +export type AgentsNamedToolChoiceType = string; + +// @public +export type AgentsNamedToolChoiceTypeOutput = string; + +// @public +export interface AgentsOperations { + cancelRun: (threadId: string, runId: string, options?: CancelRunOptionalParams) => Promise; + cancelVectorStoreFileBatch: (vectorStoreId: string, batchId: string, options?: CancelVectorStoreFileBatchOptionalParams) => Promise; + createAgent: (model: string, options?: CreateAgentOptionalParams) => Promise; + createMessage: (threadId: string, messageOptions: ThreadMessageOptions, options?: CreateMessageOptionalParams) => Promise; + createRun: (threadId: string, assistantId: string, options?: CreateRunOptionalParams) => AgentRunResponse; + createThread: (options?: CreateAgentThreadOptionalParams) => Promise; + createThreadAndRun: (assistantId: string, options?: CreateAndRunThreadOptionalParams) => AgentRunResponse; + createVectorStore: (options?: CreateVectorStoreOptionalParams) => Promise; + createVectorStoreAndPoll: (options?: CreateVectorStoreWithPollingOptionalParams) => PollerLike, VectorStoreOutput>; + createVectorStoreFile: (vectorStoreId: string, options?: CreateVectorStoreFileOptionalParams) => Promise; + createVectorStoreFileAndPoll: (vectorStoreId: string, options?: CreateVectorStoreFileWithPollingOptionalParams) => PollerLike, VectorStoreFileOutput>; + createVectorStoreFileBatch: (vectorStoreId: string, options?: CreateVectorStoreFileBatchOptionalParams) => Promise; + createVectorStoreFileBatchAndPoll: (vectorStoreId: string, options?: CreateVectorStoreFileBatchWithPollingOptionalParams) => PollerLike, VectorStoreFileBatchOutput>; + deleteAgent: (assistantId: string, options?: DeleteAgentOptionalParams) => Promise; + deleteFile: (fileId: string, options?: DeleteFileOptionalParams) => Promise; + deleteThread: (threadId: string, options?: DeleteAgentThreadOptionalParams) => Promise; + deleteVectorStore: (vectorStoreId: string, options?: DeleteVectorStoreOptionalParams) => Promise; + deleteVectorStoreFile: (vectorStoreId: string, fileId: string, options?: DeleteVectorStoreFileOptionalParams) => Promise; + getAgent: (assistantId: string, options?: GetAgentOptionalParams) => Promise; + getFile: (fileId: string, options?: GetFileOptionalParams) => Promise; + getFileContent: (fileId: string, options?: GetFileContentOptionalParams) => StreamableMethod; + getRun: (threadId: string, runId: string, options?: GetRunOptionalParams) => Promise; + getRunStep: (threadId: string, runId: string, stepId: string, options?: GetRunStepOptionalParams) => Promise; + getThread: (threadId: string, options?: GetAgentThreadOptionalParams) => Promise; + getVectorStore: (vectorStoreId: string, options?: DeleteVectorStoreOptionalParams) => Promise; + getVectorStoreFile: (vectorStoreId: string, fileId: string, options?: GetVectorStoreFileOptionalParams) => Promise; + getVectorStoreFileBatch: (vectorStoreId: string, batchId: string, options?: GetVectorStoreFileBatchOptionalParams) => Promise; + listAgents: (options?: ListAgentsOptionalParams) => Promise; + listFiles: (options?: ListFilesOptionalParams) => Promise; + listMessages: (threadId: string, options?: ListMessagesOptionalParams) => Promise; + listRuns: (threadId: string, options?: ListRunQueryOptionalParams) => Promise; + listRunSteps: (threadId: string, runId: string, options?: ListRunQueryOptionalParams) => Promise; + listVectorStoreFileBatchFiles: (vectorStoreId: string, batchId: string, options?: ListVectorStoreFileBatchFilesOptionalParams) => Promise; + listVectorStoreFiles: (vectorStoreId: string, options?: ListVectorStoreFilesOptionalParams) => Promise; + listVectorStores: (options?: DeleteVectorStoreOptionalParams) => Promise; + modifyVectorStore: (vectorStoreId: string, options?: UpdateVectorStoreOptionalParams) => Promise; + submitToolOutputsToRun: (threadId: string, runId: string, toolOutputs: Array, options?: SubmitToolOutputsToRunOptionalParams) => AgentRunResponse; + updateAgent: (assistantId: string, options: UpdateAgentOptionalParams) => Promise; + updateMessage: (threadId: string, messageId: string, options?: UpdateMessageOptionalParams) => Promise; + updateRun: (threadId: string, runId: string, options?: UpdateRunOptionalParams) => Promise; + updateThread: (threadId: string, options?: UpdateAgentThreadOptionalParams) => Promise; + uploadFile: (data: ReadableStream | NodeJS.ReadableStream, purpose: FilePurpose, options?: UploadFileOptionalParams) => Promise; + uploadFileAndPoll: (data: ReadableStream | NodeJS.ReadableStream, purpose: FilePurpose, options?: UploadFileWithPollingOptionalParams) => PollerLike, OpenAIFileOutput>; +} + +// @public +export type AgentStreamEventType = ThreadStreamEvent | RunStreamEvent | RunStepStreamEvent | MessageStreamEvent | ErrorEvent | DoneEvent; + +// @public +export interface AgentThreadCreationOptions { + messages?: Array; + metadata?: Record | null; + toolResources?: ToolResources | null; +} + +// @public +export interface AgentThreadOutput { + createdAt: Date; + id: string; + metadata: Record | null; + object: "thread"; + toolResources: ToolResourcesOutput | null; +} + +// @public +export class AIProjectsClient { + constructor(endpointParam: string, subscriptionId: string, resourceGroupName: string, projectName: string, credential: TokenCredential, options?: AIProjectsClientOptions); + readonly agents: AgentsOperations; + readonly connections: ConnectionsOperations; + static fromConnectionString(connectionString: string, credential: TokenCredential, options?: AIProjectsClientOptions): AIProjectsClient; + readonly telemetry: TelemetryOperations; +} + +// @public +export interface AIProjectsClientOptions extends ProjectsClientOptions { +} + +// @public +export type ApiResponseFormat = string; + +// @public +export type ApiResponseFormatOutput = string; + +// @public +export type AuthenticationTypeOutput = "ApiKey" | "AAD" | "SAS"; + +// @public +export interface AzureAISearchResource { + indexes?: Array; +} + +// @public +export interface AzureAISearchResourceOutput { + indexes?: Array; +} + +// @public +export interface AzureAISearchToolDefinition extends ToolDefinitionParent { + type: "azure_ai_search"; +} + +// @public +export interface AzureAISearchToolDefinitionOutput extends ToolDefinitionOutputParent { + type: "azure_ai_search"; +} + +// @public +export interface BingGroundingToolDefinition extends ToolDefinitionParent { + bingGrounding: ToolConnectionList; + type: "bing_grounding"; +} + +// @public +export interface BingGroundingToolDefinitionOutput extends ToolDefinitionOutputParent { + bingGrounding: ToolConnectionListOutput; + type: "bing_grounding"; +} + +// @public +export interface CancelRunOptionalParams extends OperationOptions { +} + +// @public +export interface CancelVectorStoreFileBatchOptionalParams extends OperationOptions { +} + +// @public +export interface CodeInterpreterToolDefinition extends ToolDefinitionParent { + type: "code_interpreter"; +} + +// @public +export interface CodeInterpreterToolDefinitionOutput extends ToolDefinitionOutputParent { + type: "code_interpreter"; +} + +// @public +export interface CodeInterpreterToolResource { + dataSources?: Array; + fileIds?: string[]; +} + +// @public +export interface CodeInterpreterToolResourceOutput { + dataSources?: Array; + fileIds?: string[]; +} + +// @public +export interface ConnectionsOperations { + getConnection: (connectionName: string, options?: GetConnectionOptionalParams) => Promise; + getConnectionWithSecrets: (connectionName: string, options?: GetConnectionWithSecretsOptionalParams) => Promise; + listConnections: (options?: ListConnectionsOptionalParams) => Promise>; +} + +// @public +export enum connectionToolType { + BingGrounding = "bing_grounding", + MicrosoftFabric = "microsoft_fabric", + SharepointGrounding = "sharepoint_grounding" +} + +// @public +export type ConnectionType = "AzureOpenAI" | "Serverless" | "AzureBlob" | "AIServices" | "CognitiveSearch"; + +// @public +export type ConnectionTypeOutput = "AzureOpenAI" | "Serverless" | "AzureBlob" | "AIServices" | "CognitiveSearch"; + +// @public +export interface CreateAgentOptionalParams extends Omit, OperationOptions { +} + +// @public +export interface CreateAgentOptions { + description?: string | null; + instructions?: string | null; + metadata?: Record | null; + model: string; + name?: string | null; + responseFormat?: AgentsApiResponseFormatOption | null; + temperature?: number | null; + toolResources?: ToolResources | null; + tools?: Array; + topP?: number | null; +} + +// @public +export interface CreateAgentThreadOptionalParams extends AgentThreadCreationOptions, OperationOptions { +} + +// @public +export type CreateAndRunThreadOptionalParams = Omit & OperationOptions; + +// @public +export interface CreateAndRunThreadOptions { + assistantId: string; + instructions?: string | null; + maxCompletionTokens?: number | null; + maxPromptTokens?: number | null; + metadata?: Record | null; + model?: string | null; + responseFormat?: AgentsApiResponseFormatOption | null; + stream?: boolean; + temperature?: number | null; + thread?: AgentThreadCreationOptions; + toolChoice?: AgentsApiToolChoiceOption | null; + toolResources?: UpdateToolResourcesOptions | null; + tools?: Array | null; + topP?: number | null; + truncationStrategy?: TruncationObject | null; +} + +// @public +export interface CreateMessageOptionalParams extends OperationOptions { +} + +// @public +export type CreateRunOptionalParams = Omit & OperationOptions; + +// @public +export interface CreateRunOptions { + additionalInstructions?: string | null; + additionalMessages?: Array | null; + assistantId: string; + instructions?: string | null; + maxCompletionTokens?: number | null; + maxPromptTokens?: number | null; + metadata?: Record | null; + model?: string | null; + responseFormat?: AgentsApiResponseFormatOption | null; + stream?: boolean; + temperature?: number | null; + toolChoice?: AgentsApiToolChoiceOption | null; + tools?: Array; + topP?: number | null; + truncationStrategy?: TruncationObject | null; +} + +// @public +export interface CreateVectorStoreFileBatchOptionalParams extends CreateVectorStoreFileBatchOptions, OperationOptions { +} + +// @public +export interface CreateVectorStoreFileBatchOptions { + chunkingStrategy?: VectorStoreChunkingStrategyRequest; + dataSources?: VectorStoreDataSource[]; + fileIds?: string[]; +} + +// @public +export interface CreateVectorStoreFileBatchWithPollingOptionalParams extends CreateVectorStoreFileBatchOptionalParams, PollingOptionsParams { +} + +// @public +export interface CreateVectorStoreFileOptionalParams extends CreateVectorStoreFileOptions, OperationOptions { +} + +// @public +export interface CreateVectorStoreFileOptions { + chunkingStrategy?: VectorStoreChunkingStrategyRequest; + dataSources?: Array; + fileId?: string; +} + +// @public +export interface CreateVectorStoreFileWithPollingOptionalParams extends CreateVectorStoreFileOptions, PollingOptionsParams, OperationOptions { +} + +// @public +export interface CreateVectorStoreOptionalParams extends VectorStoreOptions, OperationOptions { +} + +// @public +export interface CreateVectorStoreWithPollingOptionalParams extends CreateVectorStoreOptionalParams, PollingOptionsParams { +} + +// @public +export interface CredentialsApiKeyAuthOutput { + key: string; +} + +// @public +export interface CredentialsSASAuthOutput { + SAS: string; +} + +// @public +export interface DeleteAgentOptionalParams extends OperationOptions { +} + +// @public +export interface DeleteAgentThreadOptionalParams extends OperationOptions { +} + +// @public +export interface DeleteFileOptionalParams extends OperationOptions { +} + +// @public +export interface DeleteVectorStoreFileOptionalParams extends OperationOptions { +} + +// @public +export interface DeleteVectorStoreOptionalParams extends OperationOptions { +} + +// @public +export enum DoneEvent { + Done = "done" +} + +// @public +export enum ErrorEvent { + Error = "error" +} + +// @public +export interface FileDeletionStatusOutput { + deleted: boolean; + id: string; + object: "file"; +} + +// @public +export interface FileListResponseOutput { + data: Array; + object: "list"; +} + +// @public +export type FilePurpose = string; + +// @public +export type FilePurposeOutput = string; + +// @public +export interface FileSearchRankingOptions { + ranker: string; + scoreThreshold: number; +} + +// @public +export interface FileSearchRankingOptionsOutput { + ranker: string; + scoreThreshold: number; +} + +// @public +export interface FileSearchToolDefinition extends ToolDefinitionParent { + fileSearch?: FileSearchToolDefinitionDetails; + type: "file_search"; +} + +// @public +export interface FileSearchToolDefinitionDetails { + maxNumResults?: number; + // (undocumented) + rankingOptions?: FileSearchRankingOptions; +} + +// @public +export interface FileSearchToolDefinitionDetailsOutput { + maxNumResults?: number; + // (undocumented) + rankingOptions?: FileSearchRankingOptionsOutput; +} + +// @public +export interface FileSearchToolDefinitionOutput extends ToolDefinitionOutputParent { + fileSearch?: FileSearchToolDefinitionDetailsOutput; + type: "file_search"; +} + +// @public +export interface FileSearchToolResource { + vectorStoreIds?: string[]; + vectorStores?: Array; +} + +// @public +export interface FileSearchToolResourceOutput { + vectorStoreIds?: string[]; + vectorStores?: Array; +} + +// @public +export type FileStateOutput = string; + +// @public +export interface FileStatusFilter { + filter?: VectorStoreFileStatusFilter; +} + +// @public +export interface FunctionDefinition { + description?: string; + name: string; + parameters: unknown; +} + +// @public +export interface FunctionDefinitionOutput { + description?: string; + name: string; + parameters: any; +} + +// @public +export interface FunctionName { + name: string; +} + +// @public +export interface FunctionNameOutput { + name: string; +} + +// @public +export interface FunctionToolDefinition extends ToolDefinitionParent { + function: FunctionDefinition; + type: "function"; +} + +// @public +export interface FunctionToolDefinitionOutput extends ToolDefinitionOutputParent { + function: FunctionDefinitionOutput; + type: "function"; +} + +// @public +export interface GetAgentOptionalParams extends OperationOptions { +} + +// @public +export interface GetAgentThreadOptionalParams extends OperationOptions { +} + +// @public +export interface GetConnectionOptionalParams extends OperationOptions { +} + +// @public +export interface GetConnectionResponseOutput { + id: string; + name: string; + properties: InternalConnectionPropertiesOutput; +} + +// @public +export interface GetConnectionWithSecretsOptionalParams extends OperationOptions { +} + +// @public +export interface GetFileContentOptionalParams extends OperationOptions { +} + +// @public +export interface GetFileOptionalParams extends OperationOptions { +} + +// @public +export interface GetRunOptionalParams extends OperationOptions { +} + +// @public +export interface GetRunStepOptionalParams extends OperationOptions { +} + +// @public +export interface GetVectorStoreFileBatchOptionalParams extends OperationOptions { +} + +// @public +export interface GetVectorStoreFileOptionalParams extends OperationOptions { +} + +// @public +export interface GetVectorStoreOptionalParams extends OperationOptions { +} + +// @public +export interface GetWorkspaceOptionalParams extends OperationOptions { +} + +// @public +export type IncompleteRunDetailsOutput = string; + +// @public +export interface IndexResource { + indexConnectionId: string; + indexName: string; +} + +// @public +export interface IndexResourceOutput { + indexConnectionId: string; + indexName: string; +} + +// @public +export interface InternalConnectionPropertiesAADAuthOutput extends InternalConnectionPropertiesOutputParent { + authType: "AAD"; +} + +// @public +export interface InternalConnectionPropertiesApiKeyAuthOutput extends InternalConnectionPropertiesOutputParent { + authType: "ApiKey"; + credentials: CredentialsApiKeyAuthOutput; +} + +// @public +export type InternalConnectionPropertiesOutput = InternalConnectionPropertiesOutputParent | InternalConnectionPropertiesApiKeyAuthOutput | InternalConnectionPropertiesAADAuthOutput | InternalConnectionPropertiesSASAuthOutput; + +// @public +export interface InternalConnectionPropertiesOutputParent { + // (undocumented) + authType: AuthenticationTypeOutput; + category: ConnectionTypeOutput; + target: string; +} + +// @public +export interface InternalConnectionPropertiesSASAuthOutput extends InternalConnectionPropertiesOutputParent { + authType: "SAS"; + credentials: CredentialsSASAuthOutput; +} + +// @public +export function isOutputOfType(output: RequiredActionOutput | RequiredToolCallOutput | ToolDefinitionOutputParent, type: string): output is T; + +// @public +export interface ListAgentsOptionalParams extends ListQueryParameters, OperationOptions { +} + +// @public +export interface ListConnectionsOptionalParams extends ListConnectionsQueryParamProperties, OperationOptions { +} + +// @public (undocumented) +export interface ListConnectionsQueryParamProperties { + category?: ConnectionType; + includeAll?: boolean; + target?: string; +} + +// @public +export interface ListFilesOptionalParams extends ListFilesQueryParamProperties, OperationOptions { +} + +// @public (undocumented) +export interface ListFilesQueryParamProperties { + purpose?: FilePurpose; +} + +// @public +export interface ListMessagesOptionalParams extends ListMessagesQueryParamProperties, OperationOptions { +} + +// @public (undocumented) +export interface ListMessagesQueryParamProperties { + after?: string; + before?: string; + limit?: number; + order?: ListSortOrder; + runId?: string; +} + +// @public +export interface ListQueryParameters { + after?: string; + before?: string; + limit?: number; + order?: "asc" | "desc"; +} + +// @public +export interface ListRunQueryOptionalParams extends ListQueryParameters, OperationOptions { +} + +// @public +export interface ListRunStepsOptionalParams extends ListQueryParameters, OperationOptions { +} + +// @public +export type ListSortOrder = "asc" | "desc"; + +// @public +export interface ListVectorStoreFileBatchFilesOptionalParams extends ListQueryParameters, OperationOptions { + filter?: VectorStoreFileStatusFilter; +} + +// @public +export interface ListVectorStoreFilesOptionalParams extends ListQueryParameters, OperationOptions { +} + +// @public +export interface ListVectorStoresOptionalParams extends ListQueryParameters, OperationOptions { +} + +// @public +export interface MessageAttachment { + dataSources?: Array; + fileId?: string; + tools: MessageAttachmentToolDefinition[]; +} + +// @public +export interface MessageAttachmentOutput { + dataSources?: Array; + fileId?: string; + tools: MessageAttachmentToolDefinitionOutput[]; +} + +// @public +export type MessageAttachmentToolDefinition = CodeInterpreterToolDefinition | FileSearchToolDefinition; + +// @public +export type MessageAttachmentToolDefinitionOutput = CodeInterpreterToolDefinitionOutput | FileSearchToolDefinitionOutput; + +// @public +export type MessageContent = MessageContentParent | MessageTextContent | MessageImageFileContent; + +// @public +export type MessageContentOutput = MessageContentOutputParent | MessageTextContentOutput | MessageImageFileContentOutput; + +// @public +export interface MessageContentOutputParent { + // (undocumented) + type: string; +} + +// @public +export interface MessageContentParent { + // (undocumented) + type: string; +} + +// @public +export interface MessageDelta { + content: Array; + role: MessageRole; +} + +// @public +export interface MessageDeltaChunk { + delta: MessageDelta; + id: string; + object: "thread.message.delta"; +} + +// @public +export type MessageDeltaContent = MessageDeltaContentParent | MessageDeltaTextContent | MessageDeltaImageFileContent; + +// @public +export interface MessageDeltaContentParent { + index: number; + type: string; +} + +// @public +export interface MessageDeltaImageFileContent extends MessageDeltaContentParent { + imageFile?: MessageDeltaImageFileContentObject; + type: "image_file"; +} + +// @public +export interface MessageDeltaImageFileContentObject { + fileId?: string; +} + +// @public +export type MessageDeltaTextAnnotation = MessageDeltaTextAnnotationParent | MessageDeltaTextFileCitationAnnotation | MessageDeltaTextFilePathAnnotation; + +// @public +export interface MessageDeltaTextAnnotationParent { + index: number; + type: string; +} + +// @public +export interface MessageDeltaTextContent extends MessageDeltaContentParent { + text?: MessageDeltaTextContentObject; + type: "text"; +} + +// @public +export interface MessageDeltaTextContentObject { + annotations?: Array; + value?: string; +} + +// @public +export interface MessageDeltaTextFileCitationAnnotation extends MessageDeltaTextAnnotationParent { + endIndex?: number; + fileCitation?: MessageDeltaTextFileCitationAnnotationObject; + startIndex?: number; + text?: string; + type: "file_citation"; +} + +// @public +export interface MessageDeltaTextFileCitationAnnotationObject { + fileId?: string; + quote?: string; +} + +// @public +export interface MessageDeltaTextFilePathAnnotation extends MessageDeltaTextAnnotationParent { + endIndex?: number; + filePath?: MessageDeltaTextFilePathAnnotationObject; + startIndex?: number; + text?: string; + type: "file_path"; +} + +// @public +export interface MessageDeltaTextFilePathAnnotationObject { + fileId?: string; +} + +// @public +export interface MessageDeltaTextUrlCitationDetails { + title?: string; + url?: string; +} + +// @public +export interface MessageImageFileContent extends MessageContentParent { + imageFile: MessageImageFileDetails; + type: "image_file"; +} + +// @public +export interface MessageImageFileContentOutput extends MessageContentOutputParent { + imageFile: MessageImageFileDetailsOutput; + type: "image_file"; +} + +// @public +export interface MessageImageFileDetails { + fileId: string; +} + +// @public +export interface MessageImageFileDetailsOutput { + fileId: string; +} + +// @public +export interface MessageIncompleteDetails { + reason: MessageIncompleteDetailsReason; +} + +// @public +export interface MessageIncompleteDetailsOutput { + reason: MessageIncompleteDetailsReasonOutput; +} + +// @public +export type MessageIncompleteDetailsReason = string; + +// @public +export type MessageIncompleteDetailsReasonOutput = string; + +// @public +export type MessageRole = string; + +// @public +export type MessageRoleOutput = string; + +// @public +export type MessageStatus = string; + +// @public +export type MessageStatusOutput = string; + +// @public +export enum MessageStreamEvent { + ThreadMessageCompleted = "thread.message.completed", + ThreadMessageCreated = "thread.message.created", + ThreadMessageDelta = "thread.message.delta", + ThreadMessageIncomplete = "thread.message.incomplete", + ThreadMessageInProgress = "thread.message.in_progress" +} + +// @public +export type MessageTextAnnotation = MessageTextAnnotationParent | MessageTextFileCitationAnnotation | MessageTextFilePathAnnotation; + +// @public +export type MessageTextAnnotationOutput = MessageTextAnnotationOutputParent | MessageTextFileCitationAnnotationOutput | MessageTextFilePathAnnotationOutput; + +// @public +export interface MessageTextAnnotationOutputParent { + text: string; + // (undocumented) + type: string; +} + +// @public +export interface MessageTextAnnotationParent { + text: string; + // (undocumented) + type: string; +} + +// @public +export interface MessageTextContent extends MessageContentParent { + text: MessageTextDetails; + type: "text"; +} + +// @public +export interface MessageTextContentOutput extends MessageContentOutputParent { + text: MessageTextDetailsOutput; + type: "text"; +} + +// @public +export interface MessageTextDetails { + annotations: Array; + value: string; +} + +// @public +export interface MessageTextDetailsOutput { + annotations: Array; + value: string; +} + +// @public +export interface MessageTextFileCitationAnnotation extends MessageTextAnnotationParent { + endIndex?: number; + fileCitation: MessageTextFileCitationDetails; + startIndex?: number; + type: "file_citation"; +} + +// @public +export interface MessageTextFileCitationAnnotationOutput extends MessageTextAnnotationOutputParent { + endIndex?: number; + fileCitation: MessageTextFileCitationDetailsOutput; + startIndex?: number; + type: "file_citation"; +} + +// @public +export interface MessageTextFileCitationDetails { + fileId: string; + quote: string; +} + +// @public +export interface MessageTextFileCitationDetailsOutput { + fileId: string; + quote: string; +} + +// @public +export interface MessageTextFilePathAnnotation extends MessageTextAnnotationParent { + endIndex?: number; + filePath: MessageTextFilePathDetails; + startIndex?: number; + type: "file_path"; +} + +// @public +export interface MessageTextFilePathAnnotationOutput extends MessageTextAnnotationOutputParent { + endIndex?: number; + filePath: MessageTextFilePathDetailsOutput; + startIndex?: number; + type: "file_path"; +} + +// @public +export interface MessageTextFilePathDetails { + fileId: string; +} + +// @public +export interface MessageTextFilePathDetailsOutput { + fileId: string; +} + +// @public +export interface MicrosoftFabricToolDefinition extends ToolDefinitionParent { + microsoftFabric: ToolConnectionList; + type: "microsoft_fabric"; +} + +// @public +export interface MicrosoftFabricToolDefinitionOutput extends ToolDefinitionOutputParent { + microsoftFabric: ToolConnectionListOutput; + type: "microsoft_fabric"; +} + +// @public +export interface OpenAIFileOutput { + bytes: number; + createdAt: Date; + filename: string; + id: string; + object: "file"; + purpose: FilePurposeOutput; + status?: FileStateOutput; + statusDetails?: string; +} + +// @public +export interface OpenAIPageableListOfAgentOutput { + data: Array; + firstId: string; + hasMore: boolean; + lastId: string; + object: "list"; +} + +// @public +export interface OpenAIPageableListOfRunStepOutput { + data: Array; + firstId: string; + hasMore: boolean; + lastId: string; + object: "list"; +} + +// @public +export interface OpenAIPageableListOfThreadMessageOutput { + data: Array; + firstId: string; + hasMore: boolean; + lastId: string; + object: "list"; +} + +// @public +export interface OpenAIPageableListOfThreadRunOutput { + data: Array; + firstId: string; + hasMore: boolean; + lastId: string; + object: "list"; +} + +// @public +export interface OpenAIPageableListOfVectorStoreFileOutput { + data: Array; + firstId: string; + hasMore: boolean; + lastId: string; + object: "list"; +} + +// @public +export interface OpenAIPageableListOfVectorStoreOutput { + data: Array; + firstId: string; + hasMore: boolean; + lastId: string; + object: "list"; +} + +// @public +export interface PollingOptions { + abortSignal?: AbortSignalLike; + sleepIntervalInMs?: number; +} + +// @public +export interface PollingOptionsParams { + pollingOptions?: PollingOptions; +} + +// @public +export interface ProjectsClientOptions extends ClientOptions { + apiVersion?: string; +} + +// @public +export type RequiredActionOutput = RequiredActionOutputParent | SubmitToolOutputsActionOutput; + +// @public +export interface RequiredActionOutputParent { + // (undocumented) + type: string; +} + +// @public +export interface RequiredFunctionToolCallDetailsOutput { + arguments: string; + name: string; +} + +// @public +export interface RequiredFunctionToolCallOutput extends RequiredToolCallOutputParent { + function: RequiredFunctionToolCallDetailsOutput; + type: "function"; +} + +// @public +export type RequiredToolCallOutput = RequiredToolCallOutputParent | RequiredFunctionToolCallOutput; + +// @public +export interface RequiredToolCallOutputParent { + id: string; + // (undocumented) + type: string; +} + +// @public +export interface RunCompletionUsageOutput { + completionTokens: number; + promptTokens: number; + totalTokens: number; +} + +// @public +export interface RunErrorOutput { + code: string; + message: string; +} + +// @public +export type RunStatusOutput = string; + +// @public +export interface RunStepAzureAISearchToolCallOutput extends RunStepToolCallOutputParent { + azureAISearch: Record; + type: "azure_ai_search"; +} + +// @public +export interface RunStepBingGroundingToolCallOutput extends RunStepToolCallOutputParent { + bingGrounding: Record; + type: "bing_grounding"; +} + +// @public +export interface RunStepCodeInterpreterImageOutputOutput extends RunStepCodeInterpreterToolCallOutputOutputParent { + image: RunStepCodeInterpreterImageReferenceOutput; + type: "image"; +} + +// @public +export interface RunStepCodeInterpreterImageReferenceOutput { + fileId: string; +} + +// @public +export interface RunStepCodeInterpreterLogOutputOutput extends RunStepCodeInterpreterToolCallOutputOutputParent { + logs: string; + type: "logs"; +} + +// @public +export interface RunStepCodeInterpreterToolCallDetailsOutput { + input: string; + outputs: Array; +} + +// @public +export interface RunStepCodeInterpreterToolCallOutput extends RunStepToolCallOutputParent { + codeInterpreter: RunStepCodeInterpreterToolCallDetailsOutput; + type: "code_interpreter"; +} + +// @public +export type RunStepCodeInterpreterToolCallOutputOutput = RunStepCodeInterpreterToolCallOutputOutputParent | RunStepCodeInterpreterLogOutputOutput | RunStepCodeInterpreterImageOutputOutput; + +// @public +export interface RunStepCodeInterpreterToolCallOutputOutputParent { + // (undocumented) + type: string; +} + +// @public +export interface RunStepCompletionUsageOutput { + completionTokens: number; + promptTokens: number; + totalTokens: number; +} + +// @public +export interface RunStepDelta { + stepDetails?: RunStepDeltaDetail; +} + +// @public +export interface RunStepDeltaChunk { + delta: RunStepDelta; + id: string; + object: "thread.run.step.delta"; +} + +// @public +export interface RunStepDeltaCodeInterpreterDetailItemObject { + input?: string; + outputs?: Array; +} + +// @public +export interface RunStepDeltaCodeInterpreterImageOutput extends RunStepDeltaCodeInterpreterOutputParent { + image?: RunStepDeltaCodeInterpreterImageOutputObject; + type: "image"; +} + +// @public +export interface RunStepDeltaCodeInterpreterImageOutputObject { + fileId?: string; +} + +// @public +export interface RunStepDeltaCodeInterpreterLogOutput extends RunStepDeltaCodeInterpreterOutputParent { + logs?: string; + type: "logs"; +} + +// @public +export type RunStepDeltaCodeInterpreterOutput = RunStepDeltaCodeInterpreterOutputParent | RunStepDeltaCodeInterpreterLogOutput | RunStepDeltaCodeInterpreterImageOutput; + +// @public +export interface RunStepDeltaCodeInterpreterOutputParent { + index: number; + type: string; +} + +// @public +export interface RunStepDeltaCodeInterpreterToolCall extends RunStepDeltaToolCallParent { + codeInterpreter?: RunStepDeltaCodeInterpreterDetailItemObject; + type: "code_interpreter"; +} + +// @public +export interface RunStepDeltaDetail { + type: string; +} + +// @public +export interface RunStepDeltaFileSearchToolCall extends RunStepDeltaToolCallParent { + fileSearch?: Array; + type: "file_search"; +} + +// @public +export interface RunStepDeltaFunction { + arguments?: string; + name?: string; + output?: string | null; +} + +// @public +export interface RunStepDeltaFunctionToolCall extends RunStepDeltaToolCallParent { + function?: RunStepDeltaFunction; + type: "function"; +} + +// @public +export interface RunStepDeltaMessageCreation extends RunStepDeltaDetail { + messageCreation?: RunStepDeltaMessageCreationObject; + type: "message_creation"; +} + +// @public +export interface RunStepDeltaMessageCreationObject { + messageId?: string; +} + +// @public +export type RunStepDeltaToolCall = RunStepDeltaToolCallParent | RunStepDeltaFunctionToolCall | RunStepDeltaFileSearchToolCall | RunStepDeltaCodeInterpreterToolCall; + +// @public +export interface RunStepDeltaToolCallObject extends RunStepDeltaDetail { + toolCalls?: Array; + type: "tool_calls"; +} + +// @public +export interface RunStepDeltaToolCallParent { + id: string; + index: number; + type: string; +} + +// @public +export type RunStepDetailsOutput = RunStepDetailsOutputParent | RunStepMessageCreationDetailsOutput | RunStepToolCallDetailsOutput; + +// @public +export interface RunStepDetailsOutputParent { + // (undocumented) + type: RunStepTypeOutput; +} + +// @public +export type RunStepErrorCodeOutput = string; + +// @public +export interface RunStepErrorOutput { + code: RunStepErrorCodeOutput; + message: string; +} + +// @public +export interface RunStepFileSearchToolCallOutput extends RunStepToolCallOutputParent { + fileSearch: Record; + type: "file_search"; +} + +// @public +export interface RunStepFunctionToolCallDetailsOutput { + arguments: string; + name: string; + output: string | null; +} + +// @public +export interface RunStepFunctionToolCallOutput extends RunStepToolCallOutputParent { + function: RunStepFunctionToolCallDetailsOutput; + type: "function"; +} + +// @public +export interface RunStepMessageCreationDetailsOutput extends RunStepDetailsOutputParent { + messageCreation: RunStepMessageCreationReferenceOutput; + type: "message_creation"; +} + +// @public +export interface RunStepMessageCreationReferenceOutput { + messageId: string; +} + +// @public +export interface RunStepMicrosoftFabricToolCallOutput extends RunStepToolCallOutputParent { + microsoftFabric: Record; + type: "microsoft_fabric"; +} + +// @public +export interface RunStepOutput { + assistantId: string; + cancelledAt: Date | null; + completedAt: Date | null; + createdAt: Date; + expiredAt: Date | null; + failedAt: Date | null; + id: string; + lastError: RunStepErrorOutput | null; + metadata: Record | null; + object: "thread.run.step"; + runId: string; + status: RunStepStatusOutput; + stepDetails: RunStepDetailsOutput; + threadId: string; + type: RunStepTypeOutput; + usage?: RunStepCompletionUsageOutput | null; +} + +// @public +export interface RunStepSharepointToolCallOutput extends RunStepToolCallOutputParent { + sharepointGrounding: Record; + type: "sharepoint_grounding"; +} + +// @public +export type RunStepStatusOutput = string; + +// @public +export enum RunStepStreamEvent { + ThreadRunStepCancelled = "thread.run.step.cancelled", + ThreadRunStepCompleted = "thread.run.step.completed", + ThreadRunStepCreated = "thread.run.step.created", + ThreadRunStepDelta = "thread.run.step.delta", + ThreadRunStepExpired = "thread.run.step.expired", + ThreadRunStepFailed = "thread.run.step.failed", + ThreadRunStepInProgress = "thread.run.step.in_progress" +} + +// @public +export interface RunStepToolCallDetailsOutput extends RunStepDetailsOutputParent { + toolCalls: Array; + type: "tool_calls"; +} + +// @public +export type RunStepToolCallOutput = RunStepToolCallOutputParent | RunStepCodeInterpreterToolCallOutput | RunStepFileSearchToolCallOutput | RunStepBingGroundingToolCallOutput | RunStepAzureAISearchToolCallOutput | RunStepSharepointToolCallOutput | RunStepMicrosoftFabricToolCallOutput | RunStepFunctionToolCallOutput; + +// @public +export interface RunStepToolCallOutputParent { + id: string; + // (undocumented) + type: string; +} + +// @public +export type RunStepTypeOutput = string; + +// @public +export enum RunStreamEvent { + ThreadRunCancelled = "thread.run.cancelled", + ThreadRunCancelling = "thread.run.cancelling", + ThreadRunCompleted = "thread.run.completed", + ThreadRunCreated = "thread.run.created", + ThreadRunExpired = "thread.run.expired", + ThreadRunFailed = "thread.run.failed", + ThreadRunInProgress = "thread.run.in_progress", + ThreadRunQueued = "thread.run.queued", + ThreadRunRequiresAction = "thread.run.requires_action" +} + +// @public +export interface SharepointToolDefinition extends ToolDefinitionParent { + sharepointGrounding: ToolConnectionList; + type: "sharepoint_grounding"; +} + +// @public +export interface SharepointToolDefinitionOutput extends ToolDefinitionOutputParent { + sharepointGrounding: ToolConnectionListOutput; + type: "sharepoint_grounding"; +} + +// @public +export interface SubmitToolOutputsActionOutput extends RequiredActionOutputParent { + submitToolOutputs: SubmitToolOutputsDetailsOutput; + type: "submit_tool_outputs"; +} + +// @public +export interface SubmitToolOutputsDetailsOutput { + toolCalls: Array; +} + +// @public +export interface SubmitToolOutputsToRunOptionalParams extends OperationOptions { + stream?: boolean; +} + +// @public +export interface TelemetryOperations { + getConnectionString(): Promise; + getSettings(): TelemetryOptions; + updateSettings(options: TelemetryOptions): void; +} + +// @public +export interface TelemetryOptions { + enableContentRecording: boolean; +} + +// @public +export interface ThreadDeletionStatusOutput { + deleted: boolean; + id: string; + object: "thread.deleted"; +} + +// @public +export interface ThreadMessage { + assistantId: string | null; + attachments: Array | null; + completedAt: number | null; + content: Array; + createdAt: number; + id: string; + incompleteAt: number | null; + incompleteDetails: MessageIncompleteDetails | null; + metadata: Record | null; + object: "thread.message"; + role: MessageRole; + runId: string | null; + status: MessageStatus; + threadId: string; +} + +// @public +export interface ThreadMessageOptions { + attachments?: Array | null; + content: string; + metadata?: Record | null; + role: MessageRole; +} + +// @public +export interface ThreadMessageOutput { + assistantId: string | null; + attachments: Array | null; + completedAt: Date | null; + content: Array; + createdAt: Date; + id: string; + incompleteAt: Date | null; + incompleteDetails: MessageIncompleteDetailsOutput | null; + metadata: Record | null; + object: "thread.message"; + role: MessageRoleOutput; + runId: string | null; + status: MessageStatusOutput; + threadId: string; +} + +// @public +export interface ThreadRunOutput { + assistantId: string; + cancelledAt: Date | null; + completedAt: Date | null; + createdAt: Date; + expiresAt: Date | null; + failedAt: Date | null; + id: string; + incompleteDetails: IncompleteRunDetailsOutput | null; + instructions: string; + lastError: RunErrorOutput | null; + maxCompletionTokens: number | null; + maxPromptTokens: number | null; + metadata: Record | null; + model: string; + object: "thread.run"; + parallelToolCalls?: boolean; + requiredAction?: RequiredActionOutput | null; + responseFormat: AgentsApiResponseFormatOptionOutput | null; + startedAt: Date | null; + status: RunStatusOutput; + temperature?: number | null; + threadId: string; + toolChoice: AgentsApiToolChoiceOptionOutput | null; + toolResources?: UpdateToolResourcesOptionsOutput | null; + tools: Array; + topP?: number | null; + truncationStrategy: TruncationObjectOutput | null; + usage: RunCompletionUsageOutput | null; +} + +// @public +export enum ThreadStreamEvent { + ThreadCreated = "thread.created" +} + +// @public +export interface ToolConnection { + connectionId: string; +} + +// @public +export interface ToolConnectionList { + connections?: Array; +} + +// @public +export interface ToolConnectionListOutput { + connections?: Array; +} + +// @public +export interface ToolConnectionOutput { + connectionId: string; +} + +// @public +export type ToolDefinition = ToolDefinitionParent | CodeInterpreterToolDefinition | FileSearchToolDefinition | FunctionToolDefinition | BingGroundingToolDefinition | MicrosoftFabricToolDefinition | SharepointToolDefinition | AzureAISearchToolDefinition; + +// @public +export type ToolDefinitionOutput = ToolDefinitionOutputParent | CodeInterpreterToolDefinitionOutput | FileSearchToolDefinitionOutput | FunctionToolDefinitionOutput | BingGroundingToolDefinitionOutput | MicrosoftFabricToolDefinitionOutput | SharepointToolDefinitionOutput | AzureAISearchToolDefinitionOutput; + +// @public +export interface ToolDefinitionOutputParent { + // (undocumented) + type: string; +} + +// @public +export interface ToolDefinitionParent { + // (undocumented) + type: string; +} + +// @public +export interface ToolOutput { + output?: string; + toolCallId?: string; +} + +// @public +export interface ToolResources { + azureAISearch?: AzureAISearchResource; + codeInterpreter?: CodeInterpreterToolResource; + fileSearch?: FileSearchToolResource; +} + +// @public +export interface ToolResourcesOutput { + azureAISearch?: AzureAISearchResourceOutput; + codeInterpreter?: CodeInterpreterToolResourceOutput; + fileSearch?: FileSearchToolResourceOutput; +} + +// @public +export class ToolSet { + addAzureAISearchTool(indexConnectionId: string, indexName: string): { + definition: AzureAISearchToolDefinition; + resources: ToolResources; + }; + addCodeInterpreterTool(fileIds?: string[], dataSources?: Array): { + definition: CodeInterpreterToolDefinition; + resources: ToolResources; + }; + addConnectionTool(toolType: connectionToolType, connectionIds: string[]): { + definition: ToolDefinition; + }; + addFileSearchTool(vectorStoreIds?: string[], vectorStores?: Array, definitionDetails?: FileSearchToolDefinitionDetails): { + definition: FileSearchToolDefinition; + resources: ToolResources; + }; + toolDefinitions: ToolDefinition[]; + toolResources: ToolResources; +} + +// @public +export class ToolUtility { + static createAzureAISearchTool(indexConnectionId: string, indexName: string): { + definition: AzureAISearchToolDefinition; + resources: ToolResources; + }; + static createCodeInterpreterTool(fileIds?: string[], dataSources?: Array): { + definition: CodeInterpreterToolDefinition; + resources: ToolResources; + }; + static createConnectionTool(toolType: connectionToolType, connectionIds: string[]): { + definition: ToolDefinition; + }; + static createFileSearchTool(vectorStoreIds?: string[], vectorStores?: Array, definitionDetails?: FileSearchToolDefinitionDetails): { + definition: FileSearchToolDefinition; + resources: ToolResources; + }; + static createFunctionTool(functionDefinition: FunctionDefinition): { + definition: FunctionToolDefinition; + }; +} + +// @public +export interface TruncationObject { + lastMessages?: number | null; + type: TruncationStrategy; +} + +// @public +export interface TruncationObjectOutput { + lastMessages?: number | null; + type: TruncationStrategyOutput; +} + +// @public +export type TruncationStrategy = string; + +// @public +export type TruncationStrategyOutput = string; + +// @public +export interface UpdateAgentOptionalParams extends UpdateAgentOptions, OperationOptions { +} + +// @public +export interface UpdateAgentOptions { + description?: string | null; + instructions?: string | null; + metadata?: Record | null; + model?: string; + name?: string | null; + responseFormat?: AgentsApiResponseFormatOption | null; + temperature?: number | null; + toolResources?: ToolResources; + tools?: Array; + topP?: number | null; +} + +// @public +export interface UpdateAgentThreadOptionalParams extends UpdateAgentThreadOptions, OperationOptions { +} + +// @public +export interface UpdateAgentThreadOptions { + metadata?: Record | null; + toolResources?: ToolResources | null; +} + +// @public +export interface UpdateCodeInterpreterToolResourceOptions { + fileIds?: string[]; +} + +// @public +export interface UpdateCodeInterpreterToolResourceOptionsOutput { + fileIds?: string[]; +} + +// @public +export interface UpdateFileSearchToolResourceOptions { + vectorStoreIds?: string[]; +} + +// @public +export interface UpdateFileSearchToolResourceOptionsOutput { + vectorStoreIds?: string[]; +} + +// @public +export interface UpdateMessageOptionalParams extends OperationOptions { + metadata?: Record | null; +} + +// @public +export interface UpdateRunOptionalParams extends OperationOptions { + metadata?: Record | null; +} + +// @public +export interface UpdateToolResourcesOptions { + azureAISearch?: AzureAISearchResource; + codeInterpreter?: UpdateCodeInterpreterToolResourceOptions; + fileSearch?: UpdateFileSearchToolResourceOptions; +} + +// @public +export interface UpdateToolResourcesOptionsOutput { + azureAISearch?: AzureAISearchResourceOutput; + codeInterpreter?: UpdateCodeInterpreterToolResourceOptionsOutput; + fileSearch?: UpdateFileSearchToolResourceOptionsOutput; +} + +// @public +export interface UpdateVectorStoreOptionalParams extends VectorStoreUpdateOptions, OperationOptions { +} + +// @public +export interface UploadFileOptionalParams extends OperationOptions { + fileName?: string; +} + +// @public +export interface UploadFileWithPollingOptionalParams extends UploadFileOptionalParams, PollingOptionsParams { +} + +// @public +export interface VectorStoreAutoChunkingStrategyRequest extends VectorStoreChunkingStrategyRequestParent { + type: "auto"; +} + +// @public +export interface VectorStoreAutoChunkingStrategyResponseOutput extends VectorStoreChunkingStrategyResponseOutputParent { + type: "other"; +} + +// @public +export type VectorStoreChunkingStrategyRequest = VectorStoreChunkingStrategyRequestParent | VectorStoreAutoChunkingStrategyRequest | VectorStoreStaticChunkingStrategyRequest; + +// @public +export interface VectorStoreChunkingStrategyRequestParent { + // (undocumented) + type: VectorStoreChunkingStrategyRequestType; +} + +// @public +export type VectorStoreChunkingStrategyRequestType = string; + +// @public +export type VectorStoreChunkingStrategyResponseOutput = VectorStoreChunkingStrategyResponseOutputParent | VectorStoreAutoChunkingStrategyResponseOutput | VectorStoreStaticChunkingStrategyResponseOutput; + +// @public +export interface VectorStoreChunkingStrategyResponseOutputParent { + // (undocumented) + type: VectorStoreChunkingStrategyResponseTypeOutput; +} + +// @public +export type VectorStoreChunkingStrategyResponseTypeOutput = string; + +// @public +export interface VectorStoreConfiguration { + dataSources: Array; +} + +// @public +export interface VectorStoreConfigurationOutput { + dataSources: Array; +} + +// @public +export interface VectorStoreConfigurations { + configuration: VectorStoreConfiguration; + name: string; +} + +// @public +export interface VectorStoreConfigurationsOutput { + configuration: VectorStoreConfigurationOutput; + name: string; +} + +// @public +export interface VectorStoreDataSource { + type: VectorStoreDataSourceAssetType; + uri: string; +} + +// @public +export type VectorStoreDataSourceAssetType = "uri_asset" | "id_asset"; + +// @public +export type VectorStoreDataSourceAssetTypeOutput = "uri_asset" | "id_asset"; + +// @public +export interface VectorStoreDataSourceOutput { + type: VectorStoreDataSourceAssetTypeOutput; + uri: string; +} + +// @public +export interface VectorStoreDeletionStatusOutput { + deleted: boolean; + id: string; + object: "vector_store.deleted"; +} + +// @public +export interface VectorStoreExpirationPolicy { + anchor: VectorStoreExpirationPolicyAnchor; + days: number; +} + +// @public +export type VectorStoreExpirationPolicyAnchor = string; + +// @public +export type VectorStoreExpirationPolicyAnchorOutput = string; + +// @public +export interface VectorStoreExpirationPolicyOutput { + anchor: VectorStoreExpirationPolicyAnchorOutput; + days: number; +} + +// @public +export interface VectorStoreFileBatchOutput { + createdAt: Date; + fileCounts: VectorStoreFileCountOutput; + id: string; + object: "vector_store.files_batch"; + status: VectorStoreFileBatchStatusOutput; + vectorStoreId: string; +} + +// @public +export type VectorStoreFileBatchStatusOutput = string; + +// @public +export interface VectorStoreFileCountOutput { + cancelled: number; + completed: number; + failed: number; + inProgress: number; + total: number; +} + +// @public +export interface VectorStoreFileDeletionStatusOutput { + deleted: boolean; + id: string; + object: "vector_store.file.deleted"; +} + +// @public +export type VectorStoreFileErrorCodeOutput = string; + +// @public +export interface VectorStoreFileErrorOutput { + code: VectorStoreFileErrorCodeOutput; + message: string; +} + +// @public +export interface VectorStoreFileOutput { + chunkingStrategy: VectorStoreChunkingStrategyResponseOutput; + createdAt: Date; + id: string; + lastError: VectorStoreFileErrorOutput | null; + object: "vector_store.file"; + status: VectorStoreFileStatusOutput; + usageBytes: number; + vectorStoreId: string; +} + +// @public +export type VectorStoreFileStatusFilter = string; + +// @public +export type VectorStoreFileStatusOutput = string; + +// @public +export interface VectorStoreOptions { + chunkingStrategy?: VectorStoreChunkingStrategyRequest; + configuration?: VectorStoreConfiguration; + expiresAfter?: VectorStoreExpirationPolicy; + fileIds?: string[]; + metadata?: Record | null; + name?: string; +} + +// @public +export interface VectorStoreOutput { + createdAt: Date; + expiresAfter?: VectorStoreExpirationPolicyOutput; + expiresAt?: Date | null; + fileCounts: VectorStoreFileCountOutput; + id: string; + lastActiveAt: Date | null; + metadata: Record | null; + name: string; + object: "vector_store"; + status: VectorStoreStatusOutput; + usageBytes: number; +} + +// @public +export interface VectorStoreStaticChunkingStrategyOptions { + chunkOverlapTokens: number; + maxChunkSizeTokens: number; +} + +// @public +export interface VectorStoreStaticChunkingStrategyOptionsOutput { + chunkOverlapTokens: number; + maxChunkSizeTokens: number; +} + +// @public +export interface VectorStoreStaticChunkingStrategyRequest extends VectorStoreChunkingStrategyRequestParent { + static: VectorStoreStaticChunkingStrategyOptions; + type: "static"; +} + +// @public +export interface VectorStoreStaticChunkingStrategyResponseOutput extends VectorStoreChunkingStrategyResponseOutputParent { + static: VectorStoreStaticChunkingStrategyOptionsOutput; + type: "static"; +} + +// @public +export type VectorStoreStatusOutput = string; + +// @public +export interface VectorStoreUpdateOptions { + expiresAfter?: VectorStoreExpirationPolicy | null; + metadata?: Record | null; + name?: string | null; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/ai/ai-projects/sample.env b/sdk/ai/ai-projects/sample.env new file mode 100644 index 000000000000..0d9bbe518d6f --- /dev/null +++ b/sdk/ai/ai-projects/sample.env @@ -0,0 +1,3 @@ +AZURE_AI_PROJECTS_CONNECTION_STRING="" + +APPLICATIONINSIGHTS_CONNECTION_STRING="" diff --git a/sdk/ai/ai-projects/samples-dev/agents/agentCreateWithTracingConsole.ts b/sdk/ai/ai-projects/samples-dev/agents/agentCreateWithTracingConsole.ts new file mode 100644 index 000000000000..57e4dcb4d285 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/agentCreateWithTracingConsole.ts @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Demonstrates How to instrument and get tracing using open telemetry. + * + * @summary Create Agent and instrument using open telemetry. + */ + +import { AzureMonitorTraceExporter } from "@azure/monitor-opentelemetry-exporter"; +import { createAzureSdkInstrumentation } from "@azure/opentelemetry-instrumentation-azure-sdk"; +import { context, trace } from "@opentelemetry/api"; +import { registerInstrumentations } from "@opentelemetry/instrumentation"; +import { + ConsoleSpanExporter, + NodeTracerProvider, + SimpleSpanProcessor, +} from "@opentelemetry/sdk-trace-node"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const provider = new NodeTracerProvider(); +provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +provider.register(); + +registerInstrumentations({ + instrumentations: [createAzureSdkInstrumentation()], +}); + +import { AIProjectsClient } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; +let appInsightsConnectionString = process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"]; + +export async function main(): Promise { + const tracer = trace.getTracer("Agents Sample", "1.0.0"); + + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + if (!appInsightsConnectionString) { + appInsightsConnectionString = await client.telemetry.getConnectionString(); + } + + if (appInsightsConnectionString) { + const exporter = new AzureMonitorTraceExporter({ + connectionString: appInsightsConnectionString, + }); + provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); + } + + await tracer.startActiveSpan("main", async (span) => { + client.telemetry.updateSettings({ enableContentRecording: true }); + + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + tracingOptions: { tracingContext: context.active() }, + }); + + console.log(`Created agent, agent ID : ${agent.id}`); + + const thread = await client.agents.createThread(); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "Hello, tell me a joke", + }); + console.log(`Created message, message ID ${message.id}`); + + // Create run + let run = await client.agents.createRun(thread.id, agent.id); + console.log(`Created Run, Run ID: ${run.id}`); + + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + } + + await client.agents.deleteAgent(agent.id); + + console.log(`Deleted agent`); + + await client.agents.listMessages(thread.id); + + span.end(); + }); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/agentsAzureAiSearch.ts b/sdk/ai/ai-projects/samples-dev/agents/agentsAzureAiSearch.ts new file mode 100644 index 000000000000..c8162ccd3f5f --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/agentsAzureAiSearch.ts @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with the Azure AI Search tool from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with the Azure AI Search tool. + * + */ + +import type { MessageContentOutput, MessageTextContentOutput } from "@azure/ai-projects"; +import { AIProjectsClient, isOutputOfType, ToolUtility } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + // Create an Azure AI Client from a connection string, copied from your AI Foundry project. + // At the moment, it should be in the format ";;;" + // Customer needs to login to Azure subscription via Azure CLI and set the environment variables + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const connectionName = process.env["AZURE_AI_SEARCH_CONNECTION_NAME"] || ""; + const connection = await client.connections.getConnection(connectionName); + + // Initialize Azure AI Search tool + const azureAISearchTool = ToolUtility.createAzureAISearchTool(connection.id, connection.name); + + // Create agent with the Azure AI search tool + const agent = await client.agents.createAgent("gpt-4-0125-preview", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [azureAISearchTool.definition], + toolResources: azureAISearchTool.resources, + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread for communication + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message to thread + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "Hello, send an email with the datetime and weather information in New York", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create and process agent run in thread with tools + let run = await client.agents.createRun(thread.id, agent.id); + while (run.status === "queued" || run.status === "in_progress") { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + } + if (run.status === "failed") { + console.log(`Run failed: ${run.lastError}`); + } + console.log(`Run finished with status: ${run.status}`); + + // Delete the assistant when done + client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + + // Fetch and log all messages + const messages = await client.agents.listMessages(thread.id); + console.log(`Messages:`); + const agentMessage: MessageContentOutput = messages.data[0].content[0]; + if (isOutputOfType(agentMessage, "text")) { + const textContent = agentMessage as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/agentsBasics.ts b/sdk/ai/ai-projects/samples-dev/agents/agentsBasics.ts new file mode 100644 index 000000000000..6884205adb49 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/agentsBasics.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic agent operations. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + + console.log(`Created agent, agent ID : ${agent.id}`); + + client.agents.deleteAgent(agent.id); + + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/agentsBingGrounding.ts b/sdk/ai/ai-projects/samples-dev/agents/agentsBingGrounding.ts new file mode 100644 index 000000000000..effec260e0bd --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/agentsBingGrounding.ts @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with the Grounding with Bing Search tool + * from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with the Grounding with Bing Search tool. + * + */ + +import type { MessageContentOutput, MessageTextContentOutput } from "@azure/ai-projects"; +import { + AIProjectsClient, + ToolUtility, + connectionToolType, + isOutputOfType, +} from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + // Create an Azure AI Client from a connection string, copied from your AI Foundry project. + // At the moment, it should be in the format ";;;" + // Customer needs to login to Azure subscription via Azure CLI and set the environment variables + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const bingConnection = await client.connections.getConnection( + process.env["BING_CONNECTION_NAME"] || "", + ); + const connectionId = bingConnection.id; + + // Initialize agent bing tool with the connection id + const bingTool = ToolUtility.createConnectionTool(connectionToolType.BingGrounding, [ + connectionId, + ]); + + // Create agent with the bing tool and process assistant run + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [bingTool.definition], + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread for communication + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message to thread + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "How does wikipedia explain Euler's Identity?", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create and process agent run in thread with tools + let run = await client.agents.createRun(thread.id, agent.id); + while (run.status === "queued" || run.status === "in_progress") { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + } + if (run.status === "failed") { + console.log(`Run failed: ${run.lastError}`); + } + console.log(`Run finished with status: ${run.status}`); + + // Delete the assistant when done + client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + + // Fetch and log all messages + const messages = await client.agents.listMessages(thread.id); + console.log(`Messages:`); + const agentMessage: MessageContentOutput = messages.data[0].content[0]; + if (isOutputOfType(agentMessage, "text")) { + const textContent = agentMessage as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/agentsBingGroundingWithStreaming.ts b/sdk/ai/ai-projects/samples-dev/agents/agentsBingGroundingWithStreaming.ts new file mode 100644 index 000000000000..4f59d14cafc3 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/agentsBingGroundingWithStreaming.ts @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with the Grounding with Bing Search tool + * from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with the Grounding with Bing Search tool using streaming. + * + */ + +import type { + MessageContentOutput, + MessageDeltaChunk, + MessageDeltaTextContent, + MessageTextContentOutput, + ThreadRunOutput, +} from "@azure/ai-projects"; +import { + AIProjectsClient, + DoneEvent, + ErrorEvent, + MessageStreamEvent, + RunStreamEvent, + ToolUtility, + connectionToolType, + isOutputOfType, +} from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + // Create an Azure AI Client from a connection string, copied from your AI Foundry project. + // At the moment, it should be in the format ";;;" + // Customer needs to login to Azure subscription via Azure CLI and set the environment variables + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const bingConnection = await client.connections.getConnection( + process.env["BING_CONNECTION_NAME"] || "", + ); + const connectionId = bingConnection.id; + + const bingTool = ToolUtility.createConnectionTool(connectionToolType.BingGrounding, [ + connectionId, + ]); + + // Create agent with the bing tool and process assistant run + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [bingTool.definition], + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread for communication + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message to thread + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "How does wikipedia explain Euler's Identity?", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create and process agent run with streaming in thread with tools + const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); + + for await (const eventMessage of streamEventMessages) { + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${(eventMessage.data as ThreadRunOutput).status}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data as MessageDeltaChunk; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart as MessageDeltaTextContent; + const textValue = textContent.text?.value || "No text"; + console.log(`Text delta received:: ${textValue}`); + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } + } + + // Delete the assistant when done + client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + + // Fetch and log all messages + const messages = await client.agents.listMessages(thread.id); + console.log(`Messages:`); + const agentMessage: MessageContentOutput = messages.data[0].content[0]; + if (isOutputOfType(agentMessage, "text")) { + const textContent = agentMessage as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/agentsWithFunctionTool.ts b/sdk/ai/ai-projects/samples-dev/agents/agentsWithFunctionTool.ts new file mode 100644 index 000000000000..a20201093367 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/agentsWithFunctionTool.ts @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/* eslint-disable @typescript-eslint/no-unsafe-function-type */ + +/** + * This sample demonstrates how to use basic agent operations with function tool from the Azure Agents service. + * + * @summary demonstrates how to use basic agent operations using function tool. + * + */ + +import type { + FunctionToolDefinition, + FunctionToolDefinitionOutput, + MessageContentOutput, + MessageImageFileContentOutput, + MessageTextContentOutput, + RequiredToolCallOutput, + SubmitToolOutputsActionOutput, + ToolOutput, +} from "@azure/ai-projects"; +import { AIProjectsClient, ToolUtility, isOutputOfType } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const agents = client.agents; + class FunctionToolExecutor { + private functionTools: { func: Function; definition: FunctionToolDefinition }[]; + + constructor() { + this.functionTools = [ + { + func: this.getUserFavoriteCity, + ...ToolUtility.createFunctionTool({ + name: "getUserFavoriteCity", + description: "Gets the user's favorite city.", + parameters: {}, + }), + }, + { + func: this.getCityNickname, + ...ToolUtility.createFunctionTool({ + name: "getCityNickname", + description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", + parameters: { + type: "object", + properties: { + location: { type: "string", description: "The city and state, e.g. Seattle, Wa" }, + }, + }, + }), + }, + { + func: this.getWeather, + ...ToolUtility.createFunctionTool({ + name: "getWeather", + description: "Gets the weather for a location.", + parameters: { + type: "object", + properties: { + location: { type: "string", description: "The city and state, e.g. Seattle, Wa" }, + unit: { type: "string", enum: ["c", "f"] }, + }, + }, + }), + }, + ]; + } + + private getUserFavoriteCity(): {} { + return { location: "Seattle, WA" }; + } + + private getCityNickname(_location: string): {} { + return { nickname: "The Emerald City" }; + } + + private getWeather(_location: string, unit: string): {} { + return { weather: unit === "f" ? "72f" : "22c" }; + } + + public invokeTool( + toolCall: RequiredToolCallOutput & FunctionToolDefinitionOutput, + ): ToolOutput | undefined { + console.log(`Function tool call - ${toolCall.function.name}`); + const args = []; + if (toolCall.function.parameters) { + try { + const params = JSON.parse(toolCall.function.parameters); + for (const key in params) { + if (Object.prototype.hasOwnProperty.call(params, key)) { + args.push(params[key]); + } + } + } catch (error) { + console.error(`Failed to parse parameters: ${toolCall.function.parameters}`, error); + return undefined; + } + } + const result = this.functionTools + .find((tool) => tool.definition.function.name === toolCall.function.name) + ?.func(...args); + return result + ? { + toolCallId: toolCall.id, + output: JSON.stringify(result), + } + : undefined; + } + + public getFunctionDefinitions(): FunctionToolDefinition[] { + return this.functionTools.map((tool) => { + return tool.definition; + }); + } + } + + const functionToolExecutor = new FunctionToolExecutor(); + const functionTools = functionToolExecutor.getFunctionDefinitions(); + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: + "You are a weather bot. Use the provided functions to help answer questions. Customize your responses to the user's preferences as much as possible and use friendly nicknames for cities whenever possible.", + tools: functionTools, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "What's the weather like in my favorite city?", + }); + console.log(`Created message, message ID ${message.id}`); + + // Create run + let run = await agents.createRun(thread.id, agent.id); + console.log(`Created Run, Run ID: ${run.id}`); + + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await delay(1000); + run = await agents.getRun(thread.id, run.id); + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + if (run.status === "requires_action" && run.requiredAction) { + console.log(`Run requires action - ${run.requiredAction}`); + if ( + isOutputOfType(run.requiredAction, "submit_tool_outputs") + ) { + const submitToolOutputsActionOutput = run.requiredAction as SubmitToolOutputsActionOutput; + const toolCalls = submitToolOutputsActionOutput.submitToolOutputs.toolCalls; + const toolResponses = []; + for (const toolCall of toolCalls) { + if (isOutputOfType(toolCall, "function")) { + const toolResponse = functionToolExecutor.invokeTool(toolCall); + if (toolResponse) { + toolResponses.push(toolResponse); + } + } + } + if (toolResponses.length > 0) { + run = await agents.submitToolOutputsToRun(thread.id, run.id, toolResponses); + console.log(`Submitted tool response - ${run.status}`); + } + } + } + } + + console.log(`Run status - ${run.status}, run ID: ${run.id}`); + const messages = await agents.listMessages(thread.id); + messages.data.forEach((threadMessage) => { + console.log( + `Thread Message Created at - ${threadMessage.createdAt} - Role - ${threadMessage.role}`, + ); + threadMessage.content.forEach((content: MessageContentOutput) => { + if (isOutputOfType(content, "text")) { + const textContent = content as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } else if (isOutputOfType(content, "image_file")) { + const imageContent = content as MessageImageFileContentOutput; + console.log(`Image Message Content - ${imageContent.imageFile.fileId}`); + } + }); + }); + // Delete agent + agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/agentsWithToolset.ts b/sdk/ai/ai-projects/samples-dev/agents/agentsWithToolset.ts new file mode 100644 index 000000000000..a5598362920e --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/agentsWithToolset.ts @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with toolset and iteration in streaming + * from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with toolset. + * + */ + +import { AIProjectsClient, ToolSet } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; + +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file for code interpreter tool + const filePath1 = path.resolve(__dirname, "../data/nifty500QuarterlyResults.csv"); + const fileStream1 = fs.createReadStream(filePath1); + const codeInterpreterFile = await client.agents.uploadFile(fileStream1, "assistants", { + fileName: "myLocalFile", + }); + + console.log(`Uploaded local file, file ID : ${codeInterpreterFile.id}`); + + // Upload file for file search tool + const filePath2 = path.resolve(__dirname, "../data/sampleFileForUpload.txt"); + const fileStream2 = fs.createReadStream(filePath2); + const fileSearchFile = await client.agents.uploadFile(fileStream2, "assistants", { + fileName: "sampleFileForUpload.txt", + }); + console.log(`Uploaded file, file ID: ${fileSearchFile.id}`); + + // Create vector store for file search tool + const vectorStore = await client.agents.createVectorStoreAndPoll({ + fileIds: [fileSearchFile.id], + }); + + // Create tool set + const toolSet = new ToolSet(); + toolSet.addFileSearchTool([vectorStore.id]); + toolSet.addCodeInterpreterTool([codeInterpreterFile.id]); + + // Create agent with tool set + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: toolSet.toolDefinitions, + toolResources: toolSet.toolResources, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create threads, messages, and runs to interact with agent as desired + + // Delete agent + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/batchVectorStoreWithFiles.ts b/sdk/ai/ai-projects/samples-dev/agents/batchVectorStoreWithFiles.ts new file mode 100644 index 000000000000..b4dab8105ec3 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/batchVectorStoreWithFiles.ts @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the batch vector store with the list of files. + * + * @summary demonstrates how to create the batch vector store with the list of files. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload first file + const file1Content = "Hello, Vector Store!"; + const readable1 = new Readable(); + readable1.push(file1Content); + readable1.push(null); // end the stream + const file1 = await client.agents.uploadFile(readable1, "assistants", { + fileName: "vectorFile1.txt", + }); + console.log(`Uploaded file1, file ID: ${file1.id}`); + + // Create and upload second file + const file2Content = "This is another file for the Vector Store!"; + const readable2 = new Readable(); + readable2.push(file2Content); + readable2.push(null); // end the stream + const file2 = await client.agents.uploadFile(readable2, "assistants", { + fileName: "vectorFile2.txt", + }); + console.log(`Uploaded file2, file ID: ${file2.id}`); + + // Create vector store file batch + const vectorStoreFileBatch = await client.agents.createVectorStoreFileBatch(vectorStore.id, { + fileIds: [file1.id, file2.id], + }); + console.log( + `Created vector store file batch, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Retrieve vector store file batch + const _vectorStoreFileBatch = await client.agents.getVectorStoreFileBatch( + vectorStore.id, + vectorStoreFileBatch.id, + ); + console.log( + `Retrieved vector store file batch, vector store file batch ID: ${_vectorStoreFileBatch.id}`, + ); + + // List vector store files in the batch + const vectorStoreFiles = await client.agents.listVectorStoreFileBatchFiles( + vectorStore.id, + vectorStoreFileBatch.id, + ); + console.log( + `List of vector store files in the batch: ${vectorStoreFiles.data.map((f) => f.id).join(", ")}`, + ); + + // Delete files + await client.agents.deleteFile(file1.id); + console.log(`Deleted file1, file ID: ${file1.id}`); + await client.agents.deleteFile(file2.id); + console.log(`Deleted file2, file ID: ${file2.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/batchVectorStoreWithFilesAndPolling.ts b/sdk/ai/ai-projects/samples-dev/agents/batchVectorStoreWithFilesAndPolling.ts new file mode 100644 index 000000000000..bcc1128aa546 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/batchVectorStoreWithFilesAndPolling.ts @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the batch vector store with the list of files using polling operation. + * + * @summary demonstrates how to create the batch vector store with the list of files using polling operation. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload first file + const file1Content = "Hello, Vector Store!"; + const readable1 = new Readable(); + readable1.push(file1Content); + readable1.push(null); // end the stream + const file1 = await client.agents.uploadFile(readable1, "assistants", { + fileName: "vectorFile1.txt", + }); + console.log(`Uploaded file1, file ID: ${file1.id}`); + + // Create and upload second file + const file2Content = "This is another file for the Vector Store!"; + const readable2 = new Readable(); + readable2.push(file2Content); + readable2.push(null); // end the stream + const file2 = await client.agents.uploadFile(readable2, "assistants", { + fileName: "vectorFile2.txt", + }); + console.log(`Uploaded file2, file ID: ${file2.id}`); + + // Set up abort controller (optional) + // Polling can then be stopped using abortController.abort() + const abortController = new AbortController(); + + // Create vector store file batch + const vectorStoreFileBatchOptions = { + fileIds: [file1.id, file2.id], + pollingOptions: { abortSignal: abortController.signal }, + }; + const poller = client.agents.createVectorStoreFileBatchAndPoll( + vectorStore.id, + vectorStoreFileBatchOptions, + ); + const vectorStoreFileBatch = await poller.pollUntilDone(); + console.log( + `Created vector store file batch with status ${vectorStoreFileBatch.status}, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Retrieve vector store file batch + const _vectorStoreFileBatch = await client.agents.getVectorStoreFileBatch( + vectorStore.id, + vectorStoreFileBatch.id, + ); + console.log( + `Retrieved vector store file batch, vector store file batch ID: ${_vectorStoreFileBatch.id}`, + ); + + // Delete files + await client.agents.deleteFile(file1.id); + console.log(`Deleted file1, file ID: ${file1.id}`); + await client.agents.deleteFile(file2.id); + console.log(`Deleted file2, file ID: ${file2.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/codeInterpreter.ts b/sdk/ai/ai-projects/samples-dev/agents/codeInterpreter.ts new file mode 100644 index 000000000000..554812152cfc --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/codeInterpreter.ts @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with code interpreter from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with code interpreter. + * + */ + +import type { MessageImageFileContentOutput, MessageTextContentOutput } from "@azure/ai-projects"; +import { AIProjectsClient, isOutputOfType, ToolUtility } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file and wait for it to be processed + const filePath = path.resolve(__dirname, "../data/nifty500QuarterlyResults.csv"); + const localFileStream = fs.createReadStream(filePath); + const localFile = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "localFile", + }); + + console.log(`Uploaded local file, file ID : ${localFile.id}`); + + // Create code interpreter tool + const codeInterpreterTool = ToolUtility.createCodeInterpreterTool([localFile.id]); + + // Notice that CodeInterpreter must be enabled in the agent creation, otherwise the agent will not be able to see the file attachment + const agent = await client.agents.createAgent("gpt-4o-mini", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [codeInterpreterTool.definition], + toolResources: codeInterpreterTool.resources, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create a thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create a message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: + "Could you please create a bar chart in the TRANSPORTATION sector for the operating profit from the uploaded CSV file and provide the file to me?", + }); + + console.log(`Created message, message ID: ${message.id}`); + + // Create and execute a run + let run = await client.agents.createRun(thread.id, agent.id); + while (run.status === "queued" || run.status === "in_progress") { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + } + if (run.status === "failed") { + // Check if you got "Rate limit is exceeded.", then you want to get more quota + console.log(`Run failed: ${run.lastError}`); + } + console.log(`Run finished with status: ${run.status}`); + + // Delete the original file from the agent to free up space (note: this does not delete your version of the file) + await client.agents.deleteFile(localFile.id); + console.log(`Deleted file, file ID: ${localFile.id}`); + + // Print the messages from the agent + const messages = await client.agents.listMessages(thread.id); + console.log("Messages:", messages); + + // Get most recent message from the assistant + const assistantMessage = messages.data.find((msg) => msg.role === "assistant"); + if (assistantMessage) { + const textContent = assistantMessage.content.find((content) => + isOutputOfType(content, "text"), + ) as MessageTextContentOutput; + if (textContent) { + console.log(`Last message: ${textContent.text.value}`); + } + } + + // Save the newly created file + console.log(`Saving new files...`); + const imageFile = (messages.data[0].content[0] as MessageImageFileContentOutput).imageFile; + console.log(`Image file ID : ${imageFile}`); + const imageFileName = path.resolve( + __dirname, + "../data/" + (await client.agents.getFile(imageFile.fileId)).filename + "ImageFile.png", + ); + + const fileContent = await ( + await client.agents.getFileContent(imageFile.fileId).asNodeStream() + ).body; + if (fileContent) { + const chunks: Buffer[] = []; + for await (const chunk of fileContent) { + chunks.push(Buffer.from(chunk)); + } + const buffer = Buffer.concat(chunks); + fs.writeFileSync(imageFileName, buffer); + } else { + console.error("Failed to retrieve file content: fileContent is undefined"); + } + console.log(`Saved image file to: ${imageFileName}`); + + // Iterate through messages and print details for each annotation + console.log(`Message Details:`); + messages.data.forEach((m) => { + console.log(`File Paths:`); + console.log(`Type: ${m.content[0].type}`); + if (isOutputOfType(m.content[0], "text")) { + const textContent = m.content[0] as MessageTextContentOutput; + console.log(`Text: ${textContent.text.value}`); + } + console.log(`File ID: ${m.id}`); + console.log(`Start Index: ${messages.firstId}`); + console.log(`End Index: ${messages.lastId}`); + }); + + // Delete the agent once done + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/codeInterpreterWithStreaming.ts b/sdk/ai/ai-projects/samples-dev/agents/codeInterpreterWithStreaming.ts new file mode 100644 index 000000000000..e669836dce74 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/codeInterpreterWithStreaming.ts @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with code interpreter from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with code interpreter. + * + */ + +import type { + MessageDeltaChunk, + MessageDeltaTextContent, + MessageImageFileContentOutput, + MessageTextContentOutput, + ThreadRunOutput, +} from "@azure/ai-projects"; +import { + AIProjectsClient, + DoneEvent, + ErrorEvent, + isOutputOfType, + MessageStreamEvent, + RunStreamEvent, + ToolUtility, +} from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file and wait for it to be processed + const filePath = path.resolve(__dirname, "../data/nifty500QuarterlyResults.csv"); + const localFileStream = fs.createReadStream(filePath); + const localFile = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "myLocalFile", + }); + + console.log(`Uploaded local file, file ID : ${localFile.id}`); + + // Create code interpreter tool + const codeInterpreterTool = ToolUtility.createCodeInterpreterTool([localFile.id]); + + // Notice that CodeInterpreter must be enabled in the agent creation, otherwise the agent will not be able to see the file attachment + const agent = await client.agents.createAgent("gpt-4o-mini", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [codeInterpreterTool.definition], + toolResources: codeInterpreterTool.resources, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create a thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create a message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: + "Could you please create a bar chart in the TRANSPORTATION sector for the operating profit from the uploaded CSV file and provide the file to me?", + }); + + console.log(`Created message, message ID: ${message.id}`); + + // Create and execute a run + const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); + + for await (const eventMessage of streamEventMessages) { + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${(eventMessage.data as ThreadRunOutput).status}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data as MessageDeltaChunk; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart as MessageDeltaTextContent; + const textValue = textContent.text?.value || "No text"; + console.log(`Text delta received:: ${textValue}`); + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } + } + + // Delete the original file from the agent to free up space (note: this does not delete your version of the file) + await client.agents.deleteFile(localFile.id); + console.log(`Deleted file, file ID : ${localFile.id}`); + + // Print the messages from the agent + const messages = await client.agents.listMessages(thread.id); + console.log("Messages:", messages); + + // Get most recent message from the assistant + const assistantMessage = messages.data.find((msg) => msg.role === "assistant"); + if (assistantMessage) { + const textContent = assistantMessage.content.find((content) => + isOutputOfType(content, "text"), + ) as MessageTextContentOutput; + if (textContent) { + console.log(`Last message: ${textContent.text.value}`); + } + } + + // Save the newly created file + console.log(`Saving new files...`); + const imageFileOutput = messages.data[0].content[0] as MessageImageFileContentOutput; + const imageFile = imageFileOutput.imageFile.fileId; + const imageFileName = path.resolve( + __dirname, + "../data/" + (await client.agents.getFile(imageFile)).filename + "ImageFile.png", + ); + console.log(`Image file name : ${imageFileName}`); + + const fileContent = await (await client.agents.getFileContent(imageFile).asNodeStream()).body; + if (fileContent) { + const chunks: Buffer[] = []; + for await (const chunk of fileContent) { + chunks.push(Buffer.from(chunk)); + } + const buffer = Buffer.concat(chunks); + fs.writeFileSync(imageFileName, buffer); + } else { + console.error("Failed to retrieve file content: fileContent is undefined"); + } + console.log(`Saved image file to: ${imageFileName}`); + + // Iterate through messages and print details for each annotation + console.log(`Message Details:`); + messages.data.forEach((m) => { + console.log(`File Paths:`); + console.log(`Type: ${m.content[0].type}`); + if (isOutputOfType(m.content[0], "text")) { + const textContent = m.content[0] as MessageTextContentOutput; + console.log(`Text: ${textContent.text.value}`); + } + console.log(`File ID: ${m.id}`); + console.log(`Start Index: ${messages.firstId}`); + console.log(`End Index: ${messages.lastId}`); + }); + + // Delete the agent once done + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/fileSearch.ts b/sdk/ai/ai-projects/samples-dev/agents/fileSearch.ts new file mode 100644 index 000000000000..d834a3174a04 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/fileSearch.ts @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with file searching from the Azure Agents service. + * + * @summary This sample demonstrates how to use agent operations with file searching. + * + */ + +import type { + MessageContentOutput, + MessageImageFileContentOutput, + MessageTextContentOutput, +} from "@azure/ai-projects"; +import { AIProjectsClient, isOutputOfType, ToolUtility } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file + const filePath = path.resolve(__dirname, "../data/sampleFileForUpload.txt"); + const localFileStream = fs.createReadStream(filePath); + const file = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "sampleFileForUpload.txt", + }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store + const vectorStore = await client.agents.createVectorStore({ + fileIds: [file.id], + name: "myVectorStore", + }); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Initialize file search tool + const fileSearchTool = ToolUtility.createFileSearchTool([vectorStore.id]); + + // Create agent with files + const agent = await client.agents.createAgent("gpt-4o", { + name: "SDK Test Agent - Retrieval", + instructions: "You are helpful agent that can help fetch data from files you know about.", + tools: [fileSearchTool.definition], + toolResources: fileSearchTool.resources, + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "Can you give me the documented codes for 'banana' and 'orange'?", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create run + let run = await client.agents.createRun(thread.id, agent.id); + while (["queued", "in_progress"].includes(run.status)) { + await delay(500); + run = await client.agents.getRun(thread.id, run.id); + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + } + + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + const messages = await client.agents.listMessages(thread.id); + messages.data.forEach((threadMessage) => { + console.log( + `Thread Message Created at - ${threadMessage.createdAt} - Role - ${threadMessage.role}`, + ); + threadMessage.content.forEach((content: MessageContentOutput) => { + if (isOutputOfType(content, "text")) { + const textContent = content as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } else if (isOutputOfType(content, "image_file")) { + const imageContent = content as MessageImageFileContentOutput; + console.log(`Image Message Content - ${imageContent.imageFile.fileId}`); + } + }); + }); + + // Delete agent + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/files.ts b/sdk/ai/ai-projects/samples-dev/agents/files.ts new file mode 100644 index 000000000000..2e2bebdadd22 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/files.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic files agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic files agent operations. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create and upload file + const fileContent = "Hello, World!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + const file = await client.agents.uploadFile(readable, "assistants", { fileName: "myFile.txt" }); + console.log(`Uploaded file, file ID : ${file.id}`); + + // List uploaded files + const files = await client.agents.listFiles(); + + console.log(`List of files : ${files.data[0].filename}`); + + // Retrieve file + const _file = await client.agents.getFile(file.id); + + console.log(`Retrieved file, file ID : ${_file.id}`); + + // Delete file + await client.agents.deleteFile(file.id); + + console.log(`Deleted file, file ID : ${file.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/filesWithLocalUpload.ts b/sdk/ai/ai-projects/samples-dev/agents/filesWithLocalUpload.ts new file mode 100644 index 000000000000..703ac1f2bd70 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/filesWithLocalUpload.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic files agent operations with local file upload from the Azure Agents service. + * + * @summary demonstrates how to use basic files agent operations with local file upload. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload local file + const filePath = path.resolve(__dirname, "../data/localFile.txt"); + const localFileStream = fs.createReadStream(filePath); + const localFile = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "myLocalFile.txt", + }); + + console.log(`Uploaded local file, file ID : ${localFile.id}`); + + // Retrieve local file + const retrievedLocalFile = await client.agents.getFile(localFile.id); + + console.log(`Retrieved local file, file ID : ${retrievedLocalFile.id}`); + + // Delete local file + await client.agents.deleteFile(localFile.id); + + console.log(`Deleted local file, file ID : ${localFile.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/filesWithPolling.ts b/sdk/ai/ai-projects/samples-dev/agents/filesWithPolling.ts new file mode 100644 index 000000000000..01513ffc8470 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/filesWithPolling.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to upload a file and poll for its status. + * + * @summary demonstrates how to upload a file and poll for its status. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create file content + const fileContent = "Hello, World!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + + // Upload file and poll + const poller = client.agents.uploadFileAndPoll(readable, "assistants", { + fileName: "myPollingFile", + }); + const file = await poller.pollUntilDone(); + console.log(`Uploaded file with status ${file.status}, file ID : ${file.id}`); + + // Delete file + await client.agents.deleteFile(file.id); + console.log(`Deleted file, file ID ${file.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/messages.ts b/sdk/ai/ai-projects/samples-dev/agents/messages.ts new file mode 100644 index 000000000000..8e62c72d15b5 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/messages.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic message agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic message agent operations. + * + */ + +import type { MessageTextContentOutput } from "@azure/ai-projects"; +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + const thread = await client.agents.createThread(); + + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + + const messages = await client.agents.listMessages(thread.id); + console.log( + `Message ${message.id} contents: ${(messages.data[0].content[0] as MessageTextContentOutput).text.value}`, + ); + + const updatedMessage = await client.agents.updateMessage(thread.id, message.id, { + metadata: { introduction: "true" }, + }); + console.log(`Updated message metadata - introduction: ${updatedMessage.metadata?.introduction}`); + + await client.agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID : ${thread.id}`); + + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID : ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/runSteps.ts b/sdk/ai/ai-projects/samples-dev/agents/runSteps.ts new file mode 100644 index 000000000000..7b35d72331f4 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/runSteps.ts @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic run agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic run agent operations. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create agent + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create run + let run = await client.agents.createRun(thread.id, agent.id); + console.log(`Created run, run ID: ${run.id}`); + + // Wait for run to complete + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await new Promise((resolve) => setTimeout(resolve, 1000)); + run = await client.agents.getRun(thread.id, run.id); + console.log(`Run status: ${run.status}`); + } + + // List run steps + const runSteps = await client.agents.listRunSteps(thread.id, run.id); + console.log(`Listed run steps, run ID: ${run.id}`); + + // Get specific run step + const stepId = runSteps.data[0].id; + const step = await client.agents.getRunStep(thread.id, run.id, stepId); + console.log(`Retrieved run step, step ID: ${step.id}`); + + // Clean up + await client.agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/streaming.ts b/sdk/ai/ai-projects/samples-dev/agents/streaming.ts new file mode 100644 index 000000000000..045b5f339861 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/streaming.ts @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations in streaming from the Azure Agents service. + * + * @summary demonstrates how to use agent operations in streaming. + * + */ + +import type { + MessageDeltaChunk, + MessageDeltaTextContent, + ThreadRunOutput, +} from "@azure/ai-projects"; +import { + AIProjectsClient, + DoneEvent, + ErrorEvent, + MessageStreamEvent, + RunStreamEvent, +} from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + const agent = await client.agents.createAgent("gpt-4-1106-preview", { + name: "my-assistant", + instructions: "You are helpful agent", + }); + + console.log(`Created agent, agent ID : ${agent.id}`); + + const thread = await client.agents.createThread(); + + console.log(`Created thread, thread ID : ${agent.id}`); + + await client.agents.createMessage(thread.id, { role: "user", content: "Hello, tell me a joke" }); + + console.log(`Created message, thread ID : ${agent.id}`); + + const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); + + for await (const eventMessage of streamEventMessages) { + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${(eventMessage.data as ThreadRunOutput).status}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data as MessageDeltaChunk; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart as MessageDeltaTextContent; + const textValue = textContent.text?.value || "No text"; + console.log(`Text delta received:: ${textValue}`); + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } + } + + await client.agents.deleteAgent(agent.id); + console.log(`Delete agent, agent ID : ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/threads.ts b/sdk/ai/ai-projects/samples-dev/agents/threads.ts new file mode 100644 index 000000000000..3f6af18701d0 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/threads.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic thread agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic thread agent operations. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + const thread = await client.agents.createThread(); + + console.log(`Created thread, thread ID : ${thread.id}`); + + const _thread = await client.agents.getThread(thread.id); + + console.log(`Retrieved thread, thread ID : ${_thread.id}`); + + client.agents.deleteThread(thread.id); + + console.log(`Deleted thread, thread ID : ${_thread.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/vectorStoreWithFiles.ts b/sdk/ai/ai-projects/samples-dev/agents/vectorStoreWithFiles.ts new file mode 100644 index 000000000000..25a393caa1f9 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/vectorStoreWithFiles.ts @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store with the list of files. + * + * @summary demonstrates how to create the vector store with the list of files. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload file + const fileContent = "Hello, Vector Store!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + const file = await client.agents.uploadFile(readable, "assistants", { + fileName: "vectorFile.txt", + }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store file + const vectorStoreFile = await client.agents.createVectorStoreFile(vectorStore.id, { + fileId: file.id, + }); + console.log(`Created vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Retrieve vector store file + const _vectorStoreFile = await client.agents.getVectorStoreFile( + vectorStore.id, + vectorStoreFile.id, + ); + console.log(`Retrieved vector store file, vector store file ID: ${_vectorStoreFile.id}`); + + // List vector store files + const vectorStoreFiles = await client.agents.listVectorStoreFiles(vectorStore.id); + console.log(`List of vector store files: ${vectorStoreFiles.data.map((f) => f.id).join(", ")}`); + + // Delete vector store file + await client.agents.deleteVectorStoreFile(vectorStore.id, vectorStoreFile.id); + console.log(`Deleted vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Delete file + await client.agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/vectorStoreWithFilesAndPolling.ts b/sdk/ai/ai-projects/samples-dev/agents/vectorStoreWithFilesAndPolling.ts new file mode 100644 index 000000000000..f1a297985813 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/vectorStoreWithFilesAndPolling.ts @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store with the list of files using polling operation. + * + * @summary demonstrates how to create the vector store with the list of files using polling operation. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload file + const fileContent = "Hello, Vector Store!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + const file = await client.agents.uploadFile(readable, "assistants", { + fileName: "vectorFile.txt", + }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Set up abort controller (optional) + // Polling can then be stopped using abortController.abort() + const abortController = new AbortController(); + + // Create vector store file + const vectorStoreFileOptions = { + fileId: file.id, + pollingOptions: { sleepIntervalInMs: 2000, abortSignal: abortController.signal }, + }; + const poller = client.agents.createVectorStoreFileAndPoll(vectorStore.id, vectorStoreFileOptions); + const vectorStoreFile = await poller.pollUntilDone(); + console.log( + `Created vector store file with status ${vectorStoreFile.status}, vector store file ID: ${vectorStoreFile.id}`, + ); + + // Delete file + await client.agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/vectorStores.ts b/sdk/ai/ai-projects/samples-dev/agents/vectorStores.ts new file mode 100644 index 000000000000..bcfd96c16cec --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/vectorStores.ts @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store. + * + * @summary demonstrates how to create the vector store. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create a vector store + const vectorStore = await client.agents.createVectorStore({ name: "myVectorStore" }); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // List vector stores + const vectorStores = await client.agents.listVectorStores(); + console.log("List of vector stores:", vectorStores); + + // Modify the vector store + const updatedVectorStore = await client.agents.modifyVectorStore(vectorStore.id, { + name: "updatedVectorStore", + }); + console.log(`Updated vector store, vector store ID: ${updatedVectorStore.id}`); + + // Get a specific vector store + const retrievedVectorStore = await client.agents.getVectorStore(vectorStore.id); + console.log(`Retrieved vector store, vector store ID: ${retrievedVectorStore.id}`); + + // Delete the vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/agents/vectorStoresWithPolling.ts b/sdk/ai/ai-projects/samples-dev/agents/vectorStoresWithPolling.ts new file mode 100644 index 000000000000..f5611860f210 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/vectorStoresWithPolling.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store using polling operation. + * + * @summary demonstrates how to create the vector store using polling operation. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Set up abort controller (optional) + // Polling can then be stopped using abortController.abort() + const abortController = new AbortController(); + + // Create a vector store + const vectorStoreOptions = { + name: "myVectorStore", + pollingOptions: { sleepIntervalInMs: 2000, abortSignal: abortController.signal }, + }; + const poller = client.agents.createVectorStoreAndPoll(vectorStoreOptions); + const vectorStore = await poller.pollUntilDone(); + console.log( + `Created vector store with status ${vectorStore.status}, vector store ID: ${vectorStore.id}`, + ); + + // Get a specific vector store + const retrievedVectorStore = await client.agents.getVectorStore(vectorStore.id); + console.log(`Retrieved vector store, vector store ID: ${retrievedVectorStore.id}`); + + // Delete the vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/connections/connectionsBasics.ts b/sdk/ai/ai-projects/samples-dev/connections/connectionsBasics.ts new file mode 100644 index 000000000000..e9e576615f9d --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/connections/connectionsBasics.ts @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to how to use basic connections operations. + * + * @summary Given an AIProjectClient, this sample demonstrates how to enumerate the properties of all connections, + * get the properties of a default connection, and get the properties of a connection by its name. + * + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Get the properties of the specified machine learning workspace + const workspace = await client.connections.getWorkspace(); + console.log(`Retrieved workspace, workspace name: ${workspace.name}`); + + // List the details of all the connections + const connections = await client.connections.listConnections(); + console.log(`Retrieved ${connections.length} connections`); + + // Get the details of a connection, without credentials + const connectionName = connections[0].name; + const connection = await client.connections.getConnection(connectionName); + console.log(`Retrieved connection, connection name: ${connection.name}`); + + // Get the details of a connection, including credentials (if available) + const connectionWithSecrets = await client.connections.getConnectionWithSecrets(connectionName); + console.log(`Retrieved connection with secrets, connection name: ${connectionWithSecrets.name}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples-dev/data/localFile.txt b/sdk/ai/ai-projects/samples-dev/data/localFile.txt new file mode 100644 index 000000000000..8ab686eafeb1 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/data/localFile.txt @@ -0,0 +1 @@ +Hello, World! diff --git a/sdk/ai/ai-projects/samples-dev/data/nifty500QuarterlyResults.csv b/sdk/ai/ai-projects/samples-dev/data/nifty500QuarterlyResults.csv new file mode 100644 index 000000000000..e02068e09042 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/data/nifty500QuarterlyResults.csv @@ -0,0 +1,502 @@ +name,NSE_code,BSE_code,sector,industry,revenue,operating_expenses,operating_profit,operating_profit_margin,depreciation,interest,profit_before_tax,tax,net_profit,EPS,profit_TTM,EPS_TTM +3M India Ltd.,3MINDIA,523395,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,"1,057",847.4,192.1,18.48%,12.9,0.7,195.9,49.8,146.1,129.7,535.9,475.7 +ACC Ltd.,ACC,500410,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"4,644.8","3,885.4",549.3,12.39%,212.8,28.9,517.7,131.5,387.9,20.7,"1,202.7",64 +AIA Engineering Ltd.,AIAENG,532683,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,"1,357.1",912.7,382.1,29.51%,24.5,7.4,412.5,88.4,323.1,34.3,"1,216.1",128.9 +APL Apollo Tubes Ltd.,APLAPOLLO,533758,METALS & MINING,IRON & STEEL PRODUCTS,"4,65","4,305.4",325,7.02%,41.3,26.6,276.7,73.8,202.9,7.3,767.5,27.7 +Au Small Finance Bank Ltd.,AUBANK,540611,BANKING AND FINANCE,BANKS,"2,956.5","1,026.7",647.7,25.59%,0,"1,282.1",533.4,131.5,401.8,6,"1,606.2",24 +Adani Ports & Special Economic Zone Ltd.,ADANIPORTS,532921,TRANSPORTATION,MARINE PORT & SERVICES,"6,951.9","2,982.4","3,664",55.13%,974.5,520.1,"2,474.9",759,"1,747.8",8.1,"6,337",29.3 +Adani Energy Solutions Ltd.,ADANIENSOL,ASM,UTILITIES,ELECTRIC UTILITIES,"3,766.5","2,169.3","1,504.6",40.95%,432.1,640.8,369.9,84.9,275.9,2.5,"1,315.1",11.8 +Aditya Birla Fashion and Retail Ltd.,ABFRL,535755,RETAILING,DEPARTMENT STORES,"3,272.2","2,903.6",322.9,10.01%,388.8,208.4,-228.6,-28.2,-179.2,-1.9,-491.7,-5.2 +Aegis Logistics Ltd.,AEGISCHEM,500003,OIL & GAS,OIL MARKETING & DISTRIBUTION,"1,279.3","1,026.5",208.3,16.87%,34.1,26.6,192,42,127,3.6,509,14.5 +Ajanta Pharma Ltd.,AJANTPHARM,532331,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,049.8",737.8,290.7,28.26%,33.7,2.3,275.9,80.6,195.3,15.5,660.2,52.3 +Alembic Pharmaceuticals Ltd.,APLLTD,533573,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,605.1","1,386.7",208.2,13.06%,67.6,15.7,135.1,-1.9,136.6,7,531.7,27 +Alkem Laboratories Ltd.,ALKEM,539523,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"3,503.4","2,693.4",746.7,21.71%,73.9,30.3,648,33.1,620.5,51.9,"1,432.9",119.9 +Amara Raja Energy & Mobility Ltd.,ARE&M,500008,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,988.6","2,556.9",402.5,13.60%,115.7,6.2,309.8,83.5,226.3,13.2,779.8,45.7 +Ambuja Cements Ltd.,AMBUJACEM,500425,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"7,9","6,122.1","1,301.8",17.54%,380.9,61.2,"1,335.7",352.5,793,4,"2,777.9",14 +Apollo Hospitals Enterprise Ltd.,APOLLOHOSP,508869,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"4,869.1","4,219.4",627.5,12.95%,163.4,111.3,376.9,130.2,232.9,16.2,697.5,48.5 +Apollo Tyres Ltd.,APOLLOTYRE,500877,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"6,304.9","5,119.8","1,159.8",18.47%,360.3,132.8,679.9,205.8,474.3,7.5,"1,590.7",25 +Ashok Leyland Ltd.,ASHOKLEY,500477,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,"11,463","9,558.6","1,870.4",16.37%,226.6,715.1,924.4,358,526,1.8,"2,141.5",7.3 +Asian Paints Ltd.,ASIANPAINT,500820,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"8,643.8","6,762.3","1,716.2",20.24%,208.7,50.9,"1,621.8",418.6,"1,205.4",12.6,"5,062.6",52.8 +Astral Ltd.,ASTRAL,532830,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,"1,376.4","1,142.9",220.1,16.15%,48.7,8,176.8,45.1,131.2,4.9,549.7,20.4 +Atul Ltd.,ATUL,500027,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,215.8","1,038.5",155.2,13.00%,54,1.9,121.5,32.5,90.3,30.6,392.3,132.9 +Aurobindo Pharma Ltd.,AUROPHARMA,524804,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"7,406.4","5,846","1,373.4",19.02%,417.5,68.2,"1,074.7",323.7,757.2,12.8,"2,325.5",39.7 +Avanti Feeds Ltd.,AVANTIFEED,512573,FOOD BEVERAGES & TOBACCO,OTHER FOOD PRODUCTS,"1,312","1,184.5",94,7.35%,14.3,0.2,113,30.5,74.2,5.5,336.4,24.7 +Avenue Supermarts Ltd.,DMART,540376,RETAILING,DEPARTMENT STORES,"12,661.3","11,619.4","1,005",7.96%,174.4,15.6,851.9,228.6,623.6,9.6,"2,332.1",35.8 +Axis Bank Ltd.,AXISBANK,532215,BANKING AND FINANCE,BANKS,"33,122.2","9,207.3","9,166",33.43%,0,"14,749","8,313.8","2,096.1","6,204.1",20.1,"13,121",42.6 +Bajaj Auto Ltd.,BAJAJ-AUTO,532977,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"11,206.8","8,708.1","2,130.1",19.65%,91.8,6.5,"2,400.4",564,"2,02",71.4,"6,841.6",241.8 +Bajaj Finance Ltd.,BAJFINANCE,500034,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"13,381.8","2,851.5","9,449.7",70.63%,158.5,"4,537.1","4,757.6","1,207","3,550.8",58.7,"13,118.5",216.7 +Bajaj Finserv Ltd.,BAJAJFINSV,532978,DIVERSIFIED,HOLDING COMPANIES,"26,022.7","14,992.2","9,949.9",38.24%,208.8,"4,449.1","5,292","1,536.5","1,929",12.1,"7,422.6",46.6 +Bajaj Holdings & Investment Ltd.,BAJAJHLDNG,500490,DIVERSIFIED,HOLDING COMPANIES,240.1,33.5,191.2,85.08%,8.4,0.2,197.9,73.9,"1,491.2",134,"5,545.1",498.3 +Balkrishna Industries Ltd.,BALKRISIND,502355,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"2,360.3","1,720.5",532.7,23.64%,160.4,23.9,455.5,108.1,347.4,18,"1,047.5",54.2 +Balrampur Chini Mills Ltd.,BALRAMCHIN,500038,FOOD BEVERAGES & TOBACCO,SUGAR,"1,649","1,374.6",164.9,10.71%,41.2,17.2,215.9,56.6,166.3,8.2,540.5,26.8 +Bank of Baroda,BANKBARODA,532134,BANKING AND FINANCE,BANKS,"35,766","8,430.4","9,807.9",33.52%,0,"17,527.7","6,022.8","1,679.7","4,458.4",8.5,"18,602.9",35.9 +Bank of India,BANKINDIA,532149,BANKING AND FINANCE,BANKS,"16,779.4","3,704.9","3,818.8",25.35%,0,"9,255.7","2,977.4","1,488.6","1,498.5",3.6,"5,388.7",13.1 +Bata India Ltd.,BATAINDIA,500043,RETAILING,FOOTWEAR,834.6,637.5,181.7,22.18%,81.7,28.4,46.1,12.1,34,2.6,289.7,22.5 +Berger Paints (India) Ltd.,BERGEPAINT,509480,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"2,782.6","2,293.7",473.6,17.12%,82.9,21.1,385,96.7,291.6,2.5,"1,032.6",8.9 +Bharat Electronics Ltd.,BEL,500049,GENERAL INDUSTRIALS,DEFENCE,"4,146.1","2,994.9","1,014.2",25.30%,108.3,1.5,"1,041.5",260.7,789.4,1.1,"3,323",4.5 +Bharat Forge Ltd.,BHARATFORG,500493,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"3,826.7","3,152.8",621.4,16.47%,211.3,124.3,336.1,121.8,227.2,4.9,783.7,16.8 +Bharat Heavy Electricals Ltd.,BHEL,500103,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"5,305.4","5,513",-387.7,-7.56%,59.9,180.4,-447.9,-197.9,-238.1,-0.7,71.3,0.2 +Bharat Petroleum Corporation Ltd.,BPCL,500547,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"103,72","90,103.9","12,940.5",12.56%,"1,605.3",973.2,"10,755.7","2,812.2","8,243.5",38.7,"27,505.3",129.2 +Bharti Airtel Ltd.,BHARTIARTL,532454,TELECOM SERVICES,TELECOM SERVICES,"37,374.2","17,530.1","19,513.7",52.68%,"9,734.3","5,185.8","3,353.7","1,846.5","1,340.7",2.4,"7,547",13.2 +Indus Towers Ltd.,INDUSTOWER,534816,TELECOM SERVICES,OTHER TELECOM SERVICES,"7,229.7","3,498.8","3,633.7",50.95%,"1,525.6",458.6,"1,746.7",452,"1,294.7",4.8,"3,333.5",12.4 +Biocon Ltd.,BIOCON,532523,PHARMACEUTICALS & BIOTECHNOLOGY,BIOTECHNOLOGY,"3,620.2","2,720.7",741.6,21.42%,389.3,247.7,238.5,41.6,125.6,1.1,498.4,4.2 +Birla Corporation Ltd.,BIRLACORPN,500335,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,313.2","1,997",288.9,12.64%,143.5,95.4,77.1,18.8,58.4,7.6,153.1,19.9 +Blue Dart Express Ltd.,BLUEDART,526612,TRANSPORTATION,TRANSPORTATION - LOGISTICS,"1,329.7","1,101.8",222.7,16.82%,110.6,19.5,97.9,24.8,73.1,30.8,292.4,123.2 +Blue Star Ltd.,BLUESTARCO,500067,CONSUMER DURABLES,CONSUMER ELECTRONICS,"1,903.4","1,767.7",122.7,6.49%,23,17.6,95,24.3,70.7,3.6,437.7,21.3 +Bombay Burmah Trading Corporation Ltd.,BBTC,501425,FOOD BEVERAGES & TOBACCO,TEA & COFFEE,"4,643.5","3,664.7",859.2,18.99%,74.7,154.6,697.1,212.6,122,17.5,"-1,499.5",-214.8 +Bosch Ltd.,BOSCHLTD,500530,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"4,284.3","3,638.8",491.3,11.90%,101.3,12.2,"1,317",318.1,999.8,339,"2,126.9",721 +Brigade Enterprises Ltd.,BRIGADE,532929,REALTY,REALTY,"1,407.9","1,041.8",324.8,23.77%,75.7,110,180.3,67.8,133.5,5.8,298.2,12.9 +Britannia Industries Ltd.,BRITANNIA,500825,FMCG,PACKAGED FOODS,"4,485.2","3,560.5",872.4,19.68%,71.7,53.4,799.7,212.1,587.6,24.4,"2,536.2",105.3 +CCL Products India Ltd.,CCL,519600,FOOD BEVERAGES & TOBACCO,TEA & COFFEE,608.3,497.7,109.9,18.09%,22.6,18.4,69.7,8.8,60.9,4.6,279.9,21 +Crisil Ltd.,CRISIL,500092,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,771.8,544.2,191.7,26.05%,26.5,0.8,200.3,48.3,152,20.8,606.3,82.9 +Zydus Lifesciences Ltd.,ZYDUSLIFE,532321,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"4,422.8","3,222.7","1,146.1",26.23%,184.2,8.7,"1,007.2",226.4,800.7,7.9,"2,807.1",27.7 +Can Fin Homes Ltd.,CANFINHOME,511196,BANKING AND FINANCE,HOUSING FINANCE,871,49.7,749.2,86.01%,2.8,548.4,198,39.9,158.1,11.9,658.8,49.5 +Canara Bank,CANBK,532483,BANKING AND FINANCE,BANKS,"33,891.2","8,250.3","7,706.6",28.24%,0,"17,934.3","5,098","1,420.6","3,86",20.9,"13,968.4",77 +Carborundum Universal Ltd.,CARBORUNIV,513375,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"1,166",978.8,167.5,14.61%,45.9,4.9,136.4,43.7,101.9,5.4,461.3,24.3 +Castrol India Ltd.,CASTROLIND,500870,OIL & GAS,OIL MARKETING & DISTRIBUTION,"1,203.2",914.4,268.6,22.70%,22.9,2.4,263.5,69.1,194.4,2,815.5,8.2 +Ceat Ltd.,CEATLTD,500878,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"3,063.8","2,597.2",456.1,14.94%,124.5,71.7,270.4,68.3,208,51.4,521.7,129 +Central Bank of India,CENTRALBK,532885,BANKING AND FINANCE,BANKS,"8,438.5","2,565.4","1,535.4",20.81%,0,"4,337.7",567.2,-41.5,622,0.7,"2,181.4",2.5 +Century Plyboards (India) Ltd.,CENTURYPLY,532548,FOREST MATERIALS,FOREST PRODUCTS,"1,011.4",852.5,144.3,14.47%,23.4,6.1,129.4,32.2,96.9,4.4,380.7,17.1 +Cera Sanitaryware Ltd.,CERA,532443,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,476.2,387.2,76.5,16.49%,8.9,1.4,77.2,19.8,56.9,43.8,232.4,178.7 +Chambal Fertilisers & Chemicals Ltd.,CHAMBLFERT,500085,FERTILIZERS,FERTILIZERS,"5,467.3","4,770.5",615,11.42%,78.4,45.8,572.6,200.2,381,9.2,"1,137.7",27.3 +Cholamandalam Investment & Finance Company Ltd.,CHOLAFIN,511243,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"4,695.2",987.6,"3,235.1",69.99%,38.5,"2,204.2","1,065",288.8,772.9,9.4,"3,022.8",36.7 +Cipla Ltd.,CIPLA,500087,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"6,854.5","4,944.4","1,733.8",25.96%,290,25.8,"1,594.2",438.4,"1,130.9",14,"3,449.1",42.7 +City Union Bank Ltd.,CUB,532210,BANKING AND FINANCE,BANKS,"1,486.1",333.9,386.6,29.65%,0,765.6,330.6,50,280.6,3.8,943.8,12.7 +Coal India Ltd.,COALINDIA,533278,METALS & MINING,COAL,"34,760.3","24,639.4","8,137",24.83%,"1,178.2",182.5,"8,760.2","2,036.5","6,799.8",11,"28,059.6",45.5 +Colgate-Palmolive (India) Ltd.,COLPAL,500830,FMCG,PERSONAL PRODUCTS,"1,492.1",989,482.1,32.77%,44.3,1.1,457.8,117.8,340.1,12.5,"1,173.2",43.1 +Container Corporation of India Ltd.,CONCOR,531344,COMMERCIAL SERVICES & SUPPLIES,WAREHOUSING AND LOGISTICS,"2,299.8","1,648.4",546.5,24.90%,153.1,16.5,481.8,119,367.4,6,"1,186.2",19.5 +Coromandel International Ltd.,COROMANDEL,506395,FERTILIZERS,FERTILIZERS,"7,032.9","5,929.4","1,058.7",15.15%,54,46.2,"1,003.3",245,756.9,25.7,"2,024.2",68.8 +Crompton Greaves Consumer Electricals Ltd.,CROMPTON,539876,CONSUMER DURABLES,HOUSEHOLD APPLIANCES,"1,797.2","1,607.8",174.5,9.79%,32.1,21.5,135.8,34.9,97.2,1.5,432,6.7 +Cummins India Ltd.,CUMMINSIND,500480,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,"2,011.3","1,575.4",346.2,18.02%,38.3,6.8,390.9,99.6,329.1,11.9,"1,445.5",52.1 +Cyient Ltd.,CYIENT,532175,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,792","1,452.7",325.8,18.32%,65.8,27,240.3,56.7,178.3,16.3,665.6,60.1 +DCM Shriram Ltd.,DCMSHRIRAM,523367,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"2,73","2,593.9",114.1,4.21%,74,14.7,47.5,15.2,32.2,2.1,617.6,39.4 +DLF Ltd.,DLF,532868,REALTY,REALTY,"1,476.4",885.3,462.4,34.31%,37,90.2,464,112.2,622.8,2.5,"2,239",9 +Dabur India Ltd.,DABUR,500096,FMCG,PERSONAL PRODUCTS,"3,320.2","2,543",660.9,20.63%,98.3,28.1,650.8,144.3,515,2.9,"1,755.7",9.9 +Delta Corp Ltd.,DELTACORP,532848,COMMERCIAL SERVICES & SUPPLIES,MISC. COMMERCIAL SERVICES,282.6,170.5,100.1,36.99%,16.9,2.7,92.4,23,69.4,2.6,273.3,10.2 +Divi's Laboratories Ltd.,DIVISLAB,532488,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,995","1,43",479,25.09%,95,1,469,121,348,13.1,"1,331.8",50.3 +Dr. Lal Pathlabs Ltd.,LALPATHLAB,539524,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE SERVICES,619.4,423.5,177.8,29.57%,35.9,7.8,152.2,41.5,109.3,13.2,301.4,36.1 +Dr. Reddy's Laboratories Ltd.,DRREDDY,500124,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"7,217.6","4,888.8","2,008.3",29.09%,375.5,35.3,"1,912.5",434.5,"1,482.2",89.1,"5,091.2",305.2 +EID Parry (India) Ltd.,EIDPARRY,500125,FOOD BEVERAGES & TOBACCO,OTHER FOOD PRODUCTS,"9,210.3","8,002","1,057.5",11.67%,101.2,74.2,"1,032.8",246.8,452.3,25.5,991,55.8 +Eicher Motors Ltd.,EICHERMOT,505200,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"4,388.3","3,027.4","1,087.2",26.42%,142.5,12.7,"1,205.7",291.1,"1,016.2",37.1,"3,581",130.8 +Emami Ltd.,EMAMILTD,531162,FMCG,PERSONAL PRODUCTS,876,631.2,233.7,27.02%,46.1,2.2,196.4,15.8,178.5,4.1,697.8,16 +Endurance Technologies Ltd.,ENDURANCE,540153,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,560.5","2,226.7",318.3,12.51%,118.4,9.8,205.6,51.1,154.6,11,562.8,40 +Engineers India Ltd.,ENGINERSIN,532178,COMMERCIAL SERVICES & SUPPLIES,CONSULTING SERVICES,833.6,691.3,98.5,12.47%,8.3,0.4,133.6,32.2,127.5,2.3,472.7,8.4 +Escorts Kubota Ltd.,ESCORTS,500495,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,"2,154.4","1,798.6",260.7,12.66%,40.8,3.1,311.9,79.7,223.3,20.6,910.5,82.4 +Exide Industries Ltd.,EXIDEIND,500086,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"4,408.9","3,872.4",499.1,11.42%,141.5,29.7,365.3,95.2,269.4,3.2,872.7,10.3 +Federal Bank Ltd.,FEDERALBNK,500469,BANKING AND FINANCE,BANKS,"6,548.2","1,603.8","1,400.3",24.18%,0,"3,544.1","1,342.7",342.6,994.1,4.3,"3,671.4",15.6 +Finolex Cables Ltd.,FINCABLES,500144,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,229.3","1,041.3",146.1,12.30%,10.8,0.4,176.7,52.3,154.2,10.1,643.9,42.1 +Finolex Industries Ltd.,FINPIPE,500940,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,944.5,780.2,103,11.66%,27.4,12.5,124.5,35.4,98,1.6,459.3,7.4 +Firstsource Solutions Ltd.,FSL,532809,SOFTWARE & SERVICES,BPO/KPO,"1,556.9","1,311.2",228.8,14.86%,65.4,26.1,154.3,27.8,126.5,1.9,551.7,7.9 +GAIL (India) Ltd.,GAIL,532155,UTILITIES,UTILITIES,"33,191","29,405.5","3,580.2",10.85%,837.3,199.6,"2,748.7",696.3,"2,444.1",3.7,"5,283.8",8 +GlaxoSmithKline Pharmaceuticals Ltd.,GLAXO,500660,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,985.2,667.5,289.5,30.25%,18.1,0.4,299.2,81.7,217.5,12.8,647.8,38.2 +Glenmark Pharmaceuticals Ltd.,GLENMARK,532296,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"3,209.1","2,745.1",462.3,14.41%,141.5,121.5,-124.4,55.9,-81.9,-2.9,-196.3,-7 +Godrej Consumer Products Ltd.,GODREJCP,532424,FMCG,PERSONAL PRODUCTS,"3,667.9","2,897.8",704.2,19.55%,60.9,77.3,619.4,186.6,432.8,4.2,"1,750.1",17.1 +Godrej Industries Ltd.,GODREJIND,500164,DIVERSIFIED,DIVERSIFIED,"4,256.9","3,672.1",265.5,6.74%,89.3,333.1,162.4,75.9,87.3,2.6,880,26.1 +Godrej Properties Ltd.,GODREJPROP,533150,REALTY,REALTY,605.1,404.7,-61.7,-17.98%,7.4,48,145.1,38.8,66.8,2.4,662.6,23.8 +Granules India Ltd.,GRANULES,532482,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,191",976.5,213,17.90%,52.5,26,136,33.9,102.1,4.2,393.9,16.3 +Great Eastern Shipping Company Ltd.,GESHIP,500620,TRANSPORTATION,SHIPPING,"1,461.5",585.6,643.4,52.35%,186.7,77.1,611.9,17.3,594.7,41.6,"2,520.1",176.5 +Gujarat Alkalies & Chemicals Ltd.,GUJALKALI,530001,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"1,042.3",926.1,45.2,4.65%,95.2,10.8,10.2,-0.1,-18.4,-2.5,82.7,11.3 +Gujarat Gas Ltd.,GUJGASLTD,539336,UTILITIES,UTILITIES,"4,019.3","3,494.5",496.6,12.44%,117.9,7.8,399.1,102.9,296.2,4.3,"1,254.3",18.2 +Gujarat Narmada Valley Fertilizers & Chemicals Ltd.,GNFC,500670,FERTILIZERS,FERTILIZERS,"2,232","1,911",169,8.12%,78,1,242,64,182,11.7,932,60.1 +Gujarat Pipavav Port Ltd.,GPPL,533248,TRANSPORTATION,MARINE PORT & SERVICES,270.4,102,150.6,59.64%,28.8,2.2,141.1,53.4,92.3,1.9,341.8,7.1 +Gujarat State Fertilizer & Chemicals Ltd.,GSFC,500690,FERTILIZERS,FERTILIZERS,"3,313.2","2,881.4",237.3,7.61%,45.7,1.6,387,78.1,308.9,7.8,"1,056.2",26.5 +Gujarat State Petronet Ltd.,GSPL,532702,UTILITIES,UTILITIES,"4,455.9","3,497.2",913.7,20.72%,165,14.5,779.2,198.7,454.6,8.1,"1,522",27 +HCL Technologies Ltd.,HCLTECH,532281,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"27,037","20,743","5,929",22.23%,"1,01",156,"5,128","1,295","3,832",14.2,"15,445",56.9 +HDFC Bank Ltd.,HDFCBANK,500180,BANKING AND FINANCE,BANKS,"107,566.6","42,037.6","24,279.1",32.36%,0,"41,249.9","20,967.4","3,655","16,811.4",22.2,"54,474.6",71.8 +Havells India Ltd.,HAVELLS,517354,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"3,952.8","3,527",373.4,9.57%,81.2,9.3,335.3,86.2,249.1,4,"1,177.7",18.8 +Hero MotoCorp Ltd.,HEROMOTOCO,500182,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"9,741.2","8,173.5","1,359.5",14.26%,187.1,25,"1,355.6",353.1,"1,006.3",50.3,"3,247.6",162.5 +HFCL Ltd.,HFCL,500183,TELECOMMUNICATIONS EQUIPMENT,TELECOM CABLES,"1,128.7",978.9,132.6,11.93%,21.4,34.8,93.5,24,69.4,0.5,305.5,2.1 +Hindalco Industries Ltd.,HINDALCO,500440,METALS & MINING,ALUMINIUM AND ALUMINIUM PRODUCTS,"54,632","48,557","5,612",10.36%,"1,843","1,034","3,231","1,035","2,196",9.9,"8,423",37.9 +Hindustan Copper Ltd.,HINDCOPPER,513599,METALS & MINING,COPPER,392.6,260.2,121.2,31.77%,45.6,4.1,82.6,21.9,60.7,0.6,320.5,3.3 +Hindustan Petroleum Corporation Ltd.,HINDPETRO,500104,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"96,093.4","87,512","8,24",8.61%,"1,247.3",590,"6,744.1","1,616","5,827",41.1,"16,645",117.3 +Hindustan Unilever Ltd.,HINDUNILVR,500696,FMCG,PERSONAL PRODUCTS,"15,806","11,826","3,797",24.30%,297,88,"3,59",931,"2,656",11.3,"10,284",43.8 +Hindustan Zinc Ltd.,HINDZINC,500188,METALS & MINING,ZINC,"7,014","3,652","3,139",46.22%,825,232,"2,305",576,"1,729",4.1,"8,432",20 +Housing and Urban Development Corporation Ltd.,HUDCO,540530,BANKING AND FINANCE,HOUSING FINANCE,"1,880.8",82.7,"1,809.6",97.04%,2.4,"1,216.8",606.4,154.7,451.6,2.3,"1,790.7",8.9 +ITC Ltd.,ITC,500875,FOOD BEVERAGES & TOBACCO,CIGARETTES-TOBACCO PRODUCTS,"18,439.3","11,320.2","6,454.2",36.31%,453,9.9,"6,656.2","1,700.3","4,898.1",3.9,"20,185.1",16.2 +ICICI Bank Ltd.,ICICIBANK,532174,BANKING AND FINANCE,BANKS,"57,292.3","23,911","15,473.2",39.74%,0,"17,908","14,824.2","3,808.8","11,805.6",15.6,"41,086.8",58.7 +ICICI Prudential Life Insurance Company Ltd.,ICICIPRULI,540133,BANKING AND FINANCE,LIFE INSURANCE,"17,958.1","17,612.3",-229.6,-1.32%,0,0,340.2,32.5,243.9,1.7,906.9,6.3 +IDBI Bank Ltd.,IDBI,500116,BANKING AND FINANCE,BANKS,"7,063.7","1,922.3","2,175.3",36.02%,0,"2,966.1","2,396.9","1,003.7","1,385.4",1.3,"4,776.3",4.4 +IDFC First Bank Ltd.,IDFCFIRSTB,539437,BANKING AND FINANCE,BANKS,"8,765.8","3,849","1,511.2",20.54%,0,"3,405.6",982.8,236,746.9,1.1,"2,911.1",4.3 +IDFC Ltd.,IDFC,532659,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),36.7,6,30.6,83.56%,0,0,30.6,6.6,223.5,1.4,"4,147.1",25.9 +IRB Infrastructure Developers Ltd.,IRB,532947,CEMENT AND CONSTRUCTION,ROADS & HIGHWAYS,"1,874.5",950.4,794.6,45.54%,232.7,434.6,256.9,85.8,95.7,0.2,501,0.8 +ITI Ltd.,ITI,523610,TELECOMMUNICATIONS EQUIPMENT,TELECOM EQUIPMENT,256.1,299.3,-52.8,-21.42%,13.3,69.3,-125.8,0,-126,-1.3,-388.4,-4 +Vodafone Idea Ltd.,IDEA,532822,TELECOM SERVICES,TELECOM SERVICES,"10,750.8","6,433.5","4,282.8",39.97%,"5,667.3","6,569","-7,919",817.7,"-8,737.9",-1.8,"-30,986.8",-6.4 +India Cements Ltd.,INDIACEM,530005,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"1,272.4","1,26",4.4,0.35%,55,60.4,-103,-17.4,-80.1,-2.6,-261.1,-8.4 +Indiabulls Housing Finance Ltd.,IBULHSGFIN,535789,BANKING AND FINANCE,HOUSING FINANCE,"2,242.3",190.6,"1,779.2",79.88%,22.9,"1,349.8",421.6,123.6,298,6.5,"1,146",24.3 +Indian Bank,INDIANB,532814,BANKING AND FINANCE,BANKS,"15,929.4","3,599.1","4,327.7",31.44%,0,"8,002.6","2,776.7",768.6,"2,068.5",16.6,"6,893.3",55.3 +Indian Hotels Company Ltd.,INDHOTEL,500850,HOTELS RESTAURANTS & TOURISM,HOTELS,"1,480.9","1,078.4",354.8,24.75%,111.2,59,232.2,72.3,166.9,1.2,"1,100.3",7.7 +Indian Oil Corporation Ltd.,IOC,530965,OIL & GAS,OIL MARKETING & DISTRIBUTION,"179,752.1","156,013.1","23,328.4",13.01%,"3,609.6","2,135","18,090.2","4,699.7","13,114.3",9.5,"38,614.3",27.3 +Indian Overseas Bank,IOB,532388,BANKING AND FINANCE,BANKS,"6,941.5","1,785.1","1,679.8",28.84%,0,"3,476.6",635.5,8.3,627.2,0.3,"2,341.9",1.2 +Indraprastha Gas Ltd.,IGL,532514,UTILITIES,UTILITIES,"3,520.2","2,801.6",656.9,18.99%,102.2,2.5,613.9,151.4,552.7,7.9,"1,806.2",25.8 +IndusInd Bank Ltd.,INDUSINDBK,532187,BANKING AND FINANCE,BANKS,"13,529.7","3,449.9","3,908.7",34.75%,0,"6,171.1","2,934.9",732.9,"2,202.2",28.4,"8,333.7",107.2 +Info Edge (India) Ltd.,NAUKRI,532777,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,792,421.2,204.7,32.70%,25.9,8.2,382.8,68.7,205.1,15.9,-25.6,-2 +InterGlobe Aviation Ltd.,INDIGO,539448,TRANSPORTATION,AIRLINES,"15,502.9","12,743.6","2,200.3",14.72%,"1,549","1,021.3",189.1,0.2,188.9,4.9,"5,621.3",145.7 +Ipca Laboratories Ltd.,IPCALAB,524494,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"2,072.5","1,712.7",321.3,15.80%,90.3,44.1,225.4,87.9,145.1,5.7,492.2,19.4 +J B Chemicals & Pharmaceuticals Ltd.,JBCHEPHARM,506943,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,889.4,638.2,243.5,27.62%,32.2,10.4,208.7,58.1,150.6,9.7,486.6,31.4 +JK Cement Ltd.,JKCEMENT,532644,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,782.1","2,285.8",467,16.96%,137.1,115,244.2,65.7,178.1,23.1,444,57.5 +JK Lakshmi Cement Ltd.,JKLAKSHMI,500380,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"1,588.5","1,357.3",217.3,13.80%,56.6,33.6,141,45.1,92.7,7.9,357.6,30.4 +JM Financial Ltd.,JMFINANCIL,523405,DIVERSIFIED,HOLDING COMPANIES,"1,214",407.9,662.6,55.34%,13.2,388.1,277.9,72.4,194.9,2,608.1,6.4 +JSW Energy Ltd.,JSWENERGY,533148,UTILITIES,ELECTRIC UTILITIES,"3,387.4","1,379","1,880.4",57.69%,408.7,513.7,"1,085.9",235.1,850.2,5.2,"1,591.7",9.7 +JSW Steel Ltd.,JSWSTEEL,500228,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"44,821","36,698","7,886",17.69%,"2,019","2,084","4,609","1,812","2,76",11.4,"9,252",38.1 +Jindal Stainless Ltd.,JSL,532508,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"9,829","8,566.5","1,230.6",12.56%,221.9,155.6,985.7,229.1,774.3,9.4,"2,600.2",31.6 +Jindal Steel & Power Ltd.,JINDALSTEL,532286,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"12,282","9,964.5","2,285.7",18.66%,603.7,329.4,"1,384.5",-5.8,"1,387.8",13.8,"4,056",40.4 +Jubilant Foodworks Ltd.,JUBLFOOD,533155,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,"1,375.7","1,091.4",277.2,20.25%,141.9,56.8,85.5,23.3,97.2,1.5,235,3.6 +Just Dial Ltd.,JUSTDIAL,535648,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,318.5,211.8,48.8,18.71%,12.2,2.4,92.1,20.3,71.8,8.4,314.1,36.9 +Jyothy Labs Ltd.,JYOTHYLAB,532926,FMCG,PERSONAL PRODUCTS,745.6,597,135.4,18.48%,12.3,1.2,135.1,31.1,104.2,2.8,326.9,8.9 +KRBL Ltd.,KRBL,530813,FMCG,PACKAGED FOODS,"1,246.5","1,018.9",194.5,16.03%,19.9,0.8,206.8,53.6,153.3,6.5,671.4,29.3 +Kajaria Ceramics Ltd.,KAJARIACER,500233,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"1,129.9",941.9,179.7,16.02%,36.1,4.3,147.7,36.6,108,6.8,397.8,25 +Kalpataru Projects International Ltd.,KPIL,522287,UTILITIES,ELECTRIC UTILITIES,"4,53","4,148",370,8.19%,113,137,132,42,89,5.5,478,29.9 +Kansai Nerolac Paints Ltd.,KANSAINER,500165,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"1,978.6","1,683.3",273.2,13.97%,47.4,7.6,240.3,64.8,177.2,2.2,"1,118.8",13.8 +Karur Vysya Bank Ltd.,KARURVYSYA,590003,BANKING AND FINANCE,BANKS,"2,336",616.4,637.9,31.94%,0,"1,081.7",511.5,133.1,378.4,4.7,"1,364.2",17 +KEC International Ltd.,KEC,532714,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"4,514.9","4,224.7",274.3,6.10%,46.5,177.8,65.8,9.9,55.8,2.2,187.9,7.3 +Kotak Mahindra Bank Ltd.,KOTAKBANK,500247,BANKING AND FINANCE,BANKS,"21,559.5","9,681","6,343",46.24%,0,"5,535.5","5,888.3","1,465.5","4,461",22.4,"17,172.7",86.4 +L&T Finance Holdings Ltd.,L&TFH,533519,DIVERSIFIED,HOLDING COMPANIES,"3,482.1",935.3,"1,882.4",58.57%,28.3,"1,324.9",797.4,203.2,595.1,2.4,"2,080.8",8.4 +L&T Technology Services Ltd.,LTTS,540115,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"2,427.7","1,910.9",475.6,19.93%,68.1,12.6,436.1,120.2,315.4,29.8,"1,239.7",117.5 +LIC Housing Finance Ltd.,LICHSGFIN,500253,BANKING AND FINANCE,HOUSING FINANCE,"6,765.9",250.6,"6,095.7",90.10%,13.2,"4,599.9","1,483",291.2,"1,193.5",21.7,"4,164.5",75.7 +Lakshmi Machine Works Ltd.,LAXMIMACH,500252,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,"1,355.5","1,184.5",136,10.30%,23.6,0,147.4,32.3,115.1,107.8,416,389.5 +Laurus Labs Ltd.,LAURUSLABS,540222,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,226.2","1,036.6",187.9,15.34%,93.4,42.4,53.9,14.6,37,0.7,367.8,6.8 +Lupin Ltd.,LUPIN,500257,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"5,079","4,120.8",917.8,18.21%,247.8,80.6,629.7,134.3,489.5,10.8,"1,331.2",29.2 +MMTC Ltd.,MMTC,513377,COMMERCIAL SERVICES & SUPPLIES,COMMODITY TRADING & DISTRIBUTION,-167.2,-180.1,-30.4,14.42%,0.8,1.1,12.1,1.5,52,0.3,174.1,1.2 +MRF Ltd.,MRF,500290,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"6,287.8","5,060.2","1,156.9",18.61%,351.5,85.5,790.6,203.9,586.7,1383.3,"1,690.9",3988 +Mahanagar Gas Ltd.,MGL,539957,UTILITIES,UTILITIES,"1,772.7","1,250.1",478.9,27.70%,65.8,2.5,454.3,115.8,338.5,34.3,"1,147.8",116.2 +Mahindra & Mahindra Financial Services Ltd.,M&MFIN,532720,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"3,863.5","1,077.5","2,109.3",55.03%,67.1,"1,703.4",369.1,96,281.1,2.3,"1,982.5",16 +Mahindra & Mahindra Ltd.,M&M,500520,AUTOMOBILES & AUTO COMPONENTS,CARS & UTILITY VEHICLES,"35,027.2","28,705.9","5,729.6",16.64%,"1,138.6","1,835.2","3,347.5","1,083.7","2,347.8",21.1,"11,169.4",100.2 +Mahindra Holidays & Resorts India Ltd.,MHRIL,533088,HOTELS RESTAURANTS & TOURISM,HOTELS,672.2,519.3,136,20.76%,83.8,33.3,35.8,14,21.3,1.1,66,3.3 +Manappuram Finance Ltd.,MANAPPURAM,531213,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"2,174",555.6,"1,481.3",68.68%,62.5,689.4,746.7,186.1,558.4,6.6,"1,859.8",22 +Mangalore Refinery And Petrochemicals Ltd.,MRPL,500109,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"22,904.7","20,705.6","2,138.2",9.36%,296,311.2,"1,592",546.2,"1,051.7",6,"3,784.9",21.6 +Marico Ltd.,MARICO,531642,FMCG,PERSONAL PRODUCTS,"2,514","1,979",497,20.07%,39,20,476,116,353,2.7,"1,41",10.9 +Maruti Suzuki India Ltd.,MARUTI,532500,AUTOMOBILES & AUTO COMPONENTS,CARS & UTILITY VEHICLES,"37,902.1","32,282.5","4,790.3",12.92%,794.4,35.1,"4,790.1","1,083.8","3,764.3",124.6,"11,351.8",375.9 +Max Financial Services Ltd.,MFSL,500271,BANKING AND FINANCE,LIFE INSURANCE,"10,189.1","10,024.6",143.9,1.42%,0.8,9.4,158.2,-12.1,147.9,4.3,506.4,14.7 +UNO Minda Ltd.,UNOMINDA,532539,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"3,630.2","3,219.8",401.6,11.09%,125.4,27.2,257.9,73.3,225,3.9,742.4,13 +Motilal Oswal Financial Services Ltd.,MOTILALOFS,532892,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,"1,650.7",724.1,904.5,55.18%,17.3,241.1,657.6,124.2,531.2,35.9,"1,449.3",97.8 +MphasiS Ltd.,MPHASIS,526299,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"3,325.5","2,680.9",595.6,18.18%,89,34,521.7,129.7,391.9,20.8,"1,605.6",85.1 +Muthoot Finance Ltd.,MUTHOOTFIN,533398,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"3,631.9",723.4,"2,801.6",77.69%,22.2,"1,335","1,470.2",374.9,"1,059.6",26.4,"3,982.9",99.2 +Natco Pharma Ltd.,NATCOPHARM,524816,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,060.8",573.4,458,44.41%,43.6,4.2,439.6,70.6,369,20.6,"1,127.4",63 +NBCC (India) Ltd.,NBCC,534309,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"2,129.1","1,957.7",95.5,4.65%,1.3,0,104.6,22.9,79.6,0.4,332.2,1.8 +NCC Ltd.,NCC,500294,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"4,746.4","4,415.9",303.7,6.44%,53.2,153.5,123.8,38.8,77.3,1.2,599.4,9.5 +NHPC Ltd.,NHPC,533098,UTILITIES,ELECTRIC UTILITIES,"3,113.8","1,173.9","1,757.4",59.95%,294.9,104.8,"1,618.3",-75,"1,545.8",1.5,"3,897.8",3.9 +Coforge Ltd.,COFORGE,532541,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"2,285.1","1,935.3",340.9,14.98%,77.2,31.9,240.7,52.8,187.9,29.6,696.2,113.2 +NLC India Ltd.,NLCINDIA,513683,UTILITIES,ELECTRIC UTILITIES,"3,234","2,143",834.6,28.03%,455.1,213.9,"1,700.6",614.7,"1,084.7",7.8,"1,912.3",13.8 +NTPC Ltd.,NTPC,532555,UTILITIES,ELECTRIC UTILITIES,"45,384.6","32,303.2","12,680.2",28.19%,"4,037.7","2,920.5","6,342.9","2,019.7","4,614.6",4.8,"19,125.2",19.7 +Narayana Hrudayalaya Ltd.,NH,539551,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"1,323.6",997.1,308.1,23.61%,55.3,22.9,248.4,21.7,226.6,11.2,737.5,36.1 +National Aluminium Company Ltd.,NATIONALUM,532234,METALS & MINING,ALUMINIUM AND ALUMINIUM PRODUCTS,"3,112","2,646.9",396.5,13.03%,186.2,4,275,68.7,187.3,1,"1,272.4",6.9 +Navin Fluorine International Ltd.,NAVINFLUOR,532504,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,494.9,373.4,98.3,20.84%,24.2,20,77.2,16.6,60.6,12.2,365,73.7 +Oberoi Realty Ltd.,OBEROIRLTY,533273,REALTY,REALTY,"1,243.8",579.2,638.2,52.42%,11.3,56.5,596.8,142.1,456.8,12.6,"1,961.3",53.9 +Oil And Natural Gas Corporation Ltd.,ONGC,500312,OIL & GAS,EXPLORATION & PRODUCTION,"149,388.5","118,618.4","28,255.3",19.24%,"6,698.1","2,603.3","21,564.9","5,633.6","13,734.1",10.9,"43,072.5",34.2 +Oil India Ltd.,OIL,533106,OIL & GAS,EXPLORATION & PRODUCTION,"9,200.1","5,293.3","3,523.2",39.96%,499,278.9,762,67.6,420.7,3.9,"5,874.5",54.2 +Oracle Financial Services Software Ltd.,OFSS,532466,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,509.6",886.4,558.1,38.64%,19,8,596.2,178.8,417.4,48.2,"1,835.1",211.9 +PI Industries Ltd.,PIIND,523642,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,"2,163.8","1,565.5",551.4,26.05%,80.3,7.8,510.2,31.7,480.5,31.7,"1,495.8",98.4 +PNB Housing Finance Ltd.,PNBHOUSING,540173,BANKING AND FINANCE,HOUSING FINANCE,"1,779.4",158.8,"1,574.1",88.54%,11.3,"1,057.3",507.1,124.1,383,14.8,"1,278.7",49.3 +PNC Infratech Ltd.,PNCINFRA,539150,CEMENT AND CONSTRUCTION,ROADS & HIGHWAYS,"1,932.4","1,511.6",399.8,20.92%,40.9,161.3,218.6,70.7,147.9,5.8,614.3,23.9 +PVR INOX Ltd.,PVRINOX,532689,RETAILING,SPECIALTY RETAIL,"2,023.7","1,293.1",706.8,35.34%,308.6,200.3,221.7,55.5,166.3,17,-232.5,-23.7 +Page Industries Ltd.,PAGEIND,532827,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,"1,126.8",891.6,233.5,20.76%,24.6,11.2,199.4,49.1,150.3,134.7,510.7,457.9 +Persistent Systems Ltd.,PERSISTENT,533179,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"2,449","2,006.5",405.2,16.80%,74.4,12.3,355.8,92.5,263.3,35,981.5,127.6 +Petronet LNG Ltd.,PETRONET,532522,OIL & GAS,OIL MARKETING & DISTRIBUTION,"12,686.2","11,317.9","1,214.7",9.69%,194.8,74.7,"1,098.8",283.9,855.7,5.7,"3,490.3",23.3 +Pfizer Ltd.,PFIZER,500680,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,611.3,392.6,182.6,31.75%,15.4,2.7,200.5,51.6,149,32.6,522.8,114.3 +Phoenix Mills Ltd.,PHOENIXLTD,503100,REALTY,REALTY,906.6,361.2,506,57.82%,65.9,96.5,375.2,71.4,252.6,14.2,923.6,51.7 +Pidilite Industries Ltd.,PIDILITIND,500331,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"3,107.6","2,396.3",679.7,22.10%,75.2,13.1,623,163.1,450.1,8.8,"1,505.5",29.6 +Power Finance Corporation Ltd.,PFC,532810,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"22,403.7",315.4,"22,941.9",102.46%,12.7,"14,313.1","8,628.8","2,000.6","4,833.1",14.7,"17,946.4",54.4 +Power Grid Corporation of India Ltd.,POWERGRID,532898,UTILITIES,ELECTRIC UTILITIES,"11,530.4","1,358.7","9,908.4",87.94%,"3,277","2,341.3","4,393.4",573.7,"3,781.4",4.1,"15,344.4",16.5 +Prestige Estates Projects Ltd.,PRESTIGE,ASM,REALTY,REALTY,"3,256","1,643.9",592.5,26.49%,174.1,263.9,"1,174.1",256.4,850.9,21.2,"1,714",42.8 +Prism Johnson Ltd.,PRSMJOHNSN,500338,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"1,846","1,745.4",92.4,5.03%,95.2,43.5,210,30.4,182.7,3.6,154.2,3.1 +Procter & Gamble Hygiene & Healthcare Ltd.,PGHH,500459,FMCG,PERSONAL PRODUCTS,"1,154.1",853.5,284.9,25.03%,14.3,1.9,284.5,73.8,210.7,64.9,734.4,226.3 +Punjab National Bank,PNB,532461,BANKING AND FINANCE,BANKS,"29,857","6,798.1","6,239.1",23.23%,0,"16,819.8","2,778.3","1,013.8","1,990.2",1.8,"5,904.8",5.4 +Quess Corp Ltd.,QUESS,539978,SOFTWARE & SERVICES,BPO/KPO,"4,763.5","4,584.8",163.6,3.44%,69.7,28.1,79.3,8.3,71.9,4.8,240.9,16.2 +RBL Bank Ltd.,RBLBANK,540065,BANKING AND FINANCE,BANKS,"3,720.6","1,422.6",765.4,25.45%,0,"1,532.6",125,-206.1,331.1,5.5,"1,173.9",19.5 +Radico Khaitan Ltd.,RADICO,532497,FOOD BEVERAGES & TOBACCO,BREWERIES & DISTILLERIES,925.7,803.8,121.2,13.10%,26.1,12.5,83.3,21.4,64.8,4.8,237,17.7 +Rain Industries Ltd.,RAIN,500339,CHEMICALS & PETROCHEMICALS,PETROCHEMICALS,"4,208.9","3,794.3",366,8.80%,192.5,241.7,-19.5,46.2,-90.2,-2.7,270.4,8 +Rajesh Exports Ltd.,RAJESHEXPO,531500,TEXTILES APPARELS & ACCESSORIES,GEMS & JEWELLERY,"38,079.4","38,015.8",50.1,0.13%,10.7,0,53,7.7,45.3,1.5,"1,142.2",38.7 +Rallis India Ltd.,RALLIS,500355,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,837,699,133,15.99%,26,3,110,28,82,4.2,98.4,5.2 +Rashtriya Chemicals & Fertilizers Ltd.,RCF,524230,FERTILIZERS,FERTILIZERS,"4,222.1","4,049.3",105.9,2.55%,56.1,44,72.8,21.1,51,0.9,523.6,9.5 +Redington Ltd.,REDINGTON,532805,COMMERCIAL SERVICES & SUPPLIES,COMMODITY TRADING & DISTRIBUTION,"22,296.6","21,738.7",481.4,2.17%,43.7,105.8,408.3,96.7,303.5,3.9,"1,242",15.9 +Relaxo Footwears Ltd.,RELAXO,530517,RETAILING,FOOTWEAR,725.9,623.8,91.5,12.79%,36.9,4.7,60.4,16.2,44.2,1.8,193.9,7.8 +Reliance Industries Ltd.,RELIANCE,500325,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"238,797","193,988","40,968",17.44%,"12,585","5,731","26,493","6,673","17,394",25.7,"68,496",101.2 +REC Ltd.,RECLTD,532955,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"11,701.3",275.1,"12,180.5",104.21%,6.1,"7,349.8","4,837.6","1,047.7","3,789.9",14.4,"12,738.6",48.4 +SJVN Ltd.,SJVN,533206,UTILITIES,ELECTRIC UTILITIES,951.6,172.2,706.2,80.40%,101.9,124.2,567.7,129.2,439.6,1.1,"1,016",2.6 +SKF India Ltd.,SKFINDIA,500472,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,"1,145.5","1,003.7",121.5,10.80%,19.3,0.5,122,31.7,90,18.2,484,97.9 +SRF Ltd.,SRF,503806,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"3,206.5","2,551.2",626.2,19.71%,161.2,79.3,414.8,114,300.8,10.2,"1,733.4",58.5 +Sanofi India Ltd.,SANOFI,500674,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,726.4,506.1,208.5,29.17%,9.9,0.3,210.1,57.9,152.1,66.1,596.3,259.3 +Schaeffler India Ltd.,SCHAEFFLER,505790,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,879.2","1,506.3",342,18.50%,55.6,1.6,315.7,80.7,235,15,922.6,59 +Shree Cements Ltd.,SHREECEM,500387,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"4,932.1","3,914.1",886,18.46%,411.7,67,539.2,92.6,446.6,123.8,"1,826.8",506.3 +Shriram Finance Ltd.,SHRIRAMFIN,511218,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"8,893","1,409.4","6,334.3",71.30%,141.4,"3,798","2,404.2",614.9,"1,786.1",47.6,"6,575.4",175.2 +Siemens Ltd.,SIEMENS,500550,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"5,953.2","5,107.5",700.2,12.06%,78.6,4.9,762.2,190.5,571.3,16.1,"1,960.9",55.1 +Sobha Ltd.,SOBHA,532784,REALTY,REALTY,773.6,665.8,75.4,10.18%,19.3,63.9,24.7,9.7,14.9,1.6,107.4,11.3 +Solar Industries India Ltd.,SOLARINDS,532725,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"1,355.2","1,011.3",336.1,24.95%,33.7,24.9,285.3,75.5,200.1,22.1,808.2,89.3 +Sonata Software Ltd.,SONATSOFTW,532221,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,935.8","1,715.2",197.3,10.32%,33.3,20.7,166.5,42.3,124.2,9,475.7,34.3 +State Bank of India,SBIN,500112,BANKING AND FINANCE,BANKS,"144,256.1","58,597.6","22,703.3",21.14%,0,"62,955.2","21,935.7","5,552.5","17,196.2",18,"69,304.1",77.7 +Steel Authority of India (SAIL) Ltd.,SAIL,500113,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"29,858.2","25,836.7","3,875.4",13.04%,"1,326.6",605.2,"1,674.7",464.2,"1,305.6",3.2,"3,219.5",7.8 +Sun Pharma Advanced Research Company Ltd.,SPARC,532872,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,29.7,112.7,-91.5,-431.87%,3.2,0.3,-86.4,0,-86.4,-2.7,-253.6,-7.8 +Sun Pharmaceutical Industries Ltd.,SUNPHARMA,524715,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"12,486","9,013","3,179.4",26.08%,632.8,49.3,"2,790.9",390.1,"2,375.5",9.9,"8,548.5",35.6 +Sun TV Network Ltd.,SUNTV,532733,MEDIA,BROADCASTING & CABLE TV,"1,160.2",320.6,727.8,69.42%,218.8,1.7,619.1,154.4,464.7,11.8,"1,861.8",47.2 +Sundram Fasteners Ltd.,SUNDRMFAST,500403,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,429.1","1,191.1",230.7,16.23%,54.5,7.4,176.2,43.1,131.9,6.3,502.9,23.9 +Sunteck Realty Ltd.,SUNTECK,512179,REALTY,REALTY,36.2,39.1,-14.1,-56.70%,2.2,15.8,-20.9,-6.4,-13.9,-1,-46.5,-3.3 +Supreme Industries Ltd.,SUPREMEIND,509930,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,"2,321.4","1,952.5",356.2,15.43%,71.9,1.6,295.4,76.3,243.2,19.1,"1,028.2",80.9 +Suzlon Energy Ltd.,SUZLON,ASM,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"1,428.7","1,196.4",225,15.83%,51.2,43.7,102.4,0.1,102.3,0.1,561.4,0.4 +Syngene International Ltd.,SYNGENE,539268,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,931.7,656,254.1,27.92%,104.6,13,150.7,34.2,116.5,2.9,498.3,12.4 +TTK Prestige Ltd.,TTKPRESTIG,517506,CONSUMER DURABLES,HOUSEWARE,747.2,648.6,80.8,11.08%,15.9,3.1,79.5,20.5,59.3,4.3,224.3,16.2 +TV18 Broadcast Ltd.,TV18BRDCST,532800,MEDIA,BROADCASTING & CABLE TV,"1,989","1,992.2",-198.1,-11.04%,50.1,33.8,-87.1,-6.5,-28.9,-0.2,92.2,0.5 +TVS Motor Company Ltd.,TVSMOTOR,532343,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"9,983.8","8,576.9","1,355.9",13.65%,237.1,483.3,686.4,259.8,386.3,8.1,"1,457.6",30.7 +Tata Consultancy Services Ltd.,TCS,532540,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"60,698","43,946","15,746",26.38%,"1,263",159,"15,33","3,95","11,342",31,"44,654",122 +Tata Elxsi Ltd.,TATAELXSI,500408,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,912.8,618.2,263.5,29.89%,25,5.8,263.9,63.8,200,32.1,785.1,126.1 +Tata Consumer Products Ltd.,TATACONSUM,500800,FMCG,PACKAGED FOODS,"3,823.6","3,196.7",537.1,14.38%,93.9,27.6,490.9,131.7,338.2,3.6,"1,275.2",13.7 +Tata Motors Limited (DVR),TATAMTRDVR,570001,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,,,,,,,,,,,, +Tata Motors Ltd.,TATAMOTORS,500570,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,"106,759","91,361.3","13,766.9",13.10%,"6,636.4","2,651.7","5,985.9","2,202.8","3,764",9.8,"15,332.3",40 +Tata Power Company Ltd.,TATAPOWER,500400,UTILITIES,ELECTRIC UTILITIES,"16,029.5","12,647","3,091",19.64%,925.9,"1,181.8",979.2,213.3,875.5,2.7,"3,570.8",11.2 +Tata Steel Ltd.,TATASTEEL,500470,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"55,910.2","51,414.1","4,267.8",7.66%,"2,479.8","1,959.4","-6,842.1",-228,"-6,196.2",-5.1,"-6,081.3",-5 +Tech Mahindra Ltd.,TECHM,532755,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"13,128.1","11,941.1",922.8,7.17%,465.7,97.5,623.8,110,493.9,5.6,"3,600.7",40.9 +The Ramco Cements Ltd.,RAMCOCEM,500260,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,352.1","1,935",405.6,17.33%,162.8,116.5,137.8,37,72,3.1,348.9,14.8 +Thermax Ltd.,THERMAX,500411,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"2,368.3","2,097.8",204.6,8.89%,33,19.8,217.7,58.9,157.7,14,498.8,44.3 +Timken India Ltd.,TIMKEN,522113,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,692.1,546.5,135.5,19.87%,21.1,0.9,123.6,30.6,93,12.4,358.3,47.6 +Titan Company Ltd.,TITAN,500114,TEXTILES APPARELS & ACCESSORIES,GEMS & JEWELLERY,"12,653","11,118","1,411",11.26%,144,140,"1,251",336,915,10.3,"3,302",37.1 +Torrent Pharmaceuticals Ltd.,TORNTPHARM,500420,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"2,686","1,835",825,31.02%,201,91,559,173,386,11.4,"1,334",39.4 +Torrent Power Ltd.,TORNTPOWER,532779,UTILITIES,ELECTRIC UTILITIES,"7,069.1","5,739.5","1,221.4",17.55%,341.7,247.2,740.7,198.1,525.9,10.9,"2,176.8",45.3 +Trent Ltd.,TRENT,500251,RETAILING,DEPARTMENT STORES,"3,062.5","2,525.8",456.6,15.31%,152.2,95.5,288.9,86.3,234.7,6.6,629.4,17.7 +Trident Ltd.,TRIDENT,521064,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"1,812","1,557.3",240.3,13.37%,89.4,35,130.4,40.1,90.7,0.2,458.1,0.9 +UPL Ltd.,UPL,512070,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,"10,275","8,807","1,325",13.03%,657,871,-185,-96,-189,-2.5,"1,856",24.7 +UltraTech Cement Ltd.,ULTRACEMCO,532538,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"16,179.3","13,461.2","2,550.9",15.93%,797.8,233.9,"1,686.2",409.4,"1,281.5",44.5,"5,694.1",197.2 +Union Bank of India,UNIONBANK,532477,BANKING AND FINANCE,BANKS,"28,952.5","6,189.3","7,265",29.38%,0,"15,498.2","5,492.3","1,944","3,571.8",5.1,"11,918.9",16.1 +United Breweries Ltd.,UBL,532478,FOOD BEVERAGES & TOBACCO,BREWERIES & DISTILLERIES,"1,902.1","1,705.8",184.3,9.75%,50.9,1.4,144,36.9,107.3,4.1,251.3,9.5 +United Spirits Ltd.,MCDOWELL-N,532432,FOOD BEVERAGES & TOBACCO,BREWERIES & DISTILLERIES,"6,776.6","6,269.8",466.7,6.93%,65.3,26.2,446,106.3,339.3,4.8,"1,133",15.6 +V-Guard Industries Ltd.,VGUARD,532953,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,147.9","1,041.3",92.5,8.16%,19.8,9.3,77.5,18.6,59,1.4,215.2,5 +Vardhman Textiles Ltd.,VTL,502986,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"2,487","2,192.1",205.4,8.57%,103.7,22,169.2,41.7,134.3,4.7,531.9,18.7 +Varun Beverages Ltd.,VBL,540180,FOOD BEVERAGES & TOBACCO,NON-ALCOHOLIC BEVERAGES,"3,889","2,988.4",882.1,22.79%,170.8,62.5,667.3,152.9,501.1,3.9,"1,998.7",15.4 +Vinati Organics Ltd.,VINATIORGA,524200,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,464.4,337.3,110.8,24.73%,13.7,0.3,113,28.9,84.2,8.2,408.2,39.7 +Voltas Ltd.,VOLTAS,500575,CONSUMER DURABLES,CONSUMER ELECTRONICS,"2,363.7","2,222.5",70.3,3.06%,11.7,11.4,118.1,49.3,36.7,1.1,199.5,6 +ZF Commercial Vehicle Control Systems India Ltd.,ZFCVINDIA,533023,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,015.8",846.2,145.5,14.67%,27.1,1.3,141.2,35.5,105.7,55.7,392,206.7 +Welspun Corp Ltd.,WELCORP,ASM,METALS & MINING,IRON & STEEL PRODUCTS,"4,161.4","3,659.9",399.5,9.84%,85.7,75,340.8,79,384.7,14.7,809.2,30.9 +Welspun Living Ltd.,WELSPUNLIV,514162,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"2,542.4","2,151.1",358,14.27%,98.5,33.8,258.9,58.7,196.7,2,526.1,5.4 +Whirlpool of India Ltd.,WHIRLPOOL,500238,CONSUMER DURABLES,CONSUMER ELECTRONICS,"1,555.5","1,448.4",73.2,4.81%,49.2,5.6,52.3,14.1,36.6,2.9,198.8,15.7 +Wipro Ltd.,WIPRO,507685,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"23,255.7","18,543.2","3,972.7",17.64%,897,303.3,"3,512.2",841.9,"2,646.3",5.1,"11,643.8",22.3 +Zee Entertainment Enterprises Ltd.,ZEEL,505537,MEDIA,BROADCASTING & CABLE TV,"2,509.6","2,105",332.8,13.65%,77.2,23.4,184.2,54.4,123,1.3,-102.2,-1.1 +eClerx Services Ltd.,ECLERX,532927,SOFTWARE & SERVICES,BPO/KPO,735.9,517,204.7,28.37%,30.3,6.1,182.4,46.3,136,28.2,506,105 +Sterlite Technologies Ltd.,STLTECH,532374,TELECOMMUNICATIONS EQUIPMENT,TELECOM CABLES,"1,497","1,281",213,14.26%,85,95,36,12,34,0.9,203,5.1 +HEG Ltd.,HEG,509631,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,642.2,512.3,101.9,16.58%,38.5,8.5,82.9,21.7,96,24.9,439.5,113.9 +SBI Life Insurance Company Ltd.,SBILIFE,540719,BANKING AND FINANCE,LIFE INSURANCE,"28,816.2","28,183.8",609.9,2.12%,0,0,621.5,43.9,380.2,3.8,"1,842.2",18.4 +General Insurance Corporation of India,GICRE,540755,BANKING AND FINANCE,GENERAL INSURANCE,"13,465.9","11,574","1,464.6",11.20%,0,0,"1,855.4",243.7,"1,689",15.2,"6,628",37.8 +Tube Investments of India Ltd.,TIINDIA,540762,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,005.4","1,718.2",251.4,12.76%,34.6,7.7,244.8,63.4,181.4,9.4,717.5,37.1 +Honeywell Automation India Ltd.,HONAUT,517174,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,144.3",965.9,138.3,12.52%,13.8,0.7,163.9,42,121.9,137.8,443.4,503.9 +Indian Energy Exchange Ltd.,IEX,540750,BANKING AND FINANCE,EXCHANGE,133,16.6,92,84.73%,5.1,0.7,110.6,27.9,86.5,1,327.8,3.7 +ICICI Lombard General Insurance Company Ltd.,ICICIGI,540716,BANKING AND FINANCE,GENERAL INSURANCE,"5,271.1","4,612.4",743.5,14.16%,0,0,763.6,186.4,577.3,11.8,"1,757.1",35.8 +Aster DM Healthcare Ltd.,ASTERDM,540975,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"3,325.2","2,939.4",377.3,11.38%,227.2,101.9,2.1,10.2,-30.8,-0.6,284.3,5.7 +Central Depository Services (India) Ltd.,CDSL,CDSL,OTHERS,INVESTMENT COMPANIES,230.1,77.9,129.4,62.40%,6.5,0,145.6,35.8,108.9,10.4,320.2,30.6 +Graphite India Ltd.,GRAPHITE,509488,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,884,823,-30,-3.78%,19,4,992,190,804,41.1,856,43.9 +Grasim Industries Ltd.,GRASIM,500300,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"30,505.3","25,995.9","4,224.8",13.98%,"1,245.2",397.8,"2,866.4",837.7,"1,163.8",17.7,"6,624.9",100.6 +KNR Constructions Ltd.,KNRCON,532942,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"1,043.8",806.9,231.6,22.30%,39.2,20.6,177.1,34.6,147.4,5.2,537.5,19.1 +Aditya Birla Capital Ltd.,ABCAPITAL,540691,DIVERSIFIED,HOLDING COMPANIES,"7,730.4","4,550.1","2,821.9",36.55%,48,"1,827",956.8,284.1,705,2.7,"5,231.9",20.1 +Dixon Technologies (India) Ltd.,DIXON,540699,CONSUMER DURABLES,CONSUMER ELECTRONICS,"4,943.9","4,744.3",198.9,4.02%,36.4,17.1,146.1,35.2,107.3,19,308.7,51.8 +Cholamandalam Financial Holdings Ltd.,CHOLAHLDNG,504973,DIVERSIFIED,HOLDING COMPANIES,"6,372.2","2,495.1","3,404.8",54.05%,52.1,"2,209.4","1,215.8",324.6,420.9,22.4,"1,532.3",81.6 +Cochin Shipyard Ltd.,COCHINSHIP,540678,TRANSPORTATION,MARINE PORT & SERVICES,"1,100.4",820.5,191.2,18.90%,18.9,9.6,251.4,69.9,181.5,13.8,429.9,32.7 +Bharat Dynamics Ltd.,BDL,541143,GENERAL INDUSTRIALS,DEFENCE,694.1,481.8,134,21.77%,17.4,0.8,194.1,47,147.1,8,425.4,23.2 +Lux Industries Ltd.,LUXIND,539542,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,643.6,584.2,55,8.61%,5.9,5.4,48,12.1,37.1,12.3,103.1,32.9 +Zensar Technologies Ltd.,ZENSARTECH,504067,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,277.1","1,009.9",230.9,18.61%,36.6,5.7,224.9,51,173.9,7.7,525.8,23.2 +PCBL Ltd.,PCBL,506590,CHEMICALS & PETROCHEMICALS,CARBON BLACK,"1,489.4","1,248.6",238.1,16.02%,48.2,21,171.6,48.8,122.6,3.2,431.6,11.4 +Zydus Wellness Ltd.,ZYDUSWELL,531335,FMCG,PACKAGED FOODS,444,423.1,16.8,3.82%,5.8,6.5,8.6,2.7,5.9,0.9,281.2,44.2 +Linde India Ltd.,LINDEINDIA,523457,GENERAL INDUSTRIALS,INDUSTRIAL GASES,729.9,537.7,173.6,24.41%,49.7,1.2,141.3,34.6,108.7,12.8,417.9,49 +FDC Ltd.,FDC,531599,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,513.6,409.9,76.4,15.71%,9.9,1.1,92.7,22.9,69.8,4.2,251.2,15.4 +The New India Assurance Company Ltd.,NIACL,540769,BANKING AND FINANCE,GENERAL INSURANCE,"10,571","10,773.4",-246.5,-2.33%,0,0,-242,-46.7,-176.1,-1.1,947,5.7 +Sundaram Finance Ltd.,SUNDARMFIN,590071,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"1,710.6",322.5,"1,332.1",77.98%,43.6,820.3,470.6,142.8,365.4,33.2,"1,506.7",135.6 +TeamLease Services Ltd.,TEAMLEASE,539658,COMMERCIAL SERVICES & SUPPLIES,MISC. COMMERCIAL SERVICES,"2,285.6","2,240.8",31.8,1.40%,12.9,2.5,29.4,1.8,27.3,16.3,106.6,63.5 +Galaxy Surfactants Ltd.,GALAXYSURF,540935,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,985.8,858.2,124.9,12.70%,24.7,5.4,97.5,20.1,77.4,21.8,349.3,98.5 +Bandhan Bank Ltd.,BANDHANBNK,541153,BANKING AND FINANCE,BANKS,"5,032.2","1,400.2","1,583.4",35.25%,0,"2,048.6",947.2,226.1,721.2,4.5,"2,541.1",15.8 +ICICI Securities Ltd.,ISEC,541179,BANKING AND FINANCE,CAPITAL MARKETS,"1,249",433.5,810.2,64.87%,25.8,215.1,569.4,145.7,423.6,13.1,"1,238.1",38.3 +V-Mart Retail Ltd.,VMART,534976,RETAILING,DEPARTMENT STORES,551.4,548.8,0.7,0.12%,53.2,35.9,-86.4,-22.3,-64.1,-32.4,-103.1,-52.1 +Nippon Life India Asset Management Ltd.,NAM-INDIA,540767,BANKING AND FINANCE,ASSET MANAGEMENT COS.,475.4,156.1,241.4,60.73%,7.2,1.7,310.4,66.1,244.4,3.9,883.3,14.1 +Grindwell Norton Ltd.,GRINDWELL,506076,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,690,536,131.4,19.69%,16.9,1.8,135.3,33.1,101.9,9.2,378.3,34.2 +HDFC Life Insurance Company Ltd.,HDFCLIFE,540777,BANKING AND FINANCE,LIFE INSURANCE,"23,276.6","23,659.3",-508.1,-2.20%,0,0,-373.1,-657.5,378.2,1.8,"1,472.8",6.9 +Elgi Equipments Ltd.,ELGIEQUIP,522074,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,817.8,663.4,142.7,17.71%,18.7,6.6,129.2,38.8,91.3,2.9,401.9,12.7 +Hindustan Aeronautics Ltd.,HAL,541154,GENERAL INDUSTRIALS,DEFENCE,"6,105.1","4,108.1","1,527.6",27.11%,349.6,0.3,"1,647",414.8,"1,236.7",18.5,"6,037.3",90.3 +BSE Ltd.,BSE,BSE,BANKING AND FINANCE,EXCHANGE,367,172.8,189.2,52.26%,22.7,8.5,163,63.6,120.5,8.8,706,52.1 +Rites Ltd.,RITES,541556,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,608.8,444.5,137.8,23.67%,14.1,1.4,148.8,40.1,101.2,4.2,488.1,20.3 +Fortis Healthcare Ltd.,FORTIS,532843,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"1,783.5","1,439.8",330.2,18.65%,84.1,31.8,231.4,48.8,173.7,2.3,547.6,7.3 +Varroc Engineering Ltd.,VARROC,541578,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,893.5","1,692.6",194.3,10.30%,84.9,50.3,65.9,18.2,54.2,3.5,146.5,9.6 +Adani Green Energy Ltd.,ADANIGREEN,ASM,UTILITIES,ELECTRIC UTILITIES,"2,589",521,"1,699",76.53%,474,"1,165",413,119,372,2.2,"1,305",8.2 +VIP Industries Ltd.,VIPIND,507880,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,548.7,493.2,52.9,9.68%,23.8,12.4,19.3,6,13.3,0.9,110.9,7.8 +CreditAccess Grameen Ltd.,CREDITACC,541770,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"1,247.6",248.8,902.3,72.36%,12.3,423.9,466.8,119.7,347,21.8,"1,204.2",75.7 +CESC Ltd.,CESC,500084,UTILITIES,ELECTRIC UTILITIES,"4,414","3,706",646,14.84%,303,305,461,98,348,2.6,"1,447",10.9 +Jamna Auto Industries Ltd.,JAMNAAUTO,520051,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,608.7,528.2,79.1,13.03%,10.9,0.8,68.7,18.6,50.1,2.4,189.3,4.7 +Suprajit Engineering Ltd.,SUPRAJIT,532509,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,727.6,639.1,69.8,9.85%,25.7,13.6,49.2,14.5,34.8,2.5,146.9,10.6 +JK Paper Ltd.,JKPAPER,532162,COMMERCIAL SERVICES & SUPPLIES,PAPER & PAPER PRODUCTS,"1,708.8","1,242.8",407.3,24.68%,83.5,42,340.6,34.9,302.4,17.9,"1,220.6",72.1 +Bank of Maharashtra,MAHABANK,532525,BANKING AND FINANCE,BANKS,"5,735.5","1,179.4","1,920.5",37.90%,0,"2,635.7",935.7,16,919.8,1.3,"3,420.8",4.8 +Aavas Financiers Ltd.,AAVAS,541988,BANKING AND FINANCE,HOUSING FINANCE,497.6,123.5,367.8,74.03%,7.6,203.6,157.4,35.7,121.7,15.4,465.4,58.8 +HDFC Asset Management Company Ltd.,HDFCAMC,541729,BANKING AND FINANCE,ASSET MANAGEMENT COS.,765.4,162,481.1,74.81%,13,2.3,588.1,151.6,436.5,20.4,"1,659.3",77.7 +KEI Industries Ltd.,KEI,517569,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,954.2","1,742.7",203.9,10.47%,15.6,7.5,188.4,48.2,140.2,15.5,528.3,58.5 +Orient Electric Ltd.,ORIENTELEC,541301,CONSUMER DURABLES,CONSUMER ELECTRONICS,570.3,546.2,20.7,3.65%,14.2,5.2,23.4,4.9,18.4,0.9,95.3,4.5 +Deepak Nitrite Ltd.,DEEPAKNTR,506401,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"1,795.1","1,475.8",302.3,17.00%,39.4,2.7,277.2,72.1,205.1,15,797.9,58.5 +Fine Organic Industries Ltd.,FINEORG,541557,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,557.6,409.4,131.1,24.25%,14.4,0.7,133.1,28.9,103.4,33.7,458.8,149.6 +LTIMindtree Ltd.,LTIM,540005,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"9,048.6","7,274.1","1,631.3",18.32%,208.2,47,"1,519.3",357,"1,161.8",39.3,"4,427.5",149.6 +Dalmia Bharat Ltd.,DALBHARAT,542216,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"3,234","2,56",589,18.70%,401,101,172,48,118,6.3,"1,041",54.8 +Godfrey Phillips India Ltd.,GODFRYPHLP,500163,FOOD BEVERAGES & TOBACCO,CIGARETTES-TOBACCO PRODUCTS,"1,412.5","1,151",223.6,16.27%,36.5,6.6,218.5,55.5,202.1,38.9,802.9,154.4 +Vaibhav Global Ltd.,VAIBHAVGBL,532156,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,708.4,641.5,63.5,9.01%,22.6,2.9,41.4,12.4,29.4,1.8,121.3,7.3 +Abbott India Ltd.,ABBOTINDIA,500488,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,549.7","1,113.3",380.9,25.49%,17.8,3.1,415.4,102.5,312.9,147.3,"1,081.4",508.9 +Adani Total Gas Ltd.,ATGL,ASM,UTILITIES,UTILITIES,"1,104.8",815.7,279.9,25.55%,37.6,27.3,224.2,57.2,172.7,1.6,571,5.2 +Nestle India Ltd.,NESTLEIND,500790,FMCG,PACKAGED FOODS,"5,070.1","3,811.9","1,224.9",24.32%,111.2,31.4,"1,222",313.9,908.1,94.2,"2,971.1",308.2 +Bayer Cropscience Ltd.,BAYERCROP,506285,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,"1,633.3","1,312.3",304.9,18.85%,11.6,3.7,305.7,82.8,222.9,49.6,844.4,188.1 +Amber Enterprises India Ltd.,AMBER,540902,CONSUMER DURABLES,CONSUMER ELECTRONICS,939.8,867.5,59.6,6.43%,45.2,36.6,-9.5,-3.8,-6.9,-2.1,156.8,46.5 +Rail Vikas Nigam Ltd.,RVNL,542649,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"5,210.3","4,616",298.3,6.07%,6.2,132.7,455.4,85.2,394.3,1.9,"1,478.8",7.1 +Metropolis Healthcare Ltd.,METROPOLIS,542650,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE SERVICES,309.7,233.7,74.8,24.25%,22.2,5.7,48.1,12.5,35.5,6.9,133.4,26 +Polycab India Ltd.,POLYCAB,542652,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"4,253","3,608.8",608.9,14.44%,60.3,26.8,557.2,127.4,425.6,28.4,"1,607.2",107.1 +Multi Commodity Exchange of India Ltd.,MCX,534091,BANKING AND FINANCE,EXCHANGE,184,193.8,-28.7,-17.38%,6.6,0.1,-16.4,1.6,-19.1,-3.7,44.8,8.8 +IIFL Finance Ltd.,IIFL,532636,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,"2,533.7",788.3,"1,600.8",64.66%,43.3,932.1,683.5,158,474.3,12.4,"1,690.7",44.4 +Ratnamani Metals & Tubes Ltd.,RATNAMANI,520111,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"1,141.9",886.3,244.9,21.65%,23.6,10.8,221.1,56.8,163.9,23.4,622.6,88.8 +RHI Magnesita India Ltd.,RHIM,534076,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,989.7,839,147.9,14.98%,44.2,8.5,97.9,26.3,71.3,3.5,-502.2,-24.3 +Birlasoft Ltd.,BSOFT,532400,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,325.4","1,102.7",207.1,15.81%,21.5,5.7,195.5,50.4,145.1,5.2,378.4,13.7 +EIH Ltd.,EIHOTEL,500840,HOTELS RESTAURANTS & TOURISM,HOTELS,552.5,387.6,142.9,26.94%,33.2,5.6,126.1,36.2,93.1,1.5,424.1,6.8 +Affle (India) Ltd.,AFFLE,542752,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,441.2,344.1,87.2,20.22%,18.4,5.5,73.2,6.4,66.8,5,264.3,19.8 +Westlife Foodworld Ltd.,WESTLIFE,505533,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,618,516.5,98.2,15.98%,43.9,27.4,30.2,7.8,22.4,1.4,107.7,6.9 +IndiaMART InterMESH Ltd.,INDIAMART,542726,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,329.3,214.7,80,27.15%,8,2.3,104.3,23.9,69.4,11.4,321.1,53.6 +Infosys Ltd.,INFY,500209,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"39,626","29,554","9,44",24.21%,"1,166",138,"8,768","2,553","6,212",15,"24,871",60.1 +Sterling and Wilson Renewable Energy Ltd.,SWSOLAR,542760,COMMERCIAL SERVICES & SUPPLIES,CONSULTING SERVICES,776.7,758,1.5,0.19%,4.3,64.3,-50,4.6,-54.2,-2.9,-668.4,-35.2 +ABB India Ltd.,ABB,500002,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"2,846","2,330.7",438.5,15.84%,30.3,0.9,484.2,122.2,362.9,17.1,"1,208.7",57 +Poly Medicure Ltd.,POLYMED,531768,HEALTHCARE EQUIPMENT & SUPPLIES,HEALTHCARE SUPPLIES,351.4,253.1,84.2,24.97%,16,2.2,80.9,18.8,62.2,6.5,233.7,24.4 +GMM Pfaudler Ltd.,GMMPFAUDLR,505255,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,946,795.5,142,15.15%,32.2,21.5,96.8,26.5,71.1,15.8,183.2,40.8 +Gujarat Fluorochemicals Ltd.,FLUOROCHEM,542812,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,960.3,783.7,163.1,17.23%,67.5,34.2,74.8,22.1,52.7,4.8,915.2,83.3 +360 One Wam Ltd.,360ONE,542772,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,617.1,235.6,317.8,57.31%,13.7,139.9,226.8,40.8,186,5.2,696.8,19.5 +Tata Communications Ltd.,TATACOMM,500483,TELECOM SERVICES,OTHER TELECOM SERVICES,"4,897.9","3,857.1","1,015.5",20.84%,605.1,137.4,298.3,77.9,220.7,7.7,"1,322.3",46.4 +Alkyl Amines Chemicals Ltd.,ALKYLAMINE,506767,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,354.5,303.9,48.3,13.71%,12.5,1.7,36.4,9.2,27.2,5.3,171.3,33.5 +CSB Bank Ltd.,CSBBANK,542867,BANKING AND FINANCE,BANKS,835.8,317.5,174.6,25.41%,0,343.6,178,44.8,133.2,7.7,577.7,33.3 +Indian Railway Catering & Tourism Corporation Ltd.,IRCTC,542830,DIVERSIFIED CONSUMER SERVICES,TRAVEL SUPPORT SERVICES,"1,042.4",628.8,366.6,36.83%,14,4.4,395.2,100.5,294.7,3.7,"1,061.2",13.3 +Sumitomo Chemical India Ltd.,SUMICHEM,542920,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,928,715.5,187.9,20.80%,15.8,1.2,195.5,52,143.4,2.9,367.7,7.4 +Century Textiles & Industries Ltd.,CENTURYTEX,500040,COMMERCIAL SERVICES & SUPPLIES,PAPER & PAPER PRODUCTS,"1,114.9","1,069.2",33.8,3.07%,59.2,17,-30.5,-3.3,-30.4,-2.8,117.7,10.5 +SBI Cards and Payment Services Ltd.,SBICARD,543066,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"4,221.4","2,018.8","1,327",32.47%,46.8,604.9,809.4,206.4,603,6.4,"2,302.2",24.3 +Hitachi Energy India Ltd.,POWERINDIA,543187,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"1,228.2","1,162.6",65.3,5.32%,22.5,10.7,32.4,7.6,24.7,5.8,82.5,19.5 +Suven Pharmaceuticals Ltd.,SUVENPHAR,543064,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,250.9,133.1,98,42.40%,11.9,0.5,105.4,25.8,79.6,3.1,431.8,17 +Tata Chemicals Ltd.,TATACHEM,500770,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"4,083","3,179",819,20.49%,234,145,627,120,428,16.8,"2,06",80.8 +Aarti Drugs Ltd.,AARTIDRUGS,524348,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,642.2,565.1,76.4,11.92%,12.6,8.2,56.3,16.7,39.6,4.3,180.2,19.6 +Gujarat Ambuja Exports Ltd.,GAEL,524226,FMCG,EDIBLE OILS,"1,157.7","1,012.2",103.3,9.26%,30.5,5.9,109.1,26.3,82.8,3.6,305.1,13.3 +Polyplex Corporation Ltd.,POLYPLEX,524051,COMMERCIAL SERVICES & SUPPLIES,CONTAINERS & PACKAGING,"1,595.7","1,451.5",120.6,7.67%,75.1,9.9,59.1,10.9,27.9,8.9,71.1,22.6 +Chalet Hotels Ltd.,CHALET,542399,HOTELS RESTAURANTS & TOURISM,HOTELS,318.2,188.6,126,40.04%,35,50.1,44.5,8,36.4,1.8,266.7,13 +Adani Enterprises Ltd.,ADANIENT,512599,COMMERCIAL SERVICES & SUPPLIES,COMMODITY TRADING & DISTRIBUTION,"23,066","20,087.2","2,430.1",10.79%,757,"1,342.8",791,397.8,227.8,2,"2,444.3",21.4 +YES Bank Ltd.,YESBANK,532648,BANKING AND FINANCE,BANKS,"7,980.6","2,377.1",810,12.06%,0,"4,793.6",304.4,75.7,228.6,0.1,836.6,0.3 +EPL Ltd.,EPL,500135,COMMERCIAL SERVICES & SUPPLIES,CONTAINERS & PACKAGING,"1,011.2",820.6,181,18.07%,83.6,30.6,76.4,25.4,50.5,1.6,251.9,7.9 +Network18 Media & Investments Ltd.,NETWORK18,532798,MEDIA,BROADCASTING & CABLE TV,"2,052.2","2,083.8",-218.3,-11.70%,56.8,66.2,-154.5,-6.5,-61,-0.6,-144.2,-1.4 +CIE Automotive India Ltd.,CIEINDIA,532756,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,299.4","1,934",345.4,15.15%,78.3,31,256.1,69.1,375.4,9.9,298.4,7.9 +Vedanta Ltd.,VEDL,500295,METALS & MINING,ALUMINIUM AND ALUMINIUM PRODUCTS,"39,585","27,466","11,479",29.47%,"2,642","2,523","8,177","9,092","-1,783",-4.8,"5,202",14 +Rossari Biotech Ltd.,ROSSARI,543213,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,484.8,419.9,63.6,13.15%,15.1,5,44.8,11.9,32.9,6,116.8,21.2 +KPIT Technologies Ltd.,KPITTECH,542651,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,208.6",959.2,239.9,20.01%,48.1,13.6,187.7,46.3,140.9,5.2,486.9,18 +Intellect Design Arena Ltd.,INTELLECT,538835,SOFTWARE & SERVICES,IT SOFTWARE PRODUCTS,631.7,497.2,121.9,19.69%,33.7,0.8,96.5,25.7,70.4,5.2,316.6,23.2 +Balaji Amines Ltd.,BALAMINES,530999,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,387.3,326.8,53.8,14.13%,10.8,1.8,48,11.6,34.7,10.7,197.3,60.9 +UTI Asset Management Company Ltd.,UTIAMC,543238,BANKING AND FINANCE,ASSET MANAGEMENT COS.,405.6,172.5,231.5,57.30%,10.4,2.8,219.8,37,182.8,14.4,562.9,44.3 +Mazagon Dock Shipbuilders Ltd.,MAZDOCK,543237,TRANSPORTATION,SHIPPING,"2,079.2","1,651.1",176.6,9.66%,20.2,1.3,406.6,102.8,332.9,16.5,"1,327.6",65.8 +Computer Age Management Services Ltd.,CAMS,543232,BANKING AND FINANCE,CAPITAL MARKETS,284.7,153,122.1,44.39%,17.4,2,112.4,28.6,84.5,17.2,309.2,62.9 +Happiest Minds Technologies Ltd.,HAPPSTMNDS,543227,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,428.8,324,82.6,20.32%,14.6,11.2,79.1,20.7,58.5,3.9,232,15.6 +Triveni Turbine Ltd.,TRITURBINE,533655,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,402.3,313.4,74.3,19.17%,5.1,0.6,83.2,19,64.2,2,233.1,7.3 +Angel One Ltd.,ANGELONE,ASM,BANKING AND FINANCE,CAPITAL MARKETS,"1,049.3",602.6,443.4,42.31%,11.2,26.4,407.2,102.7,304.5,36.3,"1,020.2",121.7 +Tanla Platforms Ltd.,TANLA,532790,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"1,014.9",811.8,196.8,19.51%,22.6,1.8,178.7,36.2,142.5,10.6,514.7,38.3 +Max Healthcare Institute Ltd.,MAXHEALTH,543220,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"1,408.6",975.8,387.4,28.42%,57.9,8.5,366.4,89.7,276.7,2.9,990.1,10.2 +Asahi India Glass Ltd.,ASAHIINDIA,515030,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,122.6",934,185.6,16.58%,43,34.4,111.3,30.2,86.9,3.6,343.5,14.1 +Prince Pipes & Fittings Ltd.,PRINCEPIPE,542907,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,660.4,562.3,94.2,14.35%,22.5,0.7,92.8,22.2,70.6,5.2,219.8,19.9 +Route Mobile Ltd.,ROUTE,543228,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"1,018.3",886.5,128.1,12.63%,21.4,6.5,103.8,15.5,88.8,14.2,365.3,58.3 +KPR Mill Ltd.,KPRMILL,532889,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"1,533","1,212.9",298,19.72%,46,18.1,256,54.2,201.8,5.9,788.8,23.1 +Infibeam Avenues Ltd.,INFIBEAM,539807,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,792.6,719.7,70.2,8.89%,17.1,0.5,55.2,14.7,41,0.1,142.2,0.5 +Restaurant Brands Asia Ltd.,RBA,543248,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,628.2,568.7,56.2,9.00%,78.6,31.5,-50.7,0,-46,-0.9,-220.3,-4.5 +Larsen & Toubro Ltd.,LT,500510,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"52,157","45,392.1","5,632",11.04%,909.9,864,"4,991.1","1,135.5","3,222.6",22.9,"12,255.3",89.2 +Gland Pharma Ltd.,GLAND,543245,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,426.6","1,049.3",324.1,23.60%,81.3,6,289.9,95.8,194.1,11.8,698.8,42.4 +Macrotech Developers Ltd.,LODHA,543287,REALTY,REALTY,"1,755.1","1,333.5",416.1,23.78%,29.3,123.1,269.2,62.4,201.9,2.1,"1,529.2",15.9 +Poonawalla Fincorp Ltd.,POONAWALLA,524000,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),745.3,178.9,531.7,71.98%,14.7,215.5,"1,124.6",270,860.2,11.2,"1,466.4",19.1 +The Fertilisers and Chemicals Travancore Ltd.,FACT,590024,FERTILIZERS,FERTILIZERS,"1,713.6","1,530.8",132.4,7.96%,5.3,61.2,105.2,0,105.2,1.6,508.4,7.9 +Home First Finance Company India Ltd.,HOMEFIRST,543259,BANKING AND FINANCE,HOUSING FINANCE,278,53.7,211.6,77.43%,2.8,117,96.4,22.1,74.3,8.4,266.2,30.2 +CG Power and Industrial Solutions Ltd.,CGPOWER,500093,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"2,019","1,692.9",308.6,15.42%,22.9,0.4,329.9,86.2,242.3,1.6,"1,1",7.2 +Laxmi Organic Industries Ltd.,LXCHEM,543277,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,660.5,613.3,38.9,5.97%,27.5,2.1,17.5,6.8,10.7,0.4,100.6,3.8 +Anupam Rasayan India Ltd.,ANURAS,543275,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,395.6,284.7,107.5,27.41%,19.8,20.4,70.7,22,40.7,3.8,178.9,16.6 +Kalyan Jewellers India Ltd.,KALYANKJIL,ASM,TEXTILES APPARELS & ACCESSORIES,GEMS & JEWELLERY,"4,427.7","4,100.9",313.7,7.11%,66.9,81.7,178.1,43.3,135.2,1.3,497.9,4.8 +Jubilant Pharmova Ltd.,JUBLPHARMA,530019,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,690.2","1,438.5",241.8,14.39%,96.6,66.1,89,35.9,62.5,3.9,-44.6,-2.8 +Indigo Paints Ltd.,INDIGOPNTS,543258,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,273.4,228.7,41.8,15.45%,10,0.5,34.3,8.2,26.1,5.5,132.4,27.8 +Indian Railway Finance Corporation Ltd.,IRFC,543257,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"6,767.5",33.5,"6,732.4",99.50%,2.1,"5,181.5","1,549.9",0,"1,549.9",1.2,"6,067.6",4.6 +Mastek Ltd.,MASTEK,523704,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,770.4,642.5,123,16.07%,20.9,12.6,90.3,25,62.8,20.5,269.7,88 +Equitas Small Finance Bank Ltd.,EQUITASBNK,543243,BANKING AND FINANCE,BANKS,"1,540.4",616.8,330.2,24.30%,0,593.4,267,68.9,198.1,1.8,749.5,6.7 +Tata Teleservices (Maharashtra) Ltd.,TTML,532371,TELECOM SERVICES,TELECOM SERVICES,288.6,159.3,127.5,44.45%,36.3,403.2,-310.2,0,-310.2,-1.6,"-1,168.3",-6 +Praj Industries Ltd.,PRAJIND,522205,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,893.3,798.4,84,9.52%,9.1,1,84.8,22.4,62.4,3.4,271.4,14.8 +Nazara Technologies Ltd.,NAZARA,543280,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,309.5,269.4,26.7,8.98%,15.1,2.7,21.2,-1.3,19.8,3,60,9.1 +Jubilant Ingrevia Ltd.,JUBLINGREA,543271,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,028.5",902.3,117.7,11.54%,33.9,12.5,79.8,22.4,57.5,3.6,258.9,16.4 +Sona BLW Precision Forgings Ltd.,SONACOMS,543300,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,796.9,567.5,223.3,28.24%,53.4,6,164.1,40.1,123.8,2.1,462.8,7.9 +Chemplast Sanmar Ltd.,CHEMPLASTS,543336,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,025",941.8,46,4.65%,35.3,38.6,9.2,-16.8,26.1,1.6,35.3,2.2 +Aptus Value Housing Finance India Ltd.,APTUS,543335,BANKING AND FINANCE,HOUSING FINANCE,344.5,50.6,277.5,83.18%,2.6,96.1,189.6,41.5,148,3,551.1,11.1 +Clean Science & Technology Ltd.,CLEAN,543318,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,187.1,106.3,74.8,41.32%,11.1,0.3,69.5,17.3,52.2,4.9,275.5,25.9 +Medplus Health Services Ltd.,MEDPLUS,543427,HEALTHCARE EQUIPMENT & SUPPLIES,HEALTHCARE SUPPLIES,"1,419","1,323.5",85.1,6.04%,55.5,23.5,16.4,1.9,14.6,1.2,58.3,4.9 +Nuvoco Vistas Corporation Ltd.,NUVOCO,543334,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,578.9","2,243",329.9,12.82%,225.6,139.9,-29.6,-31.1,1.5,0,141.8,4 +Star Health and Allied Insurance Company Ltd.,STARHEALTH,543412,BANKING AND FINANCE,GENERAL INSURANCE,"3,463.2","3,295.8",165.7,4.79%,0,0,167.1,41.8,125.3,2.1,725.4,12.4 +Go Fashion (India) Ltd.,GOCOLORS,543401,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,192.8,132.2,56.6,29.98%,25.8,8.9,25.8,5.7,20,3.7,85.4,15.8 +PB Fintech Ltd.,POLICYBZR,543390,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,909.1,900.7,-89.1,-10.98%,22.3,7.2,-21.1,-0.3,-20.2,-0.5,-127.9,-2.8 +FSN E-Commerce Ventures Ltd.,NYKAA,543384,SOFTWARE & SERVICES,INTERNET & CATALOGUE RETAIL,"1,515.6","1,426.4",80.6,5.35%,54.6,21.3,13.3,4,5.8,0,19.8,0.1 +Krishna Institute of Medical Sciences Ltd.,KIMS,543308,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,655.4,475.2,177.3,27.17%,32.6,8.9,138.6,37.3,92,11.5,342.1,42.7 +Zomato Ltd.,ZOMATO,543320,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"3,06","2,895",-47,-1.65%,128,16,21,-15,36,0,-496.8,-0.6 +Brightcom Group Ltd.,BCG,532368,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"1,690.5","1,172.3",518,30.65%,72.3,0.1,445.8,124.3,321.5,1.6,"1,415.2",7 +Shyam Metalics and Energy Ltd.,SHYAMMETL,543299,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"2,978.9","2,633.6",307.1,10.44%,176.5,35.4,133.4,-348.6,484.1,18.9,"1,049.9",41.2 +G R Infraprojects Ltd.,GRINFRA,543317,CEMENT AND CONSTRUCTION,ROADS & HIGHWAYS,"1,909.2","1,415.7",467.1,24.81%,61.7,144.6,287.1,69.9,217.2,22.5,"1,240.3",128.3 +RattanIndia Enterprises Ltd.,RTNINDIA,534597,UTILITIES,ELECTRIC UTILITIES,"1,618.1","1,392.8",1.5,0.11%,4.3,28.8,142.2,1.7,140.9,1,147.6,1.1 +Borosil Renewables Ltd.,BORORENEW,502219,CONSUMER DURABLES,HOUSEWARE,406.3,369.2,32.5,8.09%,31,9.6,28.9,-1.1,25.1,1.9,32.1,2.5 +HLE Glascoat Ltd.,HLEGLAS,522215,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,227.8,198,26.5,11.79%,6.1,5.8,16.1,5.3,10,1.6,54.4,8 +Tata Investment Corporation Ltd.,TATAINVEST,501301,DIVERSIFIED,HOLDING COMPANIES,125,10.1,113.8,91.88%,0.2,4.7,110.1,-1.3,124.4,24.6,326.1,64.4 +Sapphire Foods India Ltd.,SAPPHIRE,543397,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,650.1,527.5,115.1,17.91%,76.8,24.5,21.4,6.2,15.3,2.4,208.5,32.7 +Devyani International Ltd.,DEVYANI,543330,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,826,665,154.4,18.84%,86.3,41.7,19,-16.8,33.4,0.3,177.5,1.5 +Vijaya Diagnostic Centre Ltd.,VIJAYA,543350,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE SERVICES,145.6,81.5,57.4,41.31%,13.7,5.9,44.6,11,33.3,3.3,103.4,10.1 +C.E. Info Systems Ltd.,MAPMYINDIA,543425,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,99.3,50.1,41,44.98%,3.7,0.7,44.7,11.1,33,6.1,122.9,22.7 +Latent View Analytics Ltd.,LATENTVIEW,543398,SOFTWARE & SERVICES,DATA PROCESSING SERVICES,172.7,124.9,30.8,19.78%,2.3,0.8,44.7,10.6,34,1.7,153.6,7.5 +Metro Brands Ltd.,METROBRAND,543426,RETAILING,FOOTWEAR,571.9,400.3,155.4,27.96%,57.2,19.7,94.7,27.5,66.7,2.5,340,12.5 +Easy Trip Planners Ltd.,EASEMYTRIP,543272,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,144.6,76.9,64.8,45.71%,1,2,64.7,17.7,47.2,0.3,146,0.8 +Shree Renuka Sugars Ltd.,RENUKA,532670,FOOD BEVERAGES & TOBACCO,SUGAR,"2,564.7","2,491",63.7,2.49%,64.1,216.8,-207.2,-1.6,-204.9,-1,-286,-1.3 +One97 Communications Ltd.,PAYTM,543396,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"2,662.5","2,749.6",-231,-9.17%,180.1,7,-279.9,12.7,-290.5,-5,"-1,207.9",-19 +MTAR Technologies Ltd.,MTARTECH,543270,GENERAL INDUSTRIALS,DEFENCE,167.7,130.7,36.1,21.64%,5.8,5.5,25.7,5.2,20.5,6.7,103.3,33.6 +Capri Global Capital Ltd.,CGCL,531595,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),557.4,229.3,304.8,54.70%,23.1,195.8,86,20.8,65.2,3.2,231.2,11.2 +GMR Airports Infrastructure Ltd.,GMRINFRA,ASM,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"2,185","1,336.8",726.7,35.22%,373,695.8,-252,54.9,-91,-0.1,-370.9,-0.6 +Triveni Engineering & Industries Ltd.,TRIVENI,532356,FOOD BEVERAGES & TOBACCO,SUGAR,"1,629.7","1,554.5",62.9,3.89%,25.8,10.2,39.3,10.1,29.1,1.3,434.3,19.8 +Delhivery Ltd.,DELHIVERY,543529,TRANSPORTATION,TRANSPORTATION - LOGISTICS,"2,043","1,957.3",-15.6,-0.80%,171.2,19.6,-105.2,-2.1,-102.9,-1.4,-546.7,-7.5 +Life Insurance Corporation of India,LICI,543526,BANKING AND FINANCE,LIFE INSURANCE,"202,394.9","193,612.5","8,445",4.18%,0,0,"8,696.5","1,083.9","8,030.3",12.7,"37,204.8",58.8 +Campus Activewear Ltd.,CAMPUS,543523,RETAILING,FOOTWEAR,259.1,234.2,24.5,9.46%,18.1,6.5,0.4,0.1,0.3,0,103.1,3.4 +Motherson Sumi Wiring India Ltd.,MSUMI,543498,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,110.2","1,856.5",248.1,11.79%,36.4,7.4,210,54.1,155.9,0.3,523.6,1.2 +Olectra Greentech Ltd.,OLECTRA,532439,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,310.3,266.6,40.5,13.20%,8.8,9.7,25.2,8,18.6,2.2,78.5,9.6 +Patanjali Foods Ltd.,PATANJALI,500368,FMCG,EDIBLE OILS,"7,845.8","7,426.6",395.3,5.05%,60.1,24,335.1,80.5,254.5,7,875.2,24.2 +Raymond Ltd.,RAYMOND,500330,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"2,320.7","1,938.8",314.6,13.96%,65.4,89.3,204.2,50.7,159.8,24,"1,514.2",227.5 +Swan Energy Ltd.,SWANENERGY,503310,REALTY,REALTY,"1,230.1",966.3,257,21.01%,27.1,58.3,178.4,12.8,84.6,6.7,308.4,11.7 +Samvardhana Motherson International Ltd.,MOTHERSON,517334,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"23,639.2","21,585","1,888.8",8.05%,867.4,487.9,449.5,229.2,201.6,0.3,"1,910.3",2.8 +Vedant Fashions Ltd.,MANYAVAR,543463,RETAILING,SPECIALTY RETAIL,233.4,125.5,92.8,42.51%,32.5,10.7,64.8,16.1,48.7,2,399.9,16.5 +Adani Wilmar Ltd.,AWL,543458,FMCG,EDIBLE OILS,"12,331.2","12,123.5",143.7,1.17%,95.7,220.2,-161.8,-31.5,-130.7,-1,130.1,1 +Mahindra Lifespace Developers Ltd.,MAHLIFE,532313,REALTY,REALTY,25.7,52.7,-34.9,-196.45%,3.1,0.2,-30.3,-10.8,-18.9,-1.2,10.5,0.7 +Tejas Networks Ltd.,TEJASNET,540595,TELECOM SERVICES,OTHER TELECOM SERVICES,413.9,383,13,3.28%,41.7,7,-17.7,-5.1,-12.6,-0.7,-61.3,-3.5 +Aether Industries Ltd.,AETHER,543534,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,178.3,118.2,46,28.00%,9.7,1.6,48.7,12.1,36.7,2.8,139.1,10.5 +JBM Auto Ltd.,JBMA,ASM,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,238.8","1,091.3",139.7,11.35%,41.2,47.9,58.3,11.3,44.2,3.7,136.8,11.6 +Deepak Fertilisers & Petrochemicals Corporation Ltd.,DEEPAKFERT,500645,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"2,443.2","2,138.1",286.1,11.80%,81.2,107.1,116.8,53.3,60.1,4.8,674.5,53.4 +Sharda Cropchem Ltd.,SHARDACROP,538666,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,604.3,559.6,21.2,3.65%,74,4.6,-33.8,-6.3,-27.6,-3.1,191,21.2 +Shoppers Stop Ltd.,SHOPERSTOP,532638,RETAILING,DEPARTMENT STORES,"1,049.7",878.2,160.9,15.49%,108.2,54.9,3.5,0.8,2.7,0.2,94.2,8.6 +BEML Ltd.,BEML,500048,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,924,855.3,61.5,6.70%,15.8,10.8,42.2,-9.6,51.8,12.4,200.8,48.2 +Lemon Tree Hotels Ltd.,LEMONTREE,541233,HOTELS RESTAURANTS & TOURISM,HOTELS,230.1,125.3,101.9,44.84%,22.6,47.3,34.8,8.6,22.6,0.3,130.1,1.6 +Rainbow Childrens Medicare Ltd.,RAINBOW,543524,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,340.5,215.1,117.6,35.34%,26.8,13.3,85.2,22.1,62.9,6.2,215.4,21.2 +UCO Bank,UCOBANK,532505,BANKING AND FINANCE,BANKS,"5,865.6","1,581.5",981.9,18.81%,0,"3,302.3",639.8,238.1,403.5,0.3,"1,84",1.5 +Piramal Pharma Ltd.,PPLPHARMA,543635,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,960.6","1,645.7",265.6,13.90%,184.5,109.9,20.4,34.5,5,0,-133.6,-1 +KSB Ltd.,KSB,500249,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,572.2,493.4,70.3,12.47%,12.3,2,64.5,17.1,50.1,14.4,209.7,60.3 +Data Patterns (India) Ltd.,DATAPATTNS,543428,GENERAL INDUSTRIALS,DEFENCE,119.2,67.5,40.8,37.63%,3.1,2.3,46.3,12.5,33.8,6,148.3,26.5 +Global Health Ltd.,MEDANTA,543654,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,864.7,631.1,212.9,25.22%,42.9,20.1,170.6,45.4,125.2,4.7,408.9,15.2 +Aarti Industries Ltd.,AARTIIND,524208,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,454","1,221.2",232.8,16.01%,93,58.2,81.6,-9.1,90.7,2.5,446.2,12.3 +BLS International Services Ltd.,BLS,540073,DIVERSIFIED CONSUMER SERVICES,TRAVEL SUPPORT SERVICES,416.4,321,86.7,21.27%,7.3,1,87.2,5.2,78.7,1.9,267.6,6.5 +Archean Chemical Industries Ltd.,ACI,543657,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,301.7,195,95.5,32.86%,17.5,1.9,87.3,21.3,66,5.4,394.4,32.1 +Adani Power Ltd.,ADANIPOWER,ASM,UTILITIES,ELECTRIC UTILITIES,"14,935.7","7,819.2","5,171.4",39.81%,"1,004.5",888.4,"5,223.6","-1,370.6","6,594.2",16.5,"20,604.8",53.4 +Craftsman Automation Ltd.,CRAFTSMAN,543276,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,183.8",941.6,237.5,20.14%,66.8,41.6,133.8,29.6,94.5,44.1,298.3,141.2 +NMDC Ltd.,NMDC,526371,METALS & MINING,MINING,"4,335","2,823.6","1,190.4",29.66%,88.8,18.6,"1,404.1",379,"1,026.2",3.5,"5,862.2",20 +Epigral Ltd.,EPIGRAL,543332,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,479.1,370.2,107.9,22.57%,31.5,21.3,56.1,17.9,38,9.1,223.4,53.8 +Apar Industries Ltd.,APARINDS,532259,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"3,944.7","3,576.2",349.8,8.91%,28.2,103.1,237.3,62.9,173.9,45.4,783.9,204.8 +Bikaji Foods International Ltd.,BIKAJI,543653,FMCG,PACKAGED FOODS,614.7,521,87.7,14.41%,15.6,2.9,75.2,15.4,61.2,2.5,173.6,6.9 +Five-Star Business Finance Ltd.,FIVESTAR,543663,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),522.4,133.2,375,72.28%,5.7,105.9,267,67.6,199.4,6.8,703,24.1 +Ingersoll-Rand (India) Ltd.,INGERRAND,500210,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,282.8,210.7,65.7,23.76%,4.6,0.6,67,17.2,49.7,15.8,218.5,69.2 +KFIN Technologies Ltd.,KFINTECH,543720,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,215.3,115.3,93.7,44.82%,12.6,3.2,84.2,22.3,61.4,3.6,215.1,12.6 +Piramal Enterprises Ltd.,PEL,500302,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"2,205.2","1,320.1","1,117.9",50.97%,38.3,"1,038.9",-11.8,10.7,48.2,2,"3,906.5",173.9 +NMDC Steel Ltd.,NSLNISP,543768,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,290.3,349.6,-72.2,-26.04%,74.5,40.8,-174.7,-43.6,-131.1,-0.5,, +Eris Lifesciences Ltd.,ERIS,540596,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,508.8,324.2,181.1,35.85%,42.1,16.3,126.2,3.9,123.4,9.1,385.6,28.3 +Mankind Pharma Ltd.,MANKIND,543904,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"2,768.1","2,025.5",682.6,25.21%,96.5,8.6,637.5,129.8,501,12.5,"1,564.8",39.1 +Kaynes Technology India Ltd.,KAYNES,ASM,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,369.8,312.1,48.8,13.52%,6.5,11.8,39.4,7.1,32.3,5.5,143.2,24.6 +Safari Industries (India) Ltd.,SAFARI,523025,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,372.9,306.6,63.5,17.15%,12.2,2.2,51.9,12.1,39.8,16.7,162.3,68.2 +Saregama India Ltd.,SAREGAMA,532163,MEDIA,MOVIES & ENTERTAINMENT,185.6,111.5,60.9,35.32%,8.2,0.2,65.6,17.6,48.1,2.5,193.4,10 +Syrma SGS Technology Ltd.,SYRMA,543573,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,720.6,662.7,49,6.88%,11.6,8,37,6.4,28.3,1.6,132.4,7.5 +Jindal Saw Ltd.,JINDALSAW,ASM,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"5,488.9","4,662",804.2,14.71%,142.5,188.7,495.6,139.6,375.7,11.8,"1,135.8",35.5 +Godawari Power & Ispat Ltd.,GPIL,532734,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"1,314.2",929.6,361.4,28.00%,34.8,10.2,339.6,86.1,256.9,20.6,785.5,63 +Gillette India Ltd.,GILLETTE,507815,FMCG,PERSONAL PRODUCTS,676.2,530.8,136.7,20.48%,20.1,0.1,125.2,32.5,92.7,28.4,361.6,111 +Symphony Ltd.,SYMPHONY,517385,CONSUMER DURABLES,CONSUMER ELECTRONICS,286,234,41,14.91%,7,2,43,8,35,5.1,114,16.5 +Glenmark Life Sciences Ltd.,GLS,543322,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,600.7,428.3,167.1,28.06%,13.1,0.4,158.9,40.2,118.7,9.7,505.5,41.3 +Usha Martin Ltd.,USHAMART,517146,METALS & MINING,IRON & STEEL PRODUCTS,806,640.4,144.3,18.39%,18,6.4,141.2,35,109.5,3.6,399.4,13.1 +Ircon International Ltd.,IRCON,541956,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"3,136.3","2,771.2",215.7,7.22%,27.1,36.9,301.2,77.6,250.7,2.7,884.6,9.4 +Ujjivan Small Finance Bank Ltd.,UJJIVANSFB,542904,BANKING AND FINANCE,BANKS,"1,579.8",528.6,483.4,34.75%,0,567.8,436.4,108.7,327.7,1.7,"1,254.5",6.4 +Procter & Gamble Health Ltd.,PGHL,500126,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,311,216.3,88.7,29.08%,6.5,0.2,88,22.5,65.6,39.5,231.4,139.4 +Allcargo Logistics Ltd.,ALLCARGO,532749,TRANSPORTATION,TRANSPORTATION - LOGISTICS,"3,336.3","3,188.8",118,3.57%,106.7,36.7,14.2,1.3,21.8,0.9,361.9,14.7 +Sheela Foam Ltd.,SFL,540203,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,637.6,547,66.2,10.80%,21.9,8.6,60.2,15.6,44,4.5,192.4,17.7 +Alok Industries Ltd.,ALOKINDS,521070,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"1,369.3","1,323.1",35.9,2.64%,78.6,142.2,-174.6,0,-174.8,-0.3,-948.4,-1.9 +Minda Corporation Ltd.,MINDACORP,538962,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,197.9","1,064.5",131.3,10.98%,41.4,14.9,77,18.7,58.8,2.5,278.2,11.6 +Concord Biotech Ltd.,CONCORDBIO,543960,PHARMACEUTICALS & BIOTECHNOLOGY,BIOTECHNOLOGY,270.5,143.2,119.2,45.43%,13.3,0.8,113.2,28.7,81,7.7,, \ No newline at end of file diff --git a/sdk/ai/ai-projects/samples-dev/data/sampleFileForUpload.txt b/sdk/ai/ai-projects/samples-dev/data/sampleFileForUpload.txt new file mode 100644 index 000000000000..ab553b3304c1 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/data/sampleFileForUpload.txt @@ -0,0 +1 @@ +The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457. diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/README.md b/sdk/ai/ai-projects/samples/v1-beta/javascript/README.md new file mode 100644 index 000000000000..06bbcf3e1b9b --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/README.md @@ -0,0 +1,109 @@ +--- +page_type: sample +languages: + - javascript +products: + - azure +urlFragment: ai-projects-javascript-beta +--- + +# Azure AI Projects client library samples for JavaScript (Beta) + +These sample programs show how to use the JavaScript client libraries for Azure AI Projects in some common scenarios. + + + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node agents\agentCreateWithTracingConsole.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx dev-tool run vendored cross-env AZURE_AI_PROJECTS_CONNECTION_STRING="" APPLICATIONINSIGHTS_CONNECTION_STRING="" node agents\agentCreateWithTracingConsole.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + + diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentCreateWithTracingConsole.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentCreateWithTracingConsole.js new file mode 100644 index 000000000000..bb81023028ea --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentCreateWithTracingConsole.js @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Demonstrates How to instrument and get tracing using open telemetry. + * + * @summary Create Agent and instrument using open telemetry. + */ + +const { AzureMonitorTraceExporter } = require("@azure/monitor-opentelemetry-exporter"); +const { createAzureSdkInstrumentation } = require("@azure/opentelemetry-instrumentation-azure-sdk"); +const { context, trace } = require("@opentelemetry/api"); +const { registerInstrumentations } = require("@opentelemetry/instrumentation"); +const { + ConsoleSpanExporter, + NodeTracerProvider, + SimpleSpanProcessor, +} = require("@opentelemetry/sdk-trace-node"); + +require("dotenv").config(); + +const provider = new NodeTracerProvider(); +provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +provider.register(); + +registerInstrumentations({ + instrumentations: [createAzureSdkInstrumentation()], +}); + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { delay } = require("@azure/core-util"); +const { DefaultAzureCredential } = require("@azure/identity"); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; +let appInsightsConnectionString = process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"]; + +async function main() { + const tracer = trace.getTracer("Agents Sample", "1.0.0"); + + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + if (!appInsightsConnectionString) { + appInsightsConnectionString = await client.telemetry.getConnectionString(); + } + + if (appInsightsConnectionString) { + const exporter = new AzureMonitorTraceExporter({ + connectionString: appInsightsConnectionString, + }); + provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); + } + + await tracer.startActiveSpan("main", async (span) => { + client.telemetry.updateSettings({ enableContentRecording: true }); + + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + tracingOptions: { tracingContext: context.active() }, + }); + + console.log(`Created agent, agent ID : ${agent.id}`); + + const thread = await client.agents.createThread(); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "Hello, tell me a joke", + }); + console.log(`Created message, message ID ${message.id}`); + + // Create run + let run = await client.agents.createRun(thread.id, agent.id); + console.log(`Created Run, Run ID: ${run.id}`); + + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + } + + await client.agents.deleteAgent(agent.id); + + console.log(`Deleted agent`); + + await client.agents.listMessages(thread.id); + + span.end(); + }); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsAzureAiSearch.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsAzureAiSearch.js new file mode 100644 index 000000000000..e02cd85e24c3 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsAzureAiSearch.js @@ -0,0 +1,73 @@ +const { AIProjectsClient, isOutputOfType, ToolUtility } = require("@azure/ai-projects"); +const { delay } = require("@azure/core-util"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + // Create an Azure AI Client from a connection string, copied from your AI Foundry project. + // At the moment, it should be in the format ";;;" + // Customer needs to login to Azure subscription via Azure CLI and set the environment variables + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const connectionName = process.env["AZURE_AI_SEARCH_CONNECTION_NAME"] || ""; + const connection = await client.connections.getConnection(connectionName); + + // Initialize Azure AI Search tool + const azureAISearchTool = ToolUtility.createAzureAISearchTool(connection.id, connection.name); + + // Create agent with the Azure AI search tool + const agent = await client.agents.createAgent("gpt-4-0125-preview", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [azureAISearchTool.definition], + toolResources: azureAISearchTool.resources, + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread for communication + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message to thread + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "Hello, send an email with the datetime and weather information in New York", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create and process agent run in thread with tools + let run = await client.agents.createRun(thread.id, agent.id); + while (run.status === "queued" || run.status === "in_progress") { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + } + if (run.status === "failed") { + console.log(`Run failed: ${run.lastError}`); + } + console.log(`Run finished with status: ${run.status}`); + + // Delete the assistant when done + client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + + // Fetch and log all messages + const messages = await client.agents.listMessages(thread.id); + console.log(`Messages:`); + const agentMessage = messages.data[0].content[0]; + if (isOutputOfType(agentMessage, "text")) { + const textContent = agentMessage; + console.log(`Text Message Content - ${textContent.text.value}`); + } +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBasics.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBasics.js new file mode 100644 index 000000000000..9a54616331ac --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBasics.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic agent operations. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + + console.log(`Created agent, agent ID : ${agent.id}`); + + client.agents.deleteAgent(agent.id); + + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBingGrounding.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBingGrounding.js new file mode 100644 index 000000000000..c455574249fd --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBingGrounding.js @@ -0,0 +1,81 @@ +const { + AIProjectsClient, + ToolUtility, + connectionToolType, + isOutputOfType, +} = require("@azure/ai-projects"); +const { delay } = require("@azure/core-util"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + // Create an Azure AI Client from a connection string, copied from your AI Foundry project. + // At the moment, it should be in the format ";;;" + // Customer needs to login to Azure subscription via Azure CLI and set the environment variables + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const bingConnection = await client.connections.getConnection( + process.env["BING_CONNECTION_NAME"] || "", + ); + const connectionId = bingConnection.id; + + // Initialize agent bing tool with the connection id + const bingTool = ToolUtility.createConnectionTool(connectionToolType.BingGrounding, [ + connectionId, + ]); + + // Create agent with the bing tool and process assistant run + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [bingTool.definition], + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread for communication + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message to thread + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "How does wikipedia explain Euler's Identity?", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create and process agent run in thread with tools + let run = await client.agents.createRun(thread.id, agent.id); + while (run.status === "queued" || run.status === "in_progress") { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + } + if (run.status === "failed") { + console.log(`Run failed: ${run.lastError}`); + } + console.log(`Run finished with status: ${run.status}`); + + // Delete the assistant when done + client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + + // Fetch and log all messages + const messages = await client.agents.listMessages(thread.id); + console.log(`Messages:`); + const agentMessage = messages.data[0].content[0]; + if (isOutputOfType(agentMessage, "text")) { + const textContent = agentMessage; + console.log(`Text Message Content - ${textContent.text.value}`); + } +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBingGroundingWithStreaming.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBingGroundingWithStreaming.js new file mode 100644 index 000000000000..ac21304ece29 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsBingGroundingWithStreaming.js @@ -0,0 +1,105 @@ +const { + AIProjectsClient, + DoneEvent, + ErrorEvent, + MessageStreamEvent, + RunStreamEvent, + ToolUtility, + connectionToolType, + isOutputOfType, +} = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + // Create an Azure AI Client from a connection string, copied from your AI Foundry project. + // At the moment, it should be in the format ";;;" + // Customer needs to login to Azure subscription via Azure CLI and set the environment variables + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const bingConnection = await client.connections.getConnection( + process.env["BING_CONNECTION_NAME"] || "", + ); + const connectionId = bingConnection.id; + + const bingTool = ToolUtility.createConnectionTool(connectionToolType.BingGrounding, [ + connectionId, + ]); + + // Create agent with the bing tool and process assistant run + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [bingTool.definition], + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread for communication + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message to thread + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "How does wikipedia explain Euler's Identity?", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create and process agent run with streaming in thread with tools + const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); + + for await (const eventMessage of streamEventMessages) { + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${eventMessage.data.status}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart; + const textValue = textContent.text?.value || "No text"; + console.log(`Text delta received:: ${textValue}`); + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } + } + + // Delete the assistant when done + client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + + // Fetch and log all messages + const messages = await client.agents.listMessages(thread.id); + console.log(`Messages:`); + const agentMessage = messages.data[0].content[0]; + if (isOutputOfType(agentMessage, "text")) { + const textContent = agentMessage; + console.log(`Text Message Content - ${textContent.text.value}`); + } +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithFunctionTool.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithFunctionTool.js new file mode 100644 index 000000000000..1a0b1a06fb51 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithFunctionTool.js @@ -0,0 +1,181 @@ +const { AIProjectsClient, ToolUtility, isOutputOfType } = require("@azure/ai-projects"); +const { delay } = require("@azure/core-util"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const agents = client.agents; + class FunctionToolExecutor { + functionTools; + + constructor() { + this.functionTools = [ + { + func: this.getUserFavoriteCity, + ...ToolUtility.createFunctionTool({ + name: "getUserFavoriteCity", + description: "Gets the user's favorite city.", + parameters: {}, + }), + }, + { + func: this.getCityNickname, + ...ToolUtility.createFunctionTool({ + name: "getCityNickname", + description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", + parameters: { + type: "object", + properties: { + location: { type: "string", description: "The city and state, e.g. Seattle, Wa" }, + }, + }, + }), + }, + { + func: this.getWeather, + ...ToolUtility.createFunctionTool({ + name: "getWeather", + description: "Gets the weather for a location.", + parameters: { + type: "object", + properties: { + location: { type: "string", description: "The city and state, e.g. Seattle, Wa" }, + unit: { type: "string", enum: ["c", "f"] }, + }, + }, + }), + }, + ]; + } + + getUserFavoriteCity() { + return { location: "Seattle, WA" }; + } + + getCityNickname(_location) { + return { nickname: "The Emerald City" }; + } + + getWeather(_location, unit) { + return { weather: unit === "f" ? "72f" : "22c" }; + } + + invokeTool(toolCall) { + console.log(`Function tool call - ${toolCall.function.name}`); + const args = []; + if (toolCall.function.parameters) { + try { + const params = JSON.parse(toolCall.function.parameters); + for (const key in params) { + if (Object.prototype.hasOwnProperty.call(params, key)) { + args.push(params[key]); + } + } + } catch (error) { + console.error(`Failed to parse parameters: ${toolCall.function.parameters}`, error); + return undefined; + } + } + const result = this.functionTools + .find((tool) => tool.definition.function.name === toolCall.function.name) + ?.func(...args); + return result + ? { + toolCallId: toolCall.id, + output: JSON.stringify(result), + } + : undefined; + } + + getFunctionDefinitions() { + return this.functionTools.map((tool) => { + return tool.definition; + }); + } + } + + const functionToolExecutor = new FunctionToolExecutor(); + const functionTools = functionToolExecutor.getFunctionDefinitions(); + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: + "You are a weather bot. Use the provided functions to help answer questions. Customize your responses to the user's preferences as much as possible and use friendly nicknames for cities whenever possible.", + tools: functionTools, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "What's the weather like in my favorite city?", + }); + console.log(`Created message, message ID ${message.id}`); + + // Create run + let run = await agents.createRun(thread.id, agent.id); + console.log(`Created Run, Run ID: ${run.id}`); + + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await delay(1000); + run = await agents.getRun(thread.id, run.id); + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + if (run.status === "requires_action" && run.requiredAction) { + console.log(`Run requires action - ${run.requiredAction}`); + if (isOutputOfType(run.requiredAction, "submit_tool_outputs")) { + const submitToolOutputsActionOutput = run.requiredAction; + const toolCalls = submitToolOutputsActionOutput.submitToolOutputs.toolCalls; + const toolResponses = []; + for (const toolCall of toolCalls) { + if (isOutputOfType(toolCall, "function")) { + const toolResponse = functionToolExecutor.invokeTool(toolCall); + if (toolResponse) { + toolResponses.push(toolResponse); + } + } + } + if (toolResponses.length > 0) { + run = await agents.submitToolOutputsToRun(thread.id, run.id, toolResponses); + console.log(`Submitted tool response - ${run.status}`); + } + } + } + } + + console.log(`Run status - ${run.status}, run ID: ${run.id}`); + const messages = await agents.listMessages(thread.id); + messages.data.forEach((threadMessage) => { + console.log( + `Thread Message Created at - ${threadMessage.createdAt} - Role - ${threadMessage.role}`, + ); + threadMessage.content.forEach((content) => { + if (isOutputOfType(content, "text")) { + const textContent = content; + console.log(`Text Message Content - ${textContent.text.value}`); + } else if (isOutputOfType(content, "image_file")) { + const imageContent = content; + console.log(`Image Message Content - ${imageContent.imageFile.fileId}`); + } + }); + }); + // Delete agent + agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithToolset.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithToolset.js new file mode 100644 index 000000000000..922f7dc72946 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithToolset.js @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with toolset and iteration in streaming + * from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with toolset. + */ + +const { AIProjectsClient, ToolSet } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); +const dotenv = require("dotenv"); +const fs = require("fs"); +const path = require("node:path"); + +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file for code interpreter tool + const filePath1 = path.resolve(__dirname, "../data/nifty500QuarterlyResults.csv"); + const fileStream1 = fs.createReadStream(filePath1); + const codeInterpreterFile = await client.agents.uploadFile(fileStream1, "assistants", { + fileName: "myLocalFile", + }); + + console.log(`Uploaded local file, file ID : ${codeInterpreterFile.id}`); + + // Upload file for file search tool + const filePath2 = path.resolve(__dirname, "../data/sampleFileForUpload.txt"); + const fileStream2 = fs.createReadStream(filePath2); + const fileSearchFile = await client.agents.uploadFile(fileStream2, "assistants", { + fileName: "sampleFileForUpload.txt", + }); + console.log(`Uploaded file, file ID: ${fileSearchFile.id}`); + + // Create vector store for file search tool + const vectorStore = await client.agents.createVectorStoreAndPoll({ + fileIds: [fileSearchFile.id], + }); + + // Create tool set + const toolSet = new ToolSet(); + toolSet.addFileSearchTool([vectorStore.id]); + toolSet.addCodeInterpreterTool([codeInterpreterFile.id]); + + // Create agent with tool set + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: toolSet.toolDefinitions, + toolResources: toolSet.toolResources, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create threads, messages, and runs to interact with agent as desired + + // Delete agent + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/batchVectorStoreWithFiles.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/batchVectorStoreWithFiles.js new file mode 100644 index 000000000000..e5f9ec7a84fe --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/batchVectorStoreWithFiles.js @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the batch vector store with the list of files. + * + * @summary demonstrates how to create the batch vector store with the list of files. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); +const dotenv = require("dotenv"); +const { Readable } = require("stream"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload first file + const file1Content = "Hello, Vector Store!"; + const readable1 = new Readable(); + readable1.push(file1Content); + readable1.push(null); // end the stream + const file1 = await client.agents.uploadFile(readable1, "assistants", { + fileName: "vectorFile1.txt", + }); + console.log(`Uploaded file1, file ID: ${file1.id}`); + + // Create and upload second file + const file2Content = "This is another file for the Vector Store!"; + const readable2 = new Readable(); + readable2.push(file2Content); + readable2.push(null); // end the stream + const file2 = await client.agents.uploadFile(readable2, "assistants", { + fileName: "vectorFile2.txt", + }); + console.log(`Uploaded file2, file ID: ${file2.id}`); + + // Create vector store file batch + const vectorStoreFileBatch = await client.agents.createVectorStoreFileBatch(vectorStore.id, { + fileIds: [file1.id, file2.id], + }); + console.log( + `Created vector store file batch, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Retrieve vector store file batch + const _vectorStoreFileBatch = await client.agents.getVectorStoreFileBatch( + vectorStore.id, + vectorStoreFileBatch.id, + ); + console.log( + `Retrieved vector store file batch, vector store file batch ID: ${_vectorStoreFileBatch.id}`, + ); + + // List vector store files in the batch + const vectorStoreFiles = await client.agents.listVectorStoreFileBatchFiles( + vectorStore.id, + vectorStoreFileBatch.id, + ); + console.log( + `List of vector store files in the batch: ${vectorStoreFiles.data.map((f) => f.id).join(", ")}`, + ); + + // Delete files + await client.agents.deleteFile(file1.id); + console.log(`Deleted file1, file ID: ${file1.id}`); + await client.agents.deleteFile(file2.id); + console.log(`Deleted file2, file ID: ${file2.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/batchVectorStoreWithFilesAndPolling.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/batchVectorStoreWithFilesAndPolling.js new file mode 100644 index 000000000000..d1ef60dc4886 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/batchVectorStoreWithFilesAndPolling.js @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the batch vector store with the list of files using polling operation. + * + * @summary demonstrates how to create the batch vector store with the list of files using polling operation. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); +const dotenv = require("dotenv"); +const { Readable } = require("stream"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload first file + const file1Content = "Hello, Vector Store!"; + const readable1 = new Readable(); + readable1.push(file1Content); + readable1.push(null); // end the stream + const file1 = await client.agents.uploadFile(readable1, "assistants", { + fileName: "vectorFile1.txt", + }); + console.log(`Uploaded file1, file ID: ${file1.id}`); + + // Create and upload second file + const file2Content = "This is another file for the Vector Store!"; + const readable2 = new Readable(); + readable2.push(file2Content); + readable2.push(null); // end the stream + const file2 = await client.agents.uploadFile(readable2, "assistants", { + fileName: "vectorFile2.txt", + }); + console.log(`Uploaded file2, file ID: ${file2.id}`); + + // Set up abort controller (optional) + // Polling can then be stopped using abortController.abort() + const abortController = new AbortController(); + + // Create vector store file batch + const vectorStoreFileBatchOptions = { + fileIds: [file1.id, file2.id], + pollingOptions: { abortSignal: abortController.signal }, + }; + const poller = client.agents.createVectorStoreFileBatchAndPoll( + vectorStore.id, + vectorStoreFileBatchOptions, + ); + const vectorStoreFileBatch = await poller.pollUntilDone(); + console.log( + `Created vector store file batch with status ${vectorStoreFileBatch.status}, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Retrieve vector store file batch + const _vectorStoreFileBatch = await client.agents.getVectorStoreFileBatch( + vectorStore.id, + vectorStoreFileBatch.id, + ); + console.log( + `Retrieved vector store file batch, vector store file batch ID: ${_vectorStoreFileBatch.id}`, + ); + + // Delete files + await client.agents.deleteFile(file1.id); + console.log(`Deleted file1, file ID: ${file1.id}`); + await client.agents.deleteFile(file2.id); + console.log(`Deleted file2, file ID: ${file2.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/codeInterpreter.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/codeInterpreter.js new file mode 100644 index 000000000000..74f631d8de49 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/codeInterpreter.js @@ -0,0 +1,128 @@ +const { AIProjectsClient, isOutputOfType, ToolUtility } = require("@azure/ai-projects"); +const { delay } = require("@azure/core-util"); +const { DefaultAzureCredential } = require("@azure/identity"); +const dotenv = require("dotenv"); +const fs = require("fs"); +const path = require("node:path"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file and wait for it to be processed + const filePath = path.resolve(__dirname, "../data/nifty500QuarterlyResults.csv"); + const localFileStream = fs.createReadStream(filePath); + const localFile = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "localFile", + }); + + console.log(`Uploaded local file, file ID : ${localFile.id}`); + + // Create code interpreter tool + const codeInterpreterTool = ToolUtility.createCodeInterpreterTool([localFile.id]); + + // Notice that CodeInterpreter must be enabled in the agent creation, otherwise the agent will not be able to see the file attachment + const agent = await client.agents.createAgent("gpt-4o-mini", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [codeInterpreterTool.definition], + toolResources: codeInterpreterTool.resources, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create a thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create a message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: + "Could you please create a bar chart in the TRANSPORTATION sector for the operating profit from the uploaded CSV file and provide the file to me?", + }); + + console.log(`Created message, message ID: ${message.id}`); + + // Create and execute a run + let run = await client.agents.createRun(thread.id, agent.id); + while (run.status === "queued" || run.status === "in_progress") { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + } + if (run.status === "failed") { + // Check if you got "Rate limit is exceeded.", then you want to get more quota + console.log(`Run failed: ${run.lastError}`); + } + console.log(`Run finished with status: ${run.status}`); + + // Delete the original file from the agent to free up space (note: this does not delete your version of the file) + await client.agents.deleteFile(localFile.id); + console.log(`Deleted file, file ID: ${localFile.id}`); + + // Print the messages from the agent + const messages = await client.agents.listMessages(thread.id); + console.log("Messages:", messages); + + // Get most recent message from the assistant + const assistantMessage = messages.data.find((msg) => msg.role === "assistant"); + if (assistantMessage) { + const textContent = assistantMessage.content.find((content) => isOutputOfType(content, "text")); + if (textContent) { + console.log(`Last message: ${textContent.text.value}`); + } + } + + // Save the newly created file + console.log(`Saving new files...`); + const imageFile = messages.data[0].content[0].imageFile; + console.log(`Image file ID : ${imageFile}`); + const imageFileName = path.resolve( + __dirname, + "../data/" + (await client.agents.getFile(imageFile.fileId)).filename + "ImageFile.png", + ); + + const fileContent = await ( + await client.agents.getFileContent(imageFile.fileId).asNodeStream() + ).body; + if (fileContent) { + const chunks = []; + for await (const chunk of fileContent) { + chunks.push(Buffer.from(chunk)); + } + const buffer = Buffer.concat(chunks); + fs.writeFileSync(imageFileName, buffer); + } else { + console.error("Failed to retrieve file content: fileContent is undefined"); + } + console.log(`Saved image file to: ${imageFileName}`); + + // Iterate through messages and print details for each annotation + console.log(`Message Details:`); + messages.data.forEach((m) => { + console.log(`File Paths:`); + console.log(`Type: ${m.content[0].type}`); + if (isOutputOfType(m.content[0], "text")) { + const textContent = m.content[0]; + console.log(`Text: ${textContent.text.value}`); + } + console.log(`File ID: ${m.id}`); + console.log(`Start Index: ${messages.firstId}`); + console.log(`End Index: ${messages.lastId}`); + }); + + // Delete the agent once done + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/codeInterpreterWithStreaming.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/codeInterpreterWithStreaming.js new file mode 100644 index 000000000000..d61178d3638f --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/codeInterpreterWithStreaming.js @@ -0,0 +1,156 @@ +const { + AIProjectsClient, + DoneEvent, + ErrorEvent, + isOutputOfType, + MessageStreamEvent, + RunStreamEvent, + ToolUtility, +} = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +const dotenv = require("dotenv"); +const fs = require("fs"); +const path = require("node:path"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file and wait for it to be processed + const filePath = path.resolve(__dirname, "../data/nifty500QuarterlyResults.csv"); + const localFileStream = fs.createReadStream(filePath); + const localFile = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "myLocalFile", + }); + + console.log(`Uploaded local file, file ID : ${localFile.id}`); + + // Create code interpreter tool + const codeInterpreterTool = ToolUtility.createCodeInterpreterTool([localFile.id]); + + // Notice that CodeInterpreter must be enabled in the agent creation, otherwise the agent will not be able to see the file attachment + const agent = await client.agents.createAgent("gpt-4o-mini", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [codeInterpreterTool.definition], + toolResources: codeInterpreterTool.resources, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create a thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create a message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: + "Could you please create a bar chart in the TRANSPORTATION sector for the operating profit from the uploaded CSV file and provide the file to me?", + }); + + console.log(`Created message, message ID: ${message.id}`); + + // Create and execute a run + const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); + + for await (const eventMessage of streamEventMessages) { + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${eventMessage.data.status}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart; + const textValue = textContent.text?.value || "No text"; + console.log(`Text delta received:: ${textValue}`); + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } + } + + // Delete the original file from the agent to free up space (note: this does not delete your version of the file) + await client.agents.deleteFile(localFile.id); + console.log(`Deleted file, file ID : ${localFile.id}`); + + // Print the messages from the agent + const messages = await client.agents.listMessages(thread.id); + console.log("Messages:", messages); + + // Get most recent message from the assistant + const assistantMessage = messages.data.find((msg) => msg.role === "assistant"); + if (assistantMessage) { + const textContent = assistantMessage.content.find((content) => isOutputOfType(content, "text")); + if (textContent) { + console.log(`Last message: ${textContent.text.value}`); + } + } + + // Save the newly created file + console.log(`Saving new files...`); + const imageFileOutput = messages.data[0].content[0]; + const imageFile = imageFileOutput.imageFile.fileId; + const imageFileName = path.resolve( + __dirname, + "../data/" + (await client.agents.getFile(imageFile)).filename + "ImageFile.png", + ); + console.log(`Image file name : ${imageFileName}`); + + const fileContent = await (await client.agents.getFileContent(imageFile).asNodeStream()).body; + if (fileContent) { + const chunks = []; + for await (const chunk of fileContent) { + chunks.push(Buffer.from(chunk)); + } + const buffer = Buffer.concat(chunks); + fs.writeFileSync(imageFileName, buffer); + } else { + console.error("Failed to retrieve file content: fileContent is undefined"); + } + console.log(`Saved image file to: ${imageFileName}`); + + // Iterate through messages and print details for each annotation + console.log(`Message Details:`); + messages.data.forEach((m) => { + console.log(`File Paths:`); + console.log(`Type: ${m.content[0].type}`); + if (isOutputOfType(m.content[0], "text")) { + const textContent = m.content[0]; + console.log(`Text: ${textContent.text.value}`); + } + console.log(`File ID: ${m.id}`); + console.log(`Start Index: ${messages.firstId}`); + console.log(`End Index: ${messages.lastId}`); + }); + + // Delete the agent once done + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/fileSearch.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/fileSearch.js new file mode 100644 index 000000000000..e29c79511bf8 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/fileSearch.js @@ -0,0 +1,91 @@ +const { AIProjectsClient, isOutputOfType, ToolUtility } = require("@azure/ai-projects"); +const { delay } = require("@azure/core-util"); +const { DefaultAzureCredential } = require("@azure/identity"); + +const dotenv = require("dotenv"); +const fs = require("fs"); +const path = require("node:path"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file + const filePath = path.resolve(__dirname, "../data/sampleFileForUpload.txt"); + const localFileStream = fs.createReadStream(filePath); + const file = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "sampleFileForUpload.txt", + }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store + const vectorStore = await client.agents.createVectorStore({ + fileIds: [file.id], + name: "myVectorStore", + }); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Initialize file search tool + const fileSearchTool = ToolUtility.createFileSearchTool([vectorStore.id]); + + // Create agent with files + const agent = await client.agents.createAgent("gpt-4o", { + name: "SDK Test Agent - Retrieval", + instructions: "You are helpful agent that can help fetch data from files you know about.", + tools: [fileSearchTool.definition], + toolResources: fileSearchTool.resources, + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "Can you give me the documented codes for 'banana' and 'orange'?", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create run + let run = await client.agents.createRun(thread.id, agent.id); + while (["queued", "in_progress"].includes(run.status)) { + await delay(500); + run = await client.agents.getRun(thread.id, run.id); + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + } + + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + const messages = await client.agents.listMessages(thread.id); + messages.data.forEach((threadMessage) => { + console.log( + `Thread Message Created at - ${threadMessage.createdAt} - Role - ${threadMessage.role}`, + ); + threadMessage.content.forEach((content) => { + if (isOutputOfType(content, "text")) { + const textContent = content; + console.log(`Text Message Content - ${textContent.text.value}`); + } else if (isOutputOfType(content, "image_file")) { + const imageContent = content; + console.log(`Image Message Content - ${imageContent.imageFile.fileId}`); + } + }); + }); + + // Delete agent + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/files.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/files.js new file mode 100644 index 000000000000..eddabeccf8b8 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/files.js @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic files agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic files agent operations. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +const dotenv = require("dotenv"); +const { Readable } = require("stream"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create and upload file + const fileContent = "Hello, World!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + const file = await client.agents.uploadFile(readable, "assistants", { fileName: "myFile.txt" }); + console.log(`Uploaded file, file ID : ${file.id}`); + + // List uploaded files + const files = await client.agents.listFiles(); + + console.log(`List of files : ${files.data[0].filename}`); + + // Retrieve file + const _file = await client.agents.getFile(file.id); + + console.log(`Retrieved file, file ID : ${_file.id}`); + + // Delete file + await client.agents.deleteFile(file.id); + + console.log(`Deleted file, file ID : ${file.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/filesWithLocalUpload.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/filesWithLocalUpload.js new file mode 100644 index 000000000000..af31ee7700ee --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/filesWithLocalUpload.js @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic files agent operations with local file upload from the Azure Agents service. + * + * @summary demonstrates how to use basic files agent operations with local file upload. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +const dotenv = require("dotenv"); +const fs = require("fs"); +const path = require("node:path"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload local file + const filePath = path.resolve(__dirname, "../data/localFile.txt"); + const localFileStream = fs.createReadStream(filePath); + const localFile = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "myLocalFile.txt", + }); + + console.log(`Uploaded local file, file ID : ${localFile.id}`); + + // Retrieve local file + const retrievedLocalFile = await client.agents.getFile(localFile.id); + + console.log(`Retrieved local file, file ID : ${retrievedLocalFile.id}`); + + // Delete local file + await client.agents.deleteFile(localFile.id); + + console.log(`Deleted local file, file ID : ${localFile.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/filesWithPolling.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/filesWithPolling.js new file mode 100644 index 000000000000..cf299ae57114 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/filesWithPolling.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to upload a file and poll for its status. + * + * @summary demonstrates how to upload a file and poll for its status. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); +const dotenv = require("dotenv"); +const { Readable } = require("stream"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create file content + const fileContent = "Hello, World!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + + // Upload file and poll + const poller = client.agents.uploadFileAndPoll(readable, "assistants", { + fileName: "myPollingFile", + }); + const file = await poller.pollUntilDone(); + console.log(`Uploaded file with status ${file.status}, file ID : ${file.id}`); + + // Delete file + await client.agents.deleteFile(file.id); + console.log(`Deleted file, file ID ${file.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/messages.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/messages.js new file mode 100644 index 000000000000..1bb4454956a5 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/messages.js @@ -0,0 +1,45 @@ +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + const thread = await client.agents.createThread(); + + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + + const messages = await client.agents.listMessages(thread.id); + console.log(`Message ${message.id} contents: ${messages.data[0].content[0].text.value}`); + + const updatedMessage = await client.agents.updateMessage(thread.id, message.id, { + metadata: { introduction: "true" }, + }); + console.log(`Updated message metadata - introduction: ${updatedMessage.metadata?.introduction}`); + + await client.agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID : ${thread.id}`); + + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID : ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/runSteps.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/runSteps.js new file mode 100644 index 000000000000..022cde39b349 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/runSteps.js @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic run agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic run agent operations. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create agent + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create run + let run = await client.agents.createRun(thread.id, agent.id); + console.log(`Created run, run ID: ${run.id}`); + + // Wait for run to complete + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await new Promise((resolve) => setTimeout(resolve, 1000)); + run = await client.agents.getRun(thread.id, run.id); + console.log(`Run status: ${run.status}`); + } + + // List run steps + const runSteps = await client.agents.listRunSteps(thread.id, run.id); + console.log(`Listed run steps, run ID: ${run.id}`); + + // Get specific run step + const stepId = runSteps.data[0].id; + const step = await client.agents.getRunStep(thread.id, run.id, stepId); + console.log(`Retrieved run step, step ID: ${step.id}`); + + // Clean up + await client.agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/streaming.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/streaming.js new file mode 100644 index 000000000000..f94f3447510a --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/streaming.js @@ -0,0 +1,76 @@ +const { + AIProjectsClient, + DoneEvent, + ErrorEvent, + MessageStreamEvent, + RunStreamEvent, +} = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + const agent = await client.agents.createAgent("gpt-4-1106-preview", { + name: "my-assistant", + instructions: "You are helpful agent", + }); + + console.log(`Created agent, agent ID : ${agent.id}`); + + const thread = await client.agents.createThread(); + + console.log(`Created thread, thread ID : ${agent.id}`); + + await client.agents.createMessage(thread.id, { role: "user", content: "Hello, tell me a joke" }); + + console.log(`Created message, thread ID : ${agent.id}`); + + const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); + + for await (const eventMessage of streamEventMessages) { + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${eventMessage.data.status}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart; + const textValue = textContent.text?.value || "No text"; + console.log(`Text delta received:: ${textValue}`); + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } + } + + await client.agents.deleteAgent(agent.id); + console.log(`Delete agent, agent ID : ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/threads.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/threads.js new file mode 100644 index 000000000000..655262cb701e --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/threads.js @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic thread agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic thread agent operations. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + const thread = await client.agents.createThread(); + + console.log(`Created thread, thread ID : ${thread.id}`); + + const _thread = await client.agents.getThread(thread.id); + + console.log(`Retrieved thread, thread ID : ${_thread.id}`); + + client.agents.deleteThread(thread.id); + + console.log(`Deleted thread, thread ID : ${_thread.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoreWithFiles.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoreWithFiles.js new file mode 100644 index 000000000000..9e1632feb525 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoreWithFiles.js @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store with the list of files. + * + * @summary demonstrates how to create the vector store with the list of files. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); +const dotenv = require("dotenv"); +const { Readable } = require("stream"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload file + const fileContent = "Hello, Vector Store!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + const file = await client.agents.uploadFile(readable, "assistants", { + fileName: "vectorFile.txt", + }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store file + const vectorStoreFile = await client.agents.createVectorStoreFile(vectorStore.id, { + fileId: file.id, + }); + console.log(`Created vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Retrieve vector store file + const _vectorStoreFile = await client.agents.getVectorStoreFile( + vectorStore.id, + vectorStoreFile.id, + ); + console.log(`Retrieved vector store file, vector store file ID: ${_vectorStoreFile.id}`); + + // List vector store files + const vectorStoreFiles = await client.agents.listVectorStoreFiles(vectorStore.id); + console.log(`List of vector store files: ${vectorStoreFiles.data.map((f) => f.id).join(", ")}`); + + // Delete vector store file + await client.agents.deleteVectorStoreFile(vectorStore.id, vectorStoreFile.id); + console.log(`Deleted vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Delete file + await client.agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoreWithFilesAndPolling.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoreWithFilesAndPolling.js new file mode 100644 index 000000000000..c2971741015b --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoreWithFilesAndPolling.js @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store with the list of files using polling operation. + * + * @summary demonstrates how to create the vector store with the list of files using polling operation. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); +const dotenv = require("dotenv"); +const { Readable } = require("stream"); +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload file + const fileContent = "Hello, Vector Store!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + const file = await client.agents.uploadFile(readable, "assistants", { + fileName: "vectorFile.txt", + }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Set up abort controller (optional) + // Polling can then be stopped using abortController.abort() + const abortController = new AbortController(); + + // Create vector store file + const vectorStoreFileOptions = { + fileId: file.id, + pollingOptions: { sleepIntervalInMs: 2000, abortSignal: abortController.signal }, + }; + const poller = client.agents.createVectorStoreFileAndPoll(vectorStore.id, vectorStoreFileOptions); + const vectorStoreFile = await poller.pollUntilDone(); + console.log( + `Created vector store file with status ${vectorStoreFile.status}, vector store file ID: ${vectorStoreFile.id}`, + ); + + // Delete file + await client.agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStores.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStores.js new file mode 100644 index 000000000000..c4738431e4de --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStores.js @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store. + * + * @summary demonstrates how to create the vector store. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create a vector store + const vectorStore = await client.agents.createVectorStore({ name: "myVectorStore" }); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // List vector stores + const vectorStores = await client.agents.listVectorStores(); + console.log("List of vector stores:", vectorStores); + + // Modify the vector store + const updatedVectorStore = await client.agents.modifyVectorStore(vectorStore.id, { + name: "updatedVectorStore", + }); + console.log(`Updated vector store, vector store ID: ${updatedVectorStore.id}`); + + // Get a specific vector store + const retrievedVectorStore = await client.agents.getVectorStore(vectorStore.id); + console.log(`Retrieved vector store, vector store ID: ${retrievedVectorStore.id}`); + + // Delete the vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoresWithPolling.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoresWithPolling.js new file mode 100644 index 000000000000..e1f57e9307ec --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/vectorStoresWithPolling.js @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store using polling operation. + * + * @summary demonstrates how to create the vector store using polling operation. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Set up abort controller (optional) + // Polling can then be stopped using abortController.abort() + const abortController = new AbortController(); + + // Create a vector store + const vectorStoreOptions = { + name: "myVectorStore", + pollingOptions: { sleepIntervalInMs: 2000, abortSignal: abortController.signal }, + }; + const poller = client.agents.createVectorStoreAndPoll(vectorStoreOptions); + const vectorStore = await poller.pollUntilDone(); + console.log( + `Created vector store with status ${vectorStore.status}, vector store ID: ${vectorStore.id}`, + ); + + // Get a specific vector store + const retrievedVectorStore = await client.agents.getVectorStore(vectorStore.id); + console.log(`Retrieved vector store, vector store ID: ${retrievedVectorStore.id}`); + + // Delete the vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/connections/connectionsBasics.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/connections/connectionsBasics.js new file mode 100644 index 000000000000..23e02f38153b --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/connections/connectionsBasics.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to how to use basic connections operations. + * + * @summary Given an AIProjectClient, this sample demonstrates how to enumerate the properties of all connections, + * get the properties of a default connection, and get the properties of a connection by its name. + */ + +const { AIProjectsClient } = require("@azure/ai-projects"); +const { DefaultAzureCredential } = require("@azure/identity"); + +require("dotenv").config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main() { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Get the properties of the specified machine learning workspace + const workspace = await client.connections.getWorkspace(); + console.log(`Retrieved workspace, workspace name: ${workspace.name}`); + + // List the details of all the connections + const connections = await client.connections.listConnections(); + console.log(`Retrieved ${connections.length} connections`); + + // Get the details of a connection, without credentials + const connectionName = connections[0].name; + const connection = await client.connections.getConnection(connectionName); + console.log(`Retrieved connection, connection name: ${connection.name}`); + + // Get the details of a connection, including credentials (if available) + const connectionWithSecrets = await client.connections.getConnectionWithSecrets(connectionName); + console.log(`Retrieved connection with secrets, connection name: ${connectionWithSecrets.name}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + +module.exports = { main }; diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/data/localFile.txt b/sdk/ai/ai-projects/samples/v1-beta/javascript/data/localFile.txt new file mode 100644 index 000000000000..8ab686eafeb1 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/data/localFile.txt @@ -0,0 +1 @@ +Hello, World! diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/data/nifty500QuarterlyResults.csv b/sdk/ai/ai-projects/samples/v1-beta/javascript/data/nifty500QuarterlyResults.csv new file mode 100644 index 000000000000..e02068e09042 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/data/nifty500QuarterlyResults.csv @@ -0,0 +1,502 @@ +name,NSE_code,BSE_code,sector,industry,revenue,operating_expenses,operating_profit,operating_profit_margin,depreciation,interest,profit_before_tax,tax,net_profit,EPS,profit_TTM,EPS_TTM +3M India Ltd.,3MINDIA,523395,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,"1,057",847.4,192.1,18.48%,12.9,0.7,195.9,49.8,146.1,129.7,535.9,475.7 +ACC Ltd.,ACC,500410,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"4,644.8","3,885.4",549.3,12.39%,212.8,28.9,517.7,131.5,387.9,20.7,"1,202.7",64 +AIA Engineering Ltd.,AIAENG,532683,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,"1,357.1",912.7,382.1,29.51%,24.5,7.4,412.5,88.4,323.1,34.3,"1,216.1",128.9 +APL Apollo Tubes Ltd.,APLAPOLLO,533758,METALS & MINING,IRON & STEEL PRODUCTS,"4,65","4,305.4",325,7.02%,41.3,26.6,276.7,73.8,202.9,7.3,767.5,27.7 +Au Small Finance Bank Ltd.,AUBANK,540611,BANKING AND FINANCE,BANKS,"2,956.5","1,026.7",647.7,25.59%,0,"1,282.1",533.4,131.5,401.8,6,"1,606.2",24 +Adani Ports & Special Economic Zone Ltd.,ADANIPORTS,532921,TRANSPORTATION,MARINE PORT & SERVICES,"6,951.9","2,982.4","3,664",55.13%,974.5,520.1,"2,474.9",759,"1,747.8",8.1,"6,337",29.3 +Adani Energy Solutions Ltd.,ADANIENSOL,ASM,UTILITIES,ELECTRIC UTILITIES,"3,766.5","2,169.3","1,504.6",40.95%,432.1,640.8,369.9,84.9,275.9,2.5,"1,315.1",11.8 +Aditya Birla Fashion and Retail Ltd.,ABFRL,535755,RETAILING,DEPARTMENT STORES,"3,272.2","2,903.6",322.9,10.01%,388.8,208.4,-228.6,-28.2,-179.2,-1.9,-491.7,-5.2 +Aegis Logistics Ltd.,AEGISCHEM,500003,OIL & GAS,OIL MARKETING & DISTRIBUTION,"1,279.3","1,026.5",208.3,16.87%,34.1,26.6,192,42,127,3.6,509,14.5 +Ajanta Pharma Ltd.,AJANTPHARM,532331,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,049.8",737.8,290.7,28.26%,33.7,2.3,275.9,80.6,195.3,15.5,660.2,52.3 +Alembic Pharmaceuticals Ltd.,APLLTD,533573,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,605.1","1,386.7",208.2,13.06%,67.6,15.7,135.1,-1.9,136.6,7,531.7,27 +Alkem Laboratories Ltd.,ALKEM,539523,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"3,503.4","2,693.4",746.7,21.71%,73.9,30.3,648,33.1,620.5,51.9,"1,432.9",119.9 +Amara Raja Energy & Mobility Ltd.,ARE&M,500008,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,988.6","2,556.9",402.5,13.60%,115.7,6.2,309.8,83.5,226.3,13.2,779.8,45.7 +Ambuja Cements Ltd.,AMBUJACEM,500425,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"7,9","6,122.1","1,301.8",17.54%,380.9,61.2,"1,335.7",352.5,793,4,"2,777.9",14 +Apollo Hospitals Enterprise Ltd.,APOLLOHOSP,508869,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"4,869.1","4,219.4",627.5,12.95%,163.4,111.3,376.9,130.2,232.9,16.2,697.5,48.5 +Apollo Tyres Ltd.,APOLLOTYRE,500877,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"6,304.9","5,119.8","1,159.8",18.47%,360.3,132.8,679.9,205.8,474.3,7.5,"1,590.7",25 +Ashok Leyland Ltd.,ASHOKLEY,500477,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,"11,463","9,558.6","1,870.4",16.37%,226.6,715.1,924.4,358,526,1.8,"2,141.5",7.3 +Asian Paints Ltd.,ASIANPAINT,500820,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"8,643.8","6,762.3","1,716.2",20.24%,208.7,50.9,"1,621.8",418.6,"1,205.4",12.6,"5,062.6",52.8 +Astral Ltd.,ASTRAL,532830,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,"1,376.4","1,142.9",220.1,16.15%,48.7,8,176.8,45.1,131.2,4.9,549.7,20.4 +Atul Ltd.,ATUL,500027,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,215.8","1,038.5",155.2,13.00%,54,1.9,121.5,32.5,90.3,30.6,392.3,132.9 +Aurobindo Pharma Ltd.,AUROPHARMA,524804,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"7,406.4","5,846","1,373.4",19.02%,417.5,68.2,"1,074.7",323.7,757.2,12.8,"2,325.5",39.7 +Avanti Feeds Ltd.,AVANTIFEED,512573,FOOD BEVERAGES & TOBACCO,OTHER FOOD PRODUCTS,"1,312","1,184.5",94,7.35%,14.3,0.2,113,30.5,74.2,5.5,336.4,24.7 +Avenue Supermarts Ltd.,DMART,540376,RETAILING,DEPARTMENT STORES,"12,661.3","11,619.4","1,005",7.96%,174.4,15.6,851.9,228.6,623.6,9.6,"2,332.1",35.8 +Axis Bank Ltd.,AXISBANK,532215,BANKING AND FINANCE,BANKS,"33,122.2","9,207.3","9,166",33.43%,0,"14,749","8,313.8","2,096.1","6,204.1",20.1,"13,121",42.6 +Bajaj Auto Ltd.,BAJAJ-AUTO,532977,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"11,206.8","8,708.1","2,130.1",19.65%,91.8,6.5,"2,400.4",564,"2,02",71.4,"6,841.6",241.8 +Bajaj Finance Ltd.,BAJFINANCE,500034,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"13,381.8","2,851.5","9,449.7",70.63%,158.5,"4,537.1","4,757.6","1,207","3,550.8",58.7,"13,118.5",216.7 +Bajaj Finserv Ltd.,BAJAJFINSV,532978,DIVERSIFIED,HOLDING COMPANIES,"26,022.7","14,992.2","9,949.9",38.24%,208.8,"4,449.1","5,292","1,536.5","1,929",12.1,"7,422.6",46.6 +Bajaj Holdings & Investment Ltd.,BAJAJHLDNG,500490,DIVERSIFIED,HOLDING COMPANIES,240.1,33.5,191.2,85.08%,8.4,0.2,197.9,73.9,"1,491.2",134,"5,545.1",498.3 +Balkrishna Industries Ltd.,BALKRISIND,502355,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"2,360.3","1,720.5",532.7,23.64%,160.4,23.9,455.5,108.1,347.4,18,"1,047.5",54.2 +Balrampur Chini Mills Ltd.,BALRAMCHIN,500038,FOOD BEVERAGES & TOBACCO,SUGAR,"1,649","1,374.6",164.9,10.71%,41.2,17.2,215.9,56.6,166.3,8.2,540.5,26.8 +Bank of Baroda,BANKBARODA,532134,BANKING AND FINANCE,BANKS,"35,766","8,430.4","9,807.9",33.52%,0,"17,527.7","6,022.8","1,679.7","4,458.4",8.5,"18,602.9",35.9 +Bank of India,BANKINDIA,532149,BANKING AND FINANCE,BANKS,"16,779.4","3,704.9","3,818.8",25.35%,0,"9,255.7","2,977.4","1,488.6","1,498.5",3.6,"5,388.7",13.1 +Bata India Ltd.,BATAINDIA,500043,RETAILING,FOOTWEAR,834.6,637.5,181.7,22.18%,81.7,28.4,46.1,12.1,34,2.6,289.7,22.5 +Berger Paints (India) Ltd.,BERGEPAINT,509480,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"2,782.6","2,293.7",473.6,17.12%,82.9,21.1,385,96.7,291.6,2.5,"1,032.6",8.9 +Bharat Electronics Ltd.,BEL,500049,GENERAL INDUSTRIALS,DEFENCE,"4,146.1","2,994.9","1,014.2",25.30%,108.3,1.5,"1,041.5",260.7,789.4,1.1,"3,323",4.5 +Bharat Forge Ltd.,BHARATFORG,500493,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"3,826.7","3,152.8",621.4,16.47%,211.3,124.3,336.1,121.8,227.2,4.9,783.7,16.8 +Bharat Heavy Electricals Ltd.,BHEL,500103,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"5,305.4","5,513",-387.7,-7.56%,59.9,180.4,-447.9,-197.9,-238.1,-0.7,71.3,0.2 +Bharat Petroleum Corporation Ltd.,BPCL,500547,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"103,72","90,103.9","12,940.5",12.56%,"1,605.3",973.2,"10,755.7","2,812.2","8,243.5",38.7,"27,505.3",129.2 +Bharti Airtel Ltd.,BHARTIARTL,532454,TELECOM SERVICES,TELECOM SERVICES,"37,374.2","17,530.1","19,513.7",52.68%,"9,734.3","5,185.8","3,353.7","1,846.5","1,340.7",2.4,"7,547",13.2 +Indus Towers Ltd.,INDUSTOWER,534816,TELECOM SERVICES,OTHER TELECOM SERVICES,"7,229.7","3,498.8","3,633.7",50.95%,"1,525.6",458.6,"1,746.7",452,"1,294.7",4.8,"3,333.5",12.4 +Biocon Ltd.,BIOCON,532523,PHARMACEUTICALS & BIOTECHNOLOGY,BIOTECHNOLOGY,"3,620.2","2,720.7",741.6,21.42%,389.3,247.7,238.5,41.6,125.6,1.1,498.4,4.2 +Birla Corporation Ltd.,BIRLACORPN,500335,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,313.2","1,997",288.9,12.64%,143.5,95.4,77.1,18.8,58.4,7.6,153.1,19.9 +Blue Dart Express Ltd.,BLUEDART,526612,TRANSPORTATION,TRANSPORTATION - LOGISTICS,"1,329.7","1,101.8",222.7,16.82%,110.6,19.5,97.9,24.8,73.1,30.8,292.4,123.2 +Blue Star Ltd.,BLUESTARCO,500067,CONSUMER DURABLES,CONSUMER ELECTRONICS,"1,903.4","1,767.7",122.7,6.49%,23,17.6,95,24.3,70.7,3.6,437.7,21.3 +Bombay Burmah Trading Corporation Ltd.,BBTC,501425,FOOD BEVERAGES & TOBACCO,TEA & COFFEE,"4,643.5","3,664.7",859.2,18.99%,74.7,154.6,697.1,212.6,122,17.5,"-1,499.5",-214.8 +Bosch Ltd.,BOSCHLTD,500530,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"4,284.3","3,638.8",491.3,11.90%,101.3,12.2,"1,317",318.1,999.8,339,"2,126.9",721 +Brigade Enterprises Ltd.,BRIGADE,532929,REALTY,REALTY,"1,407.9","1,041.8",324.8,23.77%,75.7,110,180.3,67.8,133.5,5.8,298.2,12.9 +Britannia Industries Ltd.,BRITANNIA,500825,FMCG,PACKAGED FOODS,"4,485.2","3,560.5",872.4,19.68%,71.7,53.4,799.7,212.1,587.6,24.4,"2,536.2",105.3 +CCL Products India Ltd.,CCL,519600,FOOD BEVERAGES & TOBACCO,TEA & COFFEE,608.3,497.7,109.9,18.09%,22.6,18.4,69.7,8.8,60.9,4.6,279.9,21 +Crisil Ltd.,CRISIL,500092,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,771.8,544.2,191.7,26.05%,26.5,0.8,200.3,48.3,152,20.8,606.3,82.9 +Zydus Lifesciences Ltd.,ZYDUSLIFE,532321,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"4,422.8","3,222.7","1,146.1",26.23%,184.2,8.7,"1,007.2",226.4,800.7,7.9,"2,807.1",27.7 +Can Fin Homes Ltd.,CANFINHOME,511196,BANKING AND FINANCE,HOUSING FINANCE,871,49.7,749.2,86.01%,2.8,548.4,198,39.9,158.1,11.9,658.8,49.5 +Canara Bank,CANBK,532483,BANKING AND FINANCE,BANKS,"33,891.2","8,250.3","7,706.6",28.24%,0,"17,934.3","5,098","1,420.6","3,86",20.9,"13,968.4",77 +Carborundum Universal Ltd.,CARBORUNIV,513375,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"1,166",978.8,167.5,14.61%,45.9,4.9,136.4,43.7,101.9,5.4,461.3,24.3 +Castrol India Ltd.,CASTROLIND,500870,OIL & GAS,OIL MARKETING & DISTRIBUTION,"1,203.2",914.4,268.6,22.70%,22.9,2.4,263.5,69.1,194.4,2,815.5,8.2 +Ceat Ltd.,CEATLTD,500878,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"3,063.8","2,597.2",456.1,14.94%,124.5,71.7,270.4,68.3,208,51.4,521.7,129 +Central Bank of India,CENTRALBK,532885,BANKING AND FINANCE,BANKS,"8,438.5","2,565.4","1,535.4",20.81%,0,"4,337.7",567.2,-41.5,622,0.7,"2,181.4",2.5 +Century Plyboards (India) Ltd.,CENTURYPLY,532548,FOREST MATERIALS,FOREST PRODUCTS,"1,011.4",852.5,144.3,14.47%,23.4,6.1,129.4,32.2,96.9,4.4,380.7,17.1 +Cera Sanitaryware Ltd.,CERA,532443,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,476.2,387.2,76.5,16.49%,8.9,1.4,77.2,19.8,56.9,43.8,232.4,178.7 +Chambal Fertilisers & Chemicals Ltd.,CHAMBLFERT,500085,FERTILIZERS,FERTILIZERS,"5,467.3","4,770.5",615,11.42%,78.4,45.8,572.6,200.2,381,9.2,"1,137.7",27.3 +Cholamandalam Investment & Finance Company Ltd.,CHOLAFIN,511243,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"4,695.2",987.6,"3,235.1",69.99%,38.5,"2,204.2","1,065",288.8,772.9,9.4,"3,022.8",36.7 +Cipla Ltd.,CIPLA,500087,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"6,854.5","4,944.4","1,733.8",25.96%,290,25.8,"1,594.2",438.4,"1,130.9",14,"3,449.1",42.7 +City Union Bank Ltd.,CUB,532210,BANKING AND FINANCE,BANKS,"1,486.1",333.9,386.6,29.65%,0,765.6,330.6,50,280.6,3.8,943.8,12.7 +Coal India Ltd.,COALINDIA,533278,METALS & MINING,COAL,"34,760.3","24,639.4","8,137",24.83%,"1,178.2",182.5,"8,760.2","2,036.5","6,799.8",11,"28,059.6",45.5 +Colgate-Palmolive (India) Ltd.,COLPAL,500830,FMCG,PERSONAL PRODUCTS,"1,492.1",989,482.1,32.77%,44.3,1.1,457.8,117.8,340.1,12.5,"1,173.2",43.1 +Container Corporation of India Ltd.,CONCOR,531344,COMMERCIAL SERVICES & SUPPLIES,WAREHOUSING AND LOGISTICS,"2,299.8","1,648.4",546.5,24.90%,153.1,16.5,481.8,119,367.4,6,"1,186.2",19.5 +Coromandel International Ltd.,COROMANDEL,506395,FERTILIZERS,FERTILIZERS,"7,032.9","5,929.4","1,058.7",15.15%,54,46.2,"1,003.3",245,756.9,25.7,"2,024.2",68.8 +Crompton Greaves Consumer Electricals Ltd.,CROMPTON,539876,CONSUMER DURABLES,HOUSEHOLD APPLIANCES,"1,797.2","1,607.8",174.5,9.79%,32.1,21.5,135.8,34.9,97.2,1.5,432,6.7 +Cummins India Ltd.,CUMMINSIND,500480,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,"2,011.3","1,575.4",346.2,18.02%,38.3,6.8,390.9,99.6,329.1,11.9,"1,445.5",52.1 +Cyient Ltd.,CYIENT,532175,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,792","1,452.7",325.8,18.32%,65.8,27,240.3,56.7,178.3,16.3,665.6,60.1 +DCM Shriram Ltd.,DCMSHRIRAM,523367,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"2,73","2,593.9",114.1,4.21%,74,14.7,47.5,15.2,32.2,2.1,617.6,39.4 +DLF Ltd.,DLF,532868,REALTY,REALTY,"1,476.4",885.3,462.4,34.31%,37,90.2,464,112.2,622.8,2.5,"2,239",9 +Dabur India Ltd.,DABUR,500096,FMCG,PERSONAL PRODUCTS,"3,320.2","2,543",660.9,20.63%,98.3,28.1,650.8,144.3,515,2.9,"1,755.7",9.9 +Delta Corp Ltd.,DELTACORP,532848,COMMERCIAL SERVICES & SUPPLIES,MISC. COMMERCIAL SERVICES,282.6,170.5,100.1,36.99%,16.9,2.7,92.4,23,69.4,2.6,273.3,10.2 +Divi's Laboratories Ltd.,DIVISLAB,532488,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,995","1,43",479,25.09%,95,1,469,121,348,13.1,"1,331.8",50.3 +Dr. Lal Pathlabs Ltd.,LALPATHLAB,539524,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE SERVICES,619.4,423.5,177.8,29.57%,35.9,7.8,152.2,41.5,109.3,13.2,301.4,36.1 +Dr. Reddy's Laboratories Ltd.,DRREDDY,500124,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"7,217.6","4,888.8","2,008.3",29.09%,375.5,35.3,"1,912.5",434.5,"1,482.2",89.1,"5,091.2",305.2 +EID Parry (India) Ltd.,EIDPARRY,500125,FOOD BEVERAGES & TOBACCO,OTHER FOOD PRODUCTS,"9,210.3","8,002","1,057.5",11.67%,101.2,74.2,"1,032.8",246.8,452.3,25.5,991,55.8 +Eicher Motors Ltd.,EICHERMOT,505200,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"4,388.3","3,027.4","1,087.2",26.42%,142.5,12.7,"1,205.7",291.1,"1,016.2",37.1,"3,581",130.8 +Emami Ltd.,EMAMILTD,531162,FMCG,PERSONAL PRODUCTS,876,631.2,233.7,27.02%,46.1,2.2,196.4,15.8,178.5,4.1,697.8,16 +Endurance Technologies Ltd.,ENDURANCE,540153,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,560.5","2,226.7",318.3,12.51%,118.4,9.8,205.6,51.1,154.6,11,562.8,40 +Engineers India Ltd.,ENGINERSIN,532178,COMMERCIAL SERVICES & SUPPLIES,CONSULTING SERVICES,833.6,691.3,98.5,12.47%,8.3,0.4,133.6,32.2,127.5,2.3,472.7,8.4 +Escorts Kubota Ltd.,ESCORTS,500495,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,"2,154.4","1,798.6",260.7,12.66%,40.8,3.1,311.9,79.7,223.3,20.6,910.5,82.4 +Exide Industries Ltd.,EXIDEIND,500086,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"4,408.9","3,872.4",499.1,11.42%,141.5,29.7,365.3,95.2,269.4,3.2,872.7,10.3 +Federal Bank Ltd.,FEDERALBNK,500469,BANKING AND FINANCE,BANKS,"6,548.2","1,603.8","1,400.3",24.18%,0,"3,544.1","1,342.7",342.6,994.1,4.3,"3,671.4",15.6 +Finolex Cables Ltd.,FINCABLES,500144,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,229.3","1,041.3",146.1,12.30%,10.8,0.4,176.7,52.3,154.2,10.1,643.9,42.1 +Finolex Industries Ltd.,FINPIPE,500940,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,944.5,780.2,103,11.66%,27.4,12.5,124.5,35.4,98,1.6,459.3,7.4 +Firstsource Solutions Ltd.,FSL,532809,SOFTWARE & SERVICES,BPO/KPO,"1,556.9","1,311.2",228.8,14.86%,65.4,26.1,154.3,27.8,126.5,1.9,551.7,7.9 +GAIL (India) Ltd.,GAIL,532155,UTILITIES,UTILITIES,"33,191","29,405.5","3,580.2",10.85%,837.3,199.6,"2,748.7",696.3,"2,444.1",3.7,"5,283.8",8 +GlaxoSmithKline Pharmaceuticals Ltd.,GLAXO,500660,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,985.2,667.5,289.5,30.25%,18.1,0.4,299.2,81.7,217.5,12.8,647.8,38.2 +Glenmark Pharmaceuticals Ltd.,GLENMARK,532296,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"3,209.1","2,745.1",462.3,14.41%,141.5,121.5,-124.4,55.9,-81.9,-2.9,-196.3,-7 +Godrej Consumer Products Ltd.,GODREJCP,532424,FMCG,PERSONAL PRODUCTS,"3,667.9","2,897.8",704.2,19.55%,60.9,77.3,619.4,186.6,432.8,4.2,"1,750.1",17.1 +Godrej Industries Ltd.,GODREJIND,500164,DIVERSIFIED,DIVERSIFIED,"4,256.9","3,672.1",265.5,6.74%,89.3,333.1,162.4,75.9,87.3,2.6,880,26.1 +Godrej Properties Ltd.,GODREJPROP,533150,REALTY,REALTY,605.1,404.7,-61.7,-17.98%,7.4,48,145.1,38.8,66.8,2.4,662.6,23.8 +Granules India Ltd.,GRANULES,532482,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,191",976.5,213,17.90%,52.5,26,136,33.9,102.1,4.2,393.9,16.3 +Great Eastern Shipping Company Ltd.,GESHIP,500620,TRANSPORTATION,SHIPPING,"1,461.5",585.6,643.4,52.35%,186.7,77.1,611.9,17.3,594.7,41.6,"2,520.1",176.5 +Gujarat Alkalies & Chemicals Ltd.,GUJALKALI,530001,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"1,042.3",926.1,45.2,4.65%,95.2,10.8,10.2,-0.1,-18.4,-2.5,82.7,11.3 +Gujarat Gas Ltd.,GUJGASLTD,539336,UTILITIES,UTILITIES,"4,019.3","3,494.5",496.6,12.44%,117.9,7.8,399.1,102.9,296.2,4.3,"1,254.3",18.2 +Gujarat Narmada Valley Fertilizers & Chemicals Ltd.,GNFC,500670,FERTILIZERS,FERTILIZERS,"2,232","1,911",169,8.12%,78,1,242,64,182,11.7,932,60.1 +Gujarat Pipavav Port Ltd.,GPPL,533248,TRANSPORTATION,MARINE PORT & SERVICES,270.4,102,150.6,59.64%,28.8,2.2,141.1,53.4,92.3,1.9,341.8,7.1 +Gujarat State Fertilizer & Chemicals Ltd.,GSFC,500690,FERTILIZERS,FERTILIZERS,"3,313.2","2,881.4",237.3,7.61%,45.7,1.6,387,78.1,308.9,7.8,"1,056.2",26.5 +Gujarat State Petronet Ltd.,GSPL,532702,UTILITIES,UTILITIES,"4,455.9","3,497.2",913.7,20.72%,165,14.5,779.2,198.7,454.6,8.1,"1,522",27 +HCL Technologies Ltd.,HCLTECH,532281,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"27,037","20,743","5,929",22.23%,"1,01",156,"5,128","1,295","3,832",14.2,"15,445",56.9 +HDFC Bank Ltd.,HDFCBANK,500180,BANKING AND FINANCE,BANKS,"107,566.6","42,037.6","24,279.1",32.36%,0,"41,249.9","20,967.4","3,655","16,811.4",22.2,"54,474.6",71.8 +Havells India Ltd.,HAVELLS,517354,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"3,952.8","3,527",373.4,9.57%,81.2,9.3,335.3,86.2,249.1,4,"1,177.7",18.8 +Hero MotoCorp Ltd.,HEROMOTOCO,500182,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"9,741.2","8,173.5","1,359.5",14.26%,187.1,25,"1,355.6",353.1,"1,006.3",50.3,"3,247.6",162.5 +HFCL Ltd.,HFCL,500183,TELECOMMUNICATIONS EQUIPMENT,TELECOM CABLES,"1,128.7",978.9,132.6,11.93%,21.4,34.8,93.5,24,69.4,0.5,305.5,2.1 +Hindalco Industries Ltd.,HINDALCO,500440,METALS & MINING,ALUMINIUM AND ALUMINIUM PRODUCTS,"54,632","48,557","5,612",10.36%,"1,843","1,034","3,231","1,035","2,196",9.9,"8,423",37.9 +Hindustan Copper Ltd.,HINDCOPPER,513599,METALS & MINING,COPPER,392.6,260.2,121.2,31.77%,45.6,4.1,82.6,21.9,60.7,0.6,320.5,3.3 +Hindustan Petroleum Corporation Ltd.,HINDPETRO,500104,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"96,093.4","87,512","8,24",8.61%,"1,247.3",590,"6,744.1","1,616","5,827",41.1,"16,645",117.3 +Hindustan Unilever Ltd.,HINDUNILVR,500696,FMCG,PERSONAL PRODUCTS,"15,806","11,826","3,797",24.30%,297,88,"3,59",931,"2,656",11.3,"10,284",43.8 +Hindustan Zinc Ltd.,HINDZINC,500188,METALS & MINING,ZINC,"7,014","3,652","3,139",46.22%,825,232,"2,305",576,"1,729",4.1,"8,432",20 +Housing and Urban Development Corporation Ltd.,HUDCO,540530,BANKING AND FINANCE,HOUSING FINANCE,"1,880.8",82.7,"1,809.6",97.04%,2.4,"1,216.8",606.4,154.7,451.6,2.3,"1,790.7",8.9 +ITC Ltd.,ITC,500875,FOOD BEVERAGES & TOBACCO,CIGARETTES-TOBACCO PRODUCTS,"18,439.3","11,320.2","6,454.2",36.31%,453,9.9,"6,656.2","1,700.3","4,898.1",3.9,"20,185.1",16.2 +ICICI Bank Ltd.,ICICIBANK,532174,BANKING AND FINANCE,BANKS,"57,292.3","23,911","15,473.2",39.74%,0,"17,908","14,824.2","3,808.8","11,805.6",15.6,"41,086.8",58.7 +ICICI Prudential Life Insurance Company Ltd.,ICICIPRULI,540133,BANKING AND FINANCE,LIFE INSURANCE,"17,958.1","17,612.3",-229.6,-1.32%,0,0,340.2,32.5,243.9,1.7,906.9,6.3 +IDBI Bank Ltd.,IDBI,500116,BANKING AND FINANCE,BANKS,"7,063.7","1,922.3","2,175.3",36.02%,0,"2,966.1","2,396.9","1,003.7","1,385.4",1.3,"4,776.3",4.4 +IDFC First Bank Ltd.,IDFCFIRSTB,539437,BANKING AND FINANCE,BANKS,"8,765.8","3,849","1,511.2",20.54%,0,"3,405.6",982.8,236,746.9,1.1,"2,911.1",4.3 +IDFC Ltd.,IDFC,532659,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),36.7,6,30.6,83.56%,0,0,30.6,6.6,223.5,1.4,"4,147.1",25.9 +IRB Infrastructure Developers Ltd.,IRB,532947,CEMENT AND CONSTRUCTION,ROADS & HIGHWAYS,"1,874.5",950.4,794.6,45.54%,232.7,434.6,256.9,85.8,95.7,0.2,501,0.8 +ITI Ltd.,ITI,523610,TELECOMMUNICATIONS EQUIPMENT,TELECOM EQUIPMENT,256.1,299.3,-52.8,-21.42%,13.3,69.3,-125.8,0,-126,-1.3,-388.4,-4 +Vodafone Idea Ltd.,IDEA,532822,TELECOM SERVICES,TELECOM SERVICES,"10,750.8","6,433.5","4,282.8",39.97%,"5,667.3","6,569","-7,919",817.7,"-8,737.9",-1.8,"-30,986.8",-6.4 +India Cements Ltd.,INDIACEM,530005,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"1,272.4","1,26",4.4,0.35%,55,60.4,-103,-17.4,-80.1,-2.6,-261.1,-8.4 +Indiabulls Housing Finance Ltd.,IBULHSGFIN,535789,BANKING AND FINANCE,HOUSING FINANCE,"2,242.3",190.6,"1,779.2",79.88%,22.9,"1,349.8",421.6,123.6,298,6.5,"1,146",24.3 +Indian Bank,INDIANB,532814,BANKING AND FINANCE,BANKS,"15,929.4","3,599.1","4,327.7",31.44%,0,"8,002.6","2,776.7",768.6,"2,068.5",16.6,"6,893.3",55.3 +Indian Hotels Company Ltd.,INDHOTEL,500850,HOTELS RESTAURANTS & TOURISM,HOTELS,"1,480.9","1,078.4",354.8,24.75%,111.2,59,232.2,72.3,166.9,1.2,"1,100.3",7.7 +Indian Oil Corporation Ltd.,IOC,530965,OIL & GAS,OIL MARKETING & DISTRIBUTION,"179,752.1","156,013.1","23,328.4",13.01%,"3,609.6","2,135","18,090.2","4,699.7","13,114.3",9.5,"38,614.3",27.3 +Indian Overseas Bank,IOB,532388,BANKING AND FINANCE,BANKS,"6,941.5","1,785.1","1,679.8",28.84%,0,"3,476.6",635.5,8.3,627.2,0.3,"2,341.9",1.2 +Indraprastha Gas Ltd.,IGL,532514,UTILITIES,UTILITIES,"3,520.2","2,801.6",656.9,18.99%,102.2,2.5,613.9,151.4,552.7,7.9,"1,806.2",25.8 +IndusInd Bank Ltd.,INDUSINDBK,532187,BANKING AND FINANCE,BANKS,"13,529.7","3,449.9","3,908.7",34.75%,0,"6,171.1","2,934.9",732.9,"2,202.2",28.4,"8,333.7",107.2 +Info Edge (India) Ltd.,NAUKRI,532777,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,792,421.2,204.7,32.70%,25.9,8.2,382.8,68.7,205.1,15.9,-25.6,-2 +InterGlobe Aviation Ltd.,INDIGO,539448,TRANSPORTATION,AIRLINES,"15,502.9","12,743.6","2,200.3",14.72%,"1,549","1,021.3",189.1,0.2,188.9,4.9,"5,621.3",145.7 +Ipca Laboratories Ltd.,IPCALAB,524494,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"2,072.5","1,712.7",321.3,15.80%,90.3,44.1,225.4,87.9,145.1,5.7,492.2,19.4 +J B Chemicals & Pharmaceuticals Ltd.,JBCHEPHARM,506943,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,889.4,638.2,243.5,27.62%,32.2,10.4,208.7,58.1,150.6,9.7,486.6,31.4 +JK Cement Ltd.,JKCEMENT,532644,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,782.1","2,285.8",467,16.96%,137.1,115,244.2,65.7,178.1,23.1,444,57.5 +JK Lakshmi Cement Ltd.,JKLAKSHMI,500380,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"1,588.5","1,357.3",217.3,13.80%,56.6,33.6,141,45.1,92.7,7.9,357.6,30.4 +JM Financial Ltd.,JMFINANCIL,523405,DIVERSIFIED,HOLDING COMPANIES,"1,214",407.9,662.6,55.34%,13.2,388.1,277.9,72.4,194.9,2,608.1,6.4 +JSW Energy Ltd.,JSWENERGY,533148,UTILITIES,ELECTRIC UTILITIES,"3,387.4","1,379","1,880.4",57.69%,408.7,513.7,"1,085.9",235.1,850.2,5.2,"1,591.7",9.7 +JSW Steel Ltd.,JSWSTEEL,500228,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"44,821","36,698","7,886",17.69%,"2,019","2,084","4,609","1,812","2,76",11.4,"9,252",38.1 +Jindal Stainless Ltd.,JSL,532508,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"9,829","8,566.5","1,230.6",12.56%,221.9,155.6,985.7,229.1,774.3,9.4,"2,600.2",31.6 +Jindal Steel & Power Ltd.,JINDALSTEL,532286,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"12,282","9,964.5","2,285.7",18.66%,603.7,329.4,"1,384.5",-5.8,"1,387.8",13.8,"4,056",40.4 +Jubilant Foodworks Ltd.,JUBLFOOD,533155,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,"1,375.7","1,091.4",277.2,20.25%,141.9,56.8,85.5,23.3,97.2,1.5,235,3.6 +Just Dial Ltd.,JUSTDIAL,535648,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,318.5,211.8,48.8,18.71%,12.2,2.4,92.1,20.3,71.8,8.4,314.1,36.9 +Jyothy Labs Ltd.,JYOTHYLAB,532926,FMCG,PERSONAL PRODUCTS,745.6,597,135.4,18.48%,12.3,1.2,135.1,31.1,104.2,2.8,326.9,8.9 +KRBL Ltd.,KRBL,530813,FMCG,PACKAGED FOODS,"1,246.5","1,018.9",194.5,16.03%,19.9,0.8,206.8,53.6,153.3,6.5,671.4,29.3 +Kajaria Ceramics Ltd.,KAJARIACER,500233,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"1,129.9",941.9,179.7,16.02%,36.1,4.3,147.7,36.6,108,6.8,397.8,25 +Kalpataru Projects International Ltd.,KPIL,522287,UTILITIES,ELECTRIC UTILITIES,"4,53","4,148",370,8.19%,113,137,132,42,89,5.5,478,29.9 +Kansai Nerolac Paints Ltd.,KANSAINER,500165,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"1,978.6","1,683.3",273.2,13.97%,47.4,7.6,240.3,64.8,177.2,2.2,"1,118.8",13.8 +Karur Vysya Bank Ltd.,KARURVYSYA,590003,BANKING AND FINANCE,BANKS,"2,336",616.4,637.9,31.94%,0,"1,081.7",511.5,133.1,378.4,4.7,"1,364.2",17 +KEC International Ltd.,KEC,532714,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"4,514.9","4,224.7",274.3,6.10%,46.5,177.8,65.8,9.9,55.8,2.2,187.9,7.3 +Kotak Mahindra Bank Ltd.,KOTAKBANK,500247,BANKING AND FINANCE,BANKS,"21,559.5","9,681","6,343",46.24%,0,"5,535.5","5,888.3","1,465.5","4,461",22.4,"17,172.7",86.4 +L&T Finance Holdings Ltd.,L&TFH,533519,DIVERSIFIED,HOLDING COMPANIES,"3,482.1",935.3,"1,882.4",58.57%,28.3,"1,324.9",797.4,203.2,595.1,2.4,"2,080.8",8.4 +L&T Technology Services Ltd.,LTTS,540115,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"2,427.7","1,910.9",475.6,19.93%,68.1,12.6,436.1,120.2,315.4,29.8,"1,239.7",117.5 +LIC Housing Finance Ltd.,LICHSGFIN,500253,BANKING AND FINANCE,HOUSING FINANCE,"6,765.9",250.6,"6,095.7",90.10%,13.2,"4,599.9","1,483",291.2,"1,193.5",21.7,"4,164.5",75.7 +Lakshmi Machine Works Ltd.,LAXMIMACH,500252,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,"1,355.5","1,184.5",136,10.30%,23.6,0,147.4,32.3,115.1,107.8,416,389.5 +Laurus Labs Ltd.,LAURUSLABS,540222,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,226.2","1,036.6",187.9,15.34%,93.4,42.4,53.9,14.6,37,0.7,367.8,6.8 +Lupin Ltd.,LUPIN,500257,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"5,079","4,120.8",917.8,18.21%,247.8,80.6,629.7,134.3,489.5,10.8,"1,331.2",29.2 +MMTC Ltd.,MMTC,513377,COMMERCIAL SERVICES & SUPPLIES,COMMODITY TRADING & DISTRIBUTION,-167.2,-180.1,-30.4,14.42%,0.8,1.1,12.1,1.5,52,0.3,174.1,1.2 +MRF Ltd.,MRF,500290,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"6,287.8","5,060.2","1,156.9",18.61%,351.5,85.5,790.6,203.9,586.7,1383.3,"1,690.9",3988 +Mahanagar Gas Ltd.,MGL,539957,UTILITIES,UTILITIES,"1,772.7","1,250.1",478.9,27.70%,65.8,2.5,454.3,115.8,338.5,34.3,"1,147.8",116.2 +Mahindra & Mahindra Financial Services Ltd.,M&MFIN,532720,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"3,863.5","1,077.5","2,109.3",55.03%,67.1,"1,703.4",369.1,96,281.1,2.3,"1,982.5",16 +Mahindra & Mahindra Ltd.,M&M,500520,AUTOMOBILES & AUTO COMPONENTS,CARS & UTILITY VEHICLES,"35,027.2","28,705.9","5,729.6",16.64%,"1,138.6","1,835.2","3,347.5","1,083.7","2,347.8",21.1,"11,169.4",100.2 +Mahindra Holidays & Resorts India Ltd.,MHRIL,533088,HOTELS RESTAURANTS & TOURISM,HOTELS,672.2,519.3,136,20.76%,83.8,33.3,35.8,14,21.3,1.1,66,3.3 +Manappuram Finance Ltd.,MANAPPURAM,531213,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"2,174",555.6,"1,481.3",68.68%,62.5,689.4,746.7,186.1,558.4,6.6,"1,859.8",22 +Mangalore Refinery And Petrochemicals Ltd.,MRPL,500109,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"22,904.7","20,705.6","2,138.2",9.36%,296,311.2,"1,592",546.2,"1,051.7",6,"3,784.9",21.6 +Marico Ltd.,MARICO,531642,FMCG,PERSONAL PRODUCTS,"2,514","1,979",497,20.07%,39,20,476,116,353,2.7,"1,41",10.9 +Maruti Suzuki India Ltd.,MARUTI,532500,AUTOMOBILES & AUTO COMPONENTS,CARS & UTILITY VEHICLES,"37,902.1","32,282.5","4,790.3",12.92%,794.4,35.1,"4,790.1","1,083.8","3,764.3",124.6,"11,351.8",375.9 +Max Financial Services Ltd.,MFSL,500271,BANKING AND FINANCE,LIFE INSURANCE,"10,189.1","10,024.6",143.9,1.42%,0.8,9.4,158.2,-12.1,147.9,4.3,506.4,14.7 +UNO Minda Ltd.,UNOMINDA,532539,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"3,630.2","3,219.8",401.6,11.09%,125.4,27.2,257.9,73.3,225,3.9,742.4,13 +Motilal Oswal Financial Services Ltd.,MOTILALOFS,532892,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,"1,650.7",724.1,904.5,55.18%,17.3,241.1,657.6,124.2,531.2,35.9,"1,449.3",97.8 +MphasiS Ltd.,MPHASIS,526299,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"3,325.5","2,680.9",595.6,18.18%,89,34,521.7,129.7,391.9,20.8,"1,605.6",85.1 +Muthoot Finance Ltd.,MUTHOOTFIN,533398,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"3,631.9",723.4,"2,801.6",77.69%,22.2,"1,335","1,470.2",374.9,"1,059.6",26.4,"3,982.9",99.2 +Natco Pharma Ltd.,NATCOPHARM,524816,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,060.8",573.4,458,44.41%,43.6,4.2,439.6,70.6,369,20.6,"1,127.4",63 +NBCC (India) Ltd.,NBCC,534309,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"2,129.1","1,957.7",95.5,4.65%,1.3,0,104.6,22.9,79.6,0.4,332.2,1.8 +NCC Ltd.,NCC,500294,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"4,746.4","4,415.9",303.7,6.44%,53.2,153.5,123.8,38.8,77.3,1.2,599.4,9.5 +NHPC Ltd.,NHPC,533098,UTILITIES,ELECTRIC UTILITIES,"3,113.8","1,173.9","1,757.4",59.95%,294.9,104.8,"1,618.3",-75,"1,545.8",1.5,"3,897.8",3.9 +Coforge Ltd.,COFORGE,532541,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"2,285.1","1,935.3",340.9,14.98%,77.2,31.9,240.7,52.8,187.9,29.6,696.2,113.2 +NLC India Ltd.,NLCINDIA,513683,UTILITIES,ELECTRIC UTILITIES,"3,234","2,143",834.6,28.03%,455.1,213.9,"1,700.6",614.7,"1,084.7",7.8,"1,912.3",13.8 +NTPC Ltd.,NTPC,532555,UTILITIES,ELECTRIC UTILITIES,"45,384.6","32,303.2","12,680.2",28.19%,"4,037.7","2,920.5","6,342.9","2,019.7","4,614.6",4.8,"19,125.2",19.7 +Narayana Hrudayalaya Ltd.,NH,539551,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"1,323.6",997.1,308.1,23.61%,55.3,22.9,248.4,21.7,226.6,11.2,737.5,36.1 +National Aluminium Company Ltd.,NATIONALUM,532234,METALS & MINING,ALUMINIUM AND ALUMINIUM PRODUCTS,"3,112","2,646.9",396.5,13.03%,186.2,4,275,68.7,187.3,1,"1,272.4",6.9 +Navin Fluorine International Ltd.,NAVINFLUOR,532504,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,494.9,373.4,98.3,20.84%,24.2,20,77.2,16.6,60.6,12.2,365,73.7 +Oberoi Realty Ltd.,OBEROIRLTY,533273,REALTY,REALTY,"1,243.8",579.2,638.2,52.42%,11.3,56.5,596.8,142.1,456.8,12.6,"1,961.3",53.9 +Oil And Natural Gas Corporation Ltd.,ONGC,500312,OIL & GAS,EXPLORATION & PRODUCTION,"149,388.5","118,618.4","28,255.3",19.24%,"6,698.1","2,603.3","21,564.9","5,633.6","13,734.1",10.9,"43,072.5",34.2 +Oil India Ltd.,OIL,533106,OIL & GAS,EXPLORATION & PRODUCTION,"9,200.1","5,293.3","3,523.2",39.96%,499,278.9,762,67.6,420.7,3.9,"5,874.5",54.2 +Oracle Financial Services Software Ltd.,OFSS,532466,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,509.6",886.4,558.1,38.64%,19,8,596.2,178.8,417.4,48.2,"1,835.1",211.9 +PI Industries Ltd.,PIIND,523642,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,"2,163.8","1,565.5",551.4,26.05%,80.3,7.8,510.2,31.7,480.5,31.7,"1,495.8",98.4 +PNB Housing Finance Ltd.,PNBHOUSING,540173,BANKING AND FINANCE,HOUSING FINANCE,"1,779.4",158.8,"1,574.1",88.54%,11.3,"1,057.3",507.1,124.1,383,14.8,"1,278.7",49.3 +PNC Infratech Ltd.,PNCINFRA,539150,CEMENT AND CONSTRUCTION,ROADS & HIGHWAYS,"1,932.4","1,511.6",399.8,20.92%,40.9,161.3,218.6,70.7,147.9,5.8,614.3,23.9 +PVR INOX Ltd.,PVRINOX,532689,RETAILING,SPECIALTY RETAIL,"2,023.7","1,293.1",706.8,35.34%,308.6,200.3,221.7,55.5,166.3,17,-232.5,-23.7 +Page Industries Ltd.,PAGEIND,532827,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,"1,126.8",891.6,233.5,20.76%,24.6,11.2,199.4,49.1,150.3,134.7,510.7,457.9 +Persistent Systems Ltd.,PERSISTENT,533179,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"2,449","2,006.5",405.2,16.80%,74.4,12.3,355.8,92.5,263.3,35,981.5,127.6 +Petronet LNG Ltd.,PETRONET,532522,OIL & GAS,OIL MARKETING & DISTRIBUTION,"12,686.2","11,317.9","1,214.7",9.69%,194.8,74.7,"1,098.8",283.9,855.7,5.7,"3,490.3",23.3 +Pfizer Ltd.,PFIZER,500680,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,611.3,392.6,182.6,31.75%,15.4,2.7,200.5,51.6,149,32.6,522.8,114.3 +Phoenix Mills Ltd.,PHOENIXLTD,503100,REALTY,REALTY,906.6,361.2,506,57.82%,65.9,96.5,375.2,71.4,252.6,14.2,923.6,51.7 +Pidilite Industries Ltd.,PIDILITIND,500331,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"3,107.6","2,396.3",679.7,22.10%,75.2,13.1,623,163.1,450.1,8.8,"1,505.5",29.6 +Power Finance Corporation Ltd.,PFC,532810,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"22,403.7",315.4,"22,941.9",102.46%,12.7,"14,313.1","8,628.8","2,000.6","4,833.1",14.7,"17,946.4",54.4 +Power Grid Corporation of India Ltd.,POWERGRID,532898,UTILITIES,ELECTRIC UTILITIES,"11,530.4","1,358.7","9,908.4",87.94%,"3,277","2,341.3","4,393.4",573.7,"3,781.4",4.1,"15,344.4",16.5 +Prestige Estates Projects Ltd.,PRESTIGE,ASM,REALTY,REALTY,"3,256","1,643.9",592.5,26.49%,174.1,263.9,"1,174.1",256.4,850.9,21.2,"1,714",42.8 +Prism Johnson Ltd.,PRSMJOHNSN,500338,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"1,846","1,745.4",92.4,5.03%,95.2,43.5,210,30.4,182.7,3.6,154.2,3.1 +Procter & Gamble Hygiene & Healthcare Ltd.,PGHH,500459,FMCG,PERSONAL PRODUCTS,"1,154.1",853.5,284.9,25.03%,14.3,1.9,284.5,73.8,210.7,64.9,734.4,226.3 +Punjab National Bank,PNB,532461,BANKING AND FINANCE,BANKS,"29,857","6,798.1","6,239.1",23.23%,0,"16,819.8","2,778.3","1,013.8","1,990.2",1.8,"5,904.8",5.4 +Quess Corp Ltd.,QUESS,539978,SOFTWARE & SERVICES,BPO/KPO,"4,763.5","4,584.8",163.6,3.44%,69.7,28.1,79.3,8.3,71.9,4.8,240.9,16.2 +RBL Bank Ltd.,RBLBANK,540065,BANKING AND FINANCE,BANKS,"3,720.6","1,422.6",765.4,25.45%,0,"1,532.6",125,-206.1,331.1,5.5,"1,173.9",19.5 +Radico Khaitan Ltd.,RADICO,532497,FOOD BEVERAGES & TOBACCO,BREWERIES & DISTILLERIES,925.7,803.8,121.2,13.10%,26.1,12.5,83.3,21.4,64.8,4.8,237,17.7 +Rain Industries Ltd.,RAIN,500339,CHEMICALS & PETROCHEMICALS,PETROCHEMICALS,"4,208.9","3,794.3",366,8.80%,192.5,241.7,-19.5,46.2,-90.2,-2.7,270.4,8 +Rajesh Exports Ltd.,RAJESHEXPO,531500,TEXTILES APPARELS & ACCESSORIES,GEMS & JEWELLERY,"38,079.4","38,015.8",50.1,0.13%,10.7,0,53,7.7,45.3,1.5,"1,142.2",38.7 +Rallis India Ltd.,RALLIS,500355,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,837,699,133,15.99%,26,3,110,28,82,4.2,98.4,5.2 +Rashtriya Chemicals & Fertilizers Ltd.,RCF,524230,FERTILIZERS,FERTILIZERS,"4,222.1","4,049.3",105.9,2.55%,56.1,44,72.8,21.1,51,0.9,523.6,9.5 +Redington Ltd.,REDINGTON,532805,COMMERCIAL SERVICES & SUPPLIES,COMMODITY TRADING & DISTRIBUTION,"22,296.6","21,738.7",481.4,2.17%,43.7,105.8,408.3,96.7,303.5,3.9,"1,242",15.9 +Relaxo Footwears Ltd.,RELAXO,530517,RETAILING,FOOTWEAR,725.9,623.8,91.5,12.79%,36.9,4.7,60.4,16.2,44.2,1.8,193.9,7.8 +Reliance Industries Ltd.,RELIANCE,500325,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"238,797","193,988","40,968",17.44%,"12,585","5,731","26,493","6,673","17,394",25.7,"68,496",101.2 +REC Ltd.,RECLTD,532955,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"11,701.3",275.1,"12,180.5",104.21%,6.1,"7,349.8","4,837.6","1,047.7","3,789.9",14.4,"12,738.6",48.4 +SJVN Ltd.,SJVN,533206,UTILITIES,ELECTRIC UTILITIES,951.6,172.2,706.2,80.40%,101.9,124.2,567.7,129.2,439.6,1.1,"1,016",2.6 +SKF India Ltd.,SKFINDIA,500472,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,"1,145.5","1,003.7",121.5,10.80%,19.3,0.5,122,31.7,90,18.2,484,97.9 +SRF Ltd.,SRF,503806,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"3,206.5","2,551.2",626.2,19.71%,161.2,79.3,414.8,114,300.8,10.2,"1,733.4",58.5 +Sanofi India Ltd.,SANOFI,500674,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,726.4,506.1,208.5,29.17%,9.9,0.3,210.1,57.9,152.1,66.1,596.3,259.3 +Schaeffler India Ltd.,SCHAEFFLER,505790,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,879.2","1,506.3",342,18.50%,55.6,1.6,315.7,80.7,235,15,922.6,59 +Shree Cements Ltd.,SHREECEM,500387,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"4,932.1","3,914.1",886,18.46%,411.7,67,539.2,92.6,446.6,123.8,"1,826.8",506.3 +Shriram Finance Ltd.,SHRIRAMFIN,511218,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"8,893","1,409.4","6,334.3",71.30%,141.4,"3,798","2,404.2",614.9,"1,786.1",47.6,"6,575.4",175.2 +Siemens Ltd.,SIEMENS,500550,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"5,953.2","5,107.5",700.2,12.06%,78.6,4.9,762.2,190.5,571.3,16.1,"1,960.9",55.1 +Sobha Ltd.,SOBHA,532784,REALTY,REALTY,773.6,665.8,75.4,10.18%,19.3,63.9,24.7,9.7,14.9,1.6,107.4,11.3 +Solar Industries India Ltd.,SOLARINDS,532725,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"1,355.2","1,011.3",336.1,24.95%,33.7,24.9,285.3,75.5,200.1,22.1,808.2,89.3 +Sonata Software Ltd.,SONATSOFTW,532221,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,935.8","1,715.2",197.3,10.32%,33.3,20.7,166.5,42.3,124.2,9,475.7,34.3 +State Bank of India,SBIN,500112,BANKING AND FINANCE,BANKS,"144,256.1","58,597.6","22,703.3",21.14%,0,"62,955.2","21,935.7","5,552.5","17,196.2",18,"69,304.1",77.7 +Steel Authority of India (SAIL) Ltd.,SAIL,500113,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"29,858.2","25,836.7","3,875.4",13.04%,"1,326.6",605.2,"1,674.7",464.2,"1,305.6",3.2,"3,219.5",7.8 +Sun Pharma Advanced Research Company Ltd.,SPARC,532872,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,29.7,112.7,-91.5,-431.87%,3.2,0.3,-86.4,0,-86.4,-2.7,-253.6,-7.8 +Sun Pharmaceutical Industries Ltd.,SUNPHARMA,524715,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"12,486","9,013","3,179.4",26.08%,632.8,49.3,"2,790.9",390.1,"2,375.5",9.9,"8,548.5",35.6 +Sun TV Network Ltd.,SUNTV,532733,MEDIA,BROADCASTING & CABLE TV,"1,160.2",320.6,727.8,69.42%,218.8,1.7,619.1,154.4,464.7,11.8,"1,861.8",47.2 +Sundram Fasteners Ltd.,SUNDRMFAST,500403,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,429.1","1,191.1",230.7,16.23%,54.5,7.4,176.2,43.1,131.9,6.3,502.9,23.9 +Sunteck Realty Ltd.,SUNTECK,512179,REALTY,REALTY,36.2,39.1,-14.1,-56.70%,2.2,15.8,-20.9,-6.4,-13.9,-1,-46.5,-3.3 +Supreme Industries Ltd.,SUPREMEIND,509930,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,"2,321.4","1,952.5",356.2,15.43%,71.9,1.6,295.4,76.3,243.2,19.1,"1,028.2",80.9 +Suzlon Energy Ltd.,SUZLON,ASM,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"1,428.7","1,196.4",225,15.83%,51.2,43.7,102.4,0.1,102.3,0.1,561.4,0.4 +Syngene International Ltd.,SYNGENE,539268,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,931.7,656,254.1,27.92%,104.6,13,150.7,34.2,116.5,2.9,498.3,12.4 +TTK Prestige Ltd.,TTKPRESTIG,517506,CONSUMER DURABLES,HOUSEWARE,747.2,648.6,80.8,11.08%,15.9,3.1,79.5,20.5,59.3,4.3,224.3,16.2 +TV18 Broadcast Ltd.,TV18BRDCST,532800,MEDIA,BROADCASTING & CABLE TV,"1,989","1,992.2",-198.1,-11.04%,50.1,33.8,-87.1,-6.5,-28.9,-0.2,92.2,0.5 +TVS Motor Company Ltd.,TVSMOTOR,532343,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"9,983.8","8,576.9","1,355.9",13.65%,237.1,483.3,686.4,259.8,386.3,8.1,"1,457.6",30.7 +Tata Consultancy Services Ltd.,TCS,532540,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"60,698","43,946","15,746",26.38%,"1,263",159,"15,33","3,95","11,342",31,"44,654",122 +Tata Elxsi Ltd.,TATAELXSI,500408,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,912.8,618.2,263.5,29.89%,25,5.8,263.9,63.8,200,32.1,785.1,126.1 +Tata Consumer Products Ltd.,TATACONSUM,500800,FMCG,PACKAGED FOODS,"3,823.6","3,196.7",537.1,14.38%,93.9,27.6,490.9,131.7,338.2,3.6,"1,275.2",13.7 +Tata Motors Limited (DVR),TATAMTRDVR,570001,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,,,,,,,,,,,, +Tata Motors Ltd.,TATAMOTORS,500570,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,"106,759","91,361.3","13,766.9",13.10%,"6,636.4","2,651.7","5,985.9","2,202.8","3,764",9.8,"15,332.3",40 +Tata Power Company Ltd.,TATAPOWER,500400,UTILITIES,ELECTRIC UTILITIES,"16,029.5","12,647","3,091",19.64%,925.9,"1,181.8",979.2,213.3,875.5,2.7,"3,570.8",11.2 +Tata Steel Ltd.,TATASTEEL,500470,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"55,910.2","51,414.1","4,267.8",7.66%,"2,479.8","1,959.4","-6,842.1",-228,"-6,196.2",-5.1,"-6,081.3",-5 +Tech Mahindra Ltd.,TECHM,532755,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"13,128.1","11,941.1",922.8,7.17%,465.7,97.5,623.8,110,493.9,5.6,"3,600.7",40.9 +The Ramco Cements Ltd.,RAMCOCEM,500260,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,352.1","1,935",405.6,17.33%,162.8,116.5,137.8,37,72,3.1,348.9,14.8 +Thermax Ltd.,THERMAX,500411,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"2,368.3","2,097.8",204.6,8.89%,33,19.8,217.7,58.9,157.7,14,498.8,44.3 +Timken India Ltd.,TIMKEN,522113,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,692.1,546.5,135.5,19.87%,21.1,0.9,123.6,30.6,93,12.4,358.3,47.6 +Titan Company Ltd.,TITAN,500114,TEXTILES APPARELS & ACCESSORIES,GEMS & JEWELLERY,"12,653","11,118","1,411",11.26%,144,140,"1,251",336,915,10.3,"3,302",37.1 +Torrent Pharmaceuticals Ltd.,TORNTPHARM,500420,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"2,686","1,835",825,31.02%,201,91,559,173,386,11.4,"1,334",39.4 +Torrent Power Ltd.,TORNTPOWER,532779,UTILITIES,ELECTRIC UTILITIES,"7,069.1","5,739.5","1,221.4",17.55%,341.7,247.2,740.7,198.1,525.9,10.9,"2,176.8",45.3 +Trent Ltd.,TRENT,500251,RETAILING,DEPARTMENT STORES,"3,062.5","2,525.8",456.6,15.31%,152.2,95.5,288.9,86.3,234.7,6.6,629.4,17.7 +Trident Ltd.,TRIDENT,521064,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"1,812","1,557.3",240.3,13.37%,89.4,35,130.4,40.1,90.7,0.2,458.1,0.9 +UPL Ltd.,UPL,512070,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,"10,275","8,807","1,325",13.03%,657,871,-185,-96,-189,-2.5,"1,856",24.7 +UltraTech Cement Ltd.,ULTRACEMCO,532538,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"16,179.3","13,461.2","2,550.9",15.93%,797.8,233.9,"1,686.2",409.4,"1,281.5",44.5,"5,694.1",197.2 +Union Bank of India,UNIONBANK,532477,BANKING AND FINANCE,BANKS,"28,952.5","6,189.3","7,265",29.38%,0,"15,498.2","5,492.3","1,944","3,571.8",5.1,"11,918.9",16.1 +United Breweries Ltd.,UBL,532478,FOOD BEVERAGES & TOBACCO,BREWERIES & DISTILLERIES,"1,902.1","1,705.8",184.3,9.75%,50.9,1.4,144,36.9,107.3,4.1,251.3,9.5 +United Spirits Ltd.,MCDOWELL-N,532432,FOOD BEVERAGES & TOBACCO,BREWERIES & DISTILLERIES,"6,776.6","6,269.8",466.7,6.93%,65.3,26.2,446,106.3,339.3,4.8,"1,133",15.6 +V-Guard Industries Ltd.,VGUARD,532953,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,147.9","1,041.3",92.5,8.16%,19.8,9.3,77.5,18.6,59,1.4,215.2,5 +Vardhman Textiles Ltd.,VTL,502986,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"2,487","2,192.1",205.4,8.57%,103.7,22,169.2,41.7,134.3,4.7,531.9,18.7 +Varun Beverages Ltd.,VBL,540180,FOOD BEVERAGES & TOBACCO,NON-ALCOHOLIC BEVERAGES,"3,889","2,988.4",882.1,22.79%,170.8,62.5,667.3,152.9,501.1,3.9,"1,998.7",15.4 +Vinati Organics Ltd.,VINATIORGA,524200,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,464.4,337.3,110.8,24.73%,13.7,0.3,113,28.9,84.2,8.2,408.2,39.7 +Voltas Ltd.,VOLTAS,500575,CONSUMER DURABLES,CONSUMER ELECTRONICS,"2,363.7","2,222.5",70.3,3.06%,11.7,11.4,118.1,49.3,36.7,1.1,199.5,6 +ZF Commercial Vehicle Control Systems India Ltd.,ZFCVINDIA,533023,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,015.8",846.2,145.5,14.67%,27.1,1.3,141.2,35.5,105.7,55.7,392,206.7 +Welspun Corp Ltd.,WELCORP,ASM,METALS & MINING,IRON & STEEL PRODUCTS,"4,161.4","3,659.9",399.5,9.84%,85.7,75,340.8,79,384.7,14.7,809.2,30.9 +Welspun Living Ltd.,WELSPUNLIV,514162,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"2,542.4","2,151.1",358,14.27%,98.5,33.8,258.9,58.7,196.7,2,526.1,5.4 +Whirlpool of India Ltd.,WHIRLPOOL,500238,CONSUMER DURABLES,CONSUMER ELECTRONICS,"1,555.5","1,448.4",73.2,4.81%,49.2,5.6,52.3,14.1,36.6,2.9,198.8,15.7 +Wipro Ltd.,WIPRO,507685,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"23,255.7","18,543.2","3,972.7",17.64%,897,303.3,"3,512.2",841.9,"2,646.3",5.1,"11,643.8",22.3 +Zee Entertainment Enterprises Ltd.,ZEEL,505537,MEDIA,BROADCASTING & CABLE TV,"2,509.6","2,105",332.8,13.65%,77.2,23.4,184.2,54.4,123,1.3,-102.2,-1.1 +eClerx Services Ltd.,ECLERX,532927,SOFTWARE & SERVICES,BPO/KPO,735.9,517,204.7,28.37%,30.3,6.1,182.4,46.3,136,28.2,506,105 +Sterlite Technologies Ltd.,STLTECH,532374,TELECOMMUNICATIONS EQUIPMENT,TELECOM CABLES,"1,497","1,281",213,14.26%,85,95,36,12,34,0.9,203,5.1 +HEG Ltd.,HEG,509631,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,642.2,512.3,101.9,16.58%,38.5,8.5,82.9,21.7,96,24.9,439.5,113.9 +SBI Life Insurance Company Ltd.,SBILIFE,540719,BANKING AND FINANCE,LIFE INSURANCE,"28,816.2","28,183.8",609.9,2.12%,0,0,621.5,43.9,380.2,3.8,"1,842.2",18.4 +General Insurance Corporation of India,GICRE,540755,BANKING AND FINANCE,GENERAL INSURANCE,"13,465.9","11,574","1,464.6",11.20%,0,0,"1,855.4",243.7,"1,689",15.2,"6,628",37.8 +Tube Investments of India Ltd.,TIINDIA,540762,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,005.4","1,718.2",251.4,12.76%,34.6,7.7,244.8,63.4,181.4,9.4,717.5,37.1 +Honeywell Automation India Ltd.,HONAUT,517174,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,144.3",965.9,138.3,12.52%,13.8,0.7,163.9,42,121.9,137.8,443.4,503.9 +Indian Energy Exchange Ltd.,IEX,540750,BANKING AND FINANCE,EXCHANGE,133,16.6,92,84.73%,5.1,0.7,110.6,27.9,86.5,1,327.8,3.7 +ICICI Lombard General Insurance Company Ltd.,ICICIGI,540716,BANKING AND FINANCE,GENERAL INSURANCE,"5,271.1","4,612.4",743.5,14.16%,0,0,763.6,186.4,577.3,11.8,"1,757.1",35.8 +Aster DM Healthcare Ltd.,ASTERDM,540975,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"3,325.2","2,939.4",377.3,11.38%,227.2,101.9,2.1,10.2,-30.8,-0.6,284.3,5.7 +Central Depository Services (India) Ltd.,CDSL,CDSL,OTHERS,INVESTMENT COMPANIES,230.1,77.9,129.4,62.40%,6.5,0,145.6,35.8,108.9,10.4,320.2,30.6 +Graphite India Ltd.,GRAPHITE,509488,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,884,823,-30,-3.78%,19,4,992,190,804,41.1,856,43.9 +Grasim Industries Ltd.,GRASIM,500300,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"30,505.3","25,995.9","4,224.8",13.98%,"1,245.2",397.8,"2,866.4",837.7,"1,163.8",17.7,"6,624.9",100.6 +KNR Constructions Ltd.,KNRCON,532942,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"1,043.8",806.9,231.6,22.30%,39.2,20.6,177.1,34.6,147.4,5.2,537.5,19.1 +Aditya Birla Capital Ltd.,ABCAPITAL,540691,DIVERSIFIED,HOLDING COMPANIES,"7,730.4","4,550.1","2,821.9",36.55%,48,"1,827",956.8,284.1,705,2.7,"5,231.9",20.1 +Dixon Technologies (India) Ltd.,DIXON,540699,CONSUMER DURABLES,CONSUMER ELECTRONICS,"4,943.9","4,744.3",198.9,4.02%,36.4,17.1,146.1,35.2,107.3,19,308.7,51.8 +Cholamandalam Financial Holdings Ltd.,CHOLAHLDNG,504973,DIVERSIFIED,HOLDING COMPANIES,"6,372.2","2,495.1","3,404.8",54.05%,52.1,"2,209.4","1,215.8",324.6,420.9,22.4,"1,532.3",81.6 +Cochin Shipyard Ltd.,COCHINSHIP,540678,TRANSPORTATION,MARINE PORT & SERVICES,"1,100.4",820.5,191.2,18.90%,18.9,9.6,251.4,69.9,181.5,13.8,429.9,32.7 +Bharat Dynamics Ltd.,BDL,541143,GENERAL INDUSTRIALS,DEFENCE,694.1,481.8,134,21.77%,17.4,0.8,194.1,47,147.1,8,425.4,23.2 +Lux Industries Ltd.,LUXIND,539542,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,643.6,584.2,55,8.61%,5.9,5.4,48,12.1,37.1,12.3,103.1,32.9 +Zensar Technologies Ltd.,ZENSARTECH,504067,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,277.1","1,009.9",230.9,18.61%,36.6,5.7,224.9,51,173.9,7.7,525.8,23.2 +PCBL Ltd.,PCBL,506590,CHEMICALS & PETROCHEMICALS,CARBON BLACK,"1,489.4","1,248.6",238.1,16.02%,48.2,21,171.6,48.8,122.6,3.2,431.6,11.4 +Zydus Wellness Ltd.,ZYDUSWELL,531335,FMCG,PACKAGED FOODS,444,423.1,16.8,3.82%,5.8,6.5,8.6,2.7,5.9,0.9,281.2,44.2 +Linde India Ltd.,LINDEINDIA,523457,GENERAL INDUSTRIALS,INDUSTRIAL GASES,729.9,537.7,173.6,24.41%,49.7,1.2,141.3,34.6,108.7,12.8,417.9,49 +FDC Ltd.,FDC,531599,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,513.6,409.9,76.4,15.71%,9.9,1.1,92.7,22.9,69.8,4.2,251.2,15.4 +The New India Assurance Company Ltd.,NIACL,540769,BANKING AND FINANCE,GENERAL INSURANCE,"10,571","10,773.4",-246.5,-2.33%,0,0,-242,-46.7,-176.1,-1.1,947,5.7 +Sundaram Finance Ltd.,SUNDARMFIN,590071,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"1,710.6",322.5,"1,332.1",77.98%,43.6,820.3,470.6,142.8,365.4,33.2,"1,506.7",135.6 +TeamLease Services Ltd.,TEAMLEASE,539658,COMMERCIAL SERVICES & SUPPLIES,MISC. COMMERCIAL SERVICES,"2,285.6","2,240.8",31.8,1.40%,12.9,2.5,29.4,1.8,27.3,16.3,106.6,63.5 +Galaxy Surfactants Ltd.,GALAXYSURF,540935,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,985.8,858.2,124.9,12.70%,24.7,5.4,97.5,20.1,77.4,21.8,349.3,98.5 +Bandhan Bank Ltd.,BANDHANBNK,541153,BANKING AND FINANCE,BANKS,"5,032.2","1,400.2","1,583.4",35.25%,0,"2,048.6",947.2,226.1,721.2,4.5,"2,541.1",15.8 +ICICI Securities Ltd.,ISEC,541179,BANKING AND FINANCE,CAPITAL MARKETS,"1,249",433.5,810.2,64.87%,25.8,215.1,569.4,145.7,423.6,13.1,"1,238.1",38.3 +V-Mart Retail Ltd.,VMART,534976,RETAILING,DEPARTMENT STORES,551.4,548.8,0.7,0.12%,53.2,35.9,-86.4,-22.3,-64.1,-32.4,-103.1,-52.1 +Nippon Life India Asset Management Ltd.,NAM-INDIA,540767,BANKING AND FINANCE,ASSET MANAGEMENT COS.,475.4,156.1,241.4,60.73%,7.2,1.7,310.4,66.1,244.4,3.9,883.3,14.1 +Grindwell Norton Ltd.,GRINDWELL,506076,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,690,536,131.4,19.69%,16.9,1.8,135.3,33.1,101.9,9.2,378.3,34.2 +HDFC Life Insurance Company Ltd.,HDFCLIFE,540777,BANKING AND FINANCE,LIFE INSURANCE,"23,276.6","23,659.3",-508.1,-2.20%,0,0,-373.1,-657.5,378.2,1.8,"1,472.8",6.9 +Elgi Equipments Ltd.,ELGIEQUIP,522074,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,817.8,663.4,142.7,17.71%,18.7,6.6,129.2,38.8,91.3,2.9,401.9,12.7 +Hindustan Aeronautics Ltd.,HAL,541154,GENERAL INDUSTRIALS,DEFENCE,"6,105.1","4,108.1","1,527.6",27.11%,349.6,0.3,"1,647",414.8,"1,236.7",18.5,"6,037.3",90.3 +BSE Ltd.,BSE,BSE,BANKING AND FINANCE,EXCHANGE,367,172.8,189.2,52.26%,22.7,8.5,163,63.6,120.5,8.8,706,52.1 +Rites Ltd.,RITES,541556,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,608.8,444.5,137.8,23.67%,14.1,1.4,148.8,40.1,101.2,4.2,488.1,20.3 +Fortis Healthcare Ltd.,FORTIS,532843,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"1,783.5","1,439.8",330.2,18.65%,84.1,31.8,231.4,48.8,173.7,2.3,547.6,7.3 +Varroc Engineering Ltd.,VARROC,541578,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,893.5","1,692.6",194.3,10.30%,84.9,50.3,65.9,18.2,54.2,3.5,146.5,9.6 +Adani Green Energy Ltd.,ADANIGREEN,ASM,UTILITIES,ELECTRIC UTILITIES,"2,589",521,"1,699",76.53%,474,"1,165",413,119,372,2.2,"1,305",8.2 +VIP Industries Ltd.,VIPIND,507880,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,548.7,493.2,52.9,9.68%,23.8,12.4,19.3,6,13.3,0.9,110.9,7.8 +CreditAccess Grameen Ltd.,CREDITACC,541770,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"1,247.6",248.8,902.3,72.36%,12.3,423.9,466.8,119.7,347,21.8,"1,204.2",75.7 +CESC Ltd.,CESC,500084,UTILITIES,ELECTRIC UTILITIES,"4,414","3,706",646,14.84%,303,305,461,98,348,2.6,"1,447",10.9 +Jamna Auto Industries Ltd.,JAMNAAUTO,520051,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,608.7,528.2,79.1,13.03%,10.9,0.8,68.7,18.6,50.1,2.4,189.3,4.7 +Suprajit Engineering Ltd.,SUPRAJIT,532509,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,727.6,639.1,69.8,9.85%,25.7,13.6,49.2,14.5,34.8,2.5,146.9,10.6 +JK Paper Ltd.,JKPAPER,532162,COMMERCIAL SERVICES & SUPPLIES,PAPER & PAPER PRODUCTS,"1,708.8","1,242.8",407.3,24.68%,83.5,42,340.6,34.9,302.4,17.9,"1,220.6",72.1 +Bank of Maharashtra,MAHABANK,532525,BANKING AND FINANCE,BANKS,"5,735.5","1,179.4","1,920.5",37.90%,0,"2,635.7",935.7,16,919.8,1.3,"3,420.8",4.8 +Aavas Financiers Ltd.,AAVAS,541988,BANKING AND FINANCE,HOUSING FINANCE,497.6,123.5,367.8,74.03%,7.6,203.6,157.4,35.7,121.7,15.4,465.4,58.8 +HDFC Asset Management Company Ltd.,HDFCAMC,541729,BANKING AND FINANCE,ASSET MANAGEMENT COS.,765.4,162,481.1,74.81%,13,2.3,588.1,151.6,436.5,20.4,"1,659.3",77.7 +KEI Industries Ltd.,KEI,517569,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,954.2","1,742.7",203.9,10.47%,15.6,7.5,188.4,48.2,140.2,15.5,528.3,58.5 +Orient Electric Ltd.,ORIENTELEC,541301,CONSUMER DURABLES,CONSUMER ELECTRONICS,570.3,546.2,20.7,3.65%,14.2,5.2,23.4,4.9,18.4,0.9,95.3,4.5 +Deepak Nitrite Ltd.,DEEPAKNTR,506401,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"1,795.1","1,475.8",302.3,17.00%,39.4,2.7,277.2,72.1,205.1,15,797.9,58.5 +Fine Organic Industries Ltd.,FINEORG,541557,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,557.6,409.4,131.1,24.25%,14.4,0.7,133.1,28.9,103.4,33.7,458.8,149.6 +LTIMindtree Ltd.,LTIM,540005,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"9,048.6","7,274.1","1,631.3",18.32%,208.2,47,"1,519.3",357,"1,161.8",39.3,"4,427.5",149.6 +Dalmia Bharat Ltd.,DALBHARAT,542216,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"3,234","2,56",589,18.70%,401,101,172,48,118,6.3,"1,041",54.8 +Godfrey Phillips India Ltd.,GODFRYPHLP,500163,FOOD BEVERAGES & TOBACCO,CIGARETTES-TOBACCO PRODUCTS,"1,412.5","1,151",223.6,16.27%,36.5,6.6,218.5,55.5,202.1,38.9,802.9,154.4 +Vaibhav Global Ltd.,VAIBHAVGBL,532156,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,708.4,641.5,63.5,9.01%,22.6,2.9,41.4,12.4,29.4,1.8,121.3,7.3 +Abbott India Ltd.,ABBOTINDIA,500488,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,549.7","1,113.3",380.9,25.49%,17.8,3.1,415.4,102.5,312.9,147.3,"1,081.4",508.9 +Adani Total Gas Ltd.,ATGL,ASM,UTILITIES,UTILITIES,"1,104.8",815.7,279.9,25.55%,37.6,27.3,224.2,57.2,172.7,1.6,571,5.2 +Nestle India Ltd.,NESTLEIND,500790,FMCG,PACKAGED FOODS,"5,070.1","3,811.9","1,224.9",24.32%,111.2,31.4,"1,222",313.9,908.1,94.2,"2,971.1",308.2 +Bayer Cropscience Ltd.,BAYERCROP,506285,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,"1,633.3","1,312.3",304.9,18.85%,11.6,3.7,305.7,82.8,222.9,49.6,844.4,188.1 +Amber Enterprises India Ltd.,AMBER,540902,CONSUMER DURABLES,CONSUMER ELECTRONICS,939.8,867.5,59.6,6.43%,45.2,36.6,-9.5,-3.8,-6.9,-2.1,156.8,46.5 +Rail Vikas Nigam Ltd.,RVNL,542649,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"5,210.3","4,616",298.3,6.07%,6.2,132.7,455.4,85.2,394.3,1.9,"1,478.8",7.1 +Metropolis Healthcare Ltd.,METROPOLIS,542650,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE SERVICES,309.7,233.7,74.8,24.25%,22.2,5.7,48.1,12.5,35.5,6.9,133.4,26 +Polycab India Ltd.,POLYCAB,542652,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"4,253","3,608.8",608.9,14.44%,60.3,26.8,557.2,127.4,425.6,28.4,"1,607.2",107.1 +Multi Commodity Exchange of India Ltd.,MCX,534091,BANKING AND FINANCE,EXCHANGE,184,193.8,-28.7,-17.38%,6.6,0.1,-16.4,1.6,-19.1,-3.7,44.8,8.8 +IIFL Finance Ltd.,IIFL,532636,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,"2,533.7",788.3,"1,600.8",64.66%,43.3,932.1,683.5,158,474.3,12.4,"1,690.7",44.4 +Ratnamani Metals & Tubes Ltd.,RATNAMANI,520111,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"1,141.9",886.3,244.9,21.65%,23.6,10.8,221.1,56.8,163.9,23.4,622.6,88.8 +RHI Magnesita India Ltd.,RHIM,534076,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,989.7,839,147.9,14.98%,44.2,8.5,97.9,26.3,71.3,3.5,-502.2,-24.3 +Birlasoft Ltd.,BSOFT,532400,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,325.4","1,102.7",207.1,15.81%,21.5,5.7,195.5,50.4,145.1,5.2,378.4,13.7 +EIH Ltd.,EIHOTEL,500840,HOTELS RESTAURANTS & TOURISM,HOTELS,552.5,387.6,142.9,26.94%,33.2,5.6,126.1,36.2,93.1,1.5,424.1,6.8 +Affle (India) Ltd.,AFFLE,542752,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,441.2,344.1,87.2,20.22%,18.4,5.5,73.2,6.4,66.8,5,264.3,19.8 +Westlife Foodworld Ltd.,WESTLIFE,505533,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,618,516.5,98.2,15.98%,43.9,27.4,30.2,7.8,22.4,1.4,107.7,6.9 +IndiaMART InterMESH Ltd.,INDIAMART,542726,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,329.3,214.7,80,27.15%,8,2.3,104.3,23.9,69.4,11.4,321.1,53.6 +Infosys Ltd.,INFY,500209,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"39,626","29,554","9,44",24.21%,"1,166",138,"8,768","2,553","6,212",15,"24,871",60.1 +Sterling and Wilson Renewable Energy Ltd.,SWSOLAR,542760,COMMERCIAL SERVICES & SUPPLIES,CONSULTING SERVICES,776.7,758,1.5,0.19%,4.3,64.3,-50,4.6,-54.2,-2.9,-668.4,-35.2 +ABB India Ltd.,ABB,500002,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"2,846","2,330.7",438.5,15.84%,30.3,0.9,484.2,122.2,362.9,17.1,"1,208.7",57 +Poly Medicure Ltd.,POLYMED,531768,HEALTHCARE EQUIPMENT & SUPPLIES,HEALTHCARE SUPPLIES,351.4,253.1,84.2,24.97%,16,2.2,80.9,18.8,62.2,6.5,233.7,24.4 +GMM Pfaudler Ltd.,GMMPFAUDLR,505255,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,946,795.5,142,15.15%,32.2,21.5,96.8,26.5,71.1,15.8,183.2,40.8 +Gujarat Fluorochemicals Ltd.,FLUOROCHEM,542812,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,960.3,783.7,163.1,17.23%,67.5,34.2,74.8,22.1,52.7,4.8,915.2,83.3 +360 One Wam Ltd.,360ONE,542772,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,617.1,235.6,317.8,57.31%,13.7,139.9,226.8,40.8,186,5.2,696.8,19.5 +Tata Communications Ltd.,TATACOMM,500483,TELECOM SERVICES,OTHER TELECOM SERVICES,"4,897.9","3,857.1","1,015.5",20.84%,605.1,137.4,298.3,77.9,220.7,7.7,"1,322.3",46.4 +Alkyl Amines Chemicals Ltd.,ALKYLAMINE,506767,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,354.5,303.9,48.3,13.71%,12.5,1.7,36.4,9.2,27.2,5.3,171.3,33.5 +CSB Bank Ltd.,CSBBANK,542867,BANKING AND FINANCE,BANKS,835.8,317.5,174.6,25.41%,0,343.6,178,44.8,133.2,7.7,577.7,33.3 +Indian Railway Catering & Tourism Corporation Ltd.,IRCTC,542830,DIVERSIFIED CONSUMER SERVICES,TRAVEL SUPPORT SERVICES,"1,042.4",628.8,366.6,36.83%,14,4.4,395.2,100.5,294.7,3.7,"1,061.2",13.3 +Sumitomo Chemical India Ltd.,SUMICHEM,542920,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,928,715.5,187.9,20.80%,15.8,1.2,195.5,52,143.4,2.9,367.7,7.4 +Century Textiles & Industries Ltd.,CENTURYTEX,500040,COMMERCIAL SERVICES & SUPPLIES,PAPER & PAPER PRODUCTS,"1,114.9","1,069.2",33.8,3.07%,59.2,17,-30.5,-3.3,-30.4,-2.8,117.7,10.5 +SBI Cards and Payment Services Ltd.,SBICARD,543066,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"4,221.4","2,018.8","1,327",32.47%,46.8,604.9,809.4,206.4,603,6.4,"2,302.2",24.3 +Hitachi Energy India Ltd.,POWERINDIA,543187,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"1,228.2","1,162.6",65.3,5.32%,22.5,10.7,32.4,7.6,24.7,5.8,82.5,19.5 +Suven Pharmaceuticals Ltd.,SUVENPHAR,543064,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,250.9,133.1,98,42.40%,11.9,0.5,105.4,25.8,79.6,3.1,431.8,17 +Tata Chemicals Ltd.,TATACHEM,500770,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"4,083","3,179",819,20.49%,234,145,627,120,428,16.8,"2,06",80.8 +Aarti Drugs Ltd.,AARTIDRUGS,524348,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,642.2,565.1,76.4,11.92%,12.6,8.2,56.3,16.7,39.6,4.3,180.2,19.6 +Gujarat Ambuja Exports Ltd.,GAEL,524226,FMCG,EDIBLE OILS,"1,157.7","1,012.2",103.3,9.26%,30.5,5.9,109.1,26.3,82.8,3.6,305.1,13.3 +Polyplex Corporation Ltd.,POLYPLEX,524051,COMMERCIAL SERVICES & SUPPLIES,CONTAINERS & PACKAGING,"1,595.7","1,451.5",120.6,7.67%,75.1,9.9,59.1,10.9,27.9,8.9,71.1,22.6 +Chalet Hotels Ltd.,CHALET,542399,HOTELS RESTAURANTS & TOURISM,HOTELS,318.2,188.6,126,40.04%,35,50.1,44.5,8,36.4,1.8,266.7,13 +Adani Enterprises Ltd.,ADANIENT,512599,COMMERCIAL SERVICES & SUPPLIES,COMMODITY TRADING & DISTRIBUTION,"23,066","20,087.2","2,430.1",10.79%,757,"1,342.8",791,397.8,227.8,2,"2,444.3",21.4 +YES Bank Ltd.,YESBANK,532648,BANKING AND FINANCE,BANKS,"7,980.6","2,377.1",810,12.06%,0,"4,793.6",304.4,75.7,228.6,0.1,836.6,0.3 +EPL Ltd.,EPL,500135,COMMERCIAL SERVICES & SUPPLIES,CONTAINERS & PACKAGING,"1,011.2",820.6,181,18.07%,83.6,30.6,76.4,25.4,50.5,1.6,251.9,7.9 +Network18 Media & Investments Ltd.,NETWORK18,532798,MEDIA,BROADCASTING & CABLE TV,"2,052.2","2,083.8",-218.3,-11.70%,56.8,66.2,-154.5,-6.5,-61,-0.6,-144.2,-1.4 +CIE Automotive India Ltd.,CIEINDIA,532756,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,299.4","1,934",345.4,15.15%,78.3,31,256.1,69.1,375.4,9.9,298.4,7.9 +Vedanta Ltd.,VEDL,500295,METALS & MINING,ALUMINIUM AND ALUMINIUM PRODUCTS,"39,585","27,466","11,479",29.47%,"2,642","2,523","8,177","9,092","-1,783",-4.8,"5,202",14 +Rossari Biotech Ltd.,ROSSARI,543213,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,484.8,419.9,63.6,13.15%,15.1,5,44.8,11.9,32.9,6,116.8,21.2 +KPIT Technologies Ltd.,KPITTECH,542651,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,208.6",959.2,239.9,20.01%,48.1,13.6,187.7,46.3,140.9,5.2,486.9,18 +Intellect Design Arena Ltd.,INTELLECT,538835,SOFTWARE & SERVICES,IT SOFTWARE PRODUCTS,631.7,497.2,121.9,19.69%,33.7,0.8,96.5,25.7,70.4,5.2,316.6,23.2 +Balaji Amines Ltd.,BALAMINES,530999,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,387.3,326.8,53.8,14.13%,10.8,1.8,48,11.6,34.7,10.7,197.3,60.9 +UTI Asset Management Company Ltd.,UTIAMC,543238,BANKING AND FINANCE,ASSET MANAGEMENT COS.,405.6,172.5,231.5,57.30%,10.4,2.8,219.8,37,182.8,14.4,562.9,44.3 +Mazagon Dock Shipbuilders Ltd.,MAZDOCK,543237,TRANSPORTATION,SHIPPING,"2,079.2","1,651.1",176.6,9.66%,20.2,1.3,406.6,102.8,332.9,16.5,"1,327.6",65.8 +Computer Age Management Services Ltd.,CAMS,543232,BANKING AND FINANCE,CAPITAL MARKETS,284.7,153,122.1,44.39%,17.4,2,112.4,28.6,84.5,17.2,309.2,62.9 +Happiest Minds Technologies Ltd.,HAPPSTMNDS,543227,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,428.8,324,82.6,20.32%,14.6,11.2,79.1,20.7,58.5,3.9,232,15.6 +Triveni Turbine Ltd.,TRITURBINE,533655,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,402.3,313.4,74.3,19.17%,5.1,0.6,83.2,19,64.2,2,233.1,7.3 +Angel One Ltd.,ANGELONE,ASM,BANKING AND FINANCE,CAPITAL MARKETS,"1,049.3",602.6,443.4,42.31%,11.2,26.4,407.2,102.7,304.5,36.3,"1,020.2",121.7 +Tanla Platforms Ltd.,TANLA,532790,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"1,014.9",811.8,196.8,19.51%,22.6,1.8,178.7,36.2,142.5,10.6,514.7,38.3 +Max Healthcare Institute Ltd.,MAXHEALTH,543220,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"1,408.6",975.8,387.4,28.42%,57.9,8.5,366.4,89.7,276.7,2.9,990.1,10.2 +Asahi India Glass Ltd.,ASAHIINDIA,515030,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,122.6",934,185.6,16.58%,43,34.4,111.3,30.2,86.9,3.6,343.5,14.1 +Prince Pipes & Fittings Ltd.,PRINCEPIPE,542907,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,660.4,562.3,94.2,14.35%,22.5,0.7,92.8,22.2,70.6,5.2,219.8,19.9 +Route Mobile Ltd.,ROUTE,543228,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"1,018.3",886.5,128.1,12.63%,21.4,6.5,103.8,15.5,88.8,14.2,365.3,58.3 +KPR Mill Ltd.,KPRMILL,532889,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"1,533","1,212.9",298,19.72%,46,18.1,256,54.2,201.8,5.9,788.8,23.1 +Infibeam Avenues Ltd.,INFIBEAM,539807,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,792.6,719.7,70.2,8.89%,17.1,0.5,55.2,14.7,41,0.1,142.2,0.5 +Restaurant Brands Asia Ltd.,RBA,543248,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,628.2,568.7,56.2,9.00%,78.6,31.5,-50.7,0,-46,-0.9,-220.3,-4.5 +Larsen & Toubro Ltd.,LT,500510,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"52,157","45,392.1","5,632",11.04%,909.9,864,"4,991.1","1,135.5","3,222.6",22.9,"12,255.3",89.2 +Gland Pharma Ltd.,GLAND,543245,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,426.6","1,049.3",324.1,23.60%,81.3,6,289.9,95.8,194.1,11.8,698.8,42.4 +Macrotech Developers Ltd.,LODHA,543287,REALTY,REALTY,"1,755.1","1,333.5",416.1,23.78%,29.3,123.1,269.2,62.4,201.9,2.1,"1,529.2",15.9 +Poonawalla Fincorp Ltd.,POONAWALLA,524000,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),745.3,178.9,531.7,71.98%,14.7,215.5,"1,124.6",270,860.2,11.2,"1,466.4",19.1 +The Fertilisers and Chemicals Travancore Ltd.,FACT,590024,FERTILIZERS,FERTILIZERS,"1,713.6","1,530.8",132.4,7.96%,5.3,61.2,105.2,0,105.2,1.6,508.4,7.9 +Home First Finance Company India Ltd.,HOMEFIRST,543259,BANKING AND FINANCE,HOUSING FINANCE,278,53.7,211.6,77.43%,2.8,117,96.4,22.1,74.3,8.4,266.2,30.2 +CG Power and Industrial Solutions Ltd.,CGPOWER,500093,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"2,019","1,692.9",308.6,15.42%,22.9,0.4,329.9,86.2,242.3,1.6,"1,1",7.2 +Laxmi Organic Industries Ltd.,LXCHEM,543277,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,660.5,613.3,38.9,5.97%,27.5,2.1,17.5,6.8,10.7,0.4,100.6,3.8 +Anupam Rasayan India Ltd.,ANURAS,543275,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,395.6,284.7,107.5,27.41%,19.8,20.4,70.7,22,40.7,3.8,178.9,16.6 +Kalyan Jewellers India Ltd.,KALYANKJIL,ASM,TEXTILES APPARELS & ACCESSORIES,GEMS & JEWELLERY,"4,427.7","4,100.9",313.7,7.11%,66.9,81.7,178.1,43.3,135.2,1.3,497.9,4.8 +Jubilant Pharmova Ltd.,JUBLPHARMA,530019,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,690.2","1,438.5",241.8,14.39%,96.6,66.1,89,35.9,62.5,3.9,-44.6,-2.8 +Indigo Paints Ltd.,INDIGOPNTS,543258,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,273.4,228.7,41.8,15.45%,10,0.5,34.3,8.2,26.1,5.5,132.4,27.8 +Indian Railway Finance Corporation Ltd.,IRFC,543257,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"6,767.5",33.5,"6,732.4",99.50%,2.1,"5,181.5","1,549.9",0,"1,549.9",1.2,"6,067.6",4.6 +Mastek Ltd.,MASTEK,523704,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,770.4,642.5,123,16.07%,20.9,12.6,90.3,25,62.8,20.5,269.7,88 +Equitas Small Finance Bank Ltd.,EQUITASBNK,543243,BANKING AND FINANCE,BANKS,"1,540.4",616.8,330.2,24.30%,0,593.4,267,68.9,198.1,1.8,749.5,6.7 +Tata Teleservices (Maharashtra) Ltd.,TTML,532371,TELECOM SERVICES,TELECOM SERVICES,288.6,159.3,127.5,44.45%,36.3,403.2,-310.2,0,-310.2,-1.6,"-1,168.3",-6 +Praj Industries Ltd.,PRAJIND,522205,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,893.3,798.4,84,9.52%,9.1,1,84.8,22.4,62.4,3.4,271.4,14.8 +Nazara Technologies Ltd.,NAZARA,543280,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,309.5,269.4,26.7,8.98%,15.1,2.7,21.2,-1.3,19.8,3,60,9.1 +Jubilant Ingrevia Ltd.,JUBLINGREA,543271,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,028.5",902.3,117.7,11.54%,33.9,12.5,79.8,22.4,57.5,3.6,258.9,16.4 +Sona BLW Precision Forgings Ltd.,SONACOMS,543300,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,796.9,567.5,223.3,28.24%,53.4,6,164.1,40.1,123.8,2.1,462.8,7.9 +Chemplast Sanmar Ltd.,CHEMPLASTS,543336,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,025",941.8,46,4.65%,35.3,38.6,9.2,-16.8,26.1,1.6,35.3,2.2 +Aptus Value Housing Finance India Ltd.,APTUS,543335,BANKING AND FINANCE,HOUSING FINANCE,344.5,50.6,277.5,83.18%,2.6,96.1,189.6,41.5,148,3,551.1,11.1 +Clean Science & Technology Ltd.,CLEAN,543318,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,187.1,106.3,74.8,41.32%,11.1,0.3,69.5,17.3,52.2,4.9,275.5,25.9 +Medplus Health Services Ltd.,MEDPLUS,543427,HEALTHCARE EQUIPMENT & SUPPLIES,HEALTHCARE SUPPLIES,"1,419","1,323.5",85.1,6.04%,55.5,23.5,16.4,1.9,14.6,1.2,58.3,4.9 +Nuvoco Vistas Corporation Ltd.,NUVOCO,543334,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,578.9","2,243",329.9,12.82%,225.6,139.9,-29.6,-31.1,1.5,0,141.8,4 +Star Health and Allied Insurance Company Ltd.,STARHEALTH,543412,BANKING AND FINANCE,GENERAL INSURANCE,"3,463.2","3,295.8",165.7,4.79%,0,0,167.1,41.8,125.3,2.1,725.4,12.4 +Go Fashion (India) Ltd.,GOCOLORS,543401,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,192.8,132.2,56.6,29.98%,25.8,8.9,25.8,5.7,20,3.7,85.4,15.8 +PB Fintech Ltd.,POLICYBZR,543390,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,909.1,900.7,-89.1,-10.98%,22.3,7.2,-21.1,-0.3,-20.2,-0.5,-127.9,-2.8 +FSN E-Commerce Ventures Ltd.,NYKAA,543384,SOFTWARE & SERVICES,INTERNET & CATALOGUE RETAIL,"1,515.6","1,426.4",80.6,5.35%,54.6,21.3,13.3,4,5.8,0,19.8,0.1 +Krishna Institute of Medical Sciences Ltd.,KIMS,543308,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,655.4,475.2,177.3,27.17%,32.6,8.9,138.6,37.3,92,11.5,342.1,42.7 +Zomato Ltd.,ZOMATO,543320,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"3,06","2,895",-47,-1.65%,128,16,21,-15,36,0,-496.8,-0.6 +Brightcom Group Ltd.,BCG,532368,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"1,690.5","1,172.3",518,30.65%,72.3,0.1,445.8,124.3,321.5,1.6,"1,415.2",7 +Shyam Metalics and Energy Ltd.,SHYAMMETL,543299,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"2,978.9","2,633.6",307.1,10.44%,176.5,35.4,133.4,-348.6,484.1,18.9,"1,049.9",41.2 +G R Infraprojects Ltd.,GRINFRA,543317,CEMENT AND CONSTRUCTION,ROADS & HIGHWAYS,"1,909.2","1,415.7",467.1,24.81%,61.7,144.6,287.1,69.9,217.2,22.5,"1,240.3",128.3 +RattanIndia Enterprises Ltd.,RTNINDIA,534597,UTILITIES,ELECTRIC UTILITIES,"1,618.1","1,392.8",1.5,0.11%,4.3,28.8,142.2,1.7,140.9,1,147.6,1.1 +Borosil Renewables Ltd.,BORORENEW,502219,CONSUMER DURABLES,HOUSEWARE,406.3,369.2,32.5,8.09%,31,9.6,28.9,-1.1,25.1,1.9,32.1,2.5 +HLE Glascoat Ltd.,HLEGLAS,522215,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,227.8,198,26.5,11.79%,6.1,5.8,16.1,5.3,10,1.6,54.4,8 +Tata Investment Corporation Ltd.,TATAINVEST,501301,DIVERSIFIED,HOLDING COMPANIES,125,10.1,113.8,91.88%,0.2,4.7,110.1,-1.3,124.4,24.6,326.1,64.4 +Sapphire Foods India Ltd.,SAPPHIRE,543397,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,650.1,527.5,115.1,17.91%,76.8,24.5,21.4,6.2,15.3,2.4,208.5,32.7 +Devyani International Ltd.,DEVYANI,543330,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,826,665,154.4,18.84%,86.3,41.7,19,-16.8,33.4,0.3,177.5,1.5 +Vijaya Diagnostic Centre Ltd.,VIJAYA,543350,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE SERVICES,145.6,81.5,57.4,41.31%,13.7,5.9,44.6,11,33.3,3.3,103.4,10.1 +C.E. Info Systems Ltd.,MAPMYINDIA,543425,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,99.3,50.1,41,44.98%,3.7,0.7,44.7,11.1,33,6.1,122.9,22.7 +Latent View Analytics Ltd.,LATENTVIEW,543398,SOFTWARE & SERVICES,DATA PROCESSING SERVICES,172.7,124.9,30.8,19.78%,2.3,0.8,44.7,10.6,34,1.7,153.6,7.5 +Metro Brands Ltd.,METROBRAND,543426,RETAILING,FOOTWEAR,571.9,400.3,155.4,27.96%,57.2,19.7,94.7,27.5,66.7,2.5,340,12.5 +Easy Trip Planners Ltd.,EASEMYTRIP,543272,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,144.6,76.9,64.8,45.71%,1,2,64.7,17.7,47.2,0.3,146,0.8 +Shree Renuka Sugars Ltd.,RENUKA,532670,FOOD BEVERAGES & TOBACCO,SUGAR,"2,564.7","2,491",63.7,2.49%,64.1,216.8,-207.2,-1.6,-204.9,-1,-286,-1.3 +One97 Communications Ltd.,PAYTM,543396,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"2,662.5","2,749.6",-231,-9.17%,180.1,7,-279.9,12.7,-290.5,-5,"-1,207.9",-19 +MTAR Technologies Ltd.,MTARTECH,543270,GENERAL INDUSTRIALS,DEFENCE,167.7,130.7,36.1,21.64%,5.8,5.5,25.7,5.2,20.5,6.7,103.3,33.6 +Capri Global Capital Ltd.,CGCL,531595,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),557.4,229.3,304.8,54.70%,23.1,195.8,86,20.8,65.2,3.2,231.2,11.2 +GMR Airports Infrastructure Ltd.,GMRINFRA,ASM,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"2,185","1,336.8",726.7,35.22%,373,695.8,-252,54.9,-91,-0.1,-370.9,-0.6 +Triveni Engineering & Industries Ltd.,TRIVENI,532356,FOOD BEVERAGES & TOBACCO,SUGAR,"1,629.7","1,554.5",62.9,3.89%,25.8,10.2,39.3,10.1,29.1,1.3,434.3,19.8 +Delhivery Ltd.,DELHIVERY,543529,TRANSPORTATION,TRANSPORTATION - LOGISTICS,"2,043","1,957.3",-15.6,-0.80%,171.2,19.6,-105.2,-2.1,-102.9,-1.4,-546.7,-7.5 +Life Insurance Corporation of India,LICI,543526,BANKING AND FINANCE,LIFE INSURANCE,"202,394.9","193,612.5","8,445",4.18%,0,0,"8,696.5","1,083.9","8,030.3",12.7,"37,204.8",58.8 +Campus Activewear Ltd.,CAMPUS,543523,RETAILING,FOOTWEAR,259.1,234.2,24.5,9.46%,18.1,6.5,0.4,0.1,0.3,0,103.1,3.4 +Motherson Sumi Wiring India Ltd.,MSUMI,543498,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,110.2","1,856.5",248.1,11.79%,36.4,7.4,210,54.1,155.9,0.3,523.6,1.2 +Olectra Greentech Ltd.,OLECTRA,532439,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,310.3,266.6,40.5,13.20%,8.8,9.7,25.2,8,18.6,2.2,78.5,9.6 +Patanjali Foods Ltd.,PATANJALI,500368,FMCG,EDIBLE OILS,"7,845.8","7,426.6",395.3,5.05%,60.1,24,335.1,80.5,254.5,7,875.2,24.2 +Raymond Ltd.,RAYMOND,500330,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"2,320.7","1,938.8",314.6,13.96%,65.4,89.3,204.2,50.7,159.8,24,"1,514.2",227.5 +Swan Energy Ltd.,SWANENERGY,503310,REALTY,REALTY,"1,230.1",966.3,257,21.01%,27.1,58.3,178.4,12.8,84.6,6.7,308.4,11.7 +Samvardhana Motherson International Ltd.,MOTHERSON,517334,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"23,639.2","21,585","1,888.8",8.05%,867.4,487.9,449.5,229.2,201.6,0.3,"1,910.3",2.8 +Vedant Fashions Ltd.,MANYAVAR,543463,RETAILING,SPECIALTY RETAIL,233.4,125.5,92.8,42.51%,32.5,10.7,64.8,16.1,48.7,2,399.9,16.5 +Adani Wilmar Ltd.,AWL,543458,FMCG,EDIBLE OILS,"12,331.2","12,123.5",143.7,1.17%,95.7,220.2,-161.8,-31.5,-130.7,-1,130.1,1 +Mahindra Lifespace Developers Ltd.,MAHLIFE,532313,REALTY,REALTY,25.7,52.7,-34.9,-196.45%,3.1,0.2,-30.3,-10.8,-18.9,-1.2,10.5,0.7 +Tejas Networks Ltd.,TEJASNET,540595,TELECOM SERVICES,OTHER TELECOM SERVICES,413.9,383,13,3.28%,41.7,7,-17.7,-5.1,-12.6,-0.7,-61.3,-3.5 +Aether Industries Ltd.,AETHER,543534,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,178.3,118.2,46,28.00%,9.7,1.6,48.7,12.1,36.7,2.8,139.1,10.5 +JBM Auto Ltd.,JBMA,ASM,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,238.8","1,091.3",139.7,11.35%,41.2,47.9,58.3,11.3,44.2,3.7,136.8,11.6 +Deepak Fertilisers & Petrochemicals Corporation Ltd.,DEEPAKFERT,500645,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"2,443.2","2,138.1",286.1,11.80%,81.2,107.1,116.8,53.3,60.1,4.8,674.5,53.4 +Sharda Cropchem Ltd.,SHARDACROP,538666,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,604.3,559.6,21.2,3.65%,74,4.6,-33.8,-6.3,-27.6,-3.1,191,21.2 +Shoppers Stop Ltd.,SHOPERSTOP,532638,RETAILING,DEPARTMENT STORES,"1,049.7",878.2,160.9,15.49%,108.2,54.9,3.5,0.8,2.7,0.2,94.2,8.6 +BEML Ltd.,BEML,500048,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,924,855.3,61.5,6.70%,15.8,10.8,42.2,-9.6,51.8,12.4,200.8,48.2 +Lemon Tree Hotels Ltd.,LEMONTREE,541233,HOTELS RESTAURANTS & TOURISM,HOTELS,230.1,125.3,101.9,44.84%,22.6,47.3,34.8,8.6,22.6,0.3,130.1,1.6 +Rainbow Childrens Medicare Ltd.,RAINBOW,543524,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,340.5,215.1,117.6,35.34%,26.8,13.3,85.2,22.1,62.9,6.2,215.4,21.2 +UCO Bank,UCOBANK,532505,BANKING AND FINANCE,BANKS,"5,865.6","1,581.5",981.9,18.81%,0,"3,302.3",639.8,238.1,403.5,0.3,"1,84",1.5 +Piramal Pharma Ltd.,PPLPHARMA,543635,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,960.6","1,645.7",265.6,13.90%,184.5,109.9,20.4,34.5,5,0,-133.6,-1 +KSB Ltd.,KSB,500249,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,572.2,493.4,70.3,12.47%,12.3,2,64.5,17.1,50.1,14.4,209.7,60.3 +Data Patterns (India) Ltd.,DATAPATTNS,543428,GENERAL INDUSTRIALS,DEFENCE,119.2,67.5,40.8,37.63%,3.1,2.3,46.3,12.5,33.8,6,148.3,26.5 +Global Health Ltd.,MEDANTA,543654,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,864.7,631.1,212.9,25.22%,42.9,20.1,170.6,45.4,125.2,4.7,408.9,15.2 +Aarti Industries Ltd.,AARTIIND,524208,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,454","1,221.2",232.8,16.01%,93,58.2,81.6,-9.1,90.7,2.5,446.2,12.3 +BLS International Services Ltd.,BLS,540073,DIVERSIFIED CONSUMER SERVICES,TRAVEL SUPPORT SERVICES,416.4,321,86.7,21.27%,7.3,1,87.2,5.2,78.7,1.9,267.6,6.5 +Archean Chemical Industries Ltd.,ACI,543657,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,301.7,195,95.5,32.86%,17.5,1.9,87.3,21.3,66,5.4,394.4,32.1 +Adani Power Ltd.,ADANIPOWER,ASM,UTILITIES,ELECTRIC UTILITIES,"14,935.7","7,819.2","5,171.4",39.81%,"1,004.5",888.4,"5,223.6","-1,370.6","6,594.2",16.5,"20,604.8",53.4 +Craftsman Automation Ltd.,CRAFTSMAN,543276,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,183.8",941.6,237.5,20.14%,66.8,41.6,133.8,29.6,94.5,44.1,298.3,141.2 +NMDC Ltd.,NMDC,526371,METALS & MINING,MINING,"4,335","2,823.6","1,190.4",29.66%,88.8,18.6,"1,404.1",379,"1,026.2",3.5,"5,862.2",20 +Epigral Ltd.,EPIGRAL,543332,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,479.1,370.2,107.9,22.57%,31.5,21.3,56.1,17.9,38,9.1,223.4,53.8 +Apar Industries Ltd.,APARINDS,532259,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"3,944.7","3,576.2",349.8,8.91%,28.2,103.1,237.3,62.9,173.9,45.4,783.9,204.8 +Bikaji Foods International Ltd.,BIKAJI,543653,FMCG,PACKAGED FOODS,614.7,521,87.7,14.41%,15.6,2.9,75.2,15.4,61.2,2.5,173.6,6.9 +Five-Star Business Finance Ltd.,FIVESTAR,543663,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),522.4,133.2,375,72.28%,5.7,105.9,267,67.6,199.4,6.8,703,24.1 +Ingersoll-Rand (India) Ltd.,INGERRAND,500210,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,282.8,210.7,65.7,23.76%,4.6,0.6,67,17.2,49.7,15.8,218.5,69.2 +KFIN Technologies Ltd.,KFINTECH,543720,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,215.3,115.3,93.7,44.82%,12.6,3.2,84.2,22.3,61.4,3.6,215.1,12.6 +Piramal Enterprises Ltd.,PEL,500302,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"2,205.2","1,320.1","1,117.9",50.97%,38.3,"1,038.9",-11.8,10.7,48.2,2,"3,906.5",173.9 +NMDC Steel Ltd.,NSLNISP,543768,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,290.3,349.6,-72.2,-26.04%,74.5,40.8,-174.7,-43.6,-131.1,-0.5,, +Eris Lifesciences Ltd.,ERIS,540596,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,508.8,324.2,181.1,35.85%,42.1,16.3,126.2,3.9,123.4,9.1,385.6,28.3 +Mankind Pharma Ltd.,MANKIND,543904,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"2,768.1","2,025.5",682.6,25.21%,96.5,8.6,637.5,129.8,501,12.5,"1,564.8",39.1 +Kaynes Technology India Ltd.,KAYNES,ASM,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,369.8,312.1,48.8,13.52%,6.5,11.8,39.4,7.1,32.3,5.5,143.2,24.6 +Safari Industries (India) Ltd.,SAFARI,523025,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,372.9,306.6,63.5,17.15%,12.2,2.2,51.9,12.1,39.8,16.7,162.3,68.2 +Saregama India Ltd.,SAREGAMA,532163,MEDIA,MOVIES & ENTERTAINMENT,185.6,111.5,60.9,35.32%,8.2,0.2,65.6,17.6,48.1,2.5,193.4,10 +Syrma SGS Technology Ltd.,SYRMA,543573,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,720.6,662.7,49,6.88%,11.6,8,37,6.4,28.3,1.6,132.4,7.5 +Jindal Saw Ltd.,JINDALSAW,ASM,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"5,488.9","4,662",804.2,14.71%,142.5,188.7,495.6,139.6,375.7,11.8,"1,135.8",35.5 +Godawari Power & Ispat Ltd.,GPIL,532734,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"1,314.2",929.6,361.4,28.00%,34.8,10.2,339.6,86.1,256.9,20.6,785.5,63 +Gillette India Ltd.,GILLETTE,507815,FMCG,PERSONAL PRODUCTS,676.2,530.8,136.7,20.48%,20.1,0.1,125.2,32.5,92.7,28.4,361.6,111 +Symphony Ltd.,SYMPHONY,517385,CONSUMER DURABLES,CONSUMER ELECTRONICS,286,234,41,14.91%,7,2,43,8,35,5.1,114,16.5 +Glenmark Life Sciences Ltd.,GLS,543322,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,600.7,428.3,167.1,28.06%,13.1,0.4,158.9,40.2,118.7,9.7,505.5,41.3 +Usha Martin Ltd.,USHAMART,517146,METALS & MINING,IRON & STEEL PRODUCTS,806,640.4,144.3,18.39%,18,6.4,141.2,35,109.5,3.6,399.4,13.1 +Ircon International Ltd.,IRCON,541956,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"3,136.3","2,771.2",215.7,7.22%,27.1,36.9,301.2,77.6,250.7,2.7,884.6,9.4 +Ujjivan Small Finance Bank Ltd.,UJJIVANSFB,542904,BANKING AND FINANCE,BANKS,"1,579.8",528.6,483.4,34.75%,0,567.8,436.4,108.7,327.7,1.7,"1,254.5",6.4 +Procter & Gamble Health Ltd.,PGHL,500126,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,311,216.3,88.7,29.08%,6.5,0.2,88,22.5,65.6,39.5,231.4,139.4 +Allcargo Logistics Ltd.,ALLCARGO,532749,TRANSPORTATION,TRANSPORTATION - LOGISTICS,"3,336.3","3,188.8",118,3.57%,106.7,36.7,14.2,1.3,21.8,0.9,361.9,14.7 +Sheela Foam Ltd.,SFL,540203,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,637.6,547,66.2,10.80%,21.9,8.6,60.2,15.6,44,4.5,192.4,17.7 +Alok Industries Ltd.,ALOKINDS,521070,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"1,369.3","1,323.1",35.9,2.64%,78.6,142.2,-174.6,0,-174.8,-0.3,-948.4,-1.9 +Minda Corporation Ltd.,MINDACORP,538962,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,197.9","1,064.5",131.3,10.98%,41.4,14.9,77,18.7,58.8,2.5,278.2,11.6 +Concord Biotech Ltd.,CONCORDBIO,543960,PHARMACEUTICALS & BIOTECHNOLOGY,BIOTECHNOLOGY,270.5,143.2,119.2,45.43%,13.3,0.8,113.2,28.7,81,7.7,, \ No newline at end of file diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/data/sampleFileForUpload.txt b/sdk/ai/ai-projects/samples/v1-beta/javascript/data/sampleFileForUpload.txt new file mode 100644 index 000000000000..ab553b3304c1 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/data/sampleFileForUpload.txt @@ -0,0 +1 @@ +The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457. diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/package.json b/sdk/ai/ai-projects/samples/v1-beta/javascript/package.json new file mode 100644 index 000000000000..f70e39db603e --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/package.json @@ -0,0 +1,39 @@ +{ + "name": "@azure-samples/ai-projects-js-beta", + "private": true, + "version": "1.0.0", + "description": "Azure AI Projects client library samples for JavaScript (Beta)", + "engines": { + "node": ">=18.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/ai/ai-projects" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/ai/ai-projects", + "dependencies": { + "@azure/ai-projects": "next", + "dotenv": "latest", + "@azure/monitor-opentelemetry-exporter": "^1.0.0-beta.27", + "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.7", + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/instrumentation": "0.53.0", + "@opentelemetry/sdk-trace-node": "^1.9.0", + "@azure/core-util": "^1.9.0", + "@azure/identity": "^4.3.0" + } +} diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/sample.env b/sdk/ai/ai-projects/samples/v1-beta/javascript/sample.env new file mode 100644 index 000000000000..0d9bbe518d6f --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/sample.env @@ -0,0 +1,3 @@ +AZURE_AI_PROJECTS_CONNECTION_STRING="" + +APPLICATIONINSIGHTS_CONNECTION_STRING="" diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/README.md b/sdk/ai/ai-projects/samples/v1-beta/typescript/README.md new file mode 100644 index 000000000000..3e35f5d3cce1 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/README.md @@ -0,0 +1,122 @@ +--- +page_type: sample +languages: + - typescript +products: + - azure +urlFragment: ai-projects-typescript-beta +--- + +# Azure AI Projects client library samples for TypeScript (Beta) + +These sample programs show how to use the TypeScript client libraries for Azure AI Projects in some common scenarios. + + + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/agents\agentCreateWithTracingConsole.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx dev-tool run vendored cross-env AZURE_AI_PROJECTS_CONNECTION_STRING="" APPLICATIONINSIGHTS_CONNECTION_STRING="" node dist/agents\agentCreateWithTracingConsole.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + + diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/package.json b/sdk/ai/ai-projects/samples/v1-beta/typescript/package.json new file mode 100644 index 000000000000..3b0a808b8cfb --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/package.json @@ -0,0 +1,48 @@ +{ + "name": "@azure-samples/ai-projects-ts-beta", + "private": true, + "version": "1.0.0", + "description": "Azure AI Projects client library samples for TypeScript (Beta)", + "engines": { + "node": ">=18.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/ai/ai-projects" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/ai/ai-projects", + "dependencies": { + "@azure/ai-projects": "next", + "dotenv": "latest", + "@azure/monitor-opentelemetry-exporter": "^1.0.0-beta.27", + "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.7", + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/instrumentation": "0.53.0", + "@opentelemetry/sdk-trace-node": "^1.9.0", + "@azure/core-util": "^1.9.0", + "@azure/identity": "^4.3.0" + }, + "devDependencies": { + "@types/node": "^18.0.0", + "typescript": "~5.6.2", + "rimraf": "latest" + } +} diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/sample.env b/sdk/ai/ai-projects/samples/v1-beta/typescript/sample.env new file mode 100644 index 000000000000..0d9bbe518d6f --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/sample.env @@ -0,0 +1,3 @@ +AZURE_AI_PROJECTS_CONNECTION_STRING="" + +APPLICATIONINSIGHTS_CONNECTION_STRING="" diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentCreateWithTracingConsole.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentCreateWithTracingConsole.ts new file mode 100644 index 000000000000..57e4dcb4d285 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentCreateWithTracingConsole.ts @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Demonstrates How to instrument and get tracing using open telemetry. + * + * @summary Create Agent and instrument using open telemetry. + */ + +import { AzureMonitorTraceExporter } from "@azure/monitor-opentelemetry-exporter"; +import { createAzureSdkInstrumentation } from "@azure/opentelemetry-instrumentation-azure-sdk"; +import { context, trace } from "@opentelemetry/api"; +import { registerInstrumentations } from "@opentelemetry/instrumentation"; +import { + ConsoleSpanExporter, + NodeTracerProvider, + SimpleSpanProcessor, +} from "@opentelemetry/sdk-trace-node"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const provider = new NodeTracerProvider(); +provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +provider.register(); + +registerInstrumentations({ + instrumentations: [createAzureSdkInstrumentation()], +}); + +import { AIProjectsClient } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; +let appInsightsConnectionString = process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"]; + +export async function main(): Promise { + const tracer = trace.getTracer("Agents Sample", "1.0.0"); + + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + if (!appInsightsConnectionString) { + appInsightsConnectionString = await client.telemetry.getConnectionString(); + } + + if (appInsightsConnectionString) { + const exporter = new AzureMonitorTraceExporter({ + connectionString: appInsightsConnectionString, + }); + provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); + } + + await tracer.startActiveSpan("main", async (span) => { + client.telemetry.updateSettings({ enableContentRecording: true }); + + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + tracingOptions: { tracingContext: context.active() }, + }); + + console.log(`Created agent, agent ID : ${agent.id}`); + + const thread = await client.agents.createThread(); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "Hello, tell me a joke", + }); + console.log(`Created message, message ID ${message.id}`); + + // Create run + let run = await client.agents.createRun(thread.id, agent.id); + console.log(`Created Run, Run ID: ${run.id}`); + + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + } + + await client.agents.deleteAgent(agent.id); + + console.log(`Deleted agent`); + + await client.agents.listMessages(thread.id); + + span.end(); + }); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsAzureAiSearch.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsAzureAiSearch.ts new file mode 100644 index 000000000000..0579c0fd0ea8 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsAzureAiSearch.ts @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with the Azure AI Search tool from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with the Azure AI Search tool. + */ + +import type { MessageContentOutput, MessageTextContentOutput } from "@azure/ai-projects"; +import { AIProjectsClient, isOutputOfType, ToolUtility } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + // Create an Azure AI Client from a connection string, copied from your AI Foundry project. + // At the moment, it should be in the format ";;;" + // Customer needs to login to Azure subscription via Azure CLI and set the environment variables + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const connectionName = process.env["AZURE_AI_SEARCH_CONNECTION_NAME"] || ""; + const connection = await client.connections.getConnection(connectionName); + + // Initialize Azure AI Search tool + const azureAISearchTool = ToolUtility.createAzureAISearchTool(connection.id, connection.name); + + // Create agent with the Azure AI search tool + const agent = await client.agents.createAgent("gpt-4-0125-preview", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [azureAISearchTool.definition], + toolResources: azureAISearchTool.resources, + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread for communication + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message to thread + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "Hello, send an email with the datetime and weather information in New York", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create and process agent run in thread with tools + let run = await client.agents.createRun(thread.id, agent.id); + while (run.status === "queued" || run.status === "in_progress") { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + } + if (run.status === "failed") { + console.log(`Run failed: ${run.lastError}`); + } + console.log(`Run finished with status: ${run.status}`); + + // Delete the assistant when done + client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + + // Fetch and log all messages + const messages = await client.agents.listMessages(thread.id); + console.log(`Messages:`); + const agentMessage: MessageContentOutput = messages.data[0].content[0]; + if (isOutputOfType(agentMessage, "text")) { + const textContent = agentMessage as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBasics.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBasics.ts new file mode 100644 index 000000000000..3bbc3cb1019b --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBasics.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic agent operations. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + + console.log(`Created agent, agent ID : ${agent.id}`); + + client.agents.deleteAgent(agent.id); + + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBingGrounding.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBingGrounding.ts new file mode 100644 index 000000000000..d5057c2fdb5b --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBingGrounding.ts @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with the Grounding with Bing Search tool + * from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with the Grounding with Bing Search tool. + */ + +import type { MessageContentOutput, MessageTextContentOutput } from "@azure/ai-projects"; +import { + AIProjectsClient, + ToolUtility, + connectionToolType, + isOutputOfType, +} from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + // Create an Azure AI Client from a connection string, copied from your AI Foundry project. + // At the moment, it should be in the format ";;;" + // Customer needs to login to Azure subscription via Azure CLI and set the environment variables + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const bingConnection = await client.connections.getConnection( + process.env["BING_CONNECTION_NAME"] || "", + ); + const connectionId = bingConnection.id; + + // Initialize agent bing tool with the connection id + const bingTool = ToolUtility.createConnectionTool(connectionToolType.BingGrounding, [ + connectionId, + ]); + + // Create agent with the bing tool and process assistant run + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [bingTool.definition], + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread for communication + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message to thread + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "How does wikipedia explain Euler's Identity?", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create and process agent run in thread with tools + let run = await client.agents.createRun(thread.id, agent.id); + while (run.status === "queued" || run.status === "in_progress") { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + } + if (run.status === "failed") { + console.log(`Run failed: ${run.lastError}`); + } + console.log(`Run finished with status: ${run.status}`); + + // Delete the assistant when done + client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + + // Fetch and log all messages + const messages = await client.agents.listMessages(thread.id); + console.log(`Messages:`); + const agentMessage: MessageContentOutput = messages.data[0].content[0]; + if (isOutputOfType(agentMessage, "text")) { + const textContent = agentMessage as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBingGroundingWithStreaming.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBingGroundingWithStreaming.ts new file mode 100644 index 000000000000..345bf626cb46 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsBingGroundingWithStreaming.ts @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with the Grounding with Bing Search tool + * from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with the Grounding with Bing Search tool using streaming. + */ + +import type { + MessageContentOutput, + MessageDeltaChunk, + MessageDeltaTextContent, + MessageTextContentOutput, + ThreadRunOutput, +} from "@azure/ai-projects"; +import { + AIProjectsClient, + DoneEvent, + ErrorEvent, + MessageStreamEvent, + RunStreamEvent, + ToolUtility, + connectionToolType, + isOutputOfType, +} from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + // Create an Azure AI Client from a connection string, copied from your AI Foundry project. + // At the moment, it should be in the format ";;;" + // Customer needs to login to Azure subscription via Azure CLI and set the environment variables + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const bingConnection = await client.connections.getConnection( + process.env["BING_CONNECTION_NAME"] || "", + ); + const connectionId = bingConnection.id; + + const bingTool = ToolUtility.createConnectionTool(connectionToolType.BingGrounding, [ + connectionId, + ]); + + // Create agent with the bing tool and process assistant run + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [bingTool.definition], + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread for communication + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message to thread + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "How does wikipedia explain Euler's Identity?", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create and process agent run with streaming in thread with tools + const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); + + for await (const eventMessage of streamEventMessages) { + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${(eventMessage.data as ThreadRunOutput).status}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data as MessageDeltaChunk; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart as MessageDeltaTextContent; + const textValue = textContent.text?.value || "No text"; + console.log(`Text delta received:: ${textValue}`); + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } + } + + // Delete the assistant when done + client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + + // Fetch and log all messages + const messages = await client.agents.listMessages(thread.id); + console.log(`Messages:`); + const agentMessage: MessageContentOutput = messages.data[0].content[0]; + if (isOutputOfType(agentMessage, "text")) { + const textContent = agentMessage as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithFunctionTool.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithFunctionTool.ts new file mode 100644 index 000000000000..38200f55d9a5 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithFunctionTool.ts @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/* eslint-disable @typescript-eslint/no-unsafe-function-type + */ + +/** + * This sample demonstrates how to use basic agent operations with function tool from the Azure Agents service. + * + * @summary demonstrates how to use basic agent operations using function tool. + * + */ + +import type { + FunctionToolDefinition, + FunctionToolDefinitionOutput, + MessageContentOutput, + MessageImageFileContentOutput, + MessageTextContentOutput, + RequiredToolCallOutput, + SubmitToolOutputsActionOutput, + ToolOutput, +} from "@azure/ai-projects"; +import { AIProjectsClient, ToolUtility, isOutputOfType } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const agents = client.agents; + class FunctionToolExecutor { + private functionTools: { func: Function; definition: FunctionToolDefinition }[]; + + constructor() { + this.functionTools = [ + { + func: this.getUserFavoriteCity, + ...ToolUtility.createFunctionTool({ + name: "getUserFavoriteCity", + description: "Gets the user's favorite city.", + parameters: {}, + }), + }, + { + func: this.getCityNickname, + ...ToolUtility.createFunctionTool({ + name: "getCityNickname", + description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", + parameters: { + type: "object", + properties: { + location: { type: "string", description: "The city and state, e.g. Seattle, Wa" }, + }, + }, + }), + }, + { + func: this.getWeather, + ...ToolUtility.createFunctionTool({ + name: "getWeather", + description: "Gets the weather for a location.", + parameters: { + type: "object", + properties: { + location: { type: "string", description: "The city and state, e.g. Seattle, Wa" }, + unit: { type: "string", enum: ["c", "f"] }, + }, + }, + }), + }, + ]; + } + + private getUserFavoriteCity(): {} { + return { location: "Seattle, WA" }; + } + + private getCityNickname(_location: string): {} { + return { nickname: "The Emerald City" }; + } + + private getWeather(_location: string, unit: string): {} { + return { weather: unit === "f" ? "72f" : "22c" }; + } + + public invokeTool( + toolCall: RequiredToolCallOutput & FunctionToolDefinitionOutput, + ): ToolOutput | undefined { + console.log(`Function tool call - ${toolCall.function.name}`); + const args = []; + if (toolCall.function.parameters) { + try { + const params = JSON.parse(toolCall.function.parameters); + for (const key in params) { + if (Object.prototype.hasOwnProperty.call(params, key)) { + args.push(params[key]); + } + } + } catch (error) { + console.error(`Failed to parse parameters: ${toolCall.function.parameters}`, error); + return undefined; + } + } + const result = this.functionTools + .find((tool) => tool.definition.function.name === toolCall.function.name) + ?.func(...args); + return result + ? { + toolCallId: toolCall.id, + output: JSON.stringify(result), + } + : undefined; + } + + public getFunctionDefinitions(): FunctionToolDefinition[] { + return this.functionTools.map((tool) => { + return tool.definition; + }); + } + } + + const functionToolExecutor = new FunctionToolExecutor(); + const functionTools = functionToolExecutor.getFunctionDefinitions(); + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: + "You are a weather bot. Use the provided functions to help answer questions. Customize your responses to the user's preferences as much as possible and use friendly nicknames for cities whenever possible.", + tools: functionTools, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "What's the weather like in my favorite city?", + }); + console.log(`Created message, message ID ${message.id}`); + + // Create run + let run = await agents.createRun(thread.id, agent.id); + console.log(`Created Run, Run ID: ${run.id}`); + + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await delay(1000); + run = await agents.getRun(thread.id, run.id); + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + if (run.status === "requires_action" && run.requiredAction) { + console.log(`Run requires action - ${run.requiredAction}`); + if ( + isOutputOfType(run.requiredAction, "submit_tool_outputs") + ) { + const submitToolOutputsActionOutput = run.requiredAction as SubmitToolOutputsActionOutput; + const toolCalls = submitToolOutputsActionOutput.submitToolOutputs.toolCalls; + const toolResponses = []; + for (const toolCall of toolCalls) { + if (isOutputOfType(toolCall, "function")) { + const toolResponse = functionToolExecutor.invokeTool(toolCall); + if (toolResponse) { + toolResponses.push(toolResponse); + } + } + } + if (toolResponses.length > 0) { + run = await agents.submitToolOutputsToRun(thread.id, run.id, toolResponses); + console.log(`Submitted tool response - ${run.status}`); + } + } + } + } + + console.log(`Run status - ${run.status}, run ID: ${run.id}`); + const messages = await agents.listMessages(thread.id); + messages.data.forEach((threadMessage) => { + console.log( + `Thread Message Created at - ${threadMessage.createdAt} - Role - ${threadMessage.role}`, + ); + threadMessage.content.forEach((content: MessageContentOutput) => { + if (isOutputOfType(content, "text")) { + const textContent = content as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } else if (isOutputOfType(content, "image_file")) { + const imageContent = content as MessageImageFileContentOutput; + console.log(`Image Message Content - ${imageContent.imageFile.fileId}`); + } + }); + }); + // Delete agent + agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithToolset.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithToolset.ts new file mode 100644 index 000000000000..83aa3493963d --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithToolset.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with toolset and iteration in streaming + * from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with toolset. + */ + +import { AIProjectsClient, ToolSet } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; + +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file for code interpreter tool + const filePath1 = path.resolve(__dirname, "../data/nifty500QuarterlyResults.csv"); + const fileStream1 = fs.createReadStream(filePath1); + const codeInterpreterFile = await client.agents.uploadFile(fileStream1, "assistants", { + fileName: "myLocalFile", + }); + + console.log(`Uploaded local file, file ID : ${codeInterpreterFile.id}`); + + // Upload file for file search tool + const filePath2 = path.resolve(__dirname, "../data/sampleFileForUpload.txt"); + const fileStream2 = fs.createReadStream(filePath2); + const fileSearchFile = await client.agents.uploadFile(fileStream2, "assistants", { + fileName: "sampleFileForUpload.txt", + }); + console.log(`Uploaded file, file ID: ${fileSearchFile.id}`); + + // Create vector store for file search tool + const vectorStore = await client.agents.createVectorStoreAndPoll({ + fileIds: [fileSearchFile.id], + }); + + // Create tool set + const toolSet = new ToolSet(); + toolSet.addFileSearchTool([vectorStore.id]); + toolSet.addCodeInterpreterTool([codeInterpreterFile.id]); + + // Create agent with tool set + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: toolSet.toolDefinitions, + toolResources: toolSet.toolResources, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create threads, messages, and runs to interact with agent as desired + + // Delete agent + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/batchVectorStoreWithFiles.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/batchVectorStoreWithFiles.ts new file mode 100644 index 000000000000..9fbda36fcdc4 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/batchVectorStoreWithFiles.ts @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the batch vector store with the list of files. + * + * @summary demonstrates how to create the batch vector store with the list of files. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload first file + const file1Content = "Hello, Vector Store!"; + const readable1 = new Readable(); + readable1.push(file1Content); + readable1.push(null); // end the stream + const file1 = await client.agents.uploadFile(readable1, "assistants", { + fileName: "vectorFile1.txt", + }); + console.log(`Uploaded file1, file ID: ${file1.id}`); + + // Create and upload second file + const file2Content = "This is another file for the Vector Store!"; + const readable2 = new Readable(); + readable2.push(file2Content); + readable2.push(null); // end the stream + const file2 = await client.agents.uploadFile(readable2, "assistants", { + fileName: "vectorFile2.txt", + }); + console.log(`Uploaded file2, file ID: ${file2.id}`); + + // Create vector store file batch + const vectorStoreFileBatch = await client.agents.createVectorStoreFileBatch(vectorStore.id, { + fileIds: [file1.id, file2.id], + }); + console.log( + `Created vector store file batch, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Retrieve vector store file batch + const _vectorStoreFileBatch = await client.agents.getVectorStoreFileBatch( + vectorStore.id, + vectorStoreFileBatch.id, + ); + console.log( + `Retrieved vector store file batch, vector store file batch ID: ${_vectorStoreFileBatch.id}`, + ); + + // List vector store files in the batch + const vectorStoreFiles = await client.agents.listVectorStoreFileBatchFiles( + vectorStore.id, + vectorStoreFileBatch.id, + ); + console.log( + `List of vector store files in the batch: ${vectorStoreFiles.data.map((f) => f.id).join(", ")}`, + ); + + // Delete files + await client.agents.deleteFile(file1.id); + console.log(`Deleted file1, file ID: ${file1.id}`); + await client.agents.deleteFile(file2.id); + console.log(`Deleted file2, file ID: ${file2.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/batchVectorStoreWithFilesAndPolling.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/batchVectorStoreWithFilesAndPolling.ts new file mode 100644 index 000000000000..7940fe1aa9b0 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/batchVectorStoreWithFilesAndPolling.ts @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the batch vector store with the list of files using polling operation. + * + * @summary demonstrates how to create the batch vector store with the list of files using polling operation. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload first file + const file1Content = "Hello, Vector Store!"; + const readable1 = new Readable(); + readable1.push(file1Content); + readable1.push(null); // end the stream + const file1 = await client.agents.uploadFile(readable1, "assistants", { + fileName: "vectorFile1.txt", + }); + console.log(`Uploaded file1, file ID: ${file1.id}`); + + // Create and upload second file + const file2Content = "This is another file for the Vector Store!"; + const readable2 = new Readable(); + readable2.push(file2Content); + readable2.push(null); // end the stream + const file2 = await client.agents.uploadFile(readable2, "assistants", { + fileName: "vectorFile2.txt", + }); + console.log(`Uploaded file2, file ID: ${file2.id}`); + + // Set up abort controller (optional) + // Polling can then be stopped using abortController.abort() + const abortController = new AbortController(); + + // Create vector store file batch + const vectorStoreFileBatchOptions = { + fileIds: [file1.id, file2.id], + pollingOptions: { abortSignal: abortController.signal }, + }; + const poller = client.agents.createVectorStoreFileBatchAndPoll( + vectorStore.id, + vectorStoreFileBatchOptions, + ); + const vectorStoreFileBatch = await poller.pollUntilDone(); + console.log( + `Created vector store file batch with status ${vectorStoreFileBatch.status}, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Retrieve vector store file batch + const _vectorStoreFileBatch = await client.agents.getVectorStoreFileBatch( + vectorStore.id, + vectorStoreFileBatch.id, + ); + console.log( + `Retrieved vector store file batch, vector store file batch ID: ${_vectorStoreFileBatch.id}`, + ); + + // Delete files + await client.agents.deleteFile(file1.id); + console.log(`Deleted file1, file ID: ${file1.id}`); + await client.agents.deleteFile(file2.id); + console.log(`Deleted file2, file ID: ${file2.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/codeInterpreter.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/codeInterpreter.ts new file mode 100644 index 000000000000..1cd4579376b2 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/codeInterpreter.ts @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with code interpreter from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with code interpreter. + */ + +import type { MessageImageFileContentOutput, MessageTextContentOutput } from "@azure/ai-projects"; +import { AIProjectsClient, isOutputOfType, ToolUtility } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file and wait for it to be processed + const filePath = path.resolve(__dirname, "../data/nifty500QuarterlyResults.csv"); + const localFileStream = fs.createReadStream(filePath); + const localFile = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "localFile", + }); + + console.log(`Uploaded local file, file ID : ${localFile.id}`); + + // Create code interpreter tool + const codeInterpreterTool = ToolUtility.createCodeInterpreterTool([localFile.id]); + + // Notice that CodeInterpreter must be enabled in the agent creation, otherwise the agent will not be able to see the file attachment + const agent = await client.agents.createAgent("gpt-4o-mini", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [codeInterpreterTool.definition], + toolResources: codeInterpreterTool.resources, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create a thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create a message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: + "Could you please create a bar chart in the TRANSPORTATION sector for the operating profit from the uploaded CSV file and provide the file to me?", + }); + + console.log(`Created message, message ID: ${message.id}`); + + // Create and execute a run + let run = await client.agents.createRun(thread.id, agent.id); + while (run.status === "queued" || run.status === "in_progress") { + await delay(1000); + run = await client.agents.getRun(thread.id, run.id); + } + if (run.status === "failed") { + // Check if you got "Rate limit is exceeded.", then you want to get more quota + console.log(`Run failed: ${run.lastError}`); + } + console.log(`Run finished with status: ${run.status}`); + + // Delete the original file from the agent to free up space (note: this does not delete your version of the file) + await client.agents.deleteFile(localFile.id); + console.log(`Deleted file, file ID: ${localFile.id}`); + + // Print the messages from the agent + const messages = await client.agents.listMessages(thread.id); + console.log("Messages:", messages); + + // Get most recent message from the assistant + const assistantMessage = messages.data.find((msg) => msg.role === "assistant"); + if (assistantMessage) { + const textContent = assistantMessage.content.find((content) => + isOutputOfType(content, "text"), + ) as MessageTextContentOutput; + if (textContent) { + console.log(`Last message: ${textContent.text.value}`); + } + } + + // Save the newly created file + console.log(`Saving new files...`); + const imageFile = (messages.data[0].content[0] as MessageImageFileContentOutput).imageFile; + console.log(`Image file ID : ${imageFile}`); + const imageFileName = path.resolve( + __dirname, + "../data/" + (await client.agents.getFile(imageFile.fileId)).filename + "ImageFile.png", + ); + + const fileContent = await ( + await client.agents.getFileContent(imageFile.fileId).asNodeStream() + ).body; + if (fileContent) { + const chunks: Buffer[] = []; + for await (const chunk of fileContent) { + chunks.push(Buffer.from(chunk)); + } + const buffer = Buffer.concat(chunks); + fs.writeFileSync(imageFileName, buffer); + } else { + console.error("Failed to retrieve file content: fileContent is undefined"); + } + console.log(`Saved image file to: ${imageFileName}`); + + // Iterate through messages and print details for each annotation + console.log(`Message Details:`); + messages.data.forEach((m) => { + console.log(`File Paths:`); + console.log(`Type: ${m.content[0].type}`); + if (isOutputOfType(m.content[0], "text")) { + const textContent = m.content[0] as MessageTextContentOutput; + console.log(`Text: ${textContent.text.value}`); + } + console.log(`File ID: ${m.id}`); + console.log(`Start Index: ${messages.firstId}`); + console.log(`End Index: ${messages.lastId}`); + }); + + // Delete the agent once done + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/codeInterpreterWithStreaming.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/codeInterpreterWithStreaming.ts new file mode 100644 index 000000000000..07e9fb628ad1 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/codeInterpreterWithStreaming.ts @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with code interpreter from the Azure Agents service. + * + * @summary demonstrates how to use agent operations with code interpreter. + */ + +import type { + MessageDeltaChunk, + MessageDeltaTextContent, + MessageImageFileContentOutput, + MessageTextContentOutput, + ThreadRunOutput, +} from "@azure/ai-projects"; +import { + AIProjectsClient, + DoneEvent, + ErrorEvent, + isOutputOfType, + MessageStreamEvent, + RunStreamEvent, + ToolUtility, +} from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file and wait for it to be processed + const filePath = path.resolve(__dirname, "../data/nifty500QuarterlyResults.csv"); + const localFileStream = fs.createReadStream(filePath); + const localFile = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "myLocalFile", + }); + + console.log(`Uploaded local file, file ID : ${localFile.id}`); + + // Create code interpreter tool + const codeInterpreterTool = ToolUtility.createCodeInterpreterTool([localFile.id]); + + // Notice that CodeInterpreter must be enabled in the agent creation, otherwise the agent will not be able to see the file attachment + const agent = await client.agents.createAgent("gpt-4o-mini", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [codeInterpreterTool.definition], + toolResources: codeInterpreterTool.resources, + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create a thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create a message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: + "Could you please create a bar chart in the TRANSPORTATION sector for the operating profit from the uploaded CSV file and provide the file to me?", + }); + + console.log(`Created message, message ID: ${message.id}`); + + // Create and execute a run + const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); + + for await (const eventMessage of streamEventMessages) { + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${(eventMessage.data as ThreadRunOutput).status}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data as MessageDeltaChunk; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart as MessageDeltaTextContent; + const textValue = textContent.text?.value || "No text"; + console.log(`Text delta received:: ${textValue}`); + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } + } + + // Delete the original file from the agent to free up space (note: this does not delete your version of the file) + await client.agents.deleteFile(localFile.id); + console.log(`Deleted file, file ID : ${localFile.id}`); + + // Print the messages from the agent + const messages = await client.agents.listMessages(thread.id); + console.log("Messages:", messages); + + // Get most recent message from the assistant + const assistantMessage = messages.data.find((msg) => msg.role === "assistant"); + if (assistantMessage) { + const textContent = assistantMessage.content.find((content) => + isOutputOfType(content, "text"), + ) as MessageTextContentOutput; + if (textContent) { + console.log(`Last message: ${textContent.text.value}`); + } + } + + // Save the newly created file + console.log(`Saving new files...`); + const imageFileOutput = messages.data[0].content[0] as MessageImageFileContentOutput; + const imageFile = imageFileOutput.imageFile.fileId; + const imageFileName = path.resolve( + __dirname, + "../data/" + (await client.agents.getFile(imageFile)).filename + "ImageFile.png", + ); + console.log(`Image file name : ${imageFileName}`); + + const fileContent = await (await client.agents.getFileContent(imageFile).asNodeStream()).body; + if (fileContent) { + const chunks: Buffer[] = []; + for await (const chunk of fileContent) { + chunks.push(Buffer.from(chunk)); + } + const buffer = Buffer.concat(chunks); + fs.writeFileSync(imageFileName, buffer); + } else { + console.error("Failed to retrieve file content: fileContent is undefined"); + } + console.log(`Saved image file to: ${imageFileName}`); + + // Iterate through messages and print details for each annotation + console.log(`Message Details:`); + messages.data.forEach((m) => { + console.log(`File Paths:`); + console.log(`Type: ${m.content[0].type}`); + if (isOutputOfType(m.content[0], "text")) { + const textContent = m.content[0] as MessageTextContentOutput; + console.log(`Text: ${textContent.text.value}`); + } + console.log(`File ID: ${m.id}`); + console.log(`Start Index: ${messages.firstId}`); + console.log(`End Index: ${messages.lastId}`); + }); + + // Delete the agent once done + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/fileSearch.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/fileSearch.ts new file mode 100644 index 000000000000..2017065cfc29 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/fileSearch.ts @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations with file searching from the Azure Agents service. + * + * @summary This sample demonstrates how to use agent operations with file searching. + */ + +import type { + MessageContentOutput, + MessageImageFileContentOutput, + MessageTextContentOutput, +} from "@azure/ai-projects"; +import { AIProjectsClient, isOutputOfType, ToolUtility } from "@azure/ai-projects"; +import { delay } from "@azure/core-util"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload file + const filePath = path.resolve(__dirname, "../data/sampleFileForUpload.txt"); + const localFileStream = fs.createReadStream(filePath); + const file = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "sampleFileForUpload.txt", + }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store + const vectorStore = await client.agents.createVectorStore({ + fileIds: [file.id], + name: "myVectorStore", + }); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Initialize file search tool + const fileSearchTool = ToolUtility.createFileSearchTool([vectorStore.id]); + + // Create agent with files + const agent = await client.agents.createAgent("gpt-4o", { + name: "SDK Test Agent - Retrieval", + instructions: "You are helpful agent that can help fetch data from files you know about.", + tools: [fileSearchTool.definition], + toolResources: fileSearchTool.resources, + }); + console.log(`Created agent, agent ID : ${agent.id}`); + + // Create thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "Can you give me the documented codes for 'banana' and 'orange'?", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create run + let run = await client.agents.createRun(thread.id, agent.id); + while (["queued", "in_progress"].includes(run.status)) { + await delay(500); + run = await client.agents.getRun(thread.id, run.id); + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + } + + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + const messages = await client.agents.listMessages(thread.id); + messages.data.forEach((threadMessage) => { + console.log( + `Thread Message Created at - ${threadMessage.createdAt} - Role - ${threadMessage.role}`, + ); + threadMessage.content.forEach((content: MessageContentOutput) => { + if (isOutputOfType(content, "text")) { + const textContent = content as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } else if (isOutputOfType(content, "image_file")) { + const imageContent = content as MessageImageFileContentOutput; + console.log(`Image Message Content - ${imageContent.imageFile.fileId}`); + } + }); + }); + + // Delete agent + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/files.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/files.ts new file mode 100644 index 000000000000..2e2bebdadd22 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/files.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic files agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic files agent operations. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create and upload file + const fileContent = "Hello, World!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + const file = await client.agents.uploadFile(readable, "assistants", { fileName: "myFile.txt" }); + console.log(`Uploaded file, file ID : ${file.id}`); + + // List uploaded files + const files = await client.agents.listFiles(); + + console.log(`List of files : ${files.data[0].filename}`); + + // Retrieve file + const _file = await client.agents.getFile(file.id); + + console.log(`Retrieved file, file ID : ${_file.id}`); + + // Delete file + await client.agents.deleteFile(file.id); + + console.log(`Deleted file, file ID : ${file.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/filesWithLocalUpload.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/filesWithLocalUpload.ts new file mode 100644 index 000000000000..eb85a19e6fd1 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/filesWithLocalUpload.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic files agent operations with local file upload from the Azure Agents service. + * + * @summary demonstrates how to use basic files agent operations with local file upload. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import path from "node:path"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Upload local file + const filePath = path.resolve(__dirname, "../data/localFile.txt"); + const localFileStream = fs.createReadStream(filePath); + const localFile = await client.agents.uploadFile(localFileStream, "assistants", { + fileName: "myLocalFile.txt", + }); + + console.log(`Uploaded local file, file ID : ${localFile.id}`); + + // Retrieve local file + const retrievedLocalFile = await client.agents.getFile(localFile.id); + + console.log(`Retrieved local file, file ID : ${retrievedLocalFile.id}`); + + // Delete local file + await client.agents.deleteFile(localFile.id); + + console.log(`Deleted local file, file ID : ${localFile.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/filesWithPolling.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/filesWithPolling.ts new file mode 100644 index 000000000000..61edd4c73c47 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/filesWithPolling.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to upload a file and poll for its status. + * + * @summary demonstrates how to upload a file and poll for its status. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create file content + const fileContent = "Hello, World!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + + // Upload file and poll + const poller = client.agents.uploadFileAndPoll(readable, "assistants", { + fileName: "myPollingFile", + }); + const file = await poller.pollUntilDone(); + console.log(`Uploaded file with status ${file.status}, file ID : ${file.id}`); + + // Delete file + await client.agents.deleteFile(file.id); + console.log(`Deleted file, file ID ${file.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/messages.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/messages.ts new file mode 100644 index 000000000000..f290d20bf059 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/messages.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic message agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic message agent operations. + */ + +import type { MessageTextContentOutput } from "@azure/ai-projects"; +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + const thread = await client.agents.createThread(); + + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + + const messages = await client.agents.listMessages(thread.id); + console.log( + `Message ${message.id} contents: ${(messages.data[0].content[0] as MessageTextContentOutput).text.value}`, + ); + + const updatedMessage = await client.agents.updateMessage(thread.id, message.id, { + metadata: { introduction: "true" }, + }); + console.log(`Updated message metadata - introduction: ${updatedMessage.metadata?.introduction}`); + + await client.agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID : ${thread.id}`); + + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID : ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/runSteps.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/runSteps.ts new file mode 100644 index 000000000000..c646de76d259 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/runSteps.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic run agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic run agent operations. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create agent + const agent = await client.agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await client.agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await client.agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create run + let run = await client.agents.createRun(thread.id, agent.id); + console.log(`Created run, run ID: ${run.id}`); + + // Wait for run to complete + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await new Promise((resolve) => setTimeout(resolve, 1000)); + run = await client.agents.getRun(thread.id, run.id); + console.log(`Run status: ${run.status}`); + } + + // List run steps + const runSteps = await client.agents.listRunSteps(thread.id, run.id); + console.log(`Listed run steps, run ID: ${run.id}`); + + // Get specific run step + const stepId = runSteps.data[0].id; + const step = await client.agents.getRunStep(thread.id, run.id, stepId); + console.log(`Retrieved run step, step ID: ${step.id}`); + + // Clean up + await client.agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + await client.agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/streaming.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/streaming.ts new file mode 100644 index 000000000000..0d947bdf759a --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/streaming.ts @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use agent operations in streaming from the Azure Agents service. + * + * @summary demonstrates how to use agent operations in streaming. + */ + +import type { + MessageDeltaChunk, + MessageDeltaTextContent, + ThreadRunOutput, +} from "@azure/ai-projects"; +import { + AIProjectsClient, + DoneEvent, + ErrorEvent, + MessageStreamEvent, + RunStreamEvent, +} from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + const agent = await client.agents.createAgent("gpt-4-1106-preview", { + name: "my-assistant", + instructions: "You are helpful agent", + }); + + console.log(`Created agent, agent ID : ${agent.id}`); + + const thread = await client.agents.createThread(); + + console.log(`Created thread, thread ID : ${agent.id}`); + + await client.agents.createMessage(thread.id, { role: "user", content: "Hello, tell me a joke" }); + + console.log(`Created message, thread ID : ${agent.id}`); + + const streamEventMessages = await client.agents.createRun(thread.id, agent.id).stream(); + + for await (const eventMessage of streamEventMessages) { + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`ThreadRun status: ${(eventMessage.data as ThreadRunOutput).status}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + { + const messageDelta = eventMessage.data as MessageDeltaChunk; + messageDelta.delta.content.forEach((contentPart) => { + if (contentPart.type === "text") { + const textContent = contentPart as MessageDeltaTextContent; + const textValue = textContent.text?.value || "No text"; + console.log(`Text delta received:: ${textValue}`); + } + }); + } + break; + + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + case ErrorEvent.Error: + console.log(`An error occurred. Data ${eventMessage.data}`); + break; + case DoneEvent.Done: + console.log("Stream completed."); + break; + } + } + + await client.agents.deleteAgent(agent.id); + console.log(`Delete agent, agent ID : ${agent.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/threads.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/threads.ts new file mode 100644 index 000000000000..d60b7f7e9ce8 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/threads.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to use basic thread agent operations from the Azure Agents service. + * + * @summary demonstrates how to use basic thread agent operations. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + const thread = await client.agents.createThread(); + + console.log(`Created thread, thread ID : ${thread.id}`); + + const _thread = await client.agents.getThread(thread.id); + + console.log(`Retrieved thread, thread ID : ${_thread.id}`); + + client.agents.deleteThread(thread.id); + + console.log(`Deleted thread, thread ID : ${_thread.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoreWithFiles.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoreWithFiles.ts new file mode 100644 index 000000000000..22461dee10dd --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoreWithFiles.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store with the list of files. + * + * @summary demonstrates how to create the vector store with the list of files. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload file + const fileContent = "Hello, Vector Store!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + const file = await client.agents.uploadFile(readable, "assistants", { + fileName: "vectorFile.txt", + }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store file + const vectorStoreFile = await client.agents.createVectorStoreFile(vectorStore.id, { + fileId: file.id, + }); + console.log(`Created vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Retrieve vector store file + const _vectorStoreFile = await client.agents.getVectorStoreFile( + vectorStore.id, + vectorStoreFile.id, + ); + console.log(`Retrieved vector store file, vector store file ID: ${_vectorStoreFile.id}`); + + // List vector store files + const vectorStoreFiles = await client.agents.listVectorStoreFiles(vectorStore.id); + console.log(`List of vector store files: ${vectorStoreFiles.data.map((f) => f.id).join(", ")}`); + + // Delete vector store file + await client.agents.deleteVectorStoreFile(vectorStore.id, vectorStoreFile.id); + console.log(`Deleted vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Delete file + await client.agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoreWithFilesAndPolling.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoreWithFilesAndPolling.ts new file mode 100644 index 000000000000..9b6bb00d3710 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoreWithFilesAndPolling.ts @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store with the list of files using polling operation. + * + * @summary demonstrates how to create the vector store with the list of files using polling operation. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; +import { Readable } from "stream"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create vector store + const vectorStore = await client.agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Create and upload file + const fileContent = "Hello, Vector Store!"; + const readable = new Readable(); + readable.push(fileContent); + readable.push(null); // end the stream + const file = await client.agents.uploadFile(readable, "assistants", { + fileName: "vectorFile.txt", + }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Set up abort controller (optional) + // Polling can then be stopped using abortController.abort() + const abortController = new AbortController(); + + // Create vector store file + const vectorStoreFileOptions = { + fileId: file.id, + pollingOptions: { sleepIntervalInMs: 2000, abortSignal: abortController.signal }, + }; + const poller = client.agents.createVectorStoreFileAndPoll(vectorStore.id, vectorStoreFileOptions); + const vectorStoreFile = await poller.pollUntilDone(); + console.log( + `Created vector store file with status ${vectorStoreFile.status}, vector store file ID: ${vectorStoreFile.id}`, + ); + + // Delete file + await client.agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + + // Delete vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStores.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStores.ts new file mode 100644 index 000000000000..1854a1ba10b4 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStores.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store. + * + * @summary demonstrates how to create the vector store. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Create a vector store + const vectorStore = await client.agents.createVectorStore({ name: "myVectorStore" }); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // List vector stores + const vectorStores = await client.agents.listVectorStores(); + console.log("List of vector stores:", vectorStores); + + // Modify the vector store + const updatedVectorStore = await client.agents.modifyVectorStore(vectorStore.id, { + name: "updatedVectorStore", + }); + console.log(`Updated vector store, vector store ID: ${updatedVectorStore.id}`); + + // Get a specific vector store + const retrievedVectorStore = await client.agents.getVectorStore(vectorStore.id); + console.log(`Retrieved vector store, vector store ID: ${retrievedVectorStore.id}`); + + // Delete the vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoresWithPolling.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoresWithPolling.ts new file mode 100644 index 000000000000..73fa25d23f60 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/vectorStoresWithPolling.ts @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to create the vector store using polling operation. + * + * @summary demonstrates how to create the vector store using polling operation. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Set up abort controller (optional) + // Polling can then be stopped using abortController.abort() + const abortController = new AbortController(); + + // Create a vector store + const vectorStoreOptions = { + name: "myVectorStore", + pollingOptions: { sleepIntervalInMs: 2000, abortSignal: abortController.signal }, + }; + const poller = client.agents.createVectorStoreAndPoll(vectorStoreOptions); + const vectorStore = await poller.pollUntilDone(); + console.log( + `Created vector store with status ${vectorStore.status}, vector store ID: ${vectorStore.id}`, + ); + + // Get a specific vector store + const retrievedVectorStore = await client.agents.getVectorStore(vectorStore.id); + console.log(`Retrieved vector store, vector store ID: ${retrievedVectorStore.id}`); + + // Delete the vector store + await client.agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/connections/connectionsBasics.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/connections/connectionsBasics.ts new file mode 100644 index 000000000000..8dbf3d60c60d --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/connections/connectionsBasics.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to how to use basic connections operations. + * + * @summary Given an AIProjectClient, this sample demonstrates how to enumerate the properties of all connections, + * get the properties of a default connection, and get the properties of a connection by its name. + */ + +import { AIProjectsClient } from "@azure/ai-projects"; +import { DefaultAzureCredential } from "@azure/identity"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const connectionString = + process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + +export async function main(): Promise { + const client = AIProjectsClient.fromConnectionString( + connectionString || "", + new DefaultAzureCredential(), + ); + + // Get the properties of the specified machine learning workspace + const workspace = await client.connections.getWorkspace(); + console.log(`Retrieved workspace, workspace name: ${workspace.name}`); + + // List the details of all the connections + const connections = await client.connections.listConnections(); + console.log(`Retrieved ${connections.length} connections`); + + // Get the details of a connection, without credentials + const connectionName = connections[0].name; + const connection = await client.connections.getConnection(connectionName); + console.log(`Retrieved connection, connection name: ${connection.name}`); + + // Get the details of a connection, including credentials (if available) + const connectionWithSecrets = await client.connections.getConnectionWithSecrets(connectionName); + console.log(`Retrieved connection with secrets, connection name: ${connectionWithSecrets.name}`); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/localFile.txt b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/localFile.txt new file mode 100644 index 000000000000..8ab686eafeb1 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/localFile.txt @@ -0,0 +1 @@ +Hello, World! diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/nifty500QuarterlyResults.csv b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/nifty500QuarterlyResults.csv new file mode 100644 index 000000000000..e02068e09042 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/nifty500QuarterlyResults.csv @@ -0,0 +1,502 @@ +name,NSE_code,BSE_code,sector,industry,revenue,operating_expenses,operating_profit,operating_profit_margin,depreciation,interest,profit_before_tax,tax,net_profit,EPS,profit_TTM,EPS_TTM +3M India Ltd.,3MINDIA,523395,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,"1,057",847.4,192.1,18.48%,12.9,0.7,195.9,49.8,146.1,129.7,535.9,475.7 +ACC Ltd.,ACC,500410,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"4,644.8","3,885.4",549.3,12.39%,212.8,28.9,517.7,131.5,387.9,20.7,"1,202.7",64 +AIA Engineering Ltd.,AIAENG,532683,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,"1,357.1",912.7,382.1,29.51%,24.5,7.4,412.5,88.4,323.1,34.3,"1,216.1",128.9 +APL Apollo Tubes Ltd.,APLAPOLLO,533758,METALS & MINING,IRON & STEEL PRODUCTS,"4,65","4,305.4",325,7.02%,41.3,26.6,276.7,73.8,202.9,7.3,767.5,27.7 +Au Small Finance Bank Ltd.,AUBANK,540611,BANKING AND FINANCE,BANKS,"2,956.5","1,026.7",647.7,25.59%,0,"1,282.1",533.4,131.5,401.8,6,"1,606.2",24 +Adani Ports & Special Economic Zone Ltd.,ADANIPORTS,532921,TRANSPORTATION,MARINE PORT & SERVICES,"6,951.9","2,982.4","3,664",55.13%,974.5,520.1,"2,474.9",759,"1,747.8",8.1,"6,337",29.3 +Adani Energy Solutions Ltd.,ADANIENSOL,ASM,UTILITIES,ELECTRIC UTILITIES,"3,766.5","2,169.3","1,504.6",40.95%,432.1,640.8,369.9,84.9,275.9,2.5,"1,315.1",11.8 +Aditya Birla Fashion and Retail Ltd.,ABFRL,535755,RETAILING,DEPARTMENT STORES,"3,272.2","2,903.6",322.9,10.01%,388.8,208.4,-228.6,-28.2,-179.2,-1.9,-491.7,-5.2 +Aegis Logistics Ltd.,AEGISCHEM,500003,OIL & GAS,OIL MARKETING & DISTRIBUTION,"1,279.3","1,026.5",208.3,16.87%,34.1,26.6,192,42,127,3.6,509,14.5 +Ajanta Pharma Ltd.,AJANTPHARM,532331,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,049.8",737.8,290.7,28.26%,33.7,2.3,275.9,80.6,195.3,15.5,660.2,52.3 +Alembic Pharmaceuticals Ltd.,APLLTD,533573,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,605.1","1,386.7",208.2,13.06%,67.6,15.7,135.1,-1.9,136.6,7,531.7,27 +Alkem Laboratories Ltd.,ALKEM,539523,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"3,503.4","2,693.4",746.7,21.71%,73.9,30.3,648,33.1,620.5,51.9,"1,432.9",119.9 +Amara Raja Energy & Mobility Ltd.,ARE&M,500008,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,988.6","2,556.9",402.5,13.60%,115.7,6.2,309.8,83.5,226.3,13.2,779.8,45.7 +Ambuja Cements Ltd.,AMBUJACEM,500425,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"7,9","6,122.1","1,301.8",17.54%,380.9,61.2,"1,335.7",352.5,793,4,"2,777.9",14 +Apollo Hospitals Enterprise Ltd.,APOLLOHOSP,508869,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"4,869.1","4,219.4",627.5,12.95%,163.4,111.3,376.9,130.2,232.9,16.2,697.5,48.5 +Apollo Tyres Ltd.,APOLLOTYRE,500877,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"6,304.9","5,119.8","1,159.8",18.47%,360.3,132.8,679.9,205.8,474.3,7.5,"1,590.7",25 +Ashok Leyland Ltd.,ASHOKLEY,500477,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,"11,463","9,558.6","1,870.4",16.37%,226.6,715.1,924.4,358,526,1.8,"2,141.5",7.3 +Asian Paints Ltd.,ASIANPAINT,500820,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"8,643.8","6,762.3","1,716.2",20.24%,208.7,50.9,"1,621.8",418.6,"1,205.4",12.6,"5,062.6",52.8 +Astral Ltd.,ASTRAL,532830,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,"1,376.4","1,142.9",220.1,16.15%,48.7,8,176.8,45.1,131.2,4.9,549.7,20.4 +Atul Ltd.,ATUL,500027,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,215.8","1,038.5",155.2,13.00%,54,1.9,121.5,32.5,90.3,30.6,392.3,132.9 +Aurobindo Pharma Ltd.,AUROPHARMA,524804,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"7,406.4","5,846","1,373.4",19.02%,417.5,68.2,"1,074.7",323.7,757.2,12.8,"2,325.5",39.7 +Avanti Feeds Ltd.,AVANTIFEED,512573,FOOD BEVERAGES & TOBACCO,OTHER FOOD PRODUCTS,"1,312","1,184.5",94,7.35%,14.3,0.2,113,30.5,74.2,5.5,336.4,24.7 +Avenue Supermarts Ltd.,DMART,540376,RETAILING,DEPARTMENT STORES,"12,661.3","11,619.4","1,005",7.96%,174.4,15.6,851.9,228.6,623.6,9.6,"2,332.1",35.8 +Axis Bank Ltd.,AXISBANK,532215,BANKING AND FINANCE,BANKS,"33,122.2","9,207.3","9,166",33.43%,0,"14,749","8,313.8","2,096.1","6,204.1",20.1,"13,121",42.6 +Bajaj Auto Ltd.,BAJAJ-AUTO,532977,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"11,206.8","8,708.1","2,130.1",19.65%,91.8,6.5,"2,400.4",564,"2,02",71.4,"6,841.6",241.8 +Bajaj Finance Ltd.,BAJFINANCE,500034,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"13,381.8","2,851.5","9,449.7",70.63%,158.5,"4,537.1","4,757.6","1,207","3,550.8",58.7,"13,118.5",216.7 +Bajaj Finserv Ltd.,BAJAJFINSV,532978,DIVERSIFIED,HOLDING COMPANIES,"26,022.7","14,992.2","9,949.9",38.24%,208.8,"4,449.1","5,292","1,536.5","1,929",12.1,"7,422.6",46.6 +Bajaj Holdings & Investment Ltd.,BAJAJHLDNG,500490,DIVERSIFIED,HOLDING COMPANIES,240.1,33.5,191.2,85.08%,8.4,0.2,197.9,73.9,"1,491.2",134,"5,545.1",498.3 +Balkrishna Industries Ltd.,BALKRISIND,502355,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"2,360.3","1,720.5",532.7,23.64%,160.4,23.9,455.5,108.1,347.4,18,"1,047.5",54.2 +Balrampur Chini Mills Ltd.,BALRAMCHIN,500038,FOOD BEVERAGES & TOBACCO,SUGAR,"1,649","1,374.6",164.9,10.71%,41.2,17.2,215.9,56.6,166.3,8.2,540.5,26.8 +Bank of Baroda,BANKBARODA,532134,BANKING AND FINANCE,BANKS,"35,766","8,430.4","9,807.9",33.52%,0,"17,527.7","6,022.8","1,679.7","4,458.4",8.5,"18,602.9",35.9 +Bank of India,BANKINDIA,532149,BANKING AND FINANCE,BANKS,"16,779.4","3,704.9","3,818.8",25.35%,0,"9,255.7","2,977.4","1,488.6","1,498.5",3.6,"5,388.7",13.1 +Bata India Ltd.,BATAINDIA,500043,RETAILING,FOOTWEAR,834.6,637.5,181.7,22.18%,81.7,28.4,46.1,12.1,34,2.6,289.7,22.5 +Berger Paints (India) Ltd.,BERGEPAINT,509480,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"2,782.6","2,293.7",473.6,17.12%,82.9,21.1,385,96.7,291.6,2.5,"1,032.6",8.9 +Bharat Electronics Ltd.,BEL,500049,GENERAL INDUSTRIALS,DEFENCE,"4,146.1","2,994.9","1,014.2",25.30%,108.3,1.5,"1,041.5",260.7,789.4,1.1,"3,323",4.5 +Bharat Forge Ltd.,BHARATFORG,500493,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"3,826.7","3,152.8",621.4,16.47%,211.3,124.3,336.1,121.8,227.2,4.9,783.7,16.8 +Bharat Heavy Electricals Ltd.,BHEL,500103,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"5,305.4","5,513",-387.7,-7.56%,59.9,180.4,-447.9,-197.9,-238.1,-0.7,71.3,0.2 +Bharat Petroleum Corporation Ltd.,BPCL,500547,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"103,72","90,103.9","12,940.5",12.56%,"1,605.3",973.2,"10,755.7","2,812.2","8,243.5",38.7,"27,505.3",129.2 +Bharti Airtel Ltd.,BHARTIARTL,532454,TELECOM SERVICES,TELECOM SERVICES,"37,374.2","17,530.1","19,513.7",52.68%,"9,734.3","5,185.8","3,353.7","1,846.5","1,340.7",2.4,"7,547",13.2 +Indus Towers Ltd.,INDUSTOWER,534816,TELECOM SERVICES,OTHER TELECOM SERVICES,"7,229.7","3,498.8","3,633.7",50.95%,"1,525.6",458.6,"1,746.7",452,"1,294.7",4.8,"3,333.5",12.4 +Biocon Ltd.,BIOCON,532523,PHARMACEUTICALS & BIOTECHNOLOGY,BIOTECHNOLOGY,"3,620.2","2,720.7",741.6,21.42%,389.3,247.7,238.5,41.6,125.6,1.1,498.4,4.2 +Birla Corporation Ltd.,BIRLACORPN,500335,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,313.2","1,997",288.9,12.64%,143.5,95.4,77.1,18.8,58.4,7.6,153.1,19.9 +Blue Dart Express Ltd.,BLUEDART,526612,TRANSPORTATION,TRANSPORTATION - LOGISTICS,"1,329.7","1,101.8",222.7,16.82%,110.6,19.5,97.9,24.8,73.1,30.8,292.4,123.2 +Blue Star Ltd.,BLUESTARCO,500067,CONSUMER DURABLES,CONSUMER ELECTRONICS,"1,903.4","1,767.7",122.7,6.49%,23,17.6,95,24.3,70.7,3.6,437.7,21.3 +Bombay Burmah Trading Corporation Ltd.,BBTC,501425,FOOD BEVERAGES & TOBACCO,TEA & COFFEE,"4,643.5","3,664.7",859.2,18.99%,74.7,154.6,697.1,212.6,122,17.5,"-1,499.5",-214.8 +Bosch Ltd.,BOSCHLTD,500530,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"4,284.3","3,638.8",491.3,11.90%,101.3,12.2,"1,317",318.1,999.8,339,"2,126.9",721 +Brigade Enterprises Ltd.,BRIGADE,532929,REALTY,REALTY,"1,407.9","1,041.8",324.8,23.77%,75.7,110,180.3,67.8,133.5,5.8,298.2,12.9 +Britannia Industries Ltd.,BRITANNIA,500825,FMCG,PACKAGED FOODS,"4,485.2","3,560.5",872.4,19.68%,71.7,53.4,799.7,212.1,587.6,24.4,"2,536.2",105.3 +CCL Products India Ltd.,CCL,519600,FOOD BEVERAGES & TOBACCO,TEA & COFFEE,608.3,497.7,109.9,18.09%,22.6,18.4,69.7,8.8,60.9,4.6,279.9,21 +Crisil Ltd.,CRISIL,500092,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,771.8,544.2,191.7,26.05%,26.5,0.8,200.3,48.3,152,20.8,606.3,82.9 +Zydus Lifesciences Ltd.,ZYDUSLIFE,532321,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"4,422.8","3,222.7","1,146.1",26.23%,184.2,8.7,"1,007.2",226.4,800.7,7.9,"2,807.1",27.7 +Can Fin Homes Ltd.,CANFINHOME,511196,BANKING AND FINANCE,HOUSING FINANCE,871,49.7,749.2,86.01%,2.8,548.4,198,39.9,158.1,11.9,658.8,49.5 +Canara Bank,CANBK,532483,BANKING AND FINANCE,BANKS,"33,891.2","8,250.3","7,706.6",28.24%,0,"17,934.3","5,098","1,420.6","3,86",20.9,"13,968.4",77 +Carborundum Universal Ltd.,CARBORUNIV,513375,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"1,166",978.8,167.5,14.61%,45.9,4.9,136.4,43.7,101.9,5.4,461.3,24.3 +Castrol India Ltd.,CASTROLIND,500870,OIL & GAS,OIL MARKETING & DISTRIBUTION,"1,203.2",914.4,268.6,22.70%,22.9,2.4,263.5,69.1,194.4,2,815.5,8.2 +Ceat Ltd.,CEATLTD,500878,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"3,063.8","2,597.2",456.1,14.94%,124.5,71.7,270.4,68.3,208,51.4,521.7,129 +Central Bank of India,CENTRALBK,532885,BANKING AND FINANCE,BANKS,"8,438.5","2,565.4","1,535.4",20.81%,0,"4,337.7",567.2,-41.5,622,0.7,"2,181.4",2.5 +Century Plyboards (India) Ltd.,CENTURYPLY,532548,FOREST MATERIALS,FOREST PRODUCTS,"1,011.4",852.5,144.3,14.47%,23.4,6.1,129.4,32.2,96.9,4.4,380.7,17.1 +Cera Sanitaryware Ltd.,CERA,532443,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,476.2,387.2,76.5,16.49%,8.9,1.4,77.2,19.8,56.9,43.8,232.4,178.7 +Chambal Fertilisers & Chemicals Ltd.,CHAMBLFERT,500085,FERTILIZERS,FERTILIZERS,"5,467.3","4,770.5",615,11.42%,78.4,45.8,572.6,200.2,381,9.2,"1,137.7",27.3 +Cholamandalam Investment & Finance Company Ltd.,CHOLAFIN,511243,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"4,695.2",987.6,"3,235.1",69.99%,38.5,"2,204.2","1,065",288.8,772.9,9.4,"3,022.8",36.7 +Cipla Ltd.,CIPLA,500087,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"6,854.5","4,944.4","1,733.8",25.96%,290,25.8,"1,594.2",438.4,"1,130.9",14,"3,449.1",42.7 +City Union Bank Ltd.,CUB,532210,BANKING AND FINANCE,BANKS,"1,486.1",333.9,386.6,29.65%,0,765.6,330.6,50,280.6,3.8,943.8,12.7 +Coal India Ltd.,COALINDIA,533278,METALS & MINING,COAL,"34,760.3","24,639.4","8,137",24.83%,"1,178.2",182.5,"8,760.2","2,036.5","6,799.8",11,"28,059.6",45.5 +Colgate-Palmolive (India) Ltd.,COLPAL,500830,FMCG,PERSONAL PRODUCTS,"1,492.1",989,482.1,32.77%,44.3,1.1,457.8,117.8,340.1,12.5,"1,173.2",43.1 +Container Corporation of India Ltd.,CONCOR,531344,COMMERCIAL SERVICES & SUPPLIES,WAREHOUSING AND LOGISTICS,"2,299.8","1,648.4",546.5,24.90%,153.1,16.5,481.8,119,367.4,6,"1,186.2",19.5 +Coromandel International Ltd.,COROMANDEL,506395,FERTILIZERS,FERTILIZERS,"7,032.9","5,929.4","1,058.7",15.15%,54,46.2,"1,003.3",245,756.9,25.7,"2,024.2",68.8 +Crompton Greaves Consumer Electricals Ltd.,CROMPTON,539876,CONSUMER DURABLES,HOUSEHOLD APPLIANCES,"1,797.2","1,607.8",174.5,9.79%,32.1,21.5,135.8,34.9,97.2,1.5,432,6.7 +Cummins India Ltd.,CUMMINSIND,500480,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,"2,011.3","1,575.4",346.2,18.02%,38.3,6.8,390.9,99.6,329.1,11.9,"1,445.5",52.1 +Cyient Ltd.,CYIENT,532175,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,792","1,452.7",325.8,18.32%,65.8,27,240.3,56.7,178.3,16.3,665.6,60.1 +DCM Shriram Ltd.,DCMSHRIRAM,523367,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"2,73","2,593.9",114.1,4.21%,74,14.7,47.5,15.2,32.2,2.1,617.6,39.4 +DLF Ltd.,DLF,532868,REALTY,REALTY,"1,476.4",885.3,462.4,34.31%,37,90.2,464,112.2,622.8,2.5,"2,239",9 +Dabur India Ltd.,DABUR,500096,FMCG,PERSONAL PRODUCTS,"3,320.2","2,543",660.9,20.63%,98.3,28.1,650.8,144.3,515,2.9,"1,755.7",9.9 +Delta Corp Ltd.,DELTACORP,532848,COMMERCIAL SERVICES & SUPPLIES,MISC. COMMERCIAL SERVICES,282.6,170.5,100.1,36.99%,16.9,2.7,92.4,23,69.4,2.6,273.3,10.2 +Divi's Laboratories Ltd.,DIVISLAB,532488,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,995","1,43",479,25.09%,95,1,469,121,348,13.1,"1,331.8",50.3 +Dr. Lal Pathlabs Ltd.,LALPATHLAB,539524,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE SERVICES,619.4,423.5,177.8,29.57%,35.9,7.8,152.2,41.5,109.3,13.2,301.4,36.1 +Dr. Reddy's Laboratories Ltd.,DRREDDY,500124,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"7,217.6","4,888.8","2,008.3",29.09%,375.5,35.3,"1,912.5",434.5,"1,482.2",89.1,"5,091.2",305.2 +EID Parry (India) Ltd.,EIDPARRY,500125,FOOD BEVERAGES & TOBACCO,OTHER FOOD PRODUCTS,"9,210.3","8,002","1,057.5",11.67%,101.2,74.2,"1,032.8",246.8,452.3,25.5,991,55.8 +Eicher Motors Ltd.,EICHERMOT,505200,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"4,388.3","3,027.4","1,087.2",26.42%,142.5,12.7,"1,205.7",291.1,"1,016.2",37.1,"3,581",130.8 +Emami Ltd.,EMAMILTD,531162,FMCG,PERSONAL PRODUCTS,876,631.2,233.7,27.02%,46.1,2.2,196.4,15.8,178.5,4.1,697.8,16 +Endurance Technologies Ltd.,ENDURANCE,540153,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,560.5","2,226.7",318.3,12.51%,118.4,9.8,205.6,51.1,154.6,11,562.8,40 +Engineers India Ltd.,ENGINERSIN,532178,COMMERCIAL SERVICES & SUPPLIES,CONSULTING SERVICES,833.6,691.3,98.5,12.47%,8.3,0.4,133.6,32.2,127.5,2.3,472.7,8.4 +Escorts Kubota Ltd.,ESCORTS,500495,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,"2,154.4","1,798.6",260.7,12.66%,40.8,3.1,311.9,79.7,223.3,20.6,910.5,82.4 +Exide Industries Ltd.,EXIDEIND,500086,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"4,408.9","3,872.4",499.1,11.42%,141.5,29.7,365.3,95.2,269.4,3.2,872.7,10.3 +Federal Bank Ltd.,FEDERALBNK,500469,BANKING AND FINANCE,BANKS,"6,548.2","1,603.8","1,400.3",24.18%,0,"3,544.1","1,342.7",342.6,994.1,4.3,"3,671.4",15.6 +Finolex Cables Ltd.,FINCABLES,500144,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,229.3","1,041.3",146.1,12.30%,10.8,0.4,176.7,52.3,154.2,10.1,643.9,42.1 +Finolex Industries Ltd.,FINPIPE,500940,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,944.5,780.2,103,11.66%,27.4,12.5,124.5,35.4,98,1.6,459.3,7.4 +Firstsource Solutions Ltd.,FSL,532809,SOFTWARE & SERVICES,BPO/KPO,"1,556.9","1,311.2",228.8,14.86%,65.4,26.1,154.3,27.8,126.5,1.9,551.7,7.9 +GAIL (India) Ltd.,GAIL,532155,UTILITIES,UTILITIES,"33,191","29,405.5","3,580.2",10.85%,837.3,199.6,"2,748.7",696.3,"2,444.1",3.7,"5,283.8",8 +GlaxoSmithKline Pharmaceuticals Ltd.,GLAXO,500660,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,985.2,667.5,289.5,30.25%,18.1,0.4,299.2,81.7,217.5,12.8,647.8,38.2 +Glenmark Pharmaceuticals Ltd.,GLENMARK,532296,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"3,209.1","2,745.1",462.3,14.41%,141.5,121.5,-124.4,55.9,-81.9,-2.9,-196.3,-7 +Godrej Consumer Products Ltd.,GODREJCP,532424,FMCG,PERSONAL PRODUCTS,"3,667.9","2,897.8",704.2,19.55%,60.9,77.3,619.4,186.6,432.8,4.2,"1,750.1",17.1 +Godrej Industries Ltd.,GODREJIND,500164,DIVERSIFIED,DIVERSIFIED,"4,256.9","3,672.1",265.5,6.74%,89.3,333.1,162.4,75.9,87.3,2.6,880,26.1 +Godrej Properties Ltd.,GODREJPROP,533150,REALTY,REALTY,605.1,404.7,-61.7,-17.98%,7.4,48,145.1,38.8,66.8,2.4,662.6,23.8 +Granules India Ltd.,GRANULES,532482,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,191",976.5,213,17.90%,52.5,26,136,33.9,102.1,4.2,393.9,16.3 +Great Eastern Shipping Company Ltd.,GESHIP,500620,TRANSPORTATION,SHIPPING,"1,461.5",585.6,643.4,52.35%,186.7,77.1,611.9,17.3,594.7,41.6,"2,520.1",176.5 +Gujarat Alkalies & Chemicals Ltd.,GUJALKALI,530001,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"1,042.3",926.1,45.2,4.65%,95.2,10.8,10.2,-0.1,-18.4,-2.5,82.7,11.3 +Gujarat Gas Ltd.,GUJGASLTD,539336,UTILITIES,UTILITIES,"4,019.3","3,494.5",496.6,12.44%,117.9,7.8,399.1,102.9,296.2,4.3,"1,254.3",18.2 +Gujarat Narmada Valley Fertilizers & Chemicals Ltd.,GNFC,500670,FERTILIZERS,FERTILIZERS,"2,232","1,911",169,8.12%,78,1,242,64,182,11.7,932,60.1 +Gujarat Pipavav Port Ltd.,GPPL,533248,TRANSPORTATION,MARINE PORT & SERVICES,270.4,102,150.6,59.64%,28.8,2.2,141.1,53.4,92.3,1.9,341.8,7.1 +Gujarat State Fertilizer & Chemicals Ltd.,GSFC,500690,FERTILIZERS,FERTILIZERS,"3,313.2","2,881.4",237.3,7.61%,45.7,1.6,387,78.1,308.9,7.8,"1,056.2",26.5 +Gujarat State Petronet Ltd.,GSPL,532702,UTILITIES,UTILITIES,"4,455.9","3,497.2",913.7,20.72%,165,14.5,779.2,198.7,454.6,8.1,"1,522",27 +HCL Technologies Ltd.,HCLTECH,532281,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"27,037","20,743","5,929",22.23%,"1,01",156,"5,128","1,295","3,832",14.2,"15,445",56.9 +HDFC Bank Ltd.,HDFCBANK,500180,BANKING AND FINANCE,BANKS,"107,566.6","42,037.6","24,279.1",32.36%,0,"41,249.9","20,967.4","3,655","16,811.4",22.2,"54,474.6",71.8 +Havells India Ltd.,HAVELLS,517354,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"3,952.8","3,527",373.4,9.57%,81.2,9.3,335.3,86.2,249.1,4,"1,177.7",18.8 +Hero MotoCorp Ltd.,HEROMOTOCO,500182,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"9,741.2","8,173.5","1,359.5",14.26%,187.1,25,"1,355.6",353.1,"1,006.3",50.3,"3,247.6",162.5 +HFCL Ltd.,HFCL,500183,TELECOMMUNICATIONS EQUIPMENT,TELECOM CABLES,"1,128.7",978.9,132.6,11.93%,21.4,34.8,93.5,24,69.4,0.5,305.5,2.1 +Hindalco Industries Ltd.,HINDALCO,500440,METALS & MINING,ALUMINIUM AND ALUMINIUM PRODUCTS,"54,632","48,557","5,612",10.36%,"1,843","1,034","3,231","1,035","2,196",9.9,"8,423",37.9 +Hindustan Copper Ltd.,HINDCOPPER,513599,METALS & MINING,COPPER,392.6,260.2,121.2,31.77%,45.6,4.1,82.6,21.9,60.7,0.6,320.5,3.3 +Hindustan Petroleum Corporation Ltd.,HINDPETRO,500104,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"96,093.4","87,512","8,24",8.61%,"1,247.3",590,"6,744.1","1,616","5,827",41.1,"16,645",117.3 +Hindustan Unilever Ltd.,HINDUNILVR,500696,FMCG,PERSONAL PRODUCTS,"15,806","11,826","3,797",24.30%,297,88,"3,59",931,"2,656",11.3,"10,284",43.8 +Hindustan Zinc Ltd.,HINDZINC,500188,METALS & MINING,ZINC,"7,014","3,652","3,139",46.22%,825,232,"2,305",576,"1,729",4.1,"8,432",20 +Housing and Urban Development Corporation Ltd.,HUDCO,540530,BANKING AND FINANCE,HOUSING FINANCE,"1,880.8",82.7,"1,809.6",97.04%,2.4,"1,216.8",606.4,154.7,451.6,2.3,"1,790.7",8.9 +ITC Ltd.,ITC,500875,FOOD BEVERAGES & TOBACCO,CIGARETTES-TOBACCO PRODUCTS,"18,439.3","11,320.2","6,454.2",36.31%,453,9.9,"6,656.2","1,700.3","4,898.1",3.9,"20,185.1",16.2 +ICICI Bank Ltd.,ICICIBANK,532174,BANKING AND FINANCE,BANKS,"57,292.3","23,911","15,473.2",39.74%,0,"17,908","14,824.2","3,808.8","11,805.6",15.6,"41,086.8",58.7 +ICICI Prudential Life Insurance Company Ltd.,ICICIPRULI,540133,BANKING AND FINANCE,LIFE INSURANCE,"17,958.1","17,612.3",-229.6,-1.32%,0,0,340.2,32.5,243.9,1.7,906.9,6.3 +IDBI Bank Ltd.,IDBI,500116,BANKING AND FINANCE,BANKS,"7,063.7","1,922.3","2,175.3",36.02%,0,"2,966.1","2,396.9","1,003.7","1,385.4",1.3,"4,776.3",4.4 +IDFC First Bank Ltd.,IDFCFIRSTB,539437,BANKING AND FINANCE,BANKS,"8,765.8","3,849","1,511.2",20.54%,0,"3,405.6",982.8,236,746.9,1.1,"2,911.1",4.3 +IDFC Ltd.,IDFC,532659,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),36.7,6,30.6,83.56%,0,0,30.6,6.6,223.5,1.4,"4,147.1",25.9 +IRB Infrastructure Developers Ltd.,IRB,532947,CEMENT AND CONSTRUCTION,ROADS & HIGHWAYS,"1,874.5",950.4,794.6,45.54%,232.7,434.6,256.9,85.8,95.7,0.2,501,0.8 +ITI Ltd.,ITI,523610,TELECOMMUNICATIONS EQUIPMENT,TELECOM EQUIPMENT,256.1,299.3,-52.8,-21.42%,13.3,69.3,-125.8,0,-126,-1.3,-388.4,-4 +Vodafone Idea Ltd.,IDEA,532822,TELECOM SERVICES,TELECOM SERVICES,"10,750.8","6,433.5","4,282.8",39.97%,"5,667.3","6,569","-7,919",817.7,"-8,737.9",-1.8,"-30,986.8",-6.4 +India Cements Ltd.,INDIACEM,530005,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"1,272.4","1,26",4.4,0.35%,55,60.4,-103,-17.4,-80.1,-2.6,-261.1,-8.4 +Indiabulls Housing Finance Ltd.,IBULHSGFIN,535789,BANKING AND FINANCE,HOUSING FINANCE,"2,242.3",190.6,"1,779.2",79.88%,22.9,"1,349.8",421.6,123.6,298,6.5,"1,146",24.3 +Indian Bank,INDIANB,532814,BANKING AND FINANCE,BANKS,"15,929.4","3,599.1","4,327.7",31.44%,0,"8,002.6","2,776.7",768.6,"2,068.5",16.6,"6,893.3",55.3 +Indian Hotels Company Ltd.,INDHOTEL,500850,HOTELS RESTAURANTS & TOURISM,HOTELS,"1,480.9","1,078.4",354.8,24.75%,111.2,59,232.2,72.3,166.9,1.2,"1,100.3",7.7 +Indian Oil Corporation Ltd.,IOC,530965,OIL & GAS,OIL MARKETING & DISTRIBUTION,"179,752.1","156,013.1","23,328.4",13.01%,"3,609.6","2,135","18,090.2","4,699.7","13,114.3",9.5,"38,614.3",27.3 +Indian Overseas Bank,IOB,532388,BANKING AND FINANCE,BANKS,"6,941.5","1,785.1","1,679.8",28.84%,0,"3,476.6",635.5,8.3,627.2,0.3,"2,341.9",1.2 +Indraprastha Gas Ltd.,IGL,532514,UTILITIES,UTILITIES,"3,520.2","2,801.6",656.9,18.99%,102.2,2.5,613.9,151.4,552.7,7.9,"1,806.2",25.8 +IndusInd Bank Ltd.,INDUSINDBK,532187,BANKING AND FINANCE,BANKS,"13,529.7","3,449.9","3,908.7",34.75%,0,"6,171.1","2,934.9",732.9,"2,202.2",28.4,"8,333.7",107.2 +Info Edge (India) Ltd.,NAUKRI,532777,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,792,421.2,204.7,32.70%,25.9,8.2,382.8,68.7,205.1,15.9,-25.6,-2 +InterGlobe Aviation Ltd.,INDIGO,539448,TRANSPORTATION,AIRLINES,"15,502.9","12,743.6","2,200.3",14.72%,"1,549","1,021.3",189.1,0.2,188.9,4.9,"5,621.3",145.7 +Ipca Laboratories Ltd.,IPCALAB,524494,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"2,072.5","1,712.7",321.3,15.80%,90.3,44.1,225.4,87.9,145.1,5.7,492.2,19.4 +J B Chemicals & Pharmaceuticals Ltd.,JBCHEPHARM,506943,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,889.4,638.2,243.5,27.62%,32.2,10.4,208.7,58.1,150.6,9.7,486.6,31.4 +JK Cement Ltd.,JKCEMENT,532644,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,782.1","2,285.8",467,16.96%,137.1,115,244.2,65.7,178.1,23.1,444,57.5 +JK Lakshmi Cement Ltd.,JKLAKSHMI,500380,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"1,588.5","1,357.3",217.3,13.80%,56.6,33.6,141,45.1,92.7,7.9,357.6,30.4 +JM Financial Ltd.,JMFINANCIL,523405,DIVERSIFIED,HOLDING COMPANIES,"1,214",407.9,662.6,55.34%,13.2,388.1,277.9,72.4,194.9,2,608.1,6.4 +JSW Energy Ltd.,JSWENERGY,533148,UTILITIES,ELECTRIC UTILITIES,"3,387.4","1,379","1,880.4",57.69%,408.7,513.7,"1,085.9",235.1,850.2,5.2,"1,591.7",9.7 +JSW Steel Ltd.,JSWSTEEL,500228,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"44,821","36,698","7,886",17.69%,"2,019","2,084","4,609","1,812","2,76",11.4,"9,252",38.1 +Jindal Stainless Ltd.,JSL,532508,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"9,829","8,566.5","1,230.6",12.56%,221.9,155.6,985.7,229.1,774.3,9.4,"2,600.2",31.6 +Jindal Steel & Power Ltd.,JINDALSTEL,532286,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"12,282","9,964.5","2,285.7",18.66%,603.7,329.4,"1,384.5",-5.8,"1,387.8",13.8,"4,056",40.4 +Jubilant Foodworks Ltd.,JUBLFOOD,533155,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,"1,375.7","1,091.4",277.2,20.25%,141.9,56.8,85.5,23.3,97.2,1.5,235,3.6 +Just Dial Ltd.,JUSTDIAL,535648,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,318.5,211.8,48.8,18.71%,12.2,2.4,92.1,20.3,71.8,8.4,314.1,36.9 +Jyothy Labs Ltd.,JYOTHYLAB,532926,FMCG,PERSONAL PRODUCTS,745.6,597,135.4,18.48%,12.3,1.2,135.1,31.1,104.2,2.8,326.9,8.9 +KRBL Ltd.,KRBL,530813,FMCG,PACKAGED FOODS,"1,246.5","1,018.9",194.5,16.03%,19.9,0.8,206.8,53.6,153.3,6.5,671.4,29.3 +Kajaria Ceramics Ltd.,KAJARIACER,500233,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"1,129.9",941.9,179.7,16.02%,36.1,4.3,147.7,36.6,108,6.8,397.8,25 +Kalpataru Projects International Ltd.,KPIL,522287,UTILITIES,ELECTRIC UTILITIES,"4,53","4,148",370,8.19%,113,137,132,42,89,5.5,478,29.9 +Kansai Nerolac Paints Ltd.,KANSAINER,500165,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,"1,978.6","1,683.3",273.2,13.97%,47.4,7.6,240.3,64.8,177.2,2.2,"1,118.8",13.8 +Karur Vysya Bank Ltd.,KARURVYSYA,590003,BANKING AND FINANCE,BANKS,"2,336",616.4,637.9,31.94%,0,"1,081.7",511.5,133.1,378.4,4.7,"1,364.2",17 +KEC International Ltd.,KEC,532714,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"4,514.9","4,224.7",274.3,6.10%,46.5,177.8,65.8,9.9,55.8,2.2,187.9,7.3 +Kotak Mahindra Bank Ltd.,KOTAKBANK,500247,BANKING AND FINANCE,BANKS,"21,559.5","9,681","6,343",46.24%,0,"5,535.5","5,888.3","1,465.5","4,461",22.4,"17,172.7",86.4 +L&T Finance Holdings Ltd.,L&TFH,533519,DIVERSIFIED,HOLDING COMPANIES,"3,482.1",935.3,"1,882.4",58.57%,28.3,"1,324.9",797.4,203.2,595.1,2.4,"2,080.8",8.4 +L&T Technology Services Ltd.,LTTS,540115,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"2,427.7","1,910.9",475.6,19.93%,68.1,12.6,436.1,120.2,315.4,29.8,"1,239.7",117.5 +LIC Housing Finance Ltd.,LICHSGFIN,500253,BANKING AND FINANCE,HOUSING FINANCE,"6,765.9",250.6,"6,095.7",90.10%,13.2,"4,599.9","1,483",291.2,"1,193.5",21.7,"4,164.5",75.7 +Lakshmi Machine Works Ltd.,LAXMIMACH,500252,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,"1,355.5","1,184.5",136,10.30%,23.6,0,147.4,32.3,115.1,107.8,416,389.5 +Laurus Labs Ltd.,LAURUSLABS,540222,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,226.2","1,036.6",187.9,15.34%,93.4,42.4,53.9,14.6,37,0.7,367.8,6.8 +Lupin Ltd.,LUPIN,500257,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"5,079","4,120.8",917.8,18.21%,247.8,80.6,629.7,134.3,489.5,10.8,"1,331.2",29.2 +MMTC Ltd.,MMTC,513377,COMMERCIAL SERVICES & SUPPLIES,COMMODITY TRADING & DISTRIBUTION,-167.2,-180.1,-30.4,14.42%,0.8,1.1,12.1,1.5,52,0.3,174.1,1.2 +MRF Ltd.,MRF,500290,AUTOMOBILES & AUTO COMPONENTS,AUTO TYRES & RUBBER PRODUCTS,"6,287.8","5,060.2","1,156.9",18.61%,351.5,85.5,790.6,203.9,586.7,1383.3,"1,690.9",3988 +Mahanagar Gas Ltd.,MGL,539957,UTILITIES,UTILITIES,"1,772.7","1,250.1",478.9,27.70%,65.8,2.5,454.3,115.8,338.5,34.3,"1,147.8",116.2 +Mahindra & Mahindra Financial Services Ltd.,M&MFIN,532720,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"3,863.5","1,077.5","2,109.3",55.03%,67.1,"1,703.4",369.1,96,281.1,2.3,"1,982.5",16 +Mahindra & Mahindra Ltd.,M&M,500520,AUTOMOBILES & AUTO COMPONENTS,CARS & UTILITY VEHICLES,"35,027.2","28,705.9","5,729.6",16.64%,"1,138.6","1,835.2","3,347.5","1,083.7","2,347.8",21.1,"11,169.4",100.2 +Mahindra Holidays & Resorts India Ltd.,MHRIL,533088,HOTELS RESTAURANTS & TOURISM,HOTELS,672.2,519.3,136,20.76%,83.8,33.3,35.8,14,21.3,1.1,66,3.3 +Manappuram Finance Ltd.,MANAPPURAM,531213,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"2,174",555.6,"1,481.3",68.68%,62.5,689.4,746.7,186.1,558.4,6.6,"1,859.8",22 +Mangalore Refinery And Petrochemicals Ltd.,MRPL,500109,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"22,904.7","20,705.6","2,138.2",9.36%,296,311.2,"1,592",546.2,"1,051.7",6,"3,784.9",21.6 +Marico Ltd.,MARICO,531642,FMCG,PERSONAL PRODUCTS,"2,514","1,979",497,20.07%,39,20,476,116,353,2.7,"1,41",10.9 +Maruti Suzuki India Ltd.,MARUTI,532500,AUTOMOBILES & AUTO COMPONENTS,CARS & UTILITY VEHICLES,"37,902.1","32,282.5","4,790.3",12.92%,794.4,35.1,"4,790.1","1,083.8","3,764.3",124.6,"11,351.8",375.9 +Max Financial Services Ltd.,MFSL,500271,BANKING AND FINANCE,LIFE INSURANCE,"10,189.1","10,024.6",143.9,1.42%,0.8,9.4,158.2,-12.1,147.9,4.3,506.4,14.7 +UNO Minda Ltd.,UNOMINDA,532539,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"3,630.2","3,219.8",401.6,11.09%,125.4,27.2,257.9,73.3,225,3.9,742.4,13 +Motilal Oswal Financial Services Ltd.,MOTILALOFS,532892,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,"1,650.7",724.1,904.5,55.18%,17.3,241.1,657.6,124.2,531.2,35.9,"1,449.3",97.8 +MphasiS Ltd.,MPHASIS,526299,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"3,325.5","2,680.9",595.6,18.18%,89,34,521.7,129.7,391.9,20.8,"1,605.6",85.1 +Muthoot Finance Ltd.,MUTHOOTFIN,533398,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"3,631.9",723.4,"2,801.6",77.69%,22.2,"1,335","1,470.2",374.9,"1,059.6",26.4,"3,982.9",99.2 +Natco Pharma Ltd.,NATCOPHARM,524816,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,060.8",573.4,458,44.41%,43.6,4.2,439.6,70.6,369,20.6,"1,127.4",63 +NBCC (India) Ltd.,NBCC,534309,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"2,129.1","1,957.7",95.5,4.65%,1.3,0,104.6,22.9,79.6,0.4,332.2,1.8 +NCC Ltd.,NCC,500294,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"4,746.4","4,415.9",303.7,6.44%,53.2,153.5,123.8,38.8,77.3,1.2,599.4,9.5 +NHPC Ltd.,NHPC,533098,UTILITIES,ELECTRIC UTILITIES,"3,113.8","1,173.9","1,757.4",59.95%,294.9,104.8,"1,618.3",-75,"1,545.8",1.5,"3,897.8",3.9 +Coforge Ltd.,COFORGE,532541,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"2,285.1","1,935.3",340.9,14.98%,77.2,31.9,240.7,52.8,187.9,29.6,696.2,113.2 +NLC India Ltd.,NLCINDIA,513683,UTILITIES,ELECTRIC UTILITIES,"3,234","2,143",834.6,28.03%,455.1,213.9,"1,700.6",614.7,"1,084.7",7.8,"1,912.3",13.8 +NTPC Ltd.,NTPC,532555,UTILITIES,ELECTRIC UTILITIES,"45,384.6","32,303.2","12,680.2",28.19%,"4,037.7","2,920.5","6,342.9","2,019.7","4,614.6",4.8,"19,125.2",19.7 +Narayana Hrudayalaya Ltd.,NH,539551,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"1,323.6",997.1,308.1,23.61%,55.3,22.9,248.4,21.7,226.6,11.2,737.5,36.1 +National Aluminium Company Ltd.,NATIONALUM,532234,METALS & MINING,ALUMINIUM AND ALUMINIUM PRODUCTS,"3,112","2,646.9",396.5,13.03%,186.2,4,275,68.7,187.3,1,"1,272.4",6.9 +Navin Fluorine International Ltd.,NAVINFLUOR,532504,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,494.9,373.4,98.3,20.84%,24.2,20,77.2,16.6,60.6,12.2,365,73.7 +Oberoi Realty Ltd.,OBEROIRLTY,533273,REALTY,REALTY,"1,243.8",579.2,638.2,52.42%,11.3,56.5,596.8,142.1,456.8,12.6,"1,961.3",53.9 +Oil And Natural Gas Corporation Ltd.,ONGC,500312,OIL & GAS,EXPLORATION & PRODUCTION,"149,388.5","118,618.4","28,255.3",19.24%,"6,698.1","2,603.3","21,564.9","5,633.6","13,734.1",10.9,"43,072.5",34.2 +Oil India Ltd.,OIL,533106,OIL & GAS,EXPLORATION & PRODUCTION,"9,200.1","5,293.3","3,523.2",39.96%,499,278.9,762,67.6,420.7,3.9,"5,874.5",54.2 +Oracle Financial Services Software Ltd.,OFSS,532466,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,509.6",886.4,558.1,38.64%,19,8,596.2,178.8,417.4,48.2,"1,835.1",211.9 +PI Industries Ltd.,PIIND,523642,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,"2,163.8","1,565.5",551.4,26.05%,80.3,7.8,510.2,31.7,480.5,31.7,"1,495.8",98.4 +PNB Housing Finance Ltd.,PNBHOUSING,540173,BANKING AND FINANCE,HOUSING FINANCE,"1,779.4",158.8,"1,574.1",88.54%,11.3,"1,057.3",507.1,124.1,383,14.8,"1,278.7",49.3 +PNC Infratech Ltd.,PNCINFRA,539150,CEMENT AND CONSTRUCTION,ROADS & HIGHWAYS,"1,932.4","1,511.6",399.8,20.92%,40.9,161.3,218.6,70.7,147.9,5.8,614.3,23.9 +PVR INOX Ltd.,PVRINOX,532689,RETAILING,SPECIALTY RETAIL,"2,023.7","1,293.1",706.8,35.34%,308.6,200.3,221.7,55.5,166.3,17,-232.5,-23.7 +Page Industries Ltd.,PAGEIND,532827,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,"1,126.8",891.6,233.5,20.76%,24.6,11.2,199.4,49.1,150.3,134.7,510.7,457.9 +Persistent Systems Ltd.,PERSISTENT,533179,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"2,449","2,006.5",405.2,16.80%,74.4,12.3,355.8,92.5,263.3,35,981.5,127.6 +Petronet LNG Ltd.,PETRONET,532522,OIL & GAS,OIL MARKETING & DISTRIBUTION,"12,686.2","11,317.9","1,214.7",9.69%,194.8,74.7,"1,098.8",283.9,855.7,5.7,"3,490.3",23.3 +Pfizer Ltd.,PFIZER,500680,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,611.3,392.6,182.6,31.75%,15.4,2.7,200.5,51.6,149,32.6,522.8,114.3 +Phoenix Mills Ltd.,PHOENIXLTD,503100,REALTY,REALTY,906.6,361.2,506,57.82%,65.9,96.5,375.2,71.4,252.6,14.2,923.6,51.7 +Pidilite Industries Ltd.,PIDILITIND,500331,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"3,107.6","2,396.3",679.7,22.10%,75.2,13.1,623,163.1,450.1,8.8,"1,505.5",29.6 +Power Finance Corporation Ltd.,PFC,532810,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"22,403.7",315.4,"22,941.9",102.46%,12.7,"14,313.1","8,628.8","2,000.6","4,833.1",14.7,"17,946.4",54.4 +Power Grid Corporation of India Ltd.,POWERGRID,532898,UTILITIES,ELECTRIC UTILITIES,"11,530.4","1,358.7","9,908.4",87.94%,"3,277","2,341.3","4,393.4",573.7,"3,781.4",4.1,"15,344.4",16.5 +Prestige Estates Projects Ltd.,PRESTIGE,ASM,REALTY,REALTY,"3,256","1,643.9",592.5,26.49%,174.1,263.9,"1,174.1",256.4,850.9,21.2,"1,714",42.8 +Prism Johnson Ltd.,PRSMJOHNSN,500338,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"1,846","1,745.4",92.4,5.03%,95.2,43.5,210,30.4,182.7,3.6,154.2,3.1 +Procter & Gamble Hygiene & Healthcare Ltd.,PGHH,500459,FMCG,PERSONAL PRODUCTS,"1,154.1",853.5,284.9,25.03%,14.3,1.9,284.5,73.8,210.7,64.9,734.4,226.3 +Punjab National Bank,PNB,532461,BANKING AND FINANCE,BANKS,"29,857","6,798.1","6,239.1",23.23%,0,"16,819.8","2,778.3","1,013.8","1,990.2",1.8,"5,904.8",5.4 +Quess Corp Ltd.,QUESS,539978,SOFTWARE & SERVICES,BPO/KPO,"4,763.5","4,584.8",163.6,3.44%,69.7,28.1,79.3,8.3,71.9,4.8,240.9,16.2 +RBL Bank Ltd.,RBLBANK,540065,BANKING AND FINANCE,BANKS,"3,720.6","1,422.6",765.4,25.45%,0,"1,532.6",125,-206.1,331.1,5.5,"1,173.9",19.5 +Radico Khaitan Ltd.,RADICO,532497,FOOD BEVERAGES & TOBACCO,BREWERIES & DISTILLERIES,925.7,803.8,121.2,13.10%,26.1,12.5,83.3,21.4,64.8,4.8,237,17.7 +Rain Industries Ltd.,RAIN,500339,CHEMICALS & PETROCHEMICALS,PETROCHEMICALS,"4,208.9","3,794.3",366,8.80%,192.5,241.7,-19.5,46.2,-90.2,-2.7,270.4,8 +Rajesh Exports Ltd.,RAJESHEXPO,531500,TEXTILES APPARELS & ACCESSORIES,GEMS & JEWELLERY,"38,079.4","38,015.8",50.1,0.13%,10.7,0,53,7.7,45.3,1.5,"1,142.2",38.7 +Rallis India Ltd.,RALLIS,500355,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,837,699,133,15.99%,26,3,110,28,82,4.2,98.4,5.2 +Rashtriya Chemicals & Fertilizers Ltd.,RCF,524230,FERTILIZERS,FERTILIZERS,"4,222.1","4,049.3",105.9,2.55%,56.1,44,72.8,21.1,51,0.9,523.6,9.5 +Redington Ltd.,REDINGTON,532805,COMMERCIAL SERVICES & SUPPLIES,COMMODITY TRADING & DISTRIBUTION,"22,296.6","21,738.7",481.4,2.17%,43.7,105.8,408.3,96.7,303.5,3.9,"1,242",15.9 +Relaxo Footwears Ltd.,RELAXO,530517,RETAILING,FOOTWEAR,725.9,623.8,91.5,12.79%,36.9,4.7,60.4,16.2,44.2,1.8,193.9,7.8 +Reliance Industries Ltd.,RELIANCE,500325,OIL & GAS,REFINERIES/PETRO-PRODUCTS,"238,797","193,988","40,968",17.44%,"12,585","5,731","26,493","6,673","17,394",25.7,"68,496",101.2 +REC Ltd.,RECLTD,532955,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"11,701.3",275.1,"12,180.5",104.21%,6.1,"7,349.8","4,837.6","1,047.7","3,789.9",14.4,"12,738.6",48.4 +SJVN Ltd.,SJVN,533206,UTILITIES,ELECTRIC UTILITIES,951.6,172.2,706.2,80.40%,101.9,124.2,567.7,129.2,439.6,1.1,"1,016",2.6 +SKF India Ltd.,SKFINDIA,500472,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,"1,145.5","1,003.7",121.5,10.80%,19.3,0.5,122,31.7,90,18.2,484,97.9 +SRF Ltd.,SRF,503806,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"3,206.5","2,551.2",626.2,19.71%,161.2,79.3,414.8,114,300.8,10.2,"1,733.4",58.5 +Sanofi India Ltd.,SANOFI,500674,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,726.4,506.1,208.5,29.17%,9.9,0.3,210.1,57.9,152.1,66.1,596.3,259.3 +Schaeffler India Ltd.,SCHAEFFLER,505790,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,879.2","1,506.3",342,18.50%,55.6,1.6,315.7,80.7,235,15,922.6,59 +Shree Cements Ltd.,SHREECEM,500387,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"4,932.1","3,914.1",886,18.46%,411.7,67,539.2,92.6,446.6,123.8,"1,826.8",506.3 +Shriram Finance Ltd.,SHRIRAMFIN,511218,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"8,893","1,409.4","6,334.3",71.30%,141.4,"3,798","2,404.2",614.9,"1,786.1",47.6,"6,575.4",175.2 +Siemens Ltd.,SIEMENS,500550,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"5,953.2","5,107.5",700.2,12.06%,78.6,4.9,762.2,190.5,571.3,16.1,"1,960.9",55.1 +Sobha Ltd.,SOBHA,532784,REALTY,REALTY,773.6,665.8,75.4,10.18%,19.3,63.9,24.7,9.7,14.9,1.6,107.4,11.3 +Solar Industries India Ltd.,SOLARINDS,532725,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"1,355.2","1,011.3",336.1,24.95%,33.7,24.9,285.3,75.5,200.1,22.1,808.2,89.3 +Sonata Software Ltd.,SONATSOFTW,532221,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,935.8","1,715.2",197.3,10.32%,33.3,20.7,166.5,42.3,124.2,9,475.7,34.3 +State Bank of India,SBIN,500112,BANKING AND FINANCE,BANKS,"144,256.1","58,597.6","22,703.3",21.14%,0,"62,955.2","21,935.7","5,552.5","17,196.2",18,"69,304.1",77.7 +Steel Authority of India (SAIL) Ltd.,SAIL,500113,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"29,858.2","25,836.7","3,875.4",13.04%,"1,326.6",605.2,"1,674.7",464.2,"1,305.6",3.2,"3,219.5",7.8 +Sun Pharma Advanced Research Company Ltd.,SPARC,532872,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,29.7,112.7,-91.5,-431.87%,3.2,0.3,-86.4,0,-86.4,-2.7,-253.6,-7.8 +Sun Pharmaceutical Industries Ltd.,SUNPHARMA,524715,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"12,486","9,013","3,179.4",26.08%,632.8,49.3,"2,790.9",390.1,"2,375.5",9.9,"8,548.5",35.6 +Sun TV Network Ltd.,SUNTV,532733,MEDIA,BROADCASTING & CABLE TV,"1,160.2",320.6,727.8,69.42%,218.8,1.7,619.1,154.4,464.7,11.8,"1,861.8",47.2 +Sundram Fasteners Ltd.,SUNDRMFAST,500403,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,429.1","1,191.1",230.7,16.23%,54.5,7.4,176.2,43.1,131.9,6.3,502.9,23.9 +Sunteck Realty Ltd.,SUNTECK,512179,REALTY,REALTY,36.2,39.1,-14.1,-56.70%,2.2,15.8,-20.9,-6.4,-13.9,-1,-46.5,-3.3 +Supreme Industries Ltd.,SUPREMEIND,509930,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,"2,321.4","1,952.5",356.2,15.43%,71.9,1.6,295.4,76.3,243.2,19.1,"1,028.2",80.9 +Suzlon Energy Ltd.,SUZLON,ASM,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"1,428.7","1,196.4",225,15.83%,51.2,43.7,102.4,0.1,102.3,0.1,561.4,0.4 +Syngene International Ltd.,SYNGENE,539268,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,931.7,656,254.1,27.92%,104.6,13,150.7,34.2,116.5,2.9,498.3,12.4 +TTK Prestige Ltd.,TTKPRESTIG,517506,CONSUMER DURABLES,HOUSEWARE,747.2,648.6,80.8,11.08%,15.9,3.1,79.5,20.5,59.3,4.3,224.3,16.2 +TV18 Broadcast Ltd.,TV18BRDCST,532800,MEDIA,BROADCASTING & CABLE TV,"1,989","1,992.2",-198.1,-11.04%,50.1,33.8,-87.1,-6.5,-28.9,-0.2,92.2,0.5 +TVS Motor Company Ltd.,TVSMOTOR,532343,AUTOMOBILES & AUTO COMPONENTS,2/3 WHEELERS,"9,983.8","8,576.9","1,355.9",13.65%,237.1,483.3,686.4,259.8,386.3,8.1,"1,457.6",30.7 +Tata Consultancy Services Ltd.,TCS,532540,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"60,698","43,946","15,746",26.38%,"1,263",159,"15,33","3,95","11,342",31,"44,654",122 +Tata Elxsi Ltd.,TATAELXSI,500408,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,912.8,618.2,263.5,29.89%,25,5.8,263.9,63.8,200,32.1,785.1,126.1 +Tata Consumer Products Ltd.,TATACONSUM,500800,FMCG,PACKAGED FOODS,"3,823.6","3,196.7",537.1,14.38%,93.9,27.6,490.9,131.7,338.2,3.6,"1,275.2",13.7 +Tata Motors Limited (DVR),TATAMTRDVR,570001,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,,,,,,,,,,,, +Tata Motors Ltd.,TATAMOTORS,500570,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,"106,759","91,361.3","13,766.9",13.10%,"6,636.4","2,651.7","5,985.9","2,202.8","3,764",9.8,"15,332.3",40 +Tata Power Company Ltd.,TATAPOWER,500400,UTILITIES,ELECTRIC UTILITIES,"16,029.5","12,647","3,091",19.64%,925.9,"1,181.8",979.2,213.3,875.5,2.7,"3,570.8",11.2 +Tata Steel Ltd.,TATASTEEL,500470,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"55,910.2","51,414.1","4,267.8",7.66%,"2,479.8","1,959.4","-6,842.1",-228,"-6,196.2",-5.1,"-6,081.3",-5 +Tech Mahindra Ltd.,TECHM,532755,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"13,128.1","11,941.1",922.8,7.17%,465.7,97.5,623.8,110,493.9,5.6,"3,600.7",40.9 +The Ramco Cements Ltd.,RAMCOCEM,500260,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,352.1","1,935",405.6,17.33%,162.8,116.5,137.8,37,72,3.1,348.9,14.8 +Thermax Ltd.,THERMAX,500411,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"2,368.3","2,097.8",204.6,8.89%,33,19.8,217.7,58.9,157.7,14,498.8,44.3 +Timken India Ltd.,TIMKEN,522113,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,692.1,546.5,135.5,19.87%,21.1,0.9,123.6,30.6,93,12.4,358.3,47.6 +Titan Company Ltd.,TITAN,500114,TEXTILES APPARELS & ACCESSORIES,GEMS & JEWELLERY,"12,653","11,118","1,411",11.26%,144,140,"1,251",336,915,10.3,"3,302",37.1 +Torrent Pharmaceuticals Ltd.,TORNTPHARM,500420,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"2,686","1,835",825,31.02%,201,91,559,173,386,11.4,"1,334",39.4 +Torrent Power Ltd.,TORNTPOWER,532779,UTILITIES,ELECTRIC UTILITIES,"7,069.1","5,739.5","1,221.4",17.55%,341.7,247.2,740.7,198.1,525.9,10.9,"2,176.8",45.3 +Trent Ltd.,TRENT,500251,RETAILING,DEPARTMENT STORES,"3,062.5","2,525.8",456.6,15.31%,152.2,95.5,288.9,86.3,234.7,6.6,629.4,17.7 +Trident Ltd.,TRIDENT,521064,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"1,812","1,557.3",240.3,13.37%,89.4,35,130.4,40.1,90.7,0.2,458.1,0.9 +UPL Ltd.,UPL,512070,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,"10,275","8,807","1,325",13.03%,657,871,-185,-96,-189,-2.5,"1,856",24.7 +UltraTech Cement Ltd.,ULTRACEMCO,532538,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"16,179.3","13,461.2","2,550.9",15.93%,797.8,233.9,"1,686.2",409.4,"1,281.5",44.5,"5,694.1",197.2 +Union Bank of India,UNIONBANK,532477,BANKING AND FINANCE,BANKS,"28,952.5","6,189.3","7,265",29.38%,0,"15,498.2","5,492.3","1,944","3,571.8",5.1,"11,918.9",16.1 +United Breweries Ltd.,UBL,532478,FOOD BEVERAGES & TOBACCO,BREWERIES & DISTILLERIES,"1,902.1","1,705.8",184.3,9.75%,50.9,1.4,144,36.9,107.3,4.1,251.3,9.5 +United Spirits Ltd.,MCDOWELL-N,532432,FOOD BEVERAGES & TOBACCO,BREWERIES & DISTILLERIES,"6,776.6","6,269.8",466.7,6.93%,65.3,26.2,446,106.3,339.3,4.8,"1,133",15.6 +V-Guard Industries Ltd.,VGUARD,532953,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,147.9","1,041.3",92.5,8.16%,19.8,9.3,77.5,18.6,59,1.4,215.2,5 +Vardhman Textiles Ltd.,VTL,502986,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"2,487","2,192.1",205.4,8.57%,103.7,22,169.2,41.7,134.3,4.7,531.9,18.7 +Varun Beverages Ltd.,VBL,540180,FOOD BEVERAGES & TOBACCO,NON-ALCOHOLIC BEVERAGES,"3,889","2,988.4",882.1,22.79%,170.8,62.5,667.3,152.9,501.1,3.9,"1,998.7",15.4 +Vinati Organics Ltd.,VINATIORGA,524200,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,464.4,337.3,110.8,24.73%,13.7,0.3,113,28.9,84.2,8.2,408.2,39.7 +Voltas Ltd.,VOLTAS,500575,CONSUMER DURABLES,CONSUMER ELECTRONICS,"2,363.7","2,222.5",70.3,3.06%,11.7,11.4,118.1,49.3,36.7,1.1,199.5,6 +ZF Commercial Vehicle Control Systems India Ltd.,ZFCVINDIA,533023,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,015.8",846.2,145.5,14.67%,27.1,1.3,141.2,35.5,105.7,55.7,392,206.7 +Welspun Corp Ltd.,WELCORP,ASM,METALS & MINING,IRON & STEEL PRODUCTS,"4,161.4","3,659.9",399.5,9.84%,85.7,75,340.8,79,384.7,14.7,809.2,30.9 +Welspun Living Ltd.,WELSPUNLIV,514162,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"2,542.4","2,151.1",358,14.27%,98.5,33.8,258.9,58.7,196.7,2,526.1,5.4 +Whirlpool of India Ltd.,WHIRLPOOL,500238,CONSUMER DURABLES,CONSUMER ELECTRONICS,"1,555.5","1,448.4",73.2,4.81%,49.2,5.6,52.3,14.1,36.6,2.9,198.8,15.7 +Wipro Ltd.,WIPRO,507685,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"23,255.7","18,543.2","3,972.7",17.64%,897,303.3,"3,512.2",841.9,"2,646.3",5.1,"11,643.8",22.3 +Zee Entertainment Enterprises Ltd.,ZEEL,505537,MEDIA,BROADCASTING & CABLE TV,"2,509.6","2,105",332.8,13.65%,77.2,23.4,184.2,54.4,123,1.3,-102.2,-1.1 +eClerx Services Ltd.,ECLERX,532927,SOFTWARE & SERVICES,BPO/KPO,735.9,517,204.7,28.37%,30.3,6.1,182.4,46.3,136,28.2,506,105 +Sterlite Technologies Ltd.,STLTECH,532374,TELECOMMUNICATIONS EQUIPMENT,TELECOM CABLES,"1,497","1,281",213,14.26%,85,95,36,12,34,0.9,203,5.1 +HEG Ltd.,HEG,509631,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,642.2,512.3,101.9,16.58%,38.5,8.5,82.9,21.7,96,24.9,439.5,113.9 +SBI Life Insurance Company Ltd.,SBILIFE,540719,BANKING AND FINANCE,LIFE INSURANCE,"28,816.2","28,183.8",609.9,2.12%,0,0,621.5,43.9,380.2,3.8,"1,842.2",18.4 +General Insurance Corporation of India,GICRE,540755,BANKING AND FINANCE,GENERAL INSURANCE,"13,465.9","11,574","1,464.6",11.20%,0,0,"1,855.4",243.7,"1,689",15.2,"6,628",37.8 +Tube Investments of India Ltd.,TIINDIA,540762,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,005.4","1,718.2",251.4,12.76%,34.6,7.7,244.8,63.4,181.4,9.4,717.5,37.1 +Honeywell Automation India Ltd.,HONAUT,517174,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,144.3",965.9,138.3,12.52%,13.8,0.7,163.9,42,121.9,137.8,443.4,503.9 +Indian Energy Exchange Ltd.,IEX,540750,BANKING AND FINANCE,EXCHANGE,133,16.6,92,84.73%,5.1,0.7,110.6,27.9,86.5,1,327.8,3.7 +ICICI Lombard General Insurance Company Ltd.,ICICIGI,540716,BANKING AND FINANCE,GENERAL INSURANCE,"5,271.1","4,612.4",743.5,14.16%,0,0,763.6,186.4,577.3,11.8,"1,757.1",35.8 +Aster DM Healthcare Ltd.,ASTERDM,540975,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"3,325.2","2,939.4",377.3,11.38%,227.2,101.9,2.1,10.2,-30.8,-0.6,284.3,5.7 +Central Depository Services (India) Ltd.,CDSL,CDSL,OTHERS,INVESTMENT COMPANIES,230.1,77.9,129.4,62.40%,6.5,0,145.6,35.8,108.9,10.4,320.2,30.6 +Graphite India Ltd.,GRAPHITE,509488,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,884,823,-30,-3.78%,19,4,992,190,804,41.1,856,43.9 +Grasim Industries Ltd.,GRASIM,500300,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"30,505.3","25,995.9","4,224.8",13.98%,"1,245.2",397.8,"2,866.4",837.7,"1,163.8",17.7,"6,624.9",100.6 +KNR Constructions Ltd.,KNRCON,532942,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"1,043.8",806.9,231.6,22.30%,39.2,20.6,177.1,34.6,147.4,5.2,537.5,19.1 +Aditya Birla Capital Ltd.,ABCAPITAL,540691,DIVERSIFIED,HOLDING COMPANIES,"7,730.4","4,550.1","2,821.9",36.55%,48,"1,827",956.8,284.1,705,2.7,"5,231.9",20.1 +Dixon Technologies (India) Ltd.,DIXON,540699,CONSUMER DURABLES,CONSUMER ELECTRONICS,"4,943.9","4,744.3",198.9,4.02%,36.4,17.1,146.1,35.2,107.3,19,308.7,51.8 +Cholamandalam Financial Holdings Ltd.,CHOLAHLDNG,504973,DIVERSIFIED,HOLDING COMPANIES,"6,372.2","2,495.1","3,404.8",54.05%,52.1,"2,209.4","1,215.8",324.6,420.9,22.4,"1,532.3",81.6 +Cochin Shipyard Ltd.,COCHINSHIP,540678,TRANSPORTATION,MARINE PORT & SERVICES,"1,100.4",820.5,191.2,18.90%,18.9,9.6,251.4,69.9,181.5,13.8,429.9,32.7 +Bharat Dynamics Ltd.,BDL,541143,GENERAL INDUSTRIALS,DEFENCE,694.1,481.8,134,21.77%,17.4,0.8,194.1,47,147.1,8,425.4,23.2 +Lux Industries Ltd.,LUXIND,539542,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,643.6,584.2,55,8.61%,5.9,5.4,48,12.1,37.1,12.3,103.1,32.9 +Zensar Technologies Ltd.,ZENSARTECH,504067,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,277.1","1,009.9",230.9,18.61%,36.6,5.7,224.9,51,173.9,7.7,525.8,23.2 +PCBL Ltd.,PCBL,506590,CHEMICALS & PETROCHEMICALS,CARBON BLACK,"1,489.4","1,248.6",238.1,16.02%,48.2,21,171.6,48.8,122.6,3.2,431.6,11.4 +Zydus Wellness Ltd.,ZYDUSWELL,531335,FMCG,PACKAGED FOODS,444,423.1,16.8,3.82%,5.8,6.5,8.6,2.7,5.9,0.9,281.2,44.2 +Linde India Ltd.,LINDEINDIA,523457,GENERAL INDUSTRIALS,INDUSTRIAL GASES,729.9,537.7,173.6,24.41%,49.7,1.2,141.3,34.6,108.7,12.8,417.9,49 +FDC Ltd.,FDC,531599,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,513.6,409.9,76.4,15.71%,9.9,1.1,92.7,22.9,69.8,4.2,251.2,15.4 +The New India Assurance Company Ltd.,NIACL,540769,BANKING AND FINANCE,GENERAL INSURANCE,"10,571","10,773.4",-246.5,-2.33%,0,0,-242,-46.7,-176.1,-1.1,947,5.7 +Sundaram Finance Ltd.,SUNDARMFIN,590071,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"1,710.6",322.5,"1,332.1",77.98%,43.6,820.3,470.6,142.8,365.4,33.2,"1,506.7",135.6 +TeamLease Services Ltd.,TEAMLEASE,539658,COMMERCIAL SERVICES & SUPPLIES,MISC. COMMERCIAL SERVICES,"2,285.6","2,240.8",31.8,1.40%,12.9,2.5,29.4,1.8,27.3,16.3,106.6,63.5 +Galaxy Surfactants Ltd.,GALAXYSURF,540935,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,985.8,858.2,124.9,12.70%,24.7,5.4,97.5,20.1,77.4,21.8,349.3,98.5 +Bandhan Bank Ltd.,BANDHANBNK,541153,BANKING AND FINANCE,BANKS,"5,032.2","1,400.2","1,583.4",35.25%,0,"2,048.6",947.2,226.1,721.2,4.5,"2,541.1",15.8 +ICICI Securities Ltd.,ISEC,541179,BANKING AND FINANCE,CAPITAL MARKETS,"1,249",433.5,810.2,64.87%,25.8,215.1,569.4,145.7,423.6,13.1,"1,238.1",38.3 +V-Mart Retail Ltd.,VMART,534976,RETAILING,DEPARTMENT STORES,551.4,548.8,0.7,0.12%,53.2,35.9,-86.4,-22.3,-64.1,-32.4,-103.1,-52.1 +Nippon Life India Asset Management Ltd.,NAM-INDIA,540767,BANKING AND FINANCE,ASSET MANAGEMENT COS.,475.4,156.1,241.4,60.73%,7.2,1.7,310.4,66.1,244.4,3.9,883.3,14.1 +Grindwell Norton Ltd.,GRINDWELL,506076,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,690,536,131.4,19.69%,16.9,1.8,135.3,33.1,101.9,9.2,378.3,34.2 +HDFC Life Insurance Company Ltd.,HDFCLIFE,540777,BANKING AND FINANCE,LIFE INSURANCE,"23,276.6","23,659.3",-508.1,-2.20%,0,0,-373.1,-657.5,378.2,1.8,"1,472.8",6.9 +Elgi Equipments Ltd.,ELGIEQUIP,522074,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,817.8,663.4,142.7,17.71%,18.7,6.6,129.2,38.8,91.3,2.9,401.9,12.7 +Hindustan Aeronautics Ltd.,HAL,541154,GENERAL INDUSTRIALS,DEFENCE,"6,105.1","4,108.1","1,527.6",27.11%,349.6,0.3,"1,647",414.8,"1,236.7",18.5,"6,037.3",90.3 +BSE Ltd.,BSE,BSE,BANKING AND FINANCE,EXCHANGE,367,172.8,189.2,52.26%,22.7,8.5,163,63.6,120.5,8.8,706,52.1 +Rites Ltd.,RITES,541556,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,608.8,444.5,137.8,23.67%,14.1,1.4,148.8,40.1,101.2,4.2,488.1,20.3 +Fortis Healthcare Ltd.,FORTIS,532843,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"1,783.5","1,439.8",330.2,18.65%,84.1,31.8,231.4,48.8,173.7,2.3,547.6,7.3 +Varroc Engineering Ltd.,VARROC,541578,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,893.5","1,692.6",194.3,10.30%,84.9,50.3,65.9,18.2,54.2,3.5,146.5,9.6 +Adani Green Energy Ltd.,ADANIGREEN,ASM,UTILITIES,ELECTRIC UTILITIES,"2,589",521,"1,699",76.53%,474,"1,165",413,119,372,2.2,"1,305",8.2 +VIP Industries Ltd.,VIPIND,507880,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,548.7,493.2,52.9,9.68%,23.8,12.4,19.3,6,13.3,0.9,110.9,7.8 +CreditAccess Grameen Ltd.,CREDITACC,541770,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"1,247.6",248.8,902.3,72.36%,12.3,423.9,466.8,119.7,347,21.8,"1,204.2",75.7 +CESC Ltd.,CESC,500084,UTILITIES,ELECTRIC UTILITIES,"4,414","3,706",646,14.84%,303,305,461,98,348,2.6,"1,447",10.9 +Jamna Auto Industries Ltd.,JAMNAAUTO,520051,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,608.7,528.2,79.1,13.03%,10.9,0.8,68.7,18.6,50.1,2.4,189.3,4.7 +Suprajit Engineering Ltd.,SUPRAJIT,532509,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,727.6,639.1,69.8,9.85%,25.7,13.6,49.2,14.5,34.8,2.5,146.9,10.6 +JK Paper Ltd.,JKPAPER,532162,COMMERCIAL SERVICES & SUPPLIES,PAPER & PAPER PRODUCTS,"1,708.8","1,242.8",407.3,24.68%,83.5,42,340.6,34.9,302.4,17.9,"1,220.6",72.1 +Bank of Maharashtra,MAHABANK,532525,BANKING AND FINANCE,BANKS,"5,735.5","1,179.4","1,920.5",37.90%,0,"2,635.7",935.7,16,919.8,1.3,"3,420.8",4.8 +Aavas Financiers Ltd.,AAVAS,541988,BANKING AND FINANCE,HOUSING FINANCE,497.6,123.5,367.8,74.03%,7.6,203.6,157.4,35.7,121.7,15.4,465.4,58.8 +HDFC Asset Management Company Ltd.,HDFCAMC,541729,BANKING AND FINANCE,ASSET MANAGEMENT COS.,765.4,162,481.1,74.81%,13,2.3,588.1,151.6,436.5,20.4,"1,659.3",77.7 +KEI Industries Ltd.,KEI,517569,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"1,954.2","1,742.7",203.9,10.47%,15.6,7.5,188.4,48.2,140.2,15.5,528.3,58.5 +Orient Electric Ltd.,ORIENTELEC,541301,CONSUMER DURABLES,CONSUMER ELECTRONICS,570.3,546.2,20.7,3.65%,14.2,5.2,23.4,4.9,18.4,0.9,95.3,4.5 +Deepak Nitrite Ltd.,DEEPAKNTR,506401,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"1,795.1","1,475.8",302.3,17.00%,39.4,2.7,277.2,72.1,205.1,15,797.9,58.5 +Fine Organic Industries Ltd.,FINEORG,541557,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,557.6,409.4,131.1,24.25%,14.4,0.7,133.1,28.9,103.4,33.7,458.8,149.6 +LTIMindtree Ltd.,LTIM,540005,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"9,048.6","7,274.1","1,631.3",18.32%,208.2,47,"1,519.3",357,"1,161.8",39.3,"4,427.5",149.6 +Dalmia Bharat Ltd.,DALBHARAT,542216,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"3,234","2,56",589,18.70%,401,101,172,48,118,6.3,"1,041",54.8 +Godfrey Phillips India Ltd.,GODFRYPHLP,500163,FOOD BEVERAGES & TOBACCO,CIGARETTES-TOBACCO PRODUCTS,"1,412.5","1,151",223.6,16.27%,36.5,6.6,218.5,55.5,202.1,38.9,802.9,154.4 +Vaibhav Global Ltd.,VAIBHAVGBL,532156,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,708.4,641.5,63.5,9.01%,22.6,2.9,41.4,12.4,29.4,1.8,121.3,7.3 +Abbott India Ltd.,ABBOTINDIA,500488,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,549.7","1,113.3",380.9,25.49%,17.8,3.1,415.4,102.5,312.9,147.3,"1,081.4",508.9 +Adani Total Gas Ltd.,ATGL,ASM,UTILITIES,UTILITIES,"1,104.8",815.7,279.9,25.55%,37.6,27.3,224.2,57.2,172.7,1.6,571,5.2 +Nestle India Ltd.,NESTLEIND,500790,FMCG,PACKAGED FOODS,"5,070.1","3,811.9","1,224.9",24.32%,111.2,31.4,"1,222",313.9,908.1,94.2,"2,971.1",308.2 +Bayer Cropscience Ltd.,BAYERCROP,506285,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,"1,633.3","1,312.3",304.9,18.85%,11.6,3.7,305.7,82.8,222.9,49.6,844.4,188.1 +Amber Enterprises India Ltd.,AMBER,540902,CONSUMER DURABLES,CONSUMER ELECTRONICS,939.8,867.5,59.6,6.43%,45.2,36.6,-9.5,-3.8,-6.9,-2.1,156.8,46.5 +Rail Vikas Nigam Ltd.,RVNL,542649,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"5,210.3","4,616",298.3,6.07%,6.2,132.7,455.4,85.2,394.3,1.9,"1,478.8",7.1 +Metropolis Healthcare Ltd.,METROPOLIS,542650,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE SERVICES,309.7,233.7,74.8,24.25%,22.2,5.7,48.1,12.5,35.5,6.9,133.4,26 +Polycab India Ltd.,POLYCAB,542652,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"4,253","3,608.8",608.9,14.44%,60.3,26.8,557.2,127.4,425.6,28.4,"1,607.2",107.1 +Multi Commodity Exchange of India Ltd.,MCX,534091,BANKING AND FINANCE,EXCHANGE,184,193.8,-28.7,-17.38%,6.6,0.1,-16.4,1.6,-19.1,-3.7,44.8,8.8 +IIFL Finance Ltd.,IIFL,532636,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,"2,533.7",788.3,"1,600.8",64.66%,43.3,932.1,683.5,158,474.3,12.4,"1,690.7",44.4 +Ratnamani Metals & Tubes Ltd.,RATNAMANI,520111,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"1,141.9",886.3,244.9,21.65%,23.6,10.8,221.1,56.8,163.9,23.4,622.6,88.8 +RHI Magnesita India Ltd.,RHIM,534076,GENERAL INDUSTRIALS,OTHER INDUSTRIAL GOODS,989.7,839,147.9,14.98%,44.2,8.5,97.9,26.3,71.3,3.5,-502.2,-24.3 +Birlasoft Ltd.,BSOFT,532400,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,325.4","1,102.7",207.1,15.81%,21.5,5.7,195.5,50.4,145.1,5.2,378.4,13.7 +EIH Ltd.,EIHOTEL,500840,HOTELS RESTAURANTS & TOURISM,HOTELS,552.5,387.6,142.9,26.94%,33.2,5.6,126.1,36.2,93.1,1.5,424.1,6.8 +Affle (India) Ltd.,AFFLE,542752,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,441.2,344.1,87.2,20.22%,18.4,5.5,73.2,6.4,66.8,5,264.3,19.8 +Westlife Foodworld Ltd.,WESTLIFE,505533,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,618,516.5,98.2,15.98%,43.9,27.4,30.2,7.8,22.4,1.4,107.7,6.9 +IndiaMART InterMESH Ltd.,INDIAMART,542726,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,329.3,214.7,80,27.15%,8,2.3,104.3,23.9,69.4,11.4,321.1,53.6 +Infosys Ltd.,INFY,500209,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"39,626","29,554","9,44",24.21%,"1,166",138,"8,768","2,553","6,212",15,"24,871",60.1 +Sterling and Wilson Renewable Energy Ltd.,SWSOLAR,542760,COMMERCIAL SERVICES & SUPPLIES,CONSULTING SERVICES,776.7,758,1.5,0.19%,4.3,64.3,-50,4.6,-54.2,-2.9,-668.4,-35.2 +ABB India Ltd.,ABB,500002,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"2,846","2,330.7",438.5,15.84%,30.3,0.9,484.2,122.2,362.9,17.1,"1,208.7",57 +Poly Medicure Ltd.,POLYMED,531768,HEALTHCARE EQUIPMENT & SUPPLIES,HEALTHCARE SUPPLIES,351.4,253.1,84.2,24.97%,16,2.2,80.9,18.8,62.2,6.5,233.7,24.4 +GMM Pfaudler Ltd.,GMMPFAUDLR,505255,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,946,795.5,142,15.15%,32.2,21.5,96.8,26.5,71.1,15.8,183.2,40.8 +Gujarat Fluorochemicals Ltd.,FLUOROCHEM,542812,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,960.3,783.7,163.1,17.23%,67.5,34.2,74.8,22.1,52.7,4.8,915.2,83.3 +360 One Wam Ltd.,360ONE,542772,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,617.1,235.6,317.8,57.31%,13.7,139.9,226.8,40.8,186,5.2,696.8,19.5 +Tata Communications Ltd.,TATACOMM,500483,TELECOM SERVICES,OTHER TELECOM SERVICES,"4,897.9","3,857.1","1,015.5",20.84%,605.1,137.4,298.3,77.9,220.7,7.7,"1,322.3",46.4 +Alkyl Amines Chemicals Ltd.,ALKYLAMINE,506767,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,354.5,303.9,48.3,13.71%,12.5,1.7,36.4,9.2,27.2,5.3,171.3,33.5 +CSB Bank Ltd.,CSBBANK,542867,BANKING AND FINANCE,BANKS,835.8,317.5,174.6,25.41%,0,343.6,178,44.8,133.2,7.7,577.7,33.3 +Indian Railway Catering & Tourism Corporation Ltd.,IRCTC,542830,DIVERSIFIED CONSUMER SERVICES,TRAVEL SUPPORT SERVICES,"1,042.4",628.8,366.6,36.83%,14,4.4,395.2,100.5,294.7,3.7,"1,061.2",13.3 +Sumitomo Chemical India Ltd.,SUMICHEM,542920,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,928,715.5,187.9,20.80%,15.8,1.2,195.5,52,143.4,2.9,367.7,7.4 +Century Textiles & Industries Ltd.,CENTURYTEX,500040,COMMERCIAL SERVICES & SUPPLIES,PAPER & PAPER PRODUCTS,"1,114.9","1,069.2",33.8,3.07%,59.2,17,-30.5,-3.3,-30.4,-2.8,117.7,10.5 +SBI Cards and Payment Services Ltd.,SBICARD,543066,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"4,221.4","2,018.8","1,327",32.47%,46.8,604.9,809.4,206.4,603,6.4,"2,302.2",24.3 +Hitachi Energy India Ltd.,POWERINDIA,543187,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"1,228.2","1,162.6",65.3,5.32%,22.5,10.7,32.4,7.6,24.7,5.8,82.5,19.5 +Suven Pharmaceuticals Ltd.,SUVENPHAR,543064,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,250.9,133.1,98,42.40%,11.9,0.5,105.4,25.8,79.6,3.1,431.8,17 +Tata Chemicals Ltd.,TATACHEM,500770,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"4,083","3,179",819,20.49%,234,145,627,120,428,16.8,"2,06",80.8 +Aarti Drugs Ltd.,AARTIDRUGS,524348,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,642.2,565.1,76.4,11.92%,12.6,8.2,56.3,16.7,39.6,4.3,180.2,19.6 +Gujarat Ambuja Exports Ltd.,GAEL,524226,FMCG,EDIBLE OILS,"1,157.7","1,012.2",103.3,9.26%,30.5,5.9,109.1,26.3,82.8,3.6,305.1,13.3 +Polyplex Corporation Ltd.,POLYPLEX,524051,COMMERCIAL SERVICES & SUPPLIES,CONTAINERS & PACKAGING,"1,595.7","1,451.5",120.6,7.67%,75.1,9.9,59.1,10.9,27.9,8.9,71.1,22.6 +Chalet Hotels Ltd.,CHALET,542399,HOTELS RESTAURANTS & TOURISM,HOTELS,318.2,188.6,126,40.04%,35,50.1,44.5,8,36.4,1.8,266.7,13 +Adani Enterprises Ltd.,ADANIENT,512599,COMMERCIAL SERVICES & SUPPLIES,COMMODITY TRADING & DISTRIBUTION,"23,066","20,087.2","2,430.1",10.79%,757,"1,342.8",791,397.8,227.8,2,"2,444.3",21.4 +YES Bank Ltd.,YESBANK,532648,BANKING AND FINANCE,BANKS,"7,980.6","2,377.1",810,12.06%,0,"4,793.6",304.4,75.7,228.6,0.1,836.6,0.3 +EPL Ltd.,EPL,500135,COMMERCIAL SERVICES & SUPPLIES,CONTAINERS & PACKAGING,"1,011.2",820.6,181,18.07%,83.6,30.6,76.4,25.4,50.5,1.6,251.9,7.9 +Network18 Media & Investments Ltd.,NETWORK18,532798,MEDIA,BROADCASTING & CABLE TV,"2,052.2","2,083.8",-218.3,-11.70%,56.8,66.2,-154.5,-6.5,-61,-0.6,-144.2,-1.4 +CIE Automotive India Ltd.,CIEINDIA,532756,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,299.4","1,934",345.4,15.15%,78.3,31,256.1,69.1,375.4,9.9,298.4,7.9 +Vedanta Ltd.,VEDL,500295,METALS & MINING,ALUMINIUM AND ALUMINIUM PRODUCTS,"39,585","27,466","11,479",29.47%,"2,642","2,523","8,177","9,092","-1,783",-4.8,"5,202",14 +Rossari Biotech Ltd.,ROSSARI,543213,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,484.8,419.9,63.6,13.15%,15.1,5,44.8,11.9,32.9,6,116.8,21.2 +KPIT Technologies Ltd.,KPITTECH,542651,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,"1,208.6",959.2,239.9,20.01%,48.1,13.6,187.7,46.3,140.9,5.2,486.9,18 +Intellect Design Arena Ltd.,INTELLECT,538835,SOFTWARE & SERVICES,IT SOFTWARE PRODUCTS,631.7,497.2,121.9,19.69%,33.7,0.8,96.5,25.7,70.4,5.2,316.6,23.2 +Balaji Amines Ltd.,BALAMINES,530999,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,387.3,326.8,53.8,14.13%,10.8,1.8,48,11.6,34.7,10.7,197.3,60.9 +UTI Asset Management Company Ltd.,UTIAMC,543238,BANKING AND FINANCE,ASSET MANAGEMENT COS.,405.6,172.5,231.5,57.30%,10.4,2.8,219.8,37,182.8,14.4,562.9,44.3 +Mazagon Dock Shipbuilders Ltd.,MAZDOCK,543237,TRANSPORTATION,SHIPPING,"2,079.2","1,651.1",176.6,9.66%,20.2,1.3,406.6,102.8,332.9,16.5,"1,327.6",65.8 +Computer Age Management Services Ltd.,CAMS,543232,BANKING AND FINANCE,CAPITAL MARKETS,284.7,153,122.1,44.39%,17.4,2,112.4,28.6,84.5,17.2,309.2,62.9 +Happiest Minds Technologies Ltd.,HAPPSTMNDS,543227,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,428.8,324,82.6,20.32%,14.6,11.2,79.1,20.7,58.5,3.9,232,15.6 +Triveni Turbine Ltd.,TRITURBINE,533655,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,402.3,313.4,74.3,19.17%,5.1,0.6,83.2,19,64.2,2,233.1,7.3 +Angel One Ltd.,ANGELONE,ASM,BANKING AND FINANCE,CAPITAL MARKETS,"1,049.3",602.6,443.4,42.31%,11.2,26.4,407.2,102.7,304.5,36.3,"1,020.2",121.7 +Tanla Platforms Ltd.,TANLA,532790,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"1,014.9",811.8,196.8,19.51%,22.6,1.8,178.7,36.2,142.5,10.6,514.7,38.3 +Max Healthcare Institute Ltd.,MAXHEALTH,543220,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,"1,408.6",975.8,387.4,28.42%,57.9,8.5,366.4,89.7,276.7,2.9,990.1,10.2 +Asahi India Glass Ltd.,ASAHIINDIA,515030,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,122.6",934,185.6,16.58%,43,34.4,111.3,30.2,86.9,3.6,343.5,14.1 +Prince Pipes & Fittings Ltd.,PRINCEPIPE,542907,GENERAL INDUSTRIALS,PLASTIC PRODUCTS,660.4,562.3,94.2,14.35%,22.5,0.7,92.8,22.2,70.6,5.2,219.8,19.9 +Route Mobile Ltd.,ROUTE,543228,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"1,018.3",886.5,128.1,12.63%,21.4,6.5,103.8,15.5,88.8,14.2,365.3,58.3 +KPR Mill Ltd.,KPRMILL,532889,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"1,533","1,212.9",298,19.72%,46,18.1,256,54.2,201.8,5.9,788.8,23.1 +Infibeam Avenues Ltd.,INFIBEAM,539807,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,792.6,719.7,70.2,8.89%,17.1,0.5,55.2,14.7,41,0.1,142.2,0.5 +Restaurant Brands Asia Ltd.,RBA,543248,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,628.2,568.7,56.2,9.00%,78.6,31.5,-50.7,0,-46,-0.9,-220.3,-4.5 +Larsen & Toubro Ltd.,LT,500510,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"52,157","45,392.1","5,632",11.04%,909.9,864,"4,991.1","1,135.5","3,222.6",22.9,"12,255.3",89.2 +Gland Pharma Ltd.,GLAND,543245,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,426.6","1,049.3",324.1,23.60%,81.3,6,289.9,95.8,194.1,11.8,698.8,42.4 +Macrotech Developers Ltd.,LODHA,543287,REALTY,REALTY,"1,755.1","1,333.5",416.1,23.78%,29.3,123.1,269.2,62.4,201.9,2.1,"1,529.2",15.9 +Poonawalla Fincorp Ltd.,POONAWALLA,524000,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),745.3,178.9,531.7,71.98%,14.7,215.5,"1,124.6",270,860.2,11.2,"1,466.4",19.1 +The Fertilisers and Chemicals Travancore Ltd.,FACT,590024,FERTILIZERS,FERTILIZERS,"1,713.6","1,530.8",132.4,7.96%,5.3,61.2,105.2,0,105.2,1.6,508.4,7.9 +Home First Finance Company India Ltd.,HOMEFIRST,543259,BANKING AND FINANCE,HOUSING FINANCE,278,53.7,211.6,77.43%,2.8,117,96.4,22.1,74.3,8.4,266.2,30.2 +CG Power and Industrial Solutions Ltd.,CGPOWER,500093,GENERAL INDUSTRIALS,HEAVY ELECTRICAL EQUIPMENT,"2,019","1,692.9",308.6,15.42%,22.9,0.4,329.9,86.2,242.3,1.6,"1,1",7.2 +Laxmi Organic Industries Ltd.,LXCHEM,543277,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,660.5,613.3,38.9,5.97%,27.5,2.1,17.5,6.8,10.7,0.4,100.6,3.8 +Anupam Rasayan India Ltd.,ANURAS,543275,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,395.6,284.7,107.5,27.41%,19.8,20.4,70.7,22,40.7,3.8,178.9,16.6 +Kalyan Jewellers India Ltd.,KALYANKJIL,ASM,TEXTILES APPARELS & ACCESSORIES,GEMS & JEWELLERY,"4,427.7","4,100.9",313.7,7.11%,66.9,81.7,178.1,43.3,135.2,1.3,497.9,4.8 +Jubilant Pharmova Ltd.,JUBLPHARMA,530019,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,690.2","1,438.5",241.8,14.39%,96.6,66.1,89,35.9,62.5,3.9,-44.6,-2.8 +Indigo Paints Ltd.,INDIGOPNTS,543258,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,273.4,228.7,41.8,15.45%,10,0.5,34.3,8.2,26.1,5.5,132.4,27.8 +Indian Railway Finance Corporation Ltd.,IRFC,543257,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"6,767.5",33.5,"6,732.4",99.50%,2.1,"5,181.5","1,549.9",0,"1,549.9",1.2,"6,067.6",4.6 +Mastek Ltd.,MASTEK,523704,SOFTWARE & SERVICES,IT CONSULTING & SOFTWARE,770.4,642.5,123,16.07%,20.9,12.6,90.3,25,62.8,20.5,269.7,88 +Equitas Small Finance Bank Ltd.,EQUITASBNK,543243,BANKING AND FINANCE,BANKS,"1,540.4",616.8,330.2,24.30%,0,593.4,267,68.9,198.1,1.8,749.5,6.7 +Tata Teleservices (Maharashtra) Ltd.,TTML,532371,TELECOM SERVICES,TELECOM SERVICES,288.6,159.3,127.5,44.45%,36.3,403.2,-310.2,0,-310.2,-1.6,"-1,168.3",-6 +Praj Industries Ltd.,PRAJIND,522205,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,893.3,798.4,84,9.52%,9.1,1,84.8,22.4,62.4,3.4,271.4,14.8 +Nazara Technologies Ltd.,NAZARA,543280,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,309.5,269.4,26.7,8.98%,15.1,2.7,21.2,-1.3,19.8,3,60,9.1 +Jubilant Ingrevia Ltd.,JUBLINGREA,543271,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,028.5",902.3,117.7,11.54%,33.9,12.5,79.8,22.4,57.5,3.6,258.9,16.4 +Sona BLW Precision Forgings Ltd.,SONACOMS,543300,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,796.9,567.5,223.3,28.24%,53.4,6,164.1,40.1,123.8,2.1,462.8,7.9 +Chemplast Sanmar Ltd.,CHEMPLASTS,543336,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,025",941.8,46,4.65%,35.3,38.6,9.2,-16.8,26.1,1.6,35.3,2.2 +Aptus Value Housing Finance India Ltd.,APTUS,543335,BANKING AND FINANCE,HOUSING FINANCE,344.5,50.6,277.5,83.18%,2.6,96.1,189.6,41.5,148,3,551.1,11.1 +Clean Science & Technology Ltd.,CLEAN,543318,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,187.1,106.3,74.8,41.32%,11.1,0.3,69.5,17.3,52.2,4.9,275.5,25.9 +Medplus Health Services Ltd.,MEDPLUS,543427,HEALTHCARE EQUIPMENT & SUPPLIES,HEALTHCARE SUPPLIES,"1,419","1,323.5",85.1,6.04%,55.5,23.5,16.4,1.9,14.6,1.2,58.3,4.9 +Nuvoco Vistas Corporation Ltd.,NUVOCO,543334,CEMENT AND CONSTRUCTION,CEMENT & CEMENT PRODUCTS,"2,578.9","2,243",329.9,12.82%,225.6,139.9,-29.6,-31.1,1.5,0,141.8,4 +Star Health and Allied Insurance Company Ltd.,STARHEALTH,543412,BANKING AND FINANCE,GENERAL INSURANCE,"3,463.2","3,295.8",165.7,4.79%,0,0,167.1,41.8,125.3,2.1,725.4,12.4 +Go Fashion (India) Ltd.,GOCOLORS,543401,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,192.8,132.2,56.6,29.98%,25.8,8.9,25.8,5.7,20,3.7,85.4,15.8 +PB Fintech Ltd.,POLICYBZR,543390,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,909.1,900.7,-89.1,-10.98%,22.3,7.2,-21.1,-0.3,-20.2,-0.5,-127.9,-2.8 +FSN E-Commerce Ventures Ltd.,NYKAA,543384,SOFTWARE & SERVICES,INTERNET & CATALOGUE RETAIL,"1,515.6","1,426.4",80.6,5.35%,54.6,21.3,13.3,4,5.8,0,19.8,0.1 +Krishna Institute of Medical Sciences Ltd.,KIMS,543308,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,655.4,475.2,177.3,27.17%,32.6,8.9,138.6,37.3,92,11.5,342.1,42.7 +Zomato Ltd.,ZOMATO,543320,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"3,06","2,895",-47,-1.65%,128,16,21,-15,36,0,-496.8,-0.6 +Brightcom Group Ltd.,BCG,532368,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"1,690.5","1,172.3",518,30.65%,72.3,0.1,445.8,124.3,321.5,1.6,"1,415.2",7 +Shyam Metalics and Energy Ltd.,SHYAMMETL,543299,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"2,978.9","2,633.6",307.1,10.44%,176.5,35.4,133.4,-348.6,484.1,18.9,"1,049.9",41.2 +G R Infraprojects Ltd.,GRINFRA,543317,CEMENT AND CONSTRUCTION,ROADS & HIGHWAYS,"1,909.2","1,415.7",467.1,24.81%,61.7,144.6,287.1,69.9,217.2,22.5,"1,240.3",128.3 +RattanIndia Enterprises Ltd.,RTNINDIA,534597,UTILITIES,ELECTRIC UTILITIES,"1,618.1","1,392.8",1.5,0.11%,4.3,28.8,142.2,1.7,140.9,1,147.6,1.1 +Borosil Renewables Ltd.,BORORENEW,502219,CONSUMER DURABLES,HOUSEWARE,406.3,369.2,32.5,8.09%,31,9.6,28.9,-1.1,25.1,1.9,32.1,2.5 +HLE Glascoat Ltd.,HLEGLAS,522215,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,227.8,198,26.5,11.79%,6.1,5.8,16.1,5.3,10,1.6,54.4,8 +Tata Investment Corporation Ltd.,TATAINVEST,501301,DIVERSIFIED,HOLDING COMPANIES,125,10.1,113.8,91.88%,0.2,4.7,110.1,-1.3,124.4,24.6,326.1,64.4 +Sapphire Foods India Ltd.,SAPPHIRE,543397,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,650.1,527.5,115.1,17.91%,76.8,24.5,21.4,6.2,15.3,2.4,208.5,32.7 +Devyani International Ltd.,DEVYANI,543330,HOTELS RESTAURANTS & TOURISM,RESTAURANTS,826,665,154.4,18.84%,86.3,41.7,19,-16.8,33.4,0.3,177.5,1.5 +Vijaya Diagnostic Centre Ltd.,VIJAYA,543350,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE SERVICES,145.6,81.5,57.4,41.31%,13.7,5.9,44.6,11,33.3,3.3,103.4,10.1 +C.E. Info Systems Ltd.,MAPMYINDIA,543425,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,99.3,50.1,41,44.98%,3.7,0.7,44.7,11.1,33,6.1,122.9,22.7 +Latent View Analytics Ltd.,LATENTVIEW,543398,SOFTWARE & SERVICES,DATA PROCESSING SERVICES,172.7,124.9,30.8,19.78%,2.3,0.8,44.7,10.6,34,1.7,153.6,7.5 +Metro Brands Ltd.,METROBRAND,543426,RETAILING,FOOTWEAR,571.9,400.3,155.4,27.96%,57.2,19.7,94.7,27.5,66.7,2.5,340,12.5 +Easy Trip Planners Ltd.,EASEMYTRIP,543272,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,144.6,76.9,64.8,45.71%,1,2,64.7,17.7,47.2,0.3,146,0.8 +Shree Renuka Sugars Ltd.,RENUKA,532670,FOOD BEVERAGES & TOBACCO,SUGAR,"2,564.7","2,491",63.7,2.49%,64.1,216.8,-207.2,-1.6,-204.9,-1,-286,-1.3 +One97 Communications Ltd.,PAYTM,543396,SOFTWARE & SERVICES,INTERNET SOFTWARE & SERVICES,"2,662.5","2,749.6",-231,-9.17%,180.1,7,-279.9,12.7,-290.5,-5,"-1,207.9",-19 +MTAR Technologies Ltd.,MTARTECH,543270,GENERAL INDUSTRIALS,DEFENCE,167.7,130.7,36.1,21.64%,5.8,5.5,25.7,5.2,20.5,6.7,103.3,33.6 +Capri Global Capital Ltd.,CGCL,531595,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),557.4,229.3,304.8,54.70%,23.1,195.8,86,20.8,65.2,3.2,231.2,11.2 +GMR Airports Infrastructure Ltd.,GMRINFRA,ASM,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"2,185","1,336.8",726.7,35.22%,373,695.8,-252,54.9,-91,-0.1,-370.9,-0.6 +Triveni Engineering & Industries Ltd.,TRIVENI,532356,FOOD BEVERAGES & TOBACCO,SUGAR,"1,629.7","1,554.5",62.9,3.89%,25.8,10.2,39.3,10.1,29.1,1.3,434.3,19.8 +Delhivery Ltd.,DELHIVERY,543529,TRANSPORTATION,TRANSPORTATION - LOGISTICS,"2,043","1,957.3",-15.6,-0.80%,171.2,19.6,-105.2,-2.1,-102.9,-1.4,-546.7,-7.5 +Life Insurance Corporation of India,LICI,543526,BANKING AND FINANCE,LIFE INSURANCE,"202,394.9","193,612.5","8,445",4.18%,0,0,"8,696.5","1,083.9","8,030.3",12.7,"37,204.8",58.8 +Campus Activewear Ltd.,CAMPUS,543523,RETAILING,FOOTWEAR,259.1,234.2,24.5,9.46%,18.1,6.5,0.4,0.1,0.3,0,103.1,3.4 +Motherson Sumi Wiring India Ltd.,MSUMI,543498,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"2,110.2","1,856.5",248.1,11.79%,36.4,7.4,210,54.1,155.9,0.3,523.6,1.2 +Olectra Greentech Ltd.,OLECTRA,532439,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,310.3,266.6,40.5,13.20%,8.8,9.7,25.2,8,18.6,2.2,78.5,9.6 +Patanjali Foods Ltd.,PATANJALI,500368,FMCG,EDIBLE OILS,"7,845.8","7,426.6",395.3,5.05%,60.1,24,335.1,80.5,254.5,7,875.2,24.2 +Raymond Ltd.,RAYMOND,500330,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"2,320.7","1,938.8",314.6,13.96%,65.4,89.3,204.2,50.7,159.8,24,"1,514.2",227.5 +Swan Energy Ltd.,SWANENERGY,503310,REALTY,REALTY,"1,230.1",966.3,257,21.01%,27.1,58.3,178.4,12.8,84.6,6.7,308.4,11.7 +Samvardhana Motherson International Ltd.,MOTHERSON,517334,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"23,639.2","21,585","1,888.8",8.05%,867.4,487.9,449.5,229.2,201.6,0.3,"1,910.3",2.8 +Vedant Fashions Ltd.,MANYAVAR,543463,RETAILING,SPECIALTY RETAIL,233.4,125.5,92.8,42.51%,32.5,10.7,64.8,16.1,48.7,2,399.9,16.5 +Adani Wilmar Ltd.,AWL,543458,FMCG,EDIBLE OILS,"12,331.2","12,123.5",143.7,1.17%,95.7,220.2,-161.8,-31.5,-130.7,-1,130.1,1 +Mahindra Lifespace Developers Ltd.,MAHLIFE,532313,REALTY,REALTY,25.7,52.7,-34.9,-196.45%,3.1,0.2,-30.3,-10.8,-18.9,-1.2,10.5,0.7 +Tejas Networks Ltd.,TEJASNET,540595,TELECOM SERVICES,OTHER TELECOM SERVICES,413.9,383,13,3.28%,41.7,7,-17.7,-5.1,-12.6,-0.7,-61.3,-3.5 +Aether Industries Ltd.,AETHER,543534,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,178.3,118.2,46,28.00%,9.7,1.6,48.7,12.1,36.7,2.8,139.1,10.5 +JBM Auto Ltd.,JBMA,ASM,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,238.8","1,091.3",139.7,11.35%,41.2,47.9,58.3,11.3,44.2,3.7,136.8,11.6 +Deepak Fertilisers & Petrochemicals Corporation Ltd.,DEEPAKFERT,500645,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,"2,443.2","2,138.1",286.1,11.80%,81.2,107.1,116.8,53.3,60.1,4.8,674.5,53.4 +Sharda Cropchem Ltd.,SHARDACROP,538666,CHEMICALS & PETROCHEMICALS,AGROCHEMICALS,604.3,559.6,21.2,3.65%,74,4.6,-33.8,-6.3,-27.6,-3.1,191,21.2 +Shoppers Stop Ltd.,SHOPERSTOP,532638,RETAILING,DEPARTMENT STORES,"1,049.7",878.2,160.9,15.49%,108.2,54.9,3.5,0.8,2.7,0.2,94.2,8.6 +BEML Ltd.,BEML,500048,AUTOMOBILES & AUTO COMPONENTS,COMMERCIAL VEHICLES,924,855.3,61.5,6.70%,15.8,10.8,42.2,-9.6,51.8,12.4,200.8,48.2 +Lemon Tree Hotels Ltd.,LEMONTREE,541233,HOTELS RESTAURANTS & TOURISM,HOTELS,230.1,125.3,101.9,44.84%,22.6,47.3,34.8,8.6,22.6,0.3,130.1,1.6 +Rainbow Childrens Medicare Ltd.,RAINBOW,543524,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,340.5,215.1,117.6,35.34%,26.8,13.3,85.2,22.1,62.9,6.2,215.4,21.2 +UCO Bank,UCOBANK,532505,BANKING AND FINANCE,BANKS,"5,865.6","1,581.5",981.9,18.81%,0,"3,302.3",639.8,238.1,403.5,0.3,"1,84",1.5 +Piramal Pharma Ltd.,PPLPHARMA,543635,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"1,960.6","1,645.7",265.6,13.90%,184.5,109.9,20.4,34.5,5,0,-133.6,-1 +KSB Ltd.,KSB,500249,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,572.2,493.4,70.3,12.47%,12.3,2,64.5,17.1,50.1,14.4,209.7,60.3 +Data Patterns (India) Ltd.,DATAPATTNS,543428,GENERAL INDUSTRIALS,DEFENCE,119.2,67.5,40.8,37.63%,3.1,2.3,46.3,12.5,33.8,6,148.3,26.5 +Global Health Ltd.,MEDANTA,543654,DIVERSIFIED CONSUMER SERVICES,HEALTHCARE FACILITIES,864.7,631.1,212.9,25.22%,42.9,20.1,170.6,45.4,125.2,4.7,408.9,15.2 +Aarti Industries Ltd.,AARTIIND,524208,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,"1,454","1,221.2",232.8,16.01%,93,58.2,81.6,-9.1,90.7,2.5,446.2,12.3 +BLS International Services Ltd.,BLS,540073,DIVERSIFIED CONSUMER SERVICES,TRAVEL SUPPORT SERVICES,416.4,321,86.7,21.27%,7.3,1,87.2,5.2,78.7,1.9,267.6,6.5 +Archean Chemical Industries Ltd.,ACI,543657,CHEMICALS & PETROCHEMICALS,COMMODITY CHEMICALS,301.7,195,95.5,32.86%,17.5,1.9,87.3,21.3,66,5.4,394.4,32.1 +Adani Power Ltd.,ADANIPOWER,ASM,UTILITIES,ELECTRIC UTILITIES,"14,935.7","7,819.2","5,171.4",39.81%,"1,004.5",888.4,"5,223.6","-1,370.6","6,594.2",16.5,"20,604.8",53.4 +Craftsman Automation Ltd.,CRAFTSMAN,543276,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,183.8",941.6,237.5,20.14%,66.8,41.6,133.8,29.6,94.5,44.1,298.3,141.2 +NMDC Ltd.,NMDC,526371,METALS & MINING,MINING,"4,335","2,823.6","1,190.4",29.66%,88.8,18.6,"1,404.1",379,"1,026.2",3.5,"5,862.2",20 +Epigral Ltd.,EPIGRAL,543332,CHEMICALS & PETROCHEMICALS,SPECIALTY CHEMICALS,479.1,370.2,107.9,22.57%,31.5,21.3,56.1,17.9,38,9.1,223.4,53.8 +Apar Industries Ltd.,APARINDS,532259,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,"3,944.7","3,576.2",349.8,8.91%,28.2,103.1,237.3,62.9,173.9,45.4,783.9,204.8 +Bikaji Foods International Ltd.,BIKAJI,543653,FMCG,PACKAGED FOODS,614.7,521,87.7,14.41%,15.6,2.9,75.2,15.4,61.2,2.5,173.6,6.9 +Five-Star Business Finance Ltd.,FIVESTAR,543663,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),522.4,133.2,375,72.28%,5.7,105.9,267,67.6,199.4,6.8,703,24.1 +Ingersoll-Rand (India) Ltd.,INGERRAND,500210,GENERAL INDUSTRIALS,INDUSTRIAL MACHINERY,282.8,210.7,65.7,23.76%,4.6,0.6,67,17.2,49.7,15.8,218.5,69.2 +KFIN Technologies Ltd.,KFINTECH,543720,BANKING AND FINANCE,OTHER FINANCIAL SERVICES,215.3,115.3,93.7,44.82%,12.6,3.2,84.2,22.3,61.4,3.6,215.1,12.6 +Piramal Enterprises Ltd.,PEL,500302,BANKING AND FINANCE,FINANCE (INCLUDING NBFCS),"2,205.2","1,320.1","1,117.9",50.97%,38.3,"1,038.9",-11.8,10.7,48.2,2,"3,906.5",173.9 +NMDC Steel Ltd.,NSLNISP,543768,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,290.3,349.6,-72.2,-26.04%,74.5,40.8,-174.7,-43.6,-131.1,-0.5,, +Eris Lifesciences Ltd.,ERIS,540596,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,508.8,324.2,181.1,35.85%,42.1,16.3,126.2,3.9,123.4,9.1,385.6,28.3 +Mankind Pharma Ltd.,MANKIND,543904,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,"2,768.1","2,025.5",682.6,25.21%,96.5,8.6,637.5,129.8,501,12.5,"1,564.8",39.1 +Kaynes Technology India Ltd.,KAYNES,ASM,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,369.8,312.1,48.8,13.52%,6.5,11.8,39.4,7.1,32.3,5.5,143.2,24.6 +Safari Industries (India) Ltd.,SAFARI,523025,TEXTILES APPARELS & ACCESSORIES,OTHER APPARELS & ACCESSORIES,372.9,306.6,63.5,17.15%,12.2,2.2,51.9,12.1,39.8,16.7,162.3,68.2 +Saregama India Ltd.,SAREGAMA,532163,MEDIA,MOVIES & ENTERTAINMENT,185.6,111.5,60.9,35.32%,8.2,0.2,65.6,17.6,48.1,2.5,193.4,10 +Syrma SGS Technology Ltd.,SYRMA,543573,CONSUMER DURABLES,OTHER ELECTRICAL EQUIPMENT/PRODUCTS,720.6,662.7,49,6.88%,11.6,8,37,6.4,28.3,1.6,132.4,7.5 +Jindal Saw Ltd.,JINDALSAW,ASM,GENERAL INDUSTRIALS,OTHER INDUSTRIAL PRODUCTS,"5,488.9","4,662",804.2,14.71%,142.5,188.7,495.6,139.6,375.7,11.8,"1,135.8",35.5 +Godawari Power & Ispat Ltd.,GPIL,532734,METALS & MINING,IRON & STEEL/INTERM.PRODUCTS,"1,314.2",929.6,361.4,28.00%,34.8,10.2,339.6,86.1,256.9,20.6,785.5,63 +Gillette India Ltd.,GILLETTE,507815,FMCG,PERSONAL PRODUCTS,676.2,530.8,136.7,20.48%,20.1,0.1,125.2,32.5,92.7,28.4,361.6,111 +Symphony Ltd.,SYMPHONY,517385,CONSUMER DURABLES,CONSUMER ELECTRONICS,286,234,41,14.91%,7,2,43,8,35,5.1,114,16.5 +Glenmark Life Sciences Ltd.,GLS,543322,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,600.7,428.3,167.1,28.06%,13.1,0.4,158.9,40.2,118.7,9.7,505.5,41.3 +Usha Martin Ltd.,USHAMART,517146,METALS & MINING,IRON & STEEL PRODUCTS,806,640.4,144.3,18.39%,18,6.4,141.2,35,109.5,3.6,399.4,13.1 +Ircon International Ltd.,IRCON,541956,CEMENT AND CONSTRUCTION,CONSTRUCTION & ENGINEERING,"3,136.3","2,771.2",215.7,7.22%,27.1,36.9,301.2,77.6,250.7,2.7,884.6,9.4 +Ujjivan Small Finance Bank Ltd.,UJJIVANSFB,542904,BANKING AND FINANCE,BANKS,"1,579.8",528.6,483.4,34.75%,0,567.8,436.4,108.7,327.7,1.7,"1,254.5",6.4 +Procter & Gamble Health Ltd.,PGHL,500126,PHARMACEUTICALS & BIOTECHNOLOGY,PHARMACEUTICALS,311,216.3,88.7,29.08%,6.5,0.2,88,22.5,65.6,39.5,231.4,139.4 +Allcargo Logistics Ltd.,ALLCARGO,532749,TRANSPORTATION,TRANSPORTATION - LOGISTICS,"3,336.3","3,188.8",118,3.57%,106.7,36.7,14.2,1.3,21.8,0.9,361.9,14.7 +Sheela Foam Ltd.,SFL,540203,DIVERSIFIED CONSUMER SERVICES,FURNITURE-FURNISHING-PAINTS,637.6,547,66.2,10.80%,21.9,8.6,60.2,15.6,44,4.5,192.4,17.7 +Alok Industries Ltd.,ALOKINDS,521070,TEXTILES APPARELS & ACCESSORIES,TEXTILES,"1,369.3","1,323.1",35.9,2.64%,78.6,142.2,-174.6,0,-174.8,-0.3,-948.4,-1.9 +Minda Corporation Ltd.,MINDACORP,538962,AUTOMOBILES & AUTO COMPONENTS,AUTO PARTS & EQUIPMENT,"1,197.9","1,064.5",131.3,10.98%,41.4,14.9,77,18.7,58.8,2.5,278.2,11.6 +Concord Biotech Ltd.,CONCORDBIO,543960,PHARMACEUTICALS & BIOTECHNOLOGY,BIOTECHNOLOGY,270.5,143.2,119.2,45.43%,13.3,0.8,113.2,28.7,81,7.7,, \ No newline at end of file diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/sampleFileForUpload.txt b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/sampleFileForUpload.txt new file mode 100644 index 000000000000..ab553b3304c1 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/data/sampleFileForUpload.txt @@ -0,0 +1 @@ +The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457. diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/tsconfig.json b/sdk/ai/ai-projects/samples/v1-beta/typescript/tsconfig.json new file mode 100644 index 000000000000..984eed535aa8 --- /dev/null +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**/*.ts" + ] +} diff --git a/sdk/ai/ai-projects/src/agents/assistants.ts b/sdk/ai/ai-projects/src/agents/assistants.ts new file mode 100644 index 000000000000..4403f477be76 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/assistants.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import { operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { + AgentDeletionStatusOutput, + AgentOutput, + OpenAIPageableListOfAgentOutput, +} from "../customization/outputModels.js"; +import { + validateLimit, + validateMetadata, + validateOrder, + validateVectorStoreDataType, +} from "./inputValidations.js"; +import { TracingUtility } from "../tracing.js"; +import { traceEndCreateOrUpdateAgent, traceStartCreateOrUpdateAgent } from "./assistantsTrace.js"; +import { traceEndAgentGeneric, traceStartAgentGeneric } from "./traceUtility.js"; +import type { + CreateAgentOptionalParams, + DeleteAgentOptionalParams, + GetAgentOptionalParams, + ListAgentsOptionalParams, + UpdateAgentOptionalParams, +} from "./customModels.js"; +import type * as GeneratedParameters from "../generated/src/parameters.js"; +import * as ConvertFromWire from "../customization/convertOutputModelsFromWire.js"; +import * as ConverterToWire from "../customization/convertModelsToWrite.js"; +import { convertToListQueryParameters } from "../customization/convertParametersToWire.js"; +import { createOpenAIError } from "./openAIError.js"; + +const expectedStatuses = ["200"]; + +enum Tools { + CodeInterpreter = "code_interpreter", + FileSearch = "file_search", + Function = "function", + BingGrounding = "bing_grounding", + MicrosoftFabric = "microsoft_fabric", + SharepointGrounding = "sharepoint_grounding", + AzureAISearch = "azure_ai_search", +} + +/** Creates a new agent. */ +export async function createAgent( + context: Client, + model: string, + options: CreateAgentOptionalParams = {}, +): Promise { + const createOptions: GeneratedParameters.CreateAgentParameters = { + ...operationOptionsToRequestParameters(options), + body: { + ...ConverterToWire.convertCreateAgentOptions({ ...options, model }), + }, + }; + + validateCreateAgentParameters(createOptions); + const response = await TracingUtility.withSpan( + "CreateAgent", + createOptions, + async (updatedOptions) => { + const result = await context.path("/assistants").post(updatedOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + traceStartCreateOrUpdateAgent, + traceEndCreateOrUpdateAgent, + ); + return ConvertFromWire.convertAgentOutput(response); +} + +/** Gets a list of agents that were previously created. */ +export async function listAgents( + context: Client, + options: ListAgentsOptionalParams = {}, +): Promise { + const listAgentsOptions: GeneratedParameters.ListAgentsParameters = { + ...operationOptionsToRequestParameters(options), + queryParameters: convertToListQueryParameters(options), + }; + + validateListAgentsParameters(listAgentsOptions); + const response = await TracingUtility.withSpan( + "ListAgents", + listAgentsOptions || {}, + async (updateOptions) => { + const result = await context.path("/assistants").get(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + ); + + return ConvertFromWire.convertOpenAIPageableListOfAgentOutput(response); +} + +/** Retrieves an existing agent. */ +export async function getAgent( + context: Client, + assistantId: string, + options: GetAgentOptionalParams = {}, +): Promise { + const getAgentOptions: GeneratedParameters.GetAgentParameters = { + ...operationOptionsToRequestParameters(options), + }; + + validateAssistantId(assistantId); + const response = await TracingUtility.withSpan( + "GetAgent", + getAgentOptions, + async (updateOptions) => { + const result = await context + .path("/assistants/{assistantId}", assistantId) + .get(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => + traceStartAgentGeneric(span, { + ...updatedOptions, + tracingAttributeOptions: { agentId: assistantId }, + }), + ); + + return ConvertFromWire.convertAgentOutput(response); +} + +/** Modifies an existing agent. */ +export async function updateAgent( + context: Client, + assistantId: string, + options: UpdateAgentOptionalParams = {}, +): Promise { + const updateAgentOptions: GeneratedParameters.UpdateAgentParameters = { + ...operationOptionsToRequestParameters(options), + body: { + ...ConverterToWire.convertUpdateAgentOptions(options), + }, + }; + + validateUpdateAgentParameters(assistantId, updateAgentOptions); + const response = await TracingUtility.withSpan( + "UpdateAgent", + updateAgentOptions, + async (updateOptions) => { + const result = await context + .path("/assistants/{assistantId}", assistantId) + .post(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => traceStartCreateOrUpdateAgent(span, updatedOptions, assistantId), + traceEndCreateOrUpdateAgent, + ); + return ConvertFromWire.convertAgentOutput(response); +} + +/** Deletes an agent. */ +export async function deleteAgent( + context: Client, + assistantId: string, + options: DeleteAgentOptionalParams = {}, +): Promise { + const deleteAgentOptions: GeneratedParameters.DeleteAgentParameters = { + ...operationOptionsToRequestParameters(options), + }; + + validateAssistantId(assistantId); + const response = await TracingUtility.withSpan( + "DeleteAgent", + deleteAgentOptions, + async (updateOptions) => { + const result = await context + .path("/assistants/{assistantId}", assistantId) + .delete(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + traceStartAgentGeneric, + traceEndAgentGeneric, + ); + return ConvertFromWire.convertAgentDeletionStatusOutput(response); +} + +function validateCreateAgentParameters( + options: GeneratedParameters.CreateAgentParameters | GeneratedParameters.UpdateAgentParameters, +): void { + if (options.body.tools) { + if (options.body.tools.some((value) => !Object.values(Tools).includes(value.type as Tools))) { + throw new Error( + "Tool type must be one of 'code_interpreter', 'file_search', 'function', 'bing_grounding', 'microsoft_fabric', 'sharepoint_grounding', 'azure_ai_search'", + ); + } + } + if (options.body.tool_resources) { + if (options.body.tool_resources.code_interpreter) { + if ( + options.body.tool_resources.code_interpreter.file_ids && + options.body.tool_resources.code_interpreter.data_sources + ) { + throw new Error("Only file_ids or data_sources can be provided, not both"); + } + if ( + options.body.tool_resources.code_interpreter.file_ids && + options.body.tool_resources.code_interpreter.file_ids.length > 20 + ) { + throw new Error("A maximum of 20 file IDs are allowed"); + } + if (options.body.tool_resources.code_interpreter.data_sources) { + validateVectorStoreDataType(options.body.tool_resources.code_interpreter.data_sources); + } + } + if (options.body.tool_resources.file_search) { + if ( + options.body.tool_resources.file_search.vector_store_ids && + options.body.tool_resources.file_search.vector_store_ids.length > 1 + ) { + throw new Error("Only one vector store ID is allowed"); + } + if (options.body.tool_resources.file_search.vector_stores) { + if (options.body.tool_resources.file_search.vector_stores.length > 1) { + throw new Error("Only one vector store is allowed"); + } + validateVectorStoreDataType( + options.body.tool_resources.file_search.vector_stores[0]?.configuration.data_sources, + ); + } + } + if (options.body.tool_resources.azure_ai_search) { + if ( + options.body.tool_resources.azure_ai_search.indexes && + options.body.tool_resources.azure_ai_search.indexes.length > 1 + ) { + throw new Error("Only one index is allowed"); + } + } + } + if (options.body.temperature && (options.body.temperature < 0 || options.body.temperature > 2)) { + throw new Error("Temperature must be between 0 and 2"); + } + if (options.body.metadata) { + validateMetadata(options.body.metadata); + } +} + +function validateListAgentsParameters(options?: GeneratedParameters.ListAgentsParameters): void { + if (options?.queryParameters?.limit) { + validateLimit(options.queryParameters.limit); + } + if (options?.queryParameters?.order) { + validateOrder(options.queryParameters.order); + } +} + +function validateAssistantId(assistantId: string): void { + if (!assistantId) { + throw new Error("Assistant ID is required"); + } +} + +function validateUpdateAgentParameters( + assistantId: string, + options?: GeneratedParameters.UpdateAgentParameters, +): void { + validateAssistantId(assistantId); + if (options) { + validateCreateAgentParameters(options); + } +} diff --git a/sdk/ai/ai-projects/src/agents/assistantsTrace.ts b/sdk/ai/ai-projects/src/agents/assistantsTrace.ts new file mode 100644 index 000000000000..39f62537b200 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/assistantsTrace.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { AgentOutput } from "../generated/src/outputModels.js"; +import type { TracingAttributeOptions, Span } from "../tracing.js"; +import { TracingUtility, TracingOperationName } from "../tracing.js"; +import type { CreateAgentParameters, UpdateAgentParameters } from "../generated/src/parameters.js"; +import { + addInstructionsEvent, + formatAgentApiResponse, + UpdateWithAgentAttributes, +} from "./traceUtility.js"; + +/** + * Traces the start of creating or updating an agent. + * @param span - The span to trace. + * @param options - The options for creating an agent. + */ +export function traceStartCreateOrUpdateAgent( + span: Span, + options: CreateAgentParameters | UpdateAgentParameters, + agentId?: string, +): void { + const attributes: TracingAttributeOptions = { + operationName: TracingOperationName.CREATE_AGENT, + name: options.body.name ?? undefined, + model: options.body.model, + description: options.body.description ?? undefined, + instructions: options.body.instructions ?? undefined, + topP: options.body.top_p ?? undefined, + temperature: options.body.temperature ?? undefined, + responseFormat: formatAgentApiResponse(options.body.response_format), + }; + if (agentId) { + attributes.operationName = TracingOperationName.CREATE_UPDATE_AGENT; + attributes.agentId = agentId; + } + TracingUtility.setSpanAttributes( + span, + TracingOperationName.CREATE_AGENT, + UpdateWithAgentAttributes(attributes), + ); + addInstructionsEvent(span, options.body); +} + +/** + * Traces the end of creating an agent. + * @param span - The span to trace. + * @param _options - The options for creating an agent. + * @param result - The result of creating an agent. + */ +export async function traceEndCreateOrUpdateAgent( + span: Span, + _options: CreateAgentParameters | UpdateAgentParameters, + result: Promise, +): Promise { + const resolvedResult = await result; + const attributes: TracingAttributeOptions = { + agentId: resolvedResult.id, + }; + TracingUtility.updateSpanAttributes(span, attributes); +} diff --git a/sdk/ai/ai-projects/src/agents/customModels.ts b/sdk/ai/ai-projects/src/agents/customModels.ts new file mode 100644 index 000000000000..c06cc7bd40fc --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/customModels.ts @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { OperationOptions, RequestParameters } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; +import type { ThreadRunOutput } from "../customization/outputModels.js"; +import type { AgentEventMessageStream } from "./streamingModels.js"; +import type { + AgentThreadCreationOptions, + CreateAgentOptions, + CreateAndRunThreadOptions, + CreateRunOptions, + UpdateAgentOptions, + UpdateAgentThreadOptions, + VectorStoreFileStatusFilter, + VectorStoreOptions, + VectorStoreUpdateOptions, +} from "../customization/models.js"; +import type { + ListMessagesQueryParamProperties, + ListFilesQueryParamProperties, +} from "../customization/parameters.js"; +import type { + CreateVectorStoreFileBatchOptions, + CreateVectorStoreFileOptions, +} from "./vectorStoresModels.js"; + +/** + * Optional request parameters support passing headers, abort signal, etc. + */ +export type OptionalRequestParameters = Pick< + RequestParameters, + "headers" | "timeout" | "abortSignal" | "tracingOptions" +>; + +/** + * Request options for list requests. + */ +export interface ListQueryParameters { + /** + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. + */ + limit?: number; + + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + */ + order?: "asc" | "desc"; + + /** + * A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. + */ + after?: string; + + /** + * A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. + */ + before?: string; +} + +/** + * Options for configuring polling behavior. + */ +export interface PollingOptions { + /** + * The interval, in milliseconds, to wait between polling attempts. If not specified, a default interval of 1000ms will be used. + */ + sleepIntervalInMs?: number; + + /** + * An AbortSignalLike object (as defined by @azure/abort-controller) that can be used to cancel the polling operation. + */ + abortSignal?: AbortSignalLike; +} + +/** + * Optional parameters configuring polling behavior. + */ +export interface PollingOptionsParams { + /** Options for configuring polling behavior. */ + pollingOptions?: PollingOptions; +} + +/** + * Agent run response with support to stream. + */ +export type AgentRunResponse = PromiseLike & { + /** + * Function to start streaming the agent event messages. + * @returns A promise that resolves to an AgentEventMessageStream. + */ + stream: () => Promise; +}; + +/** + * Optional parameters for creating and running a thread, excluding the assistantId. + */ +export type CreateRunOptionalParams = Omit & + OperationOptions; + +/** + * Optional parameters for creating and running a thread, excluding the assistantId. + */ +export type CreateAndRunThreadOptionalParams = Omit & + OperationOptions; + +/** + * Optional parameters for listing run queries. + */ +export interface ListRunQueryOptionalParams extends ListQueryParameters, OperationOptions {} + +/** + * Optional parameters for getting a run. + */ +export interface GetRunOptionalParams extends OperationOptions {} + +/** + * Optional parameters for canceling a run. + */ +export interface CancelRunOptionalParams extends OperationOptions {} + +/** + * Optional parameters for submitting tool outputs to a run. + */ +export interface SubmitToolOutputsToRunOptionalParams extends OperationOptions { + /** + * Whether to stream the tool outputs. + */ + stream?: boolean; +} + +/** + * Optional parameters for updating a run. + */ +export interface UpdateRunOptionalParams extends OperationOptions { + /** Metadata to update in the run. */ + metadata?: Record | null; +} + +/** + * Optional parameters for creating an agent thread. + */ +export interface CreateAgentThreadOptionalParams + extends AgentThreadCreationOptions, + OperationOptions {} + +/** + * Optional parameters for getting an agent thread. + */ +export interface GetAgentThreadOptionalParams extends OperationOptions {} + +/** + * Optional parameters for updating an agent thread. + */ +export interface UpdateAgentThreadOptionalParams + extends UpdateAgentThreadOptions, + OperationOptions {} + +/** + * Optional parameters for deleting an agent thread. + */ +export interface DeleteAgentThreadOptionalParams extends OperationOptions {} + +/** + * Optional parameters for getting an run step. + */ +export interface GetRunStepOptionalParams extends OperationOptions {} + +/** + * Optional parameters for listing run steps. + */ +export interface ListRunStepsOptionalParams extends ListQueryParameters, OperationOptions {} + +/** + * Optional parameters for creating a message. + */ +export interface CreateMessageOptionalParams extends OperationOptions {} + +/** + * Optional parameters for updating a message. + */ +export interface UpdateMessageOptionalParams extends OperationOptions { + /** Metadata to update in the message. */ + metadata?: Record | null; +} + +/** + * Optional parameters for listing messages. + */ +export interface ListMessagesOptionalParams + extends ListMessagesQueryParamProperties, + OperationOptions {} + +/** + * Optional parameters creating vector store. + */ +export interface CreateVectorStoreOptionalParams extends VectorStoreOptions, OperationOptions {} + +/** + * Optional parameters for creating vector store with polling. + */ +export interface CreateVectorStoreWithPollingOptionalParams + extends CreateVectorStoreOptionalParams, + PollingOptionsParams {} + +/** + * Optional parameters for listing vector stores. + */ +export interface ListVectorStoresOptionalParams extends ListQueryParameters, OperationOptions {} + +/** + * Optional parameters for updating a vector store. + */ +export interface UpdateVectorStoreOptionalParams + extends VectorStoreUpdateOptions, + OperationOptions {} + +/** + * Optional parameters for deleting a vector store. + */ +export interface DeleteVectorStoreOptionalParams extends OperationOptions {} + +/** + * Optional parameters for getting a vector store. + */ +export interface GetVectorStoreOptionalParams extends OperationOptions {} + +/** + * Optional parameters for listing vector store files. + */ +export interface ListVectorStoreFilesOptionalParams extends ListQueryParameters, OperationOptions {} + +/** + * Optional parameters for creating a vector store file. + */ +export interface CreateVectorStoreFileOptionalParams + extends CreateVectorStoreFileOptions, + OperationOptions {} + +/** + * Optional parameters for getting a vector store file. + */ +export interface GetVectorStoreFileOptionalParams extends OperationOptions {} + +/** + * Optional parameters for deleting a vector store file. + */ +export interface DeleteVectorStoreFileOptionalParams extends OperationOptions {} + +/** + * Optional parameters for creating a vector store file with polling. + */ +export interface CreateVectorStoreFileWithPollingOptionalParams + extends CreateVectorStoreFileOptions, + PollingOptionsParams, + OperationOptions {} + +/** + * Optional parameters for listing vector store file batches. + */ +export interface ListVectorStoreFileBatchFilesOptionalParams + extends ListQueryParameters, + OperationOptions { + /** Filter by file status. */ + filter?: VectorStoreFileStatusFilter; +} + +/** + * Optional parameters for getting a vector store file batch. + */ +export interface GetVectorStoreFileBatchOptionalParams extends OperationOptions {} + +/** + * Optional parameters for canceling a vector store file batch. + */ +export interface CancelVectorStoreFileBatchOptionalParams extends OperationOptions {} + +/** + * Optional parameters for creating a vector store file batch. + */ +export interface CreateVectorStoreFileBatchOptionalParams + extends CreateVectorStoreFileBatchOptions, + OperationOptions {} + +/** + * Optional parameters for creating a vector store file batch with polling. + */ +export interface CreateVectorStoreFileBatchWithPollingOptionalParams + extends CreateVectorStoreFileBatchOptionalParams, + PollingOptionsParams {} + +/** + * Optional parameters for creating agent. + */ +export interface CreateAgentOptionalParams + extends Omit, + OperationOptions {} + +/** + * Optional parameters for updating agent. + */ +export interface UpdateAgentOptionalParams extends UpdateAgentOptions, OperationOptions {} + +/** + * Optional parameters for deleting agent. + */ +export interface DeleteAgentOptionalParams extends OperationOptions {} + +/** + * Optional parameters for getting agent. + */ +export interface GetAgentOptionalParams extends OperationOptions {} + +/** + * Optional parameters for listing agents. + */ +export interface ListAgentsOptionalParams extends ListQueryParameters, OperationOptions {} + +/** + * Optional parameters for listing files. + */ +export interface ListFilesOptionalParams extends ListFilesQueryParamProperties, OperationOptions {} + +/** + * Optional parameters for deleting a file. + */ +export interface DeleteFileOptionalParams extends OperationOptions {} + +/** + * Optional parameters for getting a file. + */ +export interface GetFileOptionalParams extends OperationOptions {} + +/** + * Optional parameters for getting file content. + */ +export interface GetFileContentOptionalParams extends OperationOptions {} + +/** + * Optional parameters for uploading a file. + */ +export interface UploadFileOptionalParams extends OperationOptions { + /** The name of the file. */ + fileName?: string; +} + +/** + * Optional parameters for uploading a file with polling. + */ +export interface UploadFileWithPollingOptionalParams + extends UploadFileOptionalParams, + PollingOptionsParams {} diff --git a/sdk/ai/ai-projects/src/agents/files.ts b/sdk/ai/ai-projects/src/agents/files.ts new file mode 100644 index 000000000000..d199a43962db --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/files.ts @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client, StreamableMethod } from "@azure-rest/core-client"; +import { operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { + FileDeletionStatusOutput, + FileListResponseOutput, + OpenAIFileOutput, +} from "../customization/outputModels.js"; +import type { FilePurpose as CustomizedFilePurpose } from "../customization/models.js"; +import type { + DeleteFileOptionalParams, + GetFileContentOptionalParams, + GetFileOptionalParams, + ListFilesOptionalParams, + UploadFileWithPollingOptionalParams, +} from "./customModels.js"; +import { AgentsPoller } from "./poller.js"; +import type * as GeneratedParameters from "../generated/src/parameters.js"; +import * as ConvertFromWire from "../customization/convertOutputModelsFromWire.js"; +import * as ConvertParameters from "../customization/convertParametersToWire.js"; +import { randomUUID } from "@azure/core-util"; +import { createOpenAIError } from "./openAIError.js"; +import type { PollerLike, PollOperationState } from "@azure/core-lro"; +const expectedStatuses = ["200"]; + +enum FilePurpose { + FineTune = "fine-tune", + FineTuneResults = "fine-tune-results", + Assistants = "assistants", + AssistantsOutput = "assistants_output", + Batch = "batch", + BatchOutput = "batch_output", + Vision = "vision", +} + +/** Gets a list of previously uploaded files. */ +export async function listFiles( + context: Client, + options: ListFilesOptionalParams = {}, +): Promise { + const listOptions: GeneratedParameters.ListFilesParameters = { + ...operationOptionsToRequestParameters(options), + queryParameters: ConvertParameters.convertListFilesQueryParamProperties(options), + }; + validateListFilesParameters(listOptions); + const result = await context.path("/files").get(options); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertFileListResponseOutput(result.body); +} + +/** Uploads a file for use by other operations. */ +export async function uploadFile( + context: Client, + content: ReadableStream | NodeJS.ReadableStream, + purpose: CustomizedFilePurpose, + options: UploadFileWithPollingOptionalParams = {}, +): Promise { + const uploadFileOptions: GeneratedParameters.UploadFileParameters = { + ...operationOptionsToRequestParameters(options), + body: [ + { name: "file" as const, body: content, filename: options.fileName ?? randomUUID() }, + { name: "purpose" as const, body: purpose }, + ], + contentType: "multipart/form-data", + }; + const result = await context.path("/files").post(uploadFileOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertOpenAIFileOutput(result.body); +} + +export function uploadFileAndPoll( + context: Client, + content: ReadableStream | NodeJS.ReadableStream, + purpose: CustomizedFilePurpose, + options: UploadFileWithPollingOptionalParams = {}, +): PollerLike, OpenAIFileOutput> { + async function updateUploadFileAndPoll( + currentResult?: OpenAIFileOutput, + ): Promise<{ result: OpenAIFileOutput; completed: boolean }> { + let file: OpenAIFileOutput; + if (!currentResult) { + file = await uploadFile(context, content, purpose, options); + } else { + file = await getFile(context, currentResult.id, options); + } + return { + result: file, + completed: + file.status === "uploaded" || file.status === "processed" || file.status === "deleted", + }; + } + return new AgentsPoller({ + update: updateUploadFileAndPoll, + pollingOptions: options.pollingOptions ?? {}, + }); +} + +/** Delete a previously uploaded file. */ +export async function deleteFile( + context: Client, + fileId: string, + options: DeleteFileOptionalParams = {}, +): Promise { + const deleteOptions: GeneratedParameters.ListFilesParameters = { + ...operationOptionsToRequestParameters(options), + }; + validateFileId(fileId); + const result = await context.path("/files/{fileId}", fileId).delete(deleteOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; +} + +/** Returns information about a specific file. Does not retrieve file content. */ +export async function getFile( + context: Client, + fileId: string, + options: GetFileOptionalParams = {}, +): Promise { + validateFileId(fileId); + const getFileOptions: GeneratedParameters.ListFilesParameters = { + ...operationOptionsToRequestParameters(options), + }; + const result = await context.path("/files/{fileId}", fileId).get(getFileOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertOpenAIFileOutput(result.body); +} + +/** Returns file content. */ +export function getFileContent( + context: Client, + fileId: string, + options: GetFileContentOptionalParams = {}, +): StreamableMethod { + validateFileId(fileId); + const getFileContentOptions: GeneratedParameters.ListFilesParameters = { + ...operationOptionsToRequestParameters(options), + }; + return context.path("/files/{fileId}/content", fileId).get(getFileContentOptions); +} + +function validateListFilesParameters(options?: GeneratedParameters.ListFilesParameters): void { + if (options?.queryParameters?.purpose) { + if (!Object.values(FilePurpose).includes(options?.queryParameters?.purpose as FilePurpose)) { + throw new Error( + "Purpose must be one of 'fine-tune', 'fine-tune-results', 'assistants', 'assistants_output', 'batch', 'batch_output', 'vision'", + ); + } + } +} + +function validateFileId(fileId: string): void { + if (!fileId) { + throw new Error("File ID is required"); + } +} diff --git a/sdk/ai/ai-projects/src/agents/index.ts b/sdk/ai/ai-projects/src/agents/index.ts new file mode 100644 index 000000000000..234c03d48238 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/index.ts @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { type Client, type StreamableMethod } from "@azure-rest/core-client"; +import type { + FileDeletionStatusOutput, + FileListResponseOutput, + OpenAIFileOutput, +} from "../customization/outputModels.js"; +import type { + OpenAIPageableListOfThreadRunOutput, + ThreadRunOutput, + AgentThreadOutput, + RunStepOutput, + OpenAIPageableListOfRunStepOutput, + ThreadMessageOutput, + ThreadDeletionStatusOutput, + OpenAIPageableListOfThreadMessageOutput, + OpenAIPageableListOfVectorStoreOutput, + VectorStoreOutput, + VectorStoreFileOutput, + VectorStoreDeletionStatusOutput, + VectorStoreFileDeletionStatusOutput, + VectorStoreFileBatchOutput, + OpenAIPageableListOfVectorStoreFileOutput, + AgentDeletionStatusOutput, + AgentOutput, + OpenAIPageableListOfAgentOutput, +} from "../customization/outputModels.js"; +import { createAgent, deleteAgent, getAgent, listAgents, updateAgent } from "./assistants.js"; +import { + deleteFile, + getFile, + getFileContent, + listFiles, + uploadFile, + uploadFileAndPoll, +} from "./files.js"; +import { createThread, deleteThread, getThread, updateThread } from "./threads.js"; +import { + cancelRun, + createRun, + createThreadAndRun, + getRun, + listRuns, + submitToolOutputsToRun, + updateRun, +} from "./runs.js"; +import { createMessage, listMessages, updateMessage } from "./messages.js"; +import type { FilePurpose } from "../customization/models.js"; +import { + createVectorStore, + createVectorStoreAndPoll, + deleteVectorStore, + getVectorStore, + listVectorStores, + modifyVectorStore, +} from "./vectorStores.js"; +import { getRunStep, listRunSteps } from "./runSteps.js"; +import { + createVectorStoreFile, + createVectorStoreFileAndPoll, + deleteVectorStoreFile, + getVectorStoreFile, + listVectorStoreFiles, +} from "./vectorStoresFiles.js"; +import { + cancelVectorStoreFileBatch, + createVectorStoreFileBatch, + createVectorStoreFileBatchAndPoll, + getVectorStoreFileBatch, + listVectorStoreFileBatchFiles, +} from "./vectorStoresFileBatches.js"; +import type { + AgentRunResponse, + CreateRunOptionalParams, + GetRunOptionalParams, + CancelRunOptionalParams, + SubmitToolOutputsToRunOptionalParams, + UpdateRunOptionalParams, + ListRunQueryOptionalParams, + CreateAndRunThreadOptionalParams, + CreateAgentThreadOptionalParams, + GetAgentThreadOptionalParams, + UpdateAgentThreadOptionalParams, + DeleteAgentThreadOptionalParams, + GetRunStepOptionalParams, + ListRunStepsOptionalParams, + CreateMessageOptionalParams, + ListMessagesOptionalParams, + UpdateMessageOptionalParams, + GetVectorStoreOptionalParams, + ListVectorStoresOptionalParams, + UpdateVectorStoreOptionalParams, + DeleteVectorStoreOptionalParams, + CreateVectorStoreOptionalParams, + CreateVectorStoreWithPollingOptionalParams, + CreateVectorStoreFileOptionalParams, + ListVectorStoreFilesOptionalParams, + GetVectorStoreFileOptionalParams, + DeleteVectorStoreFileOptionalParams, + CreateVectorStoreFileWithPollingOptionalParams, + CreateVectorStoreFileBatchOptionalParams, + GetVectorStoreFileBatchOptionalParams, + ListVectorStoreFileBatchFilesOptionalParams, + CreateVectorStoreFileBatchWithPollingOptionalParams, + CreateAgentOptionalParams, + ListAgentsOptionalParams, + GetAgentOptionalParams, + UpdateAgentOptionalParams, + DeleteFileOptionalParams, + GetFileOptionalParams, + GetFileContentOptionalParams, + ListFilesOptionalParams, + UploadFileOptionalParams, + UploadFileWithPollingOptionalParams, + CancelVectorStoreFileBatchOptionalParams, + DeleteAgentOptionalParams, +} from "./customModels.js"; +import type { ThreadMessageOptions, ToolOutput } from "../customization/models.js"; +import type { PollerLike, PollOperationState } from "@azure/core-lro"; + +/** + * Agents Interface Contains operations for creating, listing, updating, and deleting agents, threads, runs, messages, and files. + */ +export interface AgentsOperations { + /** Creates a new agent. */ + createAgent: (model: string, options?: CreateAgentOptionalParams) => Promise; + + /** Gets a list of agents that were previously created. */ + listAgents: (options?: ListAgentsOptionalParams) => Promise; + /** Retrieves an existing agent. */ + getAgent: (assistantId: string, options?: GetAgentOptionalParams) => Promise; + /** Modifies an existing agent. */ + updateAgent: (assistantId: string, options: UpdateAgentOptionalParams) => Promise; + /** Deletes an agent. */ + deleteAgent: ( + assistantId: string, + options?: DeleteAgentOptionalParams, + ) => Promise; + + /** Creates a new thread. Threads contain messages and can be run by agents. */ + createThread: (options?: CreateAgentThreadOptionalParams) => Promise; + /** Gets information about an existing thread. */ + getThread: ( + threadId: string, + options?: GetAgentThreadOptionalParams, + ) => Promise; + /** Modifies an existing thread. */ + updateThread: ( + threadId: string, + options?: UpdateAgentThreadOptionalParams, + ) => Promise; + /** Deletes an existing thread. */ + deleteThread: ( + threadId: string, + options?: DeleteAgentThreadOptionalParams, + ) => Promise; + + /** Creates and starts a new run of the specified thread using the specified agent. */ + createRun: ( + threadId: string, + assistantId: string, + options?: CreateRunOptionalParams, + ) => AgentRunResponse; + + /** Gets a list of runs for a specified thread. */ + listRuns: ( + threadId: string, + options?: ListRunQueryOptionalParams, + ) => Promise; + /** Gets an existing run from an existing thread. */ + getRun: ( + threadId: string, + runId: string, + options?: GetRunOptionalParams, + ) => Promise; + /** Modifies an existing thread run. */ + updateRun: ( + threadId: string, + runId: string, + options?: UpdateRunOptionalParams, + ) => Promise; + /** Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. */ + submitToolOutputsToRun: ( + threadId: string, + runId: string, + toolOutputs: Array, + options?: SubmitToolOutputsToRunOptionalParams, + ) => AgentRunResponse; + + /** Cancels a run of an in progress thread. */ + cancelRun: ( + threadId: string, + runId: string, + options?: CancelRunOptionalParams, + ) => Promise; + /** Creates a new thread and immediately starts a run of that thread. */ + createThreadAndRun: ( + assistantId: string, + options?: CreateAndRunThreadOptionalParams, + ) => AgentRunResponse; + + /** Creates a new message on a specified thread. */ + createMessage: ( + threadId: string, + messageOptions: ThreadMessageOptions, + options?: CreateMessageOptionalParams, + ) => Promise; + /** Gets a list of messages that exist on a thread. */ + listMessages: ( + threadId: string, + options?: ListMessagesOptionalParams, + ) => Promise; + /** Modifies an existing message on an existing thread. */ + updateMessage: ( + threadId: string, + messageId: string, + options?: UpdateMessageOptionalParams, + ) => Promise; + + /** Gets a list of previously uploaded files. */ + listFiles: (options?: ListFilesOptionalParams) => Promise; + /** Uploads a file for use by other operations. */ + uploadFile: ( + data: ReadableStream | NodeJS.ReadableStream, + purpose: FilePurpose, + options?: UploadFileOptionalParams, + ) => Promise; + + /** Uploads a file for use by other operations. */ + uploadFileAndPoll: ( + data: ReadableStream | NodeJS.ReadableStream, + purpose: FilePurpose, + options?: UploadFileWithPollingOptionalParams, + ) => PollerLike, OpenAIFileOutput>; + /** Delete a previously uploaded file. */ + deleteFile: ( + fileId: string, + options?: DeleteFileOptionalParams, + ) => Promise; + /** Returns information about a specific file. Does not retrieve file content. */ + getFile: (fileId: string, options?: GetFileOptionalParams) => Promise; + /** Returns the content of a specific file. */ + getFileContent: ( + fileId: string, + options?: GetFileContentOptionalParams, + ) => StreamableMethod; + + /** Returns a list of vector stores. */ + listVectorStores: ( + options?: DeleteVectorStoreOptionalParams, + ) => Promise; + /** Creates a vector store. */ + createVectorStore: (options?: CreateVectorStoreOptionalParams) => Promise; + /** Returns the vector store object object matching the specific ID. */ + getVectorStore: ( + vectorStoreId: string, + options?: DeleteVectorStoreOptionalParams, + ) => Promise; + /** The ID of the vector store to modify. */ + modifyVectorStore: ( + vectorStoreId: string, + options?: UpdateVectorStoreOptionalParams, + ) => Promise; + /** Deletes the vector store object matching the specified ID. */ + deleteVectorStore: ( + vectorStoreId: string, + options?: DeleteVectorStoreOptionalParams, + ) => Promise; + + /** Create vector store and poll. */ + createVectorStoreAndPoll: ( + options?: CreateVectorStoreWithPollingOptionalParams, + ) => PollerLike, VectorStoreOutput>; + + /** Create a vector store file by attching a file to a vector store. */ + createVectorStoreFile: ( + vectorStoreId: string, + options?: CreateVectorStoreFileOptionalParams, + ) => Promise; + /** Retrieves a vector store file. */ + getVectorStoreFile: ( + vectorStoreId: string, + fileId: string, + options?: GetVectorStoreFileOptionalParams, + ) => Promise; + /** Returns a list of vector store files. */ + listVectorStoreFiles: ( + vectorStoreId: string, + options?: ListVectorStoreFilesOptionalParams, + ) => Promise; + /** + * Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. + * To delete the file, use the delete file endpoint. + */ + deleteVectorStoreFile: ( + vectorStoreId: string, + fileId: string, + options?: DeleteVectorStoreFileOptionalParams, + ) => Promise; + /** Create a vector store file by attaching a file to a vector store and poll. */ + createVectorStoreFileAndPoll: ( + vectorStoreId: string, + options?: CreateVectorStoreFileWithPollingOptionalParams, + ) => PollerLike, VectorStoreFileOutput>; + + /** Create a vector store file batch. */ + createVectorStoreFileBatch: ( + vectorStoreId: string, + options?: CreateVectorStoreFileBatchOptionalParams, + ) => Promise; + /** Retrieve a vector store file batch. */ + getVectorStoreFileBatch: ( + vectorStoreId: string, + batchId: string, + options?: GetVectorStoreFileBatchOptionalParams, + ) => Promise; + /** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */ + cancelVectorStoreFileBatch: ( + vectorStoreId: string, + batchId: string, + options?: CancelVectorStoreFileBatchOptionalParams, + ) => Promise; + /** Returns a list of vector store files in a batch. */ + listVectorStoreFileBatchFiles: ( + vectorStoreId: string, + batchId: string, + options?: ListVectorStoreFileBatchFilesOptionalParams, + ) => Promise; + /** Create a vector store file batch and poll. */ + createVectorStoreFileBatchAndPoll: ( + vectorStoreId: string, + options?: CreateVectorStoreFileBatchWithPollingOptionalParams, + ) => PollerLike, VectorStoreFileBatchOutput>; + + /** Gets a single run step from a thread run. */ + getRunStep: ( + threadId: string, + runId: string, + stepId: string, + options?: GetRunStepOptionalParams, + ) => Promise; + /** Gets a list of run steps from a thread run. */ + listRunSteps: ( + threadId: string, + runId: string, + options?: ListRunQueryOptionalParams, + ) => Promise; +} + +function getAgents(context: Client): AgentsOperations { + return { + createAgent: (model: string, options?: CreateAgentOptionalParams) => + createAgent(context, model, options), + listAgents: (options?: ListAgentsOptionalParams) => listAgents(context, options), + getAgent: (assistantId: string, options?: GetAgentOptionalParams) => + getAgent(context, assistantId, options), + updateAgent: (assistantId: string, options: UpdateAgentOptionalParams) => + updateAgent(context, assistantId, options), + deleteAgent: (assistantId: string, options?: DeleteAgentOptionalParams) => + deleteAgent(context, assistantId, options), + + createThread: (options?: CreateAgentThreadOptionalParams) => createThread(context, options), + getThread: (threadId: string, options?: GetAgentThreadOptionalParams) => + getThread(context, threadId, options), + updateThread: (threadId: string, options?: UpdateAgentThreadOptionalParams) => + updateThread(context, threadId, options), + deleteThread: (threadId: string, options?: DeleteAgentThreadOptionalParams) => + deleteThread(context, threadId, options), + + createRun: (threadId: string, assistantId: string, options?: CreateRunOptionalParams) => + createRun(context, threadId, assistantId, options ?? {}), + listRuns: (threadId: string, options?: ListRunQueryOptionalParams) => + listRuns(context, threadId, options ?? {}), + getRun: (threadId: string, runId: string, options?: GetRunOptionalParams) => + getRun(context, threadId, runId, options), + updateRun: (threadId: string, runId: string, options?: UpdateRunOptionalParams) => + updateRun(context, threadId, runId, options), + submitToolOutputsToRun: ( + threadId: string, + runId: string, + toolOutputs: Array, + options?: SubmitToolOutputsToRunOptionalParams, + ) => submitToolOutputsToRun(context, threadId, runId, toolOutputs, options), + cancelRun: (threadId: string, runId: string, options?: CancelRunOptionalParams) => + cancelRun(context, threadId, runId, options), + createThreadAndRun: (assistantId: string, options?: CreateAndRunThreadOptionalParams) => + createThreadAndRun(context, assistantId, options ?? {}), + + createMessage: ( + threadId: string, + messageOptions: ThreadMessageOptions, + options?: CreateMessageOptionalParams, + ) => createMessage(context, threadId, messageOptions, options), + listMessages: (threadId: string, options?: ListMessagesOptionalParams) => + listMessages(context, threadId, options), + updateMessage: (threadId: string, messageId: string, options?: UpdateMessageOptionalParams) => + updateMessage(context, threadId, messageId, options), + + listFiles: (options?: ListFilesOptionalParams) => listFiles(context, options), + uploadFile: ( + content: ReadableStream | NodeJS.ReadableStream, + purpose: FilePurpose, + options?: UploadFileOptionalParams, + ) => uploadFile(context, content, purpose, options), + uploadFileAndPoll: ( + content: ReadableStream | NodeJS.ReadableStream, + purpose: FilePurpose, + options?: UploadFileWithPollingOptionalParams, + ) => uploadFileAndPoll(context, content, purpose, options), + deleteFile: (fileId: string, options?: DeleteFileOptionalParams) => + deleteFile(context, fileId, options), + getFile: (fileId: string, options?: GetFileOptionalParams) => getFile(context, fileId, options), + getFileContent: (fileId: string, options?: GetFileContentOptionalParams) => + getFileContent(context, fileId, options), + + listVectorStores: (options?: ListVectorStoresOptionalParams) => + listVectorStores(context, options), + createVectorStore: (options?: CreateVectorStoreOptionalParams) => + createVectorStore(context, options), + getVectorStore: (vectorStoreId: string, options?: GetVectorStoreOptionalParams) => + getVectorStore(context, vectorStoreId, options), + modifyVectorStore: (vectorStoreId: string, options?: UpdateVectorStoreOptionalParams) => + modifyVectorStore(context, vectorStoreId, options), + deleteVectorStore: (vectorStoreId: string, options?: DeleteVectorStoreOptionalParams) => + deleteVectorStore(context, vectorStoreId, options), + createVectorStoreAndPoll: (options?: CreateVectorStoreWithPollingOptionalParams) => + createVectorStoreAndPoll(context, options), + + createVectorStoreFile: (vectorStoreId: string, options?: CreateVectorStoreFileOptionalParams) => + createVectorStoreFile(context, vectorStoreId, options), + getVectorStoreFile: ( + vectorStoreId: string, + fileId: string, + options?: GetVectorStoreFileOptionalParams, + ) => getVectorStoreFile(context, vectorStoreId, fileId, options), + listVectorStoreFiles: (vectorStoreId: string, options?: ListVectorStoreFilesOptionalParams) => + listVectorStoreFiles(context, vectorStoreId, options), + deleteVectorStoreFile: ( + vectorStoreId: string, + fileId: string, + options?: DeleteVectorStoreFileOptionalParams, + ) => deleteVectorStoreFile(context, vectorStoreId, fileId, options), + createVectorStoreFileAndPoll: ( + vectorStoreId: string, + options?: CreateVectorStoreFileWithPollingOptionalParams, + ) => createVectorStoreFileAndPoll(context, vectorStoreId, options), + + createVectorStoreFileBatch: ( + vectorStoreId: string, + options?: CreateVectorStoreFileBatchOptionalParams, + ) => createVectorStoreFileBatch(context, vectorStoreId, options), + getVectorStoreFileBatch: ( + vectorStoreId: string, + batchId: string, + options?: GetVectorStoreFileBatchOptionalParams, + ) => getVectorStoreFileBatch(context, vectorStoreId, batchId, options), + cancelVectorStoreFileBatch: ( + vectorStoreId: string, + batchId: string, + options?: CancelVectorStoreFileBatchOptionalParams, + ) => cancelVectorStoreFileBatch(context, vectorStoreId, batchId, options), + listVectorStoreFileBatchFiles: ( + vectorStoreId: string, + batchId: string, + options?: ListVectorStoreFileBatchFilesOptionalParams, + ) => listVectorStoreFileBatchFiles(context, vectorStoreId, batchId, options), + createVectorStoreFileBatchAndPoll: ( + vectorStoreId: string, + options?: CreateVectorStoreFileBatchWithPollingOptionalParams, + ) => createVectorStoreFileBatchAndPoll(context, vectorStoreId, options), + + getRunStep: ( + threadId: string, + runId: string, + stepId: string, + options?: GetRunStepOptionalParams, + ) => getRunStep(context, threadId, runId, stepId, options), + listRunSteps: (threadId: string, runId: string, options?: ListRunStepsOptionalParams) => + listRunSteps(context, threadId, runId, options), + }; +} + +export function getAgentsOperations(context: Client): AgentsOperations { + return { + ...getAgents(context), + }; +} diff --git a/sdk/ai/ai-projects/src/agents/inputOutputs.ts b/sdk/ai/ai-projects/src/agents/inputOutputs.ts new file mode 100644 index 000000000000..64a947f76592 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/inputOutputs.ts @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export * from "../customization/streamingModels.js"; +export * from "./streamingModels.js"; +export * from "./vectorStoresModels.js"; +export * from "./utils.js"; +export * from "../customization/streamingModels.js"; +export type { + OpenAIPageableListOfThreadRunOutput, + ThreadRunOutput, + AgentThreadOutput, + RunStepOutput, + OpenAIPageableListOfRunStepOutput, + ThreadMessageOutput, + ThreadDeletionStatusOutput, + OpenAIPageableListOfThreadMessageOutput, + OpenAIPageableListOfVectorStoreOutput, + VectorStoreOutput, + VectorStoreFileOutput, + VectorStoreDeletionStatusOutput, + VectorStoreFileDeletionStatusOutput, + VectorStoreFileBatchOutput, + OpenAIPageableListOfVectorStoreFileOutput, + AgentDeletionStatusOutput, + AgentOutput, + OpenAIPageableListOfAgentOutput, + FileDeletionStatusOutput, + FileListResponseOutput, + OpenAIFileOutput, + RequiredActionOutput, + RequiredToolCallOutput, + ToolDefinitionOutputParent, + AgentsApiResponseFormatOptionOutput, + ToolDefinitionOutput, + ToolResourcesOutput, + AgentsApiResponseFormatModeOutput, + AgentsApiResponseFormatOutput, + ApiResponseFormatOutput, + FilePurposeOutput, + FileStateOutput, + RequiredActionOutputParent, + SubmitToolOutputsActionOutput, + RequiredToolCallOutputParent, + RequiredFunctionToolCallOutput, + RunStepErrorOutput, + RunStepStatusOutput, + RunStepDetailsOutput, + RunStepTypeOutput, + RunStepCompletionUsageOutput, + MessageAttachmentOutput, + MessageContentOutput, + MessageIncompleteDetailsOutput, + MessageRoleOutput, + MessageStatusOutput, + IncompleteRunDetailsOutput, + RunErrorOutput, + RunStatusOutput, + AgentsApiToolChoiceOptionOutput, + UpdateToolResourcesOptionsOutput, + TruncationObjectOutput, + RunCompletionUsageOutput, + CodeInterpreterToolDefinitionOutput, + FileSearchToolDefinitionOutput, + FunctionToolDefinitionOutput, + BingGroundingToolDefinitionOutput, + AzureAISearchToolDefinitionOutput, + AzureAISearchResourceOutput, + CodeInterpreterToolResourceOutput, + FileSearchToolResourceOutput, + VectorStoreFileCountOutput, + VectorStoreFileBatchStatusOutput, + VectorStoreChunkingStrategyResponseOutput, + VectorStoreConfigurationOutput, + AgentsNamedToolChoiceOutput, + IndexResourceOutput, + ToolConnectionListOutput, + VectorStoreDataSourceOutput, + FileSearchToolDefinitionDetailsOutput, + VectorStoreConfigurationsOutput, + FunctionDefinitionOutput, + MessageAttachmentToolDefinitionOutput, + MessageContentOutputParent, + MessageTextContentOutput, + MessageImageFileContentOutput, + RequiredFunctionToolCallDetailsOutput, + RunStepDetailsOutputParent, + RunStepMessageCreationDetailsOutput, + RunStepToolCallDetailsOutput, + RunStepErrorCodeOutput, + SubmitToolOutputsDetailsOutput, + MicrosoftFabricToolDefinitionOutput, + SharepointToolDefinitionOutput, + UpdateCodeInterpreterToolResourceOptionsOutput, + UpdateFileSearchToolResourceOptionsOutput, + VectorStoreChunkingStrategyResponseOutputParent, + VectorStoreAutoChunkingStrategyResponseOutput, + VectorStoreStaticChunkingStrategyResponseOutput, + VectorStoreFileErrorOutput, + VectorStoreFileStatusOutput, + VectorStoreExpirationPolicyOutput, + VectorStoreStatusOutput, + AgentsApiToolChoiceOptionModeOutput, + FunctionNameOutput, + AgentsNamedToolChoiceTypeOutput, + MessageImageFileDetailsOutput, + MessageIncompleteDetailsReasonOutput, + MessageTextDetailsOutput, + RunStepMessageCreationReferenceOutput, + RunStepToolCallOutput, + ToolConnectionOutput, + TruncationStrategyOutput, + VectorStoreChunkingStrategyResponseTypeOutput, + VectorStoreDataSourceAssetTypeOutput, + VectorStoreExpirationPolicyAnchorOutput, + VectorStoreFileErrorCodeOutput, + VectorStoreStaticChunkingStrategyOptionsOutput, + FileSearchRankingOptionsOutput, + MessageTextAnnotationOutput, + RunStepToolCallOutputParent, + RunStepCodeInterpreterToolCallOutput, + RunStepFileSearchToolCallOutput, + RunStepBingGroundingToolCallOutput, + RunStepAzureAISearchToolCallOutput, + RunStepSharepointToolCallOutput, + RunStepMicrosoftFabricToolCallOutput, + RunStepFunctionToolCallOutput, + MessageTextAnnotationOutputParent, + MessageTextFileCitationAnnotationOutput, + MessageTextFilePathAnnotationOutput, + RunStepCodeInterpreterToolCallOutputOutputParent, + RunStepCodeInterpreterToolCallDetailsOutput, + RunStepFunctionToolCallDetailsOutput, + MessageTextFileCitationDetailsOutput, + MessageTextFilePathDetailsOutput, + RunStepCodeInterpreterToolCallOutputOutput, + RunStepCodeInterpreterLogOutputOutput, + RunStepCodeInterpreterImageOutputOutput, + RunStepCodeInterpreterImageReferenceOutput, +} from "../customization/outputModels.js"; +export { + ListMessagesQueryParamProperties, + ListFilesQueryParamProperties, +} from "../customization/parameters.js"; +export type { + AgentRunResponse, + CreateRunOptionalParams, + GetRunOptionalParams, + CancelRunOptionalParams, + SubmitToolOutputsToRunOptionalParams, + UpdateRunOptionalParams, + ListRunQueryOptionalParams, + CreateAndRunThreadOptionalParams, + CreateAgentThreadOptionalParams, + GetAgentThreadOptionalParams, + UpdateAgentThreadOptionalParams, + DeleteAgentThreadOptionalParams, + GetRunStepOptionalParams, + ListRunStepsOptionalParams, + CreateMessageOptionalParams, + ListMessagesOptionalParams, + UpdateMessageOptionalParams, + GetVectorStoreOptionalParams, + ListVectorStoresOptionalParams, + UpdateVectorStoreOptionalParams, + DeleteVectorStoreOptionalParams, + CreateVectorStoreOptionalParams, + CreateVectorStoreWithPollingOptionalParams, + CreateVectorStoreFileOptionalParams, + ListVectorStoreFilesOptionalParams, + GetVectorStoreFileOptionalParams, + DeleteVectorStoreFileOptionalParams, + CreateVectorStoreFileWithPollingOptionalParams, + CreateVectorStoreFileBatchOptionalParams, + GetVectorStoreFileBatchOptionalParams, + ListVectorStoreFileBatchFilesOptionalParams, + CreateVectorStoreFileBatchWithPollingOptionalParams, + CreateAgentOptionalParams, + ListAgentsOptionalParams, + GetAgentOptionalParams, + UpdateAgentOptionalParams, + DeleteFileOptionalParams, + GetFileOptionalParams, + GetFileContentOptionalParams, + ListFilesOptionalParams, + UploadFileOptionalParams, + UploadFileWithPollingOptionalParams, + ListQueryParameters, + PollingOptions, + PollingOptionsParams, + CancelVectorStoreFileBatchOptionalParams, + DeleteAgentOptionalParams, +} from "./customModels.js"; + +export { + AzureAISearchToolDefinition, + CodeInterpreterToolDefinition, + FileSearchToolDefinition, + FileSearchToolDefinitionDetails, + FunctionDefinition, + FunctionToolDefinition, + ToolResources, + VectorStoreConfigurations, + VectorStoreDataSource, + ToolDefinition, + ThreadMessageOptions, + ToolOutput, + FilePurpose, + ToolDefinitionParent, + AgentThreadCreationOptions, + CreateAgentOptions, + CreateAndRunThreadOptions, + CreateRunOptions, + UpdateAgentOptions, + UpdateAgentThreadOptions, + VectorStoreFileStatusFilter, + VectorStoreOptions, + VectorStoreUpdateOptions, + AgentsApiResponseFormatMode, + AgentsApiToolChoiceOption, + TruncationObject, + UpdateToolResourcesOptions, + ThreadMessage, + VectorStoreChunkingStrategyRequest, + FileSearchRankingOptions, + AgentsApiToolChoiceOptionMode, + AgentsNamedToolChoice, + AgentsApiResponseFormatOption, + ConnectionType, + ListSortOrder, + MessageAttachment, + MessageContent, + MessageIncompleteDetails, + MessageStatus, + BingGroundingToolDefinition, + MicrosoftFabricToolDefinition, + SharepointToolDefinition, + AzureAISearchResource, + CodeInterpreterToolResource, + FileSearchToolResource, + TruncationStrategy, + UpdateCodeInterpreterToolResourceOptions, + UpdateFileSearchToolResourceOptions, + VectorStoreChunkingStrategyRequestParent, + VectorStoreAutoChunkingStrategyRequest, + VectorStoreStaticChunkingStrategyRequest, + VectorStoreConfiguration, + VectorStoreDataSourceAssetType, + AgentsApiResponseFormat, + ApiResponseFormat, + FunctionName, + AgentsNamedToolChoiceType, + IndexResource, + ToolConnectionList, + MessageAttachmentToolDefinition, + MessageContentParent, + MessageTextContent, + MessageImageFileContent, + MessageRole, + VectorStoreChunkingStrategyRequestType, + VectorStoreExpirationPolicy, + VectorStoreStaticChunkingStrategyOptions, + MessageImageFileDetails, + MessageIncompleteDetailsReason, + MessageTextDetails, + ToolConnection, + VectorStoreExpirationPolicyAnchor, + MessageTextAnnotation, + MessageTextAnnotationParent, + MessageTextFileCitationAnnotation, + MessageTextFilePathAnnotation, + MessageTextFileCitationDetails, + MessageTextFilePathDetails, +} from "../customization/models.js"; diff --git a/sdk/ai/ai-projects/src/agents/inputValidations.ts b/sdk/ai/ai-projects/src/agents/inputValidations.ts new file mode 100644 index 000000000000..bc63f015baef --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/inputValidations.ts @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + ToolDefinition, + UpdateToolResourcesOptions, + VectorStoreDataSource, +} from "../generated/src/models.js"; + +export function validateVectorStoreDataType(data_sources: VectorStoreDataSource[]): void { + if (!data_sources.some((value) => !["uri_asset", "id_asset"].includes(value.type))) { + throw new Error("Vector store data type must be one of 'uri_asset', 'id_asset'"); + } +} + +export function validateThreadId(threadId: string): void { + if (!threadId) { + throw new Error("Thread ID is required"); + } +} + +export function validateRunId(runId: string): void { + if (!runId) { + throw new Error("Run ID is required"); + } +} + +export function validateLimit(limit: number): void { + if (limit < 1 || limit > 100) { + throw new Error("Limit must be between 1 and 100"); + } +} + +export function validateOrder(order: string): void { + if (!["asc", "desc"].includes(order)) { + throw new Error("Order must be 'asc' or 'desc'"); + } +} + +enum Tools { + CodeInterpreter = "code_interpreter", + FileSearch = "file_search", + Function = "function", + BingGrounding = "bing_grounding", + MicrosoftFabric = "microsoft_fabric", + SharepointGrounding = "sharepoint_grounding", + AzureAISearch = "azure_ai_search", +} + +export function validateTools(value: Array): void { + if (value.some((tool) => !Object.values(Tools).includes(tool as unknown as Tools))) { + throw new Error( + "Tool type must be one of 'code_interpreter', 'file_search', 'function', 'bing_grounding', 'microsoft_fabric', 'sharepoint_grounding', 'azure_ai_search'", + ); + } +} + +export function validateMetadata(metadata: Record): void { + if (Object.keys(metadata).length > 16) { + throw new Error("Only 16 key/value pairs are allowed"); + } + if (Object.keys(metadata).some((value) => value.length > 64)) { + throw new Error("Keys must be less than 64 characters"); + } + if (Object.values(metadata).some((value) => value.length > 512)) { + throw new Error("Values must be less than 512 characters"); + } +} + +export function validateToolResources(toolResource: UpdateToolResourcesOptions): void { + if (toolResource.code_interpreter) { + if ( + toolResource.code_interpreter.file_ids && + toolResource.code_interpreter.file_ids.length > 20 + ) { + throw new Error("A maximum of 20 file IDs are allowed"); + } + } + if (toolResource.file_search) { + if ( + toolResource.file_search.vector_store_ids && + toolResource.file_search.vector_store_ids.length > 1 + ) { + throw new Error("Only one vector store ID is allowed"); + } + } + if (toolResource.azure_ai_search) { + if (toolResource.azure_ai_search.indexes && toolResource.azure_ai_search.indexes.length > 1) { + throw new Error("Only one index is allowed"); + } + } +} + +export function validateVectorStoreId(vectorStoreId: string): void { + if (!vectorStoreId) { + throw new Error("Vector store ID is required"); + } +} + +export function validateFileId(fileId: string): void { + if (!fileId) { + throw new Error("File ID is required"); + } +} + +enum FileBatchStatus { + InProgress = "in_progress", + Completed = "completed", + Failed = "failed", + Cancelled = "cancelled", +} + +export function validateFileStatusFilter(filter: string): void { + if (!Object.values(FileBatchStatus).includes(filter as FileBatchStatus)) { + throw new Error( + "File status filter must be one of 'in_progress', 'completed', 'failed', 'cancelled'", + ); + } +} + +enum Messages { + User = "user", + Assistants = "assistant", +} + +export function validateMessages(value: string): void { + if (!Object.values(Messages).includes(value as Messages)) { + throw new Error("Role must be either 'user' or 'assistant'"); + } +} + +enum TruncationStrategy { + Auto = "auto", + LastMessages = "last_messages", +} + +export function validateTruncationStrategy(value: string): void { + if (!Object.values(TruncationStrategy).includes(value as TruncationStrategy)) { + throw new Error("Role must be either 'auto' or 'last_messages'"); + } +} diff --git a/sdk/ai/ai-projects/src/agents/messages.ts b/sdk/ai/ai-projects/src/agents/messages.ts new file mode 100644 index 000000000000..3d9e47cb0eef --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/messages.ts @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import { operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { + OpenAIPageableListOfThreadMessageOutput, + ThreadMessageOutput, +} from "../customization/outputModels.js"; +import type { + CreateMessageParameters, + ListMessagesParameters, +} from "../generated/src/parameters.js"; +import { validateMetadata, validateVectorStoreDataType } from "./inputValidations.js"; +import { TracingUtility } from "../tracing.js"; +import { + traceEndCreateMessage, + traceEndListMessages, + traceStartCreateMessage, + traceStartListMessages, +} from "./messagesTrace.js"; +import { traceStartAgentGeneric } from "./traceUtility.js"; +import type { ThreadMessageOptions } from "../customization/models.js"; +import type { + CreateMessageOptionalParams, + ListMessagesOptionalParams, + UpdateMessageOptionalParams, +} from "./customModels.js"; +import type * as GeneratedParameters from "../generated/src/parameters.js"; +import * as ConvertFromWire from "../customization/convertOutputModelsFromWire.js"; +import { createOpenAIError } from "./openAIError.js"; + +const expectedStatuses = ["200"]; + +/** Creates a new message on a specified thread. */ +export async function createMessage( + context: Client, + threadId: string, + messageOptions: ThreadMessageOptions, + options: CreateMessageOptionalParams = {}, +): Promise { + const createOptions: GeneratedParameters.CreateMessageParameters = { + ...operationOptionsToRequestParameters(options), + body: { + ...messageOptions, + }, + }; + + validateThreadId(threadId); + validateCreateMessageParameters(createOptions); + const response = await TracingUtility.withSpan( + "CreateMessage", + createOptions, + async (updateOptions) => { + const result = await context + .path("/threads/{threadId}/messages", threadId) + .post(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => traceStartCreateMessage(span, threadId, updatedOptions), + traceEndCreateMessage, + ); + return ConvertFromWire.convertThreadMessageOutput(response); +} + +/** Gets a list of messages that exist on a thread. */ +export async function listMessages( + context: Client, + threadId: string, + options: ListMessagesOptionalParams = {}, +): Promise { + const listOptions: GeneratedParameters.ListMessagesParameters = { + ...operationOptionsToRequestParameters(options), + queryParameters: { + ...(options.runId && { run_id: options.runId }), + ...(options.limit && { run_id: options.limit }), + ...(options.order && { run_id: options.order }), + ...(options.after && { run_id: options.after }), + ...(options.before && { run_id: options.before }), + }, + }; + + validateThreadId(threadId); + validateListMessagesParameters(listOptions); + const output = await TracingUtility.withSpan( + "ListMessages", + listOptions, + async (updateOptions) => { + const result = await context + .path("/threads/{threadId}/messages", threadId) + .get(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => traceStartListMessages(span, threadId, updatedOptions), + traceEndListMessages, + ); + + return ConvertFromWire.convertOpenAIPageableListOfThreadMessageOutput(output); +} + +/** Modifies an existing message on an existing thread. */ +export async function updateMessage( + context: Client, + threadId: string, + messageId: string, + options: UpdateMessageOptionalParams = {}, +): Promise { + const updateMessageOptions: GeneratedParameters.UpdateMessageParameters = { + ...operationOptionsToRequestParameters(options), + body: { + ...(options.metadata ? { metadata: options.metadata } : {}), + }, + }; + validateThreadId(threadId); + validateMessageId(messageId); + const response = await TracingUtility.withSpan( + "UpdateMessage", + updateMessageOptions, + async (updateOptions) => { + const result = await context + .path("/threads/{threadId}/messages/{messageId}", threadId, messageId) + .post(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => + traceStartAgentGeneric(span, { + ...updatedOptions, + tracingAttributeOptions: { threadId: threadId, messageId: messageId }, + }), + ); + + return ConvertFromWire.convertThreadMessageOutput(response); +} + +function validateThreadId(threadId: string): void { + if (!threadId) { + throw new Error("Thread ID is required"); + } +} + +function validateMessageId(messageId: string): void { + if (!messageId) { + throw new Error("Message ID is required"); + } +} + +function validateCreateMessageParameters(options: CreateMessageParameters): void { + if (options.body.role && !["user", "assistant"].includes(options.body.role)) { + throw new Error("Role must be either 'user' or 'assistant'"); + } + if (options.body.metadata) { + validateMetadata(options.body.metadata); + } + if (options.body.attachments) { + if ( + options.body.attachments.some((value) => { + value.tools.some((tool) => !["code_interpreter", "file_search"].includes(tool.type)); + }) + ) { + throw new Error("Tool type must be either 'code_interpreter' or 'file_search'"); + } + if (options.body.attachments) { + options.body.attachments.forEach((value) => { + if (value.data_sources) { + validateVectorStoreDataType(value.data_sources); + } + }); + } + } +} + +function validateListMessagesParameters(options?: ListMessagesParameters): void { + if ( + options?.queryParameters?.limit && + (options.queryParameters.limit < 1 || options.queryParameters.limit > 100) + ) { + throw new Error("Limit must be between 1 and 100"); + } + if (options?.queryParameters?.order && !["asc", "desc"].includes(options.queryParameters.order)) { + throw new Error("Order must be either 'asc' or 'desc'"); + } +} diff --git a/sdk/ai/ai-projects/src/agents/messagesTrace.ts b/sdk/ai/ai-projects/src/agents/messagesTrace.ts new file mode 100644 index 000000000000..9614b2e74309 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/messagesTrace.ts @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + CreateMessageParameters, + ListMessagesParameters, +} from "../generated/src/parameters.js"; +import type { Span } from "../tracing.js"; +import { TracingAttributes, TracingUtility, TracingOperationName } from "../tracing.js"; +import type { + OpenAIPageableListOfThreadMessageOutput, + ThreadMessageOutput as GeneratedThreadMessageOutput, +} from "../generated/src/outputModels.js"; +import { addMessageEvent } from "./traceUtility.js"; +import type { ThreadMessageOutput } from "../customization/outputModels.js"; + +export function traceStartCreateMessage( + span: Span, + threadId: string, + options: CreateMessageParameters, +): void { + TracingUtility.setSpanAttributes(span, TracingOperationName.CREATE_MESSAGE, { + threadId: threadId, + genAiSystem: TracingAttributes.AZ_AI_AGENT_SYSTEM, + }); + addMessageEvent(span, { ...options.body, thread_id: threadId }); +} + +export async function traceEndCreateMessage( + span: Span, + _options: CreateMessageParameters, + result: Promise, +): Promise { + const resolvedResult = await result; + TracingUtility.updateSpanAttributes(span, { messageId: resolvedResult.id }); +} + +export function traceStartListMessages( + span: Span, + threadId: string, + _options: ListMessagesParameters, +): void { + TracingUtility.setSpanAttributes(span, TracingOperationName.LIST_MESSAGES, { + threadId: threadId, + genAiSystem: TracingAttributes.AZ_AI_AGENT_SYSTEM, + }); +} + +export async function traceEndListMessages( + span: Span, + _options: ListMessagesParameters, + result: Promise, +): Promise { + const resolvedResult = await result; + resolvedResult.data?.forEach((message) => { + addMessageEvent(span, message); + }); +} diff --git a/sdk/ai/ai-projects/src/agents/openAIError.ts b/sdk/ai/ai-projects/src/agents/openAIError.ts new file mode 100644 index 000000000000..6a35bf2a268e --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/openAIError.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError } from "@azure-rest/core-client"; +import type { RestErrorOptions } from "@azure/core-rest-pipeline"; +import { RestError } from "@azure/core-rest-pipeline"; + +interface OpenAIErrorOptions extends RestErrorOptions { + param?: string; + type?: string; +} + +export class OpenAIError extends RestError { + readonly param?: string; + readonly type?: string; + + constructor(message: string, OpenAIErrorOptions: OpenAIErrorOptions = {}) { + super(message, OpenAIErrorOptions); + this.param = OpenAIErrorOptions?.param; + this.type = OpenAIErrorOptions?.type; + } +} + +export function createOpenAIError(response: PathUncheckedResponse): OpenAIError { + const internalError = response.body.error || response.body; + const restError = createRestError(internalError, response); + return new OpenAIError(restError.message, { + statusCode: restError?.statusCode, + code: restError?.code, + request: restError?.request, + response: restError?.response, + param: internalError?.param, + type: internalError?.type, + }); +} diff --git a/sdk/ai/ai-projects/src/agents/poller.ts b/sdk/ai/ai-projects/src/agents/poller.ts new file mode 100644 index 000000000000..82c53ae10d4f --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/poller.ts @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { delay } from "@azure/core-util"; +import type { PollOperationState, PollOperation } from "@azure/core-lro"; +import { Poller } from "@azure/core-lro"; +import type { AbortSignalLike } from "@azure/abort-controller"; +import type { PollingOptions } from "./customModels.js"; + +interface PollResult { + status?: string; +} + +interface AgentsPollOperationState extends PollOperationState { + updateInternal: (state?: T) => Promise<{ result: T; completed: boolean }>; + cancelInternal?: (state: T) => Promise; + abortSignal?: AbortSignalLike; + cancelled?: boolean; +} + +interface AgentsPollOperation + extends PollOperation, T> {} + +export class AgentsPoller extends Poller, T> { + sleepIntervalInMs: number = 1000; + + constructor({ + update, + pollingOptions, + cancel, + baseOperation, + onProgress, + }: { + update: (state?: T) => Promise<{ result: T; completed: boolean }>; + pollingOptions?: PollingOptions; + cancel?: (state: T) => Promise; + baseOperation?: AgentsPollOperation; + onProgress?: (state: AgentsPollOperationState) => void; + }) { + let state: AgentsPollOperationState = { + updateInternal: update, + cancelInternal: cancel, + abortSignal: pollingOptions?.abortSignal, + }; + + if (baseOperation) { + state = baseOperation.state; + } + + const operation = makeOperation(state); + super(operation); + + this.sleepIntervalInMs = pollingOptions?.sleepIntervalInMs ?? this.sleepIntervalInMs; + + if (onProgress) { + this.onProgress(onProgress); + } + } + + async delay(): Promise { + await delay(this.sleepIntervalInMs); + } +} + +/** + * Utility function to create a new instance of operation state. + * Recommended to avoid no references are left or manipulated by mistake + */ +function makeOperation( + state: AgentsPollOperationState, +): PollOperation, T> { + return { + state: { + ...state, + }, + update: updateWrapper, + cancel: cancelWrapper, + toString: toString, + }; +} + +async function updateWrapper( + this: AgentsPollOperation, +): Promise, T>> { + if (this.state.abortSignal?.aborted) { + return makeOperation(this.state); + } + const { result, completed } = await this.state.updateInternal(this.state.result); + this.state.result = result; + this.state.isCompleted = completed; + return makeOperation(this.state); +} + +async function cancelWrapper( + this: AgentsPollOperation, +): Promise, T>> { + if (!this.state.result || !this.state.cancelInternal) { + return makeOperation({ + ...this.state, + cancelled: false, + }); + } + const cancelled = await this.state.cancelInternal(this.state.result); + return makeOperation({ + ...this.state, + cancelled: cancelled, + }); +} + +function toString(this: AgentsPollOperation): string { + return JSON.stringify(this.state); +} diff --git a/sdk/ai/ai-projects/src/agents/runSteps.ts b/sdk/ai/ai-projects/src/agents/runSteps.ts new file mode 100644 index 000000000000..b6aa0dd1cde6 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/runSteps.ts @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import { operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { + OpenAIPageableListOfRunStepOutput, + RunStepOutput, +} from "../customization/outputModels.js"; +import type * as GeneratedParameters from "../generated/src/parameters.js"; +import * as ConverterFromWire from "../customization/convertOutputModelsFromWire.js"; +import { + validateLimit, + validateOrder, + validateRunId, + validateThreadId, +} from "./inputValidations.js"; +import type { GetRunStepOptionalParams, ListRunStepsOptionalParams } from "./customModels.js"; +import { convertToListQueryParameters } from "../customization/convertParametersToWire.js"; +import { createOpenAIError } from "./openAIError.js"; + +const expectedStatuses = ["200"]; + +/** Gets a single run step from a thread run. */ +export async function getRunStep( + context: Client, + threadId: string, + runId: string, + stepId: string, + options: GetRunStepOptionalParams = {}, +): Promise { + validateThreadId(threadId); + validateRunId(runId); + validateStepId(stepId); + + const getOptions: GeneratedParameters.GetRunParameters = { + ...operationOptionsToRequestParameters(options), + }; + + const result = await context + .path("/threads/{threadId}/runs/{runId}/steps/{stepId}", threadId, runId, stepId) + .get(getOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConverterFromWire.convertRunStepOutput(result.body); +} + +/** Gets a list of run steps from a thread run. */ +export async function listRunSteps( + context: Client, + threadId: string, + runId: string, + options: ListRunStepsOptionalParams = {}, +): Promise { + const listOptions: GeneratedParameters.ListRunStepsParameters = { + ...operationOptionsToRequestParameters(options), + queryParameters: convertToListQueryParameters(options), + }; + + validateListRunsParameters(threadId, runId, listOptions); + const result = await context + .path("/threads/{threadId}/runs/{runId}/steps", threadId, runId) + .get(listOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConverterFromWire.convertOpenAIPageableListOfRunStepOutput(result.body); +} + +function validateStepId(stepId: string): void { + if (!stepId) { + throw new Error("Step ID is required"); + } +} + +function validateListRunsParameters( + thread_id: string, + runId: string, + options?: GeneratedParameters.ListRunStepsParameters, +): void { + validateThreadId(thread_id); + validateRunId(runId); + if ( + options?.queryParameters?.limit && + (options.queryParameters.limit < 1 || options.queryParameters.limit > 100) + ) { + throw new Error("Limit must be between 1 and 100"); + } + if (options?.queryParameters?.limit) { + validateLimit(options.queryParameters.limit); + } + if (options?.queryParameters?.order) { + validateOrder(options.queryParameters.order); + } +} diff --git a/sdk/ai/ai-projects/src/agents/runTrace.ts b/sdk/ai/ai-projects/src/agents/runTrace.ts new file mode 100644 index 000000000000..dc6c725b2013 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/runTrace.ts @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + CreateRunParameters, + CreateThreadAndRunParameters, + SubmitToolOutputsToRunParameters, + UpdateRunParameters, +} from "../generated/src/parameters.js"; +import type { ThreadRunOutput } from "../generated/src/outputModels.js"; +import type { TracingAttributeOptions, Span } from "../tracing.js"; +import { TracingUtility, TracingOperationName } from "../tracing.js"; +import { + addInstructionsEvent, + addMessageEvent, + addToolMessagesEvent, + formatAgentApiResponse, + UpdateWithAgentAttributes, +} from "./traceUtility.js"; + +export function traceStartCreateRun( + span: Span, + options: CreateRunParameters | CreateThreadAndRunParameters, + threadId?: string, + operationName: string = TracingOperationName.CREATE_RUN, +): void { + const attributes: TracingAttributeOptions = { + threadId: threadId, + agentId: options.body.assistant_id, + model: options.body.model ?? undefined, + instructions: options.body.instructions ?? undefined, + temperature: options.body.temperature ?? undefined, + topP: options.body.top_p ?? undefined, + maxCompletionTokens: options.body.max_completion_tokens ?? undefined, + maxPromptTokens: options.body.max_prompt_tokens ?? undefined, + responseFormat: formatAgentApiResponse(options.body.response_format), + }; + if ((options as CreateRunParameters).body.additional_instructions) { + attributes.additional_instructions = + (options as CreateRunParameters).body.additional_instructions ?? undefined; + } + TracingUtility.setSpanAttributes(span, operationName, UpdateWithAgentAttributes(attributes)); + setSpanEvents(span, options); +} + +export function traceStartCreateThreadAndRun( + span: Span, + options: CreateThreadAndRunParameters, +): void { + traceStartCreateRun(span, options, undefined, TracingOperationName.CREATE_THREAD_RUN); +} + +export async function traceEndCreateOrUpdateRun( + span: Span, + _options: CreateRunParameters | UpdateRunParameters, + result: Promise, +): Promise { + const resolvedResult = await result; + updateSpanAttributesForRun(span, resolvedResult); +} + +export function traceStartSubmitToolOutputsToRun( + span: Span, + options: SubmitToolOutputsToRunParameters, + threadId: string, + runId: string, +): void { + const attributes: TracingAttributeOptions = { threadId: threadId, runId: runId }; + TracingUtility.setSpanAttributes( + span, + TracingOperationName.SUBMIT_TOOL_OUTPUTS, + UpdateWithAgentAttributes(attributes), + ); + addToolMessagesEvent(span, options.body.tool_outputs); +} + +export async function traceEndSubmitToolOutputsToRun( + span: Span, + _options: SubmitToolOutputsToRunParameters, + result: Promise, +): Promise { + const resolvedResult = await result; + updateSpanAttributesForRun(span, resolvedResult); +} + +function updateSpanAttributesForRun(span: Span, output: ThreadRunOutput): void { + TracingUtility.updateSpanAttributes(span, { + runId: output.id, + runStatus: output.status, + responseModel: output.model, + }); + const usage = output.usage; + if (usage && "completion_tokens" in usage && usage.completion_tokens) { + TracingUtility.updateSpanAttributes(span, { + usageCompletionTokens: usage.completion_tokens, + usagePromptTokens: usage.prompt_tokens, + }); + } +} + +function setSpanEvents(span: Span, options: CreateRunParameters): void { + addInstructionsEvent(span, { ...options.body, agentId: options.body.assistant_id }); + options.body.additional_messages?.forEach((message) => { + addMessageEvent(span, message); + }); +} diff --git a/sdk/ai/ai-projects/src/agents/runs.ts b/sdk/ai/ai-projects/src/agents/runs.ts new file mode 100644 index 000000000000..cb7f966056af --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/runs.ts @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import { operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type * as GeneratedParameters from "../generated/src/parameters.js"; +import type * as CustomOutputModels from "../customization/outputModels.js"; +import type * as CustomModels from "../customization/models.js"; +import { + validateLimit, + validateMessages, + validateMetadata, + validateOrder, + validateRunId, + validateThreadId, + validateTools, + validateTruncationStrategy, +} from "./inputValidations.js"; +import { TracingUtility } from "../tracing.js"; +import { + traceEndCreateOrUpdateRun, + traceEndSubmitToolOutputsToRun, + traceStartCreateRun, + traceStartCreateThreadAndRun, + traceStartSubmitToolOutputsToRun, +} from "./runTrace.js"; +import { traceStartAgentGeneric } from "./traceUtility.js"; +import { + createRunStreaming, + createThreadAndRunStreaming, + submitToolOutputsToRunStreaming, +} from "./streaming.js"; +import type { AgentEventMessageStream } from "./streamingModels.js"; +import type { + AgentRunResponse, + CreateRunOptionalParams, + CancelRunOptionalParams, + CreateAndRunThreadOptionalParams, + GetRunOptionalParams, + ListRunQueryOptionalParams, + SubmitToolOutputsToRunOptionalParams, + UpdateRunOptionalParams, +} from "./customModels.js"; +import * as ConverterToWire from "../customization/convertModelsToWrite.js"; +import * as ConvertFromWire from "../customization/convertOutputModelsFromWire.js"; +import { convertToListQueryParameters } from "../customization/convertParametersToWire.js"; +import { createOpenAIError } from "./openAIError.js"; + +const expectedStatuses = ["200"]; + +/** Creates and starts a new run of the specified thread using the specified agent. */ +export function createRun( + context: Client, + threadId: string, + assistantId: string, + options: CreateRunOptionalParams, +): AgentRunResponse { + const createRunOptions: GeneratedParameters.CreateRunParameters = { + ...operationOptionsToRequestParameters(options), + body: { + ...ConverterToWire.convertCreateRunOptions({ ...options, assistantId }), + stream: false, + }, + }; + validateThreadId(threadId); + validateCreateRunParameters(createRunOptions); + + async function executeCreateRun(): Promise { + const output = await TracingUtility.withSpan( + "CreateRun", + createRunOptions, + async (updateOptions) => { + const result = await context.path("/threads/{threadId}/runs", threadId).post(updateOptions); + if (!expectedStatuses.includes(result.status)) { + const error = createOpenAIError(result); + throw error; + } + return result.body; + }, + (span, updatedOptions) => traceStartCreateRun(span, updatedOptions, threadId), + traceEndCreateOrUpdateRun, + ); + return ConvertFromWire.convertThreadRunOutput(output); + } + + return { + then: function (onFulfilled, onRejected) { + return executeCreateRun().then(onFulfilled, onRejected).catch(onRejected); + }, + async stream(): Promise { + return createRunStreaming(context, threadId, createRunOptions); + }, + }; +} + +/** Gets a list of runs for a specified thread. */ +export async function listRuns( + context: Client, + threadId: string, + options: ListRunQueryOptionalParams = {}, +): Promise { + const listRunOptions: GeneratedParameters.ListRunsParameters = { + ...operationOptionsToRequestParameters(options), + queryParameters: convertToListQueryParameters(options), + }; + + validateListRunsParameters(threadId, options); + return TracingUtility.withSpan( + "ListRuns", + listRunOptions || {}, + async (updateOptions) => { + const result = await context.path("/threads/{threadId}/runs", threadId).get(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertOpenAIPageableListOfThreadRunOutput(result.body); + }, + (span, updatedOptions) => + traceStartAgentGeneric(span, { + ...updatedOptions, + tracingAttributeOptions: { threadId: threadId }, + }), + ); +} + +/** Gets an existing run from an existing thread. */ +export async function getRun( + context: Client, + threadId: string, + runId: string, + options: GetRunOptionalParams = {}, +): Promise { + validateThreadId(threadId); + validateRunId(runId); + const getRunOptions: GeneratedParameters.GetRunParameters = { + ...operationOptionsToRequestParameters(options), + }; + return TracingUtility.withSpan( + "GetRun", + getRunOptions, + async (updateOptions) => { + const result = await context + .path("/threads/{threadId}/runs/{runId}", threadId, runId) + .get(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertThreadRunOutput(result.body); + }, + (span, updatedOptions) => + traceStartAgentGeneric(span, { + ...updatedOptions, + tracingAttributeOptions: { threadId: threadId, runId: runId }, + }), + ); +} + +/** Modifies an existing thread run. */ +export async function updateRun( + context: Client, + threadId: string, + runId: string, + options: UpdateRunOptionalParams = {}, +): Promise { + const updateRunOptions: GeneratedParameters.UpdateRunParameters = { + ...operationOptionsToRequestParameters(options), + body: { + metadata: options?.metadata, + }, + }; + + validateUpdateRunParameters(threadId, runId, updateRunOptions); + const response = await TracingUtility.withSpan( + "UpdateRun", + updateRunOptions, + async (updateOptions) => { + const result = await context + .path("/threads/{threadId}/runs/{runId}", threadId, runId) + .post(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => + traceStartAgentGeneric(span, { + ...updatedOptions, + tracingAttributeOptions: { threadId: threadId, runId: runId }, + }), + traceEndCreateOrUpdateRun, + ); + + return ConvertFromWire.convertThreadRunOutput(response); +} + +/** Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. */ +export function submitToolOutputsToRun( + context: Client, + threadId: string, + runId: string, + toolOutputs: Array, + options: SubmitToolOutputsToRunOptionalParams = {}, +): AgentRunResponse { + validateThreadId(threadId); + validateRunId(runId); + const submitToolOutputsOptions: GeneratedParameters.SubmitToolOutputsToRunParameters = { + ...operationOptionsToRequestParameters(options), + body: { + tool_outputs: toolOutputs?.map(ConverterToWire.convertToolOutput), + stream: false, + }, + }; + + async function executeSubmitToolOutputsToRun(): Promise { + const response = await TracingUtility.withSpan( + "SubmitToolOutputsToRun", + submitToolOutputsOptions, + async (updateOptions) => { + const result = await context + .path("/threads/{threadId}/runs/{runId}/submit_tool_outputs", threadId, runId) + .post(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => + traceStartSubmitToolOutputsToRun(span, updatedOptions, threadId, runId), + traceEndSubmitToolOutputsToRun, + ); + return ConvertFromWire.convertThreadRunOutput(response); + } + + return { + then: function (onFulfilled, onrejected) { + return executeSubmitToolOutputsToRun().then(onFulfilled, onrejected).catch(onrejected); + }, + async stream(): Promise { + return submitToolOutputsToRunStreaming(context, threadId, runId, submitToolOutputsOptions); + }, + }; +} + +/** Cancels a run of an in progress thread. */ +export async function cancelRun( + context: Client, + threadId: string, + runId: string, + options: CancelRunOptionalParams = {}, +): Promise { + validateThreadId(threadId); + validateRunId(runId); + const cancelRunOptions: GeneratedParameters.CancelRunParameters = { + ...operationOptionsToRequestParameters(options), + }; + return TracingUtility.withSpan("CancelRun", cancelRunOptions, async (updateOptions) => { + const result = await context + .path("/threads/{threadId}/runs/{runId}/cancel", threadId, runId) + .post(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertThreadRunOutput(result.body); + }); +} + +/** Creates a new thread and immediately starts a run of that thread. */ +export function createThreadAndRun( + context: Client, + assistantId: string, + options: CreateAndRunThreadOptionalParams, +): AgentRunResponse { + const createThreadAndRunOptions: GeneratedParameters.CreateThreadAndRunParameters = { + ...operationOptionsToRequestParameters(options), + body: { + ...ConverterToWire.convertCreateAndRunThreadOptions({ ...options, assistantId }), + stream: false, + }, + }; + + validateCreateThreadAndRunParameters(createThreadAndRunOptions); + + async function executeCreateThreadAndRun(): Promise { + const response = await TracingUtility.withSpan( + "CreateThreadAndRun", + createThreadAndRunOptions, + async (updateOptions) => { + const result = await context.path("/threads/runs").post(updateOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + + return result.body; + }, + traceStartCreateThreadAndRun, + traceEndCreateOrUpdateRun, + ); + + return ConvertFromWire.convertThreadRunOutput(response); + } + + return { + then: function (onFulfilled, onrejected) { + return executeCreateThreadAndRun().then(onFulfilled, onrejected).catch(onrejected); + }, + async stream(): Promise { + return createThreadAndRunStreaming(context, createThreadAndRunOptions); + }, + }; +} + +function validateListRunsParameters( + thread_id: string, + options?: GeneratedParameters.ListRunsParameters, +): void { + validateThreadId(thread_id); + if ( + options?.queryParameters?.limit && + (options.queryParameters.limit < 1 || options.queryParameters.limit > 100) + ) { + throw new Error("Limit must be between 1 and 100"); + } + if (options?.queryParameters?.limit) { + validateLimit(options.queryParameters.limit); + } + if (options?.queryParameters?.order) { + validateOrder(options.queryParameters.order); + } +} + +function validateUpdateRunParameters( + thread_id: string, + run_id: string, + options?: GeneratedParameters.UpdateRunParameters, +): void { + validateThreadId(thread_id); + validateRunId(run_id); + if (options?.body.metadata) { + validateMetadata(options.body.metadata); + } +} + +function validateCreateRunParameters( + options: + | GeneratedParameters.CreateRunParameters + | GeneratedParameters.CreateThreadAndRunParameters, +): void { + if ("additional_messages" in options.body && options.body.additional_messages) { + options.body.additional_messages.forEach((message) => validateMessages(message.role)); + } + if (options.body.tools) { + validateTools(options.body.tools); + } + if (options.body.temperature && (options.body.temperature < 0 || options.body.temperature > 2)) { + throw new Error("Temperature must be between 0 and 2"); + } + if (options.body.tool_choice && typeof options.body.tool_choice !== "string") { + validateTools([options.body.tool_choice]); + } + if (options.body.truncation_strategy?.type) { + validateTruncationStrategy(options.body.truncation_strategy.type); + } + if (options.body.metadata) { + validateMetadata(options.body.metadata); + } +} + +function validateCreateThreadAndRunParameters( + options: GeneratedParameters.CreateThreadAndRunParameters, +): void { + validateCreateRunParameters(options); + if (options.body.thread?.messages) { + options.body.thread?.messages.forEach((message) => validateMessages(message.role)); + } + if (options.body.tools) { + validateTools(options.body.tools); + } + if (options.body.tool_resources?.code_interpreter) { + if (options.body.tool_resources.code_interpreter) { + if ( + options.body.tool_resources.code_interpreter.file_ids && + options.body.tool_resources.code_interpreter.file_ids.length > 20 + ) { + throw new Error("A maximum of 20 file IDs are allowed"); + } + } + if (options.body.tool_resources.file_search) { + if ( + options.body.tool_resources.file_search.vector_store_ids && + options.body.tool_resources.file_search.vector_store_ids.length > 1 + ) { + throw new Error("Only one vector store ID is allowed"); + } + } + if (options.body.tool_resources.azure_ai_search) { + if ( + options.body.tool_resources.azure_ai_search.indexes && + options.body.tool_resources.azure_ai_search.indexes.length > 1 + ) { + throw new Error("Only one index is allowed"); + } + } + } +} diff --git a/sdk/ai/ai-projects/src/agents/streaming.ts b/sdk/ai/ai-projects/src/agents/streaming.ts new file mode 100644 index 000000000000..129a2b05b1fc --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/streaming.ts @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client, StreamableMethod } from "@azure-rest/core-client"; +import type { + CreateRunParameters, + CreateThreadAndRunBodyParam, + SubmitToolOutputsToRunParameters, +} from "../generated/src/index.js"; +import { + MessageStreamEvent, + RunStepStreamEvent, + RunStreamEvent, + ThreadStreamEvent, + type AgentEventMessage, + type AgentEventMessageStream, + type AgentEventStreamDataOutput, +} from "./streamingModels.js"; +import type { EventMessage, EventMessageStream } from "@azure/core-sse"; +import { createSseStream } from "@azure/core-sse"; +import { isNodeLike } from "@azure/core-util"; +import type { IncomingMessage } from "http"; +import { + validateMessages, + validateMetadata, + validateRunId, + validateThreadId, + validateToolResources, + validateTools, + validateTruncationStrategy, +} from "./inputValidations.js"; +import { createOpenAIError } from "./openAIError.js"; +import { + convertAgentThreadOutput, + convertMessageDeltaChunkOutput, + convertRunStepDeltaChunk, + convertRunStepOutput, + convertThreadMessageOutput, + convertThreadRunOutput, +} from "../customization/convertOutputModelsFromWire.js"; +import { logger } from "../logger.js"; + +const expectedStatuses = ["200"]; + +const handlers = [ + { events: Object.values(ThreadStreamEvent) as string[], converter: convertAgentThreadOutput }, + { events: Object.values(RunStreamEvent) as string[], converter: convertThreadRunOutput }, + { events: Object.values(RunStepStreamEvent) as string[], converter: convertRunStepOutput }, + { events: Object.values(MessageStreamEvent) as string[], converter: convertThreadMessageOutput }, +]; + +function createAgentStream(stream: EventMessageStream): AgentEventMessageStream { + const asyncIterator = toAsyncIterable(stream); + const asyncDisposable = stream as AsyncDisposable; + return Object.assign(asyncIterator, asyncDisposable); +} + +async function* toAsyncIterable(stream: EventMessageStream): AsyncIterable { + for await (const event of stream) { + const data = deserializeEventData(event); + yield { data: data, event: event.event }; + } +} + +function deserializeEventData(event: EventMessage): AgentEventStreamDataOutput { + try { + const jsonData = JSON.parse(event.data); + switch (event.event) { + case MessageStreamEvent.ThreadMessageDelta: + return convertMessageDeltaChunkOutput(jsonData); + case RunStepStreamEvent.ThreadRunStepDelta: + return convertRunStepDeltaChunk(jsonData); + default: { + for (const { events, converter } of handlers) { + if (events.includes(event.event)) { + return converter(jsonData); + } + } + + return jsonData; + } + } + } catch (ex) { + logger.error(`Failed to parse event data ${event.event} - error: ${ex}`); + return event.data; + } +} + +async function processStream(streamResponse: StreamableMethod): Promise { + const result = isNodeLike + ? await streamResponse.asNodeStream() + : await streamResponse.asBrowserStream(); + + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + if (!result.body) { + throw new Error("No body in response"); + } + + const stream = isNodeLike + ? createSseStream(result.body as IncomingMessage) + : createSseStream(result.body as ReadableStream); + return createAgentStream(stream); +} + +/** Create a run and stream the events */ +export async function createRunStreaming( + context: Client, + threadId: string, + options: CreateRunParameters, +): Promise { + validateThreadId(threadId); + validateCreateThreadAndRunBodyParam(options); + options.body.stream = true; + + return processStream(context.path("/threads/{threadId}/runs", threadId).post(options)); +} + +/** Create a thread and run and stream the events */ +export async function createThreadAndRunStreaming( + context: Client, + options: CreateThreadAndRunBodyParam, +): Promise { + validateCreateThreadAndRunBodyParam(options); + options.body.stream = true; + return processStream(context.path("/threads/runs").post(options)); +} + +export async function submitToolOutputsToRunStreaming( + context: Client, + threadId: string, + runId: string, + options: SubmitToolOutputsToRunParameters, +): Promise { + validateThreadId(threadId); + validateRunId(runId); + options.body.stream = true; + + return processStream( + context + .path("/threads/{threadId}/runs/{runId}/submit_tool_outputs", threadId, runId) + .post(options), + ); +} + +function validateCreateThreadAndRunBodyParam( + options: CreateRunParameters | CreateThreadAndRunBodyParam, +): void { + if ("additional_messages" in options.body && options.body.additional_messages) { + options.body.additional_messages.forEach((message) => validateMessages(message.role)); + } + if ("thread" in options.body && options.body.thread?.messages) { + options.body.thread?.messages.forEach((message) => validateMessages(message.role)); + } + if (options.body.tools) { + validateTools(options.body.tools); + } + if ("tool_resources" in options.body && options?.body.tool_resources) { + validateToolResources(options.body.tool_resources); + } + if (options.body.temperature && (options.body.temperature < 0 || options.body.temperature > 2)) { + throw new Error("Temperature must be between 0 and 2"); + } + if (options.body.tool_choice && typeof options.body.tool_choice !== "string") { + validateTools([options.body.tool_choice]); + } + if (options.body.truncation_strategy?.type) { + validateTruncationStrategy(options.body.truncation_strategy.type); + } + if (options.body.response_format) { + if (!["json", "text"].includes(options.body.response_format as string)) { + throw new Error("Response format must be either 'json' or 'text'"); + } + } + if (options?.body.metadata) { + validateMetadata(options.body.metadata); + } +} diff --git a/sdk/ai/ai-projects/src/agents/streamingModels.ts b/sdk/ai/ai-projects/src/agents/streamingModels.ts new file mode 100644 index 000000000000..63a7704aca46 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/streamingModels.ts @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { MessageDeltaChunk, RunStepDeltaChunk } from "../customization/streamingModels.js"; +import type { + AgentThreadOutput, + RunStepOutput, + ThreadMessageOutput, + ThreadRunOutput, +} from "../customization/outputModels.js"; + +/** +Each event in a server-sent events stream has an `event` and `data` property: + + ``` + event: thread.created + data: {"id": "thread_123", "object": "thread", ...} + ``` + + We emit events whenever a new object is created, transitions to a new state, or is being + streamed in parts (deltas). For example, we emit `thread.run.created` when a new run + is created, `thread.run.completed` when a run completes, and so on. When an Agent chooses + to create a message during a run, we emit a `thread.message.created event`, a + `thread.message.in_progress` event, many `thread.message.delta` events, and finally a + `thread.message.completed` event. + + We may add additional events over time, so we recommend handling unknown events gracefully + in your code.**/ +export interface AgentEventMessage { + /** The data of the event. The data can be of type AgentThreadOutput, ThreadRunOutput, RunStepOutput, ThreadMessageOutput, MessageDeltaChunk,RunStepDeltaChunk */ + data: AgentEventStreamDataOutput; + /** The type of the event. */ + event: AgentStreamEventType | string; +} + +/** Represents a stream event data in the agent. */ +export type AgentEventStreamDataOutput = + | AgentThreadOutput + | ThreadRunOutput + | RunStepOutput + | ThreadMessageOutput + | MessageDeltaChunk + | RunStepDeltaChunk + | string; + +/** Thread operation related streaming events */ +export enum ThreadStreamEvent { + /** Event sent when a new thread is created. The data of this event is of type AgentThread */ + ThreadCreated = "thread.created", +} + +/** Run operation related streaming events */ +export enum RunStreamEvent { + /** Event sent when a new run is created. The data of this event is of type ThreadRun */ + ThreadRunCreated = "thread.run.created", + + /** Event sent when a run moves to `queued` status. The data of this event is of type ThreadRun */ + ThreadRunQueued = "thread.run.queued", + + /** Event sent when a run moves to `in_progress` status. The data of this event is of type ThreadRun */ + ThreadRunInProgress = "thread.run.in_progress", + + /** Event sent when a run moves to `requires_action` status. The data of this event is of type ThreadRun */ + ThreadRunRequiresAction = "thread.run.requires_action", + + /** Event sent when a run is completed. The data of this event is of type ThreadRun */ + ThreadRunCompleted = "thread.run.completed", + + /** Event sent when a run fails. The data of this event is of type ThreadRun */ + ThreadRunFailed = "thread.run.failed", + + /** Event sent when a run moves to `cancelling` status. The data of this event is of type ThreadRun */ + ThreadRunCancelling = "thread.run.cancelling", + + /** Event sent when a run is cancelled. The data of this event is of type ThreadRun */ + ThreadRunCancelled = "thread.run.cancelled", + + /** Event sent when a run is expired. The data of this event is of type ThreadRun */ + ThreadRunExpired = "thread.run.expired", +} + +/** Run step operation related streaming events */ +export enum RunStepStreamEvent { + /** Event sent when a new thread run step is created. The data of this event is of type RunStep */ + ThreadRunStepCreated = "thread.run.step.created", + + /** Event sent when a run step moves to `in_progress` status. The data of this event is of type RunStep */ + ThreadRunStepInProgress = "thread.run.step.in_progress", + + /** Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk */ + ThreadRunStepDelta = "thread.run.step.delta", + + /** Event sent when a run step is completed. The data of this event is of type RunStep */ + ThreadRunStepCompleted = "thread.run.step.completed", + + /** Event sent when a run step fails. The data of this event is of type RunStep */ + ThreadRunStepFailed = "thread.run.step.failed", + + /** Event sent when a run step is cancelled. The data of this event is of type RunStep */ + ThreadRunStepCancelled = "thread.run.step.cancelled", + + /** Event sent when a run step is expired. The data of this event is of type RunStep */ + ThreadRunStepExpired = "thread.run.step.expired", +} + +/** Message operation related streaming events */ +export enum MessageStreamEvent { + /** Event sent when a new message is created. The data of this event is of type ThreadMessage */ + ThreadMessageCreated = "thread.message.created", + + /** Event sent when a message moves to `in_progress` status. The data of this event is of type ThreadMessage */ + ThreadMessageInProgress = "thread.message.in_progress", + + /** Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk */ + ThreadMessageDelta = "thread.message.delta", + + /** Event sent when a message is completed. The data of this event is of type ThreadMessage */ + ThreadMessageCompleted = "thread.message.completed", + + /** Event sent before a message is completed. The data of this event is of type ThreadMessage */ + ThreadMessageIncomplete = "thread.message.incomplete", +} + +/** Terminal event indicating a server side error while streaming. */ +export enum ErrorEvent { + /** Event sent when an error occurs, such as an internal server error or a timeout. */ + Error = "error", +} + +/** Terminal event indicating the successful end of a stream. */ +export enum DoneEvent { + /** Event sent when the stream is done. */ + Done = "done", +} + +/** + Represents the type of an agent stream event. + */ +export type AgentStreamEventType = + | ThreadStreamEvent + | RunStreamEvent + | RunStepStreamEvent + | MessageStreamEvent + | ErrorEvent + | DoneEvent; + +/** Represents a stream of agent event message. */ +export interface AgentEventMessageStream + extends AsyncDisposable, + AsyncIterable {} diff --git a/sdk/ai/ai-projects/src/agents/threads.ts b/sdk/ai/ai-projects/src/agents/threads.ts new file mode 100644 index 000000000000..a8f5cb98e255 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/threads.ts @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import { operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type * as GeneratedParameters from "../generated/src/parameters.js"; +import * as ConverterToWire from "../customization/convertModelsToWrite.js"; +import * as ConverterFromWire from "../customization/convertOutputModelsFromWire.js"; +import type { + AgentThreadOutput, + ThreadDeletionStatusOutput, +} from "../customization/outputModels.js"; +import { TracingUtility } from "../tracing.js"; +import { traceEndCreateThread, traceStartCreateThread } from "./threadsTrace.js"; +import { + validateMessages, + validateMetadata, + validateThreadId, + validateToolResources, +} from "./inputValidations.js"; +import { traceStartAgentGeneric } from "./traceUtility.js"; +import type { + CreateAgentThreadOptionalParams, + DeleteAgentThreadOptionalParams, + GetAgentThreadOptionalParams, + UpdateAgentThreadOptionalParams, +} from "./customModels.js"; +import { convertThreadDeletionStatusOutput } from "../customization/convertOutputModelsFromWire.js"; +import { createOpenAIError } from "./openAIError.js"; + +const expectedStatuses = ["200"]; + +/** Creates a new thread. Threads contain messages and can be run by agents. */ +export async function createThread( + context: Client, + options: CreateAgentThreadOptionalParams = {}, +): Promise { + const createThreadOptions: GeneratedParameters.CreateThreadParameters = { + ...operationOptionsToRequestParameters(options), + body: { + ...ConverterToWire.convertAgentThreadCreationOptions(options), + }, + }; + + validateCreateThreadParameters(createThreadOptions); + const response = await TracingUtility.withSpan( + "CreateThread", + createThreadOptions, + async (updatedOptions) => { + const result = await context.path("/threads").post(updatedOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + traceStartCreateThread, + traceEndCreateThread, + ); + + return ConverterFromWire.convertAgentThreadOutput(response); +} + +/** Gets information about an existing thread. */ +export async function getThread( + context: Client, + threadId: string, + options: GetAgentThreadOptionalParams = {}, +): Promise { + const getThreadOptions: GeneratedParameters.GetThreadParameters = { + ...operationOptionsToRequestParameters(options), + }; + + validateThreadId(threadId); + const response = await TracingUtility.withSpan( + "GetThread", + getThreadOptions, + async (updatedOptions) => { + const result = await context.path("/threads/{threadId}", threadId).get(updatedOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => + traceStartAgentGeneric(span, { + ...updatedOptions, + tracingAttributeOptions: { threadId: threadId }, + }), + ); + + return ConverterFromWire.convertAgentThreadOutput(response); +} + +/** Modifies an existing thread. */ +export async function updateThread( + context: Client, + threadId: string, + options: UpdateAgentThreadOptionalParams = {}, +): Promise { + const updateThreadOptions: GeneratedParameters.UpdateThreadParameters = { + ...operationOptionsToRequestParameters(options), + body: { + ...ConverterToWire.convertAgentThreadUpdateOptions(options), + }, + }; + + validateUpdateThreadParameters(threadId, updateThreadOptions); + const response = await TracingUtility.withSpan( + "UpdateThread", + updateThreadOptions, + async (updatedOptions) => { + const result = await context.path("/threads/{threadId}", threadId).post(updatedOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => + traceStartAgentGeneric(span, { + ...updatedOptions, + tracingAttributeOptions: { threadId: threadId }, + }), + ); + + return ConverterFromWire.convertAgentThreadOutput(response); +} + +/** Deletes an existing thread. */ +export async function deleteThread( + context: Client, + threadId: string, + options: DeleteAgentThreadOptionalParams = {}, +): Promise { + const deleteThreadOptions: GeneratedParameters.DeleteAgentParameters = { + ...operationOptionsToRequestParameters(options), + }; + + validateThreadId(threadId); + const response = await TracingUtility.withSpan( + "DeleteThread", + deleteThreadOptions, + async (updatedOptions) => { + const result = await context.path("/threads/{threadId}", threadId).delete(updatedOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return result.body; + }, + (span, updatedOptions) => + traceStartAgentGeneric(span, { + ...updatedOptions, + tracingAttributeOptions: { threadId: threadId }, + }), + ); + + return convertThreadDeletionStatusOutput(response); +} + +function validateCreateThreadParameters( + options?: GeneratedParameters.CreateThreadParameters, +): void { + if (options?.body.messages) { + options.body.messages.forEach((message) => validateMessages(message.role)); + } + if (options?.body.tool_resources) { + validateToolResources(options.body.tool_resources); + } + if (options?.body.metadata) { + validateMetadata(options.body.metadata); + } +} + +function validateUpdateThreadParameters( + threadId: string, + options?: GeneratedParameters.UpdateThreadParameters, +): void { + validateThreadId(threadId); + if (options?.body.tool_resources) { + validateToolResources(options.body.tool_resources); + } + if (options?.body.metadata) { + validateMetadata(options.body.metadata); + } +} diff --git a/sdk/ai/ai-projects/src/agents/threadsTrace.ts b/sdk/ai/ai-projects/src/agents/threadsTrace.ts new file mode 100644 index 000000000000..4f852a3277cd --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/threadsTrace.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { AgentThreadOutput } from "../generated/src/outputModels.js"; +import type { Span } from "../tracing.js"; +import { TracingUtility, TracingOperationName } from "../tracing.js"; +import type { CreateThreadParameters } from "../generated/src/parameters.js"; +import { addMessageEvent, UpdateWithAgentAttributes } from "./traceUtility.js"; + +export function traceStartCreateThread(span: Span, options: CreateThreadParameters): void { + TracingUtility.setSpanAttributes( + span, + TracingOperationName.CREATE_THREAD, + UpdateWithAgentAttributes({}), + ); + setSpanEvents(span, options); +} + +export async function traceEndCreateThread( + span: Span, + _options: CreateThreadParameters, + result: Promise, +): Promise { + const resolvedResult = await result; + TracingUtility.updateSpanAttributes(span, { threadId: resolvedResult.id }); +} + +function setSpanEvents(span: Span, options: CreateThreadParameters): void { + options.body.messages?.forEach((message) => { + addMessageEvent(span, message); + }); +} diff --git a/sdk/ai/ai-projects/src/agents/traceUtility.ts b/sdk/ai/ai-projects/src/agents/traceUtility.ts new file mode 100644 index 000000000000..7166167f4fdf --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/traceUtility.ts @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + AgentsApiResponseFormat, + AgentsApiResponseFormatOption, + MessageContent, + ThreadMessage, + ThreadMessageOptions, + ToolOutput, +} from "../generated/src/models.js"; +import type { RunStepCompletionUsageOutput } from "../generated/src/outputModels.js"; +import type { OptionsWithTracing, Span, TracingAttributeOptions } from "../tracing.js"; +import { TracingAttributes, TracingUtility } from "../tracing.js"; +import { getTelemetryOptions } from "../telemetry/telemetry.js"; + +export function traceStartAgentGeneric( + span: Span, + options: Options, +): void { + const attributeOptions = options.tracingAttributeOptions || {}; + TracingUtility.setSpanAttributes( + span, + options.tracingAttributeOptions?.operationName || "Agent_Operation", + UpdateWithAgentAttributes(attributeOptions), + ); +} +export function traceEndAgentGeneric( + span: Span, + _options: Options, +): void { + const attributeOptions = {}; + TracingUtility.updateSpanAttributes(span, UpdateWithAgentAttributes(attributeOptions)); +} + +export function UpdateWithAgentAttributes( + attributeOptions: Omit, +): Omit { + attributeOptions.genAiSystem = TracingAttributes.AZ_AI_AGENT_SYSTEM; + return attributeOptions; +} + +/** + * Adds a message event to the span. + * @param span - The span to add the event to. + * @param messageAttributes - The attributes of the message event. + */ +export function addMessageEvent( + span: Span, + messageAttributes: ThreadMessageOptions | ThreadMessage, + usage?: RunStepCompletionUsageOutput, +): void { + const eventBody: Record = {}; + const telemetryOptions = getTelemetryOptions(); + if (telemetryOptions.enableContentRecording) { + eventBody.content = getMessageContent(messageAttributes.content); + } + eventBody.role = messageAttributes.role; + if (messageAttributes.attachments) { + eventBody.attachments = messageAttributes.attachments.map((attachment) => { + return { + id: attachment.file_id, + tools: attachment.tools.map((tool) => tool.type), + }; + }); + } + const threadId = (messageAttributes as ThreadMessage).thread_id; + const agentId = (messageAttributes as ThreadMessage).assistant_id ?? undefined; + const threadRunId = (messageAttributes as ThreadMessage).run_id; + const messageStatus = (messageAttributes as ThreadMessage).status; + const messageId = (messageAttributes as ThreadMessage).id; + const incompleteDetails = (messageAttributes as ThreadMessage).incomplete_details; + if (incompleteDetails) { + eventBody.incomplete_details = incompleteDetails; + } + const usagePromptTokens = usage?.prompt_tokens; + const usageCompletionTokens = usage?.completion_tokens; + const attributes = { + eventContent: JSON.stringify(eventBody), + threadId, + agentId, + threadRunId, + messageStatus, + messageId, + usagePromptTokens, + usageCompletionTokens, + genAiSystem: TracingAttributes.AZ_AI_AGENT_SYSTEM, + }; + TracingUtility.addSpanEvent(span, `gen_ai.${messageAttributes.role}.message`, attributes); +} + +/** + * Adds an instruction event to the span. + * @param span - The span to add the event to. + * @param instructionAttributes - The attributes of the instruction event. + */ +export function addInstructionsEvent( + span: Span, + instructionAttributes: { + instructions?: string | null; + additional_instructions?: string | null; + threadId?: string; + agentId?: string; + }, +): void { + const eventBody: Record = {}; + if (instructionAttributes.instructions || instructionAttributes.additional_instructions) { + eventBody.content = + instructionAttributes.instructions && instructionAttributes.additional_instructions + ? `${instructionAttributes.instructions} ${instructionAttributes.additional_instructions}` + : instructionAttributes.instructions || instructionAttributes.additional_instructions; + } + const attributes = { + eventContent: JSON.stringify(eventBody), + threadId: instructionAttributes.threadId, + agentId: instructionAttributes.agentId, + genAiSystem: TracingAttributes.AZ_AI_AGENT_SYSTEM, + }; + TracingUtility.addSpanEvent(span, "gen_ai.system.message", attributes); +} + +/** + * Formats the agent API response. + * @param responseFormat - The response format option. + * @returns The formatted response as a string, or null/undefined. + */ +export function formatAgentApiResponse( + responseFormat: AgentsApiResponseFormatOption | null | undefined, +): string | undefined { + if ( + typeof responseFormat === "string" || + responseFormat === undefined || + responseFormat === null + ) { + return responseFormat ?? undefined; + } + if ((responseFormat as AgentsApiResponseFormat).type) { + return (responseFormat as AgentsApiResponseFormat).type ?? undefined; + } + return undefined; +} + +/** + * Adds a tool messages event to the span + * @param span - The span to add the event to. + * @param tool_outputs - List of tool oupts + */ +export function addToolMessagesEvent(span: Span, tool_outputs: Array): void { + tool_outputs.forEach((tool_output) => { + const eventBody = { content: tool_output.output, id: tool_output.tool_call_id }; + TracingUtility.addSpanEvent(span, "gen_ai.tool.message", { + eventContent: JSON.stringify(eventBody), + genAiSystem: TracingAttributes.AZ_AI_AGENT_SYSTEM, + }); + }); +} + +function getMessageContent(messageContent: string | MessageContent[]): string | {} { + type MessageContentExtended = MessageContent & { [key: string]: any }; + if (!Array.isArray(messageContent)) { + return messageContent; + } + const contentBody: { [key: string]: any } = {}; + messageContent.forEach((content) => { + const typedContent = content.type; + const { value, annotations } = (content as MessageContentExtended)[typedContent]; + contentBody[typedContent] = { value, annotations }; + }); + return contentBody; +} diff --git a/sdk/ai/ai-projects/src/agents/utils.ts b/sdk/ai/ai-projects/src/agents/utils.ts new file mode 100644 index 000000000000..68465ab459f7 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/utils.ts @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + AzureAISearchToolDefinition, + CodeInterpreterToolDefinition, + FileSearchToolDefinition, + FileSearchToolDefinitionDetails, + FunctionDefinition, + FunctionToolDefinition, + RequiredActionOutput, + RequiredToolCallOutput, + ToolDefinition, + ToolDefinitionOutputParent, + ToolResources, + VectorStoreConfigurations, + VectorStoreDataSource, +} from "./inputOutputs.js"; + +/** + * Determines if the given output is of the specified type. + * + * @template T - The type to check against, which extends one of the possible output parent types. + * @param output - The action to check, which can be of type `RequiredActionOutput`, `RequiredToolCallOutput`, or `ToolDefinitionOutputParent`. + * @param type - The type to check the action against. + * @returns A boolean indicating whether the action is of the specified type. + */ +export function isOutputOfType( + output: RequiredActionOutput | RequiredToolCallOutput | ToolDefinitionOutputParent, + type: string, +): output is T { + return output.type === type; +} + +/** Types of connection tools used to configure an agent */ +export enum connectionToolType { + /** Bing grounding search tool */ + BingGrounding = "bing_grounding", + /** Microsoft Fabric tool */ + MicrosoftFabric = "microsoft_fabric", + /** Sharepoint tool */ + SharepointGrounding = "sharepoint_grounding", +} + +/** + * Utility class for creating various tools. + */ +export class ToolUtility { + /** + * Creates a connection tool + * + * @param toolType - The type of the connection tool. + * @param connectionIds - A list of the IDs of the connections to use. + * @returns An object containing the definition for the connection tool + */ + static createConnectionTool( + toolType: connectionToolType, + connectionIds: string[], + ): { definition: ToolDefinition } { + return { + definition: { + type: toolType, + [toolType]: { + connections: connectionIds.map((connectionId) => ({ connectionId: connectionId })), + }, + }, + }; + } + + /** + * Creates a file search tool + * + * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. + * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool. + * @param definitionDetails - The input definition information for a file search tool as used to configure an agent. + * + * @returns An object containing the definition and resources for the file search tool + */ + static createFileSearchTool( + vectorStoreIds?: string[], + vectorStores?: Array, + definitionDetails?: FileSearchToolDefinitionDetails, + ): { definition: FileSearchToolDefinition; resources: ToolResources } { + return { + definition: { type: "file_search", fileSearch: definitionDetails }, + resources: { fileSearch: { vectorStoreIds: vectorStoreIds, vectorStores: vectorStores } }, + }; + } + + /** + * Creates a code interpreter tool + * + * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds. + * + * @returns An object containing the definition and resources for the code interpreter tool. + */ + static createCodeInterpreterTool( + fileIds?: string[], + dataSources?: Array, + ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } { + if (fileIds && dataSources) { + throw new Error("Cannot specify both fileIds and dataSources"); + } + + return { + definition: { type: "code_interpreter" }, + resources: { codeInterpreter: { fileIds: fileIds, dataSources: dataSources } }, + }; + } + + /** + * Creates an Azure AI search tool + * + * @param indexConnectionId - The connection ID of the Azure AI search index. + * @param indexName - The name of the Azure AI search index. + * + * @returns An object containing the definition and resources for the Azure AI search tool. + */ + static createAzureAISearchTool( + indexConnectionId: string, + indexName: string, + ): { definition: AzureAISearchToolDefinition; resources: ToolResources } { + return { + definition: { type: "azure_ai_search" }, + resources: { + azureAISearch: { + indexes: [{ indexConnectionId: indexConnectionId, indexName: indexName }], + }, + }, + }; + } + + /** + * Creates a function tool + * + * @param functionDefinition - The function definition to use. + * + * @returns An object containing the definition for the function tool. + */ + static createFunctionTool(functionDefinition: FunctionDefinition): { + definition: FunctionToolDefinition; + } { + return { + definition: { + type: "function", + function: functionDefinition, + }, + }; + } +} + +/** + * Represents a set of tools with their definitions and resources. + */ +export class ToolSet { + /** A list of tool definitions that have been added to the tool set. */ + toolDefinitions: ToolDefinition[] = []; + + /** A collection of resources associated with the tools in the tool set. */ + toolResources: ToolResources = {}; + + /** + * Adds a connection tool to the tool set. + * + * @param toolType - The type of the connection tool. + * @param connectionIds - A list of the IDs of the connections to use. + * + * @returns An object containing the definition for the connection tool + */ + addConnectionTool( + toolType: connectionToolType, + connectionIds: string[], + ): { definition: ToolDefinition } { + const tool = ToolUtility.createConnectionTool(toolType, connectionIds); + this.toolDefinitions.push(tool.definition); + return tool; + } + + /** + * Adds a file search tool to the tool set. + * + * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. + * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool. + * @param definitionDetails - The input definition information for a file search tool as used to configure an agent. + * + * @returns An object containing the definition and resources for the file search tool + */ + addFileSearchTool( + vectorStoreIds?: string[], + vectorStores?: Array, + definitionDetails?: FileSearchToolDefinitionDetails, + ): { definition: FileSearchToolDefinition; resources: ToolResources } { + const tool = ToolUtility.createFileSearchTool(vectorStoreIds, vectorStores, definitionDetails); + this.toolDefinitions.push(tool.definition); + this.toolResources = { ...this.toolResources, ...tool.resources }; + return tool; + } + + /** + * Adds a code interpreter tool to the tool set. + * + * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds. + * + * @returns An object containing the definition and resources for the code interpreter tool + */ + addCodeInterpreterTool( + fileIds?: string[], + dataSources?: Array, + ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } { + const tool = ToolUtility.createCodeInterpreterTool(fileIds, dataSources); + this.toolDefinitions.push(tool.definition); + this.toolResources = { ...this.toolResources, ...tool.resources }; + return tool; + } + + /** + * Adds an Azure AI search tool to the tool set. + * + * @param indexConnectionId - The connection ID of the Azure AI search index. + * @param indexName - The name of the Azure AI search index. + * + * @returns An object containing the definition and resources for the Azure AI search tool + */ + addAzureAISearchTool( + indexConnectionId: string, + indexName: string, + ): { definition: AzureAISearchToolDefinition; resources: ToolResources } { + const tool = ToolUtility.createAzureAISearchTool(indexConnectionId, indexName); + this.toolDefinitions.push(tool.definition); + this.toolResources = { ...this.toolResources, ...tool.resources }; + return tool; + } +} diff --git a/sdk/ai/ai-projects/src/agents/vectorStores.ts b/sdk/ai/ai-projects/src/agents/vectorStores.ts new file mode 100644 index 000000000000..05b10069bc31 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/vectorStores.ts @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import { operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { + ListVectorStoresParameters, + CreateVectorStoreParameters, + ModifyVectorStoreParameters, +} from "../generated/src/parameters.js"; +import type { + OpenAIPageableListOfVectorStoreOutput, + VectorStoreDeletionStatusOutput, + VectorStoreOutput, +} from "../customization/outputModels.js"; +import { AgentsPoller } from "./poller.js"; +import type { CreateVectorStoreWithPollingOptionalParams } from "./customModels.js"; +import { + type CreateVectorStoreOptionalParams, + type DeleteVectorStoreOptionalParams, + type GetVectorStoreOptionalParams, + type ListVectorStoresOptionalParams, + type UpdateVectorStoreOptionalParams, +} from "./customModels.js"; +import { + validateLimit, + validateMetadata, + validateOrder, + validateVectorStoreId, +} from "./inputValidations.js"; +import type * as GeneratedParameters from "../generated/src/parameters.js"; +import * as ConvertFromWire from "../customization/convertOutputModelsFromWire.js"; +import * as ConvertToWire from "../customization/convertModelsToWrite.js"; +import { convertToListQueryParameters } from "../customization/convertParametersToWire.js"; +import { createOpenAIError } from "./openAIError.js"; +import type { PollerLike, PollOperationState } from "@azure/core-lro"; + +const expectedStatuses = ["200"]; + +/** Returns a list of vector stores. */ +export async function listVectorStores( + context: Client, + options: ListVectorStoresOptionalParams = {}, +): Promise { + const listOptions: GeneratedParameters.ListVectorStoresParameters = { + ...operationOptionsToRequestParameters(options), + queryParameters: convertToListQueryParameters(options), + }; + + validateListVectorStoresParameters(listOptions); + const result = await context.path("/vector_stores").get(listOptions); + + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertOpenAIPageableListOfVectorStoreOutput(result.body); +} + +/** Creates a vector store. */ +export async function createVectorStore( + context: Client, + options: CreateVectorStoreOptionalParams = {}, +): Promise { + const createOptions: GeneratedParameters.CreateVectorStoreParameters = { + ...operationOptionsToRequestParameters(options), + body: ConvertToWire.convertVectorStoreOptions(options), + }; + + validateCreateVectorStoreParameters(createOptions); + const result = await context.path("/vector_stores").post(createOptions); + + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreOutput(result.body); +} + +/** Returns the vector store object matching the specified ID. */ +export async function getVectorStore( + context: Client, + vectorStoreId: string, + options: GetVectorStoreOptionalParams = {}, +): Promise { + const getOptions: GeneratedParameters.GetVectorStoreParameters = { + ...operationOptionsToRequestParameters(options), + }; + + validateVectorStoreId(vectorStoreId); + const result = await context + .path("/vector_stores/{vectorStoreId}", vectorStoreId) + .get(getOptions); + + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreOutput(result.body); +} + +/** The ID of the vector store to modify. */ +export async function modifyVectorStore( + context: Client, + vectorStoreId: string, + options: UpdateVectorStoreOptionalParams = {}, +): Promise { + const modifyOptions: GeneratedParameters.ModifyVectorStoreParameters = { + ...operationOptionsToRequestParameters(options), + body: ConvertToWire.convertVectorStoreUpdateOptions(options), + }; + + validateVectorStoreId(vectorStoreId); + validateModifyVectorStoreParameters(modifyOptions); + const result = await context + .path("/vector_stores/{vectorStoreId}", vectorStoreId) + .post(modifyOptions); + + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreOutput(result.body); +} + +/** Deletes the vector store object matching the specified ID. */ +export async function deleteVectorStore( + context: Client, + vectorStoreId: string, + options: DeleteVectorStoreOptionalParams = {}, +): Promise { + const deleteOptions: GeneratedParameters.DeleteVectorStoreParameters = { + ...operationOptionsToRequestParameters(options), + }; + + validateVectorStoreId(vectorStoreId); + const result = await context + .path("/vector_stores/{vectorStoreId}", vectorStoreId) + .delete(deleteOptions); + + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreDeletionStatusOutput(result.body); +} + +/** + * Creates a vector store and poll. + */ +export function createVectorStoreAndPoll( + context: Client, + options: CreateVectorStoreWithPollingOptionalParams = {}, +): PollerLike, VectorStoreOutput> { + async function updateCreateVectorStorePoll( + currentResult?: VectorStoreOutput, + ): Promise<{ result: VectorStoreOutput; completed: boolean }> { + let vectorStore: VectorStoreOutput; + if (!currentResult) { + vectorStore = await createVectorStore(context, options); + } else { + const getOptions: GetVectorStoreOptionalParams = { + ...operationOptionsToRequestParameters(options), + }; + vectorStore = await getVectorStore(context, currentResult.id, getOptions); + } + return { + result: vectorStore, + completed: vectorStore.status !== "in_progress", + }; + } + + return new AgentsPoller({ + update: updateCreateVectorStorePoll, + pollingOptions: options.pollingOptions, + }); +} + +function validateListVectorStoresParameters(options?: ListVectorStoresParameters): void { + if (options?.queryParameters?.limit) { + validateLimit(options.queryParameters.limit); + } + if (options?.queryParameters?.order) { + validateOrder(options.queryParameters.order); + } +} + +function validateCreateVectorStoreParameters(options?: CreateVectorStoreParameters): void { + if ( + options?.body?.chunking_strategy && + (!options.body.file_ids || options.body.file_ids.length === 0) + ) { + throw new Error("Chunking strategy is only applicable if fileIds is non-empty"); + } + if (options?.body?.metadata) { + validateMetadata(options.body.metadata); + } +} + +function validateModifyVectorStoreParameters(options?: ModifyVectorStoreParameters): void { + if (options?.body?.metadata) { + validateMetadata(options.body.metadata); + } +} diff --git a/sdk/ai/ai-projects/src/agents/vectorStoresFileBatches.ts b/sdk/ai/ai-projects/src/agents/vectorStoresFileBatches.ts new file mode 100644 index 000000000000..831999d6f307 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/vectorStoresFileBatches.ts @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import { operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { + OpenAIPageableListOfVectorStoreFileOutput, + VectorStoreFileBatchOutput, +} from "../customization/outputModels.js"; +import { AgentsPoller } from "./poller.js"; +import type { + CancelVectorStoreFileBatchOptionalParams, + CreateVectorStoreFileBatchOptionalParams, + CreateVectorStoreFileBatchWithPollingOptionalParams, + GetVectorStoreFileBatchOptionalParams, + ListVectorStoreFileBatchFilesOptionalParams, +} from "./customModels.js"; +import { + validateFileStatusFilter, + validateLimit, + validateOrder, + validateVectorStoreId, +} from "./inputValidations.js"; +import type { + CreateVectorStoreFileBatchParameters, + ListVectorStoreFileBatchFilesParameters, +} from "../generated/src/parameters.js"; +import * as ConvertFromWire from "../customization/convertOutputModelsFromWire.js"; +import * as ConvertParamsToWire from "../customization/convertParametersToWire.js"; +import { createOpenAIError } from "./openAIError.js"; +import type { PollerLike, PollOperationState } from "@azure/core-lro"; + +const expectedStatuses = ["200"]; + +/** Create a vector store file batch. */ +export async function createVectorStoreFileBatch( + context: Client, + vectorStoreId: string, + options: CreateVectorStoreFileBatchOptionalParams = {}, +): Promise { + const createOptions: CreateVectorStoreFileBatchParameters = { + ...operationOptionsToRequestParameters(options), + ...ConvertParamsToWire.convertCreateVectorStoreFileBatchParam({ body: options }), + }; + + validateVectorStoreId(vectorStoreId); + validateCreateVectorStoreFileBatchParameters(createOptions); + const result = await context + .path("/vector_stores/{vectorStoreId}/file_batches", vectorStoreId) + .post(createOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreFileBatchOutput(result.body); +} + +/** Retrieve a vector store file batch. */ +export async function getVectorStoreFileBatch( + context: Client, + vectorStoreId: string, + batchId: string, + options: GetVectorStoreFileBatchOptionalParams = {}, +): Promise { + validateVectorStoreId(vectorStoreId); + const result = await context + .path("/vector_stores/{vectorStoreId}/file_batches/{batchId}", vectorStoreId, batchId) + .get(options); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreFileBatchOutput(result.body); +} + +/** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */ +export async function cancelVectorStoreFileBatch( + context: Client, + vectorStoreId: string, + batchId: string, + options: CancelVectorStoreFileBatchOptionalParams = {}, +): Promise { + validateVectorStoreId(vectorStoreId); + const result = await context + .path("/vector_stores/{vectorStoreId}/file_batches/{batchId}/cancel", vectorStoreId, batchId) + .post(options); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreFileBatchOutput(result.body); +} + +/** Returns a list of vector store files in a batch. */ +export async function listVectorStoreFileBatchFiles( + context: Client, + vectorStoreId: string, + batchId: string, + options: ListVectorStoreFileBatchFilesOptionalParams = {}, +): Promise { + const listOptions: ListVectorStoreFileBatchFilesParameters = { + ...operationOptionsToRequestParameters(options), + queryParameters: ConvertParamsToWire.convertListVectorStoreFileBatchFilesQueryParamProperties( + options, + ) as Record, + }; + + validateVectorStoreId(vectorStoreId); + validateBatchId(batchId); + validateListVectorStoreFileBatchFilesParameters(listOptions); + const result = await context + .path("/vector_stores/{vectorStoreId}/file_batches/{batchId}/files", vectorStoreId, batchId) + .get(listOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertOpenAIPageableListOfVectorStoreFileOutput(result.body); +} + +/** Create a vector store file batch and poll. */ +export function createVectorStoreFileBatchAndPoll( + context: Client, + vectorStoreId: string, + options: CreateVectorStoreFileBatchWithPollingOptionalParams = {}, +): PollerLike, VectorStoreFileBatchOutput> { + async function updateCreateVectorStoreFileBatchPoll( + currentResult?: VectorStoreFileBatchOutput, + ): Promise<{ result: VectorStoreFileBatchOutput; completed: boolean }> { + let vectorStore: VectorStoreFileBatchOutput; + if (!currentResult) { + vectorStore = await createVectorStoreFileBatch(context, vectorStoreId, options); + } else { + vectorStore = await getVectorStoreFileBatch( + context, + vectorStoreId, + currentResult.id, + options, + ); + } + return { + result: vectorStore, + completed: vectorStore.status !== "in_progress", + }; + } + + async function cancelCreateVectorStoreFileBatchPoll( + currentResult: VectorStoreFileBatchOutput, + ): Promise { + const result = await cancelVectorStoreFileBatch(context, vectorStoreId, currentResult.id); + return result.status === "cancelled"; + } + + return new AgentsPoller({ + update: updateCreateVectorStoreFileBatchPoll, + cancel: cancelCreateVectorStoreFileBatchPoll, + pollingOptions: options.pollingOptions, + }); +} + +function validateBatchId(batchId: string): void { + if (!batchId) { + throw new Error("Batch ID is required"); + } +} + +function validateCreateVectorStoreFileBatchParameters( + options?: CreateVectorStoreFileBatchParameters, +): void { + if ( + options?.body?.chunking_strategy && + (!options.body.file_ids || options.body.file_ids.length === 0) + ) { + throw new Error("Chunking strategy is only applicable if fileIds are included"); + } +} + +function validateListVectorStoreFileBatchFilesParameters( + options?: ListVectorStoreFileBatchFilesParameters, +): void { + if (options?.queryParameters?.filter) { + validateFileStatusFilter(options.queryParameters.filter); + } + if (options?.queryParameters?.limit) { + validateLimit(options.queryParameters.limit); + } + if (options?.queryParameters?.order) { + validateOrder(options.queryParameters.order); + } +} diff --git a/sdk/ai/ai-projects/src/agents/vectorStoresFiles.ts b/sdk/ai/ai-projects/src/agents/vectorStoresFiles.ts new file mode 100644 index 000000000000..7d7bd64b7133 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/vectorStoresFiles.ts @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import { operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { + ListVectorStoreFilesParameters, + CreateVectorStoreFileParameters, +} from "../generated/src/parameters.js"; +import type { + OpenAIPageableListOfVectorStoreFileOutput, + VectorStoreFileDeletionStatusOutput, + VectorStoreFileOutput, +} from "../customization/outputModels.js"; +import { AgentsPoller } from "./poller.js"; +import type { + CreateVectorStoreFileOptionalParams, + CreateVectorStoreFileWithPollingOptionalParams, + DeleteVectorStoreFileOptionalParams, + GetVectorStoreFileOptionalParams, + ListVectorStoreFilesOptionalParams, +} from "./customModels.js"; +import { + validateFileId, + validateFileStatusFilter, + validateLimit, + validateOrder, + validateVectorStoreId, +} from "./inputValidations.js"; +import { convertToListQueryParameters } from "../customization/convertParametersToWire.js"; +import type * as GeneratedParameters from "../generated/src/parameters.js"; +import * as ConvertFromWire from "../customization/convertOutputModelsFromWire.js"; +import * as ConvertParamsToWire from "../customization/convertParametersToWire.js"; +import { createOpenAIError } from "./openAIError.js"; +import type { PollerLike, PollOperationState } from "@azure/core-lro"; + +const expectedStatuses = ["200"]; + +/** Returns a list of vector store files. */ +export async function listVectorStoreFiles( + context: Client, + vectorStoreId: string, + options: ListVectorStoreFilesOptionalParams = {}, +): Promise { + validateVectorStoreId(vectorStoreId); + + const listOptions: GeneratedParameters.ListVectorStoreFilesParameters = { + ...operationOptionsToRequestParameters(options), + queryParameters: convertToListQueryParameters(options), + }; + + validateListVectorStoreFilesParameters(listOptions); + const result = await context + .path("/vector_stores/{vectorStoreId}/files", vectorStoreId) + .get(listOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertOpenAIPageableListOfVectorStoreFileOutput(result.body); +} + +/** Create a vector store file by attaching a file to a vector store. */ +export async function createVectorStoreFile( + context: Client, + vectorStoreId: string, + options: CreateVectorStoreFileOptionalParams = {}, +): Promise { + const createOptions: CreateVectorStoreFileParameters = { + ...operationOptionsToRequestParameters(options), + ...ConvertParamsToWire.convertCreateVectorStoreFileParam({ body: options }), + }; + + validateVectorStoreId(vectorStoreId); + validateCreateVectorStoreFileParameters(createOptions); + const result = await context + .path("/vector_stores/{vectorStoreId}/files", vectorStoreId) + .post(createOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreFileOutput(result.body); +} + +/** Retrieves a vector store file. */ +export async function getVectorStoreFile( + context: Client, + vectorStoreId: string, + fileId: string, + options: GetVectorStoreFileOptionalParams = {}, +): Promise { + const getOptions: GeneratedParameters.GetVectorStoreFileParameters = { + ...operationOptionsToRequestParameters(options), + }; + + validateVectorStoreId(vectorStoreId); + validateFileId(fileId); + const result = await context + .path("/vector_stores/{vectorStoreId}/files/{fileId}", vectorStoreId, fileId) + .get(getOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreFileOutput(result.body); +} + +/** + * Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. + * To delete the file, use the delete file endpoint. + */ +export async function deleteVectorStoreFile( + context: Client, + vectorStoreId: string, + fileId: string, + options: DeleteVectorStoreFileOptionalParams = {}, +): Promise { + validateVectorStoreId(vectorStoreId); + validateFileId(fileId); + const deleteOptions: GeneratedParameters.GetVectorStoreFileParameters = { + ...operationOptionsToRequestParameters(options), + }; + const result = await context + .path("/vector_stores/{vectorStoreId}/files/{fileId}", vectorStoreId, fileId) + .delete(deleteOptions); + if (!expectedStatuses.includes(result.status)) { + throw createOpenAIError(result); + } + return ConvertFromWire.convertVectorStoreFileDeletionStatusOutput(result.body); +} + +/** Create a vector store file by attaching a file to a vector store and poll. */ +export function createVectorStoreFileAndPoll( + context: Client, + vectorStoreId: string, + options: CreateVectorStoreFileWithPollingOptionalParams = {}, +): PollerLike, VectorStoreFileOutput> { + async function updateCreateVectorStoreFilePoll( + currentResult?: VectorStoreFileOutput, + ): Promise<{ result: VectorStoreFileOutput; completed: boolean }> { + let vectorStoreFile: VectorStoreFileOutput; + if (!currentResult) { + vectorStoreFile = await createVectorStoreFile(context, vectorStoreId, options); + } else { + vectorStoreFile = await getVectorStoreFile(context, vectorStoreId, currentResult.id, options); + } + return { + result: vectorStoreFile, + completed: vectorStoreFile.status !== "in_progress", + }; + } + + return new AgentsPoller({ + update: updateCreateVectorStoreFilePoll, + pollingOptions: options.pollingOptions, + }); +} + +function validateListVectorStoreFilesParameters(options?: ListVectorStoreFilesParameters): void { + if (options?.queryParameters?.filter) { + validateFileStatusFilter(options.queryParameters.filter); + } + if (options?.queryParameters?.limit) { + validateLimit(options.queryParameters.limit); + } + if (options?.queryParameters?.order) { + validateOrder(options.queryParameters.order); + } +} + +function validateCreateVectorStoreFileParameters(options?: CreateVectorStoreFileParameters): void { + if (options?.body?.chunking_strategy && !options.body.file_id) { + throw new Error("Chunking strategy is only applicable if fileId is included"); + } +} diff --git a/sdk/ai/ai-projects/src/agents/vectorStoresModels.ts b/sdk/ai/ai-projects/src/agents/vectorStoresModels.ts new file mode 100644 index 000000000000..03b58c251467 --- /dev/null +++ b/sdk/ai/ai-projects/src/agents/vectorStoresModels.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + VectorStoreChunkingStrategyRequest, + VectorStoreDataSource, + VectorStoreFileStatusFilter, +} from "../customization/models.js"; + +/** Request object for creating a vector store file. */ +export interface CreateVectorStoreFileOptions { + /** A File ID that the vector store should use. Useful for tools like `file_search` that can access files. */ + fileId?: string; + + /** The data sources to be used. This option is mutually exclusive with fileId. */ + dataSources?: Array; + + /** The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. */ + chunkingStrategy?: VectorStoreChunkingStrategyRequest; +} + +/** Request object for creating a vector store file batch. */ +export interface CreateVectorStoreFileBatchOptions { + /** A list of File IDs that the vector store should use. Useful for tools like `file_search` that can access files. */ + fileIds?: string[]; + + /** The data sources to be used. This option is mutually exclusive with fileId. */ + dataSources?: VectorStoreDataSource[]; + + /** The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. */ + chunkingStrategy?: VectorStoreChunkingStrategyRequest; +} + +/** Filter by file status. */ +export interface FileStatusFilter { + /** + * Possible values: "in_progress", "completed", "failed", "cancelled" + */ + filter?: VectorStoreFileStatusFilter; +} diff --git a/sdk/ai/ai-projects/src/aiProjectsClient.ts b/sdk/ai/ai-projects/src/aiProjectsClient.ts new file mode 100644 index 000000000000..ad6af9c98c00 --- /dev/null +++ b/sdk/ai/ai-projects/src/aiProjectsClient.ts @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import type { Client } from "@azure-rest/core-client"; +import type { TokenCredential } from "@azure/core-auth"; +import type { AgentsOperations } from "./agents/index.js"; +import { getAgentsOperations } from "./agents/index.js"; +import type { ConnectionsOperations } from "./connections/index.js"; +import { getConnectionsOperations } from "./connections/index.js"; +import type { ProjectsClientOptions } from "./generated/src/projectsClient.js"; +import createClient from "./generated/src/projectsClient.js"; +import type { TelemetryOperations } from "./telemetry/index.js"; +import { getTelemetryOperations } from "./telemetry/index.js"; + +/** + * The options for the AIProjectsClient + */ +export interface AIProjectsClientOptions extends ProjectsClientOptions {} + +/** + * The Azure AI Projects client + */ +export class AIProjectsClient { + private _client: Client; + private _connectionClient: Client; + private _telemetryClient: Client; + + /* + * @param endpointParam - The Azure AI Foundry project endpoint, in the form `https://.api.azureml.ms` or `https://..api.azureml.ms`, where is the Azure region where the project is deployed (e.g. westus) and is the GUID of the Enterprise private link. + * @param subscriptionId - The Azure subscription ID. + * @param resourceGroupName - The name of the Azure Resource Group. + * @param projectName - The Azure AI Foundry project name. + * @param options - the parameter for all optional parameters + */ + constructor( + endpointParam: string, + subscriptionId: string, + resourceGroupName: string, + projectName: string, + credential: TokenCredential, + options: AIProjectsClientOptions = {}, + ) { + const connectionEndPoint = `https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/${projectName}`; + this._client = createClient( + endpointParam, + subscriptionId, + resourceGroupName, + projectName, + credential, + options, + ); + + this._connectionClient = createClient( + endpointParam, + subscriptionId, + resourceGroupName, + projectName, + credential, + { ...options, endpoint: connectionEndPoint }, + ); + + this._telemetryClient = createClient( + endpointParam, + subscriptionId, + resourceGroupName, + projectName, + credential, + { ...options, apiVersion: "2020-02-02", endpoint: "https://management.azure.com" }, + ); + + this.agents = getAgentsOperations(this._client); + this.connections = getConnectionsOperations(this._connectionClient); + this.telemetry = getTelemetryOperations(this._telemetryClient, this.connections); + } + + /** + * Creates a new instance of AzureAIProjectsClient + * @param connectionString - Connection string with the endpoint, subscriptionId, resourceGroupName, and projectName + * @param credential - The credential to use + * @param options - The parameter for all optional parameters + */ + static fromConnectionString( + connectionString: string, + credential: TokenCredential, + // eslint-disable-next-line @azure/azure-sdk/ts-naming-options + options: AIProjectsClientOptions = {}, + ): AIProjectsClient { + const { endpointParam, subscriptionId, resourceGroupName, projectName } = + AIProjectsClient.praseConnectionString(connectionString); + return new AIProjectsClient( + endpointParam, + subscriptionId, + resourceGroupName, + projectName, + credential, + options, + ); + } + + private static praseConnectionString(connectionString: string): { + endpointParam: string; + subscriptionId: string; + resourceGroupName: string; + projectName: string; + } { + const parts = connectionString.split(";"); + return { + endpointParam: `https://${parts[0]}`, + subscriptionId: parts[1], + resourceGroupName: parts[2], + projectName: parts[3], + }; + } + + /** The operation groups for Agents */ + public readonly agents: AgentsOperations; + + /** The operation groups for connections */ + public readonly connections: ConnectionsOperations; + + /** The operation groups for telemetry */ + public readonly telemetry: TelemetryOperations; +} diff --git a/sdk/ai/ai-projects/src/connections/connections.ts b/sdk/ai/ai-projects/src/connections/connections.ts new file mode 100644 index 000000000000..53ea38da39ca --- /dev/null +++ b/sdk/ai/ai-projects/src/connections/connections.ts @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { GetConnectionResponseOutput } from "./inputOutput.js"; +import type { + GetWorkspaceParameters, + GetConnectionParameters, + GetConnectionWithSecretsParameters, + ListConnectionsParameters, +} from "../customization/parameters.js"; +import type { + GetConnectionOptionalParams, + GetConnectionWithSecretsOptionalParams, + GetWorkspaceOptionalParams, + ListConnectionsOptionalParams, +} from "./customModels.js"; +import type { GetWorkspaceResponseOutput } from "../customization/outputModels.js"; + +const expectedStatuses = ["200"]; + +/** Gets the properties of the specified machine learning workspace. */ +export async function getWorkspace( + context: Client, + options: GetWorkspaceOptionalParams = {}, +): Promise { + const getOptions: GetWorkspaceParameters = { + ...operationOptionsToRequestParameters(options), + }; + const result = await context.path("/").get(getOptions); + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + return result.body; +} + +/** List the details of all the connections (not including their credentials) */ +export async function listConnections( + context: Client, + options: ListConnectionsOptionalParams = {}, +): Promise> { + const listOptions: ListConnectionsParameters = { + ...operationOptionsToRequestParameters(options), + queryParameters: { + ...(options.includeAll && { includeAll: options.includeAll }), + ...(options.category && { category: options.category }), + ...(options.target && { target: options.target }), + }, + }; + const result = await context.path("/connections").get(listOptions); + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + return result.body.value; +} + +/** Get the details of a single connection, without credentials. */ +export async function getConnection( + context: Client, + connectionName: string, + options: GetConnectionOptionalParams = {}, +): Promise { + const getOptions: GetConnectionParameters = { + ...operationOptionsToRequestParameters(options), + }; + const result = await context + .path("/connections/{connectionName}", connectionName) + .get(getOptions); + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + return result.body; +} + +/** Get the details of a single connection, including credentials (if available). */ +export async function getConnectionWithSecrets( + context: Client, + connectionName: string, + options: GetConnectionWithSecretsOptionalParams = {}, +): Promise { + const getOptions: GetConnectionWithSecretsParameters = { + ...operationOptionsToRequestParameters(options), + body: { + ignored: "", + }, + }; + const result = await context + .path("/connections/{connectionName}/listsecrets", connectionName) + .post(getOptions); + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + return result.body; +} diff --git a/sdk/ai/ai-projects/src/connections/customModels.ts b/sdk/ai/ai-projects/src/connections/customModels.ts new file mode 100644 index 000000000000..0c29ea92d723 --- /dev/null +++ b/sdk/ai/ai-projects/src/connections/customModels.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { OperationOptions } from "@azure-rest/core-client"; +import type { ListConnectionsQueryParamProperties } from "../customization/parameters.js"; +import type { GetConnectionResponseOutput } from "../customization/outputModels.js"; + +/** Get workspace optional parameters. */ +export interface GetWorkspaceOptionalParams extends OperationOptions {} + +/** List connections optional parameters. */ +export interface ListConnectionsOptionalParams + extends ListConnectionsQueryParamProperties, + OperationOptions {} + +/** Get connection optional parameters. */ +export interface GetConnectionOptionalParams extends OperationOptions {} + +/** Get connection with secrets optional parameters. */ +export interface GetConnectionWithSecretsOptionalParams extends OperationOptions {} + +/** + * Connections Interface for managing connections. + */ +export interface ConnectionsOperations { + /** List the details of all the connections (not including their credentials) */ + listConnections: ( + options?: ListConnectionsOptionalParams, + ) => Promise>; + /** Get the details of a single connection, without credentials */ + getConnection: ( + connectionName: string, + options?: GetConnectionOptionalParams, + ) => Promise; + /** Get the details of a single connections, including credentials (if available). */ + getConnectionWithSecrets: ( + connectionName: string, + options?: GetConnectionWithSecretsOptionalParams, + ) => Promise; +} diff --git a/sdk/ai/ai-projects/src/connections/index.ts b/sdk/ai/ai-projects/src/connections/index.ts new file mode 100644 index 000000000000..e25191c06250 --- /dev/null +++ b/sdk/ai/ai-projects/src/connections/index.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; + +import { + getConnection, + getConnectionWithSecrets, + getWorkspace, + listConnections, +} from "./connections.js"; +import type { + ConnectionsOperations, + GetConnectionOptionalParams, + GetConnectionWithSecretsOptionalParams, + GetWorkspaceOptionalParams, + ListConnectionsOptionalParams, +} from "./customModels.js"; +import type { ConnectionsInternalOperations } from "./internalModels.js"; + +export * from "./inputOutput.js"; + +function getConnections(context: Client): ConnectionsInternalOperations { + return { + getWorkspace: (options?: GetWorkspaceOptionalParams) => getWorkspace(context, options), + listConnections: (options?: ListConnectionsOptionalParams) => listConnections(context, options), + getConnection: (connectionName: string, options?: GetConnectionOptionalParams) => + getConnection(context, connectionName, options), + getConnectionWithSecrets: ( + connectionName: string, + options?: GetConnectionWithSecretsOptionalParams, + ) => getConnectionWithSecrets(context, connectionName, options), + }; +} + +/** + * Get the connections operations + * @returns The connections operations + **/ +export function getConnectionsOperations(context: Client): ConnectionsOperations { + return { + ...getConnections(context), + }; +} diff --git a/sdk/ai/ai-projects/src/connections/inputOutput.ts b/sdk/ai/ai-projects/src/connections/inputOutput.ts new file mode 100644 index 000000000000..23a4ba36c76d --- /dev/null +++ b/sdk/ai/ai-projects/src/connections/inputOutput.ts @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { ListConnectionsQueryParamProperties } from "../customization/parameters.js"; +export { + GetConnectionResponseOutput, + InternalConnectionPropertiesOutput, + InternalConnectionPropertiesOutputParent, + InternalConnectionPropertiesApiKeyAuthOutput, + InternalConnectionPropertiesAADAuthOutput, + InternalConnectionPropertiesSASAuthOutput, + CredentialsApiKeyAuthOutput, + AuthenticationTypeOutput, + ConnectionTypeOutput, + CredentialsSASAuthOutput, +} from "../customization/outputModels.js"; + +export * from "./customModels.js"; diff --git a/sdk/ai/ai-projects/src/connections/internalModels.ts b/sdk/ai/ai-projects/src/connections/internalModels.ts new file mode 100644 index 000000000000..a3764c0fa3e6 --- /dev/null +++ b/sdk/ai/ai-projects/src/connections/internalModels.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { GetWorkspaceResponseOutput } from "../customization/outputModels.js"; +import type { ConnectionsOperations, GetWorkspaceOptionalParams } from "./customModels.js"; + +export interface ConnectionsInternalOperations extends ConnectionsOperations { + /** Gets the properties of the specified machine learning workspace. */ + getWorkspace: (options?: GetWorkspaceOptionalParams) => Promise; +} diff --git a/sdk/ai/ai-projects/src/constants.ts b/sdk/ai/ai-projects/src/constants.ts new file mode 100644 index 000000000000..fe3152c1805e --- /dev/null +++ b/sdk/ai/ai-projects/src/constants.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Current version of the `@azure/ai-projects` package. + */ +export const SDK_VERSION = `1.0.0-beta.1`; + +/** + * The package name of the `@azure/ai-projects` package. + */ +export const PACKAGE_NAME = "@azure/ai-projects"; diff --git a/sdk/ai/ai-projects/src/customization/convertModelsToWrite.ts b/sdk/ai/ai-projects/src/customization/convertModelsToWrite.ts new file mode 100644 index 000000000000..8c4886287cc3 --- /dev/null +++ b/sdk/ai/ai-projects/src/customization/convertModelsToWrite.ts @@ -0,0 +1,624 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type * as PublicModels from "./models.js"; +import type * as GeneratedModels from "../generated/src/models.js"; + +// Conversion functions +export function convertCreateAgentOptions( + source: PublicModels.CreateAgentOptions, +): GeneratedModels.CreateAgentOptions { + return { + model: source.model, + ...(source.name && { name: source.name }), + ...(source.description && { description: source.description }), + ...(source.instructions && { instructions: source.instructions }), + ...(source.tools && { tools: source.tools.map(convertToolDefinition) }), + ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }), + ...(source.temperature !== undefined && { temperature: source.temperature }), + ...(source.topP !== undefined && { top_p: source.topP }), + ...(source.responseFormat && { response_format: source.responseFormat }), + ...(source.metadata && { metadata: source.metadata }), + }; +} + +function convertToolResources(source: PublicModels.ToolResources): GeneratedModels.ToolResources { + return { + ...(source.codeInterpreter && { + code_interpreter: convertCodeInterpreterToolResource(source.codeInterpreter), + }), + ...(source.fileSearch && { file_search: convertFileSearchToolResource(source.fileSearch) }), + ...(source.azureAISearch && { + azure_ai_search: convertAzureAISearchResource(source.azureAISearch), + }), + }; +} + +function convertMessageAttachmentToolDefinition( + source: PublicModels.MessageAttachmentToolDefinition, +): GeneratedModels.MessageAttachmentToolDefinition { + switch (source.type) { + case "code_interpreter": + return convertCodeInterpreterToolDefinition( + source as PublicModels.CodeInterpreterToolDefinition, + ); + case "file_search": + return convertFileSearchToolDefinition(source as PublicModels.FileSearchToolDefinition); + default: + throw new Error(`Unknown tool type: ${source}`); + } +} + +function convertToolDefinition( + source: PublicModels.ToolDefinition, +): GeneratedModels.ToolDefinition { + switch (source.type) { + case "code_interpreter": + return convertCodeInterpreterToolDefinition( + source as PublicModels.CodeInterpreterToolDefinition, + ); + case "file_search": + return convertFileSearchToolDefinition(source as PublicModels.FileSearchToolDefinition); + case "function": + return convertFunctionToolDefinition(source as PublicModels.FunctionToolDefinition); + case "bing_grounding": + return convertBingGroundingToolDefinition(source as PublicModels.BingGroundingToolDefinition); + case "microsoft_fabric": + return convertMicrosoftFabricToolDefinition( + source as PublicModels.MicrosoftFabricToolDefinition, + ); + case "sharepoint_grounding": + return convertSharepointToolDefinition(source as PublicModels.SharepointToolDefinition); + case "azure_ai_search": + return convertAzureAISearchToolDefinition(source as PublicModels.AzureAISearchToolDefinition); + default: + throw new Error(`Unknown tool type: ${source.type}`); + } +} + +function convertCodeInterpreterToolDefinition( + source: PublicModels.CodeInterpreterToolDefinition, +): GeneratedModels.CodeInterpreterToolDefinition { + return { + type: source.type, + }; +} + +function convertFileSearchToolDefinition( + source: PublicModels.FileSearchToolDefinition, +): GeneratedModels.FileSearchToolDefinition { + return { + type: source.type, + ...(source.fileSearch && { + file_search: convertFileSearchToolDefinitionDetails(source.fileSearch), + }), + }; +} + +function convertFunctionToolDefinition( + source: PublicModels.FunctionToolDefinition, +): GeneratedModels.FunctionToolDefinition { + return { + type: source.type, + function: convertFunctionDefinition(source.function), + }; +} + +function convertBingGroundingToolDefinition( + source: PublicModels.BingGroundingToolDefinition, +): GeneratedModels.BingGroundingToolDefinition { + return { + type: source.type, + bing_grounding: convertToolConnectionList(source.bingGrounding), + }; +} + +function convertMicrosoftFabricToolDefinition( + source: PublicModels.MicrosoftFabricToolDefinition, +): GeneratedModels.MicrosoftFabricToolDefinition { + return { + type: source.type, + microsoft_fabric: convertToolConnectionList(source.microsoftFabric), + }; +} + +function convertSharepointToolDefinition( + source: PublicModels.SharepointToolDefinition, +): GeneratedModels.SharepointToolDefinition { + return { + type: source.type, + sharepoint_grounding: convertToolConnectionList(source.sharepointGrounding), + }; +} + +function convertAzureAISearchToolDefinition( + source: PublicModels.AzureAISearchToolDefinition, +): GeneratedModels.AzureAISearchToolDefinition { + return { + type: source.type, + }; +} + +function convertFileSearchToolDefinitionDetails( + source: PublicModels.FileSearchToolDefinitionDetails, +): GeneratedModels.FileSearchToolDefinitionDetails { + return { + ...(source.maxNumResults && { max_num_results: source.maxNumResults }), + ...(source.rankingOptions && { + ranking_options: convertFileSearchRankingOptions(source.rankingOptions), + }), + }; +} + +function convertFileSearchRankingOptions( + source: PublicModels.FileSearchRankingOptions, +): GeneratedModels.FileSearchRankingOptions { + return { + ranker: source.ranker, + score_threshold: source.scoreThreshold, + }; +} + +function convertCodeInterpreterToolResource( + source: PublicModels.CodeInterpreterToolResource, +): GeneratedModels.CodeInterpreterToolResource { + return { + file_ids: source.fileIds, + ...(source.dataSources && { + data_sources: source.dataSources.map(convertVectorStoreDataSource), + }), + }; +} + +export function convertVectorStoreDataSource( + source: PublicModels.VectorStoreDataSource, +): GeneratedModels.VectorStoreDataSource { + return { + uri: source.uri, + type: source.type, + }; +} + +function convertFileSearchToolResource( + source: PublicModels.FileSearchToolResource, +): GeneratedModels.FileSearchToolResource { + return { + ...(source.vectorStoreIds && { vector_store_ids: source.vectorStoreIds }), + ...(source.vectorStores && { + vector_stores: source.vectorStores.map(convertVectorStoreConfigurations), + }), + }; +} + +function convertVectorStoreConfigurations( + source: PublicModels.VectorStoreConfigurations, +): GeneratedModels.VectorStoreConfigurations { + return { + name: source.name, + configuration: convertVectorStoreConfiguration(source.configuration), + }; +} + +function convertVectorStoreConfiguration( + source: PublicModels.VectorStoreConfiguration, +): GeneratedModels.VectorStoreConfiguration { + return { + data_sources: source.dataSources.map(convertVectorStoreDataSource), + }; +} + +function convertAzureAISearchResource( + source: PublicModels.AzureAISearchResource, +): GeneratedModels.AzureAISearchResource { + return { + ...(source.indexes && { indexes: source.indexes.map(convertIndexResource) }), + }; +} + +function convertIndexResource(source: PublicModels.IndexResource): GeneratedModels.IndexResource { + return { + index_connection_id: source.indexConnectionId, + index_name: source.indexName, + }; +} + +export function convertUpdateAgentOptions( + source: PublicModels.UpdateAgentOptions, +): GeneratedModels.UpdateAgentOptions { + return { + ...(source.model && { model: source.model }), + ...(source.name && { name: source.name }), + ...(source.description && { description: source.description }), + ...(source.instructions && { instructions: source.instructions }), + ...(source.tools && { tools: source.tools.map(convertToolDefinition) }), + ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }), + ...(source.temperature !== undefined && { temperature: source.temperature }), + ...(source.topP !== undefined && { top_p: source.topP }), + ...(source.responseFormat && { response_format: source.responseFormat }), + ...(source.metadata && { metadata: source.metadata }), + }; +} + +export function convertAgentThreadCreationOptions( + source: PublicModels.AgentThreadCreationOptions, +): GeneratedModels.AgentThreadCreationOptions { + return { + ...(source.messages && { messages: source.messages.map(convertThreadMessageOptions) }), + ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }), + ...(source.metadata && { metadata: source.metadata }), + }; +} + +export function convertAgentThreadUpdateOptions( + source: PublicModels.UpdateAgentThreadOptions, +): GeneratedModels.UpdateAgentThreadOptions { + return { + ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }), + ...(source.metadata && { metadata: source.metadata }), + }; +} + +function convertThreadMessageOptions( + source: PublicModels.ThreadMessageOptions, +): GeneratedModels.ThreadMessageOptions { + return { + role: source.role, + content: source.content, + ...(source.attachments && { attachments: source.attachments.map(convertMessageAttachment) }), + ...(source.metadata && { metadata: source.metadata }), + }; +} + +function convertMessageAttachment( + source: PublicModels.MessageAttachment, +): GeneratedModels.MessageAttachment { + return { + file_id: source.fileId, + ...(source.dataSources && { + data_sources: source.dataSources.map(convertVectorStoreDataSource), + }), + ...(source.tools && { tools: source.tools.map(convertMessageAttachmentToolDefinition) }), + }; +} + +export function convertCreateRunOptions( + source: PublicModels.CreateRunOptions, +): GeneratedModels.CreateRunOptions { + return { + assistant_id: source.assistantId, + ...(source.model && { model: source.model }), + ...(source.instructions && { instructions: source.instructions }), + ...(source.additionalInstructions && { + additional_instructions: source.additionalInstructions, + }), + ...(source.additionalMessages && { + additional_messages: source.additionalMessages.map(convertThreadMessage), + }), + ...(source.tools && { tools: source.tools.map(convertToolDefinition) }), + ...(source.stream !== undefined && { stream: source.stream }), + ...(source.temperature !== undefined && { temperature: source.temperature }), + ...(source.topP !== undefined && { top_p: source.topP }), + ...(source.maxPromptTokens !== undefined && { max_prompt_tokens: source.maxPromptTokens }), + ...(source.maxCompletionTokens !== undefined && { + max_completion_tokens: source.maxCompletionTokens, + }), + ...(source.truncationStrategy && { + truncation_strategy: convertTruncationObject(source.truncationStrategy), + }), + ...(source.toolChoice && { tool_choice: source.toolChoice }), + ...(source.responseFormat && { response_format: source.responseFormat }), + ...(source.metadata && { metadata: source.metadata }), + }; +} + +function convertTruncationObject( + source: PublicModels.TruncationObject, +): GeneratedModels.TruncationObject { + return { + type: source.type, + ...(source.lastMessages !== undefined && { last_messages: source.lastMessages }), + }; +} + +function convertUpdateToolResourcesOptions( + source: PublicModels.UpdateToolResourcesOptions, +): GeneratedModels.UpdateToolResourcesOptions { + return { + ...(source.codeInterpreter && { + code_interpreter: convertUpdateCodeInterpreterToolResourceOptions(source.codeInterpreter), + }), + ...(source.fileSearch && { + file_search: convertUpdateFileSearchToolResourceOptions(source.fileSearch), + }), + ...(source.azureAISearch && { + azure_ai_search: convertAzureAISearchResource(source.azureAISearch), + }), + }; +} + +function convertUpdateCodeInterpreterToolResourceOptions( + source: PublicModels.UpdateCodeInterpreterToolResourceOptions, +): GeneratedModels.UpdateCodeInterpreterToolResourceOptions { + return { + ...(source.fileIds && { file_ids: source.fileIds }), + }; +} + +function convertUpdateFileSearchToolResourceOptions( + source: PublicModels.UpdateFileSearchToolResourceOptions, +): GeneratedModels.UpdateFileSearchToolResourceOptions { + return { + ...(source.vectorStoreIds && { vector_store_ids: source.vectorStoreIds }), + }; +} + +export function convertToolOutput(source: PublicModels.ToolOutput): GeneratedModels.ToolOutput { + return { + ...(source.toolCallId !== undefined && { tool_call_id: source.toolCallId }), + ...(source.output !== undefined && { output: source.output }), + }; +} + +export function convertCreateAndRunThreadOptions( + source: PublicModels.CreateAndRunThreadOptions, +): GeneratedModels.CreateAndRunThreadOptions { + return { + assistant_id: source.assistantId, + ...(source.thread && { thread: convertAgentThreadCreationOptions(source.thread) }), + ...(source.model && { model: source.model }), + ...(source.instructions && { instructions: source.instructions }), + ...(source.tools && { tools: source.tools.map(convertToolDefinition) }), + ...(source.toolResources && { + tool_resources: convertUpdateToolResourcesOptions(source.toolResources), + }), + ...(source.stream !== undefined && { stream: source.stream }), + ...(source.temperature !== undefined && { temperature: source.temperature }), + ...(source.topP !== undefined && { top_p: source.topP }), + ...(source.maxPromptTokens !== undefined && { max_prompt_tokens: source.maxPromptTokens }), + ...(source.maxCompletionTokens !== undefined && { + max_completion_tokens: source.maxCompletionTokens, + }), + ...(source.truncationStrategy && { + truncation_strategy: convertTruncationObject(source.truncationStrategy), + }), + ...(source.toolChoice && { tool_choice: source.toolChoice }), + ...(source.responseFormat && { response_format: source.responseFormat }), + ...(source.metadata && { metadata: source.metadata }), + }; +} + +function convertVectorStoreExpirationPolicy( + source: PublicModels.VectorStoreExpirationPolicy, +): GeneratedModels.VectorStoreExpirationPolicy { + return { + anchor: source.anchor, + days: source.days, + }; +} + +export function convertVectorStoreOptions( + source: PublicModels.VectorStoreOptions, +): GeneratedModels.VectorStoreOptions { + return { + ...(source.fileIds && { file_ids: source.fileIds }), + ...(source.name && { name: source.name }), + ...(source.configuration && { + configuration: convertVectorStoreConfiguration(source.configuration), + }), + ...(source.expiresAfter && { + expires_after: convertVectorStoreExpirationPolicy(source.expiresAfter), + }), + ...(source.chunkingStrategy && { + chunking_strategy: convertVectorStoreChunkingStrategyRequest(source.chunkingStrategy), + }), + ...(source.metadata && { metadata: source.metadata }), + }; +} + +export function convertVectorStoreChunkingStrategyRequest( + source: PublicModels.VectorStoreChunkingStrategyRequest, +): GeneratedModels.VectorStoreChunkingStrategyRequest { + switch (source.type) { + case "auto": + return source as GeneratedModels.VectorStoreAutoChunkingStrategyRequest; + case "static": + return convertVectorStoreStaticChunkingStrategyRequest( + source as PublicModels.VectorStoreStaticChunkingStrategyRequest, + ); + default: + throw new Error(`Unknown chunking strategy type: ${source.type}`); + } +} + +function convertVectorStoreStaticChunkingStrategyRequest( + source: PublicModels.VectorStoreStaticChunkingStrategyRequest, +): GeneratedModels.VectorStoreStaticChunkingStrategyRequest { + return { + ...source, + static: convertVectorStoreStaticChunkingStrategyOptions(source.static), + }; +} + +function convertVectorStoreStaticChunkingStrategyOptions( + source: PublicModels.VectorStoreStaticChunkingStrategyOptions, +): GeneratedModels.VectorStoreStaticChunkingStrategyOptions { + return { + max_chunk_size_tokens: source.maxChunkSizeTokens, + chunk_overlap_tokens: source.chunkOverlapTokens, + }; +} + +export function convertVectorStoreUpdateOptions( + source: PublicModels.VectorStoreUpdateOptions, +): GeneratedModels.VectorStoreUpdateOptions { + return { + ...(source.name && { name: source.name }), + ...(source.expiresAfter && { + expires_after: convertVectorStoreExpirationPolicy(source.expiresAfter), + }), + ...(source.metadata && { metadata: source.metadata }), + }; +} + +function convertFunctionDefinition( + source: PublicModels.FunctionDefinition, +): GeneratedModels.FunctionDefinition { + return { + name: source.name, + ...(source.description && { description: source.description }), + parameters: source.parameters, + }; +} + +function convertToolConnectionList( + source: PublicModels.ToolConnectionList, +): GeneratedModels.ToolConnectionList { + return { + ...(source.connections && { connections: source.connections.map(convertToolConnection) }), + }; +} + +function convertToolConnection( + source: PublicModels.ToolConnection, +): GeneratedModels.ToolConnection { + return { + connection_id: source.connectionId, + }; +} + +function convertThreadMessage(source: PublicModels.ThreadMessage): GeneratedModels.ThreadMessage { + return { + id: source.id, + object: source.object, + created_at: source.createdAt, + thread_id: source.threadId, + status: source.status, + incomplete_details: !source.incompleteDetails + ? source.incompleteDetails + : convertMessageIncompleteDetails(source.incompleteDetails), + completed_at: source.completedAt, + incomplete_at: source.incompleteAt, + role: source.role, + content: source.content.map(convertMessageContent), + assistant_id: source.assistantId, + run_id: source.runId, + attachments: !source.attachments + ? source.attachments + : source.attachments?.map(convertMessageAttachment), + metadata: source.metadata, + }; +} + +function convertMessageIncompleteDetails( + source: PublicModels.MessageIncompleteDetails, +): GeneratedModels.MessageIncompleteDetails { + return { + reason: source.reason, + }; +} + +function convertMessageContent( + source: PublicModels.MessageContent, +): GeneratedModels.MessageContent { + switch (source.type) { + case "text": + return convertMessageTextContent(source as PublicModels.MessageTextContent); + case "image_file": + return convertMessageImageFileContent(source as PublicModels.MessageImageFileContent); + default: + throw new Error(`Unknown message content type: ${source.type}`); + } +} + +function convertMessageTextContent( + source: PublicModels.MessageTextContent, +): GeneratedModels.MessageTextContent { + return { + type: "text", + text: convertMessageTextDetails(source.text), + }; +} + +function convertMessageTextDetails( + source: PublicModels.MessageTextDetails, +): GeneratedModels.MessageTextDetails { + return { + value: source.value, + annotations: source.annotations.map(convertMessageTextAnnotation), + }; +} + +function convertMessageTextAnnotation( + source: PublicModels.MessageTextAnnotation, +): GeneratedModels.MessageTextAnnotation { + switch (source.type) { + case "file_citation": + return convertMessageTextFileCitationAnnotation( + source as PublicModels.MessageTextFileCitationAnnotation, + ); + case "file_path": + return convertMessageTextFilePathAnnotation( + source as PublicModels.MessageTextFilePathAnnotation, + ); + default: + throw new Error(`Unknown message text annotation type: ${source.type}`); + } +} + +function convertMessageTextFileCitationAnnotation( + source: PublicModels.MessageTextFileCitationAnnotation, +): GeneratedModels.MessageTextFileCitationAnnotation { + return { + text: source.text, + type: "file_citation", + file_citation: convertMessageTextFileCitationDetails(source.fileCitation), + ...(source.startIndex && { start_index: source.startIndex }), + ...(source.endIndex && { end_index: source.endIndex }), + }; +} + +function convertMessageTextFileCitationDetails( + source: PublicModels.MessageTextFileCitationDetails, +): GeneratedModels.MessageTextFileCitationDetails { + return { + file_id: source.fileId, + quote: source.quote, + }; +} + +function convertMessageTextFilePathAnnotation( + source: PublicModels.MessageTextFilePathAnnotation, +): GeneratedModels.MessageTextFilePathAnnotation { + return { + text: source.text, + type: "file_path", + file_path: convertMessageTextFilePathDetails(source.filePath), + ...(source.startIndex && { start_index: source.startIndex }), + ...(source.endIndex && { end_index: source.endIndex }), + }; +} + +function convertMessageTextFilePathDetails( + source: PublicModels.MessageTextFilePathDetails, +): GeneratedModels.MessageTextFilePathDetails { + return { + file_id: source.fileId, + }; +} + +function convertMessageImageFileContent( + source: PublicModels.MessageImageFileContent, +): GeneratedModels.MessageImageFileContent { + return { + type: "image_file", + image_file: convertMessageImageFileDetails(source.imageFile), + }; +} + +function convertMessageImageFileDetails( + source: PublicModels.MessageImageFileDetails, +): GeneratedModels.MessageImageFileDetails { + return { + file_id: source.fileId, + }; +} diff --git a/sdk/ai/ai-projects/src/customization/convertOutputModelsFromWire.ts b/sdk/ai/ai-projects/src/customization/convertOutputModelsFromWire.ts new file mode 100644 index 000000000000..677651ca6bee --- /dev/null +++ b/sdk/ai/ai-projects/src/customization/convertOutputModelsFromWire.ts @@ -0,0 +1,1354 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type * as GeneratedModels from "../generated/src/outputModels.js"; +import type * as PublicModels from "./outputModels.js"; +import type * as WireStreamingModels from "./streamingWireModels.js"; +import type * as PublicStreamingModels from "./streamingModels.js"; +import { logger } from "../logger.js"; + +// Conversion functions + +function convertCodeInterpreterToolDefinitionOutput( + input: GeneratedModels.CodeInterpreterToolDefinitionOutput, +): PublicModels.CodeInterpreterToolDefinitionOutput { + return { ...input }; +} + +function convertFileSearchToolDefinitionOutput( + input: GeneratedModels.FileSearchToolDefinitionOutput, +): PublicModels.FileSearchToolDefinitionOutput { + return { + type: "file_search", + fileSearch: input.file_search + ? convertFileSearchToolDefinitionDetailsOutput(input.file_search) + : undefined, + }; +} + +function convertFileSearchToolDefinitionDetailsOutput( + input: GeneratedModels.FileSearchToolDefinitionDetailsOutput, +): PublicModels.FileSearchToolDefinitionDetailsOutput { + return { + maxNumResults: input.max_num_results, + rankingOptions: input.ranking_options + ? convertFileSearchRankingOptionsOutput(input.ranking_options) + : undefined, + }; +} + +function convertFileSearchRankingOptionsOutput( + input: GeneratedModels.FileSearchRankingOptionsOutput, +): PublicModels.FileSearchRankingOptionsOutput { + return { + ranker: input.ranker, + scoreThreshold: input.score_threshold, + }; +} + +function convertFunctionToolDefinitionOutput( + input: GeneratedModels.FunctionToolDefinitionOutput, +): PublicModels.FunctionToolDefinitionOutput { + return { + type: "function", + function: input.function && convertFunctionDefinitionOutput(input.function), + }; +} + +function convertFunctionDefinitionOutput( + input: GeneratedModels.FunctionDefinitionOutput, +): PublicModels.FunctionDefinitionOutput { + return { ...input }; +} + +function convertBingGroundingToolDefinitionOutput( + input: GeneratedModels.BingGroundingToolDefinitionOutput, +): PublicModels.BingGroundingToolDefinitionOutput { + return { + type: "bing_grounding", + bingGrounding: input.bing_grounding && convertToolConnectionListOutput(input.bing_grounding), + }; +} + +function convertToolConnectionListOutput( + input: GeneratedModels.ToolConnectionListOutput, +): PublicModels.ToolConnectionListOutput { + return { + connections: input.connections?.map(convertToolConnectionOutput), + }; +} + +function convertToolConnectionOutput( + input: GeneratedModels.ToolConnectionOutput, +): PublicModels.ToolConnectionOutput { + return { connectionId: input.connection_id }; +} + +function convertMicrosoftFabricToolDefinitionOutput( + input: GeneratedModels.MicrosoftFabricToolDefinitionOutput, +): PublicModels.MicrosoftFabricToolDefinitionOutput { + return { + type: "microsoft_fabric", + microsoftFabric: + input.microsoft_fabric && convertToolConnectionListOutput(input.microsoft_fabric), + }; +} + +function convertSharepointToolDefinitionOutput( + input: GeneratedModels.SharepointToolDefinitionOutput, +): PublicModels.SharepointToolDefinitionOutput { + return { + type: "sharepoint_grounding", + sharepointGrounding: + input.sharepoint_grounding && convertToolConnectionListOutput(input.sharepoint_grounding), + }; +} + +function convertAzureAISearchToolDefinitionOutput( + input: GeneratedModels.AzureAISearchToolDefinitionOutput, +): PublicModels.AzureAISearchToolDefinitionOutput { + return { ...input }; +} + +function convertToolResourcesOutput( + input: GeneratedModels.ToolResourcesOutput, +): PublicModels.ToolResourcesOutput { + return { + codeInterpreter: input.code_interpreter + ? convertCodeInterpreterToolResourceOutput(input.code_interpreter) + : undefined, + fileSearch: input.file_search + ? convertFileSearchToolResourceOutput(input.file_search) + : undefined, + azureAISearch: input.azure_ai_search + ? convertAzureAISearchResourceOutput(input.azure_ai_search) + : undefined, + }; +} + +function convertCodeInterpreterToolResourceOutput( + input: GeneratedModels.CodeInterpreterToolResourceOutput, +): PublicModels.CodeInterpreterToolResourceOutput { + return { + fileIds: input.file_ids, + dataSources: input.data_sources?.map(convertVectorStoreDataSourceOutput), + }; +} + +function convertVectorStoreDataSourceOutput( + input: GeneratedModels.VectorStoreDataSourceOutput, +): PublicModels.VectorStoreDataSourceOutput { + return { ...input }; +} + +function convertFileSearchToolResourceOutput( + input: GeneratedModels.FileSearchToolResourceOutput, +): PublicModels.FileSearchToolResourceOutput { + return { + vectorStoreIds: input.vector_store_ids, + vectorStores: input.vector_stores?.map(convertVectorStoreConfigurationsOutput), + }; +} + +function convertVectorStoreConfigurationsOutput( + input: GeneratedModels.VectorStoreConfigurationsOutput, +): PublicModels.VectorStoreConfigurationsOutput { + return { + name: input.name, + configuration: + input.configuration && convertVectorStoreConfigurationOutput(input.configuration), + }; +} + +function convertVectorStoreConfigurationOutput( + input: GeneratedModels.VectorStoreConfigurationOutput, +): PublicModels.VectorStoreConfigurationOutput { + return { + ...input, + dataSources: input.data_sources?.map(convertVectorStoreDataSourceOutput), + }; +} + +function convertAzureAISearchResourceOutput( + input: GeneratedModels.AzureAISearchResourceOutput, +): PublicModels.AzureAISearchResourceOutput { + return { + indexes: input.indexes?.map(convertIndexResourceOutput), + }; +} + +function convertIndexResourceOutput( + input: GeneratedModels.IndexResourceOutput, +): PublicModels.IndexResourceOutput { + return { indexConnectionId: input.index_connection_id, indexName: input.index_name }; +} + +export function convertAgentOutput(input: GeneratedModels.AgentOutput): PublicModels.AgentOutput { + return { + id: input.id, + object: input.object, + createdAt: new Date(input.created_at), + name: input.name, + description: input.description, + model: input.model, + instructions: input.instructions, + tools: input.tools?.map(convertToolDefinitionOutput), + toolResources: input.tool_resources ? convertToolResourcesOutput(input.tool_resources) : null, + temperature: input.temperature, + topP: input.top_p, + responseFormat: input.response_format + ? convertAgentsApiResponseFormatOptionOutput(input.response_format) + : null, + metadata: input.metadata, + }; +} +function convertToolDefinitionOutput( + tool: GeneratedModels.ToolDefinitionOutput, +): PublicModels.ToolDefinitionOutput { + switch (tool.type) { + case "code_interpreter": + return convertCodeInterpreterToolDefinitionOutput( + tool as GeneratedModels.CodeInterpreterToolDefinitionOutput, + ); + case "file_search": + return convertFileSearchToolDefinitionOutput( + tool as GeneratedModels.FileSearchToolDefinitionOutput, + ); + case "function": + return convertFunctionToolDefinitionOutput( + tool as GeneratedModels.FunctionToolDefinitionOutput, + ); + case "bing_grounding": + return convertBingGroundingToolDefinitionOutput( + tool as GeneratedModels.BingGroundingToolDefinitionOutput, + ); + case "microsoft_fabric": + return convertMicrosoftFabricToolDefinitionOutput( + tool as GeneratedModels.MicrosoftFabricToolDefinitionOutput, + ); + case "sharepoint_grounding": + return convertSharepointToolDefinitionOutput( + tool as GeneratedModels.SharepointToolDefinitionOutput, + ); + case "azure_ai_search": + return convertAzureAISearchToolDefinitionOutput( + tool as GeneratedModels.AzureAISearchToolDefinitionOutput, + ); + default: + return tool; + } +} + +function convertAgentsApiResponseFormatOptionOutput( + input: GeneratedModels.AgentsApiResponseFormatOptionOutput, +): PublicModels.AgentsApiResponseFormatOptionOutput { + return input; +} + +export function convertOpenAIPageableListOfAgentOutput( + input: GeneratedModels.OpenAIPageableListOfAgentOutput, +): PublicModels.OpenAIPageableListOfAgentOutput { + return { + object: input.object, + firstId: input.first_id, + lastId: input.last_id, + hasMore: input.has_more, + data: input.data.map(convertAgentOutput), + }; +} + +export function convertAgentDeletionStatusOutput( + input: GeneratedModels.AgentDeletionStatusOutput, +): PublicModels.AgentDeletionStatusOutput { + return { ...input }; +} + +function convertMessageAttachmentOutput( + input: GeneratedModels.MessageAttachmentOutput, +): PublicModels.MessageAttachmentOutput { + return { + fileId: input.file_id, + dataSources: input.data_sources?.map(convertVectorStoreDataSourceOutput), + tools: input.tools?.map(convertMessageAttachmentToolDefinitionOutput), + }; +} + +function convertMessageAttachmentToolDefinitionOutput( + input: GeneratedModels.MessageAttachmentToolDefinitionOutput, +): PublicModels.MessageAttachmentToolDefinitionOutput { + switch (input.type) { + case "code_interpreter": + return convertCodeInterpreterToolDefinitionOutput( + input as GeneratedModels.CodeInterpreterToolDefinitionOutput, + ); + case "file_search": + return convertFileSearchToolDefinitionOutput( + input as GeneratedModels.FileSearchToolDefinitionOutput, + ); + default: + throw new Error(`Unknown tool type: ${input}`); + } +} + +export function convertAgentThreadOutput( + input: GeneratedModels.AgentThreadOutput, +): PublicModels.AgentThreadOutput { + return { + id: input.id, + object: input.object, + createdAt: new Date(input.created_at), + toolResources: input.tool_resources ? convertToolResourcesOutput(input.tool_resources) : null, + metadata: input.metadata, + }; +} + +export function convertThreadDeletionStatusOutput( + input: GeneratedModels.ThreadDeletionStatusOutput, +): PublicModels.ThreadDeletionStatusOutput { + return { ...input }; +} + +export function convertThreadMessageOutput( + input: GeneratedModels.ThreadMessageOutput, +): PublicModels.ThreadMessageOutput { + return { + id: input.id, + object: input.object, + createdAt: new Date(input.created_at), + threadId: input.thread_id, + status: input.status, + incompleteDetails: input.incomplete_details + ? convertMessageIncompleteDetailsOutput(input.incomplete_details) + : null, + completedAt: input.completed_at ? new Date(input.completed_at) : null, + incompleteAt: input.incomplete_at ? new Date(input.incomplete_at) : null, + role: input.role, + content: input.content?.map(convertMessageContentOutput), + assistantId: input.assistant_id, + runId: input.run_id, + attachments: !input.attachments + ? input.attachments + : input.attachments?.map(convertMessageAttachmentOutput), + metadata: input.metadata, + }; +} + +function convertMessageIncompleteDetailsOutput( + input: GeneratedModels.MessageIncompleteDetailsOutput, +): PublicModels.MessageIncompleteDetailsOutput { + return { ...input }; +} + +function convertMessageContentOutput( + input: GeneratedModels.MessageContentOutput, +): PublicModels.MessageContentOutput { + switch (input.type) { + case "text": + return convertMessageTextContentOutput(input as GeneratedModels.MessageTextContentOutput); + case "image_file": + return convertMessageImageFileContentOutput( + input as GeneratedModels.MessageImageFileContentOutput, + ); + default: + return { ...input }; + } +} + +function convertMessageTextContentOutput( + input: GeneratedModels.MessageTextContentOutput, +): PublicModels.MessageTextContentOutput { + return { + type: input.type, + text: input.text && convertMessageTextDetailsOutput(input.text), + }; +} + +function convertMessageTextDetailsOutput( + input: GeneratedModels.MessageTextDetailsOutput, +): PublicModels.MessageTextDetailsOutput { + return { + value: input.value, + annotations: input.annotations?.map(convertMessageTextAnnotationOutput), + }; +} + +function convertMessageTextAnnotationOutput( + input: GeneratedModels.MessageTextAnnotationOutputParent, +): PublicModels.MessageTextAnnotationOutput { + switch (input.type) { + case "file_citation": + return convertMessageTextFileCitationAnnotationOutput( + input as GeneratedModels.MessageTextFileCitationAnnotationOutput, + ); + case "file_path": + return convertMessageTextFilePathAnnotationOutput( + input as GeneratedModels.MessageTextFilePathAnnotationOutput, + ); + default: + return { ...input }; + } +} + +function convertMessageTextFileCitationAnnotationOutput( + input: GeneratedModels.MessageTextFileCitationAnnotationOutput, +): PublicModels.MessageTextFileCitationAnnotationOutput { + return { + type: input.type, + text: input.text, + fileCitation: + input.file_citation && convertMessageTextFileCitationDetailsOutput(input.file_citation), + }; +} + +function convertMessageTextFileCitationDetailsOutput( + input: GeneratedModels.MessageTextFileCitationDetailsOutput, +): PublicModels.MessageTextFileCitationDetailsOutput { + return { + fileId: input.file_id, + quote: input.quote, + }; +} + +function convertMessageTextFilePathAnnotationOutput( + input: GeneratedModels.MessageTextFilePathAnnotationOutput, +): PublicModels.MessageTextFilePathAnnotationOutput { + return { + type: input.type, + filePath: input.file_path && convertMessageTextFilePathDetailsOutput(input.file_path), + startIndex: input.start_index, + endIndex: input.end_index, + text: input.text, + }; +} + +function convertMessageTextFilePathDetailsOutput( + input: GeneratedModels.MessageTextFilePathDetailsOutput, +): PublicModels.MessageTextFilePathDetailsOutput { + return { fileId: input.file_id }; +} + +function convertMessageImageFileContentOutput( + input: GeneratedModels.MessageImageFileContentOutput, +): PublicModels.MessageImageFileContentOutput { + return { + type: input.type, + imageFile: input.image_file && convertMessageImageFileDetailsOutput(input.image_file), + }; +} + +function convertMessageImageFileDetailsOutput( + input: GeneratedModels.MessageImageFileDetailsOutput, +): PublicModels.MessageImageFileDetailsOutput { + return { fileId: input.file_id }; +} + +export function convertThreadRunOutput( + input: GeneratedModels.ThreadRunOutput, +): PublicModels.ThreadRunOutput { + return { + id: input.id, + object: input.object, + threadId: input.thread_id, + assistantId: input.assistant_id, + status: input.status, + ...(input.required_action && { + requiredAction: convertRequiredActionOutput(input.required_action), + }), + lastError: input.last_error, + model: input.model, + instructions: input.instructions, + tools: input.tools?.map(convertToolDefinitionOutput) ?? [], + createdAt: new Date(input.created_at), + expiresAt: input.expires_at ? new Date(input.expires_at) : null, + startedAt: input.started_at ? new Date(input.started_at) : null, + completedAt: input.completed_at ? new Date(input.completed_at) : null, + cancelledAt: input.cancelled_at ? new Date(input.cancelled_at) : null, + failedAt: input.failed_at ? new Date(input.failed_at) : null, + incompleteDetails: input.incomplete_details, + usage: input.usage ? convertRunStepCompletionUsageOutput(input.usage) : null, + ...(input.temperature && { temperature: input.temperature }), + ...(input.top_p && { topP: input.top_p }), + maxPromptTokens: input.max_prompt_tokens, + maxCompletionTokens: input.max_completion_tokens, + truncationStrategy: input.truncation_strategy + ? convertTruncationObjectOutput(input.truncation_strategy) + : null, + toolChoice: input.tool_choice, + responseFormat: input.response_format, + metadata: input.metadata, + ...(input.tool_resources && { + toolResources: convertToolResourcesOutput(input.tool_resources), + }), + parallelToolCalls: input.parallelToolCalls, + }; +} + +function convertRunCompletionUsageOutput( + input: GeneratedModels.RunCompletionUsageOutput, +): PublicModels.RunCompletionUsageOutput { + return { + completionTokens: input.completion_tokens, + promptTokens: input.prompt_tokens, + totalTokens: input.total_tokens, + }; +} + +function convertRequiredActionOutput( + input: GeneratedModels.RequiredActionOutput, +): PublicModels.RequiredActionOutput { + switch (input.type) { + case "submit_tool_outputs": + return convertSubmitToolOutputsActionOutput( + input as GeneratedModels.SubmitToolOutputsActionOutput, + ); + default: + return { ...input }; + } +} + +function convertSubmitToolOutputsActionOutput( + input: GeneratedModels.SubmitToolOutputsActionOutput, +): PublicModels.SubmitToolOutputsActionOutput { + return { + type: input.type, + submitToolOutputs: + input.submit_tool_outputs && convertSubmitToolOutputsDetailsOutput(input.submit_tool_outputs), + }; +} + +function convertSubmitToolOutputsDetailsOutput( + input: GeneratedModels.SubmitToolOutputsDetailsOutput, +): PublicModels.SubmitToolOutputsDetailsOutput { + return { + toolCalls: input.tool_calls?.map(convertRequiredToolCallOutput), + }; +} + +function convertRequiredToolCallOutput( + input: GeneratedModels.RequiredToolCallOutput, +): PublicModels.RequiredToolCallOutput { + switch (input.type) { + case "function": + return convertRequiredFunctionToolCallOutput( + input as GeneratedModels.RequiredFunctionToolCallOutput, + ); + default: + return { ...input }; + } +} + +function convertRequiredFunctionToolCallOutput( + input: GeneratedModels.RequiredFunctionToolCallOutput, +): PublicModels.RequiredFunctionToolCallOutput { + return { + id: input.id, + type: input.type, + function: input.function && convertRequiredFunctionToolCallDetailsOutput(input.function), + }; +} + +function convertRequiredFunctionToolCallDetailsOutput( + input: GeneratedModels.RequiredFunctionToolCallDetailsOutput, +): PublicModels.RequiredFunctionToolCallDetailsOutput { + return { + name: input.name, + arguments: input.arguments, + }; +} + +function convertTruncationObjectOutput( + input: GeneratedModels.TruncationObjectOutput, +): PublicModels.TruncationObjectOutput { + return { + type: input.type, + lastMessages: input.last_messages, + }; +} + +export function convertOpenAIPageableListOfThreadRunOutput( + input: GeneratedModels.OpenAIPageableListOfThreadRunOutput, +): PublicModels.OpenAIPageableListOfThreadRunOutput { + return { + object: input.object, + firstId: input.first_id, + lastId: input.last_id, + hasMore: input.has_more, + data: input.data?.map(convertThreadRunOutput), + }; +} +export function convertRunStepOutput( + input: GeneratedModels.RunStepOutput, +): PublicModels.RunStepOutput { + return { + id: input.id, + object: input.object, + type: input.type, + assistantId: input.assistant_id, + threadId: input.thread_id, + runId: input.run_id, + status: input.status, + stepDetails: input.step_details && convertRunStepDetailsOutput(input.step_details), + lastError: input.last_error ? convertRunStepErrorOutput(input.last_error) : null, + createdAt: new Date(input.created_at), + expiredAt: input.expired_at ? new Date(input.expired_at) : null, + completedAt: input.completed_at ? new Date(input.completed_at) : null, + failedAt: input.failed_at ? new Date(input.failed_at) : null, + cancelledAt: input.cancelled_at ? new Date(input.cancelled_at) : null, + ...(input.usage && { usage: convertRunCompletionUsageOutput(input.usage) }), + metadata: input.metadata, + }; +} + +function convertRunStepDetailsOutput( + input: GeneratedModels.RunStepDetailsOutput, +): PublicModels.RunStepDetailsOutput { + switch (input.type) { + case "message_creation": + return convertRunStepMessageCreationDetailsOutput( + input as GeneratedModels.RunStepMessageCreationDetailsOutput, + ); + case "tool_call": + return convertRunStepToolCallDetailsOutput( + input as GeneratedModels.RunStepToolCallDetailsOutput, + ); + default: { + throw new Error(`Unknown run step type: ${input.type}`); + } + } +} + +function convertRunStepMessageCreationDetailsOutput( + input: GeneratedModels.RunStepMessageCreationDetailsOutput, +): PublicModels.RunStepMessageCreationDetailsOutput { + return { + type: input.type, + messageCreation: convertRunStepMessageCreationReferenceOutput(input.message_creation), + }; +} + +function convertRunStepMessageCreationReferenceOutput( + input: GeneratedModels.RunStepMessageCreationReferenceOutput, +): PublicModels.RunStepMessageCreationReferenceOutput { + return { + messageId: input.message_id, + }; +} + +function convertRunStepToolCallDetailsOutput( + input: GeneratedModels.RunStepToolCallDetailsOutput, +): PublicModels.RunStepToolCallDetailsOutput { + return { + type: input.type, + toolCalls: input.tool_calls && input.tool_calls.map(convertRunStepToolCallOutput), + }; +} + +function convertRunStepToolCallOutput( + input: GeneratedModels.RunStepToolCallOutput, +): PublicModels.RunStepToolCallOutput { + switch (input.type) { + case "code_interpreter": + return convertRunStepCodeInterpreterToolCallOutput( + input as GeneratedModels.RunStepCodeInterpreterToolCallOutput, + ); + case "file_search": + return convertRunStepFileSearchToolCallOutput( + input as GeneratedModels.RunStepFileSearchToolCallOutput, + ); + case "bing_grounding": + return convertRunStepBingGroundingToolCallOutput( + input as GeneratedModels.RunStepBingGroundingToolCallOutput, + ); + case "azure_ai_search": + return convertRunStepAzureAISearchToolCallOutput( + input as GeneratedModels.RunStepAzureAISearchToolCallOutput, + ); + case "sharepoint_grounding": + return convertRunStepSharepointToolCallOutput( + input as GeneratedModels.RunStepSharepointToolCallOutput, + ); + case "microsoft_fabric": + return convertRunStepMicrosoftFabricToolCallOutput( + input as GeneratedModels.RunStepMicrosoftFabricToolCallOutput, + ); + case "function": + return convertRunStepFunctionToolCallOutput( + input as GeneratedModels.RunStepFunctionToolCallOutput, + ); + default: { + throw new Error(`Unknown run step tool call type: ${input.type}`); + } + } +} + +function convertRunStepCodeInterpreterToolCallOutput( + input: GeneratedModels.RunStepCodeInterpreterToolCallOutput, +): PublicModels.RunStepCodeInterpreterToolCallOutput { + return { + type: input.type, + id: input.id, + codeInterpreter: + input.code_interpreter && + convertRunStepCodeInterpreterToolCallDetailsOutput(input.code_interpreter), + }; +} + +function convertRunStepFileSearchToolCallOutput( + input: GeneratedModels.RunStepFileSearchToolCallOutput, +): PublicModels.RunStepFileSearchToolCallOutput { + return { + type: input.type, + id: input.id, + fileSearch: input.file_search, + }; +} + +function convertRunStepBingGroundingToolCallOutput( + input: GeneratedModels.RunStepBingGroundingToolCallOutput, +): PublicModels.RunStepBingGroundingToolCallOutput { + return { + type: input.type, + id: input.id, + bingGrounding: input.bing_grounding, + }; +} + +function convertRunStepAzureAISearchToolCallOutput( + input: GeneratedModels.RunStepAzureAISearchToolCallOutput, +): PublicModels.RunStepAzureAISearchToolCallOutput { + return { + type: input.type, + id: input.id, + azureAISearch: input.azure_ai_search, + }; +} + +function convertRunStepSharepointToolCallOutput( + input: GeneratedModels.RunStepSharepointToolCallOutput, +): PublicModels.RunStepSharepointToolCallOutput { + return { + type: input.type, + id: input.id, + sharepointGrounding: input.sharepoint_grounding, + }; +} + +function convertRunStepMicrosoftFabricToolCallOutput( + input: GeneratedModels.RunStepMicrosoftFabricToolCallOutput, +): PublicModels.RunStepMicrosoftFabricToolCallOutput { + return { + type: input.type, + id: input.id, + microsoftFabric: input.microsoft_fabric, + }; +} + +function convertRunStepFunctionToolCallOutput( + input: GeneratedModels.RunStepFunctionToolCallOutput, +): PublicModels.RunStepFunctionToolCallOutput { + return { + type: input.type, + id: input.id, + function: convertRunStepFunctionToolCallDetailsOutput(input.function), + }; +} + +function convertRunStepFunctionToolCallDetailsOutput( + input: GeneratedModels.RunStepFunctionToolCallDetailsOutput, +): PublicModels.RunStepFunctionToolCallDetailsOutput { + return { + name: input.name, + arguments: input.arguments, + output: input.output, + }; +} + +function convertRunStepCodeInterpreterToolCallDetailsOutput( + input: GeneratedModels.RunStepCodeInterpreterToolCallDetailsOutput, +): PublicModels.RunStepCodeInterpreterToolCallDetailsOutput { + return { + input: input.input, + outputs: input.outputs && input.outputs.map(convertRunStepCodeInterpreterToolCallOutputOutput), + }; +} + +function convertRunStepCodeInterpreterToolCallOutputOutput( + input: GeneratedModels.RunStepCodeInterpreterToolCallOutputOutput, +): PublicModels.RunStepCodeInterpreterToolCallOutputOutput { + switch (input.type) { + case "logs": + return convertRunStepCodeInterpreterLogOutputOutput( + input as GeneratedModels.RunStepCodeInterpreterLogOutputOutput, + ); + case "image": + return convertRunStepCodeInterpreterImageOutputOutput( + input as GeneratedModels.RunStepCodeInterpreterImageOutputOutput, + ); + default: + return input; + } +} + +function convertRunStepCodeInterpreterLogOutputOutput( + input: GeneratedModels.RunStepCodeInterpreterLogOutputOutput, +): PublicModels.RunStepCodeInterpreterLogOutputOutput { + return { + type: input.type, + logs: input.logs, + }; +} + +function convertRunStepCodeInterpreterImageOutputOutput( + input: GeneratedModels.RunStepCodeInterpreterImageOutputOutput, +): PublicModels.RunStepCodeInterpreterImageOutputOutput { + return { + type: input.type, + image: convertRunStepCodeInterpreterImageReferenceOutput(input.image), + }; +} + +function convertRunStepCodeInterpreterImageReferenceOutput( + input: GeneratedModels.RunStepCodeInterpreterImageReferenceOutput, +): PublicModels.RunStepCodeInterpreterImageReferenceOutput { + return { + fileId: input.file_id, + }; +} + +function convertRunStepErrorOutput( + input: GeneratedModels.RunStepErrorOutput, +): PublicModels.RunStepErrorOutput { + return { + code: input.code, + message: input.message, + }; +} + +function convertRunStepCompletionUsageOutput( + input: GeneratedModels.RunStepCompletionUsageOutput, +): PublicModels.RunStepCompletionUsageOutput { + return { + completionTokens: input.completion_tokens, + promptTokens: input.prompt_tokens, + totalTokens: input.total_tokens, + }; +} + +export function convertOpenAIPageableListOfRunStepOutput( + input: GeneratedModels.OpenAIPageableListOfRunStepOutput, +): PublicModels.OpenAIPageableListOfRunStepOutput { + return { + object: input.object, + firstId: input.first_id, + lastId: input.last_id, + hasMore: input.has_more, + data: input.data?.map(convertRunStepOutput), + }; +} + +export function convertOpenAIPageableListOfThreadMessageOutput( + input: GeneratedModels.OpenAIPageableListOfThreadMessageOutput, +): PublicModels.OpenAIPageableListOfThreadMessageOutput { + return { + object: input.object, + firstId: input.first_id, + lastId: input.last_id, + hasMore: input.has_more, + data: input.data?.map(convertThreadMessageOutput), + }; +} + +export function convertOpenAIPageableListOfVectorStoreOutput( + input: GeneratedModels.OpenAIPageableListOfVectorStoreOutput, +): PublicModels.OpenAIPageableListOfVectorStoreOutput { + return { + object: input.object, + firstId: input.first_id, + lastId: input.last_id, + hasMore: input.has_more, + data: input.data.map(convertVectorStoreOutput), + }; +} + +export function convertVectorStoreOutput( + input: GeneratedModels.VectorStoreOutput, +): PublicModels.VectorStoreOutput { + return { + id: input.id, + object: input.object, + createdAt: new Date(input.created_at), + name: input.name, + usageBytes: input.usage_bytes, + fileCounts: convertVectorStoreFileCountOutput(input.file_counts), + status: input.status, + expiresAfter: input.expires_after + ? convertVectorStoreExpirationPolicyOutput(input.expires_after) + : undefined, + expiresAt: input.expires_at ? new Date(input.expires_at) : null, + lastActiveAt: input.last_active_at ? new Date(input.last_active_at) : null, + metadata: input.metadata, + }; +} + +function convertVectorStoreFileCountOutput( + input: GeneratedModels.VectorStoreFileCountOutput, +): PublicModels.VectorStoreFileCountOutput { + return { + inProgress: input.in_progress, + completed: input.completed, + failed: input.failed, + cancelled: input.cancelled, + total: input.total, + }; +} + +function convertVectorStoreExpirationPolicyOutput( + input: GeneratedModels.VectorStoreExpirationPolicyOutput, +): PublicModels.VectorStoreExpirationPolicyOutput { + return { + anchor: input.anchor, + days: input.days, + }; +} + +export function convertVectorStoreDeletionStatusOutput( + input: GeneratedModels.VectorStoreDeletionStatusOutput, +): PublicModels.VectorStoreDeletionStatusOutput { + return { + id: input.id, + deleted: input.deleted, + object: input.object, + }; +} + +export function convertVectorStoreFileBatchOutput( + input: GeneratedModels.VectorStoreFileBatchOutput, +): PublicModels.VectorStoreFileBatchOutput { + return { + id: input.id, + object: input.object, + createdAt: new Date(input.created_at), + vectorStoreId: input.vector_store_id, + status: input.status, + fileCounts: convertVectorStoreFileCountOutput(input.file_counts), + }; +} + +export function convertOpenAIPageableListOfVectorStoreFileOutput( + input: GeneratedModels.OpenAIPageableListOfVectorStoreFileOutput, +): PublicModels.OpenAIPageableListOfVectorStoreFileOutput { + return { + object: input.object, + firstId: input.first_id, + lastId: input.last_id, + hasMore: input.has_more, + data: input.data.map(convertVectorStoreFileOutput), + }; +} + +export function convertVectorStoreFileOutput( + input: GeneratedModels.VectorStoreFileOutput, +): PublicModels.VectorStoreFileOutput { + return { + id: input.id, + object: input.object, + usageBytes: input.usage_bytes, + createdAt: new Date(input.created_at), + vectorStoreId: input.vector_store_id, + status: input.status, + lastError: input.last_error, + chunkingStrategy: + input.chunking_strategy && + convertVectorStoreChunkingStrategyResponseOutput(input.chunking_strategy), + }; +} + +function convertVectorStoreChunkingStrategyResponseOutput( + input: GeneratedModels.VectorStoreChunkingStrategyResponseOutput, +): PublicModels.VectorStoreChunkingStrategyResponseOutput { + switch (input.type) { + case "auto": + return input as PublicModels.VectorStoreAutoChunkingStrategyResponseOutput; + case "static": + return convertVectorStoreStaticChunkingStrategyResponseOutput( + input as GeneratedModels.VectorStoreStaticChunkingStrategyResponseOutput, + ); + default: + throw new Error(`Unknown chunking strategy type: ${input.type}`); + } +} +function convertVectorStoreStaticChunkingStrategyResponseOutput( + input: GeneratedModels.VectorStoreStaticChunkingStrategyResponseOutput, +): PublicModels.VectorStoreStaticChunkingStrategyResponseOutput { + return { + type: input.type, + static: input.static && convertVectorStoreStaticChunkingStrategyOptionsOutput(input.static), + }; +} + +function convertVectorStoreStaticChunkingStrategyOptionsOutput( + input: GeneratedModels.VectorStoreStaticChunkingStrategyOptionsOutput, +): PublicModels.VectorStoreStaticChunkingStrategyOptionsOutput { + return { + maxChunkSizeTokens: input.max_chunk_size_tokens, + chunkOverlapTokens: input.chunk_overlap_tokens, + }; +} + +export function convertVectorStoreFileDeletionStatusOutput( + input: GeneratedModels.VectorStoreFileDeletionStatusOutput, +): PublicModels.VectorStoreFileDeletionStatusOutput { + return { + id: input.id, + deleted: input.deleted, + object: input.object, + }; +} + +export function convertOpenAIFileOutput( + input: GeneratedModels.OpenAIFileOutput, +): PublicModels.OpenAIFileOutput { + return { + id: input.id, + object: input.object, + bytes: input.bytes, + filename: input.filename, + createdAt: new Date(input.created_at), + purpose: input.purpose, + status: input.status, + statusDetails: input.status_details, + }; +} + +export function convertFileListResponseOutput( + input: GeneratedModels.FileListResponseOutput, +): PublicModels.FileListResponseOutput { + return { + object: input.object, + data: input.data.map(convertOpenAIFileOutput), + }; +} + +function convertMessageDelta( + input: WireStreamingModels.MessageDelta, +): PublicStreamingModels.MessageDelta { + return { + role: input.role, + content: input.content?.map(convertStreamingMessageDeltaContent), + }; +} + +export function convertMessageDeltaChunkOutput( + input: WireStreamingModels.MessageDeltaChunk, +): PublicStreamingModels.MessageDeltaChunk { + return { + id: input.id, + object: input.object, + delta: input.delta && convertMessageDelta(input.delta), + }; +} +function convertStreamingMessageDeltaContent( + input: WireStreamingModels.MessageDeltaContent, +): PublicStreamingModels.MessageDeltaContent { + switch (input.type) { + case "text": + return convertStreamingMessageTextContent( + input as WireStreamingModels.MessageDeltaTextContent, + ); + case "image": + return convertStreamingMessageImageContent( + input as WireStreamingModels.MessageDeltaImageFileContent, + ); + default: + logger.error(`Unknown message content type: ${input.type}`); + return { + index: input.index, + type: input.type, + }; + } +} + +function convertStreamingMessageTextContent( + input: WireStreamingModels.MessageDeltaTextContent, +): PublicStreamingModels.MessageDeltaTextContent { + return { + index: input.index, + type: input.type, + text: input.text && convertStreamingMessageTextDetails(input.text), + }; +} + +function convertStreamingMessageTextDetails( + input: WireStreamingModels.MessageDeltaTextContentObject, +): PublicStreamingModels.MessageDeltaTextContentObject { + return { + value: input.value, + annotations: input.annotations?.map(convertStreamingMessageTextAnnotation), + }; +} + +function convertStreamingMessageTextAnnotation( + input: WireStreamingModels.MessageDeltaTextAnnotation, +): PublicStreamingModels.MessageDeltaTextAnnotation { + switch (input.type) { + case "file_citation": + return convertStreamingMessageTextFileCitationAnnotation( + input as WireStreamingModels.MessageDeltaTextFileCitationAnnotation, + ); + case "file_path": + return convertStreamingMessageTextFilePathAnnotation( + input as WireStreamingModels.MessageDeltaTextFilePathAnnotation, + ); + default: + return input; + } +} + +function convertStreamingMessageTextFileCitationAnnotation( + input: WireStreamingModels.MessageDeltaTextFileCitationAnnotation, +): PublicStreamingModels.MessageDeltaTextFileCitationAnnotation { + return { + index: input.index, + type: input.type, + text: input.text, + fileCitation: + input.file_citation && convertStreamingMessageTextFileCitationDetails(input.file_citation), + startIndex: input.start_index, + endIndex: input.end_index, + }; +} + +function convertStreamingMessageTextFileCitationDetails( + input: WireStreamingModels.MessageDeltaTextFileCitationAnnotationObject, +): PublicStreamingModels.MessageDeltaTextFileCitationAnnotationObject { + return { + fileId: input.file_id, + quote: input.quote, + }; +} + +function convertStreamingMessageTextFilePathAnnotation( + input: WireStreamingModels.MessageDeltaTextFilePathAnnotation, +): PublicStreamingModels.MessageDeltaTextFilePathAnnotation { + return { + index: input.index, + type: input.type, + text: input.text, + filePath: input.file_path && convertStreamingMessageTextFilePathDetails(input.file_path), + startIndex: input.start_index, + endIndex: input.end_index, + }; +} + +function convertStreamingMessageTextFilePathDetails( + input: WireStreamingModels.MessageDeltaTextFilePathAnnotationObject, +): PublicStreamingModels.MessageDeltaTextFilePathAnnotationObject { + return { + fileId: input.file_id, + }; +} + +function convertStreamingMessageImageContent( + input: WireStreamingModels.MessageDeltaImageFileContent, +): PublicStreamingModels.MessageDeltaImageFileContent { + return { + index: input.index, + type: input.type, + imageFile: input.image_file && convertStreamingMessageImageFileDetails(input.image_file), + }; +} + +function convertStreamingMessageImageFileDetails( + input: WireStreamingModels.MessageDeltaImageFileContentObject, +): PublicStreamingModels.MessageDeltaImageFileContentObject { + return { + fileId: input.file_id, + }; +} + +export function convertRunStepDeltaChunk( + input: WireStreamingModels.RunStepDeltaChunk, +): PublicStreamingModels.RunStepDeltaChunk { + return { + id: input.id, + object: input.object, + delta: input.delta && convertRunStepDelta(input.delta), + }; +} +function convertRunStepDelta( + input: WireStreamingModels.RunStepDelta, +): PublicStreamingModels.RunStepDelta { + return { + stepDetails: input.step_details && convertRunStepDetailsDelta(input.step_details), + }; +} + +function convertRunStepDetailsDelta( + input: WireStreamingModels.RunStepDeltaDetail, +): PublicStreamingModels.RunStepDeltaDetail { + switch (input.type) { + case "message_creation": + return convertRunStepMessageCreationDetailsDelta( + input as WireStreamingModels.RunStepDeltaMessageCreation, + ); + case "tool_call": + return convertRunStepToolCallDetailsDelta( + input as WireStreamingModels.RunStepDeltaToolCallObject, + ); + default: + logger.error(`Unknown run step type: ${input.type}`); + return { type: input.type }; + } +} + +function convertRunStepMessageCreationDetailsDelta( + input: WireStreamingModels.RunStepDeltaMessageCreation, +): PublicStreamingModels.RunStepDeltaMessageCreation { + return { + type: input.type, + messageCreation: + input.message_creation && convertRunStepDeltaMessageCreationObject(input.message_creation), + }; +} + +function convertRunStepDeltaMessageCreationObject( + input: WireStreamingModels.RunStepDeltaMessageCreationObject, +): PublicStreamingModels.RunStepDeltaMessageCreationObject { + return { + messageId: input.message_id, + }; +} + +function convertRunStepToolCallDetailsDelta( + input: WireStreamingModels.RunStepDeltaToolCallObject, +): PublicStreamingModels.RunStepDeltaToolCallObject { + return { + type: input.type, + toolCalls: input.tool_calls && input.tool_calls.map(convertRunStepToolCallDelta), + }; +} + +function convertRunStepToolCallDelta( + input: WireStreamingModels.RunStepDeltaToolCall, +): PublicStreamingModels.RunStepDeltaToolCall { + switch (input.type) { + case "code_interpreter": + return convertRunStepCodeInterpreterToolCallDelta( + input as WireStreamingModels.RunStepDeltaCodeInterpreterToolCall, + ); + case "file_search": + return convertRunStepFileSearchToolCallDelta( + input as WireStreamingModels.RunStepDeltaFileSearchToolCall, + ); + case "function": + return convertRunStepFunctionToolCallDelta( + input as WireStreamingModels.RunStepDeltaFunctionToolCall, + ); + default: + logger.error(`Unknown run step tool call type: ${input.type}`); + return { + index: input.index, + id: input.id, + type: input.type, + }; + } +} + +function convertRunStepCodeInterpreterToolCallDelta( + input: WireStreamingModels.RunStepDeltaCodeInterpreterToolCall, +): PublicStreamingModels.RunStepDeltaCodeInterpreterToolCall { + return { + index: input.index, + type: input.type, + id: input.id, + codeInterpreter: + input.code_interpreter && + convertRunStepCodeInterpreterToolCallDetailsDelta(input.code_interpreter), + }; +} + +function convertRunStepCodeInterpreterToolCallDetailsDelta( + input: WireStreamingModels.RunStepDeltaCodeInterpreterDetailItemObject, +): PublicStreamingModels.RunStepDeltaCodeInterpreterDetailItemObject { + return { + input: input.input, + outputs: input.outputs && input.outputs.map(convertRunStepCodeInterpreterToolCallOutputDelta), + }; +} + +function convertRunStepCodeInterpreterToolCallOutputDelta( + input: WireStreamingModels.RunStepDeltaCodeInterpreterOutput, +): PublicStreamingModels.RunStepDeltaCodeInterpreterOutput { + switch (input.type) { + case "logs": + return convertRunStepCodeInterpreterLogOutputDelta( + input as WireStreamingModels.RunStepDeltaCodeInterpreterLogOutput, + ); + case "image": + return convertRunStepCodeInterpreterImageOutputDelta( + input as WireStreamingModels.RunStepDeltaCodeInterpreterImageOutput, + ); + default: + return input; + } +} + +function convertRunStepCodeInterpreterLogOutputDelta( + input: WireStreamingModels.RunStepDeltaCodeInterpreterLogOutput, +): PublicStreamingModels.RunStepDeltaCodeInterpreterLogOutput { + return { + index: input.index, + type: input.type, + logs: input.logs, + }; +} + +function convertRunStepCodeInterpreterImageOutputDelta( + input: WireStreamingModels.RunStepDeltaCodeInterpreterImageOutput, +): PublicStreamingModels.RunStepDeltaCodeInterpreterImageOutput { + return { + index: input.index, + type: input.type, + image: input.image && convertRunStepCodeInterpreterImageReferenceDelta(input.image), + }; +} + +function convertRunStepCodeInterpreterImageReferenceDelta( + input: WireStreamingModels.RunStepDeltaCodeInterpreterImageOutputObject, +): PublicStreamingModels.RunStepDeltaCodeInterpreterImageOutputObject { + return { + fileId: input.file_id, + }; +} + +function convertRunStepFunctionToolCallDelta( + input: WireStreamingModels.RunStepDeltaFunctionToolCall, +): PublicStreamingModels.RunStepDeltaFunctionToolCall { + return { + index: input.index, + type: input.type, + id: input.id, + function: input.function && convertRunStepFunctionToolCallDetailsDelta(input.function), + }; +} + +function convertRunStepFunctionToolCallDetailsDelta( + input: WireStreamingModels.RunStepDeltaFunction, +): PublicStreamingModels.RunStepDeltaFunction { + return { + name: input.name, + arguments: input.arguments, + output: input.output, + }; +} + +function convertRunStepFileSearchToolCallDelta( + input: WireStreamingModels.RunStepDeltaFileSearchToolCall, +): PublicStreamingModels.RunStepDeltaFileSearchToolCall { + return { + index: input.index, + type: input.type, + id: input.id, + fileSearch: input.file_search, + }; +} diff --git a/sdk/ai/ai-projects/src/customization/convertParametersToWire.ts b/sdk/ai/ai-projects/src/customization/convertParametersToWire.ts new file mode 100644 index 000000000000..ad64a351d78c --- /dev/null +++ b/sdk/ai/ai-projects/src/customization/convertParametersToWire.ts @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type * as PublicParameters from "./parameters.js"; +import type * as GeneratedParameters from "../generated/src/parameters.js"; +import { + convertVectorStoreChunkingStrategyRequest, + convertVectorStoreDataSource, +} from "./convertModelsToWrite.js"; + +/** + * Request options for list requests. + */ +interface ListQueryParameters { + limit?: number; + order?: "asc" | "desc"; + after?: string; + before?: string; +} + +export function convertCreateVectorStoreFileBatchParam( + input: PublicParameters.CreateVectorStoreFileBatchBodyParam, +): GeneratedParameters.CreateVectorStoreFileBatchBodyParam { + return { + body: input.body && { + ...(input.body.fileIds && { file_ids: input.body.fileIds }), + ...(input.body.dataSources && { + data_sources: input.body.dataSources.map(convertVectorStoreDataSource), + }), + ...(input.body.chunkingStrategy && { + chunking_strategy: convertVectorStoreChunkingStrategyRequest(input.body.chunkingStrategy), + }), + }, + }; +} + +export function convertCreateVectorStoreFileParam( + input: PublicParameters.CreateVectorStoreFileBodyParam, +): GeneratedParameters.CreateVectorStoreFileBodyParam { + return { + body: input.body && { + ...(input.body.fileId && { file_id: input.body.fileId }), + ...(input.body.dataSources && { + data_sources: input.body.dataSources.map(convertVectorStoreDataSource), + }), + ...(input.body.chunkingStrategy && { + chunking_strategy: convertVectorStoreChunkingStrategyRequest(input.body.chunkingStrategy), + }), + }, + }; +} + +export function convertToListQueryParameters( + options: T, +): ListQueryParameters & Record { + return { + ...(options.limit && { limit: options.limit }), + ...(options.order && { order: options.order }), + ...(options.after && { after: options.after }), + ...(options.before && { before: options.before }), + }; +} + +export function convertListVectorStoreFileBatchFilesQueryParamProperties( + options: PublicParameters.ListVectorStoreFileBatchFilesQueryParamProperties, +): GeneratedParameters.ListVectorStoreFileBatchFilesQueryParamProperties { + return { + ...convertToListQueryParameters(options), + ...(options.filter && { filter: options.filter }), + }; +} + +export function convertListFilesQueryParamProperties( + options: PublicParameters.ListFilesQueryParamProperties, +): GeneratedParameters.ListFilesQueryParamProperties & Record { + return { + ...(options.purpose && { purpose: options.purpose }), + }; +} diff --git a/sdk/ai/ai-projects/src/customization/models.ts b/sdk/ai/ai-projects/src/customization/models.ts new file mode 100644 index 000000000000..fa2f4b051964 --- /dev/null +++ b/sdk/ai/ai-projects/src/customization/models.ts @@ -0,0 +1,902 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** The request details to use when creating a new agent. */ +export interface CreateAgentOptions { + /** The ID of the model to use. */ + model: string; + /** The name of the new agent. */ + name?: string | null; + /** The description of the new agent. */ + description?: string | null; + /** The system instructions for the new agent to use. */ + instructions?: string | null; + /** The collection of tools to enable for the new agent. */ + tools?: Array; + /** + * A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` + * tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + */ + toolResources?: ToolResources | null; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, + * while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. + * So 0.1 means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + topP?: number | null; + /** The response format of the tool calls used by this agent. */ + responseFormat?: AgentsApiResponseFormatOption | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** An abstract representation of an input tool definition that an agent can use. */ +export interface ToolDefinitionParent { + type: string; +} + +/** The input definition information for a code interpreter tool as used to configure an agent. */ +export interface CodeInterpreterToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'code_interpreter'. */ + type: "code_interpreter"; +} + +/** The input definition information for a file search tool as used to configure an agent. */ +export interface FileSearchToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'file_search'. */ + type: "file_search"; + /** Options overrides for the file search tool. */ + fileSearch?: FileSearchToolDefinitionDetails; +} + +/** Options overrides for the file search tool. */ +export interface FileSearchToolDefinitionDetails { + /** + * The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive. + * + * Note that the file search tool may output fewer than `max_num_results` results. See the file search tool documentation for more information. + */ + maxNumResults?: number; + rankingOptions?: FileSearchRankingOptions; +} + +/** Ranking options for file search. */ +export interface FileSearchRankingOptions { + /** File search ranker. */ + ranker: string; + /** Ranker search threshold. */ + scoreThreshold: number; +} + +/** The input definition information for a function tool as used to configure an agent. */ +export interface FunctionToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'function'. */ + type: "function"; + /** The definition of the concrete function that the function tool should call. */ + function: FunctionDefinition; +} + +/** The input definition information for a function. */ +export interface FunctionDefinition { + /** The name of the function to be called. */ + name: string; + /** A description of what the function does, used by the model to choose when and how to call the function. */ + description?: string; + /** The parameters the functions accepts, described as a JSON Schema object. */ + parameters: unknown; +} + +/** The input definition information for a bing grounding search tool as used to configure an agent. */ +export interface BingGroundingToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'bing_grounding'. */ + type: "bing_grounding"; + /** The list of connections used by the bing grounding tool. */ + bingGrounding: ToolConnectionList; +} + +/** A set of connection resources currently used by either the `bing_grounding`, `microsoft_fabric`, or `sharepoint_grounding` tools. */ +export interface ToolConnectionList { + /** + * The connections attached to this tool. There can be a maximum of 1 connection + * resource attached to the tool. + */ + connections?: Array; +} + +/** A connection resource. */ +export interface ToolConnection { + /** A connection in a ToolConnectionList attached to this tool. */ + connectionId: string; +} + +/** The input definition information for a Microsoft Fabric tool as used to configure an agent. */ +export interface MicrosoftFabricToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'microsoft_fabric'. */ + type: "microsoft_fabric"; + /** The list of connections used by the Microsoft Fabric tool. */ + microsoftFabric: ToolConnectionList; +} + +/** The input definition information for a sharepoint tool as used to configure an agent. */ +export interface SharepointToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'sharepoint_grounding'. */ + type: "sharepoint_grounding"; + /** The list of connections used by the SharePoint tool. */ + sharepointGrounding: ToolConnectionList; +} + +/** The input definition information for an Azure AI search tool as used to configure an agent. */ +export interface AzureAISearchToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'azure_ai_search'. */ + type: "azure_ai_search"; +} + +/** + * A set of resources that are used by the agent's tools. The resources are specific to the type of + * tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` + * tool requires a list of vector store IDs. + */ +export interface ToolResources { + /** Resources to be used by the `code_interpreter tool` consisting of file IDs. */ + codeInterpreter?: CodeInterpreterToolResource; + /** Resources to be used by the `file_search` tool consisting of vector store IDs. */ + fileSearch?: FileSearchToolResource; + /** Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */ + azureAISearch?: AzureAISearchResource; +} + +/** A set of resources that are used by the `code_interpreter` tool. */ +export interface CodeInterpreterToolResource { + /** + * A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files + * associated with the tool. + */ + fileIds?: string[]; + /** The data sources to be used. This option is mutually exclusive with fileIds. */ + dataSources?: Array; +} + +/** + * The structure, containing Azure asset URI path and the asset type of the file used as a data source + * for the enterprise file search. + */ +export interface VectorStoreDataSource { + /** Asset URI. */ + uri: string; + /** The asset type * */ + type: VectorStoreDataSourceAssetType; +} + +/** A set of resources that are used by the `file_search` tool. */ +export interface FileSearchToolResource { + /** + * The ID of the vector store attached to this agent. There can be a maximum of 1 vector + * store attached to the agent. + */ + vectorStoreIds?: string[]; + /** + * The list of vector store configuration objects from Azure. This list is limited to one + * element. The only element of this list contains + * the list of azure asset IDs used by the search tool. + */ + vectorStores?: Array; +} + +/** The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs. */ +export interface VectorStoreConfigurations { + /** Name */ + name: string; + /** Configurations */ + configuration: VectorStoreConfiguration; +} + +/** + * Vector storage configuration is the list of data sources, used when multiple + * files can be used for the enterprise file search. + */ +export interface VectorStoreConfiguration { + /** Data sources */ + dataSources: Array; +} + +/** A set of index resources used by the `azure_ai_search` tool. */ +export interface AzureAISearchResource { + /** + * The indices attached to this agent. There can be a maximum of 1 index + * resource attached to the agent. + */ + indexes?: Array; +} + +/** A Index resource. */ +export interface IndexResource { + /** An index connection id in an IndexResource attached to this agent. */ + indexConnectionId: string; + /** The name of an index in an IndexResource attached to this agent. */ + indexName: string; +} + +/** + * An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run. + * If `text` the model can return text or any value needed. + */ +export interface AgentsApiResponseFormat { + /** + * Must be one of `text` or `json_object`. + * + * Possible values: "text", "json_object" + */ + type?: ApiResponseFormat; +} + +/** The request details to use when modifying an existing agent. */ +export interface UpdateAgentOptions { + /** The ID of the model to use. */ + model?: string; + /** The modified name for the agent to use. */ + name?: string | null; + /** The modified description for the agent to use. */ + description?: string | null; + /** The modified system instructions for the new agent to use. */ + instructions?: string | null; + /** The modified collection of tools to enable for the agent. */ + tools?: Array; + /** + * A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, + * the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + */ + toolResources?: ToolResources; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, + * while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. + * So 0.1 means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + topP?: number | null; + /** The response format of the tool calls used by this agent. */ + responseFormat?: AgentsApiResponseFormatOption | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** The details used to create a new agent thread. */ +export interface AgentThreadCreationOptions { + /** The initial messages to associate with the new thread. */ + messages?: Array; + /** + * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the + * type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires + * a list of vector store IDs. + */ + toolResources?: ToolResources | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** A single message within an agent thread, as provided during that thread's creation for its initial state. */ +export interface ThreadMessageOptions { + /** + * The role of the entity that is creating the message. Allowed values include: + * - `user`: Indicates the message is sent by an actual user and should be used in most + * cases to represent user-generated messages. + * - `assistant`: Indicates the message is generated by the agent. Use this value to insert + * messages from the agent into the + * conversation. + * + * Possible values: "user", "assistant" + */ + role: MessageRole; + /** + * The textual content of the initial message. Currently, robust input including images and annotated text may only be provided via + * a separate call to the create message API. + */ + content: string; + /** A list of files attached to the message, and the tools they should be added to. */ + attachments?: Array | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** This describes to which tools a file has been attached. */ +export interface MessageAttachment { + /** The ID of the file to attach to the message. */ + fileId?: string; + /** Azure asset ID. */ + dataSources?: Array; + /** The tools to add to this file. */ + tools: MessageAttachmentToolDefinition[]; +} + +/** The details used to update an existing agent thread */ +export interface UpdateAgentThreadOptions { + /** + * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the + * type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires + * a list of vector store IDs + */ + toolResources?: ToolResources | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** A single, existing message within an agent thread. */ +export interface ThreadMessage { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread.message'. */ + object: "thread.message"; + /** The Unix timestamp, in seconds, representing when this object was created. */ + createdAt: number; + /** The ID of the thread that this message belongs to. */ + threadId: string; + /** + * The status of the message. + * + * Possible values: "in_progress", "incomplete", "completed" + */ + status: MessageStatus; + /** On an incomplete message, details about why the message is incomplete. */ + incompleteDetails: MessageIncompleteDetails | null; + /** The Unix timestamp (in seconds) for when the message was completed. */ + completedAt: number | null; + /** The Unix timestamp (in seconds) for when the message was marked as incomplete. */ + incompleteAt: number | null; + /** + * The role associated with the agent thread message. + * + * Possible values: "user", "assistant" + */ + role: MessageRole; + /** The list of content items associated with the agent thread message. */ + content: Array; + /** If applicable, the ID of the agent that authored this message. */ + assistantId: string | null; + /** If applicable, the ID of the run associated with the authoring of this message. */ + runId: string | null; + /** A list of files attached to the message, and the tools they were added to. */ + attachments: Array | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** Information providing additional detail about a message entering an incomplete status. */ +export interface MessageIncompleteDetails { + /** + * The provided reason describing why the message was marked as incomplete. + * + * Possible values: "content_filter", "max_tokens", "run_cancelled", "run_failed", "run_expired" + */ + reason: MessageIncompleteDetailsReason; +} + +/** An abstract representation of a single item of thread message content. */ +export interface MessageContentParent { + type: string; +} + +/** A representation of a textual item of thread message content. */ +export interface MessageTextContent extends MessageContentParent { + /** The object type, which is always 'text'. */ + type: "text"; + /** The text and associated annotations for this thread message content item. */ + text: MessageTextDetails; +} + +/** The text and associated annotations for a single item of agent thread message content. */ +export interface MessageTextDetails { + /** The text data. */ + value: string; + /** A list of annotations associated with this text. */ + annotations: Array; +} + +/** An abstract representation of an annotation to text thread message content. */ +export interface MessageTextAnnotationParent { + /** The textual content associated with this text annotation item. */ + text: string; + type: string; +} + +/** A citation within the message that points to a specific quote from a specific File associated with the agent or the message. Generated when the agent uses the 'file_search' tool to search files. */ +export interface MessageTextFileCitationAnnotation extends MessageTextAnnotationParent { + /** The object type, which is always 'file_citation'. */ + type: "file_citation"; + /** + * A citation within the message that points to a specific quote from a specific file. + * Generated when the agent uses the "file_search" tool to search files. + */ + fileCitation: MessageTextFileCitationDetails; + /** The first text index associated with this text annotation. */ + startIndex?: number; + /** The last text index associated with this text annotation. */ + endIndex?: number; +} + +/** A representation of a file-based text citation, as used in a file-based annotation of text thread message content. */ +export interface MessageTextFileCitationDetails { + /** The ID of the file associated with this citation. */ + fileId: string; + /** The specific quote cited in the associated file. */ + quote: string; +} + +/** A citation within the message that points to a file located at a specific path. */ +export interface MessageTextFilePathAnnotation extends MessageTextAnnotationParent { + /** The object type, which is always 'file_path'. */ + type: "file_path"; + /** A URL for the file that's generated when the agent used the code_interpreter tool to generate a file. */ + filePath: MessageTextFilePathDetails; + /** The first text index associated with this text annotation. */ + startIndex?: number; + /** The last text index associated with this text annotation. */ + endIndex?: number; +} + +/** An encapsulation of an image file ID, as used by message image content. */ +export interface MessageTextFilePathDetails { + /** The ID of the specific file that the citation is from. */ + fileId: string; +} + +/** A representation of image file content in a thread message. */ +export interface MessageImageFileContent extends MessageContentParent { + /** The object type, which is always 'image_file'. */ + type: "image_file"; + /** The image file for this thread message content item. */ + imageFile: MessageImageFileDetails; +} + +/** An image reference, as represented in thread message content. */ +export interface MessageImageFileDetails { + /** The ID for the file associated with this image. */ + fileId: string; +} + +/** The details used when creating a new run of an agent thread. */ +export interface CreateRunOptions { + /** The ID of the agent that should run the thread. */ + assistantId: string; + /** The overridden model name that the agent should use to run the thread. */ + model?: string | null; + /** The overridden system instructions that the agent should use to run the thread. */ + instructions?: string | null; + /** + * Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior + * on a per-run basis without overriding other instructions. + */ + additionalInstructions?: string | null; + /** Adds additional messages to the thread before creating the run. */ + additionalMessages?: Array | null; + /** The overridden list of enabled tools that the agent should use to run the thread. */ + tools?: Array; + /** + * If `true`, returns a stream of events that happen during the Run as server-sent events, + * terminating when the Run enters a terminal state with a `data: [DONE]` message. + */ + stream?: boolean; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output + * more random, while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model + * considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens + * comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + topP?: number | null; + /** + * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only + * the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, + * the run will end with status `incomplete`. See `incomplete_details` for more info. + */ + maxPromptTokens?: number | null; + /** + * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort + * to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of + * completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + */ + maxCompletionTokens?: number | null; + /** The strategy to use for dropping messages as the context windows moves forward. */ + truncationStrategy?: TruncationObject | null; + /** Controls whether or not and which tool is called by the model. */ + toolChoice?: AgentsApiToolChoiceOption | null; + /** Specifies the format that the model must output. */ + responseFormat?: AgentsApiResponseFormatOption | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** + * Controls for how a thread will be truncated prior to the run. Use this to control the initial + * context window of the run. + */ +export interface TruncationObject { + /** + * The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will + * be truncated to the `lastMessages` count most recent messages in the thread. When set to `auto`, messages in the middle of the thread + * will be dropped to fit the context length of the model, `max_prompt_tokens`. + * + * Possible values: "auto", "last_messages" + */ + type: TruncationStrategy; + /** The number of most recent messages from the thread when constructing the context for the run. */ + lastMessages?: number | null; +} + +/** Specifies a tool the model should use. Use to force the model to call a specific tool. */ +export interface AgentsNamedToolChoice { + /** + * the type of tool. If type is `function`, the function name must be set. + * + * Possible values: "function", "code_interpreter", "file_search", "bing_grounding", "microsoft_fabric", "sharepoint_grounding", "azure_ai_search" + */ + type: AgentsNamedToolChoiceType; + /** The name of the function to call */ + function?: FunctionName; +} + +/** The function name that will be used, if using the `function` tool */ +export interface FunctionName { + /** The name of the function to call */ + name: string; +} + +/** + * Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool. + * For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of + * vector store IDs. + */ +export interface UpdateToolResourcesOptions { + /** + * Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files + * associated with the tool. + */ + codeInterpreter?: UpdateCodeInterpreterToolResourceOptions; + /** Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. */ + fileSearch?: UpdateFileSearchToolResourceOptions; + /** Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */ + azureAISearch?: AzureAISearchResource; +} + +/** Request object to update `code_interpreted` tool resources. */ +export interface UpdateCodeInterpreterToolResourceOptions { + /** A list of file IDs to override the current list of the agent. */ + fileIds?: string[]; +} + +/** Request object to update `file_search` tool resources. */ +export interface UpdateFileSearchToolResourceOptions { + /** A list of vector store IDs to override the current list of the agent. */ + vectorStoreIds?: string[]; +} + +/** The data provided during a tool outputs submission to resolve pending tool calls and allow the model to continue. */ +export interface ToolOutput { + /** The ID of the tool call being resolved, as provided in the tool calls of a required action from a run. */ + toolCallId?: string; + /** The output from the tool to be submitted. */ + output?: string; +} + +/** The details used when creating and immediately running a new agent thread. */ +export interface CreateAndRunThreadOptions { + /** The ID of the agent for which the thread should be created. */ + assistantId: string; + /** The details used to create the new thread. If no thread is provided, an empty one will be created. */ + thread?: AgentThreadCreationOptions; + /** The overridden model that the agent should use to run the thread. */ + model?: string | null; + /** The overridden system instructions the agent should use to run the thread. */ + instructions?: string | null; + /** The overridden list of enabled tools the agent should use to run the thread. */ + tools?: Array | null; + /** Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis */ + toolResources?: UpdateToolResourcesOptions | null; + /** + * If `true`, returns a stream of events that happen during the Run as server-sent events, + * terminating when the Run enters a terminal state with a `data: [DONE]` message. + */ + stream?: boolean; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output + * more random, while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model + * considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens + * comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + topP?: number | null; + /** + * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only + * the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, + * the run will end with status `incomplete`. See `incomplete_details` for more info. + */ + maxPromptTokens?: number | null; + /** + * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only + * the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens + * specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + */ + maxCompletionTokens?: number | null; + /** The strategy to use for dropping messages as the context windows moves forward. */ + truncationStrategy?: TruncationObject | null; + /** Controls whether or not and which tool is called by the model. */ + toolChoice?: AgentsApiToolChoiceOption | null; + /** Specifies the format that the model must output. */ + responseFormat?: AgentsApiResponseFormatOption | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** The expiration policy for a vector store. */ +export interface VectorStoreExpirationPolicy { + /** + * Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`. + * + * Possible values: "last_active_at" + */ + anchor: VectorStoreExpirationPolicyAnchor; + /** The anchor timestamp after which the expiration policy applies. */ + days: number; +} + +/** Request object for creating a vector store. */ +export interface VectorStoreOptions { + /** A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files. */ + fileIds?: string[]; + /** The name of the vector store. */ + name?: string; + /** The vector store configuration, used when vector store is created from Azure asset URIs. */ + configuration?: VectorStoreConfiguration; + /** Details on when this vector store expires */ + expiresAfter?: VectorStoreExpirationPolicy; + /** The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty. */ + chunkingStrategy?: VectorStoreChunkingStrategyRequest; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** An abstract representation of a vector store chunking strategy configuration. */ +export interface VectorStoreChunkingStrategyRequestParent { + type: VectorStoreChunkingStrategyRequestType; +} + +/** The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400. */ +export interface VectorStoreAutoChunkingStrategyRequest + extends VectorStoreChunkingStrategyRequestParent { + /** The object type, which is always 'auto'. */ + type: "auto"; +} + +/** A statically configured chunking strategy. */ +export interface VectorStoreStaticChunkingStrategyRequest + extends VectorStoreChunkingStrategyRequestParent { + /** The object type, which is always 'static'. */ + type: "static"; + /** The options for the static chunking strategy. */ + static: VectorStoreStaticChunkingStrategyOptions; +} + +/** Options to configure a vector store static chunking strategy. */ +export interface VectorStoreStaticChunkingStrategyOptions { + /** The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. */ + maxChunkSizeTokens: number; + /** + * The number of tokens that overlap between chunks. The default value is 400. + * Note that the overlap must not exceed half of max_chunk_size_tokens. + */ + chunkOverlapTokens: number; +} + +/** Request object for updating a vector store. */ +export interface VectorStoreUpdateOptions { + /** The name of the vector store. */ + name?: string | null; + /** Details on when this vector store expires */ + expiresAfter?: VectorStoreExpirationPolicy | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** Evaluation Definition */ +export interface Evaluation { + /** Data for evaluation. */ + data: InputData; + /** Display Name for evaluation. It helps to find evaluation easily in AI Foundry. It does not need to be unique. */ + displayName?: string; + /** Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. */ + description?: string; + /** Evaluation's tags. Unlike properties, tags are fully mutable. */ + tags?: Record; + /** Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. */ + properties?: Record; + /** Evaluators to be used for the evaluation. */ + evaluators: Record; +} + +/** Abstract data class for input data configuration. */ +export interface InputDataParent { + type: string; +} + +/** Data Source for Application Insights. */ +export interface ApplicationInsightsConfiguration extends InputDataParent { + /** LogAnalytic Workspace resourceID associated with ApplicationInsights */ + resourceId: string; + /** Query to fetch the data. */ + query: string; + /** Service name. */ + serviceName: string; + /** Connection String to connect to ApplicationInsights. */ + connectionString?: string; +} + +/** Dataset as source for evaluation. */ +export interface Dataset extends InputDataParent { + /** Evaluation input data */ + id: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData {} + +/** Evaluator Configuration */ +export interface EvaluatorConfiguration { + /** Identifier of the evaluator. */ + id: string; + /** Initialization parameters of the evaluator. */ + initParams?: Record; + /** Data parameters of the evaluator. */ + dataMapping?: Record; +} + +/** Evaluation Schedule Definition */ +export interface EvaluationSchedule { + /** Data for evaluation. */ + data: ApplicationInsightsConfiguration; + /** Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. */ + description?: string; + /** Evaluation's tags. Unlike properties, tags are fully mutable. */ + tags?: Record; + /** Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. */ + properties?: Record; + /** Evaluators to be used for the evaluation. */ + evaluators: Record; + /** Trigger for the evaluation. */ + trigger: Trigger; +} + +/** Abstract data class for input data configuration. */ +export interface TriggerParent { + type: string; +} + +/** Recurrence Trigger Definition */ +export interface RecurrenceTrigger extends TriggerParent { + /** + * The frequency to trigger schedule. + * + * Possible values: "Month", "Week", "Day", "Hour", "Minute" + */ + frequency: Frequency; + /** Specifies schedule interval in conjunction with frequency */ + interval: number; + /** The recurrence schedule. */ + schedule?: RecurrenceSchedule; +} + +/** RecurrenceSchedule Definition */ +export interface RecurrenceSchedule { + /** List of hours for the schedule. */ + hours: number[]; + /** List of minutes for the schedule. */ + minutes: number[]; + /** List of days for the schedule. */ + weekDays?: WeekDays[]; + /** List of month days for the schedule */ + monthDays?: number[]; +} + +/** Cron Trigger Definition */ +export interface CronTrigger extends TriggerParent { + /** Cron expression for the trigger. */ + expression: string; +} + +/** An abstract representation of an input tool definition that an agent can use. */ +export type ToolDefinition = + | ToolDefinitionParent + | CodeInterpreterToolDefinition + | FileSearchToolDefinition + | FunctionToolDefinition + | BingGroundingToolDefinition + | MicrosoftFabricToolDefinition + | SharepointToolDefinition + | AzureAISearchToolDefinition; +/** An abstract representation of a single item of thread message content. */ +export type MessageContent = MessageContentParent | MessageTextContent | MessageImageFileContent; +/** An abstract representation of an annotation to text thread message content. */ +export type MessageTextAnnotation = + | MessageTextAnnotationParent + | MessageTextFileCitationAnnotation + | MessageTextFilePathAnnotation; +/** An abstract representation of a vector store chunking strategy configuration. */ +export type VectorStoreChunkingStrategyRequest = + | VectorStoreChunkingStrategyRequestParent + | VectorStoreAutoChunkingStrategyRequest + | VectorStoreStaticChunkingStrategyRequest; +/** Abstract data class for input data configuration. */ +export type InputData = InputDataParent | ApplicationInsightsConfiguration | Dataset; +/** Abstract data class for input data configuration. */ +export type Trigger = TriggerParent | RecurrenceTrigger | CronTrigger; +/** Alias for VectorStoreDataSourceAssetType */ +export type VectorStoreDataSourceAssetType = "uri_asset" | "id_asset"; +/** Alias for AgentsApiResponseFormatMode */ +export type AgentsApiResponseFormatMode = string; +/** Alias for ApiResponseFormat */ +export type ApiResponseFormat = string; +/** Alias for AgentsApiResponseFormatOption */ +export type AgentsApiResponseFormatOption = + | string + | AgentsApiResponseFormatMode + | AgentsApiResponseFormat; +/** Alias for ListSortOrder */ +export type ListSortOrder = "asc" | "desc"; +/** Alias for MessageRole */ +export type MessageRole = string; +/** Alias for MessageAttachmentToolDefinition */ +export type MessageAttachmentToolDefinition = + | CodeInterpreterToolDefinition + | FileSearchToolDefinition; +/** Alias for MessageStatus */ +export type MessageStatus = string; +/** Alias for MessageIncompleteDetailsReason */ +export type MessageIncompleteDetailsReason = string; +/** Alias for TruncationStrategy */ +export type TruncationStrategy = string; +/** Alias for AgentsApiToolChoiceOptionMode */ +export type AgentsApiToolChoiceOptionMode = string; +/** Alias for AgentsNamedToolChoiceType */ +export type AgentsNamedToolChoiceType = string; +/** Alias for AgentsApiToolChoiceOption */ +export type AgentsApiToolChoiceOption = + | string + | AgentsApiToolChoiceOptionMode + | AgentsNamedToolChoice; +/** Alias for FilePurpose */ +export type FilePurpose = string; +/** Alias for VectorStoreExpirationPolicyAnchor */ +export type VectorStoreExpirationPolicyAnchor = string; +/** Alias for VectorStoreChunkingStrategyRequestType */ +export type VectorStoreChunkingStrategyRequestType = string; +/** Alias for VectorStoreFileStatusFilter */ +export type VectorStoreFileStatusFilter = string; +/** The Type (or category) of the connection */ +export type ConnectionType = + | "AzureOpenAI" + | "Serverless" + | "AzureBlob" + | "AIServices" + | "CognitiveSearch"; +/** Alias for Frequency */ +export type Frequency = string; +/** Alias for WeekDays */ +export type WeekDays = string; diff --git a/sdk/ai/ai-projects/src/customization/outputModels.ts b/sdk/ai/ai-projects/src/customization/outputModels.ts new file mode 100644 index 000000000000..ad967f541764 --- /dev/null +++ b/sdk/ai/ai-projects/src/customization/outputModels.ts @@ -0,0 +1,1498 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Paged } from "@azure/core-paging"; + +/** An abstract representation of an input tool definition that an agent can use. */ +export interface ToolDefinitionOutputParent { + type: string; +} + +/** The input definition information for a code interpreter tool as used to configure an agent. */ +export interface CodeInterpreterToolDefinitionOutput extends ToolDefinitionOutputParent { + /** The object type, which is always 'code_interpreter'. */ + type: "code_interpreter"; +} + +/** The input definition information for a file search tool as used to configure an agent. */ +export interface FileSearchToolDefinitionOutput extends ToolDefinitionOutputParent { + /** The object type, which is always 'file_search'. */ + type: "file_search"; + /** Options overrides for the file search tool. */ + fileSearch?: FileSearchToolDefinitionDetailsOutput; +} + +/** Options overrides for the file search tool. */ +export interface FileSearchToolDefinitionDetailsOutput { + /** + * The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive. + * + * Note that the file search tool may output fewer than `max_num_results` results. See the file search tool documentation for more information. + */ + maxNumResults?: number; + rankingOptions?: FileSearchRankingOptionsOutput; +} + +/** Ranking options for file search. */ +export interface FileSearchRankingOptionsOutput { + /** File search ranker. */ + ranker: string; + /** Ranker search threshold. */ + scoreThreshold: number; +} + +/** The input definition information for a function tool as used to configure an agent. */ +export interface FunctionToolDefinitionOutput extends ToolDefinitionOutputParent { + /** The object type, which is always 'function'. */ + type: "function"; + /** The definition of the concrete function that the function tool should call. */ + function: FunctionDefinitionOutput; +} + +/** The input definition information for a function. */ +export interface FunctionDefinitionOutput { + /** The name of the function to be called. */ + name: string; + /** A description of what the function does, used by the model to choose when and how to call the function. */ + description?: string; + /** The parameters the functions accepts, described as a JSON Schema object. */ + parameters: any; +} + +/** The input definition information for a bing grounding search tool as used to configure an agent. */ +export interface BingGroundingToolDefinitionOutput extends ToolDefinitionOutputParent { + /** The object type, which is always 'bing_grounding'. */ + type: "bing_grounding"; + /** The list of connections used by the bing grounding tool. */ + bingGrounding: ToolConnectionListOutput; +} + +/** A set of connection resources currently used by either the `bing_grounding`, `microsoft_fabric`, or `sharepoint_grounding` tools. */ +export interface ToolConnectionListOutput { + /** + * The connections attached to this tool. There can be a maximum of 1 connection + * resource attached to the tool. + */ + connections?: Array; +} + +/** A connection resource. */ +export interface ToolConnectionOutput { + /** A connection in a ToolConnectionList attached to this tool. */ + connectionId: string; +} + +/** The input definition information for a Microsoft Fabric tool as used to configure an agent. */ +export interface MicrosoftFabricToolDefinitionOutput extends ToolDefinitionOutputParent { + /** The object type, which is always 'microsoft_fabric'. */ + type: "microsoft_fabric"; + /** The list of connections used by the Microsoft Fabric tool. */ + microsoftFabric: ToolConnectionListOutput; +} + +/** The input definition information for a sharepoint tool as used to configure an agent. */ +export interface SharepointToolDefinitionOutput extends ToolDefinitionOutputParent { + /** The object type, which is always 'sharepoint_grounding'. */ + type: "sharepoint_grounding"; + /** The list of connections used by the SharePoint tool. */ + sharepointGrounding: ToolConnectionListOutput; +} + +/** The input definition information for an Azure AI search tool as used to configure an agent. */ +export interface AzureAISearchToolDefinitionOutput extends ToolDefinitionOutputParent { + /** The object type, which is always 'azure_ai_search'. */ + type: "azure_ai_search"; +} + +/** + * A set of resources that are used by the agent's tools. The resources are specific to the type of + * tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` + * tool requires a list of vector store IDs. + */ +export interface ToolResourcesOutput { + /** Resources to be used by the `code_interpreter tool` consisting of file IDs. */ + codeInterpreter?: CodeInterpreterToolResourceOutput; + /** Resources to be used by the `file_search` tool consisting of vector store IDs. */ + fileSearch?: FileSearchToolResourceOutput; + /** Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */ + azureAISearch?: AzureAISearchResourceOutput; +} + +/** A set of resources that are used by the `code_interpreter` tool. */ +export interface CodeInterpreterToolResourceOutput { + /** + * A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files + * associated with the tool. + */ + fileIds?: string[]; + /** The data sources to be used. This option is mutually exclusive with fileIds. */ + dataSources?: Array; +} + +/** + * The structure, containing Azure asset URI path and the asset type of the file used as a data source + * for the enterprise file search. + */ +export interface VectorStoreDataSourceOutput { + /** Asset URI. */ + uri: string; + /** The asset type * */ + type: VectorStoreDataSourceAssetTypeOutput; +} + +/** A set of resources that are used by the `file_search` tool. */ +export interface FileSearchToolResourceOutput { + /** + * The ID of the vector store attached to this agent. There can be a maximum of 1 vector + * store attached to the agent. + */ + vectorStoreIds?: string[]; + /** + * The list of vector store configuration objects from Azure. This list is limited to one + * element. The only element of this list contains + * the list of azure asset IDs used by the search tool. + */ + vectorStores?: Array; +} + +/** The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs. */ +export interface VectorStoreConfigurationsOutput { + /** Name */ + name: string; + /** Configurations */ + configuration: VectorStoreConfigurationOutput; +} + +/** + * Vector storage configuration is the list of data sources, used when multiple + * files can be used for the enterprise file search. + */ +export interface VectorStoreConfigurationOutput { + /** Data sources */ + dataSources: Array; +} + +/** A set of index resources used by the `azure_ai_search` tool. */ +export interface AzureAISearchResourceOutput { + /** + * The indices attached to this agent. There can be a maximum of 1 index + * resource attached to the agent. + */ + indexes?: Array; +} + +/** A Index resource. */ +export interface IndexResourceOutput { + /** An index connection id in an IndexResource attached to this agent. */ + indexConnectionId: string; + /** The name of an index in an IndexResource attached to this agent. */ + indexName: string; +} + +/** + * An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run. + * If `text` the model can return text or any value needed. + */ +export interface AgentsApiResponseFormatOutput { + /** + * Must be one of `text` or `json_object`. + * + * Possible values: "text", "json_object" + */ + type?: ApiResponseFormatOutput; +} + +/** Represents an agent that can call the model and use tools. */ +export interface AgentOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always assistant. */ + object: "assistant"; + /** The Unix timestamp, in seconds, representing when this object was created. */ + createdAt: Date; + /** The name of the agent. */ + name: string | null; + /** The description of the agent. */ + description: string | null; + /** The ID of the model to use. */ + model: string; + /** The system instructions for the agent to use. */ + instructions: string | null; + /** The collection of tools enabled for the agent. */ + tools: Array; + /** + * A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` + * tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + */ + toolResources: ToolResourcesOutput | null; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, + * while lower values like 0.2 will make it more focused and deterministic. + */ + temperature: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. + * So 0.1 means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + topP: number | null; + /** The response format of the tool calls used by this agent. */ + responseFormat?: AgentsApiResponseFormatOptionOutput | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfAgentOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + firstId: string; + /** The last ID represented in this list. */ + lastId: string; + /** A value indicating whether there are additional values available not captured in this list. */ + hasMore: boolean; +} + +/** The status of an agent deletion operation. */ +export interface AgentDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'assistant.deleted'. */ + object: "assistant.deleted"; +} + +/** This describes to which tools a file has been attached. */ +export interface MessageAttachmentOutput { + /** The ID of the file to attach to the message. */ + fileId?: string; + /** Azure asset ID. */ + dataSources?: Array; + /** The tools to add to this file. */ + tools: MessageAttachmentToolDefinitionOutput[]; +} + +/** Information about a single thread associated with an agent. */ +export interface AgentThreadOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread'. */ + object: "thread"; + /** The Unix timestamp, in seconds, representing when this object was created. */ + createdAt: Date; + /** + * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type + * of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list + * of vector store IDs. + */ + toolResources: ToolResourcesOutput | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** The status of a thread deletion operation. */ +export interface ThreadDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'thread.deleted'. */ + object: "thread.deleted"; +} + +/** A single, existing message within an agent thread. */ +export interface ThreadMessageOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread.message'. */ + object: "thread.message"; + /** The Unix timestamp, in seconds, representing when this object was created. */ + createdAt: Date; + /** The ID of the thread that this message belongs to. */ + threadId: string; + /** + * The status of the message. + * + * Possible values: "in_progress", "incomplete", "completed" + */ + status: MessageStatusOutput; + /** On an incomplete message, details about why the message is incomplete. */ + incompleteDetails: MessageIncompleteDetailsOutput | null; + /** The Unix timestamp (in seconds) for when the message was completed. */ + completedAt: Date | null; + /** The Unix timestamp (in seconds) for when the message was marked as incomplete. */ + incompleteAt: Date | null; + /** + * The role associated with the agent thread message. + * + * Possible values: "user", "assistant" + */ + role: MessageRoleOutput; + /** The list of content items associated with the agent thread message. */ + content: Array; + /** If applicable, the ID of the agent that authored this message. */ + assistantId: string | null; + /** If applicable, the ID of the run associated with the authoring of this message. */ + runId: string | null; + /** A list of files attached to the message, and the tools they were added to. */ + attachments: Array | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** Information providing additional detail about a message entering an incomplete status. */ +export interface MessageIncompleteDetailsOutput { + /** + * The provided reason describing why the message was marked as incomplete. + * + * Possible values: "content_filter", "max_tokens", "run_cancelled", "run_failed", "run_expired" + */ + reason: MessageIncompleteDetailsReasonOutput; +} + +/** An abstract representation of a single item of thread message content. */ +export interface MessageContentOutputParent { + type: string; +} + +/** A representation of a textual item of thread message content. */ +export interface MessageTextContentOutput extends MessageContentOutputParent { + /** The object type, which is always 'text'. */ + type: "text"; + /** The text and associated annotations for this thread message content item. */ + text: MessageTextDetailsOutput; +} + +/** The text and associated annotations for a single item of agent thread message content. */ +export interface MessageTextDetailsOutput { + /** The text data. */ + value: string; + /** A list of annotations associated with this text. */ + annotations: Array; +} + +/** An abstract representation of an annotation to text thread message content. */ +export interface MessageTextAnnotationOutputParent { + /** The textual content associated with this text annotation item. */ + text: string; + type: string; +} + +/** A citation within the message that points to a specific quote from a specific File associated with the agent or the message. Generated when the agent uses the 'file_search' tool to search files. */ +export interface MessageTextFileCitationAnnotationOutput extends MessageTextAnnotationOutputParent { + /** The object type, which is always 'file_citation'. */ + type: "file_citation"; + /** + * A citation within the message that points to a specific quote from a specific file. + * Generated when the agent uses the "file_search" tool to search files. + */ + fileCitation: MessageTextFileCitationDetailsOutput; + /** The first text index associated with this text annotation. */ + startIndex?: number; + /** The last text index associated with this text annotation. */ + endIndex?: number; +} + +/** A representation of a file-based text citation, as used in a file-based annotation of text thread message content. */ +export interface MessageTextFileCitationDetailsOutput { + /** The ID of the file associated with this citation. */ + fileId: string; + /** The specific quote cited in the associated file. */ + quote: string; +} + +/** A citation within the message that points to a file located at a specific path. */ +export interface MessageTextFilePathAnnotationOutput extends MessageTextAnnotationOutputParent { + /** The object type, which is always 'file_path'. */ + type: "file_path"; + /** A URL for the file that's generated when the agent used the code_interpreter tool to generate a file. */ + filePath: MessageTextFilePathDetailsOutput; + /** The first text index associated with this text annotation. */ + startIndex?: number; + /** The last text index associated with this text annotation. */ + endIndex?: number; +} + +/** An encapsulation of an image file ID, as used by message image content. */ +export interface MessageTextFilePathDetailsOutput { + /** The ID of the specific file that the citation is from. */ + fileId: string; +} + +/** A representation of image file content in a thread message. */ +export interface MessageImageFileContentOutput extends MessageContentOutputParent { + /** The object type, which is always 'image_file'. */ + type: "image_file"; + /** The image file for this thread message content item. */ + imageFile: MessageImageFileDetailsOutput; +} + +/** An image reference, as represented in thread message content. */ +export interface MessageImageFileDetailsOutput { + /** The ID for the file associated with this image. */ + fileId: string; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfThreadMessageOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + firstId: string; + /** The last ID represented in this list. */ + lastId: string; + /** A value indicating whether there are additional values available not captured in this list. */ + hasMore: boolean; +} + +/** + * Controls for how a thread will be truncated prior to the run. Use this to control the initial + * context window of the run. + */ +export interface TruncationObjectOutput { + /** + * The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will + * be truncated to the `lastMessages` count most recent messages in the thread. When set to `auto`, messages in the middle of the thread + * will be dropped to fit the context length of the model, `max_prompt_tokens`. + * + * Possible values: "auto", "last_messages" + */ + type: TruncationStrategyOutput; + /** The number of most recent messages from the thread when constructing the context for the run. */ + lastMessages?: number | null; +} + +/** Specifies a tool the model should use. Use to force the model to call a specific tool. */ +export interface AgentsNamedToolChoiceOutput { + /** + * the type of tool. If type is `function`, the function name must be set. + * + * Possible values: "function", "code_interpreter", "file_search", "bing_grounding", "microsoft_fabric", "sharepoint_grounding", "azure_ai_search" + */ + type: AgentsNamedToolChoiceTypeOutput; + /** The name of the function to call */ + function?: FunctionNameOutput; +} + +/** The function name that will be used, if using the `function` tool */ +export interface FunctionNameOutput { + /** The name of the function to call */ + name: string; +} + +/** Data representing a single evaluation run of an agent thread. */ +export interface ThreadRunOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread.run'. */ + object: "thread.run"; + /** The ID of the thread associated with this run. */ + threadId: string; + /** The ID of the agent associated with the thread this run was performed against. */ + assistantId: string; + /** + * The status of the agent thread run. + * + * Possible values: "queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "expired" + */ + status: RunStatusOutput; + /** The details of the action required for the agent thread run to continue. */ + requiredAction?: RequiredActionOutput | null; + /** The last error, if any, encountered by this agent thread run. */ + lastError: RunErrorOutput | null; + /** The ID of the model to use. */ + model: string; + /** The overridden system instructions used for this agent thread run. */ + instructions: string; + /** The overridden enabled tools used for this agent thread run. */ + tools: Array; + /** The Unix timestamp, in seconds, representing when this object was created. */ + createdAt: Date; + /** The Unix timestamp, in seconds, representing when this item expires. */ + expiresAt: Date | null; + /** The Unix timestamp, in seconds, representing when this item was started. */ + startedAt: Date | null; + /** The Unix timestamp, in seconds, representing when this completed. */ + completedAt: Date | null; + /** The Unix timestamp, in seconds, representing when this was cancelled. */ + cancelledAt: Date | null; + /** The Unix timestamp, in seconds, representing when this failed. */ + failedAt: Date | null; + /** Details on why the run is incomplete. Will be `null` if the run is not incomplete. */ + incompleteDetails: IncompleteRunDetailsOutput | null; + /** Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). */ + usage: RunCompletionUsageOutput | null; + /** The sampling temperature used for this run. If not set, defaults to 1. */ + temperature?: number | null; + /** The nucleus sampling value used for this run. If not set, defaults to 1. */ + topP?: number | null; + /** The maximum number of prompt tokens specified to have been used over the course of the run. */ + maxPromptTokens: number | null; + /** The maximum number of completion tokens specified to have been used over the course of the run. */ + maxCompletionTokens: number | null; + /** The strategy to use for dropping messages as the context windows moves forward. */ + truncationStrategy: TruncationObjectOutput | null; + /** Controls whether or not and which tool is called by the model. */ + toolChoice: AgentsApiToolChoiceOptionOutput | null; + /** The response format of the tool calls used in this run. */ + responseFormat: AgentsApiResponseFormatOptionOutput | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; + /** Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis */ + toolResources?: UpdateToolResourcesOptionsOutput | null; + /** Determines if tools can be executed in parallel within the run. */ + parallelToolCalls?: boolean; +} + +/** An abstract representation of a required action for an agent thread run to continue. */ +export interface RequiredActionOutputParent { + type: string; +} + +/** The details for required tool calls that must be submitted for an agent thread run to continue. */ +export interface SubmitToolOutputsActionOutput extends RequiredActionOutputParent { + /** The object type, which is always 'submit_tool_outputs'. */ + type: "submit_tool_outputs"; + /** The details describing tools that should be called to submit tool outputs. */ + submitToolOutputs: SubmitToolOutputsDetailsOutput; +} + +/** The details describing tools that should be called to submit tool outputs. */ +export interface SubmitToolOutputsDetailsOutput { + /** The list of tool calls that must be resolved for the agent thread run to continue. */ + toolCalls: Array; +} + +/** An abstract representation a a tool invocation needed by the model to continue a run. */ +export interface RequiredToolCallOutputParent { + /** The ID of the tool call. This ID must be referenced when submitting tool outputs. */ + id: string; + type: string; +} + +/** A representation of a requested call to a function tool, needed by the model to continue evaluation of a run. */ +export interface RequiredFunctionToolCallOutput extends RequiredToolCallOutputParent { + /** The object type of the required tool call. Always 'function' for function tools. */ + type: "function"; + /** Detailed information about the function to be executed by the tool that includes name and arguments. */ + function: RequiredFunctionToolCallDetailsOutput; +} + +/** The detailed information for a function invocation, as provided by a required action invoking a function tool, that includes the name of and arguments to the function. */ +export interface RequiredFunctionToolCallDetailsOutput { + /** The name of the function. */ + name: string; + /** The arguments to use when invoking the named function, as provided by the model. Arguments are presented as a JSON document that should be validated and parsed for evaluation. */ + arguments: string; +} + +/** The details of an error as encountered by an agent thread run. */ +export interface RunErrorOutput { + /** The status for the error. */ + code: string; + /** The human-readable text associated with the error. */ + message: string; +} + +/** Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). */ +export interface RunCompletionUsageOutput { + /** Number of completion tokens used over the course of the run. */ + completionTokens: number; + /** Number of prompt tokens used over the course of the run. */ + promptTokens: number; + /** Total number of tokens used (prompt + completion). */ + totalTokens: number; +} + +/** + * Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool. + * For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of + * vector store IDs. + */ +export interface UpdateToolResourcesOptionsOutput { + /** + * Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files + * associated with the tool. + */ + codeInterpreter?: UpdateCodeInterpreterToolResourceOptionsOutput; + /** Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. */ + fileSearch?: UpdateFileSearchToolResourceOptionsOutput; + /** Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */ + azureAISearch?: AzureAISearchResourceOutput; +} + +/** Request object to update `code_interpreted` tool resources. */ +export interface UpdateCodeInterpreterToolResourceOptionsOutput { + /** A list of file IDs to override the current list of the agent. */ + fileIds?: string[]; +} + +/** Request object to update `file_search` tool resources. */ +export interface UpdateFileSearchToolResourceOptionsOutput { + /** A list of vector store IDs to override the current list of the agent. */ + vectorStoreIds?: string[]; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfThreadRunOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + firstId: string; + /** The last ID represented in this list. */ + lastId: string; + /** A value indicating whether there are additional values available not captured in this list. */ + hasMore: boolean; +} + +/** Detailed information about a single step of an agent thread run. */ +export interface RunStepOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread.run.step'. */ + object: "thread.run.step"; + /** + * The type of run step, which can be either message_creation or tool_calls. + * + * Possible values: "message_creation", "tool_calls" + */ + type: RunStepTypeOutput; + /** The ID of the agent associated with the run step. */ + assistantId: string; + /** The ID of the thread that was run. */ + threadId: string; + /** The ID of the run that this run step is a part of. */ + runId: string; + /** + * The status of this run step. + * + * Possible values: "in_progress", "cancelled", "failed", "completed", "expired" + */ + status: RunStepStatusOutput; + /** The details for this run step. */ + stepDetails: RunStepDetailsOutput; + /** If applicable, information about the last error encountered by this run step. */ + lastError: RunStepErrorOutput | null; + /** The Unix timestamp, in seconds, representing when this object was created. */ + createdAt: Date; + /** The Unix timestamp, in seconds, representing when this item expired. */ + expiredAt: Date | null; + /** The Unix timestamp, in seconds, representing when this completed. */ + completedAt: Date | null; + /** The Unix timestamp, in seconds, representing when this was cancelled. */ + cancelledAt: Date | null; + /** The Unix timestamp, in seconds, representing when this failed. */ + failedAt: Date | null; + /** Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. */ + usage?: RunStepCompletionUsageOutput | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** An abstract representation of the details for a run step. */ +export interface RunStepDetailsOutputParent { + type: RunStepTypeOutput; +} + +/** The detailed information associated with a message creation run step. */ +export interface RunStepMessageCreationDetailsOutput extends RunStepDetailsOutputParent { + /** The object type, which is always 'message_creation'. */ + type: "message_creation"; + /** Information about the message creation associated with this run step. */ + messageCreation: RunStepMessageCreationReferenceOutput; +} + +/** The details of a message created as a part of a run step. */ +export interface RunStepMessageCreationReferenceOutput { + /** The ID of the message created by this run step. */ + messageId: string; +} + +/** The detailed information associated with a run step calling tools. */ +export interface RunStepToolCallDetailsOutput extends RunStepDetailsOutputParent { + /** The object type, which is always 'tool_calls'. */ + type: "tool_calls"; + /** A list of tool call details for this run step. */ + toolCalls: Array; +} + +/** An abstract representation of a detailed tool call as recorded within a run step for an existing run. */ +export interface RunStepToolCallOutputParent { + /** The ID of the tool call. This ID must be referenced when you submit tool outputs. */ + id: string; + type: string; +} + +/** + * A record of a call to a code interpreter tool, issued by the model in evaluation of a defined tool, that + * represents inputs and outputs consumed and emitted by the code interpreter. + */ +export interface RunStepCodeInterpreterToolCallOutput extends RunStepToolCallOutputParent { + /** The object type, which is always 'code_interpreter'. */ + type: "code_interpreter"; + /** The details of the tool call to the code interpreter tool. */ + codeInterpreter: RunStepCodeInterpreterToolCallDetailsOutput; +} + +/** The detailed information about a code interpreter invocation by the model. */ +export interface RunStepCodeInterpreterToolCallDetailsOutput { + /** The input provided by the model to the code interpreter tool. */ + input: string; + /** The outputs produced by the code interpreter tool back to the model in response to the tool call. */ + outputs: Array; +} + +/** An abstract representation of an emitted output from a code interpreter tool. */ +export interface RunStepCodeInterpreterToolCallOutputOutputParent { + type: string; +} + +/** A representation of a log output emitted by a code interpreter tool in response to a tool call by the model. */ +export interface RunStepCodeInterpreterLogOutputOutput + extends RunStepCodeInterpreterToolCallOutputOutputParent { + /** The object type, which is always 'logs'. */ + type: "logs"; + /** The serialized log output emitted by the code interpreter. */ + logs: string; +} + +/** A representation of an image output emitted by a code interpreter tool in response to a tool call by the model. */ +export interface RunStepCodeInterpreterImageOutputOutput + extends RunStepCodeInterpreterToolCallOutputOutputParent { + /** The object type, which is always 'image'. */ + type: "image"; + /** Referential information for the image associated with this output. */ + image: RunStepCodeInterpreterImageReferenceOutput; +} + +/** An image reference emitted by a code interpreter tool in response to a tool call by the model. */ +export interface RunStepCodeInterpreterImageReferenceOutput { + /** The ID of the file associated with this image. */ + fileId: string; +} + +/** + * A record of a call to a file search tool, issued by the model in evaluation of a defined tool, that represents + * executed file search. + */ +export interface RunStepFileSearchToolCallOutput extends RunStepToolCallOutputParent { + /** The object type, which is always 'file_search'. */ + type: "file_search"; + /** Reserved for future use. */ + fileSearch: Record; +} + +/** + * A record of a call to a bing grounding tool, issued by the model in evaluation of a defined tool, that represents + * executed search with bing grounding. + */ +export interface RunStepBingGroundingToolCallOutput extends RunStepToolCallOutputParent { + /** The object type, which is always 'bing_grounding'. */ + type: "bing_grounding"; + /** Reserved for future use. */ + bingGrounding: Record; +} + +/** + * A record of a call to an Azure AI Search tool, issued by the model in evaluation of a defined tool, that represents + * executed Azure AI search. + */ +export interface RunStepAzureAISearchToolCallOutput extends RunStepToolCallOutputParent { + /** The object type, which is always 'azure_ai_search'. */ + type: "azure_ai_search"; + /** Reserved for future use. */ + azureAISearch: Record; +} + +/** + * A record of a call to a SharePoint tool, issued by the model in evaluation of a defined tool, that represents + * executed SharePoint actions. + */ +export interface RunStepSharepointToolCallOutput extends RunStepToolCallOutputParent { + /** The object type, which is always 'sharepoint_grounding'. */ + type: "sharepoint_grounding"; + /** Reserved for future use. */ + sharepointGrounding: Record; +} + +/** + * A record of a call to a Microsoft Fabric tool, issued by the model in evaluation of a defined tool, that represents + * executed Microsoft Fabric operations. + */ +export interface RunStepMicrosoftFabricToolCallOutput extends RunStepToolCallOutputParent { + /** The object type, which is always 'microsoft_fabric'. */ + type: "microsoft_fabric"; + /** Reserved for future use. */ + microsoftFabric: Record; +} + +/** + * A record of a call to a function tool, issued by the model in evaluation of a defined tool, that represents the inputs + * and output consumed and emitted by the specified function. + */ +export interface RunStepFunctionToolCallOutput extends RunStepToolCallOutputParent { + /** The object type, which is always 'function'. */ + type: "function"; + /** The detailed information about the function called by the model. */ + function: RunStepFunctionToolCallDetailsOutput; +} + +/** The detailed information about the function called by the model. */ +export interface RunStepFunctionToolCallDetailsOutput { + /** The name of the function. */ + name: string; + /** The arguments that the model requires are provided to the named function. */ + arguments: string; + /** The output of the function, only populated for function calls that have already have had their outputs submitted. */ + output: string | null; +} + +/** The error information associated with a failed run step. */ +export interface RunStepErrorOutput { + /** + * The error code for this error. + * + * Possible values: "server_error", "rate_limit_exceeded" + */ + code: RunStepErrorCodeOutput; + /** The human-readable text associated with this error. */ + message: string; +} + +/** Usage statistics related to the run step. */ +export interface RunStepCompletionUsageOutput { + /** Number of completion tokens used over the course of the run step. */ + completionTokens: number; + /** Number of prompt tokens used over the course of the run step. */ + promptTokens: number; + /** Total number of tokens used (prompt + completion). */ + totalTokens: number; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfRunStepOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + firstId: string; + /** The last ID represented in this list. */ + lastId: string; + /** A value indicating whether there are additional values available not captured in this list. */ + hasMore: boolean; +} + +/** The response data from a file list operation. */ +export interface FileListResponseOutput { + /** The object type, which is always 'list'. */ + object: "list"; + /** The files returned for the request. */ + data: Array; +} + +/** Represents an agent that can call the model and use tools. */ +export interface OpenAIFileOutput { + /** The object type, which is always 'file'. */ + object: "file"; + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The size of the file, in bytes. */ + bytes: number; + /** The name of the file. */ + filename: string; + /** The Unix timestamp, in seconds, representing when this object was created. */ + createdAt: Date; + /** + * The intended purpose of a file. + * + * Possible values: "fine-tune", "fine-tune-results", "assistants", "assistants_output", "batch", "batch_output", "vision" + */ + purpose: FilePurposeOutput; + /** + * The state of the file. This field is available in Azure OpenAI only. + * + * Possible values: "uploaded", "pending", "running", "processed", "error", "deleting", "deleted" + */ + status?: FileStateOutput; + /** The error message with details in case processing of this file failed. This field is available in Azure OpenAI only. */ + statusDetails?: string; +} + +/** A status response from a file deletion operation. */ +export interface FileDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'file'. */ + object: "file"; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfVectorStoreOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + firstId: string; + /** The last ID represented in this list. */ + lastId: string; + /** A value indicating whether there are additional values available not captured in this list. */ + hasMore: boolean; +} + +/** A vector store is a collection of processed files can be used by the `file_search` tool. */ +export interface VectorStoreOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always `vector_store` */ + object: "vector_store"; + /** The Unix timestamp (in seconds) for when the vector store was created. */ + createdAt: Date; + /** The name of the vector store. */ + name: string; + /** The total number of bytes used by the files in the vector store. */ + usageBytes: number; + /** Files count grouped by status processed or being processed by this vector store. */ + fileCounts: VectorStoreFileCountOutput; + /** + * The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. + * + * Possible values: "expired", "in_progress", "completed" + */ + status: VectorStoreStatusOutput; + /** Details on when this vector store expires */ + expiresAfter?: VectorStoreExpirationPolicyOutput; + /** The Unix timestamp (in seconds) for when the vector store will expire. */ + expiresAt?: Date | null; + /** The Unix timestamp (in seconds) for when the vector store was last active. */ + lastActiveAt: Date | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** Counts of files processed or being processed by this vector store grouped by status. */ +export interface VectorStoreFileCountOutput { + /** The number of files that are currently being processed. */ + inProgress: number; + /** The number of files that have been successfully processed. */ + completed: number; + /** The number of files that have failed to process. */ + failed: number; + /** The number of files that were cancelled. */ + cancelled: number; + /** The total number of files. */ + total: number; +} + +/** The expiration policy for a vector store. */ +export interface VectorStoreExpirationPolicyOutput { + /** + * Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`. + * + * Possible values: "last_active_at" + */ + anchor: VectorStoreExpirationPolicyAnchorOutput; + /** The anchor timestamp after which the expiration policy applies. */ + days: number; +} + +/** Options to configure a vector store static chunking strategy. */ +export interface VectorStoreStaticChunkingStrategyOptionsOutput { + /** The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. */ + maxChunkSizeTokens: number; + /** + * The number of tokens that overlap between chunks. The default value is 400. + * Note that the overlap must not exceed half of max_chunk_size_tokens. + */ + chunkOverlapTokens: number; +} + +/** Response object for deleting a vector store. */ +export interface VectorStoreDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'vector_store.deleted'. */ + object: "vector_store.deleted"; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfVectorStoreFileOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + firstId: string; + /** The last ID represented in this list. */ + lastId: string; + /** A value indicating whether there are additional values available not captured in this list. */ + hasMore: boolean; +} + +/** Description of a file attached to a vector store. */ +export interface VectorStoreFileOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always `vector_store.file`. */ + object: "vector_store.file"; + /** + * The total vector store usage in bytes. Note that this may be different from the original file + * size. + */ + usageBytes: number; + /** The Unix timestamp (in seconds) for when the vector store file was created. */ + createdAt: Date; + /** The ID of the vector store that the file is attached to. */ + vectorStoreId: string; + /** + * The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. + * + * Possible values: "in_progress", "completed", "failed", "cancelled" + */ + status: VectorStoreFileStatusOutput; + /** The last error associated with this vector store file. Will be `null` if there are no errors. */ + lastError: VectorStoreFileErrorOutput | null; + /** The strategy used to chunk the file. */ + chunkingStrategy: VectorStoreChunkingStrategyResponseOutput; +} + +/** Details on the error that may have ocurred while processing a file for this vector store */ +export interface VectorStoreFileErrorOutput { + /** + * One of `server_error` or `rate_limit_exceeded`. + * + * Possible values: "internal_error", "file_not_found", "parsing_error", "unhandled_mime_type" + */ + code: VectorStoreFileErrorCodeOutput; + /** A human-readable description of the error. */ + message: string; +} + +/** An abstract representation of a vector store chunking strategy configuration. */ +export interface VectorStoreChunkingStrategyResponseOutputParent { + type: VectorStoreChunkingStrategyResponseTypeOutput; +} + +/** This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API. */ +export interface VectorStoreAutoChunkingStrategyResponseOutput + extends VectorStoreChunkingStrategyResponseOutputParent { + /** The object type, which is always 'other'. */ + type: "other"; +} + +/** A statically configured chunking strategy. */ +export interface VectorStoreStaticChunkingStrategyResponseOutput + extends VectorStoreChunkingStrategyResponseOutputParent { + /** The object type, which is always 'static'. */ + type: "static"; + /** The options for the static chunking strategy. */ + static: VectorStoreStaticChunkingStrategyOptionsOutput; +} + +/** Response object for deleting a vector store file relationship. */ +export interface VectorStoreFileDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'vector_store.deleted'. */ + object: "vector_store.file.deleted"; +} + +/** A batch of files attached to a vector store. */ +export interface VectorStoreFileBatchOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always `vector_store.file_batch`. */ + object: "vector_store.files_batch"; + /** The Unix timestamp (in seconds) for when the vector store files batch was created. */ + createdAt: Date; + /** The ID of the vector store that the file is attached to. */ + vectorStoreId: string; + /** + * The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. + * + * Possible values: "in_progress", "completed", "cancelled", "failed" + */ + status: VectorStoreFileBatchStatusOutput; + /** Files count grouped by status processed or being processed by this vector store. */ + fileCounts: VectorStoreFileCountOutput; +} + +/** Response from the Workspace - Get operation */ +export interface GetWorkspaceResponseOutput { + /** A unique identifier for the resource */ + id: string; + /** The name of the resource */ + name: string; + /** The properties of the resource */ + properties: WorkspacePropertiesOutput; +} + +/** workspace properties */ +export interface WorkspacePropertiesOutput { + /** Authentication type of the connection target */ + applicationInsights: string; +} + +/** Response from the list operation */ +export interface ListConnectionsResponseOutput { + /** A list of connection list secrets */ + value: Array; +} + +/** Response from the listSecrets operation */ +export interface GetConnectionResponseOutput { + /** A unique identifier for the connection */ + id: string; + /** The name of the resource */ + name: string; + /** The properties of the resource */ + properties: InternalConnectionPropertiesOutput; +} + +/** Connection properties */ +export interface InternalConnectionPropertiesOutputParent { + /** Category of the connection */ + category: ConnectionTypeOutput; + /** The connection URL to be used for this service */ + target: string; + authType: AuthenticationTypeOutput; +} + +/** Connection properties for connections with API key authentication */ +export interface InternalConnectionPropertiesApiKeyAuthOutput + extends InternalConnectionPropertiesOutputParent { + /** Authentication type of the connection target */ + authType: "ApiKey"; + /** Credentials will only be present for authType=ApiKey */ + credentials: CredentialsApiKeyAuthOutput; +} + +/** The credentials needed for API key authentication */ +export interface CredentialsApiKeyAuthOutput { + /** The API key */ + key: string; +} + +/** Connection properties for connections with AAD authentication (aka `Entra ID passthrough`) */ +export interface InternalConnectionPropertiesAADAuthOutput + extends InternalConnectionPropertiesOutputParent { + /** Authentication type of the connection target */ + authType: "AAD"; +} + +/** Connection properties for connections with SAS authentication */ +export interface InternalConnectionPropertiesSASAuthOutput + extends InternalConnectionPropertiesOutputParent { + /** Authentication type of the connection target */ + authType: "SAS"; + /** Credentials will only be present for authType=ApiKey */ + credentials: CredentialsSASAuthOutput; +} + +/** The credentials needed for Shared Access Signatures (SAS) authentication */ +export interface CredentialsSASAuthOutput { + /** The Shared Access Signatures (SAS) token */ + SAS: string; +} + +/** Response from getting properties of the Application Insights resource */ +export interface GetAppInsightsResponseOutput { + /** A unique identifier for the resource */ + id: string; + /** The name of the resource */ + name: string; + /** The properties of the resource */ + properties: AppInsightsPropertiesOutput; +} + +/** The properties of the Application Insights resource */ +export interface AppInsightsPropertiesOutput { + /** Authentication type of the connection target */ + ConnectionString: string; +} + +/** Evaluation Definition */ +export interface EvaluationOutput { + /** Identifier of the evaluation. */ + readonly id: string; + /** Data for evaluation. */ + data: InputDataOutput; + /** Display Name for evaluation. It helps to find evaluation easily in AI Foundry. It does not need to be unique. */ + displayName?: string; + /** Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. */ + description?: string; + /** Metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemDataOutput; + /** Status of the evaluation. It is set by service and is read-only. */ + readonly status?: string; + /** Evaluation's tags. Unlike properties, tags are fully mutable. */ + tags?: Record; + /** Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. */ + properties?: Record; + /** Evaluators to be used for the evaluation. */ + evaluators: Record; +} + +/** Abstract data class for input data configuration. */ +export interface InputDataOutputParent { + type: string; +} + +/** Data Source for Application Insights. */ +export interface ApplicationInsightsConfigurationOutput extends InputDataOutputParent { + readonly type: "app_insights"; + /** LogAnalytic Workspace resourceID associated with ApplicationInsights */ + resourceId: string; + /** Query to fetch the data. */ + query: string; + /** Service name. */ + serviceName: string; + /** Connection String to connect to ApplicationInsights. */ + connectionString?: string; +} + +/** Dataset as source for evaluation. */ +export interface DatasetOutput extends InputDataOutputParent { + readonly type: "dataset"; + /** Evaluation input data */ + id: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemDataOutput { + /** The timestamp the resource was created at. */ + readonly createdAt?: string; + /** The identity that created the resource. */ + readonly createdBy?: string; + /** The identity type that created the resource. */ + readonly createdByType?: string; + /** The timestamp of resource last modification (UTC) */ + readonly lastModifiedAt?: string; +} + +/** Evaluator Configuration */ +export interface EvaluatorConfigurationOutput { + /** Identifier of the evaluator. */ + id: string; + /** Initialization parameters of the evaluator. */ + initParams?: Record; + /** Data parameters of the evaluator. */ + dataMapping?: Record; +} + +/** Evaluation Schedule Definition */ +export interface EvaluationScheduleOutput { + /** Name of the schedule, which also serves as the unique identifier for the evaluation */ + readonly name: string; + /** Data for evaluation. */ + data: ApplicationInsightsConfigurationOutput; + /** Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. */ + description?: string; + /** Metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemDataOutput; + /** Provisioning State of the evaluation. It is set by service and is read-only. */ + readonly provisioningState?: string; + /** Evaluation's tags. Unlike properties, tags are fully mutable. */ + tags?: Record; + /** Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. */ + properties?: Record; + /** Enabled status of the evaluation. It is set by service and is read-only. */ + readonly isEnabled?: string; + /** Evaluators to be used for the evaluation. */ + evaluators: Record; + /** Trigger for the evaluation. */ + trigger: TriggerOutput; +} + +/** Abstract data class for input data configuration. */ +export interface TriggerOutputParent { + type: string; +} + +/** Recurrence Trigger Definition */ +export interface RecurrenceTriggerOutput extends TriggerOutputParent { + readonly type: "Recurrence"; + /** + * The frequency to trigger schedule. + * + * Possible values: "Month", "Week", "Day", "Hour", "Minute" + */ + frequency: FrequencyOutput; + /** Specifies schedule interval in conjunction with frequency */ + interval: number; + /** The recurrence schedule. */ + schedule?: RecurrenceScheduleOutput; +} + +/** RecurrenceSchedule Definition */ +export interface RecurrenceScheduleOutput { + /** List of hours for the schedule. */ + hours: number[]; + /** List of minutes for the schedule. */ + minutes: number[]; + /** List of days for the schedule. */ + weekDays?: WeekDaysOutput[]; + /** List of month days for the schedule */ + monthDays?: number[]; +} + +/** Cron Trigger Definition */ +export interface CronTriggerOutput extends TriggerOutputParent { + readonly type: "Cron"; + /** Cron expression for the trigger. */ + expression: string; +} + +/** An abstract representation of an input tool definition that an agent can use. */ +export type ToolDefinitionOutput = + | ToolDefinitionOutputParent + | CodeInterpreterToolDefinitionOutput + | FileSearchToolDefinitionOutput + | FunctionToolDefinitionOutput + | BingGroundingToolDefinitionOutput + | MicrosoftFabricToolDefinitionOutput + | SharepointToolDefinitionOutput + | AzureAISearchToolDefinitionOutput; +/** An abstract representation of a single item of thread message content. */ +export type MessageContentOutput = + | MessageContentOutputParent + | MessageTextContentOutput + | MessageImageFileContentOutput; +/** An abstract representation of an annotation to text thread message content. */ +export type MessageTextAnnotationOutput = + | MessageTextAnnotationOutputParent + | MessageTextFileCitationAnnotationOutput + | MessageTextFilePathAnnotationOutput; +/** An abstract representation of a required action for an agent thread run to continue. */ +export type RequiredActionOutput = RequiredActionOutputParent | SubmitToolOutputsActionOutput; +/** An abstract representation a a tool invocation needed by the model to continue a run. */ +export type RequiredToolCallOutput = RequiredToolCallOutputParent | RequiredFunctionToolCallOutput; +/** An abstract representation of the details for a run step. */ +export type RunStepDetailsOutput = + | RunStepDetailsOutputParent + | RunStepMessageCreationDetailsOutput + | RunStepToolCallDetailsOutput; +/** An abstract representation of a detailed tool call as recorded within a run step for an existing run. */ +export type RunStepToolCallOutput = + | RunStepToolCallOutputParent + | RunStepCodeInterpreterToolCallOutput + | RunStepFileSearchToolCallOutput + | RunStepBingGroundingToolCallOutput + | RunStepAzureAISearchToolCallOutput + | RunStepSharepointToolCallOutput + | RunStepMicrosoftFabricToolCallOutput + | RunStepFunctionToolCallOutput; +/** An abstract representation of an emitted output from a code interpreter tool. */ +export type RunStepCodeInterpreterToolCallOutputOutput = + | RunStepCodeInterpreterToolCallOutputOutputParent + | RunStepCodeInterpreterLogOutputOutput + | RunStepCodeInterpreterImageOutputOutput; +/** An abstract representation of a vector store chunking strategy configuration. */ +export type VectorStoreChunkingStrategyResponseOutput = + | VectorStoreChunkingStrategyResponseOutputParent + | VectorStoreAutoChunkingStrategyResponseOutput + | VectorStoreStaticChunkingStrategyResponseOutput; +/** Connection properties */ +export type InternalConnectionPropertiesOutput = + | InternalConnectionPropertiesOutputParent + | InternalConnectionPropertiesApiKeyAuthOutput + | InternalConnectionPropertiesAADAuthOutput + | InternalConnectionPropertiesSASAuthOutput; +/** Abstract data class for input data configuration. */ +export type InputDataOutput = + | InputDataOutputParent + | ApplicationInsightsConfigurationOutput + | DatasetOutput; +/** Abstract data class for input data configuration. */ +export type TriggerOutput = TriggerOutputParent | RecurrenceTriggerOutput | CronTriggerOutput; +/** Alias for VectorStoreDataSourceAssetTypeOutput */ +export type VectorStoreDataSourceAssetTypeOutput = "uri_asset" | "id_asset"; +/** Alias for AgentsApiResponseFormatModeOutput */ +export type AgentsApiResponseFormatModeOutput = string; +/** Alias for ApiResponseFormatOutput */ +export type ApiResponseFormatOutput = string; +/** Alias for AgentsApiResponseFormatOptionOutput */ +export type AgentsApiResponseFormatOptionOutput = + | string + | AgentsApiResponseFormatModeOutput + | AgentsApiResponseFormatOutput; +/** Alias for MessageRoleOutput */ +export type MessageRoleOutput = string; +/** Alias for MessageAttachmentToolDefinitionOutput */ +export type MessageAttachmentToolDefinitionOutput = + | CodeInterpreterToolDefinitionOutput + | FileSearchToolDefinitionOutput; +/** Alias for MessageStatusOutput */ +export type MessageStatusOutput = string; +/** Alias for MessageIncompleteDetailsReasonOutput */ +export type MessageIncompleteDetailsReasonOutput = string; +/** Alias for TruncationStrategyOutput */ +export type TruncationStrategyOutput = string; +/** Alias for AgentsApiToolChoiceOptionModeOutput */ +export type AgentsApiToolChoiceOptionModeOutput = string; +/** Alias for AgentsNamedToolChoiceTypeOutput */ +export type AgentsNamedToolChoiceTypeOutput = string; +/** Alias for AgentsApiToolChoiceOptionOutput */ +export type AgentsApiToolChoiceOptionOutput = + | string + | AgentsApiToolChoiceOptionModeOutput + | AgentsNamedToolChoiceOutput; +/** Alias for RunStatusOutput */ +export type RunStatusOutput = string; +/** Alias for IncompleteRunDetailsOutput */ +export type IncompleteRunDetailsOutput = string; +/** Alias for RunStepTypeOutput */ +export type RunStepTypeOutput = string; +/** Alias for RunStepStatusOutput */ +export type RunStepStatusOutput = string; +/** Alias for RunStepErrorCodeOutput */ +export type RunStepErrorCodeOutput = string; +/** Alias for FilePurposeOutput */ +export type FilePurposeOutput = string; +/** Alias for FileStateOutput */ +export type FileStateOutput = string; +/** Alias for VectorStoreStatusOutput */ +export type VectorStoreStatusOutput = string; +/** Alias for VectorStoreExpirationPolicyAnchorOutput */ +export type VectorStoreExpirationPolicyAnchorOutput = string; +/** Alias for VectorStoreFileStatusOutput */ +export type VectorStoreFileStatusOutput = string; +/** Alias for VectorStoreFileErrorCodeOutput */ +export type VectorStoreFileErrorCodeOutput = string; +/** Alias for VectorStoreChunkingStrategyResponseTypeOutput */ +export type VectorStoreChunkingStrategyResponseTypeOutput = string; +/** Alias for VectorStoreFileBatchStatusOutput */ +export type VectorStoreFileBatchStatusOutput = string; +/** The Type (or category) of the connection */ +export type ConnectionTypeOutput = + | "AzureOpenAI" + | "Serverless" + | "AzureBlob" + | "AIServices" + | "CognitiveSearch"; +/** Authentication type used by Azure AI service to connect to another service */ +export type AuthenticationTypeOutput = "ApiKey" | "AAD" | "SAS"; +/** Paged collection of Evaluation items */ +export type PagedEvaluationOutput = Paged; +/** Alias for FrequencyOutput */ +export type FrequencyOutput = string; +/** Alias for WeekDaysOutput */ +export type WeekDaysOutput = string; +/** Paged collection of EvaluationSchedule items */ +export type PagedEvaluationScheduleOutput = Paged; diff --git a/sdk/ai/ai-projects/src/customization/parameters.ts b/sdk/ai/ai-projects/src/customization/parameters.ts new file mode 100644 index 000000000000..2450b4aa1b65 --- /dev/null +++ b/sdk/ai/ai-projects/src/customization/parameters.ts @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; +import type { RequestParameters } from "@azure-rest/core-client"; +import type { + CreateAgentOptions, + ListSortOrder, + UpdateAgentOptions, + AgentThreadCreationOptions, + UpdateAgentThreadOptions, + ThreadMessageOptions, + CreateRunOptions, + ToolOutput, + CreateAndRunThreadOptions, + FilePurpose, + VectorStoreOptions, + VectorStoreUpdateOptions, + VectorStoreFileStatusFilter, + VectorStoreDataSource, + VectorStoreChunkingStrategyRequest, + ConnectionType, + Evaluation, + EvaluationSchedule, +} from "./models.js"; + +export interface CreateAgentBodyParam { + body: CreateAgentOptions; +} + +export type CreateAgentParameters = CreateAgentBodyParam & RequestParameters; + +export interface ListAgentsQueryParamProperties { + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListAgentsQueryParam { + queryParameters?: ListAgentsQueryParamProperties; +} + +export type ListAgentsParameters = ListAgentsQueryParam & RequestParameters; +export type GetAgentParameters = RequestParameters; + +export interface UpdateAgentBodyParam { + body: UpdateAgentOptions; +} + +export type UpdateAgentParameters = UpdateAgentBodyParam & RequestParameters; +export type DeleteAgentParameters = RequestParameters; + +export interface CreateThreadBodyParam { + body: AgentThreadCreationOptions; +} + +export type CreateThreadParameters = CreateThreadBodyParam & RequestParameters; +export type GetThreadParameters = RequestParameters; + +export interface UpdateThreadBodyParam { + body: UpdateAgentThreadOptions; +} + +export type UpdateThreadParameters = UpdateThreadBodyParam & RequestParameters; +export type DeleteThreadParameters = RequestParameters; + +export interface CreateMessageBodyParam { + body: ThreadMessageOptions; +} + +export type CreateMessageParameters = CreateMessageBodyParam & RequestParameters; + +export interface ListMessagesQueryParamProperties { + /** Filter messages by the run ID that generated them. */ + runId?: string; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListMessagesQueryParam { + queryParameters?: ListMessagesQueryParamProperties; +} + +export type ListMessagesParameters = ListMessagesQueryParam & RequestParameters; +export type GetMessageParameters = RequestParameters; + +export interface UpdateMessageBodyParam { + body: { metadata?: Record | null }; +} + +export type UpdateMessageParameters = UpdateMessageBodyParam & RequestParameters; + +export interface CreateRunBodyParam { + body: CreateRunOptions; +} + +export type CreateRunParameters = CreateRunBodyParam & RequestParameters; + +export interface ListRunsQueryParamProperties { + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListRunsQueryParam { + queryParameters?: ListRunsQueryParamProperties; +} + +export type ListRunsParameters = ListRunsQueryParam & RequestParameters; +export type GetRunParameters = RequestParameters; + +export interface UpdateRunBodyParam { + body: { metadata?: Record | null }; +} + +export type UpdateRunParameters = UpdateRunBodyParam & RequestParameters; + +export interface SubmitToolOutputsToRunBodyParam { + body: { toolOutputs: Array; stream?: boolean | null }; +} + +export type SubmitToolOutputsToRunParameters = SubmitToolOutputsToRunBodyParam & RequestParameters; +export type CancelRunParameters = RequestParameters; + +export interface CreateThreadAndRunBodyParam { + body: CreateAndRunThreadOptions; +} + +export type CreateThreadAndRunParameters = CreateThreadAndRunBodyParam & RequestParameters; +export type GetRunStepParameters = RequestParameters; + +export interface ListRunStepsQueryParamProperties { + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListRunStepsQueryParam { + queryParameters?: ListRunStepsQueryParamProperties; +} + +export type ListRunStepsParameters = ListRunStepsQueryParam & RequestParameters; + +export interface ListFilesQueryParamProperties { + /** + * The purpose of the file. + * + * Possible values: "fine-tune", "fine-tune-results", "assistants", "assistants_output", "batch", "batch_output", "vision" + */ + purpose?: FilePurpose; +} + +export interface ListFilesQueryParam { + queryParameters?: ListFilesQueryParamProperties; +} + +export type ListFilesParameters = ListFilesQueryParam & RequestParameters; + +export interface UploadFileBodyParam { + body: + | FormData + | Array< + | { + name: "file"; + body: string | Uint8Array | ReadableStream | NodeJS.ReadableStream | File; + filename?: string; + contentType?: string; + } + | { + name: "purpose"; + body: FilePurpose; + filename?: string; + contentType?: string; + } + | { name: "filename"; body: string } + >; +} + +export interface UploadFileMediaTypesParam { + /** The name of the file to upload. */ + contentType: "multipart/form-data"; +} + +export type UploadFileParameters = UploadFileMediaTypesParam & + UploadFileBodyParam & + RequestParameters; +export type DeleteFileParameters = RequestParameters; +export type GetFileParameters = RequestParameters; +export type GetFileContentParameters = RequestParameters; + +export interface ListVectorStoresQueryParamProperties { + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListVectorStoresQueryParam { + queryParameters?: ListVectorStoresQueryParamProperties; +} + +export type ListVectorStoresParameters = ListVectorStoresQueryParam & RequestParameters; + +export interface CreateVectorStoreBodyParam { + body: VectorStoreOptions; +} + +export type CreateVectorStoreParameters = CreateVectorStoreBodyParam & RequestParameters; +export type GetVectorStoreParameters = RequestParameters; + +export interface ModifyVectorStoreBodyParam { + body: VectorStoreUpdateOptions; +} + +export type ModifyVectorStoreParameters = ModifyVectorStoreBodyParam & RequestParameters; +export type DeleteVectorStoreParameters = RequestParameters; + +export interface ListVectorStoreFilesQueryParamProperties { + /** + * Filter by file status. + * + * Possible values: "in_progress", "completed", "failed", "cancelled" + */ + filter?: VectorStoreFileStatusFilter; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListVectorStoreFilesQueryParam { + queryParameters?: ListVectorStoreFilesQueryParamProperties; +} + +export type ListVectorStoreFilesParameters = ListVectorStoreFilesQueryParam & RequestParameters; + +export interface CreateVectorStoreFileBodyParam { + body: { + fileId?: string; + dataSources?: Array; + chunkingStrategy?: VectorStoreChunkingStrategyRequest; + }; +} + +export type CreateVectorStoreFileParameters = CreateVectorStoreFileBodyParam & RequestParameters; +export type GetVectorStoreFileParameters = RequestParameters; +export type DeleteVectorStoreFileParameters = RequestParameters; + +export interface CreateVectorStoreFileBatchBodyParam { + body: { + fileIds?: string[]; + dataSources?: Array; + chunkingStrategy?: VectorStoreChunkingStrategyRequest; + }; +} + +export type CreateVectorStoreFileBatchParameters = CreateVectorStoreFileBatchBodyParam & + RequestParameters; +export type GetVectorStoreFileBatchParameters = RequestParameters; +export type CancelVectorStoreFileBatchParameters = RequestParameters; + +export interface ListVectorStoreFileBatchFilesQueryParamProperties { + /** + * Filter by file status. + * + * Possible values: "in_progress", "completed", "failed", "cancelled" + */ + filter?: VectorStoreFileStatusFilter; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListVectorStoreFileBatchFilesQueryParam { + queryParameters?: ListVectorStoreFileBatchFilesQueryParamProperties; +} + +export type ListVectorStoreFileBatchFilesParameters = ListVectorStoreFileBatchFilesQueryParam & + RequestParameters; +export type GetWorkspaceParameters = RequestParameters; + +export interface ListConnectionsQueryParamProperties { + /** Category of the workspace connection. */ + category?: ConnectionType; + /** Indicates whether to list datastores. Service default: do not list datastores. */ + includeAll?: boolean; + /** Target of the workspace connection. */ + target?: string; +} + +export interface ListConnectionsQueryParam { + queryParameters?: ListConnectionsQueryParamProperties; +} + +export type ListConnectionsParameters = ListConnectionsQueryParam & RequestParameters; +export type GetConnectionParameters = RequestParameters; + +export interface GetConnectionWithSecretsBodyParam { + body: { ignored: string }; +} + +export type GetConnectionWithSecretsParameters = GetConnectionWithSecretsBodyParam & + RequestParameters; +export type GetAppInsightsParameters = RequestParameters; + +export interface GetHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface GetHeaderParam { + headers?: RawHttpHeadersInput & GetHeaders; +} + +export type GetParameters = GetHeaderParam & RequestParameters; + +export interface CreateBodyParam { + /** Evaluation to run. */ + body: Evaluation; +} + +export type CreateParameters = CreateBodyParam & RequestParameters; + +export interface ListHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ListQueryParamProperties { + /** The number of result items to return. */ + top?: number; + /** The number of result items to skip. */ + skip?: number; + /** The maximum number of result items per page. */ + maxpagesize?: number; +} + +export interface ListQueryParam { + queryParameters?: ListQueryParamProperties; +} + +export interface ListHeaderParam { + headers?: RawHttpHeadersInput & ListHeaders; +} + +export type ListParameters = ListQueryParam & ListHeaderParam & RequestParameters; + +export interface UpdateHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** The resource instance. */ +export type EvaluationResourceMergeAndPatch = Partial; + +export interface UpdateBodyParam { + /** The resource instance. */ + body: EvaluationResourceMergeAndPatch; +} + +export interface UpdateHeaderParam { + headers?: RawHttpHeadersInput & UpdateHeaders; +} + +export interface UpdateMediaTypesParam { + /** This request has a JSON Merge Patch body. */ + contentType: "application/merge-patch+json"; +} + +export type UpdateParameters = UpdateHeaderParam & + UpdateMediaTypesParam & + UpdateBodyParam & + RequestParameters; + +export interface GetScheduleHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface GetScheduleHeaderParam { + headers?: RawHttpHeadersInput & GetScheduleHeaders; +} + +export type GetScheduleParameters = GetScheduleHeaderParam & RequestParameters; + +export interface CreateOrReplaceScheduleHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface CreateOrReplaceScheduleBodyParam { + /** The resource instance. */ + body: EvaluationSchedule; +} + +export interface CreateOrReplaceScheduleHeaderParam { + headers?: RawHttpHeadersInput & CreateOrReplaceScheduleHeaders; +} + +export type CreateOrReplaceScheduleParameters = CreateOrReplaceScheduleHeaderParam & + CreateOrReplaceScheduleBodyParam & + RequestParameters; + +export interface ListScheduleHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ListScheduleQueryParamProperties { + /** The number of result items to return. */ + top?: number; + /** The number of result items to skip. */ + skip?: number; + /** The maximum number of result items per page. */ + maxpagesize?: number; +} + +export interface ListScheduleQueryParam { + queryParameters?: ListScheduleQueryParamProperties; +} + +export interface ListScheduleHeaderParam { + headers?: RawHttpHeadersInput & ListScheduleHeaders; +} + +export type ListScheduleParameters = ListScheduleQueryParam & + ListScheduleHeaderParam & + RequestParameters; +export type DisableScheduleParameters = RequestParameters; diff --git a/sdk/ai/ai-projects/src/customization/streamingModels.ts b/sdk/ai/ai-projects/src/customization/streamingModels.ts new file mode 100644 index 000000000000..dfa8cd09421b --- /dev/null +++ b/sdk/ai/ai-projects/src/customization/streamingModels.ts @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { MessageRole } from "./models.js"; + +/** Represents a message delta i.e. any changed fields on a message during streaming. */ +export interface MessageDeltaChunk { + /** The identifier of the message, which can be referenced in API endpoints. */ + id: string; + + /** The object type, which is always `thread.message.delta`. */ + object: "thread.message.delta"; + + /** The delta containing the fields that have changed on the Message. */ + delta: MessageDelta; +} + +/** Represents the typed 'delta' payload within a streaming message delta chunk. */ +export interface MessageDelta { + /** The entity that produced the message. */ + role: MessageRole; + + /** The content of the message as an array of text and/or images. */ + content: Array; +} + +/** Represents the content of a message delta. */ +export type MessageDeltaContent = + | MessageDeltaContentParent + | MessageDeltaTextContent + | MessageDeltaImageFileContent; + +/** The abstract base representation of a partial streamed message content payload. */ +export interface MessageDeltaContentParent { + /** The index of the content part of the message. */ + index: number; + + /** The type of content for this content part. */ + type: string; +} +/** Represents a streamed image file content part within a streaming message delta chunk. */ +export interface MessageDeltaImageFileContent extends MessageDeltaContentParent { + /** The type of content for this content part, which is always "image_file." */ + type: "image_file"; + + /** The image_file data. */ + imageFile?: MessageDeltaImageFileContentObject; +} + +/** Represents the 'image_file' payload within streaming image file content. */ +export interface MessageDeltaImageFileContentObject { + /** The file ID of the image in the message content. */ + fileId?: string; +} + +/** Represents a streamed text content part within a streaming message delta chunk. */ +export interface MessageDeltaTextContent extends MessageDeltaContentParent { + /** The type of content for this content part, which is always "text." */ + type: "text"; + + /** The text content details. */ + text?: MessageDeltaTextContentObject; +} + +/** Represents the data of a streamed text content part within a streaming message delta chunk. */ +export interface MessageDeltaTextContentObject { + /** The data that makes up the text. */ + value?: string; + + /** Annotations for the text. */ + annotations?: Array; +} + +/** Represents a text annotation within a streamed text content part. */ +export type MessageDeltaTextAnnotation = + | MessageDeltaTextAnnotationParent + | MessageDeltaTextFileCitationAnnotation + | MessageDeltaTextFilePathAnnotation; + +/** The abstract base representation of a streamed text content part's text annotation. */ +export interface MessageDeltaTextAnnotationParent { + /** The index of the annotation within a text content part. */ + index: number; + + /** The type of the text content annotation. */ + type: string; +} + +/** Represents a streamed file citation applied to a streaming text content part. */ +export interface MessageDeltaTextFileCitationAnnotation extends MessageDeltaTextAnnotationParent { + /** The type of the text content annotation, which is always "file_citation." */ + type: "file_citation"; + + /** The file citation information. */ + fileCitation?: MessageDeltaTextFileCitationAnnotationObject; + + /** The text in the message content that needs to be replaced */ + text?: string; + + /** The start index of this annotation in the content text. */ + startIndex?: number; + + /** The end index of this annotation in the content text. */ + endIndex?: number; +} + +/** Represents the data of a streamed file citation as applied to a streaming text content part. */ +export interface MessageDeltaTextFileCitationAnnotationObject { + /** The ID of the specific file the citation is from. */ + fileId?: string; + + /** The specific quote in the cited file. */ + quote?: string; +} + +/** Represents a streamed file path annotation applied to a streaming text content part. */ +export interface MessageDeltaTextFilePathAnnotation extends MessageDeltaTextAnnotationParent { + /** The type of the text content annotation, which is always "file_path." */ + type: "file_path"; + + /** The file path information. */ + filePath?: MessageDeltaTextFilePathAnnotationObject; + + /** The start index of this annotation in the content text. */ + startIndex?: number; + + /** The end index of this annotation in the content text. */ + endIndex?: number; + + /** The text in the message content that needs to be replaced */ + text?: string; +} + +/** Represents the data of a streamed file path annotation as applied to a streaming text content part. */ +export interface MessageDeltaTextFilePathAnnotationObject { + /** The file ID for the annotation. */ + fileId?: string; +} + +/** A representation of the URL used for the text citation. */ +export interface MessageDeltaTextUrlCitationDetails { + /** The URL where the citation is from. */ + url?: string; + + /** The title of the URL. */ + title?: string; +} + +/** Represents a run step delta i.e. any changed fields on a run step during streaming. */ +export interface RunStepDeltaChunk { + /** The identifier of the run step, which can be referenced in API endpoints. */ + id: string; + + /** The object type, which is always `thread.run.step.delta`. */ + object: "thread.run.step.delta"; + + /** The delta containing the fields that have changed on the run step. */ + delta: RunStepDelta; +} + +/** Represents the delta payload in a streaming run step delta chunk. */ +export interface RunStepDelta { + /** The details of the run step. */ + stepDetails?: RunStepDeltaDetail; +} + +/** Represents a single run step detail item in a streaming run step's delta payload. */ +export interface RunStepDeltaDetail { + /** The object type for the run step detail object. */ + type: string; +} + +/** Represents a message creation within a streaming run step delta. */ +export interface RunStepDeltaMessageCreation extends RunStepDeltaDetail { + /** The object type, which is always "message_creation." */ + type: "message_creation"; + + /** The message creation data. */ + messageCreation?: RunStepDeltaMessageCreationObject; +} + +/** Represents the data within a streaming run step message creation response object. */ +export interface RunStepDeltaMessageCreationObject { + /** The ID of the newly-created message. */ + messageId?: string; +} + +/** Represents an invocation of tool calls as part of a streaming run step. */ +export interface RunStepDeltaToolCallObject extends RunStepDeltaDetail { + /** The object type, which is always "tool_calls." */ + type: "tool_calls"; + + /** The collection of tool calls for the tool call detail item. */ + toolCalls?: Array; +} + +/** Represents a single tool call within a streaming run step's delta tool call details. */ +export type RunStepDeltaToolCall = + | RunStepDeltaToolCallParent + | RunStepDeltaFunctionToolCall + | RunStepDeltaFileSearchToolCall + | RunStepDeltaCodeInterpreterToolCall; + +/** The abstract base representation of a single tool call within a streaming run step's delta tool call details. */ +export interface RunStepDeltaToolCallParent { + /** The index of the tool call detail in the run step's tool_calls array. */ + index: number; + + /** The ID of the tool call, used when submitting outputs to the run. */ + id: string; + + /** The type of the tool call detail item in a streaming run step's details. */ + type: string; +} + +/** Represents a function tool call within a streaming run step's tool call details. */ +export interface RunStepDeltaFunctionToolCall extends RunStepDeltaToolCallParent { + /** The object type, which is always "function." */ + type: "function"; + + /** The function data for the tool call. */ + function?: RunStepDeltaFunction; +} + +/** Represents a file search tool call within a streaming run step's tool call details. */ +export interface RunStepDeltaFileSearchToolCall extends RunStepDeltaToolCallParent { + /** The object type, which is always "file_search." */ + type: "file_search"; + + /** Reserved for future use. */ + fileSearch?: Array; +} + +/** Represents a Code Interpreter tool call within a streaming run step's tool call details. */ +export interface RunStepDeltaCodeInterpreterToolCall extends RunStepDeltaToolCallParent { + /** The object type, which is always "code_interpreter." */ + type: "code_interpreter"; + + /** The Code Interpreter data for the tool call. */ + codeInterpreter?: RunStepDeltaCodeInterpreterDetailItemObject; +} + +/** Represents the function data in a streaming run step delta's function tool call. */ +export interface RunStepDeltaFunction { + /** The name of the function. */ + name?: string; + + /** The arguments passed to the function as input. */ + arguments?: string; + + /** The output of the function, null if outputs have not yet been submitted. */ + output?: string | null; +} + +/** Represents the Code Interpreter data in a streaming run step's tool call output. */ +export type RunStepDeltaCodeInterpreterOutput = + | RunStepDeltaCodeInterpreterOutputParent + | RunStepDeltaCodeInterpreterLogOutput + | RunStepDeltaCodeInterpreterImageOutput; + +/** Represents the Code Interpreter tool call data in a streaming run step's tool calls. */ +export interface RunStepDeltaCodeInterpreterDetailItemObject { + /** The input into the Code Interpreter tool call. */ + input?: string; + + /** + * The outputs from the Code Interpreter tool call. Code Interpreter can output one or more + * items, including text (`logs`) or images (`image`). Each of these are represented by a + * different object type. + */ + outputs?: Array; +} + +/** The abstract base representation of a streaming run step tool call's Code Interpreter tool output. */ +export interface RunStepDeltaCodeInterpreterOutputParent { + /** The index of the output in the streaming run step tool call's Code Interpreter outputs array. */ + index: number; + + /** The type of the streaming run step tool call's Code Interpreter output. */ + type: string; +} + +/** Represents a log output as produced by the Code Interpreter tool and as represented in a streaming run step's delta tool calls collection. */ +export interface RunStepDeltaCodeInterpreterLogOutput + extends RunStepDeltaCodeInterpreterOutputParent { + /** The type of the object, which is always "logs." */ + type: "logs"; + + /** The text output from the Code Interpreter tool call. */ + logs?: string; +} + +/** Represents an image output as produced the Code interpreter tool and as represented in a streaming run step's delta tool calls collection. */ +export interface RunStepDeltaCodeInterpreterImageOutput + extends RunStepDeltaCodeInterpreterOutputParent { + /** The object type, which is always "image." */ + type: "image"; + + /** The image data for the Code Interpreter tool call output. */ + image?: RunStepDeltaCodeInterpreterImageOutputObject; +} + +/** Represents the data for a streaming run step's Code Interpreter tool call image output. */ +export interface RunStepDeltaCodeInterpreterImageOutputObject { + /** The file ID for the image. */ + fileId?: string; +} diff --git a/sdk/ai/ai-projects/src/customization/streamingWireModels.ts b/sdk/ai/ai-projects/src/customization/streamingWireModels.ts new file mode 100644 index 000000000000..7f03d43bbcb1 --- /dev/null +++ b/sdk/ai/ai-projects/src/customization/streamingWireModels.ts @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { MessageRole } from "../generated/src/models.js"; + +/** Represents a message delta i.e. any changed fields on a message during streaming. */ +export interface MessageDeltaChunk { + /** The identifier of the message, which can be referenced in API endpoints. */ + id: string; + + /** The object type, which is always `thread.message.delta`. */ + object: "thread.message.delta"; + + /** The delta containing the fields that have changed on the Message. */ + delta: MessageDelta; +} + +/** Represents the typed 'delta' payload within a streaming message delta chunk. */ +export interface MessageDelta { + /** The entity that produced the message. */ + role: MessageRole; + + /** The content of the message as an array of text and/or images. */ + content: Array; +} + +export type MessageDeltaContent = + | MessageDeltaContentParent + | MessageDeltaTextContent + | MessageDeltaImageFileContent; + +/** The abstract base representation of a partial streamed message content payload. */ +export interface MessageDeltaContentParent { + /** The index of the content part of the message. */ + index: number; + + /** The type of content for this content part. */ + type: string; +} +/** Represents a streamed image file content part within a streaming message delta chunk. */ +export interface MessageDeltaImageFileContent extends MessageDeltaContentParent { + /** The type of content for this content part, which is always "image_file." */ + type: "image_file"; + + /** The image_file data. */ + image_file?: MessageDeltaImageFileContentObject; +} + +/** Represents the 'image_file' payload within streaming image file content. */ +export interface MessageDeltaImageFileContentObject { + /** The file ID of the image in the message content. */ + file_id?: string; +} + +/** Represents a streamed text content part within a streaming message delta chunk. */ +export interface MessageDeltaTextContent extends MessageDeltaContentParent { + /** The type of content for this content part, which is always "text." */ + type: "text"; + + /** The text content details. */ + text?: MessageDeltaTextContentObject; +} + +/** Represents the data of a streamed text content part within a streaming message delta chunk. */ +export interface MessageDeltaTextContentObject { + /** The data that makes up the text. */ + value?: string; + + /** Annotations for the text. */ + annotations?: Array; +} + +export type MessageDeltaTextAnnotation = + | MessageDeltaTextAnnotationParent + | MessageDeltaTextFileCitationAnnotation + | MessageDeltaTextFilePathAnnotation; + +/** The abstract base representation of a streamed text content part's text annotation. */ +export interface MessageDeltaTextAnnotationParent { + /** The index of the annotation within a text content part. */ + index: number; + + /** The type of the text content annotation. */ + type: string; +} + +/** Represents a streamed file citation applied to a streaming text content part. */ +export interface MessageDeltaTextFileCitationAnnotation extends MessageDeltaTextAnnotationParent { + /** The type of the text content annotation, which is always "file_citation." */ + type: "file_citation"; + + /** The file citation information. */ + file_citation?: MessageDeltaTextFileCitationAnnotationObject; + + /** The text in the message content that needs to be replaced */ + text?: string; + + /** The start index of this annotation in the content text. */ + start_index?: number; + + /** The end index of this annotation in the content text. */ + end_index?: number; +} + +/** Represents the data of a streamed file citation as applied to a streaming text content part. */ +export interface MessageDeltaTextFileCitationAnnotationObject { + /** The ID of the specific file the citation is from. */ + file_id?: string; + + /** The specific quote in the cited file. */ + quote?: string; +} + +/** Represents a streamed file path annotation applied to a streaming text content part. */ +export interface MessageDeltaTextFilePathAnnotation extends MessageDeltaTextAnnotationParent { + /** The type of the text content annotation, which is always "file_path." */ + type: "file_path"; + + /** The file path information. */ + file_path?: MessageDeltaTextFilePathAnnotationObject; + + /** The start index of this annotation in the content text. */ + start_index?: number; + + /** The end index of this annotation in the content text. */ + end_index?: number; + + /** The text in the message content that needs to be replaced */ + text?: string; +} + +/** Represents the data of a streamed file path annotation as applied to a streaming text content part. */ +export interface MessageDeltaTextFilePathAnnotationObject { + /** The file ID for the annotation. */ + file_id?: string; +} + +/** A representation of the URL used for the text citation. */ +export interface MessageDeltaTextUrlCitationDetails { + /** The URL where the citation is from. */ + url?: string; + + /** The title of the URL. */ + title?: string; +} + +/** Represents a run step delta i.e. any changed fields on a run step during streaming. */ +export interface RunStepDeltaChunk { + /** The identifier of the run step, which can be referenced in API endpoints. */ + id: string; + + /** The object type, which is always `thread.run.step.delta`. */ + object: "thread.run.step.delta"; + + /** The delta containing the fields that have changed on the run step. */ + delta: RunStepDelta; +} + +/** Represents the delta payload in a streaming run step delta chunk. */ +export interface RunStepDelta { + /** The details of the run step. */ + step_details?: RunStepDeltaDetail; +} + +/** Represents a single run step detail item in a streaming run step's delta payload. */ +export interface RunStepDeltaDetail { + /** The object type for the run step detail object. */ + type: string; +} + +/** Represents a message creation within a streaming run step delta. */ +export interface RunStepDeltaMessageCreation extends RunStepDeltaDetail { + /** The object type, which is always "message_creation." */ + type: "message_creation"; + + /** The message creation data. */ + message_creation?: RunStepDeltaMessageCreationObject; +} + +/** Represents the data within a streaming run step message creation response object. */ +export interface RunStepDeltaMessageCreationObject { + /** The ID of the newly-created message. */ + message_id?: string; +} + +/** Represents an invocation of tool calls as part of a streaming run step. */ +export interface RunStepDeltaToolCallObject extends RunStepDeltaDetail { + /** The object type, which is always "tool_calls." */ + type: "tool_calls"; + + /** The collection of tool calls for the tool call detail item. */ + tool_calls?: Array; +} + +export type RunStepDeltaToolCall = + | RunStepDeltaToolCallParent + | RunStepDeltaFunctionToolCall + | RunStepDeltaFileSearchToolCall + | RunStepDeltaCodeInterpreterToolCall; + +/** The abstract base representation of a single tool call within a streaming run step's delta tool call details. */ +export interface RunStepDeltaToolCallParent { + /** The index of the tool call detail in the run step's tool_calls array. */ + index: number; + + /** The ID of the tool call, used when submitting outputs to the run. */ + id: string; + + /** The type of the tool call detail item in a streaming run step's details. */ + type: string; +} + +/** Represents a function tool call within a streaming run step's tool call details. */ +export interface RunStepDeltaFunctionToolCall extends RunStepDeltaToolCallParent { + /** The object type, which is always "function." */ + type: "function"; + + /** The function data for the tool call. */ + function?: RunStepDeltaFunction; +} + +/** Represents a file search tool call within a streaming run step's tool call details. */ +export interface RunStepDeltaFileSearchToolCall extends RunStepDeltaToolCallParent { + /** The object type, which is always "file_search." */ + type: "file_search"; + + /** Reserved for future use. */ + file_search?: Array; +} + +/** Represents a Code Interpreter tool call within a streaming run step's tool call details. */ +export interface RunStepDeltaCodeInterpreterToolCall extends RunStepDeltaToolCallParent { + /** The object type, which is always "code_interpreter." */ + type: "code_interpreter"; + + /** The Code Interpreter data for the tool call. */ + code_interpreter?: RunStepDeltaCodeInterpreterDetailItemObject; +} + +/** Represents the function data in a streaming run step delta's function tool call. */ +export interface RunStepDeltaFunction { + /** The name of the function. */ + name?: string; + + /** The arguments passed to the function as input. */ + arguments?: string; + + /** The output of the function, null if outputs have not yet been submitted. */ + output?: string | null; +} + +export type RunStepDeltaCodeInterpreterOutput = + | RunStepDeltaCodeInterpreterOutputParent + | RunStepDeltaCodeInterpreterLogOutput + | RunStepDeltaCodeInterpreterImageOutput; + +/** Represents the Code Interpreter tool call data in a streaming run step's tool calls. */ +export interface RunStepDeltaCodeInterpreterDetailItemObject { + /** The input into the Code Interpreter tool call. */ + input?: string; + + /** + * The outputs from the Code Interpreter tool call. Code Interpreter can output one or more + * items, including text (`logs`) or images (`image`). Each of these are represented by a + * different object type. + */ + outputs?: Array; +} + +/** The abstract base representation of a streaming run step tool call's Code Interpreter tool output. */ +export interface RunStepDeltaCodeInterpreterOutputParent { + /** The index of the output in the streaming run step tool call's Code Interpreter outputs array. */ + index: number; + + /** The type of the streaming run step tool call's Code Interpreter output. */ + type: string; +} + +/** Represents a log output as produced by the Code Interpreter tool and as represented in a streaming run step's delta tool calls collection. */ +export interface RunStepDeltaCodeInterpreterLogOutput + extends RunStepDeltaCodeInterpreterOutputParent { + /** The type of the object, which is always "logs." */ + type: "logs"; + + /** The text output from the Code Interpreter tool call. */ + logs?: string; +} + +/** Represents an image output as produced the Code interpreter tool and as represented in a streaming run step's delta tool calls collection. */ +export interface RunStepDeltaCodeInterpreterImageOutput + extends RunStepDeltaCodeInterpreterOutputParent { + /** The object type, which is always "image." */ + type: "image"; + + /** The image data for the Code Interpreter tool call output. */ + image?: RunStepDeltaCodeInterpreterImageOutputObject; +} + +/** Represents the data for a streaming run step's Code Interpreter tool call image output. */ +export interface RunStepDeltaCodeInterpreterImageOutputObject { + /** The file ID for the image. */ + file_id?: string; +} diff --git a/sdk/ai/ai-projects/src/generated/src/clientDefinitions.ts b/sdk/ai/ai-projects/src/generated/src/clientDefinitions.ts new file mode 100644 index 000000000000..c00785ae2a6e --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/clientDefinitions.ts @@ -0,0 +1,672 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + CreateAgentParameters, + ListAgentsParameters, + GetAgentParameters, + UpdateAgentParameters, + DeleteAgentParameters, + CreateThreadParameters, + GetThreadParameters, + UpdateThreadParameters, + DeleteThreadParameters, + CreateMessageParameters, + ListMessagesParameters, + GetMessageParameters, + UpdateMessageParameters, + CreateRunParameters, + ListRunsParameters, + GetRunParameters, + UpdateRunParameters, + SubmitToolOutputsToRunParameters, + CancelRunParameters, + CreateThreadAndRunParameters, + GetRunStepParameters, + ListRunStepsParameters, + ListFilesParameters, + UploadFileParameters, + DeleteFileParameters, + GetFileParameters, + GetFileContentParameters, + ListVectorStoresParameters, + CreateVectorStoreParameters, + GetVectorStoreParameters, + ModifyVectorStoreParameters, + DeleteVectorStoreParameters, + ListVectorStoreFilesParameters, + CreateVectorStoreFileParameters, + GetVectorStoreFileParameters, + DeleteVectorStoreFileParameters, + CreateVectorStoreFileBatchParameters, + GetVectorStoreFileBatchParameters, + CancelVectorStoreFileBatchParameters, + ListVectorStoreFileBatchFilesParameters, + GetWorkspaceParameters, + ListConnectionsParameters, + GetConnectionParameters, + GetConnectionWithSecretsParameters, + GetAppInsightsParameters, + GetParameters, + UpdateParameters, + CreateParameters, + ListParameters, + GetScheduleParameters, + CreateOrReplaceScheduleParameters, + ListScheduleParameters, + DisableScheduleParameters, +} from "./parameters.js"; +import { + CreateAgent200Response, + CreateAgentDefaultResponse, + ListAgents200Response, + ListAgentsDefaultResponse, + GetAgent200Response, + GetAgentDefaultResponse, + UpdateAgent200Response, + UpdateAgentDefaultResponse, + DeleteAgent200Response, + DeleteAgentDefaultResponse, + CreateThread200Response, + CreateThreadDefaultResponse, + GetThread200Response, + GetThreadDefaultResponse, + UpdateThread200Response, + UpdateThreadDefaultResponse, + DeleteThread200Response, + DeleteThreadDefaultResponse, + CreateMessage200Response, + CreateMessageDefaultResponse, + ListMessages200Response, + ListMessagesDefaultResponse, + GetMessage200Response, + GetMessageDefaultResponse, + UpdateMessage200Response, + UpdateMessageDefaultResponse, + CreateRun200Response, + CreateRunDefaultResponse, + ListRuns200Response, + ListRunsDefaultResponse, + GetRun200Response, + GetRunDefaultResponse, + UpdateRun200Response, + UpdateRunDefaultResponse, + SubmitToolOutputsToRun200Response, + SubmitToolOutputsToRunDefaultResponse, + CancelRun200Response, + CancelRunDefaultResponse, + CreateThreadAndRun200Response, + CreateThreadAndRunDefaultResponse, + GetRunStep200Response, + GetRunStepDefaultResponse, + ListRunSteps200Response, + ListRunStepsDefaultResponse, + ListFiles200Response, + ListFilesDefaultResponse, + UploadFile200Response, + UploadFileDefaultResponse, + DeleteFile200Response, + DeleteFileDefaultResponse, + GetFile200Response, + GetFileDefaultResponse, + GetFileContent200Response, + GetFileContentDefaultResponse, + ListVectorStores200Response, + ListVectorStoresDefaultResponse, + CreateVectorStore200Response, + CreateVectorStoreDefaultResponse, + GetVectorStore200Response, + GetVectorStoreDefaultResponse, + ModifyVectorStore200Response, + ModifyVectorStoreDefaultResponse, + DeleteVectorStore200Response, + DeleteVectorStoreDefaultResponse, + ListVectorStoreFiles200Response, + ListVectorStoreFilesDefaultResponse, + CreateVectorStoreFile200Response, + CreateVectorStoreFileDefaultResponse, + GetVectorStoreFile200Response, + GetVectorStoreFileDefaultResponse, + DeleteVectorStoreFile200Response, + DeleteVectorStoreFileDefaultResponse, + CreateVectorStoreFileBatch200Response, + CreateVectorStoreFileBatchDefaultResponse, + GetVectorStoreFileBatch200Response, + GetVectorStoreFileBatchDefaultResponse, + CancelVectorStoreFileBatch200Response, + CancelVectorStoreFileBatchDefaultResponse, + ListVectorStoreFileBatchFiles200Response, + ListVectorStoreFileBatchFilesDefaultResponse, + GetWorkspace200Response, + GetWorkspaceDefaultResponse, + ListConnections200Response, + ListConnectionsDefaultResponse, + GetConnection200Response, + GetConnectionDefaultResponse, + GetConnectionWithSecrets200Response, + GetConnectionWithSecretsDefaultResponse, + GetAppInsights200Response, + GetAppInsightsDefaultResponse, + Get200Response, + GetDefaultResponse, + Update200Response, + UpdateDefaultResponse, + Create201Response, + List200Response, + ListDefaultResponse, + GetSchedule200Response, + GetScheduleDefaultResponse, + CreateOrReplaceSchedule200Response, + CreateOrReplaceSchedule201Response, + CreateOrReplaceScheduleDefaultResponse, + ListSchedule200Response, + ListScheduleDefaultResponse, + DisableSchedule204Response, + DisableScheduleDefaultResponse, +} from "./responses.js"; +import { Client, StreamableMethod } from "@azure-rest/core-client"; + +export interface CreateAgent { + /** Creates a new agent. */ + post( + options: CreateAgentParameters, + ): StreamableMethod; + /** Gets a list of agents that were previously created. */ + get( + options?: ListAgentsParameters, + ): StreamableMethod; +} + +export interface GetAgent { + /** Retrieves an existing agent. */ + get( + options?: GetAgentParameters, + ): StreamableMethod; + /** Modifies an existing agent. */ + post( + options: UpdateAgentParameters, + ): StreamableMethod; + /** Deletes an agent. */ + delete( + options?: DeleteAgentParameters, + ): StreamableMethod; +} + +export interface CreateThread { + /** Creates a new thread. Threads contain messages and can be run by agents. */ + post( + options: CreateThreadParameters, + ): StreamableMethod; +} + +export interface GetThread { + /** Gets information about an existing thread. */ + get( + options?: GetThreadParameters, + ): StreamableMethod; + /** Modifies an existing thread. */ + post( + options: UpdateThreadParameters, + ): StreamableMethod; + /** Deletes an existing thread. */ + delete( + options?: DeleteThreadParameters, + ): StreamableMethod; +} + +export interface CreateMessage { + /** Creates a new message on a specified thread. */ + post( + options: CreateMessageParameters, + ): StreamableMethod; + /** Gets a list of messages that exist on a thread. */ + get( + options?: ListMessagesParameters, + ): StreamableMethod; +} + +export interface GetMessage { + /** Gets an existing message from an existing thread. */ + get( + options?: GetMessageParameters, + ): StreamableMethod; + /** Modifies an existing message on an existing thread. */ + post( + options: UpdateMessageParameters, + ): StreamableMethod; +} + +export interface CreateRun { + /** Creates a new run for an agent thread. */ + post( + options: CreateRunParameters, + ): StreamableMethod; + /** Gets a list of runs for a specified thread. */ + get( + options?: ListRunsParameters, + ): StreamableMethod; +} + +export interface GetRun { + /** Gets an existing run from an existing thread. */ + get( + options?: GetRunParameters, + ): StreamableMethod; + /** Modifies an existing thread run. */ + post( + options: UpdateRunParameters, + ): StreamableMethod; +} + +export interface SubmitToolOutputsToRun { + /** Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. */ + post( + options: SubmitToolOutputsToRunParameters, + ): StreamableMethod< + SubmitToolOutputsToRun200Response | SubmitToolOutputsToRunDefaultResponse + >; +} + +export interface CancelRun { + /** Cancels a run of an in progress thread. */ + post( + options?: CancelRunParameters, + ): StreamableMethod; +} + +export interface CreateThreadAndRun { + /** Creates a new agent thread and immediately starts a run using that new thread. */ + post( + options: CreateThreadAndRunParameters, + ): StreamableMethod< + CreateThreadAndRun200Response | CreateThreadAndRunDefaultResponse + >; +} + +export interface GetRunStep { + /** Gets a single run step from a thread run. */ + get( + options?: GetRunStepParameters, + ): StreamableMethod; +} + +export interface ListRunSteps { + /** Gets a list of run steps from a thread run. */ + get( + options?: ListRunStepsParameters, + ): StreamableMethod; +} + +export interface ListFiles { + /** Gets a list of previously uploaded files. */ + get( + options?: ListFilesParameters, + ): StreamableMethod; + /** Uploads a file for use by other operations. */ + post( + options: UploadFileParameters, + ): StreamableMethod; +} + +export interface DeleteFile { + /** Delete a previously uploaded file. */ + delete( + options?: DeleteFileParameters, + ): StreamableMethod; + /** Returns information about a specific file. Does not retrieve file content. */ + get( + options?: GetFileParameters, + ): StreamableMethod; +} + +export interface GetFileContent { + /** Retrieves the raw content of a specific file. */ + get( + options?: GetFileContentParameters, + ): StreamableMethod< + GetFileContent200Response | GetFileContentDefaultResponse + >; +} + +export interface ListVectorStores { + /** Returns a list of vector stores. */ + get( + options?: ListVectorStoresParameters, + ): StreamableMethod< + ListVectorStores200Response | ListVectorStoresDefaultResponse + >; + /** Creates a vector store. */ + post( + options: CreateVectorStoreParameters, + ): StreamableMethod< + CreateVectorStore200Response | CreateVectorStoreDefaultResponse + >; +} + +export interface GetVectorStore { + /** Returns the vector store object matching the specified ID. */ + get( + options?: GetVectorStoreParameters, + ): StreamableMethod< + GetVectorStore200Response | GetVectorStoreDefaultResponse + >; + /** The ID of the vector store to modify. */ + post( + options: ModifyVectorStoreParameters, + ): StreamableMethod< + ModifyVectorStore200Response | ModifyVectorStoreDefaultResponse + >; + /** Deletes the vector store object matching the specified ID. */ + delete( + options?: DeleteVectorStoreParameters, + ): StreamableMethod< + DeleteVectorStore200Response | DeleteVectorStoreDefaultResponse + >; +} + +export interface ListVectorStoreFiles { + /** Returns a list of vector store files. */ + get( + options?: ListVectorStoreFilesParameters, + ): StreamableMethod< + ListVectorStoreFiles200Response | ListVectorStoreFilesDefaultResponse + >; + /** Create a vector store file by attaching a file to a vector store. */ + post( + options: CreateVectorStoreFileParameters, + ): StreamableMethod< + CreateVectorStoreFile200Response | CreateVectorStoreFileDefaultResponse + >; +} + +export interface GetVectorStoreFile { + /** Retrieves a vector store file. */ + get( + options?: GetVectorStoreFileParameters, + ): StreamableMethod< + GetVectorStoreFile200Response | GetVectorStoreFileDefaultResponse + >; + /** + * Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. + * To delete the file, use the delete file endpoint. + */ + delete( + options?: DeleteVectorStoreFileParameters, + ): StreamableMethod< + DeleteVectorStoreFile200Response | DeleteVectorStoreFileDefaultResponse + >; +} + +export interface CreateVectorStoreFileBatch { + /** Create a vector store file batch. */ + post( + options: CreateVectorStoreFileBatchParameters, + ): StreamableMethod< + | CreateVectorStoreFileBatch200Response + | CreateVectorStoreFileBatchDefaultResponse + >; +} + +export interface GetVectorStoreFileBatch { + /** Retrieve a vector store file batch. */ + get( + options?: GetVectorStoreFileBatchParameters, + ): StreamableMethod< + GetVectorStoreFileBatch200Response | GetVectorStoreFileBatchDefaultResponse + >; +} + +export interface CancelVectorStoreFileBatch { + /** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */ + post( + options?: CancelVectorStoreFileBatchParameters, + ): StreamableMethod< + | CancelVectorStoreFileBatch200Response + | CancelVectorStoreFileBatchDefaultResponse + >; +} + +export interface ListVectorStoreFileBatchFiles { + /** Returns a list of vector store files in a batch. */ + get( + options?: ListVectorStoreFileBatchFilesParameters, + ): StreamableMethod< + | ListVectorStoreFileBatchFiles200Response + | ListVectorStoreFileBatchFilesDefaultResponse + >; +} + +export interface GetWorkspace { + /** Gets the properties of the specified machine learning workspace. */ + get( + options?: GetWorkspaceParameters, + ): StreamableMethod; +} + +export interface ListConnections { + /** List the details of all the connections (not including their credentials) */ + get( + options?: ListConnectionsParameters, + ): StreamableMethod< + ListConnections200Response | ListConnectionsDefaultResponse + >; +} + +export interface GetConnection { + /** Get the details of a single connection, without credentials. */ + get( + options?: GetConnectionParameters, + ): StreamableMethod; +} + +export interface GetConnectionWithSecrets { + /** Get the details of a single connection, including credentials (if available). */ + post( + options: GetConnectionWithSecretsParameters, + ): StreamableMethod< + | GetConnectionWithSecrets200Response + | GetConnectionWithSecretsDefaultResponse + >; +} + +export interface GetAppInsights { + /** Gets the properties of the specified Application Insights resource */ + get( + options?: GetAppInsightsParameters, + ): StreamableMethod< + GetAppInsights200Response | GetAppInsightsDefaultResponse + >; +} + +export interface Get { + /** Resource read operation template. */ + get( + options?: GetParameters, + ): StreamableMethod; + /** Resource update operation template. */ + patch( + options: UpdateParameters, + ): StreamableMethod; +} + +export interface Create { + /** Run the evaluation. */ + post(options: CreateParameters): StreamableMethod; +} + +export interface List { + /** Resource list operation template. */ + get( + options?: ListParameters, + ): StreamableMethod; +} + +export interface GetSchedule { + /** Resource read operation template. */ + get( + options?: GetScheduleParameters, + ): StreamableMethod; + /** Create or replace operation template. */ + put( + options: CreateOrReplaceScheduleParameters, + ): StreamableMethod< + | CreateOrReplaceSchedule200Response + | CreateOrReplaceSchedule201Response + | CreateOrReplaceScheduleDefaultResponse + >; +} + +export interface ListSchedule { + /** Resource list operation template. */ + get( + options?: ListScheduleParameters, + ): StreamableMethod; +} + +export interface DisableSchedule { + /** Disable the evaluation schedule. */ + patch( + options?: DisableScheduleParameters, + ): StreamableMethod< + DisableSchedule204Response | DisableScheduleDefaultResponse + >; +} + +export interface Routes { + /** Resource for '/assistants' has methods for the following verbs: post, get */ + (path: "/assistants"): CreateAgent; + /** Resource for '/assistants/\{assistantId\}' has methods for the following verbs: get, post, delete */ + (path: "/assistants/{assistantId}", assistantId: string): GetAgent; + /** Resource for '/threads' has methods for the following verbs: post */ + (path: "/threads"): CreateThread; + /** Resource for '/threads/\{threadId\}' has methods for the following verbs: get, post, delete */ + (path: "/threads/{threadId}", threadId: string): GetThread; + /** Resource for '/threads/\{threadId\}/messages' has methods for the following verbs: post, get */ + (path: "/threads/{threadId}/messages", threadId: string): CreateMessage; + /** Resource for '/threads/\{threadId\}/messages/\{messageId\}' has methods for the following verbs: get, post */ + ( + path: "/threads/{threadId}/messages/{messageId}", + threadId: string, + messageId: string, + ): GetMessage; + /** Resource for '/threads/\{threadId\}/runs' has methods for the following verbs: post, get */ + (path: "/threads/{threadId}/runs", threadId: string): CreateRun; + /** Resource for '/threads/\{threadId\}/runs/\{runId\}' has methods for the following verbs: get, post */ + ( + path: "/threads/{threadId}/runs/{runId}", + threadId: string, + runId: string, + ): GetRun; + /** Resource for '/threads/\{threadId\}/runs/\{runId\}/submit_tool_outputs' has methods for the following verbs: post */ + ( + path: "/threads/{threadId}/runs/{runId}/submit_tool_outputs", + threadId: string, + runId: string, + ): SubmitToolOutputsToRun; + /** Resource for '/threads/\{threadId\}/runs/\{runId\}/cancel' has methods for the following verbs: post */ + ( + path: "/threads/{threadId}/runs/{runId}/cancel", + threadId: string, + runId: string, + ): CancelRun; + /** Resource for '/threads/runs' has methods for the following verbs: post */ + (path: "/threads/runs"): CreateThreadAndRun; + /** Resource for '/threads/\{threadId\}/runs/\{runId\}/steps/\{stepId\}' has methods for the following verbs: get */ + ( + path: "/threads/{threadId}/runs/{runId}/steps/{stepId}", + threadId: string, + runId: string, + stepId: string, + ): GetRunStep; + /** Resource for '/threads/\{threadId\}/runs/\{runId\}/steps' has methods for the following verbs: get */ + ( + path: "/threads/{threadId}/runs/{runId}/steps", + threadId: string, + runId: string, + ): ListRunSteps; + /** Resource for '/files' has methods for the following verbs: get, post */ + (path: "/files"): ListFiles; + /** Resource for '/files/\{fileId\}' has methods for the following verbs: delete, get */ + (path: "/files/{fileId}", fileId: string): DeleteFile; + /** Resource for '/files/\{fileId\}/content' has methods for the following verbs: get */ + (path: "/files/{fileId}/content", fileId: string): GetFileContent; + /** Resource for '/vector_stores' has methods for the following verbs: get, post */ + (path: "/vector_stores"): ListVectorStores; + /** Resource for '/vector_stores/\{vectorStoreId\}' has methods for the following verbs: get, post, delete */ + ( + path: "/vector_stores/{vectorStoreId}", + vectorStoreId: string, + ): GetVectorStore; + /** Resource for '/vector_stores/\{vectorStoreId\}/files' has methods for the following verbs: get, post */ + ( + path: "/vector_stores/{vectorStoreId}/files", + vectorStoreId: string, + ): ListVectorStoreFiles; + /** Resource for '/vector_stores/\{vectorStoreId\}/files/\{fileId\}' has methods for the following verbs: get, delete */ + ( + path: "/vector_stores/{vectorStoreId}/files/{fileId}", + vectorStoreId: string, + fileId: string, + ): GetVectorStoreFile; + /** Resource for '/vector_stores/\{vectorStoreId\}/file_batches' has methods for the following verbs: post */ + ( + path: "/vector_stores/{vectorStoreId}/file_batches", + vectorStoreId: string, + ): CreateVectorStoreFileBatch; + /** Resource for '/vector_stores/\{vectorStoreId\}/file_batches/\{batchId\}' has methods for the following verbs: get */ + ( + path: "/vector_stores/{vectorStoreId}/file_batches/{batchId}", + vectorStoreId: string, + batchId: string, + ): GetVectorStoreFileBatch; + /** Resource for '/vector_stores/\{vectorStoreId\}/file_batches/\{batchId\}/cancel' has methods for the following verbs: post */ + ( + path: "/vector_stores/{vectorStoreId}/file_batches/{batchId}/cancel", + vectorStoreId: string, + batchId: string, + ): CancelVectorStoreFileBatch; + /** Resource for '/vector_stores/\{vectorStoreId\}/file_batches/\{batchId\}/files' has methods for the following verbs: get */ + ( + path: "/vector_stores/{vectorStoreId}/file_batches/{batchId}/files", + vectorStoreId: string, + batchId: string, + ): ListVectorStoreFileBatchFiles; + /** Resource for '/' has methods for the following verbs: get */ + (path: "/"): GetWorkspace; + /** Resource for '/connections' has methods for the following verbs: get */ + (path: "/connections"): ListConnections; + /** Resource for '/connections/\{connectionName\}' has methods for the following verbs: get */ + ( + path: "/connections/{connectionName}", + connectionName: string, + ): GetConnection; + /** Resource for '/connections/\{connectionName\}/listsecrets' has methods for the following verbs: post */ + ( + path: "/connections/{connectionName}/listsecrets", + connectionName: string, + ): GetConnectionWithSecrets; + /** Resource for '/\{appInsightsResourceUrl\}' has methods for the following verbs: get */ + ( + path: "/{appInsightsResourceUrl}", + appInsightsResourceUrl: string, + ): GetAppInsights; + /** Resource for '/evaluations/runs/\{id\}' has methods for the following verbs: get, patch */ + (path: "/evaluations/runs/{id}", id: string): Get; + /** Resource for '/evaluations/runs:run' has methods for the following verbs: post */ + (path: "/evaluations/runs:run"): Create; + /** Resource for '/evaluations/runs' has methods for the following verbs: get */ + (path: "/evaluations/runs"): List; + /** Resource for '/evaluations/schedules/\{name\}' has methods for the following verbs: get, put */ + (path: "/evaluations/schedules/{name}", name: string): GetSchedule; + /** Resource for '/evaluations/schedules' has methods for the following verbs: get */ + (path: "/evaluations/schedules"): ListSchedule; + /** Resource for '/evaluations/schedules/\{name\}/disable' has methods for the following verbs: patch */ + ( + path: "/evaluations/schedules/{name}/disable", + name: string, + ): DisableSchedule; +} + +export type ProjectsClient = Client & { + path: Routes; +}; diff --git a/sdk/ai/ai-projects/src/generated/src/index.ts b/sdk/ai/ai-projects/src/generated/src/index.ts new file mode 100644 index 000000000000..0afd734a7856 --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/index.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import ProjectsClient from "./projectsClient.js"; + +export * from "./projectsClient.js"; +export * from "./parameters.js"; +export * from "./responses.js"; +export * from "./clientDefinitions.js"; +export * from "./isUnexpected.js"; +export * from "./models.js"; +export * from "./outputModels.js"; +export * from "./paginateHelper.js"; + +export default ProjectsClient; diff --git a/sdk/ai/ai-projects/src/generated/src/isUnexpected.ts b/sdk/ai/ai-projects/src/generated/src/isUnexpected.ts new file mode 100644 index 000000000000..6f5865336149 --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/isUnexpected.ts @@ -0,0 +1,586 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + CreateAgent200Response, + CreateAgentDefaultResponse, + ListAgents200Response, + ListAgentsDefaultResponse, + GetAgent200Response, + GetAgentDefaultResponse, + UpdateAgent200Response, + UpdateAgentDefaultResponse, + DeleteAgent200Response, + DeleteAgentDefaultResponse, + CreateThread200Response, + CreateThreadDefaultResponse, + GetThread200Response, + GetThreadDefaultResponse, + UpdateThread200Response, + UpdateThreadDefaultResponse, + DeleteThread200Response, + DeleteThreadDefaultResponse, + CreateMessage200Response, + CreateMessageDefaultResponse, + ListMessages200Response, + ListMessagesDefaultResponse, + GetMessage200Response, + GetMessageDefaultResponse, + UpdateMessage200Response, + UpdateMessageDefaultResponse, + CreateRun200Response, + CreateRunDefaultResponse, + ListRuns200Response, + ListRunsDefaultResponse, + GetRun200Response, + GetRunDefaultResponse, + UpdateRun200Response, + UpdateRunDefaultResponse, + SubmitToolOutputsToRun200Response, + SubmitToolOutputsToRunDefaultResponse, + CancelRun200Response, + CancelRunDefaultResponse, + CreateThreadAndRun200Response, + CreateThreadAndRunDefaultResponse, + GetRunStep200Response, + GetRunStepDefaultResponse, + ListRunSteps200Response, + ListRunStepsDefaultResponse, + ListFiles200Response, + ListFilesDefaultResponse, + UploadFile200Response, + UploadFileDefaultResponse, + DeleteFile200Response, + DeleteFileDefaultResponse, + GetFile200Response, + GetFileDefaultResponse, + GetFileContent200Response, + GetFileContentDefaultResponse, + ListVectorStores200Response, + ListVectorStoresDefaultResponse, + CreateVectorStore200Response, + CreateVectorStoreDefaultResponse, + GetVectorStore200Response, + GetVectorStoreDefaultResponse, + ModifyVectorStore200Response, + ModifyVectorStoreDefaultResponse, + DeleteVectorStore200Response, + DeleteVectorStoreDefaultResponse, + ListVectorStoreFiles200Response, + ListVectorStoreFilesDefaultResponse, + CreateVectorStoreFile200Response, + CreateVectorStoreFileDefaultResponse, + GetVectorStoreFile200Response, + GetVectorStoreFileDefaultResponse, + DeleteVectorStoreFile200Response, + DeleteVectorStoreFileDefaultResponse, + CreateVectorStoreFileBatch200Response, + CreateVectorStoreFileBatchDefaultResponse, + GetVectorStoreFileBatch200Response, + GetVectorStoreFileBatchDefaultResponse, + CancelVectorStoreFileBatch200Response, + CancelVectorStoreFileBatchDefaultResponse, + ListVectorStoreFileBatchFiles200Response, + ListVectorStoreFileBatchFilesDefaultResponse, + GetWorkspace200Response, + GetWorkspaceDefaultResponse, + ListConnections200Response, + ListConnectionsDefaultResponse, + GetConnection200Response, + GetConnectionDefaultResponse, + GetConnectionWithSecrets200Response, + GetConnectionWithSecretsDefaultResponse, + GetAppInsights200Response, + GetAppInsightsDefaultResponse, + Get200Response, + GetDefaultResponse, + Update200Response, + UpdateDefaultResponse, + List200Response, + ListDefaultResponse, + GetSchedule200Response, + GetScheduleDefaultResponse, + CreateOrReplaceSchedule200Response, + CreateOrReplaceSchedule201Response, + CreateOrReplaceScheduleDefaultResponse, + ListSchedule200Response, + ListScheduleDefaultResponse, + DisableSchedule204Response, + DisableScheduleDefaultResponse, +} from "./responses.js"; + +const responseMap: Record = { + "POST /assistants": ["200"], + "GET /assistants": ["200"], + "GET /assistants/{assistantId}": ["200"], + "POST /assistants/{assistantId}": ["200"], + "DELETE /assistants/{assistantId}": ["200"], + "POST /threads": ["200"], + "GET /threads/{threadId}": ["200"], + "POST /threads/{threadId}": ["200"], + "DELETE /threads/{threadId}": ["200"], + "POST /threads/{threadId}/messages": ["200"], + "GET /threads/{threadId}/messages": ["200"], + "GET /threads/{threadId}/messages/{messageId}": ["200"], + "POST /threads/{threadId}/messages/{messageId}": ["200"], + "POST /threads/{threadId}/runs": ["200"], + "GET /threads/{threadId}/runs": ["200"], + "GET /threads/{threadId}/runs/{runId}": ["200"], + "POST /threads/{threadId}/runs/{runId}": ["200"], + "POST /threads/{threadId}/runs/{runId}/submit_tool_outputs": ["200"], + "POST /threads/{threadId}/runs/{runId}/cancel": ["200"], + "POST /threads/runs": ["200"], + "GET /threads/{threadId}/runs/{runId}/steps/{stepId}": ["200"], + "GET /threads/{threadId}/runs/{runId}/steps": ["200"], + "GET /files": ["200"], + "POST /files": ["200"], + "DELETE /files/{fileId}": ["200"], + "GET /files/{fileId}": ["200"], + "GET /files/{fileId}/content": ["200"], + "GET /vector_stores": ["200"], + "POST /vector_stores": ["200"], + "GET /vector_stores/{vectorStoreId}": ["200"], + "POST /vector_stores/{vectorStoreId}": ["200"], + "DELETE /vector_stores/{vectorStoreId}": ["200"], + "GET /vector_stores/{vectorStoreId}/files": ["200"], + "POST /vector_stores/{vectorStoreId}/files": ["200"], + "GET /vector_stores/{vectorStoreId}/files/{fileId}": ["200"], + "DELETE /vector_stores/{vectorStoreId}/files/{fileId}": ["200"], + "POST /vector_stores/{vectorStoreId}/file_batches": ["200"], + "GET /vector_stores/{vectorStoreId}/file_batches/{batchId}": ["200"], + "POST /vector_stores/{vectorStoreId}/file_batches/{batchId}/cancel": ["200"], + "GET /vector_stores/{vectorStoreId}/file_batches/{batchId}/files": ["200"], + "GET /": ["200"], + "GET /connections": ["200"], + "GET /connections/{connectionName}": ["200"], + "POST /connections/{connectionName}/listsecrets": ["200"], + "GET /{appInsightsResourceUrl}": ["200"], + "GET /evaluations/runs/{id}": ["200"], + "PATCH /evaluations/runs/{id}": ["200"], + "POST /evaluations/runs:run": ["201"], + "GET /evaluations/runs": ["200"], + "GET /evaluations/schedules/{name}": ["200"], + "PUT /evaluations/schedules/{name}": ["200", "201"], + "GET /evaluations/schedules": ["200"], + "PATCH /evaluations/schedules/{name}/disable": ["204"], +}; + +export function isUnexpected( + response: CreateAgent200Response | CreateAgentDefaultResponse, +): response is CreateAgentDefaultResponse; +export function isUnexpected( + response: ListAgents200Response | ListAgentsDefaultResponse, +): response is ListAgentsDefaultResponse; +export function isUnexpected( + response: GetAgent200Response | GetAgentDefaultResponse, +): response is GetAgentDefaultResponse; +export function isUnexpected( + response: UpdateAgent200Response | UpdateAgentDefaultResponse, +): response is UpdateAgentDefaultResponse; +export function isUnexpected( + response: DeleteAgent200Response | DeleteAgentDefaultResponse, +): response is DeleteAgentDefaultResponse; +export function isUnexpected( + response: CreateThread200Response | CreateThreadDefaultResponse, +): response is CreateThreadDefaultResponse; +export function isUnexpected( + response: GetThread200Response | GetThreadDefaultResponse, +): response is GetThreadDefaultResponse; +export function isUnexpected( + response: UpdateThread200Response | UpdateThreadDefaultResponse, +): response is UpdateThreadDefaultResponse; +export function isUnexpected( + response: DeleteThread200Response | DeleteThreadDefaultResponse, +): response is DeleteThreadDefaultResponse; +export function isUnexpected( + response: CreateMessage200Response | CreateMessageDefaultResponse, +): response is CreateMessageDefaultResponse; +export function isUnexpected( + response: ListMessages200Response | ListMessagesDefaultResponse, +): response is ListMessagesDefaultResponse; +export function isUnexpected( + response: GetMessage200Response | GetMessageDefaultResponse, +): response is GetMessageDefaultResponse; +export function isUnexpected( + response: UpdateMessage200Response | UpdateMessageDefaultResponse, +): response is UpdateMessageDefaultResponse; +export function isUnexpected( + response: CreateRun200Response | CreateRunDefaultResponse, +): response is CreateRunDefaultResponse; +export function isUnexpected( + response: ListRuns200Response | ListRunsDefaultResponse, +): response is ListRunsDefaultResponse; +export function isUnexpected( + response: GetRun200Response | GetRunDefaultResponse, +): response is GetRunDefaultResponse; +export function isUnexpected( + response: UpdateRun200Response | UpdateRunDefaultResponse, +): response is UpdateRunDefaultResponse; +export function isUnexpected( + response: + | SubmitToolOutputsToRun200Response + | SubmitToolOutputsToRunDefaultResponse, +): response is SubmitToolOutputsToRunDefaultResponse; +export function isUnexpected( + response: CancelRun200Response | CancelRunDefaultResponse, +): response is CancelRunDefaultResponse; +export function isUnexpected( + response: CreateThreadAndRun200Response | CreateThreadAndRunDefaultResponse, +): response is CreateThreadAndRunDefaultResponse; +export function isUnexpected( + response: GetRunStep200Response | GetRunStepDefaultResponse, +): response is GetRunStepDefaultResponse; +export function isUnexpected( + response: ListRunSteps200Response | ListRunStepsDefaultResponse, +): response is ListRunStepsDefaultResponse; +export function isUnexpected( + response: ListFiles200Response | ListFilesDefaultResponse, +): response is ListFilesDefaultResponse; +export function isUnexpected( + response: UploadFile200Response | UploadFileDefaultResponse, +): response is UploadFileDefaultResponse; +export function isUnexpected( + response: DeleteFile200Response | DeleteFileDefaultResponse, +): response is DeleteFileDefaultResponse; +export function isUnexpected( + response: GetFile200Response | GetFileDefaultResponse, +): response is GetFileDefaultResponse; +export function isUnexpected( + response: GetFileContent200Response | GetFileContentDefaultResponse, +): response is GetFileContentDefaultResponse; +export function isUnexpected( + response: ListVectorStores200Response | ListVectorStoresDefaultResponse, +): response is ListVectorStoresDefaultResponse; +export function isUnexpected( + response: CreateVectorStore200Response | CreateVectorStoreDefaultResponse, +): response is CreateVectorStoreDefaultResponse; +export function isUnexpected( + response: GetVectorStore200Response | GetVectorStoreDefaultResponse, +): response is GetVectorStoreDefaultResponse; +export function isUnexpected( + response: ModifyVectorStore200Response | ModifyVectorStoreDefaultResponse, +): response is ModifyVectorStoreDefaultResponse; +export function isUnexpected( + response: DeleteVectorStore200Response | DeleteVectorStoreDefaultResponse, +): response is DeleteVectorStoreDefaultResponse; +export function isUnexpected( + response: + | ListVectorStoreFiles200Response + | ListVectorStoreFilesDefaultResponse, +): response is ListVectorStoreFilesDefaultResponse; +export function isUnexpected( + response: + | CreateVectorStoreFile200Response + | CreateVectorStoreFileDefaultResponse, +): response is CreateVectorStoreFileDefaultResponse; +export function isUnexpected( + response: GetVectorStoreFile200Response | GetVectorStoreFileDefaultResponse, +): response is GetVectorStoreFileDefaultResponse; +export function isUnexpected( + response: + | DeleteVectorStoreFile200Response + | DeleteVectorStoreFileDefaultResponse, +): response is DeleteVectorStoreFileDefaultResponse; +export function isUnexpected( + response: + | CreateVectorStoreFileBatch200Response + | CreateVectorStoreFileBatchDefaultResponse, +): response is CreateVectorStoreFileBatchDefaultResponse; +export function isUnexpected( + response: + | GetVectorStoreFileBatch200Response + | GetVectorStoreFileBatchDefaultResponse, +): response is GetVectorStoreFileBatchDefaultResponse; +export function isUnexpected( + response: + | CancelVectorStoreFileBatch200Response + | CancelVectorStoreFileBatchDefaultResponse, +): response is CancelVectorStoreFileBatchDefaultResponse; +export function isUnexpected( + response: + | ListVectorStoreFileBatchFiles200Response + | ListVectorStoreFileBatchFilesDefaultResponse, +): response is ListVectorStoreFileBatchFilesDefaultResponse; +export function isUnexpected( + response: GetWorkspace200Response | GetWorkspaceDefaultResponse, +): response is GetWorkspaceDefaultResponse; +export function isUnexpected( + response: ListConnections200Response | ListConnectionsDefaultResponse, +): response is ListConnectionsDefaultResponse; +export function isUnexpected( + response: GetConnection200Response | GetConnectionDefaultResponse, +): response is GetConnectionDefaultResponse; +export function isUnexpected( + response: + | GetConnectionWithSecrets200Response + | GetConnectionWithSecretsDefaultResponse, +): response is GetConnectionWithSecretsDefaultResponse; +export function isUnexpected( + response: GetAppInsights200Response | GetAppInsightsDefaultResponse, +): response is GetAppInsightsDefaultResponse; +export function isUnexpected( + response: Get200Response | GetDefaultResponse, +): response is GetDefaultResponse; +export function isUnexpected( + response: Update200Response | UpdateDefaultResponse, +): response is UpdateDefaultResponse; +export function isUnexpected( + response: List200Response | ListDefaultResponse, +): response is ListDefaultResponse; +export function isUnexpected( + response: GetSchedule200Response | GetScheduleDefaultResponse, +): response is GetScheduleDefaultResponse; +export function isUnexpected( + response: + | CreateOrReplaceSchedule200Response + | CreateOrReplaceSchedule201Response + | CreateOrReplaceScheduleDefaultResponse, +): response is CreateOrReplaceScheduleDefaultResponse; +export function isUnexpected( + response: ListSchedule200Response | ListScheduleDefaultResponse, +): response is ListScheduleDefaultResponse; +export function isUnexpected( + response: DisableSchedule204Response | DisableScheduleDefaultResponse, +): response is DisableScheduleDefaultResponse; +export function isUnexpected( + response: + | CreateAgent200Response + | CreateAgentDefaultResponse + | ListAgents200Response + | ListAgentsDefaultResponse + | GetAgent200Response + | GetAgentDefaultResponse + | UpdateAgent200Response + | UpdateAgentDefaultResponse + | DeleteAgent200Response + | DeleteAgentDefaultResponse + | CreateThread200Response + | CreateThreadDefaultResponse + | GetThread200Response + | GetThreadDefaultResponse + | UpdateThread200Response + | UpdateThreadDefaultResponse + | DeleteThread200Response + | DeleteThreadDefaultResponse + | CreateMessage200Response + | CreateMessageDefaultResponse + | ListMessages200Response + | ListMessagesDefaultResponse + | GetMessage200Response + | GetMessageDefaultResponse + | UpdateMessage200Response + | UpdateMessageDefaultResponse + | CreateRun200Response + | CreateRunDefaultResponse + | ListRuns200Response + | ListRunsDefaultResponse + | GetRun200Response + | GetRunDefaultResponse + | UpdateRun200Response + | UpdateRunDefaultResponse + | SubmitToolOutputsToRun200Response + | SubmitToolOutputsToRunDefaultResponse + | CancelRun200Response + | CancelRunDefaultResponse + | CreateThreadAndRun200Response + | CreateThreadAndRunDefaultResponse + | GetRunStep200Response + | GetRunStepDefaultResponse + | ListRunSteps200Response + | ListRunStepsDefaultResponse + | ListFiles200Response + | ListFilesDefaultResponse + | UploadFile200Response + | UploadFileDefaultResponse + | DeleteFile200Response + | DeleteFileDefaultResponse + | GetFile200Response + | GetFileDefaultResponse + | GetFileContent200Response + | GetFileContentDefaultResponse + | ListVectorStores200Response + | ListVectorStoresDefaultResponse + | CreateVectorStore200Response + | CreateVectorStoreDefaultResponse + | GetVectorStore200Response + | GetVectorStoreDefaultResponse + | ModifyVectorStore200Response + | ModifyVectorStoreDefaultResponse + | DeleteVectorStore200Response + | DeleteVectorStoreDefaultResponse + | ListVectorStoreFiles200Response + | ListVectorStoreFilesDefaultResponse + | CreateVectorStoreFile200Response + | CreateVectorStoreFileDefaultResponse + | GetVectorStoreFile200Response + | GetVectorStoreFileDefaultResponse + | DeleteVectorStoreFile200Response + | DeleteVectorStoreFileDefaultResponse + | CreateVectorStoreFileBatch200Response + | CreateVectorStoreFileBatchDefaultResponse + | GetVectorStoreFileBatch200Response + | GetVectorStoreFileBatchDefaultResponse + | CancelVectorStoreFileBatch200Response + | CancelVectorStoreFileBatchDefaultResponse + | ListVectorStoreFileBatchFiles200Response + | ListVectorStoreFileBatchFilesDefaultResponse + | GetWorkspace200Response + | GetWorkspaceDefaultResponse + | ListConnections200Response + | ListConnectionsDefaultResponse + | GetConnection200Response + | GetConnectionDefaultResponse + | GetConnectionWithSecrets200Response + | GetConnectionWithSecretsDefaultResponse + | GetAppInsights200Response + | GetAppInsightsDefaultResponse + | Get200Response + | GetDefaultResponse + | Update200Response + | UpdateDefaultResponse + | List200Response + | ListDefaultResponse + | GetSchedule200Response + | GetScheduleDefaultResponse + | CreateOrReplaceSchedule200Response + | CreateOrReplaceSchedule201Response + | CreateOrReplaceScheduleDefaultResponse + | ListSchedule200Response + | ListScheduleDefaultResponse + | DisableSchedule204Response + | DisableScheduleDefaultResponse, +): response is + | CreateAgentDefaultResponse + | ListAgentsDefaultResponse + | GetAgentDefaultResponse + | UpdateAgentDefaultResponse + | DeleteAgentDefaultResponse + | CreateThreadDefaultResponse + | GetThreadDefaultResponse + | UpdateThreadDefaultResponse + | DeleteThreadDefaultResponse + | CreateMessageDefaultResponse + | ListMessagesDefaultResponse + | GetMessageDefaultResponse + | UpdateMessageDefaultResponse + | CreateRunDefaultResponse + | ListRunsDefaultResponse + | GetRunDefaultResponse + | UpdateRunDefaultResponse + | SubmitToolOutputsToRunDefaultResponse + | CancelRunDefaultResponse + | CreateThreadAndRunDefaultResponse + | GetRunStepDefaultResponse + | ListRunStepsDefaultResponse + | ListFilesDefaultResponse + | UploadFileDefaultResponse + | DeleteFileDefaultResponse + | GetFileDefaultResponse + | GetFileContentDefaultResponse + | ListVectorStoresDefaultResponse + | CreateVectorStoreDefaultResponse + | GetVectorStoreDefaultResponse + | ModifyVectorStoreDefaultResponse + | DeleteVectorStoreDefaultResponse + | ListVectorStoreFilesDefaultResponse + | CreateVectorStoreFileDefaultResponse + | GetVectorStoreFileDefaultResponse + | DeleteVectorStoreFileDefaultResponse + | CreateVectorStoreFileBatchDefaultResponse + | GetVectorStoreFileBatchDefaultResponse + | CancelVectorStoreFileBatchDefaultResponse + | ListVectorStoreFileBatchFilesDefaultResponse + | GetWorkspaceDefaultResponse + | ListConnectionsDefaultResponse + | GetConnectionDefaultResponse + | GetConnectionWithSecretsDefaultResponse + | GetAppInsightsDefaultResponse + | GetDefaultResponse + | UpdateDefaultResponse + | ListDefaultResponse + | GetScheduleDefaultResponse + | CreateOrReplaceScheduleDefaultResponse + | ListScheduleDefaultResponse + | DisableScheduleDefaultResponse { + const lroOriginal = response.headers["x-ms-original-url"]; + const url = new URL(lroOriginal ?? response.request.url); + const method = response.request.method; + let pathDetails = responseMap[`${method} ${url.pathname}`]; + if (!pathDetails) { + pathDetails = getParametrizedPathSuccess(method, url.pathname); + } + return !pathDetails.includes(response.status); +} + +function getParametrizedPathSuccess(method: string, path: string): string[] { + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(responseMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for ( + let i = candidateParts.length - 1, j = pathParts.length - 1; + i >= 1 && j >= 1; + i--, j-- + ) { + if ( + candidateParts[i]?.startsWith("{") && + candidateParts[i]?.indexOf("}") !== -1 + ) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp( + `${candidateParts[i]?.slice(start, end)}`, + ).test(pathParts[j] || ""); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/ai/ai-projects/src/generated/src/logger.ts b/sdk/ai/ai-projects/src/generated/src/logger.ts new file mode 100644 index 000000000000..ac271f422ccc --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("ai-projects"); diff --git a/sdk/ai/ai-projects/src/generated/src/models.ts b/sdk/ai/ai-projects/src/generated/src/models.ts new file mode 100644 index 000000000000..bbb5a48ded51 --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/models.ts @@ -0,0 +1,910 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** The request details to use when creating a new agent. */ +export interface CreateAgentOptions { + /** The ID of the model to use. */ + model: string; + /** The name of the new agent. */ + name?: string | null; + /** The description of the new agent. */ + description?: string | null; + /** The system instructions for the new agent to use. */ + instructions?: string | null; + /** The collection of tools to enable for the new agent. */ + tools?: Array; + /** + * A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` + * tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + */ + tool_resources?: ToolResources | null; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, + * while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. + * So 0.1 means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + top_p?: number | null; + /** The response format of the tool calls used by this agent. */ + response_format?: AgentsApiResponseFormatOption | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** An abstract representation of an input tool definition that an agent can use. */ +export interface ToolDefinitionParent { + type: string; +} + +/** The input definition information for a code interpreter tool as used to configure an agent. */ +export interface CodeInterpreterToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'code_interpreter'. */ + type: "code_interpreter"; +} + +/** The input definition information for a file search tool as used to configure an agent. */ +export interface FileSearchToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'file_search'. */ + type: "file_search"; + /** Options overrides for the file search tool. */ + file_search?: FileSearchToolDefinitionDetails; +} + +/** Options overrides for the file search tool. */ +export interface FileSearchToolDefinitionDetails { + /** + * The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive. + * + * Note that the file search tool may output fewer than `max_num_results` results. See the file search tool documentation for more information. + */ + max_num_results?: number; + ranking_options?: FileSearchRankingOptions; +} + +/** Ranking options for file search. */ +export interface FileSearchRankingOptions { + /** File search ranker. */ + ranker: string; + /** Ranker search threshold. */ + score_threshold: number; +} + +/** The input definition information for a function tool as used to configure an agent. */ +export interface FunctionToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'function'. */ + type: "function"; + /** The definition of the concrete function that the function tool should call. */ + function: FunctionDefinition; +} + +/** The input definition information for a function. */ +export interface FunctionDefinition { + /** The name of the function to be called. */ + name: string; + /** A description of what the function does, used by the model to choose when and how to call the function. */ + description?: string; + /** The parameters the functions accepts, described as a JSON Schema object. */ + parameters: unknown; +} + +/** The input definition information for a bing grounding search tool as used to configure an agent. */ +export interface BingGroundingToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'bing_grounding'. */ + type: "bing_grounding"; + /** The list of connections used by the bing grounding tool. */ + bing_grounding: ToolConnectionList; +} + +/** A set of connection resources currently used by either the `bing_grounding`, `microsoft_fabric`, or `sharepoint_grounding` tools. */ +export interface ToolConnectionList { + /** + * The connections attached to this tool. There can be a maximum of 1 connection + * resource attached to the tool. + */ + connections?: Array; +} + +/** A connection resource. */ +export interface ToolConnection { + /** A connection in a ToolConnectionList attached to this tool. */ + connection_id: string; +} + +/** The input definition information for a Microsoft Fabric tool as used to configure an agent. */ +export interface MicrosoftFabricToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'microsoft_fabric'. */ + type: "microsoft_fabric"; + /** The list of connections used by the Microsoft Fabric tool. */ + microsoft_fabric: ToolConnectionList; +} + +/** The input definition information for a sharepoint tool as used to configure an agent. */ +export interface SharepointToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'sharepoint_grounding'. */ + type: "sharepoint_grounding"; + /** The list of connections used by the SharePoint tool. */ + sharepoint_grounding: ToolConnectionList; +} + +/** The input definition information for an Azure AI search tool as used to configure an agent. */ +export interface AzureAISearchToolDefinition extends ToolDefinitionParent { + /** The object type, which is always 'azure_ai_search'. */ + type: "azure_ai_search"; +} + +/** + * A set of resources that are used by the agent's tools. The resources are specific to the type of + * tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` + * tool requires a list of vector store IDs. + */ +export interface ToolResources { + /** Resources to be used by the `code_interpreter tool` consisting of file IDs. */ + code_interpreter?: CodeInterpreterToolResource; + /** Resources to be used by the `file_search` tool consisting of vector store IDs. */ + file_search?: FileSearchToolResource; + /** Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */ + azure_ai_search?: AzureAISearchResource; +} + +/** A set of resources that are used by the `code_interpreter` tool. */ +export interface CodeInterpreterToolResource { + /** + * A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files + * associated with the tool. + */ + file_ids?: string[]; + /** The data sources to be used. This option is mutually exclusive with fileIds. */ + data_sources?: Array; +} + +/** + * The structure, containing Azure asset URI path and the asset type of the file used as a data source + * for the enterprise file search. + */ +export interface VectorStoreDataSource { + /** Asset URI. */ + uri: string; + /** The asset type * */ + type: VectorStoreDataSourceAssetType; +} + +/** A set of resources that are used by the `file_search` tool. */ +export interface FileSearchToolResource { + /** + * The ID of the vector store attached to this agent. There can be a maximum of 1 vector + * store attached to the agent. + */ + vector_store_ids?: string[]; + /** + * The list of vector store configuration objects from Azure. This list is limited to one + * element. The only element of this list contains + * the list of azure asset IDs used by the search tool. + */ + vector_stores?: Array; +} + +/** The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs. */ +export interface VectorStoreConfigurations { + /** Name */ + name: string; + /** Configurations */ + configuration: VectorStoreConfiguration; +} + +/** + * Vector storage configuration is the list of data sources, used when multiple + * files can be used for the enterprise file search. + */ +export interface VectorStoreConfiguration { + /** Data sources */ + data_sources: Array; +} + +/** A set of index resources used by the `azure_ai_search` tool. */ +export interface AzureAISearchResource { + /** + * The indices attached to this agent. There can be a maximum of 1 index + * resource attached to the agent. + */ + indexes?: Array; +} + +/** A Index resource. */ +export interface IndexResource { + /** An index connection id in an IndexResource attached to this agent. */ + index_connection_id: string; + /** The name of an index in an IndexResource attached to this agent. */ + index_name: string; +} + +/** + * An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run. + * If `text` the model can return text or any value needed. + */ +export interface AgentsApiResponseFormat { + /** + * Must be one of `text` or `json_object`. + * + * Possible values: "text", "json_object" + */ + type?: ApiResponseFormat; +} + +/** The request details to use when modifying an existing agent. */ +export interface UpdateAgentOptions { + /** The ID of the model to use. */ + model?: string; + /** The modified name for the agent to use. */ + name?: string | null; + /** The modified description for the agent to use. */ + description?: string | null; + /** The modified system instructions for the new agent to use. */ + instructions?: string | null; + /** The modified collection of tools to enable for the agent. */ + tools?: Array; + /** + * A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, + * the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + */ + tool_resources?: ToolResources; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, + * while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. + * So 0.1 means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + top_p?: number | null; + /** The response format of the tool calls used by this agent. */ + response_format?: AgentsApiResponseFormatOption | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** The details used to create a new agent thread. */ +export interface AgentThreadCreationOptions { + /** The initial messages to associate with the new thread. */ + messages?: Array; + /** + * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the + * type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires + * a list of vector store IDs. + */ + tool_resources?: ToolResources | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** A single message within an agent thread, as provided during that thread's creation for its initial state. */ +export interface ThreadMessageOptions { + /** + * The role of the entity that is creating the message. Allowed values include: + * - `user`: Indicates the message is sent by an actual user and should be used in most + * cases to represent user-generated messages. + * - `assistant`: Indicates the message is generated by the agent. Use this value to insert + * messages from the agent into the + * conversation. + * + * Possible values: "user", "assistant" + */ + role: MessageRole; + /** + * The textual content of the initial message. Currently, robust input including images and annotated text may only be provided via + * a separate call to the create message API. + */ + content: string; + /** A list of files attached to the message, and the tools they should be added to. */ + attachments?: Array | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** This describes to which tools a file has been attached. */ +export interface MessageAttachment { + /** The ID of the file to attach to the message. */ + file_id?: string; + /** Azure asset ID. */ + data_sources?: Array; + /** The tools to add to this file. */ + tools: MessageAttachmentToolDefinition[]; +} + +/** The details used to update an existing agent thread */ +export interface UpdateAgentThreadOptions { + /** + * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the + * type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires + * a list of vector store IDs + */ + tool_resources?: ToolResources | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** A single, existing message within an agent thread. */ +export interface ThreadMessage { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread.message'. */ + object: "thread.message"; + /** The Unix timestamp, in seconds, representing when this object was created. */ + created_at: number; + /** The ID of the thread that this message belongs to. */ + thread_id: string; + /** + * The status of the message. + * + * Possible values: "in_progress", "incomplete", "completed" + */ + status: MessageStatus; + /** On an incomplete message, details about why the message is incomplete. */ + incomplete_details: MessageIncompleteDetails | null; + /** The Unix timestamp (in seconds) for when the message was completed. */ + completed_at: number | null; + /** The Unix timestamp (in seconds) for when the message was marked as incomplete. */ + incomplete_at: number | null; + /** + * The role associated with the agent thread message. + * + * Possible values: "user", "assistant" + */ + role: MessageRole; + /** The list of content items associated with the agent thread message. */ + content: Array; + /** If applicable, the ID of the agent that authored this message. */ + assistant_id: string | null; + /** If applicable, the ID of the run associated with the authoring of this message. */ + run_id: string | null; + /** A list of files attached to the message, and the tools they were added to. */ + attachments: Array | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** Information providing additional detail about a message entering an incomplete status. */ +export interface MessageIncompleteDetails { + /** + * The provided reason describing why the message was marked as incomplete. + * + * Possible values: "content_filter", "max_tokens", "run_cancelled", "run_failed", "run_expired" + */ + reason: MessageIncompleteDetailsReason; +} + +/** An abstract representation of a single item of thread message content. */ +export interface MessageContentParent { + type: string; +} + +/** A representation of a textual item of thread message content. */ +export interface MessageTextContent extends MessageContentParent { + /** The object type, which is always 'text'. */ + type: "text"; + /** The text and associated annotations for this thread message content item. */ + text: MessageTextDetails; +} + +/** The text and associated annotations for a single item of agent thread message content. */ +export interface MessageTextDetails { + /** The text data. */ + value: string; + /** A list of annotations associated with this text. */ + annotations: Array; +} + +/** An abstract representation of an annotation to text thread message content. */ +export interface MessageTextAnnotationParent { + /** The textual content associated with this text annotation item. */ + text: string; + type: string; +} + +/** A citation within the message that points to a specific quote from a specific File associated with the agent or the message. Generated when the agent uses the 'file_search' tool to search files. */ +export interface MessageTextFileCitationAnnotation + extends MessageTextAnnotationParent { + /** The object type, which is always 'file_citation'. */ + type: "file_citation"; + /** + * A citation within the message that points to a specific quote from a specific file. + * Generated when the agent uses the "file_search" tool to search files. + */ + file_citation: MessageTextFileCitationDetails; + /** The first text index associated with this text annotation. */ + start_index?: number; + /** The last text index associated with this text annotation. */ + end_index?: number; +} + +/** A representation of a file-based text citation, as used in a file-based annotation of text thread message content. */ +export interface MessageTextFileCitationDetails { + /** The ID of the file associated with this citation. */ + file_id: string; + /** The specific quote cited in the associated file. */ + quote: string; +} + +/** A citation within the message that points to a file located at a specific path. */ +export interface MessageTextFilePathAnnotation + extends MessageTextAnnotationParent { + /** The object type, which is always 'file_path'. */ + type: "file_path"; + /** A URL for the file that's generated when the agent used the code_interpreter tool to generate a file. */ + file_path: MessageTextFilePathDetails; + /** The first text index associated with this text annotation. */ + start_index?: number; + /** The last text index associated with this text annotation. */ + end_index?: number; +} + +/** An encapsulation of an image file ID, as used by message image content. */ +export interface MessageTextFilePathDetails { + /** The ID of the specific file that the citation is from. */ + file_id: string; +} + +/** A representation of image file content in a thread message. */ +export interface MessageImageFileContent extends MessageContentParent { + /** The object type, which is always 'image_file'. */ + type: "image_file"; + /** The image file for this thread message content item. */ + image_file: MessageImageFileDetails; +} + +/** An image reference, as represented in thread message content. */ +export interface MessageImageFileDetails { + /** The ID for the file associated with this image. */ + file_id: string; +} + +/** The details used when creating a new run of an agent thread. */ +export interface CreateRunOptions { + /** The ID of the agent that should run the thread. */ + assistant_id: string; + /** The overridden model name that the agent should use to run the thread. */ + model?: string | null; + /** The overridden system instructions that the agent should use to run the thread. */ + instructions?: string | null; + /** + * Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior + * on a per-run basis without overriding other instructions. + */ + additional_instructions?: string | null; + /** Adds additional messages to the thread before creating the run. */ + additional_messages?: Array | null; + /** The overridden list of enabled tools that the agent should use to run the thread. */ + tools?: Array | null; + /** + * If `true`, returns a stream of events that happen during the Run as server-sent events, + * terminating when the Run enters a terminal state with a `data: [DONE]` message. + */ + stream?: boolean; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output + * more random, while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model + * considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens + * comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + top_p?: number | null; + /** + * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only + * the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, + * the run will end with status `incomplete`. See `incomplete_details` for more info. + */ + max_prompt_tokens?: number | null; + /** + * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort + * to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of + * completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + */ + max_completion_tokens?: number | null; + /** The strategy to use for dropping messages as the context windows moves forward. */ + truncation_strategy?: TruncationObject | null; + /** Controls whether or not and which tool is called by the model. */ + tool_choice?: AgentsApiToolChoiceOption | null; + /** Specifies the format that the model must output. */ + response_format?: AgentsApiResponseFormatOption | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** + * Controls for how a thread will be truncated prior to the run. Use this to control the initial + * context window of the run. + */ +export interface TruncationObject { + /** + * The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will + * be truncated to the `lastMessages` count most recent messages in the thread. When set to `auto`, messages in the middle of the thread + * will be dropped to fit the context length of the model, `max_prompt_tokens`. + * + * Possible values: "auto", "last_messages" + */ + type: TruncationStrategy; + /** The number of most recent messages from the thread when constructing the context for the run. */ + last_messages?: number | null; +} + +/** Specifies a tool the model should use. Use to force the model to call a specific tool. */ +export interface AgentsNamedToolChoice { + /** + * the type of tool. If type is `function`, the function name must be set. + * + * Possible values: "function", "code_interpreter", "file_search", "bing_grounding", "microsoft_fabric", "sharepoint_grounding", "azure_ai_search" + */ + type: AgentsNamedToolChoiceType; + /** The name of the function to call */ + function?: FunctionName; +} + +/** The function name that will be used, if using the `function` tool */ +export interface FunctionName { + /** The name of the function to call */ + name: string; +} + +/** + * Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool. + * For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of + * vector store IDs. + */ +export interface UpdateToolResourcesOptions { + /** + * Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files + * associated with the tool. + */ + code_interpreter?: UpdateCodeInterpreterToolResourceOptions; + /** Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. */ + file_search?: UpdateFileSearchToolResourceOptions; + /** Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */ + azure_ai_search?: AzureAISearchResource; +} + +/** Request object to update `code_interpreted` tool resources. */ +export interface UpdateCodeInterpreterToolResourceOptions { + /** A list of file IDs to override the current list of the agent. */ + file_ids?: string[]; +} + +/** Request object to update `file_search` tool resources. */ +export interface UpdateFileSearchToolResourceOptions { + /** A list of vector store IDs to override the current list of the agent. */ + vector_store_ids?: string[]; +} + +/** The data provided during a tool outputs submission to resolve pending tool calls and allow the model to continue. */ +export interface ToolOutput { + /** The ID of the tool call being resolved, as provided in the tool calls of a required action from a run. */ + tool_call_id?: string; + /** The output from the tool to be submitted. */ + output?: string; +} + +/** The details used when creating and immediately running a new agent thread. */ +export interface CreateAndRunThreadOptions { + /** The ID of the agent for which the thread should be created. */ + assistant_id: string; + /** The details used to create the new thread. If no thread is provided, an empty one will be created. */ + thread?: AgentThreadCreationOptions; + /** The overridden model that the agent should use to run the thread. */ + model?: string | null; + /** The overridden system instructions the agent should use to run the thread. */ + instructions?: string | null; + /** The overridden list of enabled tools the agent should use to run the thread. */ + tools?: Array | null; + /** Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis */ + tool_resources?: UpdateToolResourcesOptions | null; + /** + * If `true`, returns a stream of events that happen during the Run as server-sent events, + * terminating when the Run enters a terminal state with a `data: [DONE]` message. + */ + stream?: boolean; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output + * more random, while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model + * considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens + * comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + top_p?: number | null; + /** + * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only + * the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, + * the run will end with status `incomplete`. See `incomplete_details` for more info. + */ + max_prompt_tokens?: number | null; + /** + * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only + * the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens + * specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + */ + max_completion_tokens?: number | null; + /** The strategy to use for dropping messages as the context windows moves forward. */ + truncation_strategy?: TruncationObject | null; + /** Controls whether or not and which tool is called by the model. */ + tool_choice?: AgentsApiToolChoiceOption | null; + /** Specifies the format that the model must output. */ + response_format?: AgentsApiResponseFormatOption | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** The expiration policy for a vector store. */ +export interface VectorStoreExpirationPolicy { + /** + * Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`. + * + * Possible values: "last_active_at" + */ + anchor: VectorStoreExpirationPolicyAnchor; + /** The anchor timestamp after which the expiration policy applies. */ + days: number; +} + +/** Request object for creating a vector store. */ +export interface VectorStoreOptions { + /** A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files. */ + file_ids?: string[]; + /** The name of the vector store. */ + name?: string; + /** The vector store configuration, used when vector store is created from Azure asset URIs. */ + configuration?: VectorStoreConfiguration; + /** Details on when this vector store expires */ + expires_after?: VectorStoreExpirationPolicy; + /** The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty. */ + chunking_strategy?: VectorStoreChunkingStrategyRequest; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** An abstract representation of a vector store chunking strategy configuration. */ +export interface VectorStoreChunkingStrategyRequestParent { + type: VectorStoreChunkingStrategyRequestType; +} + +/** The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400. */ +export interface VectorStoreAutoChunkingStrategyRequest + extends VectorStoreChunkingStrategyRequestParent { + /** The object type, which is always 'auto'. */ + type: "auto"; +} + +/** A statically configured chunking strategy. */ +export interface VectorStoreStaticChunkingStrategyRequest + extends VectorStoreChunkingStrategyRequestParent { + /** The object type, which is always 'static'. */ + type: "static"; + /** The options for the static chunking strategy. */ + static: VectorStoreStaticChunkingStrategyOptions; +} + +/** Options to configure a vector store static chunking strategy. */ +export interface VectorStoreStaticChunkingStrategyOptions { + /** The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. */ + max_chunk_size_tokens: number; + /** + * The number of tokens that overlap between chunks. The default value is 400. + * Note that the overlap must not exceed half of max_chunk_size_tokens. + */ + chunk_overlap_tokens: number; +} + +/** Request object for updating a vector store. */ +export interface VectorStoreUpdateOptions { + /** The name of the vector store. */ + name?: string | null; + /** Details on when this vector store expires */ + expires_after?: VectorStoreExpirationPolicy | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata?: Record | null; +} + +/** Evaluation Definition */ +export interface Evaluation { + /** Data for evaluation. */ + data: InputData; + /** Display Name for evaluation. It helps to find evaluation easily in AI Studio. It does not need to be unique. */ + displayName?: string; + /** Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. */ + description?: string; + /** Evaluation's tags. Unlike properties, tags are fully mutable. */ + tags?: Record; + /** Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. */ + properties?: Record; + /** Evaluators to be used for the evaluation. */ + evaluators: Record; +} + +/** Abstract data class for input data configuration. */ +export interface InputDataParent { + type: string; +} + +/** Data Source for Application Insights. */ +export interface ApplicationInsightsConfiguration extends InputDataParent { + /** LogAnalytic Workspace resourceID associated with ApplicationInsights */ + resourceId: string; + /** Query to fetch the data. */ + query: string; + /** Service name. */ + serviceName: string; + /** Connection String to connect to ApplicationInsights. */ + connectionString?: string; +} + +/** Dataset as source for evaluation. */ +export interface Dataset extends InputDataParent { + /** Evaluation input data */ + id: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData {} + +/** Evaluator Configuration */ +export interface EvaluatorConfiguration { + /** Identifier of the evaluator. */ + id: string; + /** Initialization parameters of the evaluator. */ + initParams?: Record; + /** Data parameters of the evaluator. */ + dataMapping?: Record; +} + +/** Evaluation Schedule Definition */ +export interface EvaluationSchedule { + /** Data for evaluation. */ + data: ApplicationInsightsConfiguration; + /** Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. */ + description?: string; + /** Evaluation's tags. Unlike properties, tags are fully mutable. */ + tags?: Record; + /** Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. */ + properties?: Record; + /** Evaluators to be used for the evaluation. */ + evaluators: Record; + /** Trigger for the evaluation. */ + trigger: Trigger; +} + +/** Abstract data class for input data configuration. */ +export interface TriggerParent { + type: string; +} + +/** Recurrence Trigger Definition */ +export interface RecurrenceTrigger extends TriggerParent { + /** + * The frequency to trigger schedule. + * + * Possible values: "Month", "Week", "Day", "Hour", "Minute" + */ + frequency: Frequency; + /** Specifies schedule interval in conjunction with frequency */ + interval: number; + /** The recurrence schedule. */ + schedule?: RecurrenceSchedule; +} + +/** RecurrenceSchedule Definition */ +export interface RecurrenceSchedule { + /** List of hours for the schedule. */ + hours: number[]; + /** List of minutes for the schedule. */ + minutes: number[]; + /** List of days for the schedule. */ + weekDays?: WeekDays[]; + /** List of month days for the schedule */ + monthDays?: number[]; +} + +/** Cron Trigger Definition */ +export interface CronTrigger extends TriggerParent { + /** Cron expression for the trigger. */ + expression: string; +} + +/** An abstract representation of an input tool definition that an agent can use. */ +export type ToolDefinition = + | ToolDefinitionParent + | CodeInterpreterToolDefinition + | FileSearchToolDefinition + | FunctionToolDefinition + | BingGroundingToolDefinition + | MicrosoftFabricToolDefinition + | SharepointToolDefinition + | AzureAISearchToolDefinition; +/** An abstract representation of a single item of thread message content. */ +export type MessageContent = + | MessageContentParent + | MessageTextContent + | MessageImageFileContent; +/** An abstract representation of an annotation to text thread message content. */ +export type MessageTextAnnotation = + | MessageTextAnnotationParent + | MessageTextFileCitationAnnotation + | MessageTextFilePathAnnotation; +/** An abstract representation of a vector store chunking strategy configuration. */ +export type VectorStoreChunkingStrategyRequest = + | VectorStoreChunkingStrategyRequestParent + | VectorStoreAutoChunkingStrategyRequest + | VectorStoreStaticChunkingStrategyRequest; +/** Abstract data class for input data configuration. */ +export type InputData = + | InputDataParent + | ApplicationInsightsConfiguration + | Dataset; +/** Abstract data class for input data configuration. */ +export type Trigger = TriggerParent | RecurrenceTrigger | CronTrigger; +/** Alias for VectorStoreDataSourceAssetType */ +export type VectorStoreDataSourceAssetType = "uri_asset" | "id_asset"; +/** Alias for AgentsApiResponseFormatMode */ +export type AgentsApiResponseFormatMode = string; +/** Alias for ApiResponseFormat */ +export type ApiResponseFormat = string; +/** Alias for AgentsApiResponseFormatOption */ +export type AgentsApiResponseFormatOption = + | string + | AgentsApiResponseFormatMode + | AgentsApiResponseFormat; +/** Alias for ListSortOrder */ +export type ListSortOrder = "asc" | "desc"; +/** Alias for MessageRole */ +export type MessageRole = string; +/** Alias for MessageAttachmentToolDefinition */ +export type MessageAttachmentToolDefinition = + | CodeInterpreterToolDefinition + | FileSearchToolDefinition; +/** Alias for MessageStatus */ +export type MessageStatus = string; +/** Alias for MessageIncompleteDetailsReason */ +export type MessageIncompleteDetailsReason = string; +/** Alias for TruncationStrategy */ +export type TruncationStrategy = string; +/** Alias for AgentsApiToolChoiceOptionMode */ +export type AgentsApiToolChoiceOptionMode = string; +/** Alias for AgentsNamedToolChoiceType */ +export type AgentsNamedToolChoiceType = string; +/** Alias for AgentsApiToolChoiceOption */ +export type AgentsApiToolChoiceOption = + | string + | AgentsApiToolChoiceOptionMode + | AgentsNamedToolChoice; +/** Alias for FilePurpose */ +export type FilePurpose = string; +/** Alias for VectorStoreExpirationPolicyAnchor */ +export type VectorStoreExpirationPolicyAnchor = string; +/** Alias for VectorStoreChunkingStrategyRequestType */ +export type VectorStoreChunkingStrategyRequestType = string; +/** Alias for VectorStoreFileStatusFilter */ +export type VectorStoreFileStatusFilter = string; +/** The Type (or category) of the connection */ +export type ConnectionType = + | "AzureOpenAI" + | "Serverless" + | "AzureBlob" + | "AIServices" + | "CognitiveSearch"; +/** Alias for Frequency */ +export type Frequency = string; +/** Alias for WeekDays */ +export type WeekDays = string; diff --git a/sdk/ai/ai-projects/src/generated/src/outputModels.ts b/sdk/ai/ai-projects/src/generated/src/outputModels.ts new file mode 100644 index 000000000000..bff61aa85e67 --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/outputModels.ts @@ -0,0 +1,1527 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Paged } from "@azure/core-paging"; + +/** An abstract representation of an input tool definition that an agent can use. */ +export interface ToolDefinitionOutputParent { + type: string; +} + +/** The input definition information for a code interpreter tool as used to configure an agent. */ +export interface CodeInterpreterToolDefinitionOutput + extends ToolDefinitionOutputParent { + /** The object type, which is always 'code_interpreter'. */ + type: "code_interpreter"; +} + +/** The input definition information for a file search tool as used to configure an agent. */ +export interface FileSearchToolDefinitionOutput + extends ToolDefinitionOutputParent { + /** The object type, which is always 'file_search'. */ + type: "file_search"; + /** Options overrides for the file search tool. */ + file_search?: FileSearchToolDefinitionDetailsOutput; +} + +/** Options overrides for the file search tool. */ +export interface FileSearchToolDefinitionDetailsOutput { + /** + * The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive. + * + * Note that the file search tool may output fewer than `max_num_results` results. See the file search tool documentation for more information. + */ + max_num_results?: number; + ranking_options?: FileSearchRankingOptionsOutput; +} + +/** Ranking options for file search. */ +export interface FileSearchRankingOptionsOutput { + /** File search ranker. */ + ranker: string; + /** Ranker search threshold. */ + score_threshold: number; +} + +/** The input definition information for a function tool as used to configure an agent. */ +export interface FunctionToolDefinitionOutput + extends ToolDefinitionOutputParent { + /** The object type, which is always 'function'. */ + type: "function"; + /** The definition of the concrete function that the function tool should call. */ + function: FunctionDefinitionOutput; +} + +/** The input definition information for a function. */ +export interface FunctionDefinitionOutput { + /** The name of the function to be called. */ + name: string; + /** A description of what the function does, used by the model to choose when and how to call the function. */ + description?: string; + /** The parameters the functions accepts, described as a JSON Schema object. */ + parameters: any; +} + +/** The input definition information for a bing grounding search tool as used to configure an agent. */ +export interface BingGroundingToolDefinitionOutput + extends ToolDefinitionOutputParent { + /** The object type, which is always 'bing_grounding'. */ + type: "bing_grounding"; + /** The list of connections used by the bing grounding tool. */ + bing_grounding: ToolConnectionListOutput; +} + +/** A set of connection resources currently used by either the `bing_grounding`, `microsoft_fabric`, or `sharepoint_grounding` tools. */ +export interface ToolConnectionListOutput { + /** + * The connections attached to this tool. There can be a maximum of 1 connection + * resource attached to the tool. + */ + connections?: Array; +} + +/** A connection resource. */ +export interface ToolConnectionOutput { + /** A connection in a ToolConnectionList attached to this tool. */ + connection_id: string; +} + +/** The input definition information for a Microsoft Fabric tool as used to configure an agent. */ +export interface MicrosoftFabricToolDefinitionOutput + extends ToolDefinitionOutputParent { + /** The object type, which is always 'microsoft_fabric'. */ + type: "microsoft_fabric"; + /** The list of connections used by the Microsoft Fabric tool. */ + microsoft_fabric: ToolConnectionListOutput; +} + +/** The input definition information for a sharepoint tool as used to configure an agent. */ +export interface SharepointToolDefinitionOutput + extends ToolDefinitionOutputParent { + /** The object type, which is always 'sharepoint_grounding'. */ + type: "sharepoint_grounding"; + /** The list of connections used by the SharePoint tool. */ + sharepoint_grounding: ToolConnectionListOutput; +} + +/** The input definition information for an Azure AI search tool as used to configure an agent. */ +export interface AzureAISearchToolDefinitionOutput + extends ToolDefinitionOutputParent { + /** The object type, which is always 'azure_ai_search'. */ + type: "azure_ai_search"; +} + +/** + * A set of resources that are used by the agent's tools. The resources are specific to the type of + * tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` + * tool requires a list of vector store IDs. + */ +export interface ToolResourcesOutput { + /** Resources to be used by the `code_interpreter tool` consisting of file IDs. */ + code_interpreter?: CodeInterpreterToolResourceOutput; + /** Resources to be used by the `file_search` tool consisting of vector store IDs. */ + file_search?: FileSearchToolResourceOutput; + /** Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */ + azure_ai_search?: AzureAISearchResourceOutput; +} + +/** A set of resources that are used by the `code_interpreter` tool. */ +export interface CodeInterpreterToolResourceOutput { + /** + * A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files + * associated with the tool. + */ + file_ids?: string[]; + /** The data sources to be used. This option is mutually exclusive with fileIds. */ + data_sources?: Array; +} + +/** + * The structure, containing Azure asset URI path and the asset type of the file used as a data source + * for the enterprise file search. + */ +export interface VectorStoreDataSourceOutput { + /** Asset URI. */ + uri: string; + /** The asset type * */ + type: VectorStoreDataSourceAssetTypeOutput; +} + +/** A set of resources that are used by the `file_search` tool. */ +export interface FileSearchToolResourceOutput { + /** + * The ID of the vector store attached to this agent. There can be a maximum of 1 vector + * store attached to the agent. + */ + vector_store_ids?: string[]; + /** + * The list of vector store configuration objects from Azure. This list is limited to one + * element. The only element of this list contains + * the list of azure asset IDs used by the search tool. + */ + vector_stores?: Array; +} + +/** The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs. */ +export interface VectorStoreConfigurationsOutput { + /** Name */ + name: string; + /** Configurations */ + configuration: VectorStoreConfigurationOutput; +} + +/** + * Vector storage configuration is the list of data sources, used when multiple + * files can be used for the enterprise file search. + */ +export interface VectorStoreConfigurationOutput { + /** Data sources */ + data_sources: Array; +} + +/** A set of index resources used by the `azure_ai_search` tool. */ +export interface AzureAISearchResourceOutput { + /** + * The indices attached to this agent. There can be a maximum of 1 index + * resource attached to the agent. + */ + indexes?: Array; +} + +/** A Index resource. */ +export interface IndexResourceOutput { + /** An index connection id in an IndexResource attached to this agent. */ + index_connection_id: string; + /** The name of an index in an IndexResource attached to this agent. */ + index_name: string; +} + +/** + * An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run. + * If `text` the model can return text or any value needed. + */ +export interface AgentsApiResponseFormatOutput { + /** + * Must be one of `text` or `json_object`. + * + * Possible values: "text", "json_object" + */ + type?: ApiResponseFormatOutput; +} + +/** Represents an agent that can call the model and use tools. */ +export interface AgentOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always assistant. */ + object: "assistant"; + /** The Unix timestamp, in seconds, representing when this object was created. */ + created_at: number; + /** The name of the agent. */ + name: string | null; + /** The description of the agent. */ + description: string | null; + /** The ID of the model to use. */ + model: string; + /** The system instructions for the agent to use. */ + instructions: string | null; + /** The collection of tools enabled for the agent. */ + tools: Array; + /** + * A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` + * tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + */ + tool_resources: ToolResourcesOutput | null; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, + * while lower values like 0.2 will make it more focused and deterministic. + */ + temperature: number | null; + /** + * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. + * So 0.1 means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or temperature but not both. + */ + top_p: number | null; + /** The response format of the tool calls used by this agent. */ + response_format?: AgentsApiResponseFormatOptionOutput | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfAgentOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + first_id: string; + /** The last ID represented in this list. */ + last_id: string; + /** A value indicating whether there are additional values available not captured in this list. */ + has_more: boolean; +} + +/** The status of an agent deletion operation. */ +export interface AgentDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'assistant.deleted'. */ + object: "assistant.deleted"; +} + +/** This describes to which tools a file has been attached. */ +export interface MessageAttachmentOutput { + /** The ID of the file to attach to the message. */ + file_id?: string; + /** Azure asset ID. */ + data_sources?: Array; + /** The tools to add to this file. */ + tools: MessageAttachmentToolDefinitionOutput[]; +} + +/** Information about a single thread associated with an agent. */ +export interface AgentThreadOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread'. */ + object: "thread"; + /** The Unix timestamp, in seconds, representing when this object was created. */ + created_at: number; + /** + * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type + * of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list + * of vector store IDs. + */ + tool_resources: ToolResourcesOutput | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** The status of a thread deletion operation. */ +export interface ThreadDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'thread.deleted'. */ + object: "thread.deleted"; +} + +/** A single, existing message within an agent thread. */ +export interface ThreadMessageOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread.message'. */ + object: "thread.message"; + /** The Unix timestamp, in seconds, representing when this object was created. */ + created_at: number; + /** The ID of the thread that this message belongs to. */ + thread_id: string; + /** + * The status of the message. + * + * Possible values: "in_progress", "incomplete", "completed" + */ + status: MessageStatusOutput; + /** On an incomplete message, details about why the message is incomplete. */ + incomplete_details: MessageIncompleteDetailsOutput | null; + /** The Unix timestamp (in seconds) for when the message was completed. */ + completed_at: number | null; + /** The Unix timestamp (in seconds) for when the message was marked as incomplete. */ + incomplete_at: number | null; + /** + * The role associated with the agent thread message. + * + * Possible values: "user", "assistant" + */ + role: MessageRoleOutput; + /** The list of content items associated with the agent thread message. */ + content: Array; + /** If applicable, the ID of the agent that authored this message. */ + assistant_id: string | null; + /** If applicable, the ID of the run associated with the authoring of this message. */ + run_id: string | null; + /** A list of files attached to the message, and the tools they were added to. */ + attachments: Array | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** Information providing additional detail about a message entering an incomplete status. */ +export interface MessageIncompleteDetailsOutput { + /** + * The provided reason describing why the message was marked as incomplete. + * + * Possible values: "content_filter", "max_tokens", "run_cancelled", "run_failed", "run_expired" + */ + reason: MessageIncompleteDetailsReasonOutput; +} + +/** An abstract representation of a single item of thread message content. */ +export interface MessageContentOutputParent { + type: string; +} + +/** A representation of a textual item of thread message content. */ +export interface MessageTextContentOutput extends MessageContentOutputParent { + /** The object type, which is always 'text'. */ + type: "text"; + /** The text and associated annotations for this thread message content item. */ + text: MessageTextDetailsOutput; +} + +/** The text and associated annotations for a single item of agent thread message content. */ +export interface MessageTextDetailsOutput { + /** The text data. */ + value: string; + /** A list of annotations associated with this text. */ + annotations: Array; +} + +/** An abstract representation of an annotation to text thread message content. */ +export interface MessageTextAnnotationOutputParent { + /** The textual content associated with this text annotation item. */ + text: string; + type: string; +} + +/** A citation within the message that points to a specific quote from a specific File associated with the agent or the message. Generated when the agent uses the 'file_search' tool to search files. */ +export interface MessageTextFileCitationAnnotationOutput + extends MessageTextAnnotationOutputParent { + /** The object type, which is always 'file_citation'. */ + type: "file_citation"; + /** + * A citation within the message that points to a specific quote from a specific file. + * Generated when the agent uses the "file_search" tool to search files. + */ + file_citation: MessageTextFileCitationDetailsOutput; + /** The first text index associated with this text annotation. */ + start_index?: number; + /** The last text index associated with this text annotation. */ + end_index?: number; +} + +/** A representation of a file-based text citation, as used in a file-based annotation of text thread message content. */ +export interface MessageTextFileCitationDetailsOutput { + /** The ID of the file associated with this citation. */ + file_id: string; + /** The specific quote cited in the associated file. */ + quote: string; +} + +/** A citation within the message that points to a file located at a specific path. */ +export interface MessageTextFilePathAnnotationOutput + extends MessageTextAnnotationOutputParent { + /** The object type, which is always 'file_path'. */ + type: "file_path"; + /** A URL for the file that's generated when the agent used the code_interpreter tool to generate a file. */ + file_path: MessageTextFilePathDetailsOutput; + /** The first text index associated with this text annotation. */ + start_index?: number; + /** The last text index associated with this text annotation. */ + end_index?: number; +} + +/** An encapsulation of an image file ID, as used by message image content. */ +export interface MessageTextFilePathDetailsOutput { + /** The ID of the specific file that the citation is from. */ + file_id: string; +} + +/** A representation of image file content in a thread message. */ +export interface MessageImageFileContentOutput + extends MessageContentOutputParent { + /** The object type, which is always 'image_file'. */ + type: "image_file"; + /** The image file for this thread message content item. */ + image_file: MessageImageFileDetailsOutput; +} + +/** An image reference, as represented in thread message content. */ +export interface MessageImageFileDetailsOutput { + /** The ID for the file associated with this image. */ + file_id: string; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfThreadMessageOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + first_id: string; + /** The last ID represented in this list. */ + last_id: string; + /** A value indicating whether there are additional values available not captured in this list. */ + has_more: boolean; +} + +/** + * Controls for how a thread will be truncated prior to the run. Use this to control the initial + * context window of the run. + */ +export interface TruncationObjectOutput { + /** + * The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will + * be truncated to the `lastMessages` count most recent messages in the thread. When set to `auto`, messages in the middle of the thread + * will be dropped to fit the context length of the model, `max_prompt_tokens`. + * + * Possible values: "auto", "last_messages" + */ + type: TruncationStrategyOutput; + /** The number of most recent messages from the thread when constructing the context for the run. */ + last_messages?: number | null; +} + +/** Specifies a tool the model should use. Use to force the model to call a specific tool. */ +export interface AgentsNamedToolChoiceOutput { + /** + * the type of tool. If type is `function`, the function name must be set. + * + * Possible values: "function", "code_interpreter", "file_search", "bing_grounding", "microsoft_fabric", "sharepoint_grounding", "azure_ai_search" + */ + type: AgentsNamedToolChoiceTypeOutput; + /** The name of the function to call */ + function?: FunctionNameOutput; +} + +/** The function name that will be used, if using the `function` tool */ +export interface FunctionNameOutput { + /** The name of the function to call */ + name: string; +} + +/** Data representing a single evaluation run of an agent thread. */ +export interface ThreadRunOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread.run'. */ + object: "thread.run"; + /** The ID of the thread associated with this run. */ + thread_id: string; + /** The ID of the agent associated with the thread this run was performed against. */ + assistant_id: string; + /** + * The status of the agent thread run. + * + * Possible values: "queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "expired" + */ + status: RunStatusOutput; + /** The details of the action required for the agent thread run to continue. */ + required_action?: RequiredActionOutput | null; + /** The last error, if any, encountered by this agent thread run. */ + last_error: RunErrorOutput | null; + /** The ID of the model to use. */ + model: string; + /** The overridden system instructions used for this agent thread run. */ + instructions: string; + /** The overridden enabled tools used for this agent thread run. */ + tools: Array; + /** The Unix timestamp, in seconds, representing when this object was created. */ + created_at: number; + /** The Unix timestamp, in seconds, representing when this item expires. */ + expires_at: number | null; + /** The Unix timestamp, in seconds, representing when this item was started. */ + started_at: number | null; + /** The Unix timestamp, in seconds, representing when this completed. */ + completed_at: number | null; + /** The Unix timestamp, in seconds, representing when this was cancelled. */ + cancelled_at: number | null; + /** The Unix timestamp, in seconds, representing when this failed. */ + failed_at: number | null; + /** Details on why the run is incomplete. Will be `null` if the run is not incomplete. */ + incomplete_details: IncompleteRunDetailsOutput | null; + /** Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). */ + usage: RunCompletionUsageOutput | null; + /** The sampling temperature used for this run. If not set, defaults to 1. */ + temperature?: number | null; + /** The nucleus sampling value used for this run. If not set, defaults to 1. */ + top_p?: number | null; + /** The maximum number of prompt tokens specified to have been used over the course of the run. */ + max_prompt_tokens: number | null; + /** The maximum number of completion tokens specified to have been used over the course of the run. */ + max_completion_tokens: number | null; + /** The strategy to use for dropping messages as the context windows moves forward. */ + truncation_strategy: TruncationObjectOutput | null; + /** Controls whether or not and which tool is called by the model. */ + tool_choice: AgentsApiToolChoiceOptionOutput | null; + /** The response format of the tool calls used in this run. */ + response_format: AgentsApiResponseFormatOptionOutput | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; + /** Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis */ + tool_resources?: UpdateToolResourcesOptionsOutput | null; + /** Determines if tools can be executed in parallel within the run. */ + parallelToolCalls?: boolean; +} + +/** An abstract representation of a required action for an agent thread run to continue. */ +export interface RequiredActionOutputParent { + type: string; +} + +/** The details for required tool calls that must be submitted for an agent thread run to continue. */ +export interface SubmitToolOutputsActionOutput + extends RequiredActionOutputParent { + /** The object type, which is always 'submit_tool_outputs'. */ + type: "submit_tool_outputs"; + /** The details describing tools that should be called to submit tool outputs. */ + submit_tool_outputs: SubmitToolOutputsDetailsOutput; +} + +/** The details describing tools that should be called to submit tool outputs. */ +export interface SubmitToolOutputsDetailsOutput { + /** The list of tool calls that must be resolved for the agent thread run to continue. */ + tool_calls: Array; +} + +/** An abstract representation a a tool invocation needed by the model to continue a run. */ +export interface RequiredToolCallOutputParent { + /** The ID of the tool call. This ID must be referenced when submitting tool outputs. */ + id: string; + type: string; +} + +/** A representation of a requested call to a function tool, needed by the model to continue evaluation of a run. */ +export interface RequiredFunctionToolCallOutput + extends RequiredToolCallOutputParent { + /** The object type of the required tool call. Always 'function' for function tools. */ + type: "function"; + /** Detailed information about the function to be executed by the tool that includes name and arguments. */ + function: RequiredFunctionToolCallDetailsOutput; +} + +/** The detailed information for a function invocation, as provided by a required action invoking a function tool, that includes the name of and arguments to the function. */ +export interface RequiredFunctionToolCallDetailsOutput { + /** The name of the function. */ + name: string; + /** The arguments to use when invoking the named function, as provided by the model. Arguments are presented as a JSON document that should be validated and parsed for evaluation. */ + arguments: string; +} + +/** The details of an error as encountered by an agent thread run. */ +export interface RunErrorOutput { + /** The status for the error. */ + code: string; + /** The human-readable text associated with the error. */ + message: string; +} + +/** Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). */ +export interface RunCompletionUsageOutput { + /** Number of completion tokens used over the course of the run. */ + completion_tokens: number; + /** Number of prompt tokens used over the course of the run. */ + prompt_tokens: number; + /** Total number of tokens used (prompt + completion). */ + total_tokens: number; +} + +/** + * Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool. + * For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of + * vector store IDs. + */ +export interface UpdateToolResourcesOptionsOutput { + /** + * Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files + * associated with the tool. + */ + code_interpreter?: UpdateCodeInterpreterToolResourceOptionsOutput; + /** Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. */ + file_search?: UpdateFileSearchToolResourceOptionsOutput; + /** Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */ + azure_ai_search?: AzureAISearchResourceOutput; +} + +/** Request object to update `code_interpreted` tool resources. */ +export interface UpdateCodeInterpreterToolResourceOptionsOutput { + /** A list of file IDs to override the current list of the agent. */ + file_ids?: string[]; +} + +/** Request object to update `file_search` tool resources. */ +export interface UpdateFileSearchToolResourceOptionsOutput { + /** A list of vector store IDs to override the current list of the agent. */ + vector_store_ids?: string[]; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfThreadRunOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + first_id: string; + /** The last ID represented in this list. */ + last_id: string; + /** A value indicating whether there are additional values available not captured in this list. */ + has_more: boolean; +} + +/** Detailed information about a single step of an agent thread run. */ +export interface RunStepOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always 'thread.run.step'. */ + object: "thread.run.step"; + /** + * The type of run step, which can be either message_creation or tool_calls. + * + * Possible values: "message_creation", "tool_calls" + */ + type: RunStepTypeOutput; + /** The ID of the agent associated with the run step. */ + assistant_id: string; + /** The ID of the thread that was run. */ + thread_id: string; + /** The ID of the run that this run step is a part of. */ + run_id: string; + /** + * The status of this run step. + * + * Possible values: "in_progress", "cancelled", "failed", "completed", "expired" + */ + status: RunStepStatusOutput; + /** The details for this run step. */ + step_details: RunStepDetailsOutput; + /** If applicable, information about the last error encountered by this run step. */ + last_error: RunStepErrorOutput | null; + /** The Unix timestamp, in seconds, representing when this object was created. */ + created_at: number; + /** The Unix timestamp, in seconds, representing when this item expired. */ + expired_at: number | null; + /** The Unix timestamp, in seconds, representing when this completed. */ + completed_at: number | null; + /** The Unix timestamp, in seconds, representing when this was cancelled. */ + cancelled_at: number | null; + /** The Unix timestamp, in seconds, representing when this failed. */ + failed_at: number | null; + /** Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. */ + usage?: RunStepCompletionUsageOutput | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** An abstract representation of the details for a run step. */ +export interface RunStepDetailsOutputParent { + type: RunStepTypeOutput; +} + +/** The detailed information associated with a message creation run step. */ +export interface RunStepMessageCreationDetailsOutput + extends RunStepDetailsOutputParent { + /** The object type, which is always 'message_creation'. */ + type: "message_creation"; + /** Information about the message creation associated with this run step. */ + message_creation: RunStepMessageCreationReferenceOutput; +} + +/** The details of a message created as a part of a run step. */ +export interface RunStepMessageCreationReferenceOutput { + /** The ID of the message created by this run step. */ + message_id: string; +} + +/** The detailed information associated with a run step calling tools. */ +export interface RunStepToolCallDetailsOutput + extends RunStepDetailsOutputParent { + /** The object type, which is always 'tool_calls'. */ + type: "tool_calls"; + /** A list of tool call details for this run step. */ + tool_calls: Array; +} + +/** An abstract representation of a detailed tool call as recorded within a run step for an existing run. */ +export interface RunStepToolCallOutputParent { + /** The ID of the tool call. This ID must be referenced when you submit tool outputs. */ + id: string; + type: string; +} + +/** + * A record of a call to a code interpreter tool, issued by the model in evaluation of a defined tool, that + * represents inputs and outputs consumed and emitted by the code interpreter. + */ +export interface RunStepCodeInterpreterToolCallOutput + extends RunStepToolCallOutputParent { + /** The object type, which is always 'code_interpreter'. */ + type: "code_interpreter"; + /** The details of the tool call to the code interpreter tool. */ + code_interpreter: RunStepCodeInterpreterToolCallDetailsOutput; +} + +/** The detailed information about a code interpreter invocation by the model. */ +export interface RunStepCodeInterpreterToolCallDetailsOutput { + /** The input provided by the model to the code interpreter tool. */ + input: string; + /** The outputs produced by the code interpreter tool back to the model in response to the tool call. */ + outputs: Array; +} + +/** An abstract representation of an emitted output from a code interpreter tool. */ +export interface RunStepCodeInterpreterToolCallOutputOutputParent { + type: string; +} + +/** A representation of a log output emitted by a code interpreter tool in response to a tool call by the model. */ +export interface RunStepCodeInterpreterLogOutputOutput + extends RunStepCodeInterpreterToolCallOutputOutputParent { + /** The object type, which is always 'logs'. */ + type: "logs"; + /** The serialized log output emitted by the code interpreter. */ + logs: string; +} + +/** A representation of an image output emitted by a code interpreter tool in response to a tool call by the model. */ +export interface RunStepCodeInterpreterImageOutputOutput + extends RunStepCodeInterpreterToolCallOutputOutputParent { + /** The object type, which is always 'image'. */ + type: "image"; + /** Referential information for the image associated with this output. */ + image: RunStepCodeInterpreterImageReferenceOutput; +} + +/** An image reference emitted by a code interpreter tool in response to a tool call by the model. */ +export interface RunStepCodeInterpreterImageReferenceOutput { + /** The ID of the file associated with this image. */ + file_id: string; +} + +/** + * A record of a call to a file search tool, issued by the model in evaluation of a defined tool, that represents + * executed file search. + */ +export interface RunStepFileSearchToolCallOutput + extends RunStepToolCallOutputParent { + /** The object type, which is always 'file_search'. */ + type: "file_search"; + /** Reserved for future use. */ + file_search: Record; +} + +/** + * A record of a call to a bing grounding tool, issued by the model in evaluation of a defined tool, that represents + * executed search with bing grounding. + */ +export interface RunStepBingGroundingToolCallOutput + extends RunStepToolCallOutputParent { + /** The object type, which is always 'bing_grounding'. */ + type: "bing_grounding"; + /** Reserved for future use. */ + bing_grounding: Record; +} + +/** + * A record of a call to an Azure AI Search tool, issued by the model in evaluation of a defined tool, that represents + * executed Azure AI search. + */ +export interface RunStepAzureAISearchToolCallOutput + extends RunStepToolCallOutputParent { + /** The object type, which is always 'azure_ai_search'. */ + type: "azure_ai_search"; + /** Reserved for future use. */ + azure_ai_search: Record; +} + +/** + * A record of a call to a SharePoint tool, issued by the model in evaluation of a defined tool, that represents + * executed SharePoint actions. + */ +export interface RunStepSharepointToolCallOutput + extends RunStepToolCallOutputParent { + /** The object type, which is always 'sharepoint_grounding'. */ + type: "sharepoint_grounding"; + /** Reserved for future use. */ + sharepoint_grounding: Record; +} + +/** + * A record of a call to a Microsoft Fabric tool, issued by the model in evaluation of a defined tool, that represents + * executed Microsoft Fabric operations. + */ +export interface RunStepMicrosoftFabricToolCallOutput + extends RunStepToolCallOutputParent { + /** The object type, which is always 'microsoft_fabric'. */ + type: "microsoft_fabric"; + /** Reserved for future use. */ + microsoft_fabric: Record; +} + +/** + * A record of a call to a function tool, issued by the model in evaluation of a defined tool, that represents the inputs + * and output consumed and emitted by the specified function. + */ +export interface RunStepFunctionToolCallOutput + extends RunStepToolCallOutputParent { + /** The object type, which is always 'function'. */ + type: "function"; + /** The detailed information about the function called by the model. */ + function: RunStepFunctionToolCallDetailsOutput; +} + +/** The detailed information about the function called by the model. */ +export interface RunStepFunctionToolCallDetailsOutput { + /** The name of the function. */ + name: string; + /** The arguments that the model requires are provided to the named function. */ + arguments: string; + /** The output of the function, only populated for function calls that have already have had their outputs submitted. */ + output: string | null; +} + +/** The error information associated with a failed run step. */ +export interface RunStepErrorOutput { + /** + * The error code for this error. + * + * Possible values: "server_error", "rate_limit_exceeded" + */ + code: RunStepErrorCodeOutput; + /** The human-readable text associated with this error. */ + message: string; +} + +/** Usage statistics related to the run step. */ +export interface RunStepCompletionUsageOutput { + /** Number of completion tokens used over the course of the run step. */ + completion_tokens: number; + /** Number of prompt tokens used over the course of the run step. */ + prompt_tokens: number; + /** Total number of tokens used (prompt + completion). */ + total_tokens: number; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfRunStepOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + first_id: string; + /** The last ID represented in this list. */ + last_id: string; + /** A value indicating whether there are additional values available not captured in this list. */ + has_more: boolean; +} + +/** The response data from a file list operation. */ +export interface FileListResponseOutput { + /** The object type, which is always 'list'. */ + object: "list"; + /** The files returned for the request. */ + data: Array; +} + +/** Represents an agent that can call the model and use tools. */ +export interface OpenAIFileOutput { + /** The object type, which is always 'file'. */ + object: "file"; + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The size of the file, in bytes. */ + bytes: number; + /** The name of the file. */ + filename: string; + /** The Unix timestamp, in seconds, representing when this object was created. */ + created_at: number; + /** + * The intended purpose of a file. + * + * Possible values: "fine-tune", "fine-tune-results", "assistants", "assistants_output", "batch", "batch_output", "vision" + */ + purpose: FilePurposeOutput; + /** + * The state of the file. This field is available in Azure OpenAI only. + * + * Possible values: "uploaded", "pending", "running", "processed", "error", "deleting", "deleted" + */ + status?: FileStateOutput; + /** The error message with details in case processing of this file failed. This field is available in Azure OpenAI only. */ + status_details?: string; +} + +/** A status response from a file deletion operation. */ +export interface FileDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'file'. */ + object: "file"; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfVectorStoreOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + first_id: string; + /** The last ID represented in this list. */ + last_id: string; + /** A value indicating whether there are additional values available not captured in this list. */ + has_more: boolean; +} + +/** A vector store is a collection of processed files can be used by the `file_search` tool. */ +export interface VectorStoreOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always `vector_store` */ + object: "vector_store"; + /** The Unix timestamp (in seconds) for when the vector store was created. */ + created_at: number; + /** The name of the vector store. */ + name: string; + /** The total number of bytes used by the files in the vector store. */ + usage_bytes: number; + /** Files count grouped by status processed or being processed by this vector store. */ + file_counts: VectorStoreFileCountOutput; + /** + * The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. + * + * Possible values: "expired", "in_progress", "completed" + */ + status: VectorStoreStatusOutput; + /** Details on when this vector store expires */ + expires_after?: VectorStoreExpirationPolicyOutput; + /** The Unix timestamp (in seconds) for when the vector store will expire. */ + expires_at?: number | null; + /** The Unix timestamp (in seconds) for when the vector store was last active. */ + last_active_at: number | null; + /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */ + metadata: Record | null; +} + +/** Counts of files processed or being processed by this vector store grouped by status. */ +export interface VectorStoreFileCountOutput { + /** The number of files that are currently being processed. */ + in_progress: number; + /** The number of files that have been successfully processed. */ + completed: number; + /** The number of files that have failed to process. */ + failed: number; + /** The number of files that were cancelled. */ + cancelled: number; + /** The total number of files. */ + total: number; +} + +/** The expiration policy for a vector store. */ +export interface VectorStoreExpirationPolicyOutput { + /** + * Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`. + * + * Possible values: "last_active_at" + */ + anchor: VectorStoreExpirationPolicyAnchorOutput; + /** The anchor timestamp after which the expiration policy applies. */ + days: number; +} + +/** Options to configure a vector store static chunking strategy. */ +export interface VectorStoreStaticChunkingStrategyOptionsOutput { + /** The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. */ + max_chunk_size_tokens: number; + /** + * The number of tokens that overlap between chunks. The default value is 400. + * Note that the overlap must not exceed half of max_chunk_size_tokens. + */ + chunk_overlap_tokens: number; +} + +/** Response object for deleting a vector store. */ +export interface VectorStoreDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'vector_store.deleted'. */ + object: "vector_store.deleted"; +} + +/** The response data for a requested list of items. */ +export interface OpenAIPageableListOfVectorStoreFileOutput { + /** The object type, which is always list. */ + object: "list"; + /** The requested list of items. */ + data: Array; + /** The first ID represented in this list. */ + first_id: string; + /** The last ID represented in this list. */ + last_id: string; + /** A value indicating whether there are additional values available not captured in this list. */ + has_more: boolean; +} + +/** Description of a file attached to a vector store. */ +export interface VectorStoreFileOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always `vector_store.file`. */ + object: "vector_store.file"; + /** + * The total vector store usage in bytes. Note that this may be different from the original file + * size. + */ + usage_bytes: number; + /** The Unix timestamp (in seconds) for when the vector store file was created. */ + created_at: number; + /** The ID of the vector store that the file is attached to. */ + vector_store_id: string; + /** + * The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. + * + * Possible values: "in_progress", "completed", "failed", "cancelled" + */ + status: VectorStoreFileStatusOutput; + /** The last error associated with this vector store file. Will be `null` if there are no errors. */ + last_error: VectorStoreFileErrorOutput | null; + /** The strategy used to chunk the file. */ + chunking_strategy: VectorStoreChunkingStrategyResponseOutput; +} + +/** Details on the error that may have ocurred while processing a file for this vector store */ +export interface VectorStoreFileErrorOutput { + /** + * One of `server_error` or `rate_limit_exceeded`. + * + * Possible values: "internal_error", "file_not_found", "parsing_error", "unhandled_mime_type" + */ + code: VectorStoreFileErrorCodeOutput; + /** A human-readable description of the error. */ + message: string; +} + +/** An abstract representation of a vector store chunking strategy configuration. */ +export interface VectorStoreChunkingStrategyResponseOutputParent { + type: VectorStoreChunkingStrategyResponseTypeOutput; +} + +/** This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API. */ +export interface VectorStoreAutoChunkingStrategyResponseOutput + extends VectorStoreChunkingStrategyResponseOutputParent { + /** The object type, which is always 'other'. */ + type: "other"; +} + +/** A statically configured chunking strategy. */ +export interface VectorStoreStaticChunkingStrategyResponseOutput + extends VectorStoreChunkingStrategyResponseOutputParent { + /** The object type, which is always 'static'. */ + type: "static"; + /** The options for the static chunking strategy. */ + static: VectorStoreStaticChunkingStrategyOptionsOutput; +} + +/** Response object for deleting a vector store file relationship. */ +export interface VectorStoreFileDeletionStatusOutput { + /** The ID of the resource specified for deletion. */ + id: string; + /** A value indicating whether deletion was successful. */ + deleted: boolean; + /** The object type, which is always 'vector_store.deleted'. */ + object: "vector_store.file.deleted"; +} + +/** A batch of files attached to a vector store. */ +export interface VectorStoreFileBatchOutput { + /** The identifier, which can be referenced in API endpoints. */ + id: string; + /** The object type, which is always `vector_store.file_batch`. */ + object: "vector_store.files_batch"; + /** The Unix timestamp (in seconds) for when the vector store files batch was created. */ + created_at: number; + /** The ID of the vector store that the file is attached to. */ + vector_store_id: string; + /** + * The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. + * + * Possible values: "in_progress", "completed", "cancelled", "failed" + */ + status: VectorStoreFileBatchStatusOutput; + /** Files count grouped by status processed or being processed by this vector store. */ + file_counts: VectorStoreFileCountOutput; +} + +/** Response from the Workspace - Get operation */ +export interface GetWorkspaceResponseOutput { + /** A unique identifier for the resource */ + id: string; + /** The name of the resource */ + name: string; + /** The properties of the resource */ + properties: WorkspacePropertiesOutput; +} + +/** workspace properties */ +export interface WorkspacePropertiesOutput { + /** Authentication type of the connection target */ + applicationInsights: string; +} + +/** Response from the list operation */ +export interface ListConnectionsResponseOutput { + /** A list of connection list secrets */ + value: Array; +} + +/** Response from the listSecrets operation */ +export interface GetConnectionResponseOutput { + /** A unique identifier for the connection */ + id: string; + /** The name of the resource */ + name: string; + /** The properties of the resource */ + properties: InternalConnectionPropertiesOutput; +} + +/** Connection properties */ +export interface InternalConnectionPropertiesOutputParent { + /** Category of the connection */ + category: ConnectionTypeOutput; + /** The connection URL to be used for this service */ + target: string; + authType: AuthenticationTypeOutput; +} + +/** Connection properties for connections with API key authentication */ +export interface InternalConnectionPropertiesApiKeyAuthOutput + extends InternalConnectionPropertiesOutputParent { + /** Authentication type of the connection target */ + authType: "ApiKey"; + /** Credentials will only be present for authType=ApiKey */ + credentials: CredentialsApiKeyAuthOutput; +} + +/** The credentials needed for API key authentication */ +export interface CredentialsApiKeyAuthOutput { + /** The API key */ + key: string; +} + +/** Connection properties for connections with AAD authentication (aka `Entra ID passthrough`) */ +export interface InternalConnectionPropertiesAADAuthOutput + extends InternalConnectionPropertiesOutputParent { + /** Authentication type of the connection target */ + authType: "AAD"; +} + +/** Connection properties for connections with SAS authentication */ +export interface InternalConnectionPropertiesSASAuthOutput + extends InternalConnectionPropertiesOutputParent { + /** Authentication type of the connection target */ + authType: "SAS"; + /** Credentials will only be present for authType=ApiKey */ + credentials: CredentialsSASAuthOutput; +} + +/** The credentials needed for Shared Access Signatures (SAS) authentication */ +export interface CredentialsSASAuthOutput { + /** The Shared Access Signatures (SAS) token */ + SAS: string; +} + +/** Response from getting properties of the Application Insights resource */ +export interface GetAppInsightsResponseOutput { + /** A unique identifier for the resource */ + id: string; + /** The name of the resource */ + name: string; + /** The properties of the resource */ + properties: AppInsightsPropertiesOutput; +} + +/** The properties of the Application Insights resource */ +export interface AppInsightsPropertiesOutput { + /** Authentication type of the connection target */ + ConnectionString: string; +} + +/** Evaluation Definition */ +export interface EvaluationOutput { + /** Identifier of the evaluation. */ + readonly id: string; + /** Data for evaluation. */ + data: InputDataOutput; + /** Display Name for evaluation. It helps to find evaluation easily in AI Studio. It does not need to be unique. */ + displayName?: string; + /** Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. */ + description?: string; + /** Metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemDataOutput; + /** Status of the evaluation. It is set by service and is read-only. */ + readonly status?: string; + /** Evaluation's tags. Unlike properties, tags are fully mutable. */ + tags?: Record; + /** Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. */ + properties?: Record; + /** Evaluators to be used for the evaluation. */ + evaluators: Record; +} + +/** Abstract data class for input data configuration. */ +export interface InputDataOutputParent { + type: string; +} + +/** Data Source for Application Insights. */ +export interface ApplicationInsightsConfigurationOutput + extends InputDataOutputParent { + readonly type: "app_insights"; + /** LogAnalytic Workspace resourceID associated with ApplicationInsights */ + resourceId: string; + /** Query to fetch the data. */ + query: string; + /** Service name. */ + serviceName: string; + /** Connection String to connect to ApplicationInsights. */ + connectionString?: string; +} + +/** Dataset as source for evaluation. */ +export interface DatasetOutput extends InputDataOutputParent { + readonly type: "dataset"; + /** Evaluation input data */ + id: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemDataOutput { + /** The timestamp the resource was created at. */ + readonly createdAt?: string; + /** The identity that created the resource. */ + readonly createdBy?: string; + /** The identity type that created the resource. */ + readonly createdByType?: string; + /** The timestamp of resource last modification (UTC) */ + readonly lastModifiedAt?: string; +} + +/** Evaluator Configuration */ +export interface EvaluatorConfigurationOutput { + /** Identifier of the evaluator. */ + id: string; + /** Initialization parameters of the evaluator. */ + initParams?: Record; + /** Data parameters of the evaluator. */ + dataMapping?: Record; +} + +/** Evaluation Schedule Definition */ +export interface EvaluationScheduleOutput { + /** Name of the schedule, which also serves as the unique identifier for the evaluation */ + readonly name: string; + /** Data for evaluation. */ + data: ApplicationInsightsConfigurationOutput; + /** Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. */ + description?: string; + /** Metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemDataOutput; + /** Provisioning State of the evaluation. It is set by service and is read-only. */ + readonly provisioningState?: string; + /** Evaluation's tags. Unlike properties, tags are fully mutable. */ + tags?: Record; + /** Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. */ + properties?: Record; + /** Enabled status of the evaluation. It is set by service and is read-only. */ + readonly isEnabled?: string; + /** Evaluators to be used for the evaluation. */ + evaluators: Record; + /** Trigger for the evaluation. */ + trigger: TriggerOutput; +} + +/** Abstract data class for input data configuration. */ +export interface TriggerOutputParent { + type: string; +} + +/** Recurrence Trigger Definition */ +export interface RecurrenceTriggerOutput extends TriggerOutputParent { + readonly type: "Recurrence"; + /** + * The frequency to trigger schedule. + * + * Possible values: "Month", "Week", "Day", "Hour", "Minute" + */ + frequency: FrequencyOutput; + /** Specifies schedule interval in conjunction with frequency */ + interval: number; + /** The recurrence schedule. */ + schedule?: RecurrenceScheduleOutput; +} + +/** RecurrenceSchedule Definition */ +export interface RecurrenceScheduleOutput { + /** List of hours for the schedule. */ + hours: number[]; + /** List of minutes for the schedule. */ + minutes: number[]; + /** List of days for the schedule. */ + weekDays?: WeekDaysOutput[]; + /** List of month days for the schedule */ + monthDays?: number[]; +} + +/** Cron Trigger Definition */ +export interface CronTriggerOutput extends TriggerOutputParent { + readonly type: "Cron"; + /** Cron expression for the trigger. */ + expression: string; +} + +/** An abstract representation of an input tool definition that an agent can use. */ +export type ToolDefinitionOutput = + | ToolDefinitionOutputParent + | CodeInterpreterToolDefinitionOutput + | FileSearchToolDefinitionOutput + | FunctionToolDefinitionOutput + | BingGroundingToolDefinitionOutput + | MicrosoftFabricToolDefinitionOutput + | SharepointToolDefinitionOutput + | AzureAISearchToolDefinitionOutput; +/** An abstract representation of a single item of thread message content. */ +export type MessageContentOutput = + | MessageContentOutputParent + | MessageTextContentOutput + | MessageImageFileContentOutput; +/** An abstract representation of an annotation to text thread message content. */ +export type MessageTextAnnotationOutput = + | MessageTextAnnotationOutputParent + | MessageTextFileCitationAnnotationOutput + | MessageTextFilePathAnnotationOutput; +/** An abstract representation of a required action for an agent thread run to continue. */ +export type RequiredActionOutput = + | RequiredActionOutputParent + | SubmitToolOutputsActionOutput; +/** An abstract representation a a tool invocation needed by the model to continue a run. */ +export type RequiredToolCallOutput = + | RequiredToolCallOutputParent + | RequiredFunctionToolCallOutput; +/** An abstract representation of the details for a run step. */ +export type RunStepDetailsOutput = + | RunStepDetailsOutputParent + | RunStepMessageCreationDetailsOutput + | RunStepToolCallDetailsOutput; +/** An abstract representation of a detailed tool call as recorded within a run step for an existing run. */ +export type RunStepToolCallOutput = + | RunStepToolCallOutputParent + | RunStepCodeInterpreterToolCallOutput + | RunStepFileSearchToolCallOutput + | RunStepBingGroundingToolCallOutput + | RunStepAzureAISearchToolCallOutput + | RunStepSharepointToolCallOutput + | RunStepMicrosoftFabricToolCallOutput + | RunStepFunctionToolCallOutput; +/** An abstract representation of an emitted output from a code interpreter tool. */ +export type RunStepCodeInterpreterToolCallOutputOutput = + | RunStepCodeInterpreterToolCallOutputOutputParent + | RunStepCodeInterpreterLogOutputOutput + | RunStepCodeInterpreterImageOutputOutput; +/** An abstract representation of a vector store chunking strategy configuration. */ +export type VectorStoreChunkingStrategyResponseOutput = + | VectorStoreChunkingStrategyResponseOutputParent + | VectorStoreAutoChunkingStrategyResponseOutput + | VectorStoreStaticChunkingStrategyResponseOutput; +/** Connection properties */ +export type InternalConnectionPropertiesOutput = + | InternalConnectionPropertiesOutputParent + | InternalConnectionPropertiesApiKeyAuthOutput + | InternalConnectionPropertiesAADAuthOutput + | InternalConnectionPropertiesSASAuthOutput; +/** Abstract data class for input data configuration. */ +export type InputDataOutput = + | InputDataOutputParent + | ApplicationInsightsConfigurationOutput + | DatasetOutput; +/** Abstract data class for input data configuration. */ +export type TriggerOutput = + | TriggerOutputParent + | RecurrenceTriggerOutput + | CronTriggerOutput; +/** Alias for VectorStoreDataSourceAssetTypeOutput */ +export type VectorStoreDataSourceAssetTypeOutput = "uri_asset" | "id_asset"; +/** Alias for AgentsApiResponseFormatModeOutput */ +export type AgentsApiResponseFormatModeOutput = string; +/** Alias for ApiResponseFormatOutput */ +export type ApiResponseFormatOutput = string; +/** Alias for AgentsApiResponseFormatOptionOutput */ +export type AgentsApiResponseFormatOptionOutput = + | string + | AgentsApiResponseFormatModeOutput + | AgentsApiResponseFormatOutput; +/** Alias for MessageRoleOutput */ +export type MessageRoleOutput = string; +/** Alias for MessageAttachmentToolDefinitionOutput */ +export type MessageAttachmentToolDefinitionOutput = + | CodeInterpreterToolDefinitionOutput + | FileSearchToolDefinitionOutput; +/** Alias for MessageStatusOutput */ +export type MessageStatusOutput = string; +/** Alias for MessageIncompleteDetailsReasonOutput */ +export type MessageIncompleteDetailsReasonOutput = string; +/** Alias for TruncationStrategyOutput */ +export type TruncationStrategyOutput = string; +/** Alias for AgentsApiToolChoiceOptionModeOutput */ +export type AgentsApiToolChoiceOptionModeOutput = string; +/** Alias for AgentsNamedToolChoiceTypeOutput */ +export type AgentsNamedToolChoiceTypeOutput = string; +/** Alias for AgentsApiToolChoiceOptionOutput */ +export type AgentsApiToolChoiceOptionOutput = + | string + | AgentsApiToolChoiceOptionModeOutput + | AgentsNamedToolChoiceOutput; +/** Alias for RunStatusOutput */ +export type RunStatusOutput = string; +/** Alias for IncompleteRunDetailsOutput */ +export type IncompleteRunDetailsOutput = string; +/** Alias for RunStepTypeOutput */ +export type RunStepTypeOutput = string; +/** Alias for RunStepStatusOutput */ +export type RunStepStatusOutput = string; +/** Alias for RunStepErrorCodeOutput */ +export type RunStepErrorCodeOutput = string; +/** Alias for FilePurposeOutput */ +export type FilePurposeOutput = string; +/** Alias for FileStateOutput */ +export type FileStateOutput = string; +/** Alias for VectorStoreStatusOutput */ +export type VectorStoreStatusOutput = string; +/** Alias for VectorStoreExpirationPolicyAnchorOutput */ +export type VectorStoreExpirationPolicyAnchorOutput = string; +/** Alias for VectorStoreFileStatusOutput */ +export type VectorStoreFileStatusOutput = string; +/** Alias for VectorStoreFileErrorCodeOutput */ +export type VectorStoreFileErrorCodeOutput = string; +/** Alias for VectorStoreChunkingStrategyResponseTypeOutput */ +export type VectorStoreChunkingStrategyResponseTypeOutput = string; +/** Alias for VectorStoreFileBatchStatusOutput */ +export type VectorStoreFileBatchStatusOutput = string; +/** The Type (or category) of the connection */ +export type ConnectionTypeOutput = + | "AzureOpenAI" + | "Serverless" + | "AzureBlob" + | "AIServices" + | "CognitiveSearch"; +/** Authentication type used by Azure AI service to connect to another service */ +export type AuthenticationTypeOutput = "ApiKey" | "AAD" | "SAS"; +/** Paged collection of Evaluation items */ +export type PagedEvaluationOutput = Paged; +/** Alias for FrequencyOutput */ +export type FrequencyOutput = string; +/** Alias for WeekDaysOutput */ +export type WeekDaysOutput = string; +/** Paged collection of EvaluationSchedule items */ +export type PagedEvaluationScheduleOutput = Paged; diff --git a/sdk/ai/ai-projects/src/generated/src/paginateHelper.ts b/sdk/ai/ai-projects/src/generated/src/paginateHelper.ts new file mode 100644 index 000000000000..94d5220235d9 --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/paginateHelper.ts @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + getPagedAsyncIterator, + PagedAsyncIterableIterator, + PagedResult, +} from "@azure/core-paging"; +import { + Client, + createRestError, + PathUncheckedResponse, +} from "@azure-rest/core-client"; + +/** + * Helper type to extract the type of an array + */ +export type GetArrayType = T extends Array ? TData : never; + +/** + * The type of a custom function that defines how to get a page and a link to the next one if any. + */ +export type GetPage = ( + pageLink: string, + maxPageSize?: number, +) => Promise<{ + page: TPage; + nextPageLink?: string; +}>; + +/** + * Options for the paging helper + */ +export interface PagingOptions { + /** + * Custom function to extract pagination details for crating the PagedAsyncIterableIterator + */ + customGetPage?: GetPage[]>; +} + +/** + * Helper type to infer the Type of the paged elements from the response type + * This type is generated based on the swagger information for x-ms-pageable + * specifically on the itemName property which indicates the property of the response + * where the page items are found. The default value is `value`. + * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter + */ +export type PaginateReturn = TResult extends { + body: { value?: infer TPage }; +} + ? GetArrayType + : Array; + +/** + * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension + * @param client - Client to use for sending the next page requests + * @param initialResponse - Initial response containing the nextLink and current page of elements + * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results + * @returns - PagedAsyncIterableIterator to iterate the elements + */ +export function paginate( + client: Client, + initialResponse: TResponse, + options: PagingOptions = {}, +): PagedAsyncIterableIterator> { + // Extract element type from initial response + type TElement = PaginateReturn; + let firstRun = true; + const itemName = "value"; + const nextLinkName = "nextLink"; + const { customGetPage } = options; + const pagedResult: PagedResult = { + firstPageLink: "", + getPage: + typeof customGetPage === "function" + ? customGetPage + : async (pageLink: string) => { + const result = firstRun + ? initialResponse + : await client.pathUnchecked(pageLink).get(); + firstRun = false; + checkPagingRequest(result); + const nextLink = getNextLink(result.body, nextLinkName); + const values = getElements(result.body, itemName); + return { + page: values, + nextPageLink: nextLink, + }; + }, + }; + + return getPagedAsyncIterator(pagedResult); +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined") { + throw new Error( + `Body Property ${nextLinkName} should be a string or undefined`, + ); + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + + // value has to be an array according to the x-ms-pageable extension. + // The fact that this must be an array is used above to calculate the + // type of elements in the page in PaginateReturn + if (!Array.isArray(value)) { + throw new Error( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse): void { + const Http2xxStatusCodes = [ + "200", + "201", + "202", + "203", + "204", + "205", + "206", + "207", + "208", + "226", + ]; + if (!Http2xxStatusCodes.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} diff --git a/sdk/ai/ai-projects/src/generated/src/parameters.ts b/sdk/ai/ai-projects/src/generated/src/parameters.ts new file mode 100644 index 000000000000..0a432a8a8cac --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/parameters.ts @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; +import { RequestParameters } from "@azure-rest/core-client"; +import { + CreateAgentOptions, + ListSortOrder, + UpdateAgentOptions, + AgentThreadCreationOptions, + UpdateAgentThreadOptions, + ThreadMessageOptions, + CreateRunOptions, + ToolOutput, + CreateAndRunThreadOptions, + FilePurpose, + VectorStoreOptions, + VectorStoreUpdateOptions, + VectorStoreFileStatusFilter, + VectorStoreDataSource, + VectorStoreChunkingStrategyRequest, + ConnectionType, + Evaluation, + EvaluationSchedule, +} from "./models.js"; + +export interface CreateAgentBodyParam { + body: CreateAgentOptions; +} + +export type CreateAgentParameters = CreateAgentBodyParam & RequestParameters; + +export interface ListAgentsQueryParamProperties { + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListAgentsQueryParam { + queryParameters?: ListAgentsQueryParamProperties; +} + +export type ListAgentsParameters = ListAgentsQueryParam & RequestParameters; +export type GetAgentParameters = RequestParameters; + +export interface UpdateAgentBodyParam { + body: UpdateAgentOptions; +} + +export type UpdateAgentParameters = UpdateAgentBodyParam & RequestParameters; +export type DeleteAgentParameters = RequestParameters; + +export interface CreateThreadBodyParam { + body: AgentThreadCreationOptions; +} + +export type CreateThreadParameters = CreateThreadBodyParam & RequestParameters; +export type GetThreadParameters = RequestParameters; + +export interface UpdateThreadBodyParam { + body: UpdateAgentThreadOptions; +} + +export type UpdateThreadParameters = UpdateThreadBodyParam & RequestParameters; +export type DeleteThreadParameters = RequestParameters; + +export interface CreateMessageBodyParam { + body: ThreadMessageOptions; +} + +export type CreateMessageParameters = CreateMessageBodyParam & + RequestParameters; + +export interface ListMessagesQueryParamProperties { + /** Filter messages by the run ID that generated them. */ + runId?: string; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListMessagesQueryParam { + queryParameters?: ListMessagesQueryParamProperties; +} + +export type ListMessagesParameters = ListMessagesQueryParam & RequestParameters; +export type GetMessageParameters = RequestParameters; + +export interface UpdateMessageBodyParam { + body: { metadata?: Record | null }; +} + +export type UpdateMessageParameters = UpdateMessageBodyParam & + RequestParameters; + +export interface CreateRunBodyParam { + body: CreateRunOptions; +} + +export type CreateRunParameters = CreateRunBodyParam & RequestParameters; + +export interface ListRunsQueryParamProperties { + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListRunsQueryParam { + queryParameters?: ListRunsQueryParamProperties; +} + +export type ListRunsParameters = ListRunsQueryParam & RequestParameters; +export type GetRunParameters = RequestParameters; + +export interface UpdateRunBodyParam { + body: { metadata?: Record | null }; +} + +export type UpdateRunParameters = UpdateRunBodyParam & RequestParameters; + +export interface SubmitToolOutputsToRunBodyParam { + body: { tool_outputs: Array; stream?: boolean | null }; +} + +export type SubmitToolOutputsToRunParameters = SubmitToolOutputsToRunBodyParam & + RequestParameters; +export type CancelRunParameters = RequestParameters; + +export interface CreateThreadAndRunBodyParam { + body: CreateAndRunThreadOptions; +} + +export type CreateThreadAndRunParameters = CreateThreadAndRunBodyParam & + RequestParameters; +export type GetRunStepParameters = RequestParameters; + +export interface ListRunStepsQueryParamProperties { + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListRunStepsQueryParam { + queryParameters?: ListRunStepsQueryParamProperties; +} + +export type ListRunStepsParameters = ListRunStepsQueryParam & RequestParameters; + +export interface ListFilesQueryParamProperties { + /** + * The purpose of the file. + * + * Possible values: "fine-tune", "fine-tune-results", "assistants", "assistants_output", "batch", "batch_output", "vision" + */ + purpose?: FilePurpose; +} + +export interface ListFilesQueryParam { + queryParameters?: ListFilesQueryParamProperties; +} + +export type ListFilesParameters = ListFilesQueryParam & RequestParameters; + +export interface UploadFileBodyParam { + body: + | FormData + | Array< + | { + name: "file"; + body: + | string + | Uint8Array + | ReadableStream + | NodeJS.ReadableStream + | File; + filename?: string; + contentType?: string; + } + | { + name: "purpose"; + body: FilePurpose; + filename?: string; + contentType?: string; + } + | { name: "filename"; body: string } + >; +} + +export interface UploadFileMediaTypesParam { + /** The name of the file to upload. */ + contentType: "multipart/form-data"; +} + +export type UploadFileParameters = UploadFileMediaTypesParam & + UploadFileBodyParam & + RequestParameters; +export type DeleteFileParameters = RequestParameters; +export type GetFileParameters = RequestParameters; +export type GetFileContentParameters = RequestParameters; + +export interface ListVectorStoresQueryParamProperties { + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListVectorStoresQueryParam { + queryParameters?: ListVectorStoresQueryParamProperties; +} + +export type ListVectorStoresParameters = ListVectorStoresQueryParam & + RequestParameters; + +export interface CreateVectorStoreBodyParam { + body: VectorStoreOptions; +} + +export type CreateVectorStoreParameters = CreateVectorStoreBodyParam & + RequestParameters; +export type GetVectorStoreParameters = RequestParameters; + +export interface ModifyVectorStoreBodyParam { + body: VectorStoreUpdateOptions; +} + +export type ModifyVectorStoreParameters = ModifyVectorStoreBodyParam & + RequestParameters; +export type DeleteVectorStoreParameters = RequestParameters; + +export interface ListVectorStoreFilesQueryParamProperties { + /** + * Filter by file status. + * + * Possible values: "in_progress", "completed", "failed", "cancelled" + */ + filter?: VectorStoreFileStatusFilter; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListVectorStoreFilesQueryParam { + queryParameters?: ListVectorStoreFilesQueryParamProperties; +} + +export type ListVectorStoreFilesParameters = ListVectorStoreFilesQueryParam & + RequestParameters; + +export interface CreateVectorStoreFileBodyParam { + body: { + file_id?: string; + data_sources?: Array; + chunking_strategy?: VectorStoreChunkingStrategyRequest; + }; +} + +export type CreateVectorStoreFileParameters = CreateVectorStoreFileBodyParam & + RequestParameters; +export type GetVectorStoreFileParameters = RequestParameters; +export type DeleteVectorStoreFileParameters = RequestParameters; + +export interface CreateVectorStoreFileBatchBodyParam { + body: { + file_ids?: string[]; + data_sources?: Array; + chunking_strategy?: VectorStoreChunkingStrategyRequest; + }; +} + +export type CreateVectorStoreFileBatchParameters = + CreateVectorStoreFileBatchBodyParam & RequestParameters; +export type GetVectorStoreFileBatchParameters = RequestParameters; +export type CancelVectorStoreFileBatchParameters = RequestParameters; + +export interface ListVectorStoreFileBatchFilesQueryParamProperties { + /** + * Filter by file status. + * + * Possible values: "in_progress", "completed", "failed", "cancelled" + */ + filter?: VectorStoreFileStatusFilter; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */ + limit?: number; + /** + * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. + * + * Possible values: "asc", "desc" + */ + order?: ListSortOrder; + /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */ + after?: string; + /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */ + before?: string; +} + +export interface ListVectorStoreFileBatchFilesQueryParam { + queryParameters?: ListVectorStoreFileBatchFilesQueryParamProperties; +} + +export type ListVectorStoreFileBatchFilesParameters = + ListVectorStoreFileBatchFilesQueryParam & RequestParameters; +export type GetWorkspaceParameters = RequestParameters; + +export interface ListConnectionsQueryParamProperties { + /** Category of the workspace connection. */ + category?: ConnectionType; + /** Indicates whether to list datastores. Service default: do not list datastores. */ + includeAll?: boolean; + /** Target of the workspace connection. */ + target?: string; +} + +export interface ListConnectionsQueryParam { + queryParameters?: ListConnectionsQueryParamProperties; +} + +export type ListConnectionsParameters = ListConnectionsQueryParam & + RequestParameters; +export type GetConnectionParameters = RequestParameters; + +export interface GetConnectionWithSecretsBodyParam { + body: { ignored: string }; +} + +export type GetConnectionWithSecretsParameters = + GetConnectionWithSecretsBodyParam & RequestParameters; +export type GetAppInsightsParameters = RequestParameters; + +export interface GetHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface GetHeaderParam { + headers?: RawHttpHeadersInput & GetHeaders; +} + +export type GetParameters = GetHeaderParam & RequestParameters; + +export interface CreateBodyParam { + /** Evaluation to run. */ + body: Evaluation; +} + +export type CreateParameters = CreateBodyParam & RequestParameters; + +export interface ListHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ListQueryParamProperties { + /** The number of result items to return. */ + top?: number; + /** The number of result items to skip. */ + skip?: number; + /** The maximum number of result items per page. */ + maxpagesize?: number; +} + +export interface ListQueryParam { + queryParameters?: ListQueryParamProperties; +} + +export interface ListHeaderParam { + headers?: RawHttpHeadersInput & ListHeaders; +} + +export type ListParameters = ListQueryParam & + ListHeaderParam & + RequestParameters; + +export interface UpdateHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** The resource instance. */ +export type EvaluationResourceMergeAndPatch = Partial; + +export interface UpdateBodyParam { + /** The resource instance. */ + body: EvaluationResourceMergeAndPatch; +} + +export interface UpdateHeaderParam { + headers?: RawHttpHeadersInput & UpdateHeaders; +} + +export interface UpdateMediaTypesParam { + /** This request has a JSON Merge Patch body. */ + contentType: "application/merge-patch+json"; +} + +export type UpdateParameters = UpdateHeaderParam & + UpdateMediaTypesParam & + UpdateBodyParam & + RequestParameters; + +export interface GetScheduleHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface GetScheduleHeaderParam { + headers?: RawHttpHeadersInput & GetScheduleHeaders; +} + +export type GetScheduleParameters = GetScheduleHeaderParam & RequestParameters; + +export interface CreateOrReplaceScheduleHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface CreateOrReplaceScheduleBodyParam { + /** The resource instance. */ + body: EvaluationSchedule; +} + +export interface CreateOrReplaceScheduleHeaderParam { + headers?: RawHttpHeadersInput & CreateOrReplaceScheduleHeaders; +} + +export type CreateOrReplaceScheduleParameters = + CreateOrReplaceScheduleHeaderParam & + CreateOrReplaceScheduleBodyParam & + RequestParameters; + +export interface ListScheduleHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ListScheduleQueryParamProperties { + /** The number of result items to return. */ + top?: number; + /** The number of result items to skip. */ + skip?: number; + /** The maximum number of result items per page. */ + maxpagesize?: number; +} + +export interface ListScheduleQueryParam { + queryParameters?: ListScheduleQueryParamProperties; +} + +export interface ListScheduleHeaderParam { + headers?: RawHttpHeadersInput & ListScheduleHeaders; +} + +export type ListScheduleParameters = ListScheduleQueryParam & + ListScheduleHeaderParam & + RequestParameters; +export type DisableScheduleParameters = RequestParameters; diff --git a/sdk/ai/ai-projects/src/generated/src/projectsClient.ts b/sdk/ai/ai-projects/src/generated/src/projectsClient.ts new file mode 100644 index 000000000000..cb0624e7cc3d --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/projectsClient.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { getClient, ClientOptions } from "@azure-rest/core-client"; +import { logger } from "./logger.js"; +import { TokenCredential } from "@azure/core-auth"; +import { ProjectsClient } from "./clientDefinitions.js"; + +/** The optional parameters for the client */ +export interface ProjectsClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + +/** + * Initialize a new instance of `ProjectsClient` + * @param endpointParam - The Azure AI Studio project endpoint, in the form `https://.api.azureml.ms` or `https://..api.azureml.ms`, where is the Azure region where the project is deployed (e.g. westus) and is the GUID of the Enterprise private link. + * @param subscriptionId - The Azure subscription ID. + * @param resourceGroupName - The name of the Azure Resource Group. + * @param projectName - The Azure AI Studio project name. + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters + */ +export default function createClient( + endpointParam: string, + subscriptionId: string, + resourceGroupName: string, + projectName: string, + credentials: TokenCredential, + { apiVersion = "2024-07-01-preview", ...options }: ProjectsClientOptions = {}, +): ProjectsClient { + const endpointUrl = + options.endpoint ?? + options.baseUrl ?? + `${endpointParam}/agents/v1.0/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/${projectName}`; + const userAgentInfo = `azsdk-js-ai-projects-rest/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` + : `${userAgentInfo}`; + options = { + ...options, + userAgentOptions: { + userAgentPrefix, + }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + credentials: { + scopes: options.credentials?.scopes ?? [ + "https://management.azure.com/.default", + ], + }, + }; + const client = getClient(endpointUrl, credentials, options) as ProjectsClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + + return client; +} diff --git a/sdk/ai/ai-projects/src/generated/src/responses.ts b/sdk/ai/ai-projects/src/generated/src/responses.ts new file mode 100644 index 000000000000..3504ed2c5d5d --- /dev/null +++ b/sdk/ai/ai-projects/src/generated/src/responses.ts @@ -0,0 +1,976 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { RawHttpHeaders } from "@azure/core-rest-pipeline"; +import { HttpResponse, ErrorResponse } from "@azure-rest/core-client"; +import { + AgentOutput, + OpenAIPageableListOfAgentOutput, + OpenAIPageableListOfVectorStoreOutput, + AgentDeletionStatusOutput, + AgentThreadOutput, + ThreadDeletionStatusOutput, + ThreadMessageOutput, + ThreadRunOutput, + RunStepOutput, + FileListResponseOutput, + OpenAIFileOutput, + FileDeletionStatusOutput, + VectorStoreOutput, + VectorStoreDeletionStatusOutput, + VectorStoreFileOutput, + VectorStoreFileDeletionStatusOutput, + VectorStoreFileBatchOutput, + GetWorkspaceResponseOutput, + ListConnectionsResponseOutput, + GetConnectionResponseOutput, + GetAppInsightsResponseOutput, + EvaluationOutput, + PagedEvaluationOutput, + EvaluationScheduleOutput, + PagedEvaluationScheduleOutput, + OpenAIPageableListOfVectorStoreFileOutput, + OpenAIPageableListOfRunStepOutput, + OpenAIPageableListOfThreadRunOutput, + OpenAIPageableListOfThreadMessageOutput, +} from "./outputModels.js"; + +/** The new agent instance. */ +export interface CreateAgent200Response extends HttpResponse { + status: "200"; + body: AgentOutput; +} + +export interface CreateAgentDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateAgentDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateAgentDefaultHeaders; +} + +/** The requested list of agents. */ +export interface ListAgents200Response extends HttpResponse { + status: "200"; + body: OpenAIPageableListOfAgentOutput; +} + +export interface ListAgentsDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListAgentsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListAgentsDefaultHeaders; +} + +/** The requested agent instance. */ +export interface GetAgent200Response extends HttpResponse { + status: "200"; + body: AgentOutput; +} + +export interface GetAgentDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetAgentDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetAgentDefaultHeaders; +} + +/** The updated agent instance. */ +export interface UpdateAgent200Response extends HttpResponse { + status: "200"; + body: AgentOutput; +} + +export interface UpdateAgentDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpdateAgentDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpdateAgentDefaultHeaders; +} + +/** Status information about the requested deletion operation. */ +export interface DeleteAgent200Response extends HttpResponse { + status: "200"; + body: AgentDeletionStatusOutput; +} + +export interface DeleteAgentDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteAgentDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteAgentDefaultHeaders; +} + +/** Information about the newly created thread. */ +export interface CreateThread200Response extends HttpResponse { + status: "200"; + body: AgentThreadOutput; +} + +export interface CreateThreadDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateThreadDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateThreadDefaultHeaders; +} + +/** Information about the requested thread. */ +export interface GetThread200Response extends HttpResponse { + status: "200"; + body: AgentThreadOutput; +} + +export interface GetThreadDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetThreadDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetThreadDefaultHeaders; +} + +/** Information about the modified thread. */ +export interface UpdateThread200Response extends HttpResponse { + status: "200"; + body: AgentThreadOutput; +} + +export interface UpdateThreadDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpdateThreadDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpdateThreadDefaultHeaders; +} + +/** Status information about the requested thread deletion operation. */ +export interface DeleteThread200Response extends HttpResponse { + status: "200"; + body: ThreadDeletionStatusOutput; +} + +export interface DeleteThreadDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteThreadDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteThreadDefaultHeaders; +} + +/** A representation of the new message. */ +export interface CreateMessage200Response extends HttpResponse { + status: "200"; + body: ThreadMessageOutput; +} + +export interface CreateMessageDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateMessageDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateMessageDefaultHeaders; +} + +/** The requested list of messages. */ +export interface ListMessages200Response extends HttpResponse { + status: "200"; + body: OpenAIPageableListOfThreadMessageOutput; +} + +export interface ListMessagesDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListMessagesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListMessagesDefaultHeaders; +} + +/** A representation of the requested message. */ +export interface GetMessage200Response extends HttpResponse { + status: "200"; + body: ThreadMessageOutput; +} + +export interface GetMessageDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetMessageDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetMessageDefaultHeaders; +} + +/** A representation of the modified message. */ +export interface UpdateMessage200Response extends HttpResponse { + status: "200"; + body: ThreadMessageOutput; +} + +export interface UpdateMessageDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpdateMessageDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpdateMessageDefaultHeaders; +} + +/** Information about the new thread run. */ +export interface CreateRun200Response extends HttpResponse { + status: "200"; + body: ThreadRunOutput; +} + +export interface CreateRunDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateRunDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateRunDefaultHeaders; +} + +/** The requested list of thread runs. */ +export interface ListRuns200Response extends HttpResponse { + status: "200"; + body: OpenAIPageableListOfThreadRunOutput; +} + +export interface ListRunsDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListRunsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListRunsDefaultHeaders; +} + +/** The requested information about the specified thread run. */ +export interface GetRun200Response extends HttpResponse { + status: "200"; + body: ThreadRunOutput; +} + +export interface GetRunDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetRunDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetRunDefaultHeaders; +} + +/** Information about the modified run. */ +export interface UpdateRun200Response extends HttpResponse { + status: "200"; + body: ThreadRunOutput; +} + +export interface UpdateRunDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpdateRunDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpdateRunDefaultHeaders; +} + +/** Updated information about the run. */ +export interface SubmitToolOutputsToRun200Response extends HttpResponse { + status: "200"; + body: ThreadRunOutput; +} + +export interface SubmitToolOutputsToRunDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface SubmitToolOutputsToRunDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & SubmitToolOutputsToRunDefaultHeaders; +} + +/** Updated information about the cancelled run. */ +export interface CancelRun200Response extends HttpResponse { + status: "200"; + body: ThreadRunOutput; +} + +export interface CancelRunDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CancelRunDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CancelRunDefaultHeaders; +} + +/** Information about the newly created thread. */ +export interface CreateThreadAndRun200Response extends HttpResponse { + status: "200"; + body: ThreadRunOutput; +} + +export interface CreateThreadAndRunDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateThreadAndRunDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateThreadAndRunDefaultHeaders; +} + +/** Information about the requested run step. */ +export interface GetRunStep200Response extends HttpResponse { + status: "200"; + body: RunStepOutput; +} + +export interface GetRunStepDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetRunStepDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetRunStepDefaultHeaders; +} + +/** The requested list of run steps. */ +export interface ListRunSteps200Response extends HttpResponse { + status: "200"; + body: OpenAIPageableListOfRunStepOutput; +} + +export interface ListRunStepsDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListRunStepsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListRunStepsDefaultHeaders; +} + +/** The requested list of files. */ +export interface ListFiles200Response extends HttpResponse { + status: "200"; + body: FileListResponseOutput; +} + +export interface ListFilesDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListFilesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListFilesDefaultHeaders; +} + +/** A representation of the uploaded file. */ +export interface UploadFile200Response extends HttpResponse { + status: "200"; + body: OpenAIFileOutput; +} + +export interface UploadFileDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UploadFileDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UploadFileDefaultHeaders; +} + +/** The request has succeeded. */ +export interface DeleteFile200Response extends HttpResponse { + status: "200"; + body: FileDeletionStatusOutput; +} + +export interface DeleteFileDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteFileDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteFileDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetFile200Response extends HttpResponse { + status: "200"; + body: OpenAIFileOutput; +} + +export interface GetFileDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetFileDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetFileDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetFileContent200Response extends HttpResponse { + status: "200"; + body: string; +} + +export interface GetFileContentDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetFileContentDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetFileContentDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListVectorStores200Response extends HttpResponse { + status: "200"; + body: OpenAIPageableListOfVectorStoreOutput; +} + +export interface ListVectorStoresDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListVectorStoresDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListVectorStoresDefaultHeaders; +} + +/** The request has succeeded. */ +export interface CreateVectorStore200Response extends HttpResponse { + status: "200"; + body: VectorStoreOutput; +} + +export interface CreateVectorStoreDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateVectorStoreDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateVectorStoreDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetVectorStore200Response extends HttpResponse { + status: "200"; + body: VectorStoreOutput; +} + +export interface GetVectorStoreDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetVectorStoreDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetVectorStoreDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ModifyVectorStore200Response extends HttpResponse { + status: "200"; + body: VectorStoreOutput; +} + +export interface ModifyVectorStoreDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ModifyVectorStoreDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ModifyVectorStoreDefaultHeaders; +} + +/** The request has succeeded. */ +export interface DeleteVectorStore200Response extends HttpResponse { + status: "200"; + body: VectorStoreDeletionStatusOutput; +} + +export interface DeleteVectorStoreDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteVectorStoreDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteVectorStoreDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListVectorStoreFiles200Response extends HttpResponse { + status: "200"; + body: OpenAIPageableListOfVectorStoreFileOutput; +} + +export interface ListVectorStoreFilesDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListVectorStoreFilesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListVectorStoreFilesDefaultHeaders; +} + +/** The request has succeeded. */ +export interface CreateVectorStoreFile200Response extends HttpResponse { + status: "200"; + body: VectorStoreFileOutput; +} + +export interface CreateVectorStoreFileDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateVectorStoreFileDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateVectorStoreFileDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetVectorStoreFile200Response extends HttpResponse { + status: "200"; + body: VectorStoreFileOutput; +} + +export interface GetVectorStoreFileDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetVectorStoreFileDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetVectorStoreFileDefaultHeaders; +} + +/** The request has succeeded. */ +export interface DeleteVectorStoreFile200Response extends HttpResponse { + status: "200"; + body: VectorStoreFileDeletionStatusOutput; +} + +export interface DeleteVectorStoreFileDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteVectorStoreFileDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteVectorStoreFileDefaultHeaders; +} + +/** The request has succeeded. */ +export interface CreateVectorStoreFileBatch200Response extends HttpResponse { + status: "200"; + body: VectorStoreFileBatchOutput; +} + +export interface CreateVectorStoreFileBatchDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateVectorStoreFileBatchDefaultResponse + extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateVectorStoreFileBatchDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetVectorStoreFileBatch200Response extends HttpResponse { + status: "200"; + body: VectorStoreFileBatchOutput; +} + +export interface GetVectorStoreFileBatchDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetVectorStoreFileBatchDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetVectorStoreFileBatchDefaultHeaders; +} + +/** The request has succeeded. */ +export interface CancelVectorStoreFileBatch200Response extends HttpResponse { + status: "200"; + body: VectorStoreFileBatchOutput; +} + +export interface CancelVectorStoreFileBatchDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CancelVectorStoreFileBatchDefaultResponse + extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CancelVectorStoreFileBatchDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListVectorStoreFileBatchFiles200Response extends HttpResponse { + status: "200"; + body: OpenAIPageableListOfVectorStoreFileOutput; +} + +export interface ListVectorStoreFileBatchFilesDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListVectorStoreFileBatchFilesDefaultResponse + extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListVectorStoreFileBatchFilesDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetWorkspace200Response extends HttpResponse { + status: "200"; + body: GetWorkspaceResponseOutput; +} + +export interface GetWorkspaceDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetWorkspaceDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetWorkspaceDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListConnections200Response extends HttpResponse { + status: "200"; + body: ListConnectionsResponseOutput; +} + +export interface ListConnectionsDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListConnectionsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListConnectionsDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetConnection200Response extends HttpResponse { + status: "200"; + body: GetConnectionResponseOutput; +} + +export interface GetConnectionDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetConnectionDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetConnectionDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetConnectionWithSecrets200Response extends HttpResponse { + status: "200"; + body: GetConnectionResponseOutput; +} + +export interface GetConnectionWithSecretsDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetConnectionWithSecretsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetConnectionWithSecretsDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetAppInsights200Response extends HttpResponse { + status: "200"; + body: GetAppInsightsResponseOutput; +} + +export interface GetAppInsightsDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetAppInsightsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetAppInsightsDefaultHeaders; +} + +export interface Get200Headers { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** The request has succeeded. */ +export interface Get200Response extends HttpResponse { + status: "200"; + body: EvaluationOutput; + headers: RawHttpHeaders & Get200Headers; +} + +export interface GetDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetDefaultHeaders; +} + +/** Response model for create evaluation */ +export interface Create201Response extends HttpResponse { + status: "201"; + body: EvaluationOutput; +} + +export interface List200Headers { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** The request has succeeded. */ +export interface List200Response extends HttpResponse { + status: "200"; + body: PagedEvaluationOutput; + headers: RawHttpHeaders & List200Headers; +} + +export interface ListDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListDefaultHeaders; +} + +export interface Update200Headers { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** The request has succeeded. */ +export interface Update200Response extends HttpResponse { + status: "200"; + body: EvaluationOutput; + headers: RawHttpHeaders & Update200Headers; +} + +export interface UpdateDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpdateDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpdateDefaultHeaders; +} + +export interface GetSchedule200Headers { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** The request has succeeded. */ +export interface GetSchedule200Response extends HttpResponse { + status: "200"; + body: EvaluationScheduleOutput; + headers: RawHttpHeaders & GetSchedule200Headers; +} + +export interface GetScheduleDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetScheduleDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetScheduleDefaultHeaders; +} + +export interface CreateOrReplaceSchedule200Headers { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** The request has succeeded. */ +export interface CreateOrReplaceSchedule200Response extends HttpResponse { + status: "200"; + body: EvaluationScheduleOutput; + headers: RawHttpHeaders & CreateOrReplaceSchedule200Headers; +} + +export interface CreateOrReplaceSchedule201Headers { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface CreateOrReplaceSchedule201Response extends HttpResponse { + status: "201"; + body: EvaluationScheduleOutput; + headers: RawHttpHeaders & CreateOrReplaceSchedule201Headers; +} + +export interface CreateOrReplaceScheduleDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateOrReplaceScheduleDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateOrReplaceScheduleDefaultHeaders; +} + +export interface ListSchedule200Headers { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** The request has succeeded. */ +export interface ListSchedule200Response extends HttpResponse { + status: "200"; + body: PagedEvaluationScheduleOutput; + headers: RawHttpHeaders & ListSchedule200Headers; +} + +export interface ListScheduleDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListScheduleDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListScheduleDefaultHeaders; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface DisableSchedule204Response extends HttpResponse { + status: "204"; +} + +export interface DisableScheduleDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DisableScheduleDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DisableScheduleDefaultHeaders; +} diff --git a/sdk/ai/ai-projects/src/index.ts b/sdk/ai/ai-projects/src/index.ts new file mode 100644 index 000000000000..1ea737dc35e1 --- /dev/null +++ b/sdk/ai/ai-projects/src/index.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AIProjectsClient, AIProjectsClientOptions } from "./aiProjectsClient.js"; +import { ProjectsClientOptions } from "./generated/src/projectsClient.js"; +export { AgentsOperations } from "./agents/index.js"; +export { ConnectionsOperations } from "./connections/index.js"; +export { TelemetryOperations, TelemetryOptions } from "./telemetry/index.js"; + +export * from "./agents/inputOutputs.js"; +export * from "./connections/inputOutput.js"; + +export { AIProjectsClient, AIProjectsClientOptions, ProjectsClientOptions }; diff --git a/sdk/ai/ai-projects/src/logger.ts b/sdk/ai/ai-projects/src/logger.ts new file mode 100644 index 000000000000..9f092c1689f3 --- /dev/null +++ b/sdk/ai/ai-projects/src/logger.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +import { PACKAGE_NAME } from "./constants.js"; +export const logger = createClientLogger(PACKAGE_NAME); diff --git a/sdk/ai/ai-projects/src/telemetry/index.ts b/sdk/ai/ai-projects/src/telemetry/index.ts new file mode 100644 index 000000000000..625ede77e570 --- /dev/null +++ b/sdk/ai/ai-projects/src/telemetry/index.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client } from "@azure-rest/core-client"; +import type { TelemetryOptions } from "./telemetry.js"; +import { + getConnectionString, + getTelemetryOptions, + resetTelemetryOptions, + updateTelemetryOptions, +} from "./telemetry.js"; +import type { ConnectionsInternalOperations } from "../connections/internalModels.js"; +import type { ConnectionsOperations } from "../connections/customModels.js"; +export { TelemetryOptions } from "./telemetry.js"; + +/** + * Telemetry operations + **/ +export interface TelemetryOperations { + /** + * Get the appinsights connection string confired in the workspace + * @returns The telemetry connection string + **/ + getConnectionString(): Promise; + + /** + * Update the telemetry settings + * @param options - The telemetry options + * @returns void + * */ + updateSettings(options: TelemetryOptions): void; + + /** + * get the telemetry settings + * @returns The telemetry options + * */ + getSettings(): TelemetryOptions; +} + +/** + * Get the telemetry operations + * @param connection - The connections operations + * @returns The telemetry operations + **/ +export function getTelemetryOperations( + context: Client, + connection: ConnectionsOperations, +): TelemetryOperations { + resetTelemetryOptions(); + return { + getConnectionString: () => + getConnectionString(context, connection as ConnectionsInternalOperations), + updateSettings: (options: TelemetryOptions) => updateTelemetryOptions(options), + getSettings: () => getTelemetryOptions(), + }; +} diff --git a/sdk/ai/ai-projects/src/telemetry/telemetry.ts b/sdk/ai/ai-projects/src/telemetry/telemetry.ts new file mode 100644 index 000000000000..8b9102d41621 --- /dev/null +++ b/sdk/ai/ai-projects/src/telemetry/telemetry.ts @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { GetAppInsightsResponseOutput } from "../customization/outputModels.js"; +import type { Client } from "@azure-rest/core-client"; +import { createRestError } from "@azure-rest/core-client"; +import type { ConnectionsInternalOperations } from "../connections/internalModels.js"; + +const expectedStatuses = ["200"]; + +/** + * Telemetry options + */ +export interface TelemetryOptions { + /** Enable content recording */ + enableContentRecording: boolean; +} + +const telemetryOptions: TelemetryOptions & { connectionString: string | undefined } = { + enableContentRecording: false, + connectionString: undefined, +}; + +/** + * Update the telemetry settings + * @param options - The telemetry options + */ +export function updateTelemetryOptions(options: TelemetryOptions): void { + telemetryOptions.enableContentRecording = options.enableContentRecording; +} + +/** + * Get the telemetry options + * @returns The telemetry options + */ +export function getTelemetryOptions(): TelemetryOptions { + return structuredClone(telemetryOptions); +} + +/** + * Reset the telemetry options + */ +export function resetTelemetryOptions(): void { + telemetryOptions.connectionString = undefined; + telemetryOptions.enableContentRecording = false; +} + +/** + * Get the appinsights connection string confired in the workspace + * @param connection - get the connection string + * @returns The telemetry connection string + */ +export async function getConnectionString( + context: Client, + connection: ConnectionsInternalOperations, +): Promise { + if (!telemetryOptions.connectionString) { + const workspace = await connection.getWorkspace(); + if (workspace.properties.applicationInsights) { + const result = await context + .path("/{appInsightsResourceUrl}", workspace.properties.applicationInsights) + .get({ skipUrlEncoding: true }); + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + telemetryOptions.connectionString = ( + result.body as GetAppInsightsResponseOutput + ).properties.ConnectionString; + } else { + throw new Error("Application Insights connection string not found."); + } + } + return telemetryOptions.connectionString as string; +} diff --git a/sdk/ai/ai-projects/src/tracing.ts b/sdk/ai/ai-projects/src/tracing.ts new file mode 100644 index 000000000000..50ce1eb044a2 --- /dev/null +++ b/sdk/ai/ai-projects/src/tracing.ts @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + OperationTracingOptions, + Resolved, + SpanStatusError, + TracingSpan, +} from "@azure/core-tracing"; +import { createTracingClient } from "@azure/core-tracing"; +import { PACKAGE_NAME, SDK_VERSION } from "./constants.js"; +import { getErrorMessage } from "@azure/core-util"; +import { logger } from "./logger.js"; + +export enum TracingAttributes { + GEN_AI_MESSAGE_ID = "gen_ai.message.id", + GEN_AI_MESSAGE_STATUS = "gen_ai.message.status", + GEN_AI_THREAD_ID = "gen_ai.thread.id", + GEN_AI_THREAD_RUN_ID = "gen_ai.thread.run.id", + GEN_AI_AGENT_ID = "gen_ai.agent.id", + GEN_AI_AGENT_NAME = "gen_ai.agent.name", + GEN_AI_AGENT_DESCRIPTION = "gen_ai.agent.description", + GEN_AI_OPERATION_NAME = "gen_ai.operation.name", + GEN_AI_THREAD_RUN_STATUS = "gen_ai.thread.run.status", + GEN_AI_REQUEST_MODEL = "gen_ai.request.model", + GEN_AI_REQUEST_TEMPERATURE = "gen_ai.request.temperature", + GEN_AI_REQUEST_TOP_P = "gen_ai.request.top_p", + GEN_AI_REQUEST_MAX_INPUT_TOKENS = "gen_ai.request.max_input_tokens", + GEN_AI_REQUEST_MAX_OUTPUT_TOKENS = "gen_ai.request.max_output_tokens", + GEN_AI_RESPONSE_MODEL = "gen_ai.response.model", + GEN_AI_SYSTEM = "gen_ai.system", + SERVER_ADDRESS = "server.address", + AZ_AI_AGENT_SYSTEM = "az.ai.agents", + GEN_AI_TOOL_NAME = "gen_ai.tool.name", + GEN_AI_TOOL_CALL_ID = "gen_ai.tool.call.id", + GEN_AI_REQUEST_RESPONSE_FORMAT = "gen_ai.request.response_format", + GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens", + GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens", + GEN_AI_SYSTEM_MESSAGE = "gen_ai.system.message", + GEN_AI_EVENT_CONTENT = "gen_ai.event.content", + ERROR_TYPE = "error.type", +} +export enum TracingOperationName { + CREATE_AGENT = "create_agent", + CREATE_UPDATE_AGENT = "update_agent", + CREATE_THREAD = "create_thread", + CREATE_MESSAGE = "create_message", + CREATE_RUN = "create_run", + START_THREAD_RUN = "start_thread_run", + EXECUTE_TOOL = "execute_tool", + LIST_MESSAGES = "list_messages", + SUBMIT_TOOL_OUTPUTS = "submit_tool_outputs", + CREATE_THREAD_RUN = "create_thread_run", +} + +export interface TracingAttributeOptions { + operationName?: string; + name?: string; + description?: string; + serverAddress?: string; + threadId?: string; + agentId?: string; + instructions?: string; + additional_instructions?: string; + runId?: string; + runStatus?: string; + responseModel?: string; + model?: string; + temperature?: number; + topP?: number; + maxPromptTokens?: number; + maxCompletionTokens?: number; + responseFormat?: string; + genAiSystem?: string; + messageId?: string; + messageStatus?: string; + eventContent?: string; + usagePromptTokens?: number; + usageCompletionTokens?: number; +} + +export type Span = Omit; +export type OptionsWithTracing = { + tracingOptions?: OperationTracingOptions; + tracingAttributeOptions?: TracingAttributeOptions; +}; + +export class TracingUtility { + private static tracingClient = createTracingClient({ + namespace: "Microsoft.CognitiveServices", + packageName: PACKAGE_NAME, + packageVersion: SDK_VERSION, + }); + + static async withSpan< + Options extends OptionsWithTracing, + Request extends (updatedOptions: Options) => ReturnType, + >( + name: string, + options: Options, + request: Request, + startTrace?: (span: Span, updatedOptions: Options) => void, + endTrace?: (span: Span, updatedOptions: Options, result: ReturnType) => void, + ): Promise>> { + return TracingUtility.tracingClient.withSpan( + name, + options, + async (updatedOptions: Options, span: Span) => { + if (startTrace) { + try { + updatedOptions.tracingAttributeOptions = { + ...updatedOptions.tracingAttributeOptions, + operationName: name, + }; + startTrace(span, updatedOptions); + } catch (e) { + logger.warning( + `Skipping updating span before request execution due to an error: ${getErrorMessage(e)}`, + ); + } + } + let result: ReturnType | undefined; + try { + result = await request(updatedOptions); + } catch (error) { + const errorStatus: SpanStatusError = { status: "error" }; + if (error instanceof Error) { + errorStatus.error = error; + } + throw error; + } + + if (endTrace && result !== undefined) { + try { + endTrace(span, updatedOptions, result); + } catch (e) { + logger.warning( + `Skipping updating span after request execution due to an error: ${getErrorMessage(e)}`, + ); + } + } + return result; + }, + { spanKind: "client" }, + ); + } + + static updateSpanAttributes( + span: Span, + attributeOptions: Omit, + ): void { + TracingUtility.setAttributes(span, attributeOptions); + } + + static setSpanAttributes( + span: Span, + operationName: string, + attributeOptions: TracingAttributeOptions, + ): void { + attributeOptions.operationName = operationName; + TracingUtility.setAttributes(span, attributeOptions); + } + + static setAttributes(span: Span, attributeOptions: TracingAttributeOptions): void { + if (span.isRecording()) { + const { + name, + operationName, + description, + serverAddress, + threadId, + agentId, + messageId, + runId, + model, + temperature, + topP, + maxPromptTokens, + maxCompletionTokens, + responseFormat, + runStatus, + responseModel, + usageCompletionTokens, + usagePromptTokens, + genAiSystem = TracingAttributes.AZ_AI_AGENT_SYSTEM, + } = attributeOptions; + + if (genAiSystem) { + span.setAttribute(TracingAttributes.GEN_AI_SYSTEM, genAiSystem); + } + if (name) { + span.setAttribute(TracingAttributes.GEN_AI_AGENT_NAME, name); + } + if (description) { + span.setAttribute(TracingAttributes.GEN_AI_AGENT_DESCRIPTION, description); + } + + if (serverAddress) { + span.setAttribute(TracingAttributes.SERVER_ADDRESS, serverAddress); + } + + if (threadId) { + span.setAttribute(TracingAttributes.GEN_AI_THREAD_ID, threadId); + } + + if (agentId) { + span.setAttribute(TracingAttributes.GEN_AI_AGENT_ID, agentId); + } + + if (runId) { + span.setAttribute(TracingAttributes.GEN_AI_THREAD_RUN_ID, runId); + } + + if (messageId) { + span.setAttribute(TracingAttributes.GEN_AI_MESSAGE_ID, messageId); + } + if (model) { + span.setAttribute(TracingAttributes.GEN_AI_REQUEST_MODEL, model); + } + + if (temperature !== null) { + span.setAttribute(TracingAttributes.GEN_AI_REQUEST_TEMPERATURE, temperature); + } + + if (topP !== null) { + span.setAttribute(TracingAttributes.GEN_AI_REQUEST_TOP_P, topP); + } + + if (maxPromptTokens !== null) { + span.setAttribute(TracingAttributes.GEN_AI_REQUEST_MAX_INPUT_TOKENS, maxPromptTokens); + } + + if (maxCompletionTokens !== null) { + span.setAttribute(TracingAttributes.GEN_AI_REQUEST_MAX_OUTPUT_TOKENS, maxCompletionTokens); + } + + if (responseFormat) { + span.setAttribute(TracingAttributes.GEN_AI_REQUEST_RESPONSE_FORMAT, responseFormat); + } + + if (runStatus) { + span.setAttribute(TracingAttributes.GEN_AI_THREAD_RUN_STATUS, runStatus); + } + + if (responseModel) { + span.setAttribute(TracingAttributes.GEN_AI_RESPONSE_MODEL, responseModel); + } + + if (usagePromptTokens) { + span.setAttribute(TracingAttributes.GEN_AI_USAGE_INPUT_TOKENS, usagePromptTokens); + } + + if (usageCompletionTokens) { + span.setAttribute(TracingAttributes.GEN_AI_USAGE_OUTPUT_TOKENS, usageCompletionTokens); + } + if (operationName) { + span.setAttribute(TracingAttributes.GEN_AI_OPERATION_NAME, operationName); + } + } + return; + } + + static addSpanEvent( + span: Span, + eventName: string, + attributeOptions: Omit, + ): void { + if (span.isRecording()) { + const { + threadId, + agentId, + runId, + messageId, + eventContent, + usageCompletionTokens, + usagePromptTokens, + messageStatus, + } = attributeOptions; + const attributes: Record = {}; + + if (eventContent) { + attributes[TracingAttributes.GEN_AI_EVENT_CONTENT] = eventContent; + } + + if (threadId) { + attributes[TracingAttributes.GEN_AI_THREAD_ID] = threadId; + } + + if (agentId) { + attributes[TracingAttributes.GEN_AI_AGENT_ID] = agentId; + } + + if (runId) { + attributes[TracingAttributes.GEN_AI_THREAD_RUN_ID] = runId; + } + + if (messageId) { + attributes[TracingAttributes.GEN_AI_MESSAGE_ID] = messageId; + } + if (messageStatus) { + attributes[TracingAttributes.GEN_AI_MESSAGE_STATUS] = messageStatus; + } + + if (usagePromptTokens) { + attributes[TracingAttributes.GEN_AI_USAGE_INPUT_TOKENS] = usagePromptTokens; + } + + if (usageCompletionTokens) { + attributes[TracingAttributes.GEN_AI_USAGE_OUTPUT_TOKENS] = usageCompletionTokens; + } + + if (span.addEvent) { + span.addEvent(eventName, { attributes }); + } + } + return; + } +} diff --git a/sdk/ai/ai-projects/test.env b/sdk/ai/ai-projects/test.env new file mode 100644 index 000000000000..167bfe7e6307 --- /dev/null +++ b/sdk/ai/ai-projects/test.env @@ -0,0 +1 @@ +AZURE_AI_PROJECTS_CONNECTION_STRING="" diff --git a/sdk/ai/ai-projects/test/public/agents/assistants.spec.ts b/sdk/ai/ai-projects/test/public/agents/assistants.spec.ts new file mode 100644 index 000000000000..13c577ce7e09 --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/assistants.spec.ts @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - assistants", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("client and agents operations are accessible", async function () { + assert.isNotNull(projectsClient); + assert.isNotNull(agents); + }); + + it("should delete agent", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Delete agent + const deleted = await agents.deleteAgent(agent.id); + assert.isNotNull(deleted); + console.log(`Deleted agent, agent ID: ${agent.id}`); + }); + + it("should list assistants", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // List agents + const assistants = await agents.listAgents(); + assert.isNotEmpty(assistants); + assert.isAtLeast(assistants.data.length, 1); + console.log(`Listed agents, agents count: ${assistants.data.length}`); + + // Delete agent + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + }); + + it("should create agent", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + assert.isNotNull(agent); + assert.isNotNull(agent.id); + + // Delete agent + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + }); + + it("should update agent", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Update agent + const updated = await agents.updateAgent(agent.id, { name: "my-updated-agent" }); + assert.isNotNull(updated); + assert.equal(updated.name, "my-updated-agent"); + console.log(`Updated agent name to ${updated.name}, agent ID: ${agent.id}`); + + // Delete agent + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/files.spec.ts b/sdk/ai/ai-projects/test/public/agents/files.spec.ts new file mode 100644 index 000000000000..0fca88426747 --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/files.spec.ts @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - files", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("client and agents operations are accessible", async function () { + assert.isNotNull(projectsClient); + assert.isNotNull(agents); + }); + + it("should list files", async function () { + const files = await agents.listFiles(); + assert.isNotEmpty(files); + }); + + it("should upload file", async function () { + const fileContent = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file = await agents.uploadFile(fileContent, "assistants", { fileName: "fileName" }); + assert.isNotEmpty(file); + }); + + it("should upload file and poll", async function () { + const fileContent = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const poller = agents.uploadFileAndPoll(fileContent, "assistants", { + fileName: "fileName", + pollingOptions: { sleepIntervalInMs: 1000 }, + }); + const file = await poller.pollUntilDone(); + assert.notInclude(["uploaded", "pending", "running"], file.status); + assert.isNotEmpty(file); + }); + + it("should delete file", async function () { + const fileContent = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file = await agents.uploadFile(fileContent, "assistants", { fileName: "fileName" }); + const deleted = await agents.deleteFile(file.id); + assert.isNotNull(deleted); + }); + + it("should retrieve file", async function () { + const fileContent = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file = await agents.uploadFile(fileContent, "assistants", { fileName: "fileName" }); + const _file = await agents.getFile(file.id); + assert.isNotEmpty(_file); + assert.equal(_file.id, file.id); + await agents.deleteFile(file.id); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/functionTool.spec.ts b/sdk/ai/ai-projects/test/public/agents/functionTool.spec.ts new file mode 100644 index 000000000000..379c686bfe39 --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/functionTool.spec.ts @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import { delay } from "@azure-tools/test-recorder"; +import type { + AgentsOperations, + AIProjectsClient, + FunctionToolDefinition, + FunctionToolDefinitionOutput, + MessageContentOutput, + MessageImageFileContentOutput, + MessageTextContentOutput, + SubmitToolOutputsActionOutput, +} from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; +import { isOutputOfType } from "../../../src/agents/utils.js"; + +describe("Agents - function tool", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + let getCurrentDateTimeTool: FunctionToolDefinition; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + getCurrentDateTimeTool = { + type: "function", + function: { + name: "getCurrentDateTime", + description: "Get current date time", + parameters: {}, + }, + }; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + function getCurrentDateTime(): {} { + return { currentDateTime: "2024-10-10 12:30:19" }; + } + + it("should create agent with function tool", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [getCurrentDateTimeTool], + }); + console.log(`Created agent, agent ID: ${agent.id}`); + assert.isNotNull(agent); + assert.isNotNull(agent.id); + assert.isNotEmpty(agent.tools); + assert.equal((agent.tools[0] as FunctionToolDefinition).function.name, "getCurrentDateTime"); + + // Delete agent + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + }); + + it("should create agent with run function tool", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are a helpful agent", + tools: [getCurrentDateTimeTool], + }); + console.log(`Created agent, agent ID: ${agent.id}`); + assert.isNotNull(agent); + assert.isNotNull(agent.id); + assert.isNotEmpty(agent.tools); + assert.equal((agent.tools[0] as FunctionToolDefinition).function.name, "getCurrentDateTime"); + + // Create thread + const thread = await agents.createThread(); + assert.isNotNull(thread); + assert.isNotNull(thread.id); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "Hello, what's the time?", + }); + assert.isNotNull(message.id); + console.log(`Created message, message ID ${message.id}`); + + // Create run + let run = await agents.createRun(thread.id, agent.id); + assert.isNotNull(run); + assert.isNotNull(run.id); + console.log(`Created Run, Run ID: ${run.id}`); + let toolCalled = false; + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await delay(1000); + run = await agents.getRun(thread.id, run.id); + if (run.status === "failed") { + console.log(`Run failed - ${run.lastError?.code} - ${run.lastError?.message}`); + break; + } + console.log(`Current Run status - ${run.status}, run ID: ${run.id}`); + if (run.status === "requires_action" && run.requiredAction) { + console.log(`Run requires action - ${run.requiredAction}`); + if ( + isOutputOfType(run.requiredAction, "submit_tool_outputs") + ) { + const submitToolOutputsActionOutput = run.requiredAction as SubmitToolOutputsActionOutput; + const toolCalls = submitToolOutputsActionOutput.submitToolOutputs.toolCalls; + for (const toolCall of toolCalls) { + if (isOutputOfType(toolCall, "function")) { + const functionOutput = toolCall as FunctionToolDefinitionOutput; + console.log(`Function tool call - ${functionOutput.function.name}`); + const toolResponse = getCurrentDateTime(); + toolCalled = true; + run = await agents.submitToolOutputsToRun(thread.id, run.id, [ + { toolCallId: toolCall.id, output: JSON.stringify(toolResponse) }, + ]); + console.log(`Submitted tool response - ${run.status}`); + } + } + } + } + } + assert.oneOf(run.status, ["cancelled", "failed", "completed", "expired"]); + assert.isTrue(toolCalled); + console.log(`Run status - ${run.status}, run ID: ${run.id}`); + const messages = await agents.listMessages(thread.id); + messages.data.forEach((threadMessage) => { + console.log( + `Thread Message Created at - ${threadMessage.createdAt} - Role - ${threadMessage.role}`, + ); + threadMessage.content.forEach((content: MessageContentOutput) => { + if (isOutputOfType(content, "text")) { + const textContent = content as MessageTextContentOutput; + console.log(`Text Message Content - ${textContent.text.value}`); + } else if (isOutputOfType(content, "image_file")) { + const imageContent = content as MessageImageFileContentOutput; + console.log(`Image Message Content - ${imageContent.imageFile.fileId}`); + } + }); + }); + + // Delete agent + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/messages.spec.ts b/sdk/ai/ai-projects/test/public/agents/messages.spec.ts new file mode 100644 index 000000000000..dd3b8bd5c007 --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/messages.spec.ts @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - messages", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("client and agents operations are accessible", async function () { + assert.isNotNull(projectsClient); + assert.isNotNull(agents); + }); + + it("should create message", async function () { + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + assert.isNotNull(message); + assert.isNotNull(message.id); + + // Delete thread + await agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + }); + + it("should list messages", async function () { + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create messages + const firstMessage = await agents.createMessage(thread.id, { + role: "user", + content: "knock knock", + }); + const secondMessage = await agents.createMessage(thread.id, { + role: "assistant", + content: "who's there?", + }); + console.log(`Created messages, message IDs: ${firstMessage.id}, ${secondMessage.id}`); + + // List messages + const messages = await agents.listMessages(thread.id); + assert.isNotEmpty(messages); + assert.equal(messages.data.length, 2); + assert.equal(messages.data[1].id, firstMessage.id); + assert.equal(messages.data[0].id, secondMessage.id); + console.log(`Listed ${messages.data.length} messages, thread ID: ${thread.id}`); + + // Delete thread + await agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + }); + + it("should update message", async function () { + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Update message + const updatedMessage = await agents.updateMessage(thread.id, message.id, { + metadata: { key: "value" }, + }); + assert.isNotNull(updatedMessage); + assert.equal(updatedMessage.id, message.id); + assert.equal(updatedMessage.metadata?.key, "value"); + console.log( + `Updated message to have metadata "key":"${updatedMessage.metadata?.key}", message ID: ${updatedMessage.id}`, + ); + + // Delete thread + await agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/runSteps.spec.ts b/sdk/ai/ai-projects/test/public/agents/runSteps.spec.ts new file mode 100644 index 000000000000..86eda91364ed --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/runSteps.spec.ts @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import { delay } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - run steps", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should list run steps", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create run + let run = await agents.createRun(thread.id, agent.id); + console.log(`Created run, run ID: ${run.id}`); + + // Wait for run to complete + assert.oneOf(run.status, ["queued", "in_progress", "requires_action", "completed"]); + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await delay(1000); + run = await agents.getRun(thread.id, run.id); + console.log(`Run status: ${run.status}`); + assert.include(["queued", "in_progress", "requires_action", "completed"], run.status); + } + + // List run steps + const runSteps = await agents.listRunSteps(thread.id, run.id); + assert.isNotNull(runSteps.data); + + // Clean up + await agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + }); + + it("should get steps", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "hello, world!", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Create run + let run = await agents.createRun(thread.id, agent.id); + console.log(`Created run, run ID: ${run.id}`); + + // Wait for run to complete + assert.oneOf(run.status, ["queued", "in_progress", "requires_action", "completed"]); + console.log(`Run status - ${run.status}, run ID: ${run.id}`); + while (["queued", "in_progress", "requires_action"].includes(run.status)) { + await delay(1000); + run = await agents.getRun(thread.id, run.id); + console.log(`Run status - ${run.status}, run ID: ${run.id}`); + assert.include(["queued", "in_progress", "requires_action", "completed"], run.status); + } + + // List run steps + const runSteps = await agents.listRunSteps(thread.id, run.id); + assert.isNotNull(runSteps.data); + assert.isTrue(runSteps.data.length > 0); + console.log(`Listed run steps, run ID: ${run.id}`); + + // Get specific run step + const stepId = runSteps.data[0].id; + const step = await agents.getRunStep(thread.id, run.id, stepId); + console.log(`Retrieved run, step ID: ${stepId}`); + assert.isNotNull(step); + assert.equal(step.id, stepId); + + // Clean up + await agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/runs.spec.ts b/sdk/ai/ai-projects/test/public/agents/runs.spec.ts new file mode 100644 index 000000000000..21682dc31465 --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/runs.spec.ts @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import { delay } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - Run", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should create agent and run agent", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + assert.isNotNull(agent); + assert.isNotNull(agent.id); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + assert.isNotNull(thread); + assert.isNotNull(thread.id); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create run + const run = await agents.createRun(thread.id, agent.id); + assert.isNotNull(run); + assert.isNotNull(run.id); + console.log(`Created Run, Run ID: ${run.id}`); + + // Delete agent and thread + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + await agents.deleteThread(thread.id); + console.log(`Deleted Thread, thread ID: ${thread.id}`); + }); + + it("should create and get run", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + assert.isNotNull(agent); + assert.isNotNull(agent.id); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + assert.isNotNull(thread); + assert.isNotNull(thread.id); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create run + const run = await agents.createRun(thread.id, agent.id); + assert.isNotNull(run); + assert.isNotNull(run.id); + console.log(`Created Run, Run ID: ${run.id}`); + + // Get run + const runDetails = await agents.getRun(thread.id, run.id); + assert.isNotNull(runDetails); + assert.isNotNull(runDetails.id); + assert.equal(run.id, runDetails.id); + console.log(`Retrieved run, Run ID: ${runDetails.id}`); + + // Delete agent and thread + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + await agents.deleteThread(thread.id); + console.log(`Deleted Thread, thread ID: ${thread.id}`); + }); + + it("should create and get run status", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + assert.isNotNull(agent); + assert.isNotNull(agent.id); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + assert.isNotNull(thread); + assert.isNotNull(thread.id); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "Hello, tell me a joke", + }); + assert.isNotNull(message.id); + console.log(`Created message, message ID ${message.id}`); + + // Create run + const run = await agents.createRun(thread.id, agent.id); + assert.isNotNull(run); + assert.isNotNull(run.id); + console.log(`Created Run, Run ID: ${run.id}`); + + // Get run status + let runDetails = await agents.getRun(thread.id, run.id); + assert.isNotNull(runDetails); + assert.isNotNull(runDetails.id); + assert.equal(run.id, runDetails.id); + console.log(`Retrieved run status - ${runDetails.status}, run ID: ${runDetails.id}`); + + // Wait for status to update + assert.oneOf(runDetails.status, [ + "queued", + "in_progress", + "requires_action", + "cancelling", + "cancelled", + "failed", + "completed", + "expired", + ]); + while (["queued", "in_progress", "requires_action"].includes(runDetails.status)) { + await delay(1000); + runDetails = await agents.getRun(thread.id, run.id); + if (runDetails.lastError) { + console.log( + `Run status ${runDetails.status} - ${runDetails.lastError.code} - ${runDetails.lastError.message}`, + "color:red", + ); + } + if (runDetails) { + console.log(`Run status - ${runDetails.status}, run ID: ${runDetails.id}`); + } else { + console.log("Run details are undefined."); + } + } + assert.oneOf(runDetails.status, ["cancelled", "failed", "completed", "expired"]); + console.log(`Run status - ${runDetails.status}, run ID: ${runDetails.id}`); + + // Delete agent and thread + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + await agents.deleteThread(thread.id); + console.log(`Deleted Thread, thread ID: ${thread.id}`); + }); + + it("should create and list runs", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + assert.isNotNull(agent); + assert.isNotNull(agent.id); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + assert.isNotNull(thread); + assert.isNotNull(thread.id); + console.log(`Created Thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "Hello, tell me a joke", + }); + assert.isNotNull(message.id); + console.log(`Created message, message ID ${message.id}`); + + // Create run + const run = await agents.createRun(thread.id, agent.id); + assert.isNotNull(run); + assert.isNotNull(run.id); + console.log(`Created Run, Run ID: ${run.id}`); + + // Get run status + const runs = await agents.listRuns(thread.id); + assert.isNotNull(runs); + assert.isArray(runs.data); + console.log(`List - found no of runs: ${runs.data.length}, first run ID: ${runs.firstId}`); + const runDetails = runs.data.find((threadRun) => threadRun.id === run.id); + assert.isNotNull(runDetails); + if (runDetails) { + console.log(`Run status - ${runDetails.status}, run ID: ${runDetails.id}`); + } else { + console.log("Run details are undefined."); + } + + // Delete agent and thread + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + await agents.deleteThread(thread.id); + console.log(`Deleted Thread, thread ID: ${thread.id}`); + }); + + it("should create and run in single call", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4o", { + name: "my-agent", + instructions: "You are helpful agent", + }); + assert.isNotNull(agent); + assert.isNotNull(agent.id); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create run + const run = await agents.createThreadAndRun(agent.id, { + thread: { + messages: [ + { + role: "user", + content: "Hello, tell me a joke", + }, + ], + }, + }); + assert.isNotNull(run); + assert.isNotNull(run.id); + assert.isNotNull(run.threadId); + console.log(`Created Run, Run ID: ${run.id}, Thread ID: ${run.threadId}`); + console.log(`Started : ${run.createdAt}`); + + // Get run + const runDetails = await agents.getRun(run.threadId, run.id); + assert.isNotNull(runDetails); + assert.isNotNull(runDetails.id); + assert.equal(run.id, runDetails.id); + console.log(`Retrieved run, Run ID: ${runDetails.id}`); + + // Delete agent and thread + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + await agents.deleteThread(run.threadId); + console.log(`Deleted Thread, thread ID: ${run.threadId}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/streaming.spec.ts b/sdk/ai/ai-projects/test/public/agents/streaming.spec.ts new file mode 100644 index 000000000000..a22b42a134cf --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/streaming.spec.ts @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient, ThreadRunOutput } from "../../../src/index.js"; +import { MessageStreamEvent, RunStreamEvent } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - streaming", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should run streaming", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4-1106-preview", { + name: "My Friendly Test Assistant", + instructions: "You are helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Create message + const message = await agents.createMessage(thread.id, { + role: "user", + content: "Hello, tell me a joke", + }); + console.log(`Created message, message ID: ${message.id}`); + + // Run streaming + const streamEventMessages = await agents.createRun(thread.id, agent.id).stream(); + let hasEventMessages = false; + + for await (const eventMessage of streamEventMessages) { + hasEventMessages = true; + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log(`Thread Run Created - ${(eventMessage.data as ThreadRunOutput).assistantId}`); + break; + case MessageStreamEvent.ThreadMessageDelta: + console.log(`Thread Message Delta, thread ID: ${thread.id}`); + break; + case RunStreamEvent.ThreadRunCompleted: + console.log(`Thread Run Completed, thread ID: ${thread.id}`); + break; + } + } + assert.isTrue(hasEventMessages); + assert.isNotNull(streamEventMessages); + + // Delete agent and thread + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + await agents.deleteThread(thread.id); + console.log(`Deleted Thread, thread ID: ${thread.id}`); + }); + + // eslint-disable-next-line no-only-tests/no-only-tests + it("should create thread and run streaming", async function () { + // Create agent + const agent = await agents.createAgent("gpt-4-1106-preview", { + name: "My Friendly Test Assistant", + instructions: "You are helpful agent", + }); + console.log(`Created agent, agent ID: ${agent.id}`); + + // Create thread and run streaming + const streamEventMessages = await agents + .createThreadAndRun(agent.id, { + thread: { messages: [{ role: "user", content: "Hello, tell me a joke" }] }, + }) + .stream(); + + let hasEventMessages = false; + for await (const eventMessage of streamEventMessages) { + hasEventMessages = true; + switch (eventMessage.event) { + case RunStreamEvent.ThreadRunCreated: + console.log("Thread Run Created"); + break; + case MessageStreamEvent.ThreadMessageDelta: + console.log("Thread Message Delta"); + break; + case RunStreamEvent.ThreadRunCompleted: + console.log("Thread Run Completed"); + break; + } + } + assert.isTrue(hasEventMessages); + assert.isNotNull(streamEventMessages); + + // Delete agent + await agents.deleteAgent(agent.id); + console.log(`Deleted agent, agent ID: ${agent.id}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/threads.spec.ts b/sdk/ai/ai-projects/test/public/agents/threads.spec.ts new file mode 100644 index 000000000000..da8415a0eabc --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/threads.spec.ts @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - threads", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("client and agents operations are accessible", async function () { + assert.isNotNull(projectsClient); + assert.isNotNull(agents); + }); + + it("should create thread", async function () { + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + assert.isNotNull(thread); + assert.isNotNull(thread.id); + + // Delete thread + await agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + }); + + it("should retrieve thread", async function () { + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Retrieve thread + const _thread = await agents.getThread(thread.id); + assert.isNotEmpty(_thread); + assert.equal(_thread.id, thread.id); + console.log(`Retrieved thread, thread ID: ${_thread.id}`); + + // Delete thread + await agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + }); + + it("should update thread", async function () { + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Update thread + await agents.updateThread(thread.id, { metadata: { key: "value" } }); + const _thread = await agents.getThread(thread.id); + assert.equal(_thread.id, thread.id); + assert.isNotEmpty(_thread.metadata); + assert.equal(_thread.metadata?.key, "value"); + console.log( + `Updated thread to have metadata "key":"${_thread.metadata?.key}", thread ID: ${_thread.id}`, + ); + + // Delete thread + await agents.deleteThread(thread.id); + console.log(`Deleted thread, thread ID: ${thread.id}`); + }); + + it("should delete thread", async function () { + // Create thread + const thread = await agents.createThread(); + console.log(`Created thread, thread ID: ${thread.id}`); + + // Delete thread + const deleted = await agents.deleteThread(thread.id); + assert.isNotNull(deleted); + console.log(`Deleted thread, thread ID: ${thread.id}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/tracing.spec.ts b/sdk/ai/ai-projects/test/public/agents/tracing.spec.ts new file mode 100644 index 000000000000..2b56026dd0cc --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/tracing.spec.ts @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createMockProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe, vi } from "vitest"; +import type { MockTracingSpan } from "@azure-tools/test-utils-vitest"; +import { MockInstrumenter } from "@azure-tools/test-utils-vitest"; +import type { + AddEventOptions, + Instrumenter, + InstrumenterSpanOptions, + TracingContext, + TracingSpan, +} from "@azure/core-tracing"; +import { useInstrumenter } from "@azure/core-tracing"; +import type { + ThreadRunOutput, + ThreadMessageOutput, + AgentThreadOutput, + AgentOutput, +} from "../../../src/generated/src/index.js"; + +interface ExtendedMockTrackingSpan extends MockTracingSpan { + events?: { name: string; attributes: Record }[]; + addEvent?(eventName: string, options?: AddEventOptions): void; +} +class ExtendedMockInstrumenter extends MockInstrumenter { + extendSpan(span: any): void { + if (!span.events) { + span.events = []; + } + span.addEvent = (eventName: string, options?: AddEventOptions) => { + span.events.push({ name: eventName, ...options }); + }; + } + startSpan( + name: string, + spanOptions?: InstrumenterSpanOptions, + ): { span: TracingSpan; tracingContext: TracingContext } { + const { span, tracingContext } = super.startSpan(name, spanOptions); + this.extendSpan(span); + return { span, tracingContext }; + } +} + +describe("Agent Tracing", () => { + let instrumenter: Instrumenter; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + let response: any = {}; + let status = 200; + beforeEach(async function () { + instrumenter = new ExtendedMockInstrumenter(); + useInstrumenter(instrumenter); + + projectsClient = createMockProjectsClient(() => { + return { bodyAsText: JSON.stringify(response), status: status }; + }); + agents = projectsClient.agents; + }); + + afterEach(async function () { + (instrumenter as MockInstrumenter).reset(); + vi.clearAllMocks(); + response = {}; + status = 200; + }); + + it("create agent", async function () { + const agentResponse: Partial = { id: "agentId", object: "assistant" }; + response = agentResponse; + status = 200; + const request = { + name: "agentName", + instructions: "You are helpful agent", + response_format: "json", + }; + const model = "gpt-4o"; + await agents.createAgent(model, request); + const mockedInstrumenter = instrumenter as MockInstrumenter; + assert.isAbove(mockedInstrumenter.startedSpans.length, 0); + const span = mockedInstrumenter.startedSpans[0] as ExtendedMockTrackingSpan; + assert.equal(span.attributes["gen_ai.agent.id"], agentResponse.id); + assert.equal(span.attributes["gen_ai.operation.name"], "create_agent"); + assert.equal(span.attributes["gen_ai.agent.name"], request.name); + assert.equal(span.attributes["gen_ai.request.model"], model); + const event = span.events?.find((e) => e.name === "gen_ai.system.message"); + assert.isDefined(event); + assert.equal( + event?.attributes["gen_ai.event.content"], + JSON.stringify({ content: request.instructions }), + ); + }); + + it("create run", async function () { + const runResponse: Partial = { + id: "runId", + object: "thread.run", + status: "queued", + thread_id: "threadId", + assistant_id: "agentId", + }; + response = runResponse; + status = 200; + await agents.createRun("threadId", "agentId"); + const mockedInstrumenter = instrumenter as MockInstrumenter; + assert.isAbove(mockedInstrumenter.startedSpans.length, 0); + const span = mockedInstrumenter.startedSpans[0] as ExtendedMockTrackingSpan; + assert.equal(span.attributes["gen_ai.thread.id"], runResponse.thread_id); + assert.equal(span.attributes["gen_ai.operation.name"], "create_run"); + assert.equal(span.attributes["gen_ai.agent.id"], runResponse.assistant_id); + assert.equal(span.attributes["gen_ai.thread.run.status"], runResponse.status); + assert.equal(span.events!.length, 1); + }); + + it("create Thread", async function () { + const threadResponse: Partial = { id: "threadId", object: "thread" }; + response = threadResponse; + status = 200; + await agents.createThread(); + const mockedInstrumenter = instrumenter as MockInstrumenter; + assert.isAbove(mockedInstrumenter.startedSpans.length, 0); + const span = mockedInstrumenter.startedSpans[0]; + assert.equal(span.attributes["gen_ai.thread.id"], threadResponse.id); + assert.equal(span.attributes["gen_ai.operation.name"], "create_thread"); + }); + + it("create Message", async function () { + const messageResponse: Partial = { + id: "messageId", + object: "thread.message", + thread_id: "threadId", + }; + projectsClient.telemetry.updateSettings({ enableContentRecording: true }); + response = messageResponse; + status = 200; + const request = { content: "hello, world!", role: "user" }; + await agents.createMessage("threadId", request); + const mockedInstrumenter = instrumenter as MockInstrumenter; + assert.isAbove(mockedInstrumenter.startedSpans.length, 0); + const span = mockedInstrumenter.startedSpans[0] as ExtendedMockTrackingSpan; + assert.equal(span.attributes["gen_ai.thread.id"], messageResponse.thread_id); + assert.equal(span.attributes["gen_ai.operation.name"], "create_message"); + const event = span.events?.find((e) => e.name === "gen_ai.user.message"); + assert.isDefined(event); + assert.equal(event?.attributes["gen_ai.event.content"], JSON.stringify(request)); + assert.equal(event?.attributes["gen_ai.thread.id"], messageResponse.thread_id); + assert.equal(event?.name, "gen_ai.user.message"); + }); + + it("list messages", async function () { + const listMessages = { + object: "list", + data: [ + { + id: "messageId", + object: "thread.message", + thread_id: "threadId", + role: "assistant", + content: [{ type: "text", text: { value: "You are helpful agent" } }], + }, + { + id: "messageId2", + object: "thread.message", + thread_id: "threadId", + role: "user", + content: [{ type: "text", text: { value: "Hello, tell me a joke" } }], + }, + ], + }; + response = listMessages; + projectsClient.telemetry.updateSettings({ enableContentRecording: true }); + status = 200; + await agents.listMessages("threadId"); + const mockedInstrumenter = instrumenter as MockInstrumenter; + assert.isAbove(mockedInstrumenter.startedSpans.length, 0); + const span = mockedInstrumenter.startedSpans[0] as ExtendedMockTrackingSpan; + assert.isDefined(span.events); + assert.equal(span.events!.length, 2); + assert.equal( + span.events![0].attributes["gen_ai.event.content"], + JSON.stringify({ + content: { text: listMessages.data[0].content[0].text }, + role: listMessages.data[0].role, + }), + ); + assert.equal(span.events![0].name, "gen_ai.assistant.message"); + assert.equal( + span.events![1].attributes["gen_ai.event.content"], + JSON.stringify({ + content: { text: listMessages.data[1].content[0].text }, + role: listMessages.data[1].role, + }), + ); + assert.equal(span.events![1].name, "gen_ai.user.message"); + }); + + it("Submit tool outputs to run", async function () { + const submitToolOutputs = { + object: "thread.run", + id: "runId", + status: "queued", + thread_id: "threadId", + assistant_id: "agentId", + }; + response = submitToolOutputs; + status = 200; + const toolOutputs = [ + { toolCallId: "toolcallId1", output: "output1" }, + { toolCallId: "toolcallId2", output: "output2" }, + ]; + await agents.submitToolOutputsToRun("threadId", "runId", toolOutputs); + const mockedInstrumenter = instrumenter as MockInstrumenter; + assert.isAbove(mockedInstrumenter.startedSpans.length, 0); + const span = mockedInstrumenter.startedSpans[0] as ExtendedMockTrackingSpan; + assert.equal(span.attributes["gen_ai.thread.id"], submitToolOutputs.thread_id); + assert.equal(span.attributes["gen_ai.operation.name"], "submit_tool_outputs"); + assert.equal(span.attributes["gen_ai.thread.run.status"], submitToolOutputs.status); + assert.isDefined(span.events); + assert.equal(span.events!.length, 2); + assert.equal( + span.events![0].attributes["gen_ai.event.content"], + JSON.stringify({ content: toolOutputs[0].output, id: toolOutputs[0].toolCallId }), + ); + assert.equal(span.events![0].name, "gen_ai.tool.message"); + assert.equal( + span.events![1].attributes["gen_ai.event.content"], + JSON.stringify({ content: toolOutputs[1].output, id: toolOutputs[1].toolCallId }), + ); + assert.equal(span.events![1].name, "gen_ai.tool.message"); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/vectorStores.spec.ts b/sdk/ai/ai-projects/test/public/agents/vectorStores.spec.ts new file mode 100644 index 000000000000..f55ad4f2a487 --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/vectorStores.spec.ts @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - vector stores", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("client and agents operations are accessible", async function () { + assert.isNotNull(projectsClient); + assert.isNotNull(agents); + }); + + it("should create vector store", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + assert.isNotNull(vectorStore); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Delete vector store + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should delete vector store", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Delete vector store + const deletionStatus = await agents.deleteVectorStore(vectorStore.id); + assert.isTrue(deletionStatus.deleted); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("get vector store", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Retrieve vector store + const _vectorStore = await agents.getVectorStore(vectorStore.id); + assert.equal(_vectorStore.id, vectorStore.id); + console.log(`Retrieved vector store, vector store ID: ${_vectorStore.id}`); + + // Delete vector store + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("list vector stores", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // List vector stores + const vectorStores = await agents.listVectorStores(); + assert.isNotNull(vectorStores); + assert.isAtLeast(vectorStores.data.length, 1); + console.log(`Listed ${vectorStores.data.length} vector stores`); + + // Delete vector store + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("modify vector store", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Modify vector store + const updatedVectorStore = await agents.modifyVectorStore(vectorStore.id, { name: "updated" }); + assert.equal(updatedVectorStore.id, vectorStore.id); + assert.equal(updatedVectorStore.name, "updated"); + console.log( + `Updated vector store name to ${updatedVectorStore.name}, vector store ID: ${updatedVectorStore.id}`, + ); + + // Delete vector store + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should create vector store and poll", async function () { + // Create vector store + const poller = agents.createVectorStoreAndPoll(); + const vectorStore = await poller.pollUntilDone(); + assert.isNotNull(vectorStore); + assert.notEqual(vectorStore.status, "in_progress"); + console.log( + `Created vector store with status ${vectorStore.status}, vector store ID: ${vectorStore.id}`, + ); + + // Delete vector store + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/vectorStoresFileBatches.spec.ts b/sdk/ai/ai-projects/test/public/agents/vectorStoresFileBatches.spec.ts new file mode 100644 index 000000000000..e11a9453b52b --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/vectorStoresFileBatches.spec.ts @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - vector stores file batches", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("client and agents operations are accessible", async function () { + assert.isNotNull(projectsClient); + assert.isNotNull(agents); + }); + + it("should create a vector store file batch", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload files + const file1Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file1 = await agents.uploadFile(file1Content, "assistants", { fileName: "file1.txt" }); + console.log(`Uploaded file1, file1 ID: ${file1.id}`); + + const file2Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file2 = await agents.uploadFile(file2Content, "assistants", { fileName: "file2.txt" }); + console.log(`Uploaded file2, file2 ID: ${file2.id}`); + + // Create vector store file batch + const vectorStoreFileBatch = await agents.createVectorStoreFileBatch(vectorStore.id, { + fileIds: [file1.id, file2.id], + }); + assert.isNotNull(vectorStoreFileBatch); + assert.isNotEmpty(vectorStoreFileBatch.id); + assert.equal(vectorStoreFileBatch.vectorStoreId, vectorStore.id); + console.log( + `Created vector store file batch, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Clean up + await agents.deleteFile(file1.id); + console.log(`Deleted file1, file1 ID: ${file1.id}`); + await agents.deleteFile(file2.id); + console.log(`Deleted file2, file2 ID: ${file2.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should retrieve a vector store file batch", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload files + const file1Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file1 = await agents.uploadFile(file1Content, "assistants", { fileName: "file1.txt" }); + console.log(`Uploaded file1, file1 ID: ${file1.id}`); + + const file2Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file2 = await agents.uploadFile(file2Content, "assistants", { fileName: "file2.txt" }); + console.log(`Uploaded file2, file2 ID: ${file2.id}`); + + // Create vector store file batch + const vectorStoreFileBatch = await agents.createVectorStoreFileBatch(vectorStore.id, { + fileIds: [file1.id, file2.id], + }); + console.log( + `Created vector store file batch, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Retrieve vector store file batch + const _vectorStoreFileBatch = await agents.getVectorStoreFileBatch( + vectorStore.id, + vectorStoreFileBatch.id, + ); + assert.isNotNull(_vectorStoreFileBatch); + assert.equal(_vectorStoreFileBatch.id, vectorStoreFileBatch.id); + console.log( + `Retrieved vector store file batch, vector store file batch ID: ${_vectorStoreFileBatch.id}`, + ); + + // Clean up + await agents.deleteFile(file1.id); + console.log(`Deleted file1, file1 ID: ${file1.id}`); + await agents.deleteFile(file2.id); + console.log(`Deleted file2, file2 ID: ${file2.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should list vector store file batches", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload files + const file1Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file1 = await agents.uploadFile(file1Content, "assistants", { fileName: "file1.txt" }); + console.log(`Uploaded file1, file1 ID: ${file1.id}`); + + const file2Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file2 = await agents.uploadFile(file2Content, "assistants", { fileName: "file2.txt" }); + console.log(`Uploaded file2, file2 ID: ${file2.id}`); + + // Create vector store file batch + const vectorStoreFileBatch = await agents.createVectorStoreFileBatch(vectorStore.id, { + fileIds: [file1.id, file2.id], + }); + console.log( + `Created vector store file batch, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // List vector store files in the batch + const vectorStoreFiles = await agents.listVectorStoreFileBatchFiles( + vectorStore.id, + vectorStoreFileBatch.id, + ); + assert.isNotNull(vectorStoreFiles); + assert.equal(vectorStoreFiles.data.length, 2); + console.log( + `Listed ${vectorStoreFiles.data.length} vector store files in the batch, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Clean up + await agents.deleteFile(file1.id); + console.log(`Deleted file1, file1 ID: ${file1.id}`); + await agents.deleteFile(file2.id); + console.log(`Deleted file2, file2 ID: ${file2.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should cancel a vector store file batch", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload files + const file1Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file1 = await agents.uploadFile(file1Content, "assistants", { fileName: "file1.txt" }); + console.log(`Uploaded file1, file1 ID: ${file1.id}`); + + const file2Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file2 = await agents.uploadFile(file2Content, "assistants", { fileName: "file2.txt" }); + console.log(`Uploaded file2, file2 ID: ${file2.id}`); + + // Create vector store file batch + const vectorStoreFileBatch = await agents.createVectorStoreFileBatch(vectorStore.id, { + fileIds: [file1.id, file2.id], + }); + console.log( + `Created vector store file batch, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Cancel vector store file batch + const cancelled = await agents.cancelVectorStoreFileBatch( + vectorStore.id, + vectorStoreFileBatch.id, + ); + assert.isNotNull(cancelled.status); + + // Clean up + await agents.deleteFile(file1.id); + console.log(`Deleted file1, file1 ID: ${file1.id}`); + await agents.deleteFile(file2.id); + console.log(`Deleted file2, file2 ID: ${file2.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should create a vector store file batch and poll", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload files + const file1Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file1 = await agents.uploadFile(file1Content, "assistants", { fileName: "file1.txt" }); + console.log(`Uploaded file1, file1 ID: ${file1.id}`); + + const file2Content = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file2 = await agents.uploadFile(file2Content, "assistants", { fileName: "file2.txt" }); + console.log(`Uploaded file2, file2 ID: ${file2.id}`); + + // Create vector store file batch + const poller = agents.createVectorStoreFileBatchAndPoll(vectorStore.id, { + fileIds: [file1.id, file2.id], + }); + const vectorStoreFileBatch = await poller.pollUntilDone(); + assert.isNotNull(vectorStoreFileBatch); + assert.isNotEmpty(vectorStoreFileBatch.id); + assert.equal(vectorStoreFileBatch.vectorStoreId, vectorStore.id); + assert.notEqual(vectorStoreFileBatch.status, "in_progress"); + console.log( + `Created vector store file batch with status ${vectorStoreFileBatch.status}, vector store file batch ID: ${vectorStoreFileBatch.id}`, + ); + + // Clean up + await agents.deleteFile(file1.id); + console.log(`Deleted file1, file1 ID: ${file1.id}`); + await agents.deleteFile(file2.id); + console.log(`Deleted file2, file2 ID: ${file2.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/agents/vectorStoresFiles.spec.ts b/sdk/ai/ai-projects/test/public/agents/vectorStoresFiles.spec.ts new file mode 100644 index 000000000000..86edcf72a43b --- /dev/null +++ b/sdk/ai/ai-projects/test/public/agents/vectorStoresFiles.spec.ts @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AgentsOperations, AIProjectsClient } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - vector stores files", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let agents: AgentsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + agents = projectsClient.agents; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("client and agents operations are accessible", async function () { + assert.isNotNull(projectsClient); + assert.isNotNull(agents); + }); + + it("should create a vector store file", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload file + const fileContent = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file = await agents.uploadFile(fileContent, "assistants", { fileName: "filename.txt" }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store file + const vectorStoreFile = await agents.createVectorStoreFile(vectorStore.id, { fileId: file.id }); + assert.isNotNull(vectorStoreFile); + assert.isNotEmpty(vectorStoreFile.id); + console.log(`Created vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Clean up + await agents.deleteVectorStoreFile(vectorStore.id, vectorStoreFile.id); + console.log(`Deleted vector store file, vector store file ID: ${vectorStoreFile.id}`); + await agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should retrieve a vector store file", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload file + const fileContent = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file = await agents.uploadFile(fileContent, "assistants", { fileName: "filename.txt" }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store file + const vectorStoreFile = await agents.createVectorStoreFile(vectorStore.id, { fileId: file.id }); + console.log(`Created vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Retrieve vector store file + const _vectorStoreFile = await agents.getVectorStoreFile(vectorStore.id, vectorStoreFile.id); + assert.isNotNull(_vectorStoreFile); + assert.equal(_vectorStoreFile.id, vectorStoreFile.id); + console.log(`Retrieved vector store file, vector store file ID: ${_vectorStoreFile.id}`); + + // Clean up + await agents.deleteVectorStoreFile(vectorStore.id, vectorStoreFile.id); + console.log(`Deleted vector store file, vector store file ID: ${vectorStoreFile.id}`); + await agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should list vector store files", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload file + const fileContent = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file = await agents.uploadFile(fileContent, "assistants", { fileName: "filename.txt" }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store file + const vectorStoreFile = await agents.createVectorStoreFile(vectorStore.id, { fileId: file.id }); + console.log(`Created vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Clean up + await agents.deleteVectorStoreFile(vectorStore.id, vectorStoreFile.id); + console.log(`Deleted vector store file, vector store file ID: ${vectorStoreFile.id}`); + await agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should delete a vector store file", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload file + const fileContent = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file = await agents.uploadFile(fileContent, "assistants", { fileName: "fileName.txt" }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store file + const vectorStoreFile = await agents.createVectorStoreFile(vectorStore.id, { fileId: file.id }); + console.log(`Created vector store file, vector store file ID: ${vectorStoreFile.id}`); + + // Clean up + const deletionStatus = await agents.deleteVectorStoreFile(vectorStore.id, vectorStoreFile.id); + assert(deletionStatus.deleted); + console.log(`Deleted vector store file, vector store file ID: ${vectorStoreFile.id}`); + await agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); + + it("should create a vector store file and poll.", async function () { + // Create vector store + const vectorStore = await agents.createVectorStore(); + console.log(`Created vector store, vector store ID: ${vectorStore.id}`); + + // Upload file + const fileContent = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("fileContent")); + controller.close(); + }, + }); + const file = await agents.uploadFile(fileContent, "assistants", { fileName: "filename.txt" }); + console.log(`Uploaded file, file ID: ${file.id}`); + + // Create vector store file and poll + const poller = agents.createVectorStoreFileAndPoll(vectorStore.id, { + fileId: file.id, + }); + const vectorStoreFile = await poller.pollUntilDone(); + assert.isNotNull(vectorStoreFile); + assert.isNotEmpty(vectorStoreFile.id); + assert.notEqual(vectorStoreFile.status, "in_progress"); + console.log( + `Created vector store file with status ${vectorStoreFile.status}, vector store file ID: ${vectorStoreFile.id}`, + ); + + // Clean up + await agents.deleteVectorStoreFile(vectorStore.id, vectorStoreFile.id); + console.log(`Deleted vector store file, vector store file ID: ${vectorStoreFile.id}`); + await agents.deleteFile(file.id); + console.log(`Deleted file, file ID: ${file.id}`); + await agents.deleteVectorStore(vectorStore.id); + console.log(`Deleted vector store, vector store ID: ${vectorStore.id}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/connections/connections.spec.ts b/sdk/ai/ai-projects/test/public/connections/connections.spec.ts new file mode 100644 index 000000000000..639ed77daf3a --- /dev/null +++ b/sdk/ai/ai-projects/test/public/connections/connections.spec.ts @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AIProjectsClient, ConnectionsOperations } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("Agents - assistants", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let connections: ConnectionsOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + connections = projectsClient.connections; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("client and connection operations are accessible", async function () { + assert.isNotNull(projectsClient); + assert.isNotNull(connections); + }); + + it("should list connections", async function () { + // List connections + const connectionsList = await connections.listConnections(); + assert.isNotNull(connectionsList); + assert.isAtLeast(connectionsList.length, 1); + console.log(`Retrieved ${connectionsList.length} connections`); + }); + + it("should retrieve a connection without secrets", async function () { + // List connections + const connectionsList = await connections.listConnections(); + assert.isNotNull(connectionsList); + assert.isAtLeast(connectionsList.length, 1); + + // Retrieve one connection + for (const _connection of connectionsList) { + const connectionName = _connection.name; + const connection = await connections.getConnection(connectionName); + assert.isNotNull(connection); + assert.equal(connection.name, connectionName); + console.log(`Retrieved connection, connection name: ${connection.name}`); + } + }); + + it("should retrieve a connection with secrets", async function () { + // List connections + const connectionsList = await connections.listConnections(); + assert.isNotNull(connectionsList); + assert.isAtLeast(connectionsList.length, 1); + + // Retrieve one connection with secrets + for (const _connection of connectionsList) { + const connectionName = _connection.name; + const connection = await connections.getConnectionWithSecrets(connectionName); + assert.isNotNull(connection); + assert.equal(connection.name, connectionName); + console.log(`Retrieved connection with secrets, connection name: ${connection.name}`); + } + }); +}); diff --git a/sdk/ai/ai-projects/test/public/telemetry/telemetry.spec.ts b/sdk/ai/ai-projects/test/public/telemetry/telemetry.spec.ts new file mode 100644 index 000000000000..1f19f895196f --- /dev/null +++ b/sdk/ai/ai-projects/test/public/telemetry/telemetry.spec.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; +import type { AIProjectsClient, TelemetryOperations } from "../../../src/index.js"; +import { createRecorder, createProjectsClient } from "../utils/createClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("AI Projects - Telemetry", () => { + let recorder: Recorder; + let projectsClient: AIProjectsClient; + let telemetry: TelemetryOperations; + + beforeEach(async function (context: VitestTestContext) { + recorder = await createRecorder(context); + projectsClient = createProjectsClient(recorder); + telemetry = projectsClient.telemetry; + }); + + afterEach(async function () { + await recorder.stop(); + }); + it("client and connection operations are accessible", async function () { + assert.isNotNull(projectsClient); + assert.isNotNull(telemetry); + }); + + it("update settings", async function () { + assert.equal(telemetry.getSettings().enableContentRecording, false); + telemetry.updateSettings({ enableContentRecording: true }); + assert.equal(telemetry.getSettings().enableContentRecording, true); + }); + + it("get settings", async function () { + const options = telemetry.getSettings(); + assert.equal(options.enableContentRecording, false); + options.enableContentRecording = true; + assert.equal(telemetry.getSettings().enableContentRecording, false); + }); + + it("get app insights connection string", async function () { + const connectionString = await telemetry.getConnectionString(); + assert.isNotEmpty(connectionString); + console.log(`Connection string retrieved ${connectionString}`); + }); +}); diff --git a/sdk/ai/ai-projects/test/public/utils/createClient.ts b/sdk/ai/ai-projects/test/public/utils/createClient.ts new file mode 100644 index 000000000000..4232d503bf3e --- /dev/null +++ b/sdk/ai/ai-projects/test/public/utils/createClient.ts @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; +import { Recorder } from "@azure-tools/test-recorder"; +import { createTestCredential } from "@azure-tools/test-credential"; +import { AIProjectsClient } from "../../../src/index.js"; +import type { ClientOptions } from "@azure-rest/core-client"; +import type { PipelineRequest, PipelineResponse } from "@azure/core-rest-pipeline"; +import { createHttpHeaders } from "@azure/core-rest-pipeline"; + +const replaceableVariables: Record = { + GENERIC_STRING: "Sanitized", + ENDPOINT: "Sanitized.azure.com", + SUBSCRIPTION_ID: "00000000-0000-0000-0000-000000000000", + RESOURCE_GROUP_NAME: "00000", + WORKSPACE_NAME: "00000", + DATASET_NAME: "00000", + TENANT_ID: "00000000-0000-0000-0000-000000000000", + USER_OBJECT_ID: "00000000-0000-0000-0000-000000000000", + API_KEY: "00000000000000000000000000000000000000000000000000000000000000000000", + AZURE_AI_PROJECTS_CONNECTION_STRING: `Sanitized.azure.com;00000000-0000-0000-0000-000000000000;00000;00000`, +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, + sanitizerOptions: { + generalSanitizers: [ + { + regex: true, + target: "(%2F|/)?subscriptions(%2F|/)([-\\w\\._\\(\\)]+)", + value: replaceableVariables.SUBSCRIPTION_ID, + groupForReplace: "3", + }, + { + regex: true, + target: "(%2F|/)?resource[gG]roups(%2F|/)([-\\w\\._\\(\\)]+)", + value: replaceableVariables.RESOURCE_GROUP_NAME, + groupForReplace: "3", + }, + { + regex: true, + target: "/workspaces/([-\\w\\._\\(\\)]+)", + value: replaceableVariables.WORKSPACE_NAME, + groupForReplace: "1", + }, + { + regex: true, + target: "/userAssignedIdentities/([-\\w\\._\\(\\)]+)", + value: replaceableVariables.GENERIC_STRING, + groupForReplace: "1", + }, + { + regex: true, + target: "/components/([-\\w\\._\\(\\)]+)", + value: replaceableVariables.GENERIC_STRING, + groupForReplace: "1", + }, + { + regex: true, + target: "/vaults/([-\\w\\._\\(\\)]+)", + value: replaceableVariables.GENERIC_STRING, + groupForReplace: "1", + }, + { + regex: true, + target: "(azureml|http|https):\\/\\/([^\\/]+)", + value: replaceableVariables.ENDPOINT, + groupForReplace: "2", + }, + ], + bodyKeySanitizers: [ + { + jsonPath: "properties.ConnectionString", + value: + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://region.applicationinsights.azure.com/;LiveEndpoint=https://region.livediagnostics.monitor.azure.com/;ApplicationId=00000000-0000-0000-0000-000000000000", + }, + { jsonPath: "properties.credentials.key", value: replaceableVariables.API_KEY }, + ], + }, + removeCentralSanitizers: ["AZSDK3430", "AZSDK3493"], +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder(context: VitestTestContext): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderEnvSetup); + return recorder; +} + +export function createProjectsClient( + recorder?: Recorder, + options?: ClientOptions, +): AIProjectsClient { + const credential = createTestCredential(); + const connectionString = process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + return AIProjectsClient.fromConnectionString( + connectionString, + credential, + recorder ? recorder.configureClientOptions(options ?? {}) : options, + ); +} + +export function createMockProjectsClient( + responseFn: (request: PipelineRequest) => Partial, +): AIProjectsClient { + const options: ClientOptions = { additionalPolicies: [] }; + options.additionalPolicies?.push({ + policy: { + name: "RequestMockPolicy", + sendRequest: async (req) => { + const response = responseFn(req); + return { + headers: createHttpHeaders(), + status: 200, + request: req, + ...response, + } as PipelineResponse; + }, + }, + position: "perCall", + }); + const credential = createTestCredential(); + const connectionString = process.env["AZURE_AI_PROJECTS_CONNECTION_STRING"] || ""; + return AIProjectsClient.fromConnectionString(connectionString, credential, options); +} diff --git a/sdk/ai/ai-projects/test/public/utils/env.ts b/sdk/ai/ai-projects/test/public/utils/env.ts new file mode 100644 index 000000000000..866412f4082d --- /dev/null +++ b/sdk/ai/ai-projects/test/public/utils/env.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import * as dotenv from "dotenv"; + +dotenv.config(); diff --git a/sdk/ai/ai-projects/tsconfig.browser.config.json b/sdk/ai/ai-projects/tsconfig.browser.config.json new file mode 100644 index 000000000000..1b37aebc5457 --- /dev/null +++ b/sdk/ai/ai-projects/tsconfig.browser.config.json @@ -0,0 +1,10 @@ +{ + "extends": "./.tshy/build.json", + "include": ["./src/**/*.ts", "./src/**/*.mts", "./test/**/*.spec.ts"], + "exclude": ["./test/**/node/**/*.ts"], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } +} diff --git a/sdk/ai/ai-projects/tsconfig.json b/sdk/ai/ai-projects/tsconfig.json new file mode 100644 index 000000000000..d5145a6dba19 --- /dev/null +++ b/sdk/ai/ai-projects/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../tsconfig", + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "rootDir": ".", + "skipLibCheck": true, + "paths": { "@azure/ai-projects": ["./src/index"] } + }, + "include": [ + "./src/**/*.ts", + "./src/**/*.mts", + "./src/**/*.cts", + "test/**/*.ts", + "src/**/*.ts", + "samples-dev/**/*.ts" + ] +} diff --git a/sdk/ai/ai-projects/tsp-location.yaml b/sdk/ai/ai-projects/tsp-location.yaml new file mode 100644 index 000000000000..c0cd4f77cb68 --- /dev/null +++ b/sdk/ai/ai-projects/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/ai/Azure.AI.Projects +commit: 0d2ca01a170641d8b1f5dace38b8995bb7563be8 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/ai/ai-projects/vitest.browser.config.ts b/sdk/ai/ai-projects/vitest.browser.config.ts new file mode 100644 index 000000000000..06b833108a4b --- /dev/null +++ b/sdk/ai/ai-projects/vitest.browser.config.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig } from "vitest/config"; +import { relativeRecordingsPath } from "@azure-tools/test-recorder"; + +process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); + +export default defineConfig({ + define: { + "process.env": process.env, + }, + test: { + testTimeout: 100000, + reporters: ["basic", "junit"], + outputFile: { + junit: "test-results.browser.xml", + }, + browser: { + enabled: true, + headless: true, + name: "chromium", + provider: "playwright", + }, + fakeTimers: { + toFake: ["setTimeout", "Date"], + }, + watch: false, + include: ["dist-test/browser/**/*.spec.js"], + coverage: { + include: ["dist-test/browser/**/*.spec.js"], + provider: "istanbul", + reporter: ["text", "json", "html"], + reportsDirectory: "coverage-browser", + }, + }, +}); diff --git a/sdk/ai/ai-projects/vitest.config.ts b/sdk/ai/ai-projects/vitest.config.ts new file mode 100644 index 000000000000..7b0763828b64 --- /dev/null +++ b/sdk/ai/ai-projects/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + testTimeout: 100000, + include: ["test/internal/**/*.spec.ts", "test/public/**/*.spec.ts"], + }, + }), +); diff --git a/sdk/ai/ci.yml b/sdk/ai/ci.yml index b5b1654928d4..ef3fbcc3de83 100644 --- a/sdk/ai/ci.yml +++ b/sdk/ai/ci.yml @@ -26,3 +26,6 @@ extends: Artifacts: - name: azure-rest-ai-inference safeName: azurerestaiinference + - name: azure-ai-projects + safeName: azureaaiprojects + From a65d4adba6f9f79a6ba76a572d904e9f4fcf5fd3 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Thu, 19 Dec 2024 14:58:57 -0800 Subject: [PATCH 24/55] [eslint] restore custom rules for bin scripts (#32305) The custom rules to suppress errors/warnings for bin scripts were removed in previous commits. This PR restores them. --- .../eslint.config.mjs | 13 +++++++++++++ .../ai-form-recognizer/eslint.config.mjs | 13 +++++++++++++ .../eslint.config.mjs | 9 +++++++++ 3 files changed, 35 insertions(+) create mode 100644 sdk/apimanagement/api-management-custom-widgets-scaffolder/eslint.config.mjs create mode 100644 sdk/formrecognizer/ai-form-recognizer/eslint.config.mjs diff --git a/sdk/apimanagement/api-management-custom-widgets-scaffolder/eslint.config.mjs b/sdk/apimanagement/api-management-custom-widgets-scaffolder/eslint.config.mjs new file mode 100644 index 000000000000..c75d40888727 --- /dev/null +++ b/sdk/apimanagement/api-management-custom-widgets-scaffolder/eslint.config.mjs @@ -0,0 +1,13 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + files: ["src/bin/execute.ts"], + rules: { + "n/no-process-exit": "off", + "n/hashbang": "off", + // shebang needs to come first + "@azure/azure-sdk/github-source-headers": "off", + }, + }, +]); diff --git a/sdk/formrecognizer/ai-form-recognizer/eslint.config.mjs b/sdk/formrecognizer/ai-form-recognizer/eslint.config.mjs new file mode 100644 index 000000000000..f8c54b5c37d8 --- /dev/null +++ b/sdk/formrecognizer/ai-form-recognizer/eslint.config.mjs @@ -0,0 +1,13 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + files: ["src/bin/gen-model.ts"], + rules: { + "n/no-process-exit": "off", + "n/hashbang": "off", + // shebang needs to come first + "@azure/azure-sdk/github-source-headers": "off", + }, + }, +]); diff --git a/sdk/playwrighttesting/create-microsoft-playwright-testing/eslint.config.mjs b/sdk/playwrighttesting/create-microsoft-playwright-testing/eslint.config.mjs index 4c8a7bd396dd..d2eaf0a185a1 100644 --- a/sdk/playwrighttesting/create-microsoft-playwright-testing/eslint.config.mjs +++ b/sdk/playwrighttesting/create-microsoft-playwright-testing/eslint.config.mjs @@ -1,4 +1,13 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; export default azsdkEslint.config([ + { + // shebang needs to come first + files: ["src/index.ts"], + rules: { + "n/no-process-exit": "off", + "n/hashbang": "off", + "@azure/azure-sdk/github-source-headers": "off", + }, + }, ]); From c5e8d31bd53f0137ddff025b1f98cd8d86d92efb Mon Sep 17 00:00:00 2001 From: Jeff Fisher Date: Thu, 19 Dec 2024 17:00:51 -0600 Subject: [PATCH 25/55] [engsys] inline eslint step into analyze template (#32304) ### Packages impacted by this PR None directly, this only touches CI. ### Describe the problem that is addressed by this PR We were seeing odd behavior in CI where the `rush install` inside of the lint step was failing, but since this task was only ever called from analyze, which has already executed `rush install` it seemed unnecessary. This change inlines the behavior from the run-estlint step and avoids the duplicate `rush install` call. --- eng/pipelines/templates/steps/analyze.yml | 7 ++++--- eng/pipelines/templates/steps/run-eslint.yml | 12 ------------ 2 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 eng/pipelines/templates/steps/run-eslint.yml diff --git a/eng/pipelines/templates/steps/analyze.yml b/eng/pipelines/templates/steps/analyze.yml index 6488bdb59320..8861e4fe3542 100644 --- a/eng/pipelines/templates/steps/analyze.yml +++ b/eng/pipelines/templates/steps/analyze.yml @@ -68,9 +68,10 @@ steps: node eng/tools/rush-runner/index.js build $(ChangedServices) -packages "$(ArtifactPackageNames)" --verbose -p max displayName: "Build libraries" - - template: /eng/pipelines/templates/steps/run-eslint.yml - parameters: - ServiceDirectories: $(ChangedServices) + - pwsh: | + node common/scripts/install-run-rush.js build -t @azure/eslint-plugin-azure-sdk -t @azure/monitor-opentelemetry-exporter + node eng/tools/rush-runner/index.js lint "$(ChangedServices)" -p max + displayName: "Build ESLint Plugin and Lint Libraries" - pwsh: | node eng/tools/rush-runner/index.js check-format $(ChangedServices) -packages "$(ArtifactPackageNames)" --verbose diff --git a/eng/pipelines/templates/steps/run-eslint.yml b/eng/pipelines/templates/steps/run-eslint.yml deleted file mode 100644 index 438daefe35bf..000000000000 --- a/eng/pipelines/templates/steps/run-eslint.yml +++ /dev/null @@ -1,12 +0,0 @@ -parameters: - ServiceDirectories: '' - -steps: - - script: | - node common/scripts/install-run-rush.js install - displayName: "Install library dependencies" - - - pwsh: | - node common/scripts/install-run-rush.js build -t @azure/eslint-plugin-azure-sdk -t @azure/monitor-opentelemetry-exporter - node eng/tools/rush-runner/index.js lint "${{parameters.ServiceDirectories}}" -p max - displayName: "Build ESLint Plugin and Lint Libraries" From b22ced01f084050904fd386ace9d09b80df60782 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:11:53 +0800 Subject: [PATCH 26/55] [data-plane] refresh @azure-rest/agrifood-farming sdk (#30779) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- .../agrifood-farming-rest/CHANGELOG.md | 9 +- .../agrifood-farming-rest/karma.conf.js | 133 ++++++++++++++++ .../agrifood-farming-rest/package.json | 9 +- .../review/agrifood-farming.api.md | 109 ++++++------- .../agrifood-farming-rest/src/farmBeats.ts | 51 ++++-- .../agrifood-farming-rest/src/isUnexpected.ts | 30 ++-- .../agrifood-farming-rest/src/logger.ts | 5 + .../src/paginateHelper.ts | 146 +++++++++++++++++- .../agrifood-farming-rest/src/parameters.ts | 8 +- .../src/pollingHelper.ts | 146 ++++++++++++++++-- .../agrifood-farming-rest/src/responses.ts | 28 ---- .../src/serializeHelper.ts | 4 +- .../agrifood-farming-rest/swagger/README.md | 3 + 13 files changed, 527 insertions(+), 154 deletions(-) create mode 100644 sdk/agrifood/agrifood-farming-rest/karma.conf.js create mode 100644 sdk/agrifood/agrifood-farming-rest/src/logger.ts diff --git a/sdk/agrifood/agrifood-farming-rest/CHANGELOG.md b/sdk/agrifood/agrifood-farming-rest/CHANGELOG.md index 8f40fb098c93..58d42accfe08 100644 --- a/sdk/agrifood/agrifood-farming-rest/CHANGELOG.md +++ b/sdk/agrifood/agrifood-farming-rest/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.3 (2024-12-16) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Refresh @azure-rest/agrifood-farming SDK ## 1.0.0-beta.2 (2023-02-24) diff --git a/sdk/agrifood/agrifood-farming-rest/karma.conf.js b/sdk/agrifood/agrifood-farming-rest/karma.conf.js new file mode 100644 index 000000000000..4fdf26c79ac0 --- /dev/null +++ b/sdk/agrifood/agrifood-farming-rest/karma.conf.js @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// https://github.com/karma-runner/karma-chrome-launcher +process.env.CHROME_BIN = require("puppeteer").executablePath(); +require("dotenv").config(); +const { relativeRecordingsPath } = require("@azure-tools/test-recorder"); +process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); + +module.exports = function (config) { + config.set({ + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: "./", + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ["source-map-support", "mocha"], + + plugins: [ + "karma-mocha", + "karma-mocha-reporter", + "karma-chrome-launcher", + "karma-firefox-launcher", + "karma-env-preprocessor", + "karma-coverage", + "karma-sourcemap-loader", + "karma-junit-reporter", + "karma-source-map-support", + ], + + // list of files / patterns to load in the browser + files: [ + "dist-test/index.browser.js", + { + pattern: "dist-test/index.browser.js.map", + type: "html", + included: false, + served: true, + }, + ], + + // list of files / patterns to exclude + exclude: [], + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + "**/*.js": ["sourcemap", "env"], + // IMPORTANT: COMMENT following line if you want to debug in your browsers!! + // Preprocess source file to calculate code coverage, however this will make source file unreadable + // "dist-test/index.js": ["coverage"] + }, + + envPreprocessor: [ + "TEST_MODE", + "ENDPOINT", + "AZURE_CLIENT_SECRET", + "AZURE_CLIENT_ID", + "AZURE_TENANT_ID", + "SUBSCRIPTION_ID", + "RECORDINGS_RELATIVE_PATH", + ], + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ["mocha", "coverage", "junit"], + + coverageReporter: { + // specify a common output directory + dir: "coverage-browser/", + reporters: [ + { type: "json", subdir: ".", file: "coverage.json" }, + { type: "lcovonly", subdir: ".", file: "lcov.info" }, + { type: "html", subdir: "html" }, + { type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" }, + ], + }, + + junitReporter: { + outputDir: "", // results will be saved as $outputDir/$browserName.xml + outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile + suite: "", // suite will become the package name attribute in xml testsuite element + useBrowserName: false, // add browser name to report and classes names + nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element + classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element + properties: {}, // key value pair of properties to add to the section of the report + }, + + // web server port + port: 9876, + + // enable / disable colors in the output (reporters and logs) + colors: true, + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: false, + + // --no-sandbox allows our tests to run in Linux without having to change the system. + // --disable-web-security allows us to authenticate from the browser without having to write tests using interactive auth, which would be far more complex. + browsers: ["ChromeHeadlessNoSandbox"], + customLaunchers: { + ChromeHeadlessNoSandbox: { + base: "ChromeHeadless", + flags: ["--no-sandbox", "--disable-web-security"], + }, + }, + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: 1, + + browserNoActivityTimeout: 60000000, + browserDisconnectTimeout: 10000, + browserDisconnectTolerance: 3, + + client: { + mocha: { + // change Karma's debug.html to the mocha web reporter + reporter: "html", + timeout: "600000", + }, + }, + }); +}; diff --git a/sdk/agrifood/agrifood-farming-rest/package.json b/sdk/agrifood/agrifood-farming-rest/package.json index 5b94666f4bf3..911295571cee 100644 --- a/sdk/agrifood/agrifood-farming-rest/package.json +++ b/sdk/agrifood/agrifood-farming-rest/package.json @@ -80,13 +80,14 @@ "dependencies": { "@azure-rest/core-client": "^1.0.0", "@azure/core-auth": "^1.3.0", - "@azure/core-lro": "^2.2.4", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.9.2", + "@azure/core-lro": "^3.1.0", "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" + "tslib": "^2.2.0", + "@azure/abort-controller": "^2.1.2" }, "devDependencies": { + "@azure-tools/test-utils": "^1.0.1", + "@azure/core-rest-pipeline": "^1.9.2", "@azure-tools/test-credential": "^2.0.0", "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", diff --git a/sdk/agrifood/agrifood-farming-rest/review/agrifood-farming.api.md b/sdk/agrifood/agrifood-farming-rest/review/agrifood-farming.api.md index c94a4b131b74..d6a4874c0a25 100644 --- a/sdk/agrifood/agrifood-farming-rest/review/agrifood-farming.api.md +++ b/sdk/agrifood/agrifood-farming-rest/review/agrifood-farming.api.md @@ -4,16 +4,16 @@ ```ts +import type { AbortSignalLike } from '@azure/abort-controller'; +import type { CancelOnProgress } from '@azure/core-lro'; import type { Client } from '@azure-rest/core-client'; import type { ClientOptions } from '@azure-rest/core-client'; import type { CreateHttpPollerOptions } from '@azure/core-lro'; import type { HttpResponse } from '@azure-rest/core-client'; import type { OperationState } from '@azure/core-lro'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; import type { PathUncheckedResponse } from '@azure-rest/core-client'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RequestParameters } from '@azure-rest/core-client'; -import type { SimplePollerLike } from '@azure/core-lro'; import type { StreamableMethod } from '@azure-rest/core-client'; import type { TokenCredential } from '@azure/core-auth'; @@ -138,8 +138,6 @@ export type ApplicationDataCreateOrUpdateParameters = ApplicationDataCreateOrUpd // @public export interface ApplicationDataDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -497,8 +495,6 @@ export type AttachmentsCreateOrUpdateParameters = AttachmentsCreateOrUpdateMedia // @public export interface AttachmentsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -787,8 +783,6 @@ export type BoundariesCreateOrUpdateParameters = BoundariesCreateOrUpdateMediaTy // @public export interface BoundariesDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -1178,7 +1172,7 @@ export interface BoundaryOverlapResponseOutput { export type BoundaryResourceMergeAndPatch = Partial; // @public (undocumented) -export function buildMultiCollection(queryParameters: string[], parameterName: string): string; +export function buildMultiCollection(items: string[], parameterName: string): string; // @public export interface CascadeDeleteJobOutput { @@ -1197,7 +1191,7 @@ export interface CascadeDeleteJobOutput { } // @public -function createClient($host: string, credentials: TokenCredential, options?: ClientOptions): FarmBeatsClient; +function createClient($host: string, credentials: TokenCredential, { apiVersion, ...options }?: FarmBeatsClientOptions): FarmBeatsClient; export default createClient; // @public @@ -1330,8 +1324,6 @@ export type CropProductsCreateOrUpdateParameters = CropProductsCreateOrUpdateMed // @public export interface CropProductsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -1495,8 +1487,6 @@ export type CropsCreateOrUpdateParameters = CropsCreateOrUpdateMediaTypesParam & // @public export interface CropsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -1718,8 +1708,6 @@ export type DeviceDataModelsCreateOrUpdateParameters = DeviceDataModelsCreateOrU // @public export interface DeviceDataModelsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -1908,8 +1896,6 @@ export type DevicesCreateOrUpdateParameters = DevicesCreateOrUpdateMediaTypesPar // @public export interface DevicesDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -2051,6 +2037,11 @@ export type FarmBeatsClient = Client & { path: Routes; }; +// @public +export interface FarmBeatsClientOptions extends ClientOptions { + apiVersion?: string; +} + // @public export interface FarmListResponseOutput { nextLink?: string; @@ -2274,8 +2265,6 @@ export type FarmsCreateOrUpdateParameters = FarmsCreateOrUpdateMediaTypesParam & // @public export interface FarmsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -2587,8 +2576,6 @@ export type FieldsCreateOrUpdateParameters = FieldsCreateOrUpdateMediaTypesParam // @public export interface FieldsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -2810,7 +2797,7 @@ export type GetArrayType = T extends Array ? TData : never; export function getLongRunningPoller(client: Client, initialResponse: TResult, options?: CreateHttpPollerOptions>): Promise, TResult>>; // @public -export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; @@ -2928,8 +2915,6 @@ export type HarvestDataCreateOrUpdateParameters = HarvestDataCreateOrUpdateMedia // @public export interface HarvestDataDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -3448,8 +3433,6 @@ export type InsightAttachmentsCreateOrUpdateParameters = InsightAttachmentsCreat // @public export interface InsightAttachmentsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -3719,8 +3702,6 @@ export type InsightsCreateOrUpdateParameters = InsightsCreateOrUpdateMediaTypesP // @public export interface InsightsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -4610,8 +4591,6 @@ export type ManagementZonesCreateOrUpdateParameters = ManagementZonesCreateOrUpd // @public export interface ManagementZonesDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -5105,8 +5084,6 @@ export type NutrientAnalysesCreateOrUpdateParameters = NutrientAnalysesCreateOrU // @public export interface NutrientAnalysesDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -5477,8 +5454,6 @@ export type OAuthProvidersCreateOrUpdateParameters = OAuthProvidersCreateOrUpdat // @public export interface OAuthProvidersDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -5803,6 +5778,18 @@ export interface OAuthTokensListQueryParamProperties { skipToken?: string; } +// @public +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} + +// @public +export interface PageSettings { + continuationToken?: string; +} + // @public export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; @@ -5903,8 +5890,6 @@ export type PartiesCreateOrUpdateParameters = PartiesCreateOrUpdateMediaTypesPar // @public export interface PartiesDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -6191,8 +6176,6 @@ export type PlantingDataCreateOrUpdateParameters = PlantingDataCreateOrUpdateMed // @public export interface PlantingDataDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -6557,8 +6540,6 @@ export type PlantTissueAnalysesCreateOrUpdateParameters = PlantTissueAnalysesCre // @public export interface PlantTissueAnalysesDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -7009,8 +6990,6 @@ export type PrescriptionMapsCreateOrUpdateParameters = PrescriptionMapsCreateOrU // @public export interface PrescriptionMapsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -7325,8 +7304,6 @@ export type PrescriptionsCreateOrUpdateParameters = PrescriptionsCreateOrUpdateM // @public export interface PrescriptionsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -7927,7 +7904,7 @@ export interface ScenesListQueryParamProperties { endDateTime?: Date | string; imageFormats?: string; imageNames?: string; - imageResolutions?: Array; + imageResolutions?: string; maxCloudCoveragePercentage?: number; maxDarkPixelCoveragePercentage?: number; maxPageSize?: number; @@ -8171,8 +8148,6 @@ export type SeasonalFieldsCreateOrUpdateParameters = SeasonalFieldsCreateOrUpdat // @public export interface SeasonalFieldsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -8453,8 +8428,6 @@ export type SeasonsCreateOrUpdateParameters = SeasonsCreateOrUpdateMediaTypesPar // @public export interface SeasonsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -8566,7 +8539,7 @@ export interface SeasonsListQueryParamProperties { propertyFilters?: string; skipToken?: string; statuses?: string; - years?: Array; + years?: string; } // @public @@ -8698,8 +8671,6 @@ export type SensorDataModelsCreateOrUpdateParameters = SensorDataModelsCreateOrU // @public export interface SensorDataModelsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -8968,8 +8939,6 @@ export type SensorMappingsCreateOrUpdateParameters = SensorMappingsCreateOrUpdat // @public export interface SensorMappingsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -9245,8 +9214,6 @@ export type SensorPartnerIntegrationsCreateOrUpdateParameters = SensorPartnerInt // @public export interface SensorPartnerIntegrationsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -9488,8 +9455,6 @@ export type SensorsCreateOrUpdateParameters = SensorsCreateOrUpdateMediaTypesPar // @public export interface SensorsDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -9669,6 +9634,28 @@ export interface SensorsRenewConnectionStringMediaTypesParam { // @public (undocumented) export type SensorsRenewConnectionStringParameters = SensorsRenewConnectionStringMediaTypesParam & SensorsRenewConnectionStringBodyParam & RequestParameters; +// @public +export interface SimplePollerLike, TResult> { + getOperationState(): TState; + getResult(): TResult | undefined; + isDone(): boolean; + // @deprecated + isStopped(): boolean; + onProgress(callback: (state: TState) => void): CancelOnProgress; + poll(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + pollUntilDone(pollOptions?: { + abortSignal?: AbortSignalLike; + }): Promise; + serialize(): Promise; + // @deprecated + stopPolling(): void; + submitted(): Promise; + // @deprecated + toString(): string; +} + // @public export interface SoilMoistureModelJob { boundaryId: string; @@ -10003,8 +9990,6 @@ export type TillageDataCreateOrUpdateParameters = TillageDataCreateOrUpdateMedia // @public export interface TillageDataDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } @@ -10831,8 +10816,6 @@ export type ZonesCreateOrUpdateParameters = ZonesCreateOrUpdateMediaTypesParam & // @public export interface ZonesDelete204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } diff --git a/sdk/agrifood/agrifood-farming-rest/src/farmBeats.ts b/sdk/agrifood/agrifood-farming-rest/src/farmBeats.ts index 3c0761978953..b62b52c513db 100644 --- a/sdk/agrifood/agrifood-farming-rest/src/farmBeats.ts +++ b/sdk/agrifood/agrifood-farming-rest/src/farmBeats.ts @@ -3,30 +3,29 @@ import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; +import { logger } from "./logger.js"; import type { TokenCredential } from "@azure/core-auth"; import type { FarmBeatsClient } from "./clientDefinitions.js"; +/** The optional parameters for the client */ +export interface FarmBeatsClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + /** * Initialize a new instance of `FarmBeatsClient` - * @param $host type: string, server parameter - * @param credentials type: TokenCredential, uniquely identify client credential - * @param options type: ClientOptions, the parameter for all optional parameters + * @param $host - server parameter + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters */ export default function createClient( $host: string, credentials: TokenCredential, - options: ClientOptions = {}, + { apiVersion = "2022-11-01-preview", ...options }: FarmBeatsClientOptions = {}, ): FarmBeatsClient { - const baseUrl = options.baseUrl ?? `${$host}`; - options.apiVersion = options.apiVersion ?? "2022-11-01-preview"; - options = { - ...options, - credentials: { - scopes: ["https://farmbeats.azure.net/.default"], - }, - }; - - const userAgentInfo = `azsdk-js-agrifood-farming-rest/1.0.0-beta.2`; + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${$host}`; + const userAgentInfo = `azsdk-js-agrifood-farming-rest/1.0.0-beta.3`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` @@ -36,9 +35,31 @@ export default function createClient( userAgentOptions: { userAgentPrefix, }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + credentials: { + scopes: options.credentials?.scopes ?? ["https://farmbeats.azure.net/.default"], + }, }; + const client = getClient(endpointUrl, credentials, options) as FarmBeatsClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } - const client = getClient(baseUrl, credentials, options) as FarmBeatsClient; + return next(req); + }, + }); return client; } diff --git a/sdk/agrifood/agrifood-farming-rest/src/isUnexpected.ts b/sdk/agrifood/agrifood-farming-rest/src/isUnexpected.ts index e15aa1543c62..d7d42fd6f7a2 100644 --- a/sdk/agrifood/agrifood-farming-rest/src/isUnexpected.ts +++ b/sdk/agrifood/agrifood-farming-rest/src/isUnexpected.ts @@ -428,8 +428,8 @@ import type { const responseMap: Record = { "GET /application-data": ["200"], - "PUT /application-data/cascade-delete/{jobId}": ["202"], "GET /application-data/cascade-delete/{jobId}": ["200"], + "PUT /application-data/cascade-delete/{jobId}": ["202"], "GET /parties/{partyId}/application-data": ["200"], "GET /parties/{partyId}/application-data/{applicationDataId}": ["200"], "PATCH /parties/{partyId}/application-data/{applicationDataId}": ["200", "201"], @@ -441,8 +441,8 @@ const responseMap: Record = { "GET /parties/{partyId}/attachments/{attachmentId}/file": ["200"], "GET /boundaries": ["200"], "POST /boundaries": ["200"], - "PUT /boundaries/cascade-delete/{jobId}": ["202"], "GET /boundaries/cascade-delete/{jobId}": ["200"], + "PUT /boundaries/cascade-delete/{jobId}": ["202"], "GET /parties/{partyId}/boundaries": ["200"], "POST /parties/{partyId}/boundaries": ["200"], "PATCH /parties/{partyId}/boundaries/{boundaryId}": ["200", "201"], @@ -465,11 +465,11 @@ const responseMap: Record = { "PATCH /sensor-partners/{sensorPartnerId}/devices/{deviceId}": ["200", "201"], "GET /sensor-partners/{sensorPartnerId}/devices/{deviceId}": ["200"], "DELETE /sensor-partners/{sensorPartnerId}/devices/{deviceId}": ["204"], - "PUT /farm-operations/ingest-data/{jobId}": ["202"], "GET /farm-operations/ingest-data/{jobId}": ["200"], + "PUT /farm-operations/ingest-data/{jobId}": ["202"], "GET /farms": ["200"], - "PUT /farms/cascade-delete/{jobId}": ["202"], "GET /farms/cascade-delete/{jobId}": ["200"], + "PUT /farms/cascade-delete/{jobId}": ["202"], "GET /parties/{partyId}/farms": ["200"], "GET /parties/{partyId}/farms/{farmId}": ["200"], "PATCH /parties/{partyId}/farms/{farmId}": ["200", "201"], @@ -482,14 +482,14 @@ const responseMap: Record = { "PATCH /parties/{partyId}/fields/{fieldId}": ["200", "201"], "DELETE /parties/{partyId}/fields/{fieldId}": ["204"], "GET /harvest-data": ["200"], - "PUT /harvest-data/cascade-delete/{jobId}": ["202"], "GET /harvest-data/cascade-delete/{jobId}": ["200"], + "PUT /harvest-data/cascade-delete/{jobId}": ["202"], "GET /parties/{partyId}/harvest-data": ["200"], "GET /parties/{partyId}/harvest-data/{harvestDataId}": ["200"], "PATCH /parties/{partyId}/harvest-data/{harvestDataId}": ["200", "201"], "DELETE /parties/{partyId}/harvest-data/{harvestDataId}": ["204"], - "PUT /image-processing/rasterize/{jobId}": ["202"], "GET /image-processing/rasterize/{jobId}": ["200"], + "PUT /image-processing/rasterize/{jobId}": ["202"], "GET /parties/{partyId}/models/{modelId}/resource-types/{resourceType}/resources/{resourceId}/insight-attachments": ["200"], "PATCH /parties/{partyId}/models/{modelId}/resource-types/{resourceType}/resources/{resourceId}/insight-attachments/{insightAttachmentId}": @@ -500,8 +500,8 @@ const responseMap: Record = { ["204"], "GET /parties/{partyId}/models/{modelId}/resource-types/{resourceType}/resources/{resourceId}/insight-attachments/{insightAttachmentId}/file": ["200"], - "PUT /insights/cascade-delete/{jobId}": ["202"], "GET /insights/cascade-delete/{jobId}": ["200"], + "PUT /insights/cascade-delete/{jobId}": ["202"], "GET /parties/{partyId}/models/{modelId}/resource-types/{resourceType}/resources/{resourceId}/insights": ["200"], "PATCH /parties/{partyId}/models/{modelId}/resource-types/{resourceType}/resources/{resourceId}/insights/{insightId}": @@ -517,12 +517,12 @@ const responseMap: Record = { "GET /parties/{partyId}/management-zones/{managementZoneId}": ["200"], "PATCH /parties/{partyId}/management-zones/{managementZoneId}": ["200", "201"], "DELETE /parties/{partyId}/management-zones/{managementZoneId}": ["204"], - "PUT /model-inference/models/microsoft-biomass/infer-data/{jobId}": ["202"], "GET /model-inference/models/microsoft-biomass/infer-data/{jobId}": ["200"], - "PUT /model-inference/models/microsoft-sensor-placement/infer-data/{jobId}": ["202"], + "PUT /model-inference/models/microsoft-biomass/infer-data/{jobId}": ["202"], "GET /model-inference/models/microsoft-sensor-placement/infer-data/{jobId}": ["200"], - "PUT /model-inference/models/microsoft-soil-moisture/infer-data/{jobId}": ["202"], + "PUT /model-inference/models/microsoft-sensor-placement/infer-data/{jobId}": ["202"], "GET /model-inference/models/microsoft-soil-moisture/infer-data/{jobId}": ["200"], + "PUT /model-inference/models/microsoft-soil-moisture/infer-data/{jobId}": ["202"], "GET /nutrient-analyses": ["200"], "GET /parties/{partyId}/nutrient-analyses": ["200"], "GET /parties/{partyId}/nutrient-analyses/{nutrientAnalysisId}": ["200"], @@ -549,15 +549,15 @@ const responseMap: Record = { "PATCH /parties/{partyId}/planting-data/{plantingDataId}": ["200", "201"], "DELETE /parties/{partyId}/planting-data/{plantingDataId}": ["204"], "GET /planting-data": ["200"], - "PUT /planting-data/cascade-delete/{jobId}": ["202"], "GET /planting-data/cascade-delete/{jobId}": ["200"], + "PUT /planting-data/cascade-delete/{jobId}": ["202"], "GET /parties/{partyId}/plant-tissue-analyses": ["200"], "GET /parties/{partyId}/plant-tissue-analyses/{plantTissueAnalysisId}": ["200"], "PATCH /parties/{partyId}/plant-tissue-analyses/{plantTissueAnalysisId}": ["200", "201"], "DELETE /parties/{partyId}/plant-tissue-analyses/{plantTissueAnalysisId}": ["204"], "GET /plant-tissue-analyses": ["200"], - "PUT /plant-tissue-analyses/cascade-delete/{jobId}": ["202"], "GET /plant-tissue-analyses/cascade-delete/{jobId}": ["200"], + "PUT /plant-tissue-analyses/cascade-delete/{jobId}": ["202"], "GET /parties/{partyId}/prescription-maps": ["200"], "GET /parties/{partyId}/prescription-maps/{prescriptionMapId}": ["200"], "PATCH /parties/{partyId}/prescription-maps/{prescriptionMapId}": ["200", "201"], @@ -574,8 +574,8 @@ const responseMap: Record = { "PUT /prescriptions/cascade-delete/{jobId}": ["202"], "GET /scenes": ["200"], "GET /scenes/downloadFiles": ["200"], - "PUT /scenes/satellite/ingest-data/{jobId}": ["202"], "GET /scenes/satellite/ingest-data/{jobId}": ["200"], + "PUT /scenes/satellite/ingest-data/{jobId}": ["202"], "POST /scenes/stac-collections/{collectionId}:search": ["200"], "GET /scenes/stac-collections/{collectionId}/features/{featureId}": ["200"], "GET /parties/{partyId}/seasonal-fields": ["200"], @@ -613,16 +613,16 @@ const responseMap: Record = { "GET /sensor-partners/{sensorPartnerId}/sensors/{sensorId}/connection-strings": ["200"], "POST /sensor-partners/{sensorPartnerId}/sensors/{sensorId}/connection-strings/:renew": ["200"], "POST /solutions/{solutionId}:cancel": ["200"], - "POST /solutions/{solutionId}:create": ["202"], "GET /solutions/{solutionId}:create": ["202"], + "POST /solutions/{solutionId}:create": ["202"], "POST /solutions/{solutionId}:fetch": ["200"], "GET /parties/{partyId}/tillage-data": ["200"], "GET /parties/{partyId}/tillage-data/{tillageDataId}": ["200"], "PATCH /parties/{partyId}/tillage-data/{tillageDataId}": ["200", "201"], "DELETE /parties/{partyId}/tillage-data/{tillageDataId}": ["204"], "GET /tillage-data": ["200"], - "PUT /tillage-data/cascade-delete/{jobId}": ["202"], "GET /tillage-data/cascade-delete/{jobId}": ["200"], + "PUT /tillage-data/cascade-delete/{jobId}": ["202"], "GET /weather": ["200"], "GET /weather/delete-data/{jobId}": ["200"], "PUT /weather/delete-data/{jobId}": ["202"], diff --git a/sdk/agrifood/agrifood-farming-rest/src/logger.ts b/sdk/agrifood/agrifood-farming-rest/src/logger.ts new file mode 100644 index 000000000000..06368152a03f --- /dev/null +++ b/sdk/agrifood/agrifood-farming-rest/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("agrifood-farming"); diff --git a/sdk/agrifood/agrifood-farming-rest/src/paginateHelper.ts b/sdk/agrifood/agrifood-farming-rest/src/paginateHelper.ts index 5d541b4e406d..9ea946d9d6c5 100644 --- a/sdk/agrifood/agrifood-farming-rest/src/paginateHelper.ts +++ b/sdk/agrifood/agrifood-farming-rest/src/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/agrifood/agrifood-farming-rest/src/parameters.ts b/sdk/agrifood/agrifood-farming-rest/src/parameters.ts index 795af499632f..49d217bd36bb 100644 --- a/sdk/agrifood/agrifood-farming-rest/src/parameters.ts +++ b/sdk/agrifood/agrifood-farming-rest/src/parameters.ts @@ -2330,8 +2330,8 @@ export interface ScenesListQueryParamProperties { maxDarkPixelCoveragePercentage?: number; /** List of image names to be filtered. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ imageNames?: string; - /** List of image resolutions in meters to be filtered. */ - imageResolutions?: Array; + /** List of image resolutions in meters to be filtered. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ + imageResolutions?: string; /** List of image formats to be filtered. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ imageFormats?: string; /** @@ -2536,8 +2536,8 @@ export interface SeasonsListQueryParamProperties { minEndDateTime?: Date | string; /** Maximum season end datetime, sample format: yyyy-MM-ddTHH:mm:ssZ. */ maxEndDateTime?: Date | string; - /** Years of the resource. */ - years?: Array; + /** Years of the resource. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ + years?: string; /** Ids of the resource. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ ids?: string; /** Names of the resource. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ diff --git a/sdk/agrifood/agrifood-farming-rest/src/pollingHelper.ts b/sdk/agrifood/agrifood-farming-rest/src/pollingHelper.ts index a54710cc33bd..a2668fc5d9c7 100644 --- a/sdk/agrifood/agrifood-farming-rest/src/pollingHelper.ts +++ b/sdk/agrifood/agrifood-farming-rest/src/pollingHelper.ts @@ -2,14 +2,82 @@ // Licensed under the MIT License. import type { Client, HttpResponse } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; import type { + CancelOnProgress, CreateHttpPollerOptions, - LongRunningOperation, - LroResponse, + RunningOperation, + OperationResponse, OperationState, - SimplePollerLike, } from "@azure/core-lro"; import { createHttpPoller } from "@azure/core-lro"; + +/** + * A simple poller that can be used to poll a long running operation. + */ +export interface SimplePollerLike, TResult> { + /** + * Returns true if the poller has finished polling. + */ + isDone(): boolean; + /** + * Returns the state of the operation. + */ + getOperationState(): TState; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult(): TResult | undefined; + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + */ + poll(options?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback: (state: TState) => void): CancelOnProgress; + + /** + * Returns a promise that could be used for serialized version of the poller's operation + * by invoking the operation's serialize method. + */ + serialize(): Promise; + + /** + * Wait the poller to be submitted. + */ + submitted(): Promise; + + /** + * Returns a string representation of the poller's operation. Similar to serialize but returns a string. + * @deprecated Use serialize() instead. + */ + toString(): string; + + /** + * Stops the poller from continuing to poll. Please note this will only stop the client-side polling + * @deprecated Use abortSignal to stop polling instead. + */ + stopPolling(): void; + + /** + * Returns true if the poller is stopped. + * @deprecated Use abortSignal status to track this instead. + */ + isStopped(): boolean; +} + /** * Helper function that builds a Poller object to help polling a long running operation. * @param client - Client to use for sending the request to get additional pages. @@ -22,21 +90,39 @@ export async function getLongRunningPoller( initialResponse: TResult, options: CreateHttpPollerOptions> = {}, ): Promise, TResult>> { - const poller: LongRunningOperation = { - requestMethod: initialResponse.request.method, - requestPath: initialResponse.request.url, + const abortController = new AbortController(); + const poller: RunningOperation = { sendInitialRequest: async () => { // In the case of Rest Clients we are building the LRO poller object from a response that's the reason // we are not triggering the initial request here, just extracting the information from the // response we were provided. return getLroResponse(initialResponse); }, - sendPollRequest: async (path) => { + sendPollRequest: async (path: string, pollOptions?: { abortSignal?: AbortSignalLike }) => { // This is the callback that is going to be called to poll the service // to get the latest status. We use the client provided and the polling path // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location // depending on the lro pattern that the service implements. If non is provided we default to the initial path. - const response = await client.pathUnchecked(path ?? initialResponse.request.url).get(); + function abortListener(): void { + abortController.abort(); + } + const inputAbortSignal = pollOptions?.abortSignal; + const abortSignal = abortController.signal; + if (inputAbortSignal?.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + response = await client + .pathUnchecked(path ?? initialResponse.request.url) + .get({ abortSignal }); + } finally { + inputAbortSignal?.removeEventListener("abort", abortListener); + } const lroResponse = getLroResponse(response as TResult); lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url; return lroResponse; @@ -44,7 +130,45 @@ export async function getLongRunningPoller( }; options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true; - return createHttpPoller(poller, options); + const httpPoller = createHttpPoller(poller, options); + const simplePoller: SimplePollerLike, TResult> = { + isDone() { + return httpPoller.isDone; + }, + isStopped() { + return abortController.signal.aborted; + }, + getOperationState() { + if (!httpPoller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return httpPoller.operationState; + }, + getResult() { + return httpPoller.result; + }, + toString() { + if (!httpPoller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return JSON.stringify({ + state: httpPoller.operationState, + }); + }, + stopPolling() { + abortController.abort(); + }, + onProgress: httpPoller.onProgress, + poll: httpPoller.poll, + pollUntilDone: httpPoller.pollUntilDone, + serialize: httpPoller.serialize, + submitted: httpPoller.submitted, + }; + return simplePoller; } /** @@ -52,7 +176,9 @@ export async function getLongRunningPoller( * @param response - a rest client http response * @returns - An LRO response that the LRO implementation understands */ -function getLroResponse(response: TResult): LroResponse { +function getLroResponse( + response: TResult, +): OperationResponse { if (Number.isNaN(response.status)) { throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`); } diff --git a/sdk/agrifood/agrifood-farming-rest/src/responses.ts b/sdk/agrifood/agrifood-farming-rest/src/responses.ts index 4016cbeba6e7..2e5cb1d43529 100644 --- a/sdk/agrifood/agrifood-farming-rest/src/responses.ts +++ b/sdk/agrifood/agrifood-farming-rest/src/responses.ts @@ -195,7 +195,6 @@ export interface ApplicationDataCreateOrUpdateDefaultResponse extends HttpRespon /** Deletes a specified application data resource under a particular party. */ export interface ApplicationDataDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface ApplicationDataDeleteDefaultHeaders { @@ -269,7 +268,6 @@ export interface AttachmentsCreateOrUpdateDefaultResponse extends HttpResponse { /** Deletes a specified attachment resource under a particular party. */ export interface AttachmentsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface AttachmentsDeleteDefaultHeaders { @@ -446,7 +444,6 @@ export interface BoundariesGetDefaultResponse extends HttpResponse { /** Deletes a specified boundary resource under a particular party. */ export interface BoundariesDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface BoundariesDeleteDefaultHeaders { @@ -537,7 +534,6 @@ export interface CropProductsCreateOrUpdateDefaultResponse extends HttpResponse /** Deletes a specified crop Product resource. */ export interface CropProductsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface CropProductsDeleteDefaultHeaders { @@ -611,7 +607,6 @@ export interface CropsCreateOrUpdateDefaultResponse extends HttpResponse { /** Deletes Crop for given crop id. */ export interface CropsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface CropsDeleteDefaultHeaders { @@ -685,7 +680,6 @@ export interface DeviceDataModelsGetDefaultResponse extends HttpResponse { /** Deletes a device data model entity. */ export interface DeviceDataModelsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface DeviceDataModelsDeleteDefaultHeaders { @@ -759,7 +753,6 @@ export interface DevicesGetDefaultResponse extends HttpResponse { /** Deletes a device entity. */ export interface DevicesDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface DevicesDeleteDefaultHeaders { @@ -918,7 +911,6 @@ export interface FarmsCreateOrUpdateDefaultResponse extends HttpResponse { /** Deletes a specified farm resource under a particular party. */ export interface FarmsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface FarmsDeleteDefaultHeaders { @@ -1043,7 +1035,6 @@ export interface FieldsCreateOrUpdateDefaultResponse extends HttpResponse { /** Deletes a specified field resource under a particular party. */ export interface FieldsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface FieldsDeleteDefaultHeaders { @@ -1168,7 +1159,6 @@ export interface HarvestDataCreateOrUpdateDefaultResponse extends HttpResponse { /** Deletes a specified harvest data resource under a particular party. */ export interface HarvestDataDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface HarvestDataDeleteDefaultHeaders { @@ -1277,7 +1267,6 @@ export interface InsightAttachmentsGetDefaultResponse extends HttpResponse { /** Deletes a specified insight resource. */ export interface InsightAttachmentsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface InsightAttachmentsDeleteDefaultHeaders { @@ -1403,7 +1392,6 @@ export interface InsightsGetDefaultResponse extends HttpResponse { /** Deletes a specified insight resource. */ export interface InsightsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface InsightsDeleteDefaultHeaders { @@ -1528,7 +1516,6 @@ export interface ManagementZonesCreateOrUpdateDefaultResponse extends HttpRespon /** Deletes a specified management zone resource under a particular party. */ export interface ManagementZonesDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface ManagementZonesDeleteDefaultHeaders { @@ -1721,7 +1708,6 @@ export interface NutrientAnalysesCreateOrUpdateDefaultResponse extends HttpRespo /** Deletes a specified nutrient analysis resource under a particular party. */ export interface NutrientAnalysesDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface NutrientAnalysesDeleteDefaultHeaders { @@ -1795,7 +1781,6 @@ export interface OAuthProvidersCreateOrUpdateDefaultResponse extends HttpRespons /** Deletes an specified oauthProvider resource. */ export interface OAuthProvidersDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface OAuthProvidersDeleteDefaultHeaders { @@ -1971,7 +1956,6 @@ export interface PartiesCreateOrUpdateDefaultResponse extends HttpResponse { /** Deletes a specified party resource. */ export interface PartiesDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface PartiesDeleteDefaultHeaders { @@ -2079,7 +2063,6 @@ export interface PlantingDataCreateOrUpdateDefaultResponse extends HttpResponse /** Deletes a specified planting data resource under a particular party. */ export interface PlantingDataDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface PlantingDataDeleteDefaultHeaders { @@ -2204,7 +2187,6 @@ export interface PlantTissueAnalysesCreateOrUpdateDefaultResponse extends HttpRe /** Deletes a specified plant tissue analysis resource under a particular party. */ export interface PlantTissueAnalysesDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface PlantTissueAnalysesDeleteDefaultHeaders { @@ -2329,7 +2311,6 @@ export interface PrescriptionMapsCreateOrUpdateDefaultResponse extends HttpRespo /** Deletes a specified prescription map resource under a particular party. */ export interface PrescriptionMapsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface PrescriptionMapsDeleteDefaultHeaders { @@ -2454,7 +2435,6 @@ export interface PrescriptionsCreateOrUpdateDefaultResponse extends HttpResponse /** Deletes a specified prescription resource under a particular party. */ export interface PrescriptionsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface PrescriptionsDeleteDefaultHeaders { @@ -2682,7 +2662,6 @@ export interface SeasonalFieldsCreateOrUpdateDefaultResponse extends HttpRespons /** Deletes a specified seasonal-field resource under a particular party. */ export interface SeasonalFieldsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface SeasonalFieldsDeleteDefaultHeaders { @@ -2807,7 +2786,6 @@ export interface SeasonsCreateOrUpdateDefaultResponse extends HttpResponse { /** Deletes a specified season resource. */ export interface SeasonsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface SeasonsDeleteDefaultHeaders { @@ -2881,7 +2859,6 @@ export interface SensorDataModelsGetDefaultResponse extends HttpResponse { /** Deletes a sensor data model entity. */ export interface SensorDataModelsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface SensorDataModelsDeleteDefaultHeaders { @@ -2978,7 +2955,6 @@ export interface SensorMappingsGetDefaultResponse extends HttpResponse { /** Deletes a sensor mapping entity. */ export interface SensorMappingsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface SensorMappingsDeleteDefaultHeaders { @@ -3052,7 +3028,6 @@ export interface SensorPartnerIntegrationsGetDefaultResponse extends HttpRespons /** Deletes a partner integration model entity. */ export interface SensorPartnerIntegrationsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface SensorPartnerIntegrationsDeleteDefaultHeaders { @@ -3160,7 +3135,6 @@ export interface SensorsGetDefaultResponse extends HttpResponse { /** Deletes a sensor entity. */ export interface SensorsDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface SensorsDeleteDefaultHeaders { @@ -3319,7 +3293,6 @@ export interface TillageDataCreateOrUpdateDefaultResponse extends HttpResponse { /** Deletes a specified tillage data resource under a particular party. */ export interface TillageDataDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface TillageDataDeleteDefaultHeaders { @@ -3554,7 +3527,6 @@ export interface ZonesCreateOrUpdateDefaultResponse extends HttpResponse { /** Deletes a specified zone resource under a particular party. */ export interface ZonesDelete204Response extends HttpResponse { status: "204"; - body: Record; } export interface ZonesDeleteDefaultHeaders { diff --git a/sdk/agrifood/agrifood-farming-rest/src/serializeHelper.ts b/sdk/agrifood/agrifood-farming-rest/src/serializeHelper.ts index 770f7d5b1f2b..593ee9fcc7ba 100644 --- a/sdk/agrifood/agrifood-farming-rest/src/serializeHelper.ts +++ b/sdk/agrifood/agrifood-farming-rest/src/serializeHelper.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -export function buildMultiCollection(queryParameters: string[], parameterName: string): string { - return queryParameters +export function buildMultiCollection(items: string[], parameterName: string): string { + return items .map((item, index) => { if (index === 0) { return item; diff --git a/sdk/agrifood/agrifood-farming-rest/swagger/README.md b/sdk/agrifood/agrifood-farming-rest/swagger/README.md index 5fdda0291187..427e54aad469 100644 --- a/sdk/agrifood/agrifood-farming-rest/swagger/README.md +++ b/sdk/agrifood/agrifood-farming-rest/swagger/README.md @@ -5,6 +5,9 @@ ## Configuration ```yaml +flavor: azure +openapi-type: data-plane +generate-test: true package-name: "@azure-rest/agrifood-farming" title: FarmBeats description: Azure FarmBeats Service From 9588658fd21a1077c0f12a7e3a3a6f4675c2b675 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:12:50 +0800 Subject: [PATCH 27/55] [data-plane] refresh communication-job-router-rest sdk (#30907) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- .../CHANGELOG.md | 8 +- .../azureCommunicationRoutingServiceClient.ts | 63 ++ .../generated/clientDefinitions.ts | 436 ++++++++++ .../generated/index.ts | 15 + .../generated/isUnexpected.ts | 439 ++++++++++ .../generated/logger.ts | 6 + .../generated/models.ts | 665 +++++++++++++++ .../generated/outputModels.ts | 797 ++++++++++++++++++ .../generated/paginateHelper.ts | 298 +++++++ .../generated/parameters.ts | 354 ++++++++ .../generated/responses.ts | 767 +++++++++++++++++ .../package.json | 1 - .../review/communication-job-router.api.md | 201 ++++- .../azureCommunicationRoutingServiceClient.ts | 89 +- ...municationRoutingServiceCustmizedClient.ts | 65 ++ .../src/index.ts | 2 +- .../src/isUnexpected.ts | 1 - .../src/models.ts | 60 +- .../src/outputModels.ts | 125 ++- .../src/paginateHelper.ts | 146 +++- .../src/parameters.ts | 6 +- .../tsp-location.yaml | 11 +- 22 files changed, 4382 insertions(+), 173 deletions(-) create mode 100644 sdk/communication/communication-job-router-rest/generated/azureCommunicationRoutingServiceClient.ts create mode 100644 sdk/communication/communication-job-router-rest/generated/clientDefinitions.ts create mode 100644 sdk/communication/communication-job-router-rest/generated/index.ts create mode 100644 sdk/communication/communication-job-router-rest/generated/isUnexpected.ts create mode 100644 sdk/communication/communication-job-router-rest/generated/logger.ts create mode 100644 sdk/communication/communication-job-router-rest/generated/models.ts create mode 100644 sdk/communication/communication-job-router-rest/generated/outputModels.ts create mode 100644 sdk/communication/communication-job-router-rest/generated/paginateHelper.ts create mode 100644 sdk/communication/communication-job-router-rest/generated/parameters.ts create mode 100644 sdk/communication/communication-job-router-rest/generated/responses.ts create mode 100644 sdk/communication/communication-job-router-rest/src/azureCommunicationRoutingServiceCustmizedClient.ts diff --git a/sdk/communication/communication-job-router-rest/CHANGELOG.md b/sdk/communication/communication-job-router-rest/CHANGELOG.md index 76a338687404..eaed990721cb 100644 --- a/sdk/communication/communication-job-router-rest/CHANGELOG.md +++ b/sdk/communication/communication-job-router-rest/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.1.0-beta.2 (Unreleased) +## 1.1.0-beta.2 (2024-12-16) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- refresh @azure-rest/communication-job-router sdk ## 1.1.0-beta.1 (2024-04-12) diff --git a/sdk/communication/communication-job-router-rest/generated/azureCommunicationRoutingServiceClient.ts b/sdk/communication/communication-job-router-rest/generated/azureCommunicationRoutingServiceClient.ts new file mode 100644 index 000000000000..a518300f3123 --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/azureCommunicationRoutingServiceClient.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { getClient, ClientOptions } from "@azure-rest/core-client"; +import { logger } from "./logger.js"; +import { AzureCommunicationRoutingServiceClient } from "./clientDefinitions.js"; + +/** The optional parameters for the client */ +export interface AzureCommunicationRoutingServiceClientOptions + extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + +/** + * Initialize a new instance of `AzureCommunicationRoutingServiceClient` + * @param endpointParam - Uri of your Communication resource + * @param options - the parameter for all optional parameters + */ +export default function createClient( + endpointParam: string, + { + apiVersion = "2024-01-18-preview", + ...options + }: AzureCommunicationRoutingServiceClientOptions = {}, +): AzureCommunicationRoutingServiceClient { + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`; + const userAgentInfo = `azsdk-js-communication-job-router-rest/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` + : `${userAgentInfo}`; + options = { + ...options, + userAgentOptions: { + userAgentPrefix, + }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + }; + const client = getClient( + endpointUrl, + options, + ) as AzureCommunicationRoutingServiceClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + return next(req); + }, + }); + + return client; +} diff --git a/sdk/communication/communication-job-router-rest/generated/clientDefinitions.ts b/sdk/communication/communication-job-router-rest/generated/clientDefinitions.ts new file mode 100644 index 000000000000..2a68137400e3 --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/clientDefinitions.ts @@ -0,0 +1,436 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +import { + UpsertClassificationPolicyParameters, + GetClassificationPolicyParameters, + DeleteClassificationPolicyParameters, + ListClassificationPoliciesParameters, + UpsertDistributionPolicyParameters, + GetDistributionPolicyParameters, + DeleteDistributionPolicyParameters, + ListDistributionPoliciesParameters, + UpsertExceptionPolicyParameters, + GetExceptionPolicyParameters, + DeleteExceptionPolicyParameters, + ListExceptionPoliciesParameters, + UpsertQueueParameters, + GetQueueParameters, + DeleteQueueParameters, + ListQueuesParameters, + UpsertJobParameters, + GetJobParameters, + DeleteJobParameters, + ReclassifyParameters, + CancelParameters, + CompleteParameters, + CloseParameters, + ListJobsParameters, + GetInQueuePositionParameters, + UnassignParameters, + AcceptParameters, + DeclineParameters, + GetQueueStatisticsParameters, + UpsertWorkerParameters, + GetWorkerParameters, + DeleteWorkerParameters, + ListWorkersParameters, +} from "./parameters.js"; +import type { + UpsertClassificationPolicy200Response, + UpsertClassificationPolicy201Response, + UpsertClassificationPolicyDefaultResponse, + GetClassificationPolicy200Response, + GetClassificationPolicyDefaultResponse, + DeleteClassificationPolicy204Response, + DeleteClassificationPolicyDefaultResponse, + ListClassificationPolicies200Response, + ListClassificationPoliciesDefaultResponse, + UpsertDistributionPolicy200Response, + UpsertDistributionPolicy201Response, + UpsertDistributionPolicyDefaultResponse, + GetDistributionPolicy200Response, + GetDistributionPolicyDefaultResponse, + DeleteDistributionPolicy204Response, + DeleteDistributionPolicyDefaultResponse, + ListDistributionPolicies200Response, + ListDistributionPoliciesDefaultResponse, + UpsertExceptionPolicy200Response, + UpsertExceptionPolicy201Response, + UpsertExceptionPolicyDefaultResponse, + GetExceptionPolicy200Response, + GetExceptionPolicyDefaultResponse, + DeleteExceptionPolicy204Response, + DeleteExceptionPolicyDefaultResponse, + ListExceptionPolicies200Response, + ListExceptionPoliciesDefaultResponse, + UpsertQueue200Response, + UpsertQueue201Response, + UpsertQueueDefaultResponse, + GetQueue200Response, + GetQueueDefaultResponse, + DeleteQueue204Response, + DeleteQueueDefaultResponse, + ListQueues200Response, + ListQueuesDefaultResponse, + UpsertJob200Response, + UpsertJob201Response, + UpsertJobDefaultResponse, + GetJob200Response, + GetJobDefaultResponse, + DeleteJob204Response, + DeleteJobDefaultResponse, + Reclassify200Response, + ReclassifyDefaultResponse, + Cancel200Response, + CancelDefaultResponse, + Complete200Response, + CompleteDefaultResponse, + Close200Response, + CloseDefaultResponse, + ListJobs200Response, + ListJobsDefaultResponse, + GetInQueuePosition200Response, + GetInQueuePositionDefaultResponse, + Unassign200Response, + UnassignDefaultResponse, + Accept200Response, + AcceptDefaultResponse, + Decline200Response, + DeclineDefaultResponse, + GetQueueStatistics200Response, + GetQueueStatisticsDefaultResponse, + UpsertWorker200Response, + UpsertWorker201Response, + UpsertWorkerDefaultResponse, + GetWorker200Response, + GetWorkerDefaultResponse, + DeleteWorker204Response, + DeleteWorkerDefaultResponse, + ListWorkers200Response, + ListWorkersDefaultResponse, +} from "./responses.js"; +import type { Client, StreamableMethod } from "@azure-rest/core-client"; + +export interface UpsertClassificationPolicy { + /** Creates or updates a classification policy. */ + patch( + options: UpsertClassificationPolicyParameters, + ): StreamableMethod< + | UpsertClassificationPolicy200Response + | UpsertClassificationPolicy201Response + | UpsertClassificationPolicyDefaultResponse + >; + /** Retrieves an existing classification policy by Id. */ + get( + options?: GetClassificationPolicyParameters, + ): StreamableMethod< + GetClassificationPolicy200Response | GetClassificationPolicyDefaultResponse + >; + /** Delete a classification policy by Id. */ + delete( + options?: DeleteClassificationPolicyParameters, + ): StreamableMethod< + | DeleteClassificationPolicy204Response + | DeleteClassificationPolicyDefaultResponse + >; +} + +export interface ListClassificationPolicies { + /** Retrieves existing classification policies. */ + get( + options?: ListClassificationPoliciesParameters, + ): StreamableMethod< + | ListClassificationPolicies200Response + | ListClassificationPoliciesDefaultResponse + >; +} + +export interface UpsertDistributionPolicy { + /** Creates or updates a distribution policy. */ + patch( + options: UpsertDistributionPolicyParameters, + ): StreamableMethod< + | UpsertDistributionPolicy200Response + | UpsertDistributionPolicy201Response + | UpsertDistributionPolicyDefaultResponse + >; + /** Retrieves an existing distribution policy by Id. */ + get( + options?: GetDistributionPolicyParameters, + ): StreamableMethod< + GetDistributionPolicy200Response | GetDistributionPolicyDefaultResponse + >; + /** Delete a distribution policy by Id. */ + delete( + options?: DeleteDistributionPolicyParameters, + ): StreamableMethod< + | DeleteDistributionPolicy204Response + | DeleteDistributionPolicyDefaultResponse + >; +} + +export interface ListDistributionPolicies { + /** Retrieves existing distribution policies. */ + get( + options?: ListDistributionPoliciesParameters, + ): StreamableMethod< + | ListDistributionPolicies200Response + | ListDistributionPoliciesDefaultResponse + >; +} + +export interface UpsertExceptionPolicy { + /** Creates or updates a exception policy. */ + patch( + options: UpsertExceptionPolicyParameters, + ): StreamableMethod< + | UpsertExceptionPolicy200Response + | UpsertExceptionPolicy201Response + | UpsertExceptionPolicyDefaultResponse + >; + /** Retrieves an existing exception policy by Id. */ + get( + options?: GetExceptionPolicyParameters, + ): StreamableMethod< + GetExceptionPolicy200Response | GetExceptionPolicyDefaultResponse + >; + /** Deletes a exception policy by Id. */ + delete( + options?: DeleteExceptionPolicyParameters, + ): StreamableMethod< + DeleteExceptionPolicy204Response | DeleteExceptionPolicyDefaultResponse + >; +} + +export interface ListExceptionPolicies { + /** Retrieves existing exception policies. */ + get( + options?: ListExceptionPoliciesParameters, + ): StreamableMethod< + ListExceptionPolicies200Response | ListExceptionPoliciesDefaultResponse + >; +} + +export interface UpsertQueue { + /** Creates or updates a queue. */ + patch( + options: UpsertQueueParameters, + ): StreamableMethod< + UpsertQueue200Response | UpsertQueue201Response | UpsertQueueDefaultResponse + >; + /** Retrieves an existing queue by Id. */ + get( + options?: GetQueueParameters, + ): StreamableMethod; + /** Deletes a queue by Id. */ + delete( + options?: DeleteQueueParameters, + ): StreamableMethod; +} + +export interface ListQueues { + /** Retrieves existing queues. */ + get( + options?: ListQueuesParameters, + ): StreamableMethod; +} + +export interface UpsertJob { + /** Creates or updates a router job. */ + patch( + options: UpsertJobParameters, + ): StreamableMethod< + UpsertJob200Response | UpsertJob201Response | UpsertJobDefaultResponse + >; + /** Retrieves an existing job by Id. */ + get( + options?: GetJobParameters, + ): StreamableMethod; + /** Deletes a job and all of its traces. */ + delete( + options?: DeleteJobParameters, + ): StreamableMethod; +} + +export interface Reclassify { + /** Reclassify a job. */ + post( + options?: ReclassifyParameters, + ): StreamableMethod; +} + +export interface Cancel { + /** Submits request to cancel an existing job by Id while supplying free-form cancellation reason. */ + post( + options?: CancelParameters, + ): StreamableMethod; +} + +export interface Complete { + /** Completes an assigned job. */ + post( + options?: CompleteParameters, + ): StreamableMethod; +} + +export interface Close { + /** Closes a completed job. */ + post( + options?: CloseParameters, + ): StreamableMethod; +} + +export interface ListJobs { + /** Retrieves list of jobs based on filter parameters. */ + get( + options?: ListJobsParameters, + ): StreamableMethod; +} + +export interface GetInQueuePosition { + /** Gets a job's position details. */ + get( + options?: GetInQueuePositionParameters, + ): StreamableMethod< + GetInQueuePosition200Response | GetInQueuePositionDefaultResponse + >; +} + +export interface Unassign { + /** Unassign a job. */ + post( + options?: UnassignParameters, + ): StreamableMethod; +} + +export interface Accept { + /** Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already. */ + post( + options?: AcceptParameters, + ): StreamableMethod; +} + +export interface Decline { + /** Declines an offer to work on a job. */ + post( + options?: DeclineParameters, + ): StreamableMethod; +} + +export interface GetQueueStatistics { + /** Retrieves a queue's statistics. */ + get( + options?: GetQueueStatisticsParameters, + ): StreamableMethod< + GetQueueStatistics200Response | GetQueueStatisticsDefaultResponse + >; +} + +export interface UpsertWorker { + /** Creates or updates a worker. */ + patch( + options: UpsertWorkerParameters, + ): StreamableMethod< + | UpsertWorker200Response + | UpsertWorker201Response + | UpsertWorkerDefaultResponse + >; + /** Retrieves an existing worker by Id. */ + get( + options?: GetWorkerParameters, + ): StreamableMethod; + /** Deletes a worker and all of its traces. */ + delete( + options?: DeleteWorkerParameters, + ): StreamableMethod; +} + +export interface ListWorkers { + /** Retrieves existing workers. */ + get( + options?: ListWorkersParameters, + ): StreamableMethod; +} + +export interface Routes { + /** Resource for '/routing/classificationPolicies/\{classificationPolicyId\}' has methods for the following verbs: patch, get, delete */ + ( + path: "/routing/classificationPolicies/{classificationPolicyId}", + classificationPolicyId: string, + ): UpsertClassificationPolicy; + /** Resource for '/routing/classificationPolicies' has methods for the following verbs: get */ + (path: "/routing/classificationPolicies"): ListClassificationPolicies; + /** Resource for '/routing/distributionPolicies/\{distributionPolicyId\}' has methods for the following verbs: patch, get, delete */ + ( + path: "/routing/distributionPolicies/{distributionPolicyId}", + distributionPolicyId: string, + ): UpsertDistributionPolicy; + /** Resource for '/routing/distributionPolicies' has methods for the following verbs: get */ + (path: "/routing/distributionPolicies"): ListDistributionPolicies; + /** Resource for '/routing/exceptionPolicies/\{exceptionPolicyId\}' has methods for the following verbs: patch, get, delete */ + ( + path: "/routing/exceptionPolicies/{exceptionPolicyId}", + exceptionPolicyId: string, + ): UpsertExceptionPolicy; + /** Resource for '/routing/exceptionPolicies' has methods for the following verbs: get */ + (path: "/routing/exceptionPolicies"): ListExceptionPolicies; + /** Resource for '/routing/queues/\{queueId\}' has methods for the following verbs: patch, get, delete */ + (path: "/routing/queues/{queueId}", queueId: string): UpsertQueue; + /** Resource for '/routing/queues' has methods for the following verbs: get */ + (path: "/routing/queues"): ListQueues; + /** Resource for '/routing/jobs/\{jobId\}' has methods for the following verbs: patch, get, delete */ + (path: "/routing/jobs/{jobId}", jobId: string): UpsertJob; + /** Resource for '/routing/jobs/\{jobId\}:reclassify' has methods for the following verbs: post */ + (path: "/routing/jobs/{jobId}:reclassify", jobId: string): Reclassify; + /** Resource for '/routing/jobs/\{jobId\}:cancel' has methods for the following verbs: post */ + (path: "/routing/jobs/{jobId}:cancel", jobId: string): Cancel; + /** Resource for '/routing/jobs/\{jobId\}/assignments/\{assignmentId\}:complete' has methods for the following verbs: post */ + ( + path: "/routing/jobs/{jobId}/assignments/{assignmentId}:complete", + jobId: string, + assignmentId: string, + ): Complete; + /** Resource for '/routing/jobs/\{jobId\}/assignments/\{assignmentId\}:close' has methods for the following verbs: post */ + ( + path: "/routing/jobs/{jobId}/assignments/{assignmentId}:close", + jobId: string, + assignmentId: string, + ): Close; + /** Resource for '/routing/jobs' has methods for the following verbs: get */ + (path: "/routing/jobs"): ListJobs; + /** Resource for '/routing/jobs/\{jobId\}/position' has methods for the following verbs: get */ + (path: "/routing/jobs/{jobId}/position", jobId: string): GetInQueuePosition; + /** Resource for '/routing/jobs/\{jobId\}/assignments/\{assignmentId\}:unassign' has methods for the following verbs: post */ + ( + path: "/routing/jobs/{jobId}/assignments/{assignmentId}:unassign", + jobId: string, + assignmentId: string, + ): Unassign; + /** Resource for '/routing/workers/\{workerId\}/offers/\{offerId\}:accept' has methods for the following verbs: post */ + ( + path: "/routing/workers/{workerId}/offers/{offerId}:accept", + workerId: string, + offerId: string, + ): Accept; + /** Resource for '/routing/workers/\{workerId\}/offers/\{offerId\}:decline' has methods for the following verbs: post */ + ( + path: "/routing/workers/{workerId}/offers/{offerId}:decline", + workerId: string, + offerId: string, + ): Decline; + /** Resource for '/routing/queues/\{queueId\}/statistics' has methods for the following verbs: get */ + ( + path: "/routing/queues/{queueId}/statistics", + queueId: string, + ): GetQueueStatistics; + /** Resource for '/routing/workers/\{workerId\}' has methods for the following verbs: patch, get, delete */ + (path: "/routing/workers/{workerId}", workerId: string): UpsertWorker; + /** Resource for '/routing/workers' has methods for the following verbs: get */ + (path: "/routing/workers"): ListWorkers; +} + +export type AzureCommunicationRoutingServiceClient = Client & { + path: Routes; +}; diff --git a/sdk/communication/communication-job-router-rest/generated/index.ts b/sdk/communication/communication-job-router-rest/generated/index.ts new file mode 100644 index 000000000000..1c1e0181dcda --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/index.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import AzureCommunicationRoutingServiceClient from "./azureCommunicationRoutingServiceClient.js"; + +export * from "./azureCommunicationRoutingServiceClient.js"; +export * from "./parameters.js"; +export * from "./responses.js"; +export * from "./clientDefinitions.js"; +export * from "./isUnexpected.js"; +export * from "./models.js"; +export * from "./outputModels.js"; +export * from "./paginateHelper.js"; + +export default AzureCommunicationRoutingServiceClient; diff --git a/sdk/communication/communication-job-router-rest/generated/isUnexpected.ts b/sdk/communication/communication-job-router-rest/generated/isUnexpected.ts new file mode 100644 index 000000000000..db118337e18e --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/isUnexpected.ts @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + UpsertClassificationPolicy200Response, + UpsertClassificationPolicy201Response, + UpsertClassificationPolicyDefaultResponse, + GetClassificationPolicy200Response, + GetClassificationPolicyDefaultResponse, + DeleteClassificationPolicy204Response, + DeleteClassificationPolicyDefaultResponse, + ListClassificationPolicies200Response, + ListClassificationPoliciesDefaultResponse, + UpsertDistributionPolicy200Response, + UpsertDistributionPolicy201Response, + UpsertDistributionPolicyDefaultResponse, + GetDistributionPolicy200Response, + GetDistributionPolicyDefaultResponse, + DeleteDistributionPolicy204Response, + DeleteDistributionPolicyDefaultResponse, + ListDistributionPolicies200Response, + ListDistributionPoliciesDefaultResponse, + UpsertExceptionPolicy200Response, + UpsertExceptionPolicy201Response, + UpsertExceptionPolicyDefaultResponse, + GetExceptionPolicy200Response, + GetExceptionPolicyDefaultResponse, + DeleteExceptionPolicy204Response, + DeleteExceptionPolicyDefaultResponse, + ListExceptionPolicies200Response, + ListExceptionPoliciesDefaultResponse, + UpsertQueue200Response, + UpsertQueue201Response, + UpsertQueueDefaultResponse, + GetQueue200Response, + GetQueueDefaultResponse, + DeleteQueue204Response, + DeleteQueueDefaultResponse, + ListQueues200Response, + ListQueuesDefaultResponse, + UpsertJob200Response, + UpsertJob201Response, + UpsertJobDefaultResponse, + GetJob200Response, + GetJobDefaultResponse, + DeleteJob204Response, + DeleteJobDefaultResponse, + Reclassify200Response, + ReclassifyDefaultResponse, + Cancel200Response, + CancelDefaultResponse, + Complete200Response, + CompleteDefaultResponse, + Close200Response, + CloseDefaultResponse, + ListJobs200Response, + ListJobsDefaultResponse, + GetInQueuePosition200Response, + GetInQueuePositionDefaultResponse, + Unassign200Response, + UnassignDefaultResponse, + Accept200Response, + AcceptDefaultResponse, + Decline200Response, + DeclineDefaultResponse, + GetQueueStatistics200Response, + GetQueueStatisticsDefaultResponse, + UpsertWorker200Response, + UpsertWorker201Response, + UpsertWorkerDefaultResponse, + GetWorker200Response, + GetWorkerDefaultResponse, + DeleteWorker204Response, + DeleteWorkerDefaultResponse, + ListWorkers200Response, + ListWorkersDefaultResponse, +} from "./responses.js"; + +const responseMap: Record = { + "PATCH /routing/classificationPolicies/{classificationPolicyId}": [ + "200", + "201", + ], + "GET /routing/classificationPolicies/{classificationPolicyId}": ["200"], + "DELETE /routing/classificationPolicies/{classificationPolicyId}": ["204"], + "GET /routing/classificationPolicies": ["200"], + "PATCH /routing/distributionPolicies/{distributionPolicyId}": ["200", "201"], + "GET /routing/distributionPolicies/{distributionPolicyId}": ["200"], + "DELETE /routing/distributionPolicies/{distributionPolicyId}": ["204"], + "GET /routing/distributionPolicies": ["200"], + "PATCH /routing/exceptionPolicies/{exceptionPolicyId}": ["200", "201"], + "GET /routing/exceptionPolicies/{exceptionPolicyId}": ["200"], + "DELETE /routing/exceptionPolicies/{exceptionPolicyId}": ["204"], + "GET /routing/exceptionPolicies": ["200"], + "PATCH /routing/queues/{queueId}": ["200", "201"], + "GET /routing/queues/{queueId}": ["200"], + "DELETE /routing/queues/{queueId}": ["204"], + "GET /routing/queues": ["200"], + "PATCH /routing/jobs/{jobId}": ["200", "201"], + "GET /routing/jobs/{jobId}": ["200"], + "DELETE /routing/jobs/{jobId}": ["204"], + "POST /routing/jobs/{jobId}:reclassify": ["200"], + "POST /routing/jobs/{jobId}:cancel": ["200"], + "POST /routing/jobs/{jobId}/assignments/{assignmentId}:complete": ["200"], + "POST /routing/jobs/{jobId}/assignments/{assignmentId}:close": ["200"], + "GET /routing/jobs": ["200"], + "GET /routing/jobs/{jobId}/position": ["200"], + "POST /routing/jobs/{jobId}/assignments/{assignmentId}:unassign": ["200"], + "POST /routing/workers/{workerId}/offers/{offerId}:accept": ["200"], + "POST /routing/workers/{workerId}/offers/{offerId}:decline": ["200"], + "GET /routing/queues/{queueId}/statistics": ["200"], + "PATCH /routing/workers/{workerId}": ["200", "201"], + "GET /routing/workers/{workerId}": ["200"], + "DELETE /routing/workers/{workerId}": ["204"], + "GET /routing/workers": ["200"], +}; + +export function isUnexpected( + response: + | UpsertClassificationPolicy200Response + | UpsertClassificationPolicy201Response + | UpsertClassificationPolicyDefaultResponse, +): response is UpsertClassificationPolicyDefaultResponse; +export function isUnexpected( + response: + | GetClassificationPolicy200Response + | GetClassificationPolicyDefaultResponse, +): response is GetClassificationPolicyDefaultResponse; +export function isUnexpected( + response: + | DeleteClassificationPolicy204Response + | DeleteClassificationPolicyDefaultResponse, +): response is DeleteClassificationPolicyDefaultResponse; +export function isUnexpected( + response: + | ListClassificationPolicies200Response + | ListClassificationPoliciesDefaultResponse, +): response is ListClassificationPoliciesDefaultResponse; +export function isUnexpected( + response: + | UpsertDistributionPolicy200Response + | UpsertDistributionPolicy201Response + | UpsertDistributionPolicyDefaultResponse, +): response is UpsertDistributionPolicyDefaultResponse; +export function isUnexpected( + response: + | GetDistributionPolicy200Response + | GetDistributionPolicyDefaultResponse, +): response is GetDistributionPolicyDefaultResponse; +export function isUnexpected( + response: + | DeleteDistributionPolicy204Response + | DeleteDistributionPolicyDefaultResponse, +): response is DeleteDistributionPolicyDefaultResponse; +export function isUnexpected( + response: + | ListDistributionPolicies200Response + | ListDistributionPoliciesDefaultResponse, +): response is ListDistributionPoliciesDefaultResponse; +export function isUnexpected( + response: + | UpsertExceptionPolicy200Response + | UpsertExceptionPolicy201Response + | UpsertExceptionPolicyDefaultResponse, +): response is UpsertExceptionPolicyDefaultResponse; +export function isUnexpected( + response: GetExceptionPolicy200Response | GetExceptionPolicyDefaultResponse, +): response is GetExceptionPolicyDefaultResponse; +export function isUnexpected( + response: + | DeleteExceptionPolicy204Response + | DeleteExceptionPolicyDefaultResponse, +): response is DeleteExceptionPolicyDefaultResponse; +export function isUnexpected( + response: + | ListExceptionPolicies200Response + | ListExceptionPoliciesDefaultResponse, +): response is ListExceptionPoliciesDefaultResponse; +export function isUnexpected( + response: + | UpsertQueue200Response + | UpsertQueue201Response + | UpsertQueueDefaultResponse, +): response is UpsertQueueDefaultResponse; +export function isUnexpected( + response: GetQueue200Response | GetQueueDefaultResponse, +): response is GetQueueDefaultResponse; +export function isUnexpected( + response: DeleteQueue204Response | DeleteQueueDefaultResponse, +): response is DeleteQueueDefaultResponse; +export function isUnexpected( + response: ListQueues200Response | ListQueuesDefaultResponse, +): response is ListQueuesDefaultResponse; +export function isUnexpected( + response: + | UpsertJob200Response + | UpsertJob201Response + | UpsertJobDefaultResponse, +): response is UpsertJobDefaultResponse; +export function isUnexpected( + response: GetJob200Response | GetJobDefaultResponse, +): response is GetJobDefaultResponse; +export function isUnexpected( + response: DeleteJob204Response | DeleteJobDefaultResponse, +): response is DeleteJobDefaultResponse; +export function isUnexpected( + response: Reclassify200Response | ReclassifyDefaultResponse, +): response is ReclassifyDefaultResponse; +export function isUnexpected( + response: Cancel200Response | CancelDefaultResponse, +): response is CancelDefaultResponse; +export function isUnexpected( + response: Complete200Response | CompleteDefaultResponse, +): response is CompleteDefaultResponse; +export function isUnexpected( + response: Close200Response | CloseDefaultResponse, +): response is CloseDefaultResponse; +export function isUnexpected( + response: ListJobs200Response | ListJobsDefaultResponse, +): response is ListJobsDefaultResponse; +export function isUnexpected( + response: GetInQueuePosition200Response | GetInQueuePositionDefaultResponse, +): response is GetInQueuePositionDefaultResponse; +export function isUnexpected( + response: Unassign200Response | UnassignDefaultResponse, +): response is UnassignDefaultResponse; +export function isUnexpected( + response: Accept200Response | AcceptDefaultResponse, +): response is AcceptDefaultResponse; +export function isUnexpected( + response: Decline200Response | DeclineDefaultResponse, +): response is DeclineDefaultResponse; +export function isUnexpected( + response: GetQueueStatistics200Response | GetQueueStatisticsDefaultResponse, +): response is GetQueueStatisticsDefaultResponse; +export function isUnexpected( + response: + | UpsertWorker200Response + | UpsertWorker201Response + | UpsertWorkerDefaultResponse, +): response is UpsertWorkerDefaultResponse; +export function isUnexpected( + response: GetWorker200Response | GetWorkerDefaultResponse, +): response is GetWorkerDefaultResponse; +export function isUnexpected( + response: DeleteWorker204Response | DeleteWorkerDefaultResponse, +): response is DeleteWorkerDefaultResponse; +export function isUnexpected( + response: ListWorkers200Response | ListWorkersDefaultResponse, +): response is ListWorkersDefaultResponse; +export function isUnexpected( + response: + | UpsertClassificationPolicy200Response + | UpsertClassificationPolicy201Response + | UpsertClassificationPolicyDefaultResponse + | GetClassificationPolicy200Response + | GetClassificationPolicyDefaultResponse + | DeleteClassificationPolicy204Response + | DeleteClassificationPolicyDefaultResponse + | ListClassificationPolicies200Response + | ListClassificationPoliciesDefaultResponse + | UpsertDistributionPolicy200Response + | UpsertDistributionPolicy201Response + | UpsertDistributionPolicyDefaultResponse + | GetDistributionPolicy200Response + | GetDistributionPolicyDefaultResponse + | DeleteDistributionPolicy204Response + | DeleteDistributionPolicyDefaultResponse + | ListDistributionPolicies200Response + | ListDistributionPoliciesDefaultResponse + | UpsertExceptionPolicy200Response + | UpsertExceptionPolicy201Response + | UpsertExceptionPolicyDefaultResponse + | GetExceptionPolicy200Response + | GetExceptionPolicyDefaultResponse + | DeleteExceptionPolicy204Response + | DeleteExceptionPolicyDefaultResponse + | ListExceptionPolicies200Response + | ListExceptionPoliciesDefaultResponse + | UpsertQueue200Response + | UpsertQueue201Response + | UpsertQueueDefaultResponse + | GetQueue200Response + | GetQueueDefaultResponse + | DeleteQueue204Response + | DeleteQueueDefaultResponse + | ListQueues200Response + | ListQueuesDefaultResponse + | UpsertJob200Response + | UpsertJob201Response + | UpsertJobDefaultResponse + | GetJob200Response + | GetJobDefaultResponse + | DeleteJob204Response + | DeleteJobDefaultResponse + | Reclassify200Response + | ReclassifyDefaultResponse + | Cancel200Response + | CancelDefaultResponse + | Complete200Response + | CompleteDefaultResponse + | Close200Response + | CloseDefaultResponse + | ListJobs200Response + | ListJobsDefaultResponse + | GetInQueuePosition200Response + | GetInQueuePositionDefaultResponse + | Unassign200Response + | UnassignDefaultResponse + | Accept200Response + | AcceptDefaultResponse + | Decline200Response + | DeclineDefaultResponse + | GetQueueStatistics200Response + | GetQueueStatisticsDefaultResponse + | UpsertWorker200Response + | UpsertWorker201Response + | UpsertWorkerDefaultResponse + | GetWorker200Response + | GetWorkerDefaultResponse + | DeleteWorker204Response + | DeleteWorkerDefaultResponse + | ListWorkers200Response + | ListWorkersDefaultResponse, +): response is + | UpsertClassificationPolicyDefaultResponse + | GetClassificationPolicyDefaultResponse + | DeleteClassificationPolicyDefaultResponse + | ListClassificationPoliciesDefaultResponse + | UpsertDistributionPolicyDefaultResponse + | GetDistributionPolicyDefaultResponse + | DeleteDistributionPolicyDefaultResponse + | ListDistributionPoliciesDefaultResponse + | UpsertExceptionPolicyDefaultResponse + | GetExceptionPolicyDefaultResponse + | DeleteExceptionPolicyDefaultResponse + | ListExceptionPoliciesDefaultResponse + | UpsertQueueDefaultResponse + | GetQueueDefaultResponse + | DeleteQueueDefaultResponse + | ListQueuesDefaultResponse + | UpsertJobDefaultResponse + | GetJobDefaultResponse + | DeleteJobDefaultResponse + | ReclassifyDefaultResponse + | CancelDefaultResponse + | CompleteDefaultResponse + | CloseDefaultResponse + | ListJobsDefaultResponse + | GetInQueuePositionDefaultResponse + | UnassignDefaultResponse + | AcceptDefaultResponse + | DeclineDefaultResponse + | GetQueueStatisticsDefaultResponse + | UpsertWorkerDefaultResponse + | GetWorkerDefaultResponse + | DeleteWorkerDefaultResponse + | ListWorkersDefaultResponse { + const lroOriginal = response.headers["x-ms-original-url"]; + const url = new URL(lroOriginal ?? response.request.url); + const method = response.request.method; + let pathDetails = responseMap[`${method} ${url.pathname}`]; + if (!pathDetails) { + pathDetails = getParametrizedPathSuccess(method, url.pathname); + } + return !pathDetails.includes(response.status); +} + +function getParametrizedPathSuccess(method: string, path: string): string[] { + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(responseMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for ( + let i = candidateParts.length - 1, j = pathParts.length - 1; + i >= 1 && j >= 1; + i--, j-- + ) { + if ( + candidateParts[i]?.startsWith("{") && + candidateParts[i]?.indexOf("}") !== -1 + ) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp( + `${candidateParts[i]?.slice(start, end)}`, + ).test(pathParts[j] || ""); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/communication/communication-job-router-rest/generated/logger.ts b/sdk/communication/communication-job-router-rest/generated/logger.ts new file mode 100644 index 000000000000..b6132440690f --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/logger.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("communication-job-router"); diff --git a/sdk/communication/communication-job-router-rest/generated/models.ts b/sdk/communication/communication-job-router-rest/generated/models.ts new file mode 100644 index 000000000000..45c45224ec50 --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/models.ts @@ -0,0 +1,665 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +/** A container for the rules that govern how jobs are classified. */ +export interface ClassificationPolicy { + /** Friendly name of this policy. */ + name?: string; + /** Id of a fallback queue to select if queue selector attachments doesn't find a match. */ + fallbackQueueId?: string; + /** Queue selector attachments used to resolve a queue for a job. */ + queueSelectorAttachments?: Array; + /** A rule to determine a priority score for a job. */ + prioritizationRule?: RouterRule; + /** Worker selector attachments used to attach worker selectors to a job. */ + workerSelectorAttachments?: Array; +} + +/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */ +export interface QueueSelectorAttachmentParent { + kind: QueueSelectorAttachmentKind; +} + +/** Describes a set of queue selectors that will be attached if the given condition resolves to true. */ +export interface ConditionalQueueSelectorAttachment + extends QueueSelectorAttachmentParent { + /** The condition that must be true for the queue selectors to be attached. */ + condition: RouterRule; + /** The queue selectors to attach. */ + queueSelectors: Array; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "conditional"; +} + +/** + * A rule of one of the following types: + * StaticRule: A rule providing static rules that always return the same result, regardless of input. + * DirectMapRule: A rule that return the same labels as the input labels. + * ExpressionRule: A rule providing inline expression rules. + * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function. + * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol. + */ +export interface RouterRuleParent { + kind: RouterRuleKind; +} + +/** A rule that return the same labels as the input labels. */ +export interface DirectMapRouterRule extends RouterRuleParent { + /** The type discriminator describing a sub-type of Rule. */ + kind: "directMap"; +} + +/** A rule providing inline expression rules. */ +export interface ExpressionRouterRule extends RouterRuleParent { + /** + * The expression language to compile to and execute. + * + * Possible values: "powerFx" + */ + language?: ExpressionRouterRuleLanguage; + /** An expression to evaluate. Should contain return statement with calculated values. */ + expression: string; + /** The type discriminator describing a sub-type of Rule. */ + kind: "expression"; +} + +/** A rule providing a binding to an HTTP Triggered Azure Function. */ +export interface FunctionRouterRule extends RouterRuleParent { + /** URL for Azure Function. */ + functionUri: string; + /** Credentials used to access Azure function rule. */ + credential?: FunctionRouterRuleCredential; + /** The type discriminator describing a sub-type of Rule. */ + kind: "function"; +} + +/** Credentials used to access Azure function rule. */ +export interface FunctionRouterRuleCredential { + /** Access key scoped to a particular function. */ + functionKey?: string; + /** Access key scoped to a Azure Function app. This key grants access to all functions under the app. */ + appKey?: string; + /** Client id, when AppKey is provided In context of Azure function, this is usually the name of the key. */ + clientId?: string; +} + +/** A rule providing static rules that always return the same result, regardless of input. */ +export interface StaticRouterRule extends RouterRuleParent { + /** The static value this rule always returns. Values must be primitive values - number, string, boolean. */ + value?: unknown; + /** The type discriminator describing a sub-type of Rule. */ + kind: "static"; +} + +/** A rule providing a binding to an external web server. */ +export interface WebhookRouterRule extends RouterRuleParent { + /** Uri for Authorization Server. */ + authorizationServerUri?: string; + /** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */ + clientCredential?: OAuth2WebhookClientCredential; + /** Uri for Contoso's Web Server. */ + webhookUri?: string; + /** The type discriminator describing a sub-type of Rule. */ + kind: "webhook"; +} + +/** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */ +export interface OAuth2WebhookClientCredential { + /** ClientId for Contoso Authorization server. */ + clientId?: string; + /** Client secret for Contoso Authorization server. */ + clientSecret?: string; +} + +/** Describes a condition that must be met against a set of labels for queue selection. */ +export interface RouterQueueSelector { + /** The label key to query against. */ + key: string; + /** + * Describes how the value of the label is compared to the value defined on the label selector. + * + * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" + */ + labelOperator: LabelOperator; + /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */ + value?: unknown; +} + +/** Attaches a queue selector where the value is passed through from a job's label with the same key. */ +export interface PassThroughQueueSelectorAttachment + extends QueueSelectorAttachmentParent { + /** The label key to query against. */ + key: string; + /** + * Describes how the value of the label is compared to the value pass through. + * + * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" + */ + labelOperator: LabelOperator; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "passThrough"; +} + +/** Attaches queue selectors to a job when the RouterRule is resolved. */ +export interface RuleEngineQueueSelectorAttachment + extends QueueSelectorAttachmentParent { + /** A RouterRule that resolves a collection of queue selectors to attach. */ + rule: RouterRule; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "ruleEngine"; +} + +/** Describes a queue selector that will be attached to a job. */ +export interface StaticQueueSelectorAttachment + extends QueueSelectorAttachmentParent { + /** The queue selector to attach. */ + queueSelector: RouterQueueSelector; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "static"; +} + +/** Describes multiple sets of queue selectors, of which one will be selected and attached according to a weighting. */ +export interface WeightedAllocationQueueSelectorAttachment + extends QueueSelectorAttachmentParent { + /** A collection of percentage based weighted allocations. */ + allocations: Array; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "weightedAllocation"; +} + +/** Contains the weight percentage and queue selectors to be applied if selected for weighted distributions. */ +export interface QueueWeightedAllocation { + /** The percentage of this weight, expressed as a fraction of 1. */ + weight: number; + /** A collection of queue selectors that will be applied if this allocation is selected. */ + queueSelectors: Array; +} + +/** An attachment which attaches worker selectors to a job. */ +export interface WorkerSelectorAttachmentParent { + kind: WorkerSelectorAttachmentKind; +} + +/** Describes a set of worker selectors that will be attached if the given condition resolves to true. */ +export interface ConditionalWorkerSelectorAttachment + extends WorkerSelectorAttachmentParent { + /** The condition that must be true for the worker selectors to be attached. */ + condition: RouterRule; + /** The worker selectors to attach. */ + workerSelectors: Array; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "conditional"; +} + +/** Describes a condition that must be met against a set of labels for worker selection. */ +export interface RouterWorkerSelector { + /** The label key to query against. */ + key: string; + /** + * Describes how the value of the label is compared to the value defined on the worker selector. + * + * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" + */ + labelOperator: LabelOperator; + /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */ + value?: unknown; + /** Describes how long this label selector is valid in seconds. */ + expiresAfterSeconds?: number; + /** Pushes a job to the front of the queue as long as this selector is active. */ + expedite?: boolean; +} + +/** Attaches a worker selector where the value is passed through from a job's label with the same key. */ +export interface PassThroughWorkerSelectorAttachment + extends WorkerSelectorAttachmentParent { + /** The label key to query against. */ + key: string; + /** + * Describes how the value of the label is compared to the value pass through. + * + * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" + */ + labelOperator: LabelOperator; + /** Describes how long the attached label selector is valid in seconds. */ + expiresAfterSeconds?: number; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "passThrough"; +} + +/** Attaches worker selectors to a job when a RouterRule is resolved. */ +export interface RuleEngineWorkerSelectorAttachment + extends WorkerSelectorAttachmentParent { + /** A RouterRule that resolves a collection of worker selectors to attach. */ + rule: RouterRule; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "ruleEngine"; +} + +/** Describes a worker selector that will be attached to a job. */ +export interface StaticWorkerSelectorAttachment + extends WorkerSelectorAttachmentParent { + /** The worker selector to attach. */ + workerSelector: RouterWorkerSelector; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "static"; +} + +/** Describes multiple sets of worker selectors, of which one will be selected and attached according to a weighting. */ +export interface WeightedAllocationWorkerSelectorAttachment + extends WorkerSelectorAttachmentParent { + /** A collection of percentage based weighted allocations. */ + allocations: Array; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "weightedAllocation"; +} + +/** Contains the weight percentage and worker selectors to be applied if selected for weighted distributions. */ +export interface WorkerWeightedAllocation { + /** The percentage of this weight, expressed as a fraction of 1. */ + weight: number; + /** A collection of worker selectors that will be applied if this allocation is selected. */ + workerSelectors: Array; +} + +/** Policy governing how jobs are distributed to workers */ +export interface DistributionPolicy { + /** Friendly name of this policy. */ + name?: string; + /** Number of seconds after which any offers created under this policy will be expired. */ + offerExpiresAfterSeconds?: number; + /** Mode governing the specific distribution method. */ + mode?: DistributionMode; +} + +/** Abstract base class for defining a distribution mode. */ +export interface DistributionModeParent { + /** Governs the minimum desired number of active concurrent offers a job can have. */ + minConcurrentOffers?: number; + /** Governs the maximum number of active concurrent offers a job can have. */ + maxConcurrentOffers?: number; + /** If set to true, then router will match workers to jobs even if they don't match label selectors. Warning: You may get workers that are not qualified for a job they are matched with if you set this variable to true. This flag is intended more for temporary usage. By default, set to false. */ + bypassSelectors?: boolean; + kind: DistributionModeKind; +} + +/** Jobs are distributed to the worker with the strongest abilities available. */ +export interface BestWorkerMode extends DistributionModeParent { + /** Define a scoring rule to use, when calculating a score to determine the best worker. If not set, will use a default scoring formula that uses the number of job labels that the worker labels match, as well as the number of label selectors the worker labels match and/or exceed using a logistic function (https://en.wikipedia.org/wiki/Logistic_function). */ + scoringRule?: RouterRule; + /** Options to configure 'scoringRule'. If not set, default values are used. */ + scoringRuleOptions?: ScoringRuleOptions; + /** The type discriminator describing a sub-type of Mode */ + kind: "bestWorker"; +} + +/** Encapsulates all options that can be passed as parameters for scoring rule with BestWorkerMode. */ +export interface ScoringRuleOptions { + /** Set batch size when 'isBatchScoringEnabled' is set to true. Defaults to 20 if not configured. */ + batchSize?: number; + /** List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload. */ + scoringParameters?: ScoringRuleParameterSelector[]; + /** If set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name for the worker labels will be sent as `worker`. Note: If enabled, use 'batchSize' to set batch size. */ + isBatchScoringEnabled?: boolean; + /** If false, will sort scores by ascending order. By default, set to true. */ + descendingOrder?: boolean; +} + +/** Jobs are directed to the worker who has been idle longest. */ +export interface LongestIdleMode extends DistributionModeParent { + /** The type discriminator describing a sub-type of Mode. */ + kind: "longestIdle"; +} + +/** Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job. */ +export interface RoundRobinMode extends DistributionModeParent { + /** The type discriminator describing a sub-type of Mode. */ + kind: "roundRobin"; +} + +/** A policy that defines actions to execute when exception are triggered. */ +export interface ExceptionPolicy { + /** Friendly name of this policy. */ + name?: string; + /** A collection of exception rules on the exception policy. */ + exceptionRules?: Array; +} + +/** A rule that defines actions to execute upon a specific trigger. */ +export interface ExceptionRule { + /** Id of an exception rule. */ + id: string; + /** The trigger for this exception rule. */ + trigger: ExceptionTrigger; + /** A collection of actions to perform once the exception is triggered. */ + actions: Array; +} + +/** Abstract base class for defining a trigger for exception rules. */ +export interface ExceptionTriggerParent { + kind: ExceptionTriggerKind; +} + +/** Trigger for an exception action on exceeding queue length. */ +export interface QueueLengthExceptionTrigger extends ExceptionTriggerParent { + /** Threshold of number of jobs ahead in the queue to for this trigger to fire. */ + threshold: number; + /** The type discriminator describing a sub-type of ExceptionTrigger. */ + kind: "queueLength"; +} + +/** Trigger for an exception action on exceeding wait time. */ +export interface WaitTimeExceptionTrigger extends ExceptionTriggerParent { + /** Threshold for wait time for this trigger. */ + thresholdSeconds: number; + /** The type discriminator describing a sub-type of ExceptionTrigger. */ + kind: "waitTime"; +} + +/** The action to take when the exception is triggered. */ +export interface ExceptionActionParent { + /** Unique Id of the exception action. */ + id?: string; + kind: ExceptionActionKind; +} + +/** An action that marks a job as cancelled. */ +export interface CancelExceptionAction extends ExceptionActionParent { + /** A note that will be appended to a job's notes collection with the current timestamp. */ + note?: string; + /** Indicates the outcome of a job, populate this field with your own custom values. */ + dispositionCode?: string; + /** The type discriminator describing a sub-type of ExceptionAction. */ + kind: "cancel"; +} + +/** An action that manually reclassifies a job by providing the queue, priority and worker selectors. */ +export interface ManualReclassifyExceptionAction extends ExceptionActionParent { + /** Updated QueueId. */ + queueId?: string; + /** Updated Priority. */ + priority?: number; + /** Updated WorkerSelectors. */ + workerSelectors?: Array; + /** The type discriminator describing a sub-type of ExceptionAction. */ + kind: "manualReclassify"; +} + +/** An action that modifies labels on a job and then reclassifies it. */ +export interface ReclassifyExceptionAction extends ExceptionActionParent { + /** The new classification policy that will determine queue, priority and worker selectors. */ + classificationPolicyId?: string; + /** Dictionary containing the labels to update (or add if not existing) in key-value pairs. Values must be primitive values - number, string, boolean. */ + labelsToUpsert?: Record; + /** The type discriminator describing a sub-type of ExceptionAction. */ + kind: "reclassify"; +} + +/** A queue that can contain jobs to be routed. */ +export interface RouterQueue { + /** Friendly name of this queue. */ + name?: string; + /** Id of a distribution policy that will determine how a job is distributed to workers. */ + distributionPolicyId?: string; + /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */ + labels?: Record; + /** Id of an exception policy that determines various job escalation rules. */ + exceptionPolicyId?: string; +} + +/** A unit of work to be routed */ +export interface RouterJob { + /** Reference to an external parent context, eg. call ID. */ + channelReference?: string; + /** The channel identifier. eg. voice, chat, etc. */ + channelId?: string; + /** Id of a classification policy used for classifying this job. */ + classificationPolicyId?: string; + /** Id of a queue that this job is queued to. */ + queueId?: string; + /** Priority of this job. Value must be between -100 to 100. */ + priority?: number; + /** Reason code for cancelled or closed jobs. */ + dispositionCode?: string; + /** A collection of manually specified worker selectors, which a worker must satisfy in order to process this job. */ + requestedWorkerSelectors?: Array; + /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */ + labels?: Record; + /** A set of non-identifying attributes attached to this job. Values must be primitive values - number, string, boolean. */ + tags?: Record; + /** Notes attached to a job, sorted by timestamp. */ + notes?: Array; + /** If provided, will determine how job matching will be carried out. Default mode: QueueAndMatchMode. */ + matchingMode?: JobMatchingMode; +} + +/** Assignment details of a job to a worker. */ +export interface RouterJobAssignment { + /** Id of the Worker assigned to the job. */ + workerId?: string; + /** Timestamp when the job was assigned to a worker in UTC. */ + assignedAt: Date | string; + /** Timestamp when the job was marked as completed after being assigned in UTC. */ + completedAt?: Date | string; + /** Timestamp when the job was marked as closed after being completed in UTC. */ + closedAt?: Date | string; +} + +/** A note attached to a job. */ +export interface RouterJobNote { + /** The message contained in the note. */ + message: string; + /** The time at which the note was added in UTC. If not provided, will default to the current time. */ + addedAt?: Date | string; +} + +/** + * A matching mode of one of the following types: + * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued. + * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically. + * SuspendMode: Used when matching workers to a job needs to be suspended. + */ +export interface JobMatchingModeParent { + kind: JobMatchingModeKind; +} + +/** Describes a matching mode used for scheduling jobs to be queued at a future time. At the specified time, matching worker to a job will not start automatically. */ +export interface ScheduleAndSuspendMode extends JobMatchingModeParent { + /** Requested schedule time. */ + scheduleAt: Date | string; + /** The type discriminator describing ScheduleAndSuspendMode */ + kind: "scheduleAndSuspend"; +} + +/** Describes a matching mode where matching worker to a job is automatically started after job is queued successfully. */ +export interface QueueAndMatchMode extends JobMatchingModeParent { + /** The type discriminator describing QueueAndMatchMode */ + kind: "queueAndMatch"; +} + +/** Describes a matching mode where matching worker to a job is suspended. */ +export interface SuspendMode extends JobMatchingModeParent { + /** The type discriminator describing SuspendMode */ + kind: "suspend"; +} + +/** Request payload for reclassifying jobs. */ +export interface ReclassifyJobOptions { } + +/** Request payload for cancelling a job. */ +export interface CancelJobOptions { + /** A note that will be appended to a job's Notes collection with the current timestamp. */ + note?: string; + /** Indicates the outcome of a job, populate this field with your own custom values. If not provided, default value of "Cancelled" is set. */ + dispositionCode?: string; +} + +/** Request payload for completing jobs. */ +export interface CompleteJobOptions { + /** A note that will be appended to a job's Notes collection with the current timestamp. */ + note?: string; +} + +/** Request payload for closing jobs */ +export interface CloseJobOptions { + /** Indicates the outcome of a job, populate this field with your own custom values. */ + dispositionCode?: string; + /** If not provided, worker capacity is released immediately along with a JobClosedEvent notification. If provided, worker capacity is released along with a JobClosedEvent notification at a future time in UTC. */ + closeAt?: Date | string; + /** A note that will be appended to a job's Notes collection with the current timestamp. */ + note?: string; +} + +/** Request payload for unassigning a job. */ +export interface UnassignJobOptions { + /** If SuspendMatching is true, then a job is not queued for re-matching with a worker. */ + suspendMatching?: boolean; +} + +/** Request payload for declining offers. */ +export interface DeclineJobOfferOptions { + /** If the RetryOfferAt is not provided, then this job will not be offered again to the worker who declined this job unless the worker is de-registered and re-registered. If a RetryOfferAt time is provided, then the job will be re-matched to eligible workers at the retry time in UTC. The worker that declined the job will also be eligible for the job at that time. */ + retryOfferAt?: Date | string; +} + +/** An entity for jobs to be routed to. */ +export interface RouterWorker { + /** Collection of queue(s) that this worker can receive work from. */ + queues?: string[]; + /** The total capacity score this worker has to manage multiple concurrent jobs. */ + capacity?: number; + /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */ + labels?: Record; + /** A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean. */ + tags?: Record; + /** Collection of channel(s) this worker can handle and their impact on the workers capacity. */ + channels?: Array; + /** A flag indicating this worker is open to receive offers or not. */ + availableForOffers?: boolean; + /** If this is set, the worker will only receive up to this many new offers at a time. */ + maxConcurrentOffers?: number; +} + +/** Represents the capacity a job in this channel will consume from a worker. */ +export interface RouterChannel { + /** Id of a channel. */ + channelId: string; + /** The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. */ + capacityCostPerJob: number; + /** The maximum number of jobs that can be supported concurrently for this channel. Value must be greater than zero. */ + maxNumberOfJobs?: number; +} + +/** An offer of a job to a worker. */ +export interface RouterJobOffer { + /** Id of the job. */ + jobId: string; + /** The capacity cost consumed by the job offer. */ + capacityCost: number; + /** Timestamp when the offer was created in UTC. */ + offeredAt?: Date | string; + /** Timestamp when the offer will expire in UTC. */ + expiresAt?: Date | string; +} + +/** The assignment for a worker to a job. */ +export interface RouterWorkerAssignment { + /** Id of the assignment. */ + assignmentId: string; + /** Id of the job assigned. */ + jobId: string; + /** The amount of capacity this assignment has consumed on the worker. */ + capacityCost: number; + /** The assignment time of the job in UTC. */ + assignedAt: Date | string; +} + +/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */ +export type QueueSelectorAttachment = + | QueueSelectorAttachmentParent + | ConditionalQueueSelectorAttachment + | PassThroughQueueSelectorAttachment + | RuleEngineQueueSelectorAttachment + | StaticQueueSelectorAttachment + | WeightedAllocationQueueSelectorAttachment; +/** + * A rule of one of the following types: + * StaticRule: A rule providing static rules that always return the same result, regardless of input. + * DirectMapRule: A rule that return the same labels as the input labels. + * ExpressionRule: A rule providing inline expression rules. + * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function. + * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol. + */ +export type RouterRule = + | RouterRuleParent + | DirectMapRouterRule + | ExpressionRouterRule + | FunctionRouterRule + | StaticRouterRule + | WebhookRouterRule; +/** An attachment which attaches worker selectors to a job. */ +export type WorkerSelectorAttachment = + | WorkerSelectorAttachmentParent + | ConditionalWorkerSelectorAttachment + | PassThroughWorkerSelectorAttachment + | RuleEngineWorkerSelectorAttachment + | StaticWorkerSelectorAttachment + | WeightedAllocationWorkerSelectorAttachment; +/** Abstract base class for defining a distribution mode. */ +export type DistributionMode = + | DistributionModeParent + | BestWorkerMode + | LongestIdleMode + | RoundRobinMode; +/** Abstract base class for defining a trigger for exception rules. */ +export type ExceptionTrigger = + | ExceptionTriggerParent + | QueueLengthExceptionTrigger + | WaitTimeExceptionTrigger; +/** The action to take when the exception is triggered. */ +export type ExceptionAction = + | ExceptionActionParent + | CancelExceptionAction + | ManualReclassifyExceptionAction + | ReclassifyExceptionAction; +/** + * A matching mode of one of the following types: + * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued. + * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically. + * SuspendMode: Used when matching workers to a job needs to be suspended. + */ +export type JobMatchingMode = + | JobMatchingModeParent + | ScheduleAndSuspendMode + | QueueAndMatchMode + | SuspendMode; +/** Alias for QueueSelectorAttachmentKind */ +export type QueueSelectorAttachmentKind = string; +/** Alias for RouterRuleKind */ +export type RouterRuleKind = string; +/** Alias for ExpressionRouterRuleLanguage */ +export type ExpressionRouterRuleLanguage = string; +/** Alias for LabelOperator */ +export type LabelOperator = string; +/** Alias for WorkerSelectorAttachmentKind */ +export type WorkerSelectorAttachmentKind = string; +/** Alias for RouterWorkerSelectorStatus */ +export type RouterWorkerSelectorStatus = string; +/** Alias for DistributionModeKind */ +export type DistributionModeKind = string; +/** Alias for ScoringRuleParameterSelector */ +export type ScoringRuleParameterSelector = string; +/** Alias for ExceptionTriggerKind */ +export type ExceptionTriggerKind = string; +/** Alias for ExceptionActionKind */ +export type ExceptionActionKind = string; +/** Alias for RouterJobStatus */ +export type RouterJobStatus = string; +/** Alias for JobMatchingModeKind */ +export type JobMatchingModeKind = string; +/** Alias for RouterJobStatusSelector */ +export type RouterJobStatusSelector = string; +/** Alias for RouterWorkerState */ +export type RouterWorkerState = string; +/** Alias for RouterWorkerStateSelector */ +export type RouterWorkerStateSelector = string; diff --git a/sdk/communication/communication-job-router-rest/generated/outputModels.ts b/sdk/communication/communication-job-router-rest/generated/outputModels.ts new file mode 100644 index 000000000000..ccc072ce07c3 --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/outputModels.ts @@ -0,0 +1,797 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +/** A container for the rules that govern how jobs are classified. */ +export interface ClassificationPolicyOutput { + /** The entity tag for this resource. */ + readonly etag: string; + /** Id of a classification policy. */ + readonly id: string; + /** Friendly name of this policy. */ + name?: string; + /** Id of a fallback queue to select if queue selector attachments doesn't find a match. */ + fallbackQueueId?: string; + /** Queue selector attachments used to resolve a queue for a job. */ + queueSelectorAttachments?: Array; + /** A rule to determine a priority score for a job. */ + prioritizationRule?: RouterRuleOutput; + /** Worker selector attachments used to attach worker selectors to a job. */ + workerSelectorAttachments?: Array; +} + +/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */ +export interface QueueSelectorAttachmentOutputParent { + kind: QueueSelectorAttachmentKindOutput; +} + +/** Describes a set of queue selectors that will be attached if the given condition resolves to true. */ +export interface ConditionalQueueSelectorAttachmentOutput + extends QueueSelectorAttachmentOutputParent { + /** The condition that must be true for the queue selectors to be attached. */ + condition: RouterRuleOutput; + /** The queue selectors to attach. */ + queueSelectors: Array; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "conditional"; +} + +/** + * A rule of one of the following types: + * StaticRule: A rule providing static rules that always return the same result, regardless of input. + * DirectMapRule: A rule that return the same labels as the input labels. + * ExpressionRule: A rule providing inline expression rules. + * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function. + * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol. + */ +export interface RouterRuleOutputParent { + kind: RouterRuleKindOutput; +} + +/** A rule that return the same labels as the input labels. */ +export interface DirectMapRouterRuleOutput extends RouterRuleOutputParent { + /** The type discriminator describing a sub-type of Rule. */ + kind: "directMap"; +} + +/** A rule providing inline expression rules. */ +export interface ExpressionRouterRuleOutput extends RouterRuleOutputParent { + /** + * The expression language to compile to and execute. + * + * Possible values: "powerFx" + */ + language?: ExpressionRouterRuleLanguageOutput; + /** An expression to evaluate. Should contain return statement with calculated values. */ + expression: string; + /** The type discriminator describing a sub-type of Rule. */ + kind: "expression"; +} + +/** A rule providing a binding to an HTTP Triggered Azure Function. */ +export interface FunctionRouterRuleOutput extends RouterRuleOutputParent { + /** URL for Azure Function. */ + functionUri: string; + /** Credentials used to access Azure function rule. */ + credential?: FunctionRouterRuleCredentialOutput; + /** The type discriminator describing a sub-type of Rule. */ + kind: "function"; +} + +/** Credentials used to access Azure function rule. */ +export interface FunctionRouterRuleCredentialOutput { + /** Access key scoped to a particular function. */ + functionKey?: string; + /** Access key scoped to a Azure Function app. This key grants access to all functions under the app. */ + appKey?: string; + /** Client id, when AppKey is provided In context of Azure function, this is usually the name of the key. */ + clientId?: string; +} + +/** A rule providing static rules that always return the same result, regardless of input. */ +export interface StaticRouterRuleOutput extends RouterRuleOutputParent { + /** The static value this rule always returns. Values must be primitive values - number, string, boolean. */ + value?: any; + /** The type discriminator describing a sub-type of Rule. */ + kind: "static"; +} + +/** A rule providing a binding to an external web server. */ +export interface WebhookRouterRuleOutput extends RouterRuleOutputParent { + /** Uri for Authorization Server. */ + authorizationServerUri?: string; + /** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */ + clientCredential?: OAuth2WebhookClientCredentialOutput; + /** Uri for Contoso's Web Server. */ + webhookUri?: string; + /** The type discriminator describing a sub-type of Rule. */ + kind: "webhook"; +} + +/** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */ +export interface OAuth2WebhookClientCredentialOutput { + /** ClientId for Contoso Authorization server. */ + clientId?: string; + /** Client secret for Contoso Authorization server. */ + clientSecret?: string; +} + +/** Describes a condition that must be met against a set of labels for queue selection. */ +export interface RouterQueueSelectorOutput { + /** The label key to query against. */ + key: string; + /** + * Describes how the value of the label is compared to the value defined on the label selector. + * + * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" + */ + labelOperator: LabelOperatorOutput; + /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */ + value?: any; +} + +/** Attaches a queue selector where the value is passed through from a job's label with the same key. */ +export interface PassThroughQueueSelectorAttachmentOutput + extends QueueSelectorAttachmentOutputParent { + /** The label key to query against. */ + key: string; + /** + * Describes how the value of the label is compared to the value pass through. + * + * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" + */ + labelOperator: LabelOperatorOutput; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "passThrough"; +} + +/** Attaches queue selectors to a job when the RouterRule is resolved. */ +export interface RuleEngineQueueSelectorAttachmentOutput + extends QueueSelectorAttachmentOutputParent { + /** A RouterRule that resolves a collection of queue selectors to attach. */ + rule: RouterRuleOutput; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "ruleEngine"; +} + +/** Describes a queue selector that will be attached to a job. */ +export interface StaticQueueSelectorAttachmentOutput + extends QueueSelectorAttachmentOutputParent { + /** The queue selector to attach. */ + queueSelector: RouterQueueSelectorOutput; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "static"; +} + +/** Describes multiple sets of queue selectors, of which one will be selected and attached according to a weighting. */ +export interface WeightedAllocationQueueSelectorAttachmentOutput + extends QueueSelectorAttachmentOutputParent { + /** A collection of percentage based weighted allocations. */ + allocations: Array; + /** The type discriminator describing the type of queue selector attachment. */ + kind: "weightedAllocation"; +} + +/** Contains the weight percentage and queue selectors to be applied if selected for weighted distributions. */ +export interface QueueWeightedAllocationOutput { + /** The percentage of this weight, expressed as a fraction of 1. */ + weight: number; + /** A collection of queue selectors that will be applied if this allocation is selected. */ + queueSelectors: Array; +} + +/** An attachment which attaches worker selectors to a job. */ +export interface WorkerSelectorAttachmentOutputParent { + kind: WorkerSelectorAttachmentKindOutput; +} + +/** Describes a set of worker selectors that will be attached if the given condition resolves to true. */ +export interface ConditionalWorkerSelectorAttachmentOutput + extends WorkerSelectorAttachmentOutputParent { + /** The condition that must be true for the worker selectors to be attached. */ + condition: RouterRuleOutput; + /** The worker selectors to attach. */ + workerSelectors: Array; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "conditional"; +} + +/** Describes a condition that must be met against a set of labels for worker selection. */ +export interface RouterWorkerSelectorOutput { + /** The label key to query against. */ + key: string; + /** + * Describes how the value of the label is compared to the value defined on the worker selector. + * + * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" + */ + labelOperator: LabelOperatorOutput; + /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */ + value?: any; + /** Describes how long this label selector is valid in seconds. */ + expiresAfterSeconds?: number; + /** Pushes a job to the front of the queue as long as this selector is active. */ + expedite?: boolean; + /** + * Status of the worker selector. + * + * Possible values: "active", "expired" + */ + readonly status?: RouterWorkerSelectorStatusOutput; + /** The time at which this worker selector expires in UTC. */ + readonly expiresAt?: string; +} + +/** Attaches a worker selector where the value is passed through from a job's label with the same key. */ +export interface PassThroughWorkerSelectorAttachmentOutput + extends WorkerSelectorAttachmentOutputParent { + /** The label key to query against. */ + key: string; + /** + * Describes how the value of the label is compared to the value pass through. + * + * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" + */ + labelOperator: LabelOperatorOutput; + /** Describes how long the attached label selector is valid in seconds. */ + expiresAfterSeconds?: number; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "passThrough"; +} + +/** Attaches worker selectors to a job when a RouterRule is resolved. */ +export interface RuleEngineWorkerSelectorAttachmentOutput + extends WorkerSelectorAttachmentOutputParent { + /** A RouterRule that resolves a collection of worker selectors to attach. */ + rule: RouterRuleOutput; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "ruleEngine"; +} + +/** Describes a worker selector that will be attached to a job. */ +export interface StaticWorkerSelectorAttachmentOutput + extends WorkerSelectorAttachmentOutputParent { + /** The worker selector to attach. */ + workerSelector: RouterWorkerSelectorOutput; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "static"; +} + +/** Describes multiple sets of worker selectors, of which one will be selected and attached according to a weighting. */ +export interface WeightedAllocationWorkerSelectorAttachmentOutput + extends WorkerSelectorAttachmentOutputParent { + /** A collection of percentage based weighted allocations. */ + allocations: Array; + /** The type discriminator describing the type of worker selector attachment. */ + kind: "weightedAllocation"; +} + +/** Contains the weight percentage and worker selectors to be applied if selected for weighted distributions. */ +export interface WorkerWeightedAllocationOutput { + /** The percentage of this weight, expressed as a fraction of 1. */ + weight: number; + /** A collection of worker selectors that will be applied if this allocation is selected. */ + workerSelectors: Array; +} + +/** Paged collection of ClassificationPolicy items */ +export interface PagedClassificationPolicyOutput { + /** The ClassificationPolicy items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Policy governing how jobs are distributed to workers */ +export interface DistributionPolicyOutput { + /** The entity tag for this resource. */ + readonly etag: string; + /** Id of a distribution policy. */ + readonly id: string; + /** Friendly name of this policy. */ + name?: string; + /** Number of seconds after which any offers created under this policy will be expired. */ + offerExpiresAfterSeconds?: number; + /** Mode governing the specific distribution method. */ + mode?: DistributionModeOutput; +} + +/** Abstract base class for defining a distribution mode. */ +export interface DistributionModeOutputParent { + /** Governs the minimum desired number of active concurrent offers a job can have. */ + minConcurrentOffers?: number; + /** Governs the maximum number of active concurrent offers a job can have. */ + maxConcurrentOffers?: number; + /** If set to true, then router will match workers to jobs even if they don't match label selectors. Warning: You may get workers that are not qualified for a job they are matched with if you set this variable to true. This flag is intended more for temporary usage. By default, set to false. */ + bypassSelectors?: boolean; + kind: DistributionModeKindOutput; +} + +/** Jobs are distributed to the worker with the strongest abilities available. */ +export interface BestWorkerModeOutput extends DistributionModeOutputParent { + /** Define a scoring rule to use, when calculating a score to determine the best worker. If not set, will use a default scoring formula that uses the number of job labels that the worker labels match, as well as the number of label selectors the worker labels match and/or exceed using a logistic function (https://en.wikipedia.org/wiki/Logistic_function). */ + scoringRule?: RouterRuleOutput; + /** Options to configure 'scoringRule'. If not set, default values are used. */ + scoringRuleOptions?: ScoringRuleOptionsOutput; + /** The type discriminator describing a sub-type of Mode */ + kind: "bestWorker"; +} + +/** Encapsulates all options that can be passed as parameters for scoring rule with BestWorkerMode. */ +export interface ScoringRuleOptionsOutput { + /** Set batch size when 'isBatchScoringEnabled' is set to true. Defaults to 20 if not configured. */ + batchSize?: number; + /** List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload. */ + scoringParameters?: ScoringRuleParameterSelectorOutput[]; + /** If set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name for the worker labels will be sent as `worker`. Note: If enabled, use 'batchSize' to set batch size. */ + isBatchScoringEnabled?: boolean; + /** If false, will sort scores by ascending order. By default, set to true. */ + descendingOrder?: boolean; +} + +/** Jobs are directed to the worker who has been idle longest. */ +export interface LongestIdleModeOutput extends DistributionModeOutputParent { + /** The type discriminator describing a sub-type of Mode. */ + kind: "longestIdle"; +} + +/** Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job. */ +export interface RoundRobinModeOutput extends DistributionModeOutputParent { + /** The type discriminator describing a sub-type of Mode. */ + kind: "roundRobin"; +} + +/** Paged collection of DistributionPolicy items */ +export interface PagedDistributionPolicyOutput { + /** The DistributionPolicy items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + +/** A policy that defines actions to execute when exception are triggered. */ +export interface ExceptionPolicyOutput { + /** The entity tag for this resource. */ + readonly etag: string; + /** Id of an exception policy. */ + readonly id: string; + /** Friendly name of this policy. */ + name?: string; + /** A collection of exception rules on the exception policy. */ + exceptionRules?: Array; +} + +/** A rule that defines actions to execute upon a specific trigger. */ +export interface ExceptionRuleOutput { + /** Id of an exception rule. */ + id: string; + /** The trigger for this exception rule. */ + trigger: ExceptionTriggerOutput; + /** A collection of actions to perform once the exception is triggered. */ + actions: Array; +} + +/** Abstract base class for defining a trigger for exception rules. */ +export interface ExceptionTriggerOutputParent { + kind: ExceptionTriggerKindOutput; +} + +/** Trigger for an exception action on exceeding queue length. */ +export interface QueueLengthExceptionTriggerOutput + extends ExceptionTriggerOutputParent { + /** Threshold of number of jobs ahead in the queue to for this trigger to fire. */ + threshold: number; + /** The type discriminator describing a sub-type of ExceptionTrigger. */ + kind: "queueLength"; +} + +/** Trigger for an exception action on exceeding wait time. */ +export interface WaitTimeExceptionTriggerOutput + extends ExceptionTriggerOutputParent { + /** Threshold for wait time for this trigger. */ + thresholdSeconds: number; + /** The type discriminator describing a sub-type of ExceptionTrigger. */ + kind: "waitTime"; +} + +/** The action to take when the exception is triggered. */ +export interface ExceptionActionOutputParent { + /** Unique Id of the exception action. */ + id?: string; + kind: ExceptionActionKindOutput; +} + +/** An action that marks a job as cancelled. */ +export interface CancelExceptionActionOutput + extends ExceptionActionOutputParent { + /** A note that will be appended to a job's notes collection with the current timestamp. */ + note?: string; + /** Indicates the outcome of a job, populate this field with your own custom values. */ + dispositionCode?: string; + /** The type discriminator describing a sub-type of ExceptionAction. */ + kind: "cancel"; +} + +/** An action that manually reclassifies a job by providing the queue, priority and worker selectors. */ +export interface ManualReclassifyExceptionActionOutput + extends ExceptionActionOutputParent { + /** Updated QueueId. */ + queueId?: string; + /** Updated Priority. */ + priority?: number; + /** Updated WorkerSelectors. */ + workerSelectors?: Array; + /** The type discriminator describing a sub-type of ExceptionAction. */ + kind: "manualReclassify"; +} + +/** An action that modifies labels on a job and then reclassifies it. */ +export interface ReclassifyExceptionActionOutput + extends ExceptionActionOutputParent { + /** The new classification policy that will determine queue, priority and worker selectors. */ + classificationPolicyId?: string; + /** Dictionary containing the labels to update (or add if not existing) in key-value pairs. Values must be primitive values - number, string, boolean. */ + labelsToUpsert?: Record; + /** The type discriminator describing a sub-type of ExceptionAction. */ + kind: "reclassify"; +} + +/** Paged collection of ExceptionPolicy items */ +export interface PagedExceptionPolicyOutput { + /** The ExceptionPolicy items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + +/** A queue that can contain jobs to be routed. */ +export interface RouterQueueOutput { + /** The entity tag for this resource. */ + readonly etag: string; + /** Id of a queue. */ + readonly id: string; + /** Friendly name of this queue. */ + name?: string; + /** Id of a distribution policy that will determine how a job is distributed to workers. */ + distributionPolicyId?: string; + /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */ + labels?: Record; + /** Id of an exception policy that determines various job escalation rules. */ + exceptionPolicyId?: string; +} + +/** Paged collection of RouterQueue items */ +export interface PagedRouterQueueOutput { + /** The RouterQueue items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + +/** A unit of work to be routed */ +export interface RouterJobOutput { + /** The entity tag for this resource. */ + readonly etag: string; + /** Id of a job. */ + readonly id: string; + /** Reference to an external parent context, eg. call ID. */ + channelReference?: string; + /** + * The status of the job. + * + * Possible values: "pendingClassification", "queued", "assigned", "completed", "closed", "cancelled", "classificationFailed", "created", "pendingSchedule", "scheduled", "scheduleFailed", "waitingForActivation" + */ + readonly status?: RouterJobStatusOutput; + /** Timestamp a job was queued in UTC. */ + readonly enqueuedAt?: string; + /** The channel identifier. eg. voice, chat, etc. */ + channelId?: string; + /** Id of a classification policy used for classifying this job. */ + classificationPolicyId?: string; + /** Id of a queue that this job is queued to. */ + queueId?: string; + /** Priority of this job. Value must be between -100 to 100. */ + priority?: number; + /** Reason code for cancelled or closed jobs. */ + dispositionCode?: string; + /** A collection of manually specified worker selectors, which a worker must satisfy in order to process this job. */ + requestedWorkerSelectors?: Array; + /** A collection of worker selectors attached by a classification policy, which a worker must satisfy in order to process this job. */ + readonly attachedWorkerSelectors?: Array; + /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */ + labels?: Record; + /** A collection of the assignments of the job. Key is AssignmentId. */ + readonly assignments?: Record; + /** A set of non-identifying attributes attached to this job. Values must be primitive values - number, string, boolean. */ + tags?: Record; + /** Notes attached to a job, sorted by timestamp. */ + notes?: Array; + /** If set, job will be scheduled to be enqueued at a given time. */ + readonly scheduledAt?: string; + /** If provided, will determine how job matching will be carried out. Default mode: QueueAndMatchMode. */ + matchingMode?: JobMatchingModeOutput; +} + +/** Assignment details of a job to a worker. */ +export interface RouterJobAssignmentOutput { + /** Id of a job assignment. */ + readonly assignmentId: string; + /** Id of the Worker assigned to the job. */ + workerId?: string; + /** Timestamp when the job was assigned to a worker in UTC. */ + assignedAt: string; + /** Timestamp when the job was marked as completed after being assigned in UTC. */ + completedAt?: string; + /** Timestamp when the job was marked as closed after being completed in UTC. */ + closedAt?: string; +} + +/** A note attached to a job. */ +export interface RouterJobNoteOutput { + /** The message contained in the note. */ + message: string; + /** The time at which the note was added in UTC. If not provided, will default to the current time. */ + addedAt?: string; +} + +/** + * A matching mode of one of the following types: + * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued. + * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically. + * SuspendMode: Used when matching workers to a job needs to be suspended. + */ +export interface JobMatchingModeOutputParent { + kind: JobMatchingModeKindOutput; +} + +/** Describes a matching mode used for scheduling jobs to be queued at a future time. At the specified time, matching worker to a job will not start automatically. */ +export interface ScheduleAndSuspendModeOutput + extends JobMatchingModeOutputParent { + /** Requested schedule time. */ + scheduleAt: string; + /** The type discriminator describing ScheduleAndSuspendMode */ + kind: "scheduleAndSuspend"; +} + +/** Describes a matching mode where matching worker to a job is automatically started after job is queued successfully. */ +export interface QueueAndMatchModeOutput extends JobMatchingModeOutputParent { + /** The type discriminator describing QueueAndMatchMode */ + kind: "queueAndMatch"; +} + +/** Describes a matching mode where matching worker to a job is suspended. */ +export interface SuspendModeOutput extends JobMatchingModeOutputParent { + /** The type discriminator describing SuspendMode */ + kind: "suspend"; +} + +/** Response payload from reclassifying a job. */ +export interface ReclassifyJobResultOutput { } + +/** Response payload from cancelling a job. */ +export interface CancelJobResultOutput { } + +/** Response payload from completing a job. */ +export interface CompleteJobResultOutput { } + +/** Response payload from closing a job. */ +export interface CloseJobResultOutput { } + +/** Paged collection of RouterJob items */ +export interface PagedRouterJobOutput { + /** The RouterJob items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Position and estimated wait time for a job. */ +export interface RouterJobPositionDetailsOutput { + /** Id of the job these details are about. */ + jobId: string; + /** Position of the job in question within that queue. */ + position: number; + /** Id of the queue this job is enqueued in. */ + queueId: string; + /** Length of the queue: total number of enqueued jobs. */ + queueLength: number; + /** Estimated wait time of the job rounded up to the nearest minute. */ + estimatedWaitTimeMinutes: number; +} + +/** Response payload after a job has been successfully unassigned. */ +export interface UnassignJobResultOutput { + /** Id of an unassigned job. */ + jobId: string; + /** The number of times a job is unassigned. At a maximum 3. */ + unassignmentCount: number; +} + +/** Response containing ids for the worker, job, and assignment from an accepted offer. */ +export interface AcceptJobOfferResultOutput { + /** Id of job assignment that assigns a worker that has accepted an offer to a job. */ + assignmentId: string; + /** Id of the job assigned. */ + jobId: string; + /** Id of the worker that has been assigned this job. */ + workerId: string; +} + +/** Response payload from declining a job. */ +export interface DeclineJobOfferResultOutput { } + +/** Statistics for the queue. */ +export interface RouterQueueStatisticsOutput { + /** Id of the queue these details are about. */ + queueId: string; + /** Length of the queue: total number of enqueued jobs. */ + length: number; + /** The estimated wait time of this queue rounded up to the nearest minute, grouped by job priority. */ + estimatedWaitTimeMinutes?: Record; + /** The wait time of the job that has been enqueued in this queue for the longest. */ + longestJobWaitTimeMinutes?: number; +} + +/** An entity for jobs to be routed to. */ +export interface RouterWorkerOutput { + /** The entity tag for this resource. */ + readonly etag: string; + /** Id of a worker. */ + readonly id: string; + /** + * Current state of a worker. + * + * Possible values: "active", "draining", "inactive" + */ + readonly state?: RouterWorkerStateOutput; + /** Collection of queue(s) that this worker can receive work from. */ + queues?: string[]; + /** The total capacity score this worker has to manage multiple concurrent jobs. */ + capacity?: number; + /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */ + labels?: Record; + /** A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean. */ + tags?: Record; + /** Collection of channel(s) this worker can handle and their impact on the workers capacity. */ + channels?: Array; + /** A list of active offers issued to this worker. */ + readonly offers?: Array; + /** A list of assigned jobs attached to this worker. */ + readonly assignedJobs?: Array; + /** A value indicating the workers capacity. A value of '1' means all capacity is consumed. A value of '0' means no capacity is currently consumed. */ + readonly loadRatio?: number; + /** A flag indicating this worker is open to receive offers or not. */ + availableForOffers?: boolean; + /** If this is set, the worker will only receive up to this many new offers at a time. */ + maxConcurrentOffers?: number; +} + +/** Represents the capacity a job in this channel will consume from a worker. */ +export interface RouterChannelOutput { + /** Id of a channel. */ + channelId: string; + /** The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. */ + capacityCostPerJob: number; + /** The maximum number of jobs that can be supported concurrently for this channel. Value must be greater than zero. */ + maxNumberOfJobs?: number; +} + +/** An offer of a job to a worker. */ +export interface RouterJobOfferOutput { + /** Id of an offer. */ + readonly offerId: string; + /** Id of the job. */ + jobId: string; + /** The capacity cost consumed by the job offer. */ + capacityCost: number; + /** Timestamp when the offer was created in UTC. */ + offeredAt?: string; + /** Timestamp when the offer will expire in UTC. */ + expiresAt?: string; +} + +/** The assignment for a worker to a job. */ +export interface RouterWorkerAssignmentOutput { + /** Id of the assignment. */ + assignmentId: string; + /** Id of the job assigned. */ + jobId: string; + /** The amount of capacity this assignment has consumed on the worker. */ + capacityCost: number; + /** The assignment time of the job in UTC. */ + assignedAt: string; +} + +/** Paged collection of RouterWorker items */ +export interface PagedRouterWorkerOutput { + /** The RouterWorker items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + +/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */ +export type QueueSelectorAttachmentOutput = + | QueueSelectorAttachmentOutputParent + | ConditionalQueueSelectorAttachmentOutput + | PassThroughQueueSelectorAttachmentOutput + | RuleEngineQueueSelectorAttachmentOutput + | StaticQueueSelectorAttachmentOutput + | WeightedAllocationQueueSelectorAttachmentOutput; +/** + * A rule of one of the following types: + * StaticRule: A rule providing static rules that always return the same result, regardless of input. + * DirectMapRule: A rule that return the same labels as the input labels. + * ExpressionRule: A rule providing inline expression rules. + * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function. + * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol. + */ +export type RouterRuleOutput = + | RouterRuleOutputParent + | DirectMapRouterRuleOutput + | ExpressionRouterRuleOutput + | FunctionRouterRuleOutput + | StaticRouterRuleOutput + | WebhookRouterRuleOutput; +/** An attachment which attaches worker selectors to a job. */ +export type WorkerSelectorAttachmentOutput = + | WorkerSelectorAttachmentOutputParent + | ConditionalWorkerSelectorAttachmentOutput + | PassThroughWorkerSelectorAttachmentOutput + | RuleEngineWorkerSelectorAttachmentOutput + | StaticWorkerSelectorAttachmentOutput + | WeightedAllocationWorkerSelectorAttachmentOutput; +/** Abstract base class for defining a distribution mode. */ +export type DistributionModeOutput = + | DistributionModeOutputParent + | BestWorkerModeOutput + | LongestIdleModeOutput + | RoundRobinModeOutput; +/** Abstract base class for defining a trigger for exception rules. */ +export type ExceptionTriggerOutput = + | ExceptionTriggerOutputParent + | QueueLengthExceptionTriggerOutput + | WaitTimeExceptionTriggerOutput; +/** The action to take when the exception is triggered. */ +export type ExceptionActionOutput = + | ExceptionActionOutputParent + | CancelExceptionActionOutput + | ManualReclassifyExceptionActionOutput + | ReclassifyExceptionActionOutput; +/** + * A matching mode of one of the following types: + * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued. + * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically. + * SuspendMode: Used when matching workers to a job needs to be suspended. + */ +export type JobMatchingModeOutput = + | JobMatchingModeOutputParent + | ScheduleAndSuspendModeOutput + | QueueAndMatchModeOutput + | SuspendModeOutput; +/** Alias for QueueSelectorAttachmentKindOutput */ +export type QueueSelectorAttachmentKindOutput = string; +/** Alias for RouterRuleKindOutput */ +export type RouterRuleKindOutput = string; +/** Alias for ExpressionRouterRuleLanguageOutput */ +export type ExpressionRouterRuleLanguageOutput = string; +/** Alias for LabelOperatorOutput */ +export type LabelOperatorOutput = string; +/** Alias for WorkerSelectorAttachmentKindOutput */ +export type WorkerSelectorAttachmentKindOutput = string; +/** Alias for RouterWorkerSelectorStatusOutput */ +export type RouterWorkerSelectorStatusOutput = string; +/** Alias for DistributionModeKindOutput */ +export type DistributionModeKindOutput = string; +/** Alias for ScoringRuleParameterSelectorOutput */ +export type ScoringRuleParameterSelectorOutput = string; +/** Alias for ExceptionTriggerKindOutput */ +export type ExceptionTriggerKindOutput = string; +/** Alias for ExceptionActionKindOutput */ +export type ExceptionActionKindOutput = string; +/** Alias for RouterJobStatusOutput */ +export type RouterJobStatusOutput = string; +/** Alias for JobMatchingModeKindOutput */ +export type JobMatchingModeKindOutput = string; +/** Alias for RouterWorkerStateOutput */ +export type RouterWorkerStateOutput = string; diff --git a/sdk/communication/communication-job-router-rest/generated/paginateHelper.ts b/sdk/communication/communication-job-router-rest/generated/paginateHelper.ts new file mode 100644 index 000000000000..9358a3f884b0 --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/paginateHelper.ts @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +import { + Client, + createRestError, + PathUncheckedResponse, +} from "@azure-rest/core-client"; + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator( + pagedResult, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as ( + settings?: TPageSettings, + ) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage( + pageLink ?? pagedResult.firstPageLink, + ); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator< + TElement, + TPage, + TPageSettings + >; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: ( + pageLink: TLink, + ) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + +/** + * Helper type to extract the type of an array + */ +export type GetArrayType = T extends Array ? TData : never; + +/** + * The type of a custom function that defines how to get a page and a link to the next one if any. + */ +export type GetPage = (pageLink: string) => Promise<{ + page: TPage; + nextPageLink?: string; +}>; + +/** + * Options for the paging helper + */ +export interface PagingOptions { + /** + * Custom function to extract pagination details for crating the PagedAsyncIterableIterator + */ + customGetPage?: GetPage[]>; +} + +/** + * Helper type to infer the Type of the paged elements from the response type + * This type is generated based on the swagger information for x-ms-pageable + * specifically on the itemName property which indicates the property of the response + * where the page items are found. The default value is `value`. + * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter + */ +export type PaginateReturn = TResult extends { + body: { value?: infer TPage }; +} + ? GetArrayType + : Array; + +/** + * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension + * @param client - Client to use for sending the next page requests + * @param initialResponse - Initial response containing the nextLink and current page of elements + * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results + * @returns - PagedAsyncIterableIterator to iterate the elements + */ +export function paginate( + client: Client, + initialResponse: TResponse, + options: PagingOptions = {}, +): PagedAsyncIterableIterator> { + // Extract element type from initial response + type TElement = PaginateReturn; + let firstRun = true; + const itemName = "value"; + const nextLinkName = "nextLink"; + const { customGetPage } = options; + const pagedResult: PagedResult = { + firstPageLink: "", + getPage: + typeof customGetPage === "function" + ? customGetPage + : async (pageLink: string) => { + const result = firstRun + ? initialResponse + : await client.pathUnchecked(pageLink).get(); + firstRun = false; + checkPagingRequest(result); + const nextLink = getNextLink(result.body, nextLinkName); + const values = getElements(result.body, itemName); + return { + page: values, + nextPageLink: nextLink, + }; + }, + }; + + return getPagedAsyncIterator(pagedResult); +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined") { + throw new Error( + `Body Property ${nextLinkName} should be a string or undefined`, + ); + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + + // value has to be an array according to the x-ms-pageable extension. + // The fact that this must be an array is used above to calculate the + // type of elements in the page in PaginateReturn + if (!Array.isArray(value)) { + throw new Error( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse): void { + const Http2xxStatusCodes = [ + "200", + "201", + "202", + "203", + "204", + "205", + "206", + "207", + "208", + "226", + ]; + if (!Http2xxStatusCodes.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} diff --git a/sdk/communication/communication-job-router-rest/generated/parameters.ts b/sdk/communication/communication-job-router-rest/generated/parameters.ts new file mode 100644 index 000000000000..8f66b8ee3ddc --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/parameters.ts @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +import { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; +import { RequestParameters } from "@azure-rest/core-client"; +import { + ClassificationPolicy, + DistributionPolicy, + ExceptionPolicy, + RouterQueue, + RouterJob, + ReclassifyJobOptions, + CancelJobOptions, + CompleteJobOptions, + CloseJobOptions, + RouterJobStatusSelector, + UnassignJobOptions, + DeclineJobOfferOptions, + RouterWorker, + RouterWorkerStateSelector, +} from "./models.js"; + +export interface UpsertClassificationPolicyHeaders { + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; +} + +/** The resource instance. */ +export type ClassificationPolicyResourceMergeAndPatch = + Partial; + +export interface UpsertClassificationPolicyBodyParam { + /** The resource instance. */ + body: ClassificationPolicyResourceMergeAndPatch; +} + +export interface UpsertClassificationPolicyHeaderParam { + headers?: RawHttpHeadersInput & UpsertClassificationPolicyHeaders; +} + +export interface UpsertClassificationPolicyMediaTypesParam { + /** This request has a JSON Merge Patch body. */ + contentType: "application/merge-patch+json"; +} + +export type UpsertClassificationPolicyParameters = + UpsertClassificationPolicyHeaderParam & + UpsertClassificationPolicyMediaTypesParam & + UpsertClassificationPolicyBodyParam & + RequestParameters; +export type GetClassificationPolicyParameters = RequestParameters; +export type DeleteClassificationPolicyParameters = RequestParameters; + +export interface ListClassificationPoliciesQueryParamProperties { + /** Number of objects to return per page. */ + maxpagesize?: number; +} + +export interface ListClassificationPoliciesQueryParam { + queryParameters?: ListClassificationPoliciesQueryParamProperties; +} + +export type ListClassificationPoliciesParameters = + ListClassificationPoliciesQueryParam & RequestParameters; + +export interface UpsertDistributionPolicyHeaders { + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; +} + +/** The resource instance. */ +export type DistributionPolicyResourceMergeAndPatch = + Partial; + +export interface UpsertDistributionPolicyBodyParam { + /** The resource instance. */ + body: DistributionPolicyResourceMergeAndPatch; +} + +export interface UpsertDistributionPolicyHeaderParam { + headers?: RawHttpHeadersInput & UpsertDistributionPolicyHeaders; +} + +export interface UpsertDistributionPolicyMediaTypesParam { + /** This request has a JSON Merge Patch body. */ + contentType: "application/merge-patch+json"; +} + +export type UpsertDistributionPolicyParameters = + UpsertDistributionPolicyHeaderParam & + UpsertDistributionPolicyMediaTypesParam & + UpsertDistributionPolicyBodyParam & + RequestParameters; +export type GetDistributionPolicyParameters = RequestParameters; +export type DeleteDistributionPolicyParameters = RequestParameters; + +export interface ListDistributionPoliciesQueryParamProperties { + /** Number of objects to return per page. */ + maxpagesize?: number; +} + +export interface ListDistributionPoliciesQueryParam { + queryParameters?: ListDistributionPoliciesQueryParamProperties; +} + +export type ListDistributionPoliciesParameters = + ListDistributionPoliciesQueryParam & RequestParameters; + +export interface UpsertExceptionPolicyHeaders { + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; +} + +/** The resource instance. */ +export type ExceptionPolicyResourceMergeAndPatch = Partial; + +export interface UpsertExceptionPolicyBodyParam { + /** The resource instance. */ + body: ExceptionPolicyResourceMergeAndPatch; +} + +export interface UpsertExceptionPolicyHeaderParam { + headers?: RawHttpHeadersInput & UpsertExceptionPolicyHeaders; +} + +export interface UpsertExceptionPolicyMediaTypesParam { + /** This request has a JSON Merge Patch body. */ + contentType: "application/merge-patch+json"; +} + +export type UpsertExceptionPolicyParameters = UpsertExceptionPolicyHeaderParam & + UpsertExceptionPolicyMediaTypesParam & + UpsertExceptionPolicyBodyParam & + RequestParameters; +export type GetExceptionPolicyParameters = RequestParameters; +export type DeleteExceptionPolicyParameters = RequestParameters; + +export interface ListExceptionPoliciesQueryParamProperties { + /** Number of objects to return per page. */ + maxpagesize?: number; +} + +export interface ListExceptionPoliciesQueryParam { + queryParameters?: ListExceptionPoliciesQueryParamProperties; +} + +export type ListExceptionPoliciesParameters = ListExceptionPoliciesQueryParam & + RequestParameters; + +export interface UpsertQueueHeaders { + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; +} + +/** The resource instance. */ +export type RouterQueueResourceMergeAndPatch = Partial; + +export interface UpsertQueueBodyParam { + /** The resource instance. */ + body: RouterQueueResourceMergeAndPatch; +} + +export interface UpsertQueueHeaderParam { + headers?: RawHttpHeadersInput & UpsertQueueHeaders; +} + +export interface UpsertQueueMediaTypesParam { + /** This request has a JSON Merge Patch body. */ + contentType: "application/merge-patch+json"; +} + +export type UpsertQueueParameters = UpsertQueueHeaderParam & + UpsertQueueMediaTypesParam & + UpsertQueueBodyParam & + RequestParameters; +export type GetQueueParameters = RequestParameters; +export type DeleteQueueParameters = RequestParameters; + +export interface ListQueuesQueryParamProperties { + /** Number of objects to return per page. */ + maxpagesize?: number; +} + +export interface ListQueuesQueryParam { + queryParameters?: ListQueuesQueryParamProperties; +} + +export type ListQueuesParameters = ListQueuesQueryParam & RequestParameters; + +export interface UpsertJobHeaders { + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; +} + +/** The resource instance. */ +export type RouterJobResourceMergeAndPatch = Partial; + +export interface UpsertJobBodyParam { + /** The resource instance. */ + body: RouterJobResourceMergeAndPatch; +} + +export interface UpsertJobHeaderParam { + headers?: RawHttpHeadersInput & UpsertJobHeaders; +} + +export interface UpsertJobMediaTypesParam { + /** This request has a JSON Merge Patch body. */ + contentType: "application/merge-patch+json"; +} + +export type UpsertJobParameters = UpsertJobHeaderParam & + UpsertJobMediaTypesParam & + UpsertJobBodyParam & + RequestParameters; +export type GetJobParameters = RequestParameters; +export type DeleteJobParameters = RequestParameters; + +export interface ReclassifyBodyParam { + /** Request object for reclassifying a job. */ + body?: ReclassifyJobOptions; +} + +export type ReclassifyParameters = ReclassifyBodyParam & RequestParameters; + +export interface CancelBodyParam { + /** Request model for cancelling job. */ + body?: CancelJobOptions; +} + +export type CancelParameters = CancelBodyParam & RequestParameters; + +export interface CompleteBodyParam { + /** Request model for completing job. */ + body?: CompleteJobOptions; +} + +export type CompleteParameters = CompleteBodyParam & RequestParameters; + +export interface CloseBodyParam { + /** Request model for closing job. */ + body?: CloseJobOptions; +} + +export type CloseParameters = CloseBodyParam & RequestParameters; + +export interface ListJobsQueryParamProperties { + /** Number of objects to return per page. */ + maxpagesize?: number; + /** + * If specified, filter jobs by status. + * + * Possible values: "all", "pendingClassification", "queued", "assigned", "completed", "closed", "cancelled", "classificationFailed", "created", "pendingSchedule", "scheduled", "scheduleFailed", "waitingForActivation", "active" + */ + status?: RouterJobStatusSelector; + /** If specified, filter jobs by queue. */ + queueId?: string; + /** If specified, filter jobs by channel. */ + channelId?: string; + /** If specified, filter jobs by classificationPolicy. */ + classificationPolicyId?: string; + /** If specified, filter on jobs that was scheduled before or at given timestamp. Range: (-Inf, scheduledBefore]. */ + scheduledBefore?: Date | string; + /** If specified, filter on jobs that was scheduled at or after given value. Range: [scheduledAfter, +Inf). */ + scheduledAfter?: Date | string; +} + +export interface ListJobsQueryParam { + queryParameters?: ListJobsQueryParamProperties; +} + +export type ListJobsParameters = ListJobsQueryParam & RequestParameters; +export type GetInQueuePositionParameters = RequestParameters; + +export interface UnassignBodyParam { + /** Request body for unassign route. */ + body?: UnassignJobOptions; +} + +export type UnassignParameters = UnassignBodyParam & RequestParameters; +export type AcceptParameters = RequestParameters; + +export interface DeclineBodyParam { + /** Request model for declining offer. */ + body?: DeclineJobOfferOptions; +} + +export type DeclineParameters = DeclineBodyParam & RequestParameters; +export type GetQueueStatisticsParameters = RequestParameters; + +export interface UpsertWorkerHeaders { + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; +} + +/** The resource instance. */ +export type RouterWorkerResourceMergeAndPatch = Partial; + +export interface UpsertWorkerBodyParam { + /** The resource instance. */ + body: RouterWorkerResourceMergeAndPatch; +} + +export interface UpsertWorkerHeaderParam { + headers?: RawHttpHeadersInput & UpsertWorkerHeaders; +} + +export interface UpsertWorkerMediaTypesParam { + /** This request has a JSON Merge Patch body. */ + contentType: "application/merge-patch+json"; +} + +export type UpsertWorkerParameters = UpsertWorkerHeaderParam & + UpsertWorkerMediaTypesParam & + UpsertWorkerBodyParam & + RequestParameters; +export type GetWorkerParameters = RequestParameters; +export type DeleteWorkerParameters = RequestParameters; + +export interface ListWorkersQueryParamProperties { + /** Number of objects to return per page. */ + maxpagesize?: number; + /** + * If specified, select workers by worker state. + * + * Possible values: "active", "draining", "inactive", "all" + */ + state?: RouterWorkerStateSelector; + /** If specified, select workers who have a channel configuration with this channel. */ + channelId?: string; + /** If specified, select workers who are assigned to this queue. */ + queueId?: string; + /** If set to true, select only workers who have capacity for the channel specified by `channelId` or for any channel if `channelId` not specified. If set to false, then will return all workers including workers without any capacity for jobs. Defaults to false. */ + hasCapacity?: boolean; +} + +export interface ListWorkersQueryParam { + queryParameters?: ListWorkersQueryParamProperties; +} + +export type ListWorkersParameters = ListWorkersQueryParam & RequestParameters; diff --git a/sdk/communication/communication-job-router-rest/generated/responses.ts b/sdk/communication/communication-job-router-rest/generated/responses.ts new file mode 100644 index 000000000000..41b88d424c24 --- /dev/null +++ b/sdk/communication/communication-job-router-rest/generated/responses.ts @@ -0,0 +1,767 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +import { RawHttpHeaders } from "@azure/core-rest-pipeline"; +import { HttpResponse, ErrorResponse } from "@azure-rest/core-client"; +import { + ClassificationPolicyOutput, + PagedClassificationPolicyOutput, + DistributionPolicyOutput, + PagedDistributionPolicyOutput, + ExceptionPolicyOutput, + PagedExceptionPolicyOutput, + RouterQueueOutput, + PagedRouterQueueOutput, + RouterJobOutput, + ReclassifyJobResultOutput, + CancelJobResultOutput, + CompleteJobResultOutput, + CloseJobResultOutput, + PagedRouterJobOutput, + RouterJobPositionDetailsOutput, + UnassignJobResultOutput, + AcceptJobOfferResultOutput, + DeclineJobOfferResultOutput, + RouterQueueStatisticsOutput, + RouterWorkerOutput, + PagedRouterWorkerOutput, +} from "./outputModels.js"; + +export interface UpsertClassificationPolicy200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface UpsertClassificationPolicy200Response extends HttpResponse { + status: "200"; + body: ClassificationPolicyOutput; + headers: RawHttpHeaders & UpsertClassificationPolicy200Headers; +} + +export interface UpsertClassificationPolicy201Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface UpsertClassificationPolicy201Response extends HttpResponse { + status: "201"; + body: ClassificationPolicyOutput; + headers: RawHttpHeaders & UpsertClassificationPolicy201Headers; +} + +export interface UpsertClassificationPolicyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpsertClassificationPolicyDefaultResponse + extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpsertClassificationPolicyDefaultHeaders; +} + +export interface GetClassificationPolicy200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface GetClassificationPolicy200Response extends HttpResponse { + status: "200"; + body: ClassificationPolicyOutput; + headers: RawHttpHeaders & GetClassificationPolicy200Headers; +} + +export interface GetClassificationPolicyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetClassificationPolicyDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetClassificationPolicyDefaultHeaders; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface DeleteClassificationPolicy204Response extends HttpResponse { + status: "204"; +} + +export interface DeleteClassificationPolicyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteClassificationPolicyDefaultResponse + extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteClassificationPolicyDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListClassificationPolicies200Response extends HttpResponse { + status: "200"; + body: PagedClassificationPolicyOutput; +} + +export interface ListClassificationPoliciesDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListClassificationPoliciesDefaultResponse + extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListClassificationPoliciesDefaultHeaders; +} + +export interface UpsertDistributionPolicy200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface UpsertDistributionPolicy200Response extends HttpResponse { + status: "200"; + body: DistributionPolicyOutput; + headers: RawHttpHeaders & UpsertDistributionPolicy200Headers; +} + +export interface UpsertDistributionPolicy201Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface UpsertDistributionPolicy201Response extends HttpResponse { + status: "201"; + body: DistributionPolicyOutput; + headers: RawHttpHeaders & UpsertDistributionPolicy201Headers; +} + +export interface UpsertDistributionPolicyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpsertDistributionPolicyDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpsertDistributionPolicyDefaultHeaders; +} + +export interface GetDistributionPolicy200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface GetDistributionPolicy200Response extends HttpResponse { + status: "200"; + body: DistributionPolicyOutput; + headers: RawHttpHeaders & GetDistributionPolicy200Headers; +} + +export interface GetDistributionPolicyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetDistributionPolicyDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetDistributionPolicyDefaultHeaders; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface DeleteDistributionPolicy204Response extends HttpResponse { + status: "204"; +} + +export interface DeleteDistributionPolicyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteDistributionPolicyDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteDistributionPolicyDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListDistributionPolicies200Response extends HttpResponse { + status: "200"; + body: PagedDistributionPolicyOutput; +} + +export interface ListDistributionPoliciesDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListDistributionPoliciesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListDistributionPoliciesDefaultHeaders; +} + +export interface UpsertExceptionPolicy200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface UpsertExceptionPolicy200Response extends HttpResponse { + status: "200"; + body: ExceptionPolicyOutput; + headers: RawHttpHeaders & UpsertExceptionPolicy200Headers; +} + +export interface UpsertExceptionPolicy201Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface UpsertExceptionPolicy201Response extends HttpResponse { + status: "201"; + body: ExceptionPolicyOutput; + headers: RawHttpHeaders & UpsertExceptionPolicy201Headers; +} + +export interface UpsertExceptionPolicyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpsertExceptionPolicyDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpsertExceptionPolicyDefaultHeaders; +} + +export interface GetExceptionPolicy200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface GetExceptionPolicy200Response extends HttpResponse { + status: "200"; + body: ExceptionPolicyOutput; + headers: RawHttpHeaders & GetExceptionPolicy200Headers; +} + +export interface GetExceptionPolicyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetExceptionPolicyDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetExceptionPolicyDefaultHeaders; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface DeleteExceptionPolicy204Response extends HttpResponse { + status: "204"; +} + +export interface DeleteExceptionPolicyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteExceptionPolicyDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteExceptionPolicyDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListExceptionPolicies200Response extends HttpResponse { + status: "200"; + body: PagedExceptionPolicyOutput; +} + +export interface ListExceptionPoliciesDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListExceptionPoliciesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListExceptionPoliciesDefaultHeaders; +} + +export interface UpsertQueue200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface UpsertQueue200Response extends HttpResponse { + status: "200"; + body: RouterQueueOutput; + headers: RawHttpHeaders & UpsertQueue200Headers; +} + +export interface UpsertQueue201Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface UpsertQueue201Response extends HttpResponse { + status: "201"; + body: RouterQueueOutput; + headers: RawHttpHeaders & UpsertQueue201Headers; +} + +export interface UpsertQueueDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpsertQueueDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpsertQueueDefaultHeaders; +} + +export interface GetQueue200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface GetQueue200Response extends HttpResponse { + status: "200"; + body: RouterQueueOutput; + headers: RawHttpHeaders & GetQueue200Headers; +} + +export interface GetQueueDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetQueueDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetQueueDefaultHeaders; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface DeleteQueue204Response extends HttpResponse { + status: "204"; +} + +export interface DeleteQueueDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteQueueDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteQueueDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListQueues200Response extends HttpResponse { + status: "200"; + body: PagedRouterQueueOutput; +} + +export interface ListQueuesDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListQueuesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListQueuesDefaultHeaders; +} + +export interface UpsertJob200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface UpsertJob200Response extends HttpResponse { + status: "200"; + body: RouterJobOutput; + headers: RawHttpHeaders & UpsertJob200Headers; +} + +export interface UpsertJob201Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface UpsertJob201Response extends HttpResponse { + status: "201"; + body: RouterJobOutput; + headers: RawHttpHeaders & UpsertJob201Headers; +} + +export interface UpsertJobDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpsertJobDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpsertJobDefaultHeaders; +} + +export interface GetJob200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface GetJob200Response extends HttpResponse { + status: "200"; + body: RouterJobOutput; + headers: RawHttpHeaders & GetJob200Headers; +} + +export interface GetJobDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetJobDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetJobDefaultHeaders; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface DeleteJob204Response extends HttpResponse { + status: "204"; +} + +export interface DeleteJobDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteJobDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteJobDefaultHeaders; +} + +/** The request has succeeded. */ +export interface Reclassify200Response extends HttpResponse { + status: "200"; + body: ReclassifyJobResultOutput; +} + +export interface ReclassifyDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ReclassifyDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ReclassifyDefaultHeaders; +} + +/** The request has succeeded. */ +export interface Cancel200Response extends HttpResponse { + status: "200"; + body: CancelJobResultOutput; +} + +export interface CancelDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CancelDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CancelDefaultHeaders; +} + +/** The request has succeeded. */ +export interface Complete200Response extends HttpResponse { + status: "200"; + body: CompleteJobResultOutput; +} + +export interface CompleteDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CompleteDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CompleteDefaultHeaders; +} + +/** The request has succeeded. */ +export interface Close200Response extends HttpResponse { + status: "200"; + body: CloseJobResultOutput; +} + +export interface CloseDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CloseDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CloseDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListJobs200Response extends HttpResponse { + status: "200"; + body: PagedRouterJobOutput; +} + +export interface ListJobsDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListJobsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListJobsDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetInQueuePosition200Response extends HttpResponse { + status: "200"; + body: RouterJobPositionDetailsOutput; +} + +export interface GetInQueuePositionDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetInQueuePositionDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetInQueuePositionDefaultHeaders; +} + +/** The request has succeeded. */ +export interface Unassign200Response extends HttpResponse { + status: "200"; + body: UnassignJobResultOutput; +} + +export interface UnassignDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UnassignDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UnassignDefaultHeaders; +} + +/** The request has succeeded. */ +export interface Accept200Response extends HttpResponse { + status: "200"; + body: AcceptJobOfferResultOutput; +} + +export interface AcceptDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface AcceptDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & AcceptDefaultHeaders; +} + +/** The request has succeeded. */ +export interface Decline200Response extends HttpResponse { + status: "200"; + body: DeclineJobOfferResultOutput; +} + +export interface DeclineDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeclineDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeclineDefaultHeaders; +} + +/** The request has succeeded. */ +export interface GetQueueStatistics200Response extends HttpResponse { + status: "200"; + body: RouterQueueStatisticsOutput; +} + +export interface GetQueueStatisticsDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetQueueStatisticsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetQueueStatisticsDefaultHeaders; +} + +export interface UpsertWorker200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface UpsertWorker200Response extends HttpResponse { + status: "200"; + body: RouterWorkerOutput; + headers: RawHttpHeaders & UpsertWorker200Headers; +} + +export interface UpsertWorker201Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface UpsertWorker201Response extends HttpResponse { + status: "201"; + body: RouterWorkerOutput; + headers: RawHttpHeaders & UpsertWorker201Headers; +} + +export interface UpsertWorkerDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface UpsertWorkerDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & UpsertWorkerDefaultHeaders; +} + +export interface GetWorker200Headers { + /** The entity tag for the response. */ + etag?: string; + /** The last modified timestamp. */ + "last-modified"?: string; +} + +/** The request has succeeded. */ +export interface GetWorker200Response extends HttpResponse { + status: "200"; + body: RouterWorkerOutput; + headers: RawHttpHeaders & GetWorker200Headers; +} + +export interface GetWorkerDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetWorkerDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetWorkerDefaultHeaders; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface DeleteWorker204Response extends HttpResponse { + status: "204"; +} + +export interface DeleteWorkerDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface DeleteWorkerDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & DeleteWorkerDefaultHeaders; +} + +/** The request has succeeded. */ +export interface ListWorkers200Response extends HttpResponse { + status: "200"; + body: PagedRouterWorkerOutput; +} + +export interface ListWorkersDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface ListWorkersDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & ListWorkersDefaultHeaders; +} diff --git a/sdk/communication/communication-job-router-rest/package.json b/sdk/communication/communication-job-router-rest/package.json index 4fb46a67a980..db3738064b11 100644 --- a/sdk/communication/communication-job-router-rest/package.json +++ b/sdk/communication/communication-job-router-rest/package.json @@ -61,7 +61,6 @@ "@azure-rest/core-client": "^2.3.1", "@azure/communication-common": "^2.3.1", "@azure/core-auth": "^1.9.0", - "@azure/core-paging": "^1.6.2", "@azure/core-rest-pipeline": "^1.18.0", "@azure/logger": "^1.1.4", "tslib": "^2.8.1" diff --git a/sdk/communication/communication-job-router-rest/review/communication-job-router.api.md b/sdk/communication/communication-job-router-rest/review/communication-job-router.api.md index 9b30c2a23469..e7f08b01ff65 100644 --- a/sdk/communication/communication-job-router-rest/review/communication-job-router.api.md +++ b/sdk/communication/communication-job-router-rest/review/communication-job-router.api.md @@ -9,8 +9,6 @@ import type { ClientOptions } from '@azure-rest/core-client'; import type { ErrorResponse } from '@azure-rest/core-client'; import type { HttpResponse } from '@azure-rest/core-client'; import type { KeyCredential } from '@azure/core-auth'; -import type { Paged } from '@azure/core-paging'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; import type { PathUncheckedResponse } from '@azure-rest/core-client'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; @@ -61,6 +59,11 @@ export type AzureCommunicationRoutingServiceClient = Client & { path: Routes; }; +// @public +export interface AzureCommunicationRoutingServiceClientOptions extends ClientOptions { + apiVersion?: string; +} + // @public export interface BestWorkerMode extends DistributionModeParent { kind: "bestWorker"; @@ -487,6 +490,12 @@ export interface DirectMapRouterRuleOutput extends RouterRuleOutputParent { // @public export type DistributionMode = DistributionModeParent | BestWorkerMode | LongestIdleMode | RoundRobinMode; +// @public +export type DistributionModeKind = string; + +// @public +export type DistributionModeKindOutput = string; + // @public export type DistributionModeOutput = DistributionModeOutputParent | BestWorkerModeOutput | LongestIdleModeOutput | RoundRobinModeOutput; @@ -494,7 +503,7 @@ export type DistributionModeOutput = DistributionModeOutputParent | BestWorkerMo export interface DistributionModeOutputParent { bypassSelectors?: boolean; // (undocumented) - kind: string; + kind: DistributionModeKindOutput; maxConcurrentOffers?: number; minConcurrentOffers?: number; } @@ -503,7 +512,7 @@ export interface DistributionModeOutputParent { export interface DistributionModeParent { bypassSelectors?: boolean; // (undocumented) - kind: string; + kind: DistributionModeKind; maxConcurrentOffers?: number; minConcurrentOffers?: number; } @@ -530,6 +539,12 @@ export type DistributionPolicyResourceMergeAndPatch = Partial = (pageLink: string, maxPageSize?: number) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; @@ -1015,21 +1042,33 @@ export function isUnexpected(response: ListWorkers200Response | ListWorkersDefau // @public export type JobMatchingMode = JobMatchingModeParent | ScheduleAndSuspendMode | QueueAndMatchMode | SuspendMode; +// @public +export type JobMatchingModeKind = string; + +// @public +export type JobMatchingModeKindOutput = string; + // @public export type JobMatchingModeOutput = JobMatchingModeOutputParent | ScheduleAndSuspendModeOutput | QueueAndMatchModeOutput | SuspendModeOutput; // @public export interface JobMatchingModeOutputParent { // (undocumented) - kind: string; + kind: JobMatchingModeKindOutput; } // @public export interface JobMatchingModeParent { // (undocumented) - kind: string; + kind: JobMatchingModeKind; } +// @public +export type LabelOperator = string; + +// @public +export type LabelOperatorOutput = string; + // @public (undocumented) export interface ListClassificationPolicies { get(options?: ListClassificationPoliciesParameters): StreamableMethod; @@ -1201,7 +1240,7 @@ export interface ListJobsQueryParamProperties { queueId?: string; scheduledAfter?: Date | string; scheduledBefore?: Date | string; - status?: string; + status?: RouterJobStatusSelector; } // @public (undocumented) @@ -1289,7 +1328,7 @@ export interface ListWorkersQueryParamProperties { hasCapacity?: boolean; maxpagesize?: number; queueId?: string; - state?: string; + state?: RouterWorkerStateSelector; } // @public @@ -1331,22 +1370,52 @@ export interface OAuth2WebhookClientCredentialOutput { } // @public -export type PagedClassificationPolicyOutput = Paged; +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} + +// @public +export interface PagedClassificationPolicyOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedDistributionPolicyOutput = Paged; +export interface PagedDistributionPolicyOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedExceptionPolicyOutput = Paged; +export interface PagedExceptionPolicyOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedRouterJobOutput = Paged; +export interface PagedRouterJobOutput { + nextLink?: string; + value: Array; +} + +// @public +export interface PagedRouterQueueOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedRouterQueueOutput = Paged; +export interface PagedRouterWorkerOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedRouterWorkerOutput = Paged; +export interface PageSettings { + continuationToken?: string; +} // @public export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; @@ -1367,14 +1436,14 @@ export interface PagingOptions { export interface PassThroughQueueSelectorAttachment extends QueueSelectorAttachmentParent { key: string; kind: "passThrough"; - labelOperator: string; + labelOperator: LabelOperator; } // @public export interface PassThroughQueueSelectorAttachmentOutput extends QueueSelectorAttachmentOutputParent { key: string; kind: "passThrough"; - labelOperator: string; + labelOperator: LabelOperatorOutput; } // @public @@ -1382,7 +1451,7 @@ export interface PassThroughWorkerSelectorAttachment extends WorkerSelectorAttac expiresAfterSeconds?: number; key: string; kind: "passThrough"; - labelOperator: string; + labelOperator: LabelOperator; } // @public @@ -1390,7 +1459,7 @@ export interface PassThroughWorkerSelectorAttachmentOutput extends WorkerSelecto expiresAfterSeconds?: number; key: string; kind: "passThrough"; - labelOperator: string; + labelOperator: LabelOperatorOutput; } // @public @@ -1418,19 +1487,25 @@ export interface QueueLengthExceptionTriggerOutput extends ExceptionTriggerOutpu // @public export type QueueSelectorAttachment = QueueSelectorAttachmentParent | ConditionalQueueSelectorAttachment | PassThroughQueueSelectorAttachment | RuleEngineQueueSelectorAttachment | StaticQueueSelectorAttachment | WeightedAllocationQueueSelectorAttachment; +// @public +export type QueueSelectorAttachmentKind = string; + +// @public +export type QueueSelectorAttachmentKindOutput = string; + // @public export type QueueSelectorAttachmentOutput = QueueSelectorAttachmentOutputParent | ConditionalQueueSelectorAttachmentOutput | PassThroughQueueSelectorAttachmentOutput | RuleEngineQueueSelectorAttachmentOutput | StaticQueueSelectorAttachmentOutput | WeightedAllocationQueueSelectorAttachmentOutput; // @public export interface QueueSelectorAttachmentOutputParent { // (undocumented) - kind: string; + kind: QueueSelectorAttachmentKindOutput; } // @public export interface QueueSelectorAttachmentParent { // (undocumented) - kind: string; + kind: QueueSelectorAttachmentKind; } // @public @@ -1527,10 +1602,6 @@ export interface RouterChannelOutput { maxNumberOfJobs?: number; } -// @public -export interface RouterConditionalRequestHeadersOutput { -} - // @public export interface RouterJob { channelId?: string; @@ -1610,7 +1681,7 @@ export interface RouterJobOutput { queueId?: string; requestedWorkerSelectors?: Array; readonly scheduledAt?: string; - readonly status?: string; + readonly status?: RouterJobStatusOutput; tags?: Record; } @@ -1626,6 +1697,15 @@ export interface RouterJobPositionDetailsOutput { // @public export type RouterJobResourceMergeAndPatch = Partial; +// @public +export type RouterJobStatus = string; + +// @public +export type RouterJobStatusOutput = string; + +// @public +export type RouterJobStatusSelector = string; + // @public export interface RouterQueue { distributionPolicyId?: string; @@ -1650,14 +1730,14 @@ export type RouterQueueResourceMergeAndPatch = Partial; // @public export interface RouterQueueSelector { key: string; - labelOperator: string; + labelOperator: LabelOperator; value?: unknown; } // @public export interface RouterQueueSelectorOutput { key: string; - labelOperator: string; + labelOperator: LabelOperatorOutput; value?: any; } @@ -1672,19 +1752,25 @@ export interface RouterQueueStatisticsOutput { // @public export type RouterRule = RouterRuleParent | DirectMapRouterRule | ExpressionRouterRule | FunctionRouterRule | StaticRouterRule | WebhookRouterRule; +// @public +export type RouterRuleKind = string; + +// @public +export type RouterRuleKindOutput = string; + // @public export type RouterRuleOutput = RouterRuleOutputParent | DirectMapRouterRuleOutput | ExpressionRouterRuleOutput | FunctionRouterRuleOutput | StaticRouterRuleOutput | WebhookRouterRuleOutput; // @public export interface RouterRuleOutputParent { // (undocumented) - kind: string; + kind: RouterRuleKindOutput; } // @public export interface RouterRuleParent { // (undocumented) - kind: string; + kind: RouterRuleKind; } // @public @@ -1727,7 +1813,7 @@ export interface RouterWorkerOutput { maxConcurrentOffers?: number; readonly offers?: Array; queues?: string[]; - readonly state?: string; + readonly state?: RouterWorkerStateOutput; tags?: Record; } @@ -1739,7 +1825,7 @@ export interface RouterWorkerSelector { expedite?: boolean; expiresAfterSeconds?: number; key: string; - labelOperator: string; + labelOperator: LabelOperator; value?: unknown; } @@ -1749,11 +1835,26 @@ export interface RouterWorkerSelectorOutput { expiresAfterSeconds?: number; readonly expiresAt?: string; key: string; - labelOperator: string; - readonly status?: string; + labelOperator: LabelOperatorOutput; + readonly status?: RouterWorkerSelectorStatusOutput; value?: any; } +// @public +export type RouterWorkerSelectorStatus = string; + +// @public +export type RouterWorkerSelectorStatusOutput = string; + +// @public +export type RouterWorkerState = string; + +// @public +export type RouterWorkerStateOutput = string; + +// @public +export type RouterWorkerStateSelector = string; + // @public (undocumented) export interface Routes { (path: "/routing/classificationPolicies/{classificationPolicyId}", classificationPolicyId: string): UpsertClassificationPolicy; @@ -1820,7 +1921,7 @@ export interface ScoringRuleOptions { batchSize?: number; descendingOrder?: boolean; isBatchScoringEnabled?: boolean; - scoringParameters?: string[]; + scoringParameters?: ScoringRuleParameterSelector[]; } // @public @@ -1828,9 +1929,15 @@ export interface ScoringRuleOptionsOutput { batchSize?: number; descendingOrder?: boolean; isBatchScoringEnabled?: boolean; - scoringParameters?: string[]; + scoringParameters?: ScoringRuleParameterSelectorOutput[]; } +// @public +export type ScoringRuleParameterSelector = string; + +// @public +export type ScoringRuleParameterSelectorOutput = string; + // @public export interface StaticQueueSelectorAttachment extends QueueSelectorAttachmentParent { kind: "static"; @@ -2453,19 +2560,25 @@ export interface WeightedAllocationWorkerSelectorAttachmentOutput extends Worker // @public export type WorkerSelectorAttachment = WorkerSelectorAttachmentParent | ConditionalWorkerSelectorAttachment | PassThroughWorkerSelectorAttachment | RuleEngineWorkerSelectorAttachment | StaticWorkerSelectorAttachment | WeightedAllocationWorkerSelectorAttachment; +// @public +export type WorkerSelectorAttachmentKind = string; + +// @public +export type WorkerSelectorAttachmentKindOutput = string; + // @public export type WorkerSelectorAttachmentOutput = WorkerSelectorAttachmentOutputParent | ConditionalWorkerSelectorAttachmentOutput | PassThroughWorkerSelectorAttachmentOutput | RuleEngineWorkerSelectorAttachmentOutput | StaticWorkerSelectorAttachmentOutput | WeightedAllocationWorkerSelectorAttachmentOutput; // @public export interface WorkerSelectorAttachmentOutputParent { // (undocumented) - kind: string; + kind: WorkerSelectorAttachmentKindOutput; } // @public export interface WorkerSelectorAttachmentParent { // (undocumented) - kind: string; + kind: WorkerSelectorAttachmentKind; } // @public diff --git a/sdk/communication/communication-job-router-rest/src/azureCommunicationRoutingServiceClient.ts b/sdk/communication/communication-job-router-rest/src/azureCommunicationRoutingServiceClient.ts index 3cd6a13c6624..f61c98ecd0b1 100644 --- a/sdk/communication/communication-job-router-rest/src/azureCommunicationRoutingServiceClient.ts +++ b/sdk/communication/communication-job-router-rest/src/azureCommunicationRoutingServiceClient.ts @@ -3,67 +3,32 @@ import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; -import type { KeyCredential, TokenCredential } from "@azure/core-auth"; -import { isTokenCredential } from "@azure/core-auth"; import { logger } from "./logger.js"; import type { AzureCommunicationRoutingServiceClient } from "./clientDefinitions.js"; -import { - createCommunicationAuthPolicy, - isKeyCredential, - parseClientArguments, -} from "@azure/communication-common"; -/** - * Initialize a new instance of `AzureCommunicationRoutingServiceClient` - * @param connectionString - The connectionString or url of your Communication Services resource. - * @param options - the parameter for all optional parameters - */ -export default function createClient( - connectionString: string, - options: ClientOptions, -): AzureCommunicationRoutingServiceClient; +/** The optional parameters for the client */ +export interface AzureCommunicationRoutingServiceClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} /** * Initialize a new instance of `AzureCommunicationRoutingServiceClient` - * @param endpoint - Uri of your Communication resource - * @param credentialOrOptions - The key or token credential. + * @param endpointParam - Uri of your Communication resource * @param options - the parameter for all optional parameters */ export default function createClient( - endpoint: string, - credentialOrOptions?: KeyCredential | TokenCredential, - options?: ClientOptions, -): AzureCommunicationRoutingServiceClient; - -// Implementation -export default function createClient( - arg1: string, - arg2?: ClientOptions | (KeyCredential | TokenCredential), - arg3?: ClientOptions, + endpointParam: string, + { + apiVersion = "2024-01-18-preview", + ...options + }: AzureCommunicationRoutingServiceClientOptions = {}, ): AzureCommunicationRoutingServiceClient { - let credentialOrOptions: KeyCredential | TokenCredential | undefined; - let options: ClientOptions | undefined; - const connectionStringOrUrl = arg1; - - // Determine which constructor is being called based on the types of the arguments - if (isTokenCredential(arg2) || isKeyCredential(arg2)) { - credentialOrOptions = arg2 as KeyCredential | TokenCredential; - options = arg3 as ClientOptions; - } else { - options = arg2 as ClientOptions; - } - if (options === undefined) { - options = {}; - } - - // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed - const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions); - const baseUrl = options?.baseUrl ?? `${url}`; - options.apiVersion = options.apiVersion ?? "2024-01-18-preview"; - const userAgentInfo = `azsdk-js-communication-job-router-rest/1.1.0-beta.2`; + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`; + const userAgentInfo = `azsdk-js-communication-job-router-rest/1.0.0-beta.1`; const userAgentPrefix = - options?.userAgentOptions && options?.userAgentOptions.userAgentPrefix - ? `${options?.userAgentOptions.userAgentPrefix} ${userAgentInfo}` + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` : `${userAgentInfo}`; options = { ...options, @@ -71,14 +36,26 @@ export default function createClient( userAgentPrefix, }, loggingOptions: { - logger: options?.loggingOptions?.logger ?? logger.info, + logger: options.loggingOptions?.logger ?? logger.info, }, }; - - const client = getClient(baseUrl, options) as AzureCommunicationRoutingServiceClient; - - const authPolicy = createCommunicationAuthPolicy(credential); - client.pipeline.addPolicy(authPolicy); + const client = getClient(endpointUrl, options) as AzureCommunicationRoutingServiceClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + return next(req); + }, + }); return client; } diff --git a/sdk/communication/communication-job-router-rest/src/azureCommunicationRoutingServiceCustmizedClient.ts b/sdk/communication/communication-job-router-rest/src/azureCommunicationRoutingServiceCustmizedClient.ts new file mode 100644 index 000000000000..c0c9bec08aa0 --- /dev/null +++ b/sdk/communication/communication-job-router-rest/src/azureCommunicationRoutingServiceCustmizedClient.ts @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { ClientOptions } from "@azure-rest/core-client"; +import type { KeyCredential, TokenCredential } from "@azure/core-auth"; +import { isTokenCredential } from "@azure/core-auth"; +import type { AzureCommunicationRoutingServiceClient } from "./clientDefinitions.js"; +import { + createCommunicationAuthPolicy, + isKeyCredential, + parseClientArguments, +} from "@azure/communication-common"; +import createGeneratedClient from "./azureCommunicationRoutingServiceClient.js"; + +/** + * Initialize a new instance of `AzureCommunicationRoutingServiceClient` + * @param connectionString - The connectionString or url of your Communication Services resource. + * @param options - the parameter for all optional parameters + */ +export default function createClient( + connectionString: string, + options: ClientOptions, +): AzureCommunicationRoutingServiceClient; + +/** + * Initialize a new instance of `AzureCommunicationRoutingServiceClient` + * @param endpoint - Uri of your Communication resource + * @param credentialOrOptions - The key or token credential. + * @param options - the parameter for all optional parameters + */ +export default function createClient( + endpoint: string, + credentialOrOptions?: KeyCredential | TokenCredential, + options?: ClientOptions, +): AzureCommunicationRoutingServiceClient; + +// Implementation +export default function createClient( + arg1: string, + arg2?: ClientOptions | (KeyCredential | TokenCredential), + arg3?: ClientOptions, +): AzureCommunicationRoutingServiceClient { + let credentialOrOptions: KeyCredential | TokenCredential | undefined; + let options: ClientOptions | undefined; + const connectionStringOrUrl = arg1; + + // Determine which constructor is being called based on the types of the arguments + if (isTokenCredential(arg2) || isKeyCredential(arg2)) { + credentialOrOptions = arg2 as KeyCredential | TokenCredential; + options = arg3 as ClientOptions; + } else { + options = arg2 as ClientOptions; + } + if (options === undefined) { + options = {}; + } + + // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed + const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions); + const client = createGeneratedClient(url, options); + const authPolicy = createCommunicationAuthPolicy(credential); + client.pipeline.addPolicy(authPolicy); + + return client; +} diff --git a/sdk/communication/communication-job-router-rest/src/index.ts b/sdk/communication/communication-job-router-rest/src/index.ts index 1c1e0181dcda..92afbd477873 100644 --- a/sdk/communication/communication-job-router-rest/src/index.ts +++ b/sdk/communication/communication-job-router-rest/src/index.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import AzureCommunicationRoutingServiceClient from "./azureCommunicationRoutingServiceClient.js"; +import AzureCommunicationRoutingServiceClient from "./azureCommunicationRoutingServiceCustmizedClient.js"; export * from "./azureCommunicationRoutingServiceClient.js"; export * from "./parameters.js"; diff --git a/sdk/communication/communication-job-router-rest/src/isUnexpected.ts b/sdk/communication/communication-job-router-rest/src/isUnexpected.ts index 2a4c05d342b5..3799fd2f884e 100644 --- a/sdk/communication/communication-job-router-rest/src/isUnexpected.ts +++ b/sdk/communication/communication-job-router-rest/src/isUnexpected.ts @@ -395,7 +395,6 @@ function getParametrizedPathSuccess(method: string, path: string): string[] { matchedValue = value; } } - return matchedValue; } diff --git a/sdk/communication/communication-job-router-rest/src/models.ts b/sdk/communication/communication-job-router-rest/src/models.ts index b84576d57d2f..4500187dfa5e 100644 --- a/sdk/communication/communication-job-router-rest/src/models.ts +++ b/sdk/communication/communication-job-router-rest/src/models.ts @@ -17,7 +17,7 @@ export interface ClassificationPolicy { /** An attachment of queue selectors to resolve a queue to a job from a classification policy. */ export interface QueueSelectorAttachmentParent { - kind: string; + kind: QueueSelectorAttachmentKind; } /** Describes a set of queue selectors that will be attached if the given condition resolves to true. */ @@ -39,7 +39,7 @@ export interface ConditionalQueueSelectorAttachment extends QueueSelectorAttachm * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol. */ export interface RouterRuleParent { - kind: string; + kind: RouterRuleKind; } /** A rule that return the same labels as the input labels. */ @@ -55,7 +55,7 @@ export interface ExpressionRouterRule extends RouterRuleParent { * * Possible values: "powerFx" */ - language?: string; + language?: ExpressionRouterRuleLanguage; /** An expression to evaluate. Should contain return statement with calculated values. */ expression: string; /** The type discriminator describing a sub-type of Rule. */ @@ -119,7 +119,7 @@ export interface RouterQueueSelector { * * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" */ - labelOperator: string; + labelOperator: LabelOperator; /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */ value?: unknown; } @@ -133,7 +133,7 @@ export interface PassThroughQueueSelectorAttachment extends QueueSelectorAttachm * * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" */ - labelOperator: string; + labelOperator: LabelOperator; /** The type discriminator describing the type of queue selector attachment. */ kind: "passThrough"; } @@ -172,7 +172,7 @@ export interface QueueWeightedAllocation { /** An attachment which attaches worker selectors to a job. */ export interface WorkerSelectorAttachmentParent { - kind: string; + kind: WorkerSelectorAttachmentKind; } /** Describes a set of worker selectors that will be attached if the given condition resolves to true. */ @@ -194,7 +194,7 @@ export interface RouterWorkerSelector { * * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" */ - labelOperator: string; + labelOperator: LabelOperator; /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */ value?: unknown; /** Describes how long this label selector is valid in seconds. */ @@ -212,7 +212,7 @@ export interface PassThroughWorkerSelectorAttachment extends WorkerSelectorAttac * * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" */ - labelOperator: string; + labelOperator: LabelOperator; /** Describes how long the attached label selector is valid in seconds. */ expiresAfterSeconds?: number; /** The type discriminator describing the type of worker selector attachment. */ @@ -269,7 +269,7 @@ export interface DistributionModeParent { maxConcurrentOffers?: number; /** If set to true, then router will match workers to jobs even if they don't match label selectors. Warning: You may get workers that are not qualified for a job they are matched with if you set this variable to true. This flag is intended more for temporary usage. By default, set to false. */ bypassSelectors?: boolean; - kind: string; + kind: DistributionModeKind; } /** Jobs are distributed to the worker with the strongest abilities available. */ @@ -287,7 +287,7 @@ export interface ScoringRuleOptions { /** Set batch size when 'isBatchScoringEnabled' is set to true. Defaults to 20 if not configured. */ batchSize?: number; /** List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload. */ - scoringParameters?: string[]; + scoringParameters?: ScoringRuleParameterSelector[]; /** If set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name for the worker labels will be sent as `worker`. Note: If enabled, use 'batchSize' to set batch size. */ isBatchScoringEnabled?: boolean; /** If false, will sort scores by ascending order. By default, set to true. */ @@ -326,7 +326,7 @@ export interface ExceptionRule { /** Abstract base class for defining a trigger for exception rules. */ export interface ExceptionTriggerParent { - kind: string; + kind: ExceptionTriggerKind; } /** Trigger for an exception action on exceeding queue length. */ @@ -349,7 +349,7 @@ export interface WaitTimeExceptionTrigger extends ExceptionTriggerParent { export interface ExceptionActionParent { /** Unique Id of the exception action. */ id?: string; - kind: string; + kind: ExceptionActionKind; } /** An action that marks a job as cancelled. */ @@ -406,7 +406,7 @@ export interface RouterJob { classificationPolicyId?: string; /** Id of a queue that this job is queued to. */ queueId?: string; - /** Priority of this job. */ + /** Priority of this job. Value must be between -100 to 100. */ priority?: number; /** Reason code for cancelled or closed jobs. */ dispositionCode?: string; @@ -449,7 +449,7 @@ export interface RouterJobNote { * SuspendMode: Used when matching workers to a job needs to be suspended. */ export interface JobMatchingModeParent { - kind: string; + kind: JobMatchingModeKind; } /** Describes a matching mode used for scheduling jobs to be queued at a future time. At the specified time, matching worker to a job will not start automatically. */ @@ -535,7 +535,7 @@ export interface RouterChannel { channelId: string; /** The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. */ capacityCostPerJob: number; - /** The maximum number of jobs that can be supported concurrently for this channel. */ + /** The maximum number of jobs that can be supported concurrently for this channel. Value must be greater than zero. */ maxNumberOfJobs?: number; } @@ -622,3 +622,33 @@ export type JobMatchingMode = | ScheduleAndSuspendMode | QueueAndMatchMode | SuspendMode; +/** Alias for QueueSelectorAttachmentKind */ +export type QueueSelectorAttachmentKind = string; +/** Alias for RouterRuleKind */ +export type RouterRuleKind = string; +/** Alias for ExpressionRouterRuleLanguage */ +export type ExpressionRouterRuleLanguage = string; +/** Alias for LabelOperator */ +export type LabelOperator = string; +/** Alias for WorkerSelectorAttachmentKind */ +export type WorkerSelectorAttachmentKind = string; +/** Alias for RouterWorkerSelectorStatus */ +export type RouterWorkerSelectorStatus = string; +/** Alias for DistributionModeKind */ +export type DistributionModeKind = string; +/** Alias for ScoringRuleParameterSelector */ +export type ScoringRuleParameterSelector = string; +/** Alias for ExceptionTriggerKind */ +export type ExceptionTriggerKind = string; +/** Alias for ExceptionActionKind */ +export type ExceptionActionKind = string; +/** Alias for RouterJobStatus */ +export type RouterJobStatus = string; +/** Alias for JobMatchingModeKind */ +export type JobMatchingModeKind = string; +/** Alias for RouterJobStatusSelector */ +export type RouterJobStatusSelector = string; +/** Alias for RouterWorkerState */ +export type RouterWorkerState = string; +/** Alias for RouterWorkerStateSelector */ +export type RouterWorkerStateSelector = string; diff --git a/sdk/communication/communication-job-router-rest/src/outputModels.ts b/sdk/communication/communication-job-router-rest/src/outputModels.ts index 9c1515d7a9c2..1a00c0074612 100644 --- a/sdk/communication/communication-job-router-rest/src/outputModels.ts +++ b/sdk/communication/communication-job-router-rest/src/outputModels.ts @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Paged } from "@azure/core-paging"; - /** A container for the rules that govern how jobs are classified. */ export interface ClassificationPolicyOutput { /** The entity tag for this resource. */ @@ -23,7 +21,7 @@ export interface ClassificationPolicyOutput { /** An attachment of queue selectors to resolve a queue to a job from a classification policy. */ export interface QueueSelectorAttachmentOutputParent { - kind: string; + kind: QueueSelectorAttachmentKindOutput; } /** Describes a set of queue selectors that will be attached if the given condition resolves to true. */ @@ -46,7 +44,7 @@ export interface ConditionalQueueSelectorAttachmentOutput * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol. */ export interface RouterRuleOutputParent { - kind: string; + kind: RouterRuleKindOutput; } /** A rule that return the same labels as the input labels. */ @@ -62,7 +60,7 @@ export interface ExpressionRouterRuleOutput extends RouterRuleOutputParent { * * Possible values: "powerFx" */ - language?: string; + language?: ExpressionRouterRuleLanguageOutput; /** An expression to evaluate. Should contain return statement with calculated values. */ expression: string; /** The type discriminator describing a sub-type of Rule. */ @@ -126,7 +124,7 @@ export interface RouterQueueSelectorOutput { * * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" */ - labelOperator: string; + labelOperator: LabelOperatorOutput; /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */ value?: any; } @@ -141,7 +139,7 @@ export interface PassThroughQueueSelectorAttachmentOutput * * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" */ - labelOperator: string; + labelOperator: LabelOperatorOutput; /** The type discriminator describing the type of queue selector attachment. */ kind: "passThrough"; } @@ -182,7 +180,7 @@ export interface QueueWeightedAllocationOutput { /** An attachment which attaches worker selectors to a job. */ export interface WorkerSelectorAttachmentOutputParent { - kind: string; + kind: WorkerSelectorAttachmentKindOutput; } /** Describes a set of worker selectors that will be attached if the given condition resolves to true. */ @@ -205,7 +203,7 @@ export interface RouterWorkerSelectorOutput { * * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" */ - labelOperator: string; + labelOperator: LabelOperatorOutput; /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */ value?: any; /** Describes how long this label selector is valid in seconds. */ @@ -217,7 +215,7 @@ export interface RouterWorkerSelectorOutput { * * Possible values: "active", "expired" */ - readonly status?: string; + readonly status?: RouterWorkerSelectorStatusOutput; /** The time at which this worker selector expires in UTC. */ readonly expiresAt?: string; } @@ -232,7 +230,7 @@ export interface PassThroughWorkerSelectorAttachmentOutput * * Possible values: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" */ - labelOperator: string; + labelOperator: LabelOperatorOutput; /** Describes how long the attached label selector is valid in seconds. */ expiresAfterSeconds?: number; /** The type discriminator describing the type of worker selector attachment. */ @@ -273,8 +271,13 @@ export interface WorkerWeightedAllocationOutput { workerSelectors: Array; } -/** Provides the 'If-*' headers to enable conditional (cached) responses for JobRouter. */ -export interface RouterConditionalRequestHeadersOutput {} +/** Paged collection of ClassificationPolicy items */ +export interface PagedClassificationPolicyOutput { + /** The ClassificationPolicy items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} /** Policy governing how jobs are distributed to workers */ export interface DistributionPolicyOutput { @@ -298,7 +301,7 @@ export interface DistributionModeOutputParent { maxConcurrentOffers?: number; /** If set to true, then router will match workers to jobs even if they don't match label selectors. Warning: You may get workers that are not qualified for a job they are matched with if you set this variable to true. This flag is intended more for temporary usage. By default, set to false. */ bypassSelectors?: boolean; - kind: string; + kind: DistributionModeKindOutput; } /** Jobs are distributed to the worker with the strongest abilities available. */ @@ -316,7 +319,7 @@ export interface ScoringRuleOptionsOutput { /** Set batch size when 'isBatchScoringEnabled' is set to true. Defaults to 20 if not configured. */ batchSize?: number; /** List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload. */ - scoringParameters?: string[]; + scoringParameters?: ScoringRuleParameterSelectorOutput[]; /** If set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name for the worker labels will be sent as `worker`. Note: If enabled, use 'batchSize' to set batch size. */ isBatchScoringEnabled?: boolean; /** If false, will sort scores by ascending order. By default, set to true. */ @@ -335,6 +338,14 @@ export interface RoundRobinModeOutput extends DistributionModeOutputParent { kind: "roundRobin"; } +/** Paged collection of DistributionPolicy items */ +export interface PagedDistributionPolicyOutput { + /** The DistributionPolicy items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** A policy that defines actions to execute when exception are triggered. */ export interface ExceptionPolicyOutput { /** The entity tag for this resource. */ @@ -359,7 +370,7 @@ export interface ExceptionRuleOutput { /** Abstract base class for defining a trigger for exception rules. */ export interface ExceptionTriggerOutputParent { - kind: string; + kind: ExceptionTriggerKindOutput; } /** Trigger for an exception action on exceeding queue length. */ @@ -382,7 +393,7 @@ export interface WaitTimeExceptionTriggerOutput extends ExceptionTriggerOutputPa export interface ExceptionActionOutputParent { /** Unique Id of the exception action. */ id?: string; - kind: string; + kind: ExceptionActionKindOutput; } /** An action that marks a job as cancelled. */ @@ -417,6 +428,14 @@ export interface ReclassifyExceptionActionOutput extends ExceptionActionOutputPa kind: "reclassify"; } +/** Paged collection of ExceptionPolicy items */ +export interface PagedExceptionPolicyOutput { + /** The ExceptionPolicy items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** A queue that can contain jobs to be routed. */ export interface RouterQueueOutput { /** The entity tag for this resource. */ @@ -433,6 +452,14 @@ export interface RouterQueueOutput { exceptionPolicyId?: string; } +/** Paged collection of RouterQueue items */ +export interface PagedRouterQueueOutput { + /** The RouterQueue items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** A unit of work to be routed */ export interface RouterJobOutput { /** The entity tag for this resource. */ @@ -446,7 +473,7 @@ export interface RouterJobOutput { * * Possible values: "pendingClassification", "queued", "assigned", "completed", "closed", "cancelled", "classificationFailed", "created", "pendingSchedule", "scheduled", "scheduleFailed", "waitingForActivation" */ - readonly status?: string; + readonly status?: RouterJobStatusOutput; /** Timestamp a job was queued in UTC. */ readonly enqueuedAt?: string; /** The channel identifier. eg. voice, chat, etc. */ @@ -455,7 +482,7 @@ export interface RouterJobOutput { classificationPolicyId?: string; /** Id of a queue that this job is queued to. */ queueId?: string; - /** Priority of this job. */ + /** Priority of this job. Value must be between -100 to 100. */ priority?: number; /** Reason code for cancelled or closed jobs. */ dispositionCode?: string; @@ -506,7 +533,7 @@ export interface RouterJobNoteOutput { * SuspendMode: Used when matching workers to a job needs to be suspended. */ export interface JobMatchingModeOutputParent { - kind: string; + kind: JobMatchingModeKindOutput; } /** Describes a matching mode used for scheduling jobs to be queued at a future time. At the specified time, matching worker to a job will not start automatically. */ @@ -541,6 +568,14 @@ export interface CompleteJobResultOutput {} /** Response payload from closing a job. */ export interface CloseJobResultOutput {} +/** Paged collection of RouterJob items */ +export interface PagedRouterJobOutput { + /** The RouterJob items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** Position and estimated wait time for a job. */ export interface RouterJobPositionDetailsOutput { /** Id of the job these details are about. */ @@ -599,7 +634,7 @@ export interface RouterWorkerOutput { * * Possible values: "active", "draining", "inactive" */ - readonly state?: string; + readonly state?: RouterWorkerStateOutput; /** Collection of queue(s) that this worker can receive work from. */ queues?: string[]; /** The total capacity score this worker has to manage multiple concurrent jobs. */ @@ -628,7 +663,7 @@ export interface RouterChannelOutput { channelId: string; /** The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. */ capacityCostPerJob: number; - /** The maximum number of jobs that can be supported concurrently for this channel. */ + /** The maximum number of jobs that can be supported concurrently for this channel. Value must be greater than zero. */ maxNumberOfJobs?: number; } @@ -658,6 +693,14 @@ export interface RouterWorkerAssignmentOutput { assignedAt: string; } +/** Paged collection of RouterWorker items */ +export interface PagedRouterWorkerOutput { + /** The RouterWorker items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** An attachment of queue selectors to resolve a queue to a job from a classification policy. */ export type QueueSelectorAttachmentOutput = | QueueSelectorAttachmentOutputParent @@ -717,15 +760,29 @@ export type JobMatchingModeOutput = | ScheduleAndSuspendModeOutput | QueueAndMatchModeOutput | SuspendModeOutput; -/** Paged collection of ClassificationPolicy items */ -export type PagedClassificationPolicyOutput = Paged; -/** Paged collection of DistributionPolicy items */ -export type PagedDistributionPolicyOutput = Paged; -/** Paged collection of ExceptionPolicy items */ -export type PagedExceptionPolicyOutput = Paged; -/** Paged collection of RouterQueue items */ -export type PagedRouterQueueOutput = Paged; -/** Paged collection of RouterJob items */ -export type PagedRouterJobOutput = Paged; -/** Paged collection of RouterWorker items */ -export type PagedRouterWorkerOutput = Paged; +/** Alias for QueueSelectorAttachmentKindOutput */ +export type QueueSelectorAttachmentKindOutput = string; +/** Alias for RouterRuleKindOutput */ +export type RouterRuleKindOutput = string; +/** Alias for ExpressionRouterRuleLanguageOutput */ +export type ExpressionRouterRuleLanguageOutput = string; +/** Alias for LabelOperatorOutput */ +export type LabelOperatorOutput = string; +/** Alias for WorkerSelectorAttachmentKindOutput */ +export type WorkerSelectorAttachmentKindOutput = string; +/** Alias for RouterWorkerSelectorStatusOutput */ +export type RouterWorkerSelectorStatusOutput = string; +/** Alias for DistributionModeKindOutput */ +export type DistributionModeKindOutput = string; +/** Alias for ScoringRuleParameterSelectorOutput */ +export type ScoringRuleParameterSelectorOutput = string; +/** Alias for ExceptionTriggerKindOutput */ +export type ExceptionTriggerKindOutput = string; +/** Alias for ExceptionActionKindOutput */ +export type ExceptionActionKindOutput = string; +/** Alias for RouterJobStatusOutput */ +export type RouterJobStatusOutput = string; +/** Alias for JobMatchingModeKindOutput */ +export type JobMatchingModeKindOutput = string; +/** Alias for RouterWorkerStateOutput */ +export type RouterWorkerStateOutput = string; diff --git a/sdk/communication/communication-job-router-rest/src/paginateHelper.ts b/sdk/communication/communication-job-router-rest/src/paginateHelper.ts index 5d541b4e406d..9ea946d9d6c5 100644 --- a/sdk/communication/communication-job-router-rest/src/paginateHelper.ts +++ b/sdk/communication/communication-job-router-rest/src/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/communication/communication-job-router-rest/src/parameters.ts b/sdk/communication/communication-job-router-rest/src/parameters.ts index e55abc76993d..9f7e28f60770 100644 --- a/sdk/communication/communication-job-router-rest/src/parameters.ts +++ b/sdk/communication/communication-job-router-rest/src/parameters.ts @@ -13,9 +13,11 @@ import type { CancelJobOptions, CompleteJobOptions, CloseJobOptions, + RouterJobStatusSelector, UnassignJobOptions, DeclineJobOfferOptions, RouterWorker, + RouterWorkerStateSelector, } from "./models.js"; export interface UpsertClassificationPolicyHeaders { @@ -255,7 +257,7 @@ export interface ListJobsQueryParamProperties { * * Possible values: "all", "pendingClassification", "queued", "assigned", "completed", "closed", "cancelled", "classificationFailed", "created", "pendingSchedule", "scheduled", "scheduleFailed", "waitingForActivation", "active" */ - status?: string; + status?: RouterJobStatusSelector; /** If specified, filter jobs by queue. */ queueId?: string; /** If specified, filter jobs by channel. */ @@ -330,7 +332,7 @@ export interface ListWorkersQueryParamProperties { * * Possible values: "active", "draining", "inactive", "all" */ - state?: string; + state?: RouterWorkerStateSelector; /** If specified, select workers who have a channel configuration with this channel. */ channelId?: string; /** If specified, select workers who are assigned to this queue. */ diff --git a/sdk/communication/communication-job-router-rest/tsp-location.yaml b/sdk/communication/communication-job-router-rest/tsp-location.yaml index c741f834a73d..392b6654ee71 100644 --- a/sdk/communication/communication-job-router-rest/tsp-location.yaml +++ b/sdk/communication/communication-job-router-rest/tsp-location.yaml @@ -1,7 +1,4 @@ -repo: - Azure/azure-rest-api-specs -additionalDirectories: [] -directory: - specification/communication/Communication.JobRouter -commit: - 1c04f51cbfa195fe177239cf63d00d3539006800 +directory: specification/communication/Communication.JobRouter +commit: d85dc63616d14d9790b224d46aad024e3461955b +repo: ../azure-rest-api-specs +additionalDirectories: From 74033cdec01bcbcd62da7d8d4ee70619b14c040e Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:14:05 +0800 Subject: [PATCH 28/55] [data-plane] refresh ai-content-safety-rest sdk (#30925) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- .../ai-content-safety-rest/CHANGELOG.md | 9 +- .../ai-content-safety-rest/eslint.config.mjs | 9 ++ .../review/ai-content-safety.api.md | 83 ++++++---- .../src/clientDefinitions.ts | 24 +-- .../src/contentSafetyClient.ts | 33 +++- .../ai-content-safety-rest/src/index.ts | 1 - .../src/isUnexpected.ts | 18 +-- .../ai-content-safety-rest/src/models.ts | 55 ++++--- .../src/outputModels.ts | 94 ++++------- .../src/paginateHelper.ts | 146 +++++++++++++++++- .../ai-content-safety-rest/src/parameters.ts | 16 +- .../ai-content-safety-rest/src/responses.ts | 22 +-- .../ai-content-safety-rest/tsp-location.yaml | 5 +- 13 files changed, 337 insertions(+), 178 deletions(-) create mode 100644 sdk/contentsafety/ai-content-safety-rest/eslint.config.mjs diff --git a/sdk/contentsafety/ai-content-safety-rest/CHANGELOG.md b/sdk/contentsafety/ai-content-safety-rest/CHANGELOG.md index 1ce623dfeef0..1cfafaacb724 100644 --- a/sdk/contentsafety/ai-content-safety-rest/CHANGELOG.md +++ b/sdk/contentsafety/ai-content-safety-rest/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 1.0.1 (Unreleased) +## 1.0.1 (2024-12-16) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +-refresh @azure-rest/ai-content-safety sdk ## 1.0.0 (2023-12-13) diff --git a/sdk/contentsafety/ai-content-safety-rest/eslint.config.mjs b/sdk/contentsafety/ai-content-safety-rest/eslint.config.mjs new file mode 100644 index 000000000000..b57e15e8e044 --- /dev/null +++ b/sdk/contentsafety/ai-content-safety-rest/eslint.config.mjs @@ -0,0 +1,9 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + }, + }, +]); diff --git a/sdk/contentsafety/ai-content-safety-rest/review/ai-content-safety.api.md b/sdk/contentsafety/ai-content-safety-rest/review/ai-content-safety.api.md index 32ddc49df2d7..ca99a20a89f7 100644 --- a/sdk/contentsafety/ai-content-safety-rest/review/ai-content-safety.api.md +++ b/sdk/contentsafety/ai-content-safety-rest/review/ai-content-safety.api.md @@ -9,8 +9,6 @@ import type { ClientOptions } from '@azure-rest/core-client'; import type { ErrorResponse } from '@azure-rest/core-client'; import type { HttpResponse } from '@azure-rest/core-client'; import type { KeyCredential } from '@azure/core-auth'; -import type { Paged } from '@azure/core-paging'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; import type { PathUncheckedResponse } from '@azure-rest/core-client'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RequestParameters } from '@azure-rest/core-client'; @@ -98,17 +96,13 @@ export interface AnalyzeImageDefaultResponse extends HttpResponse { // @public export interface AnalyzeImageOptions { - categories?: string[]; + categories?: ImageCategory[]; image: ImageData_2; - outputType?: string; + outputType?: AnalyzeImageOutputType; } // @public -export interface AnalyzeImageOptionsOutput { - categories?: string[]; - image: ImageDataOutput; - outputType?: string; -} +export type AnalyzeImageOutputType = string; // @public (undocumented) export type AnalyzeImageParameters = AnalyzeImageBodyParam & RequestParameters; @@ -154,20 +148,14 @@ export interface AnalyzeTextDefaultResponse extends HttpResponse { // @public export interface AnalyzeTextOptions { blocklistNames?: string[]; - categories?: string[]; + categories?: TextCategory[]; haltOnBlocklistHit?: boolean; - outputType?: string; + outputType?: AnalyzeTextOutputType; text: string; } // @public -export interface AnalyzeTextOptionsOutput { - blocklistNames?: string[]; - categories?: string[]; - haltOnBlocklistHit?: boolean; - outputType?: string; - text: string; -} +export type AnalyzeTextOutputType = string; // @public (undocumented) export type AnalyzeTextParameters = AnalyzeTextBodyParam & RequestParameters; @@ -184,7 +172,12 @@ export type ContentSafetyClient = Client & { }; // @public -function createClient(endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): ContentSafetyClient; +export interface ContentSafetyClientOptions extends ClientOptions { + apiVersion?: string; +} + +// @public +function createClient(endpointParam: string, credentials: TokenCredential | KeyCredential, { apiVersion, ...options }?: ContentSafetyClientOptions): ContentSafetyClient; export default createClient; // @public @@ -259,7 +252,7 @@ export type DeleteTextBlocklistParameters = RequestParameters; export type GetArrayType = T extends Array ? TData : never; // @public -export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; @@ -330,28 +323,28 @@ export type GetTextBlocklistParameters = RequestParameters; // @public export interface ImageCategoriesAnalysisOutput { - category: string; + category: ImageCategoryOutput; severity?: number; } // @public -interface ImageData_2 { - blobUrl?: string; - content?: string; -} -export { ImageData_2 as ImageData } +export type ImageCategory = string; // @public -export interface ImageDataOutput { +export type ImageCategoryOutput = string; + +// @public +interface ImageData_2 { blobUrl?: string; content?: string; } +export { ImageData_2 as ImageData } // @public (undocumented) -export function isUnexpected(response: AnalyzeText200Response | AnalyzeTextDefaultResponse): response is AnalyzeTextDefaultResponse; +export function isUnexpected(response: AnalyzeImage200Response | AnalyzeImageDefaultResponse): response is AnalyzeImageDefaultResponse; // @public (undocumented) -export function isUnexpected(response: AnalyzeImage200Response | AnalyzeImageDefaultResponse): response is AnalyzeImageDefaultResponse; +export function isUnexpected(response: AnalyzeText200Response | AnalyzeTextDefaultResponse): response is AnalyzeTextDefaultResponse; // @public (undocumented) export function isUnexpected(response: GetTextBlocklist200Response | GetTextBlocklistDefaultResponse): response is GetTextBlocklistDefaultResponse; @@ -453,10 +446,28 @@ export interface ListTextBlocklistsDefaultResponse extends HttpResponse { export type ListTextBlocklistsParameters = RequestParameters; // @public -export type PagedTextBlocklistItemOutput = Paged; +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} // @public -export type PagedTextBlocklistOutput = Paged; +export interface PagedTextBlocklistItemOutput { + nextLink?: string; + value: Array; +} + +// @public +export interface PagedTextBlocklistOutput { + nextLink?: string; + value: Array; +} + +// @public +export interface PageSettings { + continuationToken?: string; +} // @public export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; @@ -514,8 +525,8 @@ export interface RemoveTextBlocklistItemsOptions { // @public (undocumented) export interface Routes { - (path: "/text:analyze"): AnalyzeText; (path: "/image:analyze"): AnalyzeImage; + (path: "/text:analyze"): AnalyzeText; (path: "/text/blocklists/{blocklistName}", blocklistName: string): GetTextBlocklist; (path: "/text/blocklists"): ListTextBlocklists; (path: "/text/blocklists/{blocklistName}:addOrUpdateBlocklistItems", blocklistName: string): AddOrUpdateBlocklistItems; @@ -561,10 +572,16 @@ export type TextBlocklistResourceMergeAndPatch = Partial; // @public export interface TextCategoriesAnalysisOutput { - category: string; + category: TextCategoryOutput; severity?: number; } +// @public +export type TextCategory = string; + +// @public +export type TextCategoryOutput = string; + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/contentsafety/ai-content-safety-rest/src/clientDefinitions.ts b/sdk/contentsafety/ai-content-safety-rest/src/clientDefinitions.ts index ffbd905cfc8a..c07e17869159 100644 --- a/sdk/contentsafety/ai-content-safety-rest/src/clientDefinitions.ts +++ b/sdk/contentsafety/ai-content-safety-rest/src/clientDefinitions.ts @@ -2,8 +2,8 @@ // Licensed under the MIT License. import type { - AnalyzeTextParameters, AnalyzeImageParameters, + AnalyzeTextParameters, GetTextBlocklistParameters, CreateOrUpdateTextBlocklistParameters, DeleteTextBlocklistParameters, @@ -14,10 +14,10 @@ import type { ListTextBlocklistItemsParameters, } from "./parameters.js"; import type { - AnalyzeText200Response, - AnalyzeTextDefaultResponse, AnalyzeImage200Response, AnalyzeImageDefaultResponse, + AnalyzeText200Response, + AnalyzeTextDefaultResponse, GetTextBlocklist200Response, GetTextBlocklistDefaultResponse, CreateOrUpdateTextBlocklist200Response, @@ -38,13 +38,6 @@ import type { } from "./responses.js"; import type { Client, StreamableMethod } from "@azure-rest/core-client"; -export interface AnalyzeText { - /** A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. */ - post( - options: AnalyzeTextParameters, - ): StreamableMethod; -} - export interface AnalyzeImage { /** A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. */ post( @@ -52,6 +45,13 @@ export interface AnalyzeImage { ): StreamableMethod; } +export interface AnalyzeText { + /** A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. */ + post( + options: AnalyzeTextParameters, + ): StreamableMethod; +} + export interface GetTextBlocklist { /** Returns text blocklist details. */ get( @@ -109,10 +109,10 @@ export interface ListTextBlocklistItems { } export interface Routes { - /** Resource for '/text:analyze' has methods for the following verbs: post */ - (path: "/text:analyze"): AnalyzeText; /** Resource for '/image:analyze' has methods for the following verbs: post */ (path: "/image:analyze"): AnalyzeImage; + /** Resource for '/text:analyze' has methods for the following verbs: post */ + (path: "/text:analyze"): AnalyzeText; /** Resource for '/text/blocklists/\{blocklistName\}' has methods for the following verbs: get, patch, delete */ (path: "/text/blocklists/{blocklistName}", blocklistName: string): GetTextBlocklist; /** Resource for '/text/blocklists' has methods for the following verbs: get */ diff --git a/sdk/contentsafety/ai-content-safety-rest/src/contentSafetyClient.ts b/sdk/contentsafety/ai-content-safety-rest/src/contentSafetyClient.ts index b283bcc5e8a8..a85c0491bcdb 100644 --- a/sdk/contentsafety/ai-content-safety-rest/src/contentSafetyClient.ts +++ b/sdk/contentsafety/ai-content-safety-rest/src/contentSafetyClient.ts @@ -7,20 +7,25 @@ import { logger } from "./logger.js"; import type { TokenCredential, KeyCredential } from "@azure/core-auth"; import type { ContentSafetyClient } from "./clientDefinitions.js"; +/** The optional parameters for the client */ +export interface ContentSafetyClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + /** * Initialize a new instance of `ContentSafetyClient` - * @param endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: + * @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: * https://.cognitiveservices.azure.com). * @param credentials - uniquely identify client credential * @param options - the parameter for all optional parameters */ export default function createClient( - endpoint: string, + endpointParam: string, credentials: TokenCredential | KeyCredential, - options: ClientOptions = {}, + { apiVersion = "2023-10-01", ...options }: ContentSafetyClientOptions = {}, ): ContentSafetyClient { - const baseUrl = options.baseUrl ?? `${endpoint}/contentsafety`; - options.apiVersion = options.apiVersion ?? "2023-10-01"; + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}/contentsafety`; const userAgentInfo = `azsdk-js-ai-content-safety-rest/1.0.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix @@ -39,8 +44,24 @@ export default function createClient( apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? "Ocp-Apim-Subscription-Key", }, }; + const client = getClient(endpointUrl, credentials, options) as ContentSafetyClient; - const client = getClient(baseUrl, credentials, options) as ContentSafetyClient; + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); return client; } diff --git a/sdk/contentsafety/ai-content-safety-rest/src/index.ts b/sdk/contentsafety/ai-content-safety-rest/src/index.ts index 445b49c6bfe9..b0791e7a658a 100644 --- a/sdk/contentsafety/ai-content-safety-rest/src/index.ts +++ b/sdk/contentsafety/ai-content-safety-rest/src/index.ts @@ -12,5 +12,4 @@ export * from "./models.js"; export * from "./outputModels.js"; export * from "./paginateHelper.js"; -// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named export default ContentSafetyClient; diff --git a/sdk/contentsafety/ai-content-safety-rest/src/isUnexpected.ts b/sdk/contentsafety/ai-content-safety-rest/src/isUnexpected.ts index 382b7d3dd252..d6828ae15ce2 100644 --- a/sdk/contentsafety/ai-content-safety-rest/src/isUnexpected.ts +++ b/sdk/contentsafety/ai-content-safety-rest/src/isUnexpected.ts @@ -2,10 +2,10 @@ // Licensed under the MIT License. import type { - AnalyzeText200Response, - AnalyzeTextDefaultResponse, AnalyzeImage200Response, AnalyzeImageDefaultResponse, + AnalyzeText200Response, + AnalyzeTextDefaultResponse, GetTextBlocklist200Response, GetTextBlocklistDefaultResponse, CreateOrUpdateTextBlocklist200Response, @@ -26,8 +26,8 @@ import type { } from "./responses.js"; const responseMap: Record = { - "POST /text:analyze": ["200"], "POST /image:analyze": ["200"], + "POST /text:analyze": ["200"], "GET /text/blocklists/{blocklistName}": ["200"], "PATCH /text/blocklists/{blocklistName}": ["200", "201"], "DELETE /text/blocklists/{blocklistName}": ["204"], @@ -38,12 +38,12 @@ const responseMap: Record = { "GET /text/blocklists/{blocklistName}/blocklistItems": ["200"], }; -export function isUnexpected( - response: AnalyzeText200Response | AnalyzeTextDefaultResponse, -): response is AnalyzeTextDefaultResponse; export function isUnexpected( response: AnalyzeImage200Response | AnalyzeImageDefaultResponse, ): response is AnalyzeImageDefaultResponse; +export function isUnexpected( + response: AnalyzeText200Response | AnalyzeTextDefaultResponse, +): response is AnalyzeTextDefaultResponse; export function isUnexpected( response: GetTextBlocklist200Response | GetTextBlocklistDefaultResponse, ): response is GetTextBlocklistDefaultResponse; @@ -73,10 +73,10 @@ export function isUnexpected( ): response is ListTextBlocklistItemsDefaultResponse; export function isUnexpected( response: - | AnalyzeText200Response - | AnalyzeTextDefaultResponse | AnalyzeImage200Response | AnalyzeImageDefaultResponse + | AnalyzeText200Response + | AnalyzeTextDefaultResponse | GetTextBlocklist200Response | GetTextBlocklistDefaultResponse | CreateOrUpdateTextBlocklist200Response @@ -95,8 +95,8 @@ export function isUnexpected( | ListTextBlocklistItems200Response | ListTextBlocklistItemsDefaultResponse, ): response is - | AnalyzeTextDefaultResponse | AnalyzeImageDefaultResponse + | AnalyzeTextDefaultResponse | GetTextBlocklistDefaultResponse | CreateOrUpdateTextBlocklistDefaultResponse | DeleteTextBlocklistDefaultResponse diff --git a/sdk/contentsafety/ai-content-safety-rest/src/models.ts b/sdk/contentsafety/ai-content-safety-rest/src/models.ts index d416722083f8..017c38a6216a 100644 --- a/sdk/contentsafety/ai-content-safety-rest/src/models.ts +++ b/sdk/contentsafety/ai-content-safety-rest/src/models.ts @@ -1,36 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** The text analysis request. */ -export interface AnalyzeTextOptions { - /** The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. */ - text: string; - /** The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. */ - categories?: string[]; - /** The names of blocklists. */ - blocklistNames?: string[]; - /** When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit. */ - haltOnBlocklistHit?: boolean; - /** - * This refers to the type of text analysis output. If no value is assigned, the default value will be "FourSeverityLevels". - * - * Possible values: FourSeverityLevels, EightSeverityLevels - */ - outputType?: string; -} - /** The image analysis request. */ export interface AnalyzeImageOptions { - /** The image needs to be analyzed. */ + /** The image to be analyzed. */ image: ImageData; /** The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. */ - categories?: string[]; + categories?: ImageCategory[]; /** * This refers to the type of image analysis output. If no value is assigned, the default value will be "FourSeverityLevels". * - * Possible values: FourSeverityLevels + * Possible values: "FourSeverityLevels" */ - outputType?: string; + outputType?: AnalyzeImageOutputType; } /** The image can be either base64 encoded bytes or a blob URL. You can choose only one of these options. If both are provided, the request will be refused. The maximum image size is 2048 x 2048 pixels and should not exceed 4 MB, while the minimum image size is 50 x 50 pixels. */ @@ -41,6 +23,24 @@ export interface ImageData { blobUrl?: string; } +/** The text analysis request. */ +export interface AnalyzeTextOptions { + /** The text to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. */ + text: string; + /** The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. */ + categories?: TextCategory[]; + /** The names of blocklists. */ + blocklistNames?: string[]; + /** When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit. */ + haltOnBlocklistHit?: boolean; + /** + * This refers to the type of text analysis output. If no value is assigned, the default value will be "FourSeverityLevels". + * + * Possible values: "FourSeverityLevels", "EightSeverityLevels" + */ + outputType?: AnalyzeTextOutputType; +} + /** Text Blocklist. */ export interface TextBlocklist { /** Text blocklist name. */ @@ -59,7 +59,7 @@ export interface AddOrUpdateTextBlocklistItemsOptions { export interface TextBlocklistItem { /** BlocklistItem description. */ description?: string; - /** BlocklistItem content. */ + /** BlocklistItem content. The length is counted using Unicode code point. */ text: string; } @@ -68,3 +68,12 @@ export interface RemoveTextBlocklistItemsOptions { /** Array of blocklistItemIds to remove. */ blocklistItemIds: string[]; } + +/** Alias for ImageCategory */ +export type ImageCategory = string; +/** Alias for AnalyzeImageOutputType */ +export type AnalyzeImageOutputType = string; +/** Alias for TextCategory */ +export type TextCategory = string; +/** Alias for AnalyzeTextOutputType */ +export type AnalyzeTextOutputType = string; diff --git a/sdk/contentsafety/ai-content-safety-rest/src/outputModels.ts b/sdk/contentsafety/ai-content-safety-rest/src/outputModels.ts index 5436bd44eff4..190ff141f733 100644 --- a/sdk/contentsafety/ai-content-safety-rest/src/outputModels.ts +++ b/sdk/contentsafety/ai-content-safety-rest/src/outputModels.ts @@ -1,24 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Paged } from "@azure/core-paging"; +/** The image analysis response. */ +export interface AnalyzeImageResultOutput { + /** Analysis result for categories. */ + categoriesAnalysis: Array; +} -/** The text analysis request. */ -export interface AnalyzeTextOptionsOutput { - /** The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. */ - text: string; - /** The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. */ - categories?: string[]; - /** The names of blocklists. */ - blocklistNames?: string[]; - /** When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit. */ - haltOnBlocklistHit?: boolean; +/** Image analysis result. */ +export interface ImageCategoriesAnalysisOutput { /** - * This refers to the type of text analysis output. If no value is assigned, the default value will be "FourSeverityLevels". + * The image analysis category. * - * Possible values: FourSeverityLevels, EightSeverityLevels + * Possible values: "Hate", "SelfHarm", "Sexual", "Violence" */ - outputType?: string; + category: ImageCategoryOutput; + /** The value increases with the severity of the input content. The value of this field is determined by the output type specified in the request. The output type could be ‘FourSeverityLevels’, and the output value can be 0, 2, 4, 6. */ + severity?: number; } /** The text analysis response. */ @@ -44,53 +42,13 @@ export interface TextCategoriesAnalysisOutput { /** * The text analysis category. * - * Possible values: Hate, SelfHarm, Sexual, Violence + * Possible values: "Hate", "SelfHarm", "Sexual", "Violence" */ - category: string; + category: TextCategoryOutput; /** The value increases with the severity of the input content. The value of this field is determined by the output type specified in the request. The output type could be ‘FourSeverityLevels’ or ‘EightSeverity Levels’, and the output value can be 0, 2, 4, 6 or 0, 1, 2, 3, 4, 5, 6, or 7. */ severity?: number; } -/** The image analysis request. */ -export interface AnalyzeImageOptionsOutput { - /** The image needs to be analyzed. */ - image: ImageDataOutput; - /** The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. */ - categories?: string[]; - /** - * This refers to the type of image analysis output. If no value is assigned, the default value will be "FourSeverityLevels". - * - * Possible values: FourSeverityLevels - */ - outputType?: string; -} - -/** The image can be either base64 encoded bytes or a blob URL. You can choose only one of these options. If both are provided, the request will be refused. The maximum image size is 2048 x 2048 pixels and should not exceed 4 MB, while the minimum image size is 50 x 50 pixels. */ -export interface ImageDataOutput { - /** The Base64 encoding of the image. */ - content?: string; - /** The blob url of the image. */ - blobUrl?: string; -} - -/** The image analysis response. */ -export interface AnalyzeImageResultOutput { - /** Analysis result for categories. */ - categoriesAnalysis: Array; -} - -/** Image analysis result. */ -export interface ImageCategoriesAnalysisOutput { - /** - * The image analysis category. - * - * Possible values: Hate, SelfHarm, Sexual, Violence - */ - category: string; - /** The value increases with the severity of the input content. The value of this field is determined by the output type specified in the request. The output type could be ‘FourSeverityLevels’, and the output value can be 0, 2, 4, 6. */ - severity?: number; -} - /** Text Blocklist. */ export interface TextBlocklistOutput { /** Text blocklist name. */ @@ -99,13 +57,21 @@ export interface TextBlocklistOutput { description?: string; } +/** Paged collection of TextBlocklist items */ +export interface PagedTextBlocklistOutput { + /** The TextBlocklist items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** Item in a TextBlocklist. */ export interface TextBlocklistItemOutput { /** The service will generate a BlocklistItemId, which will be a UUID. */ readonly blocklistItemId: string; /** BlocklistItem description. */ description?: string; - /** BlocklistItem content. */ + /** BlocklistItem content. The length is counted using Unicode code point. */ text: string; } @@ -115,7 +81,15 @@ export interface AddOrUpdateTextBlocklistItemsResultOutput { blocklistItems: Array; } -/** Paged collection of TextBlocklist items */ -export type PagedTextBlocklistOutput = Paged; /** Paged collection of TextBlocklistItem items */ -export type PagedTextBlocklistItemOutput = Paged; +export interface PagedTextBlocklistItemOutput { + /** The TextBlocklistItem items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Alias for ImageCategoryOutput */ +export type ImageCategoryOutput = string; +/** Alias for TextCategoryOutput */ +export type TextCategoryOutput = string; diff --git a/sdk/contentsafety/ai-content-safety-rest/src/paginateHelper.ts b/sdk/contentsafety/ai-content-safety-rest/src/paginateHelper.ts index 5d541b4e406d..9ea946d9d6c5 100644 --- a/sdk/contentsafety/ai-content-safety-rest/src/paginateHelper.ts +++ b/sdk/contentsafety/ai-content-safety-rest/src/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/contentsafety/ai-content-safety-rest/src/parameters.ts b/sdk/contentsafety/ai-content-safety-rest/src/parameters.ts index b787eb2d0e7b..aec66e9a4ed9 100644 --- a/sdk/contentsafety/ai-content-safety-rest/src/parameters.ts +++ b/sdk/contentsafety/ai-content-safety-rest/src/parameters.ts @@ -3,26 +3,26 @@ import type { RequestParameters } from "@azure-rest/core-client"; import type { - AnalyzeTextOptions, AnalyzeImageOptions, + AnalyzeTextOptions, TextBlocklist, AddOrUpdateTextBlocklistItemsOptions, RemoveTextBlocklistItemsOptions, } from "./models.js"; -export interface AnalyzeTextBodyParam { - /** The text analysis request. */ - body: AnalyzeTextOptions; -} - -export type AnalyzeTextParameters = AnalyzeTextBodyParam & RequestParameters; - export interface AnalyzeImageBodyParam { /** The image analysis request. */ body: AnalyzeImageOptions; } export type AnalyzeImageParameters = AnalyzeImageBodyParam & RequestParameters; + +export interface AnalyzeTextBodyParam { + /** The text analysis request. */ + body: AnalyzeTextOptions; +} + +export type AnalyzeTextParameters = AnalyzeTextBodyParam & RequestParameters; export type GetTextBlocklistParameters = RequestParameters; /** The resource instance. */ export type TextBlocklistResourceMergeAndPatch = Partial; diff --git a/sdk/contentsafety/ai-content-safety-rest/src/responses.ts b/sdk/contentsafety/ai-content-safety-rest/src/responses.ts index b5bef7d4fce1..a82e9ceb8d00 100644 --- a/sdk/contentsafety/ai-content-safety-rest/src/responses.ts +++ b/sdk/contentsafety/ai-content-safety-rest/src/responses.ts @@ -4,8 +4,8 @@ import type { RawHttpHeaders } from "@azure/core-rest-pipeline"; import type { HttpResponse, ErrorResponse } from "@azure-rest/core-client"; import type { - AnalyzeTextResultOutput, AnalyzeImageResultOutput, + AnalyzeTextResultOutput, TextBlocklistOutput, PagedTextBlocklistOutput, AddOrUpdateTextBlocklistItemsResultOutput, @@ -14,37 +14,37 @@ import type { } from "./outputModels.js"; /** The request has succeeded. */ -export interface AnalyzeText200Response extends HttpResponse { +export interface AnalyzeImage200Response extends HttpResponse { status: "200"; - body: AnalyzeTextResultOutput; + body: AnalyzeImageResultOutput; } -export interface AnalyzeTextDefaultHeaders { +export interface AnalyzeImageDefaultHeaders { /** String error code indicating what went wrong. */ "x-ms-error-code"?: string; } -export interface AnalyzeTextDefaultResponse extends HttpResponse { +export interface AnalyzeImageDefaultResponse extends HttpResponse { status: string; body: ErrorResponse; - headers: RawHttpHeaders & AnalyzeTextDefaultHeaders; + headers: RawHttpHeaders & AnalyzeImageDefaultHeaders; } /** The request has succeeded. */ -export interface AnalyzeImage200Response extends HttpResponse { +export interface AnalyzeText200Response extends HttpResponse { status: "200"; - body: AnalyzeImageResultOutput; + body: AnalyzeTextResultOutput; } -export interface AnalyzeImageDefaultHeaders { +export interface AnalyzeTextDefaultHeaders { /** String error code indicating what went wrong. */ "x-ms-error-code"?: string; } -export interface AnalyzeImageDefaultResponse extends HttpResponse { +export interface AnalyzeTextDefaultResponse extends HttpResponse { status: string; body: ErrorResponse; - headers: RawHttpHeaders & AnalyzeImageDefaultHeaders; + headers: RawHttpHeaders & AnalyzeTextDefaultHeaders; } /** The request has succeeded. */ diff --git a/sdk/contentsafety/ai-content-safety-rest/tsp-location.yaml b/sdk/contentsafety/ai-content-safety-rest/tsp-location.yaml index 9d47983f6b57..a607d2e6fafe 100644 --- a/sdk/contentsafety/ai-content-safety-rest/tsp-location.yaml +++ b/sdk/contentsafety/ai-content-safety-rest/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/cognitiveservices/ContentSafety -repo: Azure/azure-rest-api-specs -commit: 164375e67a1bffb207bcf603772c289dbe42d7b5 +commit: d85dc63616d14d9790b224d46aad024e3461955b +repo: ../azure-rest-api-specs +additionalDirectories: From a75a22928d7ac8c5ccf609289ffa0cde4a576801 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:15:02 +0800 Subject: [PATCH 29/55] [data-plane] refresh developer-devcenter-rest sdk (#30936) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- common/config/rush/pnpm-lock.yaml | 19 +- .../developer-devcenter-rest/CHANGELOG.md | 8 +- .../developer-devcenter-rest/LICENSE | 2 +- .../eslint.config.mjs | 7 + .../developer-devcenter-rest/package.json | 72 ++-- .../review/developer-devcenter.api.md | 119 ++++--- .../developer-devcenter-rest/sample.env | 2 +- .../src/azureDeveloperDevCenter.ts | 29 +- .../developer-devcenter-rest/src/models.ts | 76 +---- .../src/outputModels.ts | 314 +++++++++++------- .../src/paginateHelper.ts | 146 +++++++- .../src/parameters.ts | 4 +- .../test/public/utils/env.browser.ts | 2 - .../test/public/utils/env.ts | 6 - .../test/public/utils/recordedClient.ts | 1 - .../developer-devcenter-rest/tsconfig.json | 12 +- .../tsp-location.yaml | 3 +- .../vitest.browser.config.ts | 5 + .../developer-devcenter-rest/vitest.config.ts | 32 +- 19 files changed, 541 insertions(+), 318 deletions(-) delete mode 100644 sdk/devcenter/developer-devcenter-rest/test/public/utils/env.browser.ts delete mode 100644 sdk/devcenter/developer-devcenter-rest/test/public/utils/env.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index db2ac9704e38..5edc03d16e04 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1337,10 +1337,6 @@ packages: resolution: {integrity: sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==} engines: {node: '>=18.0.0'} - '@azure/core-lro@3.0.0': - resolution: {integrity: sha512-t46lsD0jDJ1o71hIGzoUfT9jH+rIkNJAJLhhPqW8XLbPueHBnP4x5PNJ2szXlLoztH/00OcUUH3FbFnAntOSWA==} - engines: {node: '>=18.0.0'} - '@azure/core-paging@1.6.2': resolution: {integrity: sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==} engines: {node: '>=18.0.0'} @@ -3671,7 +3667,7 @@ packages: version: 0.0.0 '@rush-temp/developer-devcenter@file:projects/developer-devcenter.tgz': - resolution: {integrity: sha512-DUh+U6IwsLDin8o4TepU5ulb/ihIVvtVS5Ic7lo7fqWL+nu2co9OPa2LADWNZkynKnQ2PdpfYSUoHLswQ1Dg3A==, tarball: file:projects/developer-devcenter.tgz} + resolution: {integrity: sha512-zGrduZzNBYJVUxltyUcs6kpIlS2rvzxJkOjvFDlk132R/26IoWgcmseVvGkobtxPAr34R1UMqfGumW/Sb2y19A==, tarball: file:projects/developer-devcenter.tgz} version: 0.0.0 '@rush-temp/digital-twins-core@file:projects/digital-twins-core.tgz': @@ -8426,13 +8422,6 @@ snapshots: '@azure/logger': 1.1.4 tslib: 2.8.1 - '@azure/core-lro@3.0.0': - dependencies: - '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.11.0 - '@azure/logger': 1.1.4 - tslib: 2.8.1 - '@azure/core-paging@1.6.2': dependencies: tslib: 2.8.1 @@ -16842,13 +16831,14 @@ snapshots: '@rush-temp/developer-devcenter@file:projects/developer-devcenter.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure/core-lro': 3.0.0 + '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - eslint: 9.17.0 + eslint: 8.57.1 playwright: 1.49.1 + tshy: 2.0.1 tslib: 2.8.1 typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) @@ -16857,7 +16847,6 @@ snapshots: - '@vitest/ui' - bufferutil - happy-dom - - jiti - jsdom - less - lightningcss diff --git a/sdk/devcenter/developer-devcenter-rest/CHANGELOG.md b/sdk/devcenter/developer-devcenter-rest/CHANGELOG.md index 05d3e55b8752..91f07510a0e0 100644 --- a/sdk/devcenter/developer-devcenter-rest/CHANGELOG.md +++ b/sdk/devcenter/developer-devcenter-rest/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.0.1 (Unreleased) +## 1.0.1 (2024-12-16) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- refresh @azure-rest/developer-devcenter sdk ## 1.0.0 (2024-07-08) diff --git a/sdk/devcenter/developer-devcenter-rest/LICENSE b/sdk/devcenter/developer-devcenter-rest/LICENSE index 5d1d36e0af80..7d5934740965 100644 --- a/sdk/devcenter/developer-devcenter-rest/LICENSE +++ b/sdk/devcenter/developer-devcenter-rest/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2024 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/devcenter/developer-devcenter-rest/eslint.config.mjs b/sdk/devcenter/developer-devcenter-rest/eslint.config.mjs index b57e15e8e044..a9fcfbef11ff 100644 --- a/sdk/devcenter/developer-devcenter-rest/eslint.config.mjs +++ b/sdk/devcenter/developer-devcenter-rest/eslint.config.mjs @@ -4,6 +4,13 @@ export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", }, }, ]); diff --git a/sdk/devcenter/developer-devcenter-rest/package.json b/sdk/devcenter/developer-devcenter-rest/package.json index c3b63dd65fd2..22ad684dee3d 100644 --- a/sdk/devcenter/developer-devcenter-rest/package.json +++ b/sdk/devcenter/developer-devcenter-rest/package.json @@ -38,7 +38,8 @@ "dist", "README.md", "LICENSE", - "review/*" + "review/*", + "CHANGELOG.md" ], "sdk-type": "client", "repository": "github:Azure/azure-sdk-for-js", @@ -51,59 +52,59 @@ "constantPaths": [ { "path": "src/azureDeveloperDevCenter.ts", - "prefix": "package-version" + "prefix": "userAgentInfo" } ] }, "dependencies": { - "@azure-rest/core-client": "^2.0.0", - "@azure/abort-controller": "^2.0.0", + "@azure-rest/core-client": "^2.3.1", "@azure/core-auth": "^1.6.0", - "@azure/core-lro": "3.0.0", - "@azure/core-paging": "^1.5.0", "@azure/core-rest-pipeline": "^1.5.0", "@azure/logger": "^1.0.0", - "tslib": "^2.6.2" + "tslib": "^2.6.2", + "@azure/core-lro": "^3.1.0", + "@azure/abort-controller": "^2.1.2" }, "devDependencies": { - "@azure-tools/test-credential": "^2.0.0", - "@azure-tools/test-recorder": "^4.0.0", - "@azure/core-util": "^1.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/identity": "^4.0.1", + "dotenv": "^16.0.0", + "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", + "eslint": "^8.55.0", + "typescript": "~5.7.2", + "tshy": "^2.0.0", + "@azure/identity": "^4.2.1", "@vitest/browser": "^2.0.5", "@vitest/coverage-istanbul": "^2.0.5", - "dotenv": "^16.0.0", - "eslint": "^9.9.0", "playwright": "^1.41.2", - "typescript": "~5.7.2", - "vitest": "^2.0.5" + "vitest": "^2.0.5", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0" }, "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", - "build:samples": "dev-tool samples publish --force", - "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", - "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "dev-tool samples run samples-dev", "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", - "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"", - "generate:client": "echo skipped", + "pack": "npm pack 2>&1", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "dev-tool run test:vitest", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", "integration-test:node": "echo skipped", - "lint": "eslint package.json api-extractor.json src test", - "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "build:samples": "echo skipped", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "execute:samples": "echo skipped", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "generate:client": "echo skipped", "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", - "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run test:vitest -- -c vitest.config.ts", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", "update-snippets": "echo skipped" }, "exports": { @@ -129,12 +130,5 @@ }, "main": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", - "//sampleConfiguration": { - "productName": "Azure DevCenter", - "productSlugs": [ - "azure" - ], - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure-rest/developer-devcenter" - }, "module": "./dist/esm/index.js" } diff --git a/sdk/devcenter/developer-devcenter-rest/review/developer-devcenter.api.md b/sdk/devcenter/developer-devcenter-rest/review/developer-devcenter.api.md index 1a1623300616..afe50709983a 100644 --- a/sdk/devcenter/developer-devcenter-rest/review/developer-devcenter.api.md +++ b/sdk/devcenter/developer-devcenter-rest/review/developer-devcenter.api.md @@ -13,8 +13,6 @@ import type { ErrorModel } from '@azure-rest/core-client'; import type { ErrorResponse } from '@azure-rest/core-client'; import type { HttpResponse } from '@azure-rest/core-client'; import type { OperationState } from '@azure/core-lro'; -import type { Paged } from '@azure/core-paging'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; import type { PathUncheckedResponse } from '@azure-rest/core-client'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RequestParameters } from '@azure-rest/core-client'; @@ -26,13 +24,18 @@ export type AzureDeveloperDevCenterClient = Client & { path: Routes; }; +// @public +export interface AzureDeveloperDevCenterClientOptions extends ClientOptions { + apiVersion?: string; +} + // @public export interface CatalogOutput { readonly name: string; } // @public -function createClient(endpointParam: string, credentials: TokenCredential, options?: ClientOptions): AzureDeveloperDevCenterClient; +function createClient(endpointParam: string, credentials: TokenCredential, { apiVersion, ...options }?: AzureDeveloperDevCenterClientOptions): AzureDeveloperDevCenterClient; export default createClient; // @public @@ -338,7 +341,7 @@ export interface DevBoxActionDelayResultOutput { } // @public -export type DevBoxActionDelayResultStatusOutput = "Succeeded" | "Failed" | string; +export type DevBoxActionDelayResultStatusOutput = string; // @public export interface DevBoxActionOutput { @@ -350,7 +353,7 @@ export interface DevBoxActionOutput { } // @public -export type DevBoxActionTypeOutput = "Stop" | string; +export type DevBoxActionTypeOutput = string; // @public export interface DevBoxNextActionOutput { @@ -379,10 +382,10 @@ export interface DevBoxOutput { } // @public -export type DevBoxProvisioningState = "Succeeded" | "Failed" | "Canceled" | "Creating" | "Deleting" | "Updating" | "Starting" | "Stopping" | "Provisioning" | "ProvisionedWithWarning" | "InGracePeriod" | "NotProvisioned" | string; +export type DevBoxProvisioningState = string; // @public -export type DevBoxProvisioningStateOutput = "Succeeded" | "Failed" | "Canceled" | "Creating" | "Deleting" | "Updating" | "Starting" | "Stopping" | "Provisioning" | "ProvisionedWithWarning" | "InGracePeriod" | "NotProvisioned" | string; +export type DevBoxProvisioningStateOutput = string; // @public export interface Environment { @@ -429,13 +432,13 @@ export interface EnvironmentOutput { } // @public -export type EnvironmentProvisioningState = "Succeeded" | "Failed" | "Canceled" | "Creating" | "Accepted" | "Deleting" | "Updating" | "Preparing" | "Running" | "Syncing" | "MovingResources" | "TransientFailure" | "StorageProvisioningFailed" | string; +export type EnvironmentProvisioningState = string; // @public -export type EnvironmentProvisioningStateOutput = "Succeeded" | "Failed" | "Canceled" | "Creating" | "Accepted" | "Deleting" | "Updating" | "Preparing" | "Running" | "Syncing" | "MovingResources" | "TransientFailure" | "StorageProvisioningFailed" | string; +export type EnvironmentProvisioningStateOutput = string; // @public -export type EnvironmentTypeEnableStatusOutput = "Enabled" | "Disabled" | string; +export type EnvironmentTypeEnableStatusOutput = string; // @public export interface EnvironmentTypeOutput { @@ -656,7 +659,7 @@ export function getLongRunningPoller(client: Client, initialResponse: DeleteEnvironment202Response | DeleteEnvironment204Response | DeleteEnvironmentDefaultResponse, options?: CreateHttpPollerOptions>): Promise, TResult>>; // @public -export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; @@ -800,10 +803,10 @@ export interface HardwareProfileOutput { } // @public -export type HibernateSupport = "Enabled" | "Disabled" | "OsUnsupported" | string; +export type HibernateSupport = string; // @public -export type HibernateSupportOutput = "Enabled" | "Disabled" | "OsUnsupported" | string; +export type HibernateSupportOutput = string; // @public export interface ImageReference { @@ -1321,13 +1324,13 @@ export interface ListSchedulesByPoolDefaultResponse extends HttpResponse { export type ListSchedulesByPoolParameters = RequestParameters; // @public -export type LocalAdminStatus = "Enabled" | "Disabled" | string; +export type LocalAdminStatus = string; // @public -export type LocalAdminStatusOutput = "Enabled" | "Disabled" | string; +export type LocalAdminStatusOutput = string; // @public -export type OperationStateOutput = "NotStarted" | "Running" | "Succeeded" | "Failed" | "Canceled"; +export type OperationStateOutput = string; // @public export interface OperationStatusOutput { @@ -1352,40 +1355,82 @@ export interface OsDiskOutput { } // @public -export type OsType = "Windows" | string; +export type OsType = string; // @public -export type OsTypeOutput = "Windows" | string; +export type OsTypeOutput = string; // @public -export type PagedCatalogOutput = Paged; +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} // @public -export type PagedDevBoxActionDelayResultOutput = Paged; +export interface PagedCatalogOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedDevBoxActionOutput = Paged; +export interface PagedDevBoxActionDelayResultOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedDevBoxOutput = Paged; +export interface PagedDevBoxActionOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedEnvironmentDefinitionOutput = Paged; +export interface PagedDevBoxOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedEnvironmentOutput = Paged; +export interface PagedEnvironmentDefinitionOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedEnvironmentTypeOutput = Paged; +export interface PagedEnvironmentOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedPoolOutput = Paged; +export interface PagedEnvironmentTypeOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedProjectOutput = Paged; +export interface PagedPoolOutput { + nextLink?: string; + value: Array; +} + +// @public +export interface PagedProjectOutput { + nextLink?: string; + value: Array; +} // @public -export type PagedScheduleOutput = Paged; +export interface PagedScheduleOutput { + nextLink?: string; + value: Array; +} + +// @public +export interface PageSettings { + continuationToken?: string; +} // @public export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; @@ -1403,10 +1448,10 @@ export interface PagingOptions { } // @public -export type ParameterTypeOutput = "array" | "boolean" | "integer" | "number" | "object" | "string" | string; +export type ParameterTypeOutput = string; // @public -export type PoolHealthStatusOutput = "Unknown" | "Pending" | "Healthy" | "Warning" | "Unhealthy" | string; +export type PoolHealthStatusOutput = string; // @public export interface PoolOutput { @@ -1423,10 +1468,10 @@ export interface PoolOutput { } // @public -export type PowerState = "Unknown" | "Running" | "Deallocated" | "PoweredOff" | "Hibernated" | string; +export type PowerState = string; // @public -export type PowerStateOutput = "Unknown" | "Running" | "Deallocated" | "PoweredOff" | "Hibernated" | string; +export type PowerStateOutput = string; // @public export interface ProjectOutput { @@ -1521,10 +1566,10 @@ export interface Routes { } // @public -export type ScheduledFrequencyOutput = "Daily" | string; +export type ScheduledFrequencyOutput = string; // @public -export type ScheduledTypeOutput = "StopDevBox" | string; +export type ScheduledTypeOutput = string; // @public export interface ScheduleOutput { @@ -1587,10 +1632,10 @@ export interface SkipActionDefaultResponse extends HttpResponse { export type SkipActionParameters = RequestParameters; // @public -export type SkuName = "general_i_8c32gb256ssd_v2" | "general_i_8c32gb512ssd_v2" | "general_i_8c32gb1024ssd_v2" | "general_i_8c32gb2048ssd_v2" | "general_i_16c64gb256ssd_v2" | "general_i_16c64gb512ssd_v2" | "general_i_16c64gb1024ssd_v2" | "general_i_16c64gb2048ssd_v2" | "general_i_32c128gb512ssd_v2" | "general_i_32c128gb1024ssd_v2" | "general_i_32c128gb2048ssd_v2" | "general_a_8c32gb256ssd_v2" | "general_a_8c32gb512ssd_v2" | "general_a_8c32gb1024ssd_v2" | "general_a_8c32gb2048ssd_v2" | "general_a_16c64gb256ssd_v2" | "general_a_16c64gb512ssd_v2" | "general_a_16c64gb1024ssd_v2" | "general_a_16c64gb2048ssd_v2" | "general_a_32c128gb512ssd_v2" | "general_a_32c128gb1024ssd_v2" | "general_a_32c128gb2048ssd_v2" | string; +export type SkuName = string; // @public -export type SkuNameOutput = "general_i_8c32gb256ssd_v2" | "general_i_8c32gb512ssd_v2" | "general_i_8c32gb1024ssd_v2" | "general_i_8c32gb2048ssd_v2" | "general_i_16c64gb256ssd_v2" | "general_i_16c64gb512ssd_v2" | "general_i_16c64gb1024ssd_v2" | "general_i_16c64gb2048ssd_v2" | "general_i_32c128gb512ssd_v2" | "general_i_32c128gb1024ssd_v2" | "general_i_32c128gb2048ssd_v2" | "general_a_8c32gb256ssd_v2" | "general_a_8c32gb512ssd_v2" | "general_a_8c32gb1024ssd_v2" | "general_a_8c32gb2048ssd_v2" | "general_a_16c64gb256ssd_v2" | "general_a_16c64gb512ssd_v2" | "general_a_16c64gb1024ssd_v2" | "general_a_16c64gb2048ssd_v2" | "general_a_32c128gb512ssd_v2" | "general_a_32c128gb1024ssd_v2" | "general_a_32c128gb2048ssd_v2" | string; +export type SkuNameOutput = string; // @public (undocumented) export interface StartDevBox { @@ -1702,7 +1747,7 @@ export interface StopOnDisconnectConfigurationOutput { } // @public -export type StopOnDisconnectEnableStatusOutput = "Enabled" | "Disabled" | string; +export type StopOnDisconnectEnableStatusOutput = string; // @public export interface StorageProfile { diff --git a/sdk/devcenter/developer-devcenter-rest/sample.env b/sdk/devcenter/developer-devcenter-rest/sample.env index 8aac9140677e..508439fc7d62 100644 --- a/sdk/devcenter/developer-devcenter-rest/sample.env +++ b/sdk/devcenter/developer-devcenter-rest/sample.env @@ -1 +1 @@ -DEVCENTER_ENDPOINT= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/devcenter/developer-devcenter-rest/src/azureDeveloperDevCenter.ts b/sdk/devcenter/developer-devcenter-rest/src/azureDeveloperDevCenter.ts index 5cee288a02cf..7aaf406c643f 100644 --- a/sdk/devcenter/developer-devcenter-rest/src/azureDeveloperDevCenter.ts +++ b/sdk/devcenter/developer-devcenter-rest/src/azureDeveloperDevCenter.ts @@ -7,6 +7,12 @@ import { logger } from "./logger.js"; import type { TokenCredential } from "@azure/core-auth"; import type { AzureDeveloperDevCenterClient } from "./clientDefinitions.js"; +/** The optional parameters for the client */ +export interface AzureDeveloperDevCenterClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + /** * Initialize a new instance of `AzureDeveloperDevCenterClient` * @param endpointParam - The DevCenter-specific URI to operate on. @@ -16,11 +22,10 @@ import type { AzureDeveloperDevCenterClient } from "./clientDefinitions.js"; export default function createClient( endpointParam: string, credentials: TokenCredential, - options: ClientOptions = {}, + { apiVersion = "2023-04-01", ...options }: AzureDeveloperDevCenterClientOptions = {}, ): AzureDeveloperDevCenterClient { const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`; - options.apiVersion = options.apiVersion ?? "2023-04-01"; - const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.0`; + const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` @@ -37,8 +42,24 @@ export default function createClient( scopes: options.credentials?.scopes ?? ["https://devcenter.azure.com/.default"], }, }; - const client = getClient(endpointUrl, credentials, options) as AzureDeveloperDevCenterClient; + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + return client; } diff --git a/sdk/devcenter/developer-devcenter-rest/src/models.ts b/sdk/devcenter/developer-devcenter-rest/src/models.ts index 5cc3f6631828..6ec8cb1b34d2 100644 --- a/sdk/devcenter/developer-devcenter-rest/src/models.ts +++ b/sdk/devcenter/developer-devcenter-rest/src/models.ts @@ -20,7 +20,11 @@ export interface ImageReference {} export interface DevBox { /** The name of the Dev Box pool this machine belongs to. */ poolName: string; - /** Indicates whether the owner of the Dev Box is a local administrator. */ + /** + * Indicates whether the owner of the Dev Box is a local administrator. + * + * Possible values: "Enabled", "Disabled" + */ localAdministrator?: LocalAdminStatus; } @@ -37,72 +41,16 @@ export interface Environment { } /** Alias for OsType */ -export type OsType = "Windows" | string; +export type OsType = string; /** Alias for SkuName */ -export type SkuName = - | "general_i_8c32gb256ssd_v2" - | "general_i_8c32gb512ssd_v2" - | "general_i_8c32gb1024ssd_v2" - | "general_i_8c32gb2048ssd_v2" - | "general_i_16c64gb256ssd_v2" - | "general_i_16c64gb512ssd_v2" - | "general_i_16c64gb1024ssd_v2" - | "general_i_16c64gb2048ssd_v2" - | "general_i_32c128gb512ssd_v2" - | "general_i_32c128gb1024ssd_v2" - | "general_i_32c128gb2048ssd_v2" - | "general_a_8c32gb256ssd_v2" - | "general_a_8c32gb512ssd_v2" - | "general_a_8c32gb1024ssd_v2" - | "general_a_8c32gb2048ssd_v2" - | "general_a_16c64gb256ssd_v2" - | "general_a_16c64gb512ssd_v2" - | "general_a_16c64gb1024ssd_v2" - | "general_a_16c64gb2048ssd_v2" - | "general_a_32c128gb512ssd_v2" - | "general_a_32c128gb1024ssd_v2" - | "general_a_32c128gb2048ssd_v2" - | string; +export type SkuName = string; /** Alias for HibernateSupport */ -export type HibernateSupport = "Enabled" | "Disabled" | "OsUnsupported" | string; +export type HibernateSupport = string; /** Alias for LocalAdminStatus */ -export type LocalAdminStatus = "Enabled" | "Disabled" | string; +export type LocalAdminStatus = string; /** Alias for DevBoxProvisioningState */ -export type DevBoxProvisioningState = - | "Succeeded" - | "Failed" - | "Canceled" - | "Creating" - | "Deleting" - | "Updating" - | "Starting" - | "Stopping" - | "Provisioning" - | "ProvisionedWithWarning" - | "InGracePeriod" - | "NotProvisioned" - | string; +export type DevBoxProvisioningState = string; /** Alias for PowerState */ -export type PowerState = - | "Unknown" - | "Running" - | "Deallocated" - | "PoweredOff" - | "Hibernated" - | string; +export type PowerState = string; /** Alias for EnvironmentProvisioningState */ -export type EnvironmentProvisioningState = - | "Succeeded" - | "Failed" - | "Canceled" - | "Creating" - | "Accepted" - | "Deleting" - | "Updating" - | "Preparing" - | "Running" - | "Syncing" - | "MovingResources" - | "TransientFailure" - | "StorageProvisioningFailed" - | string; +export type EnvironmentProvisioningState = string; diff --git a/sdk/devcenter/developer-devcenter-rest/src/outputModels.ts b/sdk/devcenter/developer-devcenter-rest/src/outputModels.ts index 2ee29c1db672..bd8507e52a65 100644 --- a/sdk/devcenter/developer-devcenter-rest/src/outputModels.ts +++ b/sdk/devcenter/developer-devcenter-rest/src/outputModels.ts @@ -1,9 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Paged } from "@azure/core-paging"; import type { ErrorModel } from "@azure-rest/core-client"; +/** Paged collection of Project items */ +export interface PagedProjectOutput { + /** The Project items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** Project details. */ export interface ProjectOutput { /** Name of the project. */ @@ -23,13 +30,17 @@ export interface OperationStatusOutput { readonly id: string; /** The operation id name. */ readonly name: string; - /** Provisioning state of the resource. */ + /** + * Provisioning state of the resource. + * + * Possible values: "NotStarted", "Running", "Succeeded", "Failed", "Canceled" + */ status: OperationStateOutput; /** The id of the resource. */ resourceId?: string; - /** The start time of the operation. */ + /** The start time of the operation, in RFC3339 format. */ startTime?: string; - /** The end time of the operation. */ + /** The end time of the operation, in RFC3339 format. */ endTime?: string; /** Percent of the operation that is complete. */ percentComplete?: number; @@ -39,17 +50,33 @@ export interface OperationStatusOutput { error?: ErrorModel; } +/** Paged collection of Pool items */ +export interface PagedPoolOutput { + /** The Pool items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** A pool of Dev Boxes. */ export interface PoolOutput { /** Pool name. */ readonly name: string; /** Azure region where Dev Boxes in the pool are located. */ location: string; - /** The operating system type of Dev Boxes in this pool. */ + /** + * The operating system type of Dev Boxes in this pool. + * + * Possible values: "Windows" + */ osType?: OsTypeOutput; /** Hardware settings for the Dev Boxes created in this pool. */ hardwareProfile?: HardwareProfileOutput; - /** Indicates whether hibernate is enabled/disabled or unknown. */ + /** + * Indicates whether hibernate is enabled/disabled or unknown. + * + * Possible values: "Enabled", "Disabled", "OsUnsupported" + */ hibernateSupport?: HibernateSupportOutput; /** Storage settings for Dev Box created in this pool. */ storageProfile?: StorageProfileOutput; @@ -58,6 +85,8 @@ export interface PoolOutput { /** * Indicates whether owners of Dev Boxes in this pool are local administrators on * the Dev Boxes. + * + * Possible values: "Enabled", "Disabled" */ localAdministrator?: LocalAdminStatusOutput; /** Stop on disconnect configuration settings for Dev Boxes created in this pool. */ @@ -65,13 +94,19 @@ export interface PoolOutput { /** * Overall health status of the Pool. Indicates whether or not the Pool is * available to create Dev Boxes. + * + * Possible values: "Unknown", "Pending", "Healthy", "Warning", "Unhealthy" */ healthStatus: PoolHealthStatusOutput; } /** Hardware specifications for the Dev Box. */ export interface HardwareProfileOutput { - /** The name of the SKU. */ + /** + * The name of the SKU. + * + * Possible values: "general_i_8c32gb256ssd_v2", "general_i_8c32gb512ssd_v2", "general_i_8c32gb1024ssd_v2", "general_i_8c32gb2048ssd_v2", "general_i_16c64gb256ssd_v2", "general_i_16c64gb512ssd_v2", "general_i_16c64gb1024ssd_v2", "general_i_16c64gb2048ssd_v2", "general_i_32c128gb512ssd_v2", "general_i_32c128gb1024ssd_v2", "general_i_32c128gb2048ssd_v2", "general_a_8c32gb256ssd_v2", "general_a_8c32gb512ssd_v2", "general_a_8c32gb1024ssd_v2", "general_a_8c32gb2048ssd_v2", "general_a_16c64gb256ssd_v2", "general_a_16c64gb512ssd_v2", "general_a_16c64gb1024ssd_v2", "general_a_16c64gb2048ssd_v2", "general_a_32c128gb512ssd_v2", "general_a_32c128gb1024ssd_v2", "general_a_32c128gb2048ssd_v2" + */ readonly skuName?: SkuNameOutput; /** The number of vCPUs available for the Dev Box. */ readonly vCPUs?: number; @@ -101,7 +136,7 @@ export interface ImageReferenceOutput { readonly operatingSystem?: string; /** The operating system build number of the image. */ readonly osBuildNumber?: string; - /** The datetime that the backing image version was published. */ + /** The datetime that the backing image version was published, in RFC3339 format. */ readonly publishedDate?: string; } @@ -110,6 +145,8 @@ export interface StopOnDisconnectConfigurationOutput { /** * Indicates whether the feature to stop the devbox on disconnect once the grace * period has lapsed is enabled. + * + * Possible values: "Enabled", "Disabled" */ status: StopOnDisconnectEnableStatusOutput; /** @@ -119,6 +156,14 @@ export interface StopOnDisconnectConfigurationOutput { gracePeriodMinutes?: number; } +/** Paged collection of DevBox items */ +export interface PagedDevBoxOutput { + /** The DevBox items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** A Dev Box. */ export interface DevBoxOutput { /** Display name for the Dev Box. */ @@ -127,16 +172,28 @@ export interface DevBoxOutput { readonly projectName?: string; /** The name of the Dev Box pool this machine belongs to. */ poolName: string; - /** Indicates whether hibernate is enabled/disabled or unknown. */ + /** + * Indicates whether hibernate is enabled/disabled or unknown. + * + * Possible values: "Enabled", "Disabled", "OsUnsupported" + */ readonly hibernateSupport?: HibernateSupportOutput; - /** The current provisioning state of the Dev Box. */ + /** + * The current provisioning state of the Dev Box. + * + * Possible values: "Succeeded", "Failed", "Canceled", "Creating", "Deleting", "Updating", "Starting", "Stopping", "Provisioning", "ProvisionedWithWarning", "InGracePeriod", "NotProvisioned" + */ readonly provisioningState?: DevBoxProvisioningStateOutput; /** * The current action state of the Dev Box. This is state is based on previous * action performed by user. */ readonly actionState?: string; - /** The current power state of the Dev Box. */ + /** + * The current power state of the Dev Box. + * + * Possible values: "Unknown", "Running", "Deallocated", "PoweredOff", "Hibernated" + */ readonly powerState?: PowerStateOutput; /** * A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. @@ -150,7 +207,11 @@ export interface DevBoxOutput { * Virtual Network it is attached to. */ readonly location?: string; - /** The operating system type of this Dev Box. */ + /** + * The operating system type of this Dev Box. + * + * Possible values: "Windows" + */ readonly osType?: OsTypeOutput; /** The AAD object id of the user this Dev Box is assigned to. */ readonly user?: string; @@ -160,19 +221,39 @@ export interface DevBoxOutput { readonly storageProfile?: StorageProfileOutput; /** Information about the image used for this Dev Box. */ readonly imageReference?: ImageReferenceOutput; - /** Creation time of this Dev Box. */ + /** Creation time of this Dev Box, in RFC3339 format. */ readonly createdTime?: string; - /** Indicates whether the owner of the Dev Box is a local administrator. */ + /** + * Indicates whether the owner of the Dev Box is a local administrator. + * + * Possible values: "Enabled", "Disabled" + */ localAdministrator?: LocalAdminStatusOutput; } +/** Paged collection of Schedule items */ +export interface PagedScheduleOutput { + /** The Schedule items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** A Schedule to execute action. */ export interface ScheduleOutput { /** Display name for the Schedule. */ readonly name: string; - /** Supported type this scheduled task represents. */ + /** + * Supported type this scheduled task represents. + * + * Possible values: "StopDevBox" + */ type: ScheduledTypeOutput; - /** The frequency of this scheduled task. */ + /** + * The frequency of this scheduled task. + * + * Possible values: "Daily" + */ frequency: ScheduledFrequencyOutput; /** The target time to trigger the action. The format is HH:MM. */ time: string; @@ -188,15 +269,27 @@ export interface RemoteConnectionOutput { rdpConnectionUrl?: string; } +/** Paged collection of DevBoxAction items */ +export interface PagedDevBoxActionOutput { + /** The DevBoxAction items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** An action which will take place on a Dev Box. */ export interface DevBoxActionOutput { /** The name of the action. */ readonly name: string; - /** The action that will be taken. */ + /** + * The action that will be taken. + * + * Possible values: "Stop" + */ actionType: DevBoxActionTypeOutput; /** The id of the resource which triggered this action. */ sourceId: string; - /** The earliest time that the action could occur (UTC). */ + /** The earliest time that the action could occur (UTC), in RFC3339 format. */ suspendedUntil?: string; /** Details about the next run of this action. */ next?: DevBoxNextActionOutput; @@ -204,15 +297,27 @@ export interface DevBoxActionOutput { /** Details about the next run of an action. */ export interface DevBoxNextActionOutput { - /** The time the action will be triggered (UTC). */ + /** The time the action will be triggered (UTC), in RFC3339 format. */ scheduledTime: string; } +/** Paged collection of DevBoxActionDelayResult items */ +export interface PagedDevBoxActionDelayResultOutput { + /** The DevBoxActionDelayResult items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** The action delay result. */ export interface DevBoxActionDelayResultOutput { /** The name of the action. */ name: string; - /** The result of the delay operation on this action. */ + /** + * The result of the delay operation on this action. + * + * Possible values: "Succeeded", "Failed" + */ result: DevBoxActionDelayResultStatusOutput; /** The delayed action. */ action?: DevBoxActionOutput; @@ -220,6 +325,14 @@ export interface DevBoxActionDelayResultOutput { error?: ErrorModel; } +/** Paged collection of Environment items */ +export interface PagedEnvironmentOutput { + /** The Environment items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** Properties of an environment. */ export interface EnvironmentOutput { /** Parameters object for the environment. */ @@ -230,7 +343,11 @@ export interface EnvironmentOutput { environmentType: string; /** The AAD object id of the owner of this Environment. */ readonly user?: string; - /** The provisioning state of the environment. */ + /** + * The provisioning state of the environment. + * + * Possible values: "Succeeded", "Failed", "Canceled", "Creating", "Accepted", "Deleting", "Updating", "Preparing", "Running", "Syncing", "MovingResources", "TransientFailure", "StorageProvisioningFailed" + */ readonly provisioningState?: EnvironmentProvisioningStateOutput; /** The identifier of the resource group containing the environment's resources. */ readonly resourceGroupId?: string; @@ -242,12 +359,28 @@ export interface EnvironmentOutput { readonly error?: ErrorModel; } +/** Paged collection of Catalog items */ +export interface PagedCatalogOutput { + /** The Catalog items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** A catalog. */ export interface CatalogOutput { /** Name of the catalog. */ readonly name: string; } +/** Paged collection of EnvironmentDefinition items */ +export interface PagedEnvironmentDefinitionOutput { + /** The EnvironmentDefinition items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** An environment definition. */ export interface EnvironmentDefinitionOutput { /** The ID of the environment definition. */ @@ -279,6 +412,8 @@ export interface EnvironmentDefinitionParameterOutput { /** * A string of one of the basic JSON types (number, integer, array, object, * boolean, string). + * + * Possible values: "array", "boolean", "integer", "number", "object", "string" */ type: ParameterTypeOutput; /** @@ -292,6 +427,14 @@ export interface EnvironmentDefinitionParameterOutput { allowed?: string[]; } +/** Paged collection of EnvironmentType items */ +export interface PagedEnvironmentTypeOutput { + /** The EnvironmentType items on this page */ + value: Array; + /** The link to the next page of items */ + nextLink?: string; +} + /** Properties of an environment type. */ export interface EnvironmentTypeOutput { /** Name of the environment type. */ @@ -302,128 +445,43 @@ export interface EnvironmentTypeOutput { * or management group. */ deploymentTargetId: string; - /** Indicates whether this environment type is enabled for use in this project. */ + /** + * Indicates whether this environment type is enabled for use in this project. + * + * Possible values: "Enabled", "Disabled" + */ status: EnvironmentTypeEnableStatusOutput; } -/** Paged collection of Project items */ -export type PagedProjectOutput = Paged; -/** Enum describing allowed operation states. */ -export type OperationStateOutput = "NotStarted" | "Running" | "Succeeded" | "Failed" | "Canceled"; -/** Paged collection of Pool items */ -export type PagedPoolOutput = Paged; +/** Alias for OperationStateOutput */ +export type OperationStateOutput = string; /** Alias for OsTypeOutput */ -export type OsTypeOutput = "Windows" | string; +export type OsTypeOutput = string; /** Alias for SkuNameOutput */ -export type SkuNameOutput = - | "general_i_8c32gb256ssd_v2" - | "general_i_8c32gb512ssd_v2" - | "general_i_8c32gb1024ssd_v2" - | "general_i_8c32gb2048ssd_v2" - | "general_i_16c64gb256ssd_v2" - | "general_i_16c64gb512ssd_v2" - | "general_i_16c64gb1024ssd_v2" - | "general_i_16c64gb2048ssd_v2" - | "general_i_32c128gb512ssd_v2" - | "general_i_32c128gb1024ssd_v2" - | "general_i_32c128gb2048ssd_v2" - | "general_a_8c32gb256ssd_v2" - | "general_a_8c32gb512ssd_v2" - | "general_a_8c32gb1024ssd_v2" - | "general_a_8c32gb2048ssd_v2" - | "general_a_16c64gb256ssd_v2" - | "general_a_16c64gb512ssd_v2" - | "general_a_16c64gb1024ssd_v2" - | "general_a_16c64gb2048ssd_v2" - | "general_a_32c128gb512ssd_v2" - | "general_a_32c128gb1024ssd_v2" - | "general_a_32c128gb2048ssd_v2" - | string; +export type SkuNameOutput = string; /** Alias for HibernateSupportOutput */ -export type HibernateSupportOutput = "Enabled" | "Disabled" | "OsUnsupported" | string; +export type HibernateSupportOutput = string; /** Alias for LocalAdminStatusOutput */ -export type LocalAdminStatusOutput = "Enabled" | "Disabled" | string; +export type LocalAdminStatusOutput = string; /** Alias for StopOnDisconnectEnableStatusOutput */ -export type StopOnDisconnectEnableStatusOutput = "Enabled" | "Disabled" | string; +export type StopOnDisconnectEnableStatusOutput = string; /** Alias for PoolHealthStatusOutput */ -export type PoolHealthStatusOutput = - | "Unknown" - | "Pending" - | "Healthy" - | "Warning" - | "Unhealthy" - | string; -/** Paged collection of DevBox items */ -export type PagedDevBoxOutput = Paged; +export type PoolHealthStatusOutput = string; /** Alias for DevBoxProvisioningStateOutput */ -export type DevBoxProvisioningStateOutput = - | "Succeeded" - | "Failed" - | "Canceled" - | "Creating" - | "Deleting" - | "Updating" - | "Starting" - | "Stopping" - | "Provisioning" - | "ProvisionedWithWarning" - | "InGracePeriod" - | "NotProvisioned" - | string; +export type DevBoxProvisioningStateOutput = string; /** Alias for PowerStateOutput */ -export type PowerStateOutput = - | "Unknown" - | "Running" - | "Deallocated" - | "PoweredOff" - | "Hibernated" - | string; -/** Paged collection of Schedule items */ -export type PagedScheduleOutput = Paged; +export type PowerStateOutput = string; /** Alias for ScheduledTypeOutput */ -export type ScheduledTypeOutput = "StopDevBox" | string; +export type ScheduledTypeOutput = string; /** Alias for ScheduledFrequencyOutput */ -export type ScheduledFrequencyOutput = "Daily" | string; -/** Paged collection of DevBoxAction items */ -export type PagedDevBoxActionOutput = Paged; +export type ScheduledFrequencyOutput = string; /** Alias for DevBoxActionTypeOutput */ -export type DevBoxActionTypeOutput = "Stop" | string; -/** Paged collection of DevBoxActionDelayResult items */ -export type PagedDevBoxActionDelayResultOutput = Paged; +export type DevBoxActionTypeOutput = string; /** Alias for DevBoxActionDelayResultStatusOutput */ -export type DevBoxActionDelayResultStatusOutput = "Succeeded" | "Failed" | string; -/** Paged collection of Environment items */ -export type PagedEnvironmentOutput = Paged; +export type DevBoxActionDelayResultStatusOutput = string; /** Alias for EnvironmentProvisioningStateOutput */ -export type EnvironmentProvisioningStateOutput = - | "Succeeded" - | "Failed" - | "Canceled" - | "Creating" - | "Accepted" - | "Deleting" - | "Updating" - | "Preparing" - | "Running" - | "Syncing" - | "MovingResources" - | "TransientFailure" - | "StorageProvisioningFailed" - | string; -/** Paged collection of Catalog items */ -export type PagedCatalogOutput = Paged; -/** Paged collection of EnvironmentDefinition items */ -export type PagedEnvironmentDefinitionOutput = Paged; +export type EnvironmentProvisioningStateOutput = string; /** Alias for ParameterTypeOutput */ -export type ParameterTypeOutput = - | "array" - | "boolean" - | "integer" - | "number" - | "object" - | "string" - | string; -/** Paged collection of EnvironmentType items */ -export type PagedEnvironmentTypeOutput = Paged; +export type ParameterTypeOutput = string; /** Alias for EnvironmentTypeEnableStatusOutput */ -export type EnvironmentTypeEnableStatusOutput = "Enabled" | "Disabled" | string; +export type EnvironmentTypeEnableStatusOutput = string; diff --git a/sdk/devcenter/developer-devcenter-rest/src/paginateHelper.ts b/sdk/devcenter/developer-devcenter-rest/src/paginateHelper.ts index 5d541b4e406d..9ea946d9d6c5 100644 --- a/sdk/devcenter/developer-devcenter-rest/src/paginateHelper.ts +++ b/sdk/devcenter/developer-devcenter-rest/src/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/devcenter/developer-devcenter-rest/src/parameters.ts b/sdk/devcenter/developer-devcenter-rest/src/parameters.ts index 4a119290acb1..38510c3ffbdf 100644 --- a/sdk/devcenter/developer-devcenter-rest/src/parameters.ts +++ b/sdk/devcenter/developer-devcenter-rest/src/parameters.ts @@ -42,7 +42,7 @@ export type GetActionParameters = RequestParameters; export type SkipActionParameters = RequestParameters; export interface DelayActionQueryParamProperties { - /** The time to delay the Dev Box action or actions until. */ + /** The time to delay the Dev Box action or actions until, in RFC3339 format. */ until: Date | string; } @@ -53,7 +53,7 @@ export interface DelayActionQueryParam { export type DelayActionParameters = DelayActionQueryParam & RequestParameters; export interface DelayActionsQueryParamProperties { - /** The time to delay the Dev Box action or actions until. */ + /** The time to delay the Dev Box action or actions until, in RFC3339 format. */ until: Date | string; } diff --git a/sdk/devcenter/developer-devcenter-rest/test/public/utils/env.browser.ts b/sdk/devcenter/developer-devcenter-rest/test/public/utils/env.browser.ts deleted file mode 100644 index fc36ab244fad..000000000000 --- a/sdk/devcenter/developer-devcenter-rest/test/public/utils/env.browser.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. diff --git a/sdk/devcenter/developer-devcenter-rest/test/public/utils/env.ts b/sdk/devcenter/developer-devcenter-rest/test/public/utils/env.ts deleted file mode 100644 index 866412f4082d..000000000000 --- a/sdk/devcenter/developer-devcenter-rest/test/public/utils/env.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import * as dotenv from "dotenv"; - -dotenv.config(); diff --git a/sdk/devcenter/developer-devcenter-rest/test/public/utils/recordedClient.ts b/sdk/devcenter/developer-devcenter-rest/test/public/utils/recordedClient.ts index b7b4220b4e91..0f53a50a03c1 100644 --- a/sdk/devcenter/developer-devcenter-rest/test/public/utils/recordedClient.ts +++ b/sdk/devcenter/developer-devcenter-rest/test/public/utils/recordedClient.ts @@ -4,7 +4,6 @@ import { type TaskContext } from "vitest"; import type { RecorderStartOptions } from "@azure-tools/test-recorder"; import { isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; -import "./env"; import type { AzureDeveloperDevCenterClient } from "../../../src/clientDefinitions.js"; import type { ClientOptions } from "@azure-rest/core-client"; import { AzurePowerShellCredential } from "@azure/identity"; diff --git a/sdk/devcenter/developer-devcenter-rest/tsconfig.json b/sdk/devcenter/developer-devcenter-rest/tsconfig.json index 273d9078a24a..19ceb382b521 100644 --- a/sdk/devcenter/developer-devcenter-rest/tsconfig.json +++ b/sdk/devcenter/developer-devcenter-rest/tsconfig.json @@ -1,7 +1,13 @@ { "references": [ - { "path": "./tsconfig.src.json" }, - { "path": "./tsconfig.samples.json" }, - { "path": "./tsconfig.test.json" } + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" + } ] } diff --git a/sdk/devcenter/developer-devcenter-rest/tsp-location.yaml b/sdk/devcenter/developer-devcenter-rest/tsp-location.yaml index 51144d95c5c6..beffe9b98218 100644 --- a/sdk/devcenter/developer-devcenter-rest/tsp-location.yaml +++ b/sdk/devcenter/developer-devcenter-rest/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/devcenter/DevCenter commit: 3dbffd014194b1985f6498b259fe8d91461c898c -repo: Azure/azure-rest-api-specs \ No newline at end of file +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/devcenter/developer-devcenter-rest/vitest.browser.config.ts b/sdk/devcenter/developer-devcenter-rest/vitest.browser.config.ts index 3be6992329dc..da68c1d231aa 100644 --- a/sdk/devcenter/developer-devcenter-rest/vitest.browser.config.ts +++ b/sdk/devcenter/developer-devcenter-rest/vitest.browser.config.ts @@ -2,6 +2,9 @@ // Licensed under the MIT License. import { defineConfig } from "vitest/config"; +import { relativeRecordingsPath } from "@azure-tools/test-recorder"; + +process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); export default defineConfig({ define: { @@ -29,5 +32,7 @@ export default defineConfig({ reporter: ["text", "json", "html"], reportsDirectory: "coverage-browser", }, + testTimeout: 1200000, + hookTimeout: 1200000, }, }); diff --git a/sdk/devcenter/developer-devcenter-rest/vitest.config.ts b/sdk/devcenter/developer-devcenter-rest/vitest.config.ts index 0dfa15cc4498..2cf5d0e02c2e 100644 --- a/sdk/devcenter/developer-devcenter-rest/vitest.config.ts +++ b/sdk/devcenter/developer-devcenter-rest/vitest.config.ts @@ -1,6 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import viteConfig from "../../../vitest.shared.config.ts"; +import { defineConfig } from "vitest/config"; +import { relativeRecordingsPath } from "@azure-tools/test-recorder"; -export default viteConfig; +export default defineConfig({ + test: { + reporters: ["basic", "junit"], + outputFile: { + junit: "test-results.browser.xml", + }, + fakeTimers: { + toFake: ["setTimeout", "Date"], + }, + watch: false, + include: ["test/**/*.spec.ts"], + exclude: ["test/**/browser/*.spec.ts"], + coverage: { + include: ["src/**/*.ts"], + exclude: [ + "src/**/*-browser.mts", + "src/**/*-react-native.mts", + "vitest*.config.ts", + "samples-dev/**/*.ts", + ], + provider: "istanbul", + reporter: ["text", "json", "html"], + reportsDirectory: "coverage", + }, + testTimeout: 1200000, + hookTimeout: 1200000, + }, +}); From 6c6d444dadcbd04bdb6fb6a9bfcc0724b459a39c Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:21:14 +0800 Subject: [PATCH 30/55] [data-plane] refresh ai-document-translator-rest sdk (#30967) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- eng/ignore-links.txt | 1 + .../ai-document-translator-rest/CHANGELOG.md | 4 +- .../eslint.config.mjs | 9 + .../ai-document-translator-rest/package.json | 3 + .../review/ai-document-translator.api.md | 705 ++++++++++-------- .../samples-dev/translateFromBlob.ts | 2 +- .../samples/v1-beta/javascript/README.md | 66 ++ .../samples/v1-beta/javascript/listFormats.js | 35 + .../samples/v1-beta/javascript/package.json | 32 + .../samples/v1-beta/javascript/sample.env | 7 + .../v1-beta/javascript/translateFromBlob.js | 124 +++ .../samples/v1-beta/typescript/README.md | 79 ++ .../samples/v1-beta/typescript/package.json | 41 + .../samples/v1-beta/typescript/sample.env | 7 + .../v1-beta/typescript/src/listFormats.ts | 34 + .../typescript/src/translateFromBlob.ts | 123 +++ .../samples/v1-beta/typescript/tsconfig.json | 17 + .../src/clientDefinitions.ts | 272 +++++++ .../src/constants.ts | 7 - .../src/documentTranslator.ts | 321 +------- .../ai-document-translator-rest/src/index.ts | 15 +- .../src/isUnexpected.ts | 310 ++++++++ .../ai-document-translator-rest/src/logger.ts | 5 + .../ai-document-translator-rest/src/models.ts | 170 +---- .../src/outputModels.ts | 177 +++++ .../src/paginateHelper.ts | 267 +++++++ .../src/parameters.ts | 67 +- .../src/pollingHelper.ts | 194 +++++ .../src/responses.ts | 288 +++---- .../swagger/README.md | 9 +- 30 files changed, 2451 insertions(+), 940 deletions(-) create mode 100644 sdk/documenttranslator/ai-document-translator-rest/eslint.config.mjs create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/README.md create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/listFormats.js create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/package.json create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/sample.env create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/translateFromBlob.js create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/README.md create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/package.json create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/sample.env create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/listFormats.ts create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/translateFromBlob.ts create mode 100644 sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/tsconfig.json create mode 100644 sdk/documenttranslator/ai-document-translator-rest/src/clientDefinitions.ts delete mode 100644 sdk/documenttranslator/ai-document-translator-rest/src/constants.ts create mode 100644 sdk/documenttranslator/ai-document-translator-rest/src/isUnexpected.ts create mode 100644 sdk/documenttranslator/ai-document-translator-rest/src/logger.ts create mode 100644 sdk/documenttranslator/ai-document-translator-rest/src/outputModels.ts create mode 100644 sdk/documenttranslator/ai-document-translator-rest/src/paginateHelper.ts create mode 100644 sdk/documenttranslator/ai-document-translator-rest/src/pollingHelper.ts diff --git a/eng/ignore-links.txt b/eng/ignore-links.txt index 819f5052a312..5c95d9162703 100644 --- a/eng/ignore-links.txt +++ b/eng/ignore-links.txt @@ -8,6 +8,7 @@ https://docs.microsoft.com/javascript/api/@azure/arm-computefleet?view=azure-nod https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md https://docs.microsoft.com/javascript/api/@azure/arm-computeschedule?view=azure-node-preview https://docs.microsoft.com/javascript/api/@azure/arm-healthdataaiservices?view=azure-node-preview +https://docs.microsoft.com/javascript/api/@azure/ai-document-translator https://docs.microsoft.com/javascript/api/@azure/arm-fabric?view=azure-node-preview https://docs.microsoft.com/javascript/api/@azure/arm-trustedsigning?view=azure-node-preview https://docs.microsoft.com/javascript/api/@azure/arm-containerorchestratorruntime?view=azure-node-preview diff --git a/sdk/documenttranslator/ai-document-translator-rest/CHANGELOG.md b/sdk/documenttranslator/ai-document-translator-rest/CHANGELOG.md index 561e625930b3..344f09204027 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/CHANGELOG.md +++ b/sdk/documenttranslator/ai-document-translator-rest/CHANGELOG.md @@ -1,7 +1,9 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2024-12-16) +### Features Added +- refresh @azure-rest/ai-document-translator sdk ## 1.0.0-beta.1 (2021-04-22) diff --git a/sdk/documenttranslator/ai-document-translator-rest/eslint.config.mjs b/sdk/documenttranslator/ai-document-translator-rest/eslint.config.mjs new file mode 100644 index 000000000000..b57e15e8e044 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/eslint.config.mjs @@ -0,0 +1,9 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + }, + }, +]); diff --git a/sdk/documenttranslator/ai-document-translator-rest/package.json b/sdk/documenttranslator/ai-document-translator-rest/package.json index a3005c879571..aeb94be99275 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/package.json +++ b/sdk/documenttranslator/ai-document-translator-rest/package.json @@ -82,6 +82,9 @@ "sideEffects": false, "autoPublish": false, "dependencies": { + "@azure-tools/test-recorder": "^3.0.0", + "@azure/core-lro": "^3.0.0", + "@azure/abort-controller": "^2.1.2", "@azure-rest/core-client": "^2.3.1", "@azure/core-auth": "^1.9.0", "@azure/core-rest-pipeline": "^1.18.0", diff --git a/sdk/documenttranslator/ai-document-translator-rest/review/ai-document-translator.api.md b/sdk/documenttranslator/ai-document-translator-rest/review/ai-document-translator.api.md index d6e761ff1da9..116f22e87005 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/review/ai-document-translator.api.md +++ b/sdk/documenttranslator/ai-document-translator-rest/review/ai-document-translator.api.md @@ -4,738 +4,823 @@ ```ts +import type { AbortSignalLike } from '@azure/abort-controller'; +import type { CancelOnProgress } from '@azure/core-lro'; import type { Client } from '@azure-rest/core-client'; import type { ClientOptions } from '@azure-rest/core-client'; +import type { CreateHttpPollerOptions } from '@azure/core-lro'; import type { HttpResponse } from '@azure-rest/core-client'; import type { KeyCredential } from '@azure/core-auth'; +import type { OperationState } from '@azure/core-lro'; +import type { PathUncheckedResponse } from '@azure-rest/core-client'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RequestParameters } from '@azure-rest/core-client'; -import type { TokenCredential } from '@azure/core-auth'; +import type { StreamableMethod } from '@azure-rest/core-client'; -// @public (undocumented) +// @public export interface BatchRequest { source: SourceInput; - storageType?: StorageInputType; - targets: TargetInput[]; + storageType?: "Folder" | "File"; + targets: Array; } +// @public +function createClient(endpoint: string, credentials: KeyCredential, options?: DocumentTranslatorClientOptions): DocumentTranslatorClient; +export default createClient; + // @public (undocumented) -export interface CancelTranslation { - delete(options?: CancelTranslationParameters): Promise; - get(options?: GetTranslationStatusParameters): Promise; +export interface DocumentFilter { + prefix?: string; + suffix?: string; +} + +// @public +export interface DocumentsStatusOutput { + "@nextLink"?: string; + value: Array; +} + +// @public +export interface DocumentStatusOutput { + characterCharged?: number; + createdDateTimeUtc: string; + error?: TranslationErrorOutput; + id: string; + lastActionDateTimeUtc: string; + path?: string; + progress: number; + sourcePath: string; + status: "NotStarted" | "Running" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "ValidationFailed"; + to: string; } // @public -export interface CancelTranslation200Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation200Response extends HttpResponse { // (undocumented) - body: TranslationStatus; + body: TranslationStatusOutput; // (undocumented) status: "200"; } // @public -export interface CancelTranslation401Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation401Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "401"; } // @public -export interface CancelTranslation404Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation404Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "404"; } // @public -export interface CancelTranslation429Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation429Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "429"; } // @public -export interface CancelTranslation500Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation500Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "500"; } // @public -export interface CancelTranslation503Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation503Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "503"; } // @public (undocumented) -export type CancelTranslationParameters = RequestParameters; +export type DocumentTranslationCancelTranslationParameters = RequestParameters; // @public (undocumented) -export interface DocumentFilter { - prefix?: string; - suffix?: string; -} - -// @public (undocumented) -export interface DocumentsStatus { - nextLink?: string; - value: DocumentStatus[]; -} - -// @public (undocumented) -export interface DocumentStatus { - characterCharged?: number; - createdDateTimeUtc: Date; - error?: TranslationError; - id: string; - lastActionDateTimeUtc: Date; - path?: string; - progress: number; - sourcePath: string; - status: Status; - to: string; -} - -// @public (undocumented) -function DocumentTranslator(endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): DocumentTranslatorClient; -export default DocumentTranslator; - -// @public (undocumented) -export type DocumentTranslatorClient = Client & { - path: Routes; -}; - -// @public (undocumented) -export interface DocumentTranslatorFactory { - // (undocumented) - (endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): void; -} - -// @public (undocumented) -export interface FileFormat { - contentTypes: string[]; - defaultVersion?: string; - fileExtensions: string[]; - format: string; - versions?: string[]; -} - -// @public (undocumented) -export interface GetDocumentsStatus { - get(options?: GetDocumentsStatusParameters): Promise; -} - -// @public (undocumented) -export interface GetDocumentsStatus200Headers { - "retry-after"?: string; +export interface DocumentTranslationGetDocumentsStatus200Headers { + "retry-after"?: number; etag?: string; } // @public -export interface GetDocumentsStatus200Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus200Response extends HttpResponse { // (undocumented) - body: DocumentsStatus; + body: DocumentsStatusOutput; // (undocumented) - headers: RawHttpHeaders & GetDocumentsStatus200Headers; + headers: RawHttpHeaders & DocumentTranslationGetDocumentsStatus200Headers; // (undocumented) status: "200"; } // @public -export interface GetDocumentsStatus400Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus400Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "400"; } // @public -export interface GetDocumentsStatus401Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus401Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "401"; } // @public -export interface GetDocumentsStatus404Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus404Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "404"; } // @public -export interface GetDocumentsStatus429Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus429Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "429"; } // @public -export interface GetDocumentsStatus500Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus500Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "500"; } // @public -export interface GetDocumentsStatus503Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus503Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "503"; } // @public (undocumented) -export type GetDocumentsStatusParameters = RequestParameters & GetDocumentsStatusQueryParam; +export type DocumentTranslationGetDocumentsStatusParameters = DocumentTranslationGetDocumentsStatusQueryParam & RequestParameters; // @public (undocumented) -export interface GetDocumentsStatusQueryParam { +export interface DocumentTranslationGetDocumentsStatusQueryParam { // (undocumented) - queryParameters?: GetDocumentsStatusQueryParamProperties; + queryParameters?: DocumentTranslationGetDocumentsStatusQueryParamProperties; } // @public (undocumented) -export interface GetDocumentsStatusQueryParamProperties { +export interface DocumentTranslationGetDocumentsStatusQueryParamProperties { $maxpagesize?: number; - $orderBy?: string[]; + $orderBy?: Array; $skip?: number; $top?: number; - createdDateTimeUtcEnd?: Date; - createdDateTimeUtcStart?: Date; - ids?: string[]; - statuses?: string[]; + createdDateTimeUtcEnd?: Date | string; + createdDateTimeUtcStart?: Date | string; + ids?: Array; + statuses?: Array; } // @public (undocumented) -export interface GetDocumentStatus { - get(options?: GetDocumentStatusParameters): Promise; -} - -// @public (undocumented) -export interface GetDocumentStatus200Headers { - "retry-after"?: string; +export interface DocumentTranslationGetDocumentStatus200Headers { + "retry-after"?: number; etag?: string; } // @public -export interface GetDocumentStatus200Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus200Response extends HttpResponse { // (undocumented) - body: DocumentStatus; + body: DocumentStatusOutput; // (undocumented) - headers: RawHttpHeaders & GetDocumentStatus200Headers; + headers: RawHttpHeaders & DocumentTranslationGetDocumentStatus200Headers; // (undocumented) status: "200"; } // @public -export interface GetDocumentStatus401Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus401Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "401"; } // @public -export interface GetDocumentStatus404Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus404Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "404"; } // @public -export interface GetDocumentStatus429Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus429Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "429"; } // @public -export interface GetDocumentStatus500Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus500Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "500"; } // @public -export interface GetDocumentStatus503Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus503Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "503"; } // @public (undocumented) -export type GetDocumentStatusParameters = RequestParameters; - -// @public (undocumented) -export interface GetSupportedDocumentFormats { - get(options?: GetSupportedDocumentFormatsParameters): Promise; -} +export type DocumentTranslationGetDocumentStatusParameters = RequestParameters; // @public (undocumented) -export interface GetSupportedDocumentFormats200Headers { - "retry-after"?: string; +export interface DocumentTranslationGetSupportedDocumentFormats200Headers { + "retry-after"?: number; } // @public -export interface GetSupportedDocumentFormats200Response extends HttpResponse { +export interface DocumentTranslationGetSupportedDocumentFormats200Response extends HttpResponse { // (undocumented) - body: SupportedFileFormats; + body: SupportedFileFormatsOutput; // (undocumented) - headers: RawHttpHeaders & GetSupportedDocumentFormats200Headers; + headers: RawHttpHeaders & DocumentTranslationGetSupportedDocumentFormats200Headers; // (undocumented) status: "200"; } // @public -export interface GetSupportedDocumentFormats429Response extends HttpResponse { +export interface DocumentTranslationGetSupportedDocumentFormats429Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "429"; } // @public -export interface GetSupportedDocumentFormats500Response extends HttpResponse { +export interface DocumentTranslationGetSupportedDocumentFormats500Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "500"; } // @public -export interface GetSupportedDocumentFormats503Response extends HttpResponse { +export interface DocumentTranslationGetSupportedDocumentFormats503Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "503"; } // @public (undocumented) -export type GetSupportedDocumentFormatsParameters = RequestParameters; +export type DocumentTranslationGetSupportedDocumentFormatsParameters = RequestParameters; // @public (undocumented) -export interface GetSupportedGlossaryFormats { - get(options?: GetSupportedGlossaryFormatsParameters): Promise; -} - -// @public (undocumented) -export interface GetSupportedGlossaryFormats200Headers { - "retry-after"?: string; +export interface DocumentTranslationGetSupportedGlossaryFormats200Headers { + "retry-after"?: number; } // @public -export interface GetSupportedGlossaryFormats200Response extends HttpResponse { +export interface DocumentTranslationGetSupportedGlossaryFormats200Response extends HttpResponse { // (undocumented) - body: SupportedFileFormats; + body: SupportedFileFormatsOutput; // (undocumented) - headers: RawHttpHeaders & GetSupportedGlossaryFormats200Headers; + headers: RawHttpHeaders & DocumentTranslationGetSupportedGlossaryFormats200Headers; // (undocumented) status: "200"; } // @public -export interface GetSupportedGlossaryFormats429Response extends HttpResponse { +export interface DocumentTranslationGetSupportedGlossaryFormats429Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "429"; } // @public -export interface GetSupportedGlossaryFormats500Response extends HttpResponse { +export interface DocumentTranslationGetSupportedGlossaryFormats500Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "500"; } // @public -export interface GetSupportedGlossaryFormats503Response extends HttpResponse { +export interface DocumentTranslationGetSupportedGlossaryFormats503Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "503"; } // @public (undocumented) -export type GetSupportedGlossaryFormatsParameters = RequestParameters; +export type DocumentTranslationGetSupportedGlossaryFormatsParameters = RequestParameters; // @public (undocumented) -export interface GetSupportedStorageSources { - get(options?: GetSupportedStorageSourcesParameters): Promise; -} - -// @public (undocumented) -export interface GetSupportedStorageSources200Headers { - "retry-after"?: string; +export interface DocumentTranslationGetSupportedStorageSources200Headers { + "retry-after"?: number; } // @public -export interface GetSupportedStorageSources200Response extends HttpResponse { +export interface DocumentTranslationGetSupportedStorageSources200Response extends HttpResponse { // (undocumented) - body: SupportedStorageSources; + body: SupportedStorageSourcesOutput; // (undocumented) - headers: RawHttpHeaders & GetSupportedStorageSources200Headers; + headers: RawHttpHeaders & DocumentTranslationGetSupportedStorageSources200Headers; // (undocumented) status: "200"; } // @public -export interface GetSupportedStorageSources429Response extends HttpResponse { +export interface DocumentTranslationGetSupportedStorageSources429Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "429"; } // @public -export interface GetSupportedStorageSources500Response extends HttpResponse { +export interface DocumentTranslationGetSupportedStorageSources500Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "500"; } // @public -export interface GetSupportedStorageSources503Response extends HttpResponse { +export interface DocumentTranslationGetSupportedStorageSources503Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "503"; } // @public (undocumented) -export type GetSupportedStorageSourcesParameters = RequestParameters; +export type DocumentTranslationGetSupportedStorageSourcesParameters = RequestParameters; // @public (undocumented) -export interface GetTranslationsStatus { - get(options?: GetTranslationsStatusParameters): Promise; - post(options: StartTranslationParameters): Promise; -} - -// @public (undocumented) -export interface GetTranslationsStatus200Headers { - "retry-after"?: string; +export interface DocumentTranslationGetTranslationsStatus200Headers { + "retry-after"?: number; etag?: string; } // @public -export interface GetTranslationsStatus200Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus200Response extends HttpResponse { // (undocumented) - body: TranslationsStatus; + body: TranslationsStatusOutput; // (undocumented) - headers: RawHttpHeaders & GetTranslationsStatus200Headers; + headers: RawHttpHeaders & DocumentTranslationGetTranslationsStatus200Headers; // (undocumented) status: "200"; } // @public -export interface GetTranslationsStatus400Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus400Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "400"; } // @public -export interface GetTranslationsStatus401Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus401Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "401"; } // @public -export interface GetTranslationsStatus429Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus429Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "429"; } // @public -export interface GetTranslationsStatus500Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus500Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "500"; } // @public -export interface GetTranslationsStatus503Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus503Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "503"; } // @public (undocumented) -export type GetTranslationsStatusParameters = RequestParameters & GetTranslationsStatusQueryParam; +export type DocumentTranslationGetTranslationsStatusParameters = DocumentTranslationGetTranslationsStatusQueryParam & RequestParameters; // @public (undocumented) -export interface GetTranslationsStatusQueryParam { +export interface DocumentTranslationGetTranslationsStatusQueryParam { // (undocumented) - queryParameters?: GetTranslationsStatusQueryParamProperties; + queryParameters?: DocumentTranslationGetTranslationsStatusQueryParamProperties; } // @public (undocumented) -export interface GetTranslationsStatusQueryParamProperties { +export interface DocumentTranslationGetTranslationsStatusQueryParamProperties { $maxpagesize?: number; - $orderBy?: string[]; + $orderBy?: Array; $skip?: number; $top?: number; - createdDateTimeUtcEnd?: Date; - createdDateTimeUtcStart?: Date; - ids?: string[]; - statuses?: string[]; + createdDateTimeUtcEnd?: Date | string; + createdDateTimeUtcStart?: Date | string; + ids?: Array; + statuses?: Array; } // @public (undocumented) -export interface GetTranslationStatus200Headers { - "retry-after"?: string; +export interface DocumentTranslationGetTranslationStatus200Headers { + "retry-after"?: number; etag?: string; } // @public -export interface GetTranslationStatus200Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus200Response extends HttpResponse { // (undocumented) - body: TranslationStatus; + body: TranslationStatusOutput; // (undocumented) - headers: RawHttpHeaders & GetTranslationStatus200Headers; + headers: RawHttpHeaders & DocumentTranslationGetTranslationStatus200Headers; // (undocumented) status: "200"; } // @public -export interface GetTranslationStatus401Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus401Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "401"; } // @public -export interface GetTranslationStatus404Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus404Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "404"; } // @public -export interface GetTranslationStatus429Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus429Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "429"; } // @public -export interface GetTranslationStatus500Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus500Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "500"; } // @public -export interface GetTranslationStatus503Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus503Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "503"; } // @public (undocumented) -export type GetTranslationStatusParameters = RequestParameters; - -// @public (undocumented) -export interface Glossary { - format: string; - glossaryUrl: string; - storageSource?: StorageSource; - version?: string; -} - -// @public (undocumented) -export interface InnerTranslationError { - code: string; - innerError?: InnerTranslationError; - message: string; - target?: string; -} - -// @public (undocumented) -export interface Routes { - (path: "/batches"): GetTranslationsStatus; - (path: "/batches/{id}/documents/{documentId}", id: string, documentId: string): GetDocumentStatus; - (path: "/batches/{id}", id: string): CancelTranslation; - (path: "/batches/{id}/documents", id: string): GetDocumentsStatus; - (path: "/documents/formats"): GetSupportedDocumentFormats; - (path: "/glossaries/formats"): GetSupportedGlossaryFormats; - (path: "/storagesources"): GetSupportedStorageSources; -} +export type DocumentTranslationGetTranslationStatusParameters = RequestParameters; // @public (undocumented) -export interface SourceInput { - // (undocumented) - filter?: DocumentFilter; - language?: string; - sourceUrl: string; - storageSource?: StorageSource; -} - -// @public (undocumented) -export interface StartTranslation202Headers { +export interface DocumentTranslationStartTranslation202Headers { "operation-location"?: string; } // @public -export interface StartTranslation202Response extends HttpResponse { +export interface DocumentTranslationStartTranslation202Response extends HttpResponse { // (undocumented) - headers: RawHttpHeaders & StartTranslation202Headers; + headers: RawHttpHeaders & DocumentTranslationStartTranslation202Headers; // (undocumented) status: "202"; } // @public -export interface StartTranslation400Response extends HttpResponse { +export interface DocumentTranslationStartTranslation400Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "400"; } // @public -export interface StartTranslation401Response extends HttpResponse { +export interface DocumentTranslationStartTranslation401Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "401"; } // @public -export interface StartTranslation429Response extends HttpResponse { +export interface DocumentTranslationStartTranslation429Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "429"; } // @public -export interface StartTranslation500Response extends HttpResponse { +export interface DocumentTranslationStartTranslation500Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "500"; } // @public -export interface StartTranslation503Response extends HttpResponse { +export interface DocumentTranslationStartTranslation503Response extends HttpResponse { // (undocumented) - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; // (undocumented) status: "503"; } // @public (undocumented) -export interface StartTranslationBodyParam { - // (undocumented) +export interface DocumentTranslationStartTranslationBodyParam { body: StartTranslationDetails; } // @public (undocumented) -export interface StartTranslationDetails { - inputs: BatchRequest[]; +export interface DocumentTranslationStartTranslationMediaTypesParam { + contentType?: "application/json" | "text/json" | "application/*+json"; } // @public (undocumented) -export type StartTranslationParameters = RequestParameters & StartTranslationBodyParam; +export type DocumentTranslationStartTranslationParameters = DocumentTranslationStartTranslationMediaTypesParam & DocumentTranslationStartTranslationBodyParam & RequestParameters; // @public (undocumented) -export type Status = "NotStarted" | "Running" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "ValidationFailed"; +export type DocumentTranslatorClient = Client & { + path: Routes; +}; + +// @public +export interface DocumentTranslatorClientOptions extends ClientOptions { +} // @public (undocumented) -export interface StatusSummary { - cancelled: number; - failed: number; - inProgress: number; - notYetStarted: number; - success: number; - total: number; - totalCharacterCharged: number; +export interface FileFormatOutput { + contentTypes: Array; + defaultVersion?: string; + fileExtensions: Array; + format: string; + versions?: Array; } +// @public +export type GetArrayType = T extends Array ? TData : never; + // @public (undocumented) -export type StorageInputType = "Folder" | "File"; +export interface GetDocumentsStatus { + get(options?: DocumentTranslationGetDocumentsStatusParameters): StreamableMethod; +} // @public (undocumented) -export type StorageSource = "AzureBlob"; +export interface GetDocumentStatus { + get(options?: DocumentTranslationGetDocumentStatusParameters): StreamableMethod; +} + +// @public +export function getLongRunningPoller(client: Client, initialResponse: TResult, options?: CreateHttpPollerOptions>): Promise, TResult>>; + +// @public +export type GetPage = (pageLink: string) => Promise<{ + page: TPage; + nextPageLink?: string; +}>; // @public (undocumented) -export interface SupportedFileFormats { - value: FileFormat[]; +export interface GetSupportedDocumentFormats { + get(options?: DocumentTranslationGetSupportedDocumentFormatsParameters): StreamableMethod; } // @public (undocumented) -export interface SupportedStorageSources { - value: "AzureBlob"[]; +export interface GetSupportedGlossaryFormats { + get(options?: DocumentTranslationGetSupportedGlossaryFormatsParameters): StreamableMethod; } // @public (undocumented) -export interface TargetInput { - category?: string; - glossaries?: Glossary[]; - language: string; - storageSource?: StorageSource; - targetUrl: string; +export interface GetSupportedStorageSources { + get(options?: DocumentTranslationGetSupportedStorageSourcesParameters): StreamableMethod; } // @public (undocumented) -export interface TranslationError { - code: TranslationErrorCode; - innerError?: InnerTranslationError; +export interface GetTranslationStatus { + delete(options?: DocumentTranslationCancelTranslationParameters): StreamableMethod; + get(options?: DocumentTranslationGetTranslationStatusParameters): StreamableMethod; +} + +// @public +export interface Glossary { + format: string; + glossaryUrl: string; + storageSource?: "AzureBlob"; + version?: string; +} + +// @public +export interface InnerTranslationErrorOutput { + code: string; + innerError?: InnerTranslationErrorOutput; message: string; - target?: string; + readonly target?: string; } // @public (undocumented) -export type TranslationErrorCode = "InvalidRequest" | "InvalidArgument" | "InternalServerError" | "ServiceUnavailable" | "ResourceNotFound" | "Unauthorized" | "RequestRateTooHigh"; +export function isUnexpected(response: DocumentTranslationStartTranslation202Response | DocumentTranslationStartTranslation400Response | DocumentTranslationStartTranslation401Response | DocumentTranslationStartTranslation429Response | DocumentTranslationStartTranslation500Response | DocumentTranslationStartTranslation503Response): response is DocumentTranslationStartTranslation400Response; + +// @public (undocumented) +export function isUnexpected(response: DocumentTranslationGetTranslationsStatus200Response | DocumentTranslationGetTranslationsStatus400Response | DocumentTranslationGetTranslationsStatus401Response | DocumentTranslationGetTranslationsStatus429Response | DocumentTranslationGetTranslationsStatus500Response | DocumentTranslationGetTranslationsStatus503Response): response is DocumentTranslationGetTranslationsStatus400Response; + +// @public (undocumented) +export function isUnexpected(response: DocumentTranslationGetDocumentStatus200Response | DocumentTranslationGetDocumentStatus401Response | DocumentTranslationGetDocumentStatus404Response | DocumentTranslationGetDocumentStatus429Response | DocumentTranslationGetDocumentStatus500Response | DocumentTranslationGetDocumentStatus503Response): response is DocumentTranslationGetDocumentStatus401Response; + +// @public (undocumented) +export function isUnexpected(response: DocumentTranslationGetTranslationStatus200Response | DocumentTranslationGetTranslationStatus401Response | DocumentTranslationGetTranslationStatus404Response | DocumentTranslationGetTranslationStatus429Response | DocumentTranslationGetTranslationStatus500Response | DocumentTranslationGetTranslationStatus503Response): response is DocumentTranslationGetTranslationStatus401Response; + +// @public (undocumented) +export function isUnexpected(response: DocumentTranslationCancelTranslation200Response | DocumentTranslationCancelTranslation401Response | DocumentTranslationCancelTranslation404Response | DocumentTranslationCancelTranslation429Response | DocumentTranslationCancelTranslation500Response | DocumentTranslationCancelTranslation503Response): response is DocumentTranslationCancelTranslation401Response; + +// @public (undocumented) +export function isUnexpected(response: DocumentTranslationGetDocumentsStatus200Response | DocumentTranslationGetDocumentsStatus400Response | DocumentTranslationGetDocumentsStatus401Response | DocumentTranslationGetDocumentsStatus404Response | DocumentTranslationGetDocumentsStatus429Response | DocumentTranslationGetDocumentsStatus500Response | DocumentTranslationGetDocumentsStatus503Response): response is DocumentTranslationGetDocumentsStatus400Response; + +// @public (undocumented) +export function isUnexpected(response: DocumentTranslationGetSupportedDocumentFormats200Response | DocumentTranslationGetSupportedDocumentFormats429Response | DocumentTranslationGetSupportedDocumentFormats500Response | DocumentTranslationGetSupportedDocumentFormats503Response): response is DocumentTranslationGetSupportedDocumentFormats429Response; // @public (undocumented) -export interface TranslationErrorResponse { - error?: TranslationError; +export function isUnexpected(response: DocumentTranslationGetSupportedGlossaryFormats200Response | DocumentTranslationGetSupportedGlossaryFormats429Response | DocumentTranslationGetSupportedGlossaryFormats500Response | DocumentTranslationGetSupportedGlossaryFormats503Response): response is DocumentTranslationGetSupportedGlossaryFormats429Response; + +// @public (undocumented) +export function isUnexpected(response: DocumentTranslationGetSupportedStorageSources200Response | DocumentTranslationGetSupportedStorageSources429Response | DocumentTranslationGetSupportedStorageSources500Response | DocumentTranslationGetSupportedStorageSources503Response): response is DocumentTranslationGetSupportedStorageSources429Response; + +// @public +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} + +// @public +export interface PageSettings { + continuationToken?: string; +} + +// @public +export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; + +// @public +export type PaginateReturn = TResult extends { + body: { + value?: infer TPage; + }; +} ? GetArrayType : Array; + +// @public +export interface PagingOptions { + customGetPage?: GetPage[]>; } // @public (undocumented) -export interface TranslationsStatus { - nextLink?: string; - value: TranslationStatus[]; +export interface Routes { + (path: "/batches"): StartTranslation; + (path: "/batches/{id}/documents/{documentId}", id: string, documentId: string): GetDocumentStatus; + (path: "/batches/{id}", id: string): GetTranslationStatus; + (path: "/batches/{id}/documents", id: string): GetDocumentsStatus; + (path: "/documents/formats"): GetSupportedDocumentFormats; + (path: "/glossaries/formats"): GetSupportedGlossaryFormats; + (path: "/storagesources"): GetSupportedStorageSources; +} + +// @public +export interface SimplePollerLike, TResult> { + getOperationState(): TState; + getResult(): TResult | undefined; + isDone(): boolean; + // @deprecated + isStopped(): boolean; + onProgress(callback: (state: TState) => void): CancelOnProgress; + poll(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + pollUntilDone(pollOptions?: { + abortSignal?: AbortSignalLike; + }): Promise; + serialize(): Promise; + // @deprecated + stopPolling(): void; + submitted(): Promise; + // @deprecated + toString(): string; +} + +// @public +export interface SourceInput { + // (undocumented) + filter?: DocumentFilter; + language?: string; + sourceUrl: string; + storageSource?: "AzureBlob"; +} + +// @public (undocumented) +export interface StartTranslation { + get(options?: DocumentTranslationGetTranslationsStatusParameters): StreamableMethod; + post(options: DocumentTranslationStartTranslationParameters): StreamableMethod; +} + +// @public +export interface StartTranslationDetails { + inputs: Array; } // @public (undocumented) -export interface TranslationStatus { - createdDateTimeUtc: Date; - error?: TranslationError; +export interface StatusSummaryOutput { + cancelled: number; + failed: number; + inProgress: number; + notYetStarted: number; + success: number; + total: number; + totalCharacterCharged: number; +} + +// @public +export interface SupportedFileFormatsOutput { + value: Array; +} + +// @public +export interface SupportedStorageSourcesOutput { + value: Array<"AzureBlob">; +} + +// @public +export interface TargetInput { + category?: string; + glossaries?: Array; + language: string; + storageSource?: "AzureBlob"; + targetUrl: string; +} + +// @public +export interface TranslationErrorOutput { + code: "InvalidRequest" | "InvalidArgument" | "InternalServerError" | "ServiceUnavailable" | "ResourceNotFound" | "Unauthorized" | "RequestRateTooHigh"; + innerError?: InnerTranslationErrorOutput; + message: string; + readonly target?: string; +} + +// @public +export interface TranslationErrorResponseOutput { + error?: TranslationErrorOutput; +} + +// @public +export interface TranslationsStatusOutput { + "@nextLink"?: string; + value: Array; +} + +// @public +export interface TranslationStatusOutput { + createdDateTimeUtc: string; + error?: TranslationErrorOutput; id: string; - lastActionDateTimeUtc: Date; - status: Status; + lastActionDateTimeUtc: string; + status: "NotStarted" | "Running" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "ValidationFailed"; // (undocumented) - summary: StatusSummary; + summary: StatusSummaryOutput; } +// (No @packageDocumentation comment for this package) + ``` diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples-dev/translateFromBlob.ts b/sdk/documenttranslator/ai-document-translator-rest/samples-dev/translateFromBlob.ts index 0200353fa815..6b48ce697a17 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/samples-dev/translateFromBlob.ts +++ b/sdk/documenttranslator/ai-document-translator-rest/samples-dev/translateFromBlob.ts @@ -89,7 +89,7 @@ export async function main(): Promise { // The checkStatus operation returns a retry-after header that contains the // time in seconds to wait before sending the next polling request - const parsedRetryAfter = Number.parseInt(operationState.headers["retry-after"] || "5"); + const parsedRetryAfter = Number.parseInt(String(operationState.headers["retry-after"]) || "5"); const waitTime = Number.isInteger(parsedRetryAfter) ? parsedRetryAfter : 5; await wait(waitTime); } while (!terminalStates.includes(operationState.body.status)); diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/README.md b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/README.md new file mode 100644 index 000000000000..5da66423ea68 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/README.md @@ -0,0 +1,66 @@ +--- +page_type: sample +languages: + - javascript +products: + - azure + - azure-cognitive-services + - azure-translator +urlFragment: ai-document-translator-javascript-beta +--- + +# Azure Document Translator rest client library samples for JavaScript (Beta) + +These sample programs show how to use the JavaScript client libraries for Azure Document Translator rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------- | --------------------------------------------- | +| [listFormats.js][listformats] | gets a list of all supported document formats | +| [translateFromBlob.js][translatefromblob] | translates a collection of documents | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Azure Cognitive Services instance][createinstance_azurecognitiveservicesinstance] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node listFormats.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env ENDPOINT="" DOCUMENT_TRANSLATOR_API_KEY="" node listFormats.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[listformats]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/listFormats.js +[translatefromblob]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/translateFromBlob.js +[apiref]: https://docs.microsoft.com/javascript/api/@azure/ai-document-translator +[freesub]: https://azure.microsoft.com/free/ +[createinstance_azurecognitiveservicesinstance]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/documenttranslator/ai-document-translator-rest/README.md diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/listFormats.js b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/listFormats.js new file mode 100644 index 000000000000..7810fbd1e5b7 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/listFormats.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to make a simple call to the Azure Document Translator + * service to get a list of supported file formats + * + * @summary gets a list of all supported document formats + */ + +const DocumentTranslator = require("@azure-rest/ai-document-translator").default; + +require("dotenv").config(); + +const endpoint = process.env["ENDPOINT"] || "document-translator endpoint"; +const apiKey = process.env["DOCUMENT_TRANSLATOR_API_KEY"] || ""; + +async function main() { + console.log("== List supported document formats sample =="); + + const client = DocumentTranslator(endpoint, { key: apiKey }); + const formats = await client.path("/documents/formats").get(); + + if (formats.status !== "200") { + throw formats.body.error; + } + + console.log(formats.body.value.map((v) => v.format).join("\n")); +} + +main().catch((err) => { + console.error(err); +}); + +module.exports = { main }; diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/package.json b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/package.json new file mode 100644 index 000000000000..88a5332b69f1 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/package.json @@ -0,0 +1,32 @@ +{ + "name": "@azure-samples/ai-document-translator-js-beta", + "private": true, + "version": "1.0.0", + "description": "Azure Document Translator rest client library samples for JavaScript (Beta)", + "engines": { + "node": ">=18.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/documenttranslator/ai-document-translator-rest" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/documenttranslator/ai-document-translator-rest", + "dependencies": { + "@azure-rest/ai-document-translator": "next", + "dotenv": "latest" + } +} diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/sample.env b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/sample.env new file mode 100644 index 000000000000..700e9d42eebd --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/sample.env @@ -0,0 +1,7 @@ +# API key to authenticate service calls +DOCUMENT_TRANSLATOR_API_KEY= +# Document translation service endpoint +ENDPOINT= +# URLs to the Source and Target Azure Storage Blob containers +SOURCE_CONTAINER= +TARGET_CONTAINER= diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/translateFromBlob.js b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/translateFromBlob.js new file mode 100644 index 000000000000..e7a0d7173352 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/javascript/translateFromBlob.js @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how translate a colletion of documents stored in a Azure Storage Blob container + * and output the translated documents to another container. + * + * Translating documents is considered a Long Running Operation because it may take a long time to complete, + * specially if translating large files or a batch with several files. + * + * To handle these long running operations we need to call a few different endpoints, to track the status of the operation + * + * @summary translates a collection of documents + */ + +const DocumentTranslator = require("@azure-rest/ai-document-translator").default; + +require("dotenv").config(); + +/** + * These are states of the Long Running Operation considered as terminal + * that means that the operation has finished + */ +const terminalStates = ["Succeeded", "Failed", "Cancelled", "ValidationFailed"]; + +// Document Translation service endpoint +const endpoint = process.env["ENDPOINT"] || "document-translator endpoint"; +// Api key to authenticate the requests +const apiKey = process.env["DOCUMENT_TRANSLATOR_API_KEY"] || ""; +/** + * Azure Storage Blob containers, sourceContainer has the documents to be translated + * and targetContainer is the container where the translated documents will be output + */ +const sourceContainer = process.env["SOURCE_CONTAINER"] || ""; +const targetContainer = process.env["TARGET_CONTAINER"] || ""; + +/** + * This is the body that we need to send to the /batch endpoint + * to start a translation job on all the documents in sourceContainer + */ +const batchSubmissionRequest = { + inputs: [ + { + source: { sourceUrl: sourceContainer }, + targets: [{ language: "fr", targetUrl: targetContainer }], + }, + ], +}; + +async function main() { + console.log("== Translate documents in a container sample =="); + + // Create a new client + const client = DocumentTranslator(endpoint, { key: apiKey }); + + // Call the /batches path to initiate the translation job + const formats = await client.path("/batches").post({ + body: batchSubmissionRequest, + }); + + // If we get a non-success status code, throw an error + if (formats.status !== "202") { + throw formats.body.error; + } + + // The initial response contains an operation-location header which indicates + // the url in which we can poll for the status of the operation + // this URL is in a format in which the last part of the url is the operationId + // we can extract that ID and use it to call "/batches/{id}" + const batchId = extractBatchId(formats.headers["operation-location"]); + + /** + * We need to keep polling for the operation state until we find a terminal state + * once we reached the terminal state we can proceed and access the translated documents + * or throw an error in case something failed + */ + // Setting up the batch status path to reuse it in the loop + const checkStatus = client.path("/batches/{id}", batchId); + let operationState; + do { + // We just call get on checkStatus and store the current state + operationState = await checkStatus.get(); + + // If we get a non-success status code, throw the error + if (operationState.status !== "200") { + throw operationState.body.error; + } + + // The checkStatus operation returns a retry-after header that contains the + // time in seconds to wait before sending the next polling request + const parsedRetryAfter = Number.parseInt(String(operationState.headers["retry-after"]) || "5"); + const waitTime = Number.isInteger(parsedRetryAfter) ? parsedRetryAfter : 5; + await wait(waitTime); + } while (!terminalStates.includes(operationState.body.status)); + + // Now that the operation is complete, we can list the translated documents + const documents = await client.path("/batches/{id}/documents", batchId).get(); + + if (documents.status !== "200") { + throw documents.body.error; + } + + console.log(documents.body.value.map((doc) => doc.path).join("\n")); +} + +// Helper function to wait/sleep for N seconds +function wait(seconds) { + return new Promise((resolve) => { + setTimeout(resolve, seconds * 1000); + }); +} + +// Helper function that extracts the batch id from operation-location header +function extractBatchId(batchUrl = "") { + const parts = batchUrl.split("/"); + + return parts[parts.length - 1]; +} + +main().catch((err) => { + console.error(err); +}); + +module.exports = { main }; diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/README.md b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/README.md new file mode 100644 index 000000000000..af55007fb3d6 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/README.md @@ -0,0 +1,79 @@ +--- +page_type: sample +languages: + - typescript +products: + - azure + - azure-cognitive-services + - azure-translator +urlFragment: ai-document-translator-typescript-beta +--- + +# Azure Document Translator rest client library samples for TypeScript (Beta) + +These sample programs show how to use the TypeScript client libraries for Azure Document Translator rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------- | --------------------------------------------- | +| [listFormats.ts][listformats] | gets a list of all supported document formats | +| [translateFromBlob.ts][translatefromblob] | translates a collection of documents | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Azure Cognitive Services instance][createinstance_azurecognitiveservicesinstance] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/listFormats.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env ENDPOINT="" DOCUMENT_TRANSLATOR_API_KEY="" node dist/listFormats.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[listformats]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/listFormats.ts +[translatefromblob]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/translateFromBlob.ts +[apiref]: https://docs.microsoft.com/javascript/api/@azure/ai-document-translator +[freesub]: https://azure.microsoft.com/free/ +[createinstance_azurecognitiveservicesinstance]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/documenttranslator/ai-document-translator-rest/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/package.json b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/package.json new file mode 100644 index 000000000000..d35eeba35296 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/package.json @@ -0,0 +1,41 @@ +{ + "name": "@azure-samples/ai-document-translator-ts-beta", + "private": true, + "version": "1.0.0", + "description": "Azure Document Translator rest client library samples for TypeScript (Beta)", + "engines": { + "node": ">=18.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/documenttranslator/ai-document-translator-rest" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/documenttranslator/ai-document-translator-rest", + "dependencies": { + "@azure-rest/ai-document-translator": "next", + "dotenv": "latest" + }, + "devDependencies": { + "@types/node": "^18.0.0", + "typescript": "~5.5.3", + "rimraf": "latest" + } +} diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/sample.env b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/sample.env new file mode 100644 index 000000000000..700e9d42eebd --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/sample.env @@ -0,0 +1,7 @@ +# API key to authenticate service calls +DOCUMENT_TRANSLATOR_API_KEY= +# Document translation service endpoint +ENDPOINT= +# URLs to the Source and Target Azure Storage Blob containers +SOURCE_CONTAINER= +TARGET_CONTAINER= diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/listFormats.ts b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/listFormats.ts new file mode 100644 index 000000000000..e6ad05e13f3b --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/listFormats.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to make a simple call to the Azure Document Translator + * service to get a list of supported file formats + * + * @summary gets a list of all supported document formats + */ + +import DocumentTranslator from "@azure-rest/ai-document-translator"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +const endpoint = process.env["ENDPOINT"] || "document-translator endpoint"; +const apiKey = process.env["DOCUMENT_TRANSLATOR_API_KEY"] || ""; + +export async function main() { + console.log("== List supported document formats sample =="); + + const client = DocumentTranslator(endpoint, { key: apiKey }); + const formats = await client.path("/documents/formats").get(); + + if (formats.status !== "200") { + throw formats.body.error; + } + + console.log(formats.body.value.map((v) => v.format).join("\n")); +} + +main().catch((err) => { + console.error(err); +}); diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/translateFromBlob.ts b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/translateFromBlob.ts new file mode 100644 index 000000000000..51edcdaf913c --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/src/translateFromBlob.ts @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how translate a colletion of documents stored in a Azure Storage Blob container + * and output the translated documents to another container. + * + * Translating documents is considered a Long Running Operation because it may take a long time to complete, + * specially if translating large files or a batch with several files. + * + * To handle these long running operations we need to call a few different endpoints, to track the status of the operation + * + * @summary translates a collection of documents + */ + +import DocumentTranslator, { StartTranslationDetails } from "@azure-rest/ai-document-translator"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +/** + * These are states of the Long Running Operation considered as terminal + * that means that the operation has finished + */ +const terminalStates = ["Succeeded", "Failed", "Cancelled", "ValidationFailed"]; + +// Document Translation service endpoint +const endpoint = process.env["ENDPOINT"] || "document-translator endpoint"; +// Api key to authenticate the requests +const apiKey = process.env["DOCUMENT_TRANSLATOR_API_KEY"] || ""; +/** + * Azure Storage Blob containers, sourceContainer has the documents to be translated + * and targetContainer is the container where the translated documents will be output + */ +const sourceContainer = process.env["SOURCE_CONTAINER"] || ""; +const targetContainer = process.env["TARGET_CONTAINER"] || ""; + +/** + * This is the body that we need to send to the /batch endpoint + * to start a translation job on all the documents in sourceContainer + */ +const batchSubmissionRequest: StartTranslationDetails = { + inputs: [ + { + source: { sourceUrl: sourceContainer }, + targets: [{ language: "fr", targetUrl: targetContainer }], + }, + ], +}; + +export async function main() { + console.log("== Translate documents in a container sample =="); + + // Create a new client + const client = DocumentTranslator(endpoint, { key: apiKey }); + + // Call the /batches path to initiate the translation job + const formats = await client.path("/batches").post({ + body: batchSubmissionRequest, + }); + + // If we get a non-success status code, throw an error + if (formats.status !== "202") { + throw formats.body.error; + } + + // The initial response contains an operation-location header which indicates + // the url in which we can poll for the status of the operation + // this URL is in a format in which the last part of the url is the operationId + // we can extract that ID and use it to call "/batches/{id}" + const batchId = extractBatchId(formats.headers["operation-location"]); + + /** + * We need to keep polling for the operation state until we find a terminal state + * once we reached the terminal state we can proceed and access the translated documents + * or throw an error in case something failed + */ + // Setting up the batch status path to reuse it in the loop + const checkStatus = client.path("/batches/{id}", batchId); + let operationState; + do { + // We just call get on checkStatus and store the current state + operationState = await checkStatus.get(); + + // If we get a non-success status code, throw the error + if (operationState.status !== "200") { + throw operationState.body.error; + } + + // The checkStatus operation returns a retry-after header that contains the + // time in seconds to wait before sending the next polling request + const parsedRetryAfter = Number.parseInt(String(operationState.headers["retry-after"]) || "5"); + const waitTime = Number.isInteger(parsedRetryAfter) ? parsedRetryAfter : 5; + await wait(waitTime); + } while (!terminalStates.includes(operationState.body.status)); + + // Now that the operation is complete, we can list the translated documents + const documents = await client.path("/batches/{id}/documents", batchId).get(); + + if (documents.status !== "200") { + throw documents.body.error; + } + + console.log(documents.body.value.map((doc) => doc.path).join("\n")); +} + +// Helper function to wait/sleep for N seconds +function wait(seconds: number): Promise { + return new Promise((resolve) => { + setTimeout(resolve, seconds * 1000); + }); +} + +// Helper function that extracts the batch id from operation-location header +function extractBatchId(batchUrl: string = "") { + const parts = batchUrl.split("/"); + + return parts[parts.length - 1]; +} + +main().catch((err) => { + console.error(err); +}); diff --git a/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/tsconfig.json b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/tsconfig.json new file mode 100644 index 000000000000..984eed535aa8 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/samples/v1-beta/typescript/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**/*.ts" + ] +} diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/clientDefinitions.ts b/sdk/documenttranslator/ai-document-translator-rest/src/clientDefinitions.ts new file mode 100644 index 000000000000..d4f02adf23ff --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/src/clientDefinitions.ts @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + DocumentTranslationStartTranslationParameters, + DocumentTranslationGetTranslationsStatusParameters, + DocumentTranslationGetDocumentStatusParameters, + DocumentTranslationGetTranslationStatusParameters, + DocumentTranslationCancelTranslationParameters, + DocumentTranslationGetDocumentsStatusParameters, + DocumentTranslationGetSupportedDocumentFormatsParameters, + DocumentTranslationGetSupportedGlossaryFormatsParameters, + DocumentTranslationGetSupportedStorageSourcesParameters, +} from "./parameters.js"; +import type { + DocumentTranslationStartTranslation202Response, + DocumentTranslationStartTranslation400Response, + DocumentTranslationStartTranslation401Response, + DocumentTranslationStartTranslation429Response, + DocumentTranslationStartTranslation500Response, + DocumentTranslationStartTranslation503Response, + DocumentTranslationGetTranslationsStatus200Response, + DocumentTranslationGetTranslationsStatus400Response, + DocumentTranslationGetTranslationsStatus401Response, + DocumentTranslationGetTranslationsStatus429Response, + DocumentTranslationGetTranslationsStatus500Response, + DocumentTranslationGetTranslationsStatus503Response, + DocumentTranslationGetDocumentStatus200Response, + DocumentTranslationGetDocumentStatus401Response, + DocumentTranslationGetDocumentStatus404Response, + DocumentTranslationGetDocumentStatus429Response, + DocumentTranslationGetDocumentStatus500Response, + DocumentTranslationGetDocumentStatus503Response, + DocumentTranslationGetTranslationStatus200Response, + DocumentTranslationGetTranslationStatus401Response, + DocumentTranslationGetTranslationStatus404Response, + DocumentTranslationGetTranslationStatus429Response, + DocumentTranslationGetTranslationStatus500Response, + DocumentTranslationGetTranslationStatus503Response, + DocumentTranslationCancelTranslation200Response, + DocumentTranslationCancelTranslation401Response, + DocumentTranslationCancelTranslation404Response, + DocumentTranslationCancelTranslation429Response, + DocumentTranslationCancelTranslation500Response, + DocumentTranslationCancelTranslation503Response, + DocumentTranslationGetDocumentsStatus200Response, + DocumentTranslationGetDocumentsStatus400Response, + DocumentTranslationGetDocumentsStatus401Response, + DocumentTranslationGetDocumentsStatus404Response, + DocumentTranslationGetDocumentsStatus429Response, + DocumentTranslationGetDocumentsStatus500Response, + DocumentTranslationGetDocumentsStatus503Response, + DocumentTranslationGetSupportedDocumentFormats200Response, + DocumentTranslationGetSupportedDocumentFormats429Response, + DocumentTranslationGetSupportedDocumentFormats500Response, + DocumentTranslationGetSupportedDocumentFormats503Response, + DocumentTranslationGetSupportedGlossaryFormats200Response, + DocumentTranslationGetSupportedGlossaryFormats429Response, + DocumentTranslationGetSupportedGlossaryFormats500Response, + DocumentTranslationGetSupportedGlossaryFormats503Response, + DocumentTranslationGetSupportedStorageSources200Response, + DocumentTranslationGetSupportedStorageSources429Response, + DocumentTranslationGetSupportedStorageSources500Response, + DocumentTranslationGetSupportedStorageSources503Response, +} from "./responses.js"; +import type { Client, StreamableMethod } from "@azure-rest/core-client"; + +export interface StartTranslation { + /** + * Use this API to submit a bulk (batch) translation request to the Document Translation service. + * Each request can contain multiple documents and must contain a source and destination container for each document. + * + * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name. + * + * Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated. + * + * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. + * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique. + */ + post( + options: DocumentTranslationStartTranslationParameters, + ): StreamableMethod< + | DocumentTranslationStartTranslation202Response + | DocumentTranslationStartTranslation400Response + | DocumentTranslationStartTranslation401Response + | DocumentTranslationStartTranslation429Response + | DocumentTranslationStartTranslation500Response + | DocumentTranslationStartTranslation503Response + >; + /** + * Returns a list of batch requests submitted and the status for each request. + * This list only contains batch requests submitted by the user (based on the resource). + * + * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response. + * The absence of a continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled operations. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token. + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + */ + get( + options?: DocumentTranslationGetTranslationsStatusParameters, + ): StreamableMethod< + | DocumentTranslationGetTranslationsStatus200Response + | DocumentTranslationGetTranslationsStatus400Response + | DocumentTranslationGetTranslationsStatus401Response + | DocumentTranslationGetTranslationsStatus429Response + | DocumentTranslationGetTranslationsStatus500Response + | DocumentTranslationGetTranslationsStatus503Response + >; +} + +export interface GetDocumentStatus { + /** Returns the translation status for a specific document based on the request Id and document Id. */ + get( + options?: DocumentTranslationGetDocumentStatusParameters, + ): StreamableMethod< + | DocumentTranslationGetDocumentStatus200Response + | DocumentTranslationGetDocumentStatus401Response + | DocumentTranslationGetDocumentStatus404Response + | DocumentTranslationGetDocumentStatus429Response + | DocumentTranslationGetDocumentStatus500Response + | DocumentTranslationGetDocumentStatus503Response + >; +} + +export interface GetTranslationStatus { + /** + * Returns the status for a document translation request. + * The status includes the overall request status, as well as the status for documents that are being translated as part of that request. + */ + get( + options?: DocumentTranslationGetTranslationStatusParameters, + ): StreamableMethod< + | DocumentTranslationGetTranslationStatus200Response + | DocumentTranslationGetTranslationStatus401Response + | DocumentTranslationGetTranslationStatus404Response + | DocumentTranslationGetTranslationStatus429Response + | DocumentTranslationGetTranslationStatus500Response + | DocumentTranslationGetTranslationStatus503Response + >; + /** + * Cancel a currently processing or queued translation. + * Cancel a currently processing or queued translation. + * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned. + * All documents that have completed translation will not be cancelled and will be charged. + * All pending documents will be cancelled if possible. + */ + delete( + options?: DocumentTranslationCancelTranslationParameters, + ): StreamableMethod< + | DocumentTranslationCancelTranslation200Response + | DocumentTranslationCancelTranslation401Response + | DocumentTranslationCancelTranslation404Response + | DocumentTranslationCancelTranslation429Response + | DocumentTranslationCancelTranslation500Response + | DocumentTranslationCancelTranslation503Response + >; +} + +export interface GetDocumentsStatus { + /** + * Returns the status for all documents in a batch document translation request. + * + * If the number of documents in the response exceeds our paging limit, server-side paging is used. + * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled documents. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + */ + get( + options?: DocumentTranslationGetDocumentsStatusParameters, + ): StreamableMethod< + | DocumentTranslationGetDocumentsStatus200Response + | DocumentTranslationGetDocumentsStatus400Response + | DocumentTranslationGetDocumentsStatus401Response + | DocumentTranslationGetDocumentsStatus404Response + | DocumentTranslationGetDocumentsStatus429Response + | DocumentTranslationGetDocumentsStatus500Response + | DocumentTranslationGetDocumentsStatus503Response + >; +} + +export interface GetSupportedDocumentFormats { + /** + * The list of supported document formats supported by the Document Translation service. + * The list includes the common file extension, as well as the content-type if using the upload API. + */ + get( + options?: DocumentTranslationGetSupportedDocumentFormatsParameters, + ): StreamableMethod< + | DocumentTranslationGetSupportedDocumentFormats200Response + | DocumentTranslationGetSupportedDocumentFormats429Response + | DocumentTranslationGetSupportedDocumentFormats500Response + | DocumentTranslationGetSupportedDocumentFormats503Response + >; +} + +export interface GetSupportedGlossaryFormats { + /** + * The list of supported glossary formats supported by the Document Translation service. + * The list includes the common file extension used. + */ + get( + options?: DocumentTranslationGetSupportedGlossaryFormatsParameters, + ): StreamableMethod< + | DocumentTranslationGetSupportedGlossaryFormats200Response + | DocumentTranslationGetSupportedGlossaryFormats429Response + | DocumentTranslationGetSupportedGlossaryFormats500Response + | DocumentTranslationGetSupportedGlossaryFormats503Response + >; +} + +export interface GetSupportedStorageSources { + /** Returns a list of storage sources/options supported by the Document Translation service. */ + get( + options?: DocumentTranslationGetSupportedStorageSourcesParameters, + ): StreamableMethod< + | DocumentTranslationGetSupportedStorageSources200Response + | DocumentTranslationGetSupportedStorageSources429Response + | DocumentTranslationGetSupportedStorageSources500Response + | DocumentTranslationGetSupportedStorageSources503Response + >; +} + +export interface Routes { + /** Resource for '/batches' has methods for the following verbs: post, get */ + (path: "/batches"): StartTranslation; + /** Resource for '/batches/\{id\}/documents/\{documentId\}' has methods for the following verbs: get */ + (path: "/batches/{id}/documents/{documentId}", id: string, documentId: string): GetDocumentStatus; + /** Resource for '/batches/\{id\}' has methods for the following verbs: get, delete */ + (path: "/batches/{id}", id: string): GetTranslationStatus; + /** Resource for '/batches/\{id\}/documents' has methods for the following verbs: get */ + (path: "/batches/{id}/documents", id: string): GetDocumentsStatus; + /** Resource for '/documents/formats' has methods for the following verbs: get */ + (path: "/documents/formats"): GetSupportedDocumentFormats; + /** Resource for '/glossaries/formats' has methods for the following verbs: get */ + (path: "/glossaries/formats"): GetSupportedGlossaryFormats; + /** Resource for '/storagesources' has methods for the following verbs: get */ + (path: "/storagesources"): GetSupportedStorageSources; +} + +export type DocumentTranslatorClient = Client & { + path: Routes; +}; diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/constants.ts b/sdk/documenttranslator/ai-document-translator-rest/src/constants.ts deleted file mode 100644 index f1e1289a14e5..000000000000 --- a/sdk/documenttranslator/ai-document-translator-rest/src/constants.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * @internal - */ -export const SDK_VERSION: string = "1.0.0-beta.2"; diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/documentTranslator.ts b/sdk/documenttranslator/ai-document-translator-rest/src/documentTranslator.ts index cce578145d12..999c81730d79 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/src/documentTranslator.ts +++ b/sdk/documenttranslator/ai-document-translator-rest/src/documentTranslator.ts @@ -1,295 +1,54 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - CancelTranslation200Response, - CancelTranslation401Response, - CancelTranslation404Response, - CancelTranslation429Response, - CancelTranslation500Response, - CancelTranslation503Response, - GetDocumentStatus200Response, - GetDocumentStatus401Response, - GetDocumentStatus404Response, - GetDocumentStatus429Response, - GetDocumentStatus500Response, - GetDocumentStatus503Response, - GetDocumentsStatus200Response, - GetDocumentsStatus400Response, - GetDocumentsStatus401Response, - GetDocumentsStatus404Response, - GetDocumentsStatus429Response, - GetDocumentsStatus500Response, - GetDocumentsStatus503Response, - GetSupportedDocumentFormats200Response, - GetSupportedDocumentFormats429Response, - GetSupportedDocumentFormats500Response, - GetSupportedDocumentFormats503Response, - GetSupportedGlossaryFormats200Response, - GetSupportedGlossaryFormats429Response, - GetSupportedGlossaryFormats500Response, - GetSupportedGlossaryFormats503Response, - GetSupportedStorageSources200Response, - GetSupportedStorageSources429Response, - GetSupportedStorageSources500Response, - GetSupportedStorageSources503Response, - GetTranslationStatus200Response, - GetTranslationStatus401Response, - GetTranslationStatus404Response, - GetTranslationStatus429Response, - GetTranslationStatus500Response, - GetTranslationStatus503Response, - GetTranslationsStatus200Response, - GetTranslationsStatus400Response, - GetTranslationsStatus401Response, - GetTranslationsStatus429Response, - GetTranslationsStatus500Response, - GetTranslationsStatus503Response, - StartTranslation202Response, - StartTranslation400Response, - StartTranslation401Response, - StartTranslation429Response, - StartTranslation500Response, - StartTranslation503Response, -} from "./responses.js"; -import type { - CancelTranslationParameters, - GetDocumentStatusParameters, - GetDocumentsStatusParameters, - GetSupportedDocumentFormatsParameters, - GetSupportedGlossaryFormatsParameters, - GetSupportedStorageSourcesParameters, - GetTranslationStatusParameters, - GetTranslationsStatusParameters, - StartTranslationParameters, -} from "./parameters.js"; -import type { Client, ClientOptions } from "@azure-rest/core-client"; +import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; -import type { KeyCredential, TokenCredential } from "@azure/core-auth"; - -export interface GetTranslationsStatus { - /** - * Use this API to submit a bulk (batch) translation request to the Document Translation service. - * Each request can contain multiple documents and must contain a source and destination container for each document. - * - * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name. - * - * Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated. - * - * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. - * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique. - */ - post( - options: StartTranslationParameters, - ): Promise< - | StartTranslation202Response - | StartTranslation400Response - | StartTranslation401Response - | StartTranslation429Response - | StartTranslation500Response - | StartTranslation503Response - >; - /** - * Returns a list of batch requests submitted and the status for each request. - * This list only contains batch requests submitted by the user (based on the resource). - * - * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response. - * The absence of a continuation token means that no additional pages are available. - * - * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection. - * - * $top indicates the total number of records the user wants to be returned across all pages. - * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. - * - * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). - * The default sorting is descending by createdDateTimeUtc. - * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled operations. - * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. - * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). - * - * The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token. - * - * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. - * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. - * This reduces the risk of the client making assumptions about the data returned. - */ - get( - options?: GetTranslationsStatusParameters, - ): Promise< - | GetTranslationsStatus200Response - | GetTranslationsStatus400Response - | GetTranslationsStatus401Response - | GetTranslationsStatus429Response - | GetTranslationsStatus500Response - | GetTranslationsStatus503Response - >; -} - -export interface GetDocumentStatus { - /** Returns the translation status for a specific document based on the request Id and document Id. */ - get( - options?: GetDocumentStatusParameters, - ): Promise< - | GetDocumentStatus200Response - | GetDocumentStatus401Response - | GetDocumentStatus404Response - | GetDocumentStatus429Response - | GetDocumentStatus500Response - | GetDocumentStatus503Response - >; -} - -export interface CancelTranslation { - /** - * Returns the status for a document translation request. - * The status includes the overall request status, as well as the status for documents that are being translated as part of that request. - */ - get( - options?: GetTranslationStatusParameters, - ): Promise< - | GetTranslationStatus200Response - | GetTranslationStatus401Response - | GetTranslationStatus404Response - | GetTranslationStatus429Response - | GetTranslationStatus500Response - | GetTranslationStatus503Response - >; - /** - * Cancel a currently processing or queued translation. - * Cancel a currently processing or queued translation. - * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned. - * All documents that have completed translation will not be cancelled and will be charged. - * All pending documents will be cancelled if possible. - */ - delete( - options?: CancelTranslationParameters, - ): Promise< - | CancelTranslation200Response - | CancelTranslation401Response - | CancelTranslation404Response - | CancelTranslation429Response - | CancelTranslation500Response - | CancelTranslation503Response - >; -} - -export interface GetDocumentsStatus { - /** - * Returns the status for all documents in a batch document translation request. - * - * If the number of documents in the response exceeds our paging limit, server-side paging is used. - * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available. - * - * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection. - * - * $top indicates the total number of records the user wants to be returned across all pages. - * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. - * - * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). - * The default sorting is descending by createdDateTimeUtc. - * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled documents. - * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. - * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). - * - * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. - * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. - * This reduces the risk of the client making assumptions about the data returned. - */ - get( - options?: GetDocumentsStatusParameters, - ): Promise< - | GetDocumentsStatus200Response - | GetDocumentsStatus400Response - | GetDocumentsStatus401Response - | GetDocumentsStatus404Response - | GetDocumentsStatus429Response - | GetDocumentsStatus500Response - | GetDocumentsStatus503Response - >; -} - -export interface GetSupportedDocumentFormats { - /** - * The list of supported document formats supported by the Document Translation service. - * The list includes the common file extension, as well as the content-type if using the upload API. - */ - get( - options?: GetSupportedDocumentFormatsParameters, - ): Promise< - | GetSupportedDocumentFormats200Response - | GetSupportedDocumentFormats429Response - | GetSupportedDocumentFormats500Response - | GetSupportedDocumentFormats503Response - >; -} - -export interface GetSupportedGlossaryFormats { - /** - * The list of supported glossary formats supported by the Document Translation service. - * The list includes the common file extension used. - */ - get( - options?: GetSupportedGlossaryFormatsParameters, - ): Promise< - | GetSupportedGlossaryFormats200Response - | GetSupportedGlossaryFormats429Response - | GetSupportedGlossaryFormats500Response - | GetSupportedGlossaryFormats503Response - >; -} - -export interface GetSupportedStorageSources { - /** Returns a list of storage sources/options supported by the Document Translation service. */ - get( - options?: GetSupportedStorageSourcesParameters, - ): Promise< - | GetSupportedStorageSources200Response - | GetSupportedStorageSources429Response - | GetSupportedStorageSources500Response - | GetSupportedStorageSources503Response - >; -} - -export interface Routes { - /** Resource for '/batches' has methods for the following verbs: post, get */ - (path: "/batches"): GetTranslationsStatus; - /** Resource for '/batches/\{id\}/documents/\{documentId\}' has methods for the following verbs: get */ - (path: "/batches/{id}/documents/{documentId}", id: string, documentId: string): GetDocumentStatus; - /** Resource for '/batches/\{id\}' has methods for the following verbs: get, delete */ - (path: "/batches/{id}", id: string): CancelTranslation; - /** Resource for '/batches/\{id\}/documents' has methods for the following verbs: get */ - (path: "/batches/{id}/documents", id: string): GetDocumentsStatus; - /** Resource for '/documents/formats' has methods for the following verbs: get */ - (path: "/documents/formats"): GetSupportedDocumentFormats; - /** Resource for '/glossaries/formats' has methods for the following verbs: get */ - (path: "/glossaries/formats"): GetSupportedGlossaryFormats; - /** Resource for '/storagesources' has methods for the following verbs: get */ - (path: "/storagesources"): GetSupportedStorageSources; -} - -export type DocumentTranslatorClient = Client & { - path: Routes; -}; - -export interface DocumentTranslatorFactory { - (endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): void; -} - -export default function DocumentTranslator( +import { logger } from "./logger.js"; +import type { KeyCredential } from "@azure/core-auth"; +import type { DocumentTranslatorClient } from "./clientDefinitions.js"; + +/** The optional parameters for the client */ +export interface DocumentTranslatorClientOptions extends ClientOptions {} + +/** + * Initialize a new instance of `DocumentTranslatorClient` + * @param endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters + */ +export default function createClient( endpoint: string, - credentials: TokenCredential | KeyCredential, - options: ClientOptions = {}, + credentials: KeyCredential, + options: DocumentTranslatorClientOptions = {}, ): DocumentTranslatorClient { - const baseUrl = options.baseUrl ?? `${endpoint}/translator/text/batch/v1.0`; + const endpointUrl = + options.endpoint ?? options.baseUrl ?? `${endpoint}/translator/text/batch/v1.0`; + const userAgentInfo = `azsdk-js-ai-document-translator-rest/1.0.0-beta.2`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` + : `${userAgentInfo}`; options = { ...options, + userAgentOptions: { + userAgentPrefix, + }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, credentials: { scopes: ["https://cognitiveservices.azure.com/.default"], - apiKeyHeaderName: "Ocp-Apim-Subscription-Key", + apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? "Ocp-Apim-Subscription-Key", }, }; + const client = getClient(endpointUrl, credentials, options) as DocumentTranslatorClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + if (options.apiVersion) { + logger.warning( + "This client does not support client api-version, please change it at the operation level", + ); + } - return getClient(baseUrl, credentials, options) as DocumentTranslatorClient; + return client; } diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/index.ts b/sdk/documenttranslator/ai-document-translator-rest/src/index.ts index 1d400e531bb4..49a668ddaa30 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/src/index.ts +++ b/sdk/documenttranslator/ai-document-translator-rest/src/index.ts @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * A rest library for working with the Azure Document Translator service. - * @packageDocumentation - */ - import DocumentTranslator from "./documentTranslator.js"; + export * from "./documentTranslator.js"; -export * from "./models.js"; export * from "./parameters.js"; export * from "./responses.js"; -// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named +export * from "./clientDefinitions.js"; +export * from "./isUnexpected.js"; +export * from "./models.js"; +export * from "./outputModels.js"; +export * from "./paginateHelper.js"; +export * from "./pollingHelper.js"; + export default DocumentTranslator; diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/isUnexpected.ts b/sdk/documenttranslator/ai-document-translator-rest/src/isUnexpected.ts new file mode 100644 index 000000000000..a8b8d4e3e2b6 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/src/isUnexpected.ts @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + DocumentTranslationStartTranslation202Response, + DocumentTranslationStartTranslation400Response, + DocumentTranslationStartTranslation401Response, + DocumentTranslationStartTranslation429Response, + DocumentTranslationStartTranslation500Response, + DocumentTranslationStartTranslation503Response, + DocumentTranslationGetTranslationsStatus200Response, + DocumentTranslationGetTranslationsStatus400Response, + DocumentTranslationGetTranslationsStatus401Response, + DocumentTranslationGetTranslationsStatus429Response, + DocumentTranslationGetTranslationsStatus500Response, + DocumentTranslationGetTranslationsStatus503Response, + DocumentTranslationGetDocumentStatus200Response, + DocumentTranslationGetDocumentStatus401Response, + DocumentTranslationGetDocumentStatus404Response, + DocumentTranslationGetDocumentStatus429Response, + DocumentTranslationGetDocumentStatus500Response, + DocumentTranslationGetDocumentStatus503Response, + DocumentTranslationGetTranslationStatus200Response, + DocumentTranslationGetTranslationStatus401Response, + DocumentTranslationGetTranslationStatus404Response, + DocumentTranslationGetTranslationStatus429Response, + DocumentTranslationGetTranslationStatus500Response, + DocumentTranslationGetTranslationStatus503Response, + DocumentTranslationCancelTranslation200Response, + DocumentTranslationCancelTranslation401Response, + DocumentTranslationCancelTranslation404Response, + DocumentTranslationCancelTranslation429Response, + DocumentTranslationCancelTranslation500Response, + DocumentTranslationCancelTranslation503Response, + DocumentTranslationGetDocumentsStatus200Response, + DocumentTranslationGetDocumentsStatus400Response, + DocumentTranslationGetDocumentsStatus401Response, + DocumentTranslationGetDocumentsStatus404Response, + DocumentTranslationGetDocumentsStatus429Response, + DocumentTranslationGetDocumentsStatus500Response, + DocumentTranslationGetDocumentsStatus503Response, + DocumentTranslationGetSupportedDocumentFormats200Response, + DocumentTranslationGetSupportedDocumentFormats429Response, + DocumentTranslationGetSupportedDocumentFormats500Response, + DocumentTranslationGetSupportedDocumentFormats503Response, + DocumentTranslationGetSupportedGlossaryFormats200Response, + DocumentTranslationGetSupportedGlossaryFormats429Response, + DocumentTranslationGetSupportedGlossaryFormats500Response, + DocumentTranslationGetSupportedGlossaryFormats503Response, + DocumentTranslationGetSupportedStorageSources200Response, + DocumentTranslationGetSupportedStorageSources429Response, + DocumentTranslationGetSupportedStorageSources500Response, + DocumentTranslationGetSupportedStorageSources503Response, +} from "./responses.js"; + +const responseMap: Record = { + "GET /batches": ["200"], + "POST /batches": ["202"], + "GET /batches/{id}/documents/{documentId}": ["200"], + "GET /batches/{id}": ["200"], + "DELETE /batches/{id}": ["200"], + "GET /batches/{id}/documents": ["200"], + "GET /documents/formats": ["200"], + "GET /glossaries/formats": ["200"], + "GET /storagesources": ["200"], +}; + +export function isUnexpected( + response: + | DocumentTranslationStartTranslation202Response + | DocumentTranslationStartTranslation400Response + | DocumentTranslationStartTranslation401Response + | DocumentTranslationStartTranslation429Response + | DocumentTranslationStartTranslation500Response + | DocumentTranslationStartTranslation503Response, +): response is DocumentTranslationStartTranslation400Response; +export function isUnexpected( + response: + | DocumentTranslationGetTranslationsStatus200Response + | DocumentTranslationGetTranslationsStatus400Response + | DocumentTranslationGetTranslationsStatus401Response + | DocumentTranslationGetTranslationsStatus429Response + | DocumentTranslationGetTranslationsStatus500Response + | DocumentTranslationGetTranslationsStatus503Response, +): response is DocumentTranslationGetTranslationsStatus400Response; +export function isUnexpected( + response: + | DocumentTranslationGetDocumentStatus200Response + | DocumentTranslationGetDocumentStatus401Response + | DocumentTranslationGetDocumentStatus404Response + | DocumentTranslationGetDocumentStatus429Response + | DocumentTranslationGetDocumentStatus500Response + | DocumentTranslationGetDocumentStatus503Response, +): response is DocumentTranslationGetDocumentStatus401Response; +export function isUnexpected( + response: + | DocumentTranslationGetTranslationStatus200Response + | DocumentTranslationGetTranslationStatus401Response + | DocumentTranslationGetTranslationStatus404Response + | DocumentTranslationGetTranslationStatus429Response + | DocumentTranslationGetTranslationStatus500Response + | DocumentTranslationGetTranslationStatus503Response, +): response is DocumentTranslationGetTranslationStatus401Response; +export function isUnexpected( + response: + | DocumentTranslationCancelTranslation200Response + | DocumentTranslationCancelTranslation401Response + | DocumentTranslationCancelTranslation404Response + | DocumentTranslationCancelTranslation429Response + | DocumentTranslationCancelTranslation500Response + | DocumentTranslationCancelTranslation503Response, +): response is DocumentTranslationCancelTranslation401Response; +export function isUnexpected( + response: + | DocumentTranslationGetDocumentsStatus200Response + | DocumentTranslationGetDocumentsStatus400Response + | DocumentTranslationGetDocumentsStatus401Response + | DocumentTranslationGetDocumentsStatus404Response + | DocumentTranslationGetDocumentsStatus429Response + | DocumentTranslationGetDocumentsStatus500Response + | DocumentTranslationGetDocumentsStatus503Response, +): response is DocumentTranslationGetDocumentsStatus400Response; +export function isUnexpected( + response: + | DocumentTranslationGetSupportedDocumentFormats200Response + | DocumentTranslationGetSupportedDocumentFormats429Response + | DocumentTranslationGetSupportedDocumentFormats500Response + | DocumentTranslationGetSupportedDocumentFormats503Response, +): response is DocumentTranslationGetSupportedDocumentFormats429Response; +export function isUnexpected( + response: + | DocumentTranslationGetSupportedGlossaryFormats200Response + | DocumentTranslationGetSupportedGlossaryFormats429Response + | DocumentTranslationGetSupportedGlossaryFormats500Response + | DocumentTranslationGetSupportedGlossaryFormats503Response, +): response is DocumentTranslationGetSupportedGlossaryFormats429Response; +export function isUnexpected( + response: + | DocumentTranslationGetSupportedStorageSources200Response + | DocumentTranslationGetSupportedStorageSources429Response + | DocumentTranslationGetSupportedStorageSources500Response + | DocumentTranslationGetSupportedStorageSources503Response, +): response is DocumentTranslationGetSupportedStorageSources429Response; +export function isUnexpected( + response: + | DocumentTranslationStartTranslation202Response + | DocumentTranslationStartTranslation400Response + | DocumentTranslationStartTranslation401Response + | DocumentTranslationStartTranslation429Response + | DocumentTranslationStartTranslation500Response + | DocumentTranslationStartTranslation503Response + | DocumentTranslationGetTranslationsStatus200Response + | DocumentTranslationGetTranslationsStatus400Response + | DocumentTranslationGetTranslationsStatus401Response + | DocumentTranslationGetTranslationsStatus429Response + | DocumentTranslationGetTranslationsStatus500Response + | DocumentTranslationGetTranslationsStatus503Response + | DocumentTranslationGetDocumentStatus200Response + | DocumentTranslationGetDocumentStatus401Response + | DocumentTranslationGetDocumentStatus404Response + | DocumentTranslationGetDocumentStatus429Response + | DocumentTranslationGetDocumentStatus500Response + | DocumentTranslationGetDocumentStatus503Response + | DocumentTranslationGetTranslationStatus200Response + | DocumentTranslationGetTranslationStatus401Response + | DocumentTranslationGetTranslationStatus404Response + | DocumentTranslationGetTranslationStatus429Response + | DocumentTranslationGetTranslationStatus500Response + | DocumentTranslationGetTranslationStatus503Response + | DocumentTranslationCancelTranslation200Response + | DocumentTranslationCancelTranslation401Response + | DocumentTranslationCancelTranslation404Response + | DocumentTranslationCancelTranslation429Response + | DocumentTranslationCancelTranslation500Response + | DocumentTranslationCancelTranslation503Response + | DocumentTranslationGetDocumentsStatus200Response + | DocumentTranslationGetDocumentsStatus400Response + | DocumentTranslationGetDocumentsStatus401Response + | DocumentTranslationGetDocumentsStatus404Response + | DocumentTranslationGetDocumentsStatus429Response + | DocumentTranslationGetDocumentsStatus500Response + | DocumentTranslationGetDocumentsStatus503Response + | DocumentTranslationGetSupportedDocumentFormats200Response + | DocumentTranslationGetSupportedDocumentFormats429Response + | DocumentTranslationGetSupportedDocumentFormats500Response + | DocumentTranslationGetSupportedDocumentFormats503Response + | DocumentTranslationGetSupportedGlossaryFormats200Response + | DocumentTranslationGetSupportedGlossaryFormats429Response + | DocumentTranslationGetSupportedGlossaryFormats500Response + | DocumentTranslationGetSupportedGlossaryFormats503Response + | DocumentTranslationGetSupportedStorageSources200Response + | DocumentTranslationGetSupportedStorageSources429Response + | DocumentTranslationGetSupportedStorageSources500Response + | DocumentTranslationGetSupportedStorageSources503Response, +): response is + | DocumentTranslationStartTranslation400Response + | DocumentTranslationStartTranslation401Response + | DocumentTranslationStartTranslation429Response + | DocumentTranslationStartTranslation500Response + | DocumentTranslationStartTranslation503Response + | DocumentTranslationGetTranslationsStatus400Response + | DocumentTranslationGetTranslationsStatus401Response + | DocumentTranslationGetTranslationsStatus429Response + | DocumentTranslationGetTranslationsStatus500Response + | DocumentTranslationGetTranslationsStatus503Response + | DocumentTranslationGetDocumentStatus401Response + | DocumentTranslationGetDocumentStatus404Response + | DocumentTranslationGetDocumentStatus429Response + | DocumentTranslationGetDocumentStatus500Response + | DocumentTranslationGetDocumentStatus503Response + | DocumentTranslationGetTranslationStatus401Response + | DocumentTranslationGetTranslationStatus404Response + | DocumentTranslationGetTranslationStatus429Response + | DocumentTranslationGetTranslationStatus500Response + | DocumentTranslationGetTranslationStatus503Response + | DocumentTranslationCancelTranslation401Response + | DocumentTranslationCancelTranslation404Response + | DocumentTranslationCancelTranslation429Response + | DocumentTranslationCancelTranslation500Response + | DocumentTranslationCancelTranslation503Response + | DocumentTranslationGetDocumentsStatus400Response + | DocumentTranslationGetDocumentsStatus401Response + | DocumentTranslationGetDocumentsStatus404Response + | DocumentTranslationGetDocumentsStatus429Response + | DocumentTranslationGetDocumentsStatus500Response + | DocumentTranslationGetDocumentsStatus503Response + | DocumentTranslationGetSupportedDocumentFormats429Response + | DocumentTranslationGetSupportedDocumentFormats500Response + | DocumentTranslationGetSupportedDocumentFormats503Response + | DocumentTranslationGetSupportedGlossaryFormats429Response + | DocumentTranslationGetSupportedGlossaryFormats500Response + | DocumentTranslationGetSupportedGlossaryFormats503Response + | DocumentTranslationGetSupportedStorageSources429Response + | DocumentTranslationGetSupportedStorageSources500Response + | DocumentTranslationGetSupportedStorageSources503Response { + const lroOriginal = response.headers["x-ms-original-url"]; + const url = new URL(lroOriginal ?? response.request.url); + const method = response.request.method; + let pathDetails = responseMap[`${method} ${url.pathname}`]; + if (!pathDetails) { + pathDetails = getParametrizedPathSuccess(method, url.pathname); + } + return !pathDetails.includes(response.status); +} + +function getParametrizedPathSuccess(method: string, path: string): string[] { + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(responseMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/logger.ts b/sdk/documenttranslator/ai-document-translator-rest/src/logger.ts new file mode 100644 index 000000000000..0f5e8a7eb852 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("ai-document-translator"); diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/models.ts b/sdk/documenttranslator/ai-document-translator-rest/src/models.ts index a72b27877428..1a07bcabb050 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/src/models.ts +++ b/sdk/documenttranslator/ai-document-translator-rest/src/models.ts @@ -1,24 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +/** Translation job submission batch request */ export interface StartTranslationDetails { /** The input list of documents or folders containing documents */ - inputs: BatchRequest[]; + inputs: Array; } +/** Definition for the input batch translation request */ export interface BatchRequest { /** Source of the input documents */ source: SourceInput; /** Location of the destination for the output */ - targets: TargetInput[]; + targets: Array; /** Storage type of the input documents source string */ - storageType?: StorageInputType; + storageType?: "Folder" | "File"; } +/** Source of the input documents */ export interface SourceInput { /** Location of the folder / container or single file with your documents */ sourceUrl: string; - /** */ filter?: DocumentFilter; /** * Language code @@ -26,7 +28,7 @@ export interface SourceInput { */ language?: string; /** Storage Source */ - storageSource?: StorageSource; + storageSource?: "AzureBlob"; } export interface DocumentFilter { @@ -42,6 +44,7 @@ export interface DocumentFilter { suffix?: string; } +/** Destination for the finished translated documents */ export interface TargetInput { /** Location of the folder / container with your documents */ targetUrl: string; @@ -50,11 +53,12 @@ export interface TargetInput { /** Target Language */ language: string; /** List of Glossary */ - glossaries?: Glossary[]; + glossaries?: Array; /** Storage Source */ - storageSource?: StorageSource; + storageSource?: "AzureBlob"; } +/** Glossary / translation memory for the request */ export interface Glossary { /** * Location of the glossary. @@ -68,155 +72,5 @@ export interface Glossary { /** Optional Version. If not specified, default is used. */ version?: string; /** Storage Source */ - storageSource?: StorageSource; + storageSource?: "AzureBlob"; } - -export interface TranslationErrorResponse { - /** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */ - error?: TranslationError; -} - -export interface TranslationError { - /** Enums containing high level error codes. */ - code: TranslationErrorCode; - /** Gets high level error message. */ - message: string; - /** - * Gets the source of the error. - * For example it would be "documents" or "document id" in case of invalid document. - */ - target?: string; - /** - * New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. - * This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested). - */ - innerError?: InnerTranslationError; -} - -export interface InnerTranslationError { - /** Gets code error string. */ - code: string; - /** Gets high level error message. */ - message: string; - /** - * Gets the source of the error. - * For example it would be "documents" or "document id" in case of invalid document. - */ - target?: string; - /** - * New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. - * This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested). - */ - innerError?: InnerTranslationError; -} - -export interface TranslationsStatus { - /** The summary status of individual operation */ - value: TranslationStatus[]; - /** Url for the next page. Null if no more pages available */ - nextLink?: string; -} - -export interface TranslationStatus { - /** Id of the operation. */ - id: string; - /** Operation created date time */ - createdDateTimeUtc: Date; - /** Date time in which the operation's status has been updated */ - lastActionDateTimeUtc: Date; - /** List of possible statuses for job or document */ - status: Status; - /** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */ - error?: TranslationError; - /** */ - summary: StatusSummary; -} - -export interface StatusSummary { - /** Total count */ - total: number; - /** Failed count */ - failed: number; - /** Number of Success */ - success: number; - /** Number of in progress */ - inProgress: number; - /** Count of not yet started */ - notYetStarted: number; - /** Number of cancelled */ - cancelled: number; - /** Total characters charged by the API */ - totalCharacterCharged: number; -} - -export interface DocumentStatus { - /** Location of the document or folder */ - path?: string; - /** Location of the source document */ - sourcePath: string; - /** Operation created date time */ - createdDateTimeUtc: Date; - /** Date time in which the operation's status has been updated */ - lastActionDateTimeUtc: Date; - /** List of possible statuses for job or document */ - status: Status; - /** To language */ - to: string; - /** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */ - error?: TranslationError; - /** Progress of the translation if available */ - progress: number; - /** Document Id */ - id: string; - /** Character charged by the API */ - characterCharged?: number; -} - -export interface DocumentsStatus { - /** The detail status of individual documents */ - value: DocumentStatus[]; - /** Url for the next page. Null if no more pages available */ - nextLink?: string; -} - -export interface SupportedFileFormats { - /** list of objects */ - value: FileFormat[]; -} - -export interface FileFormat { - /** Name of the format */ - format: string; - /** Supported file extension for this format */ - fileExtensions: string[]; - /** Supported Content-Types for this format */ - contentTypes: string[]; - /** Default version if none is specified */ - defaultVersion?: string; - /** Supported Version */ - versions?: string[]; -} - -export interface SupportedStorageSources { - /** list of objects */ - value: "AzureBlob"[]; -} - -export type StorageSource = "AzureBlob"; -export type StorageInputType = "Folder" | "File"; -export type TranslationErrorCode = - | "InvalidRequest" - | "InvalidArgument" - | "InternalServerError" - | "ServiceUnavailable" - | "ResourceNotFound" - | "Unauthorized" - | "RequestRateTooHigh"; -export type Status = - | "NotStarted" - | "Running" - | "Succeeded" - | "Failed" - | "Cancelled" - | "Cancelling" - | "ValidationFailed"; diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/outputModels.ts b/sdk/documenttranslator/ai-document-translator-rest/src/outputModels.ts new file mode 100644 index 000000000000..9026ec3dc21c --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/src/outputModels.ts @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Contains unified error information used for HTTP responses across any Cognitive Service. Instances + * can be created either through Microsoft.CloudAI.Containers.HttpStatusExceptionV2 or by returning it directly from + * a controller. + */ +export interface TranslationErrorResponseOutput { + /** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */ + error?: TranslationErrorOutput; +} + +/** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */ +export interface TranslationErrorOutput { + /** Enums containing high level error codes. */ + code: + | "InvalidRequest" + | "InvalidArgument" + | "InternalServerError" + | "ServiceUnavailable" + | "ResourceNotFound" + | "Unauthorized" + | "RequestRateTooHigh"; + /** Gets high level error message. */ + message: string; + /** + * Gets the source of the error. + * For example it would be "documents" or "document id" in case of invalid document. + */ + readonly target?: string; + /** + * New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. + * This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested). + */ + innerError?: InnerTranslationErrorOutput; +} + +/** + * New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. + * This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested). + */ +export interface InnerTranslationErrorOutput { + /** Gets code error string. */ + code: string; + /** Gets high level error message. */ + message: string; + /** + * Gets the source of the error. + * For example it would be "documents" or "document id" in case of invalid document. + */ + readonly target?: string; + /** + * New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. + * This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested). + */ + innerError?: InnerTranslationErrorOutput; +} + +/** Translation job Status Response */ +export interface TranslationsStatusOutput { + /** The summary status of individual operation */ + value: Array; + /** Url for the next page. Null if no more pages available */ + "@nextLink"?: string; +} + +/** Translation job status response */ +export interface TranslationStatusOutput { + /** + * Id of the operation. + * + * Value may contain a UUID + */ + id: string; + /** Operation created date time */ + createdDateTimeUtc: string; + /** Date time in which the operation's status has been updated */ + lastActionDateTimeUtc: string; + /** List of possible statuses for job or document */ + status: + | "NotStarted" + | "Running" + | "Succeeded" + | "Failed" + | "Cancelled" + | "Cancelling" + | "ValidationFailed"; + /** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */ + error?: TranslationErrorOutput; + summary: StatusSummaryOutput; +} + +export interface StatusSummaryOutput { + /** Total count */ + total: number; + /** Failed count */ + failed: number; + /** Number of Success */ + success: number; + /** Number of in progress */ + inProgress: number; + /** Count of not yet started */ + notYetStarted: number; + /** Number of cancelled */ + cancelled: number; + /** Total characters charged by the API */ + totalCharacterCharged: number; +} + +/** Document Status Response */ +export interface DocumentStatusOutput { + /** Location of the document or folder */ + path?: string; + /** Location of the source document */ + sourcePath: string; + /** Operation created date time */ + createdDateTimeUtc: string; + /** Date time in which the operation's status has been updated */ + lastActionDateTimeUtc: string; + /** List of possible statuses for job or document */ + status: + | "NotStarted" + | "Running" + | "Succeeded" + | "Failed" + | "Cancelled" + | "Cancelling" + | "ValidationFailed"; + /** To language */ + to: string; + /** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */ + error?: TranslationErrorOutput; + /** Progress of the translation if available */ + progress: number; + /** + * Document Id + * + * Value may contain a UUID + */ + id: string; + /** Character charged by the API */ + characterCharged?: number; +} + +/** Documents Status Response */ +export interface DocumentsStatusOutput { + /** The detail status of individual documents */ + value: Array; + /** Url for the next page. Null if no more pages available */ + "@nextLink"?: string; +} + +/** Base type for List return in our api */ +export interface SupportedFileFormatsOutput { + /** list of objects */ + value: Array; +} + +export interface FileFormatOutput { + /** Name of the format */ + format: string; + /** Supported file extension for this format */ + fileExtensions: Array; + /** Supported Content-Types for this format */ + contentTypes: Array; + /** Default version if none is specified */ + defaultVersion?: string; + /** Supported Version */ + versions?: Array; +} + +/** Base type for List return in our api */ +export interface SupportedStorageSourcesOutput { + /** list of objects */ + value: Array<"AzureBlob">; +} diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/paginateHelper.ts b/sdk/documenttranslator/ai-document-translator-rest/src/paginateHelper.ts new file mode 100644 index 000000000000..9ea946d9d6c5 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/src/paginateHelper.ts @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError } from "@azure-rest/core-client"; + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + +/** + * Helper type to extract the type of an array + */ +export type GetArrayType = T extends Array ? TData : never; + +/** + * The type of a custom function that defines how to get a page and a link to the next one if any. + */ +export type GetPage = (pageLink: string) => Promise<{ + page: TPage; + nextPageLink?: string; +}>; + +/** + * Options for the paging helper + */ +export interface PagingOptions { + /** + * Custom function to extract pagination details for crating the PagedAsyncIterableIterator + */ + customGetPage?: GetPage[]>; +} + +/** + * Helper type to infer the Type of the paged elements from the response type + * This type is generated based on the swagger information for x-ms-pageable + * specifically on the itemName property which indicates the property of the response + * where the page items are found. The default value is `value`. + * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter + */ +export type PaginateReturn = TResult extends { + body: { value?: infer TPage }; +} + ? GetArrayType + : Array; + +/** + * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension + * @param client - Client to use for sending the next page requests + * @param initialResponse - Initial response containing the nextLink and current page of elements + * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results + * @returns - PagedAsyncIterableIterator to iterate the elements + */ +export function paginate( + client: Client, + initialResponse: TResponse, + options: PagingOptions = {}, +): PagedAsyncIterableIterator> { + // Extract element type from initial response + type TElement = PaginateReturn; + let firstRun = true; + const itemName = "value"; + const nextLinkName = "nextLink"; + const { customGetPage } = options; + const pagedResult: PagedResult = { + firstPageLink: "", + getPage: + typeof customGetPage === "function" + ? customGetPage + : async (pageLink: string) => { + const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get(); + firstRun = false; + checkPagingRequest(result); + const nextLink = getNextLink(result.body, nextLinkName); + const values = getElements(result.body, itemName); + return { + page: values, + nextPageLink: nextLink, + }; + }, + }; + + return getPagedAsyncIterator(pagedResult); +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined") { + throw new Error(`Body Property ${nextLinkName} should be a string or undefined`); + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + + // value has to be an array according to the x-ms-pageable extension. + // The fact that this must be an array is used above to calculate the + // type of elements in the page in PaginateReturn + if (!Array.isArray(value)) { + throw new Error( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse): void { + const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"]; + if (!Http2xxStatusCodes.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/parameters.ts b/sdk/documenttranslator/ai-document-translator-rest/src/parameters.ts index d88aa204ca1f..605e6426b3eb 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/src/parameters.ts +++ b/sdk/documenttranslator/ai-document-translator-rest/src/parameters.ts @@ -4,13 +4,22 @@ import type { RequestParameters } from "@azure-rest/core-client"; import type { StartTranslationDetails } from "./models.js"; -export interface StartTranslationBodyParam { +export interface DocumentTranslationStartTranslationBodyParam { + /** request details */ body: StartTranslationDetails; } -export type StartTranslationParameters = RequestParameters & StartTranslationBodyParam; +export interface DocumentTranslationStartTranslationMediaTypesParam { + /** Request content type */ + contentType?: "application/json" | "text/json" | "application/*+json"; +} + +export type DocumentTranslationStartTranslationParameters = + DocumentTranslationStartTranslationMediaTypesParam & + DocumentTranslationStartTranslationBodyParam & + RequestParameters; -export interface GetTranslationsStatusQueryParamProperties { +export interface DocumentTranslationGetTranslationsStatusQueryParamProperties { /** * $top indicates the total number of records the user wants to be returned across all pages. * @@ -30,33 +39,34 @@ export interface GetTranslationsStatusQueryParamProperties { */ $skip?: number; /** - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size. */ $maxpagesize?: number; /** Ids to use in filtering */ - ids?: string[]; + ids?: Array; /** Statuses to use in filtering */ - statuses?: string[]; + statuses?: Array; /** the start datetime to get items after */ - createdDateTimeUtcStart?: Date; + createdDateTimeUtcStart?: Date | string; /** the end datetime to get items before */ - createdDateTimeUtcEnd?: Date; + createdDateTimeUtcEnd?: Date | string; /** the sorting query for the collection (ex: 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc') */ - $orderBy?: string[]; + $orderBy?: Array; } -export interface GetTranslationsStatusQueryParam { - queryParameters?: GetTranslationsStatusQueryParamProperties; +export interface DocumentTranslationGetTranslationsStatusQueryParam { + queryParameters?: DocumentTranslationGetTranslationsStatusQueryParamProperties; } -export type GetTranslationsStatusParameters = RequestParameters & GetTranslationsStatusQueryParam; -export type GetDocumentStatusParameters = RequestParameters; -export type GetTranslationStatusParameters = RequestParameters; -export type CancelTranslationParameters = RequestParameters; +export type DocumentTranslationGetTranslationsStatusParameters = + DocumentTranslationGetTranslationsStatusQueryParam & RequestParameters; +export type DocumentTranslationGetDocumentStatusParameters = RequestParameters; +export type DocumentTranslationGetTranslationStatusParameters = RequestParameters; +export type DocumentTranslationCancelTranslationParameters = RequestParameters; -export interface GetDocumentsStatusQueryParamProperties { +export interface DocumentTranslationGetDocumentsStatusQueryParamProperties { /** * $top indicates the total number of records the user wants to be returned across all pages. * @@ -76,28 +86,29 @@ export interface GetDocumentsStatusQueryParamProperties { */ $skip?: number; /** - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size. */ $maxpagesize?: number; /** Ids to use in filtering */ - ids?: string[]; + ids?: Array; /** Statuses to use in filtering */ - statuses?: string[]; + statuses?: Array; /** the start datetime to get items after */ - createdDateTimeUtcStart?: Date; + createdDateTimeUtcStart?: Date | string; /** the end datetime to get items before */ - createdDateTimeUtcEnd?: Date; + createdDateTimeUtcEnd?: Date | string; /** the sorting query for the collection (ex: 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc') */ - $orderBy?: string[]; + $orderBy?: Array; } -export interface GetDocumentsStatusQueryParam { - queryParameters?: GetDocumentsStatusQueryParamProperties; +export interface DocumentTranslationGetDocumentsStatusQueryParam { + queryParameters?: DocumentTranslationGetDocumentsStatusQueryParamProperties; } -export type GetDocumentsStatusParameters = RequestParameters & GetDocumentsStatusQueryParam; -export type GetSupportedDocumentFormatsParameters = RequestParameters; -export type GetSupportedGlossaryFormatsParameters = RequestParameters; -export type GetSupportedStorageSourcesParameters = RequestParameters; +export type DocumentTranslationGetDocumentsStatusParameters = + DocumentTranslationGetDocumentsStatusQueryParam & RequestParameters; +export type DocumentTranslationGetSupportedDocumentFormatsParameters = RequestParameters; +export type DocumentTranslationGetSupportedGlossaryFormatsParameters = RequestParameters; +export type DocumentTranslationGetSupportedStorageSourcesParameters = RequestParameters; diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/pollingHelper.ts b/sdk/documenttranslator/ai-document-translator-rest/src/pollingHelper.ts new file mode 100644 index 000000000000..a2668fc5d9c7 --- /dev/null +++ b/sdk/documenttranslator/ai-document-translator-rest/src/pollingHelper.ts @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { Client, HttpResponse } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; +import type { + CancelOnProgress, + CreateHttpPollerOptions, + RunningOperation, + OperationResponse, + OperationState, +} from "@azure/core-lro"; +import { createHttpPoller } from "@azure/core-lro"; + +/** + * A simple poller that can be used to poll a long running operation. + */ +export interface SimplePollerLike, TResult> { + /** + * Returns true if the poller has finished polling. + */ + isDone(): boolean; + /** + * Returns the state of the operation. + */ + getOperationState(): TState; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult(): TResult | undefined; + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + */ + poll(options?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback: (state: TState) => void): CancelOnProgress; + + /** + * Returns a promise that could be used for serialized version of the poller's operation + * by invoking the operation's serialize method. + */ + serialize(): Promise; + + /** + * Wait the poller to be submitted. + */ + submitted(): Promise; + + /** + * Returns a string representation of the poller's operation. Similar to serialize but returns a string. + * @deprecated Use serialize() instead. + */ + toString(): string; + + /** + * Stops the poller from continuing to poll. Please note this will only stop the client-side polling + * @deprecated Use abortSignal to stop polling instead. + */ + stopPolling(): void; + + /** + * Returns true if the poller is stopped. + * @deprecated Use abortSignal status to track this instead. + */ + isStopped(): boolean; +} + +/** + * Helper function that builds a Poller object to help polling a long running operation. + * @param client - Client to use for sending the request to get additional pages. + * @param initialResponse - The initial response. + * @param options - Options to set a resume state or custom polling interval. + * @returns - A poller object to poll for operation state updates and eventually get the final response. + */ +export async function getLongRunningPoller( + client: Client, + initialResponse: TResult, + options: CreateHttpPollerOptions> = {}, +): Promise, TResult>> { + const abortController = new AbortController(); + const poller: RunningOperation = { + sendInitialRequest: async () => { + // In the case of Rest Clients we are building the LRO poller object from a response that's the reason + // we are not triggering the initial request here, just extracting the information from the + // response we were provided. + return getLroResponse(initialResponse); + }, + sendPollRequest: async (path: string, pollOptions?: { abortSignal?: AbortSignalLike }) => { + // This is the callback that is going to be called to poll the service + // to get the latest status. We use the client provided and the polling path + // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location + // depending on the lro pattern that the service implements. If non is provided we default to the initial path. + function abortListener(): void { + abortController.abort(); + } + const inputAbortSignal = pollOptions?.abortSignal; + const abortSignal = abortController.signal; + if (inputAbortSignal?.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + response = await client + .pathUnchecked(path ?? initialResponse.request.url) + .get({ abortSignal }); + } finally { + inputAbortSignal?.removeEventListener("abort", abortListener); + } + const lroResponse = getLroResponse(response as TResult); + lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url; + return lroResponse; + }, + }; + + options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true; + const httpPoller = createHttpPoller(poller, options); + const simplePoller: SimplePollerLike, TResult> = { + isDone() { + return httpPoller.isDone; + }, + isStopped() { + return abortController.signal.aborted; + }, + getOperationState() { + if (!httpPoller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return httpPoller.operationState; + }, + getResult() { + return httpPoller.result; + }, + toString() { + if (!httpPoller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return JSON.stringify({ + state: httpPoller.operationState, + }); + }, + stopPolling() { + abortController.abort(); + }, + onProgress: httpPoller.onProgress, + poll: httpPoller.poll, + pollUntilDone: httpPoller.pollUntilDone, + serialize: httpPoller.serialize, + submitted: httpPoller.submitted, + }; + return simplePoller; +} + +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResult, +): OperationResponse { + if (Number.isNaN(response.status)) { + throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} diff --git a/sdk/documenttranslator/ai-document-translator-rest/src/responses.ts b/sdk/documenttranslator/ai-document-translator-rest/src/responses.ts index 4f5b0b4f7122..0177e184c805 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/src/responses.ts +++ b/sdk/documenttranslator/ai-document-translator-rest/src/responses.ts @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - TranslationErrorResponse, - TranslationsStatus, - DocumentStatus, - TranslationStatus, - DocumentsStatus, - SupportedFileFormats, - SupportedStorageSources, -} from "./models.js"; -import type { HttpResponse } from "@azure-rest/core-client"; import type { RawHttpHeaders } from "@azure/core-rest-pipeline"; - -export interface StartTranslation202Headers { +import type { HttpResponse } from "@azure-rest/core-client"; +import type { + TranslationErrorResponseOutput, + TranslationsStatusOutput, + DocumentStatusOutput, + TranslationStatusOutput, + DocumentsStatusOutput, + SupportedFileFormatsOutput, + SupportedStorageSourcesOutput, +} from "./outputModels.js"; + +export interface DocumentTranslationStartTranslation202Headers { /** Location of batch the operation */ "operation-location"?: string; } @@ -29,9 +29,9 @@ export interface StartTranslation202Headers { * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique. */ -export interface StartTranslation202Response extends HttpResponse { +export interface DocumentTranslationStartTranslation202Response extends HttpResponse { status: "202"; - headers: RawHttpHeaders & StartTranslation202Headers; + headers: RawHttpHeaders & DocumentTranslationStartTranslation202Headers; } /** @@ -45,9 +45,9 @@ export interface StartTranslation202Response extends HttpResponse { * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique. */ -export interface StartTranslation400Response extends HttpResponse { +export interface DocumentTranslationStartTranslation400Response extends HttpResponse { status: "400"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -61,9 +61,9 @@ export interface StartTranslation400Response extends HttpResponse { * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique. */ -export interface StartTranslation401Response extends HttpResponse { +export interface DocumentTranslationStartTranslation401Response extends HttpResponse { status: "401"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -77,9 +77,9 @@ export interface StartTranslation401Response extends HttpResponse { * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique. */ -export interface StartTranslation429Response extends HttpResponse { +export interface DocumentTranslationStartTranslation429Response extends HttpResponse { status: "429"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -93,9 +93,9 @@ export interface StartTranslation429Response extends HttpResponse { * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique. */ -export interface StartTranslation500Response extends HttpResponse { +export interface DocumentTranslationStartTranslation500Response extends HttpResponse { status: "500"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -109,14 +109,14 @@ export interface StartTranslation500Response extends HttpResponse { * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique. */ -export interface StartTranslation503Response extends HttpResponse { +export interface DocumentTranslationStartTranslation503Response extends HttpResponse { status: "503"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } -export interface GetTranslationsStatus200Headers { +export interface DocumentTranslationGetTranslationsStatus200Headers { /** Indicates how long to wait before making a new request. */ - "retry-after"?: string; + "retry-after"?: number; /** The ETag response-header field provides the current value of the entity tag for the requested variant. Used with If-Match, If-None-Match and If-Range to implement optimistic concurrency control. */ etag?: string; } @@ -132,7 +132,7 @@ export interface GetTranslationsStatus200Headers { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -146,10 +146,10 @@ export interface GetTranslationsStatus200Headers { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetTranslationsStatus200Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus200Response extends HttpResponse { status: "200"; - body: TranslationsStatus; - headers: RawHttpHeaders & GetTranslationsStatus200Headers; + body: TranslationsStatusOutput; + headers: RawHttpHeaders & DocumentTranslationGetTranslationsStatus200Headers; } /** @@ -163,7 +163,7 @@ export interface GetTranslationsStatus200Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -177,9 +177,9 @@ export interface GetTranslationsStatus200Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetTranslationsStatus400Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus400Response extends HttpResponse { status: "400"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -193,7 +193,7 @@ export interface GetTranslationsStatus400Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -207,9 +207,9 @@ export interface GetTranslationsStatus400Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetTranslationsStatus401Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus401Response extends HttpResponse { status: "401"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -223,7 +223,7 @@ export interface GetTranslationsStatus401Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -237,9 +237,9 @@ export interface GetTranslationsStatus401Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetTranslationsStatus429Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus429Response extends HttpResponse { status: "429"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -253,7 +253,7 @@ export interface GetTranslationsStatus429Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -267,9 +267,9 @@ export interface GetTranslationsStatus429Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetTranslationsStatus500Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus500Response extends HttpResponse { status: "500"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -283,7 +283,7 @@ export interface GetTranslationsStatus500Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -297,58 +297,58 @@ export interface GetTranslationsStatus500Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetTranslationsStatus503Response extends HttpResponse { +export interface DocumentTranslationGetTranslationsStatus503Response extends HttpResponse { status: "503"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } -export interface GetDocumentStatus200Headers { +export interface DocumentTranslationGetDocumentStatus200Headers { /** Indicates how long to wait before making a new request. */ - "retry-after"?: string; + "retry-after"?: number; /** The ETag response-header field provides the current value of the entity tag for the requested variant. Used with If-Match, If-None-Match and If-Range to implement optimistic concurrency control. */ etag?: string; } /** Returns the translation status for a specific document based on the request Id and document Id. */ -export interface GetDocumentStatus200Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus200Response extends HttpResponse { status: "200"; - body: DocumentStatus; - headers: RawHttpHeaders & GetDocumentStatus200Headers; + body: DocumentStatusOutput; + headers: RawHttpHeaders & DocumentTranslationGetDocumentStatus200Headers; } /** Returns the translation status for a specific document based on the request Id and document Id. */ -export interface GetDocumentStatus401Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus401Response extends HttpResponse { status: "401"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** Returns the translation status for a specific document based on the request Id and document Id. */ -export interface GetDocumentStatus404Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus404Response extends HttpResponse { status: "404"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** Returns the translation status for a specific document based on the request Id and document Id. */ -export interface GetDocumentStatus429Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus429Response extends HttpResponse { status: "429"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** Returns the translation status for a specific document based on the request Id and document Id. */ -export interface GetDocumentStatus500Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus500Response extends HttpResponse { status: "500"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** Returns the translation status for a specific document based on the request Id and document Id. */ -export interface GetDocumentStatus503Response extends HttpResponse { +export interface DocumentTranslationGetDocumentStatus503Response extends HttpResponse { status: "503"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } -export interface GetTranslationStatus200Headers { +export interface DocumentTranslationGetTranslationStatus200Headers { /** Indicates how long to wait before making a new request. */ - "retry-after"?: string; + "retry-after"?: number; /** The ETag response-header field provides the current value of the entity tag for the requested variant. Used with If-Match, If-None-Match and If-Range to implement optimistic concurrency control. */ etag?: string; } @@ -357,55 +357,55 @@ export interface GetTranslationStatus200Headers { * Returns the status for a document translation request. * The status includes the overall request status, as well as the status for documents that are being translated as part of that request. */ -export interface GetTranslationStatus200Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus200Response extends HttpResponse { status: "200"; - body: TranslationStatus; - headers: RawHttpHeaders & GetTranslationStatus200Headers; + body: TranslationStatusOutput; + headers: RawHttpHeaders & DocumentTranslationGetTranslationStatus200Headers; } /** * Returns the status for a document translation request. * The status includes the overall request status, as well as the status for documents that are being translated as part of that request. */ -export interface GetTranslationStatus401Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus401Response extends HttpResponse { status: "401"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** * Returns the status for a document translation request. * The status includes the overall request status, as well as the status for documents that are being translated as part of that request. */ -export interface GetTranslationStatus404Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus404Response extends HttpResponse { status: "404"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** * Returns the status for a document translation request. * The status includes the overall request status, as well as the status for documents that are being translated as part of that request. */ -export interface GetTranslationStatus429Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus429Response extends HttpResponse { status: "429"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** * Returns the status for a document translation request. * The status includes the overall request status, as well as the status for documents that are being translated as part of that request. */ -export interface GetTranslationStatus500Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus500Response extends HttpResponse { status: "500"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** * Returns the status for a document translation request. * The status includes the overall request status, as well as the status for documents that are being translated as part of that request. */ -export interface GetTranslationStatus503Response extends HttpResponse { +export interface DocumentTranslationGetTranslationStatus503Response extends HttpResponse { status: "503"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -415,9 +415,9 @@ export interface GetTranslationStatus503Response extends HttpResponse { * All documents that have completed translation will not be cancelled and will be charged. * All pending documents will be cancelled if possible. */ -export interface CancelTranslation200Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation200Response extends HttpResponse { status: "200"; - body: TranslationStatus; + body: TranslationStatusOutput; } /** @@ -427,9 +427,9 @@ export interface CancelTranslation200Response extends HttpResponse { * All documents that have completed translation will not be cancelled and will be charged. * All pending documents will be cancelled if possible. */ -export interface CancelTranslation401Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation401Response extends HttpResponse { status: "401"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -439,9 +439,9 @@ export interface CancelTranslation401Response extends HttpResponse { * All documents that have completed translation will not be cancelled and will be charged. * All pending documents will be cancelled if possible. */ -export interface CancelTranslation404Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation404Response extends HttpResponse { status: "404"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -451,9 +451,9 @@ export interface CancelTranslation404Response extends HttpResponse { * All documents that have completed translation will not be cancelled and will be charged. * All pending documents will be cancelled if possible. */ -export interface CancelTranslation429Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation429Response extends HttpResponse { status: "429"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -463,9 +463,9 @@ export interface CancelTranslation429Response extends HttpResponse { * All documents that have completed translation will not be cancelled and will be charged. * All pending documents will be cancelled if possible. */ -export interface CancelTranslation500Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation500Response extends HttpResponse { status: "500"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -475,14 +475,14 @@ export interface CancelTranslation500Response extends HttpResponse { * All documents that have completed translation will not be cancelled and will be charged. * All pending documents will be cancelled if possible. */ -export interface CancelTranslation503Response extends HttpResponse { +export interface DocumentTranslationCancelTranslation503Response extends HttpResponse { status: "503"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } -export interface GetDocumentsStatus200Headers { +export interface DocumentTranslationGetDocumentsStatus200Headers { /** Indicates how long to wait before making a new request. */ - "retry-after"?: string; + "retry-after"?: number; /** The ETag response-header field provides the current value of the entity tag for the requested variant. Used with If-Match, If-None-Match and If-Range to implement optimistic concurrency control. */ etag?: string; } @@ -497,7 +497,7 @@ export interface GetDocumentsStatus200Headers { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -509,10 +509,10 @@ export interface GetDocumentsStatus200Headers { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetDocumentsStatus200Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus200Response extends HttpResponse { status: "200"; - body: DocumentsStatus; - headers: RawHttpHeaders & GetDocumentsStatus200Headers; + body: DocumentsStatusOutput; + headers: RawHttpHeaders & DocumentTranslationGetDocumentsStatus200Headers; } /** @@ -525,7 +525,7 @@ export interface GetDocumentsStatus200Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -537,9 +537,9 @@ export interface GetDocumentsStatus200Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetDocumentsStatus400Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus400Response extends HttpResponse { status: "400"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -552,7 +552,7 @@ export interface GetDocumentsStatus400Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -564,9 +564,9 @@ export interface GetDocumentsStatus400Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetDocumentsStatus401Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus401Response extends HttpResponse { status: "401"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -579,7 +579,7 @@ export interface GetDocumentsStatus401Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -591,9 +591,9 @@ export interface GetDocumentsStatus401Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetDocumentsStatus404Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus404Response extends HttpResponse { status: "404"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -606,7 +606,7 @@ export interface GetDocumentsStatus404Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -618,9 +618,9 @@ export interface GetDocumentsStatus404Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetDocumentsStatus429Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus429Response extends HttpResponse { status: "429"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -633,7 +633,7 @@ export interface GetDocumentsStatus429Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -645,9 +645,9 @@ export interface GetDocumentsStatus429Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetDocumentsStatus500Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus500Response extends HttpResponse { status: "500"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** @@ -660,7 +660,7 @@ export interface GetDocumentsStatus500Response extends HttpResponse { * * $top indicates the total number of records the user wants to be returned across all pages. * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. - * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), '\@nextLink' will contain the link to the next page. * * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc"). * The default sorting is descending by createdDateTimeUtc. @@ -672,121 +672,121 @@ export interface GetDocumentsStatus500Response extends HttpResponse { * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options. * This reduces the risk of the client making assumptions about the data returned. */ -export interface GetDocumentsStatus503Response extends HttpResponse { +export interface DocumentTranslationGetDocumentsStatus503Response extends HttpResponse { status: "503"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } -export interface GetSupportedDocumentFormats200Headers { +export interface DocumentTranslationGetSupportedDocumentFormats200Headers { /** Indicates how long to wait before making a new request. */ - "retry-after"?: string; + "retry-after"?: number; } /** * The list of supported document formats supported by the Document Translation service. * The list includes the common file extension, as well as the content-type if using the upload API. */ -export interface GetSupportedDocumentFormats200Response extends HttpResponse { +export interface DocumentTranslationGetSupportedDocumentFormats200Response extends HttpResponse { status: "200"; - body: SupportedFileFormats; - headers: RawHttpHeaders & GetSupportedDocumentFormats200Headers; + body: SupportedFileFormatsOutput; + headers: RawHttpHeaders & DocumentTranslationGetSupportedDocumentFormats200Headers; } /** * The list of supported document formats supported by the Document Translation service. * The list includes the common file extension, as well as the content-type if using the upload API. */ -export interface GetSupportedDocumentFormats429Response extends HttpResponse { +export interface DocumentTranslationGetSupportedDocumentFormats429Response extends HttpResponse { status: "429"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** * The list of supported document formats supported by the Document Translation service. * The list includes the common file extension, as well as the content-type if using the upload API. */ -export interface GetSupportedDocumentFormats500Response extends HttpResponse { +export interface DocumentTranslationGetSupportedDocumentFormats500Response extends HttpResponse { status: "500"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** * The list of supported document formats supported by the Document Translation service. * The list includes the common file extension, as well as the content-type if using the upload API. */ -export interface GetSupportedDocumentFormats503Response extends HttpResponse { +export interface DocumentTranslationGetSupportedDocumentFormats503Response extends HttpResponse { status: "503"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } -export interface GetSupportedGlossaryFormats200Headers { +export interface DocumentTranslationGetSupportedGlossaryFormats200Headers { /** Indicates how long to wait before making a new request. */ - "retry-after"?: string; + "retry-after"?: number; } /** * The list of supported glossary formats supported by the Document Translation service. * The list includes the common file extension used. */ -export interface GetSupportedGlossaryFormats200Response extends HttpResponse { +export interface DocumentTranslationGetSupportedGlossaryFormats200Response extends HttpResponse { status: "200"; - body: SupportedFileFormats; - headers: RawHttpHeaders & GetSupportedGlossaryFormats200Headers; + body: SupportedFileFormatsOutput; + headers: RawHttpHeaders & DocumentTranslationGetSupportedGlossaryFormats200Headers; } /** * The list of supported glossary formats supported by the Document Translation service. * The list includes the common file extension used. */ -export interface GetSupportedGlossaryFormats429Response extends HttpResponse { +export interface DocumentTranslationGetSupportedGlossaryFormats429Response extends HttpResponse { status: "429"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** * The list of supported glossary formats supported by the Document Translation service. * The list includes the common file extension used. */ -export interface GetSupportedGlossaryFormats500Response extends HttpResponse { +export interface DocumentTranslationGetSupportedGlossaryFormats500Response extends HttpResponse { status: "500"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** * The list of supported glossary formats supported by the Document Translation service. * The list includes the common file extension used. */ -export interface GetSupportedGlossaryFormats503Response extends HttpResponse { +export interface DocumentTranslationGetSupportedGlossaryFormats503Response extends HttpResponse { status: "503"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } -export interface GetSupportedStorageSources200Headers { +export interface DocumentTranslationGetSupportedStorageSources200Headers { /** Indicates how long to wait before making a new request. */ - "retry-after"?: string; + "retry-after"?: number; } /** Returns a list of storage sources/options supported by the Document Translation service. */ -export interface GetSupportedStorageSources200Response extends HttpResponse { +export interface DocumentTranslationGetSupportedStorageSources200Response extends HttpResponse { status: "200"; - body: SupportedStorageSources; - headers: RawHttpHeaders & GetSupportedStorageSources200Headers; + body: SupportedStorageSourcesOutput; + headers: RawHttpHeaders & DocumentTranslationGetSupportedStorageSources200Headers; } /** Returns a list of storage sources/options supported by the Document Translation service. */ -export interface GetSupportedStorageSources429Response extends HttpResponse { +export interface DocumentTranslationGetSupportedStorageSources429Response extends HttpResponse { status: "429"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** Returns a list of storage sources/options supported by the Document Translation service. */ -export interface GetSupportedStorageSources500Response extends HttpResponse { +export interface DocumentTranslationGetSupportedStorageSources500Response extends HttpResponse { status: "500"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } /** Returns a list of storage sources/options supported by the Document Translation service. */ -export interface GetSupportedStorageSources503Response extends HttpResponse { +export interface DocumentTranslationGetSupportedStorageSources503Response extends HttpResponse { status: "503"; - body: TranslationErrorResponse; + body: TranslationErrorResponseOutput; } diff --git a/sdk/documenttranslator/ai-document-translator-rest/swagger/README.md b/sdk/documenttranslator/ai-document-translator-rest/swagger/README.md index a80832d44f87..9314dee1adc3 100644 --- a/sdk/documenttranslator/ai-document-translator-rest/swagger/README.md +++ b/sdk/documenttranslator/ai-document-translator-rest/swagger/README.md @@ -5,6 +5,9 @@ ## Configuration ```yaml +flavor: azure +openapi-type: data-plane +generate-test: true package-name: "@azure-rest/ai-document-translator" title: DocumentTranslator description: Document Translator Client @@ -12,13 +15,13 @@ generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../ source-code-folder-path: ./src -input-file: https://github.com/Azure/azure-rest-api-specs/blob/ebbdda9f9ba6cab2fbd4efccad59019a62649ea6/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +input-file: https://github.com/Azure/azure-rest-api-specs/blob/ebbdda9f9ba6cab2fbd4efccad59019a62649ea6/specification/cognitiveservices/data-plane/TranslatorText/stable/v1.0/TranslatorBatch.json package-version: 1.0.0-beta.2 hide-clients: true -low-level-client: true +rest-level-client: true add-credentials: true credential-scopes: "https://cognitiveservices.azure.com/.default" credential-key-header-name: "Ocp-Apim-Subscription-Key" use-extension: - "@autorest/typescript": "https://aka.ms/azsdk/typescript/rlc" + "@autorest/typescript": "latest" ``` From 21ffeeef634a985f51a62d388ce375b42212347e Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:23:07 +0800 Subject: [PATCH 31/55] [data-plane] refresh purview-administration-rest sdk (#31263) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- .../purview-administration-rest/CHANGELOG.md | 8 +- .../purview-administration-rest/package.json | 1 - .../review/purview-administration.api.md | 1202 +++++++++++------ .../samples-dev/accountCollections.ts | 6 +- .../samples-dev/metadataPolicies.ts | 15 +- .../{v1 => v1-beta}/javascript/README.md | 6 +- .../javascript/accountCollections.js | 10 +- .../javascript/metadataPolicies.js | 19 +- .../{v1 => v1-beta}/javascript/package.json | 6 +- .../{v1 => v1-beta}/javascript/sample.env | 0 .../{v1 => v1-beta}/typescript/README.md | 6 +- .../{v1 => v1-beta}/typescript/package.json | 7 +- .../{v1 => v1-beta}/typescript/sample.env | 0 .../typescript/src/accountCollections.ts | 6 +- .../typescript/src/metadataPolicies.ts | 13 +- .../{v1 => v1-beta}/typescript/tsconfig.json | 2 +- .../src/account/clientDefinitions.ts | 110 +- .../src/account/index.ts | 13 +- .../src/account/isUnexpected.ts | 230 ++++ .../src/account/models.ts | 244 +--- .../src/account/outputModels.ts | 385 ++++++ .../src/account/paginateHelper.ts | 146 +- .../src/account/parameters.ts | 39 +- .../src/account/purviewAccount.ts | 56 +- .../src/account/responses.ts | 131 +- .../purview-administration-rest/src/index.ts | 7 +- .../purview-administration-rest/src/logger.ts | 5 + .../src/metadataPolicies/clientDefinitions.ts | 28 +- .../src/metadataPolicies/index.ts | 13 +- .../src/metadataPolicies/isUnexpected.ts | 123 ++ .../src/metadataPolicies/models.ts | 61 +- .../src/metadataPolicies/outputModels.ts | 126 ++ .../src/metadataPolicies/paginateHelper.ts | 146 +- .../src/metadataPolicies/parameters.ts | 9 +- .../purviewMetadataPolicies.ts | 57 +- .../src/metadataPolicies/responses.ts | 60 +- .../swagger/README.md | 13 +- .../test/public/account.spec.ts | 2 +- .../test/public/collections.spec.ts | 2 +- .../test/public/metadataPolicies.spec.ts | 7 +- .../test/public/utils/recordedClient.ts | 11 +- 41 files changed, 2366 insertions(+), 965 deletions(-) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/javascript/README.md (92%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/javascript/accountCollections.js (68%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/javascript/metadataPolicies.js (62%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/javascript/package.json (85%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/javascript/sample.env (100%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/typescript/README.md (93%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/typescript/package.json (85%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/typescript/sample.env (100%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/typescript/src/accountCollections.ts (73%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/typescript/src/metadataPolicies.ts (69%) rename sdk/purview/purview-administration-rest/samples/{v1 => v1-beta}/typescript/tsconfig.json (92%) create mode 100644 sdk/purview/purview-administration-rest/src/account/isUnexpected.ts create mode 100644 sdk/purview/purview-administration-rest/src/account/outputModels.ts create mode 100644 sdk/purview/purview-administration-rest/src/logger.ts create mode 100644 sdk/purview/purview-administration-rest/src/metadataPolicies/isUnexpected.ts create mode 100644 sdk/purview/purview-administration-rest/src/metadataPolicies/outputModels.ts diff --git a/sdk/purview/purview-administration-rest/CHANGELOG.md b/sdk/purview/purview-administration-rest/CHANGELOG.md index d3cc776e34b6..4d79f91a865c 100644 --- a/sdk/purview/purview-administration-rest/CHANGELOG.md +++ b/sdk/purview/purview-administration-rest/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2024-12-16) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- refresh @azure-rest/purview-administration sdk ## 1.0.0-beta.1 (2021-10-15) diff --git a/sdk/purview/purview-administration-rest/package.json b/sdk/purview/purview-administration-rest/package.json index e5fd51704d88..9a34bed7a611 100644 --- a/sdk/purview/purview-administration-rest/package.json +++ b/sdk/purview/purview-administration-rest/package.json @@ -80,7 +80,6 @@ "dependencies": { "@azure-rest/core-client": "^2.3.1", "@azure/core-auth": "^1.9.0", - "@azure/core-paging": "^1.6.2", "@azure/core-rest-pipeline": "^1.18.0", "@azure/logger": "^1.1.4", "tslib": "^2.8.1" diff --git a/sdk/purview/purview-administration-rest/review/purview-administration.api.md b/sdk/purview/purview-administration-rest/review/purview-administration.api.md index 707de45c5e22..68678a39342c 100644 --- a/sdk/purview/purview-administration-rest/review/purview-administration.api.md +++ b/sdk/purview/purview-administration-rest/review/purview-administration.api.md @@ -7,85 +7,85 @@ import type { Client } from '@azure-rest/core-client'; import type { ClientOptions } from '@azure-rest/core-client'; import type { HttpResponse } from '@azure-rest/core-client'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; import type { PathUncheckedResponse } from '@azure-rest/core-client'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RequestParameters } from '@azure-rest/core-client'; +import type { StreamableMethod } from '@azure-rest/core-client'; import type { TokenCredential } from '@azure/core-auth'; -// @public (undocumented) +// @public interface AccessKeyOptions { keyType?: "PrimaryAtlasKafkaKey" | "SecondaryAtlasKafkaKey"; } -// @public (undocumented) -interface AccessKeys { +// @public +interface AccessKeysOutput { atlasKafkaPrimaryEndpoint?: string; atlasKafkaSecondaryEndpoint?: string; } -// @public (undocumented) -interface Account { - id?: string; - identity?: Identity; - location?: string; - name?: string; - properties?: AccountProperties; - sku?: AccountSku; - systemData?: AccountSystemData; - tags?: Record; - type?: string; +// @public +interface AccountEndpointsOutput { + readonly catalog?: string; + readonly guardian?: string; + readonly scan?: string; } -// @public (undocumented) -interface AccountEndpoints { - catalog?: string; - guardian?: string; - scan?: string; +// @public +interface AccountOutput { + readonly id?: string; + identity?: IdentityOutput; + location?: string; + readonly name?: string; + properties?: AccountPropertiesOutput; + sku?: AccountSkuOutput; + readonly systemData?: AccountSystemDataOutput; + tags?: Record; + readonly type?: string; } -// @public (undocumented) -interface AccountProperties { - cloudConnectors?: CloudConnectors; - createdAt?: Date; - createdBy?: string; - createdByObjectId?: string; - endpoints?: AccountPropertiesEndpoints; - friendlyName?: string; - managedResourceGroupName?: string; - managedResources?: AccountPropertiesManagedResources; - privateEndpointConnections?: Array; - provisioningState?: "Unknown" | "Creating" | "Moving" | "Deleting" | "SoftDeleting" | "SoftDeleted" | "Failed" | "Succeeded" | "Canceled"; - publicNetworkAccess?: "NotSpecified" | "Enabled" | "Disabled"; +// @public +interface AccountPropertiesEndpointsOutput extends AccountEndpointsOutput { } -// @public (undocumented) -interface AccountPropertiesEndpoints extends AccountEndpoints { +// @public +interface AccountPropertiesManagedResourcesOutput extends ManagedResourcesOutput { } -// @public (undocumented) -interface AccountPropertiesManagedResources extends ManagedResources { +// @public +interface AccountPropertiesOutput { + cloudConnectors?: CloudConnectorsOutput; + readonly createdAt?: string; + readonly createdBy?: string; + readonly createdByObjectId?: string; + readonly endpoints?: AccountPropertiesEndpointsOutput; + readonly friendlyName?: string; + managedResourceGroupName?: string; + readonly managedResources?: AccountPropertiesManagedResourcesOutput; + readonly privateEndpointConnections?: Array; + readonly provisioningState?: "Unknown" | "Creating" | "Moving" | "Deleting" | "SoftDeleting" | "SoftDeleted" | "Failed" | "Succeeded" | "Canceled"; + publicNetworkAccess?: "NotSpecified" | "Enabled" | "Disabled"; } // @public (undocumented) interface AccountsGetAccessKeys { - post(options?: AccountsGetAccessKeysParameters): Promise; + post(options?: AccountsGetAccessKeysParameters): StreamableMethod; } // @public interface AccountsGetAccessKeys200Response extends HttpResponse { // (undocumented) - body: AccessKeys; + body: AccessKeysOutput; // (undocumented) status: "200"; } // @public -interface AccountsGetAccessKeysdefaultResponse extends HttpResponse { +interface AccountsGetAccessKeysDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -93,44 +93,44 @@ type AccountsGetAccessKeysParameters = RequestParameters; // @public (undocumented) interface AccountsGetAccountProperties { - get(options?: AccountsGetAccountPropertiesParameters): Promise; - patch(options: AccountsUpdateAccountPropertiesParameters): Promise; + get(options?: AccountsGetAccountPropertiesParameters): StreamableMethod; + patch(options: AccountsUpdateAccountPropertiesParameters): StreamableMethod; } // @public interface AccountsGetAccountProperties200Response extends HttpResponse { // (undocumented) - body: Account; + body: AccountOutput; // (undocumented) status: "200"; } // @public -interface AccountsGetAccountPropertiesdefaultResponse extends HttpResponse { +interface AccountsGetAccountPropertiesDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) type AccountsGetAccountPropertiesParameters = RequestParameters; -// @public (undocumented) -interface AccountSku { +// @public +interface AccountSkuOutput { capacity?: number; name?: "Standard"; } // @public (undocumented) interface AccountsRegenerateAccessKey { - post(options: AccountsRegenerateAccessKeyParameters): Promise; + post(options: AccountsRegenerateAccessKeyParameters): StreamableMethod; } // @public interface AccountsRegenerateAccessKey200Response extends HttpResponse { // (undocumented) - body: AccessKeys; + body: AccessKeysOutput; // (undocumented) status: "200"; } @@ -142,20 +142,25 @@ interface AccountsRegenerateAccessKeyBodyParam { } // @public -interface AccountsRegenerateAccessKeydefaultResponse extends HttpResponse { +interface AccountsRegenerateAccessKeyDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; +} + +// @public (undocumented) +interface AccountsRegenerateAccessKeyMediaTypesParam { + contentType?: "application/json"; } // @public (undocumented) -type AccountsRegenerateAccessKeyParameters = AccountsRegenerateAccessKeyBodyParam & RequestParameters; +type AccountsRegenerateAccessKeyParameters = AccountsRegenerateAccessKeyMediaTypesParam & AccountsRegenerateAccessKeyBodyParam & RequestParameters; // @public interface AccountsUpdateAccountProperties200Response extends HttpResponse { // (undocumented) - body: Account; + body: AccountOutput; // (undocumented) status: "200"; } @@ -167,27 +172,42 @@ interface AccountsUpdateAccountPropertiesBodyParam { } // @public -interface AccountsUpdateAccountPropertiesdefaultResponse extends HttpResponse { +interface AccountsUpdateAccountPropertiesDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) -type AccountsUpdateAccountPropertiesParameters = AccountsUpdateAccountPropertiesBodyParam & RequestParameters; +interface AccountsUpdateAccountPropertiesMediaTypesParam { + contentType?: "application/json"; +} // @public (undocumented) +type AccountsUpdateAccountPropertiesParameters = AccountsUpdateAccountPropertiesMediaTypesParam & AccountsUpdateAccountPropertiesBodyParam & RequestParameters; + +// @public interface AccountSystemData extends SystemData { } -// @public (undocumented) +// @public +interface AccountSystemDataOutput extends SystemDataOutput { +} + +// @public interface AdvancedResourceSet { - modifiedAt?: Date; + modifiedAt?: Date | string; resourceSetProcessing?: "Default" | "Advanced"; } -// @public (undocumented) +// @public +interface AdvancedResourceSetOutput { + modifiedAt?: string; + resourceSetProcessing?: "Default" | "Advanced"; +} + +// @public interface AttributeMatcher { attributeName?: string; attributeValueExcludedIn?: Array; @@ -196,15 +216,41 @@ interface AttributeMatcher { attributeValueIncludes?: string; } -// @public (undocumented) +// @public +interface AttributeMatcherOutput { + attributeName?: string; + attributeValueExcludedIn?: Array; + attributeValueExcludes?: string; + attributeValueIncludedIn?: Array; + attributeValueIncludes?: string; +} + +// @public interface AttributeRule { dnfCondition?: Array>; id?: string; - kind?: "decisionrule" | "attributerule"; + name?: string; +} + +// @public +interface AttributeRuleOutput { + dnfCondition?: Array>; + id?: string; + readonly kind?: "decisionrule" | "attributerule"; name?: string; } declare namespace Client_2 { + export { + MetadataRolesList, + MetadataPolicyListAll, + MetadataPolicyUpdate, + Routes, + PurviewMetadataPoliciesClient + } +} + +declare namespace Client_3 { export { AccountsGetAccountProperties, AccountsGetAccessKeys, @@ -215,78 +261,87 @@ declare namespace Client_2 { CollectionsGetCollectionPath, ResourceSetRulesGetResourceSetRule, ResourceSetRulesListResourceSetRules, - Routes, - PurviewAccountRestClient - } -} - -declare namespace Client_3 { - export { - MetadataRolesList, - MetadataPolicyListAll, - MetadataPolicyUpdate, Routes_2 as Routes, - PurviewMetadataPoliciesRestClient + PurviewAccountClient } } // @public (undocumented) -interface CloudConnectors { - awsExternalId?: string; +interface CloudConnectorsOutput { + readonly awsExternalId?: string; } -// @public (undocumented) +// @public interface Collection { - collectionProvisioningState?: "Unknown" | "Creating" | "Moving" | "Deleting" | "Failed" | "Succeeded"; description?: string; friendlyName?: string; - name?: string; - parentCollection?: CollectionReference; - systemData?: CollectionSystemData; + parentCollection?: CollectionReference_2; } -// @public (undocumented) -interface CollectionList { +// @public +interface CollectionListOutput { count?: number; nextLink?: string; - value: Array; -} - -// @public (undocumented) -interface CollectionNameResponse { - friendlyName?: string; - name?: string; + value: Array; } -// @public (undocumented) -interface CollectionNameResponseList { +// @public +interface CollectionNameResponseListOutput { count?: number; nextLink?: string; - value: Array; + value: Array; } -// @public (undocumented) -interface CollectionPathResponse { - parentFriendlyNameChain?: Array; - parentNameChain?: Array; +// @public +interface CollectionNameResponseOutput { + readonly friendlyName?: string; + readonly name?: string; } -// @public (undocumented) +// @public +interface CollectionOutput { + readonly collectionProvisioningState?: "Unknown" | "Creating" | "Moving" | "Deleting" | "Failed" | "Succeeded"; + description?: string; + friendlyName?: string; + readonly name?: string; + parentCollection?: CollectionReferenceOutput_2; + readonly systemData?: CollectionSystemDataOutput; +} + +// @public +interface CollectionPathResponseOutput { + readonly parentFriendlyNameChain?: Array; + readonly parentNameChain?: Array; +} + +// @public interface CollectionReference { referenceName?: string; type?: string; } -// @public (undocumented) +// @public interface CollectionReference_2 { referenceName?: string; type?: string; } +// @public +interface CollectionReferenceOutput { + referenceName?: string; + type?: string; +} + +// @public +interface CollectionReferenceOutput_2 { + referenceName?: string; + type?: string; +} + // @public interface CollectionsCreateOrUpdateCollection200Response extends HttpResponse { // (undocumented) - body: Collection; + body: CollectionOutput; // (undocumented) status: "200"; } @@ -298,30 +353,33 @@ interface CollectionsCreateOrUpdateCollectionBodyParam { } // @public -interface CollectionsCreateOrUpdateCollectiondefaultResponse extends HttpResponse { +interface CollectionsCreateOrUpdateCollectionDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; +} + +// @public (undocumented) +interface CollectionsCreateOrUpdateCollectionMediaTypesParam { + contentType?: "application/json"; } // @public (undocumented) -type CollectionsCreateOrUpdateCollectionParameters = CollectionsCreateOrUpdateCollectionBodyParam & RequestParameters; +type CollectionsCreateOrUpdateCollectionParameters = CollectionsCreateOrUpdateCollectionMediaTypesParam & CollectionsCreateOrUpdateCollectionBodyParam & RequestParameters; // @public interface CollectionsDeleteCollection204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } // @public -interface CollectionsDeleteCollectiondefaultResponse extends HttpResponse { +interface CollectionsDeleteCollectionDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -329,25 +387,25 @@ type CollectionsDeleteCollectionParameters = RequestParameters; // @public (undocumented) interface CollectionsGetCollection { - delete(options?: CollectionsDeleteCollectionParameters): Promise; - get(options?: CollectionsGetCollectionParameters): Promise; - put(options: CollectionsCreateOrUpdateCollectionParameters): Promise; + delete(options?: CollectionsDeleteCollectionParameters): StreamableMethod; + get(options?: CollectionsGetCollectionParameters): StreamableMethod; + put(options: CollectionsCreateOrUpdateCollectionParameters): StreamableMethod; } // @public interface CollectionsGetCollection200Response extends HttpResponse { // (undocumented) - body: Collection; + body: CollectionOutput; // (undocumented) status: "200"; } // @public -interface CollectionsGetCollectiondefaultResponse extends HttpResponse { +interface CollectionsGetCollectionDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -355,23 +413,23 @@ type CollectionsGetCollectionParameters = RequestParameters; // @public (undocumented) interface CollectionsGetCollectionPath { - get(options?: CollectionsGetCollectionPathParameters): Promise; + get(options?: CollectionsGetCollectionPathParameters): StreamableMethod; } // @public interface CollectionsGetCollectionPath200Response extends HttpResponse { // (undocumented) - body: CollectionPathResponse; + body: CollectionPathResponseOutput; // (undocumented) status: "200"; } // @public -interface CollectionsGetCollectionPathdefaultResponse extends HttpResponse { +interface CollectionsGetCollectionPathDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -379,23 +437,23 @@ type CollectionsGetCollectionPathParameters = RequestParameters; // @public (undocumented) interface CollectionsListChildCollectionNames { - get(options?: CollectionsListChildCollectionNamesParameters): Promise; + get(options?: CollectionsListChildCollectionNamesParameters): StreamableMethod; } // @public interface CollectionsListChildCollectionNames200Response extends HttpResponse { // (undocumented) - body: CollectionNameResponseList; + body: CollectionNameResponseListOutput; // (undocumented) status: "200"; } // @public -interface CollectionsListChildCollectionNamesdefaultResponse extends HttpResponse { +interface CollectionsListChildCollectionNamesDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -415,23 +473,23 @@ interface CollectionsListChildCollectionNamesQueryParamProperties { // @public (undocumented) interface CollectionsListCollections { - get(options?: CollectionsListCollectionsParameters): Promise; + get(options?: CollectionsListCollectionsParameters): StreamableMethod; } // @public interface CollectionsListCollections200Response extends HttpResponse { // (undocumented) - body: CollectionList; + body: CollectionListOutput; // (undocumented) status: "200"; } // @public -interface CollectionsListCollectionsdefaultResponse extends HttpResponse { +interface CollectionsListCollectionsDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -449,10 +507,14 @@ interface CollectionsListCollectionsQueryParamProperties { $skipToken?: string; } -// @public (undocumented) +// @public interface CollectionSystemData extends SystemData { } +// @public +interface CollectionSystemDataOutput extends SystemDataOutput { +} + // @public (undocumented) interface ComplexReplacerConfig { // (undocumented) @@ -474,45 +536,77 @@ interface ComplexReplacerConfig { } // @public (undocumented) +interface ComplexReplacerConfigOutput { + // (undocumented) + createdBy?: string; + // (undocumented) + description?: string; + // (undocumented) + disabled?: boolean; + // (undocumented) + disableRecursiveReplacerApplication?: boolean; + // (undocumented) + lastUpdatedTimestamp?: number; + // (undocumented) + modifiedBy?: string; + // (undocumented) + name?: string; + // (undocumented) + typeName?: string; +} + +// @public +function createClient(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: PurviewMetadataPoliciesClientOptions): PurviewMetadataPoliciesClient; + +// @public +function createClient_2(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: PurviewAccountClientOptions): PurviewAccountClient; + +// @public interface DataPlaneAccountUpdateParameters { friendlyName?: string; } -// @public (undocumented) +// @public interface DecisionRule { dnfCondition?: Array>; effect?: "Deny" | "Permit"; - kind?: "decisionrule" | "attributerule"; } -// @public (undocumented) -interface ErrorModel { - code?: string; - details?: Array; - message?: string; - target?: string; +// @public +interface DecisionRuleOutput { + dnfCondition?: Array>; + effect?: "Deny" | "Permit"; + readonly kind?: "decisionrule" | "attributerule"; } -// @public (undocumented) -interface ErrorModel_2 { +// @public +interface ErrorModelOutput { code: string; - details?: Array; + details?: Array; message: string; target?: string; } -// @public (undocumented) -interface ErrorResponseModel { - error?: ErrorResponseModelError; +// @public +interface ErrorModelOutput_2 { + readonly code?: string; + readonly details?: Array; + readonly message?: string; + readonly target?: string; } -// @public (undocumented) -interface ErrorResponseModel_2 { - error: ErrorModel_2; +// @public +interface ErrorResponseModelErrorOutput extends ErrorModelOutput_2 { } -// @public (undocumented) -interface ErrorResponseModelError extends ErrorModel { +// @public +interface ErrorResponseModelOutput { + error: ErrorModelOutput; +} + +// @public +interface ErrorResponseModelOutput_2 { + readonly error?: ErrorResponseModelErrorOutput; } // @public (undocumented) @@ -541,6 +635,32 @@ interface FastRegex { regexStr?: string; } +// @public (undocumented) +interface FastRegexOutput { + // (undocumented) + maxDigits?: number; + // (undocumented) + maxLetters?: number; + // (undocumented) + minDashes?: number; + // (undocumented) + minDigits?: number; + // (undocumented) + minDigitsOrLetters?: number; + // (undocumented) + minDots?: number; + // (undocumented) + minHex?: number; + // (undocumented) + minLetters?: number; + // (undocumented) + minUnderscores?: number; + // (undocumented) + options?: number; + // (undocumented) + regexStr?: string; +} + // @public (undocumented) interface Filter { // (undocumented) @@ -557,6 +677,22 @@ interface Filter { path: string; } +// @public (undocumented) +interface FilterOutput { + // (undocumented) + createdBy?: string; + // (undocumented) + filterType?: "Pattern" | "Regex"; + // (undocumented) + lastUpdatedTimestamp?: number; + // (undocumented) + modifiedBy?: string; + // (undocumented) + name: string; + // (undocumented) + path: string; +} + // @public type GetArrayType = T extends Array ? TData : never; @@ -564,29 +700,83 @@ type GetArrayType = T extends Array ? TData : never; type GetArrayType_2 = T extends Array ? TData : never; // @public -type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ +type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; // @public -type GetPage_2 = (pageLink: string, maxPageSize?: number) => Promise<{ +type GetPage_2 = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; -// @public (undocumented) -interface Identity { - principalId?: string; - tenantId?: string; +// @public +interface IdentityOutput { + readonly principalId?: string; + readonly tenantId?: string; type?: "SystemAssigned"; } // @public (undocumented) -interface ManagedResources { - eventHubNamespace?: string; - resourceGroup?: string; - storageAccount?: string; +function isUnexpected(response: MetadataRolesList200Response | MetadataRolesListDefaultResponse): response is MetadataRolesListDefaultResponse; + +// @public (undocumented) +function isUnexpected(response: MetadataPolicyListAll200Response | MetadataPolicyListAllDefaultResponse): response is MetadataPolicyListAllDefaultResponse; + +// @public (undocumented) +function isUnexpected(response: MetadataPolicyUpdate200Response | MetadataPolicyUpdateDefaultResponse): response is MetadataPolicyUpdateDefaultResponse; + +// @public (undocumented) +function isUnexpected(response: MetadataPolicyGet200Response | MetadataPolicyGetDefaultResponse): response is MetadataPolicyGetDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: AccountsGetAccountProperties200Response | AccountsGetAccountPropertiesDefaultResponse): response is AccountsGetAccountPropertiesDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: AccountsUpdateAccountProperties200Response | AccountsUpdateAccountPropertiesDefaultResponse): response is AccountsUpdateAccountPropertiesDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: AccountsGetAccessKeys200Response | AccountsGetAccessKeysDefaultResponse): response is AccountsGetAccessKeysDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: AccountsRegenerateAccessKey200Response | AccountsRegenerateAccessKeyDefaultResponse): response is AccountsRegenerateAccessKeyDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: CollectionsGetCollection200Response | CollectionsGetCollectionDefaultResponse): response is CollectionsGetCollectionDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: CollectionsCreateOrUpdateCollection200Response | CollectionsCreateOrUpdateCollectionDefaultResponse): response is CollectionsCreateOrUpdateCollectionDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: CollectionsDeleteCollection204Response | CollectionsDeleteCollectionDefaultResponse): response is CollectionsDeleteCollectionDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: CollectionsListCollections200Response | CollectionsListCollectionsDefaultResponse): response is CollectionsListCollectionsDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: CollectionsListChildCollectionNames200Response | CollectionsListChildCollectionNamesDefaultResponse): response is CollectionsListChildCollectionNamesDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: CollectionsGetCollectionPath200Response | CollectionsGetCollectionPathDefaultResponse): response is CollectionsGetCollectionPathDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: ResourceSetRulesGetResourceSetRule200Response | ResourceSetRulesGetResourceSetRuleDefaultResponse): response is ResourceSetRulesGetResourceSetRuleDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: ResourceSetRulesCreateOrUpdateResourceSetRule200Response | ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse): response is ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: ResourceSetRulesDeleteResourceSetRule200Response | ResourceSetRulesDeleteResourceSetRule204Response | ResourceSetRulesDeleteResourceSetRuleDefaultResponse): response is ResourceSetRulesDeleteResourceSetRuleDefaultResponse; + +// @public (undocumented) +function isUnexpected_2(response: ResourceSetRulesListResourceSetRules200Response | ResourceSetRulesListResourceSetRulesDefaultResponse): response is ResourceSetRulesListResourceSetRulesDefaultResponse; + +// @public +interface ManagedResourcesOutput { + readonly eventHubNamespace?: string; + readonly resourceGroup?: string; + readonly storageAccount?: string; } // @public (undocumented) @@ -601,63 +791,55 @@ interface MetadataPolicy { // @public interface MetadataPolicyGet200Response extends HttpResponse { // (undocumented) - body: MetadataPolicy; + body: MetadataPolicyOutput; // (undocumented) status: "200"; } // @public (undocumented) -interface MetadataPolicyGetdefaultHeaders { +interface MetadataPolicyGetDefaultHeaders { "x-ms-error-code"?: string; } // @public -interface MetadataPolicyGetdefaultResponse extends HttpResponse { +interface MetadataPolicyGetDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel_2; + body: ErrorResponseModelOutput; // (undocumented) - headers: RawHttpHeaders & MetadataPolicyGetdefaultHeaders; + headers: RawHttpHeaders & MetadataPolicyGetDefaultHeaders; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) type MetadataPolicyGetParameters = RequestParameters; -// @public (undocumented) -interface MetadataPolicyList { - // (undocumented) - nextLink?: string; - // (undocumented) - values: Array; -} - // @public (undocumented) interface MetadataPolicyListAll { - get(options?: MetadataPolicyListAllParameters): Promise; + get(options?: MetadataPolicyListAllParameters): StreamableMethod; } // @public interface MetadataPolicyListAll200Response extends HttpResponse { // (undocumented) - body: MetadataPolicyList; + body: MetadataPolicyListOutput; // (undocumented) status: "200"; } // @public (undocumented) -interface MetadataPolicyListAlldefaultHeaders { +interface MetadataPolicyListAllDefaultHeaders { "x-ms-error-code"?: string; } // @public -interface MetadataPolicyListAlldefaultResponse extends HttpResponse { +interface MetadataPolicyListAllDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel_2; + body: ErrorResponseModelOutput; // (undocumented) - headers: RawHttpHeaders & MetadataPolicyListAlldefaultHeaders; + headers: RawHttpHeaders & MetadataPolicyListAllDefaultHeaders; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -674,25 +856,51 @@ interface MetadataPolicyListAllQueryParamProperties { collectionName?: string; } -// @public (undocumented) -interface MetadataPolicyProperties { - attributeRules?: Array; - collection?: CollectionReference_2; - decisionRules?: Array; - description?: string; +// @public +interface MetadataPolicyListOutput { + // (undocumented) + nextLink?: string; + // (undocumented) + values: Array; +} + +// @public (undocumented) +interface MetadataPolicyOutput { + id?: string; + name?: string; + // (undocumented) + properties?: MetadataPolicyPropertiesOutput; + version?: number; +} + +// @public (undocumented) +interface MetadataPolicyProperties { + attributeRules?: Array; + collection?: CollectionReference; + decisionRules?: Array; + description?: string; + parentCollectionName?: string; +} + +// @public (undocumented) +interface MetadataPolicyPropertiesOutput { + attributeRules?: Array; + collection?: CollectionReferenceOutput; + decisionRules?: Array; + description?: string; parentCollectionName?: string; } // @public (undocumented) interface MetadataPolicyUpdate { - get(options?: MetadataPolicyGetParameters): Promise; - put(options?: MetadataPolicyUpdateParameters): Promise; + get(options?: MetadataPolicyGetParameters): StreamableMethod; + put(options?: MetadataPolicyUpdateParameters): StreamableMethod; } // @public interface MetadataPolicyUpdate200Response extends HttpResponse { // (undocumented) - body: MetadataPolicy; + body: MetadataPolicyOutput; // (undocumented) status: "200"; } @@ -703,45 +911,50 @@ interface MetadataPolicyUpdateBodyParam { } // @public (undocumented) -interface MetadataPolicyUpdatedefaultHeaders { +interface MetadataPolicyUpdateDefaultHeaders { "x-ms-error-code"?: string; } // @public -interface MetadataPolicyUpdatedefaultResponse extends HttpResponse { +interface MetadataPolicyUpdateDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel_2; + body: ErrorResponseModelOutput; // (undocumented) - headers: RawHttpHeaders & MetadataPolicyUpdatedefaultHeaders; + headers: RawHttpHeaders & MetadataPolicyUpdateDefaultHeaders; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) -type MetadataPolicyUpdateParameters = MetadataPolicyUpdateBodyParam & RequestParameters; +interface MetadataPolicyUpdateMediaTypesParam { + contentType?: "application/json"; +} // @public (undocumented) -interface MetadataRole { - id?: string; - name?: string; +type MetadataPolicyUpdateParameters = MetadataPolicyUpdateMediaTypesParam & MetadataPolicyUpdateBodyParam & RequestParameters; + +// @public +interface MetadataRoleListOutput { // (undocumented) - properties?: MetadataRoleProperties; - type?: string; + nextLink?: string; + // (undocumented) + values: Array; } // @public (undocumented) -interface MetadataRoleList { - // (undocumented) - nextLink?: string; +interface MetadataRoleOutput { + id?: string; + name?: string; // (undocumented) - values: Array; + properties?: MetadataRolePropertiesOutput; + type?: string; } // @public (undocumented) -interface MetadataRoleProperties { - cnfCondition?: Array>; +interface MetadataRolePropertiesOutput { + cnfCondition?: Array>; description?: string; - dnfCondition?: Array>; + dnfCondition?: Array>; friendlyName?: string; provisioningState?: string; roleType?: string; @@ -750,30 +963,30 @@ interface MetadataRoleProperties { // @public (undocumented) interface MetadataRolesList { - get(options?: MetadataRolesListParameters): Promise; + get(options?: MetadataRolesListParameters): StreamableMethod; } // @public interface MetadataRolesList200Response extends HttpResponse { // (undocumented) - body: MetadataRoleList; + body: MetadataRoleListOutput; // (undocumented) status: "200"; } // @public (undocumented) -interface MetadataRolesListdefaultHeaders { +interface MetadataRolesListDefaultHeaders { "x-ms-error-code"?: string; } // @public -interface MetadataRolesListdefaultResponse extends HttpResponse { +interface MetadataRolesListDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel_2; + body: ErrorResponseModelOutput; // (undocumented) - headers: RawHttpHeaders & MetadataRolesListdefaultHeaders; + headers: RawHttpHeaders & MetadataRolesListDefaultHeaders; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -781,34 +994,24 @@ type MetadataRolesListParameters = RequestParameters; declare namespace Models { export { - Account, - Identity, - AccountProperties, - CloudConnectors, - AccountEndpoints, - AccountPropertiesEndpoints, - ManagedResources, - AccountPropertiesManagedResources, - PrivateEndpointConnection, - PrivateEndpointConnectionProperties, - PrivateEndpoint, - PrivateLinkServiceConnectionState, - AccountSku, - SystemData, + AttributeMatcher, + MetadataPolicy, + MetadataPolicyProperties, + DecisionRule, + AttributeRule, + CollectionReference + } +} + +declare namespace Models_2 { + export { AccountSystemData, - ErrorResponseModel, - ErrorModel, - ErrorResponseModelError, + SystemData, DataPlaneAccountUpdateParameters, - AccessKeys, AccessKeyOptions, Collection, - CollectionReference, + CollectionReference_2 as CollectionReference, CollectionSystemData, - CollectionList, - CollectionNameResponseList, - CollectionNameResponse, - CollectionPathResponse, ResourceSetRuleConfig, AdvancedResourceSet, PathPatternExtractorConfig, @@ -818,25 +1021,7 @@ declare namespace Models { FastRegex, RegexReplacer, ScopedRule, - Rule, - ResourceSetRuleConfigList - } -} - -declare namespace Models_2 { - export { - MetadataRoleList, - MetadataRole, - MetadataRoleProperties, - AttributeMatcher, - ErrorResponseModel_2 as ErrorResponseModel, - ErrorModel_2 as ErrorModel, - MetadataPolicyList, - MetadataPolicy, - MetadataPolicyProperties, - DecisionRule, - AttributeRule, - CollectionReference_2 as CollectionReference + Rule } } @@ -862,33 +1047,122 @@ interface NormalizationRule { version?: number; } +// @public (undocumented) +interface NormalizationRuleOutput { + // (undocumented) + description?: string; + // (undocumented) + disabled?: boolean; + // (undocumented) + dynamicReplacement?: boolean; + // (undocumented) + entityTypes?: Array; + // (undocumented) + lastUpdatedTimestamp?: number; + // (undocumented) + name?: string; + // (undocumented) + regex?: FastRegexOutput; + // (undocumented) + replaceWith?: string; + // (undocumented) + version?: number; +} + +declare namespace OutputModels { + export { + MetadataRoleListOutput, + MetadataRoleOutput, + MetadataRolePropertiesOutput, + AttributeMatcherOutput, + ErrorResponseModelOutput, + ErrorModelOutput, + MetadataPolicyListOutput, + MetadataPolicyOutput, + MetadataPolicyPropertiesOutput, + DecisionRuleOutput, + AttributeRuleOutput, + CollectionReferenceOutput + } +} + +declare namespace OutputModels_2 { + export { + AccountOutput, + IdentityOutput, + AccountPropertiesOutput, + CloudConnectorsOutput, + AccountPropertiesEndpointsOutput, + AccountEndpointsOutput, + AccountPropertiesManagedResourcesOutput, + ManagedResourcesOutput, + PrivateEndpointConnectionOutput, + PrivateEndpointConnectionPropertiesOutput, + PrivateEndpointOutput, + PrivateLinkServiceConnectionStateOutput, + AccountSkuOutput, + AccountSystemDataOutput, + SystemDataOutput, + ErrorResponseModelOutput_2 as ErrorResponseModelOutput, + ErrorResponseModelErrorOutput, + ErrorModelOutput_2 as ErrorModelOutput, + AccessKeysOutput, + CollectionOutput, + CollectionReferenceOutput_2 as CollectionReferenceOutput, + CollectionSystemDataOutput, + CollectionListOutput, + CollectionNameResponseListOutput, + CollectionNameResponseOutput, + CollectionPathResponseOutput, + ResourceSetRuleConfigOutput, + AdvancedResourceSetOutput, + PathPatternExtractorConfigOutput, + FilterOutput, + ComplexReplacerConfigOutput, + NormalizationRuleOutput, + FastRegexOutput, + RegexReplacerOutput, + ScopedRuleOutput, + RuleOutput, + ResourceSetRuleConfigListOutput + } +} + // @public -function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; +interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} // @public -function paginate_2(client: Client, initialResponse: TResponse, options?: PagingOptions_2): PagedAsyncIterableIterator>; +interface PagedAsyncIterableIterator_2 { + [Symbol.asyncIterator](): PagedAsyncIterableIterator_2; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} // @public -type PaginateReturn = TResult extends { - body: { - value?: infer TPage; - }; -} ? GetArrayType : Array; +interface PageSettings { + continuationToken?: string; +} // @public -type PaginateReturn_2 = TResult extends { - body: { - value?: infer TPage; - }; -} | { - body: { - values?: infer TPage; - }; -} ? GetArrayType_2 : Array; +interface PageSettings_2 { + continuationToken?: string; +} -declare namespace Pagination { +// @public +function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; + +// @public +function paginate_2(client: Client, initialResponse: TResponse, options?: PagingOptions_2): PagedAsyncIterableIterator_2>; + +declare namespace PaginateHelper { export { paginate, + PageSettings, + PagedAsyncIterableIterator, GetArrayType, GetPage, PagingOptions, @@ -896,9 +1170,11 @@ declare namespace Pagination { } } -declare namespace Pagination_2 { +declare namespace PaginateHelper_2 { export { paginate_2 as paginate, + PageSettings_2 as PageSettings, + PagedAsyncIterableIterator_2 as PagedAsyncIterableIterator, GetArrayType_2 as GetArrayType, GetPage_2 as GetPage, PagingOptions_2 as PagingOptions, @@ -906,6 +1182,24 @@ declare namespace Pagination_2 { } } +// @public +type PaginateReturn = TResult extends { + body: { + value?: infer TPage; + }; +} | { + body: { + values?: infer TPage; + }; +} ? GetArrayType : Array; + +// @public +type PaginateReturn_2 = TResult extends { + body: { + value?: infer TPage; + }; +} ? GetArrayType_2 : Array; + // @public interface PagingOptions { customGetPage?: GetPage[]>; @@ -917,15 +1211,31 @@ interface PagingOptions_2 { } declare namespace Parameters_2 { + export { + MetadataRolesListParameters, + MetadataPolicyListAllQueryParamProperties, + MetadataPolicyListAllQueryParam, + MetadataPolicyListAllParameters, + MetadataPolicyUpdateBodyParam, + MetadataPolicyUpdateMediaTypesParam, + MetadataPolicyUpdateParameters, + MetadataPolicyGetParameters + } +} + +declare namespace Parameters_3 { export { AccountsGetAccountPropertiesParameters, AccountsUpdateAccountPropertiesBodyParam, + AccountsUpdateAccountPropertiesMediaTypesParam, AccountsUpdateAccountPropertiesParameters, AccountsGetAccessKeysParameters, AccountsRegenerateAccessKeyBodyParam, + AccountsRegenerateAccessKeyMediaTypesParam, AccountsRegenerateAccessKeyParameters, CollectionsGetCollectionParameters, CollectionsCreateOrUpdateCollectionBodyParam, + CollectionsCreateOrUpdateCollectionMediaTypesParam, CollectionsCreateOrUpdateCollectionParameters, CollectionsDeleteCollectionParameters, CollectionsListCollectionsQueryParamProperties, @@ -937,6 +1247,7 @@ declare namespace Parameters_2 { CollectionsGetCollectionPathParameters, ResourceSetRulesGetResourceSetRuleParameters, ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam, + ResourceSetRulesCreateOrUpdateResourceSetRuleMediaTypesParam, ResourceSetRulesCreateOrUpdateResourceSetRuleParameters, ResourceSetRulesDeleteResourceSetRuleParameters, ResourceSetRulesListResourceSetRulesQueryParamProperties, @@ -945,18 +1256,6 @@ declare namespace Parameters_2 { } } -declare namespace Parameters_3 { - export { - MetadataRolesListParameters, - MetadataPolicyListAllQueryParamProperties, - MetadataPolicyListAllQueryParam, - MetadataPolicyListAllParameters, - MetadataPolicyUpdateBodyParam, - MetadataPolicyUpdateParameters, - MetadataPolicyGetParameters - } -} - // @public (undocumented) interface PathPatternExtractorConfig { // (undocumented) @@ -984,27 +1283,53 @@ interface PathPatternExtractorConfig { } // @public (undocumented) -interface PrivateEndpoint { - id?: string; +interface PathPatternExtractorConfigOutput { + // (undocumented) + acceptedPatterns?: Array; + // (undocumented) + complexReplacers?: Array; + // (undocumented) + createdBy: string; + // (undocumented) + enableDefaultPatterns: boolean; + // (undocumented) + lastUpdatedTimestamp?: number; + // (undocumented) + modifiedBy?: string; + // (undocumented) + normalizationRules?: Array; + // (undocumented) + regexReplacers?: Array; + // (undocumented) + rejectedPatterns?: Array; + // (undocumented) + scopedRules?: Array; + // (undocumented) + version?: number; } -// @public (undocumented) -interface PrivateEndpointConnection { - id?: string; - name?: string; - properties?: PrivateEndpointConnectionProperties; - type?: string; +// @public +interface PrivateEndpointConnectionOutput { + readonly id?: string; + readonly name?: string; + properties?: PrivateEndpointConnectionPropertiesOutput; + readonly type?: string; } -// @public (undocumented) -interface PrivateEndpointConnectionProperties { - privateEndpoint?: PrivateEndpoint; - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - provisioningState?: string; +// @public +interface PrivateEndpointConnectionPropertiesOutput { + privateEndpoint?: PrivateEndpointOutput; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateOutput; + readonly provisioningState?: string; } -// @public (undocumented) -interface PrivateLinkServiceConnectionState { +// @public +interface PrivateEndpointOutput { + id?: string; +} + +// @public +interface PrivateLinkServiceConnectionStateOutput { actionsRequired?: string; description?: string; status?: "Unknown" | "Pending" | "Approved" | "Rejected" | "Disconnected"; @@ -1012,44 +1337,54 @@ interface PrivateLinkServiceConnectionState { declare namespace PurviewAccount { export { - Models, - Pagination, - Parameters_2 as Parameters, - Client_2 as Client, - Responses, - PurviewAccountClient + createClient_2 as createClient, + PurviewAccountClientOptions, + Parameters_3 as Parameters, + Responses_2 as Responses, + Client_3 as Client, + Models_2 as Models, + OutputModels_2 as OutputModels, + PaginateHelper_2 as PaginateHelper, + UnexpectedHelper_2 as UnexpectedHelper } } export { PurviewAccount } // @public (undocumented) -export function PurviewAccountClient(endpoint: string, credentials: TokenCredential, options?: ClientOptions): PurviewAccountRestClient; - -// @public (undocumented) -type PurviewAccountRestClient = Client & { - path: Routes; +type PurviewAccountClient = Client & { + path: Routes_2; }; +// @public +interface PurviewAccountClientOptions extends ClientOptions { + apiVersion?: string; +} + declare namespace PurviewMetadataPolicies { export { - PurviewMetadataPoliciesClient, - Models_2 as Models, - Pagination_2 as Pagination, - Parameters_3 as Parameters, - Client_3 as Client, - Responses_2 as Responses + createClient, + PurviewMetadataPoliciesClientOptions, + Parameters_2 as Parameters, + Responses, + Client_2 as Client, + Models, + OutputModels, + PaginateHelper, + UnexpectedHelper } } export { PurviewMetadataPolicies } // @public (undocumented) -export function PurviewMetadataPoliciesClient(Endpoint: string, credentials: TokenCredential, options?: ClientOptions): PurviewMetadataPoliciesRestClient; - -// @public (undocumented) -type PurviewMetadataPoliciesRestClient = Client & { - path: Routes_2; +type PurviewMetadataPoliciesClient = Client & { + path: Routes; }; +// @public +interface PurviewMetadataPoliciesClientOptions extends ClientOptions { + apiVersion?: string; +} + // @public (undocumented) interface RegexReplacer { // (undocumented) @@ -1077,23 +1412,55 @@ interface RegexReplacer { } // @public (undocumented) +interface RegexReplacerOutput { + // (undocumented) + condition?: string; + // (undocumented) + createdBy?: string; + // (undocumented) + description?: string; + // (undocumented) + disabled: boolean; + // (undocumented) + disableRecursiveReplacerApplication?: boolean; + // (undocumented) + doNotReplaceRegex?: FastRegexOutput; + // (undocumented) + lastUpdatedTimestamp?: number; + // (undocumented) + modifiedBy?: string; + // (undocumented) + name: string; + // (undocumented) + regex?: FastRegexOutput; + // (undocumented) + replaceWith?: string; +} + +// @public interface ResourceSetRuleConfig { advancedResourceSet?: AdvancedResourceSet; - name?: string; pathPatternConfig?: PathPatternExtractorConfig; } -// @public (undocumented) -interface ResourceSetRuleConfigList { +// @public +interface ResourceSetRuleConfigListOutput { count?: number; nextLink?: string; - value: Array; + value: Array; +} + +// @public +interface ResourceSetRuleConfigOutput { + advancedResourceSet?: AdvancedResourceSetOutput; + readonly name?: string; + pathPatternConfig?: PathPatternExtractorConfigOutput; } // @public interface ResourceSetRulesCreateOrUpdateResourceSetRule200Response extends HttpResponse { // (undocumented) - body: ResourceSetRuleConfig; + body: ResourceSetRuleConfigOutput; // (undocumented) status: "200"; } @@ -1105,38 +1472,39 @@ interface ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam { } // @public -interface ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse extends HttpResponse { +interface ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; +} + +// @public (undocumented) +interface ResourceSetRulesCreateOrUpdateResourceSetRuleMediaTypesParam { + contentType?: "application/json"; } // @public (undocumented) -type ResourceSetRulesCreateOrUpdateResourceSetRuleParameters = ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam & RequestParameters; +type ResourceSetRulesCreateOrUpdateResourceSetRuleParameters = ResourceSetRulesCreateOrUpdateResourceSetRuleMediaTypesParam & ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam & RequestParameters; // @public interface ResourceSetRulesDeleteResourceSetRule200Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "200"; } // @public interface ResourceSetRulesDeleteResourceSetRule204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } // @public -interface ResourceSetRulesDeleteResourceSetRuledefaultResponse extends HttpResponse { +interface ResourceSetRulesDeleteResourceSetRuleDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -1144,25 +1512,25 @@ type ResourceSetRulesDeleteResourceSetRuleParameters = RequestParameters; // @public (undocumented) interface ResourceSetRulesGetResourceSetRule { - delete(options?: ResourceSetRulesDeleteResourceSetRuleParameters): Promise; - get(options?: ResourceSetRulesGetResourceSetRuleParameters): Promise; - put(options: ResourceSetRulesCreateOrUpdateResourceSetRuleParameters): Promise; + delete(options?: ResourceSetRulesDeleteResourceSetRuleParameters): StreamableMethod; + get(options?: ResourceSetRulesGetResourceSetRuleParameters): StreamableMethod; + put(options: ResourceSetRulesCreateOrUpdateResourceSetRuleParameters): StreamableMethod; } // @public interface ResourceSetRulesGetResourceSetRule200Response extends HttpResponse { // (undocumented) - body: ResourceSetRuleConfig; + body: ResourceSetRuleConfigOutput; // (undocumented) status: "200"; } // @public -interface ResourceSetRulesGetResourceSetRuledefaultResponse extends HttpResponse { +interface ResourceSetRulesGetResourceSetRuleDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -1170,23 +1538,23 @@ type ResourceSetRulesGetResourceSetRuleParameters = RequestParameters; // @public (undocumented) interface ResourceSetRulesListResourceSetRules { - get(options?: ResourceSetRulesListResourceSetRulesParameters): Promise; + get(options?: ResourceSetRulesListResourceSetRulesParameters): StreamableMethod; } // @public interface ResourceSetRulesListResourceSetRules200Response extends HttpResponse { // (undocumented) - body: ResourceSetRuleConfigList; + body: ResourceSetRuleConfigListOutput; // (undocumented) status: "200"; } // @public -interface ResourceSetRulesListResourceSetRulesdefaultResponse extends HttpResponse { +interface ResourceSetRulesListResourceSetRulesDefaultResponse extends HttpResponse { // (undocumented) - body: ErrorResponseModel; + body: ErrorResponseModelOutput_2; // (undocumented) - status: "500"; + status: string; } // @public (undocumented) @@ -1205,58 +1573,65 @@ interface ResourceSetRulesListResourceSetRulesQueryParamProperties { } declare namespace Responses { + export { + MetadataRolesList200Response, + MetadataRolesListDefaultHeaders, + MetadataRolesListDefaultResponse, + MetadataPolicyListAll200Response, + MetadataPolicyListAllDefaultHeaders, + MetadataPolicyListAllDefaultResponse, + MetadataPolicyUpdate200Response, + MetadataPolicyUpdateDefaultHeaders, + MetadataPolicyUpdateDefaultResponse, + MetadataPolicyGet200Response, + MetadataPolicyGetDefaultHeaders, + MetadataPolicyGetDefaultResponse + } +} + +declare namespace Responses_2 { export { AccountsGetAccountProperties200Response, - AccountsGetAccountPropertiesdefaultResponse, + AccountsGetAccountPropertiesDefaultResponse, AccountsUpdateAccountProperties200Response, - AccountsUpdateAccountPropertiesdefaultResponse, + AccountsUpdateAccountPropertiesDefaultResponse, AccountsGetAccessKeys200Response, - AccountsGetAccessKeysdefaultResponse, + AccountsGetAccessKeysDefaultResponse, AccountsRegenerateAccessKey200Response, - AccountsRegenerateAccessKeydefaultResponse, + AccountsRegenerateAccessKeyDefaultResponse, CollectionsGetCollection200Response, - CollectionsGetCollectiondefaultResponse, + CollectionsGetCollectionDefaultResponse, CollectionsCreateOrUpdateCollection200Response, - CollectionsCreateOrUpdateCollectiondefaultResponse, + CollectionsCreateOrUpdateCollectionDefaultResponse, CollectionsDeleteCollection204Response, - CollectionsDeleteCollectiondefaultResponse, + CollectionsDeleteCollectionDefaultResponse, CollectionsListCollections200Response, - CollectionsListCollectionsdefaultResponse, + CollectionsListCollectionsDefaultResponse, CollectionsListChildCollectionNames200Response, - CollectionsListChildCollectionNamesdefaultResponse, + CollectionsListChildCollectionNamesDefaultResponse, CollectionsGetCollectionPath200Response, - CollectionsGetCollectionPathdefaultResponse, + CollectionsGetCollectionPathDefaultResponse, ResourceSetRulesGetResourceSetRule200Response, - ResourceSetRulesGetResourceSetRuledefaultResponse, + ResourceSetRulesGetResourceSetRuleDefaultResponse, ResourceSetRulesCreateOrUpdateResourceSetRule200Response, - ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse, + ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse, ResourceSetRulesDeleteResourceSetRule200Response, ResourceSetRulesDeleteResourceSetRule204Response, - ResourceSetRulesDeleteResourceSetRuledefaultResponse, + ResourceSetRulesDeleteResourceSetRuleDefaultResponse, ResourceSetRulesListResourceSetRules200Response, - ResourceSetRulesListResourceSetRulesdefaultResponse + ResourceSetRulesListResourceSetRulesDefaultResponse } } -declare namespace Responses_2 { - export { - MetadataRolesList200Response, - MetadataRolesListdefaultHeaders, - MetadataRolesListdefaultResponse, - MetadataPolicyListAll200Response, - MetadataPolicyListAlldefaultHeaders, - MetadataPolicyListAlldefaultResponse, - MetadataPolicyUpdate200Response, - MetadataPolicyUpdatedefaultHeaders, - MetadataPolicyUpdatedefaultResponse, - MetadataPolicyGet200Response, - MetadataPolicyGetdefaultHeaders, - MetadataPolicyGetdefaultResponse - } +// @public (undocumented) +interface Routes { + (path: "/metadataRoles"): MetadataRolesList; + (path: "/metadataPolicies"): MetadataPolicyListAll; + (path: "/metadataPolicies/{policyId}", policyId: string): MetadataPolicyUpdate; } // @public (undocumented) -interface Routes { +interface Routes_2 { (path: "/"): AccountsGetAccountProperties; (path: "/listkeys"): AccountsGetAccessKeys; (path: "/regeneratekeys"): AccountsRegenerateAccessKey; @@ -1269,14 +1644,21 @@ interface Routes { } // @public (undocumented) -interface Routes_2 { - (path: "/metadataRoles"): MetadataRolesList; - (path: "/metadataPolicies"): MetadataPolicyListAll; - (path: "/metadataPolicies/{policyId}", policyId: string): MetadataPolicyUpdate; +interface Rule { + // (undocumented) + displayName?: string; + // (undocumented) + isResourceSet?: boolean; + // (undocumented) + lastUpdatedTimestamp?: number; + // (undocumented) + name?: string; + // (undocumented) + qualifiedName: string; } // @public (undocumented) -interface Rule { +interface RuleOutput { // (undocumented) displayName?: string; // (undocumented) @@ -1300,13 +1682,39 @@ interface ScopedRule { } // @public (undocumented) +interface ScopedRuleOutput { + // (undocumented) + bindingUrl: string; + // (undocumented) + rules?: Array; + // (undocumented) + storeType: string; +} + +// @public interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: "User" | "Application" | "ManagedIdentity" | "Key"; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: "User" | "Application" | "ManagedIdentity" | "Key"; +} + +// @public +interface SystemDataOutput { + readonly createdAt?: string; + readonly createdBy?: string; + readonly createdByType?: "User" | "Application" | "ManagedIdentity" | "Key"; + readonly lastModifiedAt?: string; + readonly lastModifiedBy?: string; + readonly lastModifiedByType?: "User" | "Application" | "ManagedIdentity" | "Key"; +} + +declare namespace UnexpectedHelper { + export { + isUnexpected + } +} + +declare namespace UnexpectedHelper_2 { + export { + isUnexpected_2 as isUnexpected + } } // (No @packageDocumentation comment for this package) diff --git a/sdk/purview/purview-administration-rest/samples-dev/accountCollections.ts b/sdk/purview/purview-administration-rest/samples-dev/accountCollections.ts index 084a2d382778..8e8e317bbbff 100644 --- a/sdk/purview/purview-administration-rest/samples-dev/accountCollections.ts +++ b/sdk/purview/purview-administration-rest/samples-dev/accountCollections.ts @@ -8,7 +8,7 @@ * @azsdk-weight 40 */ -import { PurviewAccount, PurviewAccountClient } from "@azure-rest/purview-administration"; +import { PurviewAccount } from "@azure-rest/purview-administration"; import { DefaultAzureCredential } from "@azure/identity"; import dotenv from "dotenv"; @@ -18,7 +18,7 @@ const endpoint = process.env["ENDPOINT"] || ""; async function main(): Promise { console.log("== List collections sample =="); - const client = PurviewAccountClient(endpoint, new DefaultAzureCredential()); + const client = PurviewAccount.createClient(endpoint, new DefaultAzureCredential()); const response = await client.path("/collections").get(); @@ -26,7 +26,7 @@ async function main(): Promise { console.log(`GET "/collections" failed with ${response.status}`); } - const dataSources = PurviewAccount.Pagination.paginate(client, response); + const dataSources = PurviewAccount.PaginateHelper.paginate(client, response); for await (const dataSource of dataSources) { console.log(dataSource); diff --git a/sdk/purview/purview-administration-rest/samples-dev/metadataPolicies.ts b/sdk/purview/purview-administration-rest/samples-dev/metadataPolicies.ts index 5e3e08e90efe..c160ef702ff0 100644 --- a/sdk/purview/purview-administration-rest/samples-dev/metadataPolicies.ts +++ b/sdk/purview/purview-administration-rest/samples-dev/metadataPolicies.ts @@ -8,10 +8,7 @@ * @azsdk-weight 40 */ -import { - PurviewMetadataPolicies, - PurviewMetadataPoliciesClient, -} from "@azure-rest/purview-administration"; +import { PurviewMetadataPolicies } from "@azure-rest/purview-administration"; import { DefaultAzureCredential } from "@azure/identity"; import dotenv from "dotenv"; @@ -21,7 +18,7 @@ const endpoint = process.env["ENDPOINT"] || ""; async function main(): Promise { console.log("== List metadata policies sample =="); - const client = PurviewMetadataPoliciesClient(endpoint, new DefaultAzureCredential()); + const client = PurviewMetadataPolicies.createClient(endpoint, new DefaultAzureCredential()); const response = await client.path("/metadataPolicies").get(); @@ -31,10 +28,14 @@ async function main(): Promise { throw new Error(error); } - const policies = PurviewMetadataPolicies.Pagination.paginate(client, response); + const policies = PurviewMetadataPolicies.PaginateHelper.paginate(client, response); for await (const policy of policies) { - console.log(policy.name); + if (Array.isArray(policy)) { + console.error("Unexpected array:", policy); + } else { + console.log(policy.name); + } } } diff --git a/sdk/purview/purview-administration-rest/samples/v1/javascript/README.md b/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/README.md similarity index 92% rename from sdk/purview/purview-administration-rest/samples/v1/javascript/README.md rename to sdk/purview/purview-administration-rest/samples/v1-beta/javascript/README.md index 3e38d3bd6389..48ce285840c1 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/javascript/README.md +++ b/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/README.md @@ -1,4 +1,4 @@ -# Azure Purview Administration rest client library samples for JavaScript +# Azure Purview Administration rest client library samples for JavaScript (Beta) These sample programs show how to use the JavaScript client libraries for Azure Purview Administration rest in some common scenarios. @@ -47,8 +47,8 @@ npx dev-tool run vendored cross-env ENDPOINT="" node accountCollection Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. -[accountcollections]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-administration-rest/samples/v1/javascript/accountCollections.js -[metadatapolicies]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-administration-rest/samples/v1/javascript/metadataPolicies.js +[accountcollections]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/accountCollections.js +[metadatapolicies]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/metadataPolicies.js [apiref]: https://docs.microsoft.com/rest/api/purview/ [freesub]: https://azure.microsoft.com/free/ [createinstance_azurepurviewinstance]: https://docs.microsoft.com/azure/purview/create-catalog-portal diff --git a/sdk/purview/purview-administration-rest/samples/v1/javascript/accountCollections.js b/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/accountCollections.js similarity index 68% rename from sdk/purview/purview-administration-rest/samples/v1/javascript/accountCollections.js rename to sdk/purview/purview-administration-rest/samples/v1-beta/javascript/accountCollections.js index 07930953a026..9e380226f12b 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/javascript/accountCollections.js +++ b/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/accountCollections.js @@ -7,17 +7,15 @@ * @summary gets a list of collections */ -const { PurviewAccount, PurviewAccountClient } = require("@azure-rest/purview-administration"); +const { PurviewAccount } = require("@azure-rest/purview-administration"); const { DefaultAzureCredential } = require("@azure/identity"); -const dotenv = require("dotenv"); - -dotenv.config(); +require("dotenv").config(); const endpoint = process.env["ENDPOINT"] || ""; async function main() { console.log("== List collections sample =="); - const client = PurviewAccountClient(endpoint, new DefaultAzureCredential()); + const client = PurviewAccount.createClient(endpoint, new DefaultAzureCredential()); const response = await client.path("/collections").get(); @@ -25,7 +23,7 @@ async function main() { console.log(`GET "/collections" failed with ${response.status}`); } - const dataSources = PurviewAccount.Pagination.paginate(client, response); + const dataSources = PurviewAccount.PaginateHelper.paginate(client, response); for await (const dataSource of dataSources) { console.log(dataSource); diff --git a/sdk/purview/purview-administration-rest/samples/v1/javascript/metadataPolicies.js b/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/metadataPolicies.js similarity index 62% rename from sdk/purview/purview-administration-rest/samples/v1/javascript/metadataPolicies.js rename to sdk/purview/purview-administration-rest/samples/v1-beta/javascript/metadataPolicies.js index e62269f25754..f49dafdc1a4d 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/javascript/metadataPolicies.js +++ b/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/metadataPolicies.js @@ -7,20 +7,15 @@ * @summary gets a list of metadata policies */ -const { - PurviewMetadataPolicies, - PurviewMetadataPoliciesClient -} = require("@azure-rest/purview-administration"); +const { PurviewMetadataPolicies } = require("@azure-rest/purview-administration"); const { DefaultAzureCredential } = require("@azure/identity"); -const dotenv = require("dotenv"); - -dotenv.config(); +require("dotenv").config(); const endpoint = process.env["ENDPOINT"] || ""; async function main() { console.log("== List metadata policies sample =="); - const client = PurviewMetadataPoliciesClient(endpoint, new DefaultAzureCredential()); + const client = PurviewMetadataPolicies.createClient(endpoint, new DefaultAzureCredential()); const response = await client.path("/metadataPolicies").get(); @@ -30,10 +25,14 @@ async function main() { throw new Error(error); } - const policies = PurviewMetadataPolicies.Pagination.paginate(client, response); + const policies = PurviewMetadataPolicies.PaginateHelper.paginate(client, response); for await (const policy of policies) { - console.log(policy.name); + if (Array.isArray(policy)) { + console.error("Unexpected array:", policy); + } else { + console.log(policy.name); + } } } diff --git a/sdk/purview/purview-administration-rest/samples/v1/javascript/package.json b/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/package.json similarity index 85% rename from sdk/purview/purview-administration-rest/samples/v1/javascript/package.json rename to sdk/purview/purview-administration-rest/samples/v1-beta/javascript/package.json index ec791464ef1c..75429082d569 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/javascript/package.json +++ b/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/purview-administration-js", + "name": "@azure-samples/purview-administration-js-beta", "private": true, "version": "1.0.0", - "description": "Azure Purview Administration rest client library samples for JavaScript", + "description": "Azure Purview Administration rest client library samples for JavaScript (Beta)", "engines": { "node": ">=18.0.0" }, @@ -28,6 +28,6 @@ "dependencies": { "@azure-rest/purview-administration": "next", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.0.1" } } diff --git a/sdk/purview/purview-administration-rest/samples/v1/javascript/sample.env b/sdk/purview/purview-administration-rest/samples/v1-beta/javascript/sample.env similarity index 100% rename from sdk/purview/purview-administration-rest/samples/v1/javascript/sample.env rename to sdk/purview/purview-administration-rest/samples/v1-beta/javascript/sample.env diff --git a/sdk/purview/purview-administration-rest/samples/v1/typescript/README.md b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/README.md similarity index 93% rename from sdk/purview/purview-administration-rest/samples/v1/typescript/README.md rename to sdk/purview/purview-administration-rest/samples/v1-beta/typescript/README.md index 21f46aa0ba99..86ea800de3cf 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/typescript/README.md +++ b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/README.md @@ -1,4 +1,4 @@ -# Azure Purview Administration rest client library samples for TypeScript +# Azure Purview Administration rest client library samples for TypeScript (Beta) These sample programs show how to use the TypeScript client libraries for Azure Purview Administration rest in some common scenarios. @@ -59,8 +59,8 @@ npx dev-tool run vendored cross-env ENDPOINT="" node dist/accountColle Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. -[accountcollections]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-administration-rest/samples/v1/typescript/src/accountCollections.ts -[metadatapolicies]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-administration-rest/samples/v1/typescript/src/metadataPolicies.ts +[accountcollections]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/src/accountCollections.ts +[metadatapolicies]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/src/metadataPolicies.ts [apiref]: https://docs.microsoft.com/rest/api/purview/ [freesub]: https://azure.microsoft.com/free/ [createinstance_azurepurviewinstance]: https://docs.microsoft.com/azure/purview/create-catalog-portal diff --git a/sdk/purview/purview-administration-rest/samples/v1/typescript/package.json b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/package.json similarity index 85% rename from sdk/purview/purview-administration-rest/samples/v1/typescript/package.json rename to sdk/purview/purview-administration-rest/samples/v1-beta/typescript/package.json index b40bae869275..86f2913e03d8 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/typescript/package.json +++ b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/purview-administration-ts", + "name": "@azure-samples/purview-administration-ts-beta", "private": true, "version": "1.0.0", - "description": "Azure Purview Administration rest client library samples for TypeScript", + "description": "Azure Purview Administration rest client library samples for TypeScript (Beta)", "engines": { "node": ">=18.0.0" }, @@ -32,9 +32,10 @@ "dependencies": { "@azure-rest/purview-administration": "next", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.0.1" }, "devDependencies": { + "@types/node": "^18.0.0", "typescript": "~5.7.2", "rimraf": "latest" } diff --git a/sdk/purview/purview-administration-rest/samples/v1/typescript/sample.env b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/sample.env similarity index 100% rename from sdk/purview/purview-administration-rest/samples/v1/typescript/sample.env rename to sdk/purview/purview-administration-rest/samples/v1-beta/typescript/sample.env diff --git a/sdk/purview/purview-administration-rest/samples/v1/typescript/src/accountCollections.ts b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/src/accountCollections.ts similarity index 73% rename from sdk/purview/purview-administration-rest/samples/v1/typescript/src/accountCollections.ts rename to sdk/purview/purview-administration-rest/samples/v1-beta/typescript/src/accountCollections.ts index 61edc8573d3e..b930aeaed64b 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/typescript/src/accountCollections.ts +++ b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/src/accountCollections.ts @@ -7,7 +7,7 @@ * @summary gets a list of collections */ -import { PurviewAccount, PurviewAccountClient } from "@azure-rest/purview-administration"; +import { PurviewAccount } from "@azure-rest/purview-administration"; import { DefaultAzureCredential } from "@azure/identity"; import dotenv from "dotenv"; @@ -17,7 +17,7 @@ const endpoint = process.env["ENDPOINT"] || ""; async function main() { console.log("== List collections sample =="); - const client = PurviewAccountClient(endpoint, new DefaultAzureCredential()); + const client = PurviewAccount.createClient(endpoint, new DefaultAzureCredential()); const response = await client.path("/collections").get(); @@ -25,7 +25,7 @@ async function main() { console.log(`GET "/collections" failed with ${response.status}`); } - const dataSources = PurviewAccount.Pagination.paginate(client, response); + const dataSources = PurviewAccount.PaginateHelper.paginate(client, response); for await (const dataSource of dataSources) { console.log(dataSource); diff --git a/sdk/purview/purview-administration-rest/samples/v1/typescript/src/metadataPolicies.ts b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/src/metadataPolicies.ts similarity index 69% rename from sdk/purview/purview-administration-rest/samples/v1/typescript/src/metadataPolicies.ts rename to sdk/purview/purview-administration-rest/samples/v1-beta/typescript/src/metadataPolicies.ts index e5f89d5bad20..7a096641e3b2 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/typescript/src/metadataPolicies.ts +++ b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/src/metadataPolicies.ts @@ -8,8 +8,7 @@ */ import { - PurviewMetadataPolicies, - PurviewMetadataPoliciesClient, + PurviewMetadataPolicies } from "@azure-rest/purview-administration"; import { DefaultAzureCredential } from "@azure/identity"; import dotenv from "dotenv"; @@ -20,7 +19,7 @@ const endpoint = process.env["ENDPOINT"] || ""; async function main() { console.log("== List metadata policies sample =="); - const client = PurviewMetadataPoliciesClient(endpoint, new DefaultAzureCredential()); + const client = PurviewMetadataPolicies.createClient(endpoint, new DefaultAzureCredential()); const response = await client.path("/metadataPolicies").get(); @@ -30,10 +29,14 @@ async function main() { throw new Error(error); } - const policies = PurviewMetadataPolicies.Pagination.paginate(client, response); + const policies = PurviewMetadataPolicies.PaginateHelper.paginate(client, response); for await (const policy of policies) { - console.log(policy.name); + if (Array.isArray(policy)) { + console.error('Unexpected array:', policy); + } else { + console.log(policy.name); + } } } diff --git a/sdk/purview/purview-administration-rest/samples/v1/typescript/tsconfig.json b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/tsconfig.json similarity index 92% rename from sdk/purview/purview-administration-rest/samples/v1/typescript/tsconfig.json rename to sdk/purview/purview-administration-rest/samples/v1-beta/typescript/tsconfig.json index ad5ff9a19d36..984eed535aa8 100644 --- a/sdk/purview/purview-administration-rest/samples/v1/typescript/tsconfig.json +++ b/sdk/purview/purview-administration-rest/samples/v1-beta/typescript/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2018", + "target": "ES2020", "module": "commonjs", "moduleResolution": "node", "resolveJsonModule": true, diff --git a/sdk/purview/purview-administration-rest/src/account/clientDefinitions.ts b/sdk/purview/purview-administration-rest/src/account/clientDefinitions.ts index 8d75a92bf62c..e2bb246c444c 100644 --- a/sdk/purview/purview-administration-rest/src/account/clientDefinitions.ts +++ b/sdk/purview/purview-administration-rest/src/account/clientDefinitions.ts @@ -1,65 +1,67 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Client } from "@azure-rest/core-client"; import type { - AccountsGetAccessKeysParameters, AccountsGetAccountPropertiesParameters, - AccountsRegenerateAccessKeyParameters, AccountsUpdateAccountPropertiesParameters, + AccountsGetAccessKeysParameters, + AccountsRegenerateAccessKeyParameters, + CollectionsGetCollectionParameters, CollectionsCreateOrUpdateCollectionParameters, CollectionsDeleteCollectionParameters, - CollectionsGetCollectionParameters, - CollectionsGetCollectionPathParameters, - CollectionsListChildCollectionNamesParameters, CollectionsListCollectionsParameters, + CollectionsListChildCollectionNamesParameters, + CollectionsGetCollectionPathParameters, + ResourceSetRulesGetResourceSetRuleParameters, ResourceSetRulesCreateOrUpdateResourceSetRuleParameters, ResourceSetRulesDeleteResourceSetRuleParameters, - ResourceSetRulesGetResourceSetRuleParameters, ResourceSetRulesListResourceSetRulesParameters, } from "./parameters.js"; import type { - AccountsGetAccessKeys200Response, - AccountsGetAccessKeysdefaultResponse, AccountsGetAccountProperties200Response, - AccountsGetAccountPropertiesdefaultResponse, - AccountsRegenerateAccessKey200Response, - AccountsRegenerateAccessKeydefaultResponse, + AccountsGetAccountPropertiesDefaultResponse, AccountsUpdateAccountProperties200Response, - AccountsUpdateAccountPropertiesdefaultResponse, + AccountsUpdateAccountPropertiesDefaultResponse, + AccountsGetAccessKeys200Response, + AccountsGetAccessKeysDefaultResponse, + AccountsRegenerateAccessKey200Response, + AccountsRegenerateAccessKeyDefaultResponse, + CollectionsGetCollection200Response, + CollectionsGetCollectionDefaultResponse, CollectionsCreateOrUpdateCollection200Response, - CollectionsCreateOrUpdateCollectiondefaultResponse, + CollectionsCreateOrUpdateCollectionDefaultResponse, CollectionsDeleteCollection204Response, - CollectionsDeleteCollectiondefaultResponse, - CollectionsGetCollection200Response, - CollectionsGetCollectiondefaultResponse, - CollectionsGetCollectionPath200Response, - CollectionsGetCollectionPathdefaultResponse, - CollectionsListChildCollectionNames200Response, - CollectionsListChildCollectionNamesdefaultResponse, + CollectionsDeleteCollectionDefaultResponse, CollectionsListCollections200Response, - CollectionsListCollectionsdefaultResponse, + CollectionsListCollectionsDefaultResponse, + CollectionsListChildCollectionNames200Response, + CollectionsListChildCollectionNamesDefaultResponse, + CollectionsGetCollectionPath200Response, + CollectionsGetCollectionPathDefaultResponse, + ResourceSetRulesGetResourceSetRule200Response, + ResourceSetRulesGetResourceSetRuleDefaultResponse, ResourceSetRulesCreateOrUpdateResourceSetRule200Response, - ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse, + ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse, ResourceSetRulesDeleteResourceSetRule200Response, ResourceSetRulesDeleteResourceSetRule204Response, - ResourceSetRulesDeleteResourceSetRuledefaultResponse, - ResourceSetRulesGetResourceSetRule200Response, - ResourceSetRulesGetResourceSetRuledefaultResponse, + ResourceSetRulesDeleteResourceSetRuleDefaultResponse, ResourceSetRulesListResourceSetRules200Response, - ResourceSetRulesListResourceSetRulesdefaultResponse, + ResourceSetRulesListResourceSetRulesDefaultResponse, } from "./responses.js"; +import type { Client, StreamableMethod } from "@azure-rest/core-client"; export interface AccountsGetAccountProperties { /** Get an account */ get( options?: AccountsGetAccountPropertiesParameters, - ): Promise; + ): StreamableMethod< + AccountsGetAccountProperties200Response | AccountsGetAccountPropertiesDefaultResponse + >; /** Updates an account */ patch( options: AccountsUpdateAccountPropertiesParameters, - ): Promise< - AccountsUpdateAccountProperties200Response | AccountsUpdateAccountPropertiesdefaultResponse + ): StreamableMethod< + AccountsUpdateAccountProperties200Response | AccountsUpdateAccountPropertiesDefaultResponse >; } @@ -67,48 +69,56 @@ export interface AccountsGetAccessKeys { /** List the authorization keys associated with this account. */ post( options?: AccountsGetAccessKeysParameters, - ): Promise; + ): StreamableMethod; } export interface AccountsRegenerateAccessKey { /** Regenerate the authorization keys associated with this data catalog. */ post( options: AccountsRegenerateAccessKeyParameters, - ): Promise; + ): StreamableMethod< + AccountsRegenerateAccessKey200Response | AccountsRegenerateAccessKeyDefaultResponse + >; } export interface CollectionsGetCollection { /** Get a collection */ get( options?: CollectionsGetCollectionParameters, - ): Promise; + ): StreamableMethod< + CollectionsGetCollection200Response | CollectionsGetCollectionDefaultResponse + >; /** Creates or updates a collection entity. */ put( options: CollectionsCreateOrUpdateCollectionParameters, - ): Promise< + ): StreamableMethod< | CollectionsCreateOrUpdateCollection200Response - | CollectionsCreateOrUpdateCollectiondefaultResponse + | CollectionsCreateOrUpdateCollectionDefaultResponse >; /** Deletes a Collection entity. */ delete( options?: CollectionsDeleteCollectionParameters, - ): Promise; + ): StreamableMethod< + CollectionsDeleteCollection204Response | CollectionsDeleteCollectionDefaultResponse + >; } export interface CollectionsListCollections { /** List the collections in the account. */ get( options?: CollectionsListCollectionsParameters, - ): Promise; + ): StreamableMethod< + CollectionsListCollections200Response | CollectionsListCollectionsDefaultResponse + >; } export interface CollectionsListChildCollectionNames { /** Lists the child collections names in the collection. */ get( options?: CollectionsListChildCollectionNamesParameters, - ): Promise< + ): StreamableMethod< | CollectionsListChildCollectionNames200Response - | CollectionsListChildCollectionNamesdefaultResponse + | CollectionsListChildCollectionNamesDefaultResponse >; } @@ -116,31 +126,33 @@ export interface CollectionsGetCollectionPath { /** Gets the parent name and parent friendly name chains that represent the collection path. */ get( options?: CollectionsGetCollectionPathParameters, - ): Promise; + ): StreamableMethod< + CollectionsGetCollectionPath200Response | CollectionsGetCollectionPathDefaultResponse + >; } export interface ResourceSetRulesGetResourceSetRule { /** Get a resource set config service model. */ get( options?: ResourceSetRulesGetResourceSetRuleParameters, - ): Promise< + ): StreamableMethod< | ResourceSetRulesGetResourceSetRule200Response - | ResourceSetRulesGetResourceSetRuledefaultResponse + | ResourceSetRulesGetResourceSetRuleDefaultResponse >; /** Creates or updates an resource set config. */ put( options: ResourceSetRulesCreateOrUpdateResourceSetRuleParameters, - ): Promise< + ): StreamableMethod< | ResourceSetRulesCreateOrUpdateResourceSetRule200Response - | ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse + | ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse >; /** Deletes a ResourceSetRuleConfig resource. */ delete( options?: ResourceSetRulesDeleteResourceSetRuleParameters, - ): Promise< + ): StreamableMethod< | ResourceSetRulesDeleteResourceSetRule200Response | ResourceSetRulesDeleteResourceSetRule204Response - | ResourceSetRulesDeleteResourceSetRuledefaultResponse + | ResourceSetRulesDeleteResourceSetRuleDefaultResponse >; } @@ -148,9 +160,9 @@ export interface ResourceSetRulesListResourceSetRules { /** Get a resource set config service model. */ get( options?: ResourceSetRulesListResourceSetRulesParameters, - ): Promise< + ): StreamableMethod< | ResourceSetRulesListResourceSetRules200Response - | ResourceSetRulesListResourceSetRulesdefaultResponse + | ResourceSetRulesListResourceSetRulesDefaultResponse >; } @@ -183,6 +195,6 @@ export interface Routes { (path: "/resourceSetRuleConfigs"): ResourceSetRulesListResourceSetRules; } -export type PurviewAccountRestClient = Client & { +export type PurviewAccountClient = Client & { path: Routes; }; diff --git a/sdk/purview/purview-administration-rest/src/account/index.ts b/sdk/purview/purview-administration-rest/src/account/index.ts index ac4a0bf815a6..36c5009076c2 100644 --- a/sdk/purview/purview-administration-rest/src/account/index.ts +++ b/sdk/purview/purview-administration-rest/src/account/index.ts @@ -1,10 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import * as Models from "./models.js"; -import * as Pagination from "./paginateHelper.js"; import * as Parameters from "./parameters.js"; -import * as Client from "./clientDefinitions.js"; import * as Responses from "./responses.js"; -export { Models, Pagination, Parameters, Client, Responses }; -export { PurviewAccountClient } from "./purviewAccount.js"; +import * as Client from "./clientDefinitions.js"; +import * as Models from "./models.js"; +import * as OutputModels from "./outputModels.js"; +import * as PaginateHelper from "./paginateHelper.js"; +import * as UnexpectedHelper from "./isUnexpected.js"; + +export { createClient, PurviewAccountClientOptions } from "./purviewAccount.js"; +export { Parameters, Responses, Client, Models, OutputModels, PaginateHelper, UnexpectedHelper }; diff --git a/sdk/purview/purview-administration-rest/src/account/isUnexpected.ts b/sdk/purview/purview-administration-rest/src/account/isUnexpected.ts new file mode 100644 index 000000000000..b35fca3ca4df --- /dev/null +++ b/sdk/purview/purview-administration-rest/src/account/isUnexpected.ts @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + AccountsGetAccountProperties200Response, + AccountsGetAccountPropertiesDefaultResponse, + AccountsUpdateAccountProperties200Response, + AccountsUpdateAccountPropertiesDefaultResponse, + AccountsGetAccessKeys200Response, + AccountsGetAccessKeysDefaultResponse, + AccountsRegenerateAccessKey200Response, + AccountsRegenerateAccessKeyDefaultResponse, + CollectionsGetCollection200Response, + CollectionsGetCollectionDefaultResponse, + CollectionsCreateOrUpdateCollection200Response, + CollectionsCreateOrUpdateCollectionDefaultResponse, + CollectionsDeleteCollection204Response, + CollectionsDeleteCollectionDefaultResponse, + CollectionsListCollections200Response, + CollectionsListCollectionsDefaultResponse, + CollectionsListChildCollectionNames200Response, + CollectionsListChildCollectionNamesDefaultResponse, + CollectionsGetCollectionPath200Response, + CollectionsGetCollectionPathDefaultResponse, + ResourceSetRulesGetResourceSetRule200Response, + ResourceSetRulesGetResourceSetRuleDefaultResponse, + ResourceSetRulesCreateOrUpdateResourceSetRule200Response, + ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse, + ResourceSetRulesDeleteResourceSetRule200Response, + ResourceSetRulesDeleteResourceSetRule204Response, + ResourceSetRulesDeleteResourceSetRuleDefaultResponse, + ResourceSetRulesListResourceSetRules200Response, + ResourceSetRulesListResourceSetRulesDefaultResponse, +} from "./responses.js"; + +const responseMap: Record = { + "GET /": ["200"], + "PATCH /": ["200"], + "POST /listkeys": ["200"], + "POST /regeneratekeys": ["200"], + "GET /collections/{collectionName}": ["200"], + "PUT /collections/{collectionName}": ["200"], + "DELETE /collections/{collectionName}": ["204"], + "GET /collections": ["200"], + "GET /collections/{collectionName}/getChildCollectionNames": ["200"], + "GET /collections/{collectionName}/getCollectionPath": ["200"], + "GET /resourceSetRuleConfigs/defaultResourceSetRuleConfig": ["200"], + "PUT /resourceSetRuleConfigs/defaultResourceSetRuleConfig": ["200"], + "DELETE /resourceSetRuleConfigs/defaultResourceSetRuleConfig": ["200", "204"], + "GET /resourceSetRuleConfigs": ["200"], +}; + +export function isUnexpected( + response: AccountsGetAccountProperties200Response | AccountsGetAccountPropertiesDefaultResponse, +): response is AccountsGetAccountPropertiesDefaultResponse; +export function isUnexpected( + response: + | AccountsUpdateAccountProperties200Response + | AccountsUpdateAccountPropertiesDefaultResponse, +): response is AccountsUpdateAccountPropertiesDefaultResponse; +export function isUnexpected( + response: AccountsGetAccessKeys200Response | AccountsGetAccessKeysDefaultResponse, +): response is AccountsGetAccessKeysDefaultResponse; +export function isUnexpected( + response: AccountsRegenerateAccessKey200Response | AccountsRegenerateAccessKeyDefaultResponse, +): response is AccountsRegenerateAccessKeyDefaultResponse; +export function isUnexpected( + response: CollectionsGetCollection200Response | CollectionsGetCollectionDefaultResponse, +): response is CollectionsGetCollectionDefaultResponse; +export function isUnexpected( + response: + | CollectionsCreateOrUpdateCollection200Response + | CollectionsCreateOrUpdateCollectionDefaultResponse, +): response is CollectionsCreateOrUpdateCollectionDefaultResponse; +export function isUnexpected( + response: CollectionsDeleteCollection204Response | CollectionsDeleteCollectionDefaultResponse, +): response is CollectionsDeleteCollectionDefaultResponse; +export function isUnexpected( + response: CollectionsListCollections200Response | CollectionsListCollectionsDefaultResponse, +): response is CollectionsListCollectionsDefaultResponse; +export function isUnexpected( + response: + | CollectionsListChildCollectionNames200Response + | CollectionsListChildCollectionNamesDefaultResponse, +): response is CollectionsListChildCollectionNamesDefaultResponse; +export function isUnexpected( + response: CollectionsGetCollectionPath200Response | CollectionsGetCollectionPathDefaultResponse, +): response is CollectionsGetCollectionPathDefaultResponse; +export function isUnexpected( + response: + | ResourceSetRulesGetResourceSetRule200Response + | ResourceSetRulesGetResourceSetRuleDefaultResponse, +): response is ResourceSetRulesGetResourceSetRuleDefaultResponse; +export function isUnexpected( + response: + | ResourceSetRulesCreateOrUpdateResourceSetRule200Response + | ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse, +): response is ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse; +export function isUnexpected( + response: + | ResourceSetRulesDeleteResourceSetRule200Response + | ResourceSetRulesDeleteResourceSetRule204Response + | ResourceSetRulesDeleteResourceSetRuleDefaultResponse, +): response is ResourceSetRulesDeleteResourceSetRuleDefaultResponse; +export function isUnexpected( + response: + | ResourceSetRulesListResourceSetRules200Response + | ResourceSetRulesListResourceSetRulesDefaultResponse, +): response is ResourceSetRulesListResourceSetRulesDefaultResponse; +export function isUnexpected( + response: + | AccountsGetAccountProperties200Response + | AccountsGetAccountPropertiesDefaultResponse + | AccountsUpdateAccountProperties200Response + | AccountsUpdateAccountPropertiesDefaultResponse + | AccountsGetAccessKeys200Response + | AccountsGetAccessKeysDefaultResponse + | AccountsRegenerateAccessKey200Response + | AccountsRegenerateAccessKeyDefaultResponse + | CollectionsGetCollection200Response + | CollectionsGetCollectionDefaultResponse + | CollectionsCreateOrUpdateCollection200Response + | CollectionsCreateOrUpdateCollectionDefaultResponse + | CollectionsDeleteCollection204Response + | CollectionsDeleteCollectionDefaultResponse + | CollectionsListCollections200Response + | CollectionsListCollectionsDefaultResponse + | CollectionsListChildCollectionNames200Response + | CollectionsListChildCollectionNamesDefaultResponse + | CollectionsGetCollectionPath200Response + | CollectionsGetCollectionPathDefaultResponse + | ResourceSetRulesGetResourceSetRule200Response + | ResourceSetRulesGetResourceSetRuleDefaultResponse + | ResourceSetRulesCreateOrUpdateResourceSetRule200Response + | ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse + | ResourceSetRulesDeleteResourceSetRule200Response + | ResourceSetRulesDeleteResourceSetRule204Response + | ResourceSetRulesDeleteResourceSetRuleDefaultResponse + | ResourceSetRulesListResourceSetRules200Response + | ResourceSetRulesListResourceSetRulesDefaultResponse, +): response is + | AccountsGetAccountPropertiesDefaultResponse + | AccountsUpdateAccountPropertiesDefaultResponse + | AccountsGetAccessKeysDefaultResponse + | AccountsRegenerateAccessKeyDefaultResponse + | CollectionsGetCollectionDefaultResponse + | CollectionsCreateOrUpdateCollectionDefaultResponse + | CollectionsDeleteCollectionDefaultResponse + | CollectionsListCollectionsDefaultResponse + | CollectionsListChildCollectionNamesDefaultResponse + | CollectionsGetCollectionPathDefaultResponse + | ResourceSetRulesGetResourceSetRuleDefaultResponse + | ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse + | ResourceSetRulesDeleteResourceSetRuleDefaultResponse + | ResourceSetRulesListResourceSetRulesDefaultResponse { + const lroOriginal = response.headers["x-ms-original-url"]; + const url = new URL(lroOriginal ?? response.request.url); + const method = response.request.method; + let pathDetails = responseMap[`${method} ${url.pathname}`]; + if (!pathDetails) { + pathDetails = getParametrizedPathSuccess(method, url.pathname); + } + return !pathDetails.includes(response.status); +} + +function getParametrizedPathSuccess(method: string, path: string): string[] { + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(responseMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/purview/purview-administration-rest/src/account/models.ts b/sdk/purview/purview-administration-rest/src/account/models.ts index 0d2d608408ae..224f07079e77 100644 --- a/sdk/purview/purview-administration-rest/src/account/models.ts +++ b/sdk/purview/purview-administration-rest/src/account/models.ts @@ -1,217 +1,35 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -export interface Account { - /** Gets or sets the identifier. */ - id?: string; - /** Identity Info on the tracked resource */ - identity?: Identity; - /** Gets or sets the location. */ - location?: string; - /** Gets or sets the name. */ - name?: string; - /** Gets or sets the properties. */ - properties?: AccountProperties; - /** Gets or sets the Sku. */ - sku?: AccountSku; - /** Metadata pertaining to creation and last modification of the resource. */ - systemData?: AccountSystemData; - /** Tags on the azure resource. */ - tags?: Record; - /** Gets or sets the type. */ - type?: string; -} - -export interface Identity { - /** Service principal object Id */ - principalId?: string; - /** Tenant Id */ - tenantId?: string; - /** Identity Type */ - type?: "SystemAssigned"; -} - -export interface AccountProperties { - /** - * Cloud connectors. - * External cloud identifier used as part of scanning configuration. - */ - cloudConnectors?: CloudConnectors; - /** Gets the time at which the entity was created. */ - createdAt?: Date; - /** Gets the creator of the entity. */ - createdBy?: string; - /** Gets the creators of the entity's object id. */ - createdByObjectId?: string; - /** The URIs that are the public endpoints of the account. */ - endpoints?: AccountPropertiesEndpoints; - /** Gets or sets the friendly name. */ - friendlyName?: string; - /** Gets or sets the managed resource group name */ - managedResourceGroupName?: string; - /** Gets the resource identifiers of the managed resources. */ - managedResources?: AccountPropertiesManagedResources; - /** Gets the private endpoint connections information. */ - privateEndpointConnections?: Array; - /** Gets or sets the state of the provisioning. */ - provisioningState?: - | "Unknown" - | "Creating" - | "Moving" - | "Deleting" - | "SoftDeleting" - | "SoftDeleted" - | "Failed" - | "Succeeded" - | "Canceled"; - /** Gets or sets the public network access. */ - publicNetworkAccess?: "NotSpecified" | "Enabled" | "Disabled"; -} - -export interface CloudConnectors { - /** - * AWS external identifier. - * Configured in AWS to allow use of the role arn used for scanning - */ - awsExternalId?: string; -} - -export interface AccountEndpoints { - /** Gets the catalog endpoint. */ - catalog?: string; - /** Gets the guardian endpoint. */ - guardian?: string; - /** Gets the scan endpoint. */ - scan?: string; -} - -export interface AccountPropertiesEndpoints extends AccountEndpoints {} - -export interface ManagedResources { - /** Gets the managed event hub namespace resource identifier. */ - eventHubNamespace?: string; - /** Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. */ - resourceGroup?: string; - /** Gets the managed storage account resource identifier. */ - storageAccount?: string; -} - -export interface AccountPropertiesManagedResources extends ManagedResources {} - -export interface PrivateEndpointConnection { - /** Gets or sets the identifier. */ - id?: string; - /** Gets or sets the name. */ - name?: string; - /** The connection identifier. */ - properties?: PrivateEndpointConnectionProperties; - /** Gets or sets the type. */ - type?: string; -} - -export interface PrivateEndpointConnectionProperties { - /** The private endpoint information. */ - privateEndpoint?: PrivateEndpoint; - /** The private link service connection state. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** The provisioning state. */ - provisioningState?: string; -} - -export interface PrivateEndpoint { - /** The private endpoint identifier. */ - id?: string; -} - -export interface PrivateLinkServiceConnectionState { - /** The required actions. */ - actionsRequired?: string; - /** The description. */ - description?: string; - /** The status. */ - status?: "Unknown" | "Pending" | "Approved" | "Rejected" | "Disconnected"; -} - -export interface AccountSku { - /** Gets or sets the sku capacity. Possible values include: 4, 16 */ - capacity?: number; - /** Gets or sets the sku name. */ - name?: "Standard"; -} - -export interface SystemData { - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: "User" | "Application" | "ManagedIdentity" | "Key"; - /** The timestamp of the last modification the resource (UTC). */ - lastModifiedAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: "User" | "Application" | "ManagedIdentity" | "Key"; -} - +/** Metadata pertaining to creation and last modification of the resource. */ export interface AccountSystemData extends SystemData {} -export interface ErrorResponseModel { - /** Gets or sets the error. */ - error?: ErrorResponseModelError; -} - -export interface ErrorModel { - /** Gets or sets the code. */ - code?: string; - /** Gets or sets the details. */ - details?: Array; - /** Gets or sets the messages. */ - message?: string; - /** Gets or sets the target. */ - target?: string; -} - -export interface ErrorResponseModelError extends ErrorModel {} +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData {} +/** The account properties that can be updated through data plane. */ export interface DataPlaneAccountUpdateParameters { /** The friendly name for the azure resource. */ friendlyName?: string; } -export interface AccessKeys { - /** Gets or sets the primary connection string. */ - atlasKafkaPrimaryEndpoint?: string; - /** Gets or sets the secondary connection string. */ - atlasKafkaSecondaryEndpoint?: string; -} - +/** A access key options used for regeneration. */ export interface AccessKeyOptions { /** The access key type. */ keyType?: "PrimaryAtlasKafkaKey" | "SecondaryAtlasKafkaKey"; } +/** Collection resource. */ export interface Collection { - /** Gets the state of the provisioning. */ - collectionProvisioningState?: - | "Unknown" - | "Creating" - | "Moving" - | "Deleting" - | "Failed" - | "Succeeded"; /** Gets or sets the description. */ description?: string; /** Gets or sets the friendly name of the collection. */ friendlyName?: string; - /** Gets the name. */ - name?: string; /** Gets or sets the parent collection reference. */ parentCollection?: CollectionReference; - /** Metadata pertaining to creation and last modification of the resource. */ - systemData?: CollectionSystemData; } +/** Reference to a Collection. */ export interface CollectionReference { /** Gets or sets the reference name. */ referenceName?: string; @@ -219,52 +37,21 @@ export interface CollectionReference { type?: string; } +/** Metadata pertaining to creation and last modification of the resource. */ export interface CollectionSystemData extends SystemData {} -export interface CollectionList { - /** Total item count. */ - count?: number; - /** The Url of next result page. */ - nextLink?: string; - /** Collection of items of type results. */ - value: Array; -} - -export interface CollectionNameResponseList { - /** Total item count. */ - count?: number; - /** The Url of next result page. */ - nextLink?: string; - /** Collection of items of type results. */ - value: Array; -} - -export interface CollectionNameResponse { - /** Gets or sets the friendly name of the collection. */ - friendlyName?: string; - /** Gets the name. */ - name?: string; -} - -export interface CollectionPathResponse { - /** The friendly names of ancestors starting from the default (root) collection and ending with the immediate parent. */ - parentFriendlyNameChain?: Array; - /** The names of ancestors starting from the default (root) collection and ending with the immediate parent. */ - parentNameChain?: Array; -} - +/** ResourceSetRuleConfig implementation class. */ export interface ResourceSetRuleConfig { /** Gets or sets the advanced resource set property of the account. */ advancedResourceSet?: AdvancedResourceSet; - /** The name of the rule */ - name?: string; /** The configuration rules for path pattern extraction. */ pathPatternConfig?: PathPatternExtractorConfig; } +/** The resource set processing property of the account. */ export interface AdvancedResourceSet { /** Date at which ResourceSetProcessing property of the account is updated. */ - modifiedAt?: Date; + modifiedAt?: Date | string; /** The advanced resource property of the account. */ resourceSetProcessing?: "Default" | "Advanced"; } @@ -356,12 +143,3 @@ export interface Rule { name?: string; qualifiedName: string; } - -export interface ResourceSetRuleConfigList { - /** Total item count. */ - count?: number; - /** The Url of next result page. */ - nextLink?: string; - /** Collection of items of type results. */ - value: Array; -} diff --git a/sdk/purview/purview-administration-rest/src/account/outputModels.ts b/sdk/purview/purview-administration-rest/src/account/outputModels.ts new file mode 100644 index 000000000000..7be2b8167214 --- /dev/null +++ b/sdk/purview/purview-administration-rest/src/account/outputModels.ts @@ -0,0 +1,385 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** Account resource */ +export interface AccountOutput { + /** Gets or sets the identifier. */ + readonly id?: string; + /** Identity Info on the tracked resource */ + identity?: IdentityOutput; + /** Gets or sets the location. */ + location?: string; + /** Gets or sets the name. */ + readonly name?: string; + /** Gets or sets the properties. */ + properties?: AccountPropertiesOutput; + /** Gets or sets the Sku. */ + sku?: AccountSkuOutput; + /** Metadata pertaining to creation and last modification of the resource. */ + readonly systemData?: AccountSystemDataOutput; + /** Tags on the azure resource. */ + tags?: Record; + /** Gets or sets the type. */ + readonly type?: string; +} + +/** The Managed Identity of the resource */ +export interface IdentityOutput { + /** Service principal object Id */ + readonly principalId?: string; + /** Tenant Id */ + readonly tenantId?: string; + /** Identity Type */ + type?: "SystemAssigned"; +} + +/** The account properties */ +export interface AccountPropertiesOutput { + /** + * Cloud connectors. + * External cloud identifier used as part of scanning configuration. + */ + cloudConnectors?: CloudConnectorsOutput; + /** Gets the time at which the entity was created. */ + readonly createdAt?: string; + /** Gets the creator of the entity. */ + readonly createdBy?: string; + /** Gets the creators of the entity's object id. */ + readonly createdByObjectId?: string; + /** The URIs that are the public endpoints of the account. */ + readonly endpoints?: AccountPropertiesEndpointsOutput; + /** Gets or sets the friendly name. */ + readonly friendlyName?: string; + /** Gets or sets the managed resource group name */ + managedResourceGroupName?: string; + /** Gets the resource identifiers of the managed resources. */ + readonly managedResources?: AccountPropertiesManagedResourcesOutput; + /** Gets the private endpoint connections information. */ + readonly privateEndpointConnections?: Array; + /** Gets or sets the state of the provisioning. */ + readonly provisioningState?: + | "Unknown" + | "Creating" + | "Moving" + | "Deleting" + | "SoftDeleting" + | "SoftDeleted" + | "Failed" + | "Succeeded" + | "Canceled"; + /** Gets or sets the public network access. */ + publicNetworkAccess?: "NotSpecified" | "Enabled" | "Disabled"; +} + +export interface CloudConnectorsOutput { + /** + * AWS external identifier. + * Configured in AWS to allow use of the role arn used for scanning + */ + readonly awsExternalId?: string; +} + +/** The URIs that are the public endpoints of the account. */ +export interface AccountPropertiesEndpointsOutput extends AccountEndpointsOutput {} + +/** The account endpoints */ +export interface AccountEndpointsOutput { + /** Gets the catalog endpoint. */ + readonly catalog?: string; + /** Gets the guardian endpoint. */ + readonly guardian?: string; + /** Gets the scan endpoint. */ + readonly scan?: string; +} + +/** Gets the resource identifiers of the managed resources. */ +export interface AccountPropertiesManagedResourcesOutput extends ManagedResourcesOutput {} + +/** The managed resources in customer subscription. */ +export interface ManagedResourcesOutput { + /** Gets the managed event hub namespace resource identifier. */ + readonly eventHubNamespace?: string; + /** Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. */ + readonly resourceGroup?: string; + /** Gets the managed storage account resource identifier. */ + readonly storageAccount?: string; +} + +/** A private endpoint connection class. */ +export interface PrivateEndpointConnectionOutput { + /** Gets or sets the identifier. */ + readonly id?: string; + /** Gets or sets the name. */ + readonly name?: string; + /** The connection identifier. */ + properties?: PrivateEndpointConnectionPropertiesOutput; + /** Gets or sets the type. */ + readonly type?: string; +} + +/** A private endpoint connection properties class. */ +export interface PrivateEndpointConnectionPropertiesOutput { + /** The private endpoint information. */ + privateEndpoint?: PrivateEndpointOutput; + /** The private link service connection state. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateOutput; + /** The provisioning state. */ + readonly provisioningState?: string; +} + +/** A private endpoint class. */ +export interface PrivateEndpointOutput { + /** The private endpoint identifier. */ + id?: string; +} + +/** The private link service connection state. */ +export interface PrivateLinkServiceConnectionStateOutput { + /** The required actions. */ + actionsRequired?: string; + /** The description. */ + description?: string; + /** The status. */ + status?: "Unknown" | "Pending" | "Approved" | "Rejected" | "Disconnected"; +} + +/** The Sku */ +export interface AccountSkuOutput { + /** Gets or sets the sku capacity. Possible values include: 4, 16 */ + capacity?: number; + /** Gets or sets the sku name. */ + name?: "Standard"; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface AccountSystemDataOutput extends SystemDataOutput {} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemDataOutput { + /** The timestamp of resource creation (UTC). */ + readonly createdAt?: string; + /** The identity that created the resource. */ + readonly createdBy?: string; + /** The type of identity that created the resource. */ + readonly createdByType?: "User" | "Application" | "ManagedIdentity" | "Key"; + /** The timestamp of the last modification the resource (UTC). */ + readonly lastModifiedAt?: string; + /** The identity that last modified the resource. */ + readonly lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + readonly lastModifiedByType?: "User" | "Application" | "ManagedIdentity" | "Key"; +} + +/** Default error response model */ +export interface ErrorResponseModelOutput { + /** Gets or sets the error. */ + readonly error?: ErrorResponseModelErrorOutput; +} + +/** Gets or sets the error. */ +export interface ErrorResponseModelErrorOutput extends ErrorModelOutput {} + +/** Default error model */ +export interface ErrorModelOutput { + /** Gets or sets the code. */ + readonly code?: string; + /** Gets or sets the details. */ + readonly details?: Array; + /** Gets or sets the messages. */ + readonly message?: string; + /** Gets or sets the target. */ + readonly target?: string; +} + +/** The Account access keys. */ +export interface AccessKeysOutput { + /** Gets or sets the primary connection string. */ + atlasKafkaPrimaryEndpoint?: string; + /** Gets or sets the secondary connection string. */ + atlasKafkaSecondaryEndpoint?: string; +} + +/** Collection resource. */ +export interface CollectionOutput { + /** Gets the state of the provisioning. */ + readonly collectionProvisioningState?: + | "Unknown" + | "Creating" + | "Moving" + | "Deleting" + | "Failed" + | "Succeeded"; + /** Gets or sets the description. */ + description?: string; + /** Gets or sets the friendly name of the collection. */ + friendlyName?: string; + /** Gets the name. */ + readonly name?: string; + /** Gets or sets the parent collection reference. */ + parentCollection?: CollectionReferenceOutput; + /** Metadata pertaining to creation and last modification of the resource. */ + readonly systemData?: CollectionSystemDataOutput; +} + +/** Reference to a Collection. */ +export interface CollectionReferenceOutput { + /** Gets or sets the reference name. */ + referenceName?: string; + /** Gets or sets the reference type property. */ + type?: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface CollectionSystemDataOutput extends SystemDataOutput {} + +/** Paged list of collections. */ +export interface CollectionListOutput { + /** Total item count. */ + count?: number; + /** The Url of next result page. */ + nextLink?: string; + /** Collection of items of type results. */ + value: Array; +} + +/** Paged list of collections. */ +export interface CollectionNameResponseListOutput { + /** Total item count. */ + count?: number; + /** The Url of next result page. */ + nextLink?: string; + /** Collection of items of type results. */ + value: Array; +} + +/** Collection resource. */ +export interface CollectionNameResponseOutput { + /** Gets or sets the friendly name of the collection. */ + readonly friendlyName?: string; + /** Gets the name. */ + readonly name?: string; +} + +/** Collection resource. */ +export interface CollectionPathResponseOutput { + /** The friendly names of ancestors starting from the default (root) collection and ending with the immediate parent. */ + readonly parentFriendlyNameChain?: Array; + /** The names of ancestors starting from the default (root) collection and ending with the immediate parent. */ + readonly parentNameChain?: Array; +} + +/** ResourceSetRuleConfig implementation class. */ +export interface ResourceSetRuleConfigOutput { + /** Gets or sets the advanced resource set property of the account. */ + advancedResourceSet?: AdvancedResourceSetOutput; + /** The name of the rule */ + readonly name?: string; + /** The configuration rules for path pattern extraction. */ + pathPatternConfig?: PathPatternExtractorConfigOutput; +} + +/** The resource set processing property of the account. */ +export interface AdvancedResourceSetOutput { + /** Date at which ResourceSetProcessing property of the account is updated. */ + modifiedAt?: string; + /** The advanced resource property of the account. */ + resourceSetProcessing?: "Default" | "Advanced"; +} + +export interface PathPatternExtractorConfigOutput { + acceptedPatterns?: Array; + complexReplacers?: Array; + createdBy: string; + enableDefaultPatterns: boolean; + lastUpdatedTimestamp?: number; + modifiedBy?: string; + normalizationRules?: Array; + regexReplacers?: Array; + rejectedPatterns?: Array; + scopedRules?: Array; + version?: number; +} + +export interface FilterOutput { + createdBy?: string; + filterType?: "Pattern" | "Regex"; + lastUpdatedTimestamp?: number; + modifiedBy?: string; + name: string; + path: string; +} + +export interface ComplexReplacerConfigOutput { + createdBy?: string; + description?: string; + disabled?: boolean; + disableRecursiveReplacerApplication?: boolean; + lastUpdatedTimestamp?: number; + modifiedBy?: string; + name?: string; + typeName?: string; +} + +export interface NormalizationRuleOutput { + description?: string; + disabled?: boolean; + dynamicReplacement?: boolean; + entityTypes?: Array; + lastUpdatedTimestamp?: number; + name?: string; + regex?: FastRegexOutput; + replaceWith?: string; + version?: number; +} + +export interface FastRegexOutput { + maxDigits?: number; + maxLetters?: number; + minDashes?: number; + minDigits?: number; + minDigitsOrLetters?: number; + minDots?: number; + minHex?: number; + minLetters?: number; + minUnderscores?: number; + options?: number; + regexStr?: string; +} + +export interface RegexReplacerOutput { + condition?: string; + createdBy?: string; + description?: string; + disabled: boolean; + disableRecursiveReplacerApplication?: boolean; + doNotReplaceRegex?: FastRegexOutput; + lastUpdatedTimestamp?: number; + modifiedBy?: string; + name: string; + regex?: FastRegexOutput; + replaceWith?: string; +} + +export interface ScopedRuleOutput { + bindingUrl: string; + rules?: Array; + storeType: string; +} + +export interface RuleOutput { + displayName?: string; + isResourceSet?: boolean; + lastUpdatedTimestamp?: number; + name?: string; + qualifiedName: string; +} + +/** Paged list of account resources */ +export interface ResourceSetRuleConfigListOutput { + /** Total item count. */ + count?: number; + /** The Url of next result page. */ + nextLink?: string; + /** Collection of items of type results. */ + value: Array; +} diff --git a/sdk/purview/purview-administration-rest/src/account/paginateHelper.ts b/sdk/purview/purview-administration-rest/src/account/paginateHelper.ts index 5d541b4e406d..9ea946d9d6c5 100644 --- a/sdk/purview/purview-administration-rest/src/account/paginateHelper.ts +++ b/sdk/purview/purview-administration-rest/src/account/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/purview/purview-administration-rest/src/account/parameters.ts b/sdk/purview/purview-administration-rest/src/account/parameters.ts index 6fb52c5be160..75b6ed39dc3c 100644 --- a/sdk/purview/purview-administration-rest/src/account/parameters.ts +++ b/sdk/purview/purview-administration-rest/src/account/parameters.ts @@ -3,9 +3,9 @@ import type { RequestParameters } from "@azure-rest/core-client"; import type { + DataPlaneAccountUpdateParameters, AccessKeyOptions, Collection, - DataPlaneAccountUpdateParameters, ResourceSetRuleConfig, } from "./models.js"; @@ -15,15 +15,28 @@ export interface AccountsUpdateAccountPropertiesBodyParam { body: DataPlaneAccountUpdateParameters; } -export type AccountsUpdateAccountPropertiesParameters = AccountsUpdateAccountPropertiesBodyParam & - RequestParameters; +export interface AccountsUpdateAccountPropertiesMediaTypesParam { + /** Request content type */ + contentType?: "application/json"; +} + +export type AccountsUpdateAccountPropertiesParameters = + AccountsUpdateAccountPropertiesMediaTypesParam & + AccountsUpdateAccountPropertiesBodyParam & + RequestParameters; export type AccountsGetAccessKeysParameters = RequestParameters; export interface AccountsRegenerateAccessKeyBodyParam { body: AccessKeyOptions; } -export type AccountsRegenerateAccessKeyParameters = AccountsRegenerateAccessKeyBodyParam & +export interface AccountsRegenerateAccessKeyMediaTypesParam { + /** Request content type */ + contentType?: "application/json"; +} + +export type AccountsRegenerateAccessKeyParameters = AccountsRegenerateAccessKeyMediaTypesParam & + AccountsRegenerateAccessKeyBodyParam & RequestParameters; export type CollectionsGetCollectionParameters = RequestParameters; @@ -31,8 +44,15 @@ export interface CollectionsCreateOrUpdateCollectionBodyParam { body: Collection; } +export interface CollectionsCreateOrUpdateCollectionMediaTypesParam { + /** Request content type */ + contentType?: "application/json"; +} + export type CollectionsCreateOrUpdateCollectionParameters = - CollectionsCreateOrUpdateCollectionBodyParam & RequestParameters; + CollectionsCreateOrUpdateCollectionMediaTypesParam & + CollectionsCreateOrUpdateCollectionBodyParam & + RequestParameters; export type CollectionsDeleteCollectionParameters = RequestParameters; export interface CollectionsListCollectionsQueryParamProperties { @@ -63,8 +83,15 @@ export interface ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam { body: ResourceSetRuleConfig; } +export interface ResourceSetRulesCreateOrUpdateResourceSetRuleMediaTypesParam { + /** Request content type */ + contentType?: "application/json"; +} + export type ResourceSetRulesCreateOrUpdateResourceSetRuleParameters = - ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam & RequestParameters; + ResourceSetRulesCreateOrUpdateResourceSetRuleMediaTypesParam & + ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam & + RequestParameters; export type ResourceSetRulesDeleteResourceSetRuleParameters = RequestParameters; export interface ResourceSetRulesListResourceSetRulesQueryParamProperties { diff --git a/sdk/purview/purview-administration-rest/src/account/purviewAccount.ts b/sdk/purview/purview-administration-rest/src/account/purviewAccount.ts index e65b792b035a..598616341dcc 100644 --- a/sdk/purview/purview-administration-rest/src/account/purviewAccount.ts +++ b/sdk/purview/purview-administration-rest/src/account/purviewAccount.ts @@ -1,23 +1,65 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; +import { logger } from "../logger.js"; import type { TokenCredential } from "@azure/core-auth"; -import type { PurviewAccountRestClient } from "./clientDefinitions.js"; +import type { PurviewAccountClient } from "./clientDefinitions.js"; + +/** The optional parameters for the client */ +export interface PurviewAccountClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} -export function PurviewAccountClient( +/** + * Initialize a new instance of `PurviewAccountClient` + * @param endpoint - The account endpoint of your Purview account. Example: https://\{accountName\}.purview.azure.com/account/ + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters + */ +export function createClient( endpoint: string, credentials: TokenCredential, - options: ClientOptions = {}, -): PurviewAccountRestClient { - const baseUrl = options.baseUrl ?? `${endpoint}`; - options.apiVersion = options.apiVersion ?? "2019-11-01-preview"; + { apiVersion = "2019-11-01-preview", ...options }: PurviewAccountClientOptions = {}, +): PurviewAccountClient { + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}`; + const userAgentInfo = `azsdk-js-purview-administration-rest/1.0.0-beta.2`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` + : `${userAgentInfo}`; options = { ...options, + userAgentOptions: { + userAgentPrefix, + }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, credentials: { scopes: ["https://purview.azure.net/.default"], }, }; + const client = getClient(endpointUrl, credentials, options) as PurviewAccountClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); - return getClient(baseUrl, credentials, options) as PurviewAccountRestClient; + return client; } diff --git a/sdk/purview/purview-administration-rest/src/account/responses.ts b/sdk/purview/purview-administration-rest/src/account/responses.ts index 996b82ed620d..a7e85eca15c4 100644 --- a/sdk/purview/purview-administration-rest/src/account/responses.ts +++ b/sdk/purview/purview-administration-rest/src/account/responses.ts @@ -3,187 +3,184 @@ import type { HttpResponse } from "@azure-rest/core-client"; import type { - AccessKeys, - Account, - Collection, - CollectionList, - CollectionNameResponseList, - CollectionPathResponse, - ErrorResponseModel, - ResourceSetRuleConfig, - ResourceSetRuleConfigList, -} from "./models.js"; + AccountOutput, + ErrorResponseModelOutput, + AccessKeysOutput, + CollectionOutput, + CollectionListOutput, + CollectionNameResponseListOutput, + CollectionPathResponseOutput, + ResourceSetRuleConfigOutput, + ResourceSetRuleConfigListOutput, +} from "./outputModels.js"; /** Get an account */ export interface AccountsGetAccountProperties200Response extends HttpResponse { status: "200"; - body: Account; + body: AccountOutput; } /** Get an account */ -export interface AccountsGetAccountPropertiesdefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface AccountsGetAccountPropertiesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Updates an account */ export interface AccountsUpdateAccountProperties200Response extends HttpResponse { status: "200"; - body: Account; + body: AccountOutput; } /** Updates an account */ -export interface AccountsUpdateAccountPropertiesdefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface AccountsUpdateAccountPropertiesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** List the authorization keys associated with this account. */ export interface AccountsGetAccessKeys200Response extends HttpResponse { status: "200"; - body: AccessKeys; + body: AccessKeysOutput; } /** List the authorization keys associated with this account. */ -export interface AccountsGetAccessKeysdefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface AccountsGetAccessKeysDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Regenerate the authorization keys associated with this data catalog. */ export interface AccountsRegenerateAccessKey200Response extends HttpResponse { status: "200"; - body: AccessKeys; + body: AccessKeysOutput; } /** Regenerate the authorization keys associated with this data catalog. */ -export interface AccountsRegenerateAccessKeydefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface AccountsRegenerateAccessKeyDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Get a collection */ export interface CollectionsGetCollection200Response extends HttpResponse { status: "200"; - body: Collection; + body: CollectionOutput; } /** Get a collection */ -export interface CollectionsGetCollectiondefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface CollectionsGetCollectionDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Creates or updates a collection entity. */ export interface CollectionsCreateOrUpdateCollection200Response extends HttpResponse { status: "200"; - body: Collection; + body: CollectionOutput; } /** Creates or updates a collection entity. */ -export interface CollectionsCreateOrUpdateCollectiondefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface CollectionsCreateOrUpdateCollectionDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Deletes a Collection entity. */ export interface CollectionsDeleteCollection204Response extends HttpResponse { status: "204"; - body: Record; } /** Deletes a Collection entity. */ -export interface CollectionsDeleteCollectiondefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface CollectionsDeleteCollectionDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** List the collections in the account. */ export interface CollectionsListCollections200Response extends HttpResponse { status: "200"; - body: CollectionList; + body: CollectionListOutput; } /** List the collections in the account. */ -export interface CollectionsListCollectionsdefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface CollectionsListCollectionsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Lists the child collections names in the collection. */ export interface CollectionsListChildCollectionNames200Response extends HttpResponse { status: "200"; - body: CollectionNameResponseList; + body: CollectionNameResponseListOutput; } /** Lists the child collections names in the collection. */ -export interface CollectionsListChildCollectionNamesdefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface CollectionsListChildCollectionNamesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Gets the parent name and parent friendly name chains that represent the collection path. */ export interface CollectionsGetCollectionPath200Response extends HttpResponse { status: "200"; - body: CollectionPathResponse; + body: CollectionPathResponseOutput; } /** Gets the parent name and parent friendly name chains that represent the collection path. */ -export interface CollectionsGetCollectionPathdefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface CollectionsGetCollectionPathDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Get a resource set config service model. */ export interface ResourceSetRulesGetResourceSetRule200Response extends HttpResponse { status: "200"; - body: ResourceSetRuleConfig; + body: ResourceSetRuleConfigOutput; } /** Get a resource set config service model. */ -export interface ResourceSetRulesGetResourceSetRuledefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface ResourceSetRulesGetResourceSetRuleDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Creates or updates an resource set config. */ export interface ResourceSetRulesCreateOrUpdateResourceSetRule200Response extends HttpResponse { status: "200"; - body: ResourceSetRuleConfig; + body: ResourceSetRuleConfigOutput; } /** Creates or updates an resource set config. */ -export interface ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Deletes a ResourceSetRuleConfig resource. */ export interface ResourceSetRulesDeleteResourceSetRule200Response extends HttpResponse { status: "200"; - body: Record; } /** Deletes a ResourceSetRuleConfig resource. */ export interface ResourceSetRulesDeleteResourceSetRule204Response extends HttpResponse { status: "204"; - body: Record; } /** Deletes a ResourceSetRuleConfig resource. */ -export interface ResourceSetRulesDeleteResourceSetRuledefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface ResourceSetRulesDeleteResourceSetRuleDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } /** Get a resource set config service model. */ export interface ResourceSetRulesListResourceSetRules200Response extends HttpResponse { status: "200"; - body: ResourceSetRuleConfigList; + body: ResourceSetRuleConfigListOutput; } /** Get a resource set config service model. */ -export interface ResourceSetRulesListResourceSetRulesdefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; +export interface ResourceSetRulesListResourceSetRulesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; } diff --git a/sdk/purview/purview-administration-rest/src/index.ts b/sdk/purview/purview-administration-rest/src/index.ts index 5c8325b9571b..8fe29275e261 100644 --- a/sdk/purview/purview-administration-rest/src/index.ts +++ b/sdk/purview/purview-administration-rest/src/index.ts @@ -1,10 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import * as PurviewAccount from "./account/index.js"; import * as PurviewMetadataPolicies from "./metadataPolicies/index.js"; +import * as PurviewAccount from "./account/index.js"; -export { PurviewAccount }; -export { PurviewMetadataPolicies }; -export { PurviewAccountClient } from "./account/purviewAccount.js"; -export { PurviewMetadataPoliciesClient } from "./metadataPolicies/purviewMetadataPolicies.js"; +export { PurviewMetadataPolicies, PurviewAccount }; diff --git a/sdk/purview/purview-administration-rest/src/logger.ts b/sdk/purview/purview-administration-rest/src/logger.ts new file mode 100644 index 000000000000..f5d8affecfff --- /dev/null +++ b/sdk/purview/purview-administration-rest/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("purview-administration"); diff --git a/sdk/purview/purview-administration-rest/src/metadataPolicies/clientDefinitions.ts b/sdk/purview/purview-administration-rest/src/metadataPolicies/clientDefinitions.ts index 841db945ece0..5fbcd01bbbb8 100644 --- a/sdk/purview/purview-administration-rest/src/metadataPolicies/clientDefinitions.ts +++ b/sdk/purview/purview-administration-rest/src/metadataPolicies/clientDefinitions.ts @@ -1,47 +1,47 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Client } from "@azure-rest/core-client"; import type { - MetadataPolicyGetParameters, + MetadataRolesListParameters, MetadataPolicyListAllParameters, MetadataPolicyUpdateParameters, - MetadataRolesListParameters, + MetadataPolicyGetParameters, } from "./parameters.js"; import type { - MetadataPolicyGet200Response, - MetadataPolicyGetdefaultResponse, + MetadataRolesList200Response, + MetadataRolesListDefaultResponse, MetadataPolicyListAll200Response, - MetadataPolicyListAlldefaultResponse, + MetadataPolicyListAllDefaultResponse, MetadataPolicyUpdate200Response, - MetadataPolicyUpdatedefaultResponse, - MetadataRolesList200Response, - MetadataRolesListdefaultResponse, + MetadataPolicyUpdateDefaultResponse, + MetadataPolicyGet200Response, + MetadataPolicyGetDefaultResponse, } from "./responses.js"; +import type { Client, StreamableMethod } from "@azure-rest/core-client"; export interface MetadataRolesList { /** Lists roles for Purview Account */ get( options?: MetadataRolesListParameters, - ): Promise; + ): StreamableMethod; } export interface MetadataPolicyListAll { /** List or Get metadata policies */ get( options?: MetadataPolicyListAllParameters, - ): Promise; + ): StreamableMethod; } export interface MetadataPolicyUpdate { /** Updates a metadata policy */ put( options?: MetadataPolicyUpdateParameters, - ): Promise; + ): StreamableMethod; /** Gets a metadata policy */ get( options?: MetadataPolicyGetParameters, - ): Promise; + ): StreamableMethod; } export interface Routes { @@ -53,6 +53,6 @@ export interface Routes { (path: "/metadataPolicies/{policyId}", policyId: string): MetadataPolicyUpdate; } -export type PurviewMetadataPoliciesRestClient = Client & { +export type PurviewMetadataPoliciesClient = Client & { path: Routes; }; diff --git a/sdk/purview/purview-administration-rest/src/metadataPolicies/index.ts b/sdk/purview/purview-administration-rest/src/metadataPolicies/index.ts index 40ab5ad8300f..d0be37103484 100644 --- a/sdk/purview/purview-administration-rest/src/metadataPolicies/index.ts +++ b/sdk/purview/purview-administration-rest/src/metadataPolicies/index.ts @@ -1,10 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import * as Models from "./models.js"; -import * as Pagination from "./paginateHelper.js"; import * as Parameters from "./parameters.js"; -import * as Client from "./clientDefinitions.js"; import * as Responses from "./responses.js"; -export { PurviewMetadataPoliciesClient } from "./purviewMetadataPolicies.js"; -export { Models, Pagination, Parameters, Client, Responses }; +import * as Client from "./clientDefinitions.js"; +import * as Models from "./models.js"; +import * as OutputModels from "./outputModels.js"; +import * as PaginateHelper from "./paginateHelper.js"; +import * as UnexpectedHelper from "./isUnexpected.js"; + +export { createClient, PurviewMetadataPoliciesClientOptions } from "./purviewMetadataPolicies.js"; +export { Parameters, Responses, Client, Models, OutputModels, PaginateHelper, UnexpectedHelper }; diff --git a/sdk/purview/purview-administration-rest/src/metadataPolicies/isUnexpected.ts b/sdk/purview/purview-administration-rest/src/metadataPolicies/isUnexpected.ts new file mode 100644 index 000000000000..8c0a2387e5ff --- /dev/null +++ b/sdk/purview/purview-administration-rest/src/metadataPolicies/isUnexpected.ts @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + MetadataRolesList200Response, + MetadataRolesListDefaultResponse, + MetadataPolicyListAll200Response, + MetadataPolicyListAllDefaultResponse, + MetadataPolicyUpdate200Response, + MetadataPolicyUpdateDefaultResponse, + MetadataPolicyGet200Response, + MetadataPolicyGetDefaultResponse, +} from "./responses.js"; + +const responseMap: Record = { + "GET /metadataRoles": ["200"], + "GET /metadataPolicies": ["200"], + "PUT /metadataPolicies/{policyId}": ["200"], + "GET /metadataPolicies/{policyId}": ["200"], +}; + +export function isUnexpected( + response: MetadataRolesList200Response | MetadataRolesListDefaultResponse, +): response is MetadataRolesListDefaultResponse; +export function isUnexpected( + response: MetadataPolicyListAll200Response | MetadataPolicyListAllDefaultResponse, +): response is MetadataPolicyListAllDefaultResponse; +export function isUnexpected( + response: MetadataPolicyUpdate200Response | MetadataPolicyUpdateDefaultResponse, +): response is MetadataPolicyUpdateDefaultResponse; +export function isUnexpected( + response: MetadataPolicyGet200Response | MetadataPolicyGetDefaultResponse, +): response is MetadataPolicyGetDefaultResponse; +export function isUnexpected( + response: + | MetadataRolesList200Response + | MetadataRolesListDefaultResponse + | MetadataPolicyListAll200Response + | MetadataPolicyListAllDefaultResponse + | MetadataPolicyUpdate200Response + | MetadataPolicyUpdateDefaultResponse + | MetadataPolicyGet200Response + | MetadataPolicyGetDefaultResponse, +): response is + | MetadataRolesListDefaultResponse + | MetadataPolicyListAllDefaultResponse + | MetadataPolicyUpdateDefaultResponse + | MetadataPolicyGetDefaultResponse { + const lroOriginal = response.headers["x-ms-original-url"]; + const url = new URL(lroOriginal ?? response.request.url); + const method = response.request.method; + let pathDetails = responseMap[`${method} ${url.pathname}`]; + if (!pathDetails) { + pathDetails = getParametrizedPathSuccess(method, url.pathname); + } + return !pathDetails.includes(response.status); +} + +function getParametrizedPathSuccess(method: string, path: string): string[] { + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(responseMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/purview/purview-administration-rest/src/metadataPolicies/models.ts b/sdk/purview/purview-administration-rest/src/metadataPolicies/models.ts index b5257759a9f7..c8ee3fb8a3b7 100644 --- a/sdk/purview/purview-administration-rest/src/metadataPolicies/models.ts +++ b/sdk/purview/purview-administration-rest/src/metadataPolicies/models.ts @@ -1,38 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -export interface MetadataRoleList { - values: Array; - nextLink?: string; -} - -export interface MetadataRole { - /** The Id of role */ - id?: string; - /** The name of role */ - name?: string; - /** The type of role */ - type?: string; - properties?: MetadataRoleProperties; -} - -export interface MetadataRoleProperties { - /** The provisioningState of role */ - provisioningState?: string; - /** The type of role */ - roleType?: string; - /** The friendly name of role */ - friendlyName?: string; - /** The description of role */ - description?: string; - /** The cnf Condition for a rule */ - cnfCondition?: Array>; - /** The dnf Condition for a rule */ - dnfCondition?: Array>; - /** The version of role */ - version?: number; -} - +/** Attribute matcher for a rule */ export interface AttributeMatcher { /** AttributeName */ attributeName?: string; @@ -46,27 +15,6 @@ export interface AttributeMatcher { attributeValueExcludedIn?: Array; } -export interface ErrorResponseModel { - /** The error model for metadata policy */ - error: ErrorModel; -} - -export interface ErrorModel { - /** The error code */ - code: string; - /** The error message */ - message: string; - /** The error target */ - target?: string; - /** The error details */ - details?: Array; -} - -export interface MetadataPolicyList { - values: Array; - nextLink?: string; -} - export interface MetadataPolicy { /** The name of policy */ name?: string; @@ -90,18 +38,16 @@ export interface MetadataPolicyProperties { parentCollectionName?: string; } +/** The decision rule for a policy */ export interface DecisionRule { - /** The kind of rule */ - kind?: "decisionrule" | "attributerule"; /** The effect for rule */ effect?: "Deny" | "Permit"; /** The dnf Condition for a rule */ dnfCondition?: Array>; } +/** The attribute rule for a policy */ export interface AttributeRule { - /** The kind of rule */ - kind?: "decisionrule" | "attributerule"; /** The id for rule */ id?: string; /** The name for rule */ @@ -110,6 +56,7 @@ export interface AttributeRule { dnfCondition?: Array>; } +/** The collection reference for a policy */ export interface CollectionReference { /** The type of reference */ type?: string; diff --git a/sdk/purview/purview-administration-rest/src/metadataPolicies/outputModels.ts b/sdk/purview/purview-administration-rest/src/metadataPolicies/outputModels.ts new file mode 100644 index 000000000000..90bc7ac21963 --- /dev/null +++ b/sdk/purview/purview-administration-rest/src/metadataPolicies/outputModels.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** List of Metadata roles */ +export interface MetadataRoleListOutput { + values: Array; + nextLink?: string; +} + +export interface MetadataRoleOutput { + /** The Id of role */ + id?: string; + /** The name of role */ + name?: string; + /** The type of role */ + type?: string; + properties?: MetadataRolePropertiesOutput; +} + +export interface MetadataRolePropertiesOutput { + /** The provisioningState of role */ + provisioningState?: string; + /** The type of role */ + roleType?: string; + /** The friendly name of role */ + friendlyName?: string; + /** The description of role */ + description?: string; + /** The cnf Condition for a rule */ + cnfCondition?: Array>; + /** The dnf Condition for a rule */ + dnfCondition?: Array>; + /** The version of role */ + version?: number; +} + +/** Attribute matcher for a rule */ +export interface AttributeMatcherOutput { + /** AttributeName */ + attributeName?: string; + /** Value for attribute */ + attributeValueIncludes?: string; + /** List of values for attribute */ + attributeValueIncludedIn?: Array; + /** Value excluded for attribute */ + attributeValueExcludes?: string; + /** List of values excluded for attribute */ + attributeValueExcludedIn?: Array; +} + +/** The error response model for metadata policy */ +export interface ErrorResponseModelOutput { + /** The error model for metadata policy */ + error: ErrorModelOutput; +} + +/** The error model for metadata policy */ +export interface ErrorModelOutput { + /** The error code */ + code: string; + /** The error message */ + message: string; + /** The error target */ + target?: string; + /** The error details */ + details?: Array; +} + +/** List of Metadata Policies */ +export interface MetadataPolicyListOutput { + values: Array; + nextLink?: string; +} + +export interface MetadataPolicyOutput { + /** The name of policy */ + name?: string; + /** The id of policy */ + id?: string; + /** The version of policy */ + version?: number; + properties?: MetadataPolicyPropertiesOutput; +} + +export interface MetadataPolicyPropertiesOutput { + /** The description of policy */ + description?: string; + /** The DecisionRules of policy */ + decisionRules?: Array; + /** The AttributeRules of policy */ + attributeRules?: Array; + /** The collection reference for a policy */ + collection?: CollectionReferenceOutput; + /** The parent collection of the policy */ + parentCollectionName?: string; +} + +/** The decision rule for a policy */ +export interface DecisionRuleOutput { + /** The kind of rule */ + readonly kind?: "decisionrule" | "attributerule"; + /** The effect for rule */ + effect?: "Deny" | "Permit"; + /** The dnf Condition for a rule */ + dnfCondition?: Array>; +} + +/** The attribute rule for a policy */ +export interface AttributeRuleOutput { + /** The kind of rule */ + readonly kind?: "decisionrule" | "attributerule"; + /** The id for rule */ + id?: string; + /** The name for rule */ + name?: string; + /** The dnf Condition for a rule */ + dnfCondition?: Array>; +} + +/** The collection reference for a policy */ +export interface CollectionReferenceOutput { + /** The type of reference */ + type?: string; + /** The name of reference */ + referenceName?: string; +} diff --git a/sdk/purview/purview-administration-rest/src/metadataPolicies/paginateHelper.ts b/sdk/purview/purview-administration-rest/src/metadataPolicies/paginateHelper.ts index eb9582b5c730..fe3ccda2d8ce 100644 --- a/sdk/purview/purview-administration-rest/src/metadataPolicies/paginateHelper.ts +++ b/sdk/purview/purview-administration-rest/src/metadataPolicies/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/purview/purview-administration-rest/src/metadataPolicies/parameters.ts b/sdk/purview/purview-administration-rest/src/metadataPolicies/parameters.ts index 88e85e8d2437..914fd9ed3810 100644 --- a/sdk/purview/purview-administration-rest/src/metadataPolicies/parameters.ts +++ b/sdk/purview/purview-administration-rest/src/metadataPolicies/parameters.ts @@ -22,5 +22,12 @@ export interface MetadataPolicyUpdateBodyParam { body?: MetadataPolicy; } -export type MetadataPolicyUpdateParameters = MetadataPolicyUpdateBodyParam & RequestParameters; +export interface MetadataPolicyUpdateMediaTypesParam { + /** Request content type */ + contentType?: "application/json"; +} + +export type MetadataPolicyUpdateParameters = MetadataPolicyUpdateMediaTypesParam & + MetadataPolicyUpdateBodyParam & + RequestParameters; export type MetadataPolicyGetParameters = RequestParameters; diff --git a/sdk/purview/purview-administration-rest/src/metadataPolicies/purviewMetadataPolicies.ts b/sdk/purview/purview-administration-rest/src/metadataPolicies/purviewMetadataPolicies.ts index fc806edb29b1..2cf364fb6cca 100644 --- a/sdk/purview/purview-administration-rest/src/metadataPolicies/purviewMetadataPolicies.ts +++ b/sdk/purview/purview-administration-rest/src/metadataPolicies/purviewMetadataPolicies.ts @@ -3,22 +3,63 @@ import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; +import { logger } from "../logger.js"; import type { TokenCredential } from "@azure/core-auth"; -import type { PurviewMetadataPoliciesRestClient } from "./clientDefinitions.js"; +import type { PurviewMetadataPoliciesClient } from "./clientDefinitions.js"; -export function PurviewMetadataPoliciesClient( - Endpoint: string, +/** The optional parameters for the client */ +export interface PurviewMetadataPoliciesClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + +/** + * Initialize a new instance of `PurviewMetadataPoliciesClient` + * @param endpoint - The endpoint of your Purview account. Example: https://\{accountName\}.purview.azure.com. + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters + */ +export function createClient( + endpoint: string, credentials: TokenCredential, - options: ClientOptions = {}, -): PurviewMetadataPoliciesRestClient { - const baseUrl = options.baseUrl ?? `${Endpoint}/policyStore`; - options.apiVersion = options.apiVersion ?? "2021-07-01-preview"; + { apiVersion = "2021-07-01-preview", ...options }: PurviewMetadataPoliciesClientOptions = {}, +): PurviewMetadataPoliciesClient { + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}/policyStore`; + const userAgentInfo = `azsdk-js-purview-administration-rest/1.0.0-beta.2`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` + : `${userAgentInfo}`; options = { ...options, + userAgentOptions: { + userAgentPrefix, + }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, credentials: { scopes: ["https://purview.azure.net/.default"], }, }; + const client = getClient(endpointUrl, credentials, options) as PurviewMetadataPoliciesClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); - return getClient(baseUrl, credentials, options) as PurviewMetadataPoliciesRestClient; + return client; } diff --git a/sdk/purview/purview-administration-rest/src/metadataPolicies/responses.ts b/sdk/purview/purview-administration-rest/src/metadataPolicies/responses.ts index 0c3076520fdb..11317a6fa51d 100644 --- a/sdk/purview/purview-administration-rest/src/metadataPolicies/responses.ts +++ b/sdk/purview/purview-administration-rest/src/metadataPolicies/responses.ts @@ -1,83 +1,83 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { HttpResponse } from "@azure-rest/core-client"; import type { RawHttpHeaders } from "@azure/core-rest-pipeline"; +import type { HttpResponse } from "@azure-rest/core-client"; import type { - ErrorResponseModel, - MetadataPolicy, - MetadataPolicyList, - MetadataRoleList, -} from "./models.js"; + MetadataRoleListOutput, + ErrorResponseModelOutput, + MetadataPolicyListOutput, + MetadataPolicyOutput, +} from "./outputModels.js"; /** Lists roles for Purview Account */ export interface MetadataRolesList200Response extends HttpResponse { status: "200"; - body: MetadataRoleList; + body: MetadataRoleListOutput; } -export interface MetadataRolesListdefaultHeaders { +export interface MetadataRolesListDefaultHeaders { /** The error code */ "x-ms-error-code"?: string; } /** Lists roles for Purview Account */ -export interface MetadataRolesListdefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; - headers: RawHttpHeaders & MetadataRolesListdefaultHeaders; +export interface MetadataRolesListDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; + headers: RawHttpHeaders & MetadataRolesListDefaultHeaders; } /** List or Get metadata policies */ export interface MetadataPolicyListAll200Response extends HttpResponse { status: "200"; - body: MetadataPolicyList; + body: MetadataPolicyListOutput; } -export interface MetadataPolicyListAlldefaultHeaders { +export interface MetadataPolicyListAllDefaultHeaders { /** The error code */ "x-ms-error-code"?: string; } /** List or Get metadata policies */ -export interface MetadataPolicyListAlldefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; - headers: RawHttpHeaders & MetadataPolicyListAlldefaultHeaders; +export interface MetadataPolicyListAllDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; + headers: RawHttpHeaders & MetadataPolicyListAllDefaultHeaders; } /** Updates a metadata policy */ export interface MetadataPolicyUpdate200Response extends HttpResponse { status: "200"; - body: MetadataPolicy; + body: MetadataPolicyOutput; } -export interface MetadataPolicyUpdatedefaultHeaders { +export interface MetadataPolicyUpdateDefaultHeaders { /** The error code */ "x-ms-error-code"?: string; } /** Updates a metadata policy */ -export interface MetadataPolicyUpdatedefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; - headers: RawHttpHeaders & MetadataPolicyUpdatedefaultHeaders; +export interface MetadataPolicyUpdateDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; + headers: RawHttpHeaders & MetadataPolicyUpdateDefaultHeaders; } /** Gets a metadata policy */ export interface MetadataPolicyGet200Response extends HttpResponse { status: "200"; - body: MetadataPolicy; + body: MetadataPolicyOutput; } -export interface MetadataPolicyGetdefaultHeaders { +export interface MetadataPolicyGetDefaultHeaders { /** The error code */ "x-ms-error-code"?: string; } /** Gets a metadata policy */ -export interface MetadataPolicyGetdefaultResponse extends HttpResponse { - status: "500"; - body: ErrorResponseModel; - headers: RawHttpHeaders & MetadataPolicyGetdefaultHeaders; +export interface MetadataPolicyGetDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseModelOutput; + headers: RawHttpHeaders & MetadataPolicyGetDefaultHeaders; } diff --git a/sdk/purview/purview-administration-rest/swagger/README.md b/sdk/purview/purview-administration-rest/swagger/README.md index 10099375fe9a..3cd368039c63 100644 --- a/sdk/purview/purview-administration-rest/swagger/README.md +++ b/sdk/purview/purview-administration-rest/swagger/README.md @@ -7,21 +7,23 @@ ```yaml $(purview-account) == true title: PurviewAccount description: Purview Account Client -output-folder: ../src/account -source-code-folder-path: ./ +output-folder: ../ +source-code-folder-path: ./src/account input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json ``` ```yaml $(purview-metadata) == true title: PurviewMetadataPolicies description: Purview Metadata Policies Client -output-folder: ../src/metadataPolicies -source-code-folder-path: ./ +output-folder: ../ +source-code-folder-path: ./src/metadataPolicies input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01-preview/purviewMetadataPolicy.json ``` ```yaml +flavor: azure +openapi-type: data-plane modelerfour.lenient-model-deduplication: true package-name: "@azure-rest/purview-administration" generate-metadata: false @@ -32,4 +34,7 @@ add-credentials: true credential-scopes: "https://purview.azure.net/.default" use-extension: "@autorest/typescript": "latest" +batch: + - purview-metadata: true + - purview-account: true ``` diff --git a/sdk/purview/purview-administration-rest/test/public/account.spec.ts b/sdk/purview/purview-administration-rest/test/public/account.spec.ts index e6e182b0fd41..ad3a5e74ac35 100644 --- a/sdk/purview/purview-administration-rest/test/public/account.spec.ts +++ b/sdk/purview/purview-administration-rest/test/public/account.spec.ts @@ -7,7 +7,7 @@ import { describe, it, assert, beforeEach, afterEach } from "vitest"; describe("Get account info", () => { let recorder: Recorder; - let client: PurviewAccount.Client.PurviewAccountRestClient; + let client: PurviewAccount.Client.PurviewAccountClient; beforeEach(async (ctx) => { recorder = new Recorder(ctx); diff --git a/sdk/purview/purview-administration-rest/test/public/collections.spec.ts b/sdk/purview/purview-administration-rest/test/public/collections.spec.ts index 0de3f587a791..8dd567e02952 100644 --- a/sdk/purview/purview-administration-rest/test/public/collections.spec.ts +++ b/sdk/purview/purview-administration-rest/test/public/collections.spec.ts @@ -7,7 +7,7 @@ import { describe, it, assert, beforeEach, afterEach } from "vitest"; describe("List collections", () => { let recorder: Recorder; - let client: PurviewAccount.Client.PurviewAccountRestClient; + let client: PurviewAccount.Client.PurviewAccountClient; beforeEach(async (ctx) => { recorder = new Recorder(ctx); diff --git a/sdk/purview/purview-administration-rest/test/public/metadataPolicies.spec.ts b/sdk/purview/purview-administration-rest/test/public/metadataPolicies.spec.ts index ca2bb46e90d1..762800314499 100644 --- a/sdk/purview/purview-administration-rest/test/public/metadataPolicies.spec.ts +++ b/sdk/purview/purview-administration-rest/test/public/metadataPolicies.spec.ts @@ -5,10 +5,11 @@ import type { PurviewMetadataPolicies } from "../../src/index.js"; import { Recorder } from "@azure-tools/test-recorder"; import { createMetadataClient } from "./utils/recordedClient.js"; import { describe, it, assert, beforeEach, afterEach } from "vitest"; +import { MetadataPolicyListOutput } from "../../src/metadataPolicies/outputModels.js"; describe("List Metadata", () => { let recorder: Recorder; - let client: PurviewMetadataPolicies.Client.PurviewMetadataPoliciesRestClient; + let client: PurviewMetadataPolicies.Client.PurviewMetadataPoliciesClient; beforeEach(async (ctx) => { recorder = new Recorder(ctx); @@ -26,7 +27,7 @@ describe("List Metadata", () => { console.log(result.request.url); assert.fail(`GET "/metadataPolicies" failed with ${result.status}`); } - - assert.isDefined(result.body.values.length); + const metadataPolicyListOutput = result.body as MetadataPolicyListOutput; + assert.isDefined(metadataPolicyListOutput.values.length); }); }); diff --git a/sdk/purview/purview-administration-rest/test/public/utils/recordedClient.ts b/sdk/purview/purview-administration-rest/test/public/utils/recordedClient.ts index 18ce77f699c1..acfdbc2c8c41 100644 --- a/sdk/purview/purview-administration-rest/test/public/utils/recordedClient.ts +++ b/sdk/purview/purview-administration-rest/test/public/utils/recordedClient.ts @@ -5,8 +5,7 @@ import type { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; import { env } from "@azure-tools/test-recorder"; -import type { PurviewAccount, PurviewMetadataPolicies } from "../../../src/index.js"; -import { PurviewAccountClient, PurviewMetadataPoliciesClient } from "../../../src/index.js"; +import { PurviewAccount, PurviewMetadataPolicies } from "../../../src/index.js"; import { createTestCredential } from "@azure-tools/test-credential"; import type { ClientOptions } from "@azure-rest/core-client"; @@ -25,11 +24,11 @@ const recorderOptions: RecorderStartOptions = { export async function createAccountClient( recorder: Recorder, options?: ClientOptions, -): Promise { +): Promise { const credential = createTestCredential(); await recorder.start(recorderOptions); - return PurviewAccountClient( + return PurviewAccount.createClient( env.ENDPOINT ?? "", credential, recorder.configureClientOptions({ options }), @@ -39,11 +38,11 @@ export async function createAccountClient( export async function createMetadataClient( recorder: Recorder, options?: ClientOptions, -): Promise { +): Promise { const credential = createTestCredential(); await recorder.start(recorderOptions); - return PurviewMetadataPoliciesClient( + return PurviewMetadataPolicies.createClient( env.ENDPOINT ?? "", credential, recorder.configureClientOptions({ options }), From 9a8067260718f755a13768277d636fc531f34018 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:24:47 +0800 Subject: [PATCH 32/55] [data-plane] refresh purview-datamap-rest sdk (#31356) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- sdk/purview/purview-datamap-rest/CHANGELOG.md | 9 +- sdk/purview/purview-datamap-rest/assets.json | 2 +- .../review/purview-datamap.api.md | 515 ++++++++++++------ .../src/clientDefinitions.ts | 78 ++- .../purview-datamap-rest/src/isUnexpected.ts | 56 +- .../purview-datamap-rest/src/models.ts | 89 +-- .../purview-datamap-rest/src/outputModels.ts | 106 ++-- .../purview-datamap-rest/src/parameters.ts | 227 ++++++-- .../src/purviewDataMapClient.ts | 22 +- .../purview-datamap-rest/src/responses.ts | 24 +- .../test/public/entityTest.spec.ts | 11 +- .../purview-datamap-rest/tsp-location.yaml | 5 +- 12 files changed, 753 insertions(+), 391 deletions(-) diff --git a/sdk/purview/purview-datamap-rest/CHANGELOG.md b/sdk/purview/purview-datamap-rest/CHANGELOG.md index c7acf3da97fa..192f3a417ade 100644 --- a/sdk/purview/purview-datamap-rest/CHANGELOG.md +++ b/sdk/purview/purview-datamap-rest/CHANGELOG.md @@ -1,14 +1,9 @@ ## Release History -### 1.0.0-beta.2 (Unreleased) +### 1.0.0-beta.2 (2024-12-16) #### Features Added - -#### Breaking Changes - -#### Bugs Fixed - -#### Other Changes +- refresh @azure-rest/purview-datamap sdk ### 1.0.0-beta.1 (2024-03-04) - Initial Release diff --git a/sdk/purview/purview-datamap-rest/assets.json b/sdk/purview/purview-datamap-rest/assets.json index af63526b0a75..8073e79aa4f6 100644 --- a/sdk/purview/purview-datamap-rest/assets.json +++ b/sdk/purview/purview-datamap-rest/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/purview/purview-datamap-rest", - "Tag": "js/purview/purview-datamap-rest_5cd5118b52" + "Tag": "js/purview/purview-datamap-rest_47b9910f06" } diff --git a/sdk/purview/purview-datamap-rest/review/purview-datamap.api.md b/sdk/purview/purview-datamap-rest/review/purview-datamap.api.md index ef6ac0e217c0..8f8d0194d6c1 100644 --- a/sdk/purview/purview-datamap-rest/review/purview-datamap.api.md +++ b/sdk/purview/purview-datamap-rest/review/purview-datamap.api.md @@ -11,13 +11,14 @@ import { createFileFromStream } from '@azure/core-rest-pipeline'; import { CreateFileFromStreamOptions } from '@azure/core-rest-pipeline'; import { CreateFileOptions } from '@azure/core-rest-pipeline'; import type { HttpResponse } from '@azure-rest/core-client'; +import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RequestParameters } from '@azure-rest/core-client'; import type { StreamableMethod } from '@azure-rest/core-client'; import type { TokenCredential } from '@azure/core-auth'; // @public export interface AtlasAttributeDef { - cardinality?: string; + cardinality?: CardinalityValue; constraints?: Array; defaultValue?: string; description?: string; @@ -34,7 +35,7 @@ export interface AtlasAttributeDef { // @public export interface AtlasAttributeDefOutput { - cardinality?: string; + cardinality?: CardinalityValueOutput; constraints?: Array; defaultValue?: string; description?: string; @@ -52,7 +53,7 @@ export interface AtlasAttributeDefOutput { // @public export interface AtlasBusinessMetadataDef { attributeDefs?: Array; - category?: string; + category?: TypeCategory; createdBy?: string; createTime?: number; dateFormatter?: DateFormat; @@ -71,7 +72,7 @@ export interface AtlasBusinessMetadataDef { // @public export interface AtlasBusinessMetadataDefOutput { attributeDefs?: Array; - category?: string; + category?: TypeCategoryOutput; createdBy?: string; createTime?: number; dateFormatter?: DateFormatOutput; @@ -91,7 +92,7 @@ export interface AtlasBusinessMetadataDefOutput { export interface AtlasClassification { attributes?: Record; entityGuid?: string; - entityStatus?: string; + entityStatus?: EntityStatus; lastModifiedTS?: string; removePropagationsOnEntityDelete?: boolean; typeName?: string; @@ -101,7 +102,7 @@ export interface AtlasClassification { // @public export interface AtlasClassificationDef { attributeDefs?: Array; - category?: string; + category?: TypeCategory; createdBy?: string; createTime?: number; dateFormatter?: DateFormat; @@ -123,7 +124,7 @@ export interface AtlasClassificationDef { // @public export interface AtlasClassificationDefOutput { attributeDefs?: Array; - category?: string; + category?: TypeCategoryOutput; createdBy?: string; createTime?: number; dateFormatter?: DateFormatOutput; @@ -146,7 +147,7 @@ export interface AtlasClassificationDefOutput { export interface AtlasClassificationOutput { attributes?: Record; entityGuid?: string; - entityStatus?: string; + entityStatus?: EntityStatusOutput; lastModifiedTS?: string; removePropagationsOnEntityDelete?: boolean; typeName?: string; @@ -158,7 +159,7 @@ export interface AtlasClassificationsOutput { list?: any[]; pageSize?: number; sortBy?: string; - sortType?: string; + sortType?: SortTypeOutput; startIndex?: number; totalCount?: number; } @@ -205,7 +206,7 @@ export interface AtlasEntity { provenanceType?: number; proxy?: boolean; relationshipAttributes?: Record; - status?: string; + status?: EntityStatus; typeName?: string; updatedBy?: string; updateTime?: number; @@ -215,7 +216,7 @@ export interface AtlasEntity { // @public export interface AtlasEntityDef { attributeDefs?: Array; - category?: string; + category?: TypeCategory; createdBy?: string; createTime?: number; dateFormatter?: DateFormat; @@ -237,7 +238,7 @@ export interface AtlasEntityDef { // @public export interface AtlasEntityDefOutput { attributeDefs?: Array; - category?: string; + category?: TypeCategoryOutput; createdBy?: string; createTime?: number; dateFormatter?: DateFormatOutput; @@ -268,7 +269,7 @@ export interface AtlasEntityHeader { lastModifiedTS?: string; meaningNames?: string[]; meanings?: Array; - status?: string; + status?: EntityStatus; typeName?: string; } @@ -284,7 +285,7 @@ export interface AtlasEntityHeaderOutput { lastModifiedTS?: string; meaningNames?: string[]; meanings?: Array; - status?: string; + status?: EntityStatusOutput; typeName?: string; } @@ -312,7 +313,7 @@ export interface AtlasEntityOutput { provenanceType?: number; proxy?: boolean; relationshipAttributes?: Record; - status?: string; + status?: EntityStatusOutput; typeName?: string; updatedBy?: string; updateTime?: number; @@ -333,7 +334,7 @@ export interface AtlasEntityWithExtInfoOutput { // @public export interface AtlasEnumDef { - category?: string; + category?: TypeCategory; createdBy?: string; createTime?: number; dateFormatter?: DateFormat; @@ -353,7 +354,7 @@ export interface AtlasEnumDef { // @public export interface AtlasEnumDefOutput { - category?: string; + category?: TypeCategoryOutput; createdBy?: string; createTime?: number; dateFormatter?: DateFormatOutput; @@ -532,7 +533,7 @@ export interface AtlasGlossaryTerm { resources?: Array; seeAlso?: Array; shortDescription?: string; - status?: string; + status?: TermStatus; synonyms?: Array; templateName?: unknown[]; translatedTerms?: Array; @@ -573,7 +574,7 @@ export interface AtlasGlossaryTermOutput { resources?: Array; seeAlso?: Array; shortDescription?: string; - status?: string; + status?: TermStatusOutput; synonyms?: Array; templateName?: any[]; translatedTerms?: Array; @@ -591,7 +592,7 @@ export interface AtlasLineageInfoOutput { childrenCount?: number; guidEntityMap?: Record; lineageDepth?: number; - lineageDirection?: string; + lineageDirection?: LineageDirectionOutput; lineageWidth?: number; parentRelations?: Array; relations?: Array; @@ -633,11 +634,11 @@ export interface AtlasRelatedCategoryHeaderOutput { // @public export interface AtlasRelatedObjectId { displayText?: string; - entityStatus?: string; + entityStatus?: EntityStatus; guid?: string; relationshipAttributes?: AtlasStruct; relationshipGuid?: string; - relationshipStatus?: string; + relationshipStatus?: StatusAtlasRelationship; relationshipType?: string; typeName?: string; uniqueAttributes?: Record; @@ -646,11 +647,11 @@ export interface AtlasRelatedObjectId { // @public export interface AtlasRelatedObjectIdOutput { displayText?: string; - entityStatus?: string; + entityStatus?: EntityStatusOutput; guid?: string; relationshipAttributes?: AtlasStructOutput; relationshipGuid?: string; - relationshipStatus?: string; + relationshipStatus?: StatusAtlasRelationshipOutput; relationshipType?: string; typeName?: string; uniqueAttributes?: Record; @@ -662,7 +663,7 @@ export interface AtlasRelatedTermHeader { displayText?: string; expression?: string; relationGuid?: string; - status?: string; + status?: AtlasTermRelationshipStatus; steward?: string; termGuid?: string; } @@ -673,7 +674,7 @@ export interface AtlasRelatedTermHeaderOutput { displayText?: string; expression?: string; relationGuid?: string; - status?: string; + status?: AtlasTermRelationshipStatusOutput; steward?: string; termGuid?: string; } @@ -690,7 +691,7 @@ export interface AtlasRelationship { label?: string; lastModifiedTS?: string; provenanceType?: number; - status?: string; + status?: StatusAtlasRelationship; typeName?: string; updatedBy?: string; updateTime?: number; @@ -699,7 +700,7 @@ export interface AtlasRelationship { // @public export interface AtlasRelationshipAttributeDef { - cardinality?: string; + cardinality?: CardinalityValue; constraints?: Array; defaultValue?: string; description?: string; @@ -718,7 +719,7 @@ export interface AtlasRelationshipAttributeDef { // @public export interface AtlasRelationshipAttributeDefOutput { - cardinality?: string; + cardinality?: CardinalityValueOutput; constraints?: Array; defaultValue?: string; description?: string; @@ -738,7 +739,7 @@ export interface AtlasRelationshipAttributeDefOutput { // @public export interface AtlasRelationshipDef { attributeDefs?: Array; - category?: string; + category?: TypeCategory; createdBy?: string; createTime?: number; dateFormatter?: DateFormat; @@ -749,7 +750,7 @@ export interface AtlasRelationshipDef { lastModifiedTS?: string; name?: string; options?: Record; - relationshipCategory?: string; + relationshipCategory?: RelationshipCategory; relationshipLabel?: string; serviceType?: string; typeVersion?: string; @@ -761,7 +762,7 @@ export interface AtlasRelationshipDef { // @public export interface AtlasRelationshipDefOutput { attributeDefs?: Array; - category?: string; + category?: TypeCategoryOutput; createdBy?: string; createTime?: number; dateFormatter?: DateFormatOutput; @@ -772,7 +773,7 @@ export interface AtlasRelationshipDefOutput { lastModifiedTS?: string; name?: string; options?: Record; - relationshipCategory?: string; + relationshipCategory?: RelationshipCategoryOutput; relationshipLabel?: string; serviceType?: string; typeVersion?: string; @@ -783,7 +784,7 @@ export interface AtlasRelationshipDefOutput { // @public export interface AtlasRelationshipEndDef { - cardinality?: string; + cardinality?: CardinalityValue; description?: string; isContainer?: boolean; isLegacyAttribute?: boolean; @@ -793,7 +794,7 @@ export interface AtlasRelationshipEndDef { // @public export interface AtlasRelationshipEndDefOutput { - cardinality?: string; + cardinality?: CardinalityValueOutput; description?: string; isContainer?: boolean; isLegacyAttribute?: boolean; @@ -813,7 +814,7 @@ export interface AtlasRelationshipOutput { label?: string; lastModifiedTS?: string; provenanceType?: number; - status?: string; + status?: StatusAtlasRelationshipOutput; typeName?: string; updatedBy?: string; updateTime?: number; @@ -836,7 +837,7 @@ export interface AtlasStruct { // @public export interface AtlasStructDef { attributeDefs?: Array; - category?: string; + category?: TypeCategory; createdBy?: string; createTime?: number; dateFormatter?: DateFormat; @@ -855,7 +856,7 @@ export interface AtlasStructDef { // @public export interface AtlasStructDefOutput { attributeDefs?: Array; - category?: string; + category?: TypeCategoryOutput; createdBy?: string; createTime?: number; dateFormatter?: DateFormatOutput; @@ -886,7 +887,7 @@ export interface AtlasTermAssignmentHeader { displayText?: string; expression?: string; relationGuid?: string; - status?: string; + status?: AtlasTermAssignmentStatus; steward?: string; termGuid?: string; } @@ -899,18 +900,24 @@ export interface AtlasTermAssignmentHeaderOutput { displayText?: string; expression?: string; relationGuid?: string; - status?: string; + status?: AtlasTermAssignmentStatusOutput; steward?: string; termGuid?: string; } +// @public +export type AtlasTermAssignmentStatus = string; + +// @public +export type AtlasTermAssignmentStatusOutput = string; + // @public export interface AtlasTermCategorizationHeader { categoryGuid?: string; description?: string; displayText?: string; relationGuid?: string; - status?: string; + status?: AtlasTermRelationshipStatus; } // @public @@ -919,12 +926,18 @@ export interface AtlasTermCategorizationHeaderOutput { description?: string; displayText?: string; relationGuid?: string; - status?: string; + status?: AtlasTermRelationshipStatusOutput; } +// @public +export type AtlasTermRelationshipStatus = string; + +// @public +export type AtlasTermRelationshipStatusOutput = string; + // @public export interface AtlasTypeDefHeaderOutput { - category?: string; + category?: TypeCategoryOutput; guid?: string; name?: string; } @@ -932,7 +945,7 @@ export interface AtlasTypeDefHeaderOutput { // @public export interface AtlasTypeDefOutput { attributeDefs?: Array; - category?: string; + category?: TypeCategoryOutput; createdBy?: string; createTime?: number; dateFormatter?: DateFormatOutput; @@ -947,7 +960,7 @@ export interface AtlasTypeDefOutput { name?: string; options?: Record; relationshipAttributeDefs?: Array; - relationshipCategory?: string; + relationshipCategory?: RelationshipCategoryOutput; relationshipLabel?: string; serviceType?: string; subTypes?: string[]; @@ -1008,15 +1021,29 @@ export interface BulkImportResultOutput { } // @public -export interface BusinessMetadataOptions { - file: string | Uint8Array | ReadableStream | NodeJS.ReadableStream | File; -} +export type BusinessAttributeUpdateBehavior = string; // @public -export interface BusinessMetadataOptionsOutput { - file: Uint8Array; +export type BusinessMetadataOptions = FormData | Array; + +// @public (undocumented) +export interface BusinessMetadataOptionsFilePartDescriptor { + // (undocumented) + body: string | Uint8Array | ReadableStream | NodeJS.ReadableStream | File; + // (undocumented) + contentType?: string; + // (undocumented) + filename?: string; + // (undocumented) + name: "file"; } +// @public +export type CardinalityValue = string; + +// @public +export type CardinalityValueOutput = string; + // @public export interface ClassificationAssociateOptions { classification?: AtlasClassification; @@ -1043,7 +1070,7 @@ export interface ContactSearchResultValueOutput { } // @public -function createClient(endpoint: string, credentials: TokenCredential, options?: ClientOptions): PurviewDataMapClient; +function createClient(endpointParam: string, credentials: TokenCredential, options?: PurviewDataMapClientOptions): PurviewDataMapClient; export default createClient; export { createFile } @@ -1082,7 +1109,7 @@ export interface DateFormatOutput { // @public (undocumented) export interface DiscoveryAutoComplete { - post(options?: DiscoveryAutoCompleteParameters): StreamableMethod; + post(options: DiscoveryAutoCompleteParameters): StreamableMethod; } // @public @@ -1095,8 +1122,7 @@ export interface DiscoveryAutoComplete200Response extends HttpResponse { // @public (undocumented) export interface DiscoveryAutoCompleteBodyParam { - // (undocumented) - body?: AutoCompleteOptions; + body: AutoCompleteOptions; } // @public (undocumented) @@ -1108,11 +1134,22 @@ export interface DiscoveryAutoCompleteDefaultResponse extends HttpResponse { } // @public (undocumented) -export type DiscoveryAutoCompleteParameters = DiscoveryAutoCompleteBodyParam & RequestParameters; +export type DiscoveryAutoCompleteParameters = DiscoveryAutoCompleteQueryParam & DiscoveryAutoCompleteBodyParam & RequestParameters; + +// @public (undocumented) +export interface DiscoveryAutoCompleteQueryParam { + // (undocumented) + queryParameters: DiscoveryAutoCompleteQueryParamProperties; +} + +// @public (undocumented) +export interface DiscoveryAutoCompleteQueryParamProperties { + "api-version": string; +} // @public (undocumented) export interface DiscoveryQuery { - post(options?: DiscoveryQueryParameters): StreamableMethod; + post(options: DiscoveryQueryParameters): StreamableMethod; } // @public @@ -1125,8 +1162,7 @@ export interface DiscoveryQuery200Response extends HttpResponse { // @public (undocumented) export interface DiscoveryQueryBodyParam { - // (undocumented) - body?: QueryOptions; + body: QueryOptions; } // @public (undocumented) @@ -1138,11 +1174,22 @@ export interface DiscoveryQueryDefaultResponse extends HttpResponse { } // @public (undocumented) -export type DiscoveryQueryParameters = DiscoveryQueryBodyParam & RequestParameters; +export type DiscoveryQueryParameters = DiscoveryQueryQueryParam & DiscoveryQueryBodyParam & RequestParameters; + +// @public (undocumented) +export interface DiscoveryQueryQueryParam { + // (undocumented) + queryParameters: DiscoveryQueryQueryParamProperties; +} + +// @public (undocumented) +export interface DiscoveryQueryQueryParamProperties { + "api-version": string; +} // @public (undocumented) export interface DiscoverySuggest { - post(options?: DiscoverySuggestParameters): StreamableMethod; + post(options: DiscoverySuggestParameters): StreamableMethod; } // @public @@ -1155,8 +1202,7 @@ export interface DiscoverySuggest200Response extends HttpResponse { // @public (undocumented) export interface DiscoverySuggestBodyParam { - // (undocumented) - body?: SuggestOptions; + body: SuggestOptions; } // @public (undocumented) @@ -1168,11 +1214,22 @@ export interface DiscoverySuggestDefaultResponse extends HttpResponse { } // @public (undocumented) -export type DiscoverySuggestParameters = DiscoverySuggestBodyParam & RequestParameters; +export type DiscoverySuggestParameters = DiscoverySuggestQueryParam & DiscoverySuggestBodyParam & RequestParameters; + +// @public (undocumented) +export interface DiscoverySuggestQueryParam { + // (undocumented) + queryParameters: DiscoverySuggestQueryParamProperties; +} + +// @public (undocumented) +export interface DiscoverySuggestQueryParamProperties { + "api-version": string; +} // @public (undocumented) export interface EntityAddClassification { - post(options?: EntityAddClassificationParameters): StreamableMethod; + post(options: EntityAddClassificationParameters): StreamableMethod; } // @public @@ -1183,8 +1240,7 @@ export interface EntityAddClassification204Response extends HttpResponse { // @public (undocumented) export interface EntityAddClassificationBodyParam { - // (undocumented) - body?: ClassificationAssociateOptions; + body: ClassificationAssociateOptions; } // @public (undocumented) @@ -1379,8 +1435,7 @@ export interface EntityBulkCreateOrUpdate200Response extends HttpResponse { // @public (undocumented) export interface EntityBulkCreateOrUpdateBodyParam { - // (undocumented) - body?: AtlasEntitiesWithExtInfo; + body: AtlasEntitiesWithExtInfo; } // @public (undocumented) @@ -1402,7 +1457,8 @@ export interface EntityBulkCreateOrUpdateQueryParam { // @public (undocumented) export interface EntityBulkCreateOrUpdateQueryParamProperties { - businessAttributeUpdateBehavior?: string; + "api-version"?: string; + businessAttributeUpdateBehavior?: BusinessAttributeUpdateBehavior; collectionId?: string; } @@ -1422,6 +1478,13 @@ export interface EntityBulkDeleteDefaultResponse extends HttpResponse { status: string; } +// @public +export interface EntityBulkDeleteGuidQueryParam { + explode: true; + style: "form"; + value: string[]; +} + // @public (undocumented) export type EntityBulkDeleteParameters = EntityBulkDeleteQueryParam & RequestParameters; @@ -1433,12 +1496,12 @@ export interface EntityBulkDeleteQueryParam { // @public (undocumented) export interface EntityBulkDeleteQueryParamProperties { - guid: string; + guid: EntityBulkDeleteGuidQueryParam; } // @public (undocumented) export interface EntityBulkSetClassifications { - post(options?: EntityBulkSetClassificationsParameters): StreamableMethod; + post(options: EntityBulkSetClassificationsParameters): StreamableMethod; } // @public @@ -1451,8 +1514,7 @@ export interface EntityBulkSetClassifications200Response extends HttpResponse { // @public (undocumented) export interface EntityBulkSetClassificationsBodyParam { - // (undocumented) - body?: AtlasEntityHeaders; + body: AtlasEntityHeaders; } // @public (undocumented) @@ -1468,7 +1530,7 @@ export type EntityBulkSetClassificationsParameters = EntityBulkSetClassification // @public (undocumented) export interface EntityCreateOrUpdate { - post(options?: EntityCreateOrUpdateParameters): StreamableMethod; + post(options: EntityCreateOrUpdateParameters): StreamableMethod; } // @public @@ -1481,8 +1543,7 @@ export interface EntityCreateOrUpdate200Response extends HttpResponse { // @public (undocumented) export interface EntityCreateOrUpdateBodyParam { - // (undocumented) - body?: AtlasEntityWithExtInfo; + body: AtlasEntityWithExtInfo; } // @public (undocumented) @@ -1504,10 +1565,19 @@ export interface EntityCreateOrUpdateQueryParam { // @public (undocumented) export interface EntityCreateOrUpdateQueryParamProperties { - businessAttributeUpdateBehavior?: string; + "api-version"?: string; + businessAttributeUpdateBehavior?: BusinessAttributeUpdateBehavior; collectionId?: string; } +// @public +export interface EntityDelete200Response extends HttpResponse { + // (undocumented) + body: EntityMutationResultOutput; + // (undocumented) + status: "200"; +} + // @public export interface EntityDeleteByUniqueAttribute200Response extends HttpResponse { // (undocumented) @@ -1538,16 +1608,8 @@ export interface EntityDeleteByUniqueAttributeQueryParamProperties { "attr:qualifiedName"?: string; } -// @public -export interface EntityDeleteOperation200Response extends HttpResponse { - // (undocumented) - body: EntityMutationResultOutput; - // (undocumented) - status: "200"; -} - // @public (undocumented) -export interface EntityDeleteOperationDefaultResponse extends HttpResponse { +export interface EntityDeleteDefaultResponse extends HttpResponse { // (undocumented) body: AtlasErrorResponseOutput; // (undocumented) @@ -1559,7 +1621,7 @@ export type EntityDeleteParameters = RequestParameters; // @public (undocumented) export interface EntityGet { - delete(options?: EntityDeleteParameters): StreamableMethod; + delete(options?: EntityDeleteParameters): StreamableMethod; get(options?: EntityGetParameters): StreamableMethod; put(options: EntityPartialUpdateAttributeByGuidParameters): StreamableMethod; } @@ -1576,7 +1638,7 @@ export interface EntityGet200Response extends HttpResponse { export interface EntityGetByUniqueAttributes { delete(options?: EntityDeleteByUniqueAttributeParameters): StreamableMethod; get(options?: EntityGetByUniqueAttributesParameters): StreamableMethod; - put(options?: EntityPartialUpdateByUniqueAttributesParameters): StreamableMethod; + put(options: EntityPartialUpdateByUniqueAttributesParameters): StreamableMethod; } // @public @@ -1714,10 +1776,18 @@ export interface EntityGetSampleBusinessMetadataTemplate { get(options?: EntityGetSampleBusinessMetadataTemplateParameters): StreamableMethod; } +// @public (undocumented) +export interface EntityGetSampleBusinessMetadataTemplate200Headers { + // (undocumented) + "content-type": "application/octet-stream"; +} + // @public export interface EntityGetSampleBusinessMetadataTemplate200Response extends HttpResponse { body: Uint8Array; // (undocumented) + headers: RawHttpHeaders & EntityGetSampleBusinessMetadataTemplate200Headers; + // (undocumented) status: "200"; } @@ -1747,8 +1817,7 @@ export interface EntityImportBusinessMetadata200Response extends HttpResponse { // @public (undocumented) export interface EntityImportBusinessMetadataBodyParam { - // (undocumented) - body?: BusinessMetadataOptions; + body: BusinessMetadataOptions; } // @public (undocumented) @@ -1771,7 +1840,7 @@ export type EntityImportBusinessMetadataParameters = EntityImportBusinessMetadat export interface EntityListByGuids { delete(options: EntityBulkDeleteParameters): StreamableMethod; get(options: EntityListByGuidsParameters): StreamableMethod; - post(options?: EntityBulkCreateOrUpdateParameters): StreamableMethod; + post(options: EntityBulkCreateOrUpdateParameters): StreamableMethod; } // @public @@ -1790,6 +1859,13 @@ export interface EntityListByGuidsDefaultResponse extends HttpResponse { status: string; } +// @public +export interface EntityListByGuidsGuidQueryParam { + explode: true; + style: "form"; + value: string[]; +} + // @public (undocumented) export type EntityListByGuidsParameters = EntityListByGuidsQueryParam & RequestParameters; @@ -1801,7 +1877,8 @@ export interface EntityListByGuidsQueryParam { // @public (undocumented) export interface EntityListByGuidsQueryParamProperties { - guid: string; + "api-version"?: string; + guid: EntityListByGuidsGuidQueryParam; ignoreRelationships?: boolean; minExtInfo?: boolean; } @@ -1858,8 +1935,7 @@ export interface EntityMoveEntitiesToCollection200Response extends HttpResponse // @public (undocumented) export interface EntityMoveEntitiesToCollectionBodyParam { - // (undocumented) - body?: MoveEntitiesOptions; + body: MoveEntitiesOptions; } // @public (undocumented) @@ -1881,6 +1957,7 @@ export interface EntityMoveEntitiesToCollectionQueryParam { // @public (undocumented) export interface EntityMoveEntitiesToCollectionQueryParamProperties { + "api-version": string; collectionId: string; } @@ -1936,8 +2013,7 @@ export interface EntityPartialUpdateByUniqueAttributes200Response extends HttpRe // @public (undocumented) export interface EntityPartialUpdateByUniqueAttributesBodyParam { - // (undocumented) - body?: AtlasEntityWithExtInfo; + body: AtlasEntityWithExtInfo; } // @public (undocumented) @@ -2192,6 +2268,12 @@ export interface EntitySetLabelsDefaultResponse extends HttpResponse { // @public (undocumented) export type EntitySetLabelsParameters = EntitySetLabelsBodyParam & RequestParameters; +// @public +export type EntityStatus = string; + +// @public +export type EntityStatusOutput = string; + // @public export interface EntityUpdateClassifications204Response extends HttpResponse { // (undocumented) @@ -2279,8 +2361,7 @@ export interface GlossaryCreate200Response extends HttpResponse { // @public (undocumented) export interface GlossaryCreateBodyParam { - // (undocumented) - body?: AtlasGlossary; + body: AtlasGlossary; } // @public (undocumented) @@ -2314,7 +2395,7 @@ export type GlossaryCreateCategoriesParameters = GlossaryCreateCategoriesBodyPar // @public (undocumented) export interface GlossaryCreateCategory { - post(options?: GlossaryCreateCategoryParameters): StreamableMethod; + post(options: GlossaryCreateCategoryParameters): StreamableMethod; } // @public @@ -2327,8 +2408,7 @@ export interface GlossaryCreateCategory200Response extends HttpResponse { // @public (undocumented) export interface GlossaryCreateCategoryBodyParam { - // (undocumented) - body?: AtlasGlossaryCategory; + body: AtlasGlossaryCategory; } // @public (undocumented) @@ -2355,7 +2435,7 @@ export type GlossaryCreateParameters = GlossaryCreateBodyParam & RequestParamete // @public (undocumented) export interface GlossaryCreateTerm { - post(options?: GlossaryCreateTermParameters): StreamableMethod; + post(options: GlossaryCreateTermParameters): StreamableMethod; } // @public @@ -2368,8 +2448,7 @@ export interface GlossaryCreateTerm200Response extends HttpResponse { // @public (undocumented) export interface GlossaryCreateTermBodyParam { - // (undocumented) - body?: AtlasGlossaryTerm; + body: AtlasGlossaryTerm; } // @public (undocumented) @@ -2431,9 +2510,16 @@ export interface GlossaryCreateTermsQueryParam { // @public (undocumented) export interface GlossaryCreateTermsQueryParamProperties { + "api-version"?: string; includeTermHierarchy?: boolean; } +// @public +export interface GlossaryDelete204Response extends HttpResponse { + // (undocumented) + status: "204"; +} + // @public export interface GlossaryDeleteCategory204Response extends HttpResponse { // (undocumented) @@ -2451,14 +2537,8 @@ export interface GlossaryDeleteCategoryDefaultResponse extends HttpResponse { // @public (undocumented) export type GlossaryDeleteCategoryParameters = RequestParameters; -// @public -export interface GlossaryDeleteOperation204Response extends HttpResponse { - // (undocumented) - status: "204"; -} - // @public (undocumented) -export interface GlossaryDeleteOperationDefaultResponse extends HttpResponse { +export interface GlossaryDeleteDefaultResponse extends HttpResponse { // (undocumented) body: AtlasErrorResponseOutput; // (undocumented) @@ -2509,9 +2589,9 @@ export type GlossaryDeleteTermParameters = RequestParameters; // @public (undocumented) export interface GlossaryGet { - delete(options?: GlossaryDeleteParameters): StreamableMethod; + delete(options?: GlossaryDeleteParameters): StreamableMethod; get(options?: GlossaryGetParameters): StreamableMethod; - put(options?: GlossaryUpdateParameters): StreamableMethod; + put(options: GlossaryUpdateParameters): StreamableMethod; } // @public @@ -2526,7 +2606,7 @@ export interface GlossaryGet200Response extends HttpResponse { export interface GlossaryGetCategory { delete(options?: GlossaryDeleteCategoryParameters): StreamableMethod; get(options?: GlossaryGetCategoryParameters): StreamableMethod; - put(options?: GlossaryUpdateCategoryParameters): StreamableMethod; + put(options: GlossaryUpdateCategoryParameters): StreamableMethod; } // @public @@ -2578,7 +2658,18 @@ export interface GlossaryGetDetailedDefaultResponse extends HttpResponse { } // @public (undocumented) -export type GlossaryGetDetailedParameters = RequestParameters; +export type GlossaryGetDetailedParameters = GlossaryGetDetailedQueryParam & RequestParameters; + +// @public (undocumented) +export interface GlossaryGetDetailedQueryParam { + // (undocumented) + queryParameters?: GlossaryGetDetailedQueryParamProperties; +} + +// @public (undocumented) +export interface GlossaryGetDetailedQueryParamProperties { + "api-version"?: string; +} // @public (undocumented) export type GlossaryGetParameters = RequestParameters; @@ -2587,7 +2678,7 @@ export type GlossaryGetParameters = RequestParameters; export interface GlossaryGetTerm { delete(options?: GlossaryDeleteTermParameters): StreamableMethod; get(options?: GlossaryGetTermParameters): StreamableMethod; - put(options?: GlossaryUpdateTermParameters): StreamableMethod; + put(options: GlossaryUpdateTermParameters): StreamableMethod; } // @public @@ -2607,12 +2698,23 @@ export interface GlossaryGetTermDefaultResponse extends HttpResponse { } // @public (undocumented) -export type GlossaryGetTermParameters = RequestParameters; +export type GlossaryGetTermParameters = GlossaryGetTermQueryParam & RequestParameters; + +// @public (undocumented) +export interface GlossaryGetTermQueryParam { + // (undocumented) + queryParameters?: GlossaryGetTermQueryParamProperties; +} + +// @public (undocumented) +export interface GlossaryGetTermQueryParamProperties { + "api-version"?: string; +} // @public (undocumented) export interface GlossaryList { get(options?: GlossaryListParameters): StreamableMethod; - post(options?: GlossaryCreateParameters): StreamableMethod; + post(options: GlossaryCreateParameters): StreamableMethod; } // @public @@ -2792,6 +2894,7 @@ export interface GlossaryListQueryParam { // @public (undocumented) export interface GlossaryListQueryParamProperties { + "api-version"?: string; ignoreTermsAndCategories?: boolean; limit?: number; offset?: number; @@ -2867,6 +2970,7 @@ export interface GlossaryListRelatedTermsQueryParam { // @public (undocumented) export interface GlossaryListRelatedTermsQueryParamProperties { + "api-version"?: string; limit?: number; offset?: number; sort?: string; @@ -2941,6 +3045,7 @@ export interface GlossaryListTermsQueryParam { // @public (undocumented) export interface GlossaryListTermsQueryParamProperties { + "api-version"?: string; limit?: number; offset?: number; sort?: string; @@ -3012,6 +3117,7 @@ export interface GlossaryPartialUpdateQueryParam { // @public (undocumented) export interface GlossaryPartialUpdateQueryParamProperties { + "api-version"?: string; ignoreTermsAndCategories?: boolean; } @@ -3052,6 +3158,7 @@ export interface GlossaryPartialUpdateTermQueryParam { // @public (undocumented) export interface GlossaryPartialUpdateTermQueryParamProperties { + "api-version"?: string; includeTermHierarchy?: boolean; } @@ -3065,8 +3172,7 @@ export interface GlossaryUpdate200Response extends HttpResponse { // @public (undocumented) export interface GlossaryUpdateBodyParam { - // (undocumented) - body?: AtlasGlossary; + body: AtlasGlossary; } // @public @@ -3079,8 +3185,7 @@ export interface GlossaryUpdateCategory200Response extends HttpResponse { // @public (undocumented) export interface GlossaryUpdateCategoryBodyParam { - // (undocumented) - body?: AtlasGlossaryCategory; + body: AtlasGlossaryCategory; } // @public (undocumented) @@ -3113,6 +3218,7 @@ export interface GlossaryUpdateQueryParam { // @public (undocumented) export interface GlossaryUpdateQueryParamProperties { + "api-version"?: string; ignoreTermsAndCategories?: boolean; } @@ -3126,8 +3232,7 @@ export interface GlossaryUpdateTerm200Response extends HttpResponse { // @public (undocumented) export interface GlossaryUpdateTermBodyParam { - // (undocumented) - body?: AtlasGlossaryTerm; + body: AtlasGlossaryTerm; } // @public (undocumented) @@ -3149,17 +3254,21 @@ export interface GlossaryUpdateTermQueryParam { // @public (undocumented) export interface GlossaryUpdateTermQueryParamProperties { + "api-version"?: string; includeTermHierarchy?: boolean; } // @public export interface ImportInfoOutput { childObjectName?: string; - importStatus?: string; + importStatus?: ImportStatusOutput; parentObjectName?: string; remarks?: string; } +// @public +export type ImportStatusOutput = string; + // @public (undocumented) export function isUnexpected(response: EntityCreateOrUpdate200Response | EntityCreateOrUpdateDefaultResponse): response is EntityCreateOrUpdateDefaultResponse; @@ -3182,7 +3291,7 @@ export function isUnexpected(response: EntityGet200Response | EntityGetDefaultRe export function isUnexpected(response: EntityPartialUpdateAttributeByGuid200Response | EntityPartialUpdateAttributeByGuidDefaultResponse): response is EntityPartialUpdateAttributeByGuidDefaultResponse; // @public (undocumented) -export function isUnexpected(response: EntityDeleteOperation200Response | EntityDeleteOperationDefaultResponse): response is EntityDeleteOperationDefaultResponse; +export function isUnexpected(response: EntityDelete200Response | EntityDeleteDefaultResponse): response is EntityDeleteDefaultResponse; // @public (undocumented) export function isUnexpected(response: EntityGetClassification200Response | EntityGetClassificationDefaultResponse): response is EntityGetClassificationDefaultResponse; @@ -3332,7 +3441,7 @@ export function isUnexpected(response: GlossaryGet200Response | GlossaryGetDefau export function isUnexpected(response: GlossaryUpdate200Response | GlossaryUpdateDefaultResponse): response is GlossaryUpdateDefaultResponse; // @public (undocumented) -export function isUnexpected(response: GlossaryDeleteOperation204Response | GlossaryDeleteOperationDefaultResponse): response is GlossaryDeleteOperationDefaultResponse; +export function isUnexpected(response: GlossaryDelete204Response | GlossaryDeleteDefaultResponse): response is GlossaryDeleteDefaultResponse; // @public (undocumented) export function isUnexpected(response: GlossaryListCategories200Response | GlossaryListCategoriesDefaultResponse): response is GlossaryListCategoriesDefaultResponse; @@ -3380,7 +3489,7 @@ export function isUnexpected(response: RelationshipUpdate200Response | Relations export function isUnexpected(response: RelationshipGet200Response | RelationshipGetDefaultResponse): response is RelationshipGetDefaultResponse; // @public (undocumented) -export function isUnexpected(response: RelationshipDeleteOperation204Response | RelationshipDeleteOperationDefaultResponse): response is RelationshipDeleteOperationDefaultResponse; +export function isUnexpected(response: RelationshipDelete204Response | RelationshipDeleteDefaultResponse): response is RelationshipDeleteDefaultResponse; // @public (undocumented) export function isUnexpected(response: TypeGetBusinessMetadataDefByGuid200Response | TypeGetBusinessMetadataDefByGuidDefaultResponse): response is TypeGetBusinessMetadataDefByGuidDefaultResponse; @@ -3425,7 +3534,7 @@ export function isUnexpected(response: TypeGetByGuid200Response | TypeGetByGuidD export function isUnexpected(response: TypeGetByName200Response | TypeGetByNameDefaultResponse): response is TypeGetByNameDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TypeDeleteOperation204Response | TypeDeleteOperationDefaultResponse): response is TypeDeleteOperationDefaultResponse; +export function isUnexpected(response: TypeDelete204Response | TypeDeleteDefaultResponse): response is TypeDeleteDefaultResponse; // @public (undocumented) export function isUnexpected(response: TypeList200Response | TypeListDefaultResponse): response is TypeListDefaultResponse; @@ -3448,6 +3557,12 @@ export function isUnexpected(response: TypeGetTermTemplateDefByGuid200Response | // @public (undocumented) export function isUnexpected(response: TypeGetTermTemplateDefByName200Response | TypeGetTermTemplateDefByNameDefaultResponse): response is TypeGetTermTemplateDefByNameDefaultResponse; +// @public +export type LineageDirection = string; + +// @public +export type LineageDirectionOutput = string; + // @public (undocumented) export interface LineageGet { get(options: LineageGetParameters): StreamableMethod; @@ -3495,7 +3610,7 @@ export interface LineageGetByUniqueAttributeQueryParam { export interface LineageGetByUniqueAttributeQueryParamProperties { "attr:qualifiedName"?: string; depth?: number; - direction: string; + direction: LineageDirection; } // @public (undocumented) @@ -3538,7 +3653,8 @@ export interface LineageGetNextPageQueryParam { // @public (undocumented) export interface LineageGetNextPageQueryParamProperties { - direction: string; + "api-version": string; + direction: LineageDirection; limit?: number; offset?: number; } @@ -3555,7 +3671,7 @@ export interface LineageGetQueryParam { // @public (undocumented) export interface LineageGetQueryParamProperties { depth?: number; - direction: string; + direction: LineageDirection; } // @public @@ -3585,7 +3701,7 @@ export interface NumberFormat { numberInstance?: NumberFormat; parseIntegerOnly?: boolean; percentInstance?: NumberFormat; - roundingMode?: string; + roundingMode?: RoundingMode; } // @public @@ -3603,7 +3719,7 @@ export interface NumberFormatOutput { numberInstance?: NumberFormatOutput; parseIntegerOnly?: boolean; percentInstance?: NumberFormatOutput; - roundingMode?: string; + roundingMode?: RoundingModeOutput; } // @public @@ -3618,6 +3734,10 @@ export type PurviewDataMapClient = Client & { path: Routes; }; +// @public +export interface PurviewDataMapClientOptions extends ClientOptions { +} + // @public export interface PurviewObjectId { displayText?: string; @@ -3655,17 +3775,23 @@ export interface QueryOptions { // @public export interface QueryResultOutput { + "@search.count"?: number; + "@search.count.approximate"?: boolean; + "@search.facets"?: SearchFacetResultValueOutput; continuationToken?: string; - searchCount?: number; - searchCountApproximate?: boolean; - searchFacets?: SearchFacetResultValueOutput; value?: Array; } +// @public +export type RelationshipCategory = string; + +// @public +export type RelationshipCategoryOutput = string; + // @public (undocumented) export interface RelationshipCreate { - post(options?: RelationshipCreateParameters): StreamableMethod; - put(options?: RelationshipUpdateParameters): StreamableMethod; + post(options: RelationshipCreateParameters): StreamableMethod; + put(options: RelationshipUpdateParameters): StreamableMethod; } // @public @@ -3678,8 +3804,7 @@ export interface RelationshipCreate200Response extends HttpResponse { // @public (undocumented) export interface RelationshipCreateBodyParam { - // (undocumented) - body?: AtlasRelationship; + body: AtlasRelationship; } // @public (undocumented) @@ -3694,13 +3819,13 @@ export interface RelationshipCreateDefaultResponse extends HttpResponse { export type RelationshipCreateParameters = RelationshipCreateBodyParam & RequestParameters; // @public -export interface RelationshipDeleteOperation204Response extends HttpResponse { +export interface RelationshipDelete204Response extends HttpResponse { // (undocumented) status: "204"; } // @public (undocumented) -export interface RelationshipDeleteOperationDefaultResponse extends HttpResponse { +export interface RelationshipDeleteDefaultResponse extends HttpResponse { // (undocumented) body: AtlasErrorResponseOutput; // (undocumented) @@ -3712,7 +3837,7 @@ export type RelationshipDeleteParameters = RequestParameters; // @public (undocumented) export interface RelationshipGet { - delete(options?: RelationshipDeleteParameters): StreamableMethod; + delete(options?: RelationshipDeleteParameters): StreamableMethod; get(options?: RelationshipGetParameters): StreamableMethod; } @@ -3756,8 +3881,7 @@ export interface RelationshipUpdate200Response extends HttpResponse { // @public (undocumented) export interface RelationshipUpdateBodyParam { - // (undocumented) - body?: AtlasRelationship; + body: AtlasRelationship; } // @public (undocumented) @@ -3783,6 +3907,12 @@ export interface ResourceLinkOutput { url?: string; } +// @public +export type RoundingMode = string; + +// @public +export type RoundingModeOutput = string; + // @public (undocumented) export interface Routes { (path: "/atlas/v2/entity"): EntityCreateOrUpdate; @@ -3881,8 +4011,8 @@ export interface SearchFacetResultValueOutput { // @public export interface SearchFacetSort { - count?: string; - value?: string; + count?: SearchSortOrder; + value?: SearchSortOrder; } // @public @@ -3896,6 +4026,8 @@ export interface SearchHighlightsOutput { // @public export interface SearchResultValueOutput { + "@search.highlights"?: SearchHighlightsOutput; + "@search.score"?: number; assetType?: string[]; classification?: string[]; contact?: Array; @@ -3912,20 +4044,30 @@ export interface SearchResultValueOutput { objectType?: string; owner?: string; qualifiedName?: string; - searchHighlights?: SearchHighlightsOutput; - searchScore?: number; term?: Array; termStatus?: string; termTemplate?: string[]; updateTime?: number; } +// @public +export type SearchSortOrder = string; + // @public export interface SearchTaxonomySetting { assetTypes?: string[]; facet?: SearchFacetItem; } +// @public +export type SortTypeOutput = string; + +// @public +export type StatusAtlasRelationship = string; + +// @public +export type StatusAtlasRelationshipOutput = string; + // @public export interface SuggestOptions { filter?: unknown; @@ -3940,6 +4082,8 @@ export interface SuggestResultOutput { // @public export interface SuggestResultValueOutput { + "@search.score"?: number; + "@search.text"?: string; assetType?: string[]; classification?: string[]; contact?: Array; @@ -3956,8 +4100,6 @@ export interface SuggestResultValueOutput { objectType?: string; owner?: string; qualifiedName?: string; - searchScore?: number; - searchText?: string; term?: Array; termStatus?: string; termTemplate?: string[]; @@ -3971,10 +4113,16 @@ export interface TermSearchResultValueOutput { name?: string; } +// @public +export type TermStatus = string; + +// @public +export type TermStatusOutput = string; + // @public export interface TermTemplateDef { attributeDefs?: Array; - category?: string; + category?: TypeCategory; createdBy?: string; createTime?: number; dateFormatter?: DateFormat; @@ -3993,7 +4141,7 @@ export interface TermTemplateDef { // @public export interface TermTemplateDefOutput { attributeDefs?: Array; - category?: string; + category?: TypeCategoryOutput; createdBy?: string; createTime?: number; dateFormatter?: DateFormatOutput; @@ -4053,8 +4201,7 @@ export interface TypeBulkCreate200Response extends HttpResponse { // @public (undocumented) export interface TypeBulkCreateBodyParam { - // (undocumented) - body?: AtlasTypesDef; + body: AtlasTypesDef; } // @public (undocumented) @@ -4076,8 +4223,7 @@ export interface TypeBulkDelete204Response extends HttpResponse { // @public (undocumented) export interface TypeBulkDeleteBodyParam { - // (undocumented) - body?: AtlasTypesDef; + body: AtlasTypesDef; } // @public (undocumented) @@ -4101,8 +4247,7 @@ export interface TypeBulkUpdate200Response extends HttpResponse { // @public (undocumented) export interface TypeBulkUpdateBodyParam { - // (undocumented) - body?: AtlasTypesDef; + body: AtlasTypesDef; } // @public (undocumented) @@ -4117,13 +4262,19 @@ export interface TypeBulkUpdateDefaultResponse extends HttpResponse { export type TypeBulkUpdateParameters = TypeBulkUpdateBodyParam & RequestParameters; // @public -export interface TypeDeleteOperation204Response extends HttpResponse { +export type TypeCategory = string; + +// @public +export type TypeCategoryOutput = string; + +// @public +export interface TypeDelete204Response extends HttpResponse { // (undocumented) status: "204"; } // @public (undocumented) -export interface TypeDeleteOperationDefaultResponse extends HttpResponse { +export interface TypeDeleteDefaultResponse extends HttpResponse { // (undocumented) body: AtlasErrorResponseOutput; // (undocumented) @@ -4207,7 +4358,7 @@ export type TypeGetByGuidParameters = RequestParameters; // @public (undocumented) export interface TypeGetByName { - delete(options?: TypeDeleteParameters): StreamableMethod; + delete(options?: TypeDeleteParameters): StreamableMethod; get(options?: TypeGetByNameParameters): StreamableMethod; } @@ -4492,7 +4643,18 @@ export interface TypeGetTermTemplateDefByGuidDefaultResponse extends HttpRespons } // @public (undocumented) -export type TypeGetTermTemplateDefByGuidParameters = RequestParameters; +export type TypeGetTermTemplateDefByGuidParameters = TypeGetTermTemplateDefByGuidQueryParam & RequestParameters; + +// @public (undocumented) +export interface TypeGetTermTemplateDefByGuidQueryParam { + // (undocumented) + queryParameters: TypeGetTermTemplateDefByGuidQueryParamProperties; +} + +// @public (undocumented) +export interface TypeGetTermTemplateDefByGuidQueryParamProperties { + "api-version": string; +} // @public (undocumented) export interface TypeGetTermTemplateDefByName { @@ -4516,14 +4678,25 @@ export interface TypeGetTermTemplateDefByNameDefaultResponse extends HttpRespons } // @public (undocumented) -export type TypeGetTermTemplateDefByNameParameters = RequestParameters; +export type TypeGetTermTemplateDefByNameParameters = TypeGetTermTemplateDefByNameQueryParam & RequestParameters; + +// @public (undocumented) +export interface TypeGetTermTemplateDefByNameQueryParam { + // (undocumented) + queryParameters: TypeGetTermTemplateDefByNameQueryParamProperties; +} + +// @public (undocumented) +export interface TypeGetTermTemplateDefByNameQueryParamProperties { + "api-version": string; +} // @public (undocumented) export interface TypeList { - delete(options?: TypeBulkDeleteParameters): StreamableMethod; + delete(options: TypeBulkDeleteParameters): StreamableMethod; get(options?: TypeListParameters): StreamableMethod; - post(options?: TypeBulkCreateParameters): StreamableMethod; - put(options?: TypeBulkUpdateParameters): StreamableMethod; + post(options: TypeBulkCreateParameters): StreamableMethod; + put(options: TypeBulkUpdateParameters): StreamableMethod; } // @public @@ -4574,8 +4747,9 @@ export interface TypeListHeadersQueryParam { // @public (undocumented) export interface TypeListHeadersQueryParamProperties { + "api-version"?: string; includeTermTemplate?: boolean; - type?: string; + type?: TypeCategory; } // @public (undocumented) @@ -4589,8 +4763,9 @@ export interface TypeListQueryParam { // @public (undocumented) export interface TypeListQueryParamProperties { + "api-version"?: string; includeTermTemplate?: boolean; - type?: string; + type?: TypeCategory; } // (No @packageDocumentation comment for this package) diff --git a/sdk/purview/purview-datamap-rest/src/clientDefinitions.ts b/sdk/purview/purview-datamap-rest/src/clientDefinitions.ts index 3f1b09802c78..e5e669b3141c 100644 --- a/sdk/purview/purview-datamap-rest/src/clientDefinitions.ts +++ b/sdk/purview/purview-datamap-rest/src/clientDefinitions.ts @@ -114,8 +114,8 @@ import type { EntityGetDefaultResponse, EntityPartialUpdateAttributeByGuid200Response, EntityPartialUpdateAttributeByGuidDefaultResponse, - EntityDeleteOperation200Response, - EntityDeleteOperationDefaultResponse, + EntityDelete200Response, + EntityDeleteDefaultResponse, EntityGetClassification200Response, EntityGetClassificationDefaultResponse, EntityRemoveClassification204Response, @@ -214,8 +214,8 @@ import type { GlossaryGetDefaultResponse, GlossaryUpdate200Response, GlossaryUpdateDefaultResponse, - GlossaryDeleteOperation204Response, - GlossaryDeleteOperationDefaultResponse, + GlossaryDelete204Response, + GlossaryDeleteDefaultResponse, GlossaryListCategories200Response, GlossaryListCategoriesDefaultResponse, GlossaryListCategoriesHeaders200Response, @@ -246,8 +246,8 @@ import type { RelationshipUpdateDefaultResponse, RelationshipGet200Response, RelationshipGetDefaultResponse, - RelationshipDeleteOperation204Response, - RelationshipDeleteOperationDefaultResponse, + RelationshipDelete204Response, + RelationshipDeleteDefaultResponse, TypeGetBusinessMetadataDefByGuid200Response, TypeGetBusinessMetadataDefByGuidDefaultResponse, TypeGetBusinessMetadataDefByName200Response, @@ -276,8 +276,8 @@ import type { TypeGetByGuidDefaultResponse, TypeGetByName200Response, TypeGetByNameDefaultResponse, - TypeDeleteOperation204Response, - TypeDeleteOperationDefaultResponse, + TypeDelete204Response, + TypeDeleteDefaultResponse, TypeList200Response, TypeListDefaultResponse, TypeBulkCreate200Response, @@ -306,7 +306,7 @@ export interface EntityCreateOrUpdate { * For each contact type, the maximum number of contacts is 20. */ post( - options?: EntityCreateOrUpdateParameters, + options: EntityCreateOrUpdateParameters, ): StreamableMethod; } @@ -326,7 +326,7 @@ export interface EntityListByGuids { * is 20. */ post( - options?: EntityBulkCreateOrUpdateParameters, + options: EntityBulkCreateOrUpdateParameters, ): StreamableMethod< EntityBulkCreateOrUpdate200Response | EntityBulkCreateOrUpdateDefaultResponse >; @@ -342,7 +342,7 @@ export interface EntityListByGuids { export interface EntityAddClassification { /** Associate a classification to multiple entities in bulk. */ post( - options?: EntityAddClassificationParameters, + options: EntityAddClassificationParameters, ): StreamableMethod; } @@ -367,7 +367,7 @@ export interface EntityGet { /** Delete an entity identified by its GUID. */ delete( options?: EntityDeleteParameters, - ): StreamableMethod; + ): StreamableMethod; } export interface EntityGetClassification { @@ -445,7 +445,7 @@ export interface EntityGetByUniqueAttributes { * /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. */ put( - options?: EntityPartialUpdateByUniqueAttributesParameters, + options: EntityPartialUpdateByUniqueAttributesParameters, ): StreamableMethod< | EntityPartialUpdateByUniqueAttributes200Response | EntityPartialUpdateByUniqueAttributesDefaultResponse @@ -504,7 +504,7 @@ export interface EntityAddClassificationsByUniqueAttribute { export interface EntityBulkSetClassifications { /** Set classifications on entities in bulk. */ post( - options?: EntityBulkSetClassificationsParameters, + options: EntityBulkSetClassificationsParameters, ): StreamableMethod< EntityBulkSetClassifications200Response | EntityBulkSetClassificationsDefaultResponse >; @@ -692,19 +692,15 @@ export interface GlossaryList { /** * Get all glossaries. Recommend using limit/offset to get pagination result. * Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - * separately using - * - * 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - * and - * - * 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + * separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + * and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. */ get( options?: GlossaryListParameters, ): StreamableMethod; /** Create a glossary. */ post( - options?: GlossaryCreateParameters, + options: GlossaryCreateParameters, ): StreamableMethod; } @@ -720,7 +716,7 @@ export interface GlossaryCreateCategories { export interface GlossaryCreateCategory { /** Create a glossary category. */ post( - options?: GlossaryCreateCategoryParameters, + options: GlossaryCreateCategoryParameters, ): StreamableMethod; } @@ -731,7 +727,7 @@ export interface GlossaryGetCategory { ): StreamableMethod; /** Update the given glossary category by its GUID. */ put( - options?: GlossaryUpdateCategoryParameters, + options: GlossaryUpdateCategoryParameters, ): StreamableMethod; /** Delete a glossary category. */ delete( @@ -775,7 +771,7 @@ export interface GlossaryListCategoryTerms { export interface GlossaryCreateTerm { /** Create a glossary term. */ post( - options?: GlossaryCreateTermParameters, + options: GlossaryCreateTermParameters, ): StreamableMethod; } @@ -786,7 +782,7 @@ export interface GlossaryGetTerm { ): StreamableMethod; /** Update the given glossary term by its GUID. */ put( - options?: GlossaryUpdateTermParameters, + options: GlossaryUpdateTermParameters, ): StreamableMethod; /** Delete a glossary term. */ delete( @@ -865,7 +861,7 @@ export interface GlossaryGet { ): StreamableMethod; /** Update the given glossary. */ put( - options?: GlossaryUpdateParameters, + options: GlossaryUpdateParameters, ): StreamableMethod; /** * Delete a glossary. Will delete underlying terms/categories together. Recommend @@ -873,7 +869,7 @@ export interface GlossaryGet { */ delete( options?: GlossaryDeleteParameters, - ): StreamableMethod; + ): StreamableMethod; } export interface GlossaryListCategories { @@ -953,21 +949,21 @@ export interface GlossaryListTermHeaders { export interface DiscoveryQuery { /** Get data using search. */ post( - options?: DiscoveryQueryParameters, + options: DiscoveryQueryParameters, ): StreamableMethod; } export interface DiscoverySuggest { /** Get search suggestions by query criteria. */ post( - options?: DiscoverySuggestParameters, + options: DiscoverySuggestParameters, ): StreamableMethod; } export interface DiscoveryAutoComplete { /** Get auto complete options. */ post( - options?: DiscoveryAutoCompleteParameters, + options: DiscoveryAutoCompleteParameters, ): StreamableMethod; } @@ -1014,11 +1010,11 @@ export interface LineageGetByUniqueAttribute { export interface RelationshipCreate { /** Create a new relationship between entities. */ post( - options?: RelationshipCreateParameters, + options: RelationshipCreateParameters, ): StreamableMethod; /** Update an existing relationship between entities. */ put( - options?: RelationshipUpdateParameters, + options: RelationshipUpdateParameters, ): StreamableMethod; } @@ -1030,9 +1026,7 @@ export interface RelationshipGet { /** Delete a relationship between entities by its GUID. */ delete( options?: RelationshipDeleteParameters, - ): StreamableMethod< - RelationshipDeleteOperation204Response | RelationshipDeleteOperationDefaultResponse - >; + ): StreamableMethod; } export interface TypeGetBusinessMetadataDefByGuid { @@ -1146,7 +1140,7 @@ export interface TypeGetByName { /** Delete API for type identified by its name. */ delete( options?: TypeDeleteParameters, - ): StreamableMethod; + ): StreamableMethod; } export interface TypeList { @@ -1154,24 +1148,20 @@ export interface TypeList { get( options?: TypeListParameters, ): StreamableMethod; - /** - * Create all atlas type definitions in bulk, only new definitions will be - * created. - * Any changes to the existing definitions will be discarded. - */ + /** Create all atlas type definitions in bulk. Please avoid recreating existing types. */ post( - options?: TypeBulkCreateParameters, + options: TypeBulkCreateParameters, ): StreamableMethod; /** * Update all types in bulk, changes detected in the type definitions would be * persisted. */ put( - options?: TypeBulkUpdateParameters, + options: TypeBulkUpdateParameters, ): StreamableMethod; /** Delete API for all types in bulk. */ delete( - options?: TypeBulkDeleteParameters, + options: TypeBulkDeleteParameters, ): StreamableMethod; } diff --git a/sdk/purview/purview-datamap-rest/src/isUnexpected.ts b/sdk/purview/purview-datamap-rest/src/isUnexpected.ts index aca467e40c65..28d827fbe3a5 100644 --- a/sdk/purview/purview-datamap-rest/src/isUnexpected.ts +++ b/sdk/purview/purview-datamap-rest/src/isUnexpected.ts @@ -16,8 +16,8 @@ import type { EntityGetDefaultResponse, EntityPartialUpdateAttributeByGuid200Response, EntityPartialUpdateAttributeByGuidDefaultResponse, - EntityDeleteOperation200Response, - EntityDeleteOperationDefaultResponse, + EntityDelete200Response, + EntityDeleteDefaultResponse, EntityGetClassification200Response, EntityGetClassificationDefaultResponse, EntityRemoveClassification204Response, @@ -116,8 +116,8 @@ import type { GlossaryGetDefaultResponse, GlossaryUpdate200Response, GlossaryUpdateDefaultResponse, - GlossaryDeleteOperation204Response, - GlossaryDeleteOperationDefaultResponse, + GlossaryDelete204Response, + GlossaryDeleteDefaultResponse, GlossaryListCategories200Response, GlossaryListCategoriesDefaultResponse, GlossaryListCategoriesHeaders200Response, @@ -148,8 +148,8 @@ import type { RelationshipUpdateDefaultResponse, RelationshipGet200Response, RelationshipGetDefaultResponse, - RelationshipDeleteOperation204Response, - RelationshipDeleteOperationDefaultResponse, + RelationshipDelete204Response, + RelationshipDeleteDefaultResponse, TypeGetBusinessMetadataDefByGuid200Response, TypeGetBusinessMetadataDefByGuidDefaultResponse, TypeGetBusinessMetadataDefByName200Response, @@ -178,8 +178,8 @@ import type { TypeGetByGuidDefaultResponse, TypeGetByName200Response, TypeGetByNameDefaultResponse, - TypeDeleteOperation204Response, - TypeDeleteOperationDefaultResponse, + TypeDelete204Response, + TypeDeleteDefaultResponse, TypeList200Response, TypeListDefaultResponse, TypeBulkCreate200Response, @@ -321,8 +321,8 @@ export function isUnexpected( | EntityPartialUpdateAttributeByGuidDefaultResponse, ): response is EntityPartialUpdateAttributeByGuidDefaultResponse; export function isUnexpected( - response: EntityDeleteOperation200Response | EntityDeleteOperationDefaultResponse, -): response is EntityDeleteOperationDefaultResponse; + response: EntityDelete200Response | EntityDeleteDefaultResponse, +): response is EntityDeleteDefaultResponse; export function isUnexpected( response: EntityGetClassification200Response | EntityGetClassificationDefaultResponse, ): response is EntityGetClassificationDefaultResponse; @@ -499,8 +499,8 @@ export function isUnexpected( response: GlossaryUpdate200Response | GlossaryUpdateDefaultResponse, ): response is GlossaryUpdateDefaultResponse; export function isUnexpected( - response: GlossaryDeleteOperation204Response | GlossaryDeleteOperationDefaultResponse, -): response is GlossaryDeleteOperationDefaultResponse; + response: GlossaryDelete204Response | GlossaryDeleteDefaultResponse, +): response is GlossaryDeleteDefaultResponse; export function isUnexpected( response: GlossaryListCategories200Response | GlossaryListCategoriesDefaultResponse, ): response is GlossaryListCategoriesDefaultResponse; @@ -547,8 +547,8 @@ export function isUnexpected( response: RelationshipGet200Response | RelationshipGetDefaultResponse, ): response is RelationshipGetDefaultResponse; export function isUnexpected( - response: RelationshipDeleteOperation204Response | RelationshipDeleteOperationDefaultResponse, -): response is RelationshipDeleteOperationDefaultResponse; + response: RelationshipDelete204Response | RelationshipDeleteDefaultResponse, +): response is RelationshipDeleteDefaultResponse; export function isUnexpected( response: | TypeGetBusinessMetadataDefByGuid200Response @@ -600,8 +600,8 @@ export function isUnexpected( response: TypeGetByName200Response | TypeGetByNameDefaultResponse, ): response is TypeGetByNameDefaultResponse; export function isUnexpected( - response: TypeDeleteOperation204Response | TypeDeleteOperationDefaultResponse, -): response is TypeDeleteOperationDefaultResponse; + response: TypeDelete204Response | TypeDeleteDefaultResponse, +): response is TypeDeleteDefaultResponse; export function isUnexpected( response: TypeList200Response | TypeListDefaultResponse, ): response is TypeListDefaultResponse; @@ -639,8 +639,8 @@ export function isUnexpected( | EntityGetDefaultResponse | EntityPartialUpdateAttributeByGuid200Response | EntityPartialUpdateAttributeByGuidDefaultResponse - | EntityDeleteOperation200Response - | EntityDeleteOperationDefaultResponse + | EntityDelete200Response + | EntityDeleteDefaultResponse | EntityGetClassification200Response | EntityGetClassificationDefaultResponse | EntityRemoveClassification204Response @@ -739,8 +739,8 @@ export function isUnexpected( | GlossaryGetDefaultResponse | GlossaryUpdate200Response | GlossaryUpdateDefaultResponse - | GlossaryDeleteOperation204Response - | GlossaryDeleteOperationDefaultResponse + | GlossaryDelete204Response + | GlossaryDeleteDefaultResponse | GlossaryListCategories200Response | GlossaryListCategoriesDefaultResponse | GlossaryListCategoriesHeaders200Response @@ -771,8 +771,8 @@ export function isUnexpected( | RelationshipUpdateDefaultResponse | RelationshipGet200Response | RelationshipGetDefaultResponse - | RelationshipDeleteOperation204Response - | RelationshipDeleteOperationDefaultResponse + | RelationshipDelete204Response + | RelationshipDeleteDefaultResponse | TypeGetBusinessMetadataDefByGuid200Response | TypeGetBusinessMetadataDefByGuidDefaultResponse | TypeGetBusinessMetadataDefByName200Response @@ -801,8 +801,8 @@ export function isUnexpected( | TypeGetByGuidDefaultResponse | TypeGetByName200Response | TypeGetByNameDefaultResponse - | TypeDeleteOperation204Response - | TypeDeleteOperationDefaultResponse + | TypeDelete204Response + | TypeDeleteDefaultResponse | TypeList200Response | TypeListDefaultResponse | TypeBulkCreate200Response @@ -825,7 +825,7 @@ export function isUnexpected( | EntityAddClassificationDefaultResponse | EntityGetDefaultResponse | EntityPartialUpdateAttributeByGuidDefaultResponse - | EntityDeleteOperationDefaultResponse + | EntityDeleteDefaultResponse | EntityGetClassificationDefaultResponse | EntityRemoveClassificationDefaultResponse | EntityGetClassificationsDefaultResponse @@ -875,7 +875,7 @@ export function isUnexpected( | GlossaryListRelatedTermsDefaultResponse | GlossaryGetDefaultResponse | GlossaryUpdateDefaultResponse - | GlossaryDeleteOperationDefaultResponse + | GlossaryDeleteDefaultResponse | GlossaryListCategoriesDefaultResponse | GlossaryListCategoriesHeadersDefaultResponse | GlossaryGetDetailedDefaultResponse @@ -891,7 +891,7 @@ export function isUnexpected( | RelationshipCreateDefaultResponse | RelationshipUpdateDefaultResponse | RelationshipGetDefaultResponse - | RelationshipDeleteOperationDefaultResponse + | RelationshipDeleteDefaultResponse | TypeGetBusinessMetadataDefByGuidDefaultResponse | TypeGetBusinessMetadataDefByNameDefaultResponse | TypeGetClassificationDefByGuidDefaultResponse @@ -906,7 +906,7 @@ export function isUnexpected( | TypeGetStructDefByNameDefaultResponse | TypeGetByGuidDefaultResponse | TypeGetByNameDefaultResponse - | TypeDeleteOperationDefaultResponse + | TypeDeleteDefaultResponse | TypeListDefaultResponse | TypeBulkCreateDefaultResponse | TypeBulkUpdateDefaultResponse diff --git a/sdk/purview/purview-datamap-rest/src/models.ts b/sdk/purview/purview-datamap-rest/src/models.ts index d01c2b3b99f6..c3a8f178a7ed 100644 --- a/sdk/purview/purview-datamap-rest/src/models.ts +++ b/sdk/purview/purview-datamap-rest/src/models.ts @@ -52,7 +52,7 @@ export interface AtlasEntity { * * Possible values: "ACTIVE", "DELETED" */ - status?: string; + status?: EntityStatus; /** The update time of the record. */ updateTime?: number; /** The user who updated the record. */ @@ -82,7 +82,7 @@ export interface AtlasClassification { * * Possible values: "ACTIVE", "DELETED" */ - entityStatus?: string; + entityStatus?: EntityStatus; /** Determines if propagations will be removed on entity deletion. */ removePropagationsOnEntityDelete?: boolean; /** An array of time boundaries indicating validity periods. */ @@ -118,7 +118,7 @@ export interface AtlasTermAssignmentHeader { * * Possible values: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER" */ - status?: string; + status?: AtlasTermAssignmentStatus; /** The steward of the term. */ steward?: string; /** The GUID of the term. */ @@ -163,7 +163,7 @@ export interface AtlasEntityHeader { * * Possible values: "ACTIVE", "DELETED" */ - status?: string; + status?: EntityStatus; } /** @@ -194,15 +194,11 @@ export interface AtlasEntityHeaders { guidHeaderMap?: Record; } -/** Business metadata to send to the service */ -export interface BusinessMetadataOptions { - /** - * InputStream of file - * - * NOTE: The following type 'File' is part of WebAPI and available since Node 20. If your Node version is lower than Node 20. - * You could leverage our helpers 'createFile' or 'createFileFromStream' to create a File object. They could help you specify filename, type, and others. - */ - file: string | Uint8Array | ReadableStream | NodeJS.ReadableStream | File; +export interface BusinessMetadataOptionsFilePartDescriptor { + name: "file"; + body: string | Uint8Array | ReadableStream | NodeJS.ReadableStream | File; + filename?: string; + contentType?: string; } /** MoveEntitiesOptions */ @@ -274,7 +270,7 @@ export interface AtlasRelatedTermHeader { * * Possible values: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER" */ - status?: string; + status?: AtlasTermRelationshipStatus; /** The steward of the term. */ steward?: string; /** The GUID of the term. */ @@ -362,7 +358,7 @@ export interface AtlasGlossaryTerm { * * Possible values: "Draft", "Approved", "Alert", "Expired" */ - status?: string; + status?: TermStatus; /** The nick name of the term. */ nickName?: string; /** The hierarchy information of the term. */ @@ -458,7 +454,7 @@ export interface AtlasRelatedObjectId { * * Possible values: "ACTIVE", "DELETED" */ - entityStatus?: string; + entityStatus?: EntityStatus; /** Relationship type */ relationshipType?: string; /** @@ -473,7 +469,7 @@ export interface AtlasRelatedObjectId { * * Possible values: "ACTIVE", "DELETED" */ - relationshipStatus?: string; + relationshipStatus?: StatusAtlasRelationship; } /** @@ -504,7 +500,7 @@ export interface AtlasTermCategorizationHeader { * * Possible values: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER" */ - status?: string; + status?: AtlasTermRelationshipStatus; } /** The search query of advanced search request. */ @@ -548,13 +544,13 @@ export interface SearchFacetSort { * * Possible values: "asc", "desc" */ - count?: string; + count?: SearchSortOrder; /** * Order by value * * Possible values: "asc", "desc" */ - value?: string; + value?: SearchSortOrder; } /** Taxonomy setting for search request */ @@ -628,7 +624,7 @@ export interface AtlasRelationship { * * Possible values: "ACTIVE", "DELETED" */ - status?: string; + status?: StatusAtlasRelationship; /** The update time of the record. */ updateTime?: number; /** The user who updated the record. */ @@ -654,7 +650,7 @@ export interface AtlasBusinessMetadataDef { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategory; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -740,7 +736,7 @@ export interface NumberFormat { * * Possible values: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY" */ - roundingMode?: string; + roundingMode?: RoundingMode; } /** The timezone information. */ @@ -766,7 +762,7 @@ export interface AtlasAttributeDef { * * Possible values: "SINGLE", "LIST", "SET" */ - cardinality?: string; + cardinality?: CardinalityValue; /** An array of constraints. */ constraints?: Array; /** The default value of the attribute. */ @@ -808,7 +804,7 @@ export interface AtlasClassificationDef { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategory; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -875,7 +871,7 @@ export interface AtlasEntityDef { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategory; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -924,7 +920,7 @@ export interface AtlasRelationshipAttributeDef { * * Possible values: "SINGLE", "LIST", "SET" */ - cardinality?: string; + cardinality?: CardinalityValue; /** An array of constraints. */ constraints?: Array; /** The default value of the attribute. */ @@ -962,7 +958,7 @@ export interface AtlasEnumDef { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategory; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1051,7 +1047,7 @@ export interface AtlasRelationshipDef { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategory; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1106,7 +1102,7 @@ export interface AtlasRelationshipDef { * * Possible values: "ASSOCIATION", "AGGREGATION", "COMPOSITION" */ - relationshipCategory?: string; + relationshipCategory?: RelationshipCategory; /** The label of the relationship. */ relationshipLabel?: string; } @@ -1123,7 +1119,7 @@ export interface AtlasRelationshipEndDef { * * Possible values: "SINGLE", "LIST", "SET" */ - cardinality?: string; + cardinality?: CardinalityValue; /** The description of the relationship end definition. */ description?: string; /** Determines if it is container. */ @@ -1143,7 +1139,7 @@ export interface AtlasStructDef { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategory; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1199,7 +1195,7 @@ export interface TermTemplateDef { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategory; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1229,3 +1225,30 @@ export interface TermTemplateDef { /** An array of attribute definitions. */ attributeDefs?: Array; } + +/** Alias for BusinessAttributeUpdateBehavior */ +export type BusinessAttributeUpdateBehavior = string; +/** Alias for EntityStatus */ +export type EntityStatus = string; +/** Alias for AtlasTermAssignmentStatus */ +export type AtlasTermAssignmentStatus = string; +/** Business metadata to send to the service */ +export type BusinessMetadataOptions = FormData | Array; +/** Alias for AtlasTermRelationshipStatus */ +export type AtlasTermRelationshipStatus = string; +/** Alias for TermStatus */ +export type TermStatus = string; +/** Alias for StatusAtlasRelationship */ +export type StatusAtlasRelationship = string; +/** Alias for SearchSortOrder */ +export type SearchSortOrder = string; +/** Alias for LineageDirection */ +export type LineageDirection = string; +/** Alias for TypeCategory */ +export type TypeCategory = string; +/** Alias for RoundingMode */ +export type RoundingMode = string; +/** Alias for CardinalityValue */ +export type CardinalityValue = string; +/** Alias for RelationshipCategory */ +export type RelationshipCategory = string; diff --git a/sdk/purview/purview-datamap-rest/src/outputModels.ts b/sdk/purview/purview-datamap-rest/src/outputModels.ts index e8d6ec311647..51cab200410e 100644 --- a/sdk/purview/purview-datamap-rest/src/outputModels.ts +++ b/sdk/purview/purview-datamap-rest/src/outputModels.ts @@ -54,7 +54,7 @@ export interface AtlasEntityOutput { * * Possible values: "ACTIVE", "DELETED" */ - status?: string; + status?: EntityStatusOutput; /** The update time of the record. */ updateTime?: number; /** The user who updated the record. */ @@ -84,7 +84,7 @@ export interface AtlasClassificationOutput { * * Possible values: "ACTIVE", "DELETED" */ - entityStatus?: string; + entityStatus?: EntityStatusOutput; /** Determines if propagations will be removed on entity deletion. */ removePropagationsOnEntityDelete?: boolean; /** An array of time boundaries indicating validity periods. */ @@ -120,7 +120,7 @@ export interface AtlasTermAssignmentHeaderOutput { * * Possible values: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER" */ - status?: string; + status?: AtlasTermAssignmentStatusOutput; /** The steward of the term. */ steward?: string; /** The GUID of the term. */ @@ -175,7 +175,7 @@ export interface AtlasEntityHeaderOutput { * * Possible values: "ACTIVE", "DELETED" */ - status?: string; + status?: EntityStatusOutput; } /** An error response from the service */ @@ -212,24 +212,13 @@ export interface AtlasClassificationsOutput { * * Possible values: "NONE", "ASC", "DESC" */ - sortType?: string; + sortType?: SortTypeOutput; /** The start index of the page. */ startIndex?: number; /** The total count of items. */ totalCount?: number; } -/** Business metadata to send to the service */ -export interface BusinessMetadataOptionsOutput { - /** - * InputStream of file - * - * NOTE: The following type 'File' is part of WebAPI and available since Node 20. If your Node version is lower than Node 20. - * You could leverage our helpers 'createFile' or 'createFileFromStream' to create a File object. They could help you specify filename, type, and others. - */ - file: Uint8Array; -} - /** Bulk import result */ export interface BulkImportResultOutput { /** failed importInfoList */ @@ -247,7 +236,7 @@ export interface ImportInfoOutput { * * Possible values: "SUCCESS", "FAILED" */ - importStatus?: string; + importStatus?: ImportStatusOutput; /** parentObjectName */ parentObjectName?: string; /** remarks */ @@ -317,7 +306,7 @@ export interface AtlasRelatedTermHeaderOutput { * * Possible values: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER" */ - status?: string; + status?: AtlasTermRelationshipStatusOutput; /** The steward of the term. */ steward?: string; /** The GUID of the term. */ @@ -405,7 +394,7 @@ export interface AtlasGlossaryTermOutput { * * Possible values: "Draft", "Approved", "Alert", "Expired" */ - status?: string; + status?: TermStatusOutput; /** The nick name of the term. */ nickName?: string; /** The hierarchy information of the term. */ @@ -501,7 +490,7 @@ export interface AtlasRelatedObjectIdOutput { * * Possible values: "ACTIVE", "DELETED" */ - entityStatus?: string; + entityStatus?: EntityStatusOutput; /** Relationship type */ relationshipType?: string; /** @@ -516,7 +505,7 @@ export interface AtlasRelatedObjectIdOutput { * * Possible values: "ACTIVE", "DELETED" */ - relationshipStatus?: string; + relationshipStatus?: StatusAtlasRelationshipOutput; } /** @@ -547,7 +536,7 @@ export interface AtlasTermCategorizationHeaderOutput { * * Possible values: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER" */ - status?: string; + status?: AtlasTermRelationshipStatusOutput; } /** The extended information of glossary. */ @@ -594,9 +583,9 @@ export interface QueryResultOutput { * The total number of search results (not the number of documents in a single * page). */ - searchCount?: number; + "@search.count"?: number; /** 'True' if the '@search.count' is an approximate value and vise versa. */ - searchCountApproximate?: boolean; + "@search.count.approximate"?: boolean; /** The token used to get next batch of data. Absent if there's no more data. */ continuationToken?: string; /** @@ -604,7 +593,7 @@ export interface QueryResultOutput { * contactId, and label. When the facet is specified in the request, the value of * the facet is returned as an element of @search.facets. */ - searchFacets?: SearchFacetResultValueOutput; + "@search.facets"?: SearchFacetResultValueOutput; /** Search result value */ value?: Array; } @@ -651,14 +640,14 @@ export interface SearchResultValueOutput { * The search score calculated by the search engine. The results are ordered by * search score by default. */ - searchScore?: number; + "@search.score"?: number; /** * A highlight list that consists of index fields id ,qualifiedName, name, * description, entityType. When the keyword appears in those fields, the value of * the field, attached with emphasis mark, is returned as an element of * @search.highlights. */ - searchHighlights?: SearchHighlightsOutput; + "@search.highlights"?: SearchHighlightsOutput; /** * The object type of the record. Object type is the top-level property to * distinguish whether a record is an asset or a term. @@ -761,12 +750,12 @@ export interface SuggestResultValueOutput { * The search score calculated by the search engine. The results are ordered by * search score by default. */ - searchScore?: number; + "@search.score"?: number; /** * The target text that contains the keyword as prefix. The keyword is wrapped * with emphasis mark. */ - searchText?: string; + "@search.text"?: string; /** * The object type of the record. Object type is the top-level property to * distinguish whether a record is an asset or a term. @@ -848,7 +837,7 @@ export interface AtlasLineageInfoOutput { * * Possible values: "INPUT", "OUTPUT", "BOTH" */ - lineageDirection?: string; + lineageDirection?: LineageDirectionOutput; /** An array of parentRelations relations. */ parentRelations?: Array; /** An array of lineage relations. */ @@ -904,7 +893,7 @@ export interface AtlasRelationshipOutput { * * Possible values: "ACTIVE", "DELETED" */ - status?: string; + status?: StatusAtlasRelationshipOutput; /** The update time of the record. */ updateTime?: number; /** The user who updated the record. */ @@ -938,7 +927,7 @@ export interface AtlasBusinessMetadataDefOutput { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategoryOutput; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1024,7 +1013,7 @@ export interface NumberFormatOutput { * * Possible values: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY" */ - roundingMode?: string; + roundingMode?: RoundingModeOutput; } /** The timezone information. */ @@ -1050,7 +1039,7 @@ export interface AtlasAttributeDefOutput { * * Possible values: "SINGLE", "LIST", "SET" */ - cardinality?: string; + cardinality?: CardinalityValueOutput; /** An array of constraints. */ constraints?: Array; /** The default value of the attribute. */ @@ -1092,7 +1081,7 @@ export interface AtlasClassificationDefOutput { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategoryOutput; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1159,7 +1148,7 @@ export interface AtlasEntityDefOutput { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategoryOutput; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1208,7 +1197,7 @@ export interface AtlasRelationshipAttributeDefOutput { * * Possible values: "SINGLE", "LIST", "SET" */ - cardinality?: string; + cardinality?: CardinalityValueOutput; /** An array of constraints. */ constraints?: Array; /** The default value of the attribute. */ @@ -1246,7 +1235,7 @@ export interface AtlasEnumDefOutput { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategoryOutput; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1335,7 +1324,7 @@ export interface AtlasRelationshipDefOutput { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategoryOutput; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1390,7 +1379,7 @@ export interface AtlasRelationshipDefOutput { * * Possible values: "ASSOCIATION", "AGGREGATION", "COMPOSITION" */ - relationshipCategory?: string; + relationshipCategory?: RelationshipCategoryOutput; /** The label of the relationship. */ relationshipLabel?: string; } @@ -1407,7 +1396,7 @@ export interface AtlasRelationshipEndDefOutput { * * Possible values: "SINGLE", "LIST", "SET" */ - cardinality?: string; + cardinality?: CardinalityValueOutput; /** The description of the relationship end definition. */ description?: string; /** Determines if it is container. */ @@ -1427,7 +1416,7 @@ export interface AtlasStructDefOutput { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategoryOutput; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1465,7 +1454,7 @@ export interface AtlasTypeDefOutput { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategoryOutput; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1555,7 +1544,7 @@ export interface AtlasTypeDefOutput { * * Possible values: "ASSOCIATION", "AGGREGATION", "COMPOSITION" */ - relationshipCategory?: string; + relationshipCategory?: RelationshipCategoryOutput; /** The label of the relationship. */ relationshipLabel?: string; /** An array of attribute definitions. */ @@ -1587,7 +1576,7 @@ export interface TermTemplateDefOutput { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategoryOutput; /** The created time of the record. */ createTime?: number; /** The user who created the record. */ @@ -1625,9 +1614,34 @@ export interface AtlasTypeDefHeaderOutput { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - category?: string; + category?: TypeCategoryOutput; /** The GUID of the type definition. */ guid?: string; /** The name of the type definition. */ name?: string; } + +/** Alias for EntityStatusOutput */ +export type EntityStatusOutput = string; +/** Alias for AtlasTermAssignmentStatusOutput */ +export type AtlasTermAssignmentStatusOutput = string; +/** Alias for SortTypeOutput */ +export type SortTypeOutput = string; +/** Alias for ImportStatusOutput */ +export type ImportStatusOutput = string; +/** Alias for AtlasTermRelationshipStatusOutput */ +export type AtlasTermRelationshipStatusOutput = string; +/** Alias for TermStatusOutput */ +export type TermStatusOutput = string; +/** Alias for StatusAtlasRelationshipOutput */ +export type StatusAtlasRelationshipOutput = string; +/** Alias for LineageDirectionOutput */ +export type LineageDirectionOutput = string; +/** Alias for TypeCategoryOutput */ +export type TypeCategoryOutput = string; +/** Alias for RoundingModeOutput */ +export type RoundingModeOutput = string; +/** Alias for CardinalityValueOutput */ +export type CardinalityValueOutput = string; +/** Alias for RelationshipCategoryOutput */ +export type RelationshipCategoryOutput = string; diff --git a/sdk/purview/purview-datamap-rest/src/parameters.ts b/sdk/purview/purview-datamap-rest/src/parameters.ts index 2606c81f1f47..c0a50020bf00 100644 --- a/sdk/purview/purview-datamap-rest/src/parameters.ts +++ b/sdk/purview/purview-datamap-rest/src/parameters.ts @@ -3,6 +3,7 @@ import type { RequestParameters } from "@azure-rest/core-client"; import type { + BusinessAttributeUpdateBehavior, AtlasEntityWithExtInfo, AtlasEntitiesWithExtInfo, ClassificationAssociateOptions, @@ -17,22 +18,27 @@ import type { QueryOptions, SuggestOptions, AutoCompleteOptions, + LineageDirection, AtlasRelationship, + TypeCategory, AtlasTypesDef, } from "./models.js"; export interface EntityCreateOrUpdateBodyParam { - body?: AtlasEntityWithExtInfo; + /** Body parameter. */ + body: AtlasEntityWithExtInfo; } export interface EntityCreateOrUpdateQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** * Used to define the update behavior for business attributes when updating * entities. * * Possible values: "ignore", "replace", "merge" */ - businessAttributeUpdateBehavior?: string; + businessAttributeUpdateBehavior?: BusinessAttributeUpdateBehavior; /** * The collection where entities will be moved to. Only specify a value if you * need to move an entity to another collection. @@ -48,9 +54,21 @@ export type EntityCreateOrUpdateParameters = EntityCreateOrUpdateQueryParam & EntityCreateOrUpdateBodyParam & RequestParameters; +/** This is the wrapper object for the parameter `guid` with explode set to true and style set to form. */ +export interface EntityListByGuidsGuidQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: true; + /** Style of the value */ + style: "form"; +} + export interface EntityListByGuidsQueryParamProperties { - /** An array of GUIDs of entities to list. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ - guid: string; + /** The API version to use for this operation. */ + "api-version"?: string; + /** An array of GUIDs of entities to list. */ + guid: EntityListByGuidsGuidQueryParam; /** Whether to return minimal information for referred entities. */ minExtInfo?: boolean; /** Whether to ignore relationship attributes. */ @@ -64,10 +82,13 @@ export interface EntityListByGuidsQueryParam { export type EntityListByGuidsParameters = EntityListByGuidsQueryParam & RequestParameters; export interface EntityBulkCreateOrUpdateBodyParam { - body?: AtlasEntitiesWithExtInfo; + /** Body parameter. */ + body: AtlasEntitiesWithExtInfo; } export interface EntityBulkCreateOrUpdateQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** * The collection where entities will be moved to. Only specify a value if you * need to move an entity to another collection. @@ -79,7 +100,7 @@ export interface EntityBulkCreateOrUpdateQueryParamProperties { * * Possible values: "ignore", "replace", "merge" */ - businessAttributeUpdateBehavior?: string; + businessAttributeUpdateBehavior?: BusinessAttributeUpdateBehavior; } export interface EntityBulkCreateOrUpdateQueryParam { @@ -90,9 +111,19 @@ export type EntityBulkCreateOrUpdateParameters = EntityBulkCreateOrUpdateQueryPa EntityBulkCreateOrUpdateBodyParam & RequestParameters; +/** This is the wrapper object for the parameter `guid` with explode set to true and style set to form. */ +export interface EntityBulkDeleteGuidQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: true; + /** Style of the value */ + style: "form"; +} + export interface EntityBulkDeleteQueryParamProperties { - /** An array of GUIDs of entities to delete. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ - guid: string; + /** An array of GUIDs of entities to delete. */ + guid: EntityBulkDeleteGuidQueryParam; } export interface EntityBulkDeleteQueryParam { @@ -102,7 +133,8 @@ export interface EntityBulkDeleteQueryParam { export type EntityBulkDeleteParameters = EntityBulkDeleteQueryParam & RequestParameters; export interface EntityAddClassificationBodyParam { - body?: ClassificationAssociateOptions; + /** Body parameter. */ + body: ClassificationAssociateOptions; } export type EntityAddClassificationParameters = EntityAddClassificationBodyParam & @@ -180,7 +212,8 @@ export type EntityGetByUniqueAttributesParameters = EntityGetByUniqueAttributesQ RequestParameters; export interface EntityPartialUpdateByUniqueAttributesBodyParam { - body?: AtlasEntityWithExtInfo; + /** Body parameter. */ + body: AtlasEntityWithExtInfo; } export interface EntityPartialUpdateByUniqueAttributesQueryParamProperties { @@ -275,7 +308,8 @@ export type EntityUpdateClassificationsByUniqueAttributeParameters = RequestParameters; export interface EntityBulkSetClassificationsBodyParam { - body?: AtlasEntityHeaders; + /** Body parameter. */ + body: AtlasEntityHeaders; } export type EntityBulkSetClassificationsParameters = EntityBulkSetClassificationsBodyParam & @@ -350,7 +384,8 @@ export type EntityAddOrUpdateBusinessMetadataAttributesParameters = export type EntityGetSampleBusinessMetadataTemplateParameters = RequestParameters; export interface EntityImportBusinessMetadataBodyParam { - body?: BusinessMetadataOptions; + /** Body parameter. */ + body: BusinessMetadataOptions; } export interface EntityImportBusinessMetadataMediaTypesParam { @@ -450,10 +485,13 @@ export type EntityAddLabelsByUniqueAttributeParameters = RequestParameters; export interface EntityMoveEntitiesToCollectionBodyParam { - body?: MoveEntitiesOptions; + /** Body parameter. */ + body: MoveEntitiesOptions; } export interface EntityMoveEntitiesToCollectionQueryParamProperties { + /** The API version to use for this operation. */ + "api-version": string; /** The collection where entities will be moved to. */ collectionId: string; } @@ -467,6 +505,8 @@ export type EntityMoveEntitiesToCollectionParameters = EntityMoveEntitiesToColle RequestParameters; export interface GlossaryListQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** The page size - by default there is no paging. */ limit?: number; /** The offset for pagination purpose. */ @@ -484,7 +524,8 @@ export interface GlossaryListQueryParam { export type GlossaryListParameters = GlossaryListQueryParam & RequestParameters; export interface GlossaryCreateBodyParam { - body?: AtlasGlossary; + /** Body parameter. */ + body: AtlasGlossary; } export type GlossaryCreateParameters = GlossaryCreateBodyParam & RequestParameters; @@ -498,14 +539,16 @@ export type GlossaryCreateCategoriesParameters = GlossaryCreateCategoriesBodyPar RequestParameters; export interface GlossaryCreateCategoryBodyParam { - body?: AtlasGlossaryCategory; + /** Body parameter. */ + body: AtlasGlossaryCategory; } export type GlossaryCreateCategoryParameters = GlossaryCreateCategoryBodyParam & RequestParameters; export type GlossaryGetCategoryParameters = RequestParameters; export interface GlossaryUpdateCategoryBodyParam { - body?: AtlasGlossaryCategory; + /** Body parameter. */ + body: AtlasGlossaryCategory; } export type GlossaryUpdateCategoryParameters = GlossaryUpdateCategoryBodyParam & RequestParameters; @@ -555,7 +598,8 @@ export type GlossaryListCategoryTermsParameters = GlossaryListCategoryTermsQuery RequestParameters; export interface GlossaryCreateTermBodyParam { - body?: AtlasGlossaryTerm; + /** Body parameter. */ + body: AtlasGlossaryTerm; } export interface GlossaryCreateTermQueryParamProperties { @@ -570,13 +614,26 @@ export interface GlossaryCreateTermQueryParam { export type GlossaryCreateTermParameters = GlossaryCreateTermQueryParam & GlossaryCreateTermBodyParam & RequestParameters; -export type GlossaryGetTermParameters = RequestParameters; + +export interface GlossaryGetTermQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; +} + +export interface GlossaryGetTermQueryParam { + queryParameters?: GlossaryGetTermQueryParamProperties; +} + +export type GlossaryGetTermParameters = GlossaryGetTermQueryParam & RequestParameters; export interface GlossaryUpdateTermBodyParam { - body?: AtlasGlossaryTerm; + /** Body parameter. */ + body: AtlasGlossaryTerm; } export interface GlossaryUpdateTermQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** Whether include term hierarchy */ includeTermHierarchy?: boolean; } @@ -599,6 +656,8 @@ export interface GlossaryPartialUpdateTermBodyParam { } export interface GlossaryPartialUpdateTermQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** Whether include term hierarchy */ includeTermHierarchy?: boolean; } @@ -617,6 +676,8 @@ export interface GlossaryCreateTermsBodyParam { } export interface GlossaryCreateTermsQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** Whether include term hierarchy */ includeTermHierarchy?: boolean; } @@ -662,6 +723,8 @@ export type GlossaryDeleteTermAssignmentFromEntitiesParameters = GlossaryDeleteTermAssignmentFromEntitiesBodyParam & RequestParameters; export interface GlossaryListRelatedTermsQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** The page size - by default there is no paging. */ limit?: number; /** The offset for pagination purpose. */ @@ -679,10 +742,13 @@ export type GlossaryListRelatedTermsParameters = GlossaryListRelatedTermsQueryPa export type GlossaryGetParameters = RequestParameters; export interface GlossaryUpdateBodyParam { - body?: AtlasGlossary; + /** Body parameter. */ + body: AtlasGlossary; } export interface GlossaryUpdateQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** Whether ignore terms and categories */ ignoreTermsAndCategories?: boolean; } @@ -726,7 +792,17 @@ export interface GlossaryListCategoriesHeadersQueryParam { export type GlossaryListCategoriesHeadersParameters = GlossaryListCategoriesHeadersQueryParam & RequestParameters; -export type GlossaryGetDetailedParameters = RequestParameters; + +export interface GlossaryGetDetailedQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; +} + +export interface GlossaryGetDetailedQueryParam { + queryParameters?: GlossaryGetDetailedQueryParamProperties; +} + +export type GlossaryGetDetailedParameters = GlossaryGetDetailedQueryParam & RequestParameters; export interface GlossaryPartialUpdateBodyParam { /** @@ -737,6 +813,8 @@ export interface GlossaryPartialUpdateBodyParam { } export interface GlossaryPartialUpdateQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** Whether ignore terms and categories */ ignoreTermsAndCategories?: boolean; } @@ -750,6 +828,8 @@ export type GlossaryPartialUpdateParameters = GlossaryPartialUpdateQueryParam & RequestParameters; export interface GlossaryListTermsQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** The page size - by default there is no paging. */ limit?: number; /** The offset for pagination purpose. */ @@ -781,22 +861,58 @@ export type GlossaryListTermHeadersParameters = GlossaryListTermHeadersQueryPara RequestParameters; export interface DiscoveryQueryBodyParam { - body?: QueryOptions; + /** Body parameter. */ + body: QueryOptions; +} + +export interface DiscoveryQueryQueryParamProperties { + /** The API version to use for this operation. */ + "api-version": string; } -export type DiscoveryQueryParameters = DiscoveryQueryBodyParam & RequestParameters; +export interface DiscoveryQueryQueryParam { + queryParameters: DiscoveryQueryQueryParamProperties; +} + +export type DiscoveryQueryParameters = DiscoveryQueryQueryParam & + DiscoveryQueryBodyParam & + RequestParameters; export interface DiscoverySuggestBodyParam { - body?: SuggestOptions; + /** Body parameter. */ + body: SuggestOptions; } -export type DiscoverySuggestParameters = DiscoverySuggestBodyParam & RequestParameters; +export interface DiscoverySuggestQueryParamProperties { + /** The API version to use for this operation. */ + "api-version": string; +} + +export interface DiscoverySuggestQueryParam { + queryParameters: DiscoverySuggestQueryParamProperties; +} + +export type DiscoverySuggestParameters = DiscoverySuggestQueryParam & + DiscoverySuggestBodyParam & + RequestParameters; export interface DiscoveryAutoCompleteBodyParam { - body?: AutoCompleteOptions; + /** Body parameter. */ + body: AutoCompleteOptions; +} + +export interface DiscoveryAutoCompleteQueryParamProperties { + /** The API version to use for this operation. */ + "api-version": string; } -export type DiscoveryAutoCompleteParameters = DiscoveryAutoCompleteBodyParam & RequestParameters; +export interface DiscoveryAutoCompleteQueryParam { + queryParameters: DiscoveryAutoCompleteQueryParamProperties; +} + +export type DiscoveryAutoCompleteParameters = DiscoveryAutoCompleteQueryParam & + DiscoveryAutoCompleteBodyParam & + RequestParameters; export interface LineageGetQueryParamProperties { /** The number of hops for lineage. */ @@ -806,7 +922,7 @@ export interface LineageGetQueryParamProperties { * * Possible values: "INPUT", "OUTPUT", "BOTH" */ - direction: string; + direction: LineageDirection; } export interface LineageGetQueryParam { @@ -816,12 +932,14 @@ export interface LineageGetQueryParam { export type LineageGetParameters = LineageGetQueryParam & RequestParameters; export interface LineageGetNextPageQueryParamProperties { + /** The API version to use for this operation. */ + "api-version": string; /** * The direction of the lineage, which could be INPUT, OUTPUT or BOTH. * * Possible values: "INPUT", "OUTPUT", "BOTH" */ - direction: string; + direction: LineageDirection; /** The offset for pagination purpose. */ offset?: number; /** The page size - by default there is no paging. */ @@ -842,7 +960,7 @@ export interface LineageGetByUniqueAttributeQueryParamProperties { * * Possible values: "INPUT", "OUTPUT", "BOTH" */ - direction: string; + direction: LineageDirection; /** * The qualified name of the entity. (This is only an example. qualifiedName can * be changed to other unique attributes) @@ -858,13 +976,15 @@ export type LineageGetByUniqueAttributeParameters = LineageGetByUniqueAttributeQ RequestParameters; export interface RelationshipCreateBodyParam { - body?: AtlasRelationship; + /** Body parameter. */ + body: AtlasRelationship; } export type RelationshipCreateParameters = RelationshipCreateBodyParam & RequestParameters; export interface RelationshipUpdateBodyParam { - body?: AtlasRelationship; + /** Body parameter. */ + body: AtlasRelationship; } export type RelationshipUpdateParameters = RelationshipUpdateBodyParam & RequestParameters; @@ -897,6 +1017,8 @@ export type TypeGetByNameParameters = RequestParameters; export type TypeDeleteParameters = RequestParameters; export interface TypeListQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** * Whether include termtemplatedef when return all typedefs. * This is always true @@ -908,7 +1030,7 @@ export interface TypeListQueryParamProperties { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - type?: string; + type?: TypeCategory; } export interface TypeListQueryParam { @@ -918,24 +1040,29 @@ export interface TypeListQueryParam { export type TypeListParameters = TypeListQueryParam & RequestParameters; export interface TypeBulkCreateBodyParam { - body?: AtlasTypesDef; + /** Body parameter. */ + body: AtlasTypesDef; } export type TypeBulkCreateParameters = TypeBulkCreateBodyParam & RequestParameters; export interface TypeBulkUpdateBodyParam { - body?: AtlasTypesDef; + /** Body parameter. */ + body: AtlasTypesDef; } export type TypeBulkUpdateParameters = TypeBulkUpdateBodyParam & RequestParameters; export interface TypeBulkDeleteBodyParam { - body?: AtlasTypesDef; + /** Body parameter. */ + body: AtlasTypesDef; } export type TypeBulkDeleteParameters = TypeBulkDeleteBodyParam & RequestParameters; export interface TypeListHeadersQueryParamProperties { + /** The API version to use for this operation. */ + "api-version"?: string; /** * Whether include termtemplatedef when return all typedefs. * This is always true @@ -947,7 +1074,7 @@ export interface TypeListHeadersQueryParamProperties { * * Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" */ - type?: string; + type?: TypeCategory; } export interface TypeListHeadersQueryParam { @@ -955,5 +1082,27 @@ export interface TypeListHeadersQueryParam { } export type TypeListHeadersParameters = TypeListHeadersQueryParam & RequestParameters; -export type TypeGetTermTemplateDefByGuidParameters = RequestParameters; -export type TypeGetTermTemplateDefByNameParameters = RequestParameters; + +export interface TypeGetTermTemplateDefByGuidQueryParamProperties { + /** The API version to use for this operation. */ + "api-version": string; +} + +export interface TypeGetTermTemplateDefByGuidQueryParam { + queryParameters: TypeGetTermTemplateDefByGuidQueryParamProperties; +} + +export type TypeGetTermTemplateDefByGuidParameters = TypeGetTermTemplateDefByGuidQueryParam & + RequestParameters; + +export interface TypeGetTermTemplateDefByNameQueryParamProperties { + /** The API version to use for this operation. */ + "api-version": string; +} + +export interface TypeGetTermTemplateDefByNameQueryParam { + queryParameters: TypeGetTermTemplateDefByNameQueryParamProperties; +} + +export type TypeGetTermTemplateDefByNameParameters = TypeGetTermTemplateDefByNameQueryParam & + RequestParameters; diff --git a/sdk/purview/purview-datamap-rest/src/purviewDataMapClient.ts b/sdk/purview/purview-datamap-rest/src/purviewDataMapClient.ts index dc62affcfc44..6c45a462e527 100644 --- a/sdk/purview/purview-datamap-rest/src/purviewDataMapClient.ts +++ b/sdk/purview/purview-datamap-rest/src/purviewDataMapClient.ts @@ -7,20 +7,22 @@ import { logger } from "./logger.js"; import type { TokenCredential } from "@azure/core-auth"; import type { PurviewDataMapClient } from "./clientDefinitions.js"; +/** The optional parameters for the client */ +export interface PurviewDataMapClientOptions extends ClientOptions {} + /** * Initialize a new instance of `PurviewDataMapClient` - * @param endpoint - A sequence of textual characters. + * @param endpointParam - A sequence of textual characters. * @param credentials - uniquely identify client credential * @param options - the parameter for all optional parameters */ export default function createClient( - endpoint: string, + endpointParam: string, credentials: TokenCredential, - options: ClientOptions = {}, + options: PurviewDataMapClientOptions = {}, ): PurviewDataMapClient { - const baseUrl = options.baseUrl ?? `${endpoint}/datamap/api`; - options.apiVersion = options.apiVersion ?? "2023-09-01"; - const userAgentInfo = `azsdk-js-purview-datamap-rest/1.0.0-beta.2`; + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}/datamap/api`; + const userAgentInfo = `azsdk-js-purview-datamap-rest/1.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` @@ -37,8 +39,14 @@ export default function createClient( scopes: options.credentials?.scopes ?? ["https://purview.azure.net/.default"], }, }; + const client = getClient(endpointUrl, credentials, options) as PurviewDataMapClient; - const client = getClient(baseUrl, credentials, options) as PurviewDataMapClient; + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + if (options.apiVersion) { + logger.warning( + "This client does not support client api-version, please change it at the operation level", + ); + } return client; } diff --git a/sdk/purview/purview-datamap-rest/src/responses.ts b/sdk/purview/purview-datamap-rest/src/responses.ts index aabe1b9451f2..58e5f9bec412 100644 --- a/sdk/purview/purview-datamap-rest/src/responses.ts +++ b/sdk/purview/purview-datamap-rest/src/responses.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import type { RawHttpHeaders } from "@azure/core-rest-pipeline"; import type { HttpResponse } from "@azure-rest/core-client"; import type { EntityMutationResultOutput, @@ -13,10 +14,10 @@ import type { BulkImportResultOutput, AtlasGlossaryOutput, AtlasGlossaryCategoryOutput, + AtlasRelatedCategoryHeaderOutput, AtlasRelatedTermHeaderOutput, AtlasGlossaryTermOutput, AtlasRelatedObjectIdOutput, - AtlasRelatedCategoryHeaderOutput, AtlasGlossaryExtInfoOutput, QueryResultOutput, SuggestResultOutput, @@ -113,12 +114,12 @@ export interface EntityPartialUpdateAttributeByGuidDefaultResponse extends HttpR } /** The request has succeeded. */ -export interface EntityDeleteOperation200Response extends HttpResponse { +export interface EntityDelete200Response extends HttpResponse { status: "200"; body: EntityMutationResultOutput; } -export interface EntityDeleteOperationDefaultResponse extends HttpResponse { +export interface EntityDeleteDefaultResponse extends HttpResponse { status: string; body: AtlasErrorResponseOutput; } @@ -311,11 +312,16 @@ export interface EntityAddOrUpdateBusinessMetadataAttributesDefaultResponse exte body: AtlasErrorResponseOutput; } +export interface EntityGetSampleBusinessMetadataTemplate200Headers { + "content-type": "application/octet-stream"; +} + /** The request has succeeded. */ export interface EntityGetSampleBusinessMetadataTemplate200Response extends HttpResponse { status: "200"; /** Value may contain any sequence of octets */ body: Uint8Array; + headers: RawHttpHeaders & EntityGetSampleBusinessMetadataTemplate200Headers; } export interface EntityGetSampleBusinessMetadataTemplateDefaultResponse extends HttpResponse { @@ -644,11 +650,11 @@ export interface GlossaryUpdateDefaultResponse extends HttpResponse { } /** There is no content to send for this request, but the headers may be useful. */ -export interface GlossaryDeleteOperation204Response extends HttpResponse { +export interface GlossaryDelete204Response extends HttpResponse { status: "204"; } -export interface GlossaryDeleteOperationDefaultResponse extends HttpResponse { +export interface GlossaryDeleteDefaultResponse extends HttpResponse { status: string; body: AtlasErrorResponseOutput; } @@ -819,11 +825,11 @@ export interface RelationshipGetDefaultResponse extends HttpResponse { } /** There is no content to send for this request, but the headers may be useful. */ -export interface RelationshipDeleteOperation204Response extends HttpResponse { +export interface RelationshipDelete204Response extends HttpResponse { status: "204"; } -export interface RelationshipDeleteOperationDefaultResponse extends HttpResponse { +export interface RelationshipDeleteDefaultResponse extends HttpResponse { status: string; body: AtlasErrorResponseOutput; } @@ -983,11 +989,11 @@ export interface TypeGetByNameDefaultResponse extends HttpResponse { } /** There is no content to send for this request, but the headers may be useful. */ -export interface TypeDeleteOperation204Response extends HttpResponse { +export interface TypeDelete204Response extends HttpResponse { status: "204"; } -export interface TypeDeleteOperationDefaultResponse extends HttpResponse { +export interface TypeDeleteDefaultResponse extends HttpResponse { status: string; body: AtlasErrorResponseOutput; } diff --git a/sdk/purview/purview-datamap-rest/test/public/entityTest.spec.ts b/sdk/purview/purview-datamap-rest/test/public/entityTest.spec.ts index 46a2e54763de..8c58bd300339 100644 --- a/sdk/purview/purview-datamap-rest/test/public/entityTest.spec.ts +++ b/sdk/purview/purview-datamap-rest/test/public/entityTest.spec.ts @@ -4,7 +4,6 @@ import type { Recorder } from "@azure-tools/test-recorder"; import { createRecorder } from "./utils/recordedClient.js"; import { createClient } from "./utils/recordedClient.js"; -import { createFile } from "../../src/index.js"; import { isUnexpected } from "../../src/isUnexpected.js"; import { describe, it, assert, beforeEach, afterEach } from "vitest"; @@ -28,9 +27,13 @@ hive_database,hive_db_1,bmWithAllTypes.attr8,"Awesome Attribute 1",name`); const response = await client.path("/atlas/v2/entity/businessmetadata/import").post({ contentType: "multipart/form-data", - body: { - file: createFile(fileContent, "template_2.csv"), - }, + body: [ + { + name: "file", + body: fileContent, + filename: "template_2.csv", + }, + ], }); assert.strictEqual(isUnexpected(response), false); }); diff --git a/sdk/purview/purview-datamap-rest/tsp-location.yaml b/sdk/purview/purview-datamap-rest/tsp-location.yaml index 2a823d141089..7f50fab51b20 100644 --- a/sdk/purview/purview-datamap-rest/tsp-location.yaml +++ b/sdk/purview/purview-datamap-rest/tsp-location.yaml @@ -1,5 +1,4 @@ directory: specification/purview/Azure.Analytics.Purview.DataMap +commit: b9d42131fa23babd959c491b44870a30ea9506cd repo: Azure/azure-rest-api-specs -commit: e4dd3e7e4d0402a81b2bef7dd754d3e46e8a8ab5 -additionalDirectories: [] - +additionalDirectories: From 5e59a73f87813a59556941a673a37e09766948dc Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:25:20 +0800 Subject: [PATCH 33/55] [data-plane] refresh purview-sharing-rest (#31620) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- sdk/purview/purview-sharing-rest/CHANGELOG.md | 5 + sdk/purview/purview-sharing-rest/package.json | 5 +- .../review/purview-sharing.api.md | 47 +++++- .../purview-sharing-rest/src/logger.ts | 5 + .../purview-sharing-rest/src/outputModels.ts | 24 ++- .../src/paginateHelper.ts | 146 +++++++++++++++++- .../purview-sharing-rest/src/pollingHelper.ts | 146 ++++++++++++++++-- .../src/purviewSharing.ts | 51 ++++-- .../purview-sharing-rest/swagger/README.md | 4 +- 9 files changed, 390 insertions(+), 43 deletions(-) create mode 100644 sdk/purview/purview-sharing-rest/src/logger.ts diff --git a/sdk/purview/purview-sharing-rest/CHANGELOG.md b/sdk/purview/purview-sharing-rest/CHANGELOG.md index 50a2b8747011..baeb8d70db0f 100644 --- a/sdk/purview/purview-sharing-rest/CHANGELOG.md +++ b/sdk/purview/purview-sharing-rest/CHANGELOG.md @@ -1,5 +1,10 @@ # Release History +## 1.0.0-beta.3 (2024-12-16) + +### Features Added +- refresh @azure-rest/purview-sharing + ## 1.0.0-beta.2 (2023-06-23) ### Features Added diff --git a/sdk/purview/purview-sharing-rest/package.json b/sdk/purview/purview-sharing-rest/package.json index d19efb6722db..0099893e9348 100644 --- a/sdk/purview/purview-sharing-rest/package.json +++ b/sdk/purview/purview-sharing-rest/package.json @@ -2,7 +2,7 @@ "name": "@azure-rest/purview-sharing", "sdk-type": "client", "author": "Microsoft Corporation", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "A generated SDK for PurviewSharing.", "keywords": [ "node", @@ -61,8 +61,7 @@ "@azure-rest/core-client": "^2.3.1", "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.9.0", - "@azure/core-lro": "^2.7.2", - "@azure/core-paging": "^1.6.2", + "@azure/core-lro": "^3.0.0", "@azure/core-rest-pipeline": "^1.18.0", "@azure/logger": "^1.1.4", "tslib": "^2.8.1" diff --git a/sdk/purview/purview-sharing-rest/review/purview-sharing.api.md b/sdk/purview/purview-sharing-rest/review/purview-sharing.api.md index 4addf4e91d6e..f4408c653e75 100644 --- a/sdk/purview/purview-sharing-rest/review/purview-sharing.api.md +++ b/sdk/purview/purview-sharing-rest/review/purview-sharing.api.md @@ -4,17 +4,17 @@ ```ts +import type { AbortSignalLike } from '@azure/abort-controller'; +import type { CancelOnProgress } from '@azure/core-lro'; import type { Client } from '@azure-rest/core-client'; import type { ClientOptions } from '@azure-rest/core-client'; import type { CreateHttpPollerOptions } from '@azure/core-lro'; import type { HttpResponse } from '@azure-rest/core-client'; import type { OperationState } from '@azure/core-lro'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; import type { PathUncheckedResponse } from '@azure-rest/core-client'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; import type { RequestParameters } from '@azure-rest/core-client'; -import type { SimplePollerLike } from '@azure/core-lro'; import type { StreamableMethod } from '@azure-rest/core-client'; import type { TokenCredential } from '@azure/core-auth'; @@ -147,7 +147,7 @@ export interface BlobStorageArtifactPropertiesOutput { } // @public -function createClient(endpoint: string, credentials: TokenCredential, options?: ClientOptions): PurviewSharingClient; +function createClient(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: PurviewSharingClientOptions): PurviewSharingClient; export default createClient; // @public @@ -157,7 +157,7 @@ export type GetArrayType = T extends Array ? TData : never; export function getLongRunningPoller(client: Client, initialResponse: TResult, options?: CreateHttpPollerOptions>): Promise, TResult>>; // @public -export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; @@ -298,6 +298,18 @@ export interface OperationResponseOutput { status: "Running" | "TransientFailure" | "Succeeded" | "Failed" | "NotStarted"; } +// @public +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} + +// @public +export interface PageSettings { + continuationToken?: string; +} + // @public export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; @@ -341,6 +353,11 @@ export type PurviewSharingClient = Client & { path: Routes; }; +// @public +export interface PurviewSharingClientOptions extends ClientOptions { + apiVersion?: string; +} + // @public export type ReceivedShare = InPlaceReceivedShare; @@ -1188,6 +1205,28 @@ export interface ShareResourcesGetAllShareResourcesQueryParamProperties { orderby?: string; } +// @public +export interface SimplePollerLike, TResult> { + getOperationState(): TState; + getResult(): TResult | undefined; + isDone(): boolean; + // @deprecated + isStopped(): boolean; + onProgress(callback: (state: TState) => void): CancelOnProgress; + poll(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + pollUntilDone(pollOptions?: { + abortSignal?: AbortSignalLike; + }): Promise; + serialize(): Promise; + // @deprecated + stopPolling(): void; + submitted(): Promise; + // @deprecated + toString(): string; +} + // @public export type Sink = AdlsGen2AccountSink | BlobAccountSink; diff --git a/sdk/purview/purview-sharing-rest/src/logger.ts b/sdk/purview/purview-sharing-rest/src/logger.ts new file mode 100644 index 000000000000..6f256575d739 --- /dev/null +++ b/sdk/purview/purview-sharing-rest/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("purview-sharing"); diff --git a/sdk/purview/purview-sharing-rest/src/outputModels.ts b/sdk/purview/purview-sharing-rest/src/outputModels.ts index e0ac6e762d4b..391431b61d47 100644 --- a/sdk/purview/purview-sharing-rest/src/outputModels.ts +++ b/sdk/purview/purview-sharing-rest/src/outputModels.ts @@ -48,7 +48,11 @@ export interface OperationResponseOutput { /** List of received shares. */ export interface ReceivedShareListOutput { - /** The Url of next result page. */ + /** + * The Url of next result page. + * + * Value may contain a URL + */ nextLink?: string; /** Collection of items of type ReceivedShare */ value: Array; @@ -56,7 +60,11 @@ export interface ReceivedShareListOutput { /** List of sent shares. */ export interface SentShareListOutput { - /** The Url of next result page. */ + /** + * The Url of next result page. + * + * Value may contain a URL + */ nextLink?: string; /** Collection of items of type SentShare */ value: Array; @@ -69,7 +77,11 @@ export interface SentShareOutputParent extends ProxyResourceOutput { /** List of the sent share invitations */ export interface SentShareInvitationListOutput { - /** The Url of next result page. */ + /** + * The Url of next result page. + * + * Value may contain a URL + */ nextLink?: string; /** Collection of items of type SentShareInvitation */ value: Array; @@ -82,7 +94,11 @@ export interface SentShareInvitationOutputParent extends ProxyResourceOutput { /** A page of ShareResource results. */ export interface ShareResourceListOutput { - /** The Url of next result page. */ + /** + * The Url of next result page. + * + * Value may contain a URL + */ nextLink?: string; /** Collection of items of type ShareResource */ value: Array; diff --git a/sdk/purview/purview-sharing-rest/src/paginateHelper.ts b/sdk/purview/purview-sharing-rest/src/paginateHelper.ts index 5d541b4e406d..9ea946d9d6c5 100644 --- a/sdk/purview/purview-sharing-rest/src/paginateHelper.ts +++ b/sdk/purview/purview-sharing-rest/src/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/purview/purview-sharing-rest/src/pollingHelper.ts b/sdk/purview/purview-sharing-rest/src/pollingHelper.ts index a54710cc33bd..a2668fc5d9c7 100644 --- a/sdk/purview/purview-sharing-rest/src/pollingHelper.ts +++ b/sdk/purview/purview-sharing-rest/src/pollingHelper.ts @@ -2,14 +2,82 @@ // Licensed under the MIT License. import type { Client, HttpResponse } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; import type { + CancelOnProgress, CreateHttpPollerOptions, - LongRunningOperation, - LroResponse, + RunningOperation, + OperationResponse, OperationState, - SimplePollerLike, } from "@azure/core-lro"; import { createHttpPoller } from "@azure/core-lro"; + +/** + * A simple poller that can be used to poll a long running operation. + */ +export interface SimplePollerLike, TResult> { + /** + * Returns true if the poller has finished polling. + */ + isDone(): boolean; + /** + * Returns the state of the operation. + */ + getOperationState(): TState; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult(): TResult | undefined; + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + */ + poll(options?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback: (state: TState) => void): CancelOnProgress; + + /** + * Returns a promise that could be used for serialized version of the poller's operation + * by invoking the operation's serialize method. + */ + serialize(): Promise; + + /** + * Wait the poller to be submitted. + */ + submitted(): Promise; + + /** + * Returns a string representation of the poller's operation. Similar to serialize but returns a string. + * @deprecated Use serialize() instead. + */ + toString(): string; + + /** + * Stops the poller from continuing to poll. Please note this will only stop the client-side polling + * @deprecated Use abortSignal to stop polling instead. + */ + stopPolling(): void; + + /** + * Returns true if the poller is stopped. + * @deprecated Use abortSignal status to track this instead. + */ + isStopped(): boolean; +} + /** * Helper function that builds a Poller object to help polling a long running operation. * @param client - Client to use for sending the request to get additional pages. @@ -22,21 +90,39 @@ export async function getLongRunningPoller( initialResponse: TResult, options: CreateHttpPollerOptions> = {}, ): Promise, TResult>> { - const poller: LongRunningOperation = { - requestMethod: initialResponse.request.method, - requestPath: initialResponse.request.url, + const abortController = new AbortController(); + const poller: RunningOperation = { sendInitialRequest: async () => { // In the case of Rest Clients we are building the LRO poller object from a response that's the reason // we are not triggering the initial request here, just extracting the information from the // response we were provided. return getLroResponse(initialResponse); }, - sendPollRequest: async (path) => { + sendPollRequest: async (path: string, pollOptions?: { abortSignal?: AbortSignalLike }) => { // This is the callback that is going to be called to poll the service // to get the latest status. We use the client provided and the polling path // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location // depending on the lro pattern that the service implements. If non is provided we default to the initial path. - const response = await client.pathUnchecked(path ?? initialResponse.request.url).get(); + function abortListener(): void { + abortController.abort(); + } + const inputAbortSignal = pollOptions?.abortSignal; + const abortSignal = abortController.signal; + if (inputAbortSignal?.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + response = await client + .pathUnchecked(path ?? initialResponse.request.url) + .get({ abortSignal }); + } finally { + inputAbortSignal?.removeEventListener("abort", abortListener); + } const lroResponse = getLroResponse(response as TResult); lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url; return lroResponse; @@ -44,7 +130,45 @@ export async function getLongRunningPoller( }; options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true; - return createHttpPoller(poller, options); + const httpPoller = createHttpPoller(poller, options); + const simplePoller: SimplePollerLike, TResult> = { + isDone() { + return httpPoller.isDone; + }, + isStopped() { + return abortController.signal.aborted; + }, + getOperationState() { + if (!httpPoller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return httpPoller.operationState; + }, + getResult() { + return httpPoller.result; + }, + toString() { + if (!httpPoller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return JSON.stringify({ + state: httpPoller.operationState, + }); + }, + stopPolling() { + abortController.abort(); + }, + onProgress: httpPoller.onProgress, + poll: httpPoller.poll, + pollUntilDone: httpPoller.pollUntilDone, + serialize: httpPoller.serialize, + submitted: httpPoller.submitted, + }; + return simplePoller; } /** @@ -52,7 +176,9 @@ export async function getLongRunningPoller( * @param response - a rest client http response * @returns - An LRO response that the LRO implementation understands */ -function getLroResponse(response: TResult): LroResponse { +function getLroResponse( + response: TResult, +): OperationResponse { if (Number.isNaN(response.status)) { throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`); } diff --git a/sdk/purview/purview-sharing-rest/src/purviewSharing.ts b/sdk/purview/purview-sharing-rest/src/purviewSharing.ts index 05fa482e5778..66fa2471581a 100644 --- a/sdk/purview/purview-sharing-rest/src/purviewSharing.ts +++ b/sdk/purview/purview-sharing-rest/src/purviewSharing.ts @@ -3,30 +3,29 @@ import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; +import { logger } from "./logger.js"; import type { TokenCredential } from "@azure/core-auth"; import type { PurviewSharingClient } from "./clientDefinitions.js"; +/** The optional parameters for the client */ +export interface PurviewSharingClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + /** * Initialize a new instance of `PurviewSharingClient` - * @param endpoint type: string, The sharing endpoint of your purview account. Example: https://{accountName}.purview.azure.com/share - * @param credentials type: TokenCredential, uniquely identify client credential - * @param options type: ClientOptions, the parameter for all optional parameters + * @param endpoint - The sharing endpoint of your purview account. Example: https://{accountName}.purview.azure.com/share + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters */ export default function createClient( endpoint: string, credentials: TokenCredential, - options: ClientOptions = {}, + { apiVersion = "2023-05-30-preview", ...options }: PurviewSharingClientOptions = {}, ): PurviewSharingClient { - const baseUrl = options.baseUrl ?? `${endpoint}`; - options.apiVersion = options.apiVersion ?? "2023-05-30-preview"; - options = { - ...options, - credentials: { - scopes: ["https://purview.azure.net/.default"], - }, - }; - - const userAgentInfo = `azsdk-js-purview-sharing-rest/1.0.0-beta.2`; + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}`; + const userAgentInfo = `azsdk-js-purview-sharing-rest/1.0.0-beta.3`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` @@ -36,9 +35,31 @@ export default function createClient( userAgentOptions: { userAgentPrefix, }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + credentials: { + scopes: ["https://purview.azure.net/.default"], + }, }; + const client = getClient(endpointUrl, credentials, options) as PurviewSharingClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } - const client = getClient(baseUrl, credentials, options) as PurviewSharingClient; + return next(req); + }, + }); return client; } diff --git a/sdk/purview/purview-sharing-rest/swagger/README.md b/sdk/purview/purview-sharing-rest/swagger/README.md index 514444b35faa..4f9338963fd7 100644 --- a/sdk/purview/purview-sharing-rest/swagger/README.md +++ b/sdk/purview/purview-sharing-rest/swagger/README.md @@ -5,6 +5,8 @@ ## Configuration ```yaml +flavor: azure +openapi-type: data-plane package-name: "@azure-rest/purview-sharing" title: Purview Sharing description: Purview Sharing Client @@ -12,7 +14,7 @@ license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../ source-code-folder-path: ./src input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/40a953243ea428918de6e63758e853b7a24aa59a/specification/purview/data-plane/Azure.Analytics.Purview.Share/preview/2023-05-30-preview/share.json -package-version: 1.0.0-beta.2 +package-version: 1.0.0-beta.3 rest-level-client: true add-credentials: true credential-scopes: "https://purview.azure.net/.default" From f301c0f778743cd287bed0ad6651d1c65f9c7298 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:29:17 +0800 Subject: [PATCH 34/55] [data-plane] refresh purview-workflow-rest (#31621) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- .../purview-workflow-rest/CHANGELOG.md | 9 +- .../purview-workflow-rest/package.json | 1 - .../review/purview-workflow.api.md | 32 ++-- .../purview-workflow-rest/src/logger.ts | 5 + .../src/paginateHelper.ts | 146 +++++++++++++++++- .../src/purviewWorkflow.ts | 49 ++++-- .../purview-workflow-rest/src/responses.ts | 5 - .../purview-workflow-rest/swagger/README.md | 4 +- 8 files changed, 204 insertions(+), 47 deletions(-) create mode 100644 sdk/purview/purview-workflow-rest/src/logger.ts diff --git a/sdk/purview/purview-workflow-rest/CHANGELOG.md b/sdk/purview/purview-workflow-rest/CHANGELOG.md index b1711ad0b109..22e50caeb9e5 100644 --- a/sdk/purview/purview-workflow-rest/CHANGELOG.md +++ b/sdk/purview/purview-workflow-rest/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2024-12-16) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- refresh @azure-rest/purview-workflow ## 1.0.0-beta.1 (2023-03-09) diff --git a/sdk/purview/purview-workflow-rest/package.json b/sdk/purview/purview-workflow-rest/package.json index fa880c571a47..d4b48c412b32 100644 --- a/sdk/purview/purview-workflow-rest/package.json +++ b/sdk/purview/purview-workflow-rest/package.json @@ -60,7 +60,6 @@ "dependencies": { "@azure-rest/core-client": "^2.3.1", "@azure/core-auth": "^1.9.0", - "@azure/core-paging": "^1.6.2", "@azure/core-rest-pipeline": "^1.18.0", "@azure/logger": "^1.1.4", "tslib": "^2.8.1" diff --git a/sdk/purview/purview-workflow-rest/review/purview-workflow.api.md b/sdk/purview/purview-workflow-rest/review/purview-workflow.api.md index 6e8611dd7ae2..aad43d313cb1 100644 --- a/sdk/purview/purview-workflow-rest/review/purview-workflow.api.md +++ b/sdk/purview/purview-workflow-rest/review/purview-workflow.api.md @@ -7,7 +7,6 @@ import type { Client } from '@azure-rest/core-client'; import type { ClientOptions } from '@azure-rest/core-client'; import type { HttpResponse } from '@azure-rest/core-client'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; import type { PathUncheckedResponse } from '@azure-rest/core-client'; import type { RequestParameters } from '@azure-rest/core-client'; import type { StreamableMethod } from '@azure-rest/core-client'; @@ -39,8 +38,6 @@ export interface ApproveApprovalTask { // @public export interface ApproveApprovalTask200Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "200"; } @@ -80,8 +77,6 @@ export interface CancelWorkflowRun { // @public export interface CancelWorkflowRun200Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "200"; } @@ -108,7 +103,7 @@ export interface CancelWorkflowRunMediaTypesParam { export type CancelWorkflowRunParameters = CancelWorkflowRunMediaTypesParam & CancelWorkflowRunBodyParam & RequestParameters; // @public -function createClient(endpoint: string, credentials: TokenCredential, options?: ClientOptions): PurviewWorkflowClient; +function createClient(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: PurviewWorkflowClientOptions): PurviewWorkflowClient; export default createClient; // @public @@ -174,7 +169,7 @@ export interface ErrorResponseOutput { export type GetArrayType = T extends Array ? TData : never; // @public -export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; @@ -406,6 +401,18 @@ export interface Operation { type: "CreateTerm" | "UpdateTerm" | "DeleteTerm" | "ImportTerms" | "UpdateAsset" | "GrantDataAccess"; } +// @public +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} + +// @public +export interface PageSettings { + continuationToken?: string; +} + // @public export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; @@ -426,6 +433,11 @@ export type PurviewWorkflowClient = Client & { path: Routes; }; +// @public +export interface PurviewWorkflowClientOptions extends ClientOptions { + apiVersion?: string; +} + // @public export interface ReassignCommand { reassignments?: Array; @@ -444,8 +456,6 @@ export interface ReassignWorkflowTask { // @public export interface ReassignWorkflowTask200Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "200"; } @@ -478,8 +488,6 @@ export interface RejectApprovalTask { // @public export interface RejectApprovalTask200Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "200"; } @@ -615,8 +623,6 @@ export interface UpdateTaskStatus { // @public export interface UpdateTaskStatus200Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "200"; } diff --git a/sdk/purview/purview-workflow-rest/src/logger.ts b/sdk/purview/purview-workflow-rest/src/logger.ts new file mode 100644 index 000000000000..be605aa34ebd --- /dev/null +++ b/sdk/purview/purview-workflow-rest/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("purview-workflow"); diff --git a/sdk/purview/purview-workflow-rest/src/paginateHelper.ts b/sdk/purview/purview-workflow-rest/src/paginateHelper.ts index 5d541b4e406d..9ea946d9d6c5 100644 --- a/sdk/purview/purview-workflow-rest/src/paginateHelper.ts +++ b/sdk/purview/purview-workflow-rest/src/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/purview/purview-workflow-rest/src/purviewWorkflow.ts b/sdk/purview/purview-workflow-rest/src/purviewWorkflow.ts index 6f5f16d9024d..1be22b70b081 100644 --- a/sdk/purview/purview-workflow-rest/src/purviewWorkflow.ts +++ b/sdk/purview/purview-workflow-rest/src/purviewWorkflow.ts @@ -3,29 +3,28 @@ import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; +import { logger } from "./logger.js"; import type { TokenCredential } from "@azure/core-auth"; import type { PurviewWorkflowClient } from "./clientDefinitions.js"; +/** The optional parameters for the client */ +export interface PurviewWorkflowClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + /** * Initialize a new instance of `PurviewWorkflowClient` - * @param endpoint type: string, The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/ - * @param credentials type: TokenCredential, uniquely identify client credential - * @param options type: ClientOptions, the parameter for all optional parameters + * @param endpoint - The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/ + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters */ export default function createClient( endpoint: string, credentials: TokenCredential, - options: ClientOptions = {}, + { apiVersion = "2022-05-01-preview", ...options }: PurviewWorkflowClientOptions = {}, ): PurviewWorkflowClient { - const baseUrl = options.baseUrl ?? `${endpoint}/workflow`; - options.apiVersion = options.apiVersion ?? "2022-05-01-preview"; - options = { - ...options, - credentials: { - scopes: ["https://purview.azure.net/.default"], - }, - }; - + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}/workflow`; const userAgentInfo = `azsdk-js-purview-workflow-rest/1.0.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix @@ -36,9 +35,31 @@ export default function createClient( userAgentOptions: { userAgentPrefix, }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + credentials: { + scopes: ["https://purview.azure.net/.default"], + }, }; + const client = getClient(endpointUrl, credentials, options) as PurviewWorkflowClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } - const client = getClient(baseUrl, credentials, options) as PurviewWorkflowClient; + return next(req); + }, + }); return client; } diff --git a/sdk/purview/purview-workflow-rest/src/responses.ts b/sdk/purview/purview-workflow-rest/src/responses.ts index 2e030575fffc..a69001a501f6 100644 --- a/sdk/purview/purview-workflow-rest/src/responses.ts +++ b/sdk/purview/purview-workflow-rest/src/responses.ts @@ -99,7 +99,6 @@ export interface GetWorkflowRunDefaultResponse extends HttpResponse { /** Cancel a workflow run. */ export interface CancelWorkflowRun200Response extends HttpResponse { status: "200"; - body: Record; } /** Cancel a workflow run. */ @@ -135,7 +134,6 @@ export interface GetWorkflowTaskDefaultResponse extends HttpResponse { /** Approve an approval task. */ export interface ApproveApprovalTask200Response extends HttpResponse { status: "200"; - body: Record; } /** Approve an approval task. */ @@ -147,7 +145,6 @@ export interface ApproveApprovalTaskDefaultResponse extends HttpResponse { /** Reject an approval task. */ export interface RejectApprovalTask200Response extends HttpResponse { status: "200"; - body: Record; } /** Reject an approval task. */ @@ -159,7 +156,6 @@ export interface RejectApprovalTaskDefaultResponse extends HttpResponse { /** Reassign a workflow task. */ export interface ReassignWorkflowTask200Response extends HttpResponse { status: "200"; - body: Record; } /** Reassign a workflow task. */ @@ -171,7 +167,6 @@ export interface ReassignWorkflowTaskDefaultResponse extends HttpResponse { /** Update the status of a workflow task request. */ export interface UpdateTaskStatus200Response extends HttpResponse { status: "200"; - body: Record; } /** Update the status of a workflow task request. */ diff --git a/sdk/purview/purview-workflow-rest/swagger/README.md b/sdk/purview/purview-workflow-rest/swagger/README.md index e1be191b8877..9b25999de83b 100644 --- a/sdk/purview/purview-workflow-rest/swagger/README.md +++ b/sdk/purview/purview-workflow-rest/swagger/README.md @@ -5,6 +5,8 @@ ## Configuration ```yaml +flavor: azure +openapi-type: data-plane package-name: "@azure-rest/purview-workflow" title: Purview Workflow description: Purview Workflow Client @@ -20,5 +22,5 @@ rest-level-client: true add-credentials: true credential-scopes: "https://purview.azure.net/.default" use-extension: - "@autorest/typescript": "6.0.0-rc.8" + "@autorest/typescript": "latest" ``` From c1bde464b23017579174cf96f27899767694fc14 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:30:49 +0800 Subject: [PATCH 35/55] [data-plane] refresh synapse-access-control-rest (#31636) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- .../synapse-access-control-rest/package.json | 2 +- .../review/synapse-access-control.api.md | 118 +++++++------- .../src/accessControlRestClient.ts | 49 ++++-- .../src/clientDefinitions.ts | 32 ++-- .../src/isUnexpected.ts | 149 ++++++++++-------- .../synapse-access-control-rest/src/logger.ts | 5 + .../synapse-access-control-rest/src/models.ts | 4 + .../src/outputModels.ts | 23 ++- .../src/paginateHelper.ts | 146 ++++++++++++++++- .../src/parameters.ts | 2 +- .../src/responses.ts | 18 +-- .../swagger/README.md | 2 + 12 files changed, 376 insertions(+), 174 deletions(-) create mode 100644 sdk/synapse/synapse-access-control-rest/src/logger.ts diff --git a/sdk/synapse/synapse-access-control-rest/package.json b/sdk/synapse/synapse-access-control-rest/package.json index 973b70c5b66b..3026521f6b63 100644 --- a/sdk/synapse/synapse-access-control-rest/package.json +++ b/sdk/synapse/synapse-access-control-rest/package.json @@ -9,7 +9,6 @@ "dependencies": { "@azure-rest/core-client": "^2.3.1", "@azure/core-auth": "^1.9.0", - "@azure/core-paging": "^1.6.2", "@azure/core-rest-pipeline": "^1.18.0", "tslib": "^2.8.1" }, @@ -38,6 +37,7 @@ "module": "./dist/esm/index.js", "types": "./dist/commonjs/index.d.ts", "devDependencies": { + "@azure/logger": "^1.0.0", "@azure-tools/test-credential": "^2.0.0", "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", diff --git a/sdk/synapse/synapse-access-control-rest/review/synapse-access-control.api.md b/sdk/synapse/synapse-access-control-rest/review/synapse-access-control.api.md index 690e64f72c3d..1933dd4d539e 100644 --- a/sdk/synapse/synapse-access-control-rest/review/synapse-access-control.api.md +++ b/sdk/synapse/synapse-access-control-rest/review/synapse-access-control.api.md @@ -7,7 +7,6 @@ import type { Client } from '@azure-rest/core-client'; import type { ClientOptions } from '@azure-rest/core-client'; import type { HttpResponse } from '@azure-rest/core-client'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; import type { PathUncheckedResponse } from '@azure-rest/core-client'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; @@ -20,81 +19,98 @@ export type AccessControlRestClient = Client & { path: Routes; }; -// @public (undocumented) +// @public +export interface AccessControlRestClientOptions extends ClientOptions { + apiVersion?: string; +} + +// @public export interface CheckAccessDecisionOutput { accessDecision?: string; actionId?: string; roleAssignment?: RoleAssignmentDetailsOutput; } -// @public (undocumented) +// @public export interface CheckPrincipalAccessRequest { actions: Array; scope: string; subject: SubjectInfo; } -// @public (undocumented) +// @public export interface CheckPrincipalAccessResponseOutput { AccessDecisions?: Array; } -// @public (undocumented) -function createClient(endpoint: string, credentials: TokenCredential, options?: ClientOptions): AccessControlRestClient; +// @public +function createClient(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: AccessControlRestClientOptions): AccessControlRestClient; export default createClient; -// @public (undocumented) +// @public export interface ErrorAdditionalInfoOutput { - info?: Record; - type?: string; + readonly info?: Record; + readonly type?: string; } -// @public (undocumented) +// @public export interface ErrorContractOutput { error?: ErrorResponseOutput; } -// @public (undocumented) +// @public export interface ErrorResponseOutput { - additionalInfo?: Array; - code?: string; - details?: Array; - message?: string; - target?: string; + readonly additionalInfo?: Array; + readonly code?: string; + readonly details?: Array; + readonly message?: string; + readonly target?: string; } // @public export type GetArrayType = T extends Array ? TData : never; // @public -export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; // @public (undocumented) -export function isUnexpected(response: RoleAssignmentsCheckPrincipalAccess200Response | RoleAssignmentsCheckPrincipalAccessdefaultResponse): response is RoleAssignmentsCheckPrincipalAccessdefaultResponse; +export function isUnexpected(response: RoleAssignmentsCheckPrincipalAccess200Response | RoleAssignmentsCheckPrincipalAccessDefaultResponse): response is RoleAssignmentsCheckPrincipalAccessDefaultResponse; // @public (undocumented) -export function isUnexpected(response: RoleAssignmentsListRoleAssignments200Response | RoleAssignmentsListRoleAssignmentsdefaultResponse): response is RoleAssignmentsListRoleAssignmentsdefaultResponse; +export function isUnexpected(response: RoleAssignmentsListRoleAssignments200Response | RoleAssignmentsListRoleAssignmentsDefaultResponse): response is RoleAssignmentsListRoleAssignmentsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: RoleAssignmentsCreateRoleAssignment200Response | RoleAssignmentsCreateRoleAssignmentdefaultResponse): response is RoleAssignmentsCreateRoleAssignmentdefaultResponse; +export function isUnexpected(response: RoleAssignmentsCreateRoleAssignment200Response | RoleAssignmentsCreateRoleAssignmentDefaultResponse): response is RoleAssignmentsCreateRoleAssignmentDefaultResponse; // @public (undocumented) -export function isUnexpected(response: RoleAssignmentsGetRoleAssignmentById200Response | RoleAssignmentsGetRoleAssignmentByIddefaultResponse): response is RoleAssignmentsGetRoleAssignmentByIddefaultResponse; +export function isUnexpected(response: RoleAssignmentsGetRoleAssignmentById200Response | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse): response is RoleAssignmentsGetRoleAssignmentByIdDefaultResponse; // @public (undocumented) -export function isUnexpected(response: RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse): response is RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse; +export function isUnexpected(response: RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse): response is RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse; // @public (undocumented) -export function isUnexpected(response: RoleDefinitionsListRoleDefinitions200Response | RoleDefinitionsListRoleDefinitionsdefaultResponse): response is RoleDefinitionsListRoleDefinitionsdefaultResponse; +export function isUnexpected(response: RoleDefinitionsListRoleDefinitions200Response | RoleDefinitionsListRoleDefinitionsDefaultResponse): response is RoleDefinitionsListRoleDefinitionsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: RoleDefinitionsGetRoleDefinitionById200Response | RoleDefinitionsGetRoleDefinitionByIddefaultResponse): response is RoleDefinitionsGetRoleDefinitionByIddefaultResponse; +export function isUnexpected(response: RoleDefinitionsGetRoleDefinitionById200Response | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse): response is RoleDefinitionsGetRoleDefinitionByIdDefaultResponse; // @public (undocumented) -export function isUnexpected(response: RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesdefaultResponse): response is RoleDefinitionsListScopesdefaultResponse; +export function isUnexpected(response: RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesDefaultResponse): response is RoleDefinitionsListScopesDefaultResponse; + +// @public +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} + +// @public +export interface PageSettings { + continuationToken?: string; +} // @public export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; @@ -111,19 +127,19 @@ export interface PagingOptions { customGetPage?: GetPage[]>; } -// @public (undocumented) +// @public export interface RequiredAction { id: string; isDataAction: boolean; } -// @public (undocumented) +// @public export interface RoleAssignmentDetailsListOutput { count?: number; value?: Array; } -// @public (undocumented) +// @public export interface RoleAssignmentDetailsOutput { id?: string; principalId?: string; @@ -132,7 +148,7 @@ export interface RoleAssignmentDetailsOutput { scope?: string; } -// @public (undocumented) +// @public export interface RoleAssignmentRequest { principalId: string; principalType?: string; @@ -142,7 +158,7 @@ export interface RoleAssignmentRequest { // @public (undocumented) export interface RoleAssignmentsCheckPrincipalAccess { - post(options: RoleAssignmentsCheckPrincipalAccessParameters): StreamableMethod; + post(options: RoleAssignmentsCheckPrincipalAccessParameters): StreamableMethod; } // @public @@ -159,7 +175,7 @@ export interface RoleAssignmentsCheckPrincipalAccessBodyParam { } // @public -export interface RoleAssignmentsCheckPrincipalAccessdefaultResponse extends HttpResponse { +export interface RoleAssignmentsCheckPrincipalAccessDefaultResponse extends HttpResponse { // (undocumented) body: ErrorContractOutput; // (undocumented) @@ -176,9 +192,9 @@ export type RoleAssignmentsCheckPrincipalAccessParameters = RoleAssignmentsCheck // @public (undocumented) export interface RoleAssignmentsCreateRoleAssignment { - delete(options?: RoleAssignmentsDeleteRoleAssignmentByIdParameters): StreamableMethod; - get(options?: RoleAssignmentsGetRoleAssignmentByIdParameters): StreamableMethod; - put(options: RoleAssignmentsCreateRoleAssignmentParameters): StreamableMethod; + delete(options?: RoleAssignmentsDeleteRoleAssignmentByIdParameters): StreamableMethod; + get(options?: RoleAssignmentsGetRoleAssignmentByIdParameters): StreamableMethod; + put(options: RoleAssignmentsCreateRoleAssignmentParameters): StreamableMethod; } // @public @@ -195,7 +211,7 @@ export interface RoleAssignmentsCreateRoleAssignmentBodyParam { } // @public -export interface RoleAssignmentsCreateRoleAssignmentdefaultResponse extends HttpResponse { +export interface RoleAssignmentsCreateRoleAssignmentDefaultResponse extends HttpResponse { // (undocumented) body: ErrorContractOutput; // (undocumented) @@ -212,22 +228,18 @@ export type RoleAssignmentsCreateRoleAssignmentParameters = RoleAssignmentsCreat // @public export interface RoleAssignmentsDeleteRoleAssignmentById200Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "200"; } // @public export interface RoleAssignmentsDeleteRoleAssignmentById204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } // @public -export interface RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse extends HttpResponse { +export interface RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse extends HttpResponse { // (undocumented) body: ErrorContractOutput; // (undocumented) @@ -257,7 +269,7 @@ export interface RoleAssignmentsGetRoleAssignmentById200Response extends HttpRes } // @public -export interface RoleAssignmentsGetRoleAssignmentByIddefaultResponse extends HttpResponse { +export interface RoleAssignmentsGetRoleAssignmentByIdDefaultResponse extends HttpResponse { // (undocumented) body: ErrorContractOutput; // (undocumented) @@ -269,7 +281,7 @@ export type RoleAssignmentsGetRoleAssignmentByIdParameters = RequestParameters; // @public (undocumented) export interface RoleAssignmentsListRoleAssignments { - get(options?: RoleAssignmentsListRoleAssignmentsParameters): StreamableMethod; + get(options?: RoleAssignmentsListRoleAssignmentsParameters): StreamableMethod; } // @public (undocumented) @@ -288,7 +300,7 @@ export interface RoleAssignmentsListRoleAssignments200Response extends HttpRespo } // @public -export interface RoleAssignmentsListRoleAssignmentsdefaultResponse extends HttpResponse { +export interface RoleAssignmentsListRoleAssignmentsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorContractOutput; // (undocumented) @@ -298,7 +310,7 @@ export interface RoleAssignmentsListRoleAssignmentsdefaultResponse extends HttpR // @public (undocumented) export interface RoleAssignmentsListRoleAssignmentsHeaderParam { // (undocumented) - headers: RawHttpHeadersInput & RoleAssignmentsListRoleAssignmentsHeaders; + headers?: RawHttpHeadersInput & RoleAssignmentsListRoleAssignmentsHeaders; } // @public (undocumented) @@ -324,7 +336,7 @@ export interface RoleAssignmentsListRoleAssignmentsQueryParamProperties { // @public (undocumented) export interface RoleDefinitionsGetRoleDefinitionById { - get(options?: RoleDefinitionsGetRoleDefinitionByIdParameters): StreamableMethod; + get(options?: RoleDefinitionsGetRoleDefinitionByIdParameters): StreamableMethod; } // @public @@ -336,7 +348,7 @@ export interface RoleDefinitionsGetRoleDefinitionById200Response extends HttpRes } // @public -export interface RoleDefinitionsGetRoleDefinitionByIddefaultResponse extends HttpResponse { +export interface RoleDefinitionsGetRoleDefinitionByIdDefaultResponse extends HttpResponse { // (undocumented) body: ErrorContractOutput; // (undocumented) @@ -348,7 +360,7 @@ export type RoleDefinitionsGetRoleDefinitionByIdParameters = RequestParameters; // @public (undocumented) export interface RoleDefinitionsListRoleDefinitions { - get(options?: RoleDefinitionsListRoleDefinitionsParameters): StreamableMethod; + get(options?: RoleDefinitionsListRoleDefinitionsParameters): StreamableMethod; } // @public @@ -360,7 +372,7 @@ export interface RoleDefinitionsListRoleDefinitions200Response extends HttpRespo } // @public -export interface RoleDefinitionsListRoleDefinitionsdefaultResponse extends HttpResponse { +export interface RoleDefinitionsListRoleDefinitionsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorContractOutput; // (undocumented) @@ -384,7 +396,7 @@ export interface RoleDefinitionsListRoleDefinitionsQueryParamProperties { // @public (undocumented) export interface RoleDefinitionsListScopes { - get(options?: RoleDefinitionsListScopesParameters): StreamableMethod; + get(options?: RoleDefinitionsListScopesParameters): StreamableMethod; } // @public @@ -396,7 +408,7 @@ export interface RoleDefinitionsListScopes200Response extends HttpResponse { } // @public -export interface RoleDefinitionsListScopesdefaultResponse extends HttpResponse { +export interface RoleDefinitionsListScopesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorContractOutput; // (undocumented) @@ -416,13 +428,13 @@ export interface Routes { (path: "/rbacScopes"): RoleDefinitionsListScopes; } -// @public (undocumented) +// @public export interface SubjectInfo { groupIds?: Array; principalId: string; } -// @public (undocumented) +// @public export interface SynapseRbacPermissionOutput { actions?: Array; dataActions?: Array; @@ -430,7 +442,7 @@ export interface SynapseRbacPermissionOutput { notDataActions?: Array; } -// @public (undocumented) +// @public export interface SynapseRoleDefinitionOutput { availabilityStatus?: string; description?: string; diff --git a/sdk/synapse/synapse-access-control-rest/src/accessControlRestClient.ts b/sdk/synapse/synapse-access-control-rest/src/accessControlRestClient.ts index f8fa6dd1a298..37282528d509 100644 --- a/sdk/synapse/synapse-access-control-rest/src/accessControlRestClient.ts +++ b/sdk/synapse/synapse-access-control-rest/src/accessControlRestClient.ts @@ -3,23 +3,28 @@ import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; +import { logger } from "./logger.js"; import type { TokenCredential } from "@azure/core-auth"; import type { AccessControlRestClient } from "./clientDefinitions.js"; +/** The optional parameters for the client */ +export interface AccessControlRestClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + +/** + * Initialize a new instance of `AccessControlRestClient` + * @param endpoint - The workspace development endpoint, for example `https://myworkspace.dev.azuresynapse.net`. + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters + */ export default function createClient( endpoint: string, credentials: TokenCredential, - options: ClientOptions = {}, + { apiVersion = "2020-12-01", ...options }: AccessControlRestClientOptions = {}, ): AccessControlRestClient { - const baseUrl = options.baseUrl ?? `${endpoint}`; - options.apiVersion = options.apiVersion ?? "2020-12-01"; - options = { - ...options, - credentials: { - scopes: ["https://dev.azuresynapse.net/.default"], - }, - }; - + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}`; const userAgentInfo = `azsdk-js-synapse-access-control-rest/1.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix @@ -30,9 +35,31 @@ export default function createClient( userAgentOptions: { userAgentPrefix, }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + credentials: { + scopes: options.credentials?.scopes ?? ["https://dev.azuresynapse.net/.default"], + }, }; + const client = getClient(endpointUrl, credentials, options) as AccessControlRestClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } - const client = getClient(baseUrl, credentials, options) as AccessControlRestClient; + return next(req); + }, + }); return client; } diff --git a/sdk/synapse/synapse-access-control-rest/src/clientDefinitions.ts b/sdk/synapse/synapse-access-control-rest/src/clientDefinitions.ts index 38f1a15c0cc1..e985ef7d4be6 100644 --- a/sdk/synapse/synapse-access-control-rest/src/clientDefinitions.ts +++ b/sdk/synapse/synapse-access-control-rest/src/clientDefinitions.ts @@ -13,22 +13,22 @@ import type { } from "./parameters.js"; import type { RoleAssignmentsCheckPrincipalAccess200Response, - RoleAssignmentsCheckPrincipalAccessdefaultResponse, + RoleAssignmentsCheckPrincipalAccessDefaultResponse, RoleAssignmentsListRoleAssignments200Response, - RoleAssignmentsListRoleAssignmentsdefaultResponse, + RoleAssignmentsListRoleAssignmentsDefaultResponse, RoleAssignmentsCreateRoleAssignment200Response, - RoleAssignmentsCreateRoleAssignmentdefaultResponse, + RoleAssignmentsCreateRoleAssignmentDefaultResponse, RoleAssignmentsGetRoleAssignmentById200Response, - RoleAssignmentsGetRoleAssignmentByIddefaultResponse, + RoleAssignmentsGetRoleAssignmentByIdDefaultResponse, RoleAssignmentsDeleteRoleAssignmentById200Response, RoleAssignmentsDeleteRoleAssignmentById204Response, - RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse, + RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse, RoleDefinitionsListRoleDefinitions200Response, - RoleDefinitionsListRoleDefinitionsdefaultResponse, + RoleDefinitionsListRoleDefinitionsDefaultResponse, RoleDefinitionsGetRoleDefinitionById200Response, - RoleDefinitionsGetRoleDefinitionByIddefaultResponse, + RoleDefinitionsGetRoleDefinitionByIdDefaultResponse, RoleDefinitionsListScopes200Response, - RoleDefinitionsListScopesdefaultResponse, + RoleDefinitionsListScopesDefaultResponse, } from "./responses.js"; import type { Client, StreamableMethod } from "@azure-rest/core-client"; @@ -38,7 +38,7 @@ export interface RoleAssignmentsCheckPrincipalAccess { options: RoleAssignmentsCheckPrincipalAccessParameters, ): StreamableMethod< | RoleAssignmentsCheckPrincipalAccess200Response - | RoleAssignmentsCheckPrincipalAccessdefaultResponse + | RoleAssignmentsCheckPrincipalAccessDefaultResponse >; } @@ -48,7 +48,7 @@ export interface RoleAssignmentsListRoleAssignments { options?: RoleAssignmentsListRoleAssignmentsParameters, ): StreamableMethod< | RoleAssignmentsListRoleAssignments200Response - | RoleAssignmentsListRoleAssignmentsdefaultResponse + | RoleAssignmentsListRoleAssignmentsDefaultResponse >; } @@ -58,14 +58,14 @@ export interface RoleAssignmentsCreateRoleAssignment { options: RoleAssignmentsCreateRoleAssignmentParameters, ): StreamableMethod< | RoleAssignmentsCreateRoleAssignment200Response - | RoleAssignmentsCreateRoleAssignmentdefaultResponse + | RoleAssignmentsCreateRoleAssignmentDefaultResponse >; /** Get role assignment by role assignment Id. */ get( options?: RoleAssignmentsGetRoleAssignmentByIdParameters, ): StreamableMethod< | RoleAssignmentsGetRoleAssignmentById200Response - | RoleAssignmentsGetRoleAssignmentByIddefaultResponse + | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse >; /** Delete role assignment by role assignment Id. */ delete( @@ -73,7 +73,7 @@ export interface RoleAssignmentsCreateRoleAssignment { ): StreamableMethod< | RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response - | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse + | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse >; } @@ -83,7 +83,7 @@ export interface RoleDefinitionsListRoleDefinitions { options?: RoleDefinitionsListRoleDefinitionsParameters, ): StreamableMethod< | RoleDefinitionsListRoleDefinitions200Response - | RoleDefinitionsListRoleDefinitionsdefaultResponse + | RoleDefinitionsListRoleDefinitionsDefaultResponse >; } @@ -93,7 +93,7 @@ export interface RoleDefinitionsGetRoleDefinitionById { options?: RoleDefinitionsGetRoleDefinitionByIdParameters, ): StreamableMethod< | RoleDefinitionsGetRoleDefinitionById200Response - | RoleDefinitionsGetRoleDefinitionByIddefaultResponse + | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse >; } @@ -102,7 +102,7 @@ export interface RoleDefinitionsListScopes { get( options?: RoleDefinitionsListScopesParameters, ): StreamableMethod< - RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesdefaultResponse + RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesDefaultResponse >; } diff --git a/sdk/synapse/synapse-access-control-rest/src/isUnexpected.ts b/sdk/synapse/synapse-access-control-rest/src/isUnexpected.ts index 66f2af8faba0..7ee00ecd446a 100644 --- a/sdk/synapse/synapse-access-control-rest/src/isUnexpected.ts +++ b/sdk/synapse/synapse-access-control-rest/src/isUnexpected.ts @@ -3,22 +3,22 @@ import type { RoleAssignmentsCheckPrincipalAccess200Response, - RoleAssignmentsCheckPrincipalAccessdefaultResponse, + RoleAssignmentsCheckPrincipalAccessDefaultResponse, RoleAssignmentsListRoleAssignments200Response, - RoleAssignmentsListRoleAssignmentsdefaultResponse, + RoleAssignmentsListRoleAssignmentsDefaultResponse, RoleAssignmentsCreateRoleAssignment200Response, - RoleAssignmentsCreateRoleAssignmentdefaultResponse, + RoleAssignmentsCreateRoleAssignmentDefaultResponse, RoleAssignmentsGetRoleAssignmentById200Response, - RoleAssignmentsGetRoleAssignmentByIddefaultResponse, + RoleAssignmentsGetRoleAssignmentByIdDefaultResponse, RoleAssignmentsDeleteRoleAssignmentById200Response, RoleAssignmentsDeleteRoleAssignmentById204Response, - RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse, + RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse, RoleDefinitionsListRoleDefinitions200Response, - RoleDefinitionsListRoleDefinitionsdefaultResponse, + RoleDefinitionsListRoleDefinitionsDefaultResponse, RoleDefinitionsGetRoleDefinitionById200Response, - RoleDefinitionsGetRoleDefinitionByIddefaultResponse, + RoleDefinitionsGetRoleDefinitionByIdDefaultResponse, RoleDefinitionsListScopes200Response, - RoleDefinitionsListScopesdefaultResponse, + RoleDefinitionsListScopesDefaultResponse, } from "./responses.js"; const responseMap: Record = { @@ -35,128 +35,139 @@ const responseMap: Record = { export function isUnexpected( response: | RoleAssignmentsCheckPrincipalAccess200Response - | RoleAssignmentsCheckPrincipalAccessdefaultResponse, -): response is RoleAssignmentsCheckPrincipalAccessdefaultResponse; + | RoleAssignmentsCheckPrincipalAccessDefaultResponse, +): response is RoleAssignmentsCheckPrincipalAccessDefaultResponse; export function isUnexpected( response: | RoleAssignmentsListRoleAssignments200Response - | RoleAssignmentsListRoleAssignmentsdefaultResponse, -): response is RoleAssignmentsListRoleAssignmentsdefaultResponse; + | RoleAssignmentsListRoleAssignmentsDefaultResponse, +): response is RoleAssignmentsListRoleAssignmentsDefaultResponse; export function isUnexpected( response: | RoleAssignmentsCreateRoleAssignment200Response - | RoleAssignmentsCreateRoleAssignmentdefaultResponse, -): response is RoleAssignmentsCreateRoleAssignmentdefaultResponse; + | RoleAssignmentsCreateRoleAssignmentDefaultResponse, +): response is RoleAssignmentsCreateRoleAssignmentDefaultResponse; export function isUnexpected( response: | RoleAssignmentsGetRoleAssignmentById200Response - | RoleAssignmentsGetRoleAssignmentByIddefaultResponse, -): response is RoleAssignmentsGetRoleAssignmentByIddefaultResponse; + | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse, +): response is RoleAssignmentsGetRoleAssignmentByIdDefaultResponse; export function isUnexpected( response: | RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response - | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse, -): response is RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse; + | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse, +): response is RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse; export function isUnexpected( response: | RoleDefinitionsListRoleDefinitions200Response - | RoleDefinitionsListRoleDefinitionsdefaultResponse, -): response is RoleDefinitionsListRoleDefinitionsdefaultResponse; + | RoleDefinitionsListRoleDefinitionsDefaultResponse, +): response is RoleDefinitionsListRoleDefinitionsDefaultResponse; export function isUnexpected( response: | RoleDefinitionsGetRoleDefinitionById200Response - | RoleDefinitionsGetRoleDefinitionByIddefaultResponse, -): response is RoleDefinitionsGetRoleDefinitionByIddefaultResponse; + | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse, +): response is RoleDefinitionsGetRoleDefinitionByIdDefaultResponse; export function isUnexpected( - response: RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesdefaultResponse, -): response is RoleDefinitionsListScopesdefaultResponse; + response: RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesDefaultResponse, +): response is RoleDefinitionsListScopesDefaultResponse; export function isUnexpected( response: | RoleAssignmentsCheckPrincipalAccess200Response - | RoleAssignmentsCheckPrincipalAccessdefaultResponse + | RoleAssignmentsCheckPrincipalAccessDefaultResponse | RoleAssignmentsListRoleAssignments200Response - | RoleAssignmentsListRoleAssignmentsdefaultResponse + | RoleAssignmentsListRoleAssignmentsDefaultResponse | RoleAssignmentsCreateRoleAssignment200Response - | RoleAssignmentsCreateRoleAssignmentdefaultResponse + | RoleAssignmentsCreateRoleAssignmentDefaultResponse | RoleAssignmentsGetRoleAssignmentById200Response - | RoleAssignmentsGetRoleAssignmentByIddefaultResponse + | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse | RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response - | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse + | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse | RoleDefinitionsListRoleDefinitions200Response - | RoleDefinitionsListRoleDefinitionsdefaultResponse + | RoleDefinitionsListRoleDefinitionsDefaultResponse | RoleDefinitionsGetRoleDefinitionById200Response - | RoleDefinitionsGetRoleDefinitionByIddefaultResponse + | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse | RoleDefinitionsListScopes200Response - | RoleDefinitionsListScopesdefaultResponse, + | RoleDefinitionsListScopesDefaultResponse, ): response is - | RoleAssignmentsCheckPrincipalAccessdefaultResponse - | RoleAssignmentsListRoleAssignmentsdefaultResponse - | RoleAssignmentsCreateRoleAssignmentdefaultResponse - | RoleAssignmentsGetRoleAssignmentByIddefaultResponse - | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse - | RoleDefinitionsListRoleDefinitionsdefaultResponse - | RoleDefinitionsGetRoleDefinitionByIddefaultResponse - | RoleDefinitionsListScopesdefaultResponse { + | RoleAssignmentsCheckPrincipalAccessDefaultResponse + | RoleAssignmentsListRoleAssignmentsDefaultResponse + | RoleAssignmentsCreateRoleAssignmentDefaultResponse + | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse + | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse + | RoleDefinitionsListRoleDefinitionsDefaultResponse + | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse + | RoleDefinitionsListScopesDefaultResponse { const lroOriginal = response.headers["x-ms-original-url"]; const url = new URL(lroOriginal ?? response.request.url); const method = response.request.method; let pathDetails = responseMap[`${method} ${url.pathname}`]; if (!pathDetails) { - pathDetails = geParametrizedPathSuccess(url.pathname); + pathDetails = getParametrizedPathSuccess(method, url.pathname); } return !pathDetails.includes(response.status); } -function geParametrizedPathSuccess(path: string): string[] { +function getParametrizedPathSuccess(method: string, path: string): string[] { const pathParts = path.split("/"); + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + // Iterate the responseMap to find a match for (const [key, value] of Object.entries(responseMap)) { // Extracting the path from the map key which is in format // GET /path/foo + if (!key.startsWith(method)) { + continue; + } const candidatePath = getPathFromMapKey(key); // Get each part of the url path const candidateParts = candidatePath.split("/"); - // If the candidate and actual paths don't match in size - // we move on to the next candidate path - if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) { - // track if we have found a match to return the values found. - let found = true; - for (let i = 0; i < candidateParts.length; i++) { - if (candidateParts[i].startsWith("{") && candidateParts[i].endsWith("}")) { - // If the current part of the candidate is a "template" part - // it is a match with the actual path part on hand - // skip as the parameterized part can match anything - continue; - } + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); - // If the candidate part is not a template and - // the parts don't match mark the candidate as not found - // to move on with the next candidate path. - if (candidateParts[i] !== pathParts[i]) { + if (!isMatched) { found = false; break; } + continue; } - // We finished evaluating the current candidate parts - // if all parts matched we return the success values form - // the path mapping. - if (found) { - return value; + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; } } - } - // No match was found, return an empty array. - return []; -} + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } -function hasParametrizedPath(path: string): boolean { - return path.includes("/{"); + return matchedValue; } function getPathFromMapKey(mapKey: string): string { diff --git a/sdk/synapse/synapse-access-control-rest/src/logger.ts b/sdk/synapse/synapse-access-control-rest/src/logger.ts new file mode 100644 index 000000000000..5c572f53d29d --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("synapse-access-control"); diff --git a/sdk/synapse/synapse-access-control-rest/src/models.ts b/sdk/synapse/synapse-access-control-rest/src/models.ts index 45913da2f0ad..a4c5f4c77803 100644 --- a/sdk/synapse/synapse-access-control-rest/src/models.ts +++ b/sdk/synapse/synapse-access-control-rest/src/models.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +/** Check access request details */ export interface CheckPrincipalAccessRequest { /** Subject details */ subject: SubjectInfo; @@ -10,6 +11,7 @@ export interface CheckPrincipalAccessRequest { scope: string; } +/** Subject details */ export interface SubjectInfo { /** * Principal Id @@ -21,6 +23,7 @@ export interface SubjectInfo { groupIds?: Array; } +/** Action Info */ export interface RequiredAction { /** Action Id. */ id: string; @@ -28,6 +31,7 @@ export interface RequiredAction { isDataAction: boolean; } +/** Role Assignment request details */ export interface RoleAssignmentRequest { /** * Role ID of the Synapse Built-In Role diff --git a/sdk/synapse/synapse-access-control-rest/src/outputModels.ts b/sdk/synapse/synapse-access-control-rest/src/outputModels.ts index 9487b94ed1f7..954a7e97a5e0 100644 --- a/sdk/synapse/synapse-access-control-rest/src/outputModels.ts +++ b/sdk/synapse/synapse-access-control-rest/src/outputModels.ts @@ -1,11 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +/** Check access response details */ export interface CheckPrincipalAccessResponseOutput { /** To check if the current user, group, or service principal has permission to read artifacts in the specified workspace. */ AccessDecisions?: Array; } +/** Check access response details */ export interface CheckAccessDecisionOutput { /** Access Decision. */ accessDecision?: string; @@ -15,6 +17,7 @@ export interface CheckAccessDecisionOutput { roleAssignment?: RoleAssignmentDetailsOutput; } +/** Role Assignment response details */ export interface RoleAssignmentDetailsOutput { /** Role Assignment ID */ id?: string; @@ -36,31 +39,35 @@ export interface RoleAssignmentDetailsOutput { principalType?: string; } +/** Contains details when the response code indicates an error. */ export interface ErrorContractOutput { /** The error details. */ error?: ErrorResponseOutput; } +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */ export interface ErrorResponseOutput { /** The error code. */ - code?: string; + readonly code?: string; /** The error message. */ - message?: string; + readonly message?: string; /** The error target. */ - target?: string; + readonly target?: string; /** The error details. */ - details?: Array; + readonly details?: Array; /** The error additional info. */ - additionalInfo?: Array; + readonly additionalInfo?: Array; } +/** The resource management error additional info. */ export interface ErrorAdditionalInfoOutput { /** The additional info type. */ - type?: string; + readonly type?: string; /** The additional info. */ - info?: Record; + readonly info?: Record; } +/** Role Assignment response details */ export interface RoleAssignmentDetailsListOutput { /** Number of role assignments */ count?: number; @@ -68,6 +75,7 @@ export interface RoleAssignmentDetailsListOutput { value?: Array; } +/** Synapse role definition details */ export interface SynapseRoleDefinitionOutput { /** * Role Definition ID @@ -89,6 +97,7 @@ export interface SynapseRoleDefinitionOutput { availabilityStatus?: string; } +/** Synapse role definition details */ export interface SynapseRbacPermissionOutput { /** List of actions */ actions?: Array; diff --git a/sdk/synapse/synapse-access-control-rest/src/paginateHelper.ts b/sdk/synapse/synapse-access-control-rest/src/paginateHelper.ts index 5d541b4e406d..9ea946d9d6c5 100644 --- a/sdk/synapse/synapse-access-control-rest/src/paginateHelper.ts +++ b/sdk/synapse/synapse-access-control-rest/src/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/synapse/synapse-access-control-rest/src/parameters.ts b/sdk/synapse/synapse-access-control-rest/src/parameters.ts index 7f30b1cadc57..9adf277b7364 100644 --- a/sdk/synapse/synapse-access-control-rest/src/parameters.ts +++ b/sdk/synapse/synapse-access-control-rest/src/parameters.ts @@ -39,7 +39,7 @@ export interface RoleAssignmentsListRoleAssignmentsQueryParam { } export interface RoleAssignmentsListRoleAssignmentsHeaderParam { - headers: RawHttpHeadersInput & RoleAssignmentsListRoleAssignmentsHeaders; + headers?: RawHttpHeadersInput & RoleAssignmentsListRoleAssignmentsHeaders; } export type RoleAssignmentsListRoleAssignmentsParameters = diff --git a/sdk/synapse/synapse-access-control-rest/src/responses.ts b/sdk/synapse/synapse-access-control-rest/src/responses.ts index f680b135933d..f206577d545f 100644 --- a/sdk/synapse/synapse-access-control-rest/src/responses.ts +++ b/sdk/synapse/synapse-access-control-rest/src/responses.ts @@ -18,7 +18,7 @@ export interface RoleAssignmentsCheckPrincipalAccess200Response extends HttpResp } /** Check if the given principalId has access to perform list of actions at a given scope. */ -export interface RoleAssignmentsCheckPrincipalAccessdefaultResponse extends HttpResponse { +export interface RoleAssignmentsCheckPrincipalAccessDefaultResponse extends HttpResponse { status: string; body: ErrorContractOutput; } @@ -36,7 +36,7 @@ export interface RoleAssignmentsListRoleAssignments200Response extends HttpRespo } /** List role assignments. */ -export interface RoleAssignmentsListRoleAssignmentsdefaultResponse extends HttpResponse { +export interface RoleAssignmentsListRoleAssignmentsDefaultResponse extends HttpResponse { status: string; body: ErrorContractOutput; } @@ -48,7 +48,7 @@ export interface RoleAssignmentsCreateRoleAssignment200Response extends HttpResp } /** Create role assignment. */ -export interface RoleAssignmentsCreateRoleAssignmentdefaultResponse extends HttpResponse { +export interface RoleAssignmentsCreateRoleAssignmentDefaultResponse extends HttpResponse { status: string; body: ErrorContractOutput; } @@ -60,7 +60,7 @@ export interface RoleAssignmentsGetRoleAssignmentById200Response extends HttpRes } /** Get role assignment by role assignment Id. */ -export interface RoleAssignmentsGetRoleAssignmentByIddefaultResponse extends HttpResponse { +export interface RoleAssignmentsGetRoleAssignmentByIdDefaultResponse extends HttpResponse { status: string; body: ErrorContractOutput; } @@ -68,17 +68,15 @@ export interface RoleAssignmentsGetRoleAssignmentByIddefaultResponse extends Htt /** Delete role assignment by role assignment Id. */ export interface RoleAssignmentsDeleteRoleAssignmentById200Response extends HttpResponse { status: "200"; - body: Record; } /** Delete role assignment by role assignment Id. */ export interface RoleAssignmentsDeleteRoleAssignmentById204Response extends HttpResponse { status: "204"; - body: Record; } /** Delete role assignment by role assignment Id. */ -export interface RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse extends HttpResponse { +export interface RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse extends HttpResponse { status: string; body: ErrorContractOutput; } @@ -90,7 +88,7 @@ export interface RoleDefinitionsListRoleDefinitions200Response extends HttpRespo } /** List role definitions. */ -export interface RoleDefinitionsListRoleDefinitionsdefaultResponse extends HttpResponse { +export interface RoleDefinitionsListRoleDefinitionsDefaultResponse extends HttpResponse { status: string; body: ErrorContractOutput; } @@ -102,7 +100,7 @@ export interface RoleDefinitionsGetRoleDefinitionById200Response extends HttpRes } /** Get role definition by role definition Id. */ -export interface RoleDefinitionsGetRoleDefinitionByIddefaultResponse extends HttpResponse { +export interface RoleDefinitionsGetRoleDefinitionByIdDefaultResponse extends HttpResponse { status: string; body: ErrorContractOutput; } @@ -114,7 +112,7 @@ export interface RoleDefinitionsListScopes200Response extends HttpResponse { } /** List rbac scopes. */ -export interface RoleDefinitionsListScopesdefaultResponse extends HttpResponse { +export interface RoleDefinitionsListScopesDefaultResponse extends HttpResponse { status: string; body: ErrorContractOutput; } diff --git a/sdk/synapse/synapse-access-control-rest/swagger/README.md b/sdk/synapse/synapse-access-control-rest/swagger/README.md index 3509b04d66a6..0470af3060a0 100644 --- a/sdk/synapse/synapse-access-control-rest/swagger/README.md +++ b/sdk/synapse/synapse-access-control-rest/swagger/README.md @@ -5,6 +5,8 @@ ## Configuration ```yaml +flavor: azure +openapi-type: data-plane tag: package-access-control-2020-12-01 package-name: "@azure-rest/synapse-access-control" package-version: "1.0.0-beta.1" From 7ab722dfff3fb64c75e985ee358a573bcf1984aa Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:31:52 +0800 Subject: [PATCH 36/55] [data-plane] refresh ai-translation-text-rest (#31637) https://github.com/Azure/azure-sdk-for-js/issues/30680 --- .../ai-translation-text-rest/CHANGELOG.md | 9 +- .../{src => }/generated/clientDefinitions.ts | 1 + .../generated/index.ts | 15 + .../{src => }/generated/isUnexpected.ts | 1 + .../generated/logger.ts | 6 + .../{src => }/generated/models.ts | 3 +- .../generated/outputModels.ts | 324 ++++++++++++++++++ .../{src => }/generated/parameters.ts | 21 +- .../{src => }/generated/responses.ts | 1 + .../{src => }/generated/serializeHelper.ts | 1 + .../generated/textTranslationClient.ts | 27 +- .../review/ai-translation-text.api.md | 14 +- ...ication.ts => authenticationCustomized.ts} | 0 .../src/clientDefinitions.ts | 89 +++++ .../src/customClient.ts | 11 +- .../ai-translation-text-rest/src/index.ts | 16 +- .../src/isUnexpected.ts | 141 ++++++++ .../src/{generated => }/logger.ts | 0 .../ai-translation-text-rest/src/models.ts | 25 ++ .../src/{generated => }/outputModels.ts | 0 .../src/parameters.ts | 300 ++++++++++++++++ .../ai-translation-text-rest/src/responses.ts | 172 ++++++++++ .../src/serializeHelper.ts | 13 + .../src/textTranslationClient.ts | 60 ++++ 24 files changed, 1211 insertions(+), 39 deletions(-) rename sdk/translation/ai-translation-text-rest/{src => }/generated/clientDefinitions.ts (99%) create mode 100644 sdk/translation/ai-translation-text-rest/generated/index.ts rename sdk/translation/ai-translation-text-rest/{src => }/generated/isUnexpected.ts (99%) create mode 100644 sdk/translation/ai-translation-text-rest/generated/logger.ts rename sdk/translation/ai-translation-text-rest/{src => }/generated/models.ts (94%) create mode 100644 sdk/translation/ai-translation-text-rest/generated/outputModels.ts rename sdk/translation/ai-translation-text-rest/{src => }/generated/parameters.ts (97%) rename sdk/translation/ai-translation-text-rest/{src => }/generated/responses.ts (99%) rename sdk/translation/ai-translation-text-rest/{src => }/generated/serializeHelper.ts (99%) rename sdk/translation/ai-translation-text-rest/{src => }/generated/textTranslationClient.ts (59%) rename sdk/translation/ai-translation-text-rest/src/{authentication.ts => authenticationCustomized.ts} (100%) create mode 100644 sdk/translation/ai-translation-text-rest/src/clientDefinitions.ts create mode 100644 sdk/translation/ai-translation-text-rest/src/isUnexpected.ts rename sdk/translation/ai-translation-text-rest/src/{generated => }/logger.ts (100%) create mode 100644 sdk/translation/ai-translation-text-rest/src/models.ts rename sdk/translation/ai-translation-text-rest/src/{generated => }/outputModels.ts (100%) create mode 100644 sdk/translation/ai-translation-text-rest/src/parameters.ts create mode 100644 sdk/translation/ai-translation-text-rest/src/responses.ts create mode 100644 sdk/translation/ai-translation-text-rest/src/serializeHelper.ts create mode 100644 sdk/translation/ai-translation-text-rest/src/textTranslationClient.ts diff --git a/sdk/translation/ai-translation-text-rest/CHANGELOG.md b/sdk/translation/ai-translation-text-rest/CHANGELOG.md index c9b5bd652fdc..24e0a7277b11 100644 --- a/sdk/translation/ai-translation-text-rest/CHANGELOG.md +++ b/sdk/translation/ai-translation-text-rest/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 1.0.1 (Unreleased) +## 1.0.1 (2024-12-16) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- refresh @azure-rest/ai-translation-text sdk ## 1.0.0 (2024-05-21) diff --git a/sdk/translation/ai-translation-text-rest/src/generated/clientDefinitions.ts b/sdk/translation/ai-translation-text-rest/generated/clientDefinitions.ts similarity index 99% rename from sdk/translation/ai-translation-text-rest/src/generated/clientDefinitions.ts rename to sdk/translation/ai-translation-text-rest/generated/clientDefinitions.ts index 07996cd15d50..e4141c22c810 100644 --- a/sdk/translation/ai-translation-text-rest/src/generated/clientDefinitions.ts +++ b/sdk/translation/ai-translation-text-rest/generated/clientDefinitions.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { GetSupportedLanguagesParameters, TranslateParameters, diff --git a/sdk/translation/ai-translation-text-rest/generated/index.ts b/sdk/translation/ai-translation-text-rest/generated/index.ts new file mode 100644 index 000000000000..6de7383875e4 --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/generated/index.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import TextTranslationClient from "./textTranslationClient.js"; + +export * from "./textTranslationClient.js"; +export * from "./parameters.js"; +export * from "./responses.js"; +export * from "./clientDefinitions.js"; +export * from "./isUnexpected.js"; +export * from "./models.js"; +export * from "./outputModels.js"; +export * from "./serializeHelper.js"; + +export default TextTranslationClient; diff --git a/sdk/translation/ai-translation-text-rest/src/generated/isUnexpected.ts b/sdk/translation/ai-translation-text-rest/generated/isUnexpected.ts similarity index 99% rename from sdk/translation/ai-translation-text-rest/src/generated/isUnexpected.ts rename to sdk/translation/ai-translation-text-rest/generated/isUnexpected.ts index 221013830501..e1b06275aa24 100644 --- a/sdk/translation/ai-translation-text-rest/src/generated/isUnexpected.ts +++ b/sdk/translation/ai-translation-text-rest/generated/isUnexpected.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { GetSupportedLanguages200Response, GetSupportedLanguagesDefaultResponse, diff --git a/sdk/translation/ai-translation-text-rest/generated/logger.ts b/sdk/translation/ai-translation-text-rest/generated/logger.ts new file mode 100644 index 000000000000..9bdd56aa86e0 --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/generated/logger.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("ai-translation-text"); diff --git a/sdk/translation/ai-translation-text-rest/src/generated/models.ts b/sdk/translation/ai-translation-text-rest/generated/models.ts similarity index 94% rename from sdk/translation/ai-translation-text-rest/src/generated/models.ts rename to sdk/translation/ai-translation-text-rest/generated/models.ts index 725e8ddd1306..8fad16da1ae7 100644 --- a/sdk/translation/ai-translation-text-rest/src/generated/models.ts +++ b/sdk/translation/ai-translation-text-rest/generated/models.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + /** Element containing the text for translation. */ export interface InputTextItem { /** Text to translate. */ @@ -18,7 +19,7 @@ export interface DictionaryExampleTextItem extends InputTextItem { } /** Alias for TextType */ -export type TextType = string | "Plain" | "Html"; +export type TextType = string; /** Translator profanity actions */ export type ProfanityAction = "NoAction" | "Marked" | "Deleted"; /** Translator profanity markers */ diff --git a/sdk/translation/ai-translation-text-rest/generated/outputModels.ts b/sdk/translation/ai-translation-text-rest/generated/outputModels.ts new file mode 100644 index 000000000000..076b41a221ec --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/generated/outputModels.ts @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +/** Response for the languages API. */ +export interface GetSupportedLanguagesResultOutput { + /** Languages that support translate API. */ + translation?: Record; + /** Languages that support transliteration API. */ + transliteration?: Record; + /** Languages that support dictionary API. */ + dictionary?: Record; +} + +/** + * The value of the translation property is a dictionary of (key, value) pairs. Each key is a BCP 47 language tag. + * A key identifies a language for which text can be translated to or translated from. + */ +export interface TranslationLanguageOutput { + /** Display name of the language in the locale requested via Accept-Language header. */ + name: string; + /** Display name of the language in the locale native for this language. */ + nativeName: string; + /** Directionality, which is rtl for right-to-left languages or ltr for left-to-right languages. */ + dir: LanguageDirectionalityOutput; +} + +/** + * The value of the transliteration property is a dictionary of (key, value) pairs. + * Each key is a BCP 47 language tag. A key identifies a language for which text can be converted from one script + * to another script. + */ +export interface TransliterationLanguageOutput { + /** Display name of the language in the locale requested via Accept-Language header. */ + name: string; + /** Display name of the language in the locale native for this language. */ + nativeName: string; + /** List of scripts to convert from. */ + scripts: Array; +} + +/** Script definition with list of script into which given script can be translitered. */ +export interface TransliterableScriptOutput extends LanguageScriptOutput { + /** List of scripts available to convert text to. */ + toScripts: Array; +} + +/** Common properties of language script */ +export interface LanguageScriptOutput { + /** Code identifying the script. */ + code: string; + /** Display name of the script in the locale requested via Accept-Language header. */ + name: string; + /** Display name of the language in the locale native for the language. */ + nativeName: string; + /** Directionality, which is rtl for right-to-left languages or ltr for left-to-right languages. */ + dir: LanguageDirectionalityOutput; +} + +/** Properties ot the source dictionary language */ +export interface SourceDictionaryLanguageOutput { + /** Display name of the language in the locale requested via Accept-Language header. */ + name: string; + /** Display name of the language in the locale native for this language. */ + nativeName: string; + /** Directionality, which is rtl for right-to-left languages or ltr for left-to-right languages. */ + dir: LanguageDirectionalityOutput; + /** List of languages with alterative translations and examples for the query expressed in the source language. */ + translations: Array; +} + +/** Properties of the target dictionary language */ +export interface TargetDictionaryLanguageOutput { + /** Display name of the language in the locale requested via Accept-Language header. */ + name: string; + /** Display name of the language in the locale native for this language. */ + nativeName: string; + /** Directionality, which is rtl for right-to-left languages or ltr for left-to-right languages. */ + dir: LanguageDirectionalityOutput; + /** Language code identifying the target language. */ + code: string; +} + +/** Representation of the Error Response from Translator Service. */ +export interface ErrorResponseOutput { + /** Error details. */ + error: ErrorDetailsOutput; +} + +/** Error details as returned by Translator Service. */ +export interface ErrorDetailsOutput { + /** Number identifier of the error. */ + code: number; + /** Human readable error description. */ + message: string; +} + +/** Element containing the translated text */ +export interface TranslatedTextItemOutput { + /** The detectedLanguage property is only present in the result object when language auto-detection is requested. */ + detectedLanguage?: DetectedLanguageOutput; + /** + * An array of translation results. The size of the array matches the number of target + * languages specified through the to query parameter. + */ + translations: Array; + /** + * Input text in the default script of the source language. sourceText property is present only when + * the input is expressed in a script that's not the usual script for the language. For example, + * if the input were Arabic written in Latin script, then sourceText.text would be the same Arabic text + * converted into Arab script. + */ + sourceText?: SourceTextOutput; +} + +/** An object describing the detected language. */ +export interface DetectedLanguageOutput { + /** A string representing the code of the detected language. */ + language: string; + /** + * A float value indicating the confidence in the result. + * The score is between zero and one and a low score indicates a low confidence. + */ + score: number; +} + +/** Translation result */ +export interface TranslationTextOutput { + /** A string representing the language code of the target language. */ + to: string; + /** A string giving the translated text. */ + text: string; + /** An object giving the translated text in the script specified by the toScript parameter. */ + transliteration?: TransliteratedTextOutput; + /** Alignment information. */ + alignment?: TranslatedTextAlignmentOutput; + /** Sentence boundaries in the input and output texts. */ + sentLen?: SentenceBoundariesOutput; +} + +/** Transliterated text element. */ +export interface TransliteratedTextOutput { + /** A string which is the result of converting the input string to the output script. */ + text: string; + /** A string specifying the script used in the output. */ + script: string; +} + +/** Alignment information object. */ +export interface TranslatedTextAlignmentOutput { + /** + * Maps input text to translated text. The alignment information is only provided when the request + * parameter includeAlignment is true. Alignment is returned as a string value of the following + * format: [[SourceTextStartIndex]:[SourceTextEndIndex]–[TgtTextStartIndex]:[TgtTextEndIndex]]. + * The colon separates start and end index, the dash separates the languages, and space separates the words. + * One word may align with zero, one, or multiple words in the other language, and the aligned words may + * be non-contiguous. When no alignment information is available, the alignment element will be empty. + */ + proj: string; +} + +/** An object returning sentence boundaries in the input and output texts. */ +export interface SentenceBoundariesOutput { + /** + * An integer array representing the lengths of the sentences in the input text. + * The length of the array is the number of sentences, and the values are the length of each sentence. + */ + srcSentLen: number[]; + /** + * An integer array representing the lengths of the sentences in the translated text. + * The length of the array is the number of sentences, and the values are the length of each sentence. + */ + transSentLen: number[]; +} + +/** Input text in the default script of the source language. */ +export interface SourceTextOutput { + /** Input text in the default script of the source language. */ + text: string; +} + +/** Item containing break sentence result. */ +export interface BreakSentenceItemOutput { + /** The detectedLanguage property is only present in the result object when language auto-detection is requested. */ + detectedLanguage?: DetectedLanguageOutput; + /** + * An integer array representing the lengths of the sentences in the input text. + * The length of the array is the number of sentences, and the values are the length of each sentence. + */ + sentLen: number[]; +} + +/** Dictionary Lookup Element */ +export interface DictionaryLookupItemOutput { + /** + * A string giving the normalized form of the source term. + * For example, if the request is "JOHN", the normalized form will be "john". + * The content of this field becomes the input to lookup examples. + */ + normalizedSource: string; + /** + * A string giving the source term in a form best suited for end-user display. + * For example, if the input is "JOHN", the display form will reflect the usual + * spelling of the name: "John". + */ + displaySource: string; + /** A list of translations for the source term. */ + translations: Array; +} + +/** Translation source term. */ +export interface DictionaryTranslationOutput { + /** + * A string giving the normalized form of this term in the target language. + * This value should be used as input to lookup examples. + */ + normalizedTarget: string; + /** + * A string giving the term in the target language and in a form best suited + * for end-user display. Generally, this will only differ from the normalizedTarget + * in terms of capitalization. For example, a proper noun like "Juan" will have + * normalizedTarget = "juan" and displayTarget = "Juan". + */ + displayTarget: string; + /** A string associating this term with a part-of-speech tag. */ + posTag: string; + /** + * A value between 0.0 and 1.0 which represents the "confidence" + * (or perhaps more accurately, "probability in the training data") of that translation pair. + * The sum of confidence scores for one source word may or may not sum to 1.0. + */ + confidence: number; + /** + * A string giving the word to display as a prefix of the translation. Currently, + * this is the gendered determiner of nouns, in languages that have gendered determiners. + * For example, the prefix of the Spanish word "mosca" is "la", since "mosca" is a feminine noun in Spanish. + * This is only dependent on the translation, and not on the source. + * If there is no prefix, it will be the empty string. + */ + prefixWord: string; + /** + * A list of "back translations" of the target. For example, source words that the target can translate to. + * The list is guaranteed to contain the source word that was requested (e.g., if the source word being + * looked up is "fly", then it is guaranteed that "fly" will be in the backTranslations list). + * However, it is not guaranteed to be in the first position, and often will not be. + */ + backTranslations: Array; +} + +/** Back Translation */ +export interface BackTranslationOutput { + /** + * A string giving the normalized form of the source term that is a back-translation of the target. + * This value should be used as input to lookup examples. + */ + normalizedText: string; + /** + * A string giving the source term that is a back-translation of the target in a form best + * suited for end-user display. + */ + displayText: string; + /** + * An integer representing the number of examples that are available for this translation pair. + * Actual examples must be retrieved with a separate call to lookup examples. The number is mostly + * intended to facilitate display in a UX. For example, a user interface may add a hyperlink + * to the back-translation if the number of examples is greater than zero and show the back-translation + * as plain text if there are no examples. Note that the actual number of examples returned + * by a call to lookup examples may be less than numExamples, because additional filtering may be + * applied on the fly to remove "bad" examples. + */ + numExamples: number; + /** + * An integer representing the frequency of this translation pair in the data. The main purpose of this + * field is to provide a user interface with a means to sort back-translations so the most frequent terms are first. + */ + frequencyCount: number; +} + +/** Dictionary Example element */ +export interface DictionaryExampleItemOutput { + /** + * A string giving the normalized form of the source term. Generally, this should be identical + * to the value of the Text field at the matching list index in the body of the request. + */ + normalizedSource: string; + /** + * A string giving the normalized form of the target term. Generally, this should be identical + * to the value of the Translation field at the matching list index in the body of the request. + */ + normalizedTarget: string; + /** A list of examples for the (source term, target term) pair. */ + examples: Array; +} + +/** Dictionary Example */ +export interface DictionaryExampleOutput { + /** + * The string to concatenate before the value of sourceTerm to form a complete example. + * Do not add a space character, since it is already there when it should be. + * This value may be an empty string. + */ + sourcePrefix: string; + /** + * A string equal to the actual term looked up. The string is added with sourcePrefix + * and sourceSuffix to form the complete example. Its value is separated so it can be + * marked in a user interface, e.g., by bolding it. + */ + sourceTerm: string; + /** + * The string to concatenate after the value of sourceTerm to form a complete example. + * Do not add a space character, since it is already there when it should be. + * This value may be an empty string. + */ + sourceSuffix: string; + /** A string similar to sourcePrefix but for the target. */ + targetPrefix: string; + /** A string similar to sourceTerm but for the target. */ + targetTerm: string; + /** A string similar to sourceSuffix but for the target. */ + targetSuffix: string; +} + +/** Language Directionality */ +export type LanguageDirectionalityOutput = "ltr" | "rtl"; diff --git a/sdk/translation/ai-translation-text-rest/src/generated/parameters.ts b/sdk/translation/ai-translation-text-rest/generated/parameters.ts similarity index 97% rename from sdk/translation/ai-translation-text-rest/src/generated/parameters.ts rename to sdk/translation/ai-translation-text-rest/generated/parameters.ts index e0adc1680033..963f63fc1276 100644 --- a/sdk/translation/ai-translation-text-rest/src/generated/parameters.ts +++ b/sdk/translation/ai-translation-text-rest/generated/parameters.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; import { RequestParameters } from "@azure-rest/core-client"; import { @@ -83,6 +84,8 @@ export interface TranslateQueryParamProperties { /** * Defines whether the text being translated is plain text or HTML text. Any HTML needs to be a well-formed, * complete element. Possible values are: plain (default) or html. + * + * Possible values: "Plain", "Html" */ textType?: TextType; /** @@ -222,9 +225,9 @@ export interface FindSentenceBoundariesHeaderParam { export type FindSentenceBoundariesParameters = FindSentenceBoundariesQueryParam & - FindSentenceBoundariesHeaderParam & - FindSentenceBoundariesBodyParam & - RequestParameters; + FindSentenceBoundariesHeaderParam & + FindSentenceBoundariesBodyParam & + RequestParameters; export interface LookupDictionaryEntriesHeaders { /** A client-generated GUID to uniquely identify the request. */ @@ -259,9 +262,9 @@ export interface LookupDictionaryEntriesHeaderParam { export type LookupDictionaryEntriesParameters = LookupDictionaryEntriesQueryParam & - LookupDictionaryEntriesHeaderParam & - LookupDictionaryEntriesBodyParam & - RequestParameters; + LookupDictionaryEntriesHeaderParam & + LookupDictionaryEntriesBodyParam & + RequestParameters; export interface LookupDictionaryExamplesHeaders { /** A client-generated GUID to uniquely identify the request. */ @@ -296,6 +299,6 @@ export interface LookupDictionaryExamplesHeaderParam { export type LookupDictionaryExamplesParameters = LookupDictionaryExamplesQueryParam & - LookupDictionaryExamplesHeaderParam & - LookupDictionaryExamplesBodyParam & - RequestParameters; + LookupDictionaryExamplesHeaderParam & + LookupDictionaryExamplesBodyParam & + RequestParameters; diff --git a/sdk/translation/ai-translation-text-rest/src/generated/responses.ts b/sdk/translation/ai-translation-text-rest/generated/responses.ts similarity index 99% rename from sdk/translation/ai-translation-text-rest/src/generated/responses.ts rename to sdk/translation/ai-translation-text-rest/generated/responses.ts index 0a04a06cbd8f..3b8074c67097 100644 --- a/sdk/translation/ai-translation-text-rest/src/generated/responses.ts +++ b/sdk/translation/ai-translation-text-rest/generated/responses.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { RawHttpHeaders } from "@azure/core-rest-pipeline"; import { HttpResponse } from "@azure-rest/core-client"; import { diff --git a/sdk/translation/ai-translation-text-rest/src/generated/serializeHelper.ts b/sdk/translation/ai-translation-text-rest/generated/serializeHelper.ts similarity index 99% rename from sdk/translation/ai-translation-text-rest/src/generated/serializeHelper.ts rename to sdk/translation/ai-translation-text-rest/generated/serializeHelper.ts index a19f11ca222a..07805c2217f9 100644 --- a/sdk/translation/ai-translation-text-rest/src/generated/serializeHelper.ts +++ b/sdk/translation/ai-translation-text-rest/generated/serializeHelper.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + export function buildMultiCollection( items: string[], parameterName: string, diff --git a/sdk/translation/ai-translation-text-rest/src/generated/textTranslationClient.ts b/sdk/translation/ai-translation-text-rest/generated/textTranslationClient.ts similarity index 59% rename from sdk/translation/ai-translation-text-rest/src/generated/textTranslationClient.ts rename to sdk/translation/ai-translation-text-rest/generated/textTranslationClient.ts index 6ab4169b8d8b..dfa777d7f17b 100644 --- a/sdk/translation/ai-translation-text-rest/src/generated/textTranslationClient.ts +++ b/sdk/translation/ai-translation-text-rest/generated/textTranslationClient.ts @@ -5,6 +5,13 @@ import { getClient, ClientOptions } from "@azure-rest/core-client"; import { logger } from "./logger.js"; import { TextTranslationClient } from "./clientDefinitions.js"; + +/** The optional parameters for the client */ +export interface TextTranslationClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + /** * Initialize a new instance of `TextTranslationClient` * @param endpointParam - Supported Text Translation endpoints (protocol and hostname, for example: @@ -13,10 +20,9 @@ import { TextTranslationClient } from "./clientDefinitions.js"; */ export default function createClient( endpointParam: string, - options: ClientOptions = {}, + { apiVersion = "3.0", ...options }: TextTranslationClientOptions = {}, ): TextTranslationClient { const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`; - options.apiVersion = options.apiVersion ?? "3.0"; const userAgentInfo = `azsdk-js-ai-translation-text-rest/1.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix @@ -31,8 +37,23 @@ export default function createClient( logger: options.loggingOptions?.logger ?? logger.info, }, }; - const client = getClient(endpointUrl, options) as TextTranslationClient; + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + return client; } diff --git a/sdk/translation/ai-translation-text-rest/review/ai-translation-text.api.md b/sdk/translation/ai-translation-text-rest/review/ai-translation-text.api.md index 0ca842f5da27..f8d95bbb2a55 100644 --- a/sdk/translation/ai-translation-text-rest/review/ai-translation-text.api.md +++ b/sdk/translation/ai-translation-text-rest/review/ai-translation-text.api.md @@ -4,14 +4,14 @@ ```ts -import { Client } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; import type { ClientOptions } from '@azure-rest/core-client'; -import { HttpResponse } from '@azure-rest/core-client'; +import type { HttpResponse } from '@azure-rest/core-client'; import type { KeyCredential } from '@azure/core-auth'; -import { RawHttpHeaders } from '@azure/core-rest-pipeline'; -import { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; -import { RequestParameters } from '@azure-rest/core-client'; -import { StreamableMethod } from '@azure-rest/core-client'; +import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; +import type { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; +import type { RequestParameters } from '@azure-rest/core-client'; +import type { StreamableMethod } from '@azure-rest/core-client'; import type { TokenCredential } from '@azure/core-auth'; // @public @@ -448,7 +448,7 @@ export type TextTranslationClient = Client & { }; // @public -export type TextType = string | "Plain" | "Html"; +export type TextType = string; // @public (undocumented) export interface Translate { diff --git a/sdk/translation/ai-translation-text-rest/src/authentication.ts b/sdk/translation/ai-translation-text-rest/src/authenticationCustomized.ts similarity index 100% rename from sdk/translation/ai-translation-text-rest/src/authentication.ts rename to sdk/translation/ai-translation-text-rest/src/authenticationCustomized.ts diff --git a/sdk/translation/ai-translation-text-rest/src/clientDefinitions.ts b/sdk/translation/ai-translation-text-rest/src/clientDefinitions.ts new file mode 100644 index 000000000000..46589011ce2d --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/src/clientDefinitions.ts @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + GetSupportedLanguagesParameters, + TranslateParameters, + TransliterateParameters, + FindSentenceBoundariesParameters, + LookupDictionaryEntriesParameters, + LookupDictionaryExamplesParameters, +} from "./parameters.js"; +import type { + GetSupportedLanguages200Response, + GetSupportedLanguagesDefaultResponse, + Translate200Response, + TranslateDefaultResponse, + Transliterate200Response, + TransliterateDefaultResponse, + FindSentenceBoundaries200Response, + FindSentenceBoundariesDefaultResponse, + LookupDictionaryEntries200Response, + LookupDictionaryEntriesDefaultResponse, + LookupDictionaryExamples200Response, + LookupDictionaryExamplesDefaultResponse, +} from "./responses.js"; +import type { Client, StreamableMethod } from "@azure-rest/core-client"; + +export interface GetSupportedLanguages { + /** Gets the set of languages currently supported by other operations of the Translator. */ + get( + options?: GetSupportedLanguagesParameters, + ): StreamableMethod; +} + +export interface Translate { + /** Translate Text */ + post( + options: TranslateParameters, + ): StreamableMethod; +} + +export interface Transliterate { + /** Transliterate Text */ + post( + options: TransliterateParameters, + ): StreamableMethod; +} + +export interface FindSentenceBoundaries { + /** Find Sentence Boundaries */ + post( + options: FindSentenceBoundariesParameters, + ): StreamableMethod; +} + +export interface LookupDictionaryEntries { + /** Lookup Dictionary Entries */ + post( + options: LookupDictionaryEntriesParameters, + ): StreamableMethod; +} + +export interface LookupDictionaryExamples { + /** Lookup Dictionary Examples */ + post( + options: LookupDictionaryExamplesParameters, + ): StreamableMethod< + LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse + >; +} + +export interface Routes { + /** Resource for '/languages' has methods for the following verbs: get */ + (path: "/languages"): GetSupportedLanguages; + /** Resource for '/translate' has methods for the following verbs: post */ + (path: "/translate"): Translate; + /** Resource for '/transliterate' has methods for the following verbs: post */ + (path: "/transliterate"): Transliterate; + /** Resource for '/breaksentence' has methods for the following verbs: post */ + (path: "/breaksentence"): FindSentenceBoundaries; + /** Resource for '/dictionary/lookup' has methods for the following verbs: post */ + (path: "/dictionary/lookup"): LookupDictionaryEntries; + /** Resource for '/dictionary/examples' has methods for the following verbs: post */ + (path: "/dictionary/examples"): LookupDictionaryExamples; +} + +export type TextTranslationClient = Client & { + path: Routes; +}; diff --git a/sdk/translation/ai-translation-text-rest/src/customClient.ts b/sdk/translation/ai-translation-text-rest/src/customClient.ts index fa1db50f5561..761de5b7d427 100644 --- a/sdk/translation/ai-translation-text-rest/src/customClient.ts +++ b/sdk/translation/ai-translation-text-rest/src/customClient.ts @@ -3,16 +3,19 @@ import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; -import { logger } from "./generated/logger.js"; +import { logger } from "./logger.js"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import type { TextTranslationClient } from "./generated/clientDefinitions.js"; -import type { TranslatorCredential, TranslatorTokenCredential } from "./authentication.js"; +import type { TextTranslationClient } from "./clientDefinitions.js"; +import type { + TranslatorCredential, + TranslatorTokenCredential, +} from "./authenticationCustomized.js"; import { DEFAULT_SCOPE, TranslatorAuthenticationPolicy, TranslatorAzureKeyAuthenticationPolicy, TranslatorTokenCredentialAuthenticationPolicy, -} from "./authentication.js"; +} from "./authenticationCustomized.js"; import type { AzureKeyCredential, KeyCredential, TokenCredential } from "@azure/core-auth"; const DEFAULT_ENPOINT = "https://api.cognitive.microsofttranslator.com"; diff --git a/sdk/translation/ai-translation-text-rest/src/index.ts b/sdk/translation/ai-translation-text-rest/src/index.ts index 3a414add33d4..e5d83e965eae 100644 --- a/sdk/translation/ai-translation-text-rest/src/index.ts +++ b/sdk/translation/ai-translation-text-rest/src/index.ts @@ -4,14 +4,14 @@ import TextTranslationClient from "./customClient.js"; export * from "./customClient.js"; -export * from "./generated/parameters.js"; -export * from "./generated/responses.js"; -export * from "./generated/clientDefinitions.js"; -export * from "./generated/isUnexpected.js"; -export * from "./generated/models.js"; -export * from "./generated/outputModels.js"; -export * from "./generated/serializeHelper.js"; -export { TranslatorCredential, TranslatorTokenCredential } from "./authentication.js"; +export * from "./parameters.js"; +export * from "./responses.js"; +export * from "./clientDefinitions.js"; +export * from "./isUnexpected.js"; +export * from "./models.js"; +export * from "./outputModels.js"; +export * from "./serializeHelper.js"; +export { TranslatorCredential, TranslatorTokenCredential } from "./authenticationCustomized.js"; // eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named export default TextTranslationClient; diff --git a/sdk/translation/ai-translation-text-rest/src/isUnexpected.ts b/sdk/translation/ai-translation-text-rest/src/isUnexpected.ts new file mode 100644 index 000000000000..230aba3bf188 --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/src/isUnexpected.ts @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + GetSupportedLanguages200Response, + GetSupportedLanguagesDefaultResponse, + Translate200Response, + TranslateDefaultResponse, + Transliterate200Response, + TransliterateDefaultResponse, + FindSentenceBoundaries200Response, + FindSentenceBoundariesDefaultResponse, + LookupDictionaryEntries200Response, + LookupDictionaryEntriesDefaultResponse, + LookupDictionaryExamples200Response, + LookupDictionaryExamplesDefaultResponse, +} from "./responses.js"; + +const responseMap: Record = { + "GET /languages": ["200"], + "POST /translate": ["200"], + "POST /transliterate": ["200"], + "POST /breaksentence": ["200"], + "POST /dictionary/lookup": ["200"], + "POST /dictionary/examples": ["200"], +}; + +export function isUnexpected( + response: GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse, +): response is GetSupportedLanguagesDefaultResponse; +export function isUnexpected( + response: Translate200Response | TranslateDefaultResponse, +): response is TranslateDefaultResponse; +export function isUnexpected( + response: Transliterate200Response | TransliterateDefaultResponse, +): response is TransliterateDefaultResponse; +export function isUnexpected( + response: FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse, +): response is FindSentenceBoundariesDefaultResponse; +export function isUnexpected( + response: LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse, +): response is LookupDictionaryEntriesDefaultResponse; +export function isUnexpected( + response: LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse, +): response is LookupDictionaryExamplesDefaultResponse; +export function isUnexpected( + response: + | GetSupportedLanguages200Response + | GetSupportedLanguagesDefaultResponse + | Translate200Response + | TranslateDefaultResponse + | Transliterate200Response + | TransliterateDefaultResponse + | FindSentenceBoundaries200Response + | FindSentenceBoundariesDefaultResponse + | LookupDictionaryEntries200Response + | LookupDictionaryEntriesDefaultResponse + | LookupDictionaryExamples200Response + | LookupDictionaryExamplesDefaultResponse, +): response is + | GetSupportedLanguagesDefaultResponse + | TranslateDefaultResponse + | TransliterateDefaultResponse + | FindSentenceBoundariesDefaultResponse + | LookupDictionaryEntriesDefaultResponse + | LookupDictionaryExamplesDefaultResponse { + const lroOriginal = response.headers["x-ms-original-url"]; + const url = new URL(lroOriginal ?? response.request.url); + const method = response.request.method; + let pathDetails = responseMap[`${method} ${url.pathname}`]; + if (!pathDetails) { + pathDetails = getParametrizedPathSuccess(method, url.pathname); + } + return !pathDetails.includes(response.status); +} + +function getParametrizedPathSuccess(method: string, path: string): string[] { + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(responseMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/translation/ai-translation-text-rest/src/generated/logger.ts b/sdk/translation/ai-translation-text-rest/src/logger.ts similarity index 100% rename from sdk/translation/ai-translation-text-rest/src/generated/logger.ts rename to sdk/translation/ai-translation-text-rest/src/logger.ts diff --git a/sdk/translation/ai-translation-text-rest/src/models.ts b/sdk/translation/ai-translation-text-rest/src/models.ts new file mode 100644 index 000000000000..1596d852b98b --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/src/models.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** Element containing the text for translation. */ +export interface InputTextItem { + /** Text to translate. */ + text: string; +} + +/** Element containing the text with translation. */ +export interface DictionaryExampleTextItem extends InputTextItem { + /** + * A string specifying the translated text previously returned by the Dictionary lookup operation. + * This should be the value from the normalizedTarget field in the translations list of the Dictionary + * lookup response. The service will return examples for the specific source-target word-pair. + */ + translation: string; +} + +/** Alias for TextType */ +export type TextType = string; +/** Translator profanity actions */ +export type ProfanityAction = "NoAction" | "Marked" | "Deleted"; +/** Translator profanity markers */ +export type ProfanityMarker = "Asterisk" | "Tag"; diff --git a/sdk/translation/ai-translation-text-rest/src/generated/outputModels.ts b/sdk/translation/ai-translation-text-rest/src/outputModels.ts similarity index 100% rename from sdk/translation/ai-translation-text-rest/src/generated/outputModels.ts rename to sdk/translation/ai-translation-text-rest/src/outputModels.ts diff --git a/sdk/translation/ai-translation-text-rest/src/parameters.ts b/sdk/translation/ai-translation-text-rest/src/parameters.ts new file mode 100644 index 000000000000..5b34749977dc --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/src/parameters.ts @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; +import type { RequestParameters } from "@azure-rest/core-client"; +import type { + TextType, + ProfanityAction, + ProfanityMarker, + InputTextItem, + DictionaryExampleTextItem, +} from "./models.js"; + +export interface GetSupportedLanguagesHeaders { + /** A client-generated GUID to uniquely identify the request. */ + "X-ClientTraceId"?: string; + /** + * The language to use for user interface strings. Some of the fields in the response are names of languages or + * names of regions. Use this parameter to define the language in which these names are returned. + * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` + * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. + * Names are provided in the English language when a target language is not specified or when localization + * is not available. + */ + "Accept-Language"?: string; + /** + * Passing the value of the ETag response header in an If-None-Match field will allow the service to optimize the response. + * If the resource has not been modified, the service will return status code 304 and an empty response body. + */ + "If-None-Match"?: string; +} + +export interface GetSupportedLanguagesQueryParamProperties { + /** + * A comma-separated list of names defining the group of languages to return. + * Allowed group names are: `translation`, `transliteration` and `dictionary`. + * If no scope is given, then all groups are returned, which is equivalent to passing + * `scope=translation,transliteration,dictionary`. To decide which set of supported languages + * is appropriate for your scenario, see the description of the [response object](#response-body). + */ + scope?: string; +} + +export interface GetSupportedLanguagesQueryParam { + queryParameters?: GetSupportedLanguagesQueryParamProperties; +} + +export interface GetSupportedLanguagesHeaderParam { + headers?: RawHttpHeadersInput & GetSupportedLanguagesHeaders; +} + +export type GetSupportedLanguagesParameters = GetSupportedLanguagesQueryParam & + GetSupportedLanguagesHeaderParam & + RequestParameters; + +export interface TranslateHeaders { + /** A client-generated GUID to uniquely identify the request. */ + "X-ClientTraceId"?: string; +} + +export interface TranslateBodyParam { + /** Defines the content of the request */ + body: Array; +} + +export interface TranslateQueryParamProperties { + /** + * Specifies the language of the output text. The target language must be one of the supported languages included + * in the translation scope. For example, use to=de to translate to German. + * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. + * For example, use to=de&to=it to translate to German and Italian. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request + */ + to: string; + /** + * Specifies the language of the input text. Find which languages are available to translate from by + * looking up supported languages using the translation scope. If the from parameter isn't specified, + * automatic language detection is applied to determine the source language. + * + * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. + * Note: the dynamic dictionary feature is case-sensitive. + */ + from?: string; + /** + * Defines whether the text being translated is plain text or HTML text. Any HTML needs to be a well-formed, + * complete element. Possible values are: plain (default) or html. + * + * Possible values: "Plain", "Html" + */ + textType?: TextType; + /** + * A string specifying the category (domain) of the translation. This parameter is used to get translations + * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator + * project details to this parameter to use your deployed customized system. Default value is: general. + */ + category?: string; + /** + * Specifies how profanities should be treated in translations. + * Possible values are: NoAction (default), Marked or Deleted. + */ + profanityAction?: ProfanityAction; + /** + * Specifies how profanities should be marked in translations. + * Possible values are: Asterisk (default) or Tag. + */ + profanityMarker?: ProfanityMarker; + /** + * Specifies whether to include alignment projection from source text to translated text. + * Possible values are: true or false (default). + */ + includeAlignment?: boolean; + /** + * Specifies whether to include sentence boundaries for the input text and the translated text. + * Possible values are: true or false (default). + */ + includeSentenceLength?: boolean; + /** + * Specifies a fallback language if the language of the input text can't be identified. + * Language autodetection is applied when the from parameter is omitted. If detection fails, + * the suggestedFrom language will be assumed. + */ + suggestedFrom?: string; + /** Specifies the script of the input text. */ + fromScript?: string; + /** Specifies the script of the translated text. */ + toScript?: string; + /** + * Specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. + * Possible values are: true (default) or false. + * + * allowFallback=false specifies that the translation should only use systems trained for the category specified + * by the request. If a translation for language X to language Y requires chaining through a pivot language E, + * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. + * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true + * specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. + */ + allowFallback?: boolean; +} + +export interface TranslateQueryParam { + queryParameters: TranslateQueryParamProperties; +} + +export interface TranslateHeaderParam { + headers?: RawHttpHeadersInput & TranslateHeaders; +} + +export type TranslateParameters = TranslateQueryParam & + TranslateHeaderParam & + TranslateBodyParam & + RequestParameters; + +export interface TransliterateHeaders { + /** A client-generated GUID to uniquely identify the request. */ + "X-ClientTraceId"?: string; +} + +export interface TransliterateBodyParam { + /** Defines the content of the request */ + body: Array; +} + +export interface TransliterateQueryParamProperties { + /** + * Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + */ + language: string; + /** + * Specifies the script used by the input text. Look up supported languages using the transliteration scope, + * to find input scripts available for the selected language. + */ + fromScript: string; + /** + * Specifies the output script. Look up supported languages using the transliteration scope, to find output + * scripts available for the selected combination of input language and input script. + */ + toScript: string; +} + +export interface TransliterateQueryParam { + queryParameters: TransliterateQueryParamProperties; +} + +export interface TransliterateHeaderParam { + headers?: RawHttpHeadersInput & TransliterateHeaders; +} + +export type TransliterateParameters = TransliterateQueryParam & + TransliterateHeaderParam & + TransliterateBodyParam & + RequestParameters; + +export interface FindSentenceBoundariesHeaders { + /** A client-generated GUID to uniquely identify the request. */ + "X-ClientTraceId"?: string; +} + +export interface FindSentenceBoundariesBodyParam { + /** Defines the content of the request */ + body: Array; +} + +export interface FindSentenceBoundariesQueryParamProperties { + /** + * Language tag identifying the language of the input text. + * If a code isn't specified, automatic language detection will be applied. + */ + language?: string; + /** + * Script tag identifying the script used by the input text. + * If a script isn't specified, the default script of the language will be assumed. + */ + script?: string; +} + +export interface FindSentenceBoundariesQueryParam { + queryParameters?: FindSentenceBoundariesQueryParamProperties; +} + +export interface FindSentenceBoundariesHeaderParam { + headers?: RawHttpHeadersInput & FindSentenceBoundariesHeaders; +} + +export type FindSentenceBoundariesParameters = FindSentenceBoundariesQueryParam & + FindSentenceBoundariesHeaderParam & + FindSentenceBoundariesBodyParam & + RequestParameters; + +export interface LookupDictionaryEntriesHeaders { + /** A client-generated GUID to uniquely identify the request. */ + "X-ClientTraceId"?: string; +} + +export interface LookupDictionaryEntriesBodyParam { + /** Defines the content of the request */ + body: Array; +} + +export interface LookupDictionaryEntriesQueryParamProperties { + /** + * Specifies the language of the input text. + * The source language must be one of the supported languages included in the dictionary scope. + */ + from: string; + /** + * Specifies the language of the output text. + * The target language must be one of the supported languages included in the dictionary scope. + */ + to: string; +} + +export interface LookupDictionaryEntriesQueryParam { + queryParameters: LookupDictionaryEntriesQueryParamProperties; +} + +export interface LookupDictionaryEntriesHeaderParam { + headers?: RawHttpHeadersInput & LookupDictionaryEntriesHeaders; +} + +export type LookupDictionaryEntriesParameters = LookupDictionaryEntriesQueryParam & + LookupDictionaryEntriesHeaderParam & + LookupDictionaryEntriesBodyParam & + RequestParameters; + +export interface LookupDictionaryExamplesHeaders { + /** A client-generated GUID to uniquely identify the request. */ + "X-ClientTraceId"?: string; +} + +export interface LookupDictionaryExamplesBodyParam { + /** Defines the content of the request */ + body: Array; +} + +export interface LookupDictionaryExamplesQueryParamProperties { + /** + * Specifies the language of the input text. + * The source language must be one of the supported languages included in the dictionary scope. + */ + from: string; + /** + * Specifies the language of the output text. + * The target language must be one of the supported languages included in the dictionary scope. + */ + to: string; +} + +export interface LookupDictionaryExamplesQueryParam { + queryParameters: LookupDictionaryExamplesQueryParamProperties; +} + +export interface LookupDictionaryExamplesHeaderParam { + headers?: RawHttpHeadersInput & LookupDictionaryExamplesHeaders; +} + +export type LookupDictionaryExamplesParameters = LookupDictionaryExamplesQueryParam & + LookupDictionaryExamplesHeaderParam & + LookupDictionaryExamplesBodyParam & + RequestParameters; diff --git a/sdk/translation/ai-translation-text-rest/src/responses.ts b/sdk/translation/ai-translation-text-rest/src/responses.ts new file mode 100644 index 000000000000..63317a3b0ca4 --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/src/responses.ts @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { RawHttpHeaders } from "@azure/core-rest-pipeline"; +import type { HttpResponse } from "@azure-rest/core-client"; +import type { + GetSupportedLanguagesResultOutput, + ErrorResponseOutput, + TranslatedTextItemOutput, + TransliteratedTextOutput, + BreakSentenceItemOutput, + DictionaryLookupItemOutput, + DictionaryExampleItemOutput, +} from "./outputModels.js"; + +export interface GetSupportedLanguages200Headers { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; + /** + * Current value of the entity tag for the requested groups of supported languages. + * To make subsequent requests more efficient, the client may send the `ETag` value in an + * `If-None-Match` header field. + */ + etag: string; +} + +/** The request has succeeded. */ +export interface GetSupportedLanguages200Response extends HttpResponse { + status: "200"; + body: GetSupportedLanguagesResultOutput; + headers: RawHttpHeaders & GetSupportedLanguages200Headers; +} + +export interface GetSupportedLanguagesDefaultHeaders { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +export interface GetSupportedLanguagesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseOutput; + headers: RawHttpHeaders & GetSupportedLanguagesDefaultHeaders; +} + +export interface Translate200Headers { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; + /** + * Specifies the system type that was used for translation for each 'to' language requested for translation. + * The value is a comma-separated list of strings. Each string indicates a type: + * + * * Custom - Request includes a custom system and at least one custom system was used during translation. + * * Team - All other requests + */ + "x-mt-system": string; + /** + * Specifies consumption (the number of characters for which the user will be charged) for the translation + * job request. For example, if the word "Hello" is translated from English (en) to French (fr), + * this field will return the value '5'. + */ + "x-metered-usage": number; +} + +/** Response for the translation API. */ +export interface Translate200Response extends HttpResponse { + status: "200"; + body: Array; + headers: RawHttpHeaders & Translate200Headers; +} + +export interface TranslateDefaultHeaders { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +export interface TranslateDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseOutput; + headers: RawHttpHeaders & TranslateDefaultHeaders; +} + +export interface Transliterate200Headers { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +/** Response for the transliteration API. */ +export interface Transliterate200Response extends HttpResponse { + status: "200"; + body: Array; + headers: RawHttpHeaders & Transliterate200Headers; +} + +export interface TransliterateDefaultHeaders { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +export interface TransliterateDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseOutput; + headers: RawHttpHeaders & TransliterateDefaultHeaders; +} + +export interface FindSentenceBoundaries200Headers { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +/** Response for the Break SEntence API. */ +export interface FindSentenceBoundaries200Response extends HttpResponse { + status: "200"; + body: Array; + headers: RawHttpHeaders & FindSentenceBoundaries200Headers; +} + +export interface FindSentenceBoundariesDefaultHeaders { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +export interface FindSentenceBoundariesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseOutput; + headers: RawHttpHeaders & FindSentenceBoundariesDefaultHeaders; +} + +export interface LookupDictionaryEntries200Headers { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +/** Response for the dictionary lookup API. */ +export interface LookupDictionaryEntries200Response extends HttpResponse { + status: "200"; + body: Array; + headers: RawHttpHeaders & LookupDictionaryEntries200Headers; +} + +export interface LookupDictionaryEntriesDefaultHeaders { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +export interface LookupDictionaryEntriesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseOutput; + headers: RawHttpHeaders & LookupDictionaryEntriesDefaultHeaders; +} + +export interface LookupDictionaryExamples200Headers { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +/** Response for the dictionary examples API. */ +export interface LookupDictionaryExamples200Response extends HttpResponse { + status: "200"; + body: Array; + headers: RawHttpHeaders & LookupDictionaryExamples200Headers; +} + +export interface LookupDictionaryExamplesDefaultHeaders { + /** Value generated by the service to identify the request. It is used for troubleshooting purposes. */ + "x-requestid": string; +} + +export interface LookupDictionaryExamplesDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseOutput; + headers: RawHttpHeaders & LookupDictionaryExamplesDefaultHeaders; +} diff --git a/sdk/translation/ai-translation-text-rest/src/serializeHelper.ts b/sdk/translation/ai-translation-text-rest/src/serializeHelper.ts new file mode 100644 index 000000000000..593ee9fcc7ba --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/src/serializeHelper.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export function buildMultiCollection(items: string[], parameterName: string): string { + return items + .map((item, index) => { + if (index === 0) { + return item; + } + return `${parameterName}=${item}`; + }) + .join("&"); +} diff --git a/sdk/translation/ai-translation-text-rest/src/textTranslationClient.ts b/sdk/translation/ai-translation-text-rest/src/textTranslationClient.ts new file mode 100644 index 000000000000..a5375b7a48d8 --- /dev/null +++ b/sdk/translation/ai-translation-text-rest/src/textTranslationClient.ts @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { ClientOptions } from "@azure-rest/core-client"; +import { getClient } from "@azure-rest/core-client"; +import { logger } from "./logger.js"; +import type { TextTranslationClient } from "./clientDefinitions.js"; + +/** The optional parameters for the client */ +export interface TextTranslationClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + +/** + * Initialize a new instance of `TextTranslationClient` + * @param endpointParam - Supported Text Translation endpoints (protocol and hostname, for example: + * https://api.cognitive.microsofttranslator.com). + * @param options - the parameter for all optional parameters + */ +export default function createClient( + endpointParam: string, + { apiVersion = "3.0", ...options }: TextTranslationClientOptions = {}, +): TextTranslationClient { + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`; + const userAgentInfo = `azsdk-js-ai-translation-text-rest/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` + : `${userAgentInfo}`; + options = { + ...options, + userAgentOptions: { + userAgentPrefix, + }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + }; + const client = getClient(endpointUrl, options) as TextTranslationClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + + return client; +} From 0da67e98c9afadce07fda5ba20084fb2885ff3c2 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:54:01 +0800 Subject: [PATCH 37/55] [data-plane] refresh iot-device-update-rest sdk (#30963) https://github.com/Azure/azure-sdk-for-js/issues/30680 --------- Co-authored-by: Jeremy Meng --- .../iot-device-update-rest/CHANGELOG.md | 9 +- .../iot-device-update-rest/karma.conf.js | 133 ++++ .../iot-device-update-rest/package.json | 5 +- .../review/iot-device-update.api.md | 525 ++++++++-------- .../samples-dev/deleteUpdate.ts | 2 +- .../samples-dev/deployUpdate.ts | 2 +- .../samples-dev/importUpdate.ts | 2 +- .../samples/v1/javascript/deleteUpdate.js | 4 +- .../samples/v1/javascript/deployUpdate.js | 10 +- .../samples/v1/javascript/getUpdate.js | 8 +- .../samples/v1/javascript/importUpdate.js | 2 +- .../samples/v1/javascript/listUpdates.js | 2 +- .../samples/v1/javascript/package.json | 5 +- .../samples/v1/typescript/package.json | 6 +- .../samples/v1/typescript/src/deleteUpdate.ts | 4 +- .../samples/v1/typescript/src/deployUpdate.ts | 12 +- .../samples/v1/typescript/src/getUpdate.ts | 8 +- .../samples/v1/typescript/src/importUpdate.ts | 2 +- .../samples/v1/typescript/src/listUpdates.ts | 2 +- .../samples/v1/typescript/tsconfig.json | 2 +- .../src/clientDefinitions.ts | 200 +++--- .../src/deviceUpdate.ts | 51 +- .../src/isUnexpected.ts | 573 +++++++++--------- .../iot-device-update-rest/src/logger.ts | 5 + .../iot-device-update-rest/src/models.ts | 21 +- .../src/outputModels.ts | 58 +- .../src/paginateHelper.ts | 146 ++++- .../iot-device-update-rest/src/parameters.ts | 12 +- .../src/pollingHelper.ts | 162 ++++- .../iot-device-update-rest/src/responses.ts | 112 ++-- .../iot-device-update-rest/swagger/README.md | 8 +- 31 files changed, 1288 insertions(+), 805 deletions(-) create mode 100644 sdk/deviceupdate/iot-device-update-rest/karma.conf.js create mode 100644 sdk/deviceupdate/iot-device-update-rest/src/logger.ts diff --git a/sdk/deviceupdate/iot-device-update-rest/CHANGELOG.md b/sdk/deviceupdate/iot-device-update-rest/CHANGELOG.md index 15d057bad76b..6754a58894d1 100644 --- a/sdk/deviceupdate/iot-device-update-rest/CHANGELOG.md +++ b/sdk/deviceupdate/iot-device-update-rest/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 1.0.1 (Unreleased) +## 1.1.0 (2024-12-16) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- refresh @azure-rest/iot-device-update sdk ## 1.0.0 (2022-09-09) diff --git a/sdk/deviceupdate/iot-device-update-rest/karma.conf.js b/sdk/deviceupdate/iot-device-update-rest/karma.conf.js new file mode 100644 index 000000000000..4fdf26c79ac0 --- /dev/null +++ b/sdk/deviceupdate/iot-device-update-rest/karma.conf.js @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// https://github.com/karma-runner/karma-chrome-launcher +process.env.CHROME_BIN = require("puppeteer").executablePath(); +require("dotenv").config(); +const { relativeRecordingsPath } = require("@azure-tools/test-recorder"); +process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); + +module.exports = function (config) { + config.set({ + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: "./", + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ["source-map-support", "mocha"], + + plugins: [ + "karma-mocha", + "karma-mocha-reporter", + "karma-chrome-launcher", + "karma-firefox-launcher", + "karma-env-preprocessor", + "karma-coverage", + "karma-sourcemap-loader", + "karma-junit-reporter", + "karma-source-map-support", + ], + + // list of files / patterns to load in the browser + files: [ + "dist-test/index.browser.js", + { + pattern: "dist-test/index.browser.js.map", + type: "html", + included: false, + served: true, + }, + ], + + // list of files / patterns to exclude + exclude: [], + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + "**/*.js": ["sourcemap", "env"], + // IMPORTANT: COMMENT following line if you want to debug in your browsers!! + // Preprocess source file to calculate code coverage, however this will make source file unreadable + // "dist-test/index.js": ["coverage"] + }, + + envPreprocessor: [ + "TEST_MODE", + "ENDPOINT", + "AZURE_CLIENT_SECRET", + "AZURE_CLIENT_ID", + "AZURE_TENANT_ID", + "SUBSCRIPTION_ID", + "RECORDINGS_RELATIVE_PATH", + ], + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ["mocha", "coverage", "junit"], + + coverageReporter: { + // specify a common output directory + dir: "coverage-browser/", + reporters: [ + { type: "json", subdir: ".", file: "coverage.json" }, + { type: "lcovonly", subdir: ".", file: "lcov.info" }, + { type: "html", subdir: "html" }, + { type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" }, + ], + }, + + junitReporter: { + outputDir: "", // results will be saved as $outputDir/$browserName.xml + outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile + suite: "", // suite will become the package name attribute in xml testsuite element + useBrowserName: false, // add browser name to report and classes names + nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element + classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element + properties: {}, // key value pair of properties to add to the section of the report + }, + + // web server port + port: 9876, + + // enable / disable colors in the output (reporters and logs) + colors: true, + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: false, + + // --no-sandbox allows our tests to run in Linux without having to change the system. + // --disable-web-security allows us to authenticate from the browser without having to write tests using interactive auth, which would be far more complex. + browsers: ["ChromeHeadlessNoSandbox"], + customLaunchers: { + ChromeHeadlessNoSandbox: { + base: "ChromeHeadless", + flags: ["--no-sandbox", "--disable-web-security"], + }, + }, + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: 1, + + browserNoActivityTimeout: 60000000, + browserDisconnectTimeout: 10000, + browserDisconnectTolerance: 3, + + client: { + mocha: { + // change Karma's debug.html to the mocha web reporter + reporter: "html", + timeout: "600000", + }, + }, + }); +}; diff --git a/sdk/deviceupdate/iot-device-update-rest/package.json b/sdk/deviceupdate/iot-device-update-rest/package.json index dd3df1ba5eb4..ffd14f1eb772 100644 --- a/sdk/deviceupdate/iot-device-update-rest/package.json +++ b/sdk/deviceupdate/iot-device-update-rest/package.json @@ -3,7 +3,7 @@ "sdk-type": "client", "author": "Microsoft Corporation", "description": "Device Update for IoT Hub is an Azure service that enables customers to publish update for their IoT devices to the cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. It works globally and knows when and how to update devices, enabling customers to focus on their business goals and let Device Update for IoT Hub handle the updates.", - "version": "1.0.1", + "version": "1.1.0", "keywords": [ "node", "azure", @@ -76,9 +76,10 @@ "sideEffects": false, "autoPublish": false, "dependencies": { + "@azure/core-lro": "^3.1.0", + "@azure/abort-controller": "^2.1.2", "@azure-rest/core-client": "^2.3.1", "@azure/core-auth": "^1.9.0", - "@azure/core-lro": "^2.7.2", "@azure/core-paging": "^1.6.2", "@azure/core-rest-pipeline": "^1.18.0", "@azure/logger": "^1.1.4", diff --git a/sdk/deviceupdate/iot-device-update-rest/review/iot-device-update.api.md b/sdk/deviceupdate/iot-device-update-rest/review/iot-device-update.api.md index ec5f81427ab7..43d686133dfa 100644 --- a/sdk/deviceupdate/iot-device-update-rest/review/iot-device-update.api.md +++ b/sdk/deviceupdate/iot-device-update-rest/review/iot-device-update.api.md @@ -4,55 +4,55 @@ ```ts +import type { AbortSignalLike } from '@azure/abort-controller'; +import type { CancelOnProgress } from '@azure/core-lro'; import type { Client } from '@azure-rest/core-client'; import type { ClientOptions } from '@azure-rest/core-client'; +import type { CreateHttpPollerOptions } from '@azure/core-lro'; import type { HttpResponse } from '@azure-rest/core-client'; -import type { LroEngineOptions } from '@azure/core-lro'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; +import type { OperationState } from '@azure/core-lro'; import type { PathUncheckedResponse } from '@azure-rest/core-client'; -import type { PollerLike } from '@azure/core-lro'; -import type { PollOperationState } from '@azure/core-lro'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; import type { RequestParameters } from '@azure-rest/core-client'; import type { StreamableMethod } from '@azure-rest/core-client'; import type { TokenCredential } from '@azure/core-auth'; -// @public (undocumented) +// @public export interface CloudInitiatedRollbackPolicy { failure: CloudInitiatedRollbackPolicyFailure; update: UpdateInfo; } -// @public (undocumented) +// @public export interface CloudInitiatedRollbackPolicyFailure { devicesFailedCount: number; devicesFailedPercentage: number; } -// @public (undocumented) +// @public export interface CloudInitiatedRollbackPolicyFailureOutput { devicesFailedCount: number; devicesFailedPercentage: number; } -// @public (undocumented) +// @public export interface CloudInitiatedRollbackPolicyOutput { failure: CloudInitiatedRollbackPolicyFailureOutput; update: UpdateInfoOutput; } -// @public (undocumented) +// @public export interface ContractModelOutput { id: string; name: string; } -// @public (undocumented) -function createClient(endpoint: string, credentials: TokenCredential, options?: ClientOptions): DeviceUpdateClient; +// @public +function createClient(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: DeviceUpdateClientOptions): DeviceUpdateClient; export default createClient; -// @public (undocumented) +// @public export interface Deployment { deploymentId: string; deviceClassSubgroups?: Array; @@ -65,7 +65,7 @@ export interface Deployment { update: UpdateInfo; } -// @public (undocumented) +// @public export interface DeploymentDeviceStateOutput { deviceId: string; deviceState: "Succeeded" | "InProgress" | "Canceled" | "Failed"; @@ -74,13 +74,13 @@ export interface DeploymentDeviceStateOutput { retryCount: number; } -// @public (undocumented) +// @public export interface DeploymentDeviceStatesListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface DeploymentOutput { deploymentId: string; deviceClassSubgroups?: Array; @@ -93,13 +93,13 @@ export interface DeploymentOutput { update: UpdateInfoOutput; } -// @public (undocumented) +// @public export interface DeploymentsListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface DeploymentStatusOutput { deploymentState: "Active" | "ActiveWithSubgroupFailures" | "Failed" | "Inactive" | "Canceled"; error?: ErrorModelOutput; @@ -107,13 +107,13 @@ export interface DeploymentStatusOutput { subgroupStatus: Array; } -// @public (undocumented) +// @public export interface DeviceClassesListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface DeviceClassOutput { bestCompatibleUpdate?: UpdateInfoOutput; deviceClassId: string; @@ -121,13 +121,13 @@ export interface DeviceClassOutput { friendlyName?: string; } -// @public (undocumented) +// @public export interface DeviceClassPropertiesOutput { compatProperties: Record; contractModel?: ContractModelOutput; } -// @public (undocumented) +// @public export interface DeviceClassSubgroupDeploymentStatusOutput { deploymentState: "Active" | "Failed" | "Inactive" | "Canceled"; deviceClassId: string; @@ -140,7 +140,7 @@ export interface DeviceClassSubgroupDeploymentStatusOutput { totalDevices?: number; } -// @public (undocumented) +// @public export interface DeviceClassSubgroupOutput { createdDateTime: string; deploymentId?: string; @@ -149,19 +149,19 @@ export interface DeviceClassSubgroupOutput { groupId: string; } -// @public (undocumented) +// @public export interface DeviceClassSubgroupsListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface DeviceClassSubgroupUpdatableDevicesListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface DeviceClassSubgroupUpdatableDevicesOutput { deviceClassId: string; deviceCount: number; @@ -169,13 +169,13 @@ export interface DeviceClassSubgroupUpdatableDevicesOutput { update: UpdateInfoOutput; } -// @public (undocumented) +// @public export interface DeviceHealthListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface DeviceHealthOutput { deviceId: string; digitalTwinModelId?: string; @@ -198,7 +198,7 @@ export interface DeviceManagementCreateOrUpdateDeploymentBodyParam { } // @public -export interface DeviceManagementCreateOrUpdateDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementCreateOrUpdateDeploymentDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -215,14 +215,12 @@ export type DeviceManagementCreateOrUpdateDeploymentParameters = DeviceManagemen // @public export interface DeviceManagementDeleteDeployment204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } // @public -export interface DeviceManagementDeleteDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementDeleteDeploymentDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -231,14 +229,12 @@ export interface DeviceManagementDeleteDeploymentdefaultResponse extends HttpRes // @public export interface DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } // @public -export interface DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse extends HttpResponse { +export interface DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -253,14 +249,12 @@ export type DeviceManagementDeleteDeploymentParameters = RequestParameters; // @public export interface DeviceManagementDeleteDeviceClass204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } // @public -export interface DeviceManagementDeleteDeviceClassdefaultResponse extends HttpResponse { +export interface DeviceManagementDeleteDeviceClassDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -272,14 +266,12 @@ export type DeviceManagementDeleteDeviceClassParameters = RequestParameters; // @public export interface DeviceManagementDeleteDeviceClassSubgroup204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } // @public -export interface DeviceManagementDeleteDeviceClassSubgroupdefaultResponse extends HttpResponse { +export interface DeviceManagementDeleteDeviceClassSubgroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -291,14 +283,12 @@ export type DeviceManagementDeleteDeviceClassSubgroupParameters = RequestParamet // @public export interface DeviceManagementDeleteGroup204Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "204"; } // @public -export interface DeviceManagementDeleteGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementDeleteGroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -310,7 +300,7 @@ export type DeviceManagementDeleteGroupParameters = RequestParameters; // @public (undocumented) export interface DeviceManagementGetBestUpdatesForDeviceClassSubgroup { - get(options?: DeviceManagementGetBestUpdatesForDeviceClassSubgroupParameters): StreamableMethod; + get(options?: DeviceManagementGetBestUpdatesForDeviceClassSubgroupParameters): StreamableMethod; } // @public @@ -322,7 +312,7 @@ export interface DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response } // @public -export interface DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse extends HttpResponse { +export interface DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -334,9 +324,9 @@ export type DeviceManagementGetBestUpdatesForDeviceClassSubgroupParameters = Req // @public (undocumented) export interface DeviceManagementGetDeployment { - delete(options?: DeviceManagementDeleteDeploymentParameters): StreamableMethod; - get(options?: DeviceManagementGetDeploymentParameters): StreamableMethod; - put(options: DeviceManagementCreateOrUpdateDeploymentParameters): StreamableMethod; + delete(options?: DeviceManagementDeleteDeploymentParameters): StreamableMethod; + get(options?: DeviceManagementGetDeploymentParameters): StreamableMethod; + put(options: DeviceManagementCreateOrUpdateDeploymentParameters): StreamableMethod; } // @public @@ -348,7 +338,7 @@ export interface DeviceManagementGetDeployment200Response extends HttpResponse { } // @public -export interface DeviceManagementGetDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeploymentDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -357,8 +347,8 @@ export interface DeviceManagementGetDeploymentdefaultResponse extends HttpRespon // @public (undocumented) export interface DeviceManagementGetDeploymentForDeviceClassSubgroup { - delete(options?: DeviceManagementDeleteDeploymentForDeviceClassSubgroupParameters): StreamableMethod; - get(options?: DeviceManagementGetDeploymentForDeviceClassSubgroupParameters): StreamableMethod; + delete(options?: DeviceManagementDeleteDeploymentForDeviceClassSubgroupParameters): StreamableMethod; + get(options?: DeviceManagementGetDeploymentForDeviceClassSubgroupParameters): StreamableMethod; } // @public @@ -370,7 +360,7 @@ export interface DeviceManagementGetDeploymentForDeviceClassSubgroup200Response } // @public -export interface DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -385,7 +375,7 @@ export type DeviceManagementGetDeploymentParameters = RequestParameters; // @public (undocumented) export interface DeviceManagementGetDeploymentStatus { - get(options?: DeviceManagementGetDeploymentStatusParameters): StreamableMethod; + get(options?: DeviceManagementGetDeploymentStatusParameters): StreamableMethod; } // @public @@ -397,7 +387,7 @@ export interface DeviceManagementGetDeploymentStatus200Response extends HttpResp } // @public -export interface DeviceManagementGetDeploymentStatusdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeploymentStatusDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -409,7 +399,7 @@ export type DeviceManagementGetDeploymentStatusParameters = RequestParameters; // @public (undocumented) export interface DeviceManagementGetDevice { - get(options?: DeviceManagementGetDeviceParameters): StreamableMethod; + get(options?: DeviceManagementGetDeviceParameters): StreamableMethod; } // @public @@ -422,9 +412,9 @@ export interface DeviceManagementGetDevice200Response extends HttpResponse { // @public (undocumented) export interface DeviceManagementGetDeviceClass { - delete(options?: DeviceManagementDeleteDeviceClassParameters): StreamableMethod; - get(options?: DeviceManagementGetDeviceClassParameters): StreamableMethod; - patch(options: DeviceManagementUpdateDeviceClassParameters): StreamableMethod; + delete(options?: DeviceManagementDeleteDeviceClassParameters): StreamableMethod; + get(options?: DeviceManagementGetDeviceClassParameters): StreamableMethod; + patch(options: DeviceManagementUpdateDeviceClassParameters): StreamableMethod; } // @public @@ -436,7 +426,7 @@ export interface DeviceManagementGetDeviceClass200Response extends HttpResponse } // @public -export interface DeviceManagementGetDeviceClassdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceClassDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -448,8 +438,8 @@ export type DeviceManagementGetDeviceClassParameters = RequestParameters; // @public (undocumented) export interface DeviceManagementGetDeviceClassSubgroup { - delete(options?: DeviceManagementDeleteDeviceClassSubgroupParameters): StreamableMethod; - get(options?: DeviceManagementGetDeviceClassSubgroupParameters): StreamableMethod; + delete(options?: DeviceManagementDeleteDeviceClassSubgroupParameters): StreamableMethod; + get(options?: DeviceManagementGetDeviceClassSubgroupParameters): StreamableMethod; } // @public @@ -461,7 +451,7 @@ export interface DeviceManagementGetDeviceClassSubgroup200Response extends HttpR } // @public -export interface DeviceManagementGetDeviceClassSubgroupdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceClassSubgroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -470,7 +460,7 @@ export interface DeviceManagementGetDeviceClassSubgroupdefaultResponse extends H // @public (undocumented) export interface DeviceManagementGetDeviceClassSubgroupDeploymentStatus { - get(options?: DeviceManagementGetDeviceClassSubgroupDeploymentStatusParameters): StreamableMethod; + get(options?: DeviceManagementGetDeviceClassSubgroupDeploymentStatusParameters): StreamableMethod; } // @public @@ -482,7 +472,7 @@ export interface DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Respon } // @public -export interface DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -497,7 +487,7 @@ export type DeviceManagementGetDeviceClassSubgroupParameters = RequestParameters // @public (undocumented) export interface DeviceManagementGetDeviceClassSubgroupUpdateCompliance { - get(options?: DeviceManagementGetDeviceClassSubgroupUpdateComplianceParameters): StreamableMethod; + get(options?: DeviceManagementGetDeviceClassSubgroupUpdateComplianceParameters): StreamableMethod; } // @public @@ -509,7 +499,7 @@ export interface DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Respon } // @public -export interface DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -520,7 +510,7 @@ export interface DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultRe export type DeviceManagementGetDeviceClassSubgroupUpdateComplianceParameters = RequestParameters; // @public -export interface DeviceManagementGetDevicedefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -529,7 +519,7 @@ export interface DeviceManagementGetDevicedefaultResponse extends HttpResponse { // @public (undocumented) export interface DeviceManagementGetDeviceModule { - get(options?: DeviceManagementGetDeviceModuleParameters): StreamableMethod; + get(options?: DeviceManagementGetDeviceModuleParameters): StreamableMethod; } // @public @@ -541,7 +531,7 @@ export interface DeviceManagementGetDeviceModule200Response extends HttpResponse } // @public -export interface DeviceManagementGetDeviceModuledefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceModuleDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -556,8 +546,8 @@ export type DeviceManagementGetDeviceParameters = RequestParameters; // @public (undocumented) export interface DeviceManagementGetGroup { - delete(options?: DeviceManagementDeleteGroupParameters): StreamableMethod; - get(options?: DeviceManagementGetGroupParameters): StreamableMethod; + delete(options?: DeviceManagementDeleteGroupParameters): StreamableMethod; + get(options?: DeviceManagementGetGroupParameters): StreamableMethod; } // @public @@ -569,7 +559,7 @@ export interface DeviceManagementGetGroup200Response extends HttpResponse { } // @public -export interface DeviceManagementGetGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementGetGroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -588,7 +578,7 @@ export interface DeviceManagementGetLogCollection200Response extends HttpRespons } // @public -export interface DeviceManagementGetLogCollectiondefaultResponse extends HttpResponse { +export interface DeviceManagementGetLogCollectionDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -597,7 +587,7 @@ export interface DeviceManagementGetLogCollectiondefaultResponse extends HttpRes // @public (undocumented) export interface DeviceManagementGetLogCollectionDetailedStatus { - get(options?: DeviceManagementGetLogCollectionDetailedStatusParameters): StreamableMethod; + get(options?: DeviceManagementGetLogCollectionDetailedStatusParameters): StreamableMethod; } // @public @@ -609,7 +599,7 @@ export interface DeviceManagementGetLogCollectionDetailedStatus200Response exten } // @public -export interface DeviceManagementGetLogCollectionDetailedStatusdefaultResponse extends HttpResponse { +export interface DeviceManagementGetLogCollectionDetailedStatusDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -624,7 +614,7 @@ export type DeviceManagementGetLogCollectionParameters = RequestParameters; // @public (undocumented) export interface DeviceManagementGetOperationStatus { - get(options?: DeviceManagementGetOperationStatusParameters): StreamableMethod; + get(options?: DeviceManagementGetOperationStatusParameters): StreamableMethod; } // @public (undocumented) @@ -644,14 +634,12 @@ export interface DeviceManagementGetOperationStatus200Response extends HttpRespo // @public export interface DeviceManagementGetOperationStatus304Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "304"; } // @public -export interface DeviceManagementGetOperationStatusdefaultResponse extends HttpResponse { +export interface DeviceManagementGetOperationStatusDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -661,7 +649,7 @@ export interface DeviceManagementGetOperationStatusdefaultResponse extends HttpR // @public (undocumented) export interface DeviceManagementGetOperationStatusHeaderParam { // (undocumented) - headers: RawHttpHeadersInput & DeviceManagementGetOperationStatusHeaders; + headers?: RawHttpHeadersInput & DeviceManagementGetOperationStatusHeaders; } // @public (undocumented) @@ -674,7 +662,7 @@ export type DeviceManagementGetOperationStatusParameters = DeviceManagementGetOp // @public (undocumented) export interface DeviceManagementGetUpdateCompliance { - get(options?: DeviceManagementGetUpdateComplianceParameters): StreamableMethod; + get(options?: DeviceManagementGetUpdateComplianceParameters): StreamableMethod; } // @public @@ -686,7 +674,7 @@ export interface DeviceManagementGetUpdateCompliance200Response extends HttpResp } // @public -export interface DeviceManagementGetUpdateCompliancedefaultResponse extends HttpResponse { +export interface DeviceManagementGetUpdateComplianceDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -695,7 +683,7 @@ export interface DeviceManagementGetUpdateCompliancedefaultResponse extends Http // @public (undocumented) export interface DeviceManagementGetUpdateComplianceForGroup { - get(options?: DeviceManagementGetUpdateComplianceForGroupParameters): StreamableMethod; + get(options?: DeviceManagementGetUpdateComplianceForGroupParameters): StreamableMethod; } // @public @@ -707,7 +695,7 @@ export interface DeviceManagementGetUpdateComplianceForGroup200Response extends } // @public -export interface DeviceManagementGetUpdateComplianceForGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementGetUpdateComplianceForGroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -722,7 +710,7 @@ export type DeviceManagementGetUpdateComplianceParameters = RequestParameters; // @public (undocumented) export interface DeviceManagementImportDevices { - post(options: DeviceManagementImportDevicesParameters): StreamableMethod; + post(options: DeviceManagementImportDevicesParameters): StreamableMethod; } // @public (undocumented) @@ -732,8 +720,6 @@ export interface DeviceManagementImportDevices202Headers { // @public export interface DeviceManagementImportDevices202Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) headers: RawHttpHeaders & DeviceManagementImportDevices202Headers; // (undocumented) @@ -746,7 +732,7 @@ export interface DeviceManagementImportDevicesBodyParam { } // @public -export interface DeviceManagementImportDevicesdefaultResponse extends HttpResponse { +export interface DeviceManagementImportDevicesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -763,7 +749,7 @@ export type DeviceManagementImportDevicesParameters = DeviceManagementImportDevi // @public (undocumented) export interface DeviceManagementListBestUpdatesForGroup { - get(options?: DeviceManagementListBestUpdatesForGroupParameters): StreamableMethod; + get(options?: DeviceManagementListBestUpdatesForGroupParameters): StreamableMethod; } // @public @@ -775,7 +761,7 @@ export interface DeviceManagementListBestUpdatesForGroup200Response extends Http } // @public -export interface DeviceManagementListBestUpdatesForGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementListBestUpdatesForGroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -787,7 +773,7 @@ export type DeviceManagementListBestUpdatesForGroupParameters = RequestParameter // @public (undocumented) export interface DeviceManagementListDeploymentsForDeviceClassSubgroup { - get(options?: DeviceManagementListDeploymentsForDeviceClassSubgroupParameters): StreamableMethod; + get(options?: DeviceManagementListDeploymentsForDeviceClassSubgroupParameters): StreamableMethod; } // @public @@ -799,7 +785,7 @@ export interface DeviceManagementListDeploymentsForDeviceClassSubgroup200Respons } // @public -export interface DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse extends HttpResponse { +export interface DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -822,7 +808,7 @@ export interface DeviceManagementListDeploymentsForDeviceClassSubgroupQueryParam // @public (undocumented) export interface DeviceManagementListDeploymentsForGroup { - get(options?: DeviceManagementListDeploymentsForGroupParameters): StreamableMethod; + get(options?: DeviceManagementListDeploymentsForGroupParameters): StreamableMethod; } // @public @@ -834,7 +820,7 @@ export interface DeviceManagementListDeploymentsForGroup200Response extends Http } // @public -export interface DeviceManagementListDeploymentsForGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementListDeploymentsForGroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -857,7 +843,7 @@ export interface DeviceManagementListDeploymentsForGroupQueryParamProperties { // @public (undocumented) export interface DeviceManagementListDeviceClasses { - get(options?: DeviceManagementListDeviceClassesParameters): StreamableMethod; + get(options?: DeviceManagementListDeviceClassesParameters): StreamableMethod; } // @public @@ -869,7 +855,7 @@ export interface DeviceManagementListDeviceClasses200Response extends HttpRespon } // @public -export interface DeviceManagementListDeviceClassesdefaultResponse extends HttpResponse { +export interface DeviceManagementListDeviceClassesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -892,7 +878,7 @@ export interface DeviceManagementListDeviceClassesQueryParamProperties { // @public (undocumented) export interface DeviceManagementListDeviceClassSubgroupsForGroup { - get(options?: DeviceManagementListDeviceClassSubgroupsForGroupParameters): StreamableMethod; + get(options?: DeviceManagementListDeviceClassSubgroupsForGroupParameters): StreamableMethod; } // @public @@ -904,7 +890,7 @@ export interface DeviceManagementListDeviceClassSubgroupsForGroup200Response ext } // @public -export interface DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -927,7 +913,7 @@ export interface DeviceManagementListDeviceClassSubgroupsForGroupQueryParamPrope // @public (undocumented) export interface DeviceManagementListDevices { - get(options?: DeviceManagementListDevicesParameters): StreamableMethod; + get(options?: DeviceManagementListDevicesParameters): StreamableMethod; } // @public @@ -939,7 +925,7 @@ export interface DeviceManagementListDevices200Response extends HttpResponse { } // @public -export interface DeviceManagementListDevicesdefaultResponse extends HttpResponse { +export interface DeviceManagementListDevicesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -962,7 +948,7 @@ export interface DeviceManagementListDevicesQueryParamProperties { // @public (undocumented) export interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment { - get(options?: DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentParameters): StreamableMethod; + get(options?: DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentParameters): StreamableMethod; } // @public @@ -974,7 +960,7 @@ export interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymen } // @public -export interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -997,7 +983,7 @@ export interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymen // @public (undocumented) export interface DeviceManagementListGroups { - get(options?: DeviceManagementListGroupsParameters): StreamableMethod; + get(options?: DeviceManagementListGroupsParameters): StreamableMethod; } // @public @@ -1009,7 +995,7 @@ export interface DeviceManagementListGroups200Response extends HttpResponse { } // @public -export interface DeviceManagementListGroupsdefaultResponse extends HttpResponse { +export interface DeviceManagementListGroupsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1032,7 +1018,7 @@ export interface DeviceManagementListGroupsQueryParamProperties { // @public (undocumented) export interface DeviceManagementListHealthOfDevices { - get(options: DeviceManagementListHealthOfDevicesParameters): StreamableMethod; + get(options: DeviceManagementListHealthOfDevicesParameters): StreamableMethod; } // @public @@ -1044,7 +1030,7 @@ export interface DeviceManagementListHealthOfDevices200Response extends HttpResp } // @public -export interface DeviceManagementListHealthOfDevicesdefaultResponse extends HttpResponse { +export interface DeviceManagementListHealthOfDevicesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1067,7 +1053,7 @@ export interface DeviceManagementListHealthOfDevicesQueryParamProperties { // @public (undocumented) export interface DeviceManagementListInstallableUpdatesForDeviceClass { - get(options?: DeviceManagementListInstallableUpdatesForDeviceClassParameters): StreamableMethod; + get(options?: DeviceManagementListInstallableUpdatesForDeviceClassParameters): StreamableMethod; } // @public @@ -1079,7 +1065,7 @@ export interface DeviceManagementListInstallableUpdatesForDeviceClass200Response } // @public -export interface DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse extends HttpResponse { +export interface DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1091,7 +1077,7 @@ export type DeviceManagementListInstallableUpdatesForDeviceClassParameters = Req // @public (undocumented) export interface DeviceManagementListLogCollections { - get(options?: DeviceManagementListLogCollectionsParameters): StreamableMethod; + get(options?: DeviceManagementListLogCollectionsParameters): StreamableMethod; } // @public @@ -1103,7 +1089,7 @@ export interface DeviceManagementListLogCollections200Response extends HttpRespo } // @public -export interface DeviceManagementListLogCollectionsdefaultResponse extends HttpResponse { +export interface DeviceManagementListLogCollectionsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1115,7 +1101,7 @@ export type DeviceManagementListLogCollectionsParameters = RequestParameters; // @public (undocumented) export interface DeviceManagementListOperationStatuses { - get(options?: DeviceManagementListOperationStatusesParameters): StreamableMethod; + get(options?: DeviceManagementListOperationStatusesParameters): StreamableMethod; } // @public @@ -1127,7 +1113,7 @@ export interface DeviceManagementListOperationStatuses200Response extends HttpRe } // @public -export interface DeviceManagementListOperationStatusesdefaultResponse extends HttpResponse { +export interface DeviceManagementListOperationStatusesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1151,7 +1137,7 @@ export interface DeviceManagementListOperationStatusesQueryParamProperties { // @public (undocumented) export interface DeviceManagementRetryDeployment { - post(options?: DeviceManagementRetryDeploymentParameters): StreamableMethod; + post(options?: DeviceManagementRetryDeploymentParameters): StreamableMethod; } // @public @@ -1163,7 +1149,7 @@ export interface DeviceManagementRetryDeployment200Response extends HttpResponse } // @public -export interface DeviceManagementRetryDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementRetryDeploymentDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1175,8 +1161,8 @@ export type DeviceManagementRetryDeploymentParameters = RequestParameters; // @public (undocumented) export interface DeviceManagementStartLogCollection { - get(options?: DeviceManagementGetLogCollectionParameters): StreamableMethod; - put(options: DeviceManagementStartLogCollectionParameters): StreamableMethod; + get(options?: DeviceManagementGetLogCollectionParameters): StreamableMethod; + put(options: DeviceManagementStartLogCollectionParameters): StreamableMethod; } // @public @@ -1193,7 +1179,7 @@ export interface DeviceManagementStartLogCollectionBodyParam { } // @public -export interface DeviceManagementStartLogCollectiondefaultResponse extends HttpResponse { +export interface DeviceManagementStartLogCollectionDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1210,7 +1196,7 @@ export type DeviceManagementStartLogCollectionParameters = DeviceManagementStart // @public (undocumented) export interface DeviceManagementStopDeployment { - post(options?: DeviceManagementStopDeploymentParameters): StreamableMethod; + post(options?: DeviceManagementStopDeploymentParameters): StreamableMethod; } // @public @@ -1222,7 +1208,7 @@ export interface DeviceManagementStopDeployment200Response extends HttpResponse } // @public -export interface DeviceManagementStopDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementStopDeploymentDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1242,11 +1228,11 @@ export interface DeviceManagementUpdateDeviceClass200Response extends HttpRespon // @public (undocumented) export interface DeviceManagementUpdateDeviceClassBodyParam { - body: PatchBody; + body: PatchBodyResourceMergeAndPatch; } // @public -export interface DeviceManagementUpdateDeviceClassdefaultResponse extends HttpResponse { +export interface DeviceManagementUpdateDeviceClassDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1261,7 +1247,7 @@ export interface DeviceManagementUpdateDeviceClassMediaTypesParam { // @public (undocumented) export type DeviceManagementUpdateDeviceClassParameters = DeviceManagementUpdateDeviceClassMediaTypesParam & DeviceManagementUpdateDeviceClassBodyParam & RequestParameters; -// @public (undocumented) +// @public export interface DeviceOperationOutput { createdDateTime: string; error?: ErrorModelOutput; @@ -1272,13 +1258,13 @@ export interface DeviceOperationOutput { traceId?: string; } -// @public (undocumented) +// @public export interface DeviceOperationsListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface DeviceOutput { deploymentStatus?: "Succeeded" | "InProgress" | "Canceled" | "Failed"; deviceClassId: string; @@ -1292,19 +1278,19 @@ export interface DeviceOutput { onLatestUpdate: boolean; } -// @public (undocumented) +// @public export interface DevicesListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface DeviceUpdateAgentId { deviceId: string; moduleId?: string; } -// @public (undocumented) +// @public export interface DeviceUpdateAgentIdOutput { deviceId: string; moduleId?: string; @@ -1315,6 +1301,11 @@ export type DeviceUpdateClient = Client & { path: Routes; }; +// @public +export interface DeviceUpdateClientOptions extends ClientOptions { + apiVersion?: string; +} + // @public (undocumented) export interface DeviceUpdateDeleteUpdate202Headers { "operation-location"?: string; @@ -1322,8 +1313,6 @@ export interface DeviceUpdateDeleteUpdate202Headers { // @public export interface DeviceUpdateDeleteUpdate202Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) headers: RawHttpHeaders & DeviceUpdateDeleteUpdate202Headers; // (undocumented) @@ -1331,7 +1320,7 @@ export interface DeviceUpdateDeleteUpdate202Response extends HttpResponse { } // @public -export interface DeviceUpdateDeleteUpdatedefaultResponse extends HttpResponse { +export interface DeviceUpdateDeleteUpdateDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1343,7 +1332,7 @@ export type DeviceUpdateDeleteUpdateParameters = RequestParameters; // @public (undocumented) export interface DeviceUpdateGetFile { - get(options?: DeviceUpdateGetFileParameters): StreamableMethod; + get(options?: DeviceUpdateGetFileParameters): StreamableMethod; } // @public @@ -1356,14 +1345,12 @@ export interface DeviceUpdateGetFile200Response extends HttpResponse { // @public export interface DeviceUpdateGetFile304Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "304"; } // @public -export interface DeviceUpdateGetFiledefaultResponse extends HttpResponse { +export interface DeviceUpdateGetFileDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1373,7 +1360,7 @@ export interface DeviceUpdateGetFiledefaultResponse extends HttpResponse { // @public (undocumented) export interface DeviceUpdateGetFileHeaderParam { // (undocumented) - headers: RawHttpHeadersInput & DeviceUpdateGetFileHeaders; + headers?: RawHttpHeadersInput & DeviceUpdateGetFileHeaders; } // @public (undocumented) @@ -1386,7 +1373,7 @@ export type DeviceUpdateGetFileParameters = DeviceUpdateGetFileHeaderParam & Req // @public (undocumented) export interface DeviceUpdateGetOperationStatus { - get(options?: DeviceUpdateGetOperationStatusParameters): StreamableMethod; + get(options?: DeviceUpdateGetOperationStatusParameters): StreamableMethod; } // @public (undocumented) @@ -1406,14 +1393,12 @@ export interface DeviceUpdateGetOperationStatus200Response extends HttpResponse // @public export interface DeviceUpdateGetOperationStatus304Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "304"; } // @public -export interface DeviceUpdateGetOperationStatusdefaultResponse extends HttpResponse { +export interface DeviceUpdateGetOperationStatusDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1423,7 +1408,7 @@ export interface DeviceUpdateGetOperationStatusdefaultResponse extends HttpRespo // @public (undocumented) export interface DeviceUpdateGetOperationStatusHeaderParam { // (undocumented) - headers: RawHttpHeadersInput & DeviceUpdateGetOperationStatusHeaders; + headers?: RawHttpHeadersInput & DeviceUpdateGetOperationStatusHeaders; } // @public (undocumented) @@ -1436,8 +1421,8 @@ export type DeviceUpdateGetOperationStatusParameters = DeviceUpdateGetOperationS // @public (undocumented) export interface DeviceUpdateGetUpdate { - delete(options?: DeviceUpdateDeleteUpdateParameters): StreamableMethod; - get(options?: DeviceUpdateGetUpdateParameters): StreamableMethod; + delete(options?: DeviceUpdateDeleteUpdateParameters): StreamableMethod; + get(options?: DeviceUpdateGetUpdateParameters): StreamableMethod; } // @public @@ -1450,14 +1435,12 @@ export interface DeviceUpdateGetUpdate200Response extends HttpResponse { // @public export interface DeviceUpdateGetUpdate304Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) status: "304"; } // @public -export interface DeviceUpdateGetUpdatedefaultResponse extends HttpResponse { +export interface DeviceUpdateGetUpdateDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1467,7 +1450,7 @@ export interface DeviceUpdateGetUpdatedefaultResponse extends HttpResponse { // @public (undocumented) export interface DeviceUpdateGetUpdateHeaderParam { // (undocumented) - headers: RawHttpHeadersInput & DeviceUpdateGetUpdateHeaders; + headers?: RawHttpHeadersInput & DeviceUpdateGetUpdateHeaders; } // @public (undocumented) @@ -1480,7 +1463,7 @@ export type DeviceUpdateGetUpdateParameters = DeviceUpdateGetUpdateHeaderParam & // @public (undocumented) export interface DeviceUpdateImportUpdate { - post(options: DeviceUpdateImportUpdateParameters): StreamableMethod; + post(options: DeviceUpdateImportUpdateParameters): StreamableMethod; } // @public @@ -1498,8 +1481,6 @@ export interface DeviceUpdateImportUpdate202Headers { // @public export interface DeviceUpdateImportUpdate202Response extends HttpResponse { - // (undocumented) - body: Record; // (undocumented) headers: RawHttpHeaders & DeviceUpdateImportUpdate202Headers; // (undocumented) @@ -1512,7 +1493,7 @@ export interface DeviceUpdateImportUpdateBodyParam { } // @public -export interface DeviceUpdateImportUpdatedefaultResponse extends HttpResponse { +export interface DeviceUpdateImportUpdateDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1529,7 +1510,7 @@ export type DeviceUpdateImportUpdateParameters = DeviceUpdateImportUpdateMediaTy // @public (undocumented) export interface DeviceUpdateListFiles { - get(options?: DeviceUpdateListFilesParameters): StreamableMethod; + get(options?: DeviceUpdateListFilesParameters): StreamableMethod; } // @public @@ -1541,7 +1522,7 @@ export interface DeviceUpdateListFiles200Response extends HttpResponse { } // @public -export interface DeviceUpdateListFilesdefaultResponse extends HttpResponse { +export interface DeviceUpdateListFilesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1553,7 +1534,7 @@ export type DeviceUpdateListFilesParameters = RequestParameters; // @public (undocumented) export interface DeviceUpdateListNames { - get(options?: DeviceUpdateListNamesParameters): StreamableMethod; + get(options?: DeviceUpdateListNamesParameters): StreamableMethod; } // @public @@ -1565,7 +1546,7 @@ export interface DeviceUpdateListNames200Response extends HttpResponse { } // @public -export interface DeviceUpdateListNamesdefaultResponse extends HttpResponse { +export interface DeviceUpdateListNamesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1577,7 +1558,7 @@ export type DeviceUpdateListNamesParameters = RequestParameters; // @public (undocumented) export interface DeviceUpdateListOperationStatuses { - get(options?: DeviceUpdateListOperationStatusesParameters): StreamableMethod; + get(options?: DeviceUpdateListOperationStatusesParameters): StreamableMethod; } // @public @@ -1589,7 +1570,7 @@ export interface DeviceUpdateListOperationStatuses200Response extends HttpRespon } // @public -export interface DeviceUpdateListOperationStatusesdefaultResponse extends HttpResponse { +export interface DeviceUpdateListOperationStatusesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1613,7 +1594,7 @@ export interface DeviceUpdateListOperationStatusesQueryParamProperties { // @public (undocumented) export interface DeviceUpdateListProviders { - get(options?: DeviceUpdateListProvidersParameters): StreamableMethod; + get(options?: DeviceUpdateListProvidersParameters): StreamableMethod; } // @public @@ -1625,7 +1606,7 @@ export interface DeviceUpdateListProviders200Response extends HttpResponse { } // @public -export interface DeviceUpdateListProvidersdefaultResponse extends HttpResponse { +export interface DeviceUpdateListProvidersDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1637,7 +1618,7 @@ export type DeviceUpdateListProvidersParameters = RequestParameters; // @public (undocumented) export interface DeviceUpdateListUpdates { - get(options?: DeviceUpdateListUpdatesParameters): StreamableMethod; + get(options?: DeviceUpdateListUpdatesParameters): StreamableMethod; } // @public @@ -1649,7 +1630,7 @@ export interface DeviceUpdateListUpdates200Response extends HttpResponse { } // @public -export interface DeviceUpdateListUpdatesdefaultResponse extends HttpResponse { +export interface DeviceUpdateListUpdatesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1673,7 +1654,7 @@ export interface DeviceUpdateListUpdatesQueryParamProperties { // @public (undocumented) export interface DeviceUpdateListVersions { - get(options?: DeviceUpdateListVersionsParameters): StreamableMethod; + get(options?: DeviceUpdateListVersionsParameters): StreamableMethod; } // @public @@ -1685,7 +1666,7 @@ export interface DeviceUpdateListVersions200Response extends HttpResponse { } // @public -export interface DeviceUpdateListVersionsdefaultResponse extends HttpResponse { +export interface DeviceUpdateListVersionsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseOutput; // (undocumented) @@ -1706,7 +1687,7 @@ export interface DeviceUpdateListVersionsQueryParamProperties { filter?: string; } -// @public (undocumented) +// @public export interface ErrorModelOutput { code: string; details?: Array; @@ -1716,12 +1697,12 @@ export interface ErrorModelOutput { target?: string; } -// @public (undocumented) +// @public export interface ErrorResponseOutput { error: ErrorModelOutput; } -// @public (undocumented) +// @public export interface FileImportMetadata { filename: string; url: string; @@ -1731,15 +1712,15 @@ export interface FileImportMetadata { export type GetArrayType = T extends Array ? TData : never; // @public -export function getLongRunningPoller(client: Client, initialResponse: TResult, options?: LroEngineOptions>): PollerLike, TResult>; +export function getLongRunningPoller(client: Client, initialResponse: TResult, options?: CreateHttpPollerOptions>): Promise, TResult>>; // @public -export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; -// @public (undocumented) +// @public export interface GroupOutput { createdDateTime: string; deployments?: Array; @@ -1751,33 +1732,33 @@ export interface GroupOutput { subgroupsWithUpdatesInProgressCount?: number; } -// @public (undocumented) +// @public export interface GroupsListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface HealthCheckOutput { name?: string; result?: "success" | "userError"; } -// @public (undocumented) +// @public export interface ImportManifestMetadata { hashes: Record; sizeInBytes: number; url: string; } -// @public (undocumented) +// @public export interface ImportUpdateInputItem { files?: Array; friendlyName?: string; importManifest: ImportManifestMetadata; } -// @public (undocumented) +// @public export interface InnerErrorOutput { code: string; errorDetail?: string; @@ -1785,7 +1766,7 @@ export interface InnerErrorOutput { message?: string; } -// @public (undocumented) +// @public export interface InstallResultOutput { extendedResultCode: number; resultCode: number; @@ -1799,172 +1780,169 @@ export interface InstructionsOutput { } // @public (undocumented) -export function isUnexpected(response: DeviceUpdateListUpdates200Response | DeviceUpdateListUpdatesdefaultResponse): response is DeviceUpdateListUpdatesdefaultResponse; +export function isUnexpected(response: DeviceUpdateListUpdates200Response | DeviceUpdateListUpdatesDefaultResponse): response is DeviceUpdateListUpdatesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateImportUpdate200Response | DeviceUpdateImportUpdate202Response | DeviceUpdateImportUpdatedefaultResponse): response is DeviceUpdateImportUpdatedefaultResponse; +export function isUnexpected(response: DeviceUpdateImportUpdate200Response | DeviceUpdateImportUpdate202Response | DeviceUpdateImportUpdateDefaultResponse): response is DeviceUpdateImportUpdateDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateGetUpdate200Response | DeviceUpdateGetUpdate304Response | DeviceUpdateGetUpdatedefaultResponse): response is DeviceUpdateGetUpdatedefaultResponse; +export function isUnexpected(response: DeviceUpdateGetUpdate200Response | DeviceUpdateGetUpdate304Response | DeviceUpdateGetUpdateDefaultResponse): response is DeviceUpdateGetUpdateDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateDeleteUpdate202Response | DeviceUpdateDeleteUpdatedefaultResponse): response is DeviceUpdateDeleteUpdatedefaultResponse; +export function isUnexpected(response: DeviceUpdateDeleteUpdate202Response | DeviceUpdateDeleteUpdateDefaultResponse): response is DeviceUpdateDeleteUpdateDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateListProviders200Response | DeviceUpdateListProvidersdefaultResponse): response is DeviceUpdateListProvidersdefaultResponse; +export function isUnexpected(response: DeviceUpdateListProviders200Response | DeviceUpdateListProvidersDefaultResponse): response is DeviceUpdateListProvidersDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateListNames200Response | DeviceUpdateListNamesdefaultResponse): response is DeviceUpdateListNamesdefaultResponse; +export function isUnexpected(response: DeviceUpdateListNames200Response | DeviceUpdateListNamesDefaultResponse): response is DeviceUpdateListNamesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateListVersions200Response | DeviceUpdateListVersionsdefaultResponse): response is DeviceUpdateListVersionsdefaultResponse; +export function isUnexpected(response: DeviceUpdateListVersions200Response | DeviceUpdateListVersionsDefaultResponse): response is DeviceUpdateListVersionsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateListFiles200Response | DeviceUpdateListFilesdefaultResponse): response is DeviceUpdateListFilesdefaultResponse; +export function isUnexpected(response: DeviceUpdateListFiles200Response | DeviceUpdateListFilesDefaultResponse): response is DeviceUpdateListFilesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateGetFile200Response | DeviceUpdateGetFile304Response | DeviceUpdateGetFiledefaultResponse): response is DeviceUpdateGetFiledefaultResponse; +export function isUnexpected(response: DeviceUpdateGetFile200Response | DeviceUpdateGetFile304Response | DeviceUpdateGetFileDefaultResponse): response is DeviceUpdateGetFileDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateListOperationStatuses200Response | DeviceUpdateListOperationStatusesdefaultResponse): response is DeviceUpdateListOperationStatusesdefaultResponse; +export function isUnexpected(response: DeviceUpdateListOperationStatuses200Response | DeviceUpdateListOperationStatusesDefaultResponse): response is DeviceUpdateListOperationStatusesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceUpdateGetOperationStatus200Response | DeviceUpdateGetOperationStatus304Response | DeviceUpdateGetOperationStatusdefaultResponse): response is DeviceUpdateGetOperationStatusdefaultResponse; +export function isUnexpected(response: DeviceUpdateGetOperationStatus200Response | DeviceUpdateGetOperationStatus304Response | DeviceUpdateGetOperationStatusDefaultResponse): response is DeviceUpdateGetOperationStatusDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListDeviceClasses200Response | DeviceManagementListDeviceClassesdefaultResponse): response is DeviceManagementListDeviceClassesdefaultResponse; +export function isUnexpected(response: DeviceManagementListDeviceClasses200Response | DeviceManagementListDeviceClassesDefaultResponse): response is DeviceManagementListDeviceClassesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetDeviceClass200Response | DeviceManagementGetDeviceClassdefaultResponse): response is DeviceManagementGetDeviceClassdefaultResponse; +export function isUnexpected(response: DeviceManagementGetDeviceClass200Response | DeviceManagementGetDeviceClassDefaultResponse): response is DeviceManagementGetDeviceClassDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementUpdateDeviceClass200Response | DeviceManagementUpdateDeviceClassdefaultResponse): response is DeviceManagementUpdateDeviceClassdefaultResponse; +export function isUnexpected(response: DeviceManagementUpdateDeviceClass200Response | DeviceManagementUpdateDeviceClassDefaultResponse): response is DeviceManagementUpdateDeviceClassDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementDeleteDeviceClass204Response | DeviceManagementDeleteDeviceClassdefaultResponse): response is DeviceManagementDeleteDeviceClassdefaultResponse; +export function isUnexpected(response: DeviceManagementDeleteDeviceClass204Response | DeviceManagementDeleteDeviceClassDefaultResponse): response is DeviceManagementDeleteDeviceClassDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListInstallableUpdatesForDeviceClass200Response | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse): response is DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse; +export function isUnexpected(response: DeviceManagementListInstallableUpdatesForDeviceClass200Response | DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse): response is DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListDevices200Response | DeviceManagementListDevicesdefaultResponse): response is DeviceManagementListDevicesdefaultResponse; +export function isUnexpected(response: DeviceManagementListDevices200Response | DeviceManagementListDevicesDefaultResponse): response is DeviceManagementListDevicesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementImportDevices202Response | DeviceManagementImportDevicesdefaultResponse): response is DeviceManagementImportDevicesdefaultResponse; +export function isUnexpected(response: DeviceManagementImportDevices202Response | DeviceManagementImportDevicesDefaultResponse): response is DeviceManagementImportDevicesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetDevice200Response | DeviceManagementGetDevicedefaultResponse): response is DeviceManagementGetDevicedefaultResponse; +export function isUnexpected(response: DeviceManagementGetDevice200Response | DeviceManagementGetDeviceDefaultResponse): response is DeviceManagementGetDeviceDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetDeviceModule200Response | DeviceManagementGetDeviceModuledefaultResponse): response is DeviceManagementGetDeviceModuledefaultResponse; +export function isUnexpected(response: DeviceManagementGetDeviceModule200Response | DeviceManagementGetDeviceModuleDefaultResponse): response is DeviceManagementGetDeviceModuleDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetUpdateCompliance200Response | DeviceManagementGetUpdateCompliancedefaultResponse): response is DeviceManagementGetUpdateCompliancedefaultResponse; +export function isUnexpected(response: DeviceManagementGetUpdateCompliance200Response | DeviceManagementGetUpdateComplianceDefaultResponse): response is DeviceManagementGetUpdateComplianceDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListGroups200Response | DeviceManagementListGroupsdefaultResponse): response is DeviceManagementListGroupsdefaultResponse; +export function isUnexpected(response: DeviceManagementListGroups200Response | DeviceManagementListGroupsDefaultResponse): response is DeviceManagementListGroupsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetGroup200Response | DeviceManagementGetGroupdefaultResponse): response is DeviceManagementGetGroupdefaultResponse; +export function isUnexpected(response: DeviceManagementGetGroup200Response | DeviceManagementGetGroupDefaultResponse): response is DeviceManagementGetGroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementDeleteGroup204Response | DeviceManagementDeleteGroupdefaultResponse): response is DeviceManagementDeleteGroupdefaultResponse; +export function isUnexpected(response: DeviceManagementDeleteGroup204Response | DeviceManagementDeleteGroupDefaultResponse): response is DeviceManagementDeleteGroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetUpdateComplianceForGroup200Response | DeviceManagementGetUpdateComplianceForGroupdefaultResponse): response is DeviceManagementGetUpdateComplianceForGroupdefaultResponse; +export function isUnexpected(response: DeviceManagementGetUpdateComplianceForGroup200Response | DeviceManagementGetUpdateComplianceForGroupDefaultResponse): response is DeviceManagementGetUpdateComplianceForGroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListBestUpdatesForGroup200Response | DeviceManagementListBestUpdatesForGroupdefaultResponse): response is DeviceManagementListBestUpdatesForGroupdefaultResponse; +export function isUnexpected(response: DeviceManagementListBestUpdatesForGroup200Response | DeviceManagementListBestUpdatesForGroupDefaultResponse): response is DeviceManagementListBestUpdatesForGroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListDeploymentsForGroup200Response | DeviceManagementListDeploymentsForGroupdefaultResponse): response is DeviceManagementListDeploymentsForGroupdefaultResponse; +export function isUnexpected(response: DeviceManagementListDeploymentsForGroup200Response | DeviceManagementListDeploymentsForGroupDefaultResponse): response is DeviceManagementListDeploymentsForGroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetDeployment200Response | DeviceManagementGetDeploymentdefaultResponse): response is DeviceManagementGetDeploymentdefaultResponse; +export function isUnexpected(response: DeviceManagementGetDeployment200Response | DeviceManagementGetDeploymentDefaultResponse): response is DeviceManagementGetDeploymentDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementCreateOrUpdateDeployment200Response | DeviceManagementCreateOrUpdateDeploymentdefaultResponse): response is DeviceManagementCreateOrUpdateDeploymentdefaultResponse; +export function isUnexpected(response: DeviceManagementCreateOrUpdateDeployment200Response | DeviceManagementCreateOrUpdateDeploymentDefaultResponse): response is DeviceManagementCreateOrUpdateDeploymentDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementDeleteDeployment204Response | DeviceManagementDeleteDeploymentdefaultResponse): response is DeviceManagementDeleteDeploymentdefaultResponse; +export function isUnexpected(response: DeviceManagementDeleteDeployment204Response | DeviceManagementDeleteDeploymentDefaultResponse): response is DeviceManagementDeleteDeploymentDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetDeploymentStatus200Response | DeviceManagementGetDeploymentStatusdefaultResponse): response is DeviceManagementGetDeploymentStatusdefaultResponse; +export function isUnexpected(response: DeviceManagementGetDeploymentStatus200Response | DeviceManagementGetDeploymentStatusDefaultResponse): response is DeviceManagementGetDeploymentStatusDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListDeviceClassSubgroupsForGroup200Response | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse): response is DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse; +export function isUnexpected(response: DeviceManagementListDeviceClassSubgroupsForGroup200Response | DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse): response is DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetDeviceClassSubgroup200Response | DeviceManagementGetDeviceClassSubgroupdefaultResponse): response is DeviceManagementGetDeviceClassSubgroupdefaultResponse; +export function isUnexpected(response: DeviceManagementGetDeviceClassSubgroup200Response | DeviceManagementGetDeviceClassSubgroupDefaultResponse): response is DeviceManagementGetDeviceClassSubgroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementDeleteDeviceClassSubgroup204Response | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse): response is DeviceManagementDeleteDeviceClassSubgroupdefaultResponse; +export function isUnexpected(response: DeviceManagementDeleteDeviceClassSubgroup204Response | DeviceManagementDeleteDeviceClassSubgroupDefaultResponse): response is DeviceManagementDeleteDeviceClassSubgroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse): response is DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse; +export function isUnexpected(response: DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response | DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse): response is DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse): response is DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse; +export function isUnexpected(response: DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response | DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse): response is DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListDeploymentsForDeviceClassSubgroup200Response | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse): response is DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse; +export function isUnexpected(response: DeviceManagementListDeploymentsForDeviceClassSubgroup200Response | DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse): response is DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetDeploymentForDeviceClassSubgroup200Response | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse): response is DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse; +export function isUnexpected(response: DeviceManagementGetDeploymentForDeviceClassSubgroup200Response | DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse): response is DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse): response is DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse; +export function isUnexpected(response: DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response | DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse): response is DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementStopDeployment200Response | DeviceManagementStopDeploymentdefaultResponse): response is DeviceManagementStopDeploymentdefaultResponse; +export function isUnexpected(response: DeviceManagementStopDeployment200Response | DeviceManagementStopDeploymentDefaultResponse): response is DeviceManagementStopDeploymentDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementRetryDeployment200Response | DeviceManagementRetryDeploymentdefaultResponse): response is DeviceManagementRetryDeploymentdefaultResponse; +export function isUnexpected(response: DeviceManagementRetryDeployment200Response | DeviceManagementRetryDeploymentDefaultResponse): response is DeviceManagementRetryDeploymentDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse): response is DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse; +export function isUnexpected(response: DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response | DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse): response is DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse): response is DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse; +export function isUnexpected(response: DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse): response is DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetOperationStatus200Response | DeviceManagementGetOperationStatus304Response | DeviceManagementGetOperationStatusdefaultResponse): response is DeviceManagementGetOperationStatusdefaultResponse; +export function isUnexpected(response: DeviceManagementGetOperationStatus200Response | DeviceManagementGetOperationStatus304Response | DeviceManagementGetOperationStatusDefaultResponse): response is DeviceManagementGetOperationStatusDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListOperationStatuses200Response | DeviceManagementListOperationStatusesdefaultResponse): response is DeviceManagementListOperationStatusesdefaultResponse; +export function isUnexpected(response: DeviceManagementListOperationStatuses200Response | DeviceManagementListOperationStatusesDefaultResponse): response is DeviceManagementListOperationStatusesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementStartLogCollection201Response | DeviceManagementStartLogCollectiondefaultResponse): response is DeviceManagementStartLogCollectiondefaultResponse; +export function isUnexpected(response: DeviceManagementStartLogCollection201Response | DeviceManagementStartLogCollectionDefaultResponse): response is DeviceManagementStartLogCollectionDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetLogCollection200Response | DeviceManagementGetLogCollectiondefaultResponse): response is DeviceManagementGetLogCollectiondefaultResponse; +export function isUnexpected(response: DeviceManagementGetLogCollection200Response | DeviceManagementGetLogCollectionDefaultResponse): response is DeviceManagementGetLogCollectionDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListLogCollections200Response | DeviceManagementListLogCollectionsdefaultResponse): response is DeviceManagementListLogCollectionsdefaultResponse; +export function isUnexpected(response: DeviceManagementListLogCollections200Response | DeviceManagementListLogCollectionsDefaultResponse): response is DeviceManagementListLogCollectionsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementGetLogCollectionDetailedStatus200Response | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse): response is DeviceManagementGetLogCollectionDetailedStatusdefaultResponse; +export function isUnexpected(response: DeviceManagementGetLogCollectionDetailedStatus200Response | DeviceManagementGetLogCollectionDetailedStatusDefaultResponse): response is DeviceManagementGetLogCollectionDetailedStatusDefaultResponse; // @public (undocumented) -export function isUnexpected(response: DeviceManagementListHealthOfDevices200Response | DeviceManagementListHealthOfDevicesdefaultResponse): response is DeviceManagementListHealthOfDevicesdefaultResponse; +export function isUnexpected(response: DeviceManagementListHealthOfDevices200Response | DeviceManagementListHealthOfDevicesDefaultResponse): response is DeviceManagementListHealthOfDevicesDefaultResponse; -// @public (undocumented) +// @public export interface LogCollection { - createdDateTime?: string; description?: string; deviceList: Array; - lastActionDateTime?: string; operationId?: string; - status?: "NotStarted" | "Running" | "Succeeded" | "Failed"; } -// @public (undocumented) +// @public export interface LogCollectionListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface LogCollectionOperationDetailedStatusOutput { createdDateTime?: string; description?: string; @@ -1974,7 +1952,7 @@ export interface LogCollectionOperationDetailedStatusOutput { status?: "NotStarted" | "Running" | "Succeeded" | "Failed"; } -// @public (undocumented) +// @public export interface LogCollectionOperationDeviceStatusOutput { deviceId: string; extendedResultCode?: string; @@ -1984,14 +1962,26 @@ export interface LogCollectionOperationDeviceStatusOutput { status: "NotStarted" | "Running" | "Succeeded" | "Failed"; } -// @public (undocumented) +// @public export interface LogCollectionOutput { - createdDateTime?: string; + readonly createdDateTime?: string; description?: string; deviceList: Array; - lastActionDateTime?: string; + readonly lastActionDateTime?: string; operationId?: string; - status?: "NotStarted" | "Running" | "Succeeded" | "Failed"; + readonly status?: "NotStarted" | "Running" | "Succeeded" | "Failed"; +} + +// @public +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} + +// @public +export interface PageSettings { + continuationToken?: string; } // @public @@ -2009,11 +1999,14 @@ export interface PagingOptions { customGetPage?: GetPage[]>; } -// @public (undocumented) +// @public export interface PatchBody { friendlyName: string; } +// @public +export type PatchBodyResourceMergeAndPatch = Partial; + // @public (undocumented) export interface Routes { (path: "/deviceUpdate/{instanceId}/updates", instanceId: string): DeviceUpdateListUpdates; @@ -2059,7 +2052,29 @@ export interface Routes { (path: "/deviceUpdate/{instanceId}/management/deviceDiagnostics/deviceHealth", instanceId: string): DeviceManagementListHealthOfDevices; } -// @public (undocumented) +// @public +export interface SimplePollerLike, TResult> { + getOperationState(): TState; + getResult(): TResult | undefined; + isDone(): boolean; + // @deprecated + isStopped(): boolean; + onProgress(callback: (state: TState) => void): CancelOnProgress; + poll(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + pollUntilDone(pollOptions?: { + abortSignal?: AbortSignalLike; + }): Promise; + serialize(): Promise; + // @deprecated + stopPolling(): void; + submitted(): Promise; + // @deprecated + toString(): string; +} + +// @public export interface StepOutput { description?: string; files?: Array; @@ -2069,7 +2084,7 @@ export interface StepOutput { updateId?: UpdateIdOutput; } -// @public (undocumented) +// @public export interface StepResultOutput { description?: string; extendedResultCode: number; @@ -2078,13 +2093,13 @@ export interface StepResultOutput { update?: UpdateInfoOutput; } -// @public (undocumented) +// @public export interface StringsListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface UpdateComplianceOutput { newUpdatesAvailableDeviceCount: number; onLatestUpdateDeviceCount: number; @@ -2092,7 +2107,7 @@ export interface UpdateComplianceOutput { updatesInProgressDeviceCount: number; } -// @public (undocumented) +// @public export interface UpdateFileBaseOutput { fileName: string; hashes: Record; @@ -2103,12 +2118,12 @@ export interface UpdateFileBaseOutput { sizeInBytes: number; } -// @public (undocumented) +// @public export interface UpdateFileDownloadHandlerOutput { id: string; } -// @public (undocumented) +// @public export interface UpdateFileOutput extends UpdateFileBaseOutput { downloadHandler?: UpdateFileDownloadHandlerOutput; etag?: string; @@ -2116,47 +2131,45 @@ export interface UpdateFileOutput extends UpdateFileBaseOutput { relatedFiles?: Array; } -// @public (undocumented) +// @public export interface UpdateId { name: string; provider: string; version: string; } -// @public (undocumented) +// @public export interface UpdateIdOutput { name: string; provider: string; version: string; } -// @public (undocumented) +// @public export interface UpdateInfo { - description?: string; - friendlyName?: string; updateId: UpdateId; } -// @public (undocumented) +// @public export interface UpdateInfoListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface UpdateInfoOutput { - description?: string; - friendlyName?: string; + readonly description?: string; + readonly friendlyName?: string; updateId: UpdateIdOutput; } -// @public (undocumented) +// @public export interface UpdateListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface UpdateOperationOutput { createdDateTime: string; error?: ErrorModelOutput; @@ -2169,13 +2182,13 @@ export interface UpdateOperationOutput { update?: UpdateInfoOutput; } -// @public (undocumented) +// @public export interface UpdateOperationsListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface UpdateOutput { compatibility: Array>; createdDateTime: string; diff --git a/sdk/deviceupdate/iot-device-update-rest/samples-dev/deleteUpdate.ts b/sdk/deviceupdate/iot-device-update-rest/samples-dev/deleteUpdate.ts index fdc9dac1a2a2..e973ee177c8f 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples-dev/deleteUpdate.ts +++ b/sdk/deviceupdate/iot-device-update-rest/samples-dev/deleteUpdate.ts @@ -36,7 +36,7 @@ async function main(): Promise { ) .delete(); - const poller = getLongRunningPoller(client, initialResponse); + const poller = await getLongRunningPoller(client, initialResponse); const result = await poller.pollUntilDone(); if (isUnexpected(result)) { diff --git a/sdk/deviceupdate/iot-device-update-rest/samples-dev/deployUpdate.ts b/sdk/deviceupdate/iot-device-update-rest/samples-dev/deployUpdate.ts index 9c5f28c91d05..e3f5a94c8d90 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples-dev/deployUpdate.ts +++ b/sdk/deviceupdate/iot-device-update-rest/samples-dev/deployUpdate.ts @@ -52,7 +52,7 @@ async function main(): Promise { }, }); - const poller = getLongRunningPoller(client, initialResponse); + const poller = await getLongRunningPoller(client, initialResponse); const result = await poller.pollUntilDone(); if (isUnexpected(result)) { diff --git a/sdk/deviceupdate/iot-device-update-rest/samples-dev/importUpdate.ts b/sdk/deviceupdate/iot-device-update-rest/samples-dev/importUpdate.ts index f3d572825b02..5a08c692c098 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples-dev/importUpdate.ts +++ b/sdk/deviceupdate/iot-device-update-rest/samples-dev/importUpdate.ts @@ -54,7 +54,7 @@ async function main(): Promise { ], }); - const poller = getLongRunningPoller(client, initialResponse); + const poller = await getLongRunningPoller(client, initialResponse); const result = await poller.pollUntilDone(); if (isUnexpected(result)) { diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/deleteUpdate.js b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/deleteUpdate.js index 57a6377845a6..f866807834bd 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/deleteUpdate.js +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/deleteUpdate.js @@ -32,11 +32,11 @@ async function main() { instanceId, updateProvider, updateName, - updateVersion + updateVersion, ) .delete(); - const poller = getLongRunningPoller(client, initialResponse); + const poller = await getLongRunningPoller(client, initialResponse); const result = await poller.pollUntilDone(); if (isUnexpected(result)) { diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/deployUpdate.js b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/deployUpdate.js index 1ef4c2750e78..e09485540a71 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/deployUpdate.js +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/deployUpdate.js @@ -12,7 +12,7 @@ const DeviceUpdate = require("@azure-rest/iot-device-update").default, const { DefaultAzureCredential } = require("@azure/identity"); const dotenv = require("dotenv"); -const { v4 } = require("uuid"); +const { randomUUID } = require("@azure/core-util"); dotenv.config(); @@ -29,7 +29,7 @@ async function main() { const credentials = new DefaultAzureCredential(); const client = DeviceUpdate(endpoint, credentials); - const deploymentId = v4(); + const deploymentId = randomUUID(); const startAt = new Date().toISOString(); const initialResponse = await client @@ -37,7 +37,7 @@ async function main() { "/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}", instanceId, groupId, - deploymentId + deploymentId, ) .put({ body: { @@ -54,7 +54,7 @@ async function main() { }, }); - const poller = getLongRunningPoller(client, initialResponse); + const poller = await getLongRunningPoller(client, initialResponse); const result = await poller.pollUntilDone(); if (isUnexpected(result)) { @@ -68,7 +68,7 @@ async function main() { "/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}/status", instanceId, groupId, - deploymentId + deploymentId, ) .get(); diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/getUpdate.js b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/getUpdate.js index 11c62770eaf9..8dc42f51289d 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/getUpdate.js +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/getUpdate.js @@ -32,7 +32,7 @@ async function main() { name + "' and version '" + version + - "'..." + "'...", ); const updateResult = await client .path( @@ -40,7 +40,7 @@ async function main() { instanceId, provider, name, - version + version, ) .get(); @@ -67,7 +67,7 @@ async function main() { instanceId, provider, name, - version + version, ) .get(); @@ -87,7 +87,7 @@ async function main() { provider, name, version, - fileId + fileId, ) .get(); diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/importUpdate.js b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/importUpdate.js index cd52ed349c27..e14ca078c434 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/importUpdate.js +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/importUpdate.js @@ -57,7 +57,7 @@ async function main() { ], }); - const poller = getLongRunningPoller(client, initialResponse); + const poller = await getLongRunningPoller(client, initialResponse); const result = await poller.pollUntilDone(); if (isUnexpected(result)) { diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/listUpdates.js b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/listUpdates.js index f648fd04e20c..14b96053f369 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/listUpdates.js +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/listUpdates.js @@ -60,7 +60,7 @@ async function main() { "/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions", instanceId, provider, - name + name, ) .get(); diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/package.json b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/package.json index 5b09c7e9075b..e76ad8050280 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/package.json +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/javascript/package.json @@ -28,8 +28,7 @@ "dependencies": { "@azure-rest/iot-device-update": "latest", "dotenv": "latest", - "@azure/identity": "^4.2.1", - "uuid": "^8.3.0", - "@azure/core-util": "^1.0.1" + "@azure/identity": "^4.0.1", + "@azure/core-util": "^1.6.1" } } diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/package.json b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/package.json index 64e594b679f4..559b0bcf50b7 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/package.json +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/package.json @@ -32,12 +32,10 @@ "dependencies": { "@azure-rest/iot-device-update": "latest", "dotenv": "latest", - "@azure/identity": "^4.2.1", - "uuid": "^8.3.0", - "@azure/core-util": "^1.0.1" + "@azure/identity": "^4.0.1", + "@azure/core-util": "^1.6.1" }, "devDependencies": { - "@types/uuid": "^8.0.0", "@types/node": "^18.0.0", "typescript": "~5.7.2", "rimraf": "latest" diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/deleteUpdate.ts b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/deleteUpdate.ts index e6bab6a2d76b..db4fe95a8427 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/deleteUpdate.ts +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/deleteUpdate.ts @@ -33,11 +33,11 @@ async function main() { instanceId, updateProvider, updateName, - updateVersion + updateVersion, ) .delete(); - const poller = getLongRunningPoller(client, initialResponse); + const poller = await getLongRunningPoller(client, initialResponse); const result = await poller.pollUntilDone(); if (isUnexpected(result)) { diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/deployUpdate.ts b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/deployUpdate.ts index 7d8a0141a62e..5097ab93275b 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/deployUpdate.ts +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/deployUpdate.ts @@ -11,14 +11,14 @@ import DeviceUpdate, { getLongRunningPoller, isUnexpected } from "@azure-rest/io import { DefaultAzureCredential } from "@azure/identity"; import dotenv from "dotenv"; -import { v4 } from "uuid"; +import { randomUUID } from "@azure/core-util"; dotenv.config(); const endpoint = process.env["ENDPOINT"] || ""; const instanceId = process.env["INSTANCE_ID"] || ""; -async function main() { +async function main(): Promise { console.log("== Deploy update =="); const updateProvider = process.env["DEVICEUPDATE_UPDATE_PROVIDER"] || ""; const updateName = process.env["DEVICEUPDATE_UPDATE_NAME"] || ""; @@ -28,7 +28,7 @@ async function main() { const credentials = new DefaultAzureCredential(); const client = DeviceUpdate(endpoint, credentials); - const deploymentId = v4(); + const deploymentId = randomUUID(); const startAt = new Date().toISOString(); const initialResponse = await client @@ -36,7 +36,7 @@ async function main() { "/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}", instanceId, groupId, - deploymentId + deploymentId, ) .put({ body: { @@ -53,7 +53,7 @@ async function main() { }, }); - const poller = getLongRunningPoller(client, initialResponse); + const poller = await getLongRunningPoller(client, initialResponse); const result = await poller.pollUntilDone(); if (isUnexpected(result)) { @@ -67,7 +67,7 @@ async function main() { "/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}/status", instanceId, groupId, - deploymentId + deploymentId, ) .get(); diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/getUpdate.ts b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/getUpdate.ts index 34c512a45f8a..5ce5278d4e96 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/getUpdate.ts +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/getUpdate.ts @@ -33,7 +33,7 @@ async function main() { name + "' and version '" + version + - "'..." + "'...", ); const updateResult = await client .path( @@ -41,7 +41,7 @@ async function main() { instanceId, provider, name, - version + version, ) .get(); @@ -68,7 +68,7 @@ async function main() { instanceId, provider, name, - version + version, ) .get(); @@ -88,7 +88,7 @@ async function main() { provider, name, version, - fileId + fileId, ) .get(); diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/importUpdate.ts b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/importUpdate.ts index 12757627dca2..24872b17d2e6 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/importUpdate.ts +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/importUpdate.ts @@ -56,7 +56,7 @@ async function main() { ], }); - const poller = getLongRunningPoller(client, initialResponse); + const poller = await getLongRunningPoller(client, initialResponse); const result = await poller.pollUntilDone(); if (isUnexpected(result)) { diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/listUpdates.ts b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/listUpdates.ts index c1ee6ec006dd..f980f119019f 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/listUpdates.ts +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/src/listUpdates.ts @@ -61,7 +61,7 @@ async function main() { "/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions", instanceId, provider, - name + name, ) .get(); diff --git a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/tsconfig.json b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/tsconfig.json index ad5ff9a19d36..984eed535aa8 100644 --- a/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/tsconfig.json +++ b/sdk/deviceupdate/iot-device-update-rest/samples/v1/typescript/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2018", + "target": "ES2020", "module": "commonjs", "moduleResolution": "node", "resolveJsonModule": true, diff --git a/sdk/deviceupdate/iot-device-update-rest/src/clientDefinitions.ts b/sdk/deviceupdate/iot-device-update-rest/src/clientDefinitions.ts index 59626eeaca37..734e1f941efb 100644 --- a/sdk/deviceupdate/iot-device-update-rest/src/clientDefinitions.ts +++ b/sdk/deviceupdate/iot-device-update-rest/src/clientDefinitions.ts @@ -55,110 +55,110 @@ import type { } from "./parameters.js"; import type { DeviceUpdateListUpdates200Response, - DeviceUpdateListUpdatesdefaultResponse, + DeviceUpdateListUpdatesDefaultResponse, DeviceUpdateImportUpdate200Response, DeviceUpdateImportUpdate202Response, - DeviceUpdateImportUpdatedefaultResponse, + DeviceUpdateImportUpdateDefaultResponse, DeviceUpdateGetUpdate200Response, DeviceUpdateGetUpdate304Response, - DeviceUpdateGetUpdatedefaultResponse, + DeviceUpdateGetUpdateDefaultResponse, DeviceUpdateDeleteUpdate202Response, - DeviceUpdateDeleteUpdatedefaultResponse, + DeviceUpdateDeleteUpdateDefaultResponse, DeviceUpdateListProviders200Response, - DeviceUpdateListProvidersdefaultResponse, + DeviceUpdateListProvidersDefaultResponse, DeviceUpdateListNames200Response, - DeviceUpdateListNamesdefaultResponse, + DeviceUpdateListNamesDefaultResponse, DeviceUpdateListVersions200Response, - DeviceUpdateListVersionsdefaultResponse, + DeviceUpdateListVersionsDefaultResponse, DeviceUpdateListFiles200Response, - DeviceUpdateListFilesdefaultResponse, + DeviceUpdateListFilesDefaultResponse, DeviceUpdateGetFile200Response, DeviceUpdateGetFile304Response, - DeviceUpdateGetFiledefaultResponse, + DeviceUpdateGetFileDefaultResponse, DeviceUpdateListOperationStatuses200Response, - DeviceUpdateListOperationStatusesdefaultResponse, + DeviceUpdateListOperationStatusesDefaultResponse, DeviceUpdateGetOperationStatus200Response, DeviceUpdateGetOperationStatus304Response, - DeviceUpdateGetOperationStatusdefaultResponse, + DeviceUpdateGetOperationStatusDefaultResponse, DeviceManagementListDeviceClasses200Response, - DeviceManagementListDeviceClassesdefaultResponse, + DeviceManagementListDeviceClassesDefaultResponse, DeviceManagementGetDeviceClass200Response, - DeviceManagementGetDeviceClassdefaultResponse, + DeviceManagementGetDeviceClassDefaultResponse, DeviceManagementUpdateDeviceClass200Response, - DeviceManagementUpdateDeviceClassdefaultResponse, + DeviceManagementUpdateDeviceClassDefaultResponse, DeviceManagementDeleteDeviceClass204Response, - DeviceManagementDeleteDeviceClassdefaultResponse, + DeviceManagementDeleteDeviceClassDefaultResponse, DeviceManagementListInstallableUpdatesForDeviceClass200Response, - DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse, + DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse, DeviceManagementListDevices200Response, - DeviceManagementListDevicesdefaultResponse, + DeviceManagementListDevicesDefaultResponse, DeviceManagementImportDevices202Response, - DeviceManagementImportDevicesdefaultResponse, + DeviceManagementImportDevicesDefaultResponse, DeviceManagementGetDevice200Response, - DeviceManagementGetDevicedefaultResponse, + DeviceManagementGetDeviceDefaultResponse, DeviceManagementGetDeviceModule200Response, - DeviceManagementGetDeviceModuledefaultResponse, + DeviceManagementGetDeviceModuleDefaultResponse, DeviceManagementGetUpdateCompliance200Response, - DeviceManagementGetUpdateCompliancedefaultResponse, + DeviceManagementGetUpdateComplianceDefaultResponse, DeviceManagementListGroups200Response, - DeviceManagementListGroupsdefaultResponse, + DeviceManagementListGroupsDefaultResponse, DeviceManagementGetGroup200Response, - DeviceManagementGetGroupdefaultResponse, + DeviceManagementGetGroupDefaultResponse, DeviceManagementDeleteGroup204Response, - DeviceManagementDeleteGroupdefaultResponse, + DeviceManagementDeleteGroupDefaultResponse, DeviceManagementGetUpdateComplianceForGroup200Response, - DeviceManagementGetUpdateComplianceForGroupdefaultResponse, + DeviceManagementGetUpdateComplianceForGroupDefaultResponse, DeviceManagementListBestUpdatesForGroup200Response, - DeviceManagementListBestUpdatesForGroupdefaultResponse, + DeviceManagementListBestUpdatesForGroupDefaultResponse, DeviceManagementListDeploymentsForGroup200Response, - DeviceManagementListDeploymentsForGroupdefaultResponse, + DeviceManagementListDeploymentsForGroupDefaultResponse, DeviceManagementGetDeployment200Response, - DeviceManagementGetDeploymentdefaultResponse, + DeviceManagementGetDeploymentDefaultResponse, DeviceManagementCreateOrUpdateDeployment200Response, - DeviceManagementCreateOrUpdateDeploymentdefaultResponse, + DeviceManagementCreateOrUpdateDeploymentDefaultResponse, DeviceManagementDeleteDeployment204Response, - DeviceManagementDeleteDeploymentdefaultResponse, + DeviceManagementDeleteDeploymentDefaultResponse, DeviceManagementGetDeploymentStatus200Response, - DeviceManagementGetDeploymentStatusdefaultResponse, + DeviceManagementGetDeploymentStatusDefaultResponse, DeviceManagementListDeviceClassSubgroupsForGroup200Response, - DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse, + DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse, DeviceManagementGetDeviceClassSubgroup200Response, - DeviceManagementGetDeviceClassSubgroupdefaultResponse, + DeviceManagementGetDeviceClassSubgroupDefaultResponse, DeviceManagementDeleteDeviceClassSubgroup204Response, - DeviceManagementDeleteDeviceClassSubgroupdefaultResponse, + DeviceManagementDeleteDeviceClassSubgroupDefaultResponse, DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response, - DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse, + DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse, DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response, - DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse, + DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse, DeviceManagementListDeploymentsForDeviceClassSubgroup200Response, - DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse, + DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse, DeviceManagementGetDeploymentForDeviceClassSubgroup200Response, - DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse, + DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse, DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response, - DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse, + DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse, DeviceManagementStopDeployment200Response, - DeviceManagementStopDeploymentdefaultResponse, + DeviceManagementStopDeploymentDefaultResponse, DeviceManagementRetryDeployment200Response, - DeviceManagementRetryDeploymentdefaultResponse, + DeviceManagementRetryDeploymentDefaultResponse, DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response, - DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse, + DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse, DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response, - DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse, + DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse, DeviceManagementGetOperationStatus200Response, DeviceManagementGetOperationStatus304Response, - DeviceManagementGetOperationStatusdefaultResponse, + DeviceManagementGetOperationStatusDefaultResponse, DeviceManagementListOperationStatuses200Response, - DeviceManagementListOperationStatusesdefaultResponse, + DeviceManagementListOperationStatusesDefaultResponse, DeviceManagementStartLogCollection201Response, - DeviceManagementStartLogCollectiondefaultResponse, + DeviceManagementStartLogCollectionDefaultResponse, DeviceManagementGetLogCollection200Response, - DeviceManagementGetLogCollectiondefaultResponse, + DeviceManagementGetLogCollectionDefaultResponse, DeviceManagementListLogCollections200Response, - DeviceManagementListLogCollectionsdefaultResponse, + DeviceManagementListLogCollectionsDefaultResponse, DeviceManagementGetLogCollectionDetailedStatus200Response, - DeviceManagementGetLogCollectionDetailedStatusdefaultResponse, + DeviceManagementGetLogCollectionDetailedStatusDefaultResponse, DeviceManagementListHealthOfDevices200Response, - DeviceManagementListHealthOfDevicesdefaultResponse, + DeviceManagementListHealthOfDevicesDefaultResponse, } from "./responses.js"; import type { Client, StreamableMethod } from "@azure-rest/core-client"; @@ -166,7 +166,7 @@ export interface DeviceUpdateListUpdates { /** Get a list of all updates that have been imported to Device Update for IoT Hub. */ get( options?: DeviceUpdateListUpdatesParameters, - ): StreamableMethod; + ): StreamableMethod; } export interface DeviceUpdateImportUpdate { @@ -176,7 +176,7 @@ export interface DeviceUpdateImportUpdate { ): StreamableMethod< | DeviceUpdateImportUpdate200Response | DeviceUpdateImportUpdate202Response - | DeviceUpdateImportUpdatedefaultResponse + | DeviceUpdateImportUpdateDefaultResponse >; } @@ -187,13 +187,13 @@ export interface DeviceUpdateGetUpdate { ): StreamableMethod< | DeviceUpdateGetUpdate200Response | DeviceUpdateGetUpdate304Response - | DeviceUpdateGetUpdatedefaultResponse + | DeviceUpdateGetUpdateDefaultResponse >; /** Delete a specific update version. This is a long-running-operation; use Operation-Location response header value to check for operation status. */ delete( options?: DeviceUpdateDeleteUpdateParameters, ): StreamableMethod< - DeviceUpdateDeleteUpdate202Response | DeviceUpdateDeleteUpdatedefaultResponse + DeviceUpdateDeleteUpdate202Response | DeviceUpdateDeleteUpdateDefaultResponse >; } @@ -202,7 +202,7 @@ export interface DeviceUpdateListProviders { get( options?: DeviceUpdateListProvidersParameters, ): StreamableMethod< - DeviceUpdateListProviders200Response | DeviceUpdateListProvidersdefaultResponse + DeviceUpdateListProviders200Response | DeviceUpdateListProvidersDefaultResponse >; } @@ -210,7 +210,7 @@ export interface DeviceUpdateListNames { /** Get a list of all update names that match the specified provider. */ get( options?: DeviceUpdateListNamesParameters, - ): StreamableMethod; + ): StreamableMethod; } export interface DeviceUpdateListVersions { @@ -218,7 +218,7 @@ export interface DeviceUpdateListVersions { get( options?: DeviceUpdateListVersionsParameters, ): StreamableMethod< - DeviceUpdateListVersions200Response | DeviceUpdateListVersionsdefaultResponse + DeviceUpdateListVersions200Response | DeviceUpdateListVersionsDefaultResponse >; } @@ -226,7 +226,7 @@ export interface DeviceUpdateListFiles { /** Get a list of all update file identifiers for the specified version. */ get( options?: DeviceUpdateListFilesParameters, - ): StreamableMethod; + ): StreamableMethod; } export interface DeviceUpdateGetFile { @@ -236,7 +236,7 @@ export interface DeviceUpdateGetFile { ): StreamableMethod< | DeviceUpdateGetFile200Response | DeviceUpdateGetFile304Response - | DeviceUpdateGetFiledefaultResponse + | DeviceUpdateGetFileDefaultResponse >; } @@ -245,7 +245,7 @@ export interface DeviceUpdateListOperationStatuses { get( options?: DeviceUpdateListOperationStatusesParameters, ): StreamableMethod< - DeviceUpdateListOperationStatuses200Response | DeviceUpdateListOperationStatusesdefaultResponse + DeviceUpdateListOperationStatuses200Response | DeviceUpdateListOperationStatusesDefaultResponse >; } @@ -256,7 +256,7 @@ export interface DeviceUpdateGetOperationStatus { ): StreamableMethod< | DeviceUpdateGetOperationStatus200Response | DeviceUpdateGetOperationStatus304Response - | DeviceUpdateGetOperationStatusdefaultResponse + | DeviceUpdateGetOperationStatusDefaultResponse >; } @@ -265,7 +265,7 @@ export interface DeviceManagementListDeviceClasses { get( options?: DeviceManagementListDeviceClassesParameters, ): StreamableMethod< - DeviceManagementListDeviceClasses200Response | DeviceManagementListDeviceClassesdefaultResponse + DeviceManagementListDeviceClasses200Response | DeviceManagementListDeviceClassesDefaultResponse >; } @@ -274,19 +274,19 @@ export interface DeviceManagementGetDeviceClass { get( options?: DeviceManagementGetDeviceClassParameters, ): StreamableMethod< - DeviceManagementGetDeviceClass200Response | DeviceManagementGetDeviceClassdefaultResponse + DeviceManagementGetDeviceClass200Response | DeviceManagementGetDeviceClassDefaultResponse >; /** Update device class details. */ patch( options: DeviceManagementUpdateDeviceClassParameters, ): StreamableMethod< - DeviceManagementUpdateDeviceClass200Response | DeviceManagementUpdateDeviceClassdefaultResponse + DeviceManagementUpdateDeviceClass200Response | DeviceManagementUpdateDeviceClassDefaultResponse >; /** Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the records from the system and to stop checking the compatibility of this device class with new updates. If a device is ever reconnected for this device class it will be re-created. */ delete( options?: DeviceManagementDeleteDeviceClassParameters, ): StreamableMethod< - DeviceManagementDeleteDeviceClass204Response | DeviceManagementDeleteDeviceClassdefaultResponse + DeviceManagementDeleteDeviceClass204Response | DeviceManagementDeleteDeviceClassDefaultResponse >; } @@ -296,7 +296,7 @@ export interface DeviceManagementListInstallableUpdatesForDeviceClass { options?: DeviceManagementListInstallableUpdatesForDeviceClassParameters, ): StreamableMethod< | DeviceManagementListInstallableUpdatesForDeviceClass200Response - | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse + | DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse >; } @@ -305,7 +305,7 @@ export interface DeviceManagementListDevices { get( options?: DeviceManagementListDevicesParameters, ): StreamableMethod< - DeviceManagementListDevices200Response | DeviceManagementListDevicesdefaultResponse + DeviceManagementListDevices200Response | DeviceManagementListDevicesDefaultResponse >; } @@ -314,7 +314,7 @@ export interface DeviceManagementImportDevices { post( options: DeviceManagementImportDevicesParameters, ): StreamableMethod< - DeviceManagementImportDevices202Response | DeviceManagementImportDevicesdefaultResponse + DeviceManagementImportDevices202Response | DeviceManagementImportDevicesDefaultResponse >; } @@ -323,7 +323,7 @@ export interface DeviceManagementGetDevice { get( options?: DeviceManagementGetDeviceParameters, ): StreamableMethod< - DeviceManagementGetDevice200Response | DeviceManagementGetDevicedefaultResponse + DeviceManagementGetDevice200Response | DeviceManagementGetDeviceDefaultResponse >; } @@ -332,7 +332,7 @@ export interface DeviceManagementGetDeviceModule { get( options?: DeviceManagementGetDeviceModuleParameters, ): StreamableMethod< - DeviceManagementGetDeviceModule200Response | DeviceManagementGetDeviceModuledefaultResponse + DeviceManagementGetDeviceModule200Response | DeviceManagementGetDeviceModuleDefaultResponse >; } @@ -342,7 +342,7 @@ export interface DeviceManagementGetUpdateCompliance { options?: DeviceManagementGetUpdateComplianceParameters, ): StreamableMethod< | DeviceManagementGetUpdateCompliance200Response - | DeviceManagementGetUpdateCompliancedefaultResponse + | DeviceManagementGetUpdateComplianceDefaultResponse >; } @@ -351,7 +351,7 @@ export interface DeviceManagementListGroups { get( options?: DeviceManagementListGroupsParameters, ): StreamableMethod< - DeviceManagementListGroups200Response | DeviceManagementListGroupsdefaultResponse + DeviceManagementListGroups200Response | DeviceManagementListGroupsDefaultResponse >; } @@ -360,13 +360,13 @@ export interface DeviceManagementGetGroup { get( options?: DeviceManagementGetGroupParameters, ): StreamableMethod< - DeviceManagementGetGroup200Response | DeviceManagementGetGroupdefaultResponse + DeviceManagementGetGroup200Response | DeviceManagementGetGroupDefaultResponse >; /** Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are retained for history purposes. Users can call this method to delete a group if they do not need to retain any of the history of the group and no longer need it. If a device is ever connected again for this group after the group was deleted it will be automatically re-created but there will be no history. */ delete( options?: DeviceManagementDeleteGroupParameters, ): StreamableMethod< - DeviceManagementDeleteGroup204Response | DeviceManagementDeleteGroupdefaultResponse + DeviceManagementDeleteGroup204Response | DeviceManagementDeleteGroupDefaultResponse >; } @@ -376,7 +376,7 @@ export interface DeviceManagementGetUpdateComplianceForGroup { options?: DeviceManagementGetUpdateComplianceForGroupParameters, ): StreamableMethod< | DeviceManagementGetUpdateComplianceForGroup200Response - | DeviceManagementGetUpdateComplianceForGroupdefaultResponse + | DeviceManagementGetUpdateComplianceForGroupDefaultResponse >; } @@ -386,7 +386,7 @@ export interface DeviceManagementListBestUpdatesForGroup { options?: DeviceManagementListBestUpdatesForGroupParameters, ): StreamableMethod< | DeviceManagementListBestUpdatesForGroup200Response - | DeviceManagementListBestUpdatesForGroupdefaultResponse + | DeviceManagementListBestUpdatesForGroupDefaultResponse >; } @@ -396,7 +396,7 @@ export interface DeviceManagementListDeploymentsForGroup { options?: DeviceManagementListDeploymentsForGroupParameters, ): StreamableMethod< | DeviceManagementListDeploymentsForGroup200Response - | DeviceManagementListDeploymentsForGroupdefaultResponse + | DeviceManagementListDeploymentsForGroupDefaultResponse >; } @@ -405,20 +405,20 @@ export interface DeviceManagementGetDeployment { get( options?: DeviceManagementGetDeploymentParameters, ): StreamableMethod< - DeviceManagementGetDeployment200Response | DeviceManagementGetDeploymentdefaultResponse + DeviceManagementGetDeployment200Response | DeviceManagementGetDeploymentDefaultResponse >; /** Creates or updates a deployment. */ put( options: DeviceManagementCreateOrUpdateDeploymentParameters, ): StreamableMethod< | DeviceManagementCreateOrUpdateDeployment200Response - | DeviceManagementCreateOrUpdateDeploymentdefaultResponse + | DeviceManagementCreateOrUpdateDeploymentDefaultResponse >; /** Deletes a deployment. */ delete( options?: DeviceManagementDeleteDeploymentParameters, ): StreamableMethod< - DeviceManagementDeleteDeployment204Response | DeviceManagementDeleteDeploymentdefaultResponse + DeviceManagementDeleteDeployment204Response | DeviceManagementDeleteDeploymentDefaultResponse >; } @@ -428,7 +428,7 @@ export interface DeviceManagementGetDeploymentStatus { options?: DeviceManagementGetDeploymentStatusParameters, ): StreamableMethod< | DeviceManagementGetDeploymentStatus200Response - | DeviceManagementGetDeploymentStatusdefaultResponse + | DeviceManagementGetDeploymentStatusDefaultResponse >; } @@ -438,7 +438,7 @@ export interface DeviceManagementListDeviceClassSubgroupsForGroup { options?: DeviceManagementListDeviceClassSubgroupsForGroupParameters, ): StreamableMethod< | DeviceManagementListDeviceClassSubgroupsForGroup200Response - | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse + | DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse >; } @@ -448,14 +448,14 @@ export interface DeviceManagementGetDeviceClassSubgroup { options?: DeviceManagementGetDeviceClassSubgroupParameters, ): StreamableMethod< | DeviceManagementGetDeviceClassSubgroup200Response - | DeviceManagementGetDeviceClassSubgroupdefaultResponse + | DeviceManagementGetDeviceClassSubgroupDefaultResponse >; /** Deletes a device class subgroup. This subgroup is automatically created when a Device Update-enabled device is connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are retained for history purposes. Users can call this method to delete a subgroup if they do not need to retain any of the history of the subgroup and no longer need it. If a device is ever connected again for this subgroup after the subgroup was deleted it will be automatically re-created but there will be no history. */ delete( options?: DeviceManagementDeleteDeviceClassSubgroupParameters, ): StreamableMethod< | DeviceManagementDeleteDeviceClassSubgroup204Response - | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse + | DeviceManagementDeleteDeviceClassSubgroupDefaultResponse >; } @@ -465,7 +465,7 @@ export interface DeviceManagementGetDeviceClassSubgroupUpdateCompliance { options?: DeviceManagementGetDeviceClassSubgroupUpdateComplianceParameters, ): StreamableMethod< | DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response - | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse + | DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse >; } @@ -475,7 +475,7 @@ export interface DeviceManagementGetBestUpdatesForDeviceClassSubgroup { options?: DeviceManagementGetBestUpdatesForDeviceClassSubgroupParameters, ): StreamableMethod< | DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response - | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse + | DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse >; } @@ -485,7 +485,7 @@ export interface DeviceManagementListDeploymentsForDeviceClassSubgroup { options?: DeviceManagementListDeploymentsForDeviceClassSubgroupParameters, ): StreamableMethod< | DeviceManagementListDeploymentsForDeviceClassSubgroup200Response - | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse + | DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse >; } @@ -495,14 +495,14 @@ export interface DeviceManagementGetDeploymentForDeviceClassSubgroup { options?: DeviceManagementGetDeploymentForDeviceClassSubgroupParameters, ): StreamableMethod< | DeviceManagementGetDeploymentForDeviceClassSubgroup200Response - | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse + | DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse >; /** Deletes a device class subgroup deployment. */ delete( options?: DeviceManagementDeleteDeploymentForDeviceClassSubgroupParameters, ): StreamableMethod< | DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response - | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse + | DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse >; } @@ -511,7 +511,7 @@ export interface DeviceManagementStopDeployment { post( options?: DeviceManagementStopDeploymentParameters, ): StreamableMethod< - DeviceManagementStopDeployment200Response | DeviceManagementStopDeploymentdefaultResponse + DeviceManagementStopDeployment200Response | DeviceManagementStopDeploymentDefaultResponse >; } @@ -520,7 +520,7 @@ export interface DeviceManagementRetryDeployment { post( options?: DeviceManagementRetryDeploymentParameters, ): StreamableMethod< - DeviceManagementRetryDeployment200Response | DeviceManagementRetryDeploymentdefaultResponse + DeviceManagementRetryDeployment200Response | DeviceManagementRetryDeploymentDefaultResponse >; } @@ -530,7 +530,7 @@ export interface DeviceManagementGetDeviceClassSubgroupDeploymentStatus { options?: DeviceManagementGetDeviceClassSubgroupDeploymentStatusParameters, ): StreamableMethod< | DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response - | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse + | DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse >; } @@ -540,7 +540,7 @@ export interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymen options?: DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentParameters, ): StreamableMethod< | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response - | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse + | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse >; } @@ -551,7 +551,7 @@ export interface DeviceManagementGetOperationStatus { ): StreamableMethod< | DeviceManagementGetOperationStatus200Response | DeviceManagementGetOperationStatus304Response - | DeviceManagementGetOperationStatusdefaultResponse + | DeviceManagementGetOperationStatusDefaultResponse >; } @@ -561,7 +561,7 @@ export interface DeviceManagementListOperationStatuses { options?: DeviceManagementListOperationStatusesParameters, ): StreamableMethod< | DeviceManagementListOperationStatuses200Response - | DeviceManagementListOperationStatusesdefaultResponse + | DeviceManagementListOperationStatusesDefaultResponse >; } @@ -571,13 +571,13 @@ export interface DeviceManagementStartLogCollection { options: DeviceManagementStartLogCollectionParameters, ): StreamableMethod< | DeviceManagementStartLogCollection201Response - | DeviceManagementStartLogCollectiondefaultResponse + | DeviceManagementStartLogCollectionDefaultResponse >; /** Get the device diagnostics log collection */ get( options?: DeviceManagementGetLogCollectionParameters, ): StreamableMethod< - DeviceManagementGetLogCollection200Response | DeviceManagementGetLogCollectiondefaultResponse + DeviceManagementGetLogCollection200Response | DeviceManagementGetLogCollectionDefaultResponse >; } @@ -587,7 +587,7 @@ export interface DeviceManagementListLogCollections { options?: DeviceManagementListLogCollectionsParameters, ): StreamableMethod< | DeviceManagementListLogCollections200Response - | DeviceManagementListLogCollectionsdefaultResponse + | DeviceManagementListLogCollectionsDefaultResponse >; } @@ -597,7 +597,7 @@ export interface DeviceManagementGetLogCollectionDetailedStatus { options?: DeviceManagementGetLogCollectionDetailedStatusParameters, ): StreamableMethod< | DeviceManagementGetLogCollectionDetailedStatus200Response - | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse + | DeviceManagementGetLogCollectionDetailedStatusDefaultResponse >; } @@ -607,7 +607,7 @@ export interface DeviceManagementListHealthOfDevices { options: DeviceManagementListHealthOfDevicesParameters, ): StreamableMethod< | DeviceManagementListHealthOfDevices200Response - | DeviceManagementListHealthOfDevicesdefaultResponse + | DeviceManagementListHealthOfDevicesDefaultResponse >; } diff --git a/sdk/deviceupdate/iot-device-update-rest/src/deviceUpdate.ts b/sdk/deviceupdate/iot-device-update-rest/src/deviceUpdate.ts index 92bd2f9c1e56..e792f767f58e 100644 --- a/sdk/deviceupdate/iot-device-update-rest/src/deviceUpdate.ts +++ b/sdk/deviceupdate/iot-device-update-rest/src/deviceUpdate.ts @@ -3,24 +3,29 @@ import type { ClientOptions } from "@azure-rest/core-client"; import { getClient } from "@azure-rest/core-client"; +import { logger } from "./logger.js"; import type { TokenCredential } from "@azure/core-auth"; import type { DeviceUpdateClient } from "./clientDefinitions.js"; +/** The optional parameters for the client */ +export interface DeviceUpdateClientOptions extends ClientOptions { + /** The api version option of the client */ + apiVersion?: string; +} + +/** + * Initialize a new instance of `DeviceUpdateClient` + * @param endpoint - The Device Update for IoT Hub account endpoint (hostname only, no protocol). + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters + */ export default function createClient( endpoint: string, credentials: TokenCredential, - options: ClientOptions = {}, + { apiVersion = "2022-10-01", ...options }: DeviceUpdateClientOptions = {}, ): DeviceUpdateClient { - const baseUrl = options.baseUrl ?? `https://${endpoint}`; - options.apiVersion = options.apiVersion ?? "2022-10-01"; - options = { - ...options, - credentials: { - scopes: ["https://api.adu.microsoft.com/.default"], - }, - }; - - const userAgentInfo = `azsdk-js-iot-device-update-rest/1.0.0`; + const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://${endpoint}`; + const userAgentInfo = `azsdk-js-iot-device-update-rest/1.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` @@ -30,9 +35,31 @@ export default function createClient( userAgentOptions: { userAgentPrefix, }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + credentials: { + scopes: options.credentials?.scopes ?? ["https://api.adu.microsoft.com/.default"], + }, }; + const client = getClient(endpointUrl, credentials, options) as DeviceUpdateClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } - const client = getClient(baseUrl, credentials, options) as DeviceUpdateClient; + return next(req); + }, + }); return client; } diff --git a/sdk/deviceupdate/iot-device-update-rest/src/isUnexpected.ts b/sdk/deviceupdate/iot-device-update-rest/src/isUnexpected.ts index a976bbe97995..a92d8e42fbe9 100644 --- a/sdk/deviceupdate/iot-device-update-rest/src/isUnexpected.ts +++ b/sdk/deviceupdate/iot-device-update-rest/src/isUnexpected.ts @@ -3,116 +3,116 @@ import type { DeviceUpdateListUpdates200Response, - DeviceUpdateListUpdatesdefaultResponse, + DeviceUpdateListUpdatesDefaultResponse, DeviceUpdateImportUpdate200Response, DeviceUpdateImportUpdate202Response, - DeviceUpdateImportUpdatedefaultResponse, + DeviceUpdateImportUpdateDefaultResponse, DeviceUpdateGetUpdate200Response, DeviceUpdateGetUpdate304Response, - DeviceUpdateGetUpdatedefaultResponse, + DeviceUpdateGetUpdateDefaultResponse, DeviceUpdateDeleteUpdate202Response, - DeviceUpdateDeleteUpdatedefaultResponse, + DeviceUpdateDeleteUpdateDefaultResponse, DeviceUpdateListProviders200Response, - DeviceUpdateListProvidersdefaultResponse, + DeviceUpdateListProvidersDefaultResponse, DeviceUpdateListNames200Response, - DeviceUpdateListNamesdefaultResponse, + DeviceUpdateListNamesDefaultResponse, DeviceUpdateListVersions200Response, - DeviceUpdateListVersionsdefaultResponse, + DeviceUpdateListVersionsDefaultResponse, DeviceUpdateListFiles200Response, - DeviceUpdateListFilesdefaultResponse, + DeviceUpdateListFilesDefaultResponse, DeviceUpdateGetFile200Response, DeviceUpdateGetFile304Response, - DeviceUpdateGetFiledefaultResponse, + DeviceUpdateGetFileDefaultResponse, DeviceUpdateListOperationStatuses200Response, - DeviceUpdateListOperationStatusesdefaultResponse, + DeviceUpdateListOperationStatusesDefaultResponse, DeviceUpdateGetOperationStatus200Response, DeviceUpdateGetOperationStatus304Response, - DeviceUpdateGetOperationStatusdefaultResponse, + DeviceUpdateGetOperationStatusDefaultResponse, DeviceManagementListDeviceClasses200Response, - DeviceManagementListDeviceClassesdefaultResponse, + DeviceManagementListDeviceClassesDefaultResponse, DeviceManagementGetDeviceClass200Response, - DeviceManagementGetDeviceClassdefaultResponse, + DeviceManagementGetDeviceClassDefaultResponse, DeviceManagementUpdateDeviceClass200Response, - DeviceManagementUpdateDeviceClassdefaultResponse, + DeviceManagementUpdateDeviceClassDefaultResponse, DeviceManagementDeleteDeviceClass204Response, - DeviceManagementDeleteDeviceClassdefaultResponse, + DeviceManagementDeleteDeviceClassDefaultResponse, DeviceManagementListInstallableUpdatesForDeviceClass200Response, - DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse, + DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse, DeviceManagementListDevices200Response, - DeviceManagementListDevicesdefaultResponse, + DeviceManagementListDevicesDefaultResponse, DeviceManagementImportDevices202Response, - DeviceManagementImportDevicesdefaultResponse, + DeviceManagementImportDevicesDefaultResponse, DeviceManagementGetDevice200Response, - DeviceManagementGetDevicedefaultResponse, + DeviceManagementGetDeviceDefaultResponse, DeviceManagementGetDeviceModule200Response, - DeviceManagementGetDeviceModuledefaultResponse, + DeviceManagementGetDeviceModuleDefaultResponse, DeviceManagementGetUpdateCompliance200Response, - DeviceManagementGetUpdateCompliancedefaultResponse, + DeviceManagementGetUpdateComplianceDefaultResponse, DeviceManagementListGroups200Response, - DeviceManagementListGroupsdefaultResponse, + DeviceManagementListGroupsDefaultResponse, DeviceManagementGetGroup200Response, - DeviceManagementGetGroupdefaultResponse, + DeviceManagementGetGroupDefaultResponse, DeviceManagementDeleteGroup204Response, - DeviceManagementDeleteGroupdefaultResponse, + DeviceManagementDeleteGroupDefaultResponse, DeviceManagementGetUpdateComplianceForGroup200Response, - DeviceManagementGetUpdateComplianceForGroupdefaultResponse, + DeviceManagementGetUpdateComplianceForGroupDefaultResponse, DeviceManagementListBestUpdatesForGroup200Response, - DeviceManagementListBestUpdatesForGroupdefaultResponse, + DeviceManagementListBestUpdatesForGroupDefaultResponse, DeviceManagementListDeploymentsForGroup200Response, - DeviceManagementListDeploymentsForGroupdefaultResponse, + DeviceManagementListDeploymentsForGroupDefaultResponse, DeviceManagementGetDeployment200Response, - DeviceManagementGetDeploymentdefaultResponse, + DeviceManagementGetDeploymentDefaultResponse, DeviceManagementCreateOrUpdateDeployment200Response, - DeviceManagementCreateOrUpdateDeploymentdefaultResponse, + DeviceManagementCreateOrUpdateDeploymentDefaultResponse, DeviceManagementDeleteDeployment204Response, - DeviceManagementDeleteDeploymentdefaultResponse, + DeviceManagementDeleteDeploymentDefaultResponse, DeviceManagementGetDeploymentStatus200Response, - DeviceManagementGetDeploymentStatusdefaultResponse, + DeviceManagementGetDeploymentStatusDefaultResponse, DeviceManagementListDeviceClassSubgroupsForGroup200Response, - DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse, + DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse, DeviceManagementGetDeviceClassSubgroup200Response, - DeviceManagementGetDeviceClassSubgroupdefaultResponse, + DeviceManagementGetDeviceClassSubgroupDefaultResponse, DeviceManagementDeleteDeviceClassSubgroup204Response, - DeviceManagementDeleteDeviceClassSubgroupdefaultResponse, + DeviceManagementDeleteDeviceClassSubgroupDefaultResponse, DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response, - DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse, + DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse, DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response, - DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse, + DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse, DeviceManagementListDeploymentsForDeviceClassSubgroup200Response, - DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse, + DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse, DeviceManagementGetDeploymentForDeviceClassSubgroup200Response, - DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse, + DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse, DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response, - DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse, + DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse, DeviceManagementStopDeployment200Response, - DeviceManagementStopDeploymentdefaultResponse, + DeviceManagementStopDeploymentDefaultResponse, DeviceManagementRetryDeployment200Response, - DeviceManagementRetryDeploymentdefaultResponse, + DeviceManagementRetryDeploymentDefaultResponse, DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response, - DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse, + DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse, DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response, - DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse, + DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse, DeviceManagementGetOperationStatus200Response, DeviceManagementGetOperationStatus304Response, - DeviceManagementGetOperationStatusdefaultResponse, + DeviceManagementGetOperationStatusDefaultResponse, DeviceManagementListOperationStatuses200Response, - DeviceManagementListOperationStatusesdefaultResponse, + DeviceManagementListOperationStatusesDefaultResponse, DeviceManagementStartLogCollection201Response, - DeviceManagementStartLogCollectiondefaultResponse, + DeviceManagementStartLogCollectionDefaultResponse, DeviceManagementGetLogCollection200Response, - DeviceManagementGetLogCollectiondefaultResponse, + DeviceManagementGetLogCollectionDefaultResponse, DeviceManagementListLogCollections200Response, - DeviceManagementListLogCollectionsdefaultResponse, + DeviceManagementListLogCollectionsDefaultResponse, DeviceManagementGetLogCollectionDetailedStatus200Response, - DeviceManagementGetLogCollectionDetailedStatusdefaultResponse, + DeviceManagementGetLogCollectionDetailedStatusDefaultResponse, DeviceManagementListHealthOfDevices200Response, - DeviceManagementListHealthOfDevicesdefaultResponse, + DeviceManagementListHealthOfDevicesDefaultResponse, } from "./responses.js"; const responseMap: Record = { "GET /deviceUpdate/{instanceId}/updates": ["200"], - "POST /deviceUpdate/{instanceId}/updates:import": ["200", "202"], "GET /deviceUpdate/{instanceId}/updates:import": ["200", "202"], + "POST /deviceUpdate/{instanceId}/updates:import": ["200", "202"], "GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}": [ "200", "304", @@ -136,8 +136,8 @@ const responseMap: Record = { "200", ], "GET /deviceUpdate/{instanceId}/management/devices": ["200"], - "POST /deviceUpdate/{instanceId}/management/devices:import": ["202"], "GET /deviceUpdate/{instanceId}/management/devices:import": ["202"], + "POST /deviceUpdate/{instanceId}/management/devices:import": ["202"], "GET /deviceUpdate/{instanceId}/management/devices/{deviceId}": ["200"], "GET /deviceUpdate/{instanceId}/management/devices/{deviceId}/modules/{moduleId}": ["200"], "GET /deviceUpdate/{instanceId}/management/updateCompliance": ["200"], @@ -193,450 +193,461 @@ const responseMap: Record = { }; export function isUnexpected( - response: DeviceUpdateListUpdates200Response | DeviceUpdateListUpdatesdefaultResponse, -): response is DeviceUpdateListUpdatesdefaultResponse; + response: DeviceUpdateListUpdates200Response | DeviceUpdateListUpdatesDefaultResponse, +): response is DeviceUpdateListUpdatesDefaultResponse; export function isUnexpected( response: | DeviceUpdateImportUpdate200Response | DeviceUpdateImportUpdate202Response - | DeviceUpdateImportUpdatedefaultResponse, -): response is DeviceUpdateImportUpdatedefaultResponse; + | DeviceUpdateImportUpdateDefaultResponse, +): response is DeviceUpdateImportUpdateDefaultResponse; export function isUnexpected( response: | DeviceUpdateGetUpdate200Response | DeviceUpdateGetUpdate304Response - | DeviceUpdateGetUpdatedefaultResponse, -): response is DeviceUpdateGetUpdatedefaultResponse; + | DeviceUpdateGetUpdateDefaultResponse, +): response is DeviceUpdateGetUpdateDefaultResponse; export function isUnexpected( - response: DeviceUpdateDeleteUpdate202Response | DeviceUpdateDeleteUpdatedefaultResponse, -): response is DeviceUpdateDeleteUpdatedefaultResponse; + response: DeviceUpdateDeleteUpdate202Response | DeviceUpdateDeleteUpdateDefaultResponse, +): response is DeviceUpdateDeleteUpdateDefaultResponse; export function isUnexpected( - response: DeviceUpdateListProviders200Response | DeviceUpdateListProvidersdefaultResponse, -): response is DeviceUpdateListProvidersdefaultResponse; + response: DeviceUpdateListProviders200Response | DeviceUpdateListProvidersDefaultResponse, +): response is DeviceUpdateListProvidersDefaultResponse; export function isUnexpected( - response: DeviceUpdateListNames200Response | DeviceUpdateListNamesdefaultResponse, -): response is DeviceUpdateListNamesdefaultResponse; + response: DeviceUpdateListNames200Response | DeviceUpdateListNamesDefaultResponse, +): response is DeviceUpdateListNamesDefaultResponse; export function isUnexpected( - response: DeviceUpdateListVersions200Response | DeviceUpdateListVersionsdefaultResponse, -): response is DeviceUpdateListVersionsdefaultResponse; + response: DeviceUpdateListVersions200Response | DeviceUpdateListVersionsDefaultResponse, +): response is DeviceUpdateListVersionsDefaultResponse; export function isUnexpected( - response: DeviceUpdateListFiles200Response | DeviceUpdateListFilesdefaultResponse, -): response is DeviceUpdateListFilesdefaultResponse; + response: DeviceUpdateListFiles200Response | DeviceUpdateListFilesDefaultResponse, +): response is DeviceUpdateListFilesDefaultResponse; export function isUnexpected( response: | DeviceUpdateGetFile200Response | DeviceUpdateGetFile304Response - | DeviceUpdateGetFiledefaultResponse, -): response is DeviceUpdateGetFiledefaultResponse; + | DeviceUpdateGetFileDefaultResponse, +): response is DeviceUpdateGetFileDefaultResponse; export function isUnexpected( response: | DeviceUpdateListOperationStatuses200Response - | DeviceUpdateListOperationStatusesdefaultResponse, -): response is DeviceUpdateListOperationStatusesdefaultResponse; + | DeviceUpdateListOperationStatusesDefaultResponse, +): response is DeviceUpdateListOperationStatusesDefaultResponse; export function isUnexpected( response: | DeviceUpdateGetOperationStatus200Response | DeviceUpdateGetOperationStatus304Response - | DeviceUpdateGetOperationStatusdefaultResponse, -): response is DeviceUpdateGetOperationStatusdefaultResponse; + | DeviceUpdateGetOperationStatusDefaultResponse, +): response is DeviceUpdateGetOperationStatusDefaultResponse; export function isUnexpected( response: | DeviceManagementListDeviceClasses200Response - | DeviceManagementListDeviceClassesdefaultResponse, -): response is DeviceManagementListDeviceClassesdefaultResponse; + | DeviceManagementListDeviceClassesDefaultResponse, +): response is DeviceManagementListDeviceClassesDefaultResponse; export function isUnexpected( response: | DeviceManagementGetDeviceClass200Response - | DeviceManagementGetDeviceClassdefaultResponse, -): response is DeviceManagementGetDeviceClassdefaultResponse; + | DeviceManagementGetDeviceClassDefaultResponse, +): response is DeviceManagementGetDeviceClassDefaultResponse; export function isUnexpected( response: | DeviceManagementUpdateDeviceClass200Response - | DeviceManagementUpdateDeviceClassdefaultResponse, -): response is DeviceManagementUpdateDeviceClassdefaultResponse; + | DeviceManagementUpdateDeviceClassDefaultResponse, +): response is DeviceManagementUpdateDeviceClassDefaultResponse; export function isUnexpected( response: | DeviceManagementDeleteDeviceClass204Response - | DeviceManagementDeleteDeviceClassdefaultResponse, -): response is DeviceManagementDeleteDeviceClassdefaultResponse; + | DeviceManagementDeleteDeviceClassDefaultResponse, +): response is DeviceManagementDeleteDeviceClassDefaultResponse; export function isUnexpected( response: | DeviceManagementListInstallableUpdatesForDeviceClass200Response - | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse, -): response is DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse; + | DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse, +): response is DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse; export function isUnexpected( - response: DeviceManagementListDevices200Response | DeviceManagementListDevicesdefaultResponse, -): response is DeviceManagementListDevicesdefaultResponse; + response: DeviceManagementListDevices200Response | DeviceManagementListDevicesDefaultResponse, +): response is DeviceManagementListDevicesDefaultResponse; export function isUnexpected( - response: DeviceManagementImportDevices202Response | DeviceManagementImportDevicesdefaultResponse, -): response is DeviceManagementImportDevicesdefaultResponse; + response: DeviceManagementImportDevices202Response | DeviceManagementImportDevicesDefaultResponse, +): response is DeviceManagementImportDevicesDefaultResponse; export function isUnexpected( - response: DeviceManagementGetDevice200Response | DeviceManagementGetDevicedefaultResponse, -): response is DeviceManagementGetDevicedefaultResponse; + response: DeviceManagementGetDevice200Response | DeviceManagementGetDeviceDefaultResponse, +): response is DeviceManagementGetDeviceDefaultResponse; export function isUnexpected( response: | DeviceManagementGetDeviceModule200Response - | DeviceManagementGetDeviceModuledefaultResponse, -): response is DeviceManagementGetDeviceModuledefaultResponse; + | DeviceManagementGetDeviceModuleDefaultResponse, +): response is DeviceManagementGetDeviceModuleDefaultResponse; export function isUnexpected( response: | DeviceManagementGetUpdateCompliance200Response - | DeviceManagementGetUpdateCompliancedefaultResponse, -): response is DeviceManagementGetUpdateCompliancedefaultResponse; + | DeviceManagementGetUpdateComplianceDefaultResponse, +): response is DeviceManagementGetUpdateComplianceDefaultResponse; export function isUnexpected( - response: DeviceManagementListGroups200Response | DeviceManagementListGroupsdefaultResponse, -): response is DeviceManagementListGroupsdefaultResponse; + response: DeviceManagementListGroups200Response | DeviceManagementListGroupsDefaultResponse, +): response is DeviceManagementListGroupsDefaultResponse; export function isUnexpected( - response: DeviceManagementGetGroup200Response | DeviceManagementGetGroupdefaultResponse, -): response is DeviceManagementGetGroupdefaultResponse; + response: DeviceManagementGetGroup200Response | DeviceManagementGetGroupDefaultResponse, +): response is DeviceManagementGetGroupDefaultResponse; export function isUnexpected( - response: DeviceManagementDeleteGroup204Response | DeviceManagementDeleteGroupdefaultResponse, -): response is DeviceManagementDeleteGroupdefaultResponse; + response: DeviceManagementDeleteGroup204Response | DeviceManagementDeleteGroupDefaultResponse, +): response is DeviceManagementDeleteGroupDefaultResponse; export function isUnexpected( response: | DeviceManagementGetUpdateComplianceForGroup200Response - | DeviceManagementGetUpdateComplianceForGroupdefaultResponse, -): response is DeviceManagementGetUpdateComplianceForGroupdefaultResponse; + | DeviceManagementGetUpdateComplianceForGroupDefaultResponse, +): response is DeviceManagementGetUpdateComplianceForGroupDefaultResponse; export function isUnexpected( response: | DeviceManagementListBestUpdatesForGroup200Response - | DeviceManagementListBestUpdatesForGroupdefaultResponse, -): response is DeviceManagementListBestUpdatesForGroupdefaultResponse; + | DeviceManagementListBestUpdatesForGroupDefaultResponse, +): response is DeviceManagementListBestUpdatesForGroupDefaultResponse; export function isUnexpected( response: | DeviceManagementListDeploymentsForGroup200Response - | DeviceManagementListDeploymentsForGroupdefaultResponse, -): response is DeviceManagementListDeploymentsForGroupdefaultResponse; + | DeviceManagementListDeploymentsForGroupDefaultResponse, +): response is DeviceManagementListDeploymentsForGroupDefaultResponse; export function isUnexpected( - response: DeviceManagementGetDeployment200Response | DeviceManagementGetDeploymentdefaultResponse, -): response is DeviceManagementGetDeploymentdefaultResponse; + response: DeviceManagementGetDeployment200Response | DeviceManagementGetDeploymentDefaultResponse, +): response is DeviceManagementGetDeploymentDefaultResponse; export function isUnexpected( response: | DeviceManagementCreateOrUpdateDeployment200Response - | DeviceManagementCreateOrUpdateDeploymentdefaultResponse, -): response is DeviceManagementCreateOrUpdateDeploymentdefaultResponse; + | DeviceManagementCreateOrUpdateDeploymentDefaultResponse, +): response is DeviceManagementCreateOrUpdateDeploymentDefaultResponse; export function isUnexpected( response: | DeviceManagementDeleteDeployment204Response - | DeviceManagementDeleteDeploymentdefaultResponse, -): response is DeviceManagementDeleteDeploymentdefaultResponse; + | DeviceManagementDeleteDeploymentDefaultResponse, +): response is DeviceManagementDeleteDeploymentDefaultResponse; export function isUnexpected( response: | DeviceManagementGetDeploymentStatus200Response - | DeviceManagementGetDeploymentStatusdefaultResponse, -): response is DeviceManagementGetDeploymentStatusdefaultResponse; + | DeviceManagementGetDeploymentStatusDefaultResponse, +): response is DeviceManagementGetDeploymentStatusDefaultResponse; export function isUnexpected( response: | DeviceManagementListDeviceClassSubgroupsForGroup200Response - | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse, -): response is DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse; + | DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse, +): response is DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse; export function isUnexpected( response: | DeviceManagementGetDeviceClassSubgroup200Response - | DeviceManagementGetDeviceClassSubgroupdefaultResponse, -): response is DeviceManagementGetDeviceClassSubgroupdefaultResponse; + | DeviceManagementGetDeviceClassSubgroupDefaultResponse, +): response is DeviceManagementGetDeviceClassSubgroupDefaultResponse; export function isUnexpected( response: | DeviceManagementDeleteDeviceClassSubgroup204Response - | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse, -): response is DeviceManagementDeleteDeviceClassSubgroupdefaultResponse; + | DeviceManagementDeleteDeviceClassSubgroupDefaultResponse, +): response is DeviceManagementDeleteDeviceClassSubgroupDefaultResponse; export function isUnexpected( response: | DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response - | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse, -): response is DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse; + | DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse, +): response is DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse; export function isUnexpected( response: | DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response - | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse, -): response is DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse; + | DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse, +): response is DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse; export function isUnexpected( response: | DeviceManagementListDeploymentsForDeviceClassSubgroup200Response - | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse, -): response is DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse; + | DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse, +): response is DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse; export function isUnexpected( response: | DeviceManagementGetDeploymentForDeviceClassSubgroup200Response - | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse, -): response is DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse; + | DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse, +): response is DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse; export function isUnexpected( response: | DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response - | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse, -): response is DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse; + | DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse, +): response is DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse; export function isUnexpected( response: | DeviceManagementStopDeployment200Response - | DeviceManagementStopDeploymentdefaultResponse, -): response is DeviceManagementStopDeploymentdefaultResponse; + | DeviceManagementStopDeploymentDefaultResponse, +): response is DeviceManagementStopDeploymentDefaultResponse; export function isUnexpected( response: | DeviceManagementRetryDeployment200Response - | DeviceManagementRetryDeploymentdefaultResponse, -): response is DeviceManagementRetryDeploymentdefaultResponse; + | DeviceManagementRetryDeploymentDefaultResponse, +): response is DeviceManagementRetryDeploymentDefaultResponse; export function isUnexpected( response: | DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response - | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse, -): response is DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse; + | DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse, +): response is DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse; export function isUnexpected( response: | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response - | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse, -): response is DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse; + | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse, +): response is DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse; export function isUnexpected( response: | DeviceManagementGetOperationStatus200Response | DeviceManagementGetOperationStatus304Response - | DeviceManagementGetOperationStatusdefaultResponse, -): response is DeviceManagementGetOperationStatusdefaultResponse; + | DeviceManagementGetOperationStatusDefaultResponse, +): response is DeviceManagementGetOperationStatusDefaultResponse; export function isUnexpected( response: | DeviceManagementListOperationStatuses200Response - | DeviceManagementListOperationStatusesdefaultResponse, -): response is DeviceManagementListOperationStatusesdefaultResponse; + | DeviceManagementListOperationStatusesDefaultResponse, +): response is DeviceManagementListOperationStatusesDefaultResponse; export function isUnexpected( response: | DeviceManagementStartLogCollection201Response - | DeviceManagementStartLogCollectiondefaultResponse, -): response is DeviceManagementStartLogCollectiondefaultResponse; + | DeviceManagementStartLogCollectionDefaultResponse, +): response is DeviceManagementStartLogCollectionDefaultResponse; export function isUnexpected( response: | DeviceManagementGetLogCollection200Response - | DeviceManagementGetLogCollectiondefaultResponse, -): response is DeviceManagementGetLogCollectiondefaultResponse; + | DeviceManagementGetLogCollectionDefaultResponse, +): response is DeviceManagementGetLogCollectionDefaultResponse; export function isUnexpected( response: | DeviceManagementListLogCollections200Response - | DeviceManagementListLogCollectionsdefaultResponse, -): response is DeviceManagementListLogCollectionsdefaultResponse; + | DeviceManagementListLogCollectionsDefaultResponse, +): response is DeviceManagementListLogCollectionsDefaultResponse; export function isUnexpected( response: | DeviceManagementGetLogCollectionDetailedStatus200Response - | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse, -): response is DeviceManagementGetLogCollectionDetailedStatusdefaultResponse; + | DeviceManagementGetLogCollectionDetailedStatusDefaultResponse, +): response is DeviceManagementGetLogCollectionDetailedStatusDefaultResponse; export function isUnexpected( response: | DeviceManagementListHealthOfDevices200Response - | DeviceManagementListHealthOfDevicesdefaultResponse, -): response is DeviceManagementListHealthOfDevicesdefaultResponse; + | DeviceManagementListHealthOfDevicesDefaultResponse, +): response is DeviceManagementListHealthOfDevicesDefaultResponse; export function isUnexpected( response: | DeviceUpdateListUpdates200Response - | DeviceUpdateListUpdatesdefaultResponse + | DeviceUpdateListUpdatesDefaultResponse | DeviceUpdateImportUpdate200Response | DeviceUpdateImportUpdate202Response - | DeviceUpdateImportUpdatedefaultResponse + | DeviceUpdateImportUpdateDefaultResponse | DeviceUpdateGetUpdate200Response | DeviceUpdateGetUpdate304Response - | DeviceUpdateGetUpdatedefaultResponse + | DeviceUpdateGetUpdateDefaultResponse | DeviceUpdateDeleteUpdate202Response - | DeviceUpdateDeleteUpdatedefaultResponse + | DeviceUpdateDeleteUpdateDefaultResponse | DeviceUpdateListProviders200Response - | DeviceUpdateListProvidersdefaultResponse + | DeviceUpdateListProvidersDefaultResponse | DeviceUpdateListNames200Response - | DeviceUpdateListNamesdefaultResponse + | DeviceUpdateListNamesDefaultResponse | DeviceUpdateListVersions200Response - | DeviceUpdateListVersionsdefaultResponse + | DeviceUpdateListVersionsDefaultResponse | DeviceUpdateListFiles200Response - | DeviceUpdateListFilesdefaultResponse + | DeviceUpdateListFilesDefaultResponse | DeviceUpdateGetFile200Response | DeviceUpdateGetFile304Response - | DeviceUpdateGetFiledefaultResponse + | DeviceUpdateGetFileDefaultResponse | DeviceUpdateListOperationStatuses200Response - | DeviceUpdateListOperationStatusesdefaultResponse + | DeviceUpdateListOperationStatusesDefaultResponse | DeviceUpdateGetOperationStatus200Response | DeviceUpdateGetOperationStatus304Response - | DeviceUpdateGetOperationStatusdefaultResponse + | DeviceUpdateGetOperationStatusDefaultResponse | DeviceManagementListDeviceClasses200Response - | DeviceManagementListDeviceClassesdefaultResponse + | DeviceManagementListDeviceClassesDefaultResponse | DeviceManagementGetDeviceClass200Response - | DeviceManagementGetDeviceClassdefaultResponse + | DeviceManagementGetDeviceClassDefaultResponse | DeviceManagementUpdateDeviceClass200Response - | DeviceManagementUpdateDeviceClassdefaultResponse + | DeviceManagementUpdateDeviceClassDefaultResponse | DeviceManagementDeleteDeviceClass204Response - | DeviceManagementDeleteDeviceClassdefaultResponse + | DeviceManagementDeleteDeviceClassDefaultResponse | DeviceManagementListInstallableUpdatesForDeviceClass200Response - | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse + | DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse | DeviceManagementListDevices200Response - | DeviceManagementListDevicesdefaultResponse + | DeviceManagementListDevicesDefaultResponse | DeviceManagementImportDevices202Response - | DeviceManagementImportDevicesdefaultResponse + | DeviceManagementImportDevicesDefaultResponse | DeviceManagementGetDevice200Response - | DeviceManagementGetDevicedefaultResponse + | DeviceManagementGetDeviceDefaultResponse | DeviceManagementGetDeviceModule200Response - | DeviceManagementGetDeviceModuledefaultResponse + | DeviceManagementGetDeviceModuleDefaultResponse | DeviceManagementGetUpdateCompliance200Response - | DeviceManagementGetUpdateCompliancedefaultResponse + | DeviceManagementGetUpdateComplianceDefaultResponse | DeviceManagementListGroups200Response - | DeviceManagementListGroupsdefaultResponse + | DeviceManagementListGroupsDefaultResponse | DeviceManagementGetGroup200Response - | DeviceManagementGetGroupdefaultResponse + | DeviceManagementGetGroupDefaultResponse | DeviceManagementDeleteGroup204Response - | DeviceManagementDeleteGroupdefaultResponse + | DeviceManagementDeleteGroupDefaultResponse | DeviceManagementGetUpdateComplianceForGroup200Response - | DeviceManagementGetUpdateComplianceForGroupdefaultResponse + | DeviceManagementGetUpdateComplianceForGroupDefaultResponse | DeviceManagementListBestUpdatesForGroup200Response - | DeviceManagementListBestUpdatesForGroupdefaultResponse + | DeviceManagementListBestUpdatesForGroupDefaultResponse | DeviceManagementListDeploymentsForGroup200Response - | DeviceManagementListDeploymentsForGroupdefaultResponse + | DeviceManagementListDeploymentsForGroupDefaultResponse | DeviceManagementGetDeployment200Response - | DeviceManagementGetDeploymentdefaultResponse + | DeviceManagementGetDeploymentDefaultResponse | DeviceManagementCreateOrUpdateDeployment200Response - | DeviceManagementCreateOrUpdateDeploymentdefaultResponse + | DeviceManagementCreateOrUpdateDeploymentDefaultResponse | DeviceManagementDeleteDeployment204Response - | DeviceManagementDeleteDeploymentdefaultResponse + | DeviceManagementDeleteDeploymentDefaultResponse | DeviceManagementGetDeploymentStatus200Response - | DeviceManagementGetDeploymentStatusdefaultResponse + | DeviceManagementGetDeploymentStatusDefaultResponse | DeviceManagementListDeviceClassSubgroupsForGroup200Response - | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse + | DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse | DeviceManagementGetDeviceClassSubgroup200Response - | DeviceManagementGetDeviceClassSubgroupdefaultResponse + | DeviceManagementGetDeviceClassSubgroupDefaultResponse | DeviceManagementDeleteDeviceClassSubgroup204Response - | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse + | DeviceManagementDeleteDeviceClassSubgroupDefaultResponse | DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response - | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse + | DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse | DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response - | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse + | DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse | DeviceManagementListDeploymentsForDeviceClassSubgroup200Response - | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse + | DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse | DeviceManagementGetDeploymentForDeviceClassSubgroup200Response - | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse + | DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse | DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response - | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse + | DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse | DeviceManagementStopDeployment200Response - | DeviceManagementStopDeploymentdefaultResponse + | DeviceManagementStopDeploymentDefaultResponse | DeviceManagementRetryDeployment200Response - | DeviceManagementRetryDeploymentdefaultResponse + | DeviceManagementRetryDeploymentDefaultResponse | DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response - | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse + | DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response - | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse + | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse | DeviceManagementGetOperationStatus200Response | DeviceManagementGetOperationStatus304Response - | DeviceManagementGetOperationStatusdefaultResponse + | DeviceManagementGetOperationStatusDefaultResponse | DeviceManagementListOperationStatuses200Response - | DeviceManagementListOperationStatusesdefaultResponse + | DeviceManagementListOperationStatusesDefaultResponse | DeviceManagementStartLogCollection201Response - | DeviceManagementStartLogCollectiondefaultResponse + | DeviceManagementStartLogCollectionDefaultResponse | DeviceManagementGetLogCollection200Response - | DeviceManagementGetLogCollectiondefaultResponse + | DeviceManagementGetLogCollectionDefaultResponse | DeviceManagementListLogCollections200Response - | DeviceManagementListLogCollectionsdefaultResponse + | DeviceManagementListLogCollectionsDefaultResponse | DeviceManagementGetLogCollectionDetailedStatus200Response - | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse + | DeviceManagementGetLogCollectionDetailedStatusDefaultResponse | DeviceManagementListHealthOfDevices200Response - | DeviceManagementListHealthOfDevicesdefaultResponse, + | DeviceManagementListHealthOfDevicesDefaultResponse, ): response is - | DeviceUpdateListUpdatesdefaultResponse - | DeviceUpdateImportUpdatedefaultResponse - | DeviceUpdateGetUpdatedefaultResponse - | DeviceUpdateDeleteUpdatedefaultResponse - | DeviceUpdateListProvidersdefaultResponse - | DeviceUpdateListNamesdefaultResponse - | DeviceUpdateListVersionsdefaultResponse - | DeviceUpdateListFilesdefaultResponse - | DeviceUpdateGetFiledefaultResponse - | DeviceUpdateListOperationStatusesdefaultResponse - | DeviceUpdateGetOperationStatusdefaultResponse - | DeviceManagementListDeviceClassesdefaultResponse - | DeviceManagementGetDeviceClassdefaultResponse - | DeviceManagementUpdateDeviceClassdefaultResponse - | DeviceManagementDeleteDeviceClassdefaultResponse - | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse - | DeviceManagementListDevicesdefaultResponse - | DeviceManagementImportDevicesdefaultResponse - | DeviceManagementGetDevicedefaultResponse - | DeviceManagementGetDeviceModuledefaultResponse - | DeviceManagementGetUpdateCompliancedefaultResponse - | DeviceManagementListGroupsdefaultResponse - | DeviceManagementGetGroupdefaultResponse - | DeviceManagementDeleteGroupdefaultResponse - | DeviceManagementGetUpdateComplianceForGroupdefaultResponse - | DeviceManagementListBestUpdatesForGroupdefaultResponse - | DeviceManagementListDeploymentsForGroupdefaultResponse - | DeviceManagementGetDeploymentdefaultResponse - | DeviceManagementCreateOrUpdateDeploymentdefaultResponse - | DeviceManagementDeleteDeploymentdefaultResponse - | DeviceManagementGetDeploymentStatusdefaultResponse - | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse - | DeviceManagementGetDeviceClassSubgroupdefaultResponse - | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse - | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse - | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse - | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse - | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse - | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse - | DeviceManagementStopDeploymentdefaultResponse - | DeviceManagementRetryDeploymentdefaultResponse - | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse - | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse - | DeviceManagementGetOperationStatusdefaultResponse - | DeviceManagementListOperationStatusesdefaultResponse - | DeviceManagementStartLogCollectiondefaultResponse - | DeviceManagementGetLogCollectiondefaultResponse - | DeviceManagementListLogCollectionsdefaultResponse - | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse - | DeviceManagementListHealthOfDevicesdefaultResponse { + | DeviceUpdateListUpdatesDefaultResponse + | DeviceUpdateImportUpdateDefaultResponse + | DeviceUpdateGetUpdateDefaultResponse + | DeviceUpdateDeleteUpdateDefaultResponse + | DeviceUpdateListProvidersDefaultResponse + | DeviceUpdateListNamesDefaultResponse + | DeviceUpdateListVersionsDefaultResponse + | DeviceUpdateListFilesDefaultResponse + | DeviceUpdateGetFileDefaultResponse + | DeviceUpdateListOperationStatusesDefaultResponse + | DeviceUpdateGetOperationStatusDefaultResponse + | DeviceManagementListDeviceClassesDefaultResponse + | DeviceManagementGetDeviceClassDefaultResponse + | DeviceManagementUpdateDeviceClassDefaultResponse + | DeviceManagementDeleteDeviceClassDefaultResponse + | DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse + | DeviceManagementListDevicesDefaultResponse + | DeviceManagementImportDevicesDefaultResponse + | DeviceManagementGetDeviceDefaultResponse + | DeviceManagementGetDeviceModuleDefaultResponse + | DeviceManagementGetUpdateComplianceDefaultResponse + | DeviceManagementListGroupsDefaultResponse + | DeviceManagementGetGroupDefaultResponse + | DeviceManagementDeleteGroupDefaultResponse + | DeviceManagementGetUpdateComplianceForGroupDefaultResponse + | DeviceManagementListBestUpdatesForGroupDefaultResponse + | DeviceManagementListDeploymentsForGroupDefaultResponse + | DeviceManagementGetDeploymentDefaultResponse + | DeviceManagementCreateOrUpdateDeploymentDefaultResponse + | DeviceManagementDeleteDeploymentDefaultResponse + | DeviceManagementGetDeploymentStatusDefaultResponse + | DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse + | DeviceManagementGetDeviceClassSubgroupDefaultResponse + | DeviceManagementDeleteDeviceClassSubgroupDefaultResponse + | DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse + | DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse + | DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse + | DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse + | DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse + | DeviceManagementStopDeploymentDefaultResponse + | DeviceManagementRetryDeploymentDefaultResponse + | DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse + | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse + | DeviceManagementGetOperationStatusDefaultResponse + | DeviceManagementListOperationStatusesDefaultResponse + | DeviceManagementStartLogCollectionDefaultResponse + | DeviceManagementGetLogCollectionDefaultResponse + | DeviceManagementListLogCollectionsDefaultResponse + | DeviceManagementGetLogCollectionDetailedStatusDefaultResponse + | DeviceManagementListHealthOfDevicesDefaultResponse { const lroOriginal = response.headers["x-ms-original-url"]; const url = new URL(lroOriginal ?? response.request.url); const method = response.request.method; let pathDetails = responseMap[`${method} ${url.pathname}`]; if (!pathDetails) { - pathDetails = geParametrizedPathSuccess(url.pathname); + pathDetails = getParametrizedPathSuccess(method, url.pathname); } return !pathDetails.includes(response.status); } -function geParametrizedPathSuccess(path: string): string[] { +function getParametrizedPathSuccess(method: string, path: string): string[] { const pathParts = path.split("/"); + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + // Iterate the responseMap to find a match for (const [key, value] of Object.entries(responseMap)) { // Extracting the path from the map key which is in format // GET /path/foo + if (!key.startsWith(method)) { + continue; + } const candidatePath = getPathFromMapKey(key); // Get each part of the url path const candidateParts = candidatePath.split("/"); - // If the candidate and actual paths don't match in size - // we move on to the next candidate path - if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) { - // track if we have found a match to return the values found. - let found = true; - for (let i = 0; i < candidateParts.length; i++) { - if (candidateParts[i].startsWith("{") && candidateParts[i].endsWith("}")) { - // If the current part of the candidate is a "template" part - // it is a match with the actual path part on hand - // skip as the parameterized part can match anything - continue; - } + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); - // If the candidate part is not a template and - // the parts don't match mark the candidate as not found - // to move on with the next candidate path. - if (candidateParts[i] !== pathParts[i]) { + if (!isMatched) { found = false; break; } + continue; } - // We finished evaluating the current candidate parts - // if all parts matched we return the success values form - // the path mapping. - if (found) { - return value; + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; } } - } - // No match was found, return an empty array. - return []; -} + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } -function hasParametrizedPath(path: string): boolean { - return path.includes("/{"); + return matchedValue; } function getPathFromMapKey(mapKey: string): string { diff --git a/sdk/deviceupdate/iot-device-update-rest/src/logger.ts b/sdk/deviceupdate/iot-device-update-rest/src/logger.ts new file mode 100644 index 000000000000..decf9a4b6147 --- /dev/null +++ b/sdk/deviceupdate/iot-device-update-rest/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("iot-device-update"); diff --git a/sdk/deviceupdate/iot-device-update-rest/src/models.ts b/sdk/deviceupdate/iot-device-update-rest/src/models.ts index e8811a006368..f70877b435bc 100644 --- a/sdk/deviceupdate/iot-device-update-rest/src/models.ts +++ b/sdk/deviceupdate/iot-device-update-rest/src/models.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +/** Update identifier. */ export interface UpdateId { /** Update provider. */ provider: string; @@ -10,6 +11,7 @@ export interface UpdateId { version: string; } +/** Import update input item metadata. */ export interface ImportUpdateInputItem { /** Import manifest metadata like source URL, file size/hashes, etc. */ importManifest: ImportManifestMetadata; @@ -19,6 +21,7 @@ export interface ImportUpdateInputItem { files?: Array; } +/** Metadata describing the import manifest, a document which describes the files and other metadata about an update version. */ export interface ImportManifestMetadata { /** Azure Blob location from which the import manifest can be downloaded by Device Update for IoT Hub. This is typically a read-only SAS-protected blob URL with an expiration set to at least 4 hours. */ url: string; @@ -28,6 +31,7 @@ export interface ImportManifestMetadata { hashes: Record; } +/** Metadata describing an update file. */ export interface FileImportMetadata { /** Update file name as specified inside import manifest. */ filename: string; @@ -35,20 +39,19 @@ export interface FileImportMetadata { url: string; } +/** Update information. */ export interface UpdateInfo { /** Update identifier. */ updateId: UpdateId; - /** Update description. */ - description?: string; - /** Friendly update name. */ - friendlyName?: string; } +/** Device Class JSON Merge Patch request body */ export interface PatchBody { /** The device class friendly name. Friendly name can be 1-100 characters, alphanumeric, dot, and dash. */ friendlyName: string; } +/** Deployment metadata. */ export interface Deployment { /** The caller-provided deployment identifier. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote. The Updates view in the Azure Portal IoT Hub resource generates a GUID for deploymentId when you create a deployment. */ deploymentId: string; @@ -70,6 +73,7 @@ export interface Deployment { isCloudInitiatedRollback?: boolean; } +/** Rollback policy for deployment */ export interface CloudInitiatedRollbackPolicy { /** Update to rollback to. */ update: UpdateInfo; @@ -77,6 +81,7 @@ export interface CloudInitiatedRollbackPolicy { failure: CloudInitiatedRollbackPolicyFailure; } +/** Failure conditions to initiate rollback policy */ export interface CloudInitiatedRollbackPolicyFailure { /** Percentage of devices that failed. */ devicesFailedPercentage: number; @@ -84,6 +89,7 @@ export interface CloudInitiatedRollbackPolicyFailure { devicesFailedCount: number; } +/** Diagnostics request body */ export interface LogCollection { /** The log collection id. */ operationId?: string; @@ -91,14 +97,9 @@ export interface LogCollection { deviceList: Array; /** Description of the diagnostics operation. */ description?: string; - /** The timestamp when the operation was created. */ - createdDateTime?: string; - /** A timestamp for when the current state was entered. */ - lastActionDateTime?: string; - /** Operation status. */ - status?: "NotStarted" | "Running" | "Succeeded" | "Failed"; } +/** Device Update agent id */ export interface DeviceUpdateAgentId { /** Device Id */ deviceId: string; diff --git a/sdk/deviceupdate/iot-device-update-rest/src/outputModels.ts b/sdk/deviceupdate/iot-device-update-rest/src/outputModels.ts index 0aa6f7ec8a65..bb1e76d917f4 100644 --- a/sdk/deviceupdate/iot-device-update-rest/src/outputModels.ts +++ b/sdk/deviceupdate/iot-device-update-rest/src/outputModels.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +/** The list of updates. */ export interface UpdateListOutput { /** The collection of pageable items. */ value: Array; @@ -8,6 +9,7 @@ export interface UpdateListOutput { nextLink?: string; } +/** Update metadata. */ export interface UpdateOutput { /** Update identity. */ updateId: UpdateIdOutput; @@ -39,6 +41,7 @@ export interface UpdateOutput { etag?: string; } +/** Update identifier. */ export interface UpdateIdOutput { /** Update provider. */ provider: string; @@ -53,6 +56,7 @@ export interface InstructionsOutput { steps: Array; } +/** Update install instruction step. */ export interface StepOutput { /** Step type. */ type?: "Inline" | "Reference"; @@ -68,11 +72,13 @@ export interface StepOutput { updateId?: UpdateIdOutput; } +/** Common error response. */ export interface ErrorResponseOutput { /** The error details. */ error: ErrorModelOutput; } +/** Error details. */ export interface ErrorModelOutput { /** Server defined error code. */ code: string; @@ -88,6 +94,7 @@ export interface ErrorModelOutput { occurredDateTime?: string; } +/** An object containing more specific information than the current object about the error. */ export interface InnerErrorOutput { /** A more specific error code than what was provided by the containing error. */ code: string; @@ -99,6 +106,7 @@ export interface InnerErrorOutput { innerError?: InnerErrorOutput; } +/** The list of strings with server paging support. */ export interface StringsListOutput { /** The collection of pageable items. */ value: Array; @@ -106,6 +114,7 @@ export interface StringsListOutput { nextLink?: string; } +/** Update file metadata. */ export interface UpdateFileOutput extends UpdateFileBaseOutput { /** File identity, generated by server at import time. */ fileId: string; @@ -117,6 +126,7 @@ export interface UpdateFileOutput extends UpdateFileBaseOutput { etag?: string; } +/** Update file basic metadata. */ export interface UpdateFileBaseOutput { /** File name. */ fileName: string; @@ -134,11 +144,13 @@ export interface UpdateFileBaseOutput { properties?: Record; } +/** Download handler for utilizing related files to download payload file. */ export interface UpdateFileDownloadHandlerOutput { /** Download handler identifier. */ id: string; } +/** The list of operations with server paging support. */ export interface UpdateOperationsListOutput { /** The collection of pageable items. */ value: Array; @@ -146,6 +158,7 @@ export interface UpdateOperationsListOutput { nextLink?: string; } +/** Operation metadata. */ export interface UpdateOperationOutput { /** Operation Id. */ operationId: string; @@ -167,15 +180,17 @@ export interface UpdateOperationOutput { etag?: string; } +/** Update information. */ export interface UpdateInfoOutput { /** Update identifier. */ updateId: UpdateIdOutput; /** Update description. */ - description?: string; + readonly description?: string; /** Friendly update name. */ - friendlyName?: string; + readonly friendlyName?: string; } +/** The list of device classes. */ export interface DeviceClassesListOutput { /** The collection of pageable items. */ value: Array; @@ -183,6 +198,7 @@ export interface DeviceClassesListOutput { nextLink?: string; } +/** Device class metadata. */ export interface DeviceClassOutput { /** The device class identifier. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash. */ deviceClassId: string; @@ -194,6 +210,7 @@ export interface DeviceClassOutput { bestCompatibleUpdate?: UpdateInfoOutput; } +/** The device class properties that are used to calculate the device class Id */ export interface DeviceClassPropertiesOutput { /** The Device Update agent contract model. */ contractModel?: ContractModelOutput; @@ -201,6 +218,7 @@ export interface DeviceClassPropertiesOutput { compatProperties: Record; } +/** The Device Update agent contract model. */ export interface ContractModelOutput { /** The Device Update agent contract model Id of the device class. This is also used to calculate the device class Id. */ id: string; @@ -208,6 +226,7 @@ export interface ContractModelOutput { name: string; } +/** List of update information. */ export interface UpdateInfoListOutput { /** The collection of pageable items. */ value: Array; @@ -215,6 +234,7 @@ export interface UpdateInfoListOutput { nextLink?: string; } +/** The list of devices. */ export interface DevicesListOutput { /** The collection of pageable items. */ value: Array; @@ -222,6 +242,7 @@ export interface DevicesListOutput { nextLink?: string; } +/** Device metadata. */ export interface DeviceOutput { /** Device identity. */ deviceId: string; @@ -245,6 +266,7 @@ export interface DeviceOutput { lastInstallResult?: InstallResultOutput; } +/** The install result of an update and any step results under it. */ export interface InstallResultOutput { /** Install result code. */ resultCode: number; @@ -256,6 +278,7 @@ export interface InstallResultOutput { stepResults?: Array; } +/** The step result under an update. */ export interface StepResultOutput { /** The update that this step installs if it is of reference type. */ update?: UpdateInfoOutput; @@ -269,6 +292,7 @@ export interface StepResultOutput { resultDetails?: string; } +/** Update compliance information. */ export interface UpdateComplianceOutput { /** Total number of devices. */ totalDeviceCount: number; @@ -280,6 +304,7 @@ export interface UpdateComplianceOutput { updatesInProgressDeviceCount: number; } +/** The list of groups. */ export interface GroupsListOutput { /** The collection of pageable items. */ value: Array; @@ -287,6 +312,7 @@ export interface GroupsListOutput { nextLink?: string; } +/** Group details. */ export interface GroupOutput { /** Group identity. This is created from the value of the ADUGroup tag in the Iot Hub's device/module twin or $default for devices with no tag. */ groupId: string; @@ -306,6 +332,7 @@ export interface GroupOutput { deployments?: Array; } +/** The list of updatable devices for a device class subgroup. */ export interface DeviceClassSubgroupUpdatableDevicesListOutput { /** The collection of pageable items. */ value: Array; @@ -313,6 +340,7 @@ export interface DeviceClassSubgroupUpdatableDevicesListOutput { nextLink?: string; } +/** Device class subgroup, update information, and the number of devices for which the update is applicable. */ export interface DeviceClassSubgroupUpdatableDevicesOutput { /** The group Id */ groupId: string; @@ -324,6 +352,7 @@ export interface DeviceClassSubgroupUpdatableDevicesOutput { deviceCount: number; } +/** The list of deployments. */ export interface DeploymentsListOutput { /** The collection of pageable items. */ value: Array; @@ -331,6 +360,7 @@ export interface DeploymentsListOutput { nextLink?: string; } +/** Deployment metadata. */ export interface DeploymentOutput { /** The caller-provided deployment identifier. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote. The Updates view in the Azure Portal IoT Hub resource generates a GUID for deploymentId when you create a deployment. */ deploymentId: string; @@ -352,6 +382,7 @@ export interface DeploymentOutput { isCloudInitiatedRollback?: boolean; } +/** Rollback policy for deployment */ export interface CloudInitiatedRollbackPolicyOutput { /** Update to rollback to. */ update: UpdateInfoOutput; @@ -359,6 +390,7 @@ export interface CloudInitiatedRollbackPolicyOutput { failure: CloudInitiatedRollbackPolicyFailureOutput; } +/** Failure conditions to initiate rollback policy */ export interface CloudInitiatedRollbackPolicyFailureOutput { /** Percentage of devices that failed. */ devicesFailedPercentage: number; @@ -366,6 +398,7 @@ export interface CloudInitiatedRollbackPolicyFailureOutput { devicesFailedCount: number; } +/** Deployment status metadata. */ export interface DeploymentStatusOutput { /** The group identity */ groupId: string; @@ -377,6 +410,7 @@ export interface DeploymentStatusOutput { subgroupStatus: Array; } +/** Device class subgroup deployment status metadata. */ export interface DeviceClassSubgroupDeploymentStatusOutput { /** The group identity */ groupId: string; @@ -398,6 +432,7 @@ export interface DeviceClassSubgroupDeploymentStatusOutput { devicesCanceledCount?: number; } +/** The list of device class subgroups within a group. */ export interface DeviceClassSubgroupsListOutput { /** The collection of pageable items. */ value: Array; @@ -405,6 +440,7 @@ export interface DeviceClassSubgroupsListOutput { nextLink?: string; } +/** Device class subgroup details. A device class subgroup is a subset of devices in a group that share the same device class id. */ export interface DeviceClassSubgroupOutput { /** Device class subgroup identity. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash. */ deviceClassId: string; @@ -418,6 +454,7 @@ export interface DeviceClassSubgroupOutput { deploymentId?: string; } +/** The list of deployment device states. */ export interface DeploymentDeviceStatesListOutput { /** The collection of pageable items. */ value: Array; @@ -425,6 +462,7 @@ export interface DeploymentDeviceStatesListOutput { nextLink?: string; } +/** Deployment device status. */ export interface DeploymentDeviceStateOutput { /** Device identity. */ deviceId: string; @@ -438,6 +476,7 @@ export interface DeploymentDeviceStateOutput { deviceState: "Succeeded" | "InProgress" | "Canceled" | "Failed"; } +/** Operation metadata. */ export interface DeviceOperationOutput { /** Operation Id. */ operationId: string; @@ -455,6 +494,7 @@ export interface DeviceOperationOutput { etag?: string; } +/** The list of device operations with server paging support. */ export interface DeviceOperationsListOutput { /** The collection of pageable items. */ value: Array; @@ -462,6 +502,7 @@ export interface DeviceOperationsListOutput { nextLink?: string; } +/** Diagnostics request body */ export interface LogCollectionOutput { /** The log collection id. */ operationId?: string; @@ -470,13 +511,14 @@ export interface LogCollectionOutput { /** Description of the diagnostics operation. */ description?: string; /** The timestamp when the operation was created. */ - createdDateTime?: string; + readonly createdDateTime?: string; /** A timestamp for when the current state was entered. */ - lastActionDateTime?: string; + readonly lastActionDateTime?: string; /** Operation status. */ - status?: "NotStarted" | "Running" | "Succeeded" | "Failed"; + readonly status?: "NotStarted" | "Running" | "Succeeded" | "Failed"; } +/** Device Update agent id */ export interface DeviceUpdateAgentIdOutput { /** Device Id */ deviceId: string; @@ -484,6 +526,7 @@ export interface DeviceUpdateAgentIdOutput { moduleId?: string; } +/** The list of log collections with server paging support. */ export interface LogCollectionListOutput { /** The collection of pageable items. */ value: Array; @@ -491,6 +534,7 @@ export interface LogCollectionListOutput { nextLink?: string; } +/** Device diagnostics operation detailed status */ export interface LogCollectionOperationDetailedStatusOutput { /** The device diagnostics operation id. */ operationId?: string; @@ -506,6 +550,7 @@ export interface LogCollectionOperationDetailedStatusOutput { description?: string; } +/** Diagnostics operation device status */ export interface LogCollectionOperationDeviceStatusOutput { /** Device id */ deviceId: string; @@ -521,6 +566,7 @@ export interface LogCollectionOperationDeviceStatusOutput { logLocation?: string; } +/** Array of Device Health, with server paging support. */ export interface DeviceHealthListOutput { /** The collection of pageable items. */ value: Array; @@ -528,6 +574,7 @@ export interface DeviceHealthListOutput { nextLink?: string; } +/** Device Health */ export interface DeviceHealthOutput { /** Device id */ deviceId: string; @@ -541,6 +588,7 @@ export interface DeviceHealthOutput { healthChecks: Array; } +/** Health check */ export interface HealthCheckOutput { /** Health check name */ name?: string; diff --git a/sdk/deviceupdate/iot-device-update-rest/src/paginateHelper.ts b/sdk/deviceupdate/iot-device-update-rest/src/paginateHelper.ts index 5d541b4e406d..9ea946d9d6c5 100644 --- a/sdk/deviceupdate/iot-device-update-rest/src/paginateHelper.ts +++ b/sdk/deviceupdate/iot-device-update-rest/src/paginateHelper.ts @@ -1,11 +1,148 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; import { createRestError } from "@azure-rest/core-client"; +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} + /** * Helper type to extract the type of an array */ @@ -14,10 +151,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; diff --git a/sdk/deviceupdate/iot-device-update-rest/src/parameters.ts b/sdk/deviceupdate/iot-device-update-rest/src/parameters.ts index 83ae705758e8..aa8fbcd68ee0 100644 --- a/sdk/deviceupdate/iot-device-update-rest/src/parameters.ts +++ b/sdk/deviceupdate/iot-device-update-rest/src/parameters.ts @@ -39,7 +39,7 @@ export interface DeviceUpdateGetUpdateHeaders { } export interface DeviceUpdateGetUpdateHeaderParam { - headers: RawHttpHeadersInput & DeviceUpdateGetUpdateHeaders; + headers?: RawHttpHeadersInput & DeviceUpdateGetUpdateHeaders; } export type DeviceUpdateGetUpdateParameters = DeviceUpdateGetUpdateHeaderParam & RequestParameters; @@ -66,7 +66,7 @@ export interface DeviceUpdateGetFileHeaders { } export interface DeviceUpdateGetFileHeaderParam { - headers: RawHttpHeadersInput & DeviceUpdateGetFileHeaders; + headers?: RawHttpHeadersInput & DeviceUpdateGetFileHeaders; } export type DeviceUpdateGetFileParameters = DeviceUpdateGetFileHeaderParam & RequestParameters; @@ -91,7 +91,7 @@ export interface DeviceUpdateGetOperationStatusHeaders { } export interface DeviceUpdateGetOperationStatusHeaderParam { - headers: RawHttpHeadersInput & DeviceUpdateGetOperationStatusHeaders; + headers?: RawHttpHeadersInput & DeviceUpdateGetOperationStatusHeaders; } export type DeviceUpdateGetOperationStatusParameters = DeviceUpdateGetOperationStatusHeaderParam & @@ -109,10 +109,12 @@ export interface DeviceManagementListDeviceClassesQueryParam { export type DeviceManagementListDeviceClassesParameters = DeviceManagementListDeviceClassesQueryParam & RequestParameters; export type DeviceManagementGetDeviceClassParameters = RequestParameters; +/** The device class json merge patch body. Currently only supports patching friendlyName. */ +export type PatchBodyResourceMergeAndPatch = Partial; export interface DeviceManagementUpdateDeviceClassBodyParam { /** The device class json merge patch body. Currently only supports patching friendlyName. */ - body: PatchBody; + body: PatchBodyResourceMergeAndPatch; } export interface DeviceManagementUpdateDeviceClassMediaTypesParam { @@ -253,7 +255,7 @@ export interface DeviceManagementGetOperationStatusHeaders { } export interface DeviceManagementGetOperationStatusHeaderParam { - headers: RawHttpHeadersInput & DeviceManagementGetOperationStatusHeaders; + headers?: RawHttpHeadersInput & DeviceManagementGetOperationStatusHeaders; } export type DeviceManagementGetOperationStatusParameters = diff --git a/sdk/deviceupdate/iot-device-update-rest/src/pollingHelper.ts b/sdk/deviceupdate/iot-device-update-rest/src/pollingHelper.ts index 2bce93c987fa..a2668fc5d9c7 100644 --- a/sdk/deviceupdate/iot-device-update-rest/src/pollingHelper.ts +++ b/sdk/deviceupdate/iot-device-update-rest/src/pollingHelper.ts @@ -2,14 +2,81 @@ // Licensed under the MIT License. import type { Client, HttpResponse } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; import type { - LongRunningOperation, - LroEngineOptions, - LroResponse, - PollerLike, - PollOperationState, + CancelOnProgress, + CreateHttpPollerOptions, + RunningOperation, + OperationResponse, + OperationState, } from "@azure/core-lro"; -import { LroEngine } from "@azure/core-lro"; +import { createHttpPoller } from "@azure/core-lro"; + +/** + * A simple poller that can be used to poll a long running operation. + */ +export interface SimplePollerLike, TResult> { + /** + * Returns true if the poller has finished polling. + */ + isDone(): boolean; + /** + * Returns the state of the operation. + */ + getOperationState(): TState; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult(): TResult | undefined; + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + */ + poll(options?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback: (state: TState) => void): CancelOnProgress; + + /** + * Returns a promise that could be used for serialized version of the poller's operation + * by invoking the operation's serialize method. + */ + serialize(): Promise; + + /** + * Wait the poller to be submitted. + */ + submitted(): Promise; + + /** + * Returns a string representation of the poller's operation. Similar to serialize but returns a string. + * @deprecated Use serialize() instead. + */ + toString(): string; + + /** + * Stops the poller from continuing to poll. Please note this will only stop the client-side polling + * @deprecated Use abortSignal to stop polling instead. + */ + stopPolling(): void; + + /** + * Returns true if the poller is stopped. + * @deprecated Use abortSignal status to track this instead. + */ + isStopped(): boolean; +} /** * Helper function that builds a Poller object to help polling a long running operation. @@ -18,41 +85,100 @@ import { LroEngine } from "@azure/core-lro"; * @param options - Options to set a resume state or custom polling interval. * @returns - A poller object to poll for operation state updates and eventually get the final response. */ -export function getLongRunningPoller( +export async function getLongRunningPoller( client: Client, initialResponse: TResult, - options: LroEngineOptions> = {}, -): PollerLike, TResult> { - const poller: LongRunningOperation = { - requestMethod: initialResponse.request.method, - requestPath: initialResponse.request.url, + options: CreateHttpPollerOptions> = {}, +): Promise, TResult>> { + const abortController = new AbortController(); + const poller: RunningOperation = { sendInitialRequest: async () => { // In the case of Rest Clients we are building the LRO poller object from a response that's the reason // we are not triggering the initial request here, just extracting the information from the // response we were provided. return getLroResponse(initialResponse); }, - sendPollRequest: async (path) => { + sendPollRequest: async (path: string, pollOptions?: { abortSignal?: AbortSignalLike }) => { // This is the callback that is going to be called to poll the service // to get the latest status. We use the client provided and the polling path // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location // depending on the lro pattern that the service implements. If non is provided we default to the initial path. - const response = await client.pathUnchecked(path ?? initialResponse.request.url).get(); + function abortListener(): void { + abortController.abort(); + } + const inputAbortSignal = pollOptions?.abortSignal; + const abortSignal = abortController.signal; + if (inputAbortSignal?.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + response = await client + .pathUnchecked(path ?? initialResponse.request.url) + .get({ abortSignal }); + } finally { + inputAbortSignal?.removeEventListener("abort", abortListener); + } const lroResponse = getLroResponse(response as TResult); lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url; return lroResponse; }, }; - return new LroEngine(poller, options); + options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true; + const httpPoller = createHttpPoller(poller, options); + const simplePoller: SimplePollerLike, TResult> = { + isDone() { + return httpPoller.isDone; + }, + isStopped() { + return abortController.signal.aborted; + }, + getOperationState() { + if (!httpPoller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return httpPoller.operationState; + }, + getResult() { + return httpPoller.result; + }, + toString() { + if (!httpPoller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return JSON.stringify({ + state: httpPoller.operationState, + }); + }, + stopPolling() { + abortController.abort(); + }, + onProgress: httpPoller.onProgress, + poll: httpPoller.poll, + pollUntilDone: httpPoller.pollUntilDone, + serialize: httpPoller.serialize, + submitted: httpPoller.submitted, + }; + return simplePoller; } /** - * Converts a Rest Client response to a response that the LRO engine knows about + * Converts a Rest Client response to a response that the LRO implementation understands * @param response - a rest client http response - * @returns - An LRO response that the LRO engine can work with + * @returns - An LRO response that the LRO implementation understands */ -function getLroResponse(response: TResult): LroResponse { +function getLroResponse( + response: TResult, +): OperationResponse { if (Number.isNaN(response.status)) { throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`); } diff --git a/sdk/deviceupdate/iot-device-update-rest/src/responses.ts b/sdk/deviceupdate/iot-device-update-rest/src/responses.ts index ccff65981808..6564e3ab1653 100644 --- a/sdk/deviceupdate/iot-device-update-rest/src/responses.ts +++ b/sdk/deviceupdate/iot-device-update-rest/src/responses.ts @@ -43,7 +43,7 @@ export interface DeviceUpdateListUpdates200Response extends HttpResponse { } /** Get a list of all updates that have been imported to Device Update for IoT Hub. */ -export interface DeviceUpdateListUpdatesdefaultResponse extends HttpResponse { +export interface DeviceUpdateListUpdatesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -62,12 +62,11 @@ export interface DeviceUpdateImportUpdate202Headers { /** Import new update version. This is a long-running-operation; use Operation-Location response header value to check for operation status. */ export interface DeviceUpdateImportUpdate202Response extends HttpResponse { status: "202"; - body: Record; headers: RawHttpHeaders & DeviceUpdateImportUpdate202Headers; } /** Import new update version. This is a long-running-operation; use Operation-Location response header value to check for operation status. */ -export interface DeviceUpdateImportUpdatedefaultResponse extends HttpResponse { +export interface DeviceUpdateImportUpdateDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -81,11 +80,10 @@ export interface DeviceUpdateGetUpdate200Response extends HttpResponse { /** Get a specific update version. */ export interface DeviceUpdateGetUpdate304Response extends HttpResponse { status: "304"; - body: Record; } /** Get a specific update version. */ -export interface DeviceUpdateGetUpdatedefaultResponse extends HttpResponse { +export interface DeviceUpdateGetUpdateDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -98,12 +96,11 @@ export interface DeviceUpdateDeleteUpdate202Headers { /** Delete a specific update version. This is a long-running-operation; use Operation-Location response header value to check for operation status. */ export interface DeviceUpdateDeleteUpdate202Response extends HttpResponse { status: "202"; - body: Record; headers: RawHttpHeaders & DeviceUpdateDeleteUpdate202Headers; } /** Delete a specific update version. This is a long-running-operation; use Operation-Location response header value to check for operation status. */ -export interface DeviceUpdateDeleteUpdatedefaultResponse extends HttpResponse { +export interface DeviceUpdateDeleteUpdateDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -115,7 +112,7 @@ export interface DeviceUpdateListProviders200Response extends HttpResponse { } /** Get a list of all update providers that have been imported to Device Update for IoT Hub. */ -export interface DeviceUpdateListProvidersdefaultResponse extends HttpResponse { +export interface DeviceUpdateListProvidersDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -127,7 +124,7 @@ export interface DeviceUpdateListNames200Response extends HttpResponse { } /** Get a list of all update names that match the specified provider. */ -export interface DeviceUpdateListNamesdefaultResponse extends HttpResponse { +export interface DeviceUpdateListNamesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -139,7 +136,7 @@ export interface DeviceUpdateListVersions200Response extends HttpResponse { } /** Get a list of all update versions that match the specified provider and name. */ -export interface DeviceUpdateListVersionsdefaultResponse extends HttpResponse { +export interface DeviceUpdateListVersionsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -151,7 +148,7 @@ export interface DeviceUpdateListFiles200Response extends HttpResponse { } /** Get a list of all update file identifiers for the specified version. */ -export interface DeviceUpdateListFilesdefaultResponse extends HttpResponse { +export interface DeviceUpdateListFilesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -165,11 +162,10 @@ export interface DeviceUpdateGetFile200Response extends HttpResponse { /** Get a specific update file from the version. */ export interface DeviceUpdateGetFile304Response extends HttpResponse { status: "304"; - body: Record; } /** Get a specific update file from the version. */ -export interface DeviceUpdateGetFiledefaultResponse extends HttpResponse { +export interface DeviceUpdateGetFileDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -181,7 +177,7 @@ export interface DeviceUpdateListOperationStatuses200Response extends HttpRespon } /** Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete operations are not returned by this API version. */ -export interface DeviceUpdateListOperationStatusesdefaultResponse extends HttpResponse { +export interface DeviceUpdateListOperationStatusesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -201,11 +197,10 @@ export interface DeviceUpdateGetOperationStatus200Response extends HttpResponse /** Retrieve operation status. */ export interface DeviceUpdateGetOperationStatus304Response extends HttpResponse { status: "304"; - body: Record; } /** Retrieve operation status. */ -export interface DeviceUpdateGetOperationStatusdefaultResponse extends HttpResponse { +export interface DeviceUpdateGetOperationStatusDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -217,7 +212,7 @@ export interface DeviceManagementListDeviceClasses200Response extends HttpRespon } /** Gets a list of all device classes (sets of devices compatible with the same updates based on the model Id and compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device Update for IoT Hub. */ -export interface DeviceManagementListDeviceClassesdefaultResponse extends HttpResponse { +export interface DeviceManagementListDeviceClassesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -229,7 +224,7 @@ export interface DeviceManagementGetDeviceClass200Response extends HttpResponse } /** Gets the properties of a device class. */ -export interface DeviceManagementGetDeviceClassdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceClassDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -241,7 +236,7 @@ export interface DeviceManagementUpdateDeviceClass200Response extends HttpRespon } /** Update device class details. */ -export interface DeviceManagementUpdateDeviceClassdefaultResponse extends HttpResponse { +export interface DeviceManagementUpdateDeviceClassDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -249,11 +244,10 @@ export interface DeviceManagementUpdateDeviceClassdefaultResponse extends HttpRe /** Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the records from the system and to stop checking the compatibility of this device class with new updates. If a device is ever reconnected for this device class it will be re-created. */ export interface DeviceManagementDeleteDeviceClass204Response extends HttpResponse { status: "204"; - body: Record; } /** Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the records from the system and to stop checking the compatibility of this device class with new updates. If a device is ever reconnected for this device class it will be re-created. */ -export interface DeviceManagementDeleteDeviceClassdefaultResponse extends HttpResponse { +export interface DeviceManagementDeleteDeviceClassDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -266,7 +260,7 @@ export interface DeviceManagementListInstallableUpdatesForDeviceClass200Response } /** Gets a list of installable updates for a device class. */ -export interface DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse +export interface DeviceManagementListInstallableUpdatesForDeviceClassDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -279,7 +273,7 @@ export interface DeviceManagementListDevices200Response extends HttpResponse { } /** Gets a list of devices connected to Device Update for IoT Hub. */ -export interface DeviceManagementListDevicesdefaultResponse extends HttpResponse { +export interface DeviceManagementListDevicesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -292,12 +286,11 @@ export interface DeviceManagementImportDevices202Headers { /** Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header value to check for operation status. */ export interface DeviceManagementImportDevices202Response extends HttpResponse { status: "202"; - body: Record; headers: RawHttpHeaders & DeviceManagementImportDevices202Headers; } /** Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header value to check for operation status. */ -export interface DeviceManagementImportDevicesdefaultResponse extends HttpResponse { +export interface DeviceManagementImportDevicesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -309,7 +302,7 @@ export interface DeviceManagementGetDevice200Response extends HttpResponse { } /** Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub. */ -export interface DeviceManagementGetDevicedefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -321,7 +314,7 @@ export interface DeviceManagementGetDeviceModule200Response extends HttpResponse } /** Gets the device module properties and latest deployment status for a device module connected to Device Update for IoT Hub. */ -export interface DeviceManagementGetDeviceModuledefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceModuleDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -333,7 +326,7 @@ export interface DeviceManagementGetUpdateCompliance200Response extends HttpResp } /** Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress receiving new updates. */ -export interface DeviceManagementGetUpdateCompliancedefaultResponse extends HttpResponse { +export interface DeviceManagementGetUpdateComplianceDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -345,7 +338,7 @@ export interface DeviceManagementListGroups200Response extends HttpResponse { } /** Gets a list of all device groups. The $default group will always be returned first. */ -export interface DeviceManagementListGroupsdefaultResponse extends HttpResponse { +export interface DeviceManagementListGroupsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -357,7 +350,7 @@ export interface DeviceManagementGetGroup200Response extends HttpResponse { } /** Gets the device group properties. */ -export interface DeviceManagementGetGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementGetGroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -365,11 +358,10 @@ export interface DeviceManagementGetGroupdefaultResponse extends HttpResponse { /** Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are retained for history purposes. Users can call this method to delete a group if they do not need to retain any of the history of the group and no longer need it. If a device is ever connected again for this group after the group was deleted it will be automatically re-created but there will be no history. */ export interface DeviceManagementDeleteGroup204Response extends HttpResponse { status: "204"; - body: Record; } /** Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are retained for history purposes. Users can call this method to delete a group if they do not need to retain any of the history of the group and no longer need it. If a device is ever connected again for this group after the group was deleted it will be automatically re-created but there will be no history. */ -export interface DeviceManagementDeleteGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementDeleteGroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -381,7 +373,7 @@ export interface DeviceManagementGetUpdateComplianceForGroup200Response extends } /** Get device group update compliance information such as how many devices are on their latest update, how many need new updates, and how many are in progress on receiving a new update. */ -export interface DeviceManagementGetUpdateComplianceForGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementGetUpdateComplianceForGroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -393,7 +385,7 @@ export interface DeviceManagementListBestUpdatesForGroup200Response extends Http } /** Get the best available updates for a device group and a count of how many devices need each update. */ -export interface DeviceManagementListBestUpdatesForGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementListBestUpdatesForGroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -405,7 +397,7 @@ export interface DeviceManagementListDeploymentsForGroup200Response extends Http } /** Gets a list of deployments for a device group. */ -export interface DeviceManagementListDeploymentsForGroupdefaultResponse extends HttpResponse { +export interface DeviceManagementListDeploymentsForGroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -417,7 +409,7 @@ export interface DeviceManagementGetDeployment200Response extends HttpResponse { } /** Gets the deployment properties. */ -export interface DeviceManagementGetDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeploymentDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -429,7 +421,7 @@ export interface DeviceManagementCreateOrUpdateDeployment200Response extends Htt } /** Creates or updates a deployment. */ -export interface DeviceManagementCreateOrUpdateDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementCreateOrUpdateDeploymentDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -437,11 +429,10 @@ export interface DeviceManagementCreateOrUpdateDeploymentdefaultResponse extends /** Deletes a deployment. */ export interface DeviceManagementDeleteDeployment204Response extends HttpResponse { status: "204"; - body: Record; } /** Deletes a deployment. */ -export interface DeviceManagementDeleteDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementDeleteDeploymentDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -453,7 +444,7 @@ export interface DeviceManagementGetDeploymentStatus200Response extends HttpResp } /** Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, completed, or failed. */ -export interface DeviceManagementGetDeploymentStatusdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeploymentStatusDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -465,7 +456,7 @@ export interface DeviceManagementListDeviceClassSubgroupsForGroup200Response ext } /** Get the device class subgroups for the group. A device class subgroup is the set of devices within the group that share the same device class. All devices within the same device class are compatible with the same updates. */ -export interface DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse +export interface DeviceManagementListDeviceClassSubgroupsForGroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -478,7 +469,7 @@ export interface DeviceManagementGetDeviceClassSubgroup200Response extends HttpR } /** Gets device class subgroup details. A device class subgroup is the set of devices within the group that share the same device class. All devices within the same device class are compatible with the same updates. */ -export interface DeviceManagementGetDeviceClassSubgroupdefaultResponse extends HttpResponse { +export interface DeviceManagementGetDeviceClassSubgroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -486,11 +477,10 @@ export interface DeviceManagementGetDeviceClassSubgroupdefaultResponse extends H /** Deletes a device class subgroup. This subgroup is automatically created when a Device Update-enabled device is connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are retained for history purposes. Users can call this method to delete a subgroup if they do not need to retain any of the history of the subgroup and no longer need it. If a device is ever connected again for this subgroup after the subgroup was deleted it will be automatically re-created but there will be no history. */ export interface DeviceManagementDeleteDeviceClassSubgroup204Response extends HttpResponse { status: "204"; - body: Record; } /** Deletes a device class subgroup. This subgroup is automatically created when a Device Update-enabled device is connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are retained for history purposes. Users can call this method to delete a subgroup if they do not need to retain any of the history of the subgroup and no longer need it. If a device is ever connected again for this subgroup after the subgroup was deleted it will be automatically re-created but there will be no history. */ -export interface DeviceManagementDeleteDeviceClassSubgroupdefaultResponse extends HttpResponse { +export interface DeviceManagementDeleteDeviceClassSubgroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -503,7 +493,7 @@ export interface DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Respon } /** Get device class subgroup update compliance information such as how many devices are on their latest update, how many need new updates, and how many are in progress on receiving a new update. */ -export interface DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse +export interface DeviceManagementGetDeviceClassSubgroupUpdateComplianceDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -517,7 +507,7 @@ export interface DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response } /** Get the best available update for a device class subgroup and a count of how many devices need this update. */ -export interface DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse +export interface DeviceManagementGetBestUpdatesForDeviceClassSubgroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -531,7 +521,7 @@ export interface DeviceManagementListDeploymentsForDeviceClassSubgroup200Respons } /** Gets a list of deployments for a device class subgroup. */ -export interface DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse +export interface DeviceManagementListDeploymentsForDeviceClassSubgroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -545,7 +535,7 @@ export interface DeviceManagementGetDeploymentForDeviceClassSubgroup200Response } /** Gets the deployment properties. */ -export interface DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse +export interface DeviceManagementGetDeploymentForDeviceClassSubgroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -555,11 +545,10 @@ export interface DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultRespo export interface DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response extends HttpResponse { status: "204"; - body: Record; } /** Deletes a device class subgroup deployment. */ -export interface DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse +export interface DeviceManagementDeleteDeploymentForDeviceClassSubgroupDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -572,7 +561,7 @@ export interface DeviceManagementStopDeployment200Response extends HttpResponse } /** Stops a deployment. */ -export interface DeviceManagementStopDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementStopDeploymentDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -584,7 +573,7 @@ export interface DeviceManagementRetryDeployment200Response extends HttpResponse } /** Retries a deployment with failed devices. */ -export interface DeviceManagementRetryDeploymentdefaultResponse extends HttpResponse { +export interface DeviceManagementRetryDeploymentDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -597,7 +586,7 @@ export interface DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Respon } /** Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, completed, or failed. */ -export interface DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse +export interface DeviceManagementGetDeviceClassSubgroupDeploymentStatusDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -611,7 +600,7 @@ export interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymen } /** Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices. */ -export interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse +export interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -632,11 +621,10 @@ export interface DeviceManagementGetOperationStatus200Response extends HttpRespo /** Retrieve operation status. */ export interface DeviceManagementGetOperationStatus304Response extends HttpResponse { status: "304"; - body: Record; } /** Retrieve operation status. */ -export interface DeviceManagementGetOperationStatusdefaultResponse extends HttpResponse { +export interface DeviceManagementGetOperationStatusDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -648,7 +636,7 @@ export interface DeviceManagementListOperationStatuses200Response extends HttpRe } /** Get a list of all device import operations. Completed operations are kept for 7 days before auto-deleted. */ -export interface DeviceManagementListOperationStatusesdefaultResponse extends HttpResponse { +export interface DeviceManagementListOperationStatusesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -660,7 +648,7 @@ export interface DeviceManagementStartLogCollection201Response extends HttpRespo } /** Start the device diagnostics log collection on specified devices. */ -export interface DeviceManagementStartLogCollectiondefaultResponse extends HttpResponse { +export interface DeviceManagementStartLogCollectionDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -672,7 +660,7 @@ export interface DeviceManagementGetLogCollection200Response extends HttpRespons } /** Get the device diagnostics log collection */ -export interface DeviceManagementGetLogCollectiondefaultResponse extends HttpResponse { +export interface DeviceManagementGetLogCollectionDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -684,7 +672,7 @@ export interface DeviceManagementListLogCollections200Response extends HttpRespo } /** Get all device diagnostics log collections */ -export interface DeviceManagementListLogCollectionsdefaultResponse extends HttpResponse { +export interface DeviceManagementListLogCollectionsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } @@ -696,7 +684,7 @@ export interface DeviceManagementGetLogCollectionDetailedStatus200Response exten } /** Get log collection with detailed status */ -export interface DeviceManagementGetLogCollectionDetailedStatusdefaultResponse +export interface DeviceManagementGetLogCollectionDetailedStatusDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; @@ -709,7 +697,7 @@ export interface DeviceManagementListHealthOfDevices200Response extends HttpResp } /** Get list of device health */ -export interface DeviceManagementListHealthOfDevicesdefaultResponse extends HttpResponse { +export interface DeviceManagementListHealthOfDevicesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseOutput; } diff --git a/sdk/deviceupdate/iot-device-update-rest/swagger/README.md b/sdk/deviceupdate/iot-device-update-rest/swagger/README.md index e2001b44f22d..6f147e3497fb 100644 --- a/sdk/deviceupdate/iot-device-update-rest/swagger/README.md +++ b/sdk/deviceupdate/iot-device-update-rest/swagger/README.md @@ -5,6 +5,9 @@ ## Configuration ```yaml +flavor: azure +openapi-type: data-plane +generate-test: true package-name: "@azure-rest/iot-device-update" title: DeviceUpdate description: Iot Device Update Client @@ -13,12 +16,12 @@ license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../ source-code-folder-path: ./src input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d7c9be23749467be1aea18f02ba2f4948a39db6a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/stable/2022-10-01/deviceupdate.json -package-version: 1.0.1 +package-version: 1.1.0 rest-level-client: true add-credentials: true credential-scopes: https://api.adu.microsoft.com/.default use-extension: - "@autorest/typescript": "6.0.0-rc.1" + "@autorest/typescript": "latest" ``` ### Fix 304s @@ -49,4 +52,3 @@ directive: "description": "The condition specified using HTTP conditional header(s) is not met." }; ``` - From bf36b8ff16f28291a14dbbc1a9748c7b048728f9 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:43:21 -0800 Subject: [PATCH 38/55] Post release automated changes for ai releases (#32308) Post release automated changes for azure-ai-projects --- sdk/ai/ai-projects/CHANGELOG.md | 10 ++++++++++ sdk/ai/ai-projects/package.json | 2 +- sdk/ai/ai-projects/src/constants.ts | 2 +- sdk/ai/ai-projects/src/generated/src/projectsClient.ts | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sdk/ai/ai-projects/CHANGELOG.md b/sdk/ai/ai-projects/CHANGELOG.md index 05ec9e787339..98e4d8f2b83c 100644 --- a/sdk/ai/ai-projects/CHANGELOG.md +++ b/sdk/ai/ai-projects/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.1 (2024-12-19) ### Features Added diff --git a/sdk/ai/ai-projects/package.json b/sdk/ai/ai-projects/package.json index 00ced68ae72d..81e0c43c8440 100644 --- a/sdk/ai/ai-projects/package.json +++ b/sdk/ai/ai-projects/package.json @@ -1,6 +1,6 @@ { "name": "@azure/ai-projects", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "description": "A generated SDK for ProjectsClient.", "engines": { "node": ">=18.0.0" diff --git a/sdk/ai/ai-projects/src/constants.ts b/sdk/ai/ai-projects/src/constants.ts index fe3152c1805e..ae8f3b93116d 100644 --- a/sdk/ai/ai-projects/src/constants.ts +++ b/sdk/ai/ai-projects/src/constants.ts @@ -4,7 +4,7 @@ /** * Current version of the `@azure/ai-projects` package. */ -export const SDK_VERSION = `1.0.0-beta.1`; +export const SDK_VERSION = `1.0.0-beta.2`; /** * The package name of the `@azure/ai-projects` package. diff --git a/sdk/ai/ai-projects/src/generated/src/projectsClient.ts b/sdk/ai/ai-projects/src/generated/src/projectsClient.ts index cb0624e7cc3d..a89b90408198 100644 --- a/sdk/ai/ai-projects/src/generated/src/projectsClient.ts +++ b/sdk/ai/ai-projects/src/generated/src/projectsClient.ts @@ -33,7 +33,7 @@ export default function createClient( options.endpoint ?? options.baseUrl ?? `${endpointParam}/agents/v1.0/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/${projectName}`; - const userAgentInfo = `azsdk-js-ai-projects-rest/1.0.0-beta.1`; + const userAgentInfo = `azsdk-js-ai-projects-rest/1.0.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` From b05f9966c17e350548eedeaa6512d98309b8eb34 Mon Sep 17 00:00:00 2001 From: Ganesh Bheemarasetty <1634042+ganeshyb@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:54:43 -0800 Subject: [PATCH 39/55] Refresh agent samples and utilities for improved functionality (#32307) Enhance agent samples and utilities to improve their functionality and usability. Updates include better error handling and streamlined vector store creation. ### Packages impacted by this PR ### Issues associated with this PR Couple of the samples was not working ### Describe the problem that is addressed by this PR Handle proper server error message. Handle camel casing for tool names. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary) --- sdk/ai/ai-projects/CHANGELOG.md | 9 +-- .../samples-dev/agents/agentsWithToolset.ts | 8 ++- .../agents/codeInterpreterWithStreaming.ts | 1 + .../samples/v1-beta/javascript/README.md | 60 +++++++++---------- .../javascript/agents/agentsWithToolset.js | 8 ++- .../samples/v1-beta/typescript/README.md | 60 +++++++++---------- .../src/agents/agentsWithToolset.ts | 8 ++- sdk/ai/ai-projects/src/agents/openAIError.ts | 8 ++- sdk/ai/ai-projects/src/agents/utils.ts | 8 ++- 9 files changed, 89 insertions(+), 81 deletions(-) diff --git a/sdk/ai/ai-projects/CHANGELOG.md b/sdk/ai/ai-projects/CHANGELOG.md index 98e4d8f2b83c..0f331138aac1 100644 --- a/sdk/ai/ai-projects/CHANGELOG.md +++ b/sdk/ai/ai-projects/CHANGELOG.md @@ -1,14 +1,11 @@ # Release History -## 1.0.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.0.0-beta.2 (2024-12-19) ### Bugs Fixed -### Other Changes +- Address issue creating tool definition from connection. +- Improve Error handling api call failure. ## 1.0.0-beta.1 (2024-12-19) diff --git a/sdk/ai/ai-projects/samples-dev/agents/agentsWithToolset.ts b/sdk/ai/ai-projects/samples-dev/agents/agentsWithToolset.ts index a5598362920e..53f7be424ee1 100644 --- a/sdk/ai/ai-projects/samples-dev/agents/agentsWithToolset.ts +++ b/sdk/ai/ai-projects/samples-dev/agents/agentsWithToolset.ts @@ -44,9 +44,11 @@ export async function main(): Promise { console.log(`Uploaded file, file ID: ${fileSearchFile.id}`); // Create vector store for file search tool - const vectorStore = await client.agents.createVectorStoreAndPoll({ - fileIds: [fileSearchFile.id], - }); + const vectorStore = await client.agents + .createVectorStoreAndPoll({ + fileIds: [fileSearchFile.id], + }) + .pollUntilDone(); // Create tool set const toolSet = new ToolSet(); diff --git a/sdk/ai/ai-projects/samples-dev/agents/codeInterpreterWithStreaming.ts b/sdk/ai/ai-projects/samples-dev/agents/codeInterpreterWithStreaming.ts index e669836dce74..1013142c18d6 100644 --- a/sdk/ai/ai-projects/samples-dev/agents/codeInterpreterWithStreaming.ts +++ b/sdk/ai/ai-projects/samples-dev/agents/codeInterpreterWithStreaming.ts @@ -5,6 +5,7 @@ * This sample demonstrates how to use agent operations with code interpreter from the Azure Agents service. * * @summary demonstrates how to use agent operations with code interpreter. + * @azsdk-weight 100 * */ diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/README.md b/sdk/ai/ai-projects/samples/v1-beta/javascript/README.md index 06bbcf3e1b9b..0c121d9619b6 100644 --- a/sdk/ai/ai-projects/samples/v1-beta/javascript/README.md +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/README.md @@ -11,9 +11,9 @@ urlFragment: ai-projects-javascript-beta These sample programs show how to use the JavaScript client libraries for Azure AI Projects in some common scenarios. - ## Prerequisites @@ -65,45 +63,43 @@ npm install 3. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node agents\agentCreateWithTracingConsole.js +node agents\codeInterpreterWithStreaming.js ``` Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx dev-tool run vendored cross-env AZURE_AI_PROJECTS_CONNECTION_STRING="" APPLICATIONINSIGHTS_CONNECTION_STRING="" node agents\agentCreateWithTracingConsole.js +npx dev-tool run vendored cross-env AZURE_AI_PROJECTS_CONNECTION_STRING="" node agents\codeInterpreterWithStreaming.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/ai/ai-projects/README.md ---> diff --git a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithToolset.js b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithToolset.js index 922f7dc72946..497c2d1b06ef 100644 --- a/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithToolset.js +++ b/sdk/ai/ai-projects/samples/v1-beta/javascript/agents/agentsWithToolset.js @@ -43,9 +43,11 @@ async function main() { console.log(`Uploaded file, file ID: ${fileSearchFile.id}`); // Create vector store for file search tool - const vectorStore = await client.agents.createVectorStoreAndPoll({ - fileIds: [fileSearchFile.id], - }); + const vectorStore = await client.agents + .createVectorStoreAndPoll({ + fileIds: [fileSearchFile.id], + }) + .pollUntilDone(); // Create tool set const toolSet = new ToolSet(); diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/README.md b/sdk/ai/ai-projects/samples/v1-beta/typescript/README.md index 3e35f5d3cce1..589cee582e69 100644 --- a/sdk/ai/ai-projects/samples/v1-beta/typescript/README.md +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/README.md @@ -11,9 +11,9 @@ urlFragment: ai-projects-typescript-beta These sample programs show how to use the TypeScript client libraries for Azure AI Projects in some common scenarios. - ## Prerequisites @@ -77,46 +75,44 @@ npm run build 4. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node dist/agents\agentCreateWithTracingConsole.js +node dist/agents\codeInterpreterWithStreaming.js ``` Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx dev-tool run vendored cross-env AZURE_AI_PROJECTS_CONNECTION_STRING="" APPLICATIONINSIGHTS_CONNECTION_STRING="" node dist/agents\agentCreateWithTracingConsole.js +npx dev-tool run vendored cross-env AZURE_AI_PROJECTS_CONNECTION_STRING="" node dist/agents\codeInterpreterWithStreaming.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/ai/ai-projects/README.md [typescript]: https://www.typescriptlang.org/docs/home.html ---> diff --git a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithToolset.ts b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithToolset.ts index 83aa3493963d..89375aa07149 100644 --- a/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithToolset.ts +++ b/sdk/ai/ai-projects/samples/v1-beta/typescript/src/agents/agentsWithToolset.ts @@ -43,9 +43,11 @@ export async function main(): Promise { console.log(`Uploaded file, file ID: ${fileSearchFile.id}`); // Create vector store for file search tool - const vectorStore = await client.agents.createVectorStoreAndPoll({ - fileIds: [fileSearchFile.id], - }); + const vectorStore = await client.agents + .createVectorStoreAndPoll({ + fileIds: [fileSearchFile.id], + }) + .pollUntilDone(); // Create tool set const toolSet = new ToolSet(); diff --git a/sdk/ai/ai-projects/src/agents/openAIError.ts b/sdk/ai/ai-projects/src/agents/openAIError.ts index 6a35bf2a268e..d4d2ea400824 100644 --- a/sdk/ai/ai-projects/src/agents/openAIError.ts +++ b/sdk/ai/ai-projects/src/agents/openAIError.ts @@ -24,7 +24,13 @@ export class OpenAIError extends RestError { export function createOpenAIError(response: PathUncheckedResponse): OpenAIError { const internalError = response.body.error || response.body; - const restError = createRestError(internalError, response); + let restError: RestError; + if (typeof internalError === "string") { + restError = createRestError(internalError, response); + } else { + restError = createRestError(response); + } + return new OpenAIError(restError.message, { statusCode: restError?.statusCode, code: restError?.code, diff --git a/sdk/ai/ai-projects/src/agents/utils.ts b/sdk/ai/ai-projects/src/agents/utils.ts index 68465ab459f7..13b086a22d5d 100644 --- a/sdk/ai/ai-projects/src/agents/utils.ts +++ b/sdk/ai/ai-projects/src/agents/utils.ts @@ -42,6 +42,12 @@ export enum connectionToolType { SharepointGrounding = "sharepoint_grounding", } +const toolMap = { + bing_grounding: "bingGrounding", + microsoft_fabric: "microsoftFabric", + sharepoint_grounding: "sharepointGrounding", +}; + /** * Utility class for creating various tools. */ @@ -60,7 +66,7 @@ export class ToolUtility { return { definition: { type: toolType, - [toolType]: { + [toolMap[toolType]]: { connections: connectionIds.map((connectionId) => ({ connectionId: connectionId })), }, }, From 19e6da37654391064975b95be72d268a71b3dc59 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:53:31 -0800 Subject: [PATCH 40/55] Post release automated changes for ai releases (#32310) Post release automated changes for azure-ai-projects --- sdk/ai/ai-projects/CHANGELOG.md | 10 ++++++++++ sdk/ai/ai-projects/package.json | 2 +- sdk/ai/ai-projects/src/constants.ts | 2 +- sdk/ai/ai-projects/src/generated/src/projectsClient.ts | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sdk/ai/ai-projects/CHANGELOG.md b/sdk/ai/ai-projects/CHANGELOG.md index 0f331138aac1..5ffc7436928f 100644 --- a/sdk/ai/ai-projects/CHANGELOG.md +++ b/sdk/ai/ai-projects/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.3 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.2 (2024-12-19) ### Bugs Fixed diff --git a/sdk/ai/ai-projects/package.json b/sdk/ai/ai-projects/package.json index 81e0c43c8440..7f2818985265 100644 --- a/sdk/ai/ai-projects/package.json +++ b/sdk/ai/ai-projects/package.json @@ -1,6 +1,6 @@ { "name": "@azure/ai-projects", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "A generated SDK for ProjectsClient.", "engines": { "node": ">=18.0.0" diff --git a/sdk/ai/ai-projects/src/constants.ts b/sdk/ai/ai-projects/src/constants.ts index ae8f3b93116d..caf1bc34d8f6 100644 --- a/sdk/ai/ai-projects/src/constants.ts +++ b/sdk/ai/ai-projects/src/constants.ts @@ -4,7 +4,7 @@ /** * Current version of the `@azure/ai-projects` package. */ -export const SDK_VERSION = `1.0.0-beta.2`; +export const SDK_VERSION = `1.0.0-beta.3`; /** * The package name of the `@azure/ai-projects` package. diff --git a/sdk/ai/ai-projects/src/generated/src/projectsClient.ts b/sdk/ai/ai-projects/src/generated/src/projectsClient.ts index a89b90408198..0b9e70f572f7 100644 --- a/sdk/ai/ai-projects/src/generated/src/projectsClient.ts +++ b/sdk/ai/ai-projects/src/generated/src/projectsClient.ts @@ -33,7 +33,7 @@ export default function createClient( options.endpoint ?? options.baseUrl ?? `${endpointParam}/agents/v1.0/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/${projectName}`; - const userAgentInfo = `azsdk-js-ai-projects-rest/1.0.0-beta.2`; + const userAgentInfo = `azsdk-js-ai-projects-rest/1.0.0-beta.3`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` From f290943f616b42a9891a21cac9c20e61b93f6ec1 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:07:05 +0800 Subject: [PATCH 41/55] Update tsp-location.yaml (#32312) --- sdk/iotoperations/arm-iotoperations/tsp-location.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/iotoperations/arm-iotoperations/tsp-location.yaml b/sdk/iotoperations/arm-iotoperations/tsp-location.yaml index 1dfc161067a2..5a61b61c4a60 100644 --- a/sdk/iotoperations/arm-iotoperations/tsp-location.yaml +++ b/sdk/iotoperations/arm-iotoperations/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/iotoperations/IoTOperations.Management commit: e725ba2ceffe71772df6918b2950bf571577f968 -repo: ../azure-rest-api-specs +repo: Azure/azure-rest-api-specs additionalDirectories: From 43e2b91998e6a9f45389edc39cb1711a5455a8d1 Mon Sep 17 00:00:00 2001 From: Lazar <163033155+Lakicar95@users.noreply.github.com> Date: Fri, 20 Dec 2024 05:45:43 +0100 Subject: [PATCH 42/55] Update changelog for Maps Timezone (#32311) --- sdk/maps/maps-timezone-rest/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/maps/maps-timezone-rest/CHANGELOG.md b/sdk/maps/maps-timezone-rest/CHANGELOG.md index c8088cf4b56c..3a83239132d8 100644 --- a/sdk/maps/maps-timezone-rest/CHANGELOG.md +++ b/sdk/maps/maps-timezone-rest/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-12-20) ### Features Added From 04745da6a947274f0ee8c7905b7d75534c8b5ce8 Mon Sep 17 00:00:00 2001 From: Kashish Gupta <90824921+kashish2508@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:31:02 +0530 Subject: [PATCH 43/55] fix(playwrighttesting): handling other attachments (#31950) ### Packages impacted by this PR @azure-microsoft-playwright-testing ### Issues associated with this PR ### Describe the problem that is addressed by this PR ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary) --- .../src/reporter/mptReporter.ts | 60 ++++++++++++------- .../src/utils/reporterUtils.ts | 15 +++++ 2 files changed, 53 insertions(+), 22 deletions(-) diff --git a/sdk/playwrighttesting/microsoft-playwright-testing/src/reporter/mptReporter.ts b/sdk/playwrighttesting/microsoft-playwright-testing/src/reporter/mptReporter.ts index 2ca7bc3cb8b3..18f5c33bb019 100644 --- a/sdk/playwrighttesting/microsoft-playwright-testing/src/reporter/mptReporter.ts +++ b/sdk/playwrighttesting/microsoft-playwright-testing/src/reporter/mptReporter.ts @@ -271,11 +271,16 @@ class MPTReporter implements Reporter { this.testResultBatch.add(testResultObject); // Store test attachments in array const testAttachments: string[] = []; + const otherAttachments: any[] = []; for (const attachment of result.attachments) { if (attachment.path !== undefined && attachment.path !== "") { testAttachments.push(attachment.path); this.uploadMetadata.numTotalAttachments++; this.uploadMetadata.sizeTotalAttachments += ReporterUtils.getFileSize(attachment.path); + } else if (attachment.body instanceof Buffer) { + otherAttachments.push(attachment); + this.uploadMetadata.numTotalAttachments++; + this.uploadMetadata.sizeTotalAttachments += ReporterUtils.getBufferSize(attachment.body); } } @@ -283,7 +288,11 @@ class MPTReporter implements Reporter { const rawTestResult: RawTestResult = this.reporterUtils.getRawTestResultObject(result); this.testRawResults.set(testResultObject.testExecutionId, JSON.stringify(rawTestResult)); this._testEndPromises.push( - this._uploadTestResultAttachments(testResultObject.testExecutionId, testAttachments), + this._uploadTestResultAttachments( + testResultObject.testExecutionId, + testAttachments, + otherAttachments, + ), ); } catch (err: any) { this._addError(`Name: ${err.name}, Message: ${err.message}, Stack: ${err.stack}`); @@ -309,10 +318,21 @@ class MPTReporter implements Reporter { reporterLogger.error(`\nError in uploading test run information: ${err.message}`); } } - + private renewSasUriIfNeeded = async (): Promise => { + if ( + this.sasUri === undefined || + !ReporterUtils.isTimeGreaterThanCurrentPlus10Minutes(this.sasUri) + ) { + this.sasUri = await this.serviceClient.createStorageUri(); + reporterLogger.info( + `\nFetched SAS URI with validity: ${this.sasUri.expiresAt} and access: ${this.sasUri.accessLevel}.`, + ); + } + }; private async _uploadTestResultAttachments( testExecutionId: string, testAttachments: string[], + otherAttachments: any[], ): Promise { try { this.isTestRunStartSuccess = await this.promiseOnBegin; @@ -320,30 +340,26 @@ class MPTReporter implements Reporter { this._addError(`\nUnable to initialize test run report.`); return; } + for (const attachmentPath of testAttachments) { - const fileRelativePath = `${testExecutionId}/${ReporterUtils.getFileRelativePath( - attachmentPath, - )}`; - if ( - this.sasUri === undefined || - !ReporterUtils.isTimeGreaterThanCurrentPlus10Minutes(this.sasUri) - ) { - // Renew the sas uri - this.sasUri = await this.serviceClient.createStorageUri(); - reporterLogger.info( - `\nFetched SAS URI with validity: ${this.sasUri.expiresAt} and access: ${this.sasUri.accessLevel}.`, - ); - } + const fileRelativePath = `${testExecutionId}/${ReporterUtils.getFileRelativePath(attachmentPath)}`; + await this.renewSasUriIfNeeded(); await this.storageClient.uploadFile(this.sasUri.uri, attachmentPath, fileRelativePath); } - const rawTestResult = this.testRawResults.get(testExecutionId); - if ( - this.sasUri === undefined || - !ReporterUtils.isTimeGreaterThanCurrentPlus10Minutes(this.sasUri) - ) { - // Renew the sas uri - this.sasUri = await this.serviceClient.createStorageUri(); + + for (const otherAttachment of otherAttachments) { + await this.renewSasUriIfNeeded(); + const match = otherAttachment?.contentType?.match(/charset=(.*)/); + const charset = match && match.length > 1 ? match[1] : "utf-8"; + await this.storageClient.uploadBuffer( + this.sasUri.uri, + otherAttachment.body.toString((charset as any) || "utf-8"), + `${testExecutionId}/${otherAttachment.name}`, + ); } + + const rawTestResult = this.testRawResults.get(testExecutionId); + await this.renewSasUriIfNeeded(); await this.storageClient.uploadBuffer( this.sasUri.uri, rawTestResult[0]!, diff --git a/sdk/playwrighttesting/microsoft-playwright-testing/src/utils/reporterUtils.ts b/sdk/playwrighttesting/microsoft-playwright-testing/src/utils/reporterUtils.ts index a4930ddbd4af..c3f1883fee54 100644 --- a/sdk/playwrighttesting/microsoft-playwright-testing/src/utils/reporterUtils.ts +++ b/sdk/playwrighttesting/microsoft-playwright-testing/src/utils/reporterUtils.ts @@ -349,6 +349,16 @@ class ReporterUtils { return 0; } } + + public static getBufferSize(attachmentBody: Buffer): number { + try { + const fileSizeInBytes = attachmentBody.length; + return fileSizeInBytes; + } catch (error) { + return 0; + } + } + public redactAccessToken(info: string | undefined): string { if (!info || ReporterUtils.isNullOrEmpty(this.envVariables.accessToken)) { return ""; @@ -468,6 +478,11 @@ class ReporterUtils { attachmentStatus += ","; } attachmentStatus += "trace"; + } else if (attachment.contentType === "text/plain") { + if (attachmentStatus !== "") { + attachmentStatus += ","; + } + attachmentStatus += "txt"; } } return attachmentStatus; From 73fa688b0ed045ffb9077136e4d7e5a2db95814a Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:42:05 +0800 Subject: [PATCH 44/55] [mgmt] playwrighttesting ga (#32199) https://github.com/Azure/sdk-release-request/issues/5766 --------- Co-authored-by: qiaozha --- common/config/rush/pnpm-lock.yaml | 41 +- .../arm-playwrighttesting/CHANGELOG.md | 39 +- .../arm-playwrighttesting/README.md | 31 +- .../arm-playwrighttesting/_meta.json | 8 - .../arm-playwrighttesting/api-extractor.json | 6 +- .../arm-playwrighttesting/assets.json | 2 +- .../arm-playwrighttesting/eslint.config.mjs | 17 + .../arm-playwrighttesting/package.json | 205 ++++-- .../arm-playwrighttesting-models.api.md | 230 ++++++ .../review/arm-playwrighttesting.api.md | 274 ++++--- .../arm-playwrighttesting/sample.env | 5 +- .../samples-dev/accountQuotasGetSample.ts | 29 + .../accountQuotasListByAccountSample.ts | 29 + .../accountsCheckNameAvailabilitySample.ts | 28 + .../accountsCreateOrUpdateSample.ts | 42 +- .../samples-dev/accountsDeleteSample.ts | 35 +- .../samples-dev/accountsGetSample.ts | 40 - .../accountsListByResourceGroupSample.ts | 44 -- .../accountsListBySubscriptionSample.ts | 40 - .../samples-dev/accountsUpdateSample.ts | 45 +- .../samples-dev/operationsListSample.ts | 27 +- .../samples-dev/quotasGetSample.ts | 30 +- .../quotasListBySubscriptionSample.ts | 30 +- .../samples/v1-beta/javascript/README.md | 66 -- .../accountsCreateOrUpdateSample.js | 45 -- .../javascript/accountsDeleteSample.js | 36 - .../v1-beta/javascript/accountsGetSample.js | 36 - .../accountsListByResourceGroupSample.js | 38 - .../accountsListBySubscriptionSample.js | 37 - .../javascript/accountsUpdateSample.js | 40 - .../javascript/operationsListSample.js | 37 - .../v1-beta/javascript/quotasGetSample.js | 36 - .../quotasListBySubscriptionSample.js | 38 - .../samples/v1-beta/javascript/sample.env | 4 - .../samples/v1-beta/typescript/README.md | 79 -- .../samples/v1-beta/typescript/sample.env | 4 - .../src/accountsCreateOrUpdateSample.ts | 49 -- .../typescript/src/accountsDeleteSample.ts | 43 -- .../typescript/src/accountsGetSample.ts | 40 - .../src/accountsListByResourceGroupSample.ts | 44 -- .../src/accountsListBySubscriptionSample.ts | 40 - .../typescript/src/accountsUpdateSample.ts | 51 -- .../typescript/src/operationsListSample.ts | 40 - .../v1-beta/typescript/src/quotasGetSample.ts | 39 - .../src/quotasListBySubscriptionSample.ts | 41 -- .../samples/v1/javascript/README.md | 66 ++ .../v1/javascript/accountQuotasGetSample.js | 29 + .../accountQuotasListByAccountSample.js | 29 + .../accountsCheckNameAvailabilitySample.js | 28 + .../accountsCreateOrUpdateSample.js | 29 + .../v1/javascript/accountsDeleteSample.js | 24 + .../v1/javascript/accountsUpdateSample.js | 28 + .../v1/javascript/operationsListSample.js | 29 + .../{v1-beta => v1}/javascript/package.json | 7 +- .../samples/v1/javascript/quotasGetSample.js | 25 + .../quotasListBySubscriptionSample.js | 29 + .../samples/v1/javascript/sample.env | 1 + .../samples/v1/typescript/README.md | 79 ++ .../{v1-beta => v1}/typescript/package.json | 9 +- .../samples/v1/typescript/sample.env | 1 + .../typescript/src/accountQuotasGetSample.ts | 29 + .../src/accountQuotasListByAccountSample.ts | 29 + .../accountsCheckNameAvailabilitySample.ts | 28 + .../src/accountsCreateOrUpdateSample.ts | 29 + .../v1/typescript/src/accountsDeleteSample.ts | 24 + .../v1/typescript/src/accountsUpdateSample.ts | 28 + .../v1/typescript/src/operationsListSample.ts | 29 + .../v1/typescript/src/quotasGetSample.ts | 25 + .../src/quotasListBySubscriptionSample.ts | 29 + .../{v1-beta => v1}/typescript/tsconfig.json | 0 .../src/api/accountQuotas/index.ts | 127 ++++ .../src/api/accounts/index.ts | 352 +++++++++ .../src/api/azurePlaywrightServiceContext.ts | 57 ++ .../arm-playwrighttesting/src/api/index.ts | 34 + .../src/api/operations/index.ts | 53 ++ .../arm-playwrighttesting/src/api/options.ts | 46 ++ .../src/api/quotas/index.ts | 105 +++ .../src/azurePlaywrightServiceClient.ts | 55 ++ .../src/classic/accountQuotas/index.ts | 55 ++ .../src/classic/accounts/index.ts | 126 ++++ .../src/classic/index.ts | 7 + .../src/classic/operations/index.ts | 28 + .../src/classic/quotas/index.ts | 44 ++ .../src/helpers/serializerHelpers.ts | 36 + .../arm-playwrighttesting/src/index.ts | 83 ++- .../arm-playwrighttesting/src/logger.ts | 5 + .../arm-playwrighttesting/src/lroImpl.ts | 42 -- .../arm-playwrighttesting/src/models/index.ts | 591 ++------------- .../src/models/mappers.ts | 640 ---------------- .../src/models/models.ts | 684 ++++++++++++++++++ .../src/models/parameters.ts | 154 ---- .../src/operations/accounts.ts | 630 ---------------- .../src/operations/index.ts | 11 - .../src/operations/operations.ts | 149 ---- .../src/operations/quotas.ts | 219 ------ .../src/operationsInterfaces/accounts.ts | 121 ---- .../src/operationsInterfaces/index.ts | 11 - .../src/operationsInterfaces/operations.ts | 22 - .../src/operationsInterfaces/quotas.ts | 41 -- .../arm-playwrighttesting/src/pagingHelper.ts | 39 - .../src/playwrightTestingClient.ts | 144 ---- .../src/restorePollerHelpers.ts | 162 +++++ .../src/static-helpers/pagingHelpers.ts | 241 ++++++ .../src/static-helpers/pollingHelpers.ts | 126 ++++ .../playwrighttesting_operations_test.spec.ts | 72 -- .../playwrighttesting_operations_test.spec.ts | 46 ++ .../test/public/utils/recordedClient.ts | 23 + .../tsconfig.browser.config.json | 3 + .../arm-playwrighttesting/tsconfig.json | 40 +- .../tsconfig.samples.json | 8 + .../arm-playwrighttesting/tsconfig.src.json | 3 + .../arm-playwrighttesting/tsconfig.test.json | 3 + .../arm-playwrighttesting/tsp-location.yaml | 4 + .../vitest.browser.config.ts | 17 + .../arm-playwrighttesting/vitest.config.ts | 15 + .../vitest.esm.config.ts | 12 + sdk/playwrighttesting/ci.mgmt.yml | 5 +- .../test/utils/clInfoProvider.spec.ts | 1 + .../test/utils/reporterUtils.spec.ts | 2 +- 119 files changed, 3956 insertions(+), 4361 deletions(-) delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/_meta.json create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/eslint.config.mjs create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/review/arm-playwrighttesting-models.api.md create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountQuotasGetSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountQuotasListByAccountSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsCheckNameAvailabilitySample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsGetSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsListByResourceGroupSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsListBySubscriptionSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/README.md delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsCreateOrUpdateSample.js delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsDeleteSample.js delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsGetSample.js delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListByResourceGroupSample.js delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListBySubscriptionSample.js delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsUpdateSample.js delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/operationsListSample.js delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasGetSample.js delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasListBySubscriptionSample.js delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/sample.env delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/README.md delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/sample.env delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsCreateOrUpdateSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsDeleteSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsGetSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListByResourceGroupSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListBySubscriptionSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsUpdateSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/operationsListSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasGetSample.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasListBySubscriptionSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/README.md create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasGetSample.js create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasListByAccountSample.js create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCheckNameAvailabilitySample.js create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCreateOrUpdateSample.js create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsDeleteSample.js create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsUpdateSample.js create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/operationsListSample.js rename sdk/playwrighttesting/arm-playwrighttesting/samples/{v1-beta => v1}/javascript/package.json (77%) create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasGetSample.js create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasListBySubscriptionSample.js create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/sample.env create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/README.md rename sdk/playwrighttesting/arm-playwrighttesting/samples/{v1-beta => v1}/typescript/package.json (78%) create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/sample.env create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasGetSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasListByAccountSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCheckNameAvailabilitySample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCreateOrUpdateSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsDeleteSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsUpdateSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/operationsListSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasGetSample.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasListBySubscriptionSample.ts rename sdk/playwrighttesting/arm-playwrighttesting/samples/{v1-beta => v1}/typescript/tsconfig.json (100%) create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/api/accountQuotas/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/api/accounts/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/api/azurePlaywrightServiceContext.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/api/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/api/operations/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/api/options.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/api/quotas/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/azurePlaywrightServiceClient.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/classic/accountQuotas/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/classic/accounts/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/classic/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/classic/operations/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/classic/quotas/index.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/helpers/serializerHelpers.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/logger.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/lroImpl.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/models/mappers.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/models/models.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/models/parameters.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/operations/accounts.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/operations/index.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/operations/operations.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/operations/quotas.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/accounts.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/index.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/operations.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/quotas.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/pagingHelper.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/playwrightTestingClient.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/restorePollerHelpers.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/static-helpers/pagingHelpers.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/src/static-helpers/pollingHelpers.ts delete mode 100644 sdk/playwrighttesting/arm-playwrighttesting/test/playwrighttesting_operations_test.spec.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/test/public/playwrighttesting_operations_test.spec.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/test/public/utils/recordedClient.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/tsconfig.browser.config.json create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/tsconfig.samples.json create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/tsconfig.src.json create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/tsconfig.test.json create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/tsp-location.yaml create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/vitest.browser.config.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/vitest.config.ts create mode 100644 sdk/playwrighttesting/arm-playwrighttesting/vitest.esm.config.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 5edc03d16e04..d50ae13a2ba4 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -585,7 +585,7 @@ importers: version: file:projects/arm-peering.tgz '@rush-temp/arm-playwrighttesting': specifier: file:./projects/arm-playwrighttesting.tgz - version: file:projects/arm-playwrighttesting.tgz + version: file:projects/arm-playwrighttesting.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-policy': specifier: file:./projects/arm-policy.tgz version: file:projects/arm-policy.tgz @@ -3203,7 +3203,7 @@ packages: version: 0.0.0 '@rush-temp/arm-playwrighttesting@file:projects/arm-playwrighttesting.tgz': - resolution: {integrity: sha512-DoFdSeAM4GWLDFECLvCLScg80mpkRsKvwLyXtbmZqer687UOBWpOW1fcKO+uVxkxbUzu1R8eoj6o4wuhE8zk8A==, tarball: file:projects/arm-playwrighttesting.tgz} + resolution: {integrity: sha512-f6PdQKWN3m1ulYHdoD2WwrIJ5ObWoqXmrRV1lOr1eZ9xhPaQ8DVw/lyzEWkncGF3s+KGq03WEU/qZt2KtA8IXA==, tarball: file:projects/arm-playwrighttesting.tgz} version: 0.0.0 '@rush-temp/arm-policy-profile-2020-09-01-hybrid@file:projects/arm-policy-profile-2020-09-01-hybrid.tgz': @@ -13958,25 +13958,38 @@ snapshots: - '@swc/wasm' - supports-color - '@rush-temp/arm-playwrighttesting@file:projects/arm-playwrighttesting.tgz': + '@rush-temp/arm-playwrighttesting@file:projects/arm-playwrighttesting.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 - '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 + '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + eslint: 9.17.0 + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jiti + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio '@rush-temp/arm-policy-profile-2020-09-01-hybrid@file:projects/arm-policy-profile-2020-09-01-hybrid.tgz': dependencies: diff --git a/sdk/playwrighttesting/arm-playwrighttesting/CHANGELOG.md b/sdk/playwrighttesting/arm-playwrighttesting/CHANGELOG.md index 85fffeb29071..e849d97d015e 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/CHANGELOG.md +++ b/sdk/playwrighttesting/arm-playwrighttesting/CHANGELOG.md @@ -1,40 +1,7 @@ # Release History - -## 1.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.2 (2024-01-31) -### Features Added - - - Added Interface AccountProperties - - Added Interface AccountUpdateProperties - - Added Interface QuotaProperties - - Interface Account has a new optional parameter properties - - Interface AccountUpdate has a new optional parameter properties - - Interface Quota has a new optional parameter properties - -### Breaking Changes +## 1.0.0 (2024-12-13) - - Interface Account no longer has parameter dashboardUri - - Interface Account no longer has parameter provisioningState - - Interface Account no longer has parameter regionalAffinity - - Interface Account no longer has parameter reporting - - Interface Account no longer has parameter scalableExecution - - Interface AccountUpdate no longer has parameter regionalAffinity - - Interface AccountUpdate no longer has parameter reporting - - Interface AccountUpdate no longer has parameter scalableExecution - - Interface Quota no longer has parameter freeTrial - - Interface Quota no longer has parameter provisioningState - - -## 1.0.0-beta.1 (2023-09-27) +### Features Added -The package of @azure/arm-playwrighttesting is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +This is the first stable version with the package of @azure/arm-playwrighttesting. diff --git a/sdk/playwrighttesting/arm-playwrighttesting/README.md b/sdk/playwrighttesting/arm-playwrighttesting/README.md index 687fedfd55b3..e48b63a694c7 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/README.md +++ b/sdk/playwrighttesting/arm-playwrighttesting/README.md @@ -1,12 +1,12 @@ -# Azure PlaywrightTesting client library for JavaScript +# AzurePlaywrightService client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure PlaywrightTesting client. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzurePlaywrightService client. -Azure Playwright testing management service +Microsoft.AzurePlaywrightService Resource Provider Management API. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-playwrighttesting) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-playwrighttesting?view=azure-node-preview) | +[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-playwrighttesting) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -24,16 +24,16 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP ### Install the `@azure/arm-playwrighttesting` package -Install the Azure PlaywrightTesting client library for JavaScript with `npm`: +Install the AzurePlaywrightService client library for JavaScript with `npm`: ```bash npm install @azure/arm-playwrighttesting ``` -### Create and authenticate a `PlaywrightTestingClient` +### Create and authenticate a `AzurePlaywrightServiceClient` -To create a client object to access the Azure PlaywrightTesting API, you will need the `endpoint` of your Azure PlaywrightTesting resource and a `credential`. The Azure PlaywrightTesting client can use Azure Active Directory credentials to authenticate. -You can find the endpoint for your Azure PlaywrightTesting resource in the [Azure Portal][azure_portal]. +To create a client object to access the AzurePlaywrightService API, you will need the `endpoint` of your AzurePlaywrightService resource and a `credential`. The AzurePlaywrightService client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your AzurePlaywrightService resource in the [Azure Portal][azure_portal]. You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). @@ -43,25 +43,24 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below npm install @azure/identity ``` -You will also need to **register a new AAD application and grant access to Azure PlaywrightTesting** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. +You will also need to **register a new AAD application and grant access to AzurePlaywrightService** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ```javascript -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); const { DefaultAzureCredential } = require("@azure/identity"); // For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new PlaywrightTestingClient(new DefaultAzureCredential(), subscriptionId); +const client = new AzurePlaywrightServiceClient(new DefaultAzureCredential(), subscriptionId); // For client-side applications running in the browser, use this code instead: // const credential = new InteractiveBrowserCredential({ // tenantId: "", // clientId: "" // }); -// const client = new PlaywrightTestingClient(credential, subscriptionId); +// const client = new AzurePlaywrightServiceClient(credential, subscriptionId); ``` ### JavaScript Bundle @@ -70,9 +69,9 @@ To use this client library in the browser, first you need to use a bundler. For ## Key concepts -### PlaywrightTestingClient +### AzurePlaywrightServiceClient -`PlaywrightTestingClient` is the primary interface for developers using the Azure PlaywrightTesting client library. Explore the methods on this client object to understand the different features of the Azure PlaywrightTesting service that you can access. +`AzurePlaywrightServiceClient` is the primary interface for developers using the AzurePlaywrightService client library. Explore the methods on this client object to understand the different features of the AzurePlaywrightService service that you can access. ## Troubleshooting @@ -89,7 +88,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur ## Next steps -Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting/samples) directory for detailed examples on how to use this library. ## Contributing diff --git a/sdk/playwrighttesting/arm-playwrighttesting/_meta.json b/sdk/playwrighttesting/arm-playwrighttesting/_meta.json deleted file mode 100644 index c11d1254f9e7..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "f3cd6922dbe117d78b4f719bbf8b03db46b30808", - "readme": "specification/playwrighttesting/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\playwrighttesting\\resource-manager\\readme.md --use=@autorest/typescript@6.0.13 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", - "use": "@autorest/typescript@6.0.13" -} \ No newline at end of file diff --git a/sdk/playwrighttesting/arm-playwrighttesting/api-extractor.json b/sdk/playwrighttesting/arm-playwrighttesting/api-extractor.json index ace4d6d1823b..d4a68ab4c10d 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/api-extractor.json +++ b/sdk/playwrighttesting/arm-playwrighttesting/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-playwrighttesting.d.ts" + "publicTrimmedFilePath": "dist/arm-playwrighttesting.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/assets.json b/sdk/playwrighttesting/arm-playwrighttesting/assets.json index 75595f52e0af..17ed2ed73318 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/assets.json +++ b/sdk/playwrighttesting/arm-playwrighttesting/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/playwrighttesting/arm-playwrighttesting", - "Tag": "js/playwrighttesting/arm-playwrighttesting_4638cdcb91" + "Tag": "js/playwrighttesting/arm-playwrighttesting_de8e95b7f7" } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/eslint.config.mjs b/sdk/playwrighttesting/arm-playwrighttesting/eslint.config.mjs new file mode 100644 index 000000000000..03244d34a19f --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/eslint.config.mjs @@ -0,0 +1,17 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default [ + ...azsdkEslint.configs.recommended, + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/package.json b/sdk/playwrighttesting/arm-playwrighttesting/package.json index 97489c4f0d9d..1fb07cc3557a 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/package.json +++ b/sdk/playwrighttesting/arm-playwrighttesting/package.json @@ -1,113 +1,164 @@ { "name": "@azure/arm-playwrighttesting", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for PlaywrightTestingClient.", - "version": "1.0.0-beta.3", + "version": "1.0.0", + "description": "A generated SDK for AzurePlaywrightServiceClient.", "engines": { "node": ">=18.0.0" }, - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.12.0", - "tslib": "^2.2.0" + "sideEffects": false, + "autoPublish": false, + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts", + "./models": "./src/models/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false }, + "type": "module", "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-playwrighttesting.d.ts", + "files": [ + "dist/", + "README.md", + "LICENSE", + "review/", + "CHANGELOG.md" + ], + "sdk-type": "mgmt", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/azurePlaywrightServiceContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure-rest/core-client": "^2.3.1", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.6.0", + "@azure/core-lro": "^3.1.0", + "@azure/core-rest-pipeline": "^1.5.0", + "@azure/core-util": "^1.9.2", + "@azure/logger": "^1.0.0", + "tslib": "^2.6.2" + }, "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.2.1", + "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" + "eslint": "^9.9.0", + "playwright": "^1.49.1", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, - "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", - "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" - ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", - "build:node": "echo skipped", - "build:samples": "echo skipped.", - "build:test": "echo skipped", - "check-format": "echo skipped", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", - "format": "echo skipped", + "execute:samples": "dev-tool samples run samples-dev", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "generate:client": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "echo skipped", "lint": "echo skipped", + "lint:fix": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", - "prepack": "npm run build", - "test": "npm run integration-test", - "test:browser": "echo skipped", - "test:node": "echo skipped", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/playwrightTestingClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting", "//sampleConfiguration": { - "productName": "", + "productName": "@azure/arm-playwrighttesting", "productSlugs": [ "azure" ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-playwrighttesting?view=azure-node-preview" - } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./models": { + "browser": { + "types": "./dist/browser/models/index.d.ts", + "default": "./dist/browser/models/index.js" + }, + "react-native": { + "types": "./dist/react-native/models/index.d.ts", + "default": "./dist/react-native/models/index.js" + }, + "import": { + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js", + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js" } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/review/arm-playwrighttesting-models.api.md b/sdk/playwrighttesting/arm-playwrighttesting/review/arm-playwrighttesting-models.api.md new file mode 100644 index 000000000000..6eecb964fb35 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/review/arm-playwrighttesting-models.api.md @@ -0,0 +1,230 @@ +## API Report File for "@azure/arm-playwrighttesting" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export interface Account extends TrackedResource { + properties?: AccountProperties; +} + +// @public +export interface AccountFreeTrialProperties { + readonly allocatedValue: number; + readonly createdAt: Date; + readonly expiryAt: Date; + readonly percentageUsed: number; + readonly usedValue: number; +} + +// @public +export interface AccountProperties { + readonly dashboardUri?: string; + localAuth?: EnablementStatus; + readonly provisioningState?: ProvisioningState; + regionalAffinity?: EnablementStatus; + reporting?: EnablementStatus; + scalableExecution?: EnablementStatus; +} + +// @public +export interface AccountQuota extends ProxyResource { + properties?: AccountQuotaProperties; +} + +// @public +export interface AccountQuotaProperties { + freeTrial?: AccountFreeTrialProperties; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface AccountUpdate { + properties?: AccountUpdateProperties; + tags?: Record; +} + +// @public +export interface AccountUpdateProperties { + localAuth?: EnablementStatus; + regionalAffinity?: EnablementStatus; + reporting?: EnablementStatus; + scalableExecution?: EnablementStatus; +} + +// @public +export type ActionType = string; + +// @public +export type CheckNameAvailabilityReason = string; + +// @public +export interface CheckNameAvailabilityRequest { + name?: string; + type?: string; +} + +// @public +export interface CheckNameAvailabilityResponse { + message?: string; + nameAvailable?: boolean; + reason?: CheckNameAvailabilityReason; +} + +// @public +export type CreatedByType = string; + +// @public +export type EnablementStatus = string; + +// @public +export interface FreeTrialProperties { + readonly accountId: string; + readonly state: FreeTrialState; +} + +// @public +export type FreeTrialState = string; + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownCheckNameAvailabilityReason { + AlreadyExists = "AlreadyExists", + Invalid = "Invalid" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownEnablementStatus { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownFreeTrialState { + Active = "Active", + Expired = "Expired", + NotEligible = "NotEligible", + NotRegistered = "NotRegistered" +} + +// @public +export enum KnownOfferingType { + GeneralAvailability = "GeneralAvailability", + NotApplicable = "NotApplicable", + PrivatePreview = "PrivatePreview", + PublicPreview = "PublicPreview" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownQuotaNames { + Reporting = "Reporting", + ScalableExecution = "ScalableExecution" +} + +// @public +export enum KnownVersions { + "V2024-12-01" = "2024-12-01" +} + +// @public +export type OfferingType = string; + +// @public +export interface Operation { + actionType?: ActionType; + readonly display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export type Origin = string; + +// @public +export type ProvisioningState = string; + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export interface Quota extends ProxyResource { + properties?: QuotaProperties; +} + +// @public +export type QuotaNames = string; + +// @public +export interface QuotaProperties { + freeTrial?: FreeTrialProperties; + readonly offeringType?: OfferingType; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: Record; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/playwrighttesting/arm-playwrighttesting/review/arm-playwrighttesting.api.md b/sdk/playwrighttesting/arm-playwrighttesting/review/arm-playwrighttesting.api.md index 0b21556485ab..9ef4904afdaa 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/review/arm-playwrighttesting.api.md +++ b/sdk/playwrighttesting/arm-playwrighttesting/review/arm-playwrighttesting.api.md @@ -4,11 +4,14 @@ ```ts -import * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; +import { AbortSignalLike } from '@azure/abort-controller'; +import { ClientOptions } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; import { OperationState } from '@azure/core-lro'; -import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { SimplePollerLike } from '@azure/core-lro'; +import { PathUncheckedResponse } from '@azure-rest/core-client'; +import { Pipeline } from '@azure/core-rest-pipeline'; +import { PollerLike } from '@azure/core-lro'; +import { TokenCredential } from '@azure/core-auth'; // @public export interface Account extends TrackedResource { @@ -16,14 +19,18 @@ export interface Account extends TrackedResource { } // @public -export interface AccountListResult { - nextLink?: string; - value: Account[]; +export interface AccountFreeTrialProperties { + readonly allocatedValue: number; + readonly createdAt: Date; + readonly expiryAt: Date; + readonly percentageUsed: number; + readonly usedValue: number; } // @public export interface AccountProperties { readonly dashboardUri?: string; + localAuth?: EnablementStatus; readonly provisioningState?: ProvisioningState; regionalAffinity?: EnablementStatus; reporting?: EnablementStatus; @@ -31,95 +38,80 @@ export interface AccountProperties { } // @public -export interface Accounts { - beginCreateOrUpdate(resourceGroupName: string, name: string, resource: Account, options?: AccountsCreateOrUpdateOptionalParams): Promise, AccountsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, name: string, resource: Account, options?: AccountsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, name: string, options?: AccountsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, name: string, options?: AccountsDeleteOptionalParams): Promise; - get(resourceGroupName: string, name: string, options?: AccountsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: AccountsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: AccountsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, name: string, properties: AccountUpdate, options?: AccountsUpdateOptionalParams): Promise; +export interface AccountQuota extends ProxyResource { + properties?: AccountQuotaProperties; } // @public -export interface AccountsCreateOrUpdateHeaders { - retryAfter?: number; +export interface AccountQuotaProperties { + freeTrial?: AccountFreeTrialProperties; + readonly provisioningState?: ProvisioningState; } // @public -export interface AccountsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface AccountQuotasGetOptionalParams extends OperationOptions { } // @public -export type AccountsCreateOrUpdateResponse = Account; - -// @public -export interface AccountsDeleteHeaders { - location?: string; - retryAfter?: number; +export interface AccountQuotasListByAccountOptionalParams extends OperationOptions { } // @public -export interface AccountsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface AccountQuotasOperations { + get: (resourceGroupName: string, accountName: string, quotaName: QuotaNames, options?: AccountQuotasGetOptionalParams) => Promise; + listByAccount: (resourceGroupName: string, accountName: string, options?: AccountQuotasListByAccountOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface AccountsGetOptionalParams extends coreClient.OperationOptions { +export interface AccountsCheckNameAvailabilityOptionalParams extends OperationOptions { } // @public -export type AccountsGetResponse = Account; - -// @public -export interface AccountsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface AccountsCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type AccountsListByResourceGroupNextResponse = AccountListResult; - -// @public -export interface AccountsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface AccountsDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type AccountsListByResourceGroupResponse = AccountListResult; - -// @public -export interface AccountsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface AccountsGetOptionalParams extends OperationOptions { } // @public -export type AccountsListBySubscriptionNextResponse = AccountListResult; - -// @public -export interface AccountsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface AccountsListByResourceGroupOptionalParams extends OperationOptions { } // @public -export type AccountsListBySubscriptionResponse = AccountListResult; +export interface AccountsListBySubscriptionOptionalParams extends OperationOptions { +} // @public -export interface AccountsUpdateOptionalParams extends coreClient.OperationOptions { +export interface AccountsOperations { + checkNameAvailability: (body: CheckNameAvailabilityRequest, options?: AccountsCheckNameAvailabilityOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, accountName: string, resource: Account, options?: AccountsCreateOrUpdateOptionalParams) => PollerLike, Account>; + delete: (resourceGroupName: string, accountName: string, options?: AccountsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, accountName: string, options?: AccountsGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: AccountsListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: AccountsListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, accountName: string, properties: AccountUpdate, options?: AccountsUpdateOptionalParams) => Promise; } // @public -export type AccountsUpdateResponse = Account; +export interface AccountsUpdateOptionalParams extends OperationOptions { +} // @public export interface AccountUpdate { properties?: AccountUpdateProperties; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public export interface AccountUpdateProperties { + localAuth?: EnablementStatus; regionalAffinity?: EnablementStatus; reporting?: EnablementStatus; scalableExecution?: EnablementStatus; @@ -128,54 +120,68 @@ export interface AccountUpdateProperties { // @public export type ActionType = string; +// @public (undocumented) +export class AzurePlaywrightServiceClient { + constructor(credential: TokenCredential, subscriptionId: string, options?: AzurePlaywrightServiceClientOptionalParams); + readonly accountQuotas: AccountQuotasOperations; + readonly accounts: AccountsOperations; + readonly operations: OperationsOperations; + readonly pipeline: Pipeline; + readonly quotas: QuotasOperations; +} + // @public -export type CreatedByType = string; +export interface AzurePlaywrightServiceClientOptionalParams extends ClientOptions { + apiVersion?: string; +} // @public -export type EnablementStatus = string; +export type CheckNameAvailabilityReason = string; // @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; +export interface CheckNameAvailabilityRequest { + name?: string; + type?: string; } // @public -export interface ErrorDetail { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetail[]; - readonly message?: string; - readonly target?: string; +export interface CheckNameAvailabilityResponse { + message?: string; + nameAvailable?: boolean; + reason?: CheckNameAvailabilityReason; } // @public -export interface ErrorResponse { - error?: ErrorDetail; -} +export type ContinuablePage = TPage & { + continuationToken?: string; +}; + +// @public +export type CreatedByType = string; + +// @public +export type EnablementStatus = string; // @public export interface FreeTrialProperties { readonly accountId: string; - readonly allocatedValue: number; - readonly createdAt: Date; - readonly expiryAt: Date; - readonly percentageUsed: number; readonly state: FreeTrialState; - readonly usedValue: number; } // @public export type FreeTrialState = string; -// @public -export function getContinuationToken(page: unknown): string | undefined; - // @public export enum KnownActionType { Internal = "Internal" } +// @public +export enum KnownCheckNameAvailabilityReason { + AlreadyExists = "AlreadyExists", + Invalid = "Invalid" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -193,7 +199,17 @@ export enum KnownEnablementStatus { // @public export enum KnownFreeTrialState { Active = "Active", - Expired = "Expired" + Expired = "Expired", + NotEligible = "NotEligible", + NotRegistered = "NotRegistered" +} + +// @public +export enum KnownOfferingType { + GeneralAvailability = "GeneralAvailability", + NotApplicable = "NotApplicable", + PrivatePreview = "PrivatePreview", + PublicPreview = "PublicPreview" } // @public @@ -207,6 +223,7 @@ export enum KnownOrigin { export enum KnownProvisioningState { Accepted = "Accepted", Canceled = "Canceled", + Creating = "Creating", Deleting = "Deleting", Failed = "Failed", Succeeded = "Succeeded" @@ -214,13 +231,22 @@ export enum KnownProvisioningState { // @public export enum KnownQuotaNames { + Reporting = "Reporting", ScalableExecution = "ScalableExecution" } +// @public +export enum KnownVersions { + "V2024-12-01" = "2024-12-01" +} + +// @public +export type OfferingType = string; + // @public export interface Operation { - readonly actionType?: ActionType; - display?: OperationDisplay; + actionType?: ActionType; + readonly display?: OperationDisplay; readonly isDataAction?: boolean; readonly name?: string; readonly origin?: Origin; @@ -235,55 +261,27 @@ export interface OperationDisplay { } // @public -export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; -} - -// @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +export interface OperationsListOptionalParams extends OperationOptions { } // @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +export interface OperationsOperations { + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; } // @public -export type OperationsListNextResponse = OperationListResult; +export type Origin = string; // @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; + next(): Promise>; } // @public -export type OperationsListResponse = OperationListResult; - -// @public -export type Origin = string; - -// @public (undocumented) -export class PlaywrightTestingClient extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PlaywrightTestingClientOptionalParams); - // (undocumented) - accounts: Accounts; - // (undocumented) - apiVersion: string; - // (undocumented) - operations: Operations; - // (undocumented) - quotas: Quotas; - // (undocumented) - subscriptionId: string; -} - -// @public -export interface PlaywrightTestingClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; +export interface PageSettings { + continuationToken?: string; } // @public @@ -298,48 +296,30 @@ export interface Quota extends ProxyResource { properties?: QuotaProperties; } -// @public -export interface QuotaListResult { - nextLink?: string; - value: Quota[]; -} - // @public export type QuotaNames = string; // @public export interface QuotaProperties { freeTrial?: FreeTrialProperties; + readonly offeringType?: OfferingType; readonly provisioningState?: ProvisioningState; } // @public -export interface Quotas { - get(location: string, name: QuotaNames, options?: QuotasGetOptionalParams): Promise; - listBySubscription(location: string, options?: QuotasListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface QuotasGetOptionalParams extends OperationOptions { } // @public -export interface QuotasGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type QuotasGetResponse = Quota; - -// @public -export interface QuotasListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface QuotasListBySubscriptionOptionalParams extends OperationOptions { } // @public -export type QuotasListBySubscriptionNextResponse = QuotaListResult; - -// @public -export interface QuotasListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface QuotasOperations { + get: (location: string, quotaName: QuotaNames, options?: QuotasGetOptionalParams) => Promise; + listBySubscription: (location: string, options?: QuotasListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type QuotasListBySubscriptionResponse = QuotaListResult; - // @public export interface Resource { readonly id?: string; @@ -348,6 +328,16 @@ export interface Resource { readonly type?: string; } +// @public +export function restorePoller(client: AzurePlaywrightServiceClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike, TResult>, options?: RestorePollerOptions): PollerLike, TResult>; + +// @public (undocumented) +export interface RestorePollerOptions extends OperationOptions { + abortSignal?: AbortSignalLike; + processResponseBody?: (result: TResponse) => Promise; + updateIntervalInMs?: number; +} + // @public export interface SystemData { createdAt?: Date; @@ -361,9 +351,7 @@ export interface SystemData { // @public export interface TrackedResource extends Resource { location: string; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // (No @packageDocumentation comment for this package) diff --git a/sdk/playwrighttesting/arm-playwrighttesting/sample.env b/sdk/playwrighttesting/arm-playwrighttesting/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/sample.env +++ b/sdk/playwrighttesting/arm-playwrighttesting/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountQuotasGetSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountQuotasGetSample.ts new file mode 100644 index 000000000000..31aadfd4bb76 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountQuotasGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get quota by name for an account. + * + * @summary get quota by name for an account. + * x-ms-original-file: 2024-12-01/AccountQuotas_Get.json + */ +async function accountQuotasGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accountQuotas.get( + "dummyrg", + "myPlaywrightAccount", + "ScalableExecution", + ); + console.log(result); +} + +async function main() { + accountQuotasGet(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountQuotasListByAccountSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountQuotasListByAccountSample.ts new file mode 100644 index 000000000000..434fd727ab03 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountQuotasListByAccountSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list quotas for a given account. + * + * @summary list quotas for a given account. + * x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json + */ +async function accountQuotasListByAccount() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.accountQuotas.listByAccount("dummyrg", "myPlaywrightAccount")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + accountQuotasListByAccount(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsCheckNameAvailabilitySample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsCheckNameAvailabilitySample.ts new file mode 100644 index 000000000000..eb1a83abc341 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsCheckNameAvailabilitySample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds check global name availability operation, normally used if a resource name must be globally unique. + * + * @summary adds check global name availability operation, normally used if a resource name must be globally unique. + * x-ms-original-file: 2024-12-01/Accounts_CheckNameAvailability.json + */ +async function accountsCheckNameAvailability() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accounts.checkNameAvailability({ + name: "dummyName", + type: "Microsoft.AzurePlaywrightService/Accounts", + }); + console.log(result); +} + +async function main() { + accountsCheckNameAvailability(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsCreateOrUpdateSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsCreateOrUpdateSample.ts index 99e43ee54ee0..34a5b57788d7 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsCreateOrUpdateSample.ts +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsCreateOrUpdateSample.ts @@ -1,44 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Account, PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Create a Account + * This sample demonstrates how to create a Account * - * @summary Create a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_CreateOrUpdate.json + * @summary create a Account + * x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json */ async function accountsCreateOrUpdate() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const resource: Account = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accounts.createOrUpdate("dummyrg", "myPlaywrightAccount", { location: "westus", + tags: { Team: "Dev Exp" }, properties: { regionalAffinity: "Enabled" }, - tags: { team: "Dev Exp" } - }; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - resource - ); + }); console.log(result); } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsDeleteSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsDeleteSample.ts index 8ffc41ea3061..cf2b1524d848 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsDeleteSample.ts +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsDeleteSample.ts @@ -1,39 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Delete a Account + * This sample demonstrates how to delete a Account * - * @summary Delete a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Delete.json + * @summary delete a Account + * x-ms-original-file: 2024-12-01/Accounts_Delete.json */ async function accountsDelete() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + await client.accounts.delete("dummyrg", "myPlaywrightAccount"); } async function main() { diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsGetSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsGetSample.ts deleted file mode 100644 index b861ded65f35..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsGetSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Account - * - * @summary Get a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json - */ -async function accountsGet() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.get(resourceGroupName, name); - console.log(result); -} - -async function main() { - accountsGet(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsListByResourceGroupSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsListByResourceGroupSample.ts deleted file mode 100644 index 9b5b26e2a371..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Account resources by resource group - * - * @summary List Account resources by resource group - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListByResourceGroup.json - */ -async function accountsListByResourceGroup() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - accountsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsListBySubscriptionSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsListBySubscriptionSample.ts deleted file mode 100644 index 333806a6c07b..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Account resources by subscription ID - * - * @summary List Account resources by subscription ID - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListBySubscription.json - */ -async function accountsListBySubscription() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - accountsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsUpdateSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsUpdateSample.ts index 558728376361..db8aaa5353c6 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsUpdateSample.ts +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/accountsUpdateSample.ts @@ -1,46 +1,23 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - AccountUpdate, - PlaywrightTestingClient -} from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Update a Account + * This sample demonstrates how to update a Account * - * @summary Update a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Update.json + * @summary update a Account + * x-ms-original-file: 2024-12-01/Accounts_Update.json */ async function accountsUpdate() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const properties: AccountUpdate = { - properties: { regionalAffinity: "Enabled" }, - tags: { division: "LT", team: "Dev Exp" } - }; const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.update( - resourceGroupName, - name, - properties - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accounts.update("dummyrg", "myPlaywrightAccount", { + tags: { Team: "Dev Exp", Division: "LT" }, + properties: { regionalAffinity: "Enabled" }, + }); console.log(result); } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/operationsListSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/operationsListSample.ts index a7d239bca8d2..322f8e407c81 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/operationsListSample.ts +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/operationsListSample.ts @@ -1,35 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to List the operations for the provider + * This sample demonstrates how to list the operations for the provider * - * @summary List the operations for the provider - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Operations_List.json + * @summary list the operations for the provider + * x-ms-original-file: 2024-12-01/Operations_List.json */ async function operationsList() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); const resArray = new Array(); for await (let item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/quotasGetSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/quotasGetSample.ts index 2656f6a7ff3b..45998271d50f 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/quotasGetSample.ts +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/quotasGetSample.ts @@ -1,34 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Get quota by name. + * This sample demonstrates how to get subscription quota by name. * - * @summary Get quota by name. - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json + * @summary get subscription quota by name. + * x-ms-original-file: 2024-12-01/Quotas_Get.json */ async function quotasGet() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const name = "ScalableExecution"; const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.quotas.get(location, name); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.quotas.get("eastus", "ScalableExecution"); console.log(result); } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/quotasListBySubscriptionSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/quotasListBySubscriptionSample.ts index eb0c566fd45c..560793ab289a 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/quotasListBySubscriptionSample.ts +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples-dev/quotasListBySubscriptionSample.ts @@ -1,36 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; -dotenv.config(); +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to List quotas for a given subscription Id. + * This sample demonstrates how to list quotas for a given subscription Id. * - * @summary List quotas for a given subscription Id. - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_ListBySubscription.json + * @summary list quotas for a given subscription Id. + * x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json */ async function quotasListBySubscription() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.quotas.listBySubscription(location)) { + for await (let item of client.quotas.listBySubscription("eastus")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/README.md b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/README.md deleted file mode 100644 index c9c8d747235a..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [accountsCreateOrUpdateSample.js][accountscreateorupdatesample] | Create a Account x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_CreateOrUpdate.json | -| [accountsDeleteSample.js][accountsdeletesample] | Delete a Account x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Delete.json | -| [accountsGetSample.js][accountsgetsample] | Get a Account x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json | -| [accountsListByResourceGroupSample.js][accountslistbyresourcegroupsample] | List Account resources by resource group x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListByResourceGroup.json | -| [accountsListBySubscriptionSample.js][accountslistbysubscriptionsample] | List Account resources by subscription ID x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListBySubscription.json | -| [accountsUpdateSample.js][accountsupdatesample] | Update a Account x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Update.json | -| [operationsListSample.js][operationslistsample] | List the operations for the provider x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Operations_List.json | -| [quotasGetSample.js][quotasgetsample] | Get quota by name. x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json | -| [quotasListBySubscriptionSample.js][quotaslistbysubscriptionsample] | List quotas for a given subscription Id. x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_ListBySubscription.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node accountsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env PLAYWRIGHTTESTING_SUBSCRIPTION_ID="" PLAYWRIGHTTESTING_RESOURCE_GROUP="" node accountsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[accountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsCreateOrUpdateSample.js -[accountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsDeleteSample.js -[accountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsGetSample.js -[accountslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListByResourceGroupSample.js -[accountslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListBySubscriptionSample.js -[accountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsUpdateSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/operationsListSample.js -[quotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasGetSample.js -[quotaslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasListBySubscriptionSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-playwrighttesting?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting/README.md diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsCreateOrUpdateSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsCreateOrUpdateSample.js deleted file mode 100644 index 5fd51252cfe3..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a Account - * - * @summary Create a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_CreateOrUpdate.json - */ -async function accountsCreateOrUpdate() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const resource = { - location: "westus", - properties: { regionalAffinity: "Enabled" }, - tags: { team: "Dev Exp" }, - }; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - resource, - ); - console.log(result); -} - -async function main() { - accountsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsDeleteSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsDeleteSample.js deleted file mode 100644 index efd6706fd78c..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Account - * - * @summary Delete a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Delete.json - */ -async function accountsDelete() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.beginDeleteAndWait(resourceGroupName, name); - console.log(result); -} - -async function main() { - accountsDelete(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsGetSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsGetSample.js deleted file mode 100644 index 912d54322f40..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Account - * - * @summary Get a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json - */ -async function accountsGet() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.get(resourceGroupName, name); - console.log(result); -} - -async function main() { - accountsGet(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListByResourceGroupSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListByResourceGroupSample.js deleted file mode 100644 index cdf2895d2285..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List Account resources by resource group - * - * @summary List Account resources by resource group - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListByResourceGroup.json - */ -async function accountsListByResourceGroup() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - accountsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListBySubscriptionSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListBySubscriptionSample.js deleted file mode 100644 index bf4ff79ffc3c..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List Account resources by subscription ID - * - * @summary List Account resources by subscription ID - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListBySubscription.json - */ -async function accountsListBySubscription() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - accountsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsUpdateSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsUpdateSample.js deleted file mode 100644 index 0006112ba3b8..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/accountsUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a Account - * - * @summary Update a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Update.json - */ -async function accountsUpdate() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const properties = { - properties: { regionalAffinity: "Enabled" }, - tags: { division: "LT", team: "Dev Exp" }, - }; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.update(resourceGroupName, name, properties); - console.log(result); -} - -async function main() { - accountsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/operationsListSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index abe53cad2326..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Operations_List.json - */ -async function operationsList() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasGetSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasGetSample.js deleted file mode 100644 index 003b45762792..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get quota by name. - * - * @summary Get quota by name. - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json - */ -async function quotasGet() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const name = "ScalableExecution"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.quotas.get(location, name); - console.log(result); -} - -async function main() { - quotasGet(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasListBySubscriptionSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasListBySubscriptionSample.js deleted file mode 100644 index dd7b01544747..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/quotasListBySubscriptionSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List quotas for a given subscription Id. - * - * @summary List quotas for a given subscription Id. - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_ListBySubscription.json - */ -async function quotasListBySubscription() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.quotas.listBySubscription(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - quotasListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/sample.env b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/README.md b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/README.md deleted file mode 100644 index 3f7862859baa..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [accountsCreateOrUpdateSample.ts][accountscreateorupdatesample] | Create a Account x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_CreateOrUpdate.json | -| [accountsDeleteSample.ts][accountsdeletesample] | Delete a Account x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Delete.json | -| [accountsGetSample.ts][accountsgetsample] | Get a Account x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json | -| [accountsListByResourceGroupSample.ts][accountslistbyresourcegroupsample] | List Account resources by resource group x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListByResourceGroup.json | -| [accountsListBySubscriptionSample.ts][accountslistbysubscriptionsample] | List Account resources by subscription ID x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListBySubscription.json | -| [accountsUpdateSample.ts][accountsupdatesample] | Update a Account x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Update.json | -| [operationsListSample.ts][operationslistsample] | List the operations for the provider x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Operations_List.json | -| [quotasGetSample.ts][quotasgetsample] | Get quota by name. x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json | -| [quotasListBySubscriptionSample.ts][quotaslistbysubscriptionsample] | List quotas for a given subscription Id. x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_ListBySubscription.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/accountsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env PLAYWRIGHTTESTING_SUBSCRIPTION_ID="" PLAYWRIGHTTESTING_RESOURCE_GROUP="" node dist/accountsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[accountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsCreateOrUpdateSample.ts -[accountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsDeleteSample.ts -[accountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsGetSample.ts -[accountslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListByResourceGroupSample.ts -[accountslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListBySubscriptionSample.ts -[accountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsUpdateSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/operationsListSample.ts -[quotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasGetSample.ts -[quotaslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasListBySubscriptionSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-playwrighttesting?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/sample.env b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsCreateOrUpdateSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsCreateOrUpdateSample.ts deleted file mode 100644 index 99e43ee54ee0..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Account, PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a Account - * - * @summary Create a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_CreateOrUpdate.json - */ -async function accountsCreateOrUpdate() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const resource: Account = { - location: "westus", - properties: { regionalAffinity: "Enabled" }, - tags: { team: "Dev Exp" } - }; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - resource - ); - console.log(result); -} - -async function main() { - accountsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsDeleteSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsDeleteSample.ts deleted file mode 100644 index 8ffc41ea3061..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Account - * - * @summary Delete a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Delete.json - */ -async function accountsDelete() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -async function main() { - accountsDelete(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsGetSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsGetSample.ts deleted file mode 100644 index b861ded65f35..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsGetSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Account - * - * @summary Get a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json - */ -async function accountsGet() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.get(resourceGroupName, name); - console.log(result); -} - -async function main() { - accountsGet(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListByResourceGroupSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListByResourceGroupSample.ts deleted file mode 100644 index 9b5b26e2a371..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Account resources by resource group - * - * @summary List Account resources by resource group - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListByResourceGroup.json - */ -async function accountsListByResourceGroup() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - accountsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListBySubscriptionSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListBySubscriptionSample.ts deleted file mode 100644 index 333806a6c07b..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Account resources by subscription ID - * - * @summary List Account resources by subscription ID - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListBySubscription.json - */ -async function accountsListBySubscription() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - accountsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsUpdateSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsUpdateSample.ts deleted file mode 100644 index 558728376361..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/accountsUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AccountUpdate, - PlaywrightTestingClient -} from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a Account - * - * @summary Update a Account - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Update.json - */ -async function accountsUpdate() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["PLAYWRIGHTTESTING_RESOURCE_GROUP"] || "dummyrg"; - const name = "myPlaywrightAccount"; - const properties: AccountUpdate = { - properties: { regionalAffinity: "Enabled" }, - tags: { division: "LT", team: "Dev Exp" } - }; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.accounts.update( - resourceGroupName, - name, - properties - ); - console.log(result); -} - -async function main() { - accountsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index a7d239bca8d2..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Operations_List.json - */ -async function operationsList() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasGetSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasGetSample.ts deleted file mode 100644 index 2656f6a7ff3b..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get quota by name. - * - * @summary Get quota by name. - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json - */ -async function quotasGet() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const name = "ScalableExecution"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const result = await client.quotas.get(location, name); - console.log(result); -} - -async function main() { - quotasGet(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasListBySubscriptionSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasListBySubscriptionSample.ts deleted file mode 100644 index eb0c566fd45c..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/src/quotasListBySubscriptionSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlaywrightTestingClient } from "@azure/arm-playwrighttesting"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List quotas for a given subscription Id. - * - * @summary List quotas for a given subscription Id. - * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_ListBySubscription.json - */ -async function quotasListBySubscription() { - const subscriptionId = - process.env["PLAYWRIGHTTESTING_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new PlaywrightTestingClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.quotas.listBySubscription(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - quotasListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/README.md b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/README.md new file mode 100644 index 000000000000..81b8de7fecf8 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/README.md @@ -0,0 +1,66 @@ +# @azure/arm-playwrighttesting client library samples for JavaScript + +These sample programs show how to use the JavaScript client libraries for @azure/arm-playwrighttesting in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [accountQuotasGetSample.js][accountquotasgetsample] | get quota by name for an account. x-ms-original-file: 2024-12-01/AccountQuotas_Get.json | +| [accountQuotasListByAccountSample.js][accountquotaslistbyaccountsample] | list quotas for a given account. x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json | +| [accountsCheckNameAvailabilitySample.js][accountschecknameavailabilitysample] | adds check global name availability operation, normally used if a resource name must be globally unique. x-ms-original-file: 2024-12-01/Accounts_CheckNameAvailability.json | +| [accountsCreateOrUpdateSample.js][accountscreateorupdatesample] | create a Account x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json | +| [accountsDeleteSample.js][accountsdeletesample] | delete a Account x-ms-original-file: 2024-12-01/Accounts_Delete.json | +| [accountsUpdateSample.js][accountsupdatesample] | update a Account x-ms-original-file: 2024-12-01/Accounts_Update.json | +| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-12-01/Operations_List.json | +| [quotasGetSample.js][quotasgetsample] | get subscription quota by name. x-ms-original-file: 2024-12-01/Quotas_Get.json | +| [quotasListBySubscriptionSample.js][quotaslistbysubscriptionsample] | list quotas for a given subscription Id. x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node accountQuotasGetSample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx dev-tool run vendored cross-env node accountQuotasGetSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[accountquotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasGetSample.js +[accountquotaslistbyaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasListByAccountSample.js +[accountschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCheckNameAvailabilitySample.js +[accountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCreateOrUpdateSample.js +[accountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsDeleteSample.js +[accountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsUpdateSample.js +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/operationsListSample.js +[quotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasGetSample.js +[quotaslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasListBySubscriptionSample.js +[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-playwrighttesting?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting/README.md diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasGetSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasGetSample.js new file mode 100644 index 000000000000..3014c0883bcb --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasGetSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get quota by name for an account. + * + * @summary get quota by name for an account. + * x-ms-original-file: 2024-12-01/AccountQuotas_Get.json + */ +async function accountQuotasGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accountQuotas.get( + "dummyrg", + "myPlaywrightAccount", + "ScalableExecution", + ); + console.log(result); +} + +async function main() { + accountQuotasGet(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasListByAccountSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasListByAccountSample.js new file mode 100644 index 000000000000..f3bd1547e73c --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountQuotasListByAccountSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list quotas for a given account. + * + * @summary list quotas for a given account. + * x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json + */ +async function accountQuotasListByAccount() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.accountQuotas.listByAccount("dummyrg", "myPlaywrightAccount")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + accountQuotasListByAccount(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCheckNameAvailabilitySample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCheckNameAvailabilitySample.js new file mode 100644 index 000000000000..5217fa38e784 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCheckNameAvailabilitySample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds check global name availability operation, normally used if a resource name must be globally unique. + * + * @summary adds check global name availability operation, normally used if a resource name must be globally unique. + * x-ms-original-file: 2024-12-01/Accounts_CheckNameAvailability.json + */ +async function accountsCheckNameAvailability() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accounts.checkNameAvailability({ + name: "dummyName", + type: "Microsoft.AzurePlaywrightService/Accounts", + }); + console.log(result); +} + +async function main() { + accountsCheckNameAvailability(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCreateOrUpdateSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCreateOrUpdateSample.js new file mode 100644 index 000000000000..048a1d4911e7 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsCreateOrUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a Account + * + * @summary create a Account + * x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json + */ +async function accountsCreateOrUpdate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accounts.createOrUpdate("dummyrg", "myPlaywrightAccount", { + location: "westus", + tags: { Team: "Dev Exp" }, + properties: { regionalAffinity: "Enabled" }, + }); + console.log(result); +} + +async function main() { + accountsCreateOrUpdate(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsDeleteSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsDeleteSample.js new file mode 100644 index 000000000000..45b7626c120d --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a Account + * + * @summary delete a Account + * x-ms-original-file: 2024-12-01/Accounts_Delete.json + */ +async function accountsDelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + await client.accounts.delete("dummyrg", "myPlaywrightAccount"); +} + +async function main() { + accountsDelete(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsUpdateSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsUpdateSample.js new file mode 100644 index 000000000000..040d0f8251f8 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/accountsUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update a Account + * + * @summary update a Account + * x-ms-original-file: 2024-12-01/Accounts_Update.json + */ +async function accountsUpdate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accounts.update("dummyrg", "myPlaywrightAccount", { + tags: { Team: "Dev Exp", Division: "LT" }, + properties: { regionalAffinity: "Enabled" }, + }); + console.log(result); +} + +async function main() { + accountsUpdate(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/operationsListSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/operationsListSample.js new file mode 100644 index 000000000000..5d242e707078 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/operationsListSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list the operations for the provider + * + * @summary list the operations for the provider + * x-ms-original-file: 2024-12-01/Operations_List.json + */ +async function operationsList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + operationsList(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/package.json b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/package.json similarity index 77% rename from sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/package.json rename to sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/package.json index 9140e33f9aa5..6f43e9f0cbc3 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/javascript/package.json +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-playwrighttesting-js-beta", + "name": "@azure-samples/arm-playwrighttesting-js", "private": true, "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", + "description": "@azure/arm-playwrighttesting client library samples for JavaScript", "engines": { "node": ">=18.0.0" }, @@ -14,6 +14,7 @@ "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" @@ -25,7 +26,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting", "dependencies": { - "@azure/arm-playwrighttesting": "next", + "@azure/arm-playwrighttesting": "latest", "dotenv": "latest", "@azure/identity": "^4.2.1" } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasGetSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasGetSample.js new file mode 100644 index 000000000000..66ce05a1affb --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get subscription quota by name. + * + * @summary get subscription quota by name. + * x-ms-original-file: 2024-12-01/Quotas_Get.json + */ +async function quotasGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.quotas.get("eastus", "ScalableExecution"); + console.log(result); +} + +async function main() { + quotasGet(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasListBySubscriptionSample.js b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasListBySubscriptionSample.js new file mode 100644 index 000000000000..67a1bd2f325a --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/quotasListBySubscriptionSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list quotas for a given subscription Id. + * + * @summary list quotas for a given subscription Id. + * x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json + */ +async function quotasListBySubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.quotas.listBySubscription("eastus")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + quotasListBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/sample.env b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/sample.env new file mode 100644 index 000000000000..508439fc7d62 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/javascript/sample.env @@ -0,0 +1 @@ +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/README.md b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/README.md new file mode 100644 index 000000000000..43454f55870d --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/README.md @@ -0,0 +1,79 @@ +# @azure/arm-playwrighttesting client library samples for TypeScript + +These sample programs show how to use the TypeScript client libraries for @azure/arm-playwrighttesting in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [accountQuotasGetSample.ts][accountquotasgetsample] | get quota by name for an account. x-ms-original-file: 2024-12-01/AccountQuotas_Get.json | +| [accountQuotasListByAccountSample.ts][accountquotaslistbyaccountsample] | list quotas for a given account. x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json | +| [accountsCheckNameAvailabilitySample.ts][accountschecknameavailabilitysample] | adds check global name availability operation, normally used if a resource name must be globally unique. x-ms-original-file: 2024-12-01/Accounts_CheckNameAvailability.json | +| [accountsCreateOrUpdateSample.ts][accountscreateorupdatesample] | create a Account x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json | +| [accountsDeleteSample.ts][accountsdeletesample] | delete a Account x-ms-original-file: 2024-12-01/Accounts_Delete.json | +| [accountsUpdateSample.ts][accountsupdatesample] | update a Account x-ms-original-file: 2024-12-01/Accounts_Update.json | +| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-12-01/Operations_List.json | +| [quotasGetSample.ts][quotasgetsample] | get subscription quota by name. x-ms-original-file: 2024-12-01/Quotas_Get.json | +| [quotasListBySubscriptionSample.ts][quotaslistbysubscriptionsample] | list quotas for a given subscription Id. x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/accountQuotasGetSample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx dev-tool run vendored cross-env node dist/accountQuotasGetSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[accountquotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasGetSample.ts +[accountquotaslistbyaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasListByAccountSample.ts +[accountschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCheckNameAvailabilitySample.ts +[accountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCreateOrUpdateSample.ts +[accountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsDeleteSample.ts +[accountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsUpdateSample.ts +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/operationsListSample.ts +[quotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasGetSample.ts +[quotaslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasListBySubscriptionSample.ts +[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-playwrighttesting?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/package.json b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/package.json similarity index 78% rename from sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/package.json rename to sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/package.json index 58b277c4bb7d..c97993f95023 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/package.json +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-playwrighttesting-ts-beta", + "name": "@azure-samples/arm-playwrighttesting-ts", "private": true, "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", + "description": "@azure/arm-playwrighttesting client library samples for TypeScript", "engines": { "node": ">=18.0.0" }, @@ -18,6 +18,7 @@ "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" @@ -29,13 +30,13 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting", "dependencies": { - "@azure/arm-playwrighttesting": "next", + "@azure/arm-playwrighttesting": "latest", "dotenv": "latest", "@azure/identity": "^4.2.1" }, "devDependencies": { "@types/node": "^18.0.0", - "typescript": "~5.7.2", + "typescript": "~5.6.2", "rimraf": "latest" } } diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/sample.env b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/sample.env new file mode 100644 index 000000000000..508439fc7d62 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/sample.env @@ -0,0 +1 @@ +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasGetSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasGetSample.ts new file mode 100644 index 000000000000..31aadfd4bb76 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get quota by name for an account. + * + * @summary get quota by name for an account. + * x-ms-original-file: 2024-12-01/AccountQuotas_Get.json + */ +async function accountQuotasGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accountQuotas.get( + "dummyrg", + "myPlaywrightAccount", + "ScalableExecution", + ); + console.log(result); +} + +async function main() { + accountQuotasGet(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasListByAccountSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasListByAccountSample.ts new file mode 100644 index 000000000000..434fd727ab03 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountQuotasListByAccountSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list quotas for a given account. + * + * @summary list quotas for a given account. + * x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json + */ +async function accountQuotasListByAccount() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.accountQuotas.listByAccount("dummyrg", "myPlaywrightAccount")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + accountQuotasListByAccount(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCheckNameAvailabilitySample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCheckNameAvailabilitySample.ts new file mode 100644 index 000000000000..eb1a83abc341 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCheckNameAvailabilitySample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds check global name availability operation, normally used if a resource name must be globally unique. + * + * @summary adds check global name availability operation, normally used if a resource name must be globally unique. + * x-ms-original-file: 2024-12-01/Accounts_CheckNameAvailability.json + */ +async function accountsCheckNameAvailability() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accounts.checkNameAvailability({ + name: "dummyName", + type: "Microsoft.AzurePlaywrightService/Accounts", + }); + console.log(result); +} + +async function main() { + accountsCheckNameAvailability(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCreateOrUpdateSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..34a5b57788d7 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsCreateOrUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a Account + * + * @summary create a Account + * x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json + */ +async function accountsCreateOrUpdate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accounts.createOrUpdate("dummyrg", "myPlaywrightAccount", { + location: "westus", + tags: { Team: "Dev Exp" }, + properties: { regionalAffinity: "Enabled" }, + }); + console.log(result); +} + +async function main() { + accountsCreateOrUpdate(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsDeleteSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsDeleteSample.ts new file mode 100644 index 000000000000..cf2b1524d848 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a Account + * + * @summary delete a Account + * x-ms-original-file: 2024-12-01/Accounts_Delete.json + */ +async function accountsDelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + await client.accounts.delete("dummyrg", "myPlaywrightAccount"); +} + +async function main() { + accountsDelete(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsUpdateSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsUpdateSample.ts new file mode 100644 index 000000000000..db8aaa5353c6 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/accountsUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a Account + * + * @summary update a Account + * x-ms-original-file: 2024-12-01/Accounts_Update.json + */ +async function accountsUpdate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.accounts.update("dummyrg", "myPlaywrightAccount", { + tags: { Team: "Dev Exp", Division: "LT" }, + properties: { regionalAffinity: "Enabled" }, + }); + console.log(result); +} + +async function main() { + accountsUpdate(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/operationsListSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/operationsListSample.ts new file mode 100644 index 000000000000..322f8e407c81 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/operationsListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list the operations for the provider + * + * @summary list the operations for the provider + * x-ms-original-file: 2024-12-01/Operations_List.json + */ +async function operationsList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + operationsList(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasGetSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasGetSample.ts new file mode 100644 index 000000000000..45998271d50f --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get subscription quota by name. + * + * @summary get subscription quota by name. + * x-ms-original-file: 2024-12-01/Quotas_Get.json + */ +async function quotasGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const result = await client.quotas.get("eastus", "ScalableExecution"); + console.log(result); +} + +async function main() { + quotasGet(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasListBySubscriptionSample.ts b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasListBySubscriptionSample.ts new file mode 100644 index 000000000000..560793ab289a --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/src/quotasListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "@azure/arm-playwrighttesting"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list quotas for a given subscription Id. + * + * @summary list quotas for a given subscription Id. + * x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json + */ +async function quotasListBySubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzurePlaywrightServiceClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.quotas.listBySubscription("eastus")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + quotasListBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/tsconfig.json b/sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/tsconfig.json similarity index 100% rename from sdk/playwrighttesting/arm-playwrighttesting/samples/v1-beta/typescript/tsconfig.json rename to sdk/playwrighttesting/arm-playwrighttesting/samples/v1/typescript/tsconfig.json diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/api/accountQuotas/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/api/accountQuotas/index.ts new file mode 100644 index 000000000000..7c7c6ca7ccb1 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/api/accountQuotas/index.ts @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AccountQuotasGetOptionalParams, + AccountQuotasListByAccountOptionalParams, + AzurePlaywrightServiceContext as Client, +} from "../index.js"; +import { + AccountQuota, + accountQuotaDeserializer, + QuotaNames, + _AccountQuotaListResult, + _accountQuotaListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _accountQuotasGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + quotaName: QuotaNames, + options: AccountQuotasGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}", + subscriptionId, + resourceGroupName, + accountName, + quotaName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _accountQuotasGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return accountQuotaDeserializer(result.body); +} + +/** Get quota by name for an account. */ +export async function accountQuotasGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + quotaName: QuotaNames, + options: AccountQuotasGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _accountQuotasGetSend( + context, + subscriptionId, + resourceGroupName, + accountName, + quotaName, + options, + ); + return _accountQuotasGetDeserialize(result); +} + +export function _accountQuotasListByAccountSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + options: AccountQuotasListByAccountOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas", + subscriptionId, + resourceGroupName, + accountName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _accountQuotasListByAccountDeserialize( + result: PathUncheckedResponse, +): Promise<_AccountQuotaListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _accountQuotaListResultDeserializer(result.body); +} + +/** List quotas for a given account. */ +export function accountQuotasListByAccount( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + options: AccountQuotasListByAccountOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _accountQuotasListByAccountSend( + context, + subscriptionId, + resourceGroupName, + accountName, + options, + ), + _accountQuotasListByAccountDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/api/accounts/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/api/accounts/index.ts new file mode 100644 index 000000000000..241e586f02a3 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/api/accounts/index.ts @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AccountsCheckNameAvailabilityOptionalParams, + AccountsCreateOrUpdateOptionalParams, + AccountsDeleteOptionalParams, + AccountsGetOptionalParams, + AccountsListByResourceGroupOptionalParams, + AccountsListBySubscriptionOptionalParams, + AccountsUpdateOptionalParams, + AzurePlaywrightServiceContext as Client, +} from "../index.js"; +import { + Account, + accountSerializer, + accountDeserializer, + AccountUpdate, + accountUpdateSerializer, + _AccountListResult, + _accountListResultDeserializer, + CheckNameAvailabilityRequest, + checkNameAvailabilityRequestSerializer, + CheckNameAvailabilityResponse, + checkNameAvailabilityResponseDeserializer, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _accountsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + options: AccountsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + subscriptionId, + resourceGroupName, + accountName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _accountsGetDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return accountDeserializer(result.body); +} + +/** Get a Account */ +export async function accountsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + options: AccountsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _accountsGetSend( + context, + subscriptionId, + resourceGroupName, + accountName, + options, + ); + return _accountsGetDeserialize(result); +} + +export function _accountsCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + resource: Account, + options: AccountsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + subscriptionId, + resourceGroupName, + accountName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: accountSerializer(resource), + }); +} + +export async function _accountsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return accountDeserializer(result.body); +} + +/** Create a Account */ +export function accountsCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + resource: Account, + options: AccountsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Account> { + return getLongRunningPoller(context, _accountsCreateOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _accountsCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + accountName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, Account>; +} + +export function _accountsUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + properties: AccountUpdate, + options: AccountsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + subscriptionId, + resourceGroupName, + accountName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: accountUpdateSerializer(properties), + }); +} + +export async function _accountsUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return accountDeserializer(result.body); +} + +/** Update a Account */ +export async function accountsUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + properties: AccountUpdate, + options: AccountsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _accountsUpdateSend( + context, + subscriptionId, + resourceGroupName, + accountName, + properties, + options, + ); + return _accountsUpdateDeserialize(result); +} + +export function _accountsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + options: AccountsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + subscriptionId, + resourceGroupName, + accountName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _accountsDeleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a Account */ +export function accountsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + accountName: string, + options: AccountsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _accountsDeleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _accountsDeleteSend(context, subscriptionId, resourceGroupName, accountName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _accountsListByResourceGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: AccountsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts", + subscriptionId, + resourceGroupName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _accountsListByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_AccountListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _accountListResultDeserializer(result.body); +} + +/** List Account resources by resource group */ +export function accountsListByResourceGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: AccountsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _accountsListByResourceGroupSend(context, subscriptionId, resourceGroupName, options), + _accountsListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _accountsListBySubscriptionSend( + context: Client, + subscriptionId: string, + options: AccountsListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts", + subscriptionId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _accountsListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_AccountListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _accountListResultDeserializer(result.body); +} + +/** List Account resources by subscription ID */ +export function accountsListBySubscription( + context: Client, + subscriptionId: string, + options: AccountsListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _accountsListBySubscriptionSend(context, subscriptionId, options), + _accountsListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _accountsCheckNameAvailabilitySend( + context: Client, + subscriptionId: string, + body: CheckNameAvailabilityRequest, + options: AccountsCheckNameAvailabilityOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability", + subscriptionId, + ) + .post({ + ...operationOptionsToRequestParameters(options), + body: checkNameAvailabilityRequestSerializer(body), + }); +} + +export async function _accountsCheckNameAvailabilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return checkNameAvailabilityResponseDeserializer(result.body); +} + +/** Adds check global name availability operation, normally used if a resource name must be globally unique. */ +export async function accountsCheckNameAvailability( + context: Client, + subscriptionId: string, + body: CheckNameAvailabilityRequest, + options: AccountsCheckNameAvailabilityOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _accountsCheckNameAvailabilitySend(context, subscriptionId, body, options); + return _accountsCheckNameAvailabilityDeserialize(result); +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/api/azurePlaywrightServiceContext.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/api/azurePlaywrightServiceContext.ts new file mode 100644 index 000000000000..8315978e2b15 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/api/azurePlaywrightServiceContext.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { KnownVersions } from "../models/models.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +/** Microsoft.AzurePlaywrightService Resource Provider Management API. */ +export interface AzurePlaywrightServiceContext extends Client {} + +/** Optional parameters for the client. */ +export interface AzurePlaywrightServiceClientOptionalParams extends ClientOptions { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion?: string; +} + +/** Microsoft.AzurePlaywrightService Resource Provider Management API. */ +export function createAzurePlaywrightService( + credential: TokenCredential, + options: AzurePlaywrightServiceClientOptionalParams = {}, +): AzurePlaywrightServiceContext { + const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-arm-playwrighttesting/1.0.0`; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` + : `azsdk-js-api ${userAgentInfo}`; + const { apiVersion: _, ...updatedOptions } = { + ...options, + userAgentOptions: { userAgentPrefix }, + loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, + credentials: { + scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`], + }, + }; + const clientContext = getClient(endpointUrl, credential, updatedOptions); + clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + const apiVersion = options.apiVersion ?? "2024-12-01"; + clientContext.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version")) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + return clientContext; +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/api/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/api/index.ts new file mode 100644 index 000000000000..c0f08c233140 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/api/index.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + createAzurePlaywrightService, + AzurePlaywrightServiceContext, + AzurePlaywrightServiceClientOptionalParams, +} from "./azurePlaywrightServiceContext.js"; +export { + OperationsListOptionalParams, + AccountsGetOptionalParams, + AccountsCreateOrUpdateOptionalParams, + AccountsUpdateOptionalParams, + AccountsDeleteOptionalParams, + AccountsListByResourceGroupOptionalParams, + AccountsListBySubscriptionOptionalParams, + AccountsCheckNameAvailabilityOptionalParams, + QuotasGetOptionalParams, + QuotasListBySubscriptionOptionalParams, + AccountQuotasGetOptionalParams, + AccountQuotasListByAccountOptionalParams, +} from "./options.js"; +export { accountQuotasGet, accountQuotasListByAccount } from "./accountQuotas/index.js"; +export { + accountsGet, + accountsCreateOrUpdate, + accountsUpdate, + accountsDelete, + accountsListByResourceGroup, + accountsListBySubscription, + accountsCheckNameAvailability, +} from "./accounts/index.js"; +export { operationsList } from "./operations/index.js"; +export { quotasGet, quotasListBySubscription } from "./quotas/index.js"; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/api/operations/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/api/operations/index.ts new file mode 100644 index 000000000000..bf701f7b6813 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/api/operations/index.ts @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceContext as Client, OperationsListOptionalParams } from "../index.js"; +import { + _OperationListResult, + _operationListResultDeserializer, + Operation, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _operationsListSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path("/providers/Microsoft.AzurePlaywrightService/operations") + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _operationsListDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _operationListResultDeserializer(result.body); +} + +/** List the operations for the provider */ +export function operationsList( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _operationsListSend(context, options), + _operationsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/api/options.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/api/options.ts new file mode 100644 index 000000000000..15c87f9bdab8 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/api/options.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AccountsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AccountsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AccountsUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AccountsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AccountsListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AccountsListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AccountsCheckNameAvailabilityOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface QuotasGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface QuotasListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AccountQuotasGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AccountQuotasListByAccountOptionalParams extends OperationOptions {} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/api/quotas/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/api/quotas/index.ts new file mode 100644 index 000000000000..ec16b6b78950 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/api/quotas/index.ts @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AzurePlaywrightServiceContext as Client, + QuotasGetOptionalParams, + QuotasListBySubscriptionOptionalParams, +} from "../index.js"; +import { + QuotaNames, + Quota, + quotaDeserializer, + _QuotaListResult, + _quotaListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _quotasGetSend( + context: Client, + subscriptionId: string, + location: string, + quotaName: QuotaNames, + options: QuotasGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}", + subscriptionId, + location, + quotaName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _quotasGetDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return quotaDeserializer(result.body); +} + +/** Get subscription quota by name. */ +export async function quotasGet( + context: Client, + subscriptionId: string, + location: string, + quotaName: QuotaNames, + options: QuotasGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _quotasGetSend(context, subscriptionId, location, quotaName, options); + return _quotasGetDeserialize(result); +} + +export function _quotasListBySubscriptionSend( + context: Client, + subscriptionId: string, + location: string, + options: QuotasListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas", + subscriptionId, + location, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _quotasListBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_QuotaListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _quotaListResultDeserializer(result.body); +} + +/** List quotas for a given subscription Id. */ +export function quotasListBySubscription( + context: Client, + subscriptionId: string, + location: string, + options: QuotasListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _quotasListBySubscriptionSend(context, subscriptionId, location, options), + _quotasListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/azurePlaywrightServiceClient.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/azurePlaywrightServiceClient.ts new file mode 100644 index 000000000000..470fd2e66263 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/azurePlaywrightServiceClient.ts @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { getOperationsOperations, OperationsOperations } from "./classic/operations/index.js"; +import { getAccountsOperations, AccountsOperations } from "./classic/accounts/index.js"; +import { getQuotasOperations, QuotasOperations } from "./classic/quotas/index.js"; +import { + getAccountQuotasOperations, + AccountQuotasOperations, +} from "./classic/accountQuotas/index.js"; +import { + createAzurePlaywrightService, + AzurePlaywrightServiceContext, + AzurePlaywrightServiceClientOptionalParams, +} from "./api/index.js"; +import { Pipeline } from "@azure/core-rest-pipeline"; +import { TokenCredential } from "@azure/core-auth"; + +export { AzurePlaywrightServiceClientOptionalParams } from "./api/azurePlaywrightServiceContext.js"; + +export class AzurePlaywrightServiceClient { + private _client: AzurePlaywrightServiceContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; + + /** Microsoft.AzurePlaywrightService Resource Provider Management API. */ + constructor( + credential: TokenCredential, + subscriptionId: string, + options: AzurePlaywrightServiceClientOptionalParams = {}, + ) { + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createAzurePlaywrightService(credential, { + ...options, + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.operations = getOperationsOperations(this._client); + this.accounts = getAccountsOperations(this._client, subscriptionId); + this.quotas = getQuotasOperations(this._client, subscriptionId); + this.accountQuotas = getAccountQuotasOperations(this._client, subscriptionId); + } + + /** The operation groups for Operations */ + public readonly operations: OperationsOperations; + /** The operation groups for Accounts */ + public readonly accounts: AccountsOperations; + /** The operation groups for Quotas */ + public readonly quotas: QuotasOperations; + /** The operation groups for AccountQuotas */ + public readonly accountQuotas: AccountQuotasOperations; +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/classic/accountQuotas/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/accountQuotas/index.ts new file mode 100644 index 000000000000..e264f40249f8 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/accountQuotas/index.ts @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceContext } from "../../api/azurePlaywrightServiceContext.js"; +import { accountQuotasGet, accountQuotasListByAccount } from "../../api/accountQuotas/index.js"; +import { AccountQuota, QuotaNames } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { + AccountQuotasGetOptionalParams, + AccountQuotasListByAccountOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a AccountQuotas operations. */ +export interface AccountQuotasOperations { + /** Get quota by name for an account. */ + get: ( + resourceGroupName: string, + accountName: string, + quotaName: QuotaNames, + options?: AccountQuotasGetOptionalParams, + ) => Promise; + /** List quotas for a given account. */ + listByAccount: ( + resourceGroupName: string, + accountName: string, + options?: AccountQuotasListByAccountOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getAccountQuotas(context: AzurePlaywrightServiceContext, subscriptionId: string) { + return { + get: ( + resourceGroupName: string, + accountName: string, + quotaName: QuotaNames, + options?: AccountQuotasGetOptionalParams, + ) => + accountQuotasGet(context, subscriptionId, resourceGroupName, accountName, quotaName, options), + listByAccount: ( + resourceGroupName: string, + accountName: string, + options?: AccountQuotasListByAccountOptionalParams, + ) => + accountQuotasListByAccount(context, subscriptionId, resourceGroupName, accountName, options), + }; +} + +export function getAccountQuotasOperations( + context: AzurePlaywrightServiceContext, + subscriptionId: string, +): AccountQuotasOperations { + return { + ...getAccountQuotas(context, subscriptionId), + }; +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/classic/accounts/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/accounts/index.ts new file mode 100644 index 000000000000..cfde8e63e651 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/accounts/index.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceContext } from "../../api/azurePlaywrightServiceContext.js"; +import { + accountsGet, + accountsCreateOrUpdate, + accountsUpdate, + accountsDelete, + accountsListByResourceGroup, + accountsListBySubscription, + accountsCheckNameAvailability, +} from "../../api/accounts/index.js"; +import { + Account, + AccountUpdate, + CheckNameAvailabilityRequest, + CheckNameAvailabilityResponse, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + AccountsGetOptionalParams, + AccountsCreateOrUpdateOptionalParams, + AccountsUpdateOptionalParams, + AccountsDeleteOptionalParams, + AccountsListByResourceGroupOptionalParams, + AccountsListBySubscriptionOptionalParams, + AccountsCheckNameAvailabilityOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a Accounts operations. */ +export interface AccountsOperations { + /** Get a Account */ + get: ( + resourceGroupName: string, + accountName: string, + options?: AccountsGetOptionalParams, + ) => Promise; + /** Create a Account */ + createOrUpdate: ( + resourceGroupName: string, + accountName: string, + resource: Account, + options?: AccountsCreateOrUpdateOptionalParams, + ) => PollerLike, Account>; + /** Update a Account */ + update: ( + resourceGroupName: string, + accountName: string, + properties: AccountUpdate, + options?: AccountsUpdateOptionalParams, + ) => Promise; + /** Delete a Account */ + delete: ( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams, + ) => PollerLike, void>; + /** List Account resources by resource group */ + listByResourceGroup: ( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** List Account resources by subscription ID */ + listBySubscription: ( + options?: AccountsListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Adds check global name availability operation, normally used if a resource name must be globally unique. */ + checkNameAvailability: ( + body: CheckNameAvailabilityRequest, + options?: AccountsCheckNameAvailabilityOptionalParams, + ) => Promise; +} + +export function getAccounts(context: AzurePlaywrightServiceContext, subscriptionId: string) { + return { + get: (resourceGroupName: string, accountName: string, options?: AccountsGetOptionalParams) => + accountsGet(context, subscriptionId, resourceGroupName, accountName, options), + createOrUpdate: ( + resourceGroupName: string, + accountName: string, + resource: Account, + options?: AccountsCreateOrUpdateOptionalParams, + ) => + accountsCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + accountName, + resource, + options, + ), + update: ( + resourceGroupName: string, + accountName: string, + properties: AccountUpdate, + options?: AccountsUpdateOptionalParams, + ) => + accountsUpdate(context, subscriptionId, resourceGroupName, accountName, properties, options), + delete: ( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams, + ) => accountsDelete(context, subscriptionId, resourceGroupName, accountName, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams, + ) => accountsListByResourceGroup(context, subscriptionId, resourceGroupName, options), + listBySubscription: (options?: AccountsListBySubscriptionOptionalParams) => + accountsListBySubscription(context, subscriptionId, options), + checkNameAvailability: ( + body: CheckNameAvailabilityRequest, + options?: AccountsCheckNameAvailabilityOptionalParams, + ) => accountsCheckNameAvailability(context, subscriptionId, body, options), + }; +} + +export function getAccountsOperations( + context: AzurePlaywrightServiceContext, + subscriptionId: string, +): AccountsOperations { + return { + ...getAccounts(context, subscriptionId), + }; +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/classic/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/index.ts new file mode 100644 index 000000000000..6c82ea65a801 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/index.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { AccountQuotasOperations } from "./accountQuotas/index.js"; +export { AccountsOperations } from "./accounts/index.js"; +export { OperationsOperations } from "./operations/index.js"; +export { QuotasOperations } from "./quotas/index.js"; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/classic/operations/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/operations/index.ts new file mode 100644 index 000000000000..19f5cc7a7cb1 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/operations/index.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceContext } from "../../api/azurePlaywrightServiceContext.js"; +import { operationsList } from "../../api/operations/index.js"; +import { OperationsListOptionalParams } from "../../api/options.js"; +import { Operation } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Operations operations. */ +export interface OperationsOperations { + /** List the operations for the provider */ + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; +} + +export function getOperations(context: AzurePlaywrightServiceContext) { + return { + list: (options?: OperationsListOptionalParams) => operationsList(context, options), + }; +} + +export function getOperationsOperations( + context: AzurePlaywrightServiceContext, +): OperationsOperations { + return { + ...getOperations(context), + }; +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/classic/quotas/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/quotas/index.ts new file mode 100644 index 000000000000..1a6e7279ab36 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/classic/quotas/index.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceContext } from "../../api/azurePlaywrightServiceContext.js"; +import { + QuotasGetOptionalParams, + QuotasListBySubscriptionOptionalParams, +} from "../../api/options.js"; +import { quotasGet, quotasListBySubscription } from "../../api/quotas/index.js"; +import { QuotaNames, Quota } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Quotas operations. */ +export interface QuotasOperations { + /** Get subscription quota by name. */ + get: ( + location: string, + quotaName: QuotaNames, + options?: QuotasGetOptionalParams, + ) => Promise; + /** List quotas for a given subscription Id. */ + listBySubscription: ( + location: string, + options?: QuotasListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; +} + +export function getQuotas(context: AzurePlaywrightServiceContext, subscriptionId: string) { + return { + get: (location: string, quotaName: QuotaNames, options?: QuotasGetOptionalParams) => + quotasGet(context, subscriptionId, location, quotaName, options), + listBySubscription: (location: string, options?: QuotasListBySubscriptionOptionalParams) => + quotasListBySubscription(context, subscriptionId, location, options), + }; +} + +export function getQuotasOperations( + context: AzurePlaywrightServiceContext, + subscriptionId: string, +): QuotasOperations { + return { + ...getQuotas(context, subscriptionId), + }; +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/helpers/serializerHelpers.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/helpers/serializerHelpers.ts new file mode 100644 index 000000000000..7518a16c2ee9 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/helpers/serializerHelpers.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export function serializeRecord( + item: Record, +): Record; +export function serializeRecord( + item: Record, + serializer: (item: T) => R, +): Record; +export function serializeRecord( + item: Record, + serializer?: (item: T) => R, +): Record { + return Object.keys(item).reduce( + (acc, key) => { + if (isSupportedRecordType(item[key])) { + acc[key] = item[key] as any; + } else if (serializer) { + const value = item[key]; + if (value !== undefined) { + acc[key] = serializer(value); + } + } else { + console.warn(`Don't know how to serialize ${item[key]}`); + acc[key] = item[key] as any; + } + return acc; + }, + {} as Record, + ); +} + +function isSupportedRecordType(t: any) { + return ["number", "string", "boolean", "null"].includes(typeof t) || t instanceof Date; +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/index.ts index 75ca25c171aa..b9aa6c8e53fe 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/index.ts +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/index.ts @@ -1,13 +1,72 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. -/// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { PlaywrightTestingClient } from "./playwrightTestingClient"; -export * from "./operationsInterfaces"; +import { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; + +export { AzurePlaywrightServiceClient } from "./azurePlaywrightServiceClient.js"; +export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js"; +export { + AccountQuota, + AccountQuotaProperties, + AccountFreeTrialProperties, + KnownProvisioningState, + ProvisioningState, + KnownQuotaNames, + QuotaNames, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + Quota, + QuotaProperties, + FreeTrialProperties, + KnownFreeTrialState, + FreeTrialState, + KnownOfferingType, + OfferingType, + Account, + AccountProperties, + KnownEnablementStatus, + EnablementStatus, + TrackedResource, + AccountUpdate, + AccountUpdateProperties, + CheckNameAvailabilityRequest, + CheckNameAvailabilityResponse, + KnownCheckNameAvailabilityReason, + CheckNameAvailabilityReason, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + KnownVersions, +} from "./models/index.js"; +export { + AzurePlaywrightServiceClientOptionalParams, + OperationsListOptionalParams, + AccountsGetOptionalParams, + AccountsCreateOrUpdateOptionalParams, + AccountsUpdateOptionalParams, + AccountsDeleteOptionalParams, + AccountsListByResourceGroupOptionalParams, + AccountsListBySubscriptionOptionalParams, + AccountsCheckNameAvailabilityOptionalParams, + QuotasGetOptionalParams, + QuotasListBySubscriptionOptionalParams, + AccountQuotasGetOptionalParams, + AccountQuotasListByAccountOptionalParams, +} from "./api/index.js"; +export { + AccountQuotasOperations, + AccountsOperations, + OperationsOperations, + QuotasOperations, +} from "./classic/index.js"; +export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/logger.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/logger.ts new file mode 100644 index 000000000000..8dfd2b1dad1d --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("arm-playwrighttesting"); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/lroImpl.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/lroImpl.ts deleted file mode 100644 index 52f6eaacfb83..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/lroImpl.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { AbortSignalLike } from "@azure/abort-controller"; -import { LongRunningOperation, LroResponse } from "@azure/core-lro"; - -export function createLroSpec(inputs: { - sendOperationFn: (args: any, spec: any) => Promise>; - args: Record; - spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record; -}): LongRunningOperation { - const { args, spec, sendOperationFn } = inputs; - return { - requestMethod: spec.httpMethod, - requestPath: spec.path!, - sendInitialRequest: () => sendOperationFn(args, spec), - sendPollRequest: ( - path: string, - options?: { abortSignal?: AbortSignalLike } - ) => { - const { requestBody, ...restSpec } = spec; - return sendOperationFn(args, { - ...restSpec, - httpMethod: "GET", - path, - abortSignal: options?.abortSignal - }); - } - }; -} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/models/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/models/index.ts index 6d578daa7def..af073ca53ded 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/models/index.ts +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/models/index.ts @@ -1,549 +1,42 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ -export interface OperationListResult { - /** - * List of operations supported by the resource provider - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Operation[]; - /** - * URL to get the next set of operation list results (if there are any). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Details of a REST API operation, returned from the Resource Provider Operations API */ -export interface Operation { - /** - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDataAction?: boolean; - /** Localized display information for this particular operation. */ - display?: OperationDisplay; - /** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionType?: ActionType; -} - -/** Localized display information for this particular operation. */ -export interface OperationDisplay { - /** - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: string; - /** - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; - /** - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** The response of a Account list operation. */ -export interface AccountListResult { - /** The Account items on this page */ - value: Account[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** Account properties */ -export interface AccountProperties { - /** - * The Playwright testing dashboard URI for the account resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly dashboardUri?: string; - /** This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. */ - regionalAffinity?: EnablementStatus; - /** When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. */ - scalableExecution?: EnablementStatus; - /** When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. */ - reporting?: EnablementStatus; - /** - * The status of the last operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** The response of a Quota list operation. */ -export interface QuotaListResult { - /** The Quota items on this page */ - value: Quota[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** Quota properties */ -export interface QuotaProperties { - /** The free-trial quota. */ - freeTrial?: FreeTrialProperties; - /** - * The status of the last operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** The free-trial properties */ -export interface FreeTrialProperties { - /** - * The playwright account id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly accountId: string; - /** - * The free-trial createdAt utcDateTime. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAt: Date; - /** - * The free-trial expiryAt utcDateTime. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expiryAt: Date; - /** - * The free-trial allocated limit value eg. allocated free minutes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly allocatedValue: number; - /** - * The free-trial used value eg. used free minutes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly usedValue: number; - /** - * The free-trial percentage used. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly percentageUsed: number; - /** - * The free-trial state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly state: FreeTrialState; -} - -/** The type used for update operations of the Account. */ -export interface AccountUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The updatable properties of the Account. */ - properties?: AccountUpdateProperties; -} - -/** The updatable properties of the Account. */ -export interface AccountUpdateProperties { - /** This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. */ - regionalAffinity?: EnablementStatus; - /** When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. */ - scalableExecution?: EnablementStatus; - /** When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. */ - reporting?: EnablementStatus; -} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - -/** An account resource */ -export interface Account extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: AccountProperties; -} - -/** A quota resource */ -export interface Quota extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: QuotaProperties; -} - -/** Defines headers for Accounts_createOrUpdate operation. */ -export interface AccountsCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Accounts_delete operation. */ -export interface AccountsDeleteHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; -} - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** User */ - User = "user", - /** System */ - System = "system", - /** UserSystem */ - UserSystem = "user,system" -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** \ - * **user,system** - */ -export type Origin = string; - -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** Internal */ - Internal = "Internal" -} - -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal** - */ -export type ActionType = string; - -/** Known values of {@link EnablementStatus} that the service accepts. */ -export enum KnownEnablementStatus { - /** The feature is Enabled. */ - Enabled = "Enabled", - /** The feature is Disabled. */ - Disabled = "Disabled" -} - -/** - * Defines values for EnablementStatus. \ - * {@link KnownEnablementStatus} can be used interchangeably with EnablementStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: The feature is Enabled. \ - * **Disabled**: The feature is Disabled. - */ -export type EnablementStatus = string; - -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** Deletion in progress */ - Deleting = "Deleting", - /** Change accepted for processing */ - Accepted = "Accepted" -} - -/** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Deleting**: Deletion in progress \ - * **Accepted**: Change accepted for processing - */ -export type ProvisioningState = string; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - -/** Known values of {@link FreeTrialState} that the service accepts. */ -export enum KnownFreeTrialState { - /** The free-trial is Active. */ - Active = "Active", - /** The free-trial is Expired. */ - Expired = "Expired" -} - -/** - * Defines values for FreeTrialState. \ - * {@link KnownFreeTrialState} can be used interchangeably with FreeTrialState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Active**: The free-trial is Active. \ - * **Expired**: The free-trial is Expired. - */ -export type FreeTrialState = string; - -/** Known values of {@link QuotaNames} that the service accepts. */ -export enum KnownQuotaNames { - /** The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. */ - ScalableExecution = "ScalableExecution" -} - -/** - * Defines values for QuotaNames. \ - * {@link KnownQuotaNames} can be used interchangeably with QuotaNames, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ScalableExecution**: The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - */ -export type QuotaNames = string; - -/** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; - -/** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; - -/** Optional parameters. */ -export interface AccountsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type AccountsListBySubscriptionResponse = AccountListResult; - -/** Optional parameters. */ -export interface AccountsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type AccountsListByResourceGroupResponse = AccountListResult; - -/** Optional parameters. */ -export interface AccountsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AccountsGetResponse = Account; - -/** Optional parameters. */ -export interface AccountsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type AccountsCreateOrUpdateResponse = Account; - -/** Optional parameters. */ -export interface AccountsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type AccountsUpdateResponse = Account; - -/** Optional parameters. */ -export interface AccountsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface AccountsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type AccountsListBySubscriptionNextResponse = AccountListResult; - -/** Optional parameters. */ -export interface AccountsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type AccountsListByResourceGroupNextResponse = AccountListResult; - -/** Optional parameters. */ -export interface QuotasListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type QuotasListBySubscriptionResponse = QuotaListResult; - -/** Optional parameters. */ -export interface QuotasGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type QuotasGetResponse = Quota; - -/** Optional parameters. */ -export interface QuotasListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type QuotasListBySubscriptionNextResponse = QuotaListResult; - -/** Optional parameters. */ -export interface PlaywrightTestingClientOptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + AccountQuota, + AccountQuotaProperties, + AccountFreeTrialProperties, + KnownProvisioningState, + ProvisioningState, + KnownQuotaNames, + QuotaNames, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + Quota, + QuotaProperties, + FreeTrialProperties, + KnownFreeTrialState, + FreeTrialState, + KnownOfferingType, + OfferingType, + Account, + AccountProperties, + KnownEnablementStatus, + EnablementStatus, + TrackedResource, + AccountUpdate, + AccountUpdateProperties, + CheckNameAvailabilityRequest, + CheckNameAvailabilityResponse, + KnownCheckNameAvailabilityReason, + CheckNameAvailabilityReason, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + KnownVersions, +} from "./models.js"; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/models/mappers.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/models/mappers.ts deleted file mode 100644 index 3aef08e4bc08..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/models/mappers.ts +++ /dev/null @@ -1,640 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, - type: { - name: "Boolean" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String" - } - }, - actionType: { - serializedName: "actionType", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - readOnly: true, - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String" - } - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } -}; - -export const AccountListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccountListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Account" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const AccountProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccountProperties", - modelProperties: { - dashboardUri: { - serializedName: "dashboardUri", - readOnly: true, - type: { - name: "String" - } - }, - regionalAffinity: { - serializedName: "regionalAffinity", - type: { - name: "String" - } - }, - scalableExecution: { - serializedName: "scalableExecution", - type: { - name: "String" - } - }, - reporting: { - serializedName: "reporting", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - } - } - } -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } - } - } - } -}; - -export const QuotaListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Quota" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const QuotaProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaProperties", - modelProperties: { - freeTrial: { - serializedName: "freeTrial", - type: { - name: "Composite", - className: "FreeTrialProperties" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const FreeTrialProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FreeTrialProperties", - modelProperties: { - accountId: { - serializedName: "accountId", - required: true, - readOnly: true, - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - required: true, - readOnly: true, - type: { - name: "DateTime" - } - }, - expiryAt: { - serializedName: "expiryAt", - required: true, - readOnly: true, - type: { - name: "DateTime" - } - }, - allocatedValue: { - serializedName: "allocatedValue", - required: true, - readOnly: true, - type: { - name: "Number" - } - }, - usedValue: { - serializedName: "usedValue", - required: true, - readOnly: true, - type: { - name: "Number" - } - }, - percentageUsed: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 - }, - serializedName: "percentageUsed", - required: true, - readOnly: true, - type: { - name: "Number" - } - }, - state: { - serializedName: "state", - required: true, - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const AccountUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccountUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AccountUpdateProperties" - } - } - } - } -}; - -export const AccountUpdateProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccountUpdateProperties", - modelProperties: { - regionalAffinity: { - serializedName: "regionalAffinity", - type: { - name: "String" - } - }, - scalableExecution: { - serializedName: "scalableExecution", - type: { - name: "String" - } - }, - reporting: { - serializedName: "reporting", - type: { - name: "String" - } - } - } - } -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const Account: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Account", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AccountProperties" - } - } - } - } -}; - -export const Quota: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Quota", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "QuotaProperties" - } - } - } - } -}; - -export const AccountsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccountsCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number" - } - } - } - } -}; - -export const AccountsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccountsDeleteHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - } - } - } -}; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/models/models.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/models/models.ts new file mode 100644 index 000000000000..c5f364fa35d9 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/models/models.ts @@ -0,0 +1,684 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** A quota resource for a Playwright service account. */ +export interface AccountQuota extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: AccountQuotaProperties; +} + +export function accountQuotaDeserializer(item: any): AccountQuota { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : accountQuotaPropertiesDeserializer(item["properties"]), + }; +} + +/** The Playwright service account quota resource properties. */ +export interface AccountQuotaProperties { + /** The Playwright service account quota resource free-trial properties. */ + freeTrial?: AccountFreeTrialProperties; + /** The status of the last operation. */ + readonly provisioningState?: ProvisioningState; +} + +export function accountQuotaPropertiesDeserializer(item: any): AccountQuotaProperties { + return { + freeTrial: !item["freeTrial"] + ? item["freeTrial"] + : accountFreeTrialPropertiesDeserializer(item["freeTrial"]), + provisioningState: item["provisioningState"], + }; +} + +/** The Playwright service account quota resource free-trial properties. */ +export interface AccountFreeTrialProperties { + /** The free-trial createdAt utcDateTime. */ + readonly createdAt: Date; + /** The free-trial expiryAt utcDateTime. */ + readonly expiryAt: Date; + /** The free-trial allocated limit value eg. allocated free minutes. */ + readonly allocatedValue: number; + /** The free-trial used value eg. used free minutes. */ + readonly usedValue: number; + /** The free-trial percentage used. */ + readonly percentageUsed: number; +} + +export function accountFreeTrialPropertiesDeserializer(item: any): AccountFreeTrialProperties { + return { + createdAt: new Date(item["createdAt"]), + expiryAt: new Date(item["expiryAt"]), + allocatedValue: item["allocatedValue"], + usedValue: item["usedValue"], + percentageUsed: item["percentageUsed"], + }; +} + +/** The status of the current operation. */ +export enum KnownProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** Creation in progress.. */ + Creating = "Creating", + /** Deletion in progress.. */ + Deleting = "Deleting", + /** Change accepted for processing.. */ + Accepted = "Accepted", +} + +/** + * The status of the current operation. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Creating**: Creation in progress.. \ + * **Deleting**: Deletion in progress.. \ + * **Accepted**: Change accepted for processing.. + */ +export type ProvisioningState = string; + +/** The enum for quota name. */ +export enum KnownQuotaNames { + /** The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. */ + ScalableExecution = "ScalableExecution", + /** The quota details for reporting feature. When enabled, Playwright client will be able to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. */ + Reporting = "Reporting", +} + +/** + * The enum for quota name. \ + * {@link KnownQuotaNames} can be used interchangeably with QuotaNames, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ScalableExecution**: The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. \ + * **Reporting**: The quota details for reporting feature. When enabled, Playwright client will be able to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + */ +export type QuotaNames = string; + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +export function proxyResourceDeserializer(item: any): ProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */ + readonly id?: string; + /** The name of the resource */ + readonly name?: string; + /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ + readonly type?: string; + /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemData; +} + +export function resourceSerializer(item: Resource): any { + return item; +} + +export function resourceDeserializer(item: any): Resource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +export function systemDataDeserializer(item: any): SystemData { + return { + createdBy: item["createdBy"], + createdByType: item["createdByType"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + lastModifiedBy: item["lastModifiedBy"], + lastModifiedByType: item["lastModifiedByType"], + lastModifiedAt: !item["lastModifiedAt"] + ? item["lastModifiedAt"] + : new Date(item["lastModifiedAt"]), + }; +} + +/** The kind of entity that created the resource. */ +export enum KnownCreatedByType { + /** The entity was created by a user. */ + User = "User", + /** The entity was created by an application. */ + Application = "Application", + /** The entity was created by a managed identity. */ + ManagedIdentity = "ManagedIdentity", + /** The entity was created by a key. */ + Key = "Key", +} + +/** + * The kind of entity that created the resource. \ + * {@link KnowncreatedByType} can be used interchangeably with createdByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User**: The entity was created by a user. \ + * **Application**: The entity was created by an application. \ + * **ManagedIdentity**: The entity was created by a managed identity. \ + * **Key**: The entity was created by a key. + */ +export type CreatedByType = string; + +/** The response of a AccountQuota list operation. */ +export interface _AccountQuotaListResult { + /** The AccountQuota items on this page */ + value: AccountQuota[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _accountQuotaListResultDeserializer(item: any): _AccountQuotaListResult { + return { + value: accountQuotaArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function accountQuotaArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return accountQuotaDeserializer(item); + }); +} + +/** A subscription quota resource. */ +export interface Quota extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: QuotaProperties; +} + +export function quotaDeserializer(item: any): Quota { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : quotaPropertiesDeserializer(item["properties"]), + }; +} + +/** The subscription quota resource properties. */ +export interface QuotaProperties { + /** The subscription quota resource free-trial properties. */ + freeTrial?: FreeTrialProperties; + /** Indicates the offering type for the subscription. */ + readonly offeringType?: OfferingType; + /** The status of the last operation. */ + readonly provisioningState?: ProvisioningState; +} + +export function quotaPropertiesDeserializer(item: any): QuotaProperties { + return { + freeTrial: !item["freeTrial"] + ? item["freeTrial"] + : freeTrialPropertiesDeserializer(item["freeTrial"]), + offeringType: item["offeringType"], + provisioningState: item["provisioningState"], + }; +} + +/** The subscription quota resource free-trial properties. */ +export interface FreeTrialProperties { + /** The Playwright service account id. */ + readonly accountId: string; + /** The free-trial state. */ + readonly state: FreeTrialState; +} + +export function freeTrialPropertiesDeserializer(item: any): FreeTrialProperties { + return { + accountId: item["accountId"], + state: item["state"], + }; +} + +/** The free-trial state. */ +export enum KnownFreeTrialState { + /** The free-trial is Active. */ + Active = "Active", + /** The free-trial is Expired. */ + Expired = "Expired", + /** The free-trial is Not Eligible. */ + NotEligible = "NotEligible", + /** The free-trial is Not Registered. */ + NotRegistered = "NotRegistered", +} + +/** + * The free-trial state. \ + * {@link KnownFreeTrialState} can be used interchangeably with FreeTrialState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Active**: The free-trial is Active. \ + * **Expired**: The free-trial is Expired. \ + * **NotEligible**: The free-trial is Not Eligible. \ + * **NotRegistered**: The free-trial is Not Registered. + */ +export type FreeTrialState = string; + +/** Offering type state. */ +export enum KnownOfferingType { + /** The offeringType is NotApplicable. */ + NotApplicable = "NotApplicable", + /** The offeringType is PrivatePreview. */ + PrivatePreview = "PrivatePreview", + /** The offeringType is PublicPreview. */ + PublicPreview = "PublicPreview", + /** The offeringType is GeneralAvailability. */ + GeneralAvailability = "GeneralAvailability", +} + +/** + * Offering type state. \ + * {@link KnownOfferingType} can be used interchangeably with OfferingType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotApplicable**: The offeringType is NotApplicable. \ + * **PrivatePreview**: The offeringType is PrivatePreview. \ + * **PublicPreview**: The offeringType is PublicPreview. \ + * **GeneralAvailability**: The offeringType is GeneralAvailability. + */ +export type OfferingType = string; + +/** The response of a Quota list operation. */ +export interface _QuotaListResult { + /** The Quota items on this page */ + value: Quota[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _quotaListResultDeserializer(item: any): _QuotaListResult { + return { + value: quotaArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function quotaArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return quotaDeserializer(item); + }); +} + +/** A Playwright service account resource. */ +export interface Account extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: AccountProperties; +} + +export function accountSerializer(item: Account): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : accountPropertiesSerializer(item["properties"]), + }; +} + +export function accountDeserializer(item: any): Account { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : accountPropertiesDeserializer(item["properties"]), + }; +} + +/** Account resource properties. */ +export interface AccountProperties { + /** The Playwright testing dashboard URI for the account resource. */ + readonly dashboardUri?: string; + /** This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. */ + regionalAffinity?: EnablementStatus; + /** When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. */ + scalableExecution?: EnablementStatus; + /** When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. */ + reporting?: EnablementStatus; + /** When enabled, this feature allows the workspace to use local auth(through access key) for authentication of test runs. */ + localAuth?: EnablementStatus; + /** The status of the last operation. */ + readonly provisioningState?: ProvisioningState; +} + +export function accountPropertiesSerializer(item: AccountProperties): any { + return { + regionalAffinity: item["regionalAffinity"], + scalableExecution: item["scalableExecution"], + reporting: item["reporting"], + localAuth: item["localAuth"], + }; +} + +export function accountPropertiesDeserializer(item: any): AccountProperties { + return { + dashboardUri: item["dashboardUri"], + regionalAffinity: item["regionalAffinity"], + scalableExecution: item["scalableExecution"], + reporting: item["reporting"], + localAuth: item["localAuth"], + provisioningState: item["provisioningState"], + }; +} + +/** The enablement status of a feature. */ +export enum KnownEnablementStatus { + /** The feature is Enabled. */ + Enabled = "Enabled", + /** The feature is Disabled. */ + Disabled = "Disabled", +} + +/** + * The enablement status of a feature. \ + * {@link KnownEnablementStatus} can be used interchangeably with EnablementStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: The feature is Enabled. \ + * **Disabled**: The feature is Disabled. + */ +export type EnablementStatus = string; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location: string; +} + +export function trackedResourceSerializer(item: TrackedResource): any { + return { tags: item["tags"], location: item["location"] }; +} + +export function trackedResourceDeserializer(item: any): TrackedResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + tags: item["tags"], + location: item["location"], + }; +} + +/** The type used for update operations of the Account. */ +export interface AccountUpdate { + /** Resource tags. */ + tags?: Record; + /** The resource-specific properties for this resource. */ + properties?: AccountUpdateProperties; +} + +export function accountUpdateSerializer(item: AccountUpdate): any { + return { + tags: item["tags"], + properties: !item["properties"] + ? item["properties"] + : accountUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** The updatable properties of the Account. */ +export interface AccountUpdateProperties { + /** This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. */ + regionalAffinity?: EnablementStatus; + /** When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. */ + scalableExecution?: EnablementStatus; + /** When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. */ + reporting?: EnablementStatus; + /** When enabled, this feature allows the workspace to use local auth(through access key) for authentication of test runs. */ + localAuth?: EnablementStatus; +} + +export function accountUpdatePropertiesSerializer(item: AccountUpdateProperties): any { + return { + regionalAffinity: item["regionalAffinity"], + scalableExecution: item["scalableExecution"], + reporting: item["reporting"], + localAuth: item["localAuth"], + }; +} + +/** The response of a Account list operation. */ +export interface _AccountListResult { + /** The Account items on this page */ + value: Account[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _accountListResultDeserializer(item: any): _AccountListResult { + return { + value: accountArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function accountArraySerializer(result: Array): any[] { + return result.map((item) => { + return accountSerializer(item); + }); +} + +export function accountArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return accountDeserializer(item); + }); +} + +/** The check availability request body. */ +export interface CheckNameAvailabilityRequest { + /** The name of the resource for which availability needs to be checked. */ + name?: string; + /** The resource type. */ + type?: string; +} + +export function checkNameAvailabilityRequestSerializer(item: CheckNameAvailabilityRequest): any { + return { name: item["name"], type: item["type"] }; +} + +/** The check availability result. */ +export interface CheckNameAvailabilityResponse { + /** Indicates if the resource name is available. */ + nameAvailable?: boolean; + /** The reason why the given name is not available. */ + reason?: CheckNameAvailabilityReason; + /** Detailed reason why the given name is not available. */ + message?: string; +} + +export function checkNameAvailabilityResponseDeserializer( + item: any, +): CheckNameAvailabilityResponse { + return { + nameAvailable: item["nameAvailable"], + reason: item["reason"], + message: item["message"], + }; +} + +/** Possible reasons for a name not being available. */ +export enum KnownCheckNameAvailabilityReason { + /** Name is invalid. */ + Invalid = "Invalid", + /** Name already exists. */ + AlreadyExists = "AlreadyExists", +} + +/** + * Possible reasons for a name not being available. \ + * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid**: Name is invalid. \ + * **AlreadyExists**: Name already exists. + */ +export type CheckNameAvailabilityReason = string; + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface _OperationListResult { + /** The Operation items on this page */ + value: Operation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _operationListResultDeserializer(item: any): _OperationListResult { + return { + value: operationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ + readonly name?: string; + /** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + readonly display?: OperationDisplay; + /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ + readonly origin?: Origin; + /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ + actionType?: ActionType; +} + +export function operationDeserializer(item: any): Operation { + return { + name: item["name"], + isDataAction: item["isDataAction"], + display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + origin: item["origin"], + actionType: item["actionType"], + }; +} + +/** Localized display information for and operation. */ +export interface OperationDisplay { + /** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ + readonly provider?: string; + /** The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ + readonly resource?: string; + /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ + readonly operation?: string; + /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ + readonly description?: string; +} + +export function operationDisplayDeserializer(item: any): OperationDisplay { + return { + provider: item["provider"], + resource: item["resource"], + operation: item["operation"], + description: item["description"], + }; +} + +/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ +export enum KnownOrigin { + /** Indicates the operation is initiated by a user. */ + User = "user", + /** Indicates the operation is initiated by a system. */ + System = "system", + /** Indicates the operation is initiated by a user or system. */ + UserSystem = "user,system", +} + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user**: Indicates the operation is initiated by a user. \ + * **system**: Indicates the operation is initiated by a system. \ + * **user,system**: Indicates the operation is initiated by a user or system. + */ +export type Origin = string; + +/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +export enum KnownActionType { + /** Actions are for internal-only APIs. */ + Internal = "Internal", +} + +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal**: Actions are for internal-only APIs. + */ +export type ActionType = string; + +/** Microsoft.AzurePlaywrightService Management API Versions. */ +export enum KnownVersions { + /** 2024-12-01 version */ + "V2024-12-01" = "2024-12-01", +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/models/parameters.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/models/parameters.ts deleted file mode 100644 index 7ad813f01c90..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/models/parameters.ts +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationParameter, - OperationURLParameter, - OperationQueryParameter -} from "@azure/core-client"; -import { - Account as AccountMapper, - AccountUpdate as AccountUpdateMapper -} from "../models/mappers"; - -export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String" - } - } -}; - -export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2023-10-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "subscriptionId", - required: true, - type: { - name: "String" - } - } -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1 - }, - serializedName: "resourceGroupName", - required: true, - type: { - name: "String" - } - } -}; - -export const name: OperationURLParameter = { - parameterPath: "name", - mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$"), - MaxLength: 64, - MinLength: 3 - }, - serializedName: "name", - required: true, - type: { - name: "String" - } - } -}; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" - } - } -}; - -export const resource: OperationParameter = { - parameterPath: "resource", - mapper: AccountMapper -}; - -export const properties: OperationParameter = { - parameterPath: "properties", - mapper: AccountUpdateMapper -}; - -export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - serializedName: "location", - required: true, - type: { - name: "String" - } - } -}; - -export const name1: OperationURLParameter = { - parameterPath: "name", - mapper: { - serializedName: "name", - required: true, - type: { - name: "String" - } - } -}; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/operations/accounts.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/operations/accounts.ts deleted file mode 100644 index 75ff86897593..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/operations/accounts.ts +++ /dev/null @@ -1,630 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Accounts } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { PlaywrightTestingClient } from "../playwrightTestingClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - Account, - AccountsListBySubscriptionNextOptionalParams, - AccountsListBySubscriptionOptionalParams, - AccountsListBySubscriptionResponse, - AccountsListByResourceGroupNextOptionalParams, - AccountsListByResourceGroupOptionalParams, - AccountsListByResourceGroupResponse, - AccountsGetOptionalParams, - AccountsGetResponse, - AccountsCreateOrUpdateOptionalParams, - AccountsCreateOrUpdateResponse, - AccountUpdate, - AccountsUpdateOptionalParams, - AccountsUpdateResponse, - AccountsDeleteOptionalParams, - AccountsListBySubscriptionNextResponse, - AccountsListByResourceGroupNextResponse -} from "../models"; - -/// -/** Class containing Accounts operations. */ -export class AccountsImpl implements Accounts { - private readonly client: PlaywrightTestingClient; - - /** - * Initialize a new instance of the class Accounts class. - * @param client Reference to the service client - */ - constructor(client: PlaywrightTestingClient) { - this.client = client; - } - - /** - * List Account resources by subscription ID - * @param options The options parameters. - */ - public listBySubscription( - options?: AccountsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: AccountsListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AccountsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: AccountsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List Account resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AccountsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * List Account resources by subscription ID - * @param options The options parameters. - */ - private _listBySubscription( - options?: AccountsListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * List Account resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Get a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param options The options parameters. - */ - get( - resourceGroupName: string, - name: string, - options?: AccountsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, name, options }, - getOperationSpec - ); - } - - /** - * Create a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - name: string, - resource: Account, - options?: AccountsCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - AccountsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, name, resource, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - AccountsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Create a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - name: string, - resource: Account, - options?: AccountsCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - name, - resource, - options - ); - return poller.pollUntilDone(); - } - - /** - * Update a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - name: string, - properties: AccountUpdate, - options?: AccountsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, name, properties, options }, - updateOperationSpec - ); - } - - /** - * Delete a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - name: string, - options?: AccountsDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, name, options }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - name: string, - options?: AccountsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete(resourceGroupName, name, options); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: AccountsListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: AccountsListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccountListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccountListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Account - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Account - }, - 201: { - bodyMapper: Mappers.Account - }, - 202: { - bodyMapper: Mappers.Account - }, - 204: { - bodyMapper: Mappers.Account - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.resource, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Account - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.properties, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccountListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccountListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/operations/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/operations/index.ts deleted file mode 100644 index e8eae0a6b68b..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/operations/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./operations"; -export * from "./accounts"; -export * from "./quotas"; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/operations/operations.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/operations/operations.ts deleted file mode 100644 index d22feda4a79d..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/operations/operations.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { PlaywrightTestingClient } from "../playwrightTestingClient"; -import { - Operation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse -} from "../models"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: PlaywrightTestingClient; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: PlaywrightTestingClient) { - this.client = client; - } - - /** - * List the operations for the provider - * @param options The options parameters. - */ - public list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: OperationsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: OperationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: OperationsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * List the operations for the provider - * @param options The options parameters. - */ - private _list( - options?: OperationsListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: OperationsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.AzurePlaywrightService/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/operations/quotas.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/operations/quotas.ts deleted file mode 100644 index 5cd4ff68a161..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/operations/quotas.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Quotas } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { PlaywrightTestingClient } from "../playwrightTestingClient"; -import { - Quota, - QuotasListBySubscriptionNextOptionalParams, - QuotasListBySubscriptionOptionalParams, - QuotasListBySubscriptionResponse, - QuotaNames, - QuotasGetOptionalParams, - QuotasGetResponse, - QuotasListBySubscriptionNextResponse -} from "../models"; - -/// -/** Class containing Quotas operations. */ -export class QuotasImpl implements Quotas { - private readonly client: PlaywrightTestingClient; - - /** - * Initialize a new instance of the class Quotas class. - * @param client Reference to the service client - */ - constructor(client: PlaywrightTestingClient) { - this.client = client; - } - - /** - * List quotas for a given subscription Id. - * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param options The options parameters. - */ - public listBySubscription( - location: string, - options?: QuotasListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(location, options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - location: string, - options?: QuotasListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: QuotasListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(location, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext( - location, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - location: string, - options?: QuotasListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage( - location, - options - )) { - yield* page; - } - } - - /** - * List quotas for a given subscription Id. - * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param options The options parameters. - */ - private _listBySubscription( - location: string, - options?: QuotasListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { location, options }, - listBySubscriptionOperationSpec - ); - } - - /** - * Get quota by name. - * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param name The quota name. - * @param options The options parameters. - */ - get( - location: string, - name: QuotaNames, - options?: QuotasGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { location, name, options }, - getOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - location: string, - nextLink: string, - options?: QuotasListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { location, nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Quota - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.name1 - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.location - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/accounts.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/accounts.ts deleted file mode 100644 index 4f2c04a63a1b..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/accounts.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - Account, - AccountsListBySubscriptionOptionalParams, - AccountsListByResourceGroupOptionalParams, - AccountsGetOptionalParams, - AccountsGetResponse, - AccountsCreateOrUpdateOptionalParams, - AccountsCreateOrUpdateResponse, - AccountUpdate, - AccountsUpdateOptionalParams, - AccountsUpdateResponse, - AccountsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a Accounts. */ -export interface Accounts { - /** - * List Account resources by subscription ID - * @param options The options parameters. - */ - listBySubscription( - options?: AccountsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * List Account resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param options The options parameters. - */ - get( - resourceGroupName: string, - name: string, - options?: AccountsGetOptionalParams - ): Promise; - /** - * Create a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - name: string, - resource: Account, - options?: AccountsCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - AccountsCreateOrUpdateResponse - > - >; - /** - * Create a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - name: string, - resource: Account, - options?: AccountsCreateOrUpdateOptionalParams - ): Promise; - /** - * Update a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param properties The resource properties to be updated. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - name: string, - properties: AccountUpdate, - options?: AccountsUpdateOptionalParams - ): Promise; - /** - * Delete a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - name: string, - options?: AccountsDeleteOptionalParams - ): Promise, void>>; - /** - * Delete a Account - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param name Name of account - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - name: string, - options?: AccountsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/index.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/index.ts deleted file mode 100644 index e8eae0a6b68b..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./operations"; -export * from "./accounts"; -export * from "./quotas"; diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/operations.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/operations.ts deleted file mode 100644 index 5cf5581845bd..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * List the operations for the provider - * @param options The options parameters. - */ - list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/quotas.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/quotas.ts deleted file mode 100644 index 002703dcda35..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/operationsInterfaces/quotas.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - Quota, - QuotasListBySubscriptionOptionalParams, - QuotaNames, - QuotasGetOptionalParams, - QuotasGetResponse -} from "../models"; - -/// -/** Interface representing a Quotas. */ -export interface Quotas { - /** - * List quotas for a given subscription Id. - * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param options The options parameters. - */ - listBySubscription( - location: string, - options?: QuotasListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get quota by name. - * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param name The quota name. - * @param options The options parameters. - */ - get( - location: string, - name: QuotaNames, - options?: QuotasGetOptionalParams - ): Promise; -} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/pagingHelper.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/pagingHelper.ts deleted file mode 100644 index 269a2b9814b5..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/pagingHelper.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export interface PageInfo { - continuationToken?: string; -} - -const pageMap = new WeakMap(); - -/** - * Given the last `.value` produced by the `byPage` iterator, - * returns a continuation token that can be used to begin paging from - * that point later. - * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. - * @returns The continuation token that can be passed into byPage() during future calls. - */ -export function getContinuationToken(page: unknown): string | undefined { - if (typeof page !== "object" || page === null) { - return undefined; - } - return pageMap.get(page)?.continuationToken; -} - -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined -): void { - if (typeof page !== "object" || page === null || !continuationToken) { - return; - } - const pageInfo = pageMap.get(page) ?? {}; - pageInfo.continuationToken = continuationToken; - pageMap.set(page, pageInfo); -} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/playwrightTestingClient.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/playwrightTestingClient.ts deleted file mode 100644 index 506bcec0c878..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/src/playwrightTestingClient.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest -} from "@azure/core-rest-pipeline"; -import * as coreAuth from "@azure/core-auth"; -import { OperationsImpl, AccountsImpl, QuotasImpl } from "./operations"; -import { Operations, Accounts, Quotas } from "./operationsInterfaces"; -import { PlaywrightTestingClientOptionalParams } from "./models"; - -export class PlaywrightTestingClient extends coreClient.ServiceClient { - $host: string; - apiVersion: string; - subscriptionId: string; - - /** - * Initializes a new instance of the PlaywrightTestingClient class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. - * @param options The parameter options - */ - constructor( - credentials: coreAuth.TokenCredential, - subscriptionId: string, - options?: PlaywrightTestingClientOptionalParams - ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); - } - - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: PlaywrightTestingClientOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials - }; - - const packageDetails = `azsdk-js-arm-playwrighttesting/1.0.0-beta.3`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, - ...options, - userAgentOptions: { - userAgentPrefix - }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" - }; - super(optionsWithDefaults); - - let bearerTokenAuthenticationPolicyFound: boolean = false; - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName - ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-10-01-preview"; - this.operations = new OperationsImpl(this); - this.accounts = new AccountsImpl(this); - this.quotas = new QuotasImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } - - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; - } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest - ): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - } - }; - this.pipeline.addPolicy(apiVersionPolicy); - } - - operations: Operations; - accounts: Accounts; - quotas: Quotas; -} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/restorePollerHelpers.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/restorePollerHelpers.ts new file mode 100644 index 000000000000..a88d14b4e2ee --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/restorePollerHelpers.ts @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzurePlaywrightServiceClient } from "./azurePlaywrightServiceClient.js"; +import { + _accountsCreateOrUpdateDeserialize, + _accountsDeleteDeserialize, +} from "./api/accounts/index.js"; +import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; +import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { + PollerLike, + OperationState, + deserializeState, + ResourceLocationConfig, +} from "@azure/core-lro"; + +export interface RestorePollerOptions< + TResult, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +> extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** Deserialization function for raw response body */ + processResponseBody?: (result: TResponse) => Promise; +} + +/** + * Creates a poller from the serialized state of another poller. This can be + * useful when you want to create pollers on a different host or a poller + * needs to be constructed after the original one is not in scope. + */ +export function restorePoller( + client: AzurePlaywrightServiceClient, + serializedState: string, + sourceOperation: (...args: any[]) => PollerLike, TResult>, + options?: RestorePollerOptions, +): PollerLike, TResult> { + const pollerConfig = deserializeState(serializedState).config; + const { initialRequestUrl, requestMethod, metadata } = pollerConfig; + if (!initialRequestUrl || !requestMethod) { + throw new Error( + `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`, + ); + } + const resourceLocationConfig = metadata?.["resourceLocationConfig"] as + | ResourceLocationConfig + | undefined; + const { deserializer, expectedStatuses = [] } = + getDeserializationHelper(initialRequestUrl, requestMethod) ?? {}; + const deserializeHelper = options?.processResponseBody ?? deserializer; + if (!deserializeHelper) { + throw new Error( + `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`, + ); + } + return getLongRunningPoller( + (client as any)["_client"] ?? client, + deserializeHelper as (result: TResponse) => Promise, + expectedStatuses, + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + resourceLocationConfig, + restoreFrom: serializedState, + initialRequestUrl, + }, + ); +} + +interface DeserializationHelper { + deserializer: Function; + expectedStatuses: string[]; +} + +const deserializeMap: Record = { + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}": + { + deserializer: _accountsCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}": + { + deserializer: _accountsDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, +}; + +function getDeserializationHelper( + urlStr: string, + method: string, +): DeserializationHelper | undefined { + const path = new URL(urlStr).pathname; + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: DeserializationHelper | undefined; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(deserializeMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/static-helpers/pagingHelpers.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/static-helpers/pagingHelpers.ts new file mode 100644 index 000000000000..ce33af5f4178 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; + +/** + * Options for the byPage method + */ +export interface PageSettings { + /** + * A reference to a specific page to start iterating from. + */ + continuationToken?: string; +} + +/** + * An interface that describes a page of results. + */ +export type ContinuablePage = TPage & { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +}; + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; +} + +/** + * An interface that describes how to communicate with the service. + */ +export interface PagedResult< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * Link to the first page of results. + */ + firstPageLink?: string; + /** + * A method that returns a page of results. + */ + getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => TElement[]; +} + +/** + * Options for the paging helper + */ +export interface BuildPagedAsyncIteratorOptions { + itemName?: string; + nextLinkName?: string; +} + +/** + * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator + */ +export function buildPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +>( + client: Client, + getInitialResponse: () => PromiseLike, + processResponseBody: (result: TResponse) => PromiseLike, + expectedStatuses: string[], + options: BuildPagedAsyncIteratorOptions = {}, +): PagedAsyncIterableIterator { + const itemName = options.itemName ?? "value"; + const nextLinkName = options.nextLinkName ?? "nextLink"; + const pagedResult: PagedResult = { + getPage: async (pageLink?: string) => { + const result = + pageLink === undefined + ? await getInitialResponse() + : await client.pathUnchecked(pageLink).get(); + checkPagingRequest(result, expectedStatuses); + const results = await processResponseBody(result as TResponse); + const nextLink = getNextLink(results, nextLinkName); + const values = getElements(results, itemName) as TPage; + return { + page: values, + nextPageLink: nextLink, + }; + }, + byPage: (settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }, + }; + return getPagedAsyncIterator(pagedResult); +} + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ + +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + ((settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: string; + } = {}, +): AsyncIterableIterator> { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + let result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + } +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + throw new RestError( + `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, + ); + } + + if (nextLink === null) { + return undefined; + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + if (!Array.isArray(value)) { + throw new RestError( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { + if (!expectedStatuses.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/src/static-helpers/pollingHelpers.ts b/sdk/playwrighttesting/arm-playwrighttesting/src/static-helpers/pollingHelpers.ts new file mode 100644 index 000000000000..f01c41bab69d --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + PollerLike, + OperationState, + ResourceLocationConfig, + RunningOperation, + createHttpPoller, + OperationResponse, +} from "@azure/core-lro"; + +import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; + +export interface GetLongRunningPollerOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The potential location of the result of the LRO if specified by the LRO extension in the swagger. + */ + resourceLocationConfig?: ResourceLocationConfig; + /** + * The original url of the LRO + * Should not be null when restoreFrom is set + */ + initialRequestUrl?: string; + /** + * A serialized poller which can be used to resume an existing paused Long-Running-Operation. + */ + restoreFrom?: string; + /** + * The function to get the initial response + */ + getInitialResponse?: () => PromiseLike; +} +export function getLongRunningPoller( + client: Client, + processResponseBody: (result: TResponse) => Promise, + expectedStatuses: string[], + options: GetLongRunningPollerOptions, +): PollerLike, TResult> { + const { restoreFrom, getInitialResponse } = options; + if (!restoreFrom && !getInitialResponse) { + throw new Error("Either restoreFrom or getInitialResponse must be specified"); + } + let initialResponse: TResponse | undefined = undefined; + const pollAbortController = new AbortController(); + const poller: RunningOperation = { + sendInitialRequest: async () => { + if (!getInitialResponse) { + throw new Error("getInitialResponse is required when initializing a new poller"); + } + initialResponse = await getInitialResponse(); + return getLroResponse(initialResponse, expectedStatuses); + }, + sendPollRequest: async ( + path: string, + pollOptions?: { + abortSignal?: AbortSignalLike; + }, + ) => { + // The poll request would both listen to the user provided abort signal and the poller's own abort signal + function abortListener(): void { + pollAbortController.abort(); + } + const abortSignal = pollAbortController.signal; + if (options.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (pollOptions?.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (!abortSignal.aborted) { + options.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + pollOptions?.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + response = await client.pathUnchecked(path).get({ abortSignal }); + } finally { + options.abortSignal?.removeEventListener("abort", abortListener); + pollOptions?.abortSignal?.removeEventListener("abort", abortListener); + } + + return getLroResponse(response as TResponse, expectedStatuses); + }, + }; + return createHttpPoller(poller, { + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: options?.resourceLocationConfig, + restoreFrom: options?.restoreFrom, + processResult: (result: unknown) => { + return processResponseBody(result as TResponse); + }, + }); +} +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @param deserializeFn - deserialize function to convert Rest response to modular output + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResponse, + expectedStatuses: string[], +): OperationResponse { + if (!expectedStatuses.includes(response.status)) { + throw createRestError(response); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/test/playwrighttesting_operations_test.spec.ts b/sdk/playwrighttesting/arm-playwrighttesting/test/playwrighttesting_operations_test.spec.ts deleted file mode 100644 index 19ed722724a0..000000000000 --- a/sdk/playwrighttesting/arm-playwrighttesting/test/playwrighttesting_operations_test.spec.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { PlaywrightTestingClient } from "../src/playwrightTestingClient"; - -const replaceableVariables: Record = { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("PlaywrightTesting test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: PlaywrightTestingClient; - let location: string; - let resourceGroup: string; - let resourcename: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new PlaywrightTestingClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("operation list test", async function () { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - }); - -}) diff --git a/sdk/playwrighttesting/arm-playwrighttesting/test/public/playwrighttesting_operations_test.spec.ts b/sdk/playwrighttesting/arm-playwrighttesting/test/public/playwrighttesting_operations_test.spec.ts new file mode 100644 index 000000000000..f383475e1afc --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/test/public/playwrighttesting_operations_test.spec.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { env, Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; +import { createTestCredential } from "@azure-tools/test-credential"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; +import { createRecorder } from "./utils/recordedClient.js"; +import { AzurePlaywrightServiceClient } from "../../src/azurePlaywrightServiceClient.js"; + +export const testPollingOptions = { + updateIntervalInMs: isPlaybackMode() ? 0 : undefined, +}; + +describe("PlaywrightService test", () => { + let recorder: Recorder; + let subscriptionId: string; + let client: AzurePlaywrightServiceClient; + + beforeEach(async (context) => { + process.env.SystemRoot = process.env.SystemRoot || "C:\\Windows"; + recorder = await createRecorder(context); + subscriptionId = env.SUBSCRIPTION_ID || ""; + // This is an example of how the environment variables are used + const credential = createTestCredential(); + client = new AzurePlaywrightServiceClient( + credential, + subscriptionId, + recorder.configureClientOptions({}), + ); + }); + + afterEach(async function () { + await recorder.stop(); + }); + it("operations list test", async function () { + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + assert.notEqual(resArray.length, 0); + }); +}); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/test/public/utils/recordedClient.ts b/sdk/playwrighttesting/arm-playwrighttesting/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..14dcd9fa397c --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/test/public/utils/recordedClient.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder(context: VitestTestContext): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderEnvSetup); + return recorder; +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.browser.config.json b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.browser.config.json new file mode 100644 index 000000000000..75871518e3a0 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.browser.config.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.json b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.json index 4fbccf111a16..19ceb382b521 100644 --- a/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.json +++ b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-playwrighttesting": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.samples.json b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.samples.json new file mode 100644 index 000000000000..15b5ea99552f --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.samples.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-playwrighttesting": ["./dist/esm"] + } + } +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.src.json b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.test.json b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.test.json new file mode 100644 index 000000000000..290ca214aebc --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/tsconfig.test.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] +} diff --git a/sdk/playwrighttesting/arm-playwrighttesting/tsp-location.yaml b/sdk/playwrighttesting/arm-playwrighttesting/tsp-location.yaml new file mode 100644 index 000000000000..f1db921b3f54 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/playwrighttesting/PlaywrightTesting.Management +commit: fa6c6015b1633a701edb629c1a759433aa1fdaf2 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/playwrighttesting/arm-playwrighttesting/vitest.browser.config.ts b/sdk/playwrighttesting/arm-playwrighttesting/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: [ + "dist-test/browser/test/**/*.spec.js", + ], + }, + }), +); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/vitest.config.ts b/sdk/playwrighttesting/arm-playwrighttesting/vitest.config.ts new file mode 100644 index 000000000000..86a71911ccc2 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + testTimeout: 1200000, + hookTimeout: 1200000, + }, + }), +); diff --git a/sdk/playwrighttesting/arm-playwrighttesting/vitest.esm.config.ts b/sdk/playwrighttesting/arm-playwrighttesting/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/playwrighttesting/arm-playwrighttesting/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/playwrighttesting/ci.mgmt.yml b/sdk/playwrighttesting/ci.mgmt.yml index 81fb51275e42..272221b4cda8 100644 --- a/sdk/playwrighttesting/ci.mgmt.yml +++ b/sdk/playwrighttesting/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -13,7 +13,6 @@ trigger: include: - sdk/playwrighttesting/arm-playwrighttesting - sdk/playwrighttesting/ci.mgmt.yml - pr: branches: include: @@ -27,7 +26,6 @@ pr: include: - sdk/playwrighttesting/arm-playwrighttesting - sdk/playwrighttesting/ci.mgmt.yml - extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: @@ -35,4 +33,3 @@ extends: Artifacts: - name: azure-arm-playwrighttesting safeName: azurearmplaywrighttesting - \ No newline at end of file diff --git a/sdk/playwrighttesting/microsoft-playwright-testing/test/utils/clInfoProvider.spec.ts b/sdk/playwrighttesting/microsoft-playwright-testing/test/utils/clInfoProvider.spec.ts index 14cfbc01e1d0..18f1a577140e 100644 --- a/sdk/playwrighttesting/microsoft-playwright-testing/test/utils/clInfoProvider.spec.ts +++ b/sdk/playwrighttesting/microsoft-playwright-testing/test/utils/clInfoProvider.spec.ts @@ -8,6 +8,7 @@ describe("CIInfoProvider", () => { beforeEach(() => { sandbox = sinon.createSandbox(); + environmentVariables = process.env; }); afterEach(() => { diff --git a/sdk/playwrighttesting/microsoft-playwright-testing/test/utils/reporterUtils.spec.ts b/sdk/playwrighttesting/microsoft-playwright-testing/test/utils/reporterUtils.spec.ts index 6c20db6e620a..876c937ac1a2 100644 --- a/sdk/playwrighttesting/microsoft-playwright-testing/test/utils/reporterUtils.spec.ts +++ b/sdk/playwrighttesting/microsoft-playwright-testing/test/utils/reporterUtils.spec.ts @@ -19,7 +19,7 @@ describe("Reporter Utils", () => { correlationId: "test-correlation-id", region: "test-region", }; - + environmentVariables = process.env; reporterUtils = new ReporterUtils(envVariablesMock, {} as any, {} as any); }); afterEach(() => { From 0b747e3313fe076a6447dae05c6c67fa2e42a669 Mon Sep 17 00:00:00 2001 From: Kashish Gupta <90824921+kashish2508@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:19:10 +0530 Subject: [PATCH 45/55] fix(playwrighttesting): handling OS name and browser name (#32048) ### Packages impacted by this PR @azure/microsoft-playwright-testing ### Issues associated with this PR ### Describe the problem that is addressed by this PR ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary) --- .../src/common/constants.ts | 1 + .../src/utils/reporterUtils.ts | 40 +++++++++---------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/sdk/playwrighttesting/microsoft-playwright-testing/src/common/constants.ts b/sdk/playwrighttesting/microsoft-playwright-testing/src/common/constants.ts index c2ffeb218b1e..ce12f72fb040 100644 --- a/sdk/playwrighttesting/microsoft-playwright-testing/src/common/constants.ts +++ b/sdk/playwrighttesting/microsoft-playwright-testing/src/common/constants.ts @@ -70,6 +70,7 @@ export class Constants { public static readonly GIT_COMMIT_MESSAGE_COMMAND = 'git log -1 --pretty=format:"%s"'; public static readonly ERROR_MESSAGES_MAX_LENGTH = 100; public static readonly API_VERSION = "2024-09-01-preview"; + public static readonly OS = "Os"; public static readonly NON_RETRYABLE_STATUS_CODES = [400, 403, 404, 405, 409]; public static readonly SupportedRegions: string[] = [ "eastus", diff --git a/sdk/playwrighttesting/microsoft-playwright-testing/src/utils/reporterUtils.ts b/sdk/playwrighttesting/microsoft-playwright-testing/src/utils/reporterUtils.ts index c3f1883fee54..f930bfd41bc7 100644 --- a/sdk/playwrighttesting/microsoft-playwright-testing/src/utils/reporterUtils.ts +++ b/sdk/playwrighttesting/microsoft-playwright-testing/src/utils/reporterUtils.ts @@ -15,7 +15,6 @@ import { reporterLogger } from "../common/logger"; import { createHash, randomUUID } from "crypto"; import type { IBackOffOptions } from "../common/types"; import fs from "fs"; -import os from "os"; import path from "path"; import { Constants } from "../common/constants"; import type { EnvironmentVariables } from "../common/environmentVariables"; @@ -110,6 +109,21 @@ class ReporterUtils { return shard; } + public getOSName(result: TestResult, data: string): string { + try { + for (const attachment of result.attachments) { + if (attachment.name === data) { + const match = attachment?.contentType?.match(/charset=(.*)/); + const charset = match && match.length > 1 ? match[1] : "utf-8"; + return attachment.body?.toString((charset as any) || "utf-8").toUpperCase() || ""; + } + } + } catch (error) { + reporterLogger.error(`Error in fetching OS - ${error}`); + } + return ""; + } + public getTestResultObject(test: TestCase, result: TestResult, jobName: string): MPTTestResult { switch (test.outcome()) { case "skipped": @@ -134,10 +148,6 @@ class ReporterUtils { break; } - let browserName = test.parent.project()!.use.browserName?.toLowerCase(); - if (!browserName) { - browserName = test.parent.project()!.use.defaultBrowserType?.toLowerCase(); - } const testResult = new MPTTestResult(); testResult.runId = this.envVariables.runId; testResult.shardId = this.envVariables.runId + "_" + this.envVariables.shardId; @@ -152,11 +162,15 @@ class ReporterUtils { testResult.status = this.getTestStatus(test, result); testResult.lineNumber = test.location.line; testResult.retry = result.retry ? result.retry : 0; + let browserName = test.parent.project()?.use.browserName?.toLowerCase(); + if (!browserName) { + browserName = test.parent.project()?.use.defaultBrowserType?.toLowerCase(); + } testResult.webTestConfig = { jobName: jobName, projectName: test.parent.project()!.name, browserType: browserName ? browserName.toUpperCase() : "", - os: this.getOsName(), + os: this.getOSName(result, Constants.OS), }; testResult.annotations = this.extractTestAnnotations(test.annotations); testResult.tags = this.extractTestTags(test); @@ -611,20 +625,6 @@ class ReporterUtils { public static isNullOrEmpty(str: string | null | undefined): boolean { return !str || str.trim() === ""; } - - private getOsName(): string { - const osType = os.type(); - switch (osType) { - case "Darwin": - return "MAC"; - case "Linux": - return "LINUX"; - case "Windows_NT": - return "WINDOWS"; - default: - return "UNKNOWN"; - } - } } export default ReporterUtils; From 5689aff2b50619424725f4f42cd049741ce725b6 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 20 Dec 2024 00:14:22 -0800 Subject: [PATCH 46/55] Post release automated changes for communication releases (#32302) Post release automated changes for azure-communication-sms --- sdk/communication/communication-sms/CHANGELOG.md | 10 ++++++++++ sdk/communication/communication-sms/package.json | 2 +- sdk/communication/communication-sms/src/constants.ts | 2 +- .../src/generated/src/smsApiClient.ts | 2 +- .../communication-sms/src/generated/src/tracing.ts | 2 +- sdk/communication/communication-sms/swagger/README.md | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/sdk/communication/communication-sms/CHANGELOG.md b/sdk/communication/communication-sms/CHANGELOG.md index 43d2f563c639..0f8227926ca5 100644 --- a/sdk/communication/communication-sms/CHANGELOG.md +++ b/sdk/communication/communication-sms/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.2.0-beta.4 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.2.0-beta.3 (2024-12-19) ### Bugs Fixed diff --git a/sdk/communication/communication-sms/package.json b/sdk/communication/communication-sms/package.json index 649e75d4c9a2..76f980a99239 100644 --- a/sdk/communication/communication-sms/package.json +++ b/sdk/communication/communication-sms/package.json @@ -1,6 +1,6 @@ { "name": "@azure/communication-sms", - "version": "1.2.0-beta.3", + "version": "1.2.0-beta.4", "description": "SDK for Azure Communication SMS service which facilitates the sending of SMS messages.", "sdk-type": "client", "main": "./dist/commonjs/index.js", diff --git a/sdk/communication/communication-sms/src/constants.ts b/sdk/communication/communication-sms/src/constants.ts index f967eaae3eb3..91c50d8b901c 100644 --- a/sdk/communication/communication-sms/src/constants.ts +++ b/sdk/communication/communication-sms/src/constants.ts @@ -1,4 +1,4 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -export const SDK_VERSION: string = "1.2.0-beta.3"; +export const SDK_VERSION: string = "1.2.0-beta.4"; diff --git a/sdk/communication/communication-sms/src/generated/src/smsApiClient.ts b/sdk/communication/communication-sms/src/generated/src/smsApiClient.ts index 200a56a3989f..e4f43004eb8c 100644 --- a/sdk/communication/communication-sms/src/generated/src/smsApiClient.ts +++ b/sdk/communication/communication-sms/src/generated/src/smsApiClient.ts @@ -38,7 +38,7 @@ export class SmsApiClient extends coreClient.ServiceClient { requestContentType: "application/json; charset=utf-8", }; - const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.3`; + const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.4`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/communication/communication-sms/src/generated/src/tracing.ts b/sdk/communication/communication-sms/src/generated/src/tracing.ts index 00590f150bd1..99e498ec28a0 100644 --- a/sdk/communication/communication-sms/src/generated/src/tracing.ts +++ b/sdk/communication/communication-sms/src/generated/src/tracing.ts @@ -11,5 +11,5 @@ import { createTracingClient } from "@azure/core-tracing"; export const tracingClient = createTracingClient({ namespace: "Microsoft.Communication", packageName: "@azure/communication-sms", - packageVersion: "1.2.0-beta.3", + packageVersion: "1.2.0-beta.4", }); diff --git a/sdk/communication/communication-sms/swagger/README.md b/sdk/communication/communication-sms/swagger/README.md index 1ea260541b51..07570641d9b0 100644 --- a/sdk/communication/communication-sms/swagger/README.md +++ b/sdk/communication/communication-sms/swagger/README.md @@ -19,7 +19,7 @@ use-extension: "@autorest/typescript": "latest" azure-arm: false add-credentials: false -package-version: 1.2.0-beta.3 +package-version: 1.2.0-beta.4 v3: true tracing-info: From 8eb51af02e1ea57d7c5eecc0cbdca685f669a389 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:47:23 +0800 Subject: [PATCH 47/55] [mgmt] cognitiveservice release (#32317) https://github.com/Azure/sdk-release-request/issues/5715 --------- Co-authored-by: Mary Gao --- common/config/rush/pnpm-lock.yaml | 25 +- .../arm-cognitiveservices/CHANGELOG.md | 190 +- .../arm-cognitiveservices/LICENSE | 2 +- .../arm-cognitiveservices/README.md | 1 - .../arm-cognitiveservices/_meta.json | 8 +- .../arm-cognitiveservices/assets.json | 2 +- .../arm-cognitiveservices/package.json | 57 +- .../review/arm-cognitiveservices.api.md | 916 ++++- .../arm-cognitiveservices/sample.env | 5 +- .../samples-dev/accountsCreateSample.ts | 28 +- .../samples-dev/accountsDeleteSample.ts | 6 +- .../samples-dev/accountsGetSample.ts | 4 +- .../accountsListByResourceGroupSample.ts | 6 +- .../samples-dev/accountsListKeysSample.ts | 4 +- .../samples-dev/accountsListModelsSample.ts | 6 +- .../samples-dev/accountsListSample.ts | 4 +- .../samples-dev/accountsListSkusSample.ts | 4 +- .../samples-dev/accountsListUsagesSample.ts | 6 +- .../accountsRegenerateKeySample.ts | 6 +- .../samples-dev/accountsUpdateSample.ts | 8 +- .../calculateModelCapacitySample.ts | 60 + .../checkDomainAvailabilitySample.ts | 17 +- .../samples-dev/checkSkuAvailabilitySample.ts | 6 +- ...entPlansCreateOrUpdateAssociationSample.ts | 21 +- ...commitmentPlansCreateOrUpdatePlanSample.ts | 12 +- .../commitmentPlansCreateOrUpdateSample.ts | 12 +- .../commitmentPlansDeleteAssociationSample.ts | 6 +- .../commitmentPlansDeletePlanSample.ts | 6 +- .../commitmentPlansDeleteSample.ts | 6 +- .../commitmentPlansGetAssociationSample.ts | 6 +- .../commitmentPlansGetPlanSample.ts | 6 +- .../samples-dev/commitmentPlansGetSample.ts | 6 +- .../commitmentPlansListAssociationsSample.ts | 6 +- ...mentPlansListPlansByResourceGroupSample.ts | 6 +- ...tmentPlansListPlansBySubscriptionSample.ts | 4 +- .../samples-dev/commitmentPlansListSample.ts | 6 +- .../commitmentPlansUpdatePlanSample.ts | 8 +- .../samples-dev/commitmentTiersListSample.ts | 4 +- ...fenderForAiSettingsCreateOrUpdateSample.ts | 53 + .../defenderForAiSettingsGetSample.ts | 48 + .../defenderForAiSettingsListSample.ts | 49 + .../defenderForAiSettingsUpdateSample.ts | 53 + .../samples-dev/deletedAccountsGetSample.ts | 6 +- .../samples-dev/deletedAccountsListSample.ts | 4 +- .../samples-dev/deletedAccountsPurgeSample.ts | 6 +- .../deploymentsCreateOrUpdateSample.ts | 10 +- .../samples-dev/deploymentsDeleteSample.ts | 6 +- .../samples-dev/deploymentsGetSample.ts | 6 +- .../samples-dev/deploymentsListSample.ts | 6 +- .../samples-dev/deploymentsListSkusSample.ts | 51 + .../samples-dev/deploymentsUpdateSample.ts | 55 + .../encryptionScopesCreateOrUpdateSample.ts | 64 + .../encryptionScopesDeleteSample.ts | 48 + .../samples-dev/encryptionScopesGetSample.ts | 48 + .../samples-dev/encryptionScopesListSample.ts | 49 + .../locationBasedModelCapacitiesListSample.ts | 52 + .../samples-dev/modelCapacitiesListSample.ts | 50 + .../samples-dev/modelsListSample.ts | 8 +- ...ecurityPerimeterConfigurationsGetSample.ts | 48 + ...curityPerimeterConfigurationsListSample.ts | 49 + ...yPerimeterConfigurationsReconcileSample.ts | 49 + .../samples-dev/operationsListSample.ts | 4 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 25 +- .../privateEndpointConnectionsDeleteSample.ts | 6 +- .../privateEndpointConnectionsGetSample.ts | 6 +- .../privateEndpointConnectionsListSample.ts | 6 +- .../privateLinkResourcesListSample.ts | 6 +- .../raiBlocklistItemsBatchAddSample.ts | 62 + .../raiBlocklistItemsBatchDeleteSample.ts | 55 + .../raiBlocklistItemsCreateOrUpdateSample.ts | 57 + .../raiBlocklistItemsDeleteSample.ts | 50 + .../samples-dev/raiBlocklistItemsGetSample.ts | 50 + .../raiBlocklistItemsListSample.ts | 51 + .../raiBlocklistsCreateOrUpdateSample.ts | 55 + .../samples-dev/raiBlocklistsDeleteSample.ts | 48 + .../samples-dev/raiBlocklistsGetSample.ts | 48 + .../samples-dev/raiBlocklistsListSample.ts | 49 + .../samples-dev/raiContentFiltersGetSample.ts | 42 + .../raiContentFiltersListSample.ts | 44 + .../raiPoliciesCreateOrUpdateSample.ts | 130 + .../samples-dev/raiPoliciesDeleteSample.ts | 48 + .../samples-dev/raiPoliciesGetSample.ts | 48 + .../samples-dev/raiPoliciesListSample.ts | 49 + .../samples-dev/resourceSkusListSample.ts | 4 +- .../samples-dev/usagesListSample.ts | 4 +- .../samples/v7/javascript/README.md | 156 +- .../v7/javascript/accountsCreateSample.js | 4 +- .../v7/javascript/accountsDeleteSample.js | 2 +- .../v7/javascript/accountsGetSample.js | 2 +- .../accountsListByResourceGroupSample.js | 2 +- .../v7/javascript/accountsListKeysSample.js | 2 +- .../v7/javascript/accountsListModelsSample.js | 2 +- .../v7/javascript/accountsListSample.js | 2 +- .../v7/javascript/accountsListSkusSample.js | 2 +- .../v7/javascript/accountsListUsagesSample.js | 2 +- .../javascript/accountsRegenerateKeySample.js | 2 +- .../v7/javascript/accountsUpdateSample.js | 2 +- .../calculateModelCapacitySample.js | 51 + .../checkDomainAvailabilitySample.js | 6 +- .../javascript/checkSkuAvailabilitySample.js | 2 +- ...entPlansCreateOrUpdateAssociationSample.js | 2 +- ...commitmentPlansCreateOrUpdatePlanSample.js | 2 +- .../commitmentPlansCreateOrUpdateSample.js | 2 +- .../commitmentPlansDeleteAssociationSample.js | 2 +- .../commitmentPlansDeletePlanSample.js | 2 +- .../javascript/commitmentPlansDeleteSample.js | 2 +- .../commitmentPlansGetAssociationSample.js | 2 +- .../commitmentPlansGetPlanSample.js | 2 +- .../v7/javascript/commitmentPlansGetSample.js | 2 +- .../commitmentPlansListAssociationsSample.js | 2 +- ...mentPlansListPlansByResourceGroupSample.js | 2 +- ...tmentPlansListPlansBySubscriptionSample.js | 2 +- .../javascript/commitmentPlansListSample.js | 2 +- .../commitmentPlansUpdatePlanSample.js | 2 +- .../javascript/commitmentTiersListSample.js | 2 +- ...fenderForAiSettingsCreateOrUpdateSample.js | 43 + .../defenderForAiSettingsGetSample.js | 41 + .../defenderForAiSettingsListSample.js | 39 + .../defenderForAiSettingsUpdateSample.js | 43 + .../v7/javascript/deletedAccountsGetSample.js | 2 +- .../javascript/deletedAccountsListSample.js | 2 +- .../javascript/deletedAccountsPurgeSample.js | 2 +- .../deploymentsCreateOrUpdateSample.js | 2 +- .../v7/javascript/deploymentsDeleteSample.js | 2 +- .../v7/javascript/deploymentsGetSample.js | 2 +- .../v7/javascript/deploymentsListSample.js | 2 +- .../javascript/deploymentsListSkusSample.js | 44 + .../v7/javascript/deploymentsUpdateSample.js | 45 + .../encryptionScopesCreateOrUpdateSample.js | 54 + .../encryptionScopesDeleteSample.js | 41 + .../javascript/encryptionScopesGetSample.js | 41 + .../javascript/encryptionScopesListSample.js | 39 + .../locationBasedModelCapacitiesListSample.js | 46 + .../javascript/modelCapacitiesListSample.js | 40 + .../samples/v7/javascript/modelsListSample.js | 6 +- ...ecurityPerimeterConfigurationsGetSample.js | 41 + ...curityPerimeterConfigurationsListSample.js | 42 + ...yPerimeterConfigurationsReconcileSample.js | 41 + .../v7/javascript/operationsListSample.js | 2 +- ...EndpointConnectionsCreateOrUpdateSample.js | 2 +- .../privateEndpointConnectionsDeleteSample.js | 2 +- .../privateEndpointConnectionsGetSample.js | 2 +- .../privateEndpointConnectionsListSample.js | 2 +- .../privateLinkResourcesListSample.js | 2 +- .../raiBlocklistItemsBatchAddSample.js | 52 + .../raiBlocklistItemsBatchDeleteSample.js | 43 + .../raiBlocklistItemsCreateOrUpdateSample.js | 47 + .../raiBlocklistItemsDeleteSample.js | 43 + .../javascript/raiBlocklistItemsGetSample.js | 43 + .../javascript/raiBlocklistItemsListSample.js | 44 + .../raiBlocklistsCreateOrUpdateSample.js | 45 + .../javascript/raiBlocklistsDeleteSample.js | 41 + .../v7/javascript/raiBlocklistsGetSample.js | 37 + .../v7/javascript/raiBlocklistsListSample.js | 39 + .../javascript/raiContentFiltersGetSample.js | 36 + .../javascript/raiContentFiltersListSample.js | 38 + .../raiPoliciesCreateOrUpdateSample.js | 120 + .../v7/javascript/raiPoliciesDeleteSample.js | 41 + .../v7/javascript/raiPoliciesGetSample.js | 37 + .../v7/javascript/raiPoliciesListSample.js | 39 + .../v7/javascript/resourceSkusListSample.js | 2 +- .../samples/v7/javascript/sample.env | 5 +- .../samples/v7/javascript/usagesListSample.js | 2 +- .../samples/v7/typescript/README.md | 156 +- .../samples/v7/typescript/sample.env | 5 +- .../v7/typescript/src/accountsCreateSample.ts | 28 +- .../v7/typescript/src/accountsDeleteSample.ts | 6 +- .../v7/typescript/src/accountsGetSample.ts | 4 +- .../src/accountsListByResourceGroupSample.ts | 6 +- .../typescript/src/accountsListKeysSample.ts | 4 +- .../src/accountsListModelsSample.ts | 6 +- .../v7/typescript/src/accountsListSample.ts | 4 +- .../typescript/src/accountsListSkusSample.ts | 4 +- .../src/accountsListUsagesSample.ts | 6 +- .../src/accountsRegenerateKeySample.ts | 6 +- .../v7/typescript/src/accountsUpdateSample.ts | 8 +- .../src/calculateModelCapacitySample.ts | 60 + .../src/checkDomainAvailabilitySample.ts | 17 +- .../src/checkSkuAvailabilitySample.ts | 6 +- ...entPlansCreateOrUpdateAssociationSample.ts | 21 +- ...commitmentPlansCreateOrUpdatePlanSample.ts | 12 +- .../commitmentPlansCreateOrUpdateSample.ts | 12 +- .../commitmentPlansDeleteAssociationSample.ts | 6 +- .../src/commitmentPlansDeletePlanSample.ts | 6 +- .../src/commitmentPlansDeleteSample.ts | 6 +- .../commitmentPlansGetAssociationSample.ts | 6 +- .../src/commitmentPlansGetPlanSample.ts | 6 +- .../src/commitmentPlansGetSample.ts | 6 +- .../commitmentPlansListAssociationsSample.ts | 6 +- ...mentPlansListPlansByResourceGroupSample.ts | 6 +- ...tmentPlansListPlansBySubscriptionSample.ts | 4 +- .../src/commitmentPlansListSample.ts | 6 +- .../src/commitmentPlansUpdatePlanSample.ts | 8 +- .../src/commitmentTiersListSample.ts | 4 +- ...fenderForAiSettingsCreateOrUpdateSample.ts | 53 + .../src/defenderForAiSettingsGetSample.ts | 48 + .../src/defenderForAiSettingsListSample.ts | 49 + .../src/defenderForAiSettingsUpdateSample.ts | 53 + .../src/deletedAccountsGetSample.ts | 6 +- .../src/deletedAccountsListSample.ts | 4 +- .../src/deletedAccountsPurgeSample.ts | 6 +- .../src/deploymentsCreateOrUpdateSample.ts | 10 +- .../typescript/src/deploymentsDeleteSample.ts | 6 +- .../v7/typescript/src/deploymentsGetSample.ts | 6 +- .../typescript/src/deploymentsListSample.ts | 6 +- .../src/deploymentsListSkusSample.ts | 51 + .../typescript/src/deploymentsUpdateSample.ts | 55 + .../encryptionScopesCreateOrUpdateSample.ts | 64 + .../src/encryptionScopesDeleteSample.ts | 48 + .../src/encryptionScopesGetSample.ts | 48 + .../src/encryptionScopesListSample.ts | 49 + .../locationBasedModelCapacitiesListSample.ts | 52 + .../src/modelCapacitiesListSample.ts | 50 + .../v7/typescript/src/modelsListSample.ts | 8 +- ...ecurityPerimeterConfigurationsGetSample.ts | 48 + ...curityPerimeterConfigurationsListSample.ts | 49 + ...yPerimeterConfigurationsReconcileSample.ts | 49 + .../v7/typescript/src/operationsListSample.ts | 4 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 25 +- .../privateEndpointConnectionsDeleteSample.ts | 6 +- .../privateEndpointConnectionsGetSample.ts | 6 +- .../privateEndpointConnectionsListSample.ts | 6 +- .../src/privateLinkResourcesListSample.ts | 6 +- .../src/raiBlocklistItemsBatchAddSample.ts | 62 + .../src/raiBlocklistItemsBatchDeleteSample.ts | 55 + .../raiBlocklistItemsCreateOrUpdateSample.ts | 57 + .../src/raiBlocklistItemsDeleteSample.ts | 50 + .../src/raiBlocklistItemsGetSample.ts | 50 + .../src/raiBlocklistItemsListSample.ts | 51 + .../src/raiBlocklistsCreateOrUpdateSample.ts | 55 + .../src/raiBlocklistsDeleteSample.ts | 48 + .../typescript/src/raiBlocklistsGetSample.ts | 48 + .../typescript/src/raiBlocklistsListSample.ts | 49 + .../src/raiContentFiltersGetSample.ts | 42 + .../src/raiContentFiltersListSample.ts | 44 + .../src/raiPoliciesCreateOrUpdateSample.ts | 130 + .../typescript/src/raiPoliciesDeleteSample.ts | 48 + .../v7/typescript/src/raiPoliciesGetSample.ts | 48 + .../typescript/src/raiPoliciesListSample.ts | 49 + .../typescript/src/resourceSkusListSample.ts | 4 +- .../v7/typescript/src/usagesListSample.ts | 4 +- .../src/cognitiveServicesManagementClient.ts | 156 +- .../arm-cognitiveservices/src/lroImpl.ts | 6 +- .../arm-cognitiveservices/src/models/index.ts | 1161 +++++- .../src/models/mappers.ts | 3625 ++++++++++++----- .../src/models/parameters.ts | 358 +- .../src/operations/accounts.ts | 354 +- .../src/operations/commitmentPlans.ts | 526 ++- .../src/operations/commitmentTiers.ts | 41 +- .../src/operations/defenderForAISettings.ts | 345 ++ .../src/operations/deletedAccounts.ts | 96 +- .../src/operations/deployments.ts | 480 ++- .../src/operations/encryptionScopes.ts | 429 ++ .../src/operations/index.ts | 9 + .../locationBasedModelCapacities.ts | 219 + .../src/operations/modelCapacities.ts | 195 + .../src/operations/models.ts | 41 +- .../networkSecurityPerimeterConfigurations.ts | 372 ++ .../src/operations/operations.ts | 32 +- .../operations/privateEndpointConnections.ts | 135 +- .../src/operations/privateLinkResources.ts | 19 +- .../src/operations/raiBlocklistItems.ts | 578 +++ .../src/operations/raiBlocklists.ts | 426 ++ .../src/operations/raiContentFilters.ts | 209 + .../src/operations/raiPolicies.ts | 420 ++ .../src/operations/resourceSkus.ts | 37 +- .../src/operations/usages.ts | 41 +- .../src/operationsInterfaces/accounts.ts | 30 +- .../operationsInterfaces/commitmentPlans.ts | 42 +- .../operationsInterfaces/commitmentTiers.ts | 2 +- .../defenderForAISettings.ts | 78 + .../operationsInterfaces/deletedAccounts.ts | 10 +- .../src/operationsInterfaces/deployments.ts | 67 +- .../operationsInterfaces/encryptionScopes.ts | 99 + .../src/operationsInterfaces/index.ts | 9 + .../locationBasedModelCapacities.ts | 33 + .../operationsInterfaces/modelCapacities.ts | 31 + .../src/operationsInterfaces/models.ts | 2 +- .../networkSecurityPerimeterConfigurations.ts | 78 + .../src/operationsInterfaces/operations.ts | 2 +- .../privateEndpointConnections.ts | 14 +- .../privateLinkResources.ts | 4 +- .../operationsInterfaces/raiBlocklistItems.ts | 139 + .../src/operationsInterfaces/raiBlocklists.ts | 95 + .../operationsInterfaces/raiContentFilters.ts | 40 + .../src/operationsInterfaces/raiPolicies.ts | 95 + .../src/operationsInterfaces/resourceSkus.ts | 2 +- .../src/operationsInterfaces/usages.ts | 2 +- .../arm-cognitiveservices/src/pagingHelper.ts | 2 +- .../test/cognitiveservices_openai.spec.ts | 2 +- .../arm-cognitiveservices/tsconfig.json | 4 +- 291 files changed, 15759 insertions(+), 2585 deletions(-) create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/calculateModelCapacitySample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSkusSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/locationBasedModelCapacitiesListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelCapacitiesListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchAddSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/calculateModelCapacitySample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsCreateOrUpdateSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsGetSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsListSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsUpdateSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSkusSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsUpdateSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesCreateOrUpdateSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesDeleteSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesGetSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesListSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/locationBasedModelCapacitiesListSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelCapacitiesListSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsGetSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsListSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchAddSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchDeleteSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsCreateOrUpdateSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsDeleteSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsGetSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsListSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsCreateOrUpdateSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsDeleteSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsGetSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsListSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersGetSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersListSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesCreateOrUpdateSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesDeleteSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesGetSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesListSample.js create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/calculateModelCapacitySample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSkusSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/locationBasedModelCapacitiesListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelCapacitiesListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchAddSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesCreateOrUpdateSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesDeleteSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesGetSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesListSample.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operations/defenderForAISettings.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operations/encryptionScopes.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operations/locationBasedModelCapacities.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operations/modelCapacities.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operations/networkSecurityPerimeterConfigurations.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklistItems.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklists.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiContentFilters.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiPolicies.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/defenderForAISettings.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/encryptionScopes.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/locationBasedModelCapacities.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/modelCapacities.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklistItems.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklists.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiContentFilters.ts create mode 100644 sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiPolicies.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index d50ae13a2ba4..09387f856d63 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2443,7 +2443,7 @@ packages: version: 0.0.0 '@rush-temp/agrifood-farming@file:projects/agrifood-farming.tgz': - resolution: {integrity: sha512-kKT8/WGSRhkyg9A2RkomX9suhkpXyGt74VTKqKBlYR6CMwdd5/vP/bm8VBUNPnbLmHJAqBOuJqu5dpKkaHZ+bQ==, tarball: file:projects/agrifood-farming.tgz} + resolution: {integrity: sha512-OZ1UD3dftMcM7ULZz5v/a3qWR+UPHbs2ESUwjX5StkVtm8XpU313C78bddczEaVaIhpxMHFZcTvRf21EanfwYQ==, tarball: file:projects/agrifood-farming.tgz} version: 0.0.0 '@rush-temp/ai-anomaly-detector@file:projects/ai-anomaly-detector.tgz': @@ -2459,7 +2459,7 @@ packages: version: 0.0.0 '@rush-temp/ai-document-translator@file:projects/ai-document-translator.tgz': - resolution: {integrity: sha512-eB4XF6y7wyT8ZCW46tmtpg7i9akFtBjYEZ1FBoSGd+uHwYp42hHWLCGzlo2nhdyvPP2eiU/0axXO6Rlo9jhsIw==, tarball: file:projects/ai-document-translator.tgz} + resolution: {integrity: sha512-bnwr7Q34tX4tRdCVV2NzPu3aTLgPLPEtKNIMFQYGr8ouRQJ0+PM2xI/3V+k5Dc1WDIpqKk9Xe8iJOfeVdVHclg==, tarball: file:projects/ai-document-translator.tgz} version: 0.0.0 '@rush-temp/ai-form-recognizer@file:projects/ai-form-recognizer.tgz': @@ -2651,7 +2651,7 @@ packages: version: 0.0.0 '@rush-temp/arm-cognitiveservices@file:projects/arm-cognitiveservices.tgz': - resolution: {integrity: sha512-yecoAzQg345s9n+EnMPL4MBVV4Gw1p0NSsAKDNrM7xHCjaWL+Rk34c4OBHnsdCBlcDX3I3ZOkJwpxczqSnlXng==, tarball: file:projects/arm-cognitiveservices.tgz} + resolution: {integrity: sha512-DHozZplb6FyQBbkRxDi2AblZ3XSgQ7j4Xs4r7j2hqa7rchpDHN18jnTzU62ewMVeiOby6XtWxXmYPSqXBqN/kQ==, tarball: file:projects/arm-cognitiveservices.tgz} version: 0.0.0 '@rush-temp/arm-commerce-profile-2020-09-01-hybrid@file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz': @@ -3555,7 +3555,7 @@ packages: version: 0.0.0 '@rush-temp/communication-job-router@file:projects/communication-job-router.tgz': - resolution: {integrity: sha512-9X96kUlGoPpl9rkpH5lO7i8zNcJ1iCVu/ekombcm80uo/HE52hUTYxPxnkPyK8fLjG1rmkKhMN/v4yWVv8Yanw==, tarball: file:projects/communication-job-router.tgz} + resolution: {integrity: sha512-8Uocnv0mBRgp67j96CXyVlpyuk+eCN38VoH2z+7n5lPcIkyTlXALBdWXSKmfqvSyHHTR1cPpLs0HvlXEokjdjA==, tarball: file:projects/communication-job-router.tgz} version: 0.0.0 '@rush-temp/communication-messages@file:projects/communication-messages.tgz': @@ -3739,7 +3739,7 @@ packages: version: 0.0.0 '@rush-temp/iot-device-update@file:projects/iot-device-update.tgz': - resolution: {integrity: sha512-yDlW2Y3FM5JvvIKL/wl6UGSNryhW6Bc+pAt0UjIbwqTQSEK3rh1QEIlOwSGGtgkSxofQNQ/mIybUZh4xAGLaYw==, tarball: file:projects/iot-device-update.tgz} + resolution: {integrity: sha512-eeVsb0qFtodJSwNYapPnN7aLyDLB7xjSdU765WGqEM9UxtjUtDEQCKmbWwF3cL/mD+/fS0pEGVUxPico8eLxZg==, tarball: file:projects/iot-device-update.tgz} version: 0.0.0 '@rush-temp/iot-modelsrepository@file:projects/iot-modelsrepository.tgz': @@ -3939,7 +3939,7 @@ packages: version: 0.0.0 '@rush-temp/purview-administration@file:projects/purview-administration.tgz': - resolution: {integrity: sha512-GuX4ptJEu9WiaNd5gZimvxeCvkSX1Lx6esvjdXBMrwWw8J0IUV+ip62B3DO48sYyXTU3f18BBLonbxkMezinMQ==, tarball: file:projects/purview-administration.tgz} + resolution: {integrity: sha512-mILTmq+qK/2Tb+SslkCIWW7OU/XMpdT5g3F5TfFSPxBxJcr3ffwzQ0rwGlt9B2w2CPvA9m6tHRayhm5/OikCTA==, tarball: file:projects/purview-administration.tgz} version: 0.0.0 '@rush-temp/purview-catalog@file:projects/purview-catalog.tgz': @@ -3955,11 +3955,11 @@ packages: version: 0.0.0 '@rush-temp/purview-sharing@file:projects/purview-sharing.tgz': - resolution: {integrity: sha512-TRYUaWtJDOyE4Lzr8B2abyn5MDm/K/3EpKlzimf9i7rpv7sIs+priXnLhxIVUWfTbdU9YGS7/Jywj8FOu/h77w==, tarball: file:projects/purview-sharing.tgz} + resolution: {integrity: sha512-v7NxM5GqL4yD8+AYartO+vpA9uBoT7IdqVfpOdty71582+uKO5GWk3IjUSwa19yZT75QBtC3lDR4g8wpJUJpvQ==, tarball: file:projects/purview-sharing.tgz} version: 0.0.0 '@rush-temp/purview-workflow@file:projects/purview-workflow.tgz': - resolution: {integrity: sha512-PD5TWl/BL6Ovd0oo1b99t27iQtcqHRAL1HJI/eDauNBlIeCJj5CdHLiI6wQ0xSEk1L/Jwi59QEttGalfhO92tw==, tarball: file:projects/purview-workflow.tgz} + resolution: {integrity: sha512-gNVEbedQwGD7veRJkqn5aDoFlq1RJQ+CLvOfAaSzX5xc5Xq8b6EV1w5Maoci71XaZiHnwM/Ap8eR/bbQsCYttw==, tarball: file:projects/purview-workflow.tgz} version: 0.0.0 '@rush-temp/quantum-jobs@file:projects/quantum-jobs.tgz': @@ -4015,7 +4015,7 @@ packages: version: 0.0.0 '@rush-temp/synapse-access-control@file:projects/synapse-access-control.tgz': - resolution: {integrity: sha512-+s06PfjpaIhHqeWFf674X7/NNuamWT0NoBAkT5hHBmuXx03Zu1IV+vEnbbU/jhxStNvAIyxtYNwG3eprl4uhnQ==, tarball: file:projects/synapse-access-control.tgz} + resolution: {integrity: sha512-fjqWy96poos09TxHKgdgEQDUrhMZPcKUm7NwHSeqhq28wql59dCmco8gj0e7cUSMhhCg2dFOUix/+RVojkh07Q==, tarball: file:projects/synapse-access-control.tgz} version: 0.0.0 '@rush-temp/synapse-artifacts@file:projects/synapse-artifacts.tgz': @@ -9661,7 +9661,6 @@ snapshots: '@rush-temp/agrifood-farming@file:projects/agrifood-farming.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: '@azure-rest/core-client': 1.4.0 - '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) @@ -11027,16 +11026,16 @@ snapshots: dependencies: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 '@types/mocha': 10.0.10 '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 + mocha: 10.8.2 ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 + tsx: 4.19.2 typescript: 5.7.2 transitivePeerDependencies: - '@swc/core' @@ -17505,7 +17504,6 @@ snapshots: '@rush-temp/iot-device-update@file:projects/iot-device-update.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) @@ -18790,7 +18788,6 @@ snapshots: '@rush-temp/purview-sharing@file:projects/purview-sharing.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure/core-lro': 2.7.2 '@types/node': 18.19.68 '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) diff --git a/sdk/cognitiveservices/arm-cognitiveservices/CHANGELOG.md b/sdk/cognitiveservices/arm-cognitiveservices/CHANGELOG.md index fa0d53301a26..eb454da4e551 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/CHANGELOG.md +++ b/sdk/cognitiveservices/arm-cognitiveservices/CHANGELOG.md @@ -1,5 +1,193 @@ # Release History +## 7.6.0 (2024-12-20) + +### Features Added + + - Added operation group DefenderForAISettings + - Added operation group EncryptionScopes + - Added operation group LocationBasedModelCapacities + - Added operation group ModelCapacities + - Added operation group NetworkSecurityPerimeterConfigurations + - Added operation group RaiBlocklistItems + - Added operation group RaiBlocklists + - Added operation group RaiContentFilters + - Added operation group RaiPolicies + - Added operation Deployments.beginUpdate + - Added operation Deployments.beginUpdateAndWait + - Added operation Deployments.listSkus + - Added Interface BillingMeterInfo + - Added Interface CalculateModelCapacityOptionalParams + - Added Interface CalculateModelCapacityParameter + - Added Interface CalculateModelCapacityResult + - Added Interface CalculateModelCapacityResultEstimatedCapacity + - Added Interface CustomBlocklistConfig + - Added Interface DefenderForAISetting + - Added Interface DefenderForAISettingResult + - Added Interface DefenderForAISettingsCreateOrUpdateOptionalParams + - Added Interface DefenderForAISettingsGetOptionalParams + - Added Interface DefenderForAISettingsListNextOptionalParams + - Added Interface DefenderForAISettingsListOptionalParams + - Added Interface DefenderForAISettingsUpdateOptionalParams + - Added Interface DeploymentCapacitySettings + - Added Interface DeploymentSkuListResult + - Added Interface DeploymentsListSkusNextOptionalParams + - Added Interface DeploymentsListSkusOptionalParams + - Added Interface DeploymentsUpdateHeaders + - Added Interface DeploymentsUpdateOptionalParams + - Added Interface EncryptionScope + - Added Interface EncryptionScopeListResult + - Added Interface EncryptionScopeProperties + - Added Interface EncryptionScopesCreateOrUpdateOptionalParams + - Added Interface EncryptionScopesDeleteHeaders + - Added Interface EncryptionScopesDeleteOptionalParams + - Added Interface EncryptionScopesGetOptionalParams + - Added Interface EncryptionScopesListNextOptionalParams + - Added Interface EncryptionScopesListOptionalParams + - Added Interface LocationBasedModelCapacitiesListNextOptionalParams + - Added Interface LocationBasedModelCapacitiesListOptionalParams + - Added Interface ModelCapacitiesListNextOptionalParams + - Added Interface ModelCapacitiesListOptionalParams + - Added Interface ModelCapacityCalculatorWorkload + - Added Interface ModelCapacityCalculatorWorkloadRequestParam + - Added Interface ModelCapacityListResult + - Added Interface ModelCapacityListResultValueItem + - Added Interface ModelSkuCapacityProperties + - Added Interface NetworkSecurityPerimeter + - Added Interface NetworkSecurityPerimeterAccessRule + - Added Interface NetworkSecurityPerimeterAccessRuleProperties + - Added Interface NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem + - Added Interface NetworkSecurityPerimeterConfiguration + - Added Interface NetworkSecurityPerimeterConfigurationAssociationInfo + - Added Interface NetworkSecurityPerimeterConfigurationList + - Added Interface NetworkSecurityPerimeterConfigurationProperties + - Added Interface NetworkSecurityPerimeterConfigurationsGetOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsListOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsReconcileHeaders + - Added Interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams + - Added Interface NetworkSecurityPerimeterProfileInfo + - Added Interface ProvisioningIssue + - Added Interface ProvisioningIssueProperties + - Added Interface RaiBlocklist + - Added Interface RaiBlocklistConfig + - Added Interface RaiBlocklistItem + - Added Interface RaiBlocklistItemBulkRequest + - Added Interface RaiBlocklistItemProperties + - Added Interface RaiBlocklistItemsBatchAddOptionalParams + - Added Interface RaiBlocklistItemsBatchDeleteOptionalParams + - Added Interface RaiBlocklistItemsCreateOrUpdateOptionalParams + - Added Interface RaiBlocklistItemsDeleteHeaders + - Added Interface RaiBlocklistItemsDeleteOptionalParams + - Added Interface RaiBlocklistItemsGetOptionalParams + - Added Interface RaiBlocklistItemsListNextOptionalParams + - Added Interface RaiBlocklistItemsListOptionalParams + - Added Interface RaiBlockListItemsResult + - Added Interface RaiBlocklistProperties + - Added Interface RaiBlockListResult + - Added Interface RaiBlocklistsCreateOrUpdateOptionalParams + - Added Interface RaiBlocklistsDeleteHeaders + - Added Interface RaiBlocklistsDeleteOptionalParams + - Added Interface RaiBlocklistsGetOptionalParams + - Added Interface RaiBlocklistsListNextOptionalParams + - Added Interface RaiBlocklistsListOptionalParams + - Added Interface RaiContentFilter + - Added Interface RaiContentFilterListResult + - Added Interface RaiContentFilterProperties + - Added Interface RaiContentFiltersGetOptionalParams + - Added Interface RaiContentFiltersListNextOptionalParams + - Added Interface RaiContentFiltersListOptionalParams + - Added Interface RaiMonitorConfig + - Added Interface RaiPoliciesCreateOrUpdateOptionalParams + - Added Interface RaiPoliciesDeleteHeaders + - Added Interface RaiPoliciesDeleteOptionalParams + - Added Interface RaiPoliciesGetOptionalParams + - Added Interface RaiPoliciesListNextOptionalParams + - Added Interface RaiPoliciesListOptionalParams + - Added Interface RaiPolicy + - Added Interface RaiPolicyContentFilter + - Added Interface RaiPolicyListResult + - Added Interface RaiPolicyProperties + - Added Interface SkuResource + - Added Interface UserOwnedAmlWorkspace + - Added Type Alias ByPassSelection + - Added Type Alias CalculateModelCapacityResponse + - Added Type Alias ContentLevel + - Added Type Alias DefenderForAISettingsCreateOrUpdateResponse + - Added Type Alias DefenderForAISettingsGetResponse + - Added Type Alias DefenderForAISettingsListNextResponse + - Added Type Alias DefenderForAISettingsListResponse + - Added Type Alias DefenderForAISettingState + - Added Type Alias DefenderForAISettingsUpdateResponse + - Added Type Alias DeploymentsListSkusNextResponse + - Added Type Alias DeploymentsListSkusResponse + - Added Type Alias DeploymentsUpdateResponse + - Added Type Alias EncryptionScopeProvisioningState + - Added Type Alias EncryptionScopesCreateOrUpdateResponse + - Added Type Alias EncryptionScopesDeleteResponse + - Added Type Alias EncryptionScopesGetResponse + - Added Type Alias EncryptionScopesListNextResponse + - Added Type Alias EncryptionScopesListResponse + - Added Type Alias EncryptionScopeState + - Added Type Alias LocationBasedModelCapacitiesListNextResponse + - Added Type Alias LocationBasedModelCapacitiesListResponse + - Added Type Alias ModelCapacitiesListNextResponse + - Added Type Alias ModelCapacitiesListResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsGetResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsListNextResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsListResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsReconcileResponse + - Added Type Alias NspAccessRuleDirection + - Added Type Alias RaiBlocklistItemsBatchAddResponse + - Added Type Alias RaiBlocklistItemsCreateOrUpdateResponse + - Added Type Alias RaiBlocklistItemsDeleteResponse + - Added Type Alias RaiBlocklistItemsGetResponse + - Added Type Alias RaiBlocklistItemsListNextResponse + - Added Type Alias RaiBlocklistItemsListResponse + - Added Type Alias RaiBlocklistsCreateOrUpdateResponse + - Added Type Alias RaiBlocklistsDeleteResponse + - Added Type Alias RaiBlocklistsGetResponse + - Added Type Alias RaiBlocklistsListNextResponse + - Added Type Alias RaiBlocklistsListResponse + - Added Type Alias RaiContentFiltersGetResponse + - Added Type Alias RaiContentFiltersListNextResponse + - Added Type Alias RaiContentFiltersListResponse + - Added Type Alias RaiPoliciesCreateOrUpdateResponse + - Added Type Alias RaiPoliciesDeleteResponse + - Added Type Alias RaiPoliciesGetResponse + - Added Type Alias RaiPoliciesListNextResponse + - Added Type Alias RaiPoliciesListResponse + - Added Type Alias RaiPolicyContentSource + - Added Type Alias RaiPolicyMode + - Added Type Alias RaiPolicyType + - Interface AccountProperties has a new optional parameter amlWorkspace + - Interface AccountProperties has a new optional parameter raiMonitorConfig + - Interface CapacityConfig has a new optional parameter allowedValues + - Interface CommitmentPlanAccountAssociation has a new optional parameter tags + - Interface Deployment has a new optional parameter tags + - Interface DeploymentModel has a new optional parameter publisher + - Interface DeploymentModel has a new optional parameter sourceAccount + - Interface DeploymentProperties has a new optional parameter capacitySettings + - Interface DeploymentProperties has a new optional parameter currentCapacity + - Interface DeploymentProperties has a new optional parameter dynamicThrottlingEnabled + - Interface DeploymentProperties has a new optional parameter parentDeploymentName + - Interface Model has a new optional parameter description + - Interface ModelSku has a new optional parameter cost + - Interface NetworkRuleSet has a new optional parameter bypass + - Added Enum KnownByPassSelection + - Added Enum KnownContentLevel + - Added Enum KnownDefenderForAISettingState + - Added Enum KnownEncryptionScopeProvisioningState + - Added Enum KnownEncryptionScopeState + - Added Enum KnownNspAccessRuleDirection + - Added Enum KnownRaiPolicyContentSource + - Added Enum KnownRaiPolicyMode + - Added Enum KnownRaiPolicyType + - Enum KnownModelLifecycleStatus has a new value Deprecated + - Enum KnownModelLifecycleStatus has a new value Deprecating + - Enum KnownModelLifecycleStatus has a new value Stable + + ## 7.5.0 (2023-07-06) ### Features Added @@ -169,4 +357,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/cognitiveservices/arm-cognitiveservices/LICENSE b/sdk/cognitiveservices/arm-cognitiveservices/LICENSE index 3a1d9b6f24f7..7d5934740965 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/LICENSE +++ b/sdk/cognitiveservices/arm-cognitiveservices/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Microsoft +Copyright (c) 2024 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/cognitiveservices/arm-cognitiveservices/README.md b/sdk/cognitiveservices/arm-cognitiveservices/README.md index ab2c473b5a32..90cf41f73e8e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/README.md +++ b/sdk/cognitiveservices/arm-cognitiveservices/README.md @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure CognitiveServicesManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/cognitiveservices/arm-cognitiveservices/_meta.json b/sdk/cognitiveservices/arm-cognitiveservices/_meta.json index c14c35ec5010..63fc75088718 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/_meta.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/_meta.json @@ -1,8 +1,8 @@ { - "commit": "26cac4f70e9ce0e1c2f77de8303b47d1faa9ad33", + "commit": "bf420af156ea90b4226e96582bdb4c9647491ae6", "readme": "specification/cognitiveservices/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\cognitiveservices\\resource-manager\\readme.md --use=@autorest/typescript@6.0.5 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\cognitiveservices\\resource-manager\\readme.md --use=@autorest/typescript@6.0.29 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", - "use": "@autorest/typescript@6.0.5" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@6.0.29" } \ No newline at end of file diff --git a/sdk/cognitiveservices/arm-cognitiveservices/assets.json b/sdk/cognitiveservices/arm-cognitiveservices/assets.json index e74e29cb640e..c359d27c4afd 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/assets.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/cognitiveservices/arm-cognitiveservices", - "Tag": "js/cognitiveservices/arm-cognitiveservices_4a260f84f2" + "Tag": "js/cognitiveservices/arm-cognitiveservices_9ce8db54d2" } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/package.json b/sdk/cognitiveservices/arm-cognitiveservices/package.json index 985c005606df..708cb31f030c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/package.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for CognitiveServicesManagementClient.", - "version": "7.5.0", + "version": "7.6.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.3", + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, "keywords": [ @@ -28,18 +28,19 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-cognitiveservices.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "typescript": "~5.7.2", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -67,28 +68,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, diff --git a/sdk/cognitiveservices/arm-cognitiveservices/review/arm-cognitiveservices.api.md b/sdk/cognitiveservices/arm-cognitiveservices/review/arm-cognitiveservices.api.md index a7a3c2630b1a..d8d46bb9817c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/review/arm-cognitiveservices.api.md +++ b/sdk/cognitiveservices/arm-cognitiveservices/review/arm-cognitiveservices.api.md @@ -67,6 +67,7 @@ export interface AccountProperties { readonly abusePenalty?: AbusePenalty; // (undocumented) allowedFqdnList?: string[]; + amlWorkspace?: UserOwnedAmlWorkspace; apiProperties?: ApiProperties; readonly callRateLimit?: CallRateLimit; readonly capabilities?: SkuCapability[]; @@ -91,6 +92,7 @@ export interface AccountProperties { readonly provisioningState?: ProvisioningState; publicNetworkAccess?: PublicNetworkAccess; readonly quotaLimit?: QuotaLimit; + raiMonitorConfig?: RaiMonitorConfig; // (undocumented) restore?: boolean; // (undocumented) @@ -260,6 +262,52 @@ export interface AzureEntityResource extends Resource { readonly etag?: string; } +// @public (undocumented) +export interface BillingMeterInfo { + // (undocumented) + meterId?: string; + // (undocumented) + name?: string; + // (undocumented) + unit?: string; +} + +// @public +export type ByPassSelection = string; + +// @public +export interface CalculateModelCapacityOptionalParams extends coreClient.OperationOptions { + model?: DeploymentModel; + skuName?: string; + workloads?: ModelCapacityCalculatorWorkload[]; +} + +// @public +export interface CalculateModelCapacityParameter { + model?: DeploymentModel; + skuName?: string; + workloads?: ModelCapacityCalculatorWorkload[]; +} + +// @public +export type CalculateModelCapacityResponse = CalculateModelCapacityResult; + +// @public +export interface CalculateModelCapacityResult { + estimatedCapacity?: CalculateModelCapacityResultEstimatedCapacity; + model?: DeploymentModel; + // (undocumented) + skuName?: string; +} + +// @public +export interface CalculateModelCapacityResultEstimatedCapacity { + // (undocumented) + deployableValue?: number; + // (undocumented) + value?: number; +} + // @public export interface CallRateLimit { count?: number; @@ -270,6 +318,7 @@ export interface CallRateLimit { // @public export interface CapacityConfig { + allowedValues?: number[]; default?: number; maximum?: number; minimum?: number; @@ -314,6 +363,7 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient accounts: Accounts; // (undocumented) apiVersion: string; + calculateModelCapacity(options?: CalculateModelCapacityOptionalParams): Promise; checkDomainAvailability(subdomainName: string, typeParam: string, options?: CheckDomainAvailabilityOptionalParams): Promise; checkSkuAvailability(location: string, skus: string[], kind: string, typeParam: string, options?: CheckSkuAvailabilityOptionalParams): Promise; // (undocumented) @@ -321,18 +371,36 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient // (undocumented) commitmentTiers: CommitmentTiers; // (undocumented) + defenderForAISettings: DefenderForAISettings; + // (undocumented) deletedAccounts: DeletedAccounts; // (undocumented) deployments: Deployments; // (undocumented) + encryptionScopes: EncryptionScopes; + // (undocumented) + locationBasedModelCapacities: LocationBasedModelCapacities; + // (undocumented) + modelCapacities: ModelCapacities; + // (undocumented) models: Models; // (undocumented) + networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; // (undocumented) privateLinkResources: PrivateLinkResources; // (undocumented) + raiBlocklistItems: RaiBlocklistItems; + // (undocumented) + raiBlocklists: RaiBlocklists; + // (undocumented) + raiContentFilters: RaiContentFilters; + // (undocumented) + raiPolicies: RaiPolicies; + // (undocumented) resourceSkus: ResourceSkus; // (undocumented) subscriptionId: string; @@ -380,6 +448,9 @@ export interface CommitmentPlanAccountAssociation extends ProxyResource { accountId?: string; readonly etag?: string; readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; } // @public @@ -630,9 +701,79 @@ export interface CommitmentTiersListOptionalParams extends coreClient.OperationO // @public export type CommitmentTiersListResponse = CommitmentTierListResult; +// @public +export type ContentLevel = string; + // @public export type CreatedByType = string; +// @public +export interface CustomBlocklistConfig extends RaiBlocklistConfig { + source?: RaiPolicyContentSource; +} + +// @public +export interface DefenderForAISetting extends ProxyResource { + readonly etag?: string; + state?: DefenderForAISettingState; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface DefenderForAISettingResult { + nextLink?: string; + value?: DefenderForAISetting[]; +} + +// @public +export interface DefenderForAISettings { + createOrUpdate(resourceGroupName: string, accountName: string, defenderForAISettingName: string, defenderForAISettings: DefenderForAISetting, options?: DefenderForAISettingsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, defenderForAISettingName: string, options?: DefenderForAISettingsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: DefenderForAISettingsListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, accountName: string, defenderForAISettingName: string, defenderForAISettings: DefenderForAISetting, options?: DefenderForAISettingsUpdateOptionalParams): Promise; +} + +// @public +export interface DefenderForAISettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DefenderForAISettingsCreateOrUpdateResponse = DefenderForAISetting; + +// @public +export interface DefenderForAISettingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DefenderForAISettingsGetResponse = DefenderForAISetting; + +// @public +export interface DefenderForAISettingsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DefenderForAISettingsListNextResponse = DefenderForAISettingResult; + +// @public +export interface DefenderForAISettingsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DefenderForAISettingsListResponse = DefenderForAISettingResult; + +// @public +export type DefenderForAISettingState = string; + +// @public +export interface DefenderForAISettingsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DefenderForAISettingsUpdateResponse = DefenderForAISetting; + // @public export interface DeletedAccounts { beginPurge(location: string, resourceGroupName: string, accountName: string, options?: DeletedAccountsPurgeOptionalParams): Promise, void>>; @@ -674,6 +815,15 @@ export interface Deployment extends ProxyResource { properties?: DeploymentProperties; sku?: Sku; readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface DeploymentCapacitySettings { + designatedCapacity?: number; + priority?: number; } // @public @@ -687,7 +837,9 @@ export interface DeploymentModel { readonly callRateLimit?: CallRateLimit; format?: string; name?: string; + publisher?: string; source?: string; + sourceAccount?: string; version?: string; } @@ -700,7 +852,11 @@ export interface DeploymentProperties { readonly capabilities?: { [propertyName: string]: string; }; + capacitySettings?: DeploymentCapacitySettings; + currentCapacity?: number; + readonly dynamicThrottlingEnabled?: boolean; model?: DeploymentModel; + parentDeploymentName?: string; readonly provisioningState?: DeploymentProvisioningState; raiPolicyName?: string; readonly rateLimits?: ThrottlingRule[]; @@ -717,8 +873,11 @@ export interface Deployments { beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, deploymentName: string, deployment: Deployment, options?: DeploymentsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, accountName: string, deploymentName: string, options?: DeploymentsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, accountName: string, deploymentName: string, options?: DeploymentsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, deploymentName: string, deployment: PatchResourceTagsAndSku, options?: DeploymentsUpdateOptionalParams): Promise, DeploymentsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, deploymentName: string, deployment: PatchResourceTagsAndSku, options?: DeploymentsUpdateOptionalParams): Promise; get(resourceGroupName: string, accountName: string, deploymentName: string, options?: DeploymentsGetOptionalParams): Promise; list(resourceGroupName: string, accountName: string, options?: DeploymentsListOptionalParams): PagedAsyncIterableIterator; + listSkus(resourceGroupName: string, accountName: string, deploymentName: string, options?: DeploymentsListSkusOptionalParams): PagedAsyncIterableIterator; } // @public @@ -753,6 +912,12 @@ export interface DeploymentsGetOptionalParams extends coreClient.OperationOption // @public export type DeploymentsGetResponse = Deployment; +// @public +export interface DeploymentSkuListResult { + nextLink?: string; + readonly value?: SkuResource[]; +} + // @public export interface DeploymentsListNextOptionalParams extends coreClient.OperationOptions { } @@ -767,6 +932,35 @@ export interface DeploymentsListOptionalParams extends coreClient.OperationOptio // @public export type DeploymentsListResponse = DeploymentListResult; +// @public +export interface DeploymentsListSkusNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DeploymentsListSkusNextResponse = DeploymentSkuListResult; + +// @public +export interface DeploymentsListSkusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DeploymentsListSkusResponse = DeploymentSkuListResult; + +// @public +export interface DeploymentsUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface DeploymentsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DeploymentsUpdateResponse = Deployment; + // @public export interface DomainAvailability { isSubdomainAvailable?: boolean; @@ -782,6 +976,86 @@ export interface Encryption { keyVaultProperties?: KeyVaultProperties; } +// @public +export interface EncryptionScope extends ProxyResource { + readonly etag?: string; + properties?: EncryptionScopeProperties; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface EncryptionScopeListResult { + nextLink?: string; + value?: EncryptionScope[]; +} + +// @public +export interface EncryptionScopeProperties extends Encryption { + readonly provisioningState?: EncryptionScopeProvisioningState; + state?: EncryptionScopeState; +} + +// @public +export type EncryptionScopeProvisioningState = string; + +// @public +export interface EncryptionScopes { + beginDelete(resourceGroupName: string, accountName: string, encryptionScopeName: string, options?: EncryptionScopesDeleteOptionalParams): Promise, EncryptionScopesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, encryptionScopeName: string, options?: EncryptionScopesDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, encryptionScopeName: string, encryptionScope: EncryptionScope, options?: EncryptionScopesCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, encryptionScopeName: string, options?: EncryptionScopesGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: EncryptionScopesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface EncryptionScopesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EncryptionScopesCreateOrUpdateResponse = EncryptionScope; + +// @public +export interface EncryptionScopesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface EncryptionScopesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type EncryptionScopesDeleteResponse = EncryptionScopesDeleteHeaders; + +// @public +export interface EncryptionScopesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EncryptionScopesGetResponse = EncryptionScope; + +// @public +export interface EncryptionScopesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EncryptionScopesListNextResponse = EncryptionScopeListResult; + +// @public +export interface EncryptionScopesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EncryptionScopesListResponse = EncryptionScopeListResult; + +// @public +export type EncryptionScopeState = string; + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -849,6 +1123,12 @@ export enum KnownActionType { Internal = "Internal" } +// @public +export enum KnownByPassSelection { + AzureServices = "AzureServices", + None = "None" +} + // @public export enum KnownCommitmentPlanProvisioningState { Accepted = "Accepted", @@ -860,6 +1140,13 @@ export enum KnownCommitmentPlanProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownContentLevel { + High = "High", + Low = "Low", + Medium = "Medium" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -868,6 +1155,12 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDefenderForAISettingState { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownDeploymentModelVersionUpgradeOption { NoAutoUpgrade = "NoAutoUpgrade", @@ -893,6 +1186,23 @@ export enum KnownDeploymentScaleType { Standard = "Standard" } +// @public +export enum KnownEncryptionScopeProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Moving = "Moving", + Succeeded = "Succeeded" +} + +// @public +export enum KnownEncryptionScopeState { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownHostingModel { ConnectedContainer = "ConnectedContainer", @@ -909,8 +1219,11 @@ export enum KnownKeySource { // @public export enum KnownModelLifecycleStatus { + Deprecated = "Deprecated", + Deprecating = "Deprecating", GenerallyAvailable = "GenerallyAvailable", - Preview = "Preview" + Preview = "Preview", + Stable = "Stable" } // @public @@ -919,6 +1232,12 @@ export enum KnownNetworkRuleAction { Deny = "Deny" } +// @public +export enum KnownNspAccessRuleDirection { + Inbound = "Inbound", + Outbound = "Outbound" +} + // @public export enum KnownOrigin { System = "system", @@ -966,6 +1285,26 @@ export enum KnownQuotaUsageStatus { Unknown = "Unknown" } +// @public +export enum KnownRaiPolicyContentSource { + Completion = "Completion", + Prompt = "Prompt" +} + +// @public +export enum KnownRaiPolicyMode { + AsynchronousFilter = "Asynchronous_filter", + Blocking = "Blocking", + Default = "Default", + Deferred = "Deferred" +} + +// @public +export enum KnownRaiPolicyType { + SystemManaged = "SystemManaged", + UserManaged = "UserManaged" +} + // @public export enum KnownResourceSkuRestrictionsReasonCode { NotAvailableForSubscription = "NotAvailableForSubscription", @@ -999,6 +1338,25 @@ export enum KnownUnitType { Seconds = "Seconds" } +// @public +export interface LocationBasedModelCapacities { + list(location: string, modelFormat: string, modelName: string, modelVersion: string, options?: LocationBasedModelCapacitiesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface LocationBasedModelCapacitiesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocationBasedModelCapacitiesListNextResponse = ModelCapacityListResult; + +// @public +export interface LocationBasedModelCapacitiesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocationBasedModelCapacitiesListResponse = ModelCapacityListResult; + // @public export interface MetricName { localizedValue?: string; @@ -1007,53 +1365,107 @@ export interface MetricName { // @public export interface Model { + description?: string; kind?: string; model?: AccountModel; skuName?: string; } // @public -export interface ModelDeprecationInfo { - fineTune?: string; - inference?: string; +export interface ModelCapacities { + list(modelFormat: string, modelName: string, modelVersion: string, options?: ModelCapacitiesListOptionalParams): PagedAsyncIterableIterator; } // @public -export type ModelLifecycleStatus = string; +export interface ModelCapacitiesListNextOptionalParams extends coreClient.OperationOptions { +} // @public -export interface ModelListResult { - nextLink?: string; - value?: Model[]; -} +export type ModelCapacitiesListNextResponse = ModelCapacityListResult; // @public -export interface Models { - list(location: string, options?: ModelsListOptionalParams): PagedAsyncIterableIterator; +export interface ModelCapacitiesListOptionalParams extends coreClient.OperationOptions { } // @public -export interface ModelSku { - capacity?: CapacityConfig; - deprecationDate?: Date; - name?: string; - rateLimits?: CallRateLimit[]; - usageName?: string; -} +export type ModelCapacitiesListResponse = ModelCapacityListResult; // @public -export interface ModelsListNextOptionalParams extends coreClient.OperationOptions { +export interface ModelCapacityCalculatorWorkload { + requestParameters?: ModelCapacityCalculatorWorkloadRequestParam; + requestPerMinute?: number; } // @public -export type ModelsListNextResponse = ModelListResult; +export interface ModelCapacityCalculatorWorkloadRequestParam { + avgGeneratedTokens?: number; + avgPromptTokens?: number; +} // @public -export interface ModelsListOptionalParams extends coreClient.OperationOptions { +export interface ModelCapacityListResult { + nextLink?: string; + value?: ModelCapacityListResultValueItem[]; } -// @public -export type ModelsListResponse = ModelListResult; +// @public (undocumented) +export interface ModelCapacityListResultValueItem extends ProxyResource { + location?: string; + properties?: ModelSkuCapacityProperties; +} + +// @public +export interface ModelDeprecationInfo { + fineTune?: string; + inference?: string; +} + +// @public +export type ModelLifecycleStatus = string; + +// @public +export interface ModelListResult { + nextLink?: string; + value?: Model[]; +} + +// @public +export interface Models { + list(location: string, options?: ModelsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ModelSku { + capacity?: CapacityConfig; + cost?: BillingMeterInfo[]; + deprecationDate?: Date; + name?: string; + rateLimits?: CallRateLimit[]; + usageName?: string; +} + +// @public +export interface ModelSkuCapacityProperties { + availableCapacity?: number; + availableFinetuneCapacity?: number; + model?: DeploymentModel; + // (undocumented) + skuName?: string; +} + +// @public +export interface ModelsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ModelsListNextResponse = ModelListResult; + +// @public +export interface ModelsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ModelsListResponse = ModelListResult; // @public export interface MultiRegionSettings { @@ -1067,11 +1479,122 @@ export type NetworkRuleAction = string; // @public export interface NetworkRuleSet { + bypass?: ByPassSelection; defaultAction?: NetworkRuleAction; ipRules?: IpRule[]; virtualNetworkRules?: VirtualNetworkRule[]; } +// @public +export interface NetworkSecurityPerimeter { + id?: string; + location?: string; + perimeterGuid?: string; +} + +// @public +export interface NetworkSecurityPerimeterAccessRule { + name?: string; + properties?: NetworkSecurityPerimeterAccessRuleProperties; +} + +// @public +export interface NetworkSecurityPerimeterAccessRuleProperties { + addressPrefixes?: string[]; + direction?: NspAccessRuleDirection; + fullyQualifiedDomainNames?: string[]; + networkSecurityPerimeters?: NetworkSecurityPerimeter[]; + subscriptions?: NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem[]; +} + +// @public +export interface NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem { + id?: string; +} + +// @public +export interface NetworkSecurityPerimeterConfiguration extends ProxyResource { + properties?: NetworkSecurityPerimeterConfigurationProperties; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationAssociationInfo { + accessMode?: string; + name?: string; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationList { + nextLink?: string; + value?: NetworkSecurityPerimeterConfiguration[]; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationProperties { + networkSecurityPerimeter?: NetworkSecurityPerimeter; + profile?: NetworkSecurityPerimeterProfileInfo; + provisioningIssues?: ProvisioningIssue[]; + readonly provisioningState?: string; + resourceAssociation?: NetworkSecurityPerimeterConfigurationAssociationInfo; +} + +// @public +export interface NetworkSecurityPerimeterConfigurations { + beginReconcile(resourceGroupName: string, accountName: string, nspConfigurationName: string, options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams): Promise, NetworkSecurityPerimeterConfigurationsReconcileResponse>>; + beginReconcileAndWait(resourceGroupName: string, accountName: string, nspConfigurationName: string, options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, nspConfigurationName: string, options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: NetworkSecurityPerimeterConfigurationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationsGetResponse = NetworkSecurityPerimeterConfiguration; + +// @public +export interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationsListNextResponse = NetworkSecurityPerimeterConfigurationList; + +// @public +export interface NetworkSecurityPerimeterConfigurationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationsListResponse = NetworkSecurityPerimeterConfigurationList; + +// @public +export interface NetworkSecurityPerimeterConfigurationsReconcileHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkSecurityPerimeterConfigurationsReconcileResponse = NetworkSecurityPerimeterConfiguration; + +// @public +export interface NetworkSecurityPerimeterProfileInfo { + // (undocumented) + accessRules?: NetworkSecurityPerimeterAccessRule[]; + accessRulesVersion?: number; + diagnosticSettingsVersion?: number; + enabledLogCategories?: string[]; + name?: string; +} + +// @public +export type NspAccessRuleDirection = string; + // @public export interface Operation { readonly actionType?: ActionType; @@ -1236,6 +1759,21 @@ export interface PrivateLinkServiceConnectionState { status?: PrivateEndpointServiceConnectionStatus; } +// @public (undocumented) +export interface ProvisioningIssue { + name?: string; + properties?: ProvisioningIssueProperties; +} + +// @public +export interface ProvisioningIssueProperties { + description?: string; + issueType?: string; + severity?: string; + suggestedAccessRules?: NetworkSecurityPerimeterAccessRule[]; + suggestedResourceIds?: string[]; +} + // @public export type ProvisioningState = string; @@ -1259,6 +1797,325 @@ export interface QuotaLimit { // @public export type QuotaUsageStatus = string; +// @public +export interface RaiBlocklist extends ProxyResource { + readonly etag?: string; + properties?: RaiBlocklistProperties; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface RaiBlocklistConfig { + blocking?: boolean; + blocklistName?: string; +} + +// @public +export interface RaiBlocklistItem extends ProxyResource { + readonly etag?: string; + properties?: RaiBlocklistItemProperties; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface RaiBlocklistItemBulkRequest { + // (undocumented) + name?: string; + properties?: RaiBlocklistItemProperties; +} + +// @public +export interface RaiBlocklistItemProperties { + isRegex?: boolean; + pattern?: string; +} + +// @public +export interface RaiBlocklistItems { + batchAdd(resourceGroupName: string, accountName: string, raiBlocklistName: string, raiBlocklistItems: RaiBlocklistItemBulkRequest[], options?: RaiBlocklistItemsBatchAddOptionalParams): Promise; + batchDelete(resourceGroupName: string, accountName: string, raiBlocklistName: string, raiBlocklistItemsNames: string[], options?: RaiBlocklistItemsBatchDeleteOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, raiBlocklistName: string, raiBlocklistItemName: string, options?: RaiBlocklistItemsDeleteOptionalParams): Promise, RaiBlocklistItemsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, raiBlocklistName: string, raiBlocklistItemName: string, options?: RaiBlocklistItemsDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, raiBlocklistName: string, raiBlocklistItemName: string, raiBlocklistItem: RaiBlocklistItem, options?: RaiBlocklistItemsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, raiBlocklistName: string, raiBlocklistItemName: string, options?: RaiBlocklistItemsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, raiBlocklistName: string, options?: RaiBlocklistItemsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RaiBlocklistItemsBatchAddOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiBlocklistItemsBatchAddResponse = RaiBlocklist; + +// @public +export interface RaiBlocklistItemsBatchDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface RaiBlocklistItemsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiBlocklistItemsCreateOrUpdateResponse = RaiBlocklistItem; + +// @public +export interface RaiBlocklistItemsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface RaiBlocklistItemsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type RaiBlocklistItemsDeleteResponse = RaiBlocklistItemsDeleteHeaders; + +// @public +export interface RaiBlocklistItemsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiBlocklistItemsGetResponse = RaiBlocklistItem; + +// @public +export interface RaiBlocklistItemsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiBlocklistItemsListNextResponse = RaiBlockListItemsResult; + +// @public +export interface RaiBlocklistItemsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiBlocklistItemsListResponse = RaiBlockListItemsResult; + +// @public +export interface RaiBlockListItemsResult { + nextLink?: string; + value?: RaiBlocklistItem[]; +} + +// @public +export interface RaiBlocklistProperties { + description?: string; +} + +// @public +export interface RaiBlockListResult { + nextLink?: string; + value?: RaiBlocklist[]; +} + +// @public +export interface RaiBlocklists { + beginDelete(resourceGroupName: string, accountName: string, raiBlocklistName: string, options?: RaiBlocklistsDeleteOptionalParams): Promise, RaiBlocklistsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, raiBlocklistName: string, options?: RaiBlocklistsDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, raiBlocklistName: string, raiBlocklist: RaiBlocklist, options?: RaiBlocklistsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, raiBlocklistName: string, options?: RaiBlocklistsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: RaiBlocklistsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RaiBlocklistsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiBlocklistsCreateOrUpdateResponse = RaiBlocklist; + +// @public +export interface RaiBlocklistsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface RaiBlocklistsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type RaiBlocklistsDeleteResponse = RaiBlocklistsDeleteHeaders; + +// @public +export interface RaiBlocklistsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiBlocklistsGetResponse = RaiBlocklist; + +// @public +export interface RaiBlocklistsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiBlocklistsListNextResponse = RaiBlockListResult; + +// @public +export interface RaiBlocklistsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiBlocklistsListResponse = RaiBlockListResult; + +// @public +export interface RaiContentFilter extends ProxyResource { + properties?: RaiContentFilterProperties; +} + +// @public +export interface RaiContentFilterListResult { + nextLink?: string; + value?: RaiContentFilter[]; +} + +// @public +export interface RaiContentFilterProperties { + isMultiLevelFilter?: boolean; + name?: string; + source?: RaiPolicyContentSource; +} + +// @public +export interface RaiContentFilters { + get(location: string, filterName: string, options?: RaiContentFiltersGetOptionalParams): Promise; + list(location: string, options?: RaiContentFiltersListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RaiContentFiltersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiContentFiltersGetResponse = RaiContentFilter; + +// @public +export interface RaiContentFiltersListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiContentFiltersListNextResponse = RaiContentFilterListResult; + +// @public +export interface RaiContentFiltersListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiContentFiltersListResponse = RaiContentFilterListResult; + +// @public +export interface RaiMonitorConfig { + adxStorageResourceId?: string; + identityClientId?: string; +} + +// @public +export interface RaiPolicies { + beginDelete(resourceGroupName: string, accountName: string, raiPolicyName: string, options?: RaiPoliciesDeleteOptionalParams): Promise, RaiPoliciesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, raiPolicyName: string, options?: RaiPoliciesDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, raiPolicyName: string, raiPolicy: RaiPolicy, options?: RaiPoliciesCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, raiPolicyName: string, options?: RaiPoliciesGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: RaiPoliciesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RaiPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiPoliciesCreateOrUpdateResponse = RaiPolicy; + +// @public +export interface RaiPoliciesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface RaiPoliciesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type RaiPoliciesDeleteResponse = RaiPoliciesDeleteHeaders; + +// @public +export interface RaiPoliciesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiPoliciesGetResponse = RaiPolicy; + +// @public +export interface RaiPoliciesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiPoliciesListNextResponse = RaiPolicyListResult; + +// @public +export interface RaiPoliciesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RaiPoliciesListResponse = RaiPolicyListResult; + +// @public +export interface RaiPolicy extends ProxyResource { + readonly etag?: string; + properties?: RaiPolicyProperties; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface RaiPolicyContentFilter { + blocking?: boolean; + enabled?: boolean; + name?: string; + severityThreshold?: ContentLevel; + source?: RaiPolicyContentSource; +} + +// @public +export type RaiPolicyContentSource = string; + +// @public +export interface RaiPolicyListResult { + nextLink?: string; + value?: RaiPolicy[]; +} + +// @public +export type RaiPolicyMode = string; + +// @public +export interface RaiPolicyProperties { + basePolicyName?: string; + contentFilters?: RaiPolicyContentFilter[]; + customBlocklists?: CustomBlocklistConfig[]; + mode?: RaiPolicyMode; + readonly type?: RaiPolicyType; +} + +// @public +export type RaiPolicyType = string; + // @public export interface RegenerateKeyParameters { keyName: KeyName; @@ -1384,6 +2241,13 @@ export interface SkuChangeInfo { lastChangeDate?: string; } +// @public +export interface SkuResource { + capacity?: CapacityConfig; + resourceType?: string; + sku?: Sku; +} + // @public export type SkuTier = string; @@ -1459,6 +2323,12 @@ export interface UserAssignedIdentity { readonly principalId?: string; } +// @public +export interface UserOwnedAmlWorkspace { + identityClientId?: string; + resourceId?: string; +} + // @public export interface UserOwnedStorage { // (undocumented) diff --git a/sdk/cognitiveservices/arm-cognitiveservices/sample.env b/sdk/cognitiveservices/arm-cognitiveservices/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/sample.env +++ b/sdk/cognitiveservices/arm-cognitiveservices/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsCreateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsCreateSample.ts index 3ea44bc34aa9..855b9df8b2c1 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsCreateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsCreateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { Account, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. * * @summary Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateAccount.json */ async function createAccount() { const subscriptionId = @@ -40,27 +40,27 @@ async function createAccount() { keyVaultProperties: { keyName: "KeyName", keyVaultUri: "https://pltfrmscrts-use-pc-dev.vault.azure.net/", - keyVersion: "891CF236-D241-4738-9462-D506AF493DFA" - } + keyVersion: "891CF236-D241-4738-9462-D506AF493DFA", + }, }, userOwnedStorage: [ { resourceId: - "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" - } - ] + "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount", + }, + ], }, - sku: { name: "S0" } + sku: { name: "S0" }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.beginCreateAndWait( resourceGroupName, accountName, - account + account, ); console.log(result); } @@ -69,7 +69,7 @@ async function createAccount() { * This sample demonstrates how to Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. * * @summary Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccountMin.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateAccountMin.json */ async function createAccountMin() { const subscriptionId = @@ -83,17 +83,17 @@ async function createAccountMin() { kind: "CognitiveServices", location: "West US", properties: {}, - sku: { name: "S0" } + sku: { name: "S0" }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.beginCreateAndWait( resourceGroupName, accountName, - account + account, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsDeleteSample.ts index 33d53c777986..59e4b1e72fd6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. * * @summary Deletes a Cognitive Services account from the resource group. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteAccount.json */ async function deleteAccount() { const subscriptionId = @@ -30,11 +30,11 @@ async function deleteAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.beginDeleteAndWait( resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsGetSample.ts index 3e282b94249b..ac95f4b8b6c4 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. * * @summary Returns a Cognitive Services account specified by the parameters. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetAccount.json */ async function getAccount() { const subscriptionId = @@ -30,7 +30,7 @@ async function getAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.get(resourceGroupName, accountName); console.log(result); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListByResourceGroupSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListByResourceGroupSample.ts index 745fbe133669..d745c5549342 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListByResourceGroupSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a resource group * * @summary Returns all the resources of a particular type belonging to a resource group - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsByResourceGroup.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsByResourceGroup.json */ async function listAccountsByResourceGroup() { const subscriptionId = @@ -29,11 +29,11 @@ async function listAccountsByResourceGroup() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.accounts.listByResourceGroup( - resourceGroupName + resourceGroupName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListKeysSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListKeysSample.ts index 771bd4d6c0eb..4008a5a30e06 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListKeysSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the account keys for the specified Cognitive Services account. * * @summary Lists the account keys for the specified Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListKeys.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListKeys.json */ async function listKeys() { const subscriptionId = @@ -30,7 +30,7 @@ async function listKeys() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.listKeys(resourceGroupName, accountName); console.log(result); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListModelsSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListModelsSample.ts index 784908b14d66..fb1c3cf7fcfc 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListModelsSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListModelsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List available Models for the requested Cognitive Services account * * @summary List available Models for the requested Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountModels.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountModels.json */ async function listAccountModels() { const subscriptionId = @@ -29,12 +29,12 @@ async function listAccountModels() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.accounts.listModels( resourceGroupName, - accountName + accountName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSample.ts index 782cfcdb45d4..459ed193ce70 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription. * * @summary Returns all the resources of a particular type belonging to a subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsBySubscription.json */ async function listAccountsBySubscription() { const subscriptionId = @@ -27,7 +27,7 @@ async function listAccountsBySubscription() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.accounts.list()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSkusSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSkusSample.ts index c9444233c795..589e04f843ec 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSkusSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSkusSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List available SKUs for the requested Cognitive Services account * * @summary List available SKUs for the requested Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSkus.json */ async function listSkUs() { const subscriptionId = @@ -30,7 +30,7 @@ async function listSkUs() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.listSkus(resourceGroupName, accountName); console.log(result); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListUsagesSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListUsagesSample.ts index 86bd58b9d6bf..029ea5222299 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListUsagesSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListUsagesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get usages for the requested Cognitive Services account * * @summary Get usages for the requested Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetUsages.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetUsages.json */ async function getUsages() { const subscriptionId = @@ -30,11 +30,11 @@ async function getUsages() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.listUsages( resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsRegenerateKeySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsRegenerateKeySample.ts index f44268b22ef5..19aad9824fd6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsRegenerateKeySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsRegenerateKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Regenerates the specified account key for the specified Cognitive Services account. * * @summary Regenerates the specified account key for the specified Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/RegenerateKey.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/RegenerateKey.json */ async function regenerateKeys() { const subscriptionId = @@ -31,12 +31,12 @@ async function regenerateKeys() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.regenerateKey( resourceGroupName, accountName, - keyName + keyName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsUpdateSample.ts index 026d5878848a..57b80519420d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { Account, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates a Cognitive Services account * * @summary Updates a Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateAccount.json */ async function updateAccount() { const subscriptionId = @@ -34,12 +34,12 @@ async function updateAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.beginUpdateAndWait( resourceGroupName, accountName, - account + account, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/calculateModelCapacitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/calculateModelCapacitySample.ts new file mode 100644 index 000000000000..eb574b9cecee --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/calculateModelCapacitySample.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CalculateModelCapacityOptionalParams, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Model capacity calculator. + * + * @summary Model capacity calculator. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CalculateModelCapacity.json + */ +async function calculateModelCapacity() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; + const model = { name: "gpt-4", format: "OpenAI", version: "0613" }; + const skuName = "ProvisionedManaged"; + const workloads = [ + { + requestParameters: { avgGeneratedTokens: 50, avgPromptTokens: 30 }, + requestPerMinute: 10, + }, + { + requestParameters: { avgGeneratedTokens: 20, avgPromptTokens: 60 }, + requestPerMinute: 20, + }, + ]; + const options: CalculateModelCapacityOptionalParams = { + model, + skuName, + workloads, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.calculateModelCapacity(options); + console.log(result); +} + +async function main() { + calculateModelCapacity(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkDomainAvailabilitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkDomainAvailabilitySample.ts index f700c7ff52e4..7485d605c90c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkDomainAvailabilitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkDomainAvailabilitySample.ts @@ -8,7 +8,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { + CheckDomainAvailabilityOptionalParams, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -18,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Check whether a domain is available. * * @summary Check whether a domain is available. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckDomainAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckDomainAvailability.json */ async function checkSkuAvailability() { const subscriptionId = @@ -26,12 +29,18 @@ async function checkSkuAvailability() { "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; const subdomainName = "contosodemoapp1"; const typeParam = "Microsoft.CognitiveServices/accounts"; + const kind = "undefined"; + const options: CheckDomainAvailabilityOptionalParams = { kind }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, + ); + const result = await client.checkDomainAvailability( + subdomainName, + typeParam, + options, ); - const result = await client.checkDomainAvailability(subdomainName, typeParam); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkSkuAvailabilitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkSkuAvailabilitySample.ts index 5855bef8112d..636fffb9777f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkSkuAvailabilitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkSkuAvailabilitySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Check available SKUs. * * @summary Check available SKUs. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckSkuAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckSkuAvailability.json */ async function checkSkuAvailability() { const subscriptionId = @@ -31,13 +31,13 @@ async function checkSkuAvailability() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.checkSkuAvailability( location, skus, kind, - typeParam + typeParam, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts index ff401aeb264d..dbfb5dfd8893 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CommitmentPlanAccountAssociation, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update the association of the Cognitive Services commitment plan. * * @summary Create or update the association of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlanAssociation.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlanAssociation.json */ async function putCommitmentPlan() { const subscriptionId = @@ -33,19 +33,20 @@ async function putCommitmentPlan() { const commitmentPlanAssociationName = "commitmentPlanAssociationName"; const association: CommitmentPlanAccountAssociation = { accountId: - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName" + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName", }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId - ); - const result = await client.commitmentPlans.beginCreateOrUpdateAssociationAndWait( - resourceGroupName, - commitmentPlanName, - commitmentPlanAssociationName, - association + subscriptionId, ); + const result = + await client.commitmentPlans.beginCreateOrUpdateAssociationAndWait( + resourceGroupName, + commitmentPlanName, + commitmentPlanAssociationName, + association, + ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts index 9f9108237438..2f47d0db7c64 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CommitmentPlan, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create Cognitive Services commitment plan. * * @summary Create Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlan.json */ async function createCommitmentPlan() { const subscriptionId = @@ -37,19 +37,19 @@ async function createCommitmentPlan() { autoRenew: true, current: { tier: "T1" }, hostingModel: "Web", - planType: "STT" + planType: "STT", }, - sku: { name: "S0" } + sku: { name: "S0" }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginCreateOrUpdatePlanAndWait( resourceGroupName, commitmentPlanName, - commitmentPlan + commitmentPlan, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateSample.ts index 0c06c9ea88fa..a6c6085da394 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CommitmentPlan, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the state of specified commitmentPlans associated with the Cognitive Services account. * * @summary Update the state of specified commitmentPlans associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutCommitmentPlan.json */ async function putCommitmentPlan() { const subscriptionId = @@ -35,19 +35,19 @@ async function putCommitmentPlan() { autoRenew: true, current: { tier: "T1" }, hostingModel: "Web", - planType: "Speech2Text" - } + planType: "Speech2Text", + }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.createOrUpdate( resourceGroupName, accountName, commitmentPlanName, - commitmentPlan + commitmentPlan, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteAssociationSample.ts index 162b05c08d55..6b3597d80684 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteAssociationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the association of the Cognitive Services commitment plan. * * @summary Deletes the association of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlanAssociation.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlanAssociation.json */ async function deleteCommitmentPlan() { const subscriptionId = @@ -31,12 +31,12 @@ async function deleteCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginDeleteAssociationAndWait( resourceGroupName, commitmentPlanName, - commitmentPlanAssociationName + commitmentPlanAssociationName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeletePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeletePlanSample.ts index 301fef54d38c..03b444a86f59 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeletePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeletePlanSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Cognitive Services commitment plan from the resource group. * * @summary Deletes a Cognitive Services commitment plan from the resource group. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlan.json */ async function deleteCommitmentPlan() { const subscriptionId = @@ -30,11 +30,11 @@ async function deleteCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginDeletePlanAndWait( resourceGroupName, - commitmentPlanName + commitmentPlanName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteSample.ts index 09dd7183c48f..132fab570c32 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified commitmentPlan associated with the Cognitive Services account. * * @summary Deletes the specified commitmentPlan associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteCommitmentPlan.json */ async function deleteCommitmentPlan() { const subscriptionId = @@ -30,12 +30,12 @@ async function deleteCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginDeleteAndWait( resourceGroupName, accountName, - commitmentPlanName + commitmentPlanName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetAssociationSample.ts index 9f4fa56be2f0..3f879364a3be 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetAssociationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the association of the Cognitive Services commitment plan. * * @summary Gets the association of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlanAssociation.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlanAssociation.json */ async function getCommitmentPlan() { const subscriptionId = @@ -31,12 +31,12 @@ async function getCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.getAssociation( resourceGroupName, commitmentPlanName, - commitmentPlanAssociationName + commitmentPlanAssociationName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetPlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetPlanSample.ts index cdba25afd463..fbb8d8b570d7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetPlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetPlanSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Cognitive Services commitment plan specified by the parameters. * * @summary Returns a Cognitive Services commitment plan specified by the parameters. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlan.json */ async function getCommitmentPlan() { const subscriptionId = @@ -30,11 +30,11 @@ async function getCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.getPlan( resourceGroupName, - commitmentPlanName + commitmentPlanName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetSample.ts index 3837c757d9f1..a26c94a48cdd 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified commitmentPlans associated with the Cognitive Services account. * * @summary Gets the specified commitmentPlans associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetCommitmentPlan.json */ async function getCommitmentPlan() { const subscriptionId = @@ -30,12 +30,12 @@ async function getCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.get( resourceGroupName, accountName, - commitmentPlanName + commitmentPlanName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListAssociationsSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListAssociationsSample.ts index e5b660d08a14..fd42f859d793 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListAssociationsSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListAssociationsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the associations of the Cognitive Services commitment plan. * * @summary Gets the associations of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlanAssociations.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlanAssociations.json */ async function listCommitmentPlans() { const subscriptionId = @@ -30,12 +30,12 @@ async function listCommitmentPlans() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentPlans.listAssociations( resourceGroupName, - commitmentPlanName + commitmentPlanName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansByResourceGroupSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansByResourceGroupSample.ts index 51cc35808db0..202ec83ffc21 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansByResourceGroupSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a resource group * * @summary Returns all the resources of a particular type belonging to a resource group - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansByResourceGroup.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansByResourceGroup.json */ async function listCommitmentPlansByResourceGroup() { const subscriptionId = @@ -29,11 +29,11 @@ async function listCommitmentPlansByResourceGroup() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentPlans.listPlansByResourceGroup( - resourceGroupName + resourceGroupName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansBySubscriptionSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansBySubscriptionSample.ts index 7197e56a904b..d27f76c6b04f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansBySubscriptionSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription. * * @summary Returns all the resources of a particular type belonging to a subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansBySubscription.json */ async function listAccountsBySubscription() { const subscriptionId = @@ -27,7 +27,7 @@ async function listAccountsBySubscription() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentPlans.listPlansBySubscription()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListSample.ts index 9de1fc1a8fc9..991f990c845d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the commitmentPlans associated with the Cognitive Services account. * * @summary Gets the commitmentPlans associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentPlans.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentPlans.json */ async function listCommitmentPlans() { const subscriptionId = @@ -29,12 +29,12 @@ async function listCommitmentPlans() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentPlans.list( resourceGroupName, - accountName + accountName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansUpdatePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansUpdatePlanSample.ts index a659f4ed6b2d..92e793e64378 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansUpdatePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansUpdatePlanSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { PatchResourceTagsAndSku, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create Cognitive Services commitment plan. * * @summary Create Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateSharedCommitmentPlan.json */ async function createCommitmentPlan() { const subscriptionId = @@ -34,12 +34,12 @@ async function createCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginUpdatePlanAndWait( resourceGroupName, commitmentPlanName, - commitmentPlan + commitmentPlan, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentTiersListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentTiersListSample.ts index 1bd95c1d9781..0b0886e688d0 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentTiersListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentTiersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List Commitment Tiers. * * @summary List Commitment Tiers. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentTiers.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentTiers.json */ async function listCommitmentTiers() { const subscriptionId = @@ -27,7 +27,7 @@ async function listCommitmentTiers() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentTiers.list(location)) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6cfcd068d7e5 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsCreateOrUpdateSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + DefenderForAISetting, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or Updates the specified Defender for AI setting. + * + * @summary Creates or Updates the specified Defender for AI setting. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDefenderForAISetting.json + */ +async function putDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const defenderForAISettingName = "Default"; + const defenderForAISettings: DefenderForAISetting = { state: "Enabled" }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.defenderForAISettings.createOrUpdate( + resourceGroupName, + accountName, + defenderForAISettingName, + defenderForAISettings, + ); + console.log(result); +} + +async function main() { + putDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsGetSample.ts new file mode 100644 index 000000000000..c6e939608b9c --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified Defender for AI setting by name. + * + * @summary Gets the specified Defender for AI setting by name. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDefenderForAISetting.json + */ +async function getDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const defenderForAISettingName = "Default"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.defenderForAISettings.get( + resourceGroupName, + accountName, + defenderForAISettingName, + ); + console.log(result); +} + +async function main() { + getDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsListSample.ts new file mode 100644 index 000000000000..db6f0824c430 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists the Defender for AI settings. + * + * @summary Lists the Defender for AI settings. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDefenderForAISetting.json + */ +async function listDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.defenderForAISettings.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsUpdateSample.ts new file mode 100644 index 000000000000..52ae8d5f9066 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsUpdateSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + DefenderForAISetting, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates the specified Defender for AI setting. + * + * @summary Updates the specified Defender for AI setting. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDefenderForAISetting.json + */ +async function updateDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const defenderForAISettingName = "Default"; + const defenderForAISettings: DefenderForAISetting = { state: "Enabled" }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.defenderForAISettings.update( + resourceGroupName, + accountName, + defenderForAISettingName, + defenderForAISettings, + ); + console.log(result); +} + +async function main() { + updateDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsGetSample.ts index 639c41d16742..92d899b308da 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. * * @summary Returns a Cognitive Services account specified by the parameters. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeletedAccount.json */ async function getAccount() { const subscriptionId = @@ -31,12 +31,12 @@ async function getAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deletedAccounts.get( location, resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsListSample.ts index 6fea1231434b..8f23a5684d87 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription. * * @summary Returns all the resources of a particular type belonging to a subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeletedAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeletedAccountsBySubscription.json */ async function listDeletedAccountsBySubscription() { const subscriptionId = @@ -27,7 +27,7 @@ async function listDeletedAccountsBySubscription() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.deletedAccounts.list()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsPurgeSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsPurgeSample.ts index c0a868d3926e..198857f8a548 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsPurgeSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsPurgeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. * * @summary Deletes a Cognitive Services account from the resource group. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PurgeDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PurgeDeletedAccount.json */ async function deleteAccount() { const subscriptionId = @@ -31,12 +31,12 @@ async function deleteAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deletedAccounts.beginPurgeAndWait( location, resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsCreateOrUpdateSample.ts index c9f1e144cdb3..40d90a634ed2 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsCreateOrUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { Deployment, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the state of specified deployments associated with the Cognitive Services account. * * @summary Update the state of specified deployments associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDeployment.json */ async function putDeployment() { const subscriptionId = @@ -32,18 +32,18 @@ async function putDeployment() { const deploymentName = "deploymentName"; const deployment: Deployment = { properties: { model: { name: "ada", format: "OpenAI", version: "1" } }, - sku: { name: "Standard", capacity: 1 } + sku: { name: "Standard", capacity: 1 }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deployments.beginCreateOrUpdateAndWait( resourceGroupName, accountName, deploymentName, - deployment + deployment, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsDeleteSample.ts index 81170273822c..935695b4acc1 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified deployment associated with the Cognitive Services account. * * @summary Deletes the specified deployment associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteDeployment.json */ async function deleteDeployment() { const subscriptionId = @@ -30,12 +30,12 @@ async function deleteDeployment() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deployments.beginDeleteAndWait( resourceGroupName, accountName, - deploymentName + deploymentName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsGetSample.ts index 57ed837c6d2f..eab4e40bffc6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified deployments associated with the Cognitive Services account. * * @summary Gets the specified deployments associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeployment.json */ async function getDeployment() { const subscriptionId = @@ -30,12 +30,12 @@ async function getDeployment() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deployments.get( resourceGroupName, accountName, - deploymentName + deploymentName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSample.ts index 696ac7c5d4ad..821645e90a95 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the deployments associated with the Cognitive Services account. * * @summary Gets the deployments associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeployments.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeployments.json */ async function listDeployments() { const subscriptionId = @@ -29,12 +29,12 @@ async function listDeployments() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.deployments.list( resourceGroupName, - accountName + accountName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSkusSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSkusSample.ts new file mode 100644 index 000000000000..f0f91473a804 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSkusSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists the specified deployments skus associated with the Cognitive Services account. + * + * @summary Lists the specified deployments skus associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeploymentSkus.json + */ +async function listDeploymentSkus() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const deploymentName = "deploymentName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.deployments.listSkus( + resourceGroupName, + accountName, + deploymentName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listDeploymentSkus(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsUpdateSample.ts new file mode 100644 index 000000000000..1218362d64e5 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + PatchResourceTagsAndSku, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update specified deployments associated with the Cognitive Services account. + * + * @summary Update specified deployments associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDeployment.json + */ +async function updateDeployment() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const deploymentName = "deploymentName"; + const deployment: PatchResourceTagsAndSku = { + sku: { name: "Standard", capacity: 1 }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.deployments.beginUpdateAndWait( + resourceGroupName, + accountName, + deploymentName, + deployment, + ); + console.log(result); +} + +async function main() { + updateDeployment(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a343b56c5a98 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesCreateOrUpdateSample.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + EncryptionScope, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified encryptionScope associated with the Cognitive Services account. + * + * @summary Update the state of specified encryptionScope associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutEncryptionScope.json + */ +async function putEncryptionScope() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const encryptionScopeName = "encryptionScopeName"; + const encryptionScope: EncryptionScope = { + properties: { + keySource: "Microsoft.KeyVault", + keyVaultProperties: { + identityClientId: "00000000-0000-0000-0000-000000000000", + keyName: "DevKeyWestUS2", + keyVaultUri: "https://devkvwestus2.vault.azure.net/", + keyVersion: "9f85549d7bf14ff4bf178c10d3bdca95", + }, + state: "Enabled", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.encryptionScopes.createOrUpdate( + resourceGroupName, + accountName, + encryptionScopeName, + encryptionScope, + ); + console.log(result); +} + +async function main() { + putEncryptionScope(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesDeleteSample.ts new file mode 100644 index 000000000000..0a213ace78fc --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesDeleteSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified encryptionScope associated with the Cognitive Services account. + * + * @summary Deletes the specified encryptionScope associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteEncryptionScope.json + */ +async function deleteEncryptionScope() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const encryptionScopeName = "encryptionScopeName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.encryptionScopes.beginDeleteAndWait( + resourceGroupName, + accountName, + encryptionScopeName, + ); + console.log(result); +} + +async function main() { + deleteEncryptionScope(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesGetSample.ts new file mode 100644 index 000000000000..e595b6dc9478 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified EncryptionScope associated with the Cognitive Services account. + * + * @summary Gets the specified EncryptionScope associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetEncryptionScope.json + */ +async function getEncryptionScope() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const encryptionScopeName = "encryptionScopeName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.encryptionScopes.get( + resourceGroupName, + accountName, + encryptionScopeName, + ); + console.log(result); +} + +async function main() { + getEncryptionScope(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesListSample.ts new file mode 100644 index 000000000000..014cb9a2c0f9 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. + * + * @summary Gets the content filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListEncryptionScopes.json + */ +async function listEncryptionScopes() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.encryptionScopes.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listEncryptionScopes(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/locationBasedModelCapacitiesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/locationBasedModelCapacitiesListSample.ts new file mode 100644 index 000000000000..1c509fedbeb6 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/locationBasedModelCapacitiesListSample.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List Location Based ModelCapacities. + * + * @summary List Location Based ModelCapacities. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationBasedModelCapacities.json + */ +async function listLocationBasedModelCapacities() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "WestUS"; + const modelFormat = "OpenAI"; + const modelName = "ada"; + const modelVersion = "1"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.locationBasedModelCapacities.list( + location, + modelFormat, + modelName, + modelVersion, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listLocationBasedModelCapacities(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelCapacitiesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelCapacitiesListSample.ts new file mode 100644 index 000000000000..832a8a581a8d --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelCapacitiesListSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List ModelCapacities. + * + * @summary List ModelCapacities. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListModelCapacities.json + */ +async function listModelCapacities() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const modelFormat = "OpenAI"; + const modelName = "ada"; + const modelVersion = "1"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.modelCapacities.list( + modelFormat, + modelName, + modelVersion, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listModelCapacities(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelsListSample.ts index 9140266e8061..da7e3e32a14d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelsListSample.ts @@ -18,9 +18,9 @@ dotenv.config(); * This sample demonstrates how to List Models. * * @summary List Models. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListModels.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationModels.json */ -async function listModels() { +async function listLocationModels() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -28,7 +28,7 @@ async function listModels() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.models.list(location)) { @@ -38,7 +38,7 @@ async function listModels() { } async function main() { - listModels(); + listLocationModels(); } main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts new file mode 100644 index 000000000000..6ae41f077c9c --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified NSP configurations for an account. + * + * @summary Gets the specified NSP configurations for an account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetNetworkSecurityPerimeterConfigurations.json + */ +async function getNetworkSecurityPerimeterConfigurations() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const nspConfigurationName = "NSPConfigurationName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.networkSecurityPerimeterConfigurations.get( + resourceGroupName, + accountName, + nspConfigurationName, + ); + console.log(result); +} + +async function main() { + getNetworkSecurityPerimeterConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts new file mode 100644 index 000000000000..52153b872821 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of NSP configurations for an account. + * + * @summary Gets a list of NSP configurations for an account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListNetworkSecurityPerimeterConfigurations.json + */ +async function listNetworkSecurityPerimeterConfigurations() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.networkSecurityPerimeterConfigurations.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listNetworkSecurityPerimeterConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts new file mode 100644 index 000000000000..51576bfd7239 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Reconcile the NSP configuration for an account. + * + * @summary Reconcile the NSP configuration for an account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ReconcileNetworkSecurityPerimeterConfigurations.json + */ +async function reconcileNetworkSecurityPerimeterConfigurations() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const nspConfigurationName = "NSPConfigurationName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = + await client.networkSecurityPerimeterConfigurations.beginReconcileAndWait( + resourceGroupName, + accountName, + nspConfigurationName, + ); + console.log(result); +} + +async function main() { + reconcileNetworkSecurityPerimeterConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/operationsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/operationsListSample.ts index db7fbbd6058a..8448aed6f43c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/operationsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the available Cognitive Services account operations. * * @summary Lists all the available Cognitive Services account operations. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetOperations.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetOperations.json */ async function getOperations() { const subscriptionId = @@ -27,7 +27,7 @@ async function getOperations() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.operations.list()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts index 4487d60de158..0197636331af 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { PrivateEndpointConnection, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the state of specified private endpoint connection associated with the Cognitive Services account. * * @summary Update the state of specified private endpoint connection associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutPrivateEndpointConnection.json */ async function putPrivateEndpointConnection() { const subscriptionId = @@ -34,21 +34,22 @@ async function putPrivateEndpointConnection() { properties: { privateLinkServiceConnectionState: { description: "Auto-Approved", - status: "Approved" - } - } + status: "Approved", + }, + }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId - ); - const result = await client.privateEndpointConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - accountName, - privateEndpointConnectionName, - properties + subscriptionId, ); + const result = + await client.privateEndpointConnections.beginCreateOrUpdateAndWait( + resourceGroupName, + accountName, + privateEndpointConnectionName, + properties, + ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsDeleteSample.ts index e21218ba87aa..dcae86191d76 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Cognitive Services account. * * @summary Deletes the specified private endpoint connection associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeletePrivateEndpointConnection.json */ async function deletePrivateEndpointConnection() { const subscriptionId = @@ -30,12 +30,12 @@ async function deletePrivateEndpointConnection() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.beginDeleteAndWait( resourceGroupName, accountName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsGetSample.ts index c2a36cf33147..a5b22733b314 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private endpoint connection associated with the Cognitive Services account. * * @summary Gets the specified private endpoint connection associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetPrivateEndpointConnection.json */ async function getPrivateEndpointConnection() { const subscriptionId = @@ -30,12 +30,12 @@ async function getPrivateEndpointConnection() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.get( resourceGroupName, accountName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsListSample.ts index dcd7ad7fedf0..80cda9ba650e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private endpoint connections associated with the Cognitive Services account. * * @summary Gets the private endpoint connections associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateEndpointConnections.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateEndpointConnections.json */ async function getPrivateEndpointConnection() { const subscriptionId = @@ -29,11 +29,11 @@ async function getPrivateEndpointConnection() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.list( resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateLinkResourcesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateLinkResourcesListSample.ts index 32d1c6f68415..0597eff94f24 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateLinkResourcesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateLinkResourcesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link resources that need to be created for a Cognitive Services account. * * @summary Gets the private link resources that need to be created for a Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateLinkResources.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateLinkResources.json */ async function listPrivateLinkResources() { const subscriptionId = @@ -29,11 +29,11 @@ async function listPrivateLinkResources() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateLinkResources.list( resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchAddSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchAddSample.ts new file mode 100644 index 000000000000..18d0a657fe9f --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchAddSample.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RaiBlocklistItemBulkRequest, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Batch operation to add blocklist items. + * + * @summary Batch operation to add blocklist items. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/AddRaiBlocklistItems.json + */ +async function addRaiBlocklistItems() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "myblocklist"; + const raiBlocklistItems: RaiBlocklistItemBulkRequest[] = [ + { + name: "myblocklistitem1", + properties: { isRegex: true, pattern: "^[a-z0-9_-]{2,16}$" }, + }, + { + name: "myblocklistitem2", + properties: { isRegex: false, pattern: "blockwords" }, + }, + ]; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.batchAdd( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItems, + ); + console.log(result); +} + +async function main() { + addRaiBlocklistItems(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchDeleteSample.ts new file mode 100644 index 000000000000..27571a9a67e4 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchDeleteSample.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Batch operation to delete blocklist items. + * + * @summary Batch operation to delete blocklist items. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItems.json + */ +async function deleteRaiBlocklistItems() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemsNames: string[] = [ + "myblocklistitem1", + "myblocklistitem2", + ]; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.batchDelete( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemsNames, + ); + console.log(result); +} + +async function main() { + deleteRaiBlocklistItems(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..af5b9ec0e447 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsCreateOrUpdateSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RaiBlocklistItem, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified blocklist item associated with the Azure OpenAI account. + * + * @summary Update the state of specified blocklist item associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklistItem.json + */ +async function putRaiBlocklistItem() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemName = "raiBlocklistItemName"; + const raiBlocklistItem: RaiBlocklistItem = { + properties: { isRegex: false, pattern: "Pattern To Block" }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.createOrUpdate( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + raiBlocklistItem, + ); + console.log(result); +} + +async function main() { + putRaiBlocklistItem(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsDeleteSample.ts new file mode 100644 index 000000000000..10794c79da9d --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsDeleteSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified blocklist Item associated with the custom blocklist. + * + * @summary Deletes the specified blocklist Item associated with the custom blocklist. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItem.json + */ +async function deleteRaiBlocklistItem() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemName = "raiBlocklistItemName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.beginDeleteAndWait( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + ); + console.log(result); +} + +async function main() { + deleteRaiBlocklistItem(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsGetSample.ts new file mode 100644 index 000000000000..120dc9942b5c --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsGetSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified custom blocklist Item associated with the custom blocklist. + * + * @summary Gets the specified custom blocklist Item associated with the custom blocklist. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklistItem.json + */ +async function getRaiBlocklistItem() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemName = "raiBlocklistItemName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.get( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + ); + console.log(result); +} + +async function main() { + getRaiBlocklistItem(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsListSample.ts new file mode 100644 index 000000000000..4bb0ceed7e7a --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsListSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the blocklist items associated with the custom blocklist. + * + * @summary Gets the blocklist items associated with the custom blocklist. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklistItems.json + */ +async function listBlocklistItems() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.raiBlocklistItems.list( + resourceGroupName, + accountName, + raiBlocklistName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listBlocklistItems(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a24461ee35a7 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsCreateOrUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RaiBlocklist, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified blocklist associated with the Azure OpenAI account. + * + * @summary Update the state of specified blocklist associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklist.json + */ +async function putRaiBlocklist() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklist: RaiBlocklist = { + properties: { description: "Basic blocklist description" }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklists.createOrUpdate( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklist, + ); + console.log(result); +} + +async function main() { + putRaiBlocklist(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsDeleteSample.ts new file mode 100644 index 000000000000..ab12f0363f6a --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsDeleteSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified custom blocklist associated with the Azure OpenAI account. + * + * @summary Deletes the specified custom blocklist associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklist.json + */ +async function deleteRaiBlocklist() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklists.beginDeleteAndWait( + resourceGroupName, + accountName, + raiBlocklistName, + ); + console.log(result); +} + +async function main() { + deleteRaiBlocklist(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsGetSample.ts new file mode 100644 index 000000000000..57f9f4938b1e --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified custom blocklist associated with the Azure OpenAI account. + * + * @summary Gets the specified custom blocklist associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklist.json + */ +async function getRaiBlocklist() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklists.get( + resourceGroupName, + accountName, + raiBlocklistName, + ); + console.log(result); +} + +async function main() { + getRaiBlocklist(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsListSample.ts new file mode 100644 index 000000000000..a042551e8b40 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the custom blocklists associated with the Azure OpenAI account. + * + * @summary Gets the custom blocklists associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklists.json + */ +async function listBlocklists() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.raiBlocklists.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listBlocklists(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersGetSample.ts new file mode 100644 index 000000000000..7b3bfb5a67cf --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersGetSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Content Filters by Name. + * + * @summary Get Content Filters by Name. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiContentFilter.json + */ +async function getRaiContentFilters() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "WestUS"; + const filterName = "IndirectAttack"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiContentFilters.get(location, filterName); + console.log(result); +} + +async function main() { + getRaiContentFilters(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersListSample.ts new file mode 100644 index 000000000000..830ecb5fc543 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersListSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List Content Filters types. + * + * @summary List Content Filters types. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiContentFilters.json + */ +async function listRaiContentFilters() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "WestUS"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.raiContentFilters.list(location)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listRaiContentFilters(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..e79c4eedca54 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesCreateOrUpdateSample.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RaiPolicy, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @summary Update the state of specified Content Filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiPolicy.json + */ +async function putRaiPolicy() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiPolicyName = "raiPolicyName"; + const raiPolicy: RaiPolicy = { + properties: { + basePolicyName: "Microsoft.Default", + contentFilters: [ + { + name: "Hate", + blocking: false, + enabled: false, + severityThreshold: "High", + source: "Prompt", + }, + { + name: "Hate", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { + name: "Sexual", + blocking: true, + enabled: true, + severityThreshold: "High", + source: "Prompt", + }, + { + name: "Sexual", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { + name: "Selfharm", + blocking: true, + enabled: true, + severityThreshold: "High", + source: "Prompt", + }, + { + name: "Selfharm", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { + name: "Violence", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Prompt", + }, + { + name: "Violence", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { name: "Jailbreak", blocking: true, enabled: true, source: "Prompt" }, + { + name: "Protected Material Text", + blocking: true, + enabled: true, + source: "Completion", + }, + { + name: "Protected Material Code", + blocking: true, + enabled: true, + source: "Completion", + }, + { name: "Profanity", blocking: true, enabled: true, source: "Prompt" }, + ], + mode: "Asynchronous_filter", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiPolicies.createOrUpdate( + resourceGroupName, + accountName, + raiPolicyName, + raiPolicy, + ); + console.log(result); +} + +async function main() { + putRaiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesDeleteSample.ts new file mode 100644 index 000000000000..d1f0e5f07444 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesDeleteSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @summary Deletes the specified Content Filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiPolicy.json + */ +async function deleteRaiPolicy() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiPolicyName = "raiPolicyName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiPolicies.beginDeleteAndWait( + resourceGroupName, + accountName, + raiPolicyName, + ); + console.log(result); +} + +async function main() { + deleteRaiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesGetSample.ts new file mode 100644 index 000000000000..a96360a06b9b --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @summary Gets the specified Content Filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiPolicy.json + */ +async function getRaiPolicy() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiPolicyName = "raiPolicyName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiPolicies.get( + resourceGroupName, + accountName, + raiPolicyName, + ); + console.log(result); +} + +async function main() { + getRaiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesListSample.ts new file mode 100644 index 000000000000..c0d104fee4be --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. + * + * @summary Gets the content filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiPolicies.json + */ +async function listRaiPolicies() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.raiPolicies.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listRaiPolicies(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/resourceSkusListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/resourceSkusListSample.ts index a130c969ed13..5d7b3e45e81a 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/resourceSkusListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/resourceSkusListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. * * @summary Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSkus.json */ async function regenerateKeys() { const subscriptionId = @@ -27,7 +27,7 @@ async function regenerateKeys() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.resourceSkus.list()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/usagesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/usagesListSample.ts index 8bcd5b7b13cd..bb1b0d4b93af 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/usagesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/usagesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get usages for the requested subscription * * @summary Get usages for the requested subscription - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListUsages.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListUsages.json */ async function getUsages() { const subscriptionId = @@ -28,7 +28,7 @@ async function getUsages() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.usages.list(location)) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/README.md b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/README.md index 845048e4f3fd..fe9690d67f68 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/README.md +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/README.md @@ -2,52 +2,84 @@ These sample programs show how to use the JavaScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [accountsCreateSample.js][accountscreatesample] | Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccount.json | -| [accountsDeleteSample.js][accountsdeletesample] | Deletes a Cognitive Services account from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteAccount.json | -| [accountsGetSample.js][accountsgetsample] | Returns a Cognitive Services account specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetAccount.json | -| [accountsListByResourceGroupSample.js][accountslistbyresourcegroupsample] | Returns all the resources of a particular type belonging to a resource group x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsByResourceGroup.json | -| [accountsListKeysSample.js][accountslistkeyssample] | Lists the account keys for the specified Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListKeys.json | -| [accountsListModelsSample.js][accountslistmodelssample] | List available Models for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountModels.json | -| [accountsListSample.js][accountslistsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsBySubscription.json | -| [accountsListSkusSample.js][accountslistskussample] | List available SKUs for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSkus.json | -| [accountsListUsagesSample.js][accountslistusagessample] | Get usages for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetUsages.json | -| [accountsRegenerateKeySample.js][accountsregeneratekeysample] | Regenerates the specified account key for the specified Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/RegenerateKey.json | -| [accountsUpdateSample.js][accountsupdatesample] | Updates a Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateAccount.json | -| [checkDomainAvailabilitySample.js][checkdomainavailabilitysample] | Check whether a domain is available. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckDomainAvailability.json | -| [checkSkuAvailabilitySample.js][checkskuavailabilitysample] | Check available SKUs. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckSkuAvailability.json | -| [commitmentPlansCreateOrUpdateAssociationSample.js][commitmentplanscreateorupdateassociationsample] | Create or update the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlanAssociation.json | -| [commitmentPlansCreateOrUpdatePlanSample.js][commitmentplanscreateorupdateplansample] | Create Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlan.json | -| [commitmentPlansCreateOrUpdateSample.js][commitmentplanscreateorupdatesample] | Update the state of specified commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutCommitmentPlan.json | -| [commitmentPlansDeleteAssociationSample.js][commitmentplansdeleteassociationsample] | Deletes the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlanAssociation.json | -| [commitmentPlansDeletePlanSample.js][commitmentplansdeleteplansample] | Deletes a Cognitive Services commitment plan from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlan.json | -| [commitmentPlansDeleteSample.js][commitmentplansdeletesample] | Deletes the specified commitmentPlan associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteCommitmentPlan.json | -| [commitmentPlansGetAssociationSample.js][commitmentplansgetassociationsample] | Gets the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlanAssociation.json | -| [commitmentPlansGetPlanSample.js][commitmentplansgetplansample] | Returns a Cognitive Services commitment plan specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlan.json | -| [commitmentPlansGetSample.js][commitmentplansgetsample] | Gets the specified commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetCommitmentPlan.json | -| [commitmentPlansListAssociationsSample.js][commitmentplanslistassociationssample] | Gets the associations of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlanAssociations.json | -| [commitmentPlansListPlansByResourceGroupSample.js][commitmentplanslistplansbyresourcegroupsample] | Returns all the resources of a particular type belonging to a resource group x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansByResourceGroup.json | -| [commitmentPlansListPlansBySubscriptionSample.js][commitmentplanslistplansbysubscriptionsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansBySubscription.json | -| [commitmentPlansListSample.js][commitmentplanslistsample] | Gets the commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentPlans.json | -| [commitmentPlansUpdatePlanSample.js][commitmentplansupdateplansample] | Create Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateSharedCommitmentPlan.json | -| [commitmentTiersListSample.js][commitmenttierslistsample] | List Commitment Tiers. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentTiers.json | -| [deletedAccountsGetSample.js][deletedaccountsgetsample] | Returns a Cognitive Services account specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeletedAccount.json | -| [deletedAccountsListSample.js][deletedaccountslistsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeletedAccountsBySubscription.json | -| [deletedAccountsPurgeSample.js][deletedaccountspurgesample] | Deletes a Cognitive Services account from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PurgeDeletedAccount.json | -| [deploymentsCreateOrUpdateSample.js][deploymentscreateorupdatesample] | Update the state of specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutDeployment.json | -| [deploymentsDeleteSample.js][deploymentsdeletesample] | Deletes the specified deployment associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteDeployment.json | -| [deploymentsGetSample.js][deploymentsgetsample] | Gets the specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeployment.json | -| [deploymentsListSample.js][deploymentslistsample] | Gets the deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeployments.json | -| [modelsListSample.js][modelslistsample] | List Models. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListModels.json | -| [operationsListSample.js][operationslistsample] | Lists all the available Cognitive Services account operations. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetOperations.json | -| [privateEndpointConnectionsCreateOrUpdateSample.js][privateendpointconnectionscreateorupdatesample] | Update the state of specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutPrivateEndpointConnection.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | Gets the private endpoint connections associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateEndpointConnections.json | -| [privateLinkResourcesListSample.js][privatelinkresourceslistsample] | Gets the private link resources that need to be created for a Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateLinkResources.json | -| [resourceSkusListSample.js][resourceskuslistsample] | Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSkus.json | -| [usagesListSample.js][usageslistsample] | Get usages for the requested subscription x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListUsages.json | +| **File Name** | **Description** | +| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [accountsCreateSample.js][accountscreatesample] | Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateAccount.json | +| [accountsDeleteSample.js][accountsdeletesample] | Deletes a Cognitive Services account from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteAccount.json | +| [accountsGetSample.js][accountsgetsample] | Returns a Cognitive Services account specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetAccount.json | +| [accountsListByResourceGroupSample.js][accountslistbyresourcegroupsample] | Returns all the resources of a particular type belonging to a resource group x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsByResourceGroup.json | +| [accountsListKeysSample.js][accountslistkeyssample] | Lists the account keys for the specified Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListKeys.json | +| [accountsListModelsSample.js][accountslistmodelssample] | List available Models for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountModels.json | +| [accountsListSample.js][accountslistsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsBySubscription.json | +| [accountsListSkusSample.js][accountslistskussample] | List available SKUs for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSkus.json | +| [accountsListUsagesSample.js][accountslistusagessample] | Get usages for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetUsages.json | +| [accountsRegenerateKeySample.js][accountsregeneratekeysample] | Regenerates the specified account key for the specified Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/RegenerateKey.json | +| [accountsUpdateSample.js][accountsupdatesample] | Updates a Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateAccount.json | +| [calculateModelCapacitySample.js][calculatemodelcapacitysample] | Model capacity calculator. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CalculateModelCapacity.json | +| [checkDomainAvailabilitySample.js][checkdomainavailabilitysample] | Check whether a domain is available. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckDomainAvailability.json | +| [checkSkuAvailabilitySample.js][checkskuavailabilitysample] | Check available SKUs. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckSkuAvailability.json | +| [commitmentPlansCreateOrUpdateAssociationSample.js][commitmentplanscreateorupdateassociationsample] | Create or update the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlanAssociation.json | +| [commitmentPlansCreateOrUpdatePlanSample.js][commitmentplanscreateorupdateplansample] | Create Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlan.json | +| [commitmentPlansCreateOrUpdateSample.js][commitmentplanscreateorupdatesample] | Update the state of specified commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutCommitmentPlan.json | +| [commitmentPlansDeleteAssociationSample.js][commitmentplansdeleteassociationsample] | Deletes the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlanAssociation.json | +| [commitmentPlansDeletePlanSample.js][commitmentplansdeleteplansample] | Deletes a Cognitive Services commitment plan from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlan.json | +| [commitmentPlansDeleteSample.js][commitmentplansdeletesample] | Deletes the specified commitmentPlan associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteCommitmentPlan.json | +| [commitmentPlansGetAssociationSample.js][commitmentplansgetassociationsample] | Gets the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlanAssociation.json | +| [commitmentPlansGetPlanSample.js][commitmentplansgetplansample] | Returns a Cognitive Services commitment plan specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlan.json | +| [commitmentPlansGetSample.js][commitmentplansgetsample] | Gets the specified commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetCommitmentPlan.json | +| [commitmentPlansListAssociationsSample.js][commitmentplanslistassociationssample] | Gets the associations of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlanAssociations.json | +| [commitmentPlansListPlansByResourceGroupSample.js][commitmentplanslistplansbyresourcegroupsample] | Returns all the resources of a particular type belonging to a resource group x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansByResourceGroup.json | +| [commitmentPlansListPlansBySubscriptionSample.js][commitmentplanslistplansbysubscriptionsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansBySubscription.json | +| [commitmentPlansListSample.js][commitmentplanslistsample] | Gets the commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentPlans.json | +| [commitmentPlansUpdatePlanSample.js][commitmentplansupdateplansample] | Create Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateSharedCommitmentPlan.json | +| [commitmentTiersListSample.js][commitmenttierslistsample] | List Commitment Tiers. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentTiers.json | +| [defenderForAiSettingsCreateOrUpdateSample.js][defenderforaisettingscreateorupdatesample] | Creates or Updates the specified Defender for AI setting. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDefenderForAISetting.json | +| [defenderForAiSettingsGetSample.js][defenderforaisettingsgetsample] | Gets the specified Defender for AI setting by name. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDefenderForAISetting.json | +| [defenderForAiSettingsListSample.js][defenderforaisettingslistsample] | Lists the Defender for AI settings. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDefenderForAISetting.json | +| [defenderForAiSettingsUpdateSample.js][defenderforaisettingsupdatesample] | Updates the specified Defender for AI setting. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDefenderForAISetting.json | +| [deletedAccountsGetSample.js][deletedaccountsgetsample] | Returns a Cognitive Services account specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeletedAccount.json | +| [deletedAccountsListSample.js][deletedaccountslistsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeletedAccountsBySubscription.json | +| [deletedAccountsPurgeSample.js][deletedaccountspurgesample] | Deletes a Cognitive Services account from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PurgeDeletedAccount.json | +| [deploymentsCreateOrUpdateSample.js][deploymentscreateorupdatesample] | Update the state of specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDeployment.json | +| [deploymentsDeleteSample.js][deploymentsdeletesample] | Deletes the specified deployment associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteDeployment.json | +| [deploymentsGetSample.js][deploymentsgetsample] | Gets the specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeployment.json | +| [deploymentsListSample.js][deploymentslistsample] | Gets the deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeployments.json | +| [deploymentsListSkusSample.js][deploymentslistskussample] | Lists the specified deployments skus associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeploymentSkus.json | +| [deploymentsUpdateSample.js][deploymentsupdatesample] | Update specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDeployment.json | +| [encryptionScopesCreateOrUpdateSample.js][encryptionscopescreateorupdatesample] | Update the state of specified encryptionScope associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutEncryptionScope.json | +| [encryptionScopesDeleteSample.js][encryptionscopesdeletesample] | Deletes the specified encryptionScope associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteEncryptionScope.json | +| [encryptionScopesGetSample.js][encryptionscopesgetsample] | Gets the specified EncryptionScope associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetEncryptionScope.json | +| [encryptionScopesListSample.js][encryptionscopeslistsample] | Gets the content filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListEncryptionScopes.json | +| [locationBasedModelCapacitiesListSample.js][locationbasedmodelcapacitieslistsample] | List Location Based ModelCapacities. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationBasedModelCapacities.json | +| [modelCapacitiesListSample.js][modelcapacitieslistsample] | List ModelCapacities. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListModelCapacities.json | +| [modelsListSample.js][modelslistsample] | List Models. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationModels.json | +| [networkSecurityPerimeterConfigurationsGetSample.js][networksecurityperimeterconfigurationsgetsample] | Gets the specified NSP configurations for an account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetNetworkSecurityPerimeterConfigurations.json | +| [networkSecurityPerimeterConfigurationsListSample.js][networksecurityperimeterconfigurationslistsample] | Gets a list of NSP configurations for an account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListNetworkSecurityPerimeterConfigurations.json | +| [networkSecurityPerimeterConfigurationsReconcileSample.js][networksecurityperimeterconfigurationsreconcilesample] | Reconcile the NSP configuration for an account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ReconcileNetworkSecurityPerimeterConfigurations.json | +| [operationsListSample.js][operationslistsample] | Lists all the available Cognitive Services account operations. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetOperations.json | +| [privateEndpointConnectionsCreateOrUpdateSample.js][privateendpointconnectionscreateorupdatesample] | Update the state of specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutPrivateEndpointConnection.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeletePrivateEndpointConnection.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetPrivateEndpointConnection.json | +| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | Gets the private endpoint connections associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateEndpointConnections.json | +| [privateLinkResourcesListSample.js][privatelinkresourceslistsample] | Gets the private link resources that need to be created for a Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateLinkResources.json | +| [raiBlocklistItemsBatchAddSample.js][raiblocklistitemsbatchaddsample] | Batch operation to add blocklist items. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/AddRaiBlocklistItems.json | +| [raiBlocklistItemsBatchDeleteSample.js][raiblocklistitemsbatchdeletesample] | Batch operation to delete blocklist items. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItems.json | +| [raiBlocklistItemsCreateOrUpdateSample.js][raiblocklistitemscreateorupdatesample] | Update the state of specified blocklist item associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklistItem.json | +| [raiBlocklistItemsDeleteSample.js][raiblocklistitemsdeletesample] | Deletes the specified blocklist Item associated with the custom blocklist. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItem.json | +| [raiBlocklistItemsGetSample.js][raiblocklistitemsgetsample] | Gets the specified custom blocklist Item associated with the custom blocklist. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklistItem.json | +| [raiBlocklistItemsListSample.js][raiblocklistitemslistsample] | Gets the blocklist items associated with the custom blocklist. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklistItems.json | +| [raiBlocklistsCreateOrUpdateSample.js][raiblocklistscreateorupdatesample] | Update the state of specified blocklist associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklist.json | +| [raiBlocklistsDeleteSample.js][raiblocklistsdeletesample] | Deletes the specified custom blocklist associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklist.json | +| [raiBlocklistsGetSample.js][raiblocklistsgetsample] | Gets the specified custom blocklist associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklist.json | +| [raiBlocklistsListSample.js][raiblocklistslistsample] | Gets the custom blocklists associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklists.json | +| [raiContentFiltersGetSample.js][raicontentfiltersgetsample] | Get Content Filters by Name. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiContentFilter.json | +| [raiContentFiltersListSample.js][raicontentfilterslistsample] | List Content Filters types. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiContentFilters.json | +| [raiPoliciesCreateOrUpdateSample.js][raipoliciescreateorupdatesample] | Update the state of specified Content Filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiPolicy.json | +| [raiPoliciesDeleteSample.js][raipoliciesdeletesample] | Deletes the specified Content Filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiPolicy.json | +| [raiPoliciesGetSample.js][raipoliciesgetsample] | Gets the specified Content Filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiPolicy.json | +| [raiPoliciesListSample.js][raipolicieslistsample] | Gets the content filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiPolicies.json | +| [resourceSkusListSample.js][resourceskuslistsample] | Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSkus.json | +| [usagesListSample.js][usageslistsample] | Get usages for the requested subscription x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListUsages.json | ## Prerequisites @@ -98,6 +130,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [accountslistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListUsagesSample.js [accountsregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsRegenerateKeySample.js [accountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsUpdateSample.js +[calculatemodelcapacitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/calculateModelCapacitySample.js [checkdomainavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkDomainAvailabilitySample.js [checkskuavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkSkuAvailabilitySample.js [commitmentplanscreateorupdateassociationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdateAssociationSample.js @@ -115,6 +148,10 @@ Take a look at our [API Documentation][apiref] for more information about the AP [commitmentplanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListSample.js [commitmentplansupdateplansample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansUpdatePlanSample.js [commitmenttierslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentTiersListSample.js +[defenderforaisettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsCreateOrUpdateSample.js +[defenderforaisettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsGetSample.js +[defenderforaisettingslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsListSample.js +[defenderforaisettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsUpdateSample.js [deletedaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsGetSample.js [deletedaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsListSample.js [deletedaccountspurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsPurgeSample.js @@ -122,13 +159,40 @@ Take a look at our [API Documentation][apiref] for more information about the AP [deploymentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsDeleteSample.js [deploymentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsGetSample.js [deploymentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSample.js +[deploymentslistskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSkusSample.js +[deploymentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsUpdateSample.js +[encryptionscopescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesCreateOrUpdateSample.js +[encryptionscopesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesDeleteSample.js +[encryptionscopesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesGetSample.js +[encryptionscopeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesListSample.js +[locationbasedmodelcapacitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/locationBasedModelCapacitiesListSample.js +[modelcapacitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelCapacitiesListSample.js [modelslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelsListSample.js +[networksecurityperimeterconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsGetSample.js +[networksecurityperimeterconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsListSample.js +[networksecurityperimeterconfigurationsreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js [operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/operationsListSample.js [privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsCreateOrUpdateSample.js [privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsDeleteSample.js [privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsGetSample.js [privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsListSample.js [privatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateLinkResourcesListSample.js +[raiblocklistitemsbatchaddsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchAddSample.js +[raiblocklistitemsbatchdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchDeleteSample.js +[raiblocklistitemscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsCreateOrUpdateSample.js +[raiblocklistitemsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsDeleteSample.js +[raiblocklistitemsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsGetSample.js +[raiblocklistitemslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsListSample.js +[raiblocklistscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsCreateOrUpdateSample.js +[raiblocklistsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsDeleteSample.js +[raiblocklistsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsGetSample.js +[raiblocklistslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsListSample.js +[raicontentfiltersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersGetSample.js +[raicontentfilterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersListSample.js +[raipoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesCreateOrUpdateSample.js +[raipoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesDeleteSample.js +[raipoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesGetSample.js +[raipolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesListSample.js [resourceskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/resourceSkusListSample.js [usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/usagesListSample.js [apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-cognitiveservices?view=azure-node-preview diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsCreateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsCreateSample.js index b3ebb7bc4215..ce403258b5a5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsCreateSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. * * @summary Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateAccount.json */ async function createAccount() { const subscriptionId = @@ -55,7 +55,7 @@ async function createAccount() { * This sample demonstrates how to Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. * * @summary Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccountMin.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateAccountMin.json */ async function createAccountMin() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsDeleteSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsDeleteSample.js index 00b15505c367..228956983f24 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsDeleteSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. * * @summary Deletes a Cognitive Services account from the resource group. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteAccount.json */ async function deleteAccount() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsGetSample.js index 259a9a0e1a35..13294c5ab658 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsGetSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. * * @summary Returns a Cognitive Services account specified by the parameters. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetAccount.json */ async function getAccount() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListByResourceGroupSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListByResourceGroupSample.js index a95484ce94f4..978e8346c93c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListByResourceGroupSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a resource group * * @summary Returns all the resources of a particular type belonging to a resource group - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsByResourceGroup.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsByResourceGroup.json */ async function listAccountsByResourceGroup() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListKeysSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListKeysSample.js index b1e020073670..e6c7753b7fc3 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListKeysSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListKeysSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists the account keys for the specified Cognitive Services account. * * @summary Lists the account keys for the specified Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListKeys.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListKeys.json */ async function listKeys() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListModelsSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListModelsSample.js index cbe19893ac05..160fea7fc566 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListModelsSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListModelsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List available Models for the requested Cognitive Services account * * @summary List available Models for the requested Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountModels.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountModels.json */ async function listAccountModels() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListSample.js index 9dba1a221f9f..3ba43ca00838 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription. * * @summary Returns all the resources of a particular type belonging to a subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsBySubscription.json */ async function listAccountsBySubscription() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListSkusSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListSkusSample.js index c74df1d4b94b..20391c62ce52 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListSkusSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListSkusSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List available SKUs for the requested Cognitive Services account * * @summary List available SKUs for the requested Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSkus.json */ async function listSkUs() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListUsagesSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListUsagesSample.js index 5fd3af8f0efb..d8f90763e8c8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListUsagesSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsListUsagesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get usages for the requested Cognitive Services account * * @summary Get usages for the requested Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetUsages.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetUsages.json */ async function getUsages() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsRegenerateKeySample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsRegenerateKeySample.js index c607b94162c4..4ef8dbb55379 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsRegenerateKeySample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsRegenerateKeySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Regenerates the specified account key for the specified Cognitive Services account. * * @summary Regenerates the specified account key for the specified Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/RegenerateKey.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/RegenerateKey.json */ async function regenerateKeys() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsUpdateSample.js index 51c8d018699d..3fa0cca91284 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsUpdateSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/accountsUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a Cognitive Services account * * @summary Updates a Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateAccount.json */ async function updateAccount() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/calculateModelCapacitySample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/calculateModelCapacitySample.js new file mode 100644 index 000000000000..ccfc67cdf187 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/calculateModelCapacitySample.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Model capacity calculator. + * + * @summary Model capacity calculator. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CalculateModelCapacity.json + */ +async function calculateModelCapacity() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; + const model = { name: "gpt-4", format: "OpenAI", version: "0613" }; + const skuName = "ProvisionedManaged"; + const workloads = [ + { + requestParameters: { avgGeneratedTokens: 50, avgPromptTokens: 30 }, + requestPerMinute: 10, + }, + { + requestParameters: { avgGeneratedTokens: 20, avgPromptTokens: 60 }, + requestPerMinute: 20, + }, + ]; + const options = { + model, + skuName, + workloads, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.calculateModelCapacity(options); + console.log(result); +} + +async function main() { + calculateModelCapacity(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkDomainAvailabilitySample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkDomainAvailabilitySample.js index 9592e1a1c249..6131b7b50f31 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkDomainAvailabilitySample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkDomainAvailabilitySample.js @@ -16,16 +16,18 @@ require("dotenv").config(); * This sample demonstrates how to Check whether a domain is available. * * @summary Check whether a domain is available. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckDomainAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckDomainAvailability.json */ async function checkSkuAvailability() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; const subdomainName = "contosodemoapp1"; const typeParam = "Microsoft.CognitiveServices/accounts"; + const kind = "undefined"; + const options = { kind }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient(credential, subscriptionId); - const result = await client.checkDomainAvailability(subdomainName, typeParam); + const result = await client.checkDomainAvailability(subdomainName, typeParam, options); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkSkuAvailabilitySample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkSkuAvailabilitySample.js index 373fb67f4ac6..2b9bd47700e7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkSkuAvailabilitySample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/checkSkuAvailabilitySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Check available SKUs. * * @summary Check available SKUs. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckSkuAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckSkuAvailability.json */ async function checkSkuAvailability() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdateAssociationSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdateAssociationSample.js index 3e9b531782ec..ac8e4aade84b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdateAssociationSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdateAssociationSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create or update the association of the Cognitive Services commitment plan. * * @summary Create or update the association of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlanAssociation.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlanAssociation.json */ async function putCommitmentPlan() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdatePlanSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdatePlanSample.js index 27fd3cf42466..2cc19850c611 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdatePlanSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdatePlanSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Cognitive Services commitment plan. * * @summary Create Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlan.json */ async function createCommitmentPlan() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdateSample.js index 0a781cb0b29e..5ec915b5bb65 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdateSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update the state of specified commitmentPlans associated with the Cognitive Services account. * * @summary Update the state of specified commitmentPlans associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutCommitmentPlan.json */ async function putCommitmentPlan() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeleteAssociationSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeleteAssociationSample.js index e19919e22063..37e17f4f848b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeleteAssociationSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeleteAssociationSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the association of the Cognitive Services commitment plan. * * @summary Deletes the association of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlanAssociation.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlanAssociation.json */ async function deleteCommitmentPlan() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeletePlanSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeletePlanSample.js index 85d982e8092c..6d8f241b5f92 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeletePlanSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeletePlanSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a Cognitive Services commitment plan from the resource group. * * @summary Deletes a Cognitive Services commitment plan from the resource group. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlan.json */ async function deleteCommitmentPlan() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeleteSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeleteSample.js index f7e5f01cd9fb..56d3e321f449 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeleteSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified commitmentPlan associated with the Cognitive Services account. * * @summary Deletes the specified commitmentPlan associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteCommitmentPlan.json */ async function deleteCommitmentPlan() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetAssociationSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetAssociationSample.js index 24da53ba5a8a..7dde3af88caa 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetAssociationSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetAssociationSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the association of the Cognitive Services commitment plan. * * @summary Gets the association of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlanAssociation.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlanAssociation.json */ async function getCommitmentPlan() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetPlanSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetPlanSample.js index 444175736ded..015e9b539399 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetPlanSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetPlanSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns a Cognitive Services commitment plan specified by the parameters. * * @summary Returns a Cognitive Services commitment plan specified by the parameters. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlan.json */ async function getCommitmentPlan() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetSample.js index b89f0fc3a37c..ab393076003f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified commitmentPlans associated with the Cognitive Services account. * * @summary Gets the specified commitmentPlans associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetCommitmentPlan.json */ async function getCommitmentPlan() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListAssociationsSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListAssociationsSample.js index 227ed06a4a64..e3a8235122be 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListAssociationsSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListAssociationsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the associations of the Cognitive Services commitment plan. * * @summary Gets the associations of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlanAssociations.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlanAssociations.json */ async function listCommitmentPlans() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListPlansByResourceGroupSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListPlansByResourceGroupSample.js index f2cbfda3f217..d4a18a098947 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListPlansByResourceGroupSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListPlansByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a resource group * * @summary Returns all the resources of a particular type belonging to a resource group - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansByResourceGroup.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansByResourceGroup.json */ async function listCommitmentPlansByResourceGroup() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListPlansBySubscriptionSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListPlansBySubscriptionSample.js index 539d28f6a2ae..e6b4ef7e4f68 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListPlansBySubscriptionSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListPlansBySubscriptionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription. * * @summary Returns all the resources of a particular type belonging to a subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansBySubscription.json */ async function listAccountsBySubscription() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListSample.js index 3be53f468005..c109e85b26da 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the commitmentPlans associated with the Cognitive Services account. * * @summary Gets the commitmentPlans associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentPlans.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentPlans.json */ async function listCommitmentPlans() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansUpdatePlanSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansUpdatePlanSample.js index bac8b887ca74..3fc223e09ad5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansUpdatePlanSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentPlansUpdatePlanSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Cognitive Services commitment plan. * * @summary Create Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateSharedCommitmentPlan.json */ async function createCommitmentPlan() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentTiersListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentTiersListSample.js index a78451a6e87f..cfffb6545bfa 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentTiersListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/commitmentTiersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List Commitment Tiers. * * @summary List Commitment Tiers. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentTiers.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentTiers.json */ async function listCommitmentTiers() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsCreateOrUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsCreateOrUpdateSample.js new file mode 100644 index 000000000000..ed219f294624 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsCreateOrUpdateSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates or Updates the specified Defender for AI setting. + * + * @summary Creates or Updates the specified Defender for AI setting. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDefenderForAISetting.json + */ +async function putDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const defenderForAISettingName = "Default"; + const defenderForAISettings = { state: "Enabled" }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.defenderForAISettings.createOrUpdate( + resourceGroupName, + accountName, + defenderForAISettingName, + defenderForAISettings, + ); + console.log(result); +} + +async function main() { + putDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsGetSample.js new file mode 100644 index 000000000000..8393036c1d73 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsGetSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the specified Defender for AI setting by name. + * + * @summary Gets the specified Defender for AI setting by name. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDefenderForAISetting.json + */ +async function getDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const defenderForAISettingName = "Default"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.defenderForAISettings.get( + resourceGroupName, + accountName, + defenderForAISettingName, + ); + console.log(result); +} + +async function main() { + getDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsListSample.js new file mode 100644 index 000000000000..27b54449b8d6 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Lists the Defender for AI settings. + * + * @summary Lists the Defender for AI settings. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDefenderForAISetting.json + */ +async function listDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.defenderForAISettings.list(resourceGroupName, accountName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsUpdateSample.js new file mode 100644 index 000000000000..60bc2e8f01cf --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/defenderForAiSettingsUpdateSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Updates the specified Defender for AI setting. + * + * @summary Updates the specified Defender for AI setting. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDefenderForAISetting.json + */ +async function updateDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const defenderForAISettingName = "Default"; + const defenderForAISettings = { state: "Enabled" }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.defenderForAISettings.update( + resourceGroupName, + accountName, + defenderForAISettingName, + defenderForAISettings, + ); + console.log(result); +} + +async function main() { + updateDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsGetSample.js index 6e3d9afd8a8a..b95d9e0e5a9e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsGetSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. * * @summary Returns a Cognitive Services account specified by the parameters. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeletedAccount.json */ async function getAccount() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsListSample.js index 3b0e204e6dab..ce4d0e00be7a 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription. * * @summary Returns all the resources of a particular type belonging to a subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeletedAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeletedAccountsBySubscription.json */ async function listDeletedAccountsBySubscription() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsPurgeSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsPurgeSample.js index 72e9e6b7bafe..895afcb0e9d6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsPurgeSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deletedAccountsPurgeSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. * * @summary Deletes a Cognitive Services account from the resource group. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PurgeDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PurgeDeletedAccount.json */ async function deleteAccount() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsCreateOrUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsCreateOrUpdateSample.js index 50f607b48fed..0bb3b28f52c5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsCreateOrUpdateSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update the state of specified deployments associated with the Cognitive Services account. * * @summary Update the state of specified deployments associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDeployment.json */ async function putDeployment() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsDeleteSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsDeleteSample.js index 915a6f6247ed..321cf6ab49b2 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsDeleteSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified deployment associated with the Cognitive Services account. * * @summary Deletes the specified deployment associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteDeployment.json */ async function deleteDeployment() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsGetSample.js index 05eab2031c07..f69d01ce476a 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsGetSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified deployments associated with the Cognitive Services account. * * @summary Gets the specified deployments associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeployment.json */ async function getDeployment() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSample.js index d1b42f696db8..23920912a214 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the deployments associated with the Cognitive Services account. * * @summary Gets the deployments associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeployments.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeployments.json */ async function listDeployments() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSkusSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSkusSample.js new file mode 100644 index 000000000000..e7dfb555046c --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsListSkusSample.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Lists the specified deployments skus associated with the Cognitive Services account. + * + * @summary Lists the specified deployments skus associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeploymentSkus.json + */ +async function listDeploymentSkus() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const deploymentName = "deploymentName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.deployments.listSkus( + resourceGroupName, + accountName, + deploymentName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listDeploymentSkus(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsUpdateSample.js new file mode 100644 index 000000000000..418dc63721ee --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/deploymentsUpdateSample.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update specified deployments associated with the Cognitive Services account. + * + * @summary Update specified deployments associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDeployment.json + */ +async function updateDeployment() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const deploymentName = "deploymentName"; + const deployment = { + sku: { name: "Standard", capacity: 1 }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.deployments.beginUpdateAndWait( + resourceGroupName, + accountName, + deploymentName, + deployment, + ); + console.log(result); +} + +async function main() { + updateDeployment(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesCreateOrUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesCreateOrUpdateSample.js new file mode 100644 index 000000000000..51e64c6a470b --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesCreateOrUpdateSample.js @@ -0,0 +1,54 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update the state of specified encryptionScope associated with the Cognitive Services account. + * + * @summary Update the state of specified encryptionScope associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutEncryptionScope.json + */ +async function putEncryptionScope() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const encryptionScopeName = "encryptionScopeName"; + const encryptionScope = { + properties: { + keySource: "Microsoft.KeyVault", + keyVaultProperties: { + identityClientId: "00000000-0000-0000-0000-000000000000", + keyName: "DevKeyWestUS2", + keyVaultUri: "https://devkvwestus2.vault.azure.net/", + keyVersion: "9f85549d7bf14ff4bf178c10d3bdca95", + }, + state: "Enabled", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.encryptionScopes.createOrUpdate( + resourceGroupName, + accountName, + encryptionScopeName, + encryptionScope, + ); + console.log(result); +} + +async function main() { + putEncryptionScope(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesDeleteSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesDeleteSample.js new file mode 100644 index 000000000000..3222ad716644 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesDeleteSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes the specified encryptionScope associated with the Cognitive Services account. + * + * @summary Deletes the specified encryptionScope associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteEncryptionScope.json + */ +async function deleteEncryptionScope() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const encryptionScopeName = "encryptionScopeName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.encryptionScopes.beginDeleteAndWait( + resourceGroupName, + accountName, + encryptionScopeName, + ); + console.log(result); +} + +async function main() { + deleteEncryptionScope(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesGetSample.js new file mode 100644 index 000000000000..0ab59c0364e6 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesGetSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the specified EncryptionScope associated with the Cognitive Services account. + * + * @summary Gets the specified EncryptionScope associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetEncryptionScope.json + */ +async function getEncryptionScope() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const encryptionScopeName = "encryptionScopeName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.encryptionScopes.get( + resourceGroupName, + accountName, + encryptionScopeName, + ); + console.log(result); +} + +async function main() { + getEncryptionScope(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesListSample.js new file mode 100644 index 000000000000..7dd7623e47d0 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/encryptionScopesListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. + * + * @summary Gets the content filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListEncryptionScopes.json + */ +async function listEncryptionScopes() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.encryptionScopes.list(resourceGroupName, accountName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listEncryptionScopes(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/locationBasedModelCapacitiesListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/locationBasedModelCapacitiesListSample.js new file mode 100644 index 000000000000..c4763abd4209 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/locationBasedModelCapacitiesListSample.js @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List Location Based ModelCapacities. + * + * @summary List Location Based ModelCapacities. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationBasedModelCapacities.json + */ +async function listLocationBasedModelCapacities() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const location = "WestUS"; + const modelFormat = "OpenAI"; + const modelName = "ada"; + const modelVersion = "1"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.locationBasedModelCapacities.list( + location, + modelFormat, + modelName, + modelVersion, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listLocationBasedModelCapacities(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelCapacitiesListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelCapacitiesListSample.js new file mode 100644 index 000000000000..9f70b460675a --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelCapacitiesListSample.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List ModelCapacities. + * + * @summary List ModelCapacities. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListModelCapacities.json + */ +async function listModelCapacities() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const modelFormat = "OpenAI"; + const modelName = "ada"; + const modelVersion = "1"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.modelCapacities.list(modelFormat, modelName, modelVersion)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listModelCapacities(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelsListSample.js index e67b0657c4ef..718f368fe46d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelsListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/modelsListSample.js @@ -16,9 +16,9 @@ require("dotenv").config(); * This sample demonstrates how to List Models. * * @summary List Models. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListModels.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationModels.json */ -async function listModels() { +async function listLocationModels() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const location = "WestUS"; @@ -32,7 +32,7 @@ async function listModels() { } async function main() { - listModels(); + listLocationModels(); } main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsGetSample.js new file mode 100644 index 000000000000..fecd37f5c5ea --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsGetSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the specified NSP configurations for an account. + * + * @summary Gets the specified NSP configurations for an account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetNetworkSecurityPerimeterConfigurations.json + */ +async function getNetworkSecurityPerimeterConfigurations() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const nspConfigurationName = "NSPConfigurationName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.networkSecurityPerimeterConfigurations.get( + resourceGroupName, + accountName, + nspConfigurationName, + ); + console.log(result); +} + +async function main() { + getNetworkSecurityPerimeterConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsListSample.js new file mode 100644 index 000000000000..7ce3e83d5166 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsListSample.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets a list of NSP configurations for an account. + * + * @summary Gets a list of NSP configurations for an account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListNetworkSecurityPerimeterConfigurations.json + */ +async function listNetworkSecurityPerimeterConfigurations() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkSecurityPerimeterConfigurations.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listNetworkSecurityPerimeterConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js new file mode 100644 index 000000000000..b1431c823bd0 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Reconcile the NSP configuration for an account. + * + * @summary Reconcile the NSP configuration for an account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ReconcileNetworkSecurityPerimeterConfigurations.json + */ +async function reconcileNetworkSecurityPerimeterConfigurations() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const nspConfigurationName = "NSPConfigurationName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.networkSecurityPerimeterConfigurations.beginReconcileAndWait( + resourceGroupName, + accountName, + nspConfigurationName, + ); + console.log(result); +} + +async function main() { + reconcileNetworkSecurityPerimeterConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/operationsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/operationsListSample.js index 10af9380b6e3..16469998993e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/operationsListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/operationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the available Cognitive Services account operations. * * @summary Lists all the available Cognitive Services account operations. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetOperations.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetOperations.json */ async function getOperations() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsCreateOrUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsCreateOrUpdateSample.js index c8d3b11a5e4f..295903903329 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsCreateOrUpdateSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update the state of specified private endpoint connection associated with the Cognitive Services account. * * @summary Update the state of specified private endpoint connection associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutPrivateEndpointConnection.json */ async function putPrivateEndpointConnection() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsDeleteSample.js index 1d1c6fb46c34..356dab260696 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsDeleteSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Cognitive Services account. * * @summary Deletes the specified private endpoint connection associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeletePrivateEndpointConnection.json */ async function deletePrivateEndpointConnection() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsGetSample.js index c4932af2996e..58f99f109ac8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsGetSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified private endpoint connection associated with the Cognitive Services account. * * @summary Gets the specified private endpoint connection associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetPrivateEndpointConnection.json */ async function getPrivateEndpointConnection() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsListSample.js index 60de08c19e6a..03e9fcc21d6a 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateEndpointConnectionsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the private endpoint connections associated with the Cognitive Services account. * * @summary Gets the private endpoint connections associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateEndpointConnections.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateEndpointConnections.json */ async function getPrivateEndpointConnection() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateLinkResourcesListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateLinkResourcesListSample.js index 0f5ca57c6bce..7da1eb77f4e4 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateLinkResourcesListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/privateLinkResourcesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the private link resources that need to be created for a Cognitive Services account. * * @summary Gets the private link resources that need to be created for a Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateLinkResources.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateLinkResources.json */ async function listPrivateLinkResources() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchAddSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchAddSample.js new file mode 100644 index 000000000000..c1e7c84437e4 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchAddSample.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Batch operation to add blocklist items. + * + * @summary Batch operation to add blocklist items. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/AddRaiBlocklistItems.json + */ +async function addRaiBlocklistItems() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "myblocklist"; + const raiBlocklistItems = [ + { + name: "myblocklistitem1", + properties: { isRegex: true, pattern: "^[a-z0-9_-]{2,16}$" }, + }, + { + name: "myblocklistitem2", + properties: { isRegex: false, pattern: "blockwords" }, + }, + ]; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiBlocklistItems.batchAdd( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItems, + ); + console.log(result); +} + +async function main() { + addRaiBlocklistItems(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchDeleteSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchDeleteSample.js new file mode 100644 index 000000000000..15644a8fb5c4 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsBatchDeleteSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Batch operation to delete blocklist items. + * + * @summary Batch operation to delete blocklist items. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItems.json + */ +async function deleteRaiBlocklistItems() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemsNames = ["myblocklistitem1", "myblocklistitem2"]; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiBlocklistItems.batchDelete( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemsNames, + ); + console.log(result); +} + +async function main() { + deleteRaiBlocklistItems(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsCreateOrUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsCreateOrUpdateSample.js new file mode 100644 index 000000000000..05fb789bb16c --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsCreateOrUpdateSample.js @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update the state of specified blocklist item associated with the Azure OpenAI account. + * + * @summary Update the state of specified blocklist item associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklistItem.json + */ +async function putRaiBlocklistItem() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemName = "raiBlocklistItemName"; + const raiBlocklistItem = { + properties: { isRegex: false, pattern: "Pattern To Block" }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiBlocklistItems.createOrUpdate( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + raiBlocklistItem, + ); + console.log(result); +} + +async function main() { + putRaiBlocklistItem(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsDeleteSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsDeleteSample.js new file mode 100644 index 000000000000..e537997a6207 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsDeleteSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes the specified blocklist Item associated with the custom blocklist. + * + * @summary Deletes the specified blocklist Item associated with the custom blocklist. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItem.json + */ +async function deleteRaiBlocklistItem() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemName = "raiBlocklistItemName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiBlocklistItems.beginDeleteAndWait( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + ); + console.log(result); +} + +async function main() { + deleteRaiBlocklistItem(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsGetSample.js new file mode 100644 index 000000000000..fce123c5875a --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsGetSample.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the specified custom blocklist Item associated with the custom blocklist. + * + * @summary Gets the specified custom blocklist Item associated with the custom blocklist. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklistItem.json + */ +async function getRaiBlocklistItem() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemName = "raiBlocklistItemName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiBlocklistItems.get( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + ); + console.log(result); +} + +async function main() { + getRaiBlocklistItem(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsListSample.js new file mode 100644 index 000000000000..e88fdc184a5e --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistItemsListSample.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the blocklist items associated with the custom blocklist. + * + * @summary Gets the blocklist items associated with the custom blocklist. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklistItems.json + */ +async function listBlocklistItems() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.raiBlocklistItems.list( + resourceGroupName, + accountName, + raiBlocklistName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listBlocklistItems(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsCreateOrUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsCreateOrUpdateSample.js new file mode 100644 index 000000000000..e885ad5fbb7e --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsCreateOrUpdateSample.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update the state of specified blocklist associated with the Azure OpenAI account. + * + * @summary Update the state of specified blocklist associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklist.json + */ +async function putRaiBlocklist() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklist = { + properties: { description: "Basic blocklist description" }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiBlocklists.createOrUpdate( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklist, + ); + console.log(result); +} + +async function main() { + putRaiBlocklist(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsDeleteSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsDeleteSample.js new file mode 100644 index 000000000000..006a92625839 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsDeleteSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes the specified custom blocklist associated with the Azure OpenAI account. + * + * @summary Deletes the specified custom blocklist associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklist.json + */ +async function deleteRaiBlocklist() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiBlocklists.beginDeleteAndWait( + resourceGroupName, + accountName, + raiBlocklistName, + ); + console.log(result); +} + +async function main() { + deleteRaiBlocklist(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsGetSample.js new file mode 100644 index 000000000000..8fe48813d7d3 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsGetSample.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the specified custom blocklist associated with the Azure OpenAI account. + * + * @summary Gets the specified custom blocklist associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklist.json + */ +async function getRaiBlocklist() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiBlocklists.get(resourceGroupName, accountName, raiBlocklistName); + console.log(result); +} + +async function main() { + getRaiBlocklist(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsListSample.js new file mode 100644 index 000000000000..5702e973ef5c --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiBlocklistsListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the custom blocklists associated with the Azure OpenAI account. + * + * @summary Gets the custom blocklists associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklists.json + */ +async function listBlocklists() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.raiBlocklists.list(resourceGroupName, accountName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listBlocklists(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersGetSample.js new file mode 100644 index 000000000000..00088a7d6cb5 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersGetSample.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get Content Filters by Name. + * + * @summary Get Content Filters by Name. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiContentFilter.json + */ +async function getRaiContentFilters() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const location = "WestUS"; + const filterName = "IndirectAttack"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiContentFilters.get(location, filterName); + console.log(result); +} + +async function main() { + getRaiContentFilters(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersListSample.js new file mode 100644 index 000000000000..2785e53f6f7e --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiContentFiltersListSample.js @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List Content Filters types. + * + * @summary List Content Filters types. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiContentFilters.json + */ +async function listRaiContentFilters() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const location = "WestUS"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.raiContentFilters.list(location)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listRaiContentFilters(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesCreateOrUpdateSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesCreateOrUpdateSample.js new file mode 100644 index 000000000000..d253796ee8c5 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesCreateOrUpdateSample.js @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @summary Update the state of specified Content Filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiPolicy.json + */ +async function putRaiPolicy() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiPolicyName = "raiPolicyName"; + const raiPolicy = { + properties: { + basePolicyName: "Microsoft.Default", + contentFilters: [ + { + name: "Hate", + blocking: false, + enabled: false, + severityThreshold: "High", + source: "Prompt", + }, + { + name: "Hate", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { + name: "Sexual", + blocking: true, + enabled: true, + severityThreshold: "High", + source: "Prompt", + }, + { + name: "Sexual", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { + name: "Selfharm", + blocking: true, + enabled: true, + severityThreshold: "High", + source: "Prompt", + }, + { + name: "Selfharm", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { + name: "Violence", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Prompt", + }, + { + name: "Violence", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { name: "Jailbreak", blocking: true, enabled: true, source: "Prompt" }, + { + name: "Protected Material Text", + blocking: true, + enabled: true, + source: "Completion", + }, + { + name: "Protected Material Code", + blocking: true, + enabled: true, + source: "Completion", + }, + { name: "Profanity", blocking: true, enabled: true, source: "Prompt" }, + ], + mode: "Asynchronous_filter", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiPolicies.createOrUpdate( + resourceGroupName, + accountName, + raiPolicyName, + raiPolicy, + ); + console.log(result); +} + +async function main() { + putRaiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesDeleteSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesDeleteSample.js new file mode 100644 index 000000000000..5789922225e1 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesDeleteSample.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @summary Deletes the specified Content Filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiPolicy.json + */ +async function deleteRaiPolicy() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiPolicyName = "raiPolicyName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiPolicies.beginDeleteAndWait( + resourceGroupName, + accountName, + raiPolicyName, + ); + console.log(result); +} + +async function main() { + deleteRaiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesGetSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesGetSample.js new file mode 100644 index 000000000000..5bd1ae190929 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesGetSample.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @summary Gets the specified Content Filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiPolicy.json + */ +async function getRaiPolicy() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiPolicyName = "raiPolicyName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const result = await client.raiPolicies.get(resourceGroupName, accountName, raiPolicyName); + console.log(result); +} + +async function main() { + getRaiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesListSample.js new file mode 100644 index 000000000000..15cfba3a90fb --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/raiPoliciesListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. + * + * @summary Gets the content filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiPolicies.json + */ +async function listRaiPolicies() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.raiPolicies.list(resourceGroupName, accountName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listRaiPolicies(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/resourceSkusListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/resourceSkusListSample.js index d9d8f1255ac5..082250babe9d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/resourceSkusListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/resourceSkusListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. * * @summary Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSkus.json */ async function regenerateKeys() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/sample.env b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/sample.env +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/usagesListSample.js b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/usagesListSample.js index ead70b40e00a..48bcc7722d32 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/usagesListSample.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/javascript/usagesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Get usages for the requested subscription * * @summary Get usages for the requested subscription - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListUsages.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListUsages.json */ async function getUsages() { const subscriptionId = diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/README.md b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/README.md index 2364a5a32f85..8e9efff97ccf 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/README.md +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/README.md @@ -2,52 +2,84 @@ These sample programs show how to use the TypeScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [accountsCreateSample.ts][accountscreatesample] | Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccount.json | -| [accountsDeleteSample.ts][accountsdeletesample] | Deletes a Cognitive Services account from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteAccount.json | -| [accountsGetSample.ts][accountsgetsample] | Returns a Cognitive Services account specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetAccount.json | -| [accountsListByResourceGroupSample.ts][accountslistbyresourcegroupsample] | Returns all the resources of a particular type belonging to a resource group x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsByResourceGroup.json | -| [accountsListKeysSample.ts][accountslistkeyssample] | Lists the account keys for the specified Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListKeys.json | -| [accountsListModelsSample.ts][accountslistmodelssample] | List available Models for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountModels.json | -| [accountsListSample.ts][accountslistsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsBySubscription.json | -| [accountsListSkusSample.ts][accountslistskussample] | List available SKUs for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSkus.json | -| [accountsListUsagesSample.ts][accountslistusagessample] | Get usages for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetUsages.json | -| [accountsRegenerateKeySample.ts][accountsregeneratekeysample] | Regenerates the specified account key for the specified Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/RegenerateKey.json | -| [accountsUpdateSample.ts][accountsupdatesample] | Updates a Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateAccount.json | -| [checkDomainAvailabilitySample.ts][checkdomainavailabilitysample] | Check whether a domain is available. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckDomainAvailability.json | -| [checkSkuAvailabilitySample.ts][checkskuavailabilitysample] | Check available SKUs. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckSkuAvailability.json | -| [commitmentPlansCreateOrUpdateAssociationSample.ts][commitmentplanscreateorupdateassociationsample] | Create or update the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlanAssociation.json | -| [commitmentPlansCreateOrUpdatePlanSample.ts][commitmentplanscreateorupdateplansample] | Create Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlan.json | -| [commitmentPlansCreateOrUpdateSample.ts][commitmentplanscreateorupdatesample] | Update the state of specified commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutCommitmentPlan.json | -| [commitmentPlansDeleteAssociationSample.ts][commitmentplansdeleteassociationsample] | Deletes the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlanAssociation.json | -| [commitmentPlansDeletePlanSample.ts][commitmentplansdeleteplansample] | Deletes a Cognitive Services commitment plan from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlan.json | -| [commitmentPlansDeleteSample.ts][commitmentplansdeletesample] | Deletes the specified commitmentPlan associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteCommitmentPlan.json | -| [commitmentPlansGetAssociationSample.ts][commitmentplansgetassociationsample] | Gets the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlanAssociation.json | -| [commitmentPlansGetPlanSample.ts][commitmentplansgetplansample] | Returns a Cognitive Services commitment plan specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlan.json | -| [commitmentPlansGetSample.ts][commitmentplansgetsample] | Gets the specified commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetCommitmentPlan.json | -| [commitmentPlansListAssociationsSample.ts][commitmentplanslistassociationssample] | Gets the associations of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlanAssociations.json | -| [commitmentPlansListPlansByResourceGroupSample.ts][commitmentplanslistplansbyresourcegroupsample] | Returns all the resources of a particular type belonging to a resource group x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansByResourceGroup.json | -| [commitmentPlansListPlansBySubscriptionSample.ts][commitmentplanslistplansbysubscriptionsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansBySubscription.json | -| [commitmentPlansListSample.ts][commitmentplanslistsample] | Gets the commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentPlans.json | -| [commitmentPlansUpdatePlanSample.ts][commitmentplansupdateplansample] | Create Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateSharedCommitmentPlan.json | -| [commitmentTiersListSample.ts][commitmenttierslistsample] | List Commitment Tiers. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentTiers.json | -| [deletedAccountsGetSample.ts][deletedaccountsgetsample] | Returns a Cognitive Services account specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeletedAccount.json | -| [deletedAccountsListSample.ts][deletedaccountslistsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeletedAccountsBySubscription.json | -| [deletedAccountsPurgeSample.ts][deletedaccountspurgesample] | Deletes a Cognitive Services account from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PurgeDeletedAccount.json | -| [deploymentsCreateOrUpdateSample.ts][deploymentscreateorupdatesample] | Update the state of specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutDeployment.json | -| [deploymentsDeleteSample.ts][deploymentsdeletesample] | Deletes the specified deployment associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteDeployment.json | -| [deploymentsGetSample.ts][deploymentsgetsample] | Gets the specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeployment.json | -| [deploymentsListSample.ts][deploymentslistsample] | Gets the deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeployments.json | -| [modelsListSample.ts][modelslistsample] | List Models. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListModels.json | -| [operationsListSample.ts][operationslistsample] | Lists all the available Cognitive Services account operations. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetOperations.json | -| [privateEndpointConnectionsCreateOrUpdateSample.ts][privateendpointconnectionscreateorupdatesample] | Update the state of specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutPrivateEndpointConnection.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | Gets the private endpoint connections associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateEndpointConnections.json | -| [privateLinkResourcesListSample.ts][privatelinkresourceslistsample] | Gets the private link resources that need to be created for a Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateLinkResources.json | -| [resourceSkusListSample.ts][resourceskuslistsample] | Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSkus.json | -| [usagesListSample.ts][usageslistsample] | Get usages for the requested subscription x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListUsages.json | +| **File Name** | **Description** | +| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [accountsCreateSample.ts][accountscreatesample] | Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateAccount.json | +| [accountsDeleteSample.ts][accountsdeletesample] | Deletes a Cognitive Services account from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteAccount.json | +| [accountsGetSample.ts][accountsgetsample] | Returns a Cognitive Services account specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetAccount.json | +| [accountsListByResourceGroupSample.ts][accountslistbyresourcegroupsample] | Returns all the resources of a particular type belonging to a resource group x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsByResourceGroup.json | +| [accountsListKeysSample.ts][accountslistkeyssample] | Lists the account keys for the specified Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListKeys.json | +| [accountsListModelsSample.ts][accountslistmodelssample] | List available Models for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountModels.json | +| [accountsListSample.ts][accountslistsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsBySubscription.json | +| [accountsListSkusSample.ts][accountslistskussample] | List available SKUs for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSkus.json | +| [accountsListUsagesSample.ts][accountslistusagessample] | Get usages for the requested Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetUsages.json | +| [accountsRegenerateKeySample.ts][accountsregeneratekeysample] | Regenerates the specified account key for the specified Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/RegenerateKey.json | +| [accountsUpdateSample.ts][accountsupdatesample] | Updates a Cognitive Services account x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateAccount.json | +| [calculateModelCapacitySample.ts][calculatemodelcapacitysample] | Model capacity calculator. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CalculateModelCapacity.json | +| [checkDomainAvailabilitySample.ts][checkdomainavailabilitysample] | Check whether a domain is available. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckDomainAvailability.json | +| [checkSkuAvailabilitySample.ts][checkskuavailabilitysample] | Check available SKUs. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckSkuAvailability.json | +| [commitmentPlansCreateOrUpdateAssociationSample.ts][commitmentplanscreateorupdateassociationsample] | Create or update the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlanAssociation.json | +| [commitmentPlansCreateOrUpdatePlanSample.ts][commitmentplanscreateorupdateplansample] | Create Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlan.json | +| [commitmentPlansCreateOrUpdateSample.ts][commitmentplanscreateorupdatesample] | Update the state of specified commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutCommitmentPlan.json | +| [commitmentPlansDeleteAssociationSample.ts][commitmentplansdeleteassociationsample] | Deletes the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlanAssociation.json | +| [commitmentPlansDeletePlanSample.ts][commitmentplansdeleteplansample] | Deletes a Cognitive Services commitment plan from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlan.json | +| [commitmentPlansDeleteSample.ts][commitmentplansdeletesample] | Deletes the specified commitmentPlan associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteCommitmentPlan.json | +| [commitmentPlansGetAssociationSample.ts][commitmentplansgetassociationsample] | Gets the association of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlanAssociation.json | +| [commitmentPlansGetPlanSample.ts][commitmentplansgetplansample] | Returns a Cognitive Services commitment plan specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlan.json | +| [commitmentPlansGetSample.ts][commitmentplansgetsample] | Gets the specified commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetCommitmentPlan.json | +| [commitmentPlansListAssociationsSample.ts][commitmentplanslistassociationssample] | Gets the associations of the Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlanAssociations.json | +| [commitmentPlansListPlansByResourceGroupSample.ts][commitmentplanslistplansbyresourcegroupsample] | Returns all the resources of a particular type belonging to a resource group x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansByResourceGroup.json | +| [commitmentPlansListPlansBySubscriptionSample.ts][commitmentplanslistplansbysubscriptionsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansBySubscription.json | +| [commitmentPlansListSample.ts][commitmentplanslistsample] | Gets the commitmentPlans associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentPlans.json | +| [commitmentPlansUpdatePlanSample.ts][commitmentplansupdateplansample] | Create Cognitive Services commitment plan. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateSharedCommitmentPlan.json | +| [commitmentTiersListSample.ts][commitmenttierslistsample] | List Commitment Tiers. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentTiers.json | +| [defenderForAiSettingsCreateOrUpdateSample.ts][defenderforaisettingscreateorupdatesample] | Creates or Updates the specified Defender for AI setting. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDefenderForAISetting.json | +| [defenderForAiSettingsGetSample.ts][defenderforaisettingsgetsample] | Gets the specified Defender for AI setting by name. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDefenderForAISetting.json | +| [defenderForAiSettingsListSample.ts][defenderforaisettingslistsample] | Lists the Defender for AI settings. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDefenderForAISetting.json | +| [defenderForAiSettingsUpdateSample.ts][defenderforaisettingsupdatesample] | Updates the specified Defender for AI setting. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDefenderForAISetting.json | +| [deletedAccountsGetSample.ts][deletedaccountsgetsample] | Returns a Cognitive Services account specified by the parameters. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeletedAccount.json | +| [deletedAccountsListSample.ts][deletedaccountslistsample] | Returns all the resources of a particular type belonging to a subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeletedAccountsBySubscription.json | +| [deletedAccountsPurgeSample.ts][deletedaccountspurgesample] | Deletes a Cognitive Services account from the resource group. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PurgeDeletedAccount.json | +| [deploymentsCreateOrUpdateSample.ts][deploymentscreateorupdatesample] | Update the state of specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDeployment.json | +| [deploymentsDeleteSample.ts][deploymentsdeletesample] | Deletes the specified deployment associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteDeployment.json | +| [deploymentsGetSample.ts][deploymentsgetsample] | Gets the specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeployment.json | +| [deploymentsListSample.ts][deploymentslistsample] | Gets the deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeployments.json | +| [deploymentsListSkusSample.ts][deploymentslistskussample] | Lists the specified deployments skus associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeploymentSkus.json | +| [deploymentsUpdateSample.ts][deploymentsupdatesample] | Update specified deployments associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDeployment.json | +| [encryptionScopesCreateOrUpdateSample.ts][encryptionscopescreateorupdatesample] | Update the state of specified encryptionScope associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutEncryptionScope.json | +| [encryptionScopesDeleteSample.ts][encryptionscopesdeletesample] | Deletes the specified encryptionScope associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteEncryptionScope.json | +| [encryptionScopesGetSample.ts][encryptionscopesgetsample] | Gets the specified EncryptionScope associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetEncryptionScope.json | +| [encryptionScopesListSample.ts][encryptionscopeslistsample] | Gets the content filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListEncryptionScopes.json | +| [locationBasedModelCapacitiesListSample.ts][locationbasedmodelcapacitieslistsample] | List Location Based ModelCapacities. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationBasedModelCapacities.json | +| [modelCapacitiesListSample.ts][modelcapacitieslistsample] | List ModelCapacities. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListModelCapacities.json | +| [modelsListSample.ts][modelslistsample] | List Models. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationModels.json | +| [networkSecurityPerimeterConfigurationsGetSample.ts][networksecurityperimeterconfigurationsgetsample] | Gets the specified NSP configurations for an account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetNetworkSecurityPerimeterConfigurations.json | +| [networkSecurityPerimeterConfigurationsListSample.ts][networksecurityperimeterconfigurationslistsample] | Gets a list of NSP configurations for an account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListNetworkSecurityPerimeterConfigurations.json | +| [networkSecurityPerimeterConfigurationsReconcileSample.ts][networksecurityperimeterconfigurationsreconcilesample] | Reconcile the NSP configuration for an account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ReconcileNetworkSecurityPerimeterConfigurations.json | +| [operationsListSample.ts][operationslistsample] | Lists all the available Cognitive Services account operations. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetOperations.json | +| [privateEndpointConnectionsCreateOrUpdateSample.ts][privateendpointconnectionscreateorupdatesample] | Update the state of specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutPrivateEndpointConnection.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeletePrivateEndpointConnection.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetPrivateEndpointConnection.json | +| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | Gets the private endpoint connections associated with the Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateEndpointConnections.json | +| [privateLinkResourcesListSample.ts][privatelinkresourceslistsample] | Gets the private link resources that need to be created for a Cognitive Services account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateLinkResources.json | +| [raiBlocklistItemsBatchAddSample.ts][raiblocklistitemsbatchaddsample] | Batch operation to add blocklist items. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/AddRaiBlocklistItems.json | +| [raiBlocklistItemsBatchDeleteSample.ts][raiblocklistitemsbatchdeletesample] | Batch operation to delete blocklist items. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItems.json | +| [raiBlocklistItemsCreateOrUpdateSample.ts][raiblocklistitemscreateorupdatesample] | Update the state of specified blocklist item associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklistItem.json | +| [raiBlocklistItemsDeleteSample.ts][raiblocklistitemsdeletesample] | Deletes the specified blocklist Item associated with the custom blocklist. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItem.json | +| [raiBlocklistItemsGetSample.ts][raiblocklistitemsgetsample] | Gets the specified custom blocklist Item associated with the custom blocklist. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklistItem.json | +| [raiBlocklistItemsListSample.ts][raiblocklistitemslistsample] | Gets the blocklist items associated with the custom blocklist. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklistItems.json | +| [raiBlocklistsCreateOrUpdateSample.ts][raiblocklistscreateorupdatesample] | Update the state of specified blocklist associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklist.json | +| [raiBlocklistsDeleteSample.ts][raiblocklistsdeletesample] | Deletes the specified custom blocklist associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklist.json | +| [raiBlocklistsGetSample.ts][raiblocklistsgetsample] | Gets the specified custom blocklist associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklist.json | +| [raiBlocklistsListSample.ts][raiblocklistslistsample] | Gets the custom blocklists associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklists.json | +| [raiContentFiltersGetSample.ts][raicontentfiltersgetsample] | Get Content Filters by Name. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiContentFilter.json | +| [raiContentFiltersListSample.ts][raicontentfilterslistsample] | List Content Filters types. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiContentFilters.json | +| [raiPoliciesCreateOrUpdateSample.ts][raipoliciescreateorupdatesample] | Update the state of specified Content Filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiPolicy.json | +| [raiPoliciesDeleteSample.ts][raipoliciesdeletesample] | Deletes the specified Content Filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiPolicy.json | +| [raiPoliciesGetSample.ts][raipoliciesgetsample] | Gets the specified Content Filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiPolicy.json | +| [raiPoliciesListSample.ts][raipolicieslistsample] | Gets the content filters associated with the Azure OpenAI account. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiPolicies.json | +| [resourceSkusListSample.ts][resourceskuslistsample] | Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSkus.json | +| [usagesListSample.ts][usageslistsample] | Get usages for the requested subscription x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListUsages.json | ## Prerequisites @@ -110,6 +142,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [accountslistusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListUsagesSample.ts [accountsregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsRegenerateKeySample.ts [accountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsUpdateSample.ts +[calculatemodelcapacitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/calculateModelCapacitySample.ts [checkdomainavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkDomainAvailabilitySample.ts [checkskuavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkSkuAvailabilitySample.ts [commitmentplanscreateorupdateassociationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateAssociationSample.ts @@ -127,6 +160,10 @@ Take a look at our [API Documentation][apiref] for more information about the AP [commitmentplanslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListSample.ts [commitmentplansupdateplansample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansUpdatePlanSample.ts [commitmenttierslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentTiersListSample.ts +[defenderforaisettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsCreateOrUpdateSample.ts +[defenderforaisettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsGetSample.ts +[defenderforaisettingslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsListSample.ts +[defenderforaisettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsUpdateSample.ts [deletedaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsGetSample.ts [deletedaccountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsListSample.ts [deletedaccountspurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsPurgeSample.ts @@ -134,13 +171,40 @@ Take a look at our [API Documentation][apiref] for more information about the AP [deploymentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsDeleteSample.ts [deploymentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsGetSample.ts [deploymentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSample.ts +[deploymentslistskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSkusSample.ts +[deploymentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsUpdateSample.ts +[encryptionscopescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesCreateOrUpdateSample.ts +[encryptionscopesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesDeleteSample.ts +[encryptionscopesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesGetSample.ts +[encryptionscopeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesListSample.ts +[locationbasedmodelcapacitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/locationBasedModelCapacitiesListSample.ts +[modelcapacitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelCapacitiesListSample.ts [modelslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelsListSample.ts +[networksecurityperimeterconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts +[networksecurityperimeterconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts +[networksecurityperimeterconfigurationsreconcilesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts [operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/operationsListSample.ts [privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts [privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts [privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts [privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsListSample.ts [privatelinkresourceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateLinkResourcesListSample.ts +[raiblocklistitemsbatchaddsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchAddSample.ts +[raiblocklistitemsbatchdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchDeleteSample.ts +[raiblocklistitemscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsCreateOrUpdateSample.ts +[raiblocklistitemsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsDeleteSample.ts +[raiblocklistitemsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsGetSample.ts +[raiblocklistitemslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsListSample.ts +[raiblocklistscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsCreateOrUpdateSample.ts +[raiblocklistsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsDeleteSample.ts +[raiblocklistsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsGetSample.ts +[raiblocklistslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsListSample.ts +[raicontentfiltersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersGetSample.ts +[raicontentfilterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersListSample.ts +[raipoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesCreateOrUpdateSample.ts +[raipoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesDeleteSample.ts +[raipoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesGetSample.ts +[raipolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesListSample.ts [resourceskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/resourceSkusListSample.ts [usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/usagesListSample.ts [apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-cognitiveservices?view=azure-node-preview diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/sample.env b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/sample.env +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsCreateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsCreateSample.ts index 3ea44bc34aa9..855b9df8b2c1 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsCreateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsCreateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { Account, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. * * @summary Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateAccount.json */ async function createAccount() { const subscriptionId = @@ -40,27 +40,27 @@ async function createAccount() { keyVaultProperties: { keyName: "KeyName", keyVaultUri: "https://pltfrmscrts-use-pc-dev.vault.azure.net/", - keyVersion: "891CF236-D241-4738-9462-D506AF493DFA" - } + keyVersion: "891CF236-D241-4738-9462-D506AF493DFA", + }, }, userOwnedStorage: [ { resourceId: - "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" - } - ] + "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount", + }, + ], }, - sku: { name: "S0" } + sku: { name: "S0" }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.beginCreateAndWait( resourceGroupName, accountName, - account + account, ); console.log(result); } @@ -69,7 +69,7 @@ async function createAccount() { * This sample demonstrates how to Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. * * @summary Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccountMin.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateAccountMin.json */ async function createAccountMin() { const subscriptionId = @@ -83,17 +83,17 @@ async function createAccountMin() { kind: "CognitiveServices", location: "West US", properties: {}, - sku: { name: "S0" } + sku: { name: "S0" }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.beginCreateAndWait( resourceGroupName, accountName, - account + account, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsDeleteSample.ts index 33d53c777986..59e4b1e72fd6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. * * @summary Deletes a Cognitive Services account from the resource group. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteAccount.json */ async function deleteAccount() { const subscriptionId = @@ -30,11 +30,11 @@ async function deleteAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.beginDeleteAndWait( resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsGetSample.ts index 3e282b94249b..ac95f4b8b6c4 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. * * @summary Returns a Cognitive Services account specified by the parameters. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetAccount.json */ async function getAccount() { const subscriptionId = @@ -30,7 +30,7 @@ async function getAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.get(resourceGroupName, accountName); console.log(result); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListByResourceGroupSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListByResourceGroupSample.ts index 745fbe133669..d745c5549342 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListByResourceGroupSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a resource group * * @summary Returns all the resources of a particular type belonging to a resource group - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsByResourceGroup.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsByResourceGroup.json */ async function listAccountsByResourceGroup() { const subscriptionId = @@ -29,11 +29,11 @@ async function listAccountsByResourceGroup() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.accounts.listByResourceGroup( - resourceGroupName + resourceGroupName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListKeysSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListKeysSample.ts index 771bd4d6c0eb..4008a5a30e06 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListKeysSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the account keys for the specified Cognitive Services account. * * @summary Lists the account keys for the specified Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListKeys.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListKeys.json */ async function listKeys() { const subscriptionId = @@ -30,7 +30,7 @@ async function listKeys() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.listKeys(resourceGroupName, accountName); console.log(result); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListModelsSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListModelsSample.ts index 784908b14d66..fb1c3cf7fcfc 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListModelsSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListModelsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List available Models for the requested Cognitive Services account * * @summary List available Models for the requested Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountModels.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountModels.json */ async function listAccountModels() { const subscriptionId = @@ -29,12 +29,12 @@ async function listAccountModels() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.accounts.listModels( resourceGroupName, - accountName + accountName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSample.ts index 782cfcdb45d4..459ed193ce70 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription. * * @summary Returns all the resources of a particular type belonging to a subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListAccountsBySubscription.json */ async function listAccountsBySubscription() { const subscriptionId = @@ -27,7 +27,7 @@ async function listAccountsBySubscription() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.accounts.list()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSkusSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSkusSample.ts index c9444233c795..589e04f843ec 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSkusSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSkusSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List available SKUs for the requested Cognitive Services account * * @summary List available SKUs for the requested Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSkus.json */ async function listSkUs() { const subscriptionId = @@ -30,7 +30,7 @@ async function listSkUs() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.listSkus(resourceGroupName, accountName); console.log(result); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListUsagesSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListUsagesSample.ts index 86bd58b9d6bf..029ea5222299 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListUsagesSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListUsagesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get usages for the requested Cognitive Services account * * @summary Get usages for the requested Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetUsages.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetUsages.json */ async function getUsages() { const subscriptionId = @@ -30,11 +30,11 @@ async function getUsages() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.listUsages( resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsRegenerateKeySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsRegenerateKeySample.ts index f44268b22ef5..19aad9824fd6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsRegenerateKeySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsRegenerateKeySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Regenerates the specified account key for the specified Cognitive Services account. * * @summary Regenerates the specified account key for the specified Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/RegenerateKey.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/RegenerateKey.json */ async function regenerateKeys() { const subscriptionId = @@ -31,12 +31,12 @@ async function regenerateKeys() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.regenerateKey( resourceGroupName, accountName, - keyName + keyName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsUpdateSample.ts index 026d5878848a..57b80519420d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { Account, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates a Cognitive Services account * * @summary Updates a Cognitive Services account - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateAccount.json */ async function updateAccount() { const subscriptionId = @@ -34,12 +34,12 @@ async function updateAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.accounts.beginUpdateAndWait( resourceGroupName, accountName, - account + account, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/calculateModelCapacitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/calculateModelCapacitySample.ts new file mode 100644 index 000000000000..eb574b9cecee --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/calculateModelCapacitySample.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CalculateModelCapacityOptionalParams, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Model capacity calculator. + * + * @summary Model capacity calculator. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CalculateModelCapacity.json + */ +async function calculateModelCapacity() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; + const model = { name: "gpt-4", format: "OpenAI", version: "0613" }; + const skuName = "ProvisionedManaged"; + const workloads = [ + { + requestParameters: { avgGeneratedTokens: 50, avgPromptTokens: 30 }, + requestPerMinute: 10, + }, + { + requestParameters: { avgGeneratedTokens: 20, avgPromptTokens: 60 }, + requestPerMinute: 20, + }, + ]; + const options: CalculateModelCapacityOptionalParams = { + model, + skuName, + workloads, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.calculateModelCapacity(options); + console.log(result); +} + +async function main() { + calculateModelCapacity(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkDomainAvailabilitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkDomainAvailabilitySample.ts index f700c7ff52e4..7485d605c90c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkDomainAvailabilitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkDomainAvailabilitySample.ts @@ -8,7 +8,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { + CheckDomainAvailabilityOptionalParams, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -18,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Check whether a domain is available. * * @summary Check whether a domain is available. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckDomainAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckDomainAvailability.json */ async function checkSkuAvailability() { const subscriptionId = @@ -26,12 +29,18 @@ async function checkSkuAvailability() { "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; const subdomainName = "contosodemoapp1"; const typeParam = "Microsoft.CognitiveServices/accounts"; + const kind = "undefined"; + const options: CheckDomainAvailabilityOptionalParams = { kind }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, + ); + const result = await client.checkDomainAvailability( + subdomainName, + typeParam, + options, ); - const result = await client.checkDomainAvailability(subdomainName, typeParam); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkSkuAvailabilitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkSkuAvailabilitySample.ts index 5855bef8112d..636fffb9777f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkSkuAvailabilitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkSkuAvailabilitySample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Check available SKUs. * * @summary Check available SKUs. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckSkuAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CheckSkuAvailability.json */ async function checkSkuAvailability() { const subscriptionId = @@ -31,13 +31,13 @@ async function checkSkuAvailability() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.checkSkuAvailability( location, skus, kind, - typeParam + typeParam, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateAssociationSample.ts index ff401aeb264d..dbfb5dfd8893 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateAssociationSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CommitmentPlanAccountAssociation, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create or update the association of the Cognitive Services commitment plan. * * @summary Create or update the association of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlanAssociation.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlanAssociation.json */ async function putCommitmentPlan() { const subscriptionId = @@ -33,19 +33,20 @@ async function putCommitmentPlan() { const commitmentPlanAssociationName = "commitmentPlanAssociationName"; const association: CommitmentPlanAccountAssociation = { accountId: - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName" + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName", }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId - ); - const result = await client.commitmentPlans.beginCreateOrUpdateAssociationAndWait( - resourceGroupName, - commitmentPlanName, - commitmentPlanAssociationName, - association + subscriptionId, ); + const result = + await client.commitmentPlans.beginCreateOrUpdateAssociationAndWait( + resourceGroupName, + commitmentPlanName, + commitmentPlanAssociationName, + association, + ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdatePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdatePlanSample.ts index 9f9108237438..2f47d0db7c64 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdatePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdatePlanSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CommitmentPlan, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create Cognitive Services commitment plan. * * @summary Create Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/CreateSharedCommitmentPlan.json */ async function createCommitmentPlan() { const subscriptionId = @@ -37,19 +37,19 @@ async function createCommitmentPlan() { autoRenew: true, current: { tier: "T1" }, hostingModel: "Web", - planType: "STT" + planType: "STT", }, - sku: { name: "S0" } + sku: { name: "S0" }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginCreateOrUpdatePlanAndWait( resourceGroupName, commitmentPlanName, - commitmentPlan + commitmentPlan, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateSample.ts index 0c06c9ea88fa..a6c6085da394 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CommitmentPlan, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the state of specified commitmentPlans associated with the Cognitive Services account. * * @summary Update the state of specified commitmentPlans associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutCommitmentPlan.json */ async function putCommitmentPlan() { const subscriptionId = @@ -35,19 +35,19 @@ async function putCommitmentPlan() { autoRenew: true, current: { tier: "T1" }, hostingModel: "Web", - planType: "Speech2Text" - } + planType: "Speech2Text", + }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.createOrUpdate( resourceGroupName, accountName, commitmentPlanName, - commitmentPlan + commitmentPlan, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteAssociationSample.ts index 162b05c08d55..6b3597d80684 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteAssociationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the association of the Cognitive Services commitment plan. * * @summary Deletes the association of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlanAssociation.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlanAssociation.json */ async function deleteCommitmentPlan() { const subscriptionId = @@ -31,12 +31,12 @@ async function deleteCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginDeleteAssociationAndWait( resourceGroupName, commitmentPlanName, - commitmentPlanAssociationName + commitmentPlanAssociationName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeletePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeletePlanSample.ts index 301fef54d38c..03b444a86f59 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeletePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeletePlanSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Cognitive Services commitment plan from the resource group. * * @summary Deletes a Cognitive Services commitment plan from the resource group. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteSharedCommitmentPlan.json */ async function deleteCommitmentPlan() { const subscriptionId = @@ -30,11 +30,11 @@ async function deleteCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginDeletePlanAndWait( resourceGroupName, - commitmentPlanName + commitmentPlanName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteSample.ts index 09dd7183c48f..132fab570c32 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified commitmentPlan associated with the Cognitive Services account. * * @summary Deletes the specified commitmentPlan associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteCommitmentPlan.json */ async function deleteCommitmentPlan() { const subscriptionId = @@ -30,12 +30,12 @@ async function deleteCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginDeleteAndWait( resourceGroupName, accountName, - commitmentPlanName + commitmentPlanName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetAssociationSample.ts index 9f4fa56be2f0..3f879364a3be 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetAssociationSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the association of the Cognitive Services commitment plan. * * @summary Gets the association of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlanAssociation.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlanAssociation.json */ async function getCommitmentPlan() { const subscriptionId = @@ -31,12 +31,12 @@ async function getCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.getAssociation( resourceGroupName, commitmentPlanName, - commitmentPlanAssociationName + commitmentPlanAssociationName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetPlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetPlanSample.ts index cdba25afd463..fbb8d8b570d7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetPlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetPlanSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Cognitive Services commitment plan specified by the parameters. * * @summary Returns a Cognitive Services commitment plan specified by the parameters. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSharedCommitmentPlan.json */ async function getCommitmentPlan() { const subscriptionId = @@ -30,11 +30,11 @@ async function getCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.getPlan( resourceGroupName, - commitmentPlanName + commitmentPlanName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetSample.ts index 3837c757d9f1..a26c94a48cdd 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified commitmentPlans associated with the Cognitive Services account. * * @summary Gets the specified commitmentPlans associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetCommitmentPlan.json */ async function getCommitmentPlan() { const subscriptionId = @@ -30,12 +30,12 @@ async function getCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.get( resourceGroupName, accountName, - commitmentPlanName + commitmentPlanName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListAssociationsSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListAssociationsSample.ts index e5b660d08a14..fd42f859d793 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListAssociationsSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListAssociationsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the associations of the Cognitive Services commitment plan. * * @summary Gets the associations of the Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlanAssociations.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlanAssociations.json */ async function listCommitmentPlans() { const subscriptionId = @@ -30,12 +30,12 @@ async function listCommitmentPlans() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentPlans.listAssociations( resourceGroupName, - commitmentPlanName + commitmentPlanName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansByResourceGroupSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansByResourceGroupSample.ts index 51cc35808db0..202ec83ffc21 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansByResourceGroupSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a resource group * * @summary Returns all the resources of a particular type belonging to a resource group - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansByResourceGroup.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansByResourceGroup.json */ async function listCommitmentPlansByResourceGroup() { const subscriptionId = @@ -29,11 +29,11 @@ async function listCommitmentPlansByResourceGroup() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentPlans.listPlansByResourceGroup( - resourceGroupName + resourceGroupName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansBySubscriptionSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansBySubscriptionSample.ts index 7197e56a904b..d27f76c6b04f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansBySubscriptionSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription. * * @summary Returns all the resources of a particular type belonging to a subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListSharedCommitmentPlansBySubscription.json */ async function listAccountsBySubscription() { const subscriptionId = @@ -27,7 +27,7 @@ async function listAccountsBySubscription() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentPlans.listPlansBySubscription()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListSample.ts index 9de1fc1a8fc9..991f990c845d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the commitmentPlans associated with the Cognitive Services account. * * @summary Gets the commitmentPlans associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentPlans.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentPlans.json */ async function listCommitmentPlans() { const subscriptionId = @@ -29,12 +29,12 @@ async function listCommitmentPlans() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentPlans.list( resourceGroupName, - accountName + accountName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansUpdatePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansUpdatePlanSample.ts index a659f4ed6b2d..92e793e64378 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansUpdatePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansUpdatePlanSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { PatchResourceTagsAndSku, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Create Cognitive Services commitment plan. * * @summary Create Cognitive Services commitment plan. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateSharedCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateSharedCommitmentPlan.json */ async function createCommitmentPlan() { const subscriptionId = @@ -34,12 +34,12 @@ async function createCommitmentPlan() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.commitmentPlans.beginUpdatePlanAndWait( resourceGroupName, commitmentPlanName, - commitmentPlan + commitmentPlan, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentTiersListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentTiersListSample.ts index 1bd95c1d9781..0b0886e688d0 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentTiersListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentTiersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List Commitment Tiers. * * @summary List Commitment Tiers. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentTiers.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListCommitmentTiers.json */ async function listCommitmentTiers() { const subscriptionId = @@ -27,7 +27,7 @@ async function listCommitmentTiers() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.commitmentTiers.list(location)) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6cfcd068d7e5 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsCreateOrUpdateSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + DefenderForAISetting, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates or Updates the specified Defender for AI setting. + * + * @summary Creates or Updates the specified Defender for AI setting. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDefenderForAISetting.json + */ +async function putDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const defenderForAISettingName = "Default"; + const defenderForAISettings: DefenderForAISetting = { state: "Enabled" }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.defenderForAISettings.createOrUpdate( + resourceGroupName, + accountName, + defenderForAISettingName, + defenderForAISettings, + ); + console.log(result); +} + +async function main() { + putDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsGetSample.ts new file mode 100644 index 000000000000..c6e939608b9c --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified Defender for AI setting by name. + * + * @summary Gets the specified Defender for AI setting by name. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDefenderForAISetting.json + */ +async function getDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const defenderForAISettingName = "Default"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.defenderForAISettings.get( + resourceGroupName, + accountName, + defenderForAISettingName, + ); + console.log(result); +} + +async function main() { + getDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsListSample.ts new file mode 100644 index 000000000000..db6f0824c430 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists the Defender for AI settings. + * + * @summary Lists the Defender for AI settings. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDefenderForAISetting.json + */ +async function listDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.defenderForAISettings.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsUpdateSample.ts new file mode 100644 index 000000000000..52ae8d5f9066 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsUpdateSample.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + DefenderForAISetting, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates the specified Defender for AI setting. + * + * @summary Updates the specified Defender for AI setting. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDefenderForAISetting.json + */ +async function updateDefenderForAiSetting() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const defenderForAISettingName = "Default"; + const defenderForAISettings: DefenderForAISetting = { state: "Enabled" }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.defenderForAISettings.update( + resourceGroupName, + accountName, + defenderForAISettingName, + defenderForAISettings, + ); + console.log(result); +} + +async function main() { + updateDefenderForAiSetting(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsGetSample.ts index 639c41d16742..92d899b308da 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. * * @summary Returns a Cognitive Services account specified by the parameters. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeletedAccount.json */ async function getAccount() { const subscriptionId = @@ -31,12 +31,12 @@ async function getAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deletedAccounts.get( location, resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsListSample.ts index 6fea1231434b..8f23a5684d87 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription. * * @summary Returns all the resources of a particular type belonging to a subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeletedAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeletedAccountsBySubscription.json */ async function listDeletedAccountsBySubscription() { const subscriptionId = @@ -27,7 +27,7 @@ async function listDeletedAccountsBySubscription() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.deletedAccounts.list()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsPurgeSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsPurgeSample.ts index c0a868d3926e..198857f8a548 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsPurgeSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsPurgeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. * * @summary Deletes a Cognitive Services account from the resource group. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PurgeDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PurgeDeletedAccount.json */ async function deleteAccount() { const subscriptionId = @@ -31,12 +31,12 @@ async function deleteAccount() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deletedAccounts.beginPurgeAndWait( location, resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsCreateOrUpdateSample.ts index c9f1e144cdb3..40d90a634ed2 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsCreateOrUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { Deployment, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the state of specified deployments associated with the Cognitive Services account. * * @summary Update the state of specified deployments associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutDeployment.json */ async function putDeployment() { const subscriptionId = @@ -32,18 +32,18 @@ async function putDeployment() { const deploymentName = "deploymentName"; const deployment: Deployment = { properties: { model: { name: "ada", format: "OpenAI", version: "1" } }, - sku: { name: "Standard", capacity: 1 } + sku: { name: "Standard", capacity: 1 }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deployments.beginCreateOrUpdateAndWait( resourceGroupName, accountName, deploymentName, - deployment + deployment, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsDeleteSample.ts index 81170273822c..935695b4acc1 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified deployment associated with the Cognitive Services account. * * @summary Deletes the specified deployment associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteDeployment.json */ async function deleteDeployment() { const subscriptionId = @@ -30,12 +30,12 @@ async function deleteDeployment() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deployments.beginDeleteAndWait( resourceGroupName, accountName, - deploymentName + deploymentName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsGetSample.ts index 57ed837c6d2f..eab4e40bffc6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified deployments associated with the Cognitive Services account. * * @summary Gets the specified deployments associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetDeployment.json */ async function getDeployment() { const subscriptionId = @@ -30,12 +30,12 @@ async function getDeployment() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.deployments.get( resourceGroupName, accountName, - deploymentName + deploymentName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSample.ts index 696ac7c5d4ad..821645e90a95 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the deployments associated with the Cognitive Services account. * * @summary Gets the deployments associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeployments.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeployments.json */ async function listDeployments() { const subscriptionId = @@ -29,12 +29,12 @@ async function listDeployments() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.deployments.list( resourceGroupName, - accountName + accountName, )) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSkusSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSkusSample.ts new file mode 100644 index 000000000000..f0f91473a804 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSkusSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists the specified deployments skus associated with the Cognitive Services account. + * + * @summary Lists the specified deployments skus associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListDeploymentSkus.json + */ +async function listDeploymentSkus() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const deploymentName = "deploymentName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.deployments.listSkus( + resourceGroupName, + accountName, + deploymentName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listDeploymentSkus(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsUpdateSample.ts new file mode 100644 index 000000000000..1218362d64e5 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + PatchResourceTagsAndSku, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update specified deployments associated with the Cognitive Services account. + * + * @summary Update specified deployments associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/UpdateDeployment.json + */ +async function updateDeployment() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const deploymentName = "deploymentName"; + const deployment: PatchResourceTagsAndSku = { + sku: { name: "Standard", capacity: 1 }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.deployments.beginUpdateAndWait( + resourceGroupName, + accountName, + deploymentName, + deployment, + ); + console.log(result); +} + +async function main() { + updateDeployment(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a343b56c5a98 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesCreateOrUpdateSample.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + EncryptionScope, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified encryptionScope associated with the Cognitive Services account. + * + * @summary Update the state of specified encryptionScope associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutEncryptionScope.json + */ +async function putEncryptionScope() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const encryptionScopeName = "encryptionScopeName"; + const encryptionScope: EncryptionScope = { + properties: { + keySource: "Microsoft.KeyVault", + keyVaultProperties: { + identityClientId: "00000000-0000-0000-0000-000000000000", + keyName: "DevKeyWestUS2", + keyVaultUri: "https://devkvwestus2.vault.azure.net/", + keyVersion: "9f85549d7bf14ff4bf178c10d3bdca95", + }, + state: "Enabled", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.encryptionScopes.createOrUpdate( + resourceGroupName, + accountName, + encryptionScopeName, + encryptionScope, + ); + console.log(result); +} + +async function main() { + putEncryptionScope(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesDeleteSample.ts new file mode 100644 index 000000000000..0a213ace78fc --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesDeleteSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified encryptionScope associated with the Cognitive Services account. + * + * @summary Deletes the specified encryptionScope associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteEncryptionScope.json + */ +async function deleteEncryptionScope() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const encryptionScopeName = "encryptionScopeName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.encryptionScopes.beginDeleteAndWait( + resourceGroupName, + accountName, + encryptionScopeName, + ); + console.log(result); +} + +async function main() { + deleteEncryptionScope(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesGetSample.ts new file mode 100644 index 000000000000..e595b6dc9478 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified EncryptionScope associated with the Cognitive Services account. + * + * @summary Gets the specified EncryptionScope associated with the Cognitive Services account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetEncryptionScope.json + */ +async function getEncryptionScope() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const encryptionScopeName = "encryptionScopeName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.encryptionScopes.get( + resourceGroupName, + accountName, + encryptionScopeName, + ); + console.log(result); +} + +async function main() { + getEncryptionScope(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesListSample.ts new file mode 100644 index 000000000000..014cb9a2c0f9 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. + * + * @summary Gets the content filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListEncryptionScopes.json + */ +async function listEncryptionScopes() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.encryptionScopes.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listEncryptionScopes(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/locationBasedModelCapacitiesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/locationBasedModelCapacitiesListSample.ts new file mode 100644 index 000000000000..1c509fedbeb6 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/locationBasedModelCapacitiesListSample.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List Location Based ModelCapacities. + * + * @summary List Location Based ModelCapacities. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationBasedModelCapacities.json + */ +async function listLocationBasedModelCapacities() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "WestUS"; + const modelFormat = "OpenAI"; + const modelName = "ada"; + const modelVersion = "1"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.locationBasedModelCapacities.list( + location, + modelFormat, + modelName, + modelVersion, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listLocationBasedModelCapacities(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelCapacitiesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelCapacitiesListSample.ts new file mode 100644 index 000000000000..832a8a581a8d --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelCapacitiesListSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List ModelCapacities. + * + * @summary List ModelCapacities. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListModelCapacities.json + */ +async function listModelCapacities() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const modelFormat = "OpenAI"; + const modelName = "ada"; + const modelVersion = "1"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.modelCapacities.list( + modelFormat, + modelName, + modelVersion, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listModelCapacities(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelsListSample.ts index 9140266e8061..da7e3e32a14d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelsListSample.ts @@ -18,9 +18,9 @@ dotenv.config(); * This sample demonstrates how to List Models. * * @summary List Models. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListModels.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListLocationModels.json */ -async function listModels() { +async function listLocationModels() { const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -28,7 +28,7 @@ async function listModels() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.models.list(location)) { @@ -38,7 +38,7 @@ async function listModels() { } async function main() { - listModels(); + listLocationModels(); } main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts new file mode 100644 index 000000000000..6ae41f077c9c --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified NSP configurations for an account. + * + * @summary Gets the specified NSP configurations for an account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetNetworkSecurityPerimeterConfigurations.json + */ +async function getNetworkSecurityPerimeterConfigurations() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const nspConfigurationName = "NSPConfigurationName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.networkSecurityPerimeterConfigurations.get( + resourceGroupName, + accountName, + nspConfigurationName, + ); + console.log(result); +} + +async function main() { + getNetworkSecurityPerimeterConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts new file mode 100644 index 000000000000..52153b872821 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a list of NSP configurations for an account. + * + * @summary Gets a list of NSP configurations for an account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListNetworkSecurityPerimeterConfigurations.json + */ +async function listNetworkSecurityPerimeterConfigurations() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.networkSecurityPerimeterConfigurations.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listNetworkSecurityPerimeterConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts new file mode 100644 index 000000000000..51576bfd7239 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Reconcile the NSP configuration for an account. + * + * @summary Reconcile the NSP configuration for an account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ReconcileNetworkSecurityPerimeterConfigurations.json + */ +async function reconcileNetworkSecurityPerimeterConfigurations() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const nspConfigurationName = "NSPConfigurationName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = + await client.networkSecurityPerimeterConfigurations.beginReconcileAndWait( + resourceGroupName, + accountName, + nspConfigurationName, + ); + console.log(result); +} + +async function main() { + reconcileNetworkSecurityPerimeterConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/operationsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/operationsListSample.ts index db7fbbd6058a..8448aed6f43c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/operationsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the available Cognitive Services account operations. * * @summary Lists all the available Cognitive Services account operations. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetOperations.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetOperations.json */ async function getOperations() { const subscriptionId = @@ -27,7 +27,7 @@ async function getOperations() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.operations.list()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts index 4487d60de158..0197636331af 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { PrivateEndpointConnection, - CognitiveServicesManagementClient + CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the state of specified private endpoint connection associated with the Cognitive Services account. * * @summary Update the state of specified private endpoint connection associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutPrivateEndpointConnection.json */ async function putPrivateEndpointConnection() { const subscriptionId = @@ -34,21 +34,22 @@ async function putPrivateEndpointConnection() { properties: { privateLinkServiceConnectionState: { description: "Auto-Approved", - status: "Approved" - } - } + status: "Approved", + }, + }, }; const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId - ); - const result = await client.privateEndpointConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - accountName, - privateEndpointConnectionName, - properties + subscriptionId, ); + const result = + await client.privateEndpointConnections.beginCreateOrUpdateAndWait( + resourceGroupName, + accountName, + privateEndpointConnectionName, + properties, + ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts index e21218ba87aa..dcae86191d76 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Cognitive Services account. * * @summary Deletes the specified private endpoint connection associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeletePrivateEndpointConnection.json */ async function deletePrivateEndpointConnection() { const subscriptionId = @@ -30,12 +30,12 @@ async function deletePrivateEndpointConnection() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.beginDeleteAndWait( resourceGroupName, accountName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts index c2a36cf33147..a5b22733b314 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private endpoint connection associated with the Cognitive Services account. * * @summary Gets the specified private endpoint connection associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetPrivateEndpointConnection.json */ async function getPrivateEndpointConnection() { const subscriptionId = @@ -30,12 +30,12 @@ async function getPrivateEndpointConnection() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.get( resourceGroupName, accountName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsListSample.ts index dcd7ad7fedf0..80cda9ba650e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private endpoint connections associated with the Cognitive Services account. * * @summary Gets the private endpoint connections associated with the Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateEndpointConnections.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateEndpointConnections.json */ async function getPrivateEndpointConnection() { const subscriptionId = @@ -29,11 +29,11 @@ async function getPrivateEndpointConnection() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.list( resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateLinkResourcesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateLinkResourcesListSample.ts index 32d1c6f68415..0597eff94f24 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateLinkResourcesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateLinkResourcesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link resources that need to be created for a Cognitive Services account. * * @summary Gets the private link resources that need to be created for a Cognitive Services account. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateLinkResources.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListPrivateLinkResources.json */ async function listPrivateLinkResources() { const subscriptionId = @@ -29,11 +29,11 @@ async function listPrivateLinkResources() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateLinkResources.list( resourceGroupName, - accountName + accountName, ); console.log(result); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchAddSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchAddSample.ts new file mode 100644 index 000000000000..18d0a657fe9f --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchAddSample.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RaiBlocklistItemBulkRequest, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Batch operation to add blocklist items. + * + * @summary Batch operation to add blocklist items. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/AddRaiBlocklistItems.json + */ +async function addRaiBlocklistItems() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "myblocklist"; + const raiBlocklistItems: RaiBlocklistItemBulkRequest[] = [ + { + name: "myblocklistitem1", + properties: { isRegex: true, pattern: "^[a-z0-9_-]{2,16}$" }, + }, + { + name: "myblocklistitem2", + properties: { isRegex: false, pattern: "blockwords" }, + }, + ]; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.batchAdd( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItems, + ); + console.log(result); +} + +async function main() { + addRaiBlocklistItems(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchDeleteSample.ts new file mode 100644 index 000000000000..27571a9a67e4 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchDeleteSample.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Batch operation to delete blocklist items. + * + * @summary Batch operation to delete blocklist items. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItems.json + */ +async function deleteRaiBlocklistItems() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemsNames: string[] = [ + "myblocklistitem1", + "myblocklistitem2", + ]; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.batchDelete( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemsNames, + ); + console.log(result); +} + +async function main() { + deleteRaiBlocklistItems(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..af5b9ec0e447 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsCreateOrUpdateSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RaiBlocklistItem, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified blocklist item associated with the Azure OpenAI account. + * + * @summary Update the state of specified blocklist item associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklistItem.json + */ +async function putRaiBlocklistItem() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemName = "raiBlocklistItemName"; + const raiBlocklistItem: RaiBlocklistItem = { + properties: { isRegex: false, pattern: "Pattern To Block" }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.createOrUpdate( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + raiBlocklistItem, + ); + console.log(result); +} + +async function main() { + putRaiBlocklistItem(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsDeleteSample.ts new file mode 100644 index 000000000000..10794c79da9d --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsDeleteSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified blocklist Item associated with the custom blocklist. + * + * @summary Deletes the specified blocklist Item associated with the custom blocklist. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklistItem.json + */ +async function deleteRaiBlocklistItem() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemName = "raiBlocklistItemName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.beginDeleteAndWait( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + ); + console.log(result); +} + +async function main() { + deleteRaiBlocklistItem(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsGetSample.ts new file mode 100644 index 000000000000..120dc9942b5c --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsGetSample.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified custom blocklist Item associated with the custom blocklist. + * + * @summary Gets the specified custom blocklist Item associated with the custom blocklist. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklistItem.json + */ +async function getRaiBlocklistItem() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklistItemName = "raiBlocklistItemName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklistItems.get( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + ); + console.log(result); +} + +async function main() { + getRaiBlocklistItem(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsListSample.ts new file mode 100644 index 000000000000..4bb0ceed7e7a --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsListSample.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the blocklist items associated with the custom blocklist. + * + * @summary Gets the blocklist items associated with the custom blocklist. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklistItems.json + */ +async function listBlocklistItems() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.raiBlocklistItems.list( + resourceGroupName, + accountName, + raiBlocklistName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listBlocklistItems(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a24461ee35a7 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsCreateOrUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RaiBlocklist, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified blocklist associated with the Azure OpenAI account. + * + * @summary Update the state of specified blocklist associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiBlocklist.json + */ +async function putRaiBlocklist() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const raiBlocklist: RaiBlocklist = { + properties: { description: "Basic blocklist description" }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklists.createOrUpdate( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklist, + ); + console.log(result); +} + +async function main() { + putRaiBlocklist(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsDeleteSample.ts new file mode 100644 index 000000000000..ab12f0363f6a --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsDeleteSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified custom blocklist associated with the Azure OpenAI account. + * + * @summary Deletes the specified custom blocklist associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiBlocklist.json + */ +async function deleteRaiBlocklist() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklists.beginDeleteAndWait( + resourceGroupName, + accountName, + raiBlocklistName, + ); + console.log(result); +} + +async function main() { + deleteRaiBlocklist(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsGetSample.ts new file mode 100644 index 000000000000..57f9f4938b1e --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified custom blocklist associated with the Azure OpenAI account. + * + * @summary Gets the specified custom blocklist associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiBlocklist.json + */ +async function getRaiBlocklist() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiBlocklistName = "raiBlocklistName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiBlocklists.get( + resourceGroupName, + accountName, + raiBlocklistName, + ); + console.log(result); +} + +async function main() { + getRaiBlocklist(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsListSample.ts new file mode 100644 index 000000000000..a042551e8b40 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the custom blocklists associated with the Azure OpenAI account. + * + * @summary Gets the custom blocklists associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListBlocklists.json + */ +async function listBlocklists() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.raiBlocklists.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listBlocklists(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersGetSample.ts new file mode 100644 index 000000000000..7b3bfb5a67cf --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersGetSample.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Content Filters by Name. + * + * @summary Get Content Filters by Name. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiContentFilter.json + */ +async function getRaiContentFilters() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "WestUS"; + const filterName = "IndirectAttack"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiContentFilters.get(location, filterName); + console.log(result); +} + +async function main() { + getRaiContentFilters(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersListSample.ts new file mode 100644 index 000000000000..830ecb5fc543 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersListSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List Content Filters types. + * + * @summary List Content Filters types. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiContentFilters.json + */ +async function listRaiContentFilters() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const location = "WestUS"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.raiContentFilters.list(location)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listRaiContentFilters(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..e79c4eedca54 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesCreateOrUpdateSample.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + RaiPolicy, + CognitiveServicesManagementClient, +} from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @summary Update the state of specified Content Filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/PutRaiPolicy.json + */ +async function putRaiPolicy() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiPolicyName = "raiPolicyName"; + const raiPolicy: RaiPolicy = { + properties: { + basePolicyName: "Microsoft.Default", + contentFilters: [ + { + name: "Hate", + blocking: false, + enabled: false, + severityThreshold: "High", + source: "Prompt", + }, + { + name: "Hate", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { + name: "Sexual", + blocking: true, + enabled: true, + severityThreshold: "High", + source: "Prompt", + }, + { + name: "Sexual", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { + name: "Selfharm", + blocking: true, + enabled: true, + severityThreshold: "High", + source: "Prompt", + }, + { + name: "Selfharm", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { + name: "Violence", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Prompt", + }, + { + name: "Violence", + blocking: true, + enabled: true, + severityThreshold: "Medium", + source: "Completion", + }, + { name: "Jailbreak", blocking: true, enabled: true, source: "Prompt" }, + { + name: "Protected Material Text", + blocking: true, + enabled: true, + source: "Completion", + }, + { + name: "Protected Material Code", + blocking: true, + enabled: true, + source: "Completion", + }, + { name: "Profanity", blocking: true, enabled: true, source: "Prompt" }, + ], + mode: "Asynchronous_filter", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiPolicies.createOrUpdate( + resourceGroupName, + accountName, + raiPolicyName, + raiPolicy, + ); + console.log(result); +} + +async function main() { + putRaiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesDeleteSample.ts new file mode 100644 index 000000000000..d1f0e5f07444 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesDeleteSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @summary Deletes the specified Content Filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/DeleteRaiPolicy.json + */ +async function deleteRaiPolicy() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiPolicyName = "raiPolicyName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiPolicies.beginDeleteAndWait( + resourceGroupName, + accountName, + raiPolicyName, + ); + console.log(result); +} + +async function main() { + deleteRaiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesGetSample.ts new file mode 100644 index 000000000000..a96360a06b9b --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesGetSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @summary Gets the specified Content Filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetRaiPolicy.json + */ +async function getRaiPolicy() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const raiPolicyName = "raiPolicyName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const result = await client.raiPolicies.get( + resourceGroupName, + accountName, + raiPolicyName, + ); + console.log(result); +} + +async function main() { + getRaiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesListSample.ts new file mode 100644 index 000000000000..c0d104fee4be --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesListSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. + * + * @summary Gets the content filters associated with the Azure OpenAI account. + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListRaiPolicies.json + */ +async function listRaiPolicies() { + const subscriptionId = + process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const resourceGroupName = + process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName"; + const accountName = "accountName"; + const credential = new DefaultAzureCredential(); + const client = new CognitiveServicesManagementClient( + credential, + subscriptionId, + ); + const resArray = new Array(); + for await (let item of client.raiPolicies.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listRaiPolicies(); +} + +main().catch(console.error); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/resourceSkusListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/resourceSkusListSample.ts index a130c969ed13..5d7b3e45e81a 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/resourceSkusListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/resourceSkusListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. * * @summary Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/GetSkus.json */ async function regenerateKeys() { const subscriptionId = @@ -27,7 +27,7 @@ async function regenerateKeys() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.resourceSkus.list()) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/usagesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/usagesListSample.ts index 8bcd5b7b13cd..bb1b0d4b93af 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/usagesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/usagesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Get usages for the requested subscription * * @summary Get usages for the requested subscription - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListUsages.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2024-10-01/examples/ListUsages.json */ async function getUsages() { const subscriptionId = @@ -28,7 +28,7 @@ async function getUsages() { const credential = new DefaultAzureCredential(); const client = new CognitiveServicesManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.usages.list(location)) { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts index 23eae2c48e37..e55901ff1939 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts @@ -11,7 +11,7 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { @@ -22,10 +22,19 @@ import { OperationsImpl, CommitmentTiersImpl, ModelsImpl, + LocationBasedModelCapacitiesImpl, + ModelCapacitiesImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, DeploymentsImpl, - CommitmentPlansImpl + CommitmentPlansImpl, + EncryptionScopesImpl, + RaiPoliciesImpl, + RaiBlocklistsImpl, + RaiBlocklistItemsImpl, + RaiContentFiltersImpl, + NetworkSecurityPerimeterConfigurationsImpl, + DefenderForAISettingsImpl, } from "./operations"; import { Accounts, @@ -35,10 +44,19 @@ import { Operations, CommitmentTiers, Models, + LocationBasedModelCapacities, + ModelCapacities, PrivateEndpointConnections, PrivateLinkResources, Deployments, - CommitmentPlans + CommitmentPlans, + EncryptionScopes, + RaiPolicies, + RaiBlocklists, + RaiBlocklistItems, + RaiContentFilters, + NetworkSecurityPerimeterConfigurations, + DefenderForAISettings, } from "./operationsInterfaces"; import * as Parameters from "./models/parameters"; import * as Mappers from "./models/mappers"; @@ -47,7 +65,9 @@ import { CheckSkuAvailabilityOptionalParams, CheckSkuAvailabilityResponse, CheckDomainAvailabilityOptionalParams, - CheckDomainAvailabilityResponse + CheckDomainAvailabilityResponse, + CalculateModelCapacityOptionalParams, + CalculateModelCapacityResponse, } from "./models"; export class CognitiveServicesManagementClient extends coreClient.ServiceClient { @@ -64,7 +84,7 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: CognitiveServicesManagementClientOptionalParams + options?: CognitiveServicesManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -79,10 +99,10 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient } const defaults: CognitiveServicesManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-cognitiveservices/7.5.0`; + const packageDetails = `azsdk-js-arm-cognitiveservices/7.6.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -92,20 +112,21 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -115,7 +136,7 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -125,9 +146,9 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -135,7 +156,7 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-05-01"; + this.apiVersion = options.apiVersion || "2024-10-01"; this.accounts = new AccountsImpl(this); this.deletedAccounts = new DeletedAccountsImpl(this); this.resourceSkus = new ResourceSkusImpl(this); @@ -143,10 +164,22 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient this.operations = new OperationsImpl(this); this.commitmentTiers = new CommitmentTiersImpl(this); this.models = new ModelsImpl(this); + this.locationBasedModelCapacities = new LocationBasedModelCapacitiesImpl( + this, + ); + this.modelCapacities = new ModelCapacitiesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.deployments = new DeploymentsImpl(this); this.commitmentPlans = new CommitmentPlansImpl(this); + this.encryptionScopes = new EncryptionScopesImpl(this); + this.raiPolicies = new RaiPoliciesImpl(this); + this.raiBlocklists = new RaiBlocklistsImpl(this); + this.raiBlocklistItems = new RaiBlocklistItemsImpl(this); + this.raiContentFilters = new RaiContentFiltersImpl(this); + this.networkSecurityPerimeterConfigurations = + new NetworkSecurityPerimeterConfigurationsImpl(this); + this.defenderForAISettings = new DefenderForAISettingsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -159,7 +192,7 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -173,7 +206,7 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } @@ -182,7 +215,7 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient * Check available SKUs. * @param location Resource location. * @param skus The SKU of the resource. - * @param kind The Kind of the resource. + * @param kind The kind (type) of cognitive service account. * @param typeParam The Type of the resource. * @param options The options parameters. */ @@ -191,11 +224,11 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient skus: string[], kind: string, typeParam: string, - options?: CheckSkuAvailabilityOptionalParams + options?: CheckSkuAvailabilityOptionalParams, ): Promise { return this.sendOperationRequest( { location, skus, kind, typeParam, options }, - checkSkuAvailabilityOperationSpec + checkSkuAvailabilityOperationSpec, ); } @@ -208,11 +241,24 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient checkDomainAvailability( subdomainName: string, typeParam: string, - options?: CheckDomainAvailabilityOptionalParams + options?: CheckDomainAvailabilityOptionalParams, ): Promise { return this.sendOperationRequest( { subdomainName, typeParam, options }, - checkDomainAvailabilityOperationSpec + checkDomainAvailabilityOperationSpec, + ); + } + + /** + * Model capacity calculator. + * @param options The options parameters. + */ + calculateModelCapacity( + options?: CalculateModelCapacityOptionalParams, + ): Promise { + return this.sendOperationRequest( + { options }, + calculateModelCapacityOperationSpec, ); } @@ -223,63 +269,95 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient operations: Operations; commitmentTiers: CommitmentTiers; models: Models; + locationBasedModelCapacities: LocationBasedModelCapacities; + modelCapacities: ModelCapacities; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; deployments: Deployments; commitmentPlans: CommitmentPlans; + encryptionScopes: EncryptionScopes; + raiPolicies: RaiPolicies; + raiBlocklists: RaiBlocklists; + raiBlocklistItems: RaiBlocklistItems; + raiContentFilters: RaiContentFilters; + networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations; + defenderForAISettings: DefenderForAISettings; } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const checkSkuAvailabilityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.SkuAvailabilityListResult + bodyMapper: Mappers.SkuAvailabilityListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: { parameterPath: { skus: ["skus"], kind: ["kind"], typeParam: ["typeParam"] }, - mapper: { ...Mappers.CheckSkuAvailabilityParameter, required: true } + mapper: { ...Mappers.CheckSkuAvailabilityParameter, required: true }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const checkDomainAvailabilityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/checkDomainAvailability", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/checkDomainAvailability", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.DomainAvailability + bodyMapper: Mappers.DomainAvailability, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: { parameterPath: { subdomainName: ["subdomainName"], typeParam: ["typeParam"], - kind: ["options", "kind"] + kind: ["options", "kind"], + }, + mapper: { ...Mappers.CheckDomainAvailabilityParameter, required: true }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const calculateModelCapacityOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/calculateModelCapacity", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CalculateModelCapacityResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: { + parameterPath: { + model: ["options", "model"], + skuName: ["options", "skuName"], + workloads: ["options", "workloads"], }, - mapper: { ...Mappers.CheckDomainAvailabilityParameter, required: true } + mapper: { ...Mappers.CalculateModelCapacityParameter, required: true }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/lroImpl.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/lroImpl.ts index 52f6eaacfb83..5f88efab981b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/lroImpl.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/lroImpl.ts @@ -28,15 +28,15 @@ export function createLroSpec(inputs: { sendInitialRequest: () => sendOperationFn(args, spec), sendPollRequest: ( path: string, - options?: { abortSignal?: AbortSignalLike } + options?: { abortSignal?: AbortSignalLike }, ) => { const { requestBody, ...restSpec } = spec; return sendOperationFn(args, { ...restSpec, httpMethod: "GET", path, - abortSignal: options?.abortSignal + abortSignal: options?.abortSignal, }); - } + }, }; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts index 921b436e4740..e3870063ef91 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts @@ -112,6 +112,8 @@ export interface AccountProperties { encryption?: Encryption; /** The storage accounts for this resource. */ userOwnedStorage?: UserOwnedStorage[]; + /** The user owned AML workspace properties. */ + amlWorkspace?: UserOwnedAmlWorkspace; /** * The private endpoint connection associated with the Cognitive Services account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -166,6 +168,8 @@ export interface AccountProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly abusePenalty?: AbusePenalty; + /** Cognitive Services Rai Monitor Config. */ + raiMonitorConfig?: RaiMonitorConfig; } /** SkuCapability indicates the capability of a certain feature. */ @@ -190,6 +194,8 @@ export interface SkuChangeInfo { export interface NetworkRuleSet { /** The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. */ defaultAction?: NetworkRuleAction; + /** Setting for trusted services. */ + bypass?: ByPassSelection; /** The list of IP address rules. */ ipRules?: IpRule[]; /** The list of virtual network rules. */ @@ -238,6 +244,14 @@ export interface UserOwnedStorage { identityClientId?: string; } +/** The user owned AML workspace for Cognitive Services account. */ +export interface UserOwnedAmlWorkspace { + /** Full resource id of a AML workspace resource. */ + resourceId?: string; + /** Identity Client id of a AML workspace resource. */ + identityClientId?: string; +} + /** Properties of the PrivateEndpointConnectProperties. */ export interface PrivateEndpointConnectionProperties { /** The resource of private end point. */ @@ -381,6 +395,14 @@ export interface AbusePenalty { expiration?: Date; } +/** Cognitive Services Rai Monitor Config. */ +export interface RaiMonitorConfig { + /** The storage resource Id. */ + adxStorageResourceId?: string; + /** The identity client Id to access the storage. */ + identityClientId?: string; +} + /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ export interface ErrorResponse { /** The error object. */ @@ -556,6 +578,8 @@ export interface AccountModelListResult { /** Properties of Cognitive Services account deployment model. */ export interface DeploymentModel { + /** Deployment model publisher. */ + publisher?: string; /** Deployment model format. */ format?: string; /** Deployment model name. */ @@ -564,6 +588,8 @@ export interface DeploymentModel { version?: string; /** Optional. Deployment model source ARM resource ID. */ source?: string; + /** Optional. Source of the model, another Microsoft.CognitiveServices accounts ARM resource ID. */ + sourceAccount?: string; /** * The call rate limit Cognitive Services account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -583,6 +609,8 @@ export interface ModelSku { capacity?: CapacityConfig; /** The list of rateLimit. */ rateLimits?: CallRateLimit[]; + /** The list of billing meter info. */ + cost?: BillingMeterInfo[]; } /** The capacity configuration. */ @@ -595,6 +623,14 @@ export interface CapacityConfig { step?: number; /** The default capacity. */ default?: number; + /** The array of allowed values for capacity. */ + allowedValues?: number[]; +} + +export interface BillingMeterInfo { + name?: string; + meterId?: string; + unit?: string; } /** Cognitive Services account ModelDeprecationInfo. */ @@ -673,7 +709,7 @@ export interface OperationDisplay { export interface CheckSkuAvailabilityParameter { /** The SKU of the resource. */ skus: string[]; - /** The Kind of the resource. */ + /** The kind (type) of cognitive service account. */ kind: string; /** The Type of the resource. */ type: string; @@ -758,12 +794,33 @@ export interface ModelListResult { /** Cognitive Services Model. */ export interface Model { - /** Model Metadata. */ + /** Cognitive Services account Model. */ model?: AccountModel; - /** The Kind of the Model. */ + /** The kind (type) of cognitive service account. */ kind?: string; - /** The SKU of the Model. */ + /** The name of SKU. */ + skuName?: string; + /** The description of the model. */ + description?: string; +} + +/** The list of cognitive services accounts operation response. */ +export interface ModelCapacityListResult { + /** The link used to get the next page of ModelSkuCapacity. */ + nextLink?: string; + /** Gets the list of Cognitive Services accounts ModelSkuCapacity. */ + value?: ModelCapacityListResultValueItem[]; +} + +/** Cognitive Services account ModelSkuCapacity. */ +export interface ModelSkuCapacityProperties { + /** Properties of Cognitive Services account deployment model. */ + model?: DeploymentModel; skuName?: string; + /** The available capacity for deployment with this model and sku. */ + availableCapacity?: number; + /** The available capacity for deployment with a fine-tune version of this model and sku. */ + availableFinetuneCapacity?: number; } /** Check Domain availability parameter. */ @@ -790,6 +847,47 @@ export interface DomainAvailability { kind?: string; } +/** Calculate Model Capacity parameter. */ +export interface CalculateModelCapacityParameter { + /** Properties of Cognitive Services account deployment model. */ + model?: DeploymentModel; + /** The name of SKU. */ + skuName?: string; + /** List of Model Capacity Calculator Workload. */ + workloads?: ModelCapacityCalculatorWorkload[]; +} + +/** Model Capacity Calculator Workload. */ +export interface ModelCapacityCalculatorWorkload { + /** Request per minute. */ + requestPerMinute?: number; + /** Dictionary, Model Capacity Calculator Workload Parameters. */ + requestParameters?: ModelCapacityCalculatorWorkloadRequestParam; +} + +/** Dictionary, Model Capacity Calculator Workload Parameters. */ +export interface ModelCapacityCalculatorWorkloadRequestParam { + /** Average prompt tokens. */ + avgPromptTokens?: number; + /** Average generated tokens. */ + avgGeneratedTokens?: number; +} + +/** Calculate Model Capacity result. */ +export interface CalculateModelCapacityResult { + /** Properties of Cognitive Services account deployment model. */ + model?: DeploymentModel; + skuName?: string; + /** Model Estimated Capacity. */ + estimatedCapacity?: CalculateModelCapacityResultEstimatedCapacity; +} + +/** Model Estimated Capacity. */ +export interface CalculateModelCapacityResultEstimatedCapacity { + value?: number; + deployableValue?: number; +} + /** A list of private endpoint connections */ export interface PrivateEndpointConnectionListResult { /** Array of private endpoint connections */ @@ -843,7 +941,7 @@ export interface DeploymentProperties { readonly provisioningState?: DeploymentProvisioningState; /** Properties of Cognitive Services account deployment model. */ model?: DeploymentModel; - /** Properties of Cognitive Services account deployment model. */ + /** Properties of Cognitive Services account deployment model. (Deprecated, please use Deployment.sku instead.) */ scaleSettings?: DeploymentScaleSettings; /** * The capabilities. @@ -861,9 +959,20 @@ export interface DeploymentProperties { readonly rateLimits?: ThrottlingRule[]; /** Deployment model version upgrade option. */ versionUpgradeOption?: DeploymentModelVersionUpgradeOption; + /** + * If the dynamic throttling is enabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dynamicThrottlingEnabled?: boolean; + /** The current capacity. */ + currentCapacity?: number; + /** Internal use only. */ + capacitySettings?: DeploymentCapacitySettings; + /** The name of parent deployment. */ + parentDeploymentName?: string; } -/** Properties of Cognitive Services account deployment model. */ +/** Properties of Cognitive Services account deployment model. (Deprecated, please use Deployment.sku instead.) */ export interface DeploymentScaleSettings { /** Deployment scale type. */ scaleType?: DeploymentScaleType; @@ -876,6 +985,41 @@ export interface DeploymentScaleSettings { readonly activeCapacity?: number; } +/** Internal use only. */ +export interface DeploymentCapacitySettings { + /** The designated capacity. */ + designatedCapacity?: number; + /** The priority of this capacity setting. */ + priority?: number; +} + +/** The object being used to update tags of a resource, in general used for PATCH operations. */ +export interface PatchResourceTags { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** The list of cognitive services accounts operation response. */ +export interface DeploymentSkuListResult { + /** The link used to get the next page of deployment skus. */ + nextLink?: string; + /** + * Gets the list of Cognitive Services accounts deployment skus. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: SkuResource[]; +} + +/** Properties of Cognitive Services account resource sku resource properties. */ +export interface SkuResource { + /** The resource type name. */ + resourceType?: string; + /** The resource model definition representing SKU */ + sku?: Sku; + /** The capacity configuration. */ + capacity?: CapacityConfig; +} + /** The list of cognitive services accounts operation response. */ export interface CommitmentPlanListResult { /** The link used to get the next page of CommitmentPlan. */ @@ -941,10 +1085,114 @@ export interface CommitmentPeriod { readonly endDate?: string; } -/** The object being used to update tags of a resource, in general used for PATCH operations. */ -export interface PatchResourceTags { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; +/** The list of cognitive services EncryptionScopes. */ +export interface EncryptionScopeListResult { + /** The link used to get the next page of EncryptionScope. */ + nextLink?: string; + /** The list of EncryptionScope. */ + value?: EncryptionScope[]; +} + +/** The list of cognitive services RaiPolicies. */ +export interface RaiPolicyListResult { + /** The link used to get the next page of RaiPolicy. */ + nextLink?: string; + /** The list of RaiPolicy. */ + value?: RaiPolicy[]; +} + +/** Azure OpenAI Content Filters properties. */ +export interface RaiPolicyProperties { + /** + * Content Filters policy type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: RaiPolicyType; + /** Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2024-10-01. It is the same as 'Deferred' in previous version. */ + mode?: RaiPolicyMode; + /** Name of Rai policy. */ + basePolicyName?: string; + /** The list of Content Filters. */ + contentFilters?: RaiPolicyContentFilter[]; + /** The list of custom Blocklist. */ + customBlocklists?: CustomBlocklistConfig[]; +} + +/** Azure OpenAI Content Filter. */ +export interface RaiPolicyContentFilter { + /** Name of ContentFilter. */ + name?: string; + /** If the ContentFilter is enabled. */ + enabled?: boolean; + /** Level at which content is filtered. */ + severityThreshold?: ContentLevel; + /** If blocking would occur. */ + blocking?: boolean; + /** Content source to apply the Content Filters. */ + source?: RaiPolicyContentSource; +} + +/** Azure OpenAI blocklist config. */ +export interface RaiBlocklistConfig { + /** Name of ContentFilter. */ + blocklistName?: string; + /** If blocking would occur. */ + blocking?: boolean; +} + +/** The list of cognitive services RAI Blocklists. */ +export interface RaiBlockListResult { + /** The link used to get the next page of RaiBlocklists. */ + nextLink?: string; + /** The list of RaiBlocklist. */ + value?: RaiBlocklist[]; +} + +/** RAI Custom Blocklist properties. */ +export interface RaiBlocklistProperties { + /** Description of the block list. */ + description?: string; +} + +/** The list of cognitive services RAI Blocklist Items. */ +export interface RaiBlockListItemsResult { + /** The link used to get the next page of RaiBlocklistItems. */ + nextLink?: string; + /** The list of RaiBlocklistItems. */ + value?: RaiBlocklistItem[]; +} + +/** RAI Custom Blocklist Item properties. */ +export interface RaiBlocklistItemProperties { + /** Pattern to match against. */ + pattern?: string; + /** If the pattern is a regex pattern. */ + isRegex?: boolean; +} + +/** The Cognitive Services RaiBlocklist Item request body. */ +export interface RaiBlocklistItemBulkRequest { + name?: string; + /** Properties of Cognitive Services RaiBlocklist Item. */ + properties?: RaiBlocklistItemProperties; +} + +/** The list of Content Filters. */ +export interface RaiContentFilterListResult { + /** The link used to get the next page of Content Filters. */ + nextLink?: string; + /** The list of RaiContentFilter. */ + value?: RaiContentFilter[]; +} + +/** Azure OpenAI Content Filter Properties. */ +export interface RaiContentFilterProperties { + /** Name of Content Filter. */ + name?: string; + /** If the Content Filter has multi severity levels(Low, Medium, or High). */ + isMultiLevelFilter?: boolean; + /** Content source to apply the Content Filters. */ + source?: RaiPolicyContentSource; } /** The list of cognitive services Commitment Plan Account Association operation response. */ @@ -958,6 +1206,130 @@ export interface CommitmentPlanAccountAssociationListResult { readonly value?: CommitmentPlanAccountAssociation[]; } +/** A list of NSP configurations for an Cognitive Services account. */ +export interface NetworkSecurityPerimeterConfigurationList { + /** Array of NSP configurations List Result for an Cognitive Services account. */ + value?: NetworkSecurityPerimeterConfiguration[]; + /** Link to retrieve next page of results. */ + nextLink?: string; +} + +/** The properties of an NSP Configuration. */ +export interface NetworkSecurityPerimeterConfigurationProperties { + /** + * Provisioning state of NetworkSecurityPerimeter configuration + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** List of Provisioning Issues */ + provisioningIssues?: ProvisioningIssue[]; + /** Information about a linked Network Security Perimeter */ + networkSecurityPerimeter?: NetworkSecurityPerimeter; + /** Network Security Perimeter Configuration Association Information */ + resourceAssociation?: NetworkSecurityPerimeterConfigurationAssociationInfo; + /** Network Security Perimeter Profile Information */ + profile?: NetworkSecurityPerimeterProfileInfo; +} + +export interface ProvisioningIssue { + /** Name of the NSP provisioning issue */ + name?: string; + /** Properties of Provisioning Issue */ + properties?: ProvisioningIssueProperties; +} + +/** Properties of Provisioning Issue */ +export interface ProvisioningIssueProperties { + /** Type of Issue */ + issueType?: string; + /** Severity of the issue */ + severity?: string; + /** Description of the issue */ + description?: string; + /** IDs of resources that can be associated to the same perimeter to remediate the issue. */ + suggestedResourceIds?: string[]; + /** Optional array, suggested access rules */ + suggestedAccessRules?: NetworkSecurityPerimeterAccessRule[]; +} + +/** Network Security Perimeter Access Rule */ +export interface NetworkSecurityPerimeterAccessRule { + /** Network Security Perimeter Access Rule Name */ + name?: string; + /** Properties of Network Security Perimeter Access Rule */ + properties?: NetworkSecurityPerimeterAccessRuleProperties; +} + +/** The Properties of Network Security Perimeter Rule */ +export interface NetworkSecurityPerimeterAccessRuleProperties { + /** Direction of Access Rule */ + direction?: NspAccessRuleDirection; + /** Address prefixes for inbound rules */ + addressPrefixes?: string[]; + /** Subscriptions for inbound rules */ + subscriptions?: NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem[]; + /** NetworkSecurityPerimeters for inbound rules */ + networkSecurityPerimeters?: NetworkSecurityPerimeter[]; + /** Fully qualified domain name for outbound rules */ + fullyQualifiedDomainNames?: string[]; +} + +/** Subscription for inbound rule */ +export interface NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem { + /** Fully qualified identifier of subscription */ + id?: string; +} + +/** Information about a linked Network Security Perimeter */ +export interface NetworkSecurityPerimeter { + /** Fully qualified identifier of the resource */ + id?: string; + /** Guid of the resource */ + perimeterGuid?: string; + /** Location of the resource */ + location?: string; +} + +/** Network Security Perimeter Configuration Association Information */ +export interface NetworkSecurityPerimeterConfigurationAssociationInfo { + /** Name of the resource association */ + name?: string; + /** Access Mode of the resource association */ + accessMode?: string; +} + +/** Network Security Perimeter Profile Information */ +export interface NetworkSecurityPerimeterProfileInfo { + /** Name of the resource profile */ + name?: string; + /** Access rules version of the resource profile */ + accessRulesVersion?: number; + accessRules?: NetworkSecurityPerimeterAccessRule[]; + /** Current diagnostic settings version */ + diagnosticSettingsVersion?: number; + /** List of enabled log categories */ + enabledLogCategories?: string[]; +} + +/** The list of cognitive services Defender for AI Settings. */ +export interface DefenderForAISettingResult { + /** The link used to get the next page of Defender for AI Settings. */ + nextLink?: string; + /** The list of Defender for AI Settings. */ + value?: DefenderForAISetting[]; +} + +/** Properties to EncryptionScope */ +export interface EncryptionScopeProperties extends Encryption { + /** + * Gets the status of the resource at the time the operation was called. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: EncryptionScopeProvisioningState; + /** The encryptionScope state. */ + state?: EncryptionScopeState; +} + /** The resource model definition for an Azure Resource Manager resource with an etag. */ export interface AzureEntityResource extends Resource { /** @@ -967,18 +1339,18 @@ export interface AzureEntityResource extends Resource { readonly etag?: string; } +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + /** A private link resource */ export interface PrivateLinkResource extends Resource { /** Resource properties. */ properties?: PrivateLinkResourceProperties; } -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - /** Cognitive Services account Model. */ export interface AccountModel extends DeploymentModel { - /** Base Model Identifier. */ + /** Properties of Cognitive Services account deployment model. */ baseModel?: DeploymentModel; /** If the model is default version. */ isDefaultVersion?: boolean; @@ -1007,6 +1379,12 @@ export interface PatchResourceTagsAndSku extends PatchResourceTags { sku?: Sku; } +/** Gets or sets the source to which filter applies. */ +export interface CustomBlocklistConfig extends RaiBlocklistConfig { + /** Content source to apply the Content Filters. */ + source?: RaiPolicyContentSource; +} + /** The Private Endpoint Connection resource. */ export interface PrivateEndpointConnection extends AzureEntityResource { /** Resource properties. */ @@ -1041,6 +1419,13 @@ export interface Account extends AzureEntityResource { properties?: AccountProperties; } +export interface ModelCapacityListResultValueItem extends ProxyResource { + /** The location of the Model Sku Capacity. */ + location?: string; + /** Cognitive Services account ModelSkuCapacity. */ + properties?: ModelSkuCapacityProperties; +} + /** Cognitive Services account deployment. */ export interface Deployment extends ProxyResource { /** The resource model definition representing SKU */ @@ -1055,6 +1440,8 @@ export interface Deployment extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly etag?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; /** Properties of Cognitive Services account deployment. */ properties?: DeploymentProperties; } @@ -1083,6 +1470,84 @@ export interface CommitmentPlan extends ProxyResource { properties?: CommitmentPlanProperties; } +/** Cognitive Services EncryptionScope */ +export interface EncryptionScope extends ProxyResource { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * Resource Etag. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Properties of Cognitive Services EncryptionScope. */ + properties?: EncryptionScopeProperties; +} + +/** Cognitive Services RaiPolicy. */ +export interface RaiPolicy extends ProxyResource { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * Resource Etag. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Properties of Cognitive Services RaiPolicy. */ + properties?: RaiPolicyProperties; +} + +/** Cognitive Services RaiBlocklist. */ +export interface RaiBlocklist extends ProxyResource { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * Resource Etag. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Properties of Cognitive Services RaiBlocklist. */ + properties?: RaiBlocklistProperties; +} + +/** Cognitive Services RaiBlocklist Item. */ +export interface RaiBlocklistItem extends ProxyResource { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * Resource Etag. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Properties of Cognitive Services RaiBlocklist Item. */ + properties?: RaiBlocklistItemProperties; +} + +/** Azure OpenAI Content Filter. */ +export interface RaiContentFilter extends ProxyResource { + /** Azure OpenAI Content Filter Properties. */ + properties?: RaiContentFilterProperties; +} + /** The commitment plan association. */ export interface CommitmentPlanAccountAssociation extends ProxyResource { /** @@ -1095,10 +1560,41 @@ export interface CommitmentPlanAccountAssociation extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly etag?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; /** The Azure resource id of the account. */ accountId?: string; } +/** NSP Configuration for an Cognitive Services account. */ +export interface NetworkSecurityPerimeterConfiguration extends ProxyResource { + /** NSP Configuration properties. */ + properties?: NetworkSecurityPerimeterConfigurationProperties; +} + +/** The Defender for AI resource. */ +export interface DefenderForAISetting extends ProxyResource { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * Resource Etag. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Defender for AI state on the AI resource. */ + state?: DefenderForAISettingState; +} + +/** Defines headers for Deployments_update operation. */ +export interface DeploymentsUpdateHeaders { + location?: string; +} + /** Defines headers for CommitmentPlans_updatePlan operation. */ export interface CommitmentPlansUpdatePlanHeaders { location?: string; @@ -1114,6 +1610,31 @@ export interface CommitmentPlansDeleteAssociationHeaders { location?: string; } +/** Defines headers for EncryptionScopes_delete operation. */ +export interface EncryptionScopesDeleteHeaders { + location?: string; +} + +/** Defines headers for RaiPolicies_delete operation. */ +export interface RaiPoliciesDeleteHeaders { + location?: string; +} + +/** Defines headers for RaiBlocklists_delete operation. */ +export interface RaiBlocklistsDeleteHeaders { + location?: string; +} + +/** Defines headers for RaiBlocklistItems_delete operation. */ +export interface RaiBlocklistItemsDeleteHeaders { + location?: string; +} + +/** Defines headers for NetworkSecurityPerimeterConfigurations_reconcile operation. */ +export interface NetworkSecurityPerimeterConfigurationsReconcileHeaders { + location?: string; +} + /** Known values of {@link SkuTier} that the service accepts. */ export enum KnownSkuTier { /** Free */ @@ -1125,7 +1646,7 @@ export enum KnownSkuTier { /** Premium */ Premium = "Premium", /** Enterprise */ - Enterprise = "Enterprise" + Enterprise = "Enterprise", } /** @@ -1150,7 +1671,7 @@ export enum KnownCreatedByType { /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", /** Key */ - Key = "Key" + Key = "Key", } /** @@ -1180,7 +1701,7 @@ export enum KnownProvisioningState { /** Succeeded */ Succeeded = "Succeeded", /** ResolvingDNS */ - ResolvingDNS = "ResolvingDNS" + ResolvingDNS = "ResolvingDNS", } /** @@ -1203,7 +1724,7 @@ export enum KnownNetworkRuleAction { /** Allow */ Allow = "Allow", /** Deny */ - Deny = "Deny" + Deny = "Deny", } /** @@ -1216,12 +1737,30 @@ export enum KnownNetworkRuleAction { */ export type NetworkRuleAction = string; +/** Known values of {@link ByPassSelection} that the service accepts. */ +export enum KnownByPassSelection { + /** None */ + None = "None", + /** AzureServices */ + AzureServices = "AzureServices", +} + +/** + * Defines values for ByPassSelection. \ + * {@link KnownByPassSelection} can be used interchangeably with ByPassSelection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **AzureServices** + */ +export type ByPassSelection = string; + /** Known values of {@link KeySource} that the service accepts. */ export enum KnownKeySource { /** MicrosoftCognitiveServices */ MicrosoftCognitiveServices = "Microsoft.CognitiveServices", /** MicrosoftKeyVault */ - MicrosoftKeyVault = "Microsoft.KeyVault" + MicrosoftKeyVault = "Microsoft.KeyVault", } /** @@ -1241,7 +1780,7 @@ export enum KnownPrivateEndpointServiceConnectionStatus { /** Approved */ Approved = "Approved", /** Rejected */ - Rejected = "Rejected" + Rejected = "Rejected", } /** @@ -1264,7 +1803,7 @@ export enum KnownPrivateEndpointConnectionProvisioningState { /** Deleting */ Deleting = "Deleting", /** Failed */ - Failed = "Failed" + Failed = "Failed", } /** @@ -1284,7 +1823,7 @@ export enum KnownPublicNetworkAccess { /** Enabled */ Enabled = "Enabled", /** Disabled */ - Disabled = "Disabled" + Disabled = "Disabled", } /** @@ -1304,7 +1843,7 @@ export enum KnownRoutingMethods { /** Weighted */ Weighted = "Weighted", /** Performance */ - Performance = "Performance" + Performance = "Performance", } /** @@ -1323,7 +1862,7 @@ export enum KnownAbusePenaltyAction { /** Throttle */ Throttle = "Throttle", /** Block */ - Block = "Block" + Block = "Block", } /** @@ -1341,7 +1880,7 @@ export enum KnownResourceSkuRestrictionsReasonCode { /** QuotaId */ QuotaId = "QuotaId", /** NotAvailableForSubscription */ - NotAvailableForSubscription = "NotAvailableForSubscription" + NotAvailableForSubscription = "NotAvailableForSubscription", } /** @@ -1369,7 +1908,7 @@ export enum KnownUnitType { /** BytesPerSecond */ BytesPerSecond = "BytesPerSecond", /** Milliseconds */ - Milliseconds = "Milliseconds" + Milliseconds = "Milliseconds", } /** @@ -1396,7 +1935,7 @@ export enum KnownQuotaUsageStatus { /** InOverage */ InOverage = "InOverage", /** Unknown */ - Unknown = "Unknown" + Unknown = "Unknown", } /** @@ -1413,10 +1952,16 @@ export type QuotaUsageStatus = string; /** Known values of {@link ModelLifecycleStatus} that the service accepts. */ export enum KnownModelLifecycleStatus { + /** Stable */ + Stable = "Stable", + /** Preview */ + Preview = "Preview", /** GenerallyAvailable */ GenerallyAvailable = "GenerallyAvailable", - /** Preview */ - Preview = "Preview" + /** Deprecating */ + Deprecating = "Deprecating", + /** Deprecated */ + Deprecated = "Deprecated", } /** @@ -1424,8 +1969,11 @@ export enum KnownModelLifecycleStatus { * {@link KnownModelLifecycleStatus} can be used interchangeably with ModelLifecycleStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **Stable** \ + * **Preview** \ * **GenerallyAvailable** \ - * **Preview** + * **Deprecating** \ + * **Deprecated** */ export type ModelLifecycleStatus = string; @@ -1436,7 +1984,7 @@ export enum KnownOrigin { /** System */ System = "system", /** UserSystem */ - UserSystem = "user,system" + UserSystem = "user,system", } /** @@ -1453,7 +2001,7 @@ export type Origin = string; /** Known values of {@link ActionType} that the service accepts. */ export enum KnownActionType { /** Internal */ - Internal = "Internal" + Internal = "Internal", } /** @@ -1474,7 +2022,7 @@ export enum KnownHostingModel { /** DisconnectedContainer */ DisconnectedContainer = "DisconnectedContainer", /** ProvisionedWeb */ - ProvisionedWeb = "ProvisionedWeb" + ProvisionedWeb = "ProvisionedWeb", } /** @@ -1506,7 +2054,7 @@ export enum KnownDeploymentProvisioningState { /** Disabled */ Disabled = "Disabled", /** Canceled */ - Canceled = "Canceled" + Canceled = "Canceled", } /** @@ -1530,7 +2078,7 @@ export enum KnownDeploymentScaleType { /** Standard */ Standard = "Standard", /** Manual */ - Manual = "Manual" + Manual = "Manual", } /** @@ -1550,7 +2098,7 @@ export enum KnownDeploymentModelVersionUpgradeOption { /** OnceCurrentVersionExpired */ OnceCurrentVersionExpired = "OnceCurrentVersionExpired", /** NoAutoUpgrade */ - NoAutoUpgrade = "NoAutoUpgrade" + NoAutoUpgrade = "NoAutoUpgrade", } /** @@ -1579,7 +2127,7 @@ export enum KnownCommitmentPlanProvisioningState { /** Succeeded */ Succeeded = "Succeeded", /** Canceled */ - Canceled = "Canceled" + Canceled = "Canceled", } /** @@ -1596,10 +2144,178 @@ export enum KnownCommitmentPlanProvisioningState { * **Canceled** */ export type CommitmentPlanProvisioningState = string; -/** Defines values for ResourceIdentityType. */ -export type ResourceIdentityType = - | "None" - | "SystemAssigned" + +/** Known values of {@link EncryptionScopeProvisioningState} that the service accepts. */ +export enum KnownEncryptionScopeProvisioningState { + /** Accepted */ + Accepted = "Accepted", + /** Creating */ + Creating = "Creating", + /** Deleting */ + Deleting = "Deleting", + /** Moving */ + Moving = "Moving", + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded", + /** Canceled */ + Canceled = "Canceled", +} + +/** + * Defines values for EncryptionScopeProvisioningState. \ + * {@link KnownEncryptionScopeProvisioningState} can be used interchangeably with EncryptionScopeProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Accepted** \ + * **Creating** \ + * **Deleting** \ + * **Moving** \ + * **Failed** \ + * **Succeeded** \ + * **Canceled** + */ +export type EncryptionScopeProvisioningState = string; + +/** Known values of {@link EncryptionScopeState} that the service accepts. */ +export enum KnownEncryptionScopeState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * Defines values for EncryptionScopeState. \ + * {@link KnownEncryptionScopeState} can be used interchangeably with EncryptionScopeState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** + */ +export type EncryptionScopeState = string; + +/** Known values of {@link RaiPolicyType} that the service accepts. */ +export enum KnownRaiPolicyType { + /** UserManaged */ + UserManaged = "UserManaged", + /** SystemManaged */ + SystemManaged = "SystemManaged", +} + +/** + * Defines values for RaiPolicyType. \ + * {@link KnownRaiPolicyType} can be used interchangeably with RaiPolicyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UserManaged** \ + * **SystemManaged** + */ +export type RaiPolicyType = string; + +/** Known values of {@link RaiPolicyMode} that the service accepts. */ +export enum KnownRaiPolicyMode { + /** Default */ + Default = "Default", + /** Deferred */ + Deferred = "Deferred", + /** Blocking */ + Blocking = "Blocking", + /** AsynchronousFilter */ + AsynchronousFilter = "Asynchronous_filter", +} + +/** + * Defines values for RaiPolicyMode. \ + * {@link KnownRaiPolicyMode} can be used interchangeably with RaiPolicyMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** \ + * **Deferred** \ + * **Blocking** \ + * **Asynchronous_filter** + */ +export type RaiPolicyMode = string; + +/** Known values of {@link ContentLevel} that the service accepts. */ +export enum KnownContentLevel { + /** Low */ + Low = "Low", + /** Medium */ + Medium = "Medium", + /** High */ + High = "High", +} + +/** + * Defines values for ContentLevel. \ + * {@link KnownContentLevel} can be used interchangeably with ContentLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Low** \ + * **Medium** \ + * **High** + */ +export type ContentLevel = string; + +/** Known values of {@link RaiPolicyContentSource} that the service accepts. */ +export enum KnownRaiPolicyContentSource { + /** Prompt */ + Prompt = "Prompt", + /** Completion */ + Completion = "Completion", +} + +/** + * Defines values for RaiPolicyContentSource. \ + * {@link KnownRaiPolicyContentSource} can be used interchangeably with RaiPolicyContentSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Prompt** \ + * **Completion** + */ +export type RaiPolicyContentSource = string; + +/** Known values of {@link NspAccessRuleDirection} that the service accepts. */ +export enum KnownNspAccessRuleDirection { + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound", +} + +/** + * Defines values for NspAccessRuleDirection. \ + * {@link KnownNspAccessRuleDirection} can be used interchangeably with NspAccessRuleDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound** \ + * **Outbound** + */ +export type NspAccessRuleDirection = string; + +/** Known values of {@link DefenderForAISettingState} that the service accepts. */ +export enum KnownDefenderForAISettingState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * Defines values for DefenderForAISettingState. \ + * {@link KnownDefenderForAISettingState} can be used interchangeably with DefenderForAISettingState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** + */ +export type DefenderForAISettingState = string; +/** Defines values for ResourceIdentityType. */ +export type ResourceIdentityType = + | "None" + | "SystemAssigned" | "UserAssigned" | "SystemAssigned, UserAssigned"; /** Defines values for KeyName. */ @@ -1811,6 +2527,20 @@ export interface CheckDomainAvailabilityOptionalParams /** Contains response data for the checkDomainAvailability operation. */ export type CheckDomainAvailabilityResponse = DomainAvailability; +/** Optional parameters. */ +export interface CalculateModelCapacityOptionalParams + extends coreClient.OperationOptions { + /** Properties of Cognitive Services account deployment model. */ + model?: DeploymentModel; + /** The name of SKU. */ + skuName?: string; + /** List of Model Capacity Calculator Workload. */ + workloads?: ModelCapacityCalculatorWorkload[]; +} + +/** Contains response data for the calculateModelCapacity operation. */ +export type CalculateModelCapacityResponse = CalculateModelCapacityResult; + /** Optional parameters. */ export interface CommitmentTiersListOptionalParams extends coreClient.OperationOptions {} @@ -1838,12 +2568,42 @@ export interface ModelsListNextOptionalParams /** Contains response data for the listNext operation. */ export type ModelsListNextResponse = ModelListResult; +/** Optional parameters. */ +export interface LocationBasedModelCapacitiesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type LocationBasedModelCapacitiesListResponse = ModelCapacityListResult; + +/** Optional parameters. */ +export interface LocationBasedModelCapacitiesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type LocationBasedModelCapacitiesListNextResponse = + ModelCapacityListResult; + +/** Optional parameters. */ +export interface ModelCapacitiesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ModelCapacitiesListResponse = ModelCapacityListResult; + +/** Optional parameters. */ +export interface ModelCapacitiesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ModelCapacitiesListNextResponse = ModelCapacityListResult; + /** Optional parameters. */ export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult; +export type PrivateEndpointConnectionsListResponse = + PrivateEndpointConnectionListResult; /** Optional parameters. */ export interface PrivateEndpointConnectionsGetOptionalParams @@ -1862,7 +2622,8 @@ export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; +export type PrivateEndpointConnectionsCreateOrUpdateResponse = + PrivateEndpointConnection; /** Optional parameters. */ export interface PrivateEndpointConnectionsDeleteOptionalParams @@ -1906,6 +2667,18 @@ export interface DeploymentsCreateOrUpdateOptionalParams /** Contains response data for the createOrUpdate operation. */ export type DeploymentsCreateOrUpdateResponse = Deployment; +/** Optional parameters. */ +export interface DeploymentsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type DeploymentsUpdateResponse = Deployment; + /** Optional parameters. */ export interface DeploymentsDeleteOptionalParams extends coreClient.OperationOptions { @@ -1915,6 +2688,13 @@ export interface DeploymentsDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface DeploymentsListSkusOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSkus operation. */ +export type DeploymentsListSkusResponse = DeploymentSkuListResult; + /** Optional parameters. */ export interface DeploymentsListNextOptionalParams extends coreClient.OperationOptions {} @@ -1922,6 +2702,13 @@ export interface DeploymentsListNextOptionalParams /** Contains response data for the listNext operation. */ export type DeploymentsListNextResponse = DeploymentListResult; +/** Optional parameters. */ +export interface DeploymentsListSkusNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSkusNext operation. */ +export type DeploymentsListSkusNextResponse = DeploymentSkuListResult; + /** Optional parameters. */ export interface CommitmentPlansListOptionalParams extends coreClient.OperationOptions {} @@ -1997,28 +2784,32 @@ export interface CommitmentPlansListPlansByResourceGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listPlansByResourceGroup operation. */ -export type CommitmentPlansListPlansByResourceGroupResponse = CommitmentPlanListResult; +export type CommitmentPlansListPlansByResourceGroupResponse = + CommitmentPlanListResult; /** Optional parameters. */ export interface CommitmentPlansListPlansBySubscriptionOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listPlansBySubscription operation. */ -export type CommitmentPlansListPlansBySubscriptionResponse = CommitmentPlanListResult; +export type CommitmentPlansListPlansBySubscriptionResponse = + CommitmentPlanListResult; /** Optional parameters. */ export interface CommitmentPlansListAssociationsOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAssociations operation. */ -export type CommitmentPlansListAssociationsResponse = CommitmentPlanAccountAssociationListResult; +export type CommitmentPlansListAssociationsResponse = + CommitmentPlanAccountAssociationListResult; /** Optional parameters. */ export interface CommitmentPlansGetAssociationOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getAssociation operation. */ -export type CommitmentPlansGetAssociationResponse = CommitmentPlanAccountAssociation; +export type CommitmentPlansGetAssociationResponse = + CommitmentPlanAccountAssociation; /** Optional parameters. */ export interface CommitmentPlansCreateOrUpdateAssociationOptionalParams @@ -2030,7 +2821,8 @@ export interface CommitmentPlansCreateOrUpdateAssociationOptionalParams } /** Contains response data for the createOrUpdateAssociation operation. */ -export type CommitmentPlansCreateOrUpdateAssociationResponse = CommitmentPlanAccountAssociation; +export type CommitmentPlansCreateOrUpdateAssociationResponse = + CommitmentPlanAccountAssociation; /** Optional parameters. */ export interface CommitmentPlansDeleteAssociationOptionalParams @@ -2053,21 +2845,288 @@ export interface CommitmentPlansListPlansByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listPlansByResourceGroupNext operation. */ -export type CommitmentPlansListPlansByResourceGroupNextResponse = CommitmentPlanListResult; +export type CommitmentPlansListPlansByResourceGroupNextResponse = + CommitmentPlanListResult; /** Optional parameters. */ export interface CommitmentPlansListPlansBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listPlansBySubscriptionNext operation. */ -export type CommitmentPlansListPlansBySubscriptionNextResponse = CommitmentPlanListResult; +export type CommitmentPlansListPlansBySubscriptionNextResponse = + CommitmentPlanListResult; /** Optional parameters. */ export interface CommitmentPlansListAssociationsNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAssociationsNext operation. */ -export type CommitmentPlansListAssociationsNextResponse = CommitmentPlanAccountAssociationListResult; +export type CommitmentPlansListAssociationsNextResponse = + CommitmentPlanAccountAssociationListResult; + +/** Optional parameters. */ +export interface EncryptionScopesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type EncryptionScopesListResponse = EncryptionScopeListResult; + +/** Optional parameters. */ +export interface EncryptionScopesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type EncryptionScopesGetResponse = EncryptionScope; + +/** Optional parameters. */ +export interface EncryptionScopesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type EncryptionScopesCreateOrUpdateResponse = EncryptionScope; + +/** Optional parameters. */ +export interface EncryptionScopesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type EncryptionScopesDeleteResponse = EncryptionScopesDeleteHeaders; + +/** Optional parameters. */ +export interface EncryptionScopesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type EncryptionScopesListNextResponse = EncryptionScopeListResult; + +/** Optional parameters. */ +export interface RaiPoliciesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type RaiPoliciesListResponse = RaiPolicyListResult; + +/** Optional parameters. */ +export interface RaiPoliciesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type RaiPoliciesGetResponse = RaiPolicy; + +/** Optional parameters. */ +export interface RaiPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type RaiPoliciesCreateOrUpdateResponse = RaiPolicy; + +/** Optional parameters. */ +export interface RaiPoliciesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type RaiPoliciesDeleteResponse = RaiPoliciesDeleteHeaders; + +/** Optional parameters. */ +export interface RaiPoliciesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type RaiPoliciesListNextResponse = RaiPolicyListResult; + +/** Optional parameters. */ +export interface RaiBlocklistsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type RaiBlocklistsListResponse = RaiBlockListResult; + +/** Optional parameters. */ +export interface RaiBlocklistsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type RaiBlocklistsGetResponse = RaiBlocklist; + +/** Optional parameters. */ +export interface RaiBlocklistsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type RaiBlocklistsCreateOrUpdateResponse = RaiBlocklist; + +/** Optional parameters. */ +export interface RaiBlocklistsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type RaiBlocklistsDeleteResponse = RaiBlocklistsDeleteHeaders; + +/** Optional parameters. */ +export interface RaiBlocklistsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type RaiBlocklistsListNextResponse = RaiBlockListResult; + +/** Optional parameters. */ +export interface RaiBlocklistItemsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type RaiBlocklistItemsListResponse = RaiBlockListItemsResult; + +/** Optional parameters. */ +export interface RaiBlocklistItemsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type RaiBlocklistItemsGetResponse = RaiBlocklistItem; + +/** Optional parameters. */ +export interface RaiBlocklistItemsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type RaiBlocklistItemsCreateOrUpdateResponse = RaiBlocklistItem; + +/** Optional parameters. */ +export interface RaiBlocklistItemsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type RaiBlocklistItemsDeleteResponse = RaiBlocklistItemsDeleteHeaders; + +/** Optional parameters. */ +export interface RaiBlocklistItemsBatchAddOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the batchAdd operation. */ +export type RaiBlocklistItemsBatchAddResponse = RaiBlocklist; + +/** Optional parameters. */ +export interface RaiBlocklistItemsBatchDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface RaiBlocklistItemsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type RaiBlocklistItemsListNextResponse = RaiBlockListItemsResult; + +/** Optional parameters. */ +export interface RaiContentFiltersListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type RaiContentFiltersListResponse = RaiContentFilterListResult; + +/** Optional parameters. */ +export interface RaiContentFiltersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type RaiContentFiltersGetResponse = RaiContentFilter; + +/** Optional parameters. */ +export interface RaiContentFiltersListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type RaiContentFiltersListNextResponse = RaiContentFilterListResult; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type NetworkSecurityPerimeterConfigurationsListResponse = + NetworkSecurityPerimeterConfigurationList; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkSecurityPerimeterConfigurationsGetResponse = + NetworkSecurityPerimeterConfiguration; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the reconcile operation. */ +export type NetworkSecurityPerimeterConfigurationsReconcileResponse = + NetworkSecurityPerimeterConfiguration; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type NetworkSecurityPerimeterConfigurationsListNextResponse = + NetworkSecurityPerimeterConfigurationList; + +/** Optional parameters. */ +export interface DefenderForAISettingsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DefenderForAISettingsListResponse = DefenderForAISettingResult; + +/** Optional parameters. */ +export interface DefenderForAISettingsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DefenderForAISettingsGetResponse = DefenderForAISetting; + +/** Optional parameters. */ +export interface DefenderForAISettingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type DefenderForAISettingsCreateOrUpdateResponse = DefenderForAISetting; + +/** Optional parameters. */ +export interface DefenderForAISettingsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type DefenderForAISettingsUpdateResponse = DefenderForAISetting; + +/** Optional parameters. */ +export interface DefenderForAISettingsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DefenderForAISettingsListNextResponse = DefenderForAISettingResult; /** Optional parameters. */ export interface CognitiveServicesManagementClientOptionalParams diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts index 41f0f5a2cf72..b4014aceae29 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts @@ -17,35 +17,35 @@ export const Sku: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, tier: { serializedName: "tier", type: { - name: "String" - } + name: "String", + }, }, size: { serializedName: "size", type: { - name: "String" - } + name: "String", + }, }, family: { serializedName: "family", type: { - name: "String" - } + name: "String", + }, }, capacity: { serializedName: "capacity", type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const Identity: coreClient.CompositeMapper = { @@ -61,35 +61,35 @@ export const Identity: coreClient.CompositeMapper = { "None", "SystemAssigned", "UserAssigned", - "SystemAssigned, UserAssigned" - ] - } + "SystemAssigned, UserAssigned", + ], + }, }, tenantId: { serializedName: "tenantId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, principalId: { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, userAssignedIdentities: { serializedName: "userAssignedIdentities", type: { name: "Dictionary", value: { - type: { name: "Composite", className: "UserAssignedIdentity" } - } - } - } - } - } + type: { name: "Composite", className: "UserAssignedIdentity" }, + }, + }, + }, + }, + }, }; export const UserAssignedIdentity: coreClient.CompositeMapper = { @@ -101,18 +101,18 @@ export const UserAssignedIdentity: coreClient.CompositeMapper = { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, clientId: { serializedName: "clientId", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SystemData: coreClient.CompositeMapper = { @@ -123,41 +123,41 @@ export const SystemData: coreClient.CompositeMapper = { createdBy: { serializedName: "createdBy", type: { - name: "String" - } + name: "String", + }, }, createdByType: { serializedName: "createdByType", type: { - name: "String" - } + name: "String", + }, }, createdAt: { serializedName: "createdAt", type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastModifiedBy: { serializedName: "lastModifiedBy", type: { - name: "String" - } + name: "String", + }, }, lastModifiedByType: { serializedName: "lastModifiedByType", type: { - name: "String" - } + name: "String", + }, }, lastModifiedAt: { serializedName: "lastModifiedAt", type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; export const AccountProperties: coreClient.CompositeMapper = { @@ -169,22 +169,22 @@ export const AccountProperties: coreClient.CompositeMapper = { serializedName: "provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, endpoint: { serializedName: "endpoint", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, internalId: { serializedName: "internalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, capabilities: { serializedName: "capabilities", @@ -194,50 +194,50 @@ export const AccountProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SkuCapability" - } - } - } + className: "SkuCapability", + }, + }, + }, }, isMigrated: { serializedName: "isMigrated", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, migrationToken: { serializedName: "migrationToken", type: { - name: "String" - } + name: "String", + }, }, skuChangeInfo: { serializedName: "skuChangeInfo", type: { name: "Composite", - className: "SkuChangeInfo" - } + className: "SkuChangeInfo", + }, }, customSubDomainName: { serializedName: "customSubDomainName", type: { - name: "String" - } + name: "String", + }, }, networkAcls: { serializedName: "networkAcls", type: { name: "Composite", - className: "NetworkRuleSet" - } + className: "NetworkRuleSet", + }, }, encryption: { serializedName: "encryption", type: { name: "Composite", - className: "Encryption" - } + className: "Encryption", + }, }, userOwnedStorage: { serializedName: "userOwnedStorage", @@ -246,10 +246,17 @@ export const AccountProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "UserOwnedStorage" - } - } - } + className: "UserOwnedStorage", + }, + }, + }, + }, + amlWorkspace: { + serializedName: "amlWorkspace", + type: { + name: "Composite", + className: "UserOwnedAmlWorkspace", + }, }, privateEndpointConnections: { serializedName: "privateEndpointConnections", @@ -259,56 +266,56 @@ export const AccountProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnection" - } - } - } + className: "PrivateEndpointConnection", + }, + }, + }, }, publicNetworkAccess: { serializedName: "publicNetworkAccess", type: { - name: "String" - } + name: "String", + }, }, apiProperties: { serializedName: "apiProperties", type: { name: "Composite", - className: "ApiProperties" - } + className: "ApiProperties", + }, }, dateCreated: { serializedName: "dateCreated", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, callRateLimit: { serializedName: "callRateLimit", type: { name: "Composite", - className: "CallRateLimit" - } + className: "CallRateLimit", + }, }, dynamicThrottlingEnabled: { serializedName: "dynamicThrottlingEnabled", type: { - name: "Boolean" - } + name: "Boolean", + }, }, quotaLimit: { serializedName: "quotaLimit", type: { name: "Composite", - className: "QuotaLimit" - } + className: "QuotaLimit", + }, }, restrictOutboundNetworkAccess: { serializedName: "restrictOutboundNetworkAccess", type: { - name: "Boolean" - } + name: "Boolean", + }, }, allowedFqdnList: { serializedName: "allowedFqdnList", @@ -316,51 +323,51 @@ export const AccountProperties: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, disableLocalAuth: { serializedName: "disableLocalAuth", type: { - name: "Boolean" - } + name: "Boolean", + }, }, endpoints: { serializedName: "endpoints", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, restore: { serializedName: "restore", type: { - name: "Boolean" - } + name: "Boolean", + }, }, deletionDate: { serializedName: "deletionDate", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, scheduledPurgeDate: { serializedName: "scheduledPurgeDate", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, locations: { serializedName: "locations", type: { name: "Composite", - className: "MultiRegionSettings" - } + className: "MultiRegionSettings", + }, }, commitmentPlanAssociations: { serializedName: "commitmentPlanAssociations", @@ -370,20 +377,27 @@ export const AccountProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CommitmentPlanAssociation" - } - } - } + className: "CommitmentPlanAssociation", + }, + }, + }, }, abusePenalty: { serializedName: "abusePenalty", type: { name: "Composite", - className: "AbusePenalty" - } - } - } - } + className: "AbusePenalty", + }, + }, + raiMonitorConfig: { + serializedName: "raiMonitorConfig", + type: { + name: "Composite", + className: "RaiMonitorConfig", + }, + }, + }, + }, }; export const SkuCapability: coreClient.CompositeMapper = { @@ -394,17 +408,17 @@ export const SkuCapability: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SkuChangeInfo: coreClient.CompositeMapper = { @@ -415,23 +429,23 @@ export const SkuChangeInfo: coreClient.CompositeMapper = { countOfDowngrades: { serializedName: "countOfDowngrades", type: { - name: "Number" - } + name: "Number", + }, }, countOfUpgradesAfterDowngrades: { serializedName: "countOfUpgradesAfterDowngrades", type: { - name: "Number" - } + name: "Number", + }, }, lastChangeDate: { serializedName: "lastChangeDate", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const NetworkRuleSet: coreClient.CompositeMapper = { @@ -442,8 +456,14 @@ export const NetworkRuleSet: coreClient.CompositeMapper = { defaultAction: { serializedName: "defaultAction", type: { - name: "String" - } + name: "String", + }, + }, + bypass: { + serializedName: "bypass", + type: { + name: "String", + }, }, ipRules: { serializedName: "ipRules", @@ -452,10 +472,10 @@ export const NetworkRuleSet: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "IpRule" - } - } - } + className: "IpRule", + }, + }, + }, }, virtualNetworkRules: { serializedName: "virtualNetworkRules", @@ -464,13 +484,13 @@ export const NetworkRuleSet: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualNetworkRule" - } - } - } - } - } - } + className: "VirtualNetworkRule", + }, + }, + }, + }, + }, + }, }; export const IpRule: coreClient.CompositeMapper = { @@ -482,11 +502,11 @@ export const IpRule: coreClient.CompositeMapper = { serializedName: "value", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const VirtualNetworkRule: coreClient.CompositeMapper = { @@ -498,23 +518,23 @@ export const VirtualNetworkRule: coreClient.CompositeMapper = { serializedName: "id", required: true, type: { - name: "String" - } + name: "String", + }, }, state: { serializedName: "state", type: { - name: "String" - } + name: "String", + }, }, ignoreMissingVnetServiceEndpoint: { serializedName: "ignoreMissingVnetServiceEndpoint", type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const Encryption: coreClient.CompositeMapper = { @@ -526,18 +546,18 @@ export const Encryption: coreClient.CompositeMapper = { serializedName: "keyVaultProperties", type: { name: "Composite", - className: "KeyVaultProperties" - } + className: "KeyVaultProperties", + }, }, keySource: { defaultValue: "Microsoft.KeyVault", serializedName: "keySource", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const KeyVaultProperties: coreClient.CompositeMapper = { @@ -548,29 +568,29 @@ export const KeyVaultProperties: coreClient.CompositeMapper = { keyName: { serializedName: "keyName", type: { - name: "String" - } + name: "String", + }, }, keyVersion: { serializedName: "keyVersion", type: { - name: "String" - } + name: "String", + }, }, keyVaultUri: { serializedName: "keyVaultUri", type: { - name: "String" - } + name: "String", + }, }, identityClientId: { serializedName: "identityClientId", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const UserOwnedStorage: coreClient.CompositeMapper = { @@ -581,17 +601,38 @@ export const UserOwnedStorage: coreClient.CompositeMapper = { resourceId: { serializedName: "resourceId", type: { - name: "String" - } + name: "String", + }, + }, + identityClientId: { + serializedName: "identityClientId", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const UserOwnedAmlWorkspace: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserOwnedAmlWorkspace", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String", + }, }, identityClientId: { serializedName: "identityClientId", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { @@ -603,22 +644,22 @@ export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { serializedName: "privateEndpoint", type: { name: "Composite", - className: "PrivateEndpoint" - } + className: "PrivateEndpoint", + }, }, privateLinkServiceConnectionState: { serializedName: "privateLinkServiceConnectionState", type: { name: "Composite", - className: "PrivateLinkServiceConnectionState" - } + className: "PrivateLinkServiceConnectionState", + }, }, provisioningState: { serializedName: "provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, groupIds: { serializedName: "groupIds", @@ -626,13 +667,13 @@ export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const PrivateEndpoint: coreClient.CompositeMapper = { @@ -644,11 +685,11 @@ export const PrivateEndpoint: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { @@ -659,23 +700,23 @@ export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { status: { serializedName: "status", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } + name: "String", + }, }, actionsRequired: { serializedName: "actionsRequired", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Resource: coreClient.CompositeMapper = { @@ -687,25 +728,25 @@ export const Resource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ApiProperties: coreClient.CompositeMapper = { @@ -717,89 +758,89 @@ export const ApiProperties: coreClient.CompositeMapper = { qnaRuntimeEndpoint: { serializedName: "qnaRuntimeEndpoint", type: { - name: "String" - } + name: "String", + }, }, qnaAzureSearchEndpointKey: { serializedName: "qnaAzureSearchEndpointKey", type: { - name: "String" - } + name: "String", + }, }, qnaAzureSearchEndpointId: { serializedName: "qnaAzureSearchEndpointId", type: { - name: "String" - } + name: "String", + }, }, statisticsEnabled: { serializedName: "statisticsEnabled", type: { - name: "Boolean" - } + name: "Boolean", + }, }, eventHubConnectionString: { constraints: { Pattern: new RegExp( - "^( *)Endpoint=sb:\\/\\/(.*);( *)SharedAccessKeyName=(.*);( *)SharedAccessKey=(.*)$" + "^( *)Endpoint=sb:\\/\\/(.*);( *)SharedAccessKeyName=(.*);( *)SharedAccessKey=(.*)$", ), - MaxLength: 1000 + MaxLength: 1000, }, serializedName: "eventHubConnectionString", type: { - name: "String" - } + name: "String", + }, }, storageAccountConnectionString: { constraints: { Pattern: new RegExp( - "^(( *)DefaultEndpointsProtocol=(http|https)( *);( *))?AccountName=(.*)AccountKey=(.*)EndpointSuffix=(.*)$" + "^(( *)DefaultEndpointsProtocol=(http|https)( *);( *))?AccountName=(.*)AccountKey=(.*)EndpointSuffix=(.*)$", ), - MaxLength: 1000 + MaxLength: 1000, }, serializedName: "storageAccountConnectionString", type: { - name: "String" - } + name: "String", + }, }, aadClientId: { constraints: { - MaxLength: 500 + MaxLength: 500, }, serializedName: "aadClientId", type: { - name: "String" - } + name: "String", + }, }, aadTenantId: { constraints: { - MaxLength: 500 + MaxLength: 500, }, serializedName: "aadTenantId", type: { - name: "String" - } + name: "String", + }, }, superUser: { constraints: { - MaxLength: 500 + MaxLength: 500, }, serializedName: "superUser", type: { - name: "String" - } + name: "String", + }, }, websiteName: { constraints: { - MaxLength: 500 + MaxLength: 500, }, serializedName: "websiteName", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CallRateLimit: coreClient.CompositeMapper = { @@ -810,14 +851,14 @@ export const CallRateLimit: coreClient.CompositeMapper = { count: { serializedName: "count", type: { - name: "Number" - } + name: "Number", + }, }, renewalPeriod: { serializedName: "renewalPeriod", type: { - name: "Number" - } + name: "Number", + }, }, rules: { serializedName: "rules", @@ -826,13 +867,13 @@ export const CallRateLimit: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ThrottlingRule" - } - } - } - } - } - } + className: "ThrottlingRule", + }, + }, + }, + }, + }, + }, }; export const ThrottlingRule: coreClient.CompositeMapper = { @@ -843,32 +884,32 @@ export const ThrottlingRule: coreClient.CompositeMapper = { key: { serializedName: "key", type: { - name: "String" - } + name: "String", + }, }, renewalPeriod: { serializedName: "renewalPeriod", type: { - name: "Number" - } + name: "Number", + }, }, count: { serializedName: "count", type: { - name: "Number" - } + name: "Number", + }, }, minCount: { serializedName: "minCount", type: { - name: "Number" - } + name: "Number", + }, }, dynamicThrottlingEnabled: { serializedName: "dynamicThrottlingEnabled", type: { - name: "Boolean" - } + name: "Boolean", + }, }, matchPatterns: { serializedName: "matchPatterns", @@ -877,13 +918,13 @@ export const ThrottlingRule: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RequestMatchPattern" - } - } - } - } - } - } + className: "RequestMatchPattern", + }, + }, + }, + }, + }, + }, }; export const RequestMatchPattern: coreClient.CompositeMapper = { @@ -894,17 +935,17 @@ export const RequestMatchPattern: coreClient.CompositeMapper = { path: { serializedName: "path", type: { - name: "String" - } + name: "String", + }, }, method: { serializedName: "method", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const QuotaLimit: coreClient.CompositeMapper = { @@ -915,14 +956,14 @@ export const QuotaLimit: coreClient.CompositeMapper = { count: { serializedName: "count", type: { - name: "Number" - } + name: "Number", + }, }, renewalPeriod: { serializedName: "renewalPeriod", type: { - name: "Number" - } + name: "Number", + }, }, rules: { serializedName: "rules", @@ -931,13 +972,13 @@ export const QuotaLimit: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ThrottlingRule" - } - } - } - } - } - } + className: "ThrottlingRule", + }, + }, + }, + }, + }, + }, }; export const MultiRegionSettings: coreClient.CompositeMapper = { @@ -948,8 +989,8 @@ export const MultiRegionSettings: coreClient.CompositeMapper = { routingMethod: { serializedName: "routingMethod", type: { - name: "String" - } + name: "String", + }, }, regions: { serializedName: "regions", @@ -958,13 +999,13 @@ export const MultiRegionSettings: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RegionSetting" - } - } - } - } - } - } + className: "RegionSetting", + }, + }, + }, + }, + }, + }, }; export const RegionSetting: coreClient.CompositeMapper = { @@ -975,23 +1016,23 @@ export const RegionSetting: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", type: { - name: "Number" - } + name: "Number", + }, }, customsubdomain: { serializedName: "customsubdomain", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CommitmentPlanAssociation: coreClient.CompositeMapper = { @@ -1002,17 +1043,17 @@ export const CommitmentPlanAssociation: coreClient.CompositeMapper = { commitmentPlanId: { serializedName: "commitmentPlanId", type: { - name: "String" - } + name: "String", + }, }, commitmentPlanLocation: { serializedName: "commitmentPlanLocation", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const AbusePenalty: coreClient.CompositeMapper = { @@ -1023,23 +1064,44 @@ export const AbusePenalty: coreClient.CompositeMapper = { action: { serializedName: "action", type: { - name: "String" - } + name: "String", + }, }, rateLimitPercentage: { serializedName: "rateLimitPercentage", type: { - name: "Number" - } + name: "Number", + }, }, expiration: { serializedName: "expiration", type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, +}; + +export const RaiMonitorConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiMonitorConfig", + modelProperties: { + adxStorageResourceId: { + serializedName: "adxStorageResourceId", + type: { + name: "String", + }, + }, + identityClientId: { + serializedName: "identityClientId", + type: { + name: "String", + }, + }, + }, + }, }; export const ErrorResponse: coreClient.CompositeMapper = { @@ -1051,11 +1113,11 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDetail" - } - } - } - } + className: "ErrorDetail", + }, + }, + }, + }, }; export const ErrorDetail: coreClient.CompositeMapper = { @@ -1067,22 +1129,22 @@ export const ErrorDetail: coreClient.CompositeMapper = { serializedName: "code", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, details: { serializedName: "details", @@ -1092,10 +1154,10 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorDetail" - } - } - } + className: "ErrorDetail", + }, + }, + }, }, additionalInfo: { serializedName: "additionalInfo", @@ -1105,13 +1167,13 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, }; export const ErrorAdditionalInfo: coreClient.CompositeMapper = { @@ -1123,19 +1185,19 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, info: { serializedName: "info", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + value: { type: { name: "any" } }, + }, + }, + }, + }, }; export const AccountListResult: coreClient.CompositeMapper = { @@ -1146,8 +1208,8 @@ export const AccountListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -1157,13 +1219,13 @@ export const AccountListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Account" - } - } - } - } - } - } + className: "Account", + }, + }, + }, + }, + }, + }, }; export const ApiKeys: coreClient.CompositeMapper = { @@ -1174,17 +1236,17 @@ export const ApiKeys: coreClient.CompositeMapper = { key1: { serializedName: "key1", type: { - name: "String" - } + name: "String", + }, }, key2: { serializedName: "key2", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const RegenerateKeyParameters: coreClient.CompositeMapper = { @@ -1197,11 +1259,11 @@ export const RegenerateKeyParameters: coreClient.CompositeMapper = { required: true, type: { name: "Enum", - allowedValues: ["Key1", "Key2"] - } - } - } - } + allowedValues: ["Key1", "Key2"], + }, + }, + }, + }, }; export const ResourceSkuListResult: coreClient.CompositeMapper = { @@ -1217,19 +1279,19 @@ export const ResourceSkuListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ResourceSku" - } - } - } + className: "ResourceSku", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceSku: coreClient.CompositeMapper = { @@ -1240,26 +1302,26 @@ export const ResourceSku: coreClient.CompositeMapper = { resourceType: { serializedName: "resourceType", type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, tier: { serializedName: "tier", type: { - name: "String" - } + name: "String", + }, }, kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, locations: { serializedName: "locations", @@ -1267,10 +1329,10 @@ export const ResourceSku: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, restrictions: { serializedName: "restrictions", @@ -1279,13 +1341,13 @@ export const ResourceSku: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ResourceSkuRestrictions" - } - } - } - } - } - } + className: "ResourceSkuRestrictions", + }, + }, + }, + }, + }, + }, }; export const ResourceSkuRestrictions: coreClient.CompositeMapper = { @@ -1297,8 +1359,8 @@ export const ResourceSkuRestrictions: coreClient.CompositeMapper = { serializedName: "type", type: { name: "Enum", - allowedValues: ["Location", "Zone"] - } + allowedValues: ["Location", "Zone"], + }, }, values: { serializedName: "values", @@ -1306,26 +1368,26 @@ export const ResourceSkuRestrictions: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, restrictionInfo: { serializedName: "restrictionInfo", type: { name: "Composite", - className: "ResourceSkuRestrictionInfo" - } + className: "ResourceSkuRestrictionInfo", + }, }, reasonCode: { serializedName: "reasonCode", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceSkuRestrictionInfo: coreClient.CompositeMapper = { @@ -1339,10 +1401,10 @@ export const ResourceSkuRestrictionInfo: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, zones: { serializedName: "zones", @@ -1350,13 +1412,13 @@ export const ResourceSkuRestrictionInfo: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const AccountSkuListResult: coreClient.CompositeMapper = { @@ -1371,13 +1433,13 @@ export const AccountSkuListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "AccountSku" - } - } - } - } - } - } + className: "AccountSku", + }, + }, + }, + }, + }, + }, }; export const AccountSku: coreClient.CompositeMapper = { @@ -1388,18 +1450,18 @@ export const AccountSku: coreClient.CompositeMapper = { resourceType: { serializedName: "resourceType", type: { - name: "String" - } + name: "String", + }, }, sku: { serializedName: "sku", type: { name: "Composite", - className: "Sku" - } - } - } - } + className: "Sku", + }, + }, + }, + }, }; export const UsageListResult: coreClient.CompositeMapper = { @@ -1410,8 +1472,8 @@ export const UsageListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -1420,13 +1482,13 @@ export const UsageListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Usage" - } - } - } - } - } - } + className: "Usage", + }, + }, + }, + }, + }, + }, }; export const Usage: coreClient.CompositeMapper = { @@ -1437,48 +1499,48 @@ export const Usage: coreClient.CompositeMapper = { unit: { serializedName: "unit", type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", type: { name: "Composite", - className: "MetricName" - } + className: "MetricName", + }, }, quotaPeriod: { serializedName: "quotaPeriod", type: { - name: "String" - } + name: "String", + }, }, limit: { serializedName: "limit", type: { - name: "Number" - } + name: "Number", + }, }, currentValue: { serializedName: "currentValue", type: { - name: "Number" - } + name: "Number", + }, }, nextResetTime: { serializedName: "nextResetTime", type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "status", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const MetricName: coreClient.CompositeMapper = { @@ -1489,17 +1551,17 @@ export const MetricName: coreClient.CompositeMapper = { value: { serializedName: "value", type: { - name: "String" - } + name: "String", + }, }, localizedValue: { serializedName: "localizedValue", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const AccountModelListResult: coreClient.CompositeMapper = { @@ -1510,8 +1572,8 @@ export const AccountModelListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -1520,13 +1582,13 @@ export const AccountModelListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "AccountModel" - } - } - } - } - } - } + className: "AccountModel", + }, + }, + }, + }, + }, + }, }; export const DeploymentModel: coreClient.CompositeMapper = { @@ -1534,39 +1596,51 @@ export const DeploymentModel: coreClient.CompositeMapper = { name: "Composite", className: "DeploymentModel", modelProperties: { + publisher: { + serializedName: "publisher", + type: { + name: "String", + }, + }, format: { serializedName: "format", type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, version: { serializedName: "version", type: { - name: "String" - } + name: "String", + }, }, source: { serializedName: "source", type: { - name: "String" - } + name: "String", + }, + }, + sourceAccount: { + serializedName: "sourceAccount", + type: { + name: "String", + }, }, callRateLimit: { serializedName: "callRateLimit", type: { name: "Composite", - className: "CallRateLimit" - } - } - } - } + className: "CallRateLimit", + }, + }, + }, + }, }; export const ModelSku: coreClient.CompositeMapper = { @@ -1577,27 +1651,27 @@ export const ModelSku: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, usageName: { serializedName: "usageName", type: { - name: "String" - } + name: "String", + }, }, deprecationDate: { serializedName: "deprecationDate", type: { - name: "DateTime" - } + name: "DateTime", + }, }, capacity: { serializedName: "capacity", type: { name: "Composite", - className: "CapacityConfig" - } + className: "CapacityConfig", + }, }, rateLimits: { serializedName: "rateLimits", @@ -1606,46 +1680,96 @@ export const ModelSku: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CallRateLimit" - } - } - } - } - } - } -}; - -export const CapacityConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CapacityConfig", + className: "CallRateLimit", + }, + }, + }, + }, + cost: { + serializedName: "cost", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingMeterInfo", + }, + }, + }, + }, + }, + }, +}; + +export const CapacityConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CapacityConfig", modelProperties: { minimum: { serializedName: "minimum", type: { - name: "Number" - } + name: "Number", + }, }, maximum: { serializedName: "maximum", type: { - name: "Number" - } + name: "Number", + }, }, step: { serializedName: "step", type: { - name: "Number" - } + name: "Number", + }, }, default: { serializedName: "default", type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + allowedValues: { + serializedName: "allowedValues", + type: { + name: "Sequence", + element: { + type: { + name: "Number", + }, + }, + }, + }, + }, + }, +}; + +export const BillingMeterInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingMeterInfo", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + meterId: { + serializedName: "meterId", + type: { + name: "String", + }, + }, + unit: { + serializedName: "unit", + type: { + name: "String", + }, + }, + }, + }, }; export const ModelDeprecationInfo: coreClient.CompositeMapper = { @@ -1656,17 +1780,17 @@ export const ModelDeprecationInfo: coreClient.CompositeMapper = { fineTune: { serializedName: "fineTune", type: { - name: "String" - } + name: "String", + }, }, inference: { serializedName: "inference", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationListResult: coreClient.CompositeMapper = { @@ -1682,20 +1806,20 @@ export const OperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" - } - } - } + className: "Operation", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Operation: coreClient.CompositeMapper = { @@ -1707,39 +1831,39 @@ export const Operation: coreClient.CompositeMapper = { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, isDataAction: { serializedName: "isDataAction", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplay" - } + className: "OperationDisplay", + }, }, origin: { serializedName: "origin", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, actionType: { serializedName: "actionType", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationDisplay: coreClient.CompositeMapper = { @@ -1751,32 +1875,32 @@ export const OperationDisplay: coreClient.CompositeMapper = { serializedName: "provider", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CheckSkuAvailabilityParameter: coreClient.CompositeMapper = { @@ -1791,27 +1915,27 @@ export const CheckSkuAvailabilityParameter: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, kind: { serializedName: "kind", required: true, type: { - name: "String" - } + name: "String", + }, }, typeParam: { serializedName: "type", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SkuAvailabilityListResult: coreClient.CompositeMapper = { @@ -1826,13 +1950,13 @@ export const SkuAvailabilityListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SkuAvailability" - } - } - } - } - } - } + className: "SkuAvailability", + }, + }, + }, + }, + }, + }, }; export const SkuAvailability: coreClient.CompositeMapper = { @@ -1843,41 +1967,41 @@ export const SkuAvailability: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", type: { - name: "String" - } + name: "String", + }, }, skuName: { serializedName: "skuName", type: { - name: "String" - } + name: "String", + }, }, skuAvailable: { serializedName: "skuAvailable", type: { - name: "Boolean" - } + name: "Boolean", + }, }, reason: { serializedName: "reason", type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CommitmentTierListResult: coreClient.CompositeMapper = { @@ -1888,8 +2012,8 @@ export const CommitmentTierListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -1899,13 +2023,13 @@ export const CommitmentTierListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CommitmentTier" - } - } - } - } - } - } + className: "CommitmentTier", + }, + }, + }, + }, + }, + }, }; export const CommitmentTier: coreClient.CompositeMapper = { @@ -1916,55 +2040,55 @@ export const CommitmentTier: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, skuName: { serializedName: "skuName", type: { - name: "String" - } + name: "String", + }, }, hostingModel: { serializedName: "hostingModel", type: { - name: "String" - } + name: "String", + }, }, planType: { serializedName: "planType", type: { - name: "String" - } + name: "String", + }, }, tier: { serializedName: "tier", type: { - name: "String" - } + name: "String", + }, }, maxCount: { serializedName: "maxCount", type: { - name: "Number" - } + name: "Number", + }, }, quota: { serializedName: "quota", type: { name: "Composite", - className: "CommitmentQuota" - } + className: "CommitmentQuota", + }, }, cost: { serializedName: "cost", type: { name: "Composite", - className: "CommitmentCost" - } - } - } - } + className: "CommitmentCost", + }, + }, + }, + }, }; export const CommitmentQuota: coreClient.CompositeMapper = { @@ -1975,17 +2099,17 @@ export const CommitmentQuota: coreClient.CompositeMapper = { quantity: { serializedName: "quantity", type: { - name: "Number" - } + name: "Number", + }, }, unit: { serializedName: "unit", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CommitmentCost: coreClient.CompositeMapper = { @@ -1996,17 +2120,17 @@ export const CommitmentCost: coreClient.CompositeMapper = { commitmentMeterId: { serializedName: "commitmentMeterId", type: { - name: "String" - } + name: "String", + }, }, overageMeterId: { serializedName: "overageMeterId", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ModelListResult: coreClient.CompositeMapper = { @@ -2017,8 +2141,8 @@ export const ModelListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -2027,13 +2151,13 @@ export const ModelListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Model" - } - } - } - } - } - } + className: "Model", + }, + }, + }, + }, + }, + }, }; export const Model: coreClient.CompositeMapper = { @@ -2045,23 +2169,90 @@ export const Model: coreClient.CompositeMapper = { serializedName: "model", type: { name: "Composite", - className: "AccountModel" - } + className: "AccountModel", + }, }, kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, + }, + skuName: { + serializedName: "skuName", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ModelCapacityListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ModelCapacityListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ModelCapacityListResultValueItem", + }, + }, + }, + }, + }, + }, +}; + +export const ModelSkuCapacityProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ModelSkuCapacityProperties", + modelProperties: { + model: { + serializedName: "model", + type: { + name: "Composite", + className: "DeploymentModel", + }, }, skuName: { serializedName: "skuName", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + availableCapacity: { + serializedName: "availableCapacity", + type: { + name: "Number", + }, + }, + availableFinetuneCapacity: { + serializedName: "availableFinetuneCapacity", + type: { + name: "Number", + }, + }, + }, + }, }; export const CheckDomainAvailabilityParameter: coreClient.CompositeMapper = { @@ -2073,24 +2264,24 @@ export const CheckDomainAvailabilityParameter: coreClient.CompositeMapper = { serializedName: "subdomainName", required: true, type: { - name: "String" - } + name: "String", + }, }, typeParam: { serializedName: "type", required: true, type: { - name: "String" - } + name: "String", + }, }, kind: { serializedName: "kind", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const DomainAvailability: coreClient.CompositeMapper = { @@ -2101,37 +2292,166 @@ export const DomainAvailability: coreClient.CompositeMapper = { isSubdomainAvailable: { serializedName: "isSubdomainAvailable", type: { - name: "Boolean" - } + name: "Boolean", + }, }, reason: { serializedName: "reason", type: { - name: "String" - } + name: "String", + }, }, subdomainName: { serializedName: "subdomainName", type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", type: { - name: "String" - } + name: "String", + }, }, kind: { serializedName: "kind", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const CalculateModelCapacityParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CalculateModelCapacityParameter", + modelProperties: { + model: { + serializedName: "model", + type: { + name: "Composite", + className: "DeploymentModel", + }, + }, + skuName: { + serializedName: "skuName", + type: { + name: "String", + }, + }, + workloads: { + serializedName: "workloads", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ModelCapacityCalculatorWorkload", + }, + }, + }, + }, + }, + }, +}; + +export const ModelCapacityCalculatorWorkload: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ModelCapacityCalculatorWorkload", + modelProperties: { + requestPerMinute: { + serializedName: "requestPerMinute", + type: { + name: "Number", + }, + }, + requestParameters: { + serializedName: "requestParameters", + type: { + name: "Composite", + className: "ModelCapacityCalculatorWorkloadRequestParam", + }, + }, + }, + }, +}; + +export const ModelCapacityCalculatorWorkloadRequestParam: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ModelCapacityCalculatorWorkloadRequestParam", + modelProperties: { + avgPromptTokens: { + serializedName: "avgPromptTokens", + type: { + name: "Number", + }, + }, + avgGeneratedTokens: { + serializedName: "avgGeneratedTokens", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const CalculateModelCapacityResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CalculateModelCapacityResult", + modelProperties: { + model: { + serializedName: "model", + type: { + name: "Composite", + className: "DeploymentModel", + }, + }, + skuName: { + serializedName: "skuName", + type: { + name: "String", + }, + }, + estimatedCapacity: { + serializedName: "estimatedCapacity", + type: { + name: "Composite", + className: "CalculateModelCapacityResultEstimatedCapacity", + }, + }, + }, + }, }; +export const CalculateModelCapacityResultEstimatedCapacity: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CalculateModelCapacityResultEstimatedCapacity", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Number", + }, + }, + deployableValue: { + serializedName: "deployableValue", + type: { + name: "Number", + }, + }, + }, + }, + }; + export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2144,13 +2464,13 @@ export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnection" - } - } - } - } - } - } + className: "PrivateEndpointConnection", + }, + }, + }, + }, + }, + }, }; export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { @@ -2165,13 +2485,13 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateLinkResource" - } - } - } - } - } - } + className: "PrivateLinkResource", + }, + }, + }, + }, + }, + }, }; export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { @@ -2183,8 +2503,8 @@ export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { serializedName: "groupId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, requiredMembers: { serializedName: "requiredMembers", @@ -2193,10 +2513,10 @@ export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, requiredZoneNames: { serializedName: "requiredZoneNames", @@ -2204,20 +2524,20 @@ export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, displayName: { serializedName: "displayName", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const DeploymentListResult: coreClient.CompositeMapper = { @@ -2228,8 +2548,8 @@ export const DeploymentListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -2239,13 +2559,13 @@ export const DeploymentListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Deployment" - } - } - } - } - } - } + className: "Deployment", + }, + }, + }, + }, + }, + }, }; export const DeploymentProperties: coreClient.CompositeMapper = { @@ -2257,43 +2577,43 @@ export const DeploymentProperties: coreClient.CompositeMapper = { serializedName: "provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, model: { serializedName: "model", type: { name: "Composite", - className: "DeploymentModel" - } + className: "DeploymentModel", + }, }, scaleSettings: { serializedName: "scaleSettings", type: { name: "Composite", - className: "DeploymentScaleSettings" - } + className: "DeploymentScaleSettings", + }, }, capabilities: { serializedName: "capabilities", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, raiPolicyName: { serializedName: "raiPolicyName", type: { - name: "String" - } + name: "String", + }, }, callRateLimit: { serializedName: "callRateLimit", type: { name: "Composite", - className: "CallRateLimit" - } + className: "CallRateLimit", + }, }, rateLimits: { serializedName: "rateLimits", @@ -2303,47 +2623,173 @@ export const DeploymentProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ThrottlingRule" - } - } - } + className: "ThrottlingRule", + }, + }, + }, }, versionUpgradeOption: { serializedName: "versionUpgradeOption", type: { - name: "String" - } - } - } - } -}; - -export const DeploymentScaleSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DeploymentScaleSettings", - modelProperties: { - scaleType: { - serializedName: "scaleType", - type: { - name: "String" - } + name: "String", + }, }, - capacity: { - serializedName: "capacity", + dynamicThrottlingEnabled: { + serializedName: "dynamicThrottlingEnabled", + readOnly: true, type: { - name: "Number" - } + name: "Boolean", + }, + }, + currentCapacity: { + serializedName: "currentCapacity", + type: { + name: "Number", + }, + }, + capacitySettings: { + serializedName: "capacitySettings", + type: { + name: "Composite", + className: "DeploymentCapacitySettings", + }, + }, + parentDeploymentName: { + serializedName: "parentDeploymentName", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DeploymentScaleSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeploymentScaleSettings", + modelProperties: { + scaleType: { + serializedName: "scaleType", + type: { + name: "String", + }, + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number", + }, }, activeCapacity: { serializedName: "activeCapacity", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, +}; + +export const DeploymentCapacitySettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeploymentCapacitySettings", + modelProperties: { + designatedCapacity: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "designatedCapacity", + type: { + name: "Number", + }, + }, + priority: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "priority", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const PatchResourceTags: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchResourceTags", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; + +export const DeploymentSkuListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeploymentSkuListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuResource", + }, + }, + }, + }, + }, + }, +}; + +export const SkuResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuResource", + modelProperties: { + resourceType: { + serializedName: "resourceType", + type: { + name: "String", + }, + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku", + }, + }, + capacity: { + serializedName: "capacity", + type: { + name: "Composite", + className: "CapacityConfig", + }, + }, + }, + }, }; export const CommitmentPlanListResult: coreClient.CompositeMapper = { @@ -2354,8 +2800,8 @@ export const CommitmentPlanListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -2365,13 +2811,13 @@ export const CommitmentPlanListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CommitmentPlan" - } - } - } - } - } - } + className: "CommitmentPlan", + }, + }, + }, + }, + }, + }, }; export const CommitmentPlanProperties: coreClient.CompositeMapper = { @@ -2383,53 +2829,53 @@ export const CommitmentPlanProperties: coreClient.CompositeMapper = { serializedName: "provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, commitmentPlanGuid: { serializedName: "commitmentPlanGuid", type: { - name: "String" - } + name: "String", + }, }, hostingModel: { serializedName: "hostingModel", type: { - name: "String" - } + name: "String", + }, }, planType: { serializedName: "planType", type: { - name: "String" - } + name: "String", + }, }, current: { serializedName: "current", type: { name: "Composite", - className: "CommitmentPeriod" - } + className: "CommitmentPeriod", + }, }, autoRenew: { serializedName: "autoRenew", type: { - name: "Boolean" - } + name: "Boolean", + }, }, next: { serializedName: "next", type: { name: "Composite", - className: "CommitmentPeriod" - } + className: "CommitmentPeriod", + }, }, last: { serializedName: "last", type: { name: "Composite", - className: "CommitmentPeriod" - } + className: "CommitmentPeriod", + }, }, provisioningIssues: { serializedName: "provisioningIssues", @@ -2438,13 +2884,13 @@ export const CommitmentPlanProperties: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const CommitmentPeriod: coreClient.CompositeMapper = { @@ -2455,251 +2901,985 @@ export const CommitmentPeriod: coreClient.CompositeMapper = { tier: { serializedName: "tier", type: { - name: "String" - } + name: "String", + }, }, count: { serializedName: "count", type: { - name: "Number" - } + name: "Number", + }, }, quota: { serializedName: "quota", type: { name: "Composite", - className: "CommitmentQuota" - } + className: "CommitmentQuota", + }, }, startDate: { serializedName: "startDate", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, endDate: { serializedName: "endDate", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const PatchResourceTags: coreClient.CompositeMapper = { +export const EncryptionScopeListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PatchResourceTags", + className: "EncryptionScopeListResult", modelProperties: { - tags: { - serializedName: "tags", + nextLink: { + serializedName: "nextLink", type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EncryptionScope", + }, + }, + }, + }, + }, + }, }; -export const CommitmentPlanAccountAssociationListResult: coreClient.CompositeMapper = { +export const RaiPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CommitmentPlanAccountAssociationListResult", + className: "RaiPolicyListResult", modelProperties: { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "CommitmentPlanAccountAssociation" - } - } - } - } - } - } + className: "RaiPolicy", + }, + }, + }, + }, + }, + }, }; -export const AzureEntityResource: coreClient.CompositeMapper = { +export const RaiPolicyProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureEntityResource", + className: "RaiPolicyProperties", modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", + type: { + serializedName: "type", readOnly: true, type: { - name: "String" - } - } - } - } -}; - -export const PrivateLinkResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - ...Resource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "PrivateLinkResourceProperties" - } - } - } - } -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const AccountModel: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccountModel", - modelProperties: { - ...DeploymentModel.type.modelProperties, - baseModel: { - serializedName: "baseModel", + name: "String", + }, + }, + mode: { + serializedName: "mode", type: { - name: "Composite", - className: "DeploymentModel" - } + name: "String", + }, }, - isDefaultVersion: { - serializedName: "isDefaultVersion", + basePolicyName: { + serializedName: "basePolicyName", type: { - name: "Boolean" - } + name: "String", + }, }, - skus: { - serializedName: "skus", + contentFilters: { + serializedName: "contentFilters", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ModelSku" - } - } - } + className: "RaiPolicyContentFilter", + }, + }, + }, }, - maxCapacity: { - serializedName: "maxCapacity", + customBlocklists: { + serializedName: "customBlocklists", type: { - name: "Number" - } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomBlocklistConfig", + }, + }, + }, }, - capabilities: { - serializedName: "capabilities", + }, + }, +}; + +export const RaiPolicyContentFilter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiPolicyContentFilter", + modelProperties: { + name: { + serializedName: "name", type: { - name: "Dictionary", - value: { type: { name: "String" } } - } + name: "String", + }, }, - finetuneCapabilities: { - serializedName: "finetuneCapabilities", + enabled: { + serializedName: "enabled", type: { - name: "Dictionary", - value: { type: { name: "String" } } - } + name: "Boolean", + }, }, - deprecation: { - serializedName: "deprecation", + severityThreshold: { + serializedName: "severityThreshold", type: { - name: "Composite", - className: "ModelDeprecationInfo" - } + name: "String", + }, }, - lifecycleStatus: { - serializedName: "lifecycleStatus", + blocking: { + serializedName: "blocking", type: { - name: "String" - } + name: "Boolean", + }, }, - systemData: { - serializedName: "systemData", + source: { + serializedName: "source", type: { - name: "Composite", - className: "SystemData" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const PatchResourceTagsAndSku: coreClient.CompositeMapper = { +export const RaiBlocklistConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PatchResourceTagsAndSku", + className: "RaiBlocklistConfig", modelProperties: { - ...PatchResourceTags.type.modelProperties, - sku: { - serializedName: "sku", + blocklistName: { + serializedName: "blocklistName", type: { - name: "Composite", - className: "Sku" - } - } - } - } + name: "String", + }, + }, + blocking: { + serializedName: "blocking", + type: { + name: "Boolean", + }, + }, + }, + }, }; -export const PrivateEndpointConnection: coreClient.CompositeMapper = { +export const RaiBlockListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnection", + className: "RaiBlockListResult", modelProperties: { - ...AzureEntityResource.type.modelProperties, - properties: { - serializedName: "properties", + nextLink: { + serializedName: "nextLink", type: { - name: "Composite", - className: "PrivateEndpointConnectionProperties" - } + name: "String", + }, }, - systemData: { - serializedName: "systemData", + value: { + serializedName: "value", type: { - name: "Composite", - className: "SystemData" - } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RaiBlocklist", + }, + }, + }, }, - location: { - serializedName: "location", - type: { - name: "String" - } - } - } - } + }, + }, }; -export const Account: coreClient.CompositeMapper = { +export const RaiBlocklistProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiBlocklistProperties", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RaiBlockListItemsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiBlockListItemsResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RaiBlocklistItem", + }, + }, + }, + }, + }, + }, +}; + +export const RaiBlocklistItemProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiBlocklistItemProperties", + modelProperties: { + pattern: { + serializedName: "pattern", + type: { + name: "String", + }, + }, + isRegex: { + serializedName: "isRegex", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const RaiBlocklistItemBulkRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiBlocklistItemBulkRequest", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "RaiBlocklistItemProperties", + }, + }, + }, + }, +}; + +export const RaiContentFilterListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiContentFilterListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RaiContentFilter", + }, + }, + }, + }, + }, + }, +}; + +export const RaiContentFilterProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiContentFilterProperties", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + isMultiLevelFilter: { + serializedName: "isMultiLevelFilter", + type: { + name: "Boolean", + }, + }, + source: { + serializedName: "source", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const CommitmentPlanAccountAssociationListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CommitmentPlanAccountAssociationListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CommitmentPlanAccountAssociation", + }, + }, + }, + }, + }, + }, + }; + +export const NetworkSecurityPerimeterConfigurationList: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfiguration", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const NetworkSecurityPerimeterConfigurationProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + provisioningIssues: { + serializedName: "provisioningIssues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProvisioningIssue", + }, + }, + }, + }, + networkSecurityPerimeter: { + serializedName: "networkSecurityPerimeter", + type: { + name: "Composite", + className: "NetworkSecurityPerimeter", + }, + }, + resourceAssociation: { + serializedName: "resourceAssociation", + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationAssociationInfo", + }, + }, + profile: { + serializedName: "profile", + type: { + name: "Composite", + className: "NetworkSecurityPerimeterProfileInfo", + }, + }, + }, + }, + }; + +export const ProvisioningIssue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProvisioningIssue", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ProvisioningIssueProperties", + }, + }, + }, + }, +}; + +export const ProvisioningIssueProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProvisioningIssueProperties", + modelProperties: { + issueType: { + serializedName: "issueType", + type: { + name: "String", + }, + }, + severity: { + serializedName: "severity", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + suggestedResourceIds: { + serializedName: "suggestedResourceIds", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + suggestedAccessRules: { + serializedName: "suggestedAccessRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterAccessRule", + }, + }, + }, + }, + }, + }, +}; + +export const NetworkSecurityPerimeterAccessRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterAccessRule", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "NetworkSecurityPerimeterAccessRuleProperties", + }, + }, + }, + }, +}; + +export const NetworkSecurityPerimeterAccessRuleProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterAccessRuleProperties", + modelProperties: { + direction: { + serializedName: "direction", + type: { + name: "String", + }, + }, + addressPrefixes: { + serializedName: "addressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + subscriptions: { + serializedName: "subscriptions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem", + }, + }, + }, + }, + networkSecurityPerimeters: { + serializedName: "networkSecurityPerimeters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeter", + }, + }, + }, + }, + fullyQualifiedDomainNames: { + serializedName: "fullyQualifiedDomainNames", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, + }; + +export const NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const NetworkSecurityPerimeter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkSecurityPerimeter", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + perimeterGuid: { + serializedName: "perimeterGuid", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const NetworkSecurityPerimeterConfigurationAssociationInfo: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationAssociationInfo", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + accessMode: { + serializedName: "accessMode", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const NetworkSecurityPerimeterProfileInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterProfileInfo", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + accessRulesVersion: { + serializedName: "accessRulesVersion", + type: { + name: "Number", + }, + }, + accessRules: { + serializedName: "accessRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterAccessRule", + }, + }, + }, + }, + diagnosticSettingsVersion: { + serializedName: "diagnosticSettingsVersion", + type: { + name: "Number", + }, + }, + enabledLogCategories: { + serializedName: "enabledLogCategories", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const DefenderForAISettingResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForAISettingResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DefenderForAISetting", + }, + }, + }, + }, + }, + }, +}; + +export const EncryptionScopeProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptionScopeProperties", + modelProperties: { + ...Encryption.type.modelProperties, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + state: { + serializedName: "state", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AzureEntityResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties, + }, + }, +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties", + }, + }, + }, + }, +}; + +export const AccountModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountModel", + modelProperties: { + ...DeploymentModel.type.modelProperties, + baseModel: { + serializedName: "baseModel", + type: { + name: "Composite", + className: "DeploymentModel", + }, + }, + isDefaultVersion: { + serializedName: "isDefaultVersion", + type: { + name: "Boolean", + }, + }, + skus: { + serializedName: "skus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ModelSku", + }, + }, + }, + }, + maxCapacity: { + serializedName: "maxCapacity", + type: { + name: "Number", + }, + }, + capabilities: { + serializedName: "capabilities", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + finetuneCapabilities: { + serializedName: "finetuneCapabilities", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + deprecation: { + serializedName: "deprecation", + type: { + name: "Composite", + className: "ModelDeprecationInfo", + }, + }, + lifecycleStatus: { + serializedName: "lifecycleStatus", + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + }, + }, +}; + +export const PatchResourceTagsAndSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchResourceTagsAndSku", + modelProperties: { + ...PatchResourceTags.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku", + }, + }, + }, + }, +}; + +export const CustomBlocklistConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomBlocklistConfig", + modelProperties: { + ...RaiBlocklistConfig.type.modelProperties, + source: { + serializedName: "source", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...AzureEntityResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const Account: coreClient.CompositeMapper = { type: { name: "Composite", className: "Account", @@ -2708,147 +3888,346 @@ export const Account: coreClient.CompositeMapper = { kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku", + }, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AccountProperties", + }, + }, + }, + }, +}; + +export const ModelCapacityListResultValueItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ModelCapacityListResultValueItem", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ModelSkuCapacityProperties", + }, }, + }, + }, +}; + +export const Deployment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Deployment", + modelProperties: { + ...ProxyResource.type.modelProperties, sku: { serializedName: "sku", type: { name: "Composite", - className: "Sku" - } + className: "Sku", + }, }, - identity: { - serializedName: "identity", + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + properties: { + serializedName: "properties", type: { name: "Composite", - className: "Identity" - } + className: "DeploymentProperties", + }, }, + }, + }, +}; + +export const CommitmentPlan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommitmentPlan", + modelProperties: { + ...ProxyResource.type.modelProperties, systemData: { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } + className: "SystemData", + }, + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String", + }, + }, + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku", + }, }, tags: { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, properties: { serializedName: "properties", type: { name: "Composite", - className: "AccountProperties" - } - } - } - } + className: "CommitmentPlanProperties", + }, + }, + }, + }, }; -export const Deployment: coreClient.CompositeMapper = { +export const EncryptionScope: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Deployment", + className: "EncryptionScope", modelProperties: { ...ProxyResource.type.modelProperties, - sku: { - serializedName: "sku", + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + properties: { + serializedName: "properties", type: { name: "Composite", - className: "Sku" - } + className: "EncryptionScopeProperties", + }, }, + }, + }, +}; + +export const RaiPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, systemData: { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } + className: "SystemData", + }, }, etag: { serializedName: "etag", readOnly: true, type: { - name: "String" - } + name: "String", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, }, properties: { serializedName: "properties", type: { name: "Composite", - className: "DeploymentProperties" - } - } - } - } + className: "RaiPolicyProperties", + }, + }, + }, + }, }; -export const CommitmentPlan: coreClient.CompositeMapper = { +export const RaiBlocklist: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CommitmentPlan", + className: "RaiBlocklist", modelProperties: { ...ProxyResource.type.modelProperties, systemData: { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } + className: "SystemData", + }, }, etag: { serializedName: "etag", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, - kind: { - serializedName: "kind", + tags: { + serializedName: "tags", type: { - name: "String" - } + name: "Dictionary", + value: { type: { name: "String" } }, + }, }, - sku: { - serializedName: "sku", + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "RaiBlocklistProperties", + }, + }, + }, + }, +}; + +export const RaiBlocklistItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiBlocklistItem", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", type: { name: "Composite", - className: "Sku" - } + className: "SystemData", + }, + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String", + }, }, tags: { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, - location: { - serializedName: "location", + properties: { + serializedName: "properties", type: { - name: "String" - } + name: "Composite", + className: "RaiBlocklistItemProperties", + }, }, + }, + }, +}; + +export const RaiContentFilter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiContentFilter", + modelProperties: { + ...ProxyResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "CommitmentPlanProperties" - } - } - } - } + className: "RaiContentFilterProperties", + }, + }, + }, + }, }; export const CommitmentPlanAccountAssociation: coreClient.CompositeMapper = { @@ -2861,24 +4240,101 @@ export const CommitmentPlanAccountAssociation: coreClient.CompositeMapper = { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } + className: "SystemData", + }, }, etag: { serializedName: "etag", readOnly: true, type: { - name: "String" - } + name: "String", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, }, accountId: { serializedName: "properties.accountId", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const NetworkSecurityPerimeterConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfiguration", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationProperties", + }, + }, + }, + }, + }; + +export const DefenderForAISetting: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefenderForAISetting", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + state: { + serializedName: "properties.state", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DeploymentsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeploymentsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, }; export const CommitmentPlansUpdatePlanHeaders: coreClient.CompositeMapper = { @@ -2889,11 +4345,11 @@ export const CommitmentPlansUpdatePlanHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CommitmentPlansDeletePlanHeaders: coreClient.CompositeMapper = { @@ -2904,24 +4360,101 @@ export const CommitmentPlansDeletePlanHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const CommitmentPlansDeleteAssociationHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CommitmentPlansDeleteAssociationHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const EncryptionScopesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptionScopesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RaiPoliciesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiPoliciesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RaiBlocklistsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RaiBlocklistsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, }; -export const CommitmentPlansDeleteAssociationHeaders: coreClient.CompositeMapper = { +export const RaiBlocklistItemsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CommitmentPlansDeleteAssociationHeaders", + className: "RaiBlocklistItemsDeleteHeaders", modelProperties: { location: { serializedName: "location", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; + +export const NetworkSecurityPerimeterConfigurationsReconcileHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationsReconcileHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts index 00b143d9d26d..fd2cd53fa630 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts @@ -9,18 +9,24 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { Account as AccountMapper, RegenerateKeyParameters as RegenerateKeyParametersMapper, CheckSkuAvailabilityParameter as CheckSkuAvailabilityParameterMapper, CheckDomainAvailabilityParameter as CheckDomainAvailabilityParameterMapper, + CalculateModelCapacityParameter as CalculateModelCapacityParameterMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, Deployment as DeploymentMapper, - CommitmentPlan as CommitmentPlanMapper, PatchResourceTagsAndSku as PatchResourceTagsAndSkuMapper, - CommitmentPlanAccountAssociation as CommitmentPlanAccountAssociationMapper + CommitmentPlan as CommitmentPlanMapper, + CommitmentPlanAccountAssociation as CommitmentPlanAccountAssociationMapper, + EncryptionScope as EncryptionScopeMapper, + RaiPolicy as RaiPolicyMapper, + RaiBlocklist as RaiBlocklistMapper, + RaiBlocklistItem as RaiBlocklistItemMapper, + DefenderForAISetting as DefenderForAISettingMapper, } from "../models/mappers"; export const contentType: OperationParameter = { @@ -30,14 +36,14 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const account: OperationParameter = { parameterPath: "account", - mapper: AccountMapper + mapper: AccountMapper, }; export const accept: OperationParameter = { @@ -47,9 +53,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -58,10 +64,10 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const resourceGroupName: OperationURLParameter = { @@ -69,14 +75,14 @@ export const resourceGroupName: OperationURLParameter = { mapper: { constraints: { MaxLength: 90, - MinLength: 1 + MinLength: 1, }, serializedName: "resourceGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const accountName: OperationURLParameter = { @@ -85,45 +91,45 @@ export const accountName: OperationURLParameter = { constraints: { Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), MaxLength: 64, - MinLength: 2 + MinLength: 2, }, serializedName: "accountName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-05-01", + defaultValue: "2024-10-01", isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { constraints: { - MinLength: 1 + MinLength: 1, }, serializedName: "subscriptionId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const keyName: OperationParameter = { parameterPath: "keyName", - mapper: RegenerateKeyParametersMapper + mapper: RegenerateKeyParametersMapper, }; export const filter: OperationQueryParameter = { @@ -131,9 +137,9 @@ export const filter: OperationQueryParameter = { mapper: { serializedName: "$filter", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const nextLink: OperationURLParameter = { @@ -142,10 +148,10 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const location: OperationURLParameter = { @@ -154,39 +160,96 @@ export const location: OperationURLParameter = { serializedName: "location", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const skus: OperationParameter = { parameterPath: "skus", - mapper: CheckSkuAvailabilityParameterMapper + mapper: CheckSkuAvailabilityParameterMapper, }; export const kind: OperationParameter = { parameterPath: "kind", - mapper: CheckSkuAvailabilityParameterMapper + mapper: CheckSkuAvailabilityParameterMapper, }; export const typeParam: OperationParameter = { parameterPath: "typeParam", - mapper: CheckSkuAvailabilityParameterMapper + mapper: CheckSkuAvailabilityParameterMapper, }; export const subdomainName: OperationParameter = { parameterPath: "subdomainName", - mapper: CheckDomainAvailabilityParameterMapper + mapper: CheckDomainAvailabilityParameterMapper, }; export const typeParam1: OperationParameter = { parameterPath: "typeParam", - mapper: CheckDomainAvailabilityParameterMapper + mapper: CheckDomainAvailabilityParameterMapper, }; export const kind1: OperationParameter = { parameterPath: ["options", "kind"], - mapper: CheckDomainAvailabilityParameterMapper + mapper: CheckDomainAvailabilityParameterMapper, +}; + +export const model: OperationParameter = { + parameterPath: ["options", "model"], + mapper: CalculateModelCapacityParameterMapper, +}; + +export const skuName: OperationParameter = { + parameterPath: ["options", "skuName"], + mapper: CalculateModelCapacityParameterMapper, +}; + +export const workloads: OperationParameter = { + parameterPath: ["options", "workloads"], + mapper: CalculateModelCapacityParameterMapper, +}; + +export const modelFormat: OperationQueryParameter = { + parameterPath: "modelFormat", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), + }, + serializedName: "modelFormat", + required: true, + type: { + name: "String", + }, + }, +}; + +export const modelName: OperationQueryParameter = { + parameterPath: "modelName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), + }, + serializedName: "modelName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const modelVersion: OperationQueryParameter = { + parameterPath: "modelVersion", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), + }, + serializedName: "modelVersion", + required: true, + type: { + name: "String", + }, + }, }; export const privateEndpointConnectionName: OperationURLParameter = { @@ -195,14 +258,14 @@ export const privateEndpointConnectionName: OperationURLParameter = { serializedName: "privateEndpointConnectionName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const properties: OperationParameter = { parameterPath: "properties", - mapper: PrivateEndpointConnectionMapper + mapper: PrivateEndpointConnectionMapper, }; export const deploymentName: OperationURLParameter = { @@ -211,14 +274,19 @@ export const deploymentName: OperationURLParameter = { serializedName: "deploymentName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const deployment: OperationParameter = { parameterPath: "deployment", - mapper: DeploymentMapper + mapper: DeploymentMapper, +}; + +export const deployment1: OperationParameter = { + parameterPath: "deployment", + mapper: PatchResourceTagsAndSkuMapper, }; export const commitmentPlanName: OperationURLParameter = { @@ -227,50 +295,206 @@ export const commitmentPlanName: OperationURLParameter = { serializedName: "commitmentPlanName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const commitmentPlan: OperationParameter = { parameterPath: "commitmentPlan", - mapper: CommitmentPlanMapper + mapper: CommitmentPlanMapper, }; export const commitmentPlanName1: OperationURLParameter = { parameterPath: "commitmentPlanName", mapper: { constraints: { - Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$") + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), }, serializedName: "commitmentPlanName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const commitmentPlan1: OperationParameter = { parameterPath: "commitmentPlan", - mapper: PatchResourceTagsAndSkuMapper + mapper: PatchResourceTagsAndSkuMapper, }; export const commitmentPlanAssociationName: OperationURLParameter = { parameterPath: "commitmentPlanAssociationName", mapper: { constraints: { - Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$") + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), }, serializedName: "commitmentPlanAssociationName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const association: OperationParameter = { parameterPath: "association", - mapper: CommitmentPlanAccountAssociationMapper + mapper: CommitmentPlanAccountAssociationMapper, +}; + +export const encryptionScopeName: OperationURLParameter = { + parameterPath: "encryptionScopeName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), + }, + serializedName: "encryptionScopeName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const encryptionScope: OperationParameter = { + parameterPath: "encryptionScope", + mapper: EncryptionScopeMapper, +}; + +export const raiPolicyName: OperationURLParameter = { + parameterPath: "raiPolicyName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), + }, + serializedName: "raiPolicyName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const raiPolicy: OperationParameter = { + parameterPath: "raiPolicy", + mapper: RaiPolicyMapper, +}; + +export const raiBlocklistName: OperationURLParameter = { + parameterPath: "raiBlocklistName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), + }, + serializedName: "raiBlocklistName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const raiBlocklist: OperationParameter = { + parameterPath: "raiBlocklist", + mapper: RaiBlocklistMapper, +}; + +export const raiBlocklistItemName: OperationURLParameter = { + parameterPath: "raiBlocklistItemName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), + }, + serializedName: "raiBlocklistItemName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const raiBlocklistItem: OperationParameter = { + parameterPath: "raiBlocklistItem", + mapper: RaiBlocklistItemMapper, +}; + +export const raiBlocklistItems: OperationParameter = { + parameterPath: "raiBlocklistItems", + mapper: { + serializedName: "raiBlocklistItems", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RaiBlocklistItemBulkRequest", + }, + }, + }, + }, +}; + +export const raiBlocklistItemsNames: OperationParameter = { + parameterPath: "raiBlocklistItemsNames", + mapper: { + serializedName: "raiBlocklistItemsNames", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, +}; + +export const filterName: OperationURLParameter = { + parameterPath: "filterName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), + }, + serializedName: "filterName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const nspConfigurationName: OperationURLParameter = { + parameterPath: "nspConfigurationName", + mapper: { + constraints: { + Pattern: new RegExp("^.*$"), + }, + serializedName: "nspConfigurationName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const defenderForAISettingName: OperationURLParameter = { + parameterPath: "defenderForAISettingName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"), + }, + serializedName: "defenderForAISettingName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const defenderForAISettings: OperationParameter = { + parameterPath: "defenderForAISettings", + mapper: DefenderForAISettingMapper, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts index 3aea87fd2ba7..2ccda665f87b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts @@ -16,7 +16,7 @@ import { CognitiveServicesManagementClient } from "../cognitiveServicesManagemen import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -49,7 +49,7 @@ import { AccountsListUsagesResponse, AccountsListByResourceGroupNextResponse, AccountsListNextResponse, - AccountsListModelsNextResponse + AccountsListModelsNextResponse, } from "../models"; /// @@ -72,7 +72,7 @@ export class AccountsImpl implements Accounts { */ public listByResourceGroup( resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams + options?: AccountsListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { @@ -89,16 +89,16 @@ export class AccountsImpl implements Accounts { return this.listByResourceGroupPagingPage( resourceGroupName, options, - settings + settings, ); - } + }, }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, options?: AccountsListByResourceGroupOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: AccountsListByResourceGroupResponse; let continuationToken = settings?.continuationToken; @@ -113,7 +113,7 @@ export class AccountsImpl implements Accounts { result = await this._listByResourceGroupNext( resourceGroupName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -124,11 +124,11 @@ export class AccountsImpl implements Accounts { private async *listByResourceGroupPagingAll( resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams + options?: AccountsListByResourceGroupOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - options + options, )) { yield* page; } @@ -139,7 +139,7 @@ export class AccountsImpl implements Accounts { * @param options The options parameters. */ public list( - options?: AccountsListOptionalParams + options?: AccountsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -154,13 +154,13 @@ export class AccountsImpl implements Accounts { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: AccountsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: AccountsListResponse; let continuationToken = settings?.continuationToken; @@ -181,7 +181,7 @@ export class AccountsImpl implements Accounts { } private async *listPagingAll( - options?: AccountsListOptionalParams + options?: AccountsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -197,12 +197,12 @@ export class AccountsImpl implements Accounts { public listModels( resourceGroupName: string, accountName: string, - options?: AccountsListModelsOptionalParams + options?: AccountsListModelsOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listModelsPagingAll( resourceGroupName, accountName, - options + options, ); return { next() { @@ -219,9 +219,9 @@ export class AccountsImpl implements Accounts { resourceGroupName, accountName, options, - settings + settings, ); - } + }, }; } @@ -229,7 +229,7 @@ export class AccountsImpl implements Accounts { resourceGroupName: string, accountName: string, options?: AccountsListModelsOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: AccountsListModelsResponse; let continuationToken = settings?.continuationToken; @@ -245,7 +245,7 @@ export class AccountsImpl implements Accounts { resourceGroupName, accountName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -257,12 +257,12 @@ export class AccountsImpl implements Accounts { private async *listModelsPagingAll( resourceGroupName: string, accountName: string, - options?: AccountsListModelsOptionalParams + options?: AccountsListModelsOptionalParams, ): AsyncIterableIterator { for await (const page of this.listModelsPagingPage( resourceGroupName, accountName, - options + options, )) { yield* page; } @@ -280,7 +280,7 @@ export class AccountsImpl implements Accounts { resourceGroupName: string, accountName: string, account: Account, - options?: AccountsCreateOptionalParams + options?: AccountsCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -289,21 +289,20 @@ export class AccountsImpl implements Accounts { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -312,8 +311,8 @@ export class AccountsImpl implements Accounts { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -321,22 +320,22 @@ export class AccountsImpl implements Accounts { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, accountName, account, options }, - spec: createOperationSpec + spec: createOperationSpec, }); const poller = await createHttpPoller< AccountsCreateResponse, OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -354,13 +353,13 @@ export class AccountsImpl implements Accounts { resourceGroupName: string, accountName: string, account: Account, - options?: AccountsCreateOptionalParams + options?: AccountsCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, accountName, account, - options + options, ); return poller.pollUntilDone(); } @@ -376,7 +375,7 @@ export class AccountsImpl implements Accounts { resourceGroupName: string, accountName: string, account: Account, - options?: AccountsUpdateOptionalParams + options?: AccountsUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -385,21 +384,20 @@ export class AccountsImpl implements Accounts { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -408,8 +406,8 @@ export class AccountsImpl implements Accounts { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -417,22 +415,22 @@ export class AccountsImpl implements Accounts { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, accountName, account, options }, - spec: updateOperationSpec + spec: updateOperationSpec, }); const poller = await createHttpPoller< AccountsUpdateResponse, OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -449,13 +447,13 @@ export class AccountsImpl implements Accounts { resourceGroupName: string, accountName: string, account: Account, - options?: AccountsUpdateOptionalParams + options?: AccountsUpdateOptionalParams, ): Promise { const poller = await this.beginUpdate( resourceGroupName, accountName, account, - options + options, ); return poller.pollUntilDone(); } @@ -469,25 +467,24 @@ export class AccountsImpl implements Accounts { async beginDelete( resourceGroupName: string, accountName: string, - options?: AccountsDeleteOptionalParams + options?: AccountsDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -496,8 +493,8 @@ export class AccountsImpl implements Accounts { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -505,19 +502,19 @@ export class AccountsImpl implements Accounts { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, accountName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -532,12 +529,12 @@ export class AccountsImpl implements Accounts { async beginDeleteAndWait( resourceGroupName: string, accountName: string, - options?: AccountsDeleteOptionalParams + options?: AccountsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, accountName, - options + options, ); return poller.pollUntilDone(); } @@ -551,11 +548,11 @@ export class AccountsImpl implements Accounts { get( resourceGroupName: string, accountName: string, - options?: AccountsGetOptionalParams + options?: AccountsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, - getOperationSpec + getOperationSpec, ); } @@ -566,11 +563,11 @@ export class AccountsImpl implements Accounts { */ private _listByResourceGroup( resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams + options?: AccountsListByResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, - listByResourceGroupOperationSpec + listByResourceGroupOperationSpec, ); } @@ -579,7 +576,7 @@ export class AccountsImpl implements Accounts { * @param options The options parameters. */ private _list( - options?: AccountsListOptionalParams + options?: AccountsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -593,11 +590,11 @@ export class AccountsImpl implements Accounts { listKeys( resourceGroupName: string, accountName: string, - options?: AccountsListKeysOptionalParams + options?: AccountsListKeysOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, - listKeysOperationSpec + listKeysOperationSpec, ); } @@ -612,11 +609,11 @@ export class AccountsImpl implements Accounts { resourceGroupName: string, accountName: string, keyName: KeyName, - options?: AccountsRegenerateKeyOptionalParams + options?: AccountsRegenerateKeyOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, keyName, options }, - regenerateKeyOperationSpec + regenerateKeyOperationSpec, ); } @@ -629,11 +626,11 @@ export class AccountsImpl implements Accounts { listSkus( resourceGroupName: string, accountName: string, - options?: AccountsListSkusOptionalParams + options?: AccountsListSkusOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, - listSkusOperationSpec + listSkusOperationSpec, ); } @@ -646,11 +643,11 @@ export class AccountsImpl implements Accounts { listUsages( resourceGroupName: string, accountName: string, - options?: AccountsListUsagesOptionalParams + options?: AccountsListUsagesOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, - listUsagesOperationSpec + listUsagesOperationSpec, ); } @@ -663,11 +660,11 @@ export class AccountsImpl implements Accounts { private _listModels( resourceGroupName: string, accountName: string, - options?: AccountsListModelsOptionalParams + options?: AccountsListModelsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, - listModelsOperationSpec + listModelsOperationSpec, ); } @@ -680,11 +677,11 @@ export class AccountsImpl implements Accounts { private _listByResourceGroupNext( resourceGroupName: string, nextLink: string, - options?: AccountsListByResourceGroupNextOptionalParams + options?: AccountsListByResourceGroupNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec + listByResourceGroupNextOperationSpec, ); } @@ -695,11 +692,11 @@ export class AccountsImpl implements Accounts { */ private _listNext( nextLink: string, - options?: AccountsListNextOptionalParams + options?: AccountsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } @@ -714,11 +711,11 @@ export class AccountsImpl implements Accounts { resourceGroupName: string, accountName: string, nextLink: string, - options?: AccountsListModelsNextOptionalParams + options?: AccountsListModelsNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, nextLink, options }, - listModelsNextOperationSpec + listModelsNextOperationSpec, ); } } @@ -726,25 +723,24 @@ export class AccountsImpl implements Accounts { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, 201: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, 202: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, 204: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.account, queryParameters: [Parameters.apiVersion], @@ -752,32 +748,31 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, 201: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, 202: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, 204: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.account, queryParameters: [Parameters.apiVersion], @@ -785,15 +780,14 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", httpMethod: "DELETE", responses: { 200: {}, @@ -801,251 +795,243 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccountListResult + bodyMapper: Mappers.AccountListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccountListResult + bodyMapper: Mappers.AccountListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listKeysOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ApiKeys + bodyMapper: Mappers.ApiKeys, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const regenerateKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ApiKeys + bodyMapper: Mappers.ApiKeys, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: { parameterPath: { keyName: ["keyName"] }, - mapper: { ...Mappers.RegenerateKeyParameters, required: true } + mapper: { ...Mappers.RegenerateKeyParameters, required: true }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const listSkusOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccountSkuListResult + bodyMapper: Mappers.AccountSkuListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listUsagesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/usages", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/usages", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.UsageListResult + bodyMapper: Mappers.UsageListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listModelsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/models", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/models", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccountModelListResult + bodyMapper: Mappers.AccountModelListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccountListResult + bodyMapper: Mappers.AccountListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccountListResult + bodyMapper: Mappers.AccountListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listModelsNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccountModelListResult + bodyMapper: Mappers.AccountModelListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentPlans.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentPlans.ts index b7af0d95fc75..c4152401f592 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentPlans.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentPlans.ts @@ -16,7 +16,7 @@ import { CognitiveServicesManagementClient } from "../cognitiveServicesManagemen import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -55,7 +55,7 @@ import { CommitmentPlansListNextResponse, CommitmentPlansListPlansByResourceGroupNextResponse, CommitmentPlansListPlansBySubscriptionNextResponse, - CommitmentPlansListAssociationsNextResponse + CommitmentPlansListAssociationsNextResponse, } from "../models"; /// @@ -80,7 +80,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { public list( resourceGroupName: string, accountName: string, - options?: CommitmentPlansListOptionalParams + options?: CommitmentPlansListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceGroupName, accountName, options); return { @@ -98,9 +98,9 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName, accountName, options, - settings + settings, ); - } + }, }; } @@ -108,7 +108,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, accountName: string, options?: CommitmentPlansListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: CommitmentPlansListResponse; let continuationToken = settings?.continuationToken; @@ -124,7 +124,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName, accountName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -136,12 +136,12 @@ export class CommitmentPlansImpl implements CommitmentPlans { private async *listPagingAll( resourceGroupName: string, accountName: string, - options?: CommitmentPlansListOptionalParams + options?: CommitmentPlansListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, accountName, - options + options, )) { yield* page; } @@ -154,11 +154,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { */ public listPlansByResourceGroup( resourceGroupName: string, - options?: CommitmentPlansListPlansByResourceGroupOptionalParams + options?: CommitmentPlansListPlansByResourceGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPlansByResourceGroupPagingAll( resourceGroupName, - options + options, ); return { next() { @@ -174,16 +174,16 @@ export class CommitmentPlansImpl implements CommitmentPlans { return this.listPlansByResourceGroupPagingPage( resourceGroupName, options, - settings + settings, ); - } + }, }; } private async *listPlansByResourceGroupPagingPage( resourceGroupName: string, options?: CommitmentPlansListPlansByResourceGroupOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: CommitmentPlansListPlansByResourceGroupResponse; let continuationToken = settings?.continuationToken; @@ -198,7 +198,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { result = await this._listPlansByResourceGroupNext( resourceGroupName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -209,11 +209,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { private async *listPlansByResourceGroupPagingAll( resourceGroupName: string, - options?: CommitmentPlansListPlansByResourceGroupOptionalParams + options?: CommitmentPlansListPlansByResourceGroupOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPlansByResourceGroupPagingPage( resourceGroupName, - options + options, )) { yield* page; } @@ -224,7 +224,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { * @param options The options parameters. */ public listPlansBySubscription( - options?: CommitmentPlansListPlansBySubscriptionOptionalParams + options?: CommitmentPlansListPlansBySubscriptionOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPlansBySubscriptionPagingAll(options); return { @@ -239,13 +239,13 @@ export class CommitmentPlansImpl implements CommitmentPlans { throw new Error("maxPageSize is not supported by this operation."); } return this.listPlansBySubscriptionPagingPage(options, settings); - } + }, }; } private async *listPlansBySubscriptionPagingPage( options?: CommitmentPlansListPlansBySubscriptionOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: CommitmentPlansListPlansBySubscriptionResponse; let continuationToken = settings?.continuationToken; @@ -259,7 +259,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { while (continuationToken) { result = await this._listPlansBySubscriptionNext( continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -269,7 +269,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { } private async *listPlansBySubscriptionPagingAll( - options?: CommitmentPlansListPlansBySubscriptionOptionalParams + options?: CommitmentPlansListPlansBySubscriptionOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPlansBySubscriptionPagingPage(options)) { yield* page; @@ -286,12 +286,12 @@ export class CommitmentPlansImpl implements CommitmentPlans { public listAssociations( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansListAssociationsOptionalParams + options?: CommitmentPlansListAssociationsOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listAssociationsPagingAll( resourceGroupName, commitmentPlanName, - options + options, ); return { next() { @@ -308,9 +308,9 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName, commitmentPlanName, options, - settings + settings, ); - } + }, }; } @@ -318,7 +318,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, options?: CommitmentPlansListAssociationsOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: CommitmentPlansListAssociationsResponse; let continuationToken = settings?.continuationToken; @@ -326,7 +326,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { result = await this._listAssociations( resourceGroupName, commitmentPlanName, - options + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -338,7 +338,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName, commitmentPlanName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -350,12 +350,12 @@ export class CommitmentPlansImpl implements CommitmentPlans { private async *listAssociationsPagingAll( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansListAssociationsOptionalParams + options?: CommitmentPlansListAssociationsOptionalParams, ): AsyncIterableIterator { for await (const page of this.listAssociationsPagingPage( resourceGroupName, commitmentPlanName, - options + options, )) { yield* page; } @@ -370,11 +370,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { private _list( resourceGroupName: string, accountName: string, - options?: CommitmentPlansListOptionalParams + options?: CommitmentPlansListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, - listOperationSpec + listOperationSpec, ); } @@ -390,11 +390,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, accountName: string, commitmentPlanName: string, - options?: CommitmentPlansGetOptionalParams + options?: CommitmentPlansGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, commitmentPlanName, options }, - getOperationSpec + getOperationSpec, ); } @@ -412,7 +412,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { accountName: string, commitmentPlanName: string, commitmentPlan: CommitmentPlan, - options?: CommitmentPlansCreateOrUpdateOptionalParams + options?: CommitmentPlansCreateOrUpdateOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -420,9 +420,9 @@ export class CommitmentPlansImpl implements CommitmentPlans { accountName, commitmentPlanName, commitmentPlan, - options + options, }, - createOrUpdateOperationSpec + createOrUpdateOperationSpec, ); } @@ -438,25 +438,24 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, accountName: string, commitmentPlanName: string, - options?: CommitmentPlansDeleteOptionalParams + options?: CommitmentPlansDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -465,8 +464,8 @@ export class CommitmentPlansImpl implements CommitmentPlans { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -474,19 +473,19 @@ export class CommitmentPlansImpl implements CommitmentPlans { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, accountName, commitmentPlanName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -504,13 +503,13 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, accountName: string, commitmentPlanName: string, - options?: CommitmentPlansDeleteOptionalParams + options?: CommitmentPlansDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, accountName, commitmentPlanName, - options + options, ); return poller.pollUntilDone(); } @@ -527,7 +526,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlan: CommitmentPlan, - options?: CommitmentPlansCreateOrUpdatePlanOptionalParams + options?: CommitmentPlansCreateOrUpdatePlanOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -536,21 +535,20 @@ export class CommitmentPlansImpl implements CommitmentPlans { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -559,8 +557,8 @@ export class CommitmentPlansImpl implements CommitmentPlans { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -568,15 +566,15 @@ export class CommitmentPlansImpl implements CommitmentPlans { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, commitmentPlanName, commitmentPlan, options }, - spec: createOrUpdatePlanOperationSpec + spec: createOrUpdatePlanOperationSpec, }); const poller = await createHttpPoller< CommitmentPlansCreateOrUpdatePlanResponse, @@ -584,7 +582,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -602,13 +600,13 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlan: CommitmentPlan, - options?: CommitmentPlansCreateOrUpdatePlanOptionalParams + options?: CommitmentPlansCreateOrUpdatePlanOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdatePlan( resourceGroupName, commitmentPlanName, commitmentPlan, - options + options, ); return poller.pollUntilDone(); } @@ -625,7 +623,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlan: PatchResourceTagsAndSku, - options?: CommitmentPlansUpdatePlanOptionalParams + options?: CommitmentPlansUpdatePlanOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -634,21 +632,20 @@ export class CommitmentPlansImpl implements CommitmentPlans { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -657,8 +654,8 @@ export class CommitmentPlansImpl implements CommitmentPlans { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -666,15 +663,15 @@ export class CommitmentPlansImpl implements CommitmentPlans { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, commitmentPlanName, commitmentPlan, options }, - spec: updatePlanOperationSpec + spec: updatePlanOperationSpec, }); const poller = await createHttpPoller< CommitmentPlansUpdatePlanResponse, @@ -682,7 +679,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -700,13 +697,13 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlan: PatchResourceTagsAndSku, - options?: CommitmentPlansUpdatePlanOptionalParams + options?: CommitmentPlansUpdatePlanOptionalParams, ): Promise { const poller = await this.beginUpdatePlan( resourceGroupName, commitmentPlanName, commitmentPlan, - options + options, ); return poller.pollUntilDone(); } @@ -721,25 +718,24 @@ export class CommitmentPlansImpl implements CommitmentPlans { async beginDeletePlan( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansDeletePlanOptionalParams + options?: CommitmentPlansDeletePlanOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -748,8 +744,8 @@ export class CommitmentPlansImpl implements CommitmentPlans { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -757,20 +753,20 @@ export class CommitmentPlansImpl implements CommitmentPlans { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, commitmentPlanName, options }, - spec: deletePlanOperationSpec + spec: deletePlanOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -786,12 +782,12 @@ export class CommitmentPlansImpl implements CommitmentPlans { async beginDeletePlanAndWait( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansDeletePlanOptionalParams + options?: CommitmentPlansDeletePlanOptionalParams, ): Promise { const poller = await this.beginDeletePlan( resourceGroupName, commitmentPlanName, - options + options, ); return poller.pollUntilDone(); } @@ -806,11 +802,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { getPlan( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansGetPlanOptionalParams + options?: CommitmentPlansGetPlanOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, commitmentPlanName, options }, - getPlanOperationSpec + getPlanOperationSpec, ); } @@ -821,11 +817,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { */ private _listPlansByResourceGroup( resourceGroupName: string, - options?: CommitmentPlansListPlansByResourceGroupOptionalParams + options?: CommitmentPlansListPlansByResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, - listPlansByResourceGroupOperationSpec + listPlansByResourceGroupOperationSpec, ); } @@ -834,11 +830,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { * @param options The options parameters. */ private _listPlansBySubscription( - options?: CommitmentPlansListPlansBySubscriptionOptionalParams + options?: CommitmentPlansListPlansBySubscriptionOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - listPlansBySubscriptionOperationSpec + listPlansBySubscriptionOperationSpec, ); } @@ -852,11 +848,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { private _listAssociations( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansListAssociationsOptionalParams + options?: CommitmentPlansListAssociationsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, commitmentPlanName, options }, - listAssociationsOperationSpec + listAssociationsOperationSpec, ); } @@ -873,16 +869,16 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlanAssociationName: string, - options?: CommitmentPlansGetAssociationOptionalParams + options?: CommitmentPlansGetAssociationOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, - options + options, }, - getAssociationOperationSpec + getAssociationOperationSpec, ); } @@ -901,7 +897,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { commitmentPlanName: string, commitmentPlanAssociationName: string, association: CommitmentPlanAccountAssociation, - options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams + options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -910,21 +906,20 @@ export class CommitmentPlansImpl implements CommitmentPlans { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -933,8 +928,8 @@ export class CommitmentPlansImpl implements CommitmentPlans { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -942,8 +937,8 @@ export class CommitmentPlansImpl implements CommitmentPlans { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -954,9 +949,9 @@ export class CommitmentPlansImpl implements CommitmentPlans { commitmentPlanName, commitmentPlanAssociationName, association, - options + options, }, - spec: createOrUpdateAssociationOperationSpec + spec: createOrUpdateAssociationOperationSpec, }); const poller = await createHttpPoller< CommitmentPlansCreateOrUpdateAssociationResponse, @@ -964,7 +959,7 @@ export class CommitmentPlansImpl implements CommitmentPlans { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -985,14 +980,14 @@ export class CommitmentPlansImpl implements CommitmentPlans { commitmentPlanName: string, commitmentPlanAssociationName: string, association: CommitmentPlanAccountAssociation, - options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams + options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdateAssociation( resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, association, - options + options, ); return poller.pollUntilDone(); } @@ -1010,25 +1005,24 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlanAssociationName: string, - options?: CommitmentPlansDeleteAssociationOptionalParams + options?: CommitmentPlansDeleteAssociationOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -1037,8 +1031,8 @@ export class CommitmentPlansImpl implements CommitmentPlans { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -1046,8 +1040,8 @@ export class CommitmentPlansImpl implements CommitmentPlans { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -1057,14 +1051,14 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, - options + options, }, - spec: deleteAssociationOperationSpec + spec: deleteAssociationOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -1083,13 +1077,13 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlanAssociationName: string, - options?: CommitmentPlansDeleteAssociationOptionalParams + options?: CommitmentPlansDeleteAssociationOptionalParams, ): Promise { const poller = await this.beginDeleteAssociation( resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, - options + options, ); return poller.pollUntilDone(); } @@ -1105,11 +1099,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, accountName: string, nextLink: string, - options?: CommitmentPlansListNextOptionalParams + options?: CommitmentPlansListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } @@ -1123,11 +1117,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { private _listPlansByResourceGroupNext( resourceGroupName: string, nextLink: string, - options?: CommitmentPlansListPlansByResourceGroupNextOptionalParams + options?: CommitmentPlansListPlansByResourceGroupNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, nextLink, options }, - listPlansByResourceGroupNextOperationSpec + listPlansByResourceGroupNextOperationSpec, ); } @@ -1139,11 +1133,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { */ private _listPlansBySubscriptionNext( nextLink: string, - options?: CommitmentPlansListPlansBySubscriptionNextOptionalParams + options?: CommitmentPlansListPlansBySubscriptionNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listPlansBySubscriptionNextOperationSpec + listPlansBySubscriptionNextOperationSpec, ); } @@ -1159,11 +1153,11 @@ export class CommitmentPlansImpl implements CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, nextLink: string, - options?: CommitmentPlansListAssociationsNextOptionalParams + options?: CommitmentPlansListAssociationsNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, commitmentPlanName, nextLink, options }, - listAssociationsNextOperationSpec + listAssociationsNextOperationSpec, ); } } @@ -1171,38 +1165,36 @@ export class CommitmentPlansImpl implements CommitmentPlans { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanListResult + bodyMapper: Mappers.CommitmentPlanListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -1210,25 +1202,24 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.commitmentPlanName + Parameters.commitmentPlanName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, 201: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.commitmentPlan, queryParameters: [Parameters.apiVersion], @@ -1237,15 +1228,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.commitmentPlanName + Parameters.commitmentPlanName, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}", httpMethod: "DELETE", responses: { 200: {}, @@ -1253,8 +1243,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -1262,31 +1252,30 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.commitmentPlanName + Parameters.commitmentPlanName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdatePlanOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, 201: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, 202: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, 204: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.commitmentPlan, queryParameters: [Parameters.apiVersion], @@ -1294,32 +1283,31 @@ const createOrUpdatePlanOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.commitmentPlanName1 + Parameters.commitmentPlanName1, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const updatePlanOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, 201: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, 202: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, 204: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.commitmentPlan1, queryParameters: [Parameters.apiVersion], @@ -1327,15 +1315,14 @@ const updatePlanOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.commitmentPlanName1 + Parameters.commitmentPlanName1, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const deletePlanOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}", httpMethod: "DELETE", responses: { 200: {}, @@ -1343,112 +1330,107 @@ const deletePlanOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.commitmentPlanName1 + Parameters.commitmentPlanName1, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getPlanOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlan + bodyMapper: Mappers.CommitmentPlan, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.commitmentPlanName1 + Parameters.commitmentPlanName1, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listPlansByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanListResult + bodyMapper: Mappers.CommitmentPlanListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listPlansBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/commitmentPlans", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/commitmentPlans", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanListResult + bodyMapper: Mappers.CommitmentPlanListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listAssociationsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanAccountAssociationListResult + bodyMapper: Mappers.CommitmentPlanAccountAssociationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.commitmentPlanName1 + Parameters.commitmentPlanName1, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getAssociationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanAccountAssociation + bodyMapper: Mappers.CommitmentPlanAccountAssociation, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -1456,31 +1438,30 @@ const getAssociationOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.commitmentPlanName1, - Parameters.commitmentPlanAssociationName + Parameters.commitmentPlanAssociationName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateAssociationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanAccountAssociation + bodyMapper: Mappers.CommitmentPlanAccountAssociation, }, 201: { - bodyMapper: Mappers.CommitmentPlanAccountAssociation + bodyMapper: Mappers.CommitmentPlanAccountAssociation, }, 202: { - bodyMapper: Mappers.CommitmentPlanAccountAssociation + bodyMapper: Mappers.CommitmentPlanAccountAssociation, }, 204: { - bodyMapper: Mappers.CommitmentPlanAccountAssociation + bodyMapper: Mappers.CommitmentPlanAccountAssociation, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.association, queryParameters: [Parameters.apiVersion], @@ -1489,15 +1470,14 @@ const createOrUpdateAssociationOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.commitmentPlanName1, - Parameters.commitmentPlanAssociationName + Parameters.commitmentPlanAssociationName, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const deleteAssociationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}", httpMethod: "DELETE", responses: { 200: {}, @@ -1505,8 +1485,8 @@ const deleteAssociationOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -1514,89 +1494,89 @@ const deleteAssociationOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.commitmentPlanName1, - Parameters.commitmentPlanAssociationName + Parameters.commitmentPlanAssociationName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanListResult + bodyMapper: Mappers.CommitmentPlanListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listPlansByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanListResult + bodyMapper: Mappers.CommitmentPlanListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listPlansBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanListResult + bodyMapper: Mappers.CommitmentPlanListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listAssociationsNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentPlanAccountAssociationListResult + bodyMapper: Mappers.CommitmentPlanAccountAssociationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.nextLink, - Parameters.commitmentPlanName1 + Parameters.commitmentPlanName1, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentTiers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentTiers.ts index 022362d89bc4..c160c1af803d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentTiers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentTiers.ts @@ -18,7 +18,7 @@ import { CommitmentTiersListNextOptionalParams, CommitmentTiersListOptionalParams, CommitmentTiersListResponse, - CommitmentTiersListNextResponse + CommitmentTiersListNextResponse, } from "../models"; /// @@ -41,7 +41,7 @@ export class CommitmentTiersImpl implements CommitmentTiers { */ public list( location: string, - options?: CommitmentTiersListOptionalParams + options?: CommitmentTiersListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(location, options); return { @@ -56,14 +56,14 @@ export class CommitmentTiersImpl implements CommitmentTiers { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(location, options, settings); - } + }, }; } private async *listPagingPage( location: string, options?: CommitmentTiersListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: CommitmentTiersListResponse; let continuationToken = settings?.continuationToken; @@ -85,7 +85,7 @@ export class CommitmentTiersImpl implements CommitmentTiers { private async *listPagingAll( location: string, - options?: CommitmentTiersListOptionalParams + options?: CommitmentTiersListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(location, options)) { yield* page; @@ -99,11 +99,11 @@ export class CommitmentTiersImpl implements CommitmentTiers { */ private _list( location: string, - options?: CommitmentTiersListOptionalParams + options?: CommitmentTiersListOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, options }, - listOperationSpec + listOperationSpec, ); } @@ -116,11 +116,11 @@ export class CommitmentTiersImpl implements CommitmentTiers { private _listNext( location: string, nextLink: string, - options?: CommitmentTiersListNextOptionalParams + options?: CommitmentTiersListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -128,43 +128,42 @@ export class CommitmentTiersImpl implements CommitmentTiers { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/commitmentTiers", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/commitmentTiers", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentTierListResult + bodyMapper: Mappers.CommitmentTierListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CommitmentTierListResult + bodyMapper: Mappers.CommitmentTierListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.nextLink, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/defenderForAISettings.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/defenderForAISettings.ts new file mode 100644 index 000000000000..fd228c3e325d --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/defenderForAISettings.ts @@ -0,0 +1,345 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DefenderForAISettings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import { + DefenderForAISetting, + DefenderForAISettingsListNextOptionalParams, + DefenderForAISettingsListOptionalParams, + DefenderForAISettingsListResponse, + DefenderForAISettingsGetOptionalParams, + DefenderForAISettingsGetResponse, + DefenderForAISettingsCreateOrUpdateOptionalParams, + DefenderForAISettingsCreateOrUpdateResponse, + DefenderForAISettingsUpdateOptionalParams, + DefenderForAISettingsUpdateResponse, + DefenderForAISettingsListNextResponse, +} from "../models"; + +/// +/** Class containing DefenderForAISettings operations. */ +export class DefenderForAISettingsImpl implements DefenderForAISettings { + private readonly client: CognitiveServicesManagementClient; + + /** + * Initialize a new instance of the class DefenderForAISettings class. + * @param client Reference to the service client + */ + constructor(client: CognitiveServicesManagementClient) { + this.client = client; + } + + /** + * Lists the Defender for AI settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: DefenderForAISettingsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: DefenderForAISettingsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DefenderForAISettingsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, accountName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: DefenderForAISettingsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Lists the Defender for AI settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: DefenderForAISettingsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec, + ); + } + + /** + * Gets the specified Defender for AI setting by name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param defenderForAISettingName The name of the defender for AI setting. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + defenderForAISettingName: string, + options?: DefenderForAISettingsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, defenderForAISettingName, options }, + getOperationSpec, + ); + } + + /** + * Creates or Updates the specified Defender for AI setting. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param defenderForAISettingName The name of the defender for AI setting. + * @param defenderForAISettings Properties describing the Defender for AI setting. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + defenderForAISettingName: string, + defenderForAISettings: DefenderForAISetting, + options?: DefenderForAISettingsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + defenderForAISettingName, + defenderForAISettings, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Updates the specified Defender for AI setting. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param defenderForAISettingName The name of the defender for AI setting. + * @param defenderForAISettings Properties describing the Defender for AI setting. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + accountName: string, + defenderForAISettingName: string, + defenderForAISettings: DefenderForAISetting, + options?: DefenderForAISettingsUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + defenderForAISettingName, + defenderForAISettings, + options, + }, + updateOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: DefenderForAISettingsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/defenderForAISettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DefenderForAISettingResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/defenderForAISettings/{defenderForAISettingName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DefenderForAISetting, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.defenderForAISettingName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/defenderForAISettings/{defenderForAISettingName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DefenderForAISetting, + }, + 201: { + bodyMapper: Mappers.DefenderForAISetting, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.defenderForAISettings, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.defenderForAISettingName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/defenderForAISettings/{defenderForAISettingName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DefenderForAISetting, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.defenderForAISettings, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.defenderForAISettingName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DefenderForAISettingResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deletedAccounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deletedAccounts.ts index 2860c81ddbc0..99baec5a3943 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deletedAccounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deletedAccounts.ts @@ -16,7 +16,7 @@ import { CognitiveServicesManagementClient } from "../cognitiveServicesManagemen import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -27,7 +27,7 @@ import { DeletedAccountsGetOptionalParams, DeletedAccountsGetResponse, DeletedAccountsPurgeOptionalParams, - DeletedAccountsListNextResponse + DeletedAccountsListNextResponse, } from "../models"; /// @@ -48,7 +48,7 @@ export class DeletedAccountsImpl implements DeletedAccounts { * @param options The options parameters. */ public list( - options?: DeletedAccountsListOptionalParams + options?: DeletedAccountsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -63,13 +63,13 @@ export class DeletedAccountsImpl implements DeletedAccounts { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: DeletedAccountsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: DeletedAccountsListResponse; let continuationToken = settings?.continuationToken; @@ -90,7 +90,7 @@ export class DeletedAccountsImpl implements DeletedAccounts { } private async *listPagingAll( - options?: DeletedAccountsListOptionalParams + options?: DeletedAccountsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -108,11 +108,11 @@ export class DeletedAccountsImpl implements DeletedAccounts { location: string, resourceGroupName: string, accountName: string, - options?: DeletedAccountsGetOptionalParams + options?: DeletedAccountsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, resourceGroupName, accountName, options }, - getOperationSpec + getOperationSpec, ); } @@ -127,25 +127,24 @@ export class DeletedAccountsImpl implements DeletedAccounts { location: string, resourceGroupName: string, accountName: string, - options?: DeletedAccountsPurgeOptionalParams + options?: DeletedAccountsPurgeOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -154,8 +153,8 @@ export class DeletedAccountsImpl implements DeletedAccounts { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -163,19 +162,19 @@ export class DeletedAccountsImpl implements DeletedAccounts { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { location, resourceGroupName, accountName, options }, - spec: purgeOperationSpec + spec: purgeOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -192,13 +191,13 @@ export class DeletedAccountsImpl implements DeletedAccounts { location: string, resourceGroupName: string, accountName: string, - options?: DeletedAccountsPurgeOptionalParams + options?: DeletedAccountsPurgeOptionalParams, ): Promise { const poller = await this.beginPurge( location, resourceGroupName, accountName, - options + options, ); return poller.pollUntilDone(); } @@ -208,7 +207,7 @@ export class DeletedAccountsImpl implements DeletedAccounts { * @param options The options parameters. */ private _list( - options?: DeletedAccountsListOptionalParams + options?: DeletedAccountsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -220,11 +219,11 @@ export class DeletedAccountsImpl implements DeletedAccounts { */ private _listNext( nextLink: string, - options?: DeletedAccountsListNextOptionalParams + options?: DeletedAccountsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -232,16 +231,15 @@ export class DeletedAccountsImpl implements DeletedAccounts { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.Account, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -249,14 +247,13 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const purgeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}", httpMethod: "DELETE", responses: { 200: {}, @@ -264,8 +261,8 @@ const purgeOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -273,44 +270,43 @@ const purgeOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/deletedAccounts", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/deletedAccounts", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccountListResult + bodyMapper: Mappers.AccountListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccountListResult + bodyMapper: Mappers.AccountListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deployments.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deployments.ts index a825c082e106..f92e27b14e75 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deployments.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deployments.ts @@ -16,7 +16,7 @@ import { CognitiveServicesManagementClient } from "../cognitiveServicesManagemen import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -24,12 +24,20 @@ import { DeploymentsListNextOptionalParams, DeploymentsListOptionalParams, DeploymentsListResponse, + SkuResource, + DeploymentsListSkusNextOptionalParams, + DeploymentsListSkusOptionalParams, + DeploymentsListSkusResponse, DeploymentsGetOptionalParams, DeploymentsGetResponse, DeploymentsCreateOrUpdateOptionalParams, DeploymentsCreateOrUpdateResponse, + PatchResourceTagsAndSku, + DeploymentsUpdateOptionalParams, + DeploymentsUpdateResponse, DeploymentsDeleteOptionalParams, - DeploymentsListNextResponse + DeploymentsListNextResponse, + DeploymentsListSkusNextResponse, } from "../models"; /// @@ -54,7 +62,7 @@ export class DeploymentsImpl implements Deployments { public list( resourceGroupName: string, accountName: string, - options?: DeploymentsListOptionalParams + options?: DeploymentsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceGroupName, accountName, options); return { @@ -72,9 +80,9 @@ export class DeploymentsImpl implements Deployments { resourceGroupName, accountName, options, - settings + settings, ); - } + }, }; } @@ -82,7 +90,7 @@ export class DeploymentsImpl implements Deployments { resourceGroupName: string, accountName: string, options?: DeploymentsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: DeploymentsListResponse; let continuationToken = settings?.continuationToken; @@ -98,7 +106,7 @@ export class DeploymentsImpl implements Deployments { resourceGroupName, accountName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -110,12 +118,105 @@ export class DeploymentsImpl implements Deployments { private async *listPagingAll( resourceGroupName: string, accountName: string, - options?: DeploymentsListOptionalParams + options?: DeploymentsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, accountName, - options + options, + )) { + yield* page; + } + } + + /** + * Lists the specified deployments skus associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param deploymentName The name of the deployment associated with the Cognitive Services Account + * @param options The options parameters. + */ + public listSkus( + resourceGroupName: string, + accountName: string, + deploymentName: string, + options?: DeploymentsListSkusOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listSkusPagingAll( + resourceGroupName, + accountName, + deploymentName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listSkusPagingPage( + resourceGroupName, + accountName, + deploymentName, + options, + settings, + ); + }, + }; + } + + private async *listSkusPagingPage( + resourceGroupName: string, + accountName: string, + deploymentName: string, + options?: DeploymentsListSkusOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DeploymentsListSkusResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listSkus( + resourceGroupName, + accountName, + deploymentName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listSkusNext( + resourceGroupName, + accountName, + deploymentName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listSkusPagingAll( + resourceGroupName: string, + accountName: string, + deploymentName: string, + options?: DeploymentsListSkusOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listSkusPagingPage( + resourceGroupName, + accountName, + deploymentName, + options, )) { yield* page; } @@ -130,11 +231,11 @@ export class DeploymentsImpl implements Deployments { private _list( resourceGroupName: string, accountName: string, - options?: DeploymentsListOptionalParams + options?: DeploymentsListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, - listOperationSpec + listOperationSpec, ); } @@ -149,11 +250,11 @@ export class DeploymentsImpl implements Deployments { resourceGroupName: string, accountName: string, deploymentName: string, - options?: DeploymentsGetOptionalParams + options?: DeploymentsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, deploymentName, options }, - getOperationSpec + getOperationSpec, ); } @@ -170,7 +271,7 @@ export class DeploymentsImpl implements Deployments { accountName: string, deploymentName: string, deployment: Deployment, - options?: DeploymentsCreateOrUpdateOptionalParams + options?: DeploymentsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -179,21 +280,20 @@ export class DeploymentsImpl implements Deployments { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -202,8 +302,8 @@ export class DeploymentsImpl implements Deployments { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -211,8 +311,8 @@ export class DeploymentsImpl implements Deployments { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -223,9 +323,9 @@ export class DeploymentsImpl implements Deployments { accountName, deploymentName, deployment, - options + options, }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< DeploymentsCreateOrUpdateResponse, @@ -233,7 +333,7 @@ export class DeploymentsImpl implements Deployments { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -252,14 +352,120 @@ export class DeploymentsImpl implements Deployments { accountName: string, deploymentName: string, deployment: Deployment, - options?: DeploymentsCreateOrUpdateOptionalParams + options?: DeploymentsCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, accountName, deploymentName, deployment, - options + options, + ); + return poller.pollUntilDone(); + } + + /** + * Update specified deployments associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param deploymentName The name of the deployment associated with the Cognitive Services Account + * @param deployment The deployment properties. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + accountName: string, + deploymentName: string, + deployment: PatchResourceTagsAndSku, + options?: DeploymentsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + DeploymentsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + deploymentName, + deployment, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + DeploymentsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Update specified deployments associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param deploymentName The name of the deployment associated with the Cognitive Services Account + * @param deployment The deployment properties. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + deploymentName: string, + deployment: PatchResourceTagsAndSku, + options?: DeploymentsUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + deploymentName, + deployment, + options, ); return poller.pollUntilDone(); } @@ -275,25 +481,24 @@ export class DeploymentsImpl implements Deployments { resourceGroupName: string, accountName: string, deploymentName: string, - options?: DeploymentsDeleteOptionalParams + options?: DeploymentsDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -302,8 +507,8 @@ export class DeploymentsImpl implements Deployments { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -311,19 +516,19 @@ export class DeploymentsImpl implements Deployments { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, accountName, deploymentName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -340,17 +545,36 @@ export class DeploymentsImpl implements Deployments { resourceGroupName: string, accountName: string, deploymentName: string, - options?: DeploymentsDeleteOptionalParams + options?: DeploymentsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, accountName, deploymentName, - options + options, ); return poller.pollUntilDone(); } + /** + * Lists the specified deployments skus associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param deploymentName The name of the deployment associated with the Cognitive Services Account + * @param options The options parameters. + */ + private _listSkus( + resourceGroupName: string, + accountName: string, + deploymentName: string, + options?: DeploymentsListSkusOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, deploymentName, options }, + listSkusOperationSpec, + ); + } + /** * ListNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -362,11 +586,32 @@ export class DeploymentsImpl implements Deployments { resourceGroupName: string, accountName: string, nextLink: string, - options?: DeploymentsListNextOptionalParams + options?: DeploymentsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, + ); + } + + /** + * ListSkusNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param deploymentName The name of the deployment associated with the Cognitive Services Account + * @param nextLink The nextLink from the previous successful call to the ListSkus method. + * @param options The options parameters. + */ + private _listSkusNext( + resourceGroupName: string, + accountName: string, + deploymentName: string, + nextLink: string, + options?: DeploymentsListSkusNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, deploymentName, nextLink, options }, + listSkusNextOperationSpec, ); } } @@ -374,38 +619,36 @@ export class DeploymentsImpl implements Deployments { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DeploymentListResult + bodyMapper: Mappers.DeploymentListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Deployment + bodyMapper: Mappers.Deployment, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -413,31 +656,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.deploymentName + Parameters.deploymentName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.Deployment + bodyMapper: Mappers.Deployment, }, 201: { - bodyMapper: Mappers.Deployment + bodyMapper: Mappers.Deployment, }, 202: { - bodyMapper: Mappers.Deployment + bodyMapper: Mappers.Deployment, }, 204: { - bodyMapper: Mappers.Deployment + bodyMapper: Mappers.Deployment, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.deployment, queryParameters: [Parameters.apiVersion], @@ -446,15 +688,47 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.deploymentName + Parameters.deploymentName, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Deployment, + }, + 201: { + bodyMapper: Mappers.Deployment, + }, + 202: { + bodyMapper: Mappers.Deployment, + }, + 204: { + bodyMapper: Mappers.Deployment, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.deployment1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.deploymentName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}", httpMethod: "DELETE", responses: { 200: {}, @@ -462,8 +736,30 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.deploymentName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listSkusOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeploymentSkuListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -471,29 +767,51 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.deploymentName + Parameters.deploymentName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DeploymentListResult + bodyMapper: Mappers.DeploymentListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listSkusNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeploymentSkuListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, + Parameters.deploymentName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/encryptionScopes.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/encryptionScopes.ts new file mode 100644 index 000000000000..88aa5d1dcc94 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/encryptionScopes.ts @@ -0,0 +1,429 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { EncryptionScopes } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + EncryptionScope, + EncryptionScopesListNextOptionalParams, + EncryptionScopesListOptionalParams, + EncryptionScopesListResponse, + EncryptionScopesGetOptionalParams, + EncryptionScopesGetResponse, + EncryptionScopesCreateOrUpdateOptionalParams, + EncryptionScopesCreateOrUpdateResponse, + EncryptionScopesDeleteOptionalParams, + EncryptionScopesDeleteResponse, + EncryptionScopesListNextResponse, +} from "../models"; + +/// +/** Class containing EncryptionScopes operations. */ +export class EncryptionScopesImpl implements EncryptionScopes { + private readonly client: CognitiveServicesManagementClient; + + /** + * Initialize a new instance of the class EncryptionScopes class. + * @param client Reference to the service client + */ + constructor(client: CognitiveServicesManagementClient) { + this.client = client; + } + + /** + * Gets the content filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: EncryptionScopesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: EncryptionScopesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: EncryptionScopesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, accountName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: EncryptionScopesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Gets the content filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: EncryptionScopesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec, + ); + } + + /** + * Gets the specified EncryptionScope associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param encryptionScopeName The name of the encryptionScope associated with the Cognitive Services + * Account + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + encryptionScopeName: string, + options?: EncryptionScopesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, encryptionScopeName, options }, + getOperationSpec, + ); + } + + /** + * Update the state of specified encryptionScope associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param encryptionScopeName The name of the encryptionScope associated with the Cognitive Services + * Account + * @param encryptionScope The encryptionScope properties. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + encryptionScopeName: string, + encryptionScope: EncryptionScope, + options?: EncryptionScopesCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + encryptionScopeName, + encryptionScope, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Deletes the specified encryptionScope associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param encryptionScopeName The name of the encryptionScope associated with the Cognitive Services + * Account + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + encryptionScopeName: string, + options?: EncryptionScopesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + EncryptionScopesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, encryptionScopeName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + EncryptionScopesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified encryptionScope associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param encryptionScopeName The name of the encryptionScope associated with the Cognitive Services + * Account + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + encryptionScopeName: string, + options?: EncryptionScopesDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + encryptionScopeName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: EncryptionScopesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/encryptionScopes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EncryptionScopeListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/encryptionScopes/{encryptionScopeName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EncryptionScope, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.encryptionScopeName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/encryptionScopes/{encryptionScopeName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.EncryptionScope, + }, + 201: { + bodyMapper: Mappers.EncryptionScope, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.encryptionScope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.encryptionScopeName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/encryptionScopes/{encryptionScopeName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.EncryptionScopesDeleteHeaders, + }, + 201: { + headersMapper: Mappers.EncryptionScopesDeleteHeaders, + }, + 202: { + headersMapper: Mappers.EncryptionScopesDeleteHeaders, + }, + 204: { + headersMapper: Mappers.EncryptionScopesDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.encryptionScopeName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EncryptionScopeListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts index c3aa6d8c5dcd..17996d460adc 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts @@ -13,7 +13,16 @@ export * from "./usages"; export * from "./operations"; export * from "./commitmentTiers"; export * from "./models"; +export * from "./locationBasedModelCapacities"; +export * from "./modelCapacities"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./deployments"; export * from "./commitmentPlans"; +export * from "./encryptionScopes"; +export * from "./raiPolicies"; +export * from "./raiBlocklists"; +export * from "./raiBlocklistItems"; +export * from "./raiContentFilters"; +export * from "./networkSecurityPerimeterConfigurations"; +export * from "./defenderForAISettings"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/locationBasedModelCapacities.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/locationBasedModelCapacities.ts new file mode 100644 index 000000000000..9479cc3431bb --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/locationBasedModelCapacities.ts @@ -0,0 +1,219 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { LocationBasedModelCapacities } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import { + ModelCapacityListResultValueItem, + LocationBasedModelCapacitiesListNextOptionalParams, + LocationBasedModelCapacitiesListOptionalParams, + LocationBasedModelCapacitiesListResponse, + LocationBasedModelCapacitiesListNextResponse, +} from "../models"; + +/// +/** Class containing LocationBasedModelCapacities operations. */ +export class LocationBasedModelCapacitiesImpl + implements LocationBasedModelCapacities +{ + private readonly client: CognitiveServicesManagementClient; + + /** + * Initialize a new instance of the class LocationBasedModelCapacities class. + * @param client Reference to the service client + */ + constructor(client: CognitiveServicesManagementClient) { + this.client = client; + } + + /** + * List Location Based ModelCapacities. + * @param location Resource location. + * @param modelFormat The format of the Model + * @param modelName The name of the Model + * @param modelVersion The version of the Model + * @param options The options parameters. + */ + public list( + location: string, + modelFormat: string, + modelName: string, + modelVersion: string, + options?: LocationBasedModelCapacitiesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + location, + modelFormat, + modelName, + modelVersion, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + location, + modelFormat, + modelName, + modelVersion, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + location: string, + modelFormat: string, + modelName: string, + modelVersion: string, + options?: LocationBasedModelCapacitiesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: LocationBasedModelCapacitiesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + location, + modelFormat, + modelName, + modelVersion, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + location: string, + modelFormat: string, + modelName: string, + modelVersion: string, + options?: LocationBasedModelCapacitiesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + modelFormat, + modelName, + modelVersion, + options, + )) { + yield* page; + } + } + + /** + * List Location Based ModelCapacities. + * @param location Resource location. + * @param modelFormat The format of the Model + * @param modelName The name of the Model + * @param modelVersion The version of the Model + * @param options The options parameters. + */ + private _list( + location: string, + modelFormat: string, + modelName: string, + modelVersion: string, + options?: LocationBasedModelCapacitiesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, modelFormat, modelName, modelVersion, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param location Resource location. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + location: string, + nextLink: string, + options?: LocationBasedModelCapacitiesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/modelCapacities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ModelCapacityListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.modelFormat, + Parameters.modelName, + Parameters.modelVersion, + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ModelCapacityListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/modelCapacities.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/modelCapacities.ts new file mode 100644 index 000000000000..da1e15efc500 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/modelCapacities.ts @@ -0,0 +1,195 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ModelCapacities } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import { + ModelCapacityListResultValueItem, + ModelCapacitiesListNextOptionalParams, + ModelCapacitiesListOptionalParams, + ModelCapacitiesListResponse, + ModelCapacitiesListNextResponse, +} from "../models"; + +/// +/** Class containing ModelCapacities operations. */ +export class ModelCapacitiesImpl implements ModelCapacities { + private readonly client: CognitiveServicesManagementClient; + + /** + * Initialize a new instance of the class ModelCapacities class. + * @param client Reference to the service client + */ + constructor(client: CognitiveServicesManagementClient) { + this.client = client; + } + + /** + * List ModelCapacities. + * @param modelFormat The format of the Model + * @param modelName The name of the Model + * @param modelVersion The version of the Model + * @param options The options parameters. + */ + public list( + modelFormat: string, + modelName: string, + modelVersion: string, + options?: ModelCapacitiesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + modelFormat, + modelName, + modelVersion, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + modelFormat, + modelName, + modelVersion, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + modelFormat: string, + modelName: string, + modelVersion: string, + options?: ModelCapacitiesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ModelCapacitiesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(modelFormat, modelName, modelVersion, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + modelFormat: string, + modelName: string, + modelVersion: string, + options?: ModelCapacitiesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + modelFormat, + modelName, + modelVersion, + options, + )) { + yield* page; + } + } + + /** + * List ModelCapacities. + * @param modelFormat The format of the Model + * @param modelName The name of the Model + * @param modelVersion The version of the Model + * @param options The options parameters. + */ + private _list( + modelFormat: string, + modelName: string, + modelVersion: string, + options?: ModelCapacitiesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { modelFormat, modelName, modelVersion, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ModelCapacitiesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/modelCapacities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ModelCapacityListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.modelFormat, + Parameters.modelName, + Parameters.modelVersion, + ], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ModelCapacityListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/models.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/models.ts index 77aef58beeb4..5b60bc519681 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/models.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/models.ts @@ -18,7 +18,7 @@ import { ModelsListNextOptionalParams, ModelsListOptionalParams, ModelsListResponse, - ModelsListNextResponse + ModelsListNextResponse, } from "../models"; /// @@ -41,7 +41,7 @@ export class ModelsImpl implements Models { */ public list( location: string, - options?: ModelsListOptionalParams + options?: ModelsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(location, options); return { @@ -56,14 +56,14 @@ export class ModelsImpl implements Models { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(location, options, settings); - } + }, }; } private async *listPagingPage( location: string, options?: ModelsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ModelsListResponse; let continuationToken = settings?.continuationToken; @@ -85,7 +85,7 @@ export class ModelsImpl implements Models { private async *listPagingAll( location: string, - options?: ModelsListOptionalParams + options?: ModelsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(location, options)) { yield* page; @@ -99,11 +99,11 @@ export class ModelsImpl implements Models { */ private _list( location: string, - options?: ModelsListOptionalParams + options?: ModelsListOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, options }, - listOperationSpec + listOperationSpec, ); } @@ -116,11 +116,11 @@ export class ModelsImpl implements Models { private _listNext( location: string, nextLink: string, - options?: ModelsListNextOptionalParams + options?: ModelsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -128,43 +128,42 @@ export class ModelsImpl implements Models { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/models", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/models", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ModelListResult + bodyMapper: Mappers.ModelListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ModelListResult + bodyMapper: Mappers.ModelListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.nextLink, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/networkSecurityPerimeterConfigurations.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/networkSecurityPerimeterConfigurations.ts new file mode 100644 index 000000000000..eac730db0ee3 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/networkSecurityPerimeterConfigurations.ts @@ -0,0 +1,372 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkSecurityPerimeterConfigurations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + NetworkSecurityPerimeterConfiguration, + NetworkSecurityPerimeterConfigurationsListNextOptionalParams, + NetworkSecurityPerimeterConfigurationsListOptionalParams, + NetworkSecurityPerimeterConfigurationsListResponse, + NetworkSecurityPerimeterConfigurationsGetOptionalParams, + NetworkSecurityPerimeterConfigurationsGetResponse, + NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + NetworkSecurityPerimeterConfigurationsReconcileResponse, + NetworkSecurityPerimeterConfigurationsListNextResponse, +} from "../models"; + +/// +/** Class containing NetworkSecurityPerimeterConfigurations operations. */ +export class NetworkSecurityPerimeterConfigurationsImpl + implements NetworkSecurityPerimeterConfigurations +{ + private readonly client: CognitiveServicesManagementClient; + + /** + * Initialize a new instance of the class NetworkSecurityPerimeterConfigurations class. + * @param client Reference to the service client + */ + constructor(client: CognitiveServicesManagementClient) { + this.client = client; + } + + /** + * Gets a list of NSP configurations for an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: NetworkSecurityPerimeterConfigurationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, accountName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Gets a list of NSP configurations for an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec, + ); + } + + /** + * Gets the specified NSP configurations for an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nspConfigurationName The name of the NSP Configuration. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + nspConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nspConfigurationName, options }, + getOperationSpec, + ); + } + + /** + * Reconcile the NSP configuration for an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nspConfigurationName The name of the NSP Configuration. + * @param options The options parameters. + */ + async beginReconcile( + resourceGroupName: string, + accountName: string, + nspConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + NetworkSecurityPerimeterConfigurationsReconcileResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, nspConfigurationName, options }, + spec: reconcileOperationSpec, + }); + const poller = await createHttpPoller< + NetworkSecurityPerimeterConfigurationsReconcileResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Reconcile the NSP configuration for an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nspConfigurationName The name of the NSP Configuration. + * @param options The options parameters. + */ + async beginReconcileAndWait( + resourceGroupName: string, + accountName: string, + nspConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise { + const poller = await this.beginReconcile( + resourceGroupName, + accountName, + nspConfigurationName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: NetworkSecurityPerimeterConfigurationsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/networkSecurityPerimeterConfigurations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/networkSecurityPerimeterConfigurations/{nspConfigurationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nspConfigurationName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const reconcileOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/networkSecurityPerimeterConfigurations/{nspConfigurationName}/reconcile", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration, + }, + 201: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration, + }, + 202: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration, + }, + 204: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nspConfigurationName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts index dbfe2ecc9bb2..8cd44eed2fa8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts @@ -18,7 +18,7 @@ import { OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse + OperationsListNextResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ public list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -54,13 +54,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +81,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -93,7 +93,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ private _list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,11 +105,11 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -121,29 +121,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts index 759419bef9c8..e96e65a2a562 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts @@ -14,7 +14,7 @@ import { CognitiveServicesManagementClient } from "../cognitiveServicesManagemen import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -25,12 +25,13 @@ import { PrivateEndpointConnection, PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, - PrivateEndpointConnectionsDeleteOptionalParams + PrivateEndpointConnectionsDeleteOptionalParams, } from "../models"; /** Class containing PrivateEndpointConnections operations. */ export class PrivateEndpointConnectionsImpl - implements PrivateEndpointConnections { + implements PrivateEndpointConnections +{ private readonly client: CognitiveServicesManagementClient; /** @@ -50,11 +51,11 @@ export class PrivateEndpointConnectionsImpl list( resourceGroupName: string, accountName: string, - options?: PrivateEndpointConnectionsListOptionalParams + options?: PrivateEndpointConnectionsListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, - listOperationSpec + listOperationSpec, ); } @@ -70,16 +71,16 @@ export class PrivateEndpointConnectionsImpl resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams + options?: PrivateEndpointConnectionsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, privateEndpointConnectionName, - options + options, }, - getOperationSpec + getOperationSpec, ); } @@ -98,7 +99,7 @@ export class PrivateEndpointConnectionsImpl accountName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -107,21 +108,20 @@ export class PrivateEndpointConnectionsImpl > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -130,8 +130,8 @@ export class PrivateEndpointConnectionsImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -139,8 +139,8 @@ export class PrivateEndpointConnectionsImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -151,16 +151,16 @@ export class PrivateEndpointConnectionsImpl accountName, privateEndpointConnectionName, properties, - options + options, }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< PrivateEndpointConnectionsCreateOrUpdateResponse, OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -181,14 +181,14 @@ export class PrivateEndpointConnectionsImpl accountName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, accountName, privateEndpointConnectionName, properties, - options + options, ); return poller.pollUntilDone(); } @@ -205,25 +205,24 @@ export class PrivateEndpointConnectionsImpl resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -232,8 +231,8 @@ export class PrivateEndpointConnectionsImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -241,8 +240,8 @@ export class PrivateEndpointConnectionsImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -252,13 +251,13 @@ export class PrivateEndpointConnectionsImpl resourceGroupName, accountName, privateEndpointConnectionName, - options + options, }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -276,13 +275,13 @@ export class PrivateEndpointConnectionsImpl resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, accountName, privateEndpointConnectionName, - options + options, ); return poller.pollUntilDone(); } @@ -291,38 +290,36 @@ export class PrivateEndpointConnectionsImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult + bodyMapper: Mappers.PrivateEndpointConnectionListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -330,31 +327,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 201: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 202: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 204: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.properties, queryParameters: [Parameters.apiVersion], @@ -363,15 +359,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "DELETE", responses: { 200: {}, @@ -379,8 +374,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -388,8 +383,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.subscriptionId, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts index df560f3e3a52..3e95afb14214 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts @@ -13,7 +13,7 @@ import * as Parameters from "../models/parameters"; import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; import { PrivateLinkResourcesListOptionalParams, - PrivateLinkResourcesListResponse + PrivateLinkResourcesListResponse, } from "../models"; /** Class containing PrivateLinkResources operations. */ @@ -37,11 +37,11 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { list( resourceGroupName: string, accountName: string, - options?: PrivateLinkResourcesListOptionalParams + options?: PrivateLinkResourcesListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, - listOperationSpec + listOperationSpec, ); } } @@ -49,24 +49,23 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateLinkResources", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateLinkResources", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult + bodyMapper: Mappers.PrivateLinkResourceListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.accountName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklistItems.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklistItems.ts new file mode 100644 index 000000000000..276494b3f577 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklistItems.ts @@ -0,0 +1,578 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { RaiBlocklistItems } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + RaiBlocklistItem, + RaiBlocklistItemsListNextOptionalParams, + RaiBlocklistItemsListOptionalParams, + RaiBlocklistItemsListResponse, + RaiBlocklistItemsGetOptionalParams, + RaiBlocklistItemsGetResponse, + RaiBlocklistItemsCreateOrUpdateOptionalParams, + RaiBlocklistItemsCreateOrUpdateResponse, + RaiBlocklistItemsDeleteOptionalParams, + RaiBlocklistItemsDeleteResponse, + RaiBlocklistItemBulkRequest, + RaiBlocklistItemsBatchAddOptionalParams, + RaiBlocklistItemsBatchAddResponse, + RaiBlocklistItemsBatchDeleteOptionalParams, + RaiBlocklistItemsListNextResponse, +} from "../models"; + +/// +/** Class containing RaiBlocklistItems operations. */ +export class RaiBlocklistItemsImpl implements RaiBlocklistItems { + private readonly client: CognitiveServicesManagementClient; + + /** + * Initialize a new instance of the class RaiBlocklistItems class. + * @param client Reference to the service client + */ + constructor(client: CognitiveServicesManagementClient) { + this.client = client; + } + + /** + * Gets the blocklist items associated with the custom blocklist. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistItemsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + accountName, + raiBlocklistName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + accountName, + raiBlocklistName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistItemsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: RaiBlocklistItemsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + accountName, + raiBlocklistName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + raiBlocklistName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistItemsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + raiBlocklistName, + options, + )) { + yield* page; + } + } + + /** + * Gets the blocklist items associated with the custom blocklist. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistItemsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, raiBlocklistName, options }, + listOperationSpec, + ); + } + + /** + * Gets the specified custom blocklist Item associated with the custom blocklist. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemName The name of the RaiBlocklist Item associated with the custom blocklist + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemName: string, + options?: RaiBlocklistItemsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + options, + }, + getOperationSpec, + ); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemName The name of the RaiBlocklist Item associated with the custom blocklist + * @param raiBlocklistItem Properties describing the custom blocklist. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemName: string, + raiBlocklistItem: RaiBlocklistItem, + options?: RaiBlocklistItemsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + raiBlocklistItem, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Deletes the specified blocklist Item associated with the custom blocklist. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemName The name of the RaiBlocklist Item associated with the custom blocklist + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemName: string, + options?: RaiBlocklistItemsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + RaiBlocklistItemsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + RaiBlocklistItemsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified blocklist Item associated with the custom blocklist. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemName The name of the RaiBlocklist Item associated with the custom blocklist + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemName: string, + options?: RaiBlocklistItemsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Batch operation to add blocklist items. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItems Properties describing the custom blocklist items. + * @param options The options parameters. + */ + batchAdd( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItems: RaiBlocklistItemBulkRequest[], + options?: RaiBlocklistItemsBatchAddOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItems, + options, + }, + batchAddOperationSpec, + ); + } + + /** + * Batch operation to delete blocklist items. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemsNames List of RAI Blocklist Items Names. + * @param options The options parameters. + */ + batchDelete( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemsNames: string[], + options?: RaiBlocklistItemsBatchDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklistItemsNames, + options, + }, + batchDeleteOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + nextLink: string, + options?: RaiBlocklistItemsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, raiBlocklistName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiBlockListItemsResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiBlocklistName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiBlocklistItem, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiBlocklistName, + Parameters.raiBlocklistItemName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.RaiBlocklistItem, + }, + 201: { + bodyMapper: Mappers.RaiBlocklistItem, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.raiBlocklistItem, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiBlocklistName, + Parameters.raiBlocklistItemName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.RaiBlocklistItemsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.RaiBlocklistItemsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.RaiBlocklistItemsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.RaiBlocklistItemsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiBlocklistName, + Parameters.raiBlocklistItemName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const batchAddOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/addRaiBlocklistItems", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.RaiBlocklist, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.raiBlocklistItems, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiBlocklistName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const batchDeleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/deleteRaiBlocklistItems", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.raiBlocklistItemsNames, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiBlocklistName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiBlockListItemsResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.raiBlocklistName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklists.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklists.ts new file mode 100644 index 000000000000..07b9614fa442 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklists.ts @@ -0,0 +1,426 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { RaiBlocklists } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + RaiBlocklist, + RaiBlocklistsListNextOptionalParams, + RaiBlocklistsListOptionalParams, + RaiBlocklistsListResponse, + RaiBlocklistsGetOptionalParams, + RaiBlocklistsGetResponse, + RaiBlocklistsCreateOrUpdateOptionalParams, + RaiBlocklistsCreateOrUpdateResponse, + RaiBlocklistsDeleteOptionalParams, + RaiBlocklistsDeleteResponse, + RaiBlocklistsListNextResponse, +} from "../models"; + +/// +/** Class containing RaiBlocklists operations. */ +export class RaiBlocklistsImpl implements RaiBlocklists { + private readonly client: CognitiveServicesManagementClient; + + /** + * Initialize a new instance of the class RaiBlocklists class. + * @param client Reference to the service client + */ + constructor(client: CognitiveServicesManagementClient) { + this.client = client; + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: RaiBlocklistsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: RaiBlocklistsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: RaiBlocklistsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, accountName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: RaiBlocklistsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: RaiBlocklistsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec, + ); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, raiBlocklistName, options }, + getOperationSpec, + ); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklist Properties describing the custom blocklist. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklist: RaiBlocklist, + options?: RaiBlocklistsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + raiBlocklistName, + raiBlocklist, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + RaiBlocklistsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, raiBlocklistName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + RaiBlocklistsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + raiBlocklistName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: RaiBlocklistsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiBlockListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiBlocklist, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiBlocklistName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.RaiBlocklist, + }, + 201: { + bodyMapper: Mappers.RaiBlocklist, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.raiBlocklist, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiBlocklistName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.RaiBlocklistsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.RaiBlocklistsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.RaiBlocklistsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.RaiBlocklistsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiBlocklistName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiBlockListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiContentFilters.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiContentFilters.ts new file mode 100644 index 000000000000..10ff7e1d8bfc --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiContentFilters.ts @@ -0,0 +1,209 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { RaiContentFilters } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import { + RaiContentFilter, + RaiContentFiltersListNextOptionalParams, + RaiContentFiltersListOptionalParams, + RaiContentFiltersListResponse, + RaiContentFiltersGetOptionalParams, + RaiContentFiltersGetResponse, + RaiContentFiltersListNextResponse, +} from "../models"; + +/// +/** Class containing RaiContentFilters operations. */ +export class RaiContentFiltersImpl implements RaiContentFilters { + private readonly client: CognitiveServicesManagementClient; + + /** + * Initialize a new instance of the class RaiContentFilters class. + * @param client Reference to the service client + */ + constructor(client: CognitiveServicesManagementClient) { + this.client = client; + } + + /** + * List Content Filters types. + * @param location Resource location. + * @param options The options parameters. + */ + public list( + location: string, + options?: RaiContentFiltersListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(location, options, settings); + }, + }; + } + + private async *listPagingPage( + location: string, + options?: RaiContentFiltersListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: RaiContentFiltersListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + location: string, + options?: RaiContentFiltersListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + + /** + * List Content Filters types. + * @param location Resource location. + * @param options The options parameters. + */ + private _list( + location: string, + options?: RaiContentFiltersListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listOperationSpec, + ); + } + + /** + * Get Content Filters by Name. + * @param location Resource location. + * @param filterName The name of the RAI Content Filter. + * @param options The options parameters. + */ + get( + location: string, + filterName: string, + options?: RaiContentFiltersGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, filterName, options }, + getOperationSpec, + ); + } + + /** + * ListNext + * @param location Resource location. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + location: string, + nextLink: string, + options?: RaiContentFiltersListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/raiContentFilters", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiContentFilterListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/raiContentFilters/{filterName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiContentFilter, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.filterName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiContentFilterListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiPolicies.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiPolicies.ts new file mode 100644 index 000000000000..6925efc5ea42 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiPolicies.ts @@ -0,0 +1,420 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { RaiPolicies } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + RaiPolicy, + RaiPoliciesListNextOptionalParams, + RaiPoliciesListOptionalParams, + RaiPoliciesListResponse, + RaiPoliciesGetOptionalParams, + RaiPoliciesGetResponse, + RaiPoliciesCreateOrUpdateOptionalParams, + RaiPoliciesCreateOrUpdateResponse, + RaiPoliciesDeleteOptionalParams, + RaiPoliciesDeleteResponse, + RaiPoliciesListNextResponse, +} from "../models"; + +/// +/** Class containing RaiPolicies operations. */ +export class RaiPoliciesImpl implements RaiPolicies { + private readonly client: CognitiveServicesManagementClient; + + /** + * Initialize a new instance of the class RaiPolicies class. + * @param client Reference to the service client + */ + constructor(client: CognitiveServicesManagementClient) { + this.client = client; + } + + /** + * Gets the content filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: RaiPoliciesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: RaiPoliciesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: RaiPoliciesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, accountName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: RaiPoliciesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Gets the content filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: RaiPoliciesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec, + ); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + raiPolicyName: string, + options?: RaiPoliciesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, raiPolicyName, options }, + getOperationSpec, + ); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account + * @param raiPolicy Properties describing the Content Filters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + raiPolicyName: string, + raiPolicy: RaiPolicy, + options?: RaiPoliciesCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, raiPolicyName, raiPolicy, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + raiPolicyName: string, + options?: RaiPoliciesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + RaiPoliciesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, raiPolicyName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + RaiPoliciesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + raiPolicyName: string, + options?: RaiPoliciesDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + raiPolicyName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: RaiPoliciesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiPolicyListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiPolicy, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiPolicyName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.RaiPolicy, + }, + 201: { + bodyMapper: Mappers.RaiPolicy, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.raiPolicy, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiPolicyName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.RaiPoliciesDeleteHeaders, + }, + 201: { + headersMapper: Mappers.RaiPoliciesDeleteHeaders, + }, + 202: { + headersMapper: Mappers.RaiPoliciesDeleteHeaders, + }, + 204: { + headersMapper: Mappers.RaiPoliciesDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.raiPolicyName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RaiPolicyListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts index 89446e18c6b6..7bd85291ad33 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts @@ -18,7 +18,7 @@ import { ResourceSkusListNextOptionalParams, ResourceSkusListOptionalParams, ResourceSkusListResponse, - ResourceSkusListNextResponse + ResourceSkusListNextResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export class ResourceSkusImpl implements ResourceSkus { * @param options The options parameters. */ public list( - options?: ResourceSkusListOptionalParams + options?: ResourceSkusListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -54,13 +54,13 @@ export class ResourceSkusImpl implements ResourceSkus { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: ResourceSkusListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ResourceSkusListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +81,7 @@ export class ResourceSkusImpl implements ResourceSkus { } private async *listPagingAll( - options?: ResourceSkusListOptionalParams + options?: ResourceSkusListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -93,7 +93,7 @@ export class ResourceSkusImpl implements ResourceSkus { * @param options The options parameters. */ private _list( - options?: ResourceSkusListOptionalParams + options?: ResourceSkusListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,11 +105,11 @@ export class ResourceSkusImpl implements ResourceSkus { */ private _listNext( nextLink: string, - options?: ResourceSkusListNextOptionalParams + options?: ResourceSkusListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -117,38 +117,37 @@ export class ResourceSkusImpl implements ResourceSkus { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/skus", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/skus", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceSkuListResult + bodyMapper: Mappers.ResourceSkuListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceSkuListResult + bodyMapper: Mappers.ResourceSkuListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/usages.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/usages.ts index ec10148fc5ef..0b9d0b08327c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/usages.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/usages.ts @@ -18,7 +18,7 @@ import { UsagesListNextOptionalParams, UsagesListOptionalParams, UsagesListResponse, - UsagesListNextResponse + UsagesListNextResponse, } from "../models"; /// @@ -41,7 +41,7 @@ export class UsagesImpl implements Usages { */ public list( location: string, - options?: UsagesListOptionalParams + options?: UsagesListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(location, options); return { @@ -56,14 +56,14 @@ export class UsagesImpl implements Usages { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(location, options, settings); - } + }, }; } private async *listPagingPage( location: string, options?: UsagesListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: UsagesListResponse; let continuationToken = settings?.continuationToken; @@ -85,7 +85,7 @@ export class UsagesImpl implements Usages { private async *listPagingAll( location: string, - options?: UsagesListOptionalParams + options?: UsagesListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(location, options)) { yield* page; @@ -99,11 +99,11 @@ export class UsagesImpl implements Usages { */ private _list( location: string, - options?: UsagesListOptionalParams + options?: UsagesListOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, options }, - listOperationSpec + listOperationSpec, ); } @@ -116,11 +116,11 @@ export class UsagesImpl implements Usages { private _listNext( location: string, nextLink: string, - options?: UsagesListNextOptionalParams + options?: UsagesListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -128,43 +128,42 @@ export class UsagesImpl implements Usages { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/usages", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/usages", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.UsageListResult + bodyMapper: Mappers.UsageListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.UsageListResult + bodyMapper: Mappers.UsageListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.nextLink, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/accounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/accounts.ts index cc8efb0dd054..a4b971be0ed6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/accounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/accounts.ts @@ -29,7 +29,7 @@ import { AccountsListSkusOptionalParams, AccountsListSkusResponse, AccountsListUsagesOptionalParams, - AccountsListUsagesResponse + AccountsListUsagesResponse, } from "../models"; /// @@ -42,14 +42,14 @@ export interface Accounts { */ listByResourceGroup( resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams + options?: AccountsListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Returns all the resources of a particular type belonging to a subscription. * @param options The options parameters. */ list( - options?: AccountsListOptionalParams + options?: AccountsListOptionalParams, ): PagedAsyncIterableIterator; /** * List available Models for the requested Cognitive Services account @@ -60,7 +60,7 @@ export interface Accounts { listModels( resourceGroupName: string, accountName: string, - options?: AccountsListModelsOptionalParams + options?: AccountsListModelsOptionalParams, ): PagedAsyncIterableIterator; /** * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the @@ -74,7 +74,7 @@ export interface Accounts { resourceGroupName: string, accountName: string, account: Account, - options?: AccountsCreateOptionalParams + options?: AccountsCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -93,7 +93,7 @@ export interface Accounts { resourceGroupName: string, accountName: string, account: Account, - options?: AccountsCreateOptionalParams + options?: AccountsCreateOptionalParams, ): Promise; /** * Updates a Cognitive Services account @@ -106,7 +106,7 @@ export interface Accounts { resourceGroupName: string, accountName: string, account: Account, - options?: AccountsUpdateOptionalParams + options?: AccountsUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -124,7 +124,7 @@ export interface Accounts { resourceGroupName: string, accountName: string, account: Account, - options?: AccountsUpdateOptionalParams + options?: AccountsUpdateOptionalParams, ): Promise; /** * Deletes a Cognitive Services account from the resource group. @@ -135,7 +135,7 @@ export interface Accounts { beginDelete( resourceGroupName: string, accountName: string, - options?: AccountsDeleteOptionalParams + options?: AccountsDeleteOptionalParams, ): Promise, void>>; /** * Deletes a Cognitive Services account from the resource group. @@ -146,7 +146,7 @@ export interface Accounts { beginDeleteAndWait( resourceGroupName: string, accountName: string, - options?: AccountsDeleteOptionalParams + options?: AccountsDeleteOptionalParams, ): Promise; /** * Returns a Cognitive Services account specified by the parameters. @@ -157,7 +157,7 @@ export interface Accounts { get( resourceGroupName: string, accountName: string, - options?: AccountsGetOptionalParams + options?: AccountsGetOptionalParams, ): Promise; /** * Lists the account keys for the specified Cognitive Services account. @@ -168,7 +168,7 @@ export interface Accounts { listKeys( resourceGroupName: string, accountName: string, - options?: AccountsListKeysOptionalParams + options?: AccountsListKeysOptionalParams, ): Promise; /** * Regenerates the specified account key for the specified Cognitive Services account. @@ -181,7 +181,7 @@ export interface Accounts { resourceGroupName: string, accountName: string, keyName: KeyName, - options?: AccountsRegenerateKeyOptionalParams + options?: AccountsRegenerateKeyOptionalParams, ): Promise; /** * List available SKUs for the requested Cognitive Services account @@ -192,7 +192,7 @@ export interface Accounts { listSkus( resourceGroupName: string, accountName: string, - options?: AccountsListSkusOptionalParams + options?: AccountsListSkusOptionalParams, ): Promise; /** * Get usages for the requested Cognitive Services account @@ -203,6 +203,6 @@ export interface Accounts { listUsages( resourceGroupName: string, accountName: string, - options?: AccountsListUsagesOptionalParams + options?: AccountsListUsagesOptionalParams, ): Promise; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentPlans.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentPlans.ts index 89fe161fd982..95e8757ac336 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentPlans.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentPlans.ts @@ -32,7 +32,7 @@ import { CommitmentPlansGetAssociationResponse, CommitmentPlansCreateOrUpdateAssociationOptionalParams, CommitmentPlansCreateOrUpdateAssociationResponse, - CommitmentPlansDeleteAssociationOptionalParams + CommitmentPlansDeleteAssociationOptionalParams, } from "../models"; /// @@ -47,7 +47,7 @@ export interface CommitmentPlans { list( resourceGroupName: string, accountName: string, - options?: CommitmentPlansListOptionalParams + options?: CommitmentPlansListOptionalParams, ): PagedAsyncIterableIterator; /** * Returns all the resources of a particular type belonging to a resource group @@ -56,14 +56,14 @@ export interface CommitmentPlans { */ listPlansByResourceGroup( resourceGroupName: string, - options?: CommitmentPlansListPlansByResourceGroupOptionalParams + options?: CommitmentPlansListPlansByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Returns all the resources of a particular type belonging to a subscription. * @param options The options parameters. */ listPlansBySubscription( - options?: CommitmentPlansListPlansBySubscriptionOptionalParams + options?: CommitmentPlansListPlansBySubscriptionOptionalParams, ): PagedAsyncIterableIterator; /** * Gets the associations of the Cognitive Services commitment plan. @@ -75,7 +75,7 @@ export interface CommitmentPlans { listAssociations( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansListAssociationsOptionalParams + options?: CommitmentPlansListAssociationsOptionalParams, ): PagedAsyncIterableIterator; /** * Gets the specified commitmentPlans associated with the Cognitive Services account. @@ -89,7 +89,7 @@ export interface CommitmentPlans { resourceGroupName: string, accountName: string, commitmentPlanName: string, - options?: CommitmentPlansGetOptionalParams + options?: CommitmentPlansGetOptionalParams, ): Promise; /** * Update the state of specified commitmentPlans associated with the Cognitive Services account. @@ -105,7 +105,7 @@ export interface CommitmentPlans { accountName: string, commitmentPlanName: string, commitmentPlan: CommitmentPlan, - options?: CommitmentPlansCreateOrUpdateOptionalParams + options?: CommitmentPlansCreateOrUpdateOptionalParams, ): Promise; /** * Deletes the specified commitmentPlan associated with the Cognitive Services account. @@ -119,7 +119,7 @@ export interface CommitmentPlans { resourceGroupName: string, accountName: string, commitmentPlanName: string, - options?: CommitmentPlansDeleteOptionalParams + options?: CommitmentPlansDeleteOptionalParams, ): Promise, void>>; /** * Deletes the specified commitmentPlan associated with the Cognitive Services account. @@ -133,7 +133,7 @@ export interface CommitmentPlans { resourceGroupName: string, accountName: string, commitmentPlanName: string, - options?: CommitmentPlansDeleteOptionalParams + options?: CommitmentPlansDeleteOptionalParams, ): Promise; /** * Create Cognitive Services commitment plan. @@ -147,7 +147,7 @@ export interface CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlan: CommitmentPlan, - options?: CommitmentPlansCreateOrUpdatePlanOptionalParams + options?: CommitmentPlansCreateOrUpdatePlanOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -166,7 +166,7 @@ export interface CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlan: CommitmentPlan, - options?: CommitmentPlansCreateOrUpdatePlanOptionalParams + options?: CommitmentPlansCreateOrUpdatePlanOptionalParams, ): Promise; /** * Create Cognitive Services commitment plan. @@ -180,7 +180,7 @@ export interface CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlan: PatchResourceTagsAndSku, - options?: CommitmentPlansUpdatePlanOptionalParams + options?: CommitmentPlansUpdatePlanOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -199,7 +199,7 @@ export interface CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlan: PatchResourceTagsAndSku, - options?: CommitmentPlansUpdatePlanOptionalParams + options?: CommitmentPlansUpdatePlanOptionalParams, ): Promise; /** * Deletes a Cognitive Services commitment plan from the resource group. @@ -211,7 +211,7 @@ export interface CommitmentPlans { beginDeletePlan( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansDeletePlanOptionalParams + options?: CommitmentPlansDeletePlanOptionalParams, ): Promise, void>>; /** * Deletes a Cognitive Services commitment plan from the resource group. @@ -223,7 +223,7 @@ export interface CommitmentPlans { beginDeletePlanAndWait( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansDeletePlanOptionalParams + options?: CommitmentPlansDeletePlanOptionalParams, ): Promise; /** * Returns a Cognitive Services commitment plan specified by the parameters. @@ -235,7 +235,7 @@ export interface CommitmentPlans { getPlan( resourceGroupName: string, commitmentPlanName: string, - options?: CommitmentPlansGetPlanOptionalParams + options?: CommitmentPlansGetPlanOptionalParams, ): Promise; /** * Gets the association of the Cognitive Services commitment plan. @@ -250,7 +250,7 @@ export interface CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlanAssociationName: string, - options?: CommitmentPlansGetAssociationOptionalParams + options?: CommitmentPlansGetAssociationOptionalParams, ): Promise; /** * Create or update the association of the Cognitive Services commitment plan. @@ -267,7 +267,7 @@ export interface CommitmentPlans { commitmentPlanName: string, commitmentPlanAssociationName: string, association: CommitmentPlanAccountAssociation, - options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams + options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -289,7 +289,7 @@ export interface CommitmentPlans { commitmentPlanName: string, commitmentPlanAssociationName: string, association: CommitmentPlanAccountAssociation, - options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams + options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams, ): Promise; /** * Deletes the association of the Cognitive Services commitment plan. @@ -304,7 +304,7 @@ export interface CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlanAssociationName: string, - options?: CommitmentPlansDeleteAssociationOptionalParams + options?: CommitmentPlansDeleteAssociationOptionalParams, ): Promise, void>>; /** * Deletes the association of the Cognitive Services commitment plan. @@ -319,6 +319,6 @@ export interface CommitmentPlans { resourceGroupName: string, commitmentPlanName: string, commitmentPlanAssociationName: string, - options?: CommitmentPlansDeleteAssociationOptionalParams + options?: CommitmentPlansDeleteAssociationOptionalParams, ): Promise; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentTiers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentTiers.ts index 4fa258a3ba24..0fd1639b5160 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentTiers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentTiers.ts @@ -19,6 +19,6 @@ export interface CommitmentTiers { */ list( location: string, - options?: CommitmentTiersListOptionalParams + options?: CommitmentTiersListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/defenderForAISettings.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/defenderForAISettings.ts new file mode 100644 index 000000000000..a6d4ae17e7eb --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/defenderForAISettings.ts @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DefenderForAISetting, + DefenderForAISettingsListOptionalParams, + DefenderForAISettingsGetOptionalParams, + DefenderForAISettingsGetResponse, + DefenderForAISettingsCreateOrUpdateOptionalParams, + DefenderForAISettingsCreateOrUpdateResponse, + DefenderForAISettingsUpdateOptionalParams, + DefenderForAISettingsUpdateResponse, +} from "../models"; + +/// +/** Interface representing a DefenderForAISettings. */ +export interface DefenderForAISettings { + /** + * Lists the Defender for AI settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: DefenderForAISettingsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the specified Defender for AI setting by name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param defenderForAISettingName The name of the defender for AI setting. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + defenderForAISettingName: string, + options?: DefenderForAISettingsGetOptionalParams, + ): Promise; + /** + * Creates or Updates the specified Defender for AI setting. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param defenderForAISettingName The name of the defender for AI setting. + * @param defenderForAISettings Properties describing the Defender for AI setting. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + defenderForAISettingName: string, + defenderForAISettings: DefenderForAISetting, + options?: DefenderForAISettingsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Updates the specified Defender for AI setting. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param defenderForAISettingName The name of the defender for AI setting. + * @param defenderForAISettings Properties describing the Defender for AI setting. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + accountName: string, + defenderForAISettingName: string, + defenderForAISettings: DefenderForAISetting, + options?: DefenderForAISettingsUpdateOptionalParams, + ): Promise; +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deletedAccounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deletedAccounts.ts index 734a023282a6..95c9ba43af09 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deletedAccounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deletedAccounts.ts @@ -13,7 +13,7 @@ import { DeletedAccountsListOptionalParams, DeletedAccountsGetOptionalParams, DeletedAccountsGetResponse, - DeletedAccountsPurgeOptionalParams + DeletedAccountsPurgeOptionalParams, } from "../models"; /// @@ -24,7 +24,7 @@ export interface DeletedAccounts { * @param options The options parameters. */ list( - options?: DeletedAccountsListOptionalParams + options?: DeletedAccountsListOptionalParams, ): PagedAsyncIterableIterator; /** * Returns a Cognitive Services account specified by the parameters. @@ -37,7 +37,7 @@ export interface DeletedAccounts { location: string, resourceGroupName: string, accountName: string, - options?: DeletedAccountsGetOptionalParams + options?: DeletedAccountsGetOptionalParams, ): Promise; /** * Deletes a Cognitive Services account from the resource group. @@ -50,7 +50,7 @@ export interface DeletedAccounts { location: string, resourceGroupName: string, accountName: string, - options?: DeletedAccountsPurgeOptionalParams + options?: DeletedAccountsPurgeOptionalParams, ): Promise, void>>; /** * Deletes a Cognitive Services account from the resource group. @@ -63,6 +63,6 @@ export interface DeletedAccounts { location: string, resourceGroupName: string, accountName: string, - options?: DeletedAccountsPurgeOptionalParams + options?: DeletedAccountsPurgeOptionalParams, ): Promise; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deployments.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deployments.ts index a5aaae0be728..e03d9a5780c3 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deployments.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deployments.ts @@ -11,11 +11,16 @@ import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Deployment, DeploymentsListOptionalParams, + SkuResource, + DeploymentsListSkusOptionalParams, DeploymentsGetOptionalParams, DeploymentsGetResponse, DeploymentsCreateOrUpdateOptionalParams, DeploymentsCreateOrUpdateResponse, - DeploymentsDeleteOptionalParams + PatchResourceTagsAndSku, + DeploymentsUpdateOptionalParams, + DeploymentsUpdateResponse, + DeploymentsDeleteOptionalParams, } from "../models"; /// @@ -30,8 +35,21 @@ export interface Deployments { list( resourceGroupName: string, accountName: string, - options?: DeploymentsListOptionalParams + options?: DeploymentsListOptionalParams, ): PagedAsyncIterableIterator; + /** + * Lists the specified deployments skus associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param deploymentName The name of the deployment associated with the Cognitive Services Account + * @param options The options parameters. + */ + listSkus( + resourceGroupName: string, + accountName: string, + deploymentName: string, + options?: DeploymentsListSkusOptionalParams, + ): PagedAsyncIterableIterator; /** * Gets the specified deployments associated with the Cognitive Services account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,7 +61,7 @@ export interface Deployments { resourceGroupName: string, accountName: string, deploymentName: string, - options?: DeploymentsGetOptionalParams + options?: DeploymentsGetOptionalParams, ): Promise; /** * Update the state of specified deployments associated with the Cognitive Services account. @@ -58,7 +76,7 @@ export interface Deployments { accountName: string, deploymentName: string, deployment: Deployment, - options?: DeploymentsCreateOrUpdateOptionalParams + options?: DeploymentsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -78,8 +96,43 @@ export interface Deployments { accountName: string, deploymentName: string, deployment: Deployment, - options?: DeploymentsCreateOrUpdateOptionalParams + options?: DeploymentsCreateOrUpdateOptionalParams, ): Promise; + /** + * Update specified deployments associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param deploymentName The name of the deployment associated with the Cognitive Services Account + * @param deployment The deployment properties. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + deploymentName: string, + deployment: PatchResourceTagsAndSku, + options?: DeploymentsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + DeploymentsUpdateResponse + > + >; + /** + * Update specified deployments associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param deploymentName The name of the deployment associated with the Cognitive Services Account + * @param deployment The deployment properties. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + deploymentName: string, + deployment: PatchResourceTagsAndSku, + options?: DeploymentsUpdateOptionalParams, + ): Promise; /** * Deletes the specified deployment associated with the Cognitive Services account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -91,7 +144,7 @@ export interface Deployments { resourceGroupName: string, accountName: string, deploymentName: string, - options?: DeploymentsDeleteOptionalParams + options?: DeploymentsDeleteOptionalParams, ): Promise, void>>; /** * Deletes the specified deployment associated with the Cognitive Services account. @@ -104,6 +157,6 @@ export interface Deployments { resourceGroupName: string, accountName: string, deploymentName: string, - options?: DeploymentsDeleteOptionalParams + options?: DeploymentsDeleteOptionalParams, ): Promise; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/encryptionScopes.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/encryptionScopes.ts new file mode 100644 index 000000000000..6eddc917938d --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/encryptionScopes.ts @@ -0,0 +1,99 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + EncryptionScope, + EncryptionScopesListOptionalParams, + EncryptionScopesGetOptionalParams, + EncryptionScopesGetResponse, + EncryptionScopesCreateOrUpdateOptionalParams, + EncryptionScopesCreateOrUpdateResponse, + EncryptionScopesDeleteOptionalParams, + EncryptionScopesDeleteResponse, +} from "../models"; + +/// +/** Interface representing a EncryptionScopes. */ +export interface EncryptionScopes { + /** + * Gets the content filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: EncryptionScopesListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the specified EncryptionScope associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param encryptionScopeName The name of the encryptionScope associated with the Cognitive Services + * Account + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + encryptionScopeName: string, + options?: EncryptionScopesGetOptionalParams, + ): Promise; + /** + * Update the state of specified encryptionScope associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param encryptionScopeName The name of the encryptionScope associated with the Cognitive Services + * Account + * @param encryptionScope The encryptionScope properties. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + encryptionScopeName: string, + encryptionScope: EncryptionScope, + options?: EncryptionScopesCreateOrUpdateOptionalParams, + ): Promise; + /** + * Deletes the specified encryptionScope associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param encryptionScopeName The name of the encryptionScope associated with the Cognitive Services + * Account + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + encryptionScopeName: string, + options?: EncryptionScopesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + EncryptionScopesDeleteResponse + > + >; + /** + * Deletes the specified encryptionScope associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param encryptionScopeName The name of the encryptionScope associated with the Cognitive Services + * Account + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + encryptionScopeName: string, + options?: EncryptionScopesDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/index.ts index c3aa6d8c5dcd..17996d460adc 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/index.ts @@ -13,7 +13,16 @@ export * from "./usages"; export * from "./operations"; export * from "./commitmentTiers"; export * from "./models"; +export * from "./locationBasedModelCapacities"; +export * from "./modelCapacities"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./deployments"; export * from "./commitmentPlans"; +export * from "./encryptionScopes"; +export * from "./raiPolicies"; +export * from "./raiBlocklists"; +export * from "./raiBlocklistItems"; +export * from "./raiContentFilters"; +export * from "./networkSecurityPerimeterConfigurations"; +export * from "./defenderForAISettings"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/locationBasedModelCapacities.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/locationBasedModelCapacities.ts new file mode 100644 index 000000000000..36725cb7a543 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/locationBasedModelCapacities.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ModelCapacityListResultValueItem, + LocationBasedModelCapacitiesListOptionalParams, +} from "../models"; + +/// +/** Interface representing a LocationBasedModelCapacities. */ +export interface LocationBasedModelCapacities { + /** + * List Location Based ModelCapacities. + * @param location Resource location. + * @param modelFormat The format of the Model + * @param modelName The name of the Model + * @param modelVersion The version of the Model + * @param options The options parameters. + */ + list( + location: string, + modelFormat: string, + modelName: string, + modelVersion: string, + options?: LocationBasedModelCapacitiesListOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/modelCapacities.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/modelCapacities.ts new file mode 100644 index 000000000000..083b55723c71 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/modelCapacities.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ModelCapacityListResultValueItem, + ModelCapacitiesListOptionalParams, +} from "../models"; + +/// +/** Interface representing a ModelCapacities. */ +export interface ModelCapacities { + /** + * List ModelCapacities. + * @param modelFormat The format of the Model + * @param modelName The name of the Model + * @param modelVersion The version of the Model + * @param options The options parameters. + */ + list( + modelFormat: string, + modelName: string, + modelVersion: string, + options?: ModelCapacitiesListOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/models.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/models.ts index 8d877f373b01..e068d3e9b962 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/models.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/models.ts @@ -19,6 +19,6 @@ export interface Models { */ list( location: string, - options?: ModelsListOptionalParams + options?: ModelsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts new file mode 100644 index 000000000000..13d2aee27add --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkSecurityPerimeterConfiguration, + NetworkSecurityPerimeterConfigurationsListOptionalParams, + NetworkSecurityPerimeterConfigurationsGetOptionalParams, + NetworkSecurityPerimeterConfigurationsGetResponse, + NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + NetworkSecurityPerimeterConfigurationsReconcileResponse, +} from "../models"; + +/// +/** Interface representing a NetworkSecurityPerimeterConfigurations. */ +export interface NetworkSecurityPerimeterConfigurations { + /** + * Gets a list of NSP configurations for an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the specified NSP configurations for an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nspConfigurationName The name of the NSP Configuration. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + nspConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams, + ): Promise; + /** + * Reconcile the NSP configuration for an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nspConfigurationName The name of the NSP Configuration. + * @param options The options parameters. + */ + beginReconcile( + resourceGroupName: string, + accountName: string, + nspConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + NetworkSecurityPerimeterConfigurationsReconcileResponse + > + >; + /** + * Reconcile the NSP configuration for an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param nspConfigurationName The name of the NSP Configuration. + * @param options The options parameters. + */ + beginReconcileAndWait( + resourceGroupName: string, + accountName: string, + nspConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise; +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/operations.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/operations.ts index 69234864c1e9..7e6f6f4ab337 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/operations.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/operations.ts @@ -17,6 +17,6 @@ export interface Operations { * @param options The options parameters. */ list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateEndpointConnections.ts index ea78dacbcad7..812ef256f956 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateEndpointConnections.ts @@ -15,7 +15,7 @@ import { PrivateEndpointConnection, PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, - PrivateEndpointConnectionsDeleteOptionalParams + PrivateEndpointConnectionsDeleteOptionalParams, } from "../models"; /** Interface representing a PrivateEndpointConnections. */ @@ -29,7 +29,7 @@ export interface PrivateEndpointConnections { list( resourceGroupName: string, accountName: string, - options?: PrivateEndpointConnectionsListOptionalParams + options?: PrivateEndpointConnectionsListOptionalParams, ): Promise; /** * Gets the specified private endpoint connection associated with the Cognitive Services account. @@ -43,7 +43,7 @@ export interface PrivateEndpointConnections { resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams + options?: PrivateEndpointConnectionsGetOptionalParams, ): Promise; /** * Update the state of specified private endpoint connection associated with the Cognitive Services @@ -60,7 +60,7 @@ export interface PrivateEndpointConnections { accountName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -82,7 +82,7 @@ export interface PrivateEndpointConnections { accountName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise; /** * Deletes the specified private endpoint connection associated with the Cognitive Services account. @@ -96,7 +96,7 @@ export interface PrivateEndpointConnections { resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise, void>>; /** * Deletes the specified private endpoint connection associated with the Cognitive Services account. @@ -110,6 +110,6 @@ export interface PrivateEndpointConnections { resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateLinkResources.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateLinkResources.ts index b43ba11d0b5d..8f2562c64719 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateLinkResources.ts @@ -8,7 +8,7 @@ import { PrivateLinkResourcesListOptionalParams, - PrivateLinkResourcesListResponse + PrivateLinkResourcesListResponse, } from "../models"; /** Interface representing a PrivateLinkResources. */ @@ -22,6 +22,6 @@ export interface PrivateLinkResources { list( resourceGroupName: string, accountName: string, - options?: PrivateLinkResourcesListOptionalParams + options?: PrivateLinkResourcesListOptionalParams, ): Promise; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklistItems.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklistItems.ts new file mode 100644 index 000000000000..f9da14cb3246 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklistItems.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + RaiBlocklistItem, + RaiBlocklistItemsListOptionalParams, + RaiBlocklistItemsGetOptionalParams, + RaiBlocklistItemsGetResponse, + RaiBlocklistItemsCreateOrUpdateOptionalParams, + RaiBlocklistItemsCreateOrUpdateResponse, + RaiBlocklistItemsDeleteOptionalParams, + RaiBlocklistItemsDeleteResponse, + RaiBlocklistItemBulkRequest, + RaiBlocklistItemsBatchAddOptionalParams, + RaiBlocklistItemsBatchAddResponse, + RaiBlocklistItemsBatchDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a RaiBlocklistItems. */ +export interface RaiBlocklistItems { + /** + * Gets the blocklist items associated with the custom blocklist. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistItemsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the specified custom blocklist Item associated with the custom blocklist. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemName The name of the RaiBlocklist Item associated with the custom blocklist + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemName: string, + options?: RaiBlocklistItemsGetOptionalParams, + ): Promise; + /** + * Update the state of specified blocklist item associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemName The name of the RaiBlocklist Item associated with the custom blocklist + * @param raiBlocklistItem Properties describing the custom blocklist. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemName: string, + raiBlocklistItem: RaiBlocklistItem, + options?: RaiBlocklistItemsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Deletes the specified blocklist Item associated with the custom blocklist. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemName The name of the RaiBlocklist Item associated with the custom blocklist + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemName: string, + options?: RaiBlocklistItemsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + RaiBlocklistItemsDeleteResponse + > + >; + /** + * Deletes the specified blocklist Item associated with the custom blocklist. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemName The name of the RaiBlocklist Item associated with the custom blocklist + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemName: string, + options?: RaiBlocklistItemsDeleteOptionalParams, + ): Promise; + /** + * Batch operation to add blocklist items. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItems Properties describing the custom blocklist items. + * @param options The options parameters. + */ + batchAdd( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItems: RaiBlocklistItemBulkRequest[], + options?: RaiBlocklistItemsBatchAddOptionalParams, + ): Promise; + /** + * Batch operation to delete blocklist items. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklistItemsNames List of RAI Blocklist Items Names. + * @param options The options parameters. + */ + batchDelete( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklistItemsNames: string[], + options?: RaiBlocklistItemsBatchDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklists.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklists.ts new file mode 100644 index 000000000000..987f447f5b62 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklists.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + RaiBlocklist, + RaiBlocklistsListOptionalParams, + RaiBlocklistsGetOptionalParams, + RaiBlocklistsGetResponse, + RaiBlocklistsCreateOrUpdateOptionalParams, + RaiBlocklistsCreateOrUpdateResponse, + RaiBlocklistsDeleteOptionalParams, + RaiBlocklistsDeleteResponse, +} from "../models"; + +/// +/** Interface representing a RaiBlocklists. */ +export interface RaiBlocklists { + /** + * Gets the custom blocklists associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: RaiBlocklistsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the specified custom blocklist associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistsGetOptionalParams, + ): Promise; + /** + * Update the state of specified blocklist associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param raiBlocklist Properties describing the custom blocklist. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + raiBlocklist: RaiBlocklist, + options?: RaiBlocklistsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + RaiBlocklistsDeleteResponse + > + >; + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + raiBlocklistName: string, + options?: RaiBlocklistsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiContentFilters.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiContentFilters.ts new file mode 100644 index 000000000000..3ef03551662a --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiContentFilters.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + RaiContentFilter, + RaiContentFiltersListOptionalParams, + RaiContentFiltersGetOptionalParams, + RaiContentFiltersGetResponse, +} from "../models"; + +/// +/** Interface representing a RaiContentFilters. */ +export interface RaiContentFilters { + /** + * List Content Filters types. + * @param location Resource location. + * @param options The options parameters. + */ + list( + location: string, + options?: RaiContentFiltersListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get Content Filters by Name. + * @param location Resource location. + * @param filterName The name of the RAI Content Filter. + * @param options The options parameters. + */ + get( + location: string, + filterName: string, + options?: RaiContentFiltersGetOptionalParams, + ): Promise; +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiPolicies.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiPolicies.ts new file mode 100644 index 000000000000..436a4e9c3a1d --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiPolicies.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + RaiPolicy, + RaiPoliciesListOptionalParams, + RaiPoliciesGetOptionalParams, + RaiPoliciesGetResponse, + RaiPoliciesCreateOrUpdateOptionalParams, + RaiPoliciesCreateOrUpdateResponse, + RaiPoliciesDeleteOptionalParams, + RaiPoliciesDeleteResponse, +} from "../models"; + +/// +/** Interface representing a RaiPolicies. */ +export interface RaiPolicies { + /** + * Gets the content filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: RaiPoliciesListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + raiPolicyName: string, + options?: RaiPoliciesGetOptionalParams, + ): Promise; + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account + * @param raiPolicy Properties describing the Content Filters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + accountName: string, + raiPolicyName: string, + raiPolicy: RaiPolicy, + options?: RaiPoliciesCreateOrUpdateOptionalParams, + ): Promise; + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + raiPolicyName: string, + options?: RaiPoliciesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + RaiPoliciesDeleteResponse + > + >; + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + raiPolicyName: string, + options?: RaiPoliciesDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/resourceSkus.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/resourceSkus.ts index e15d4756086b..97e00392fce2 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/resourceSkus.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/resourceSkus.ts @@ -17,6 +17,6 @@ export interface ResourceSkus { * @param options The options parameters. */ list( - options?: ResourceSkusListOptionalParams + options?: ResourceSkusListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/usages.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/usages.ts index f6c9919671a5..149a992347fc 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/usages.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/usages.ts @@ -19,6 +19,6 @@ export interface Usages { */ list( location: string, - options?: UsagesListOptionalParams + options?: UsagesListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/pagingHelper.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/pagingHelper.ts index 269a2b9814b5..205cccc26592 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/pagingHelper.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/pagingHelper.ts @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_openai.spec.ts b/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_openai.spec.ts index 1e44cc570bee..0d6f580cf231 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_openai.spec.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_openai.spec.ts @@ -34,7 +34,7 @@ export const testPollingOptions = { updateIntervalInMs: isPlaybackMode() ? 0 : undefined, }; -describe("CognitiveServices OpenAI test", () => { +describe.skip("CognitiveServices OpenAI test", () => { let recorder: Recorder; let subscriptionId: string; let client: CognitiveServicesManagementClient; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.json b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.json index 67e8e46df416..5403e932e732 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.json @@ -23,8 +23,8 @@ } }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", + "src/**/*.ts", + "test/**/*.ts", "samples-dev/**/*.ts" ], "exclude": [ From 18b489e32cd9e5511792b5553f9e189992b8f9a5 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:56:28 +0800 Subject: [PATCH 48/55] support Generate-code-from-TypeSpec doc in js sdk repo and update custonmization doc (#31949) fixes https://github.com/Azure/azure-sdk-for-js/issues/31670 --------- Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com> --- documentation/Generate-code-from-TypeSpec.md | 120 +++++++++++++++++++ documentation/RLC-customization.md | 9 +- documentation/steps-after-generations.md | 22 +++- 3 files changed, 142 insertions(+), 9 deletions(-) create mode 100644 documentation/Generate-code-from-TypeSpec.md diff --git a/documentation/Generate-code-from-TypeSpec.md b/documentation/Generate-code-from-TypeSpec.md new file mode 100644 index 000000000000..3bd14475eb2d --- /dev/null +++ b/documentation/Generate-code-from-TypeSpec.md @@ -0,0 +1,120 @@ +Getting Started: Generate JS SDK with TypeSpec +=========================================================================== + + +# Before you Start + +[TypeScript Azure SDK Design Guidelines](https://azure.github.io/azure-sdk/typescript_introduction.html) is the overall design guideline of the client SDK. + +## Prerequisites + +- [Node.js 18.x LTS](https://nodejs.org/en/download) or later +- [Git](https://git-scm.com/downloads) +- [azure-rest-api-specs repo](https://github.com/Azure/azure-rest-api-specs) +- [azure-sdk-for-js repo](https://github.com/Azure/azure-sdk-for-js/) + +# Generate SDK + +## Use TypeSpec defined in REST API specifications + +It is recommended to configure TypeSpec package on [REST API specifications](https://github.com/Azure/azure-rest-api-specs). Please refer to [these guidelines](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/typespec-structure-guidelines.md). + +### How to configure tspconfig.yaml +You can reference these two config files to configure the Modular or RLC package: +- [Modular tspconfig.yaml](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml) +- [RLC tspconfig.yaml](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/ai/Face/tspconfig.yaml) + +Please make sure `service-dir`, `package-dir`, `packageDetails`, `isModularLibrary`, `generateMetadata`, `flavor`(for typespec-ts) is correctly configured. `experimentalExtensibleEnums`, `enableOperationGroup`, `hierarchyClient` are the optional configs. +If you want to enable sample generation with typespec-ts, you should add +``` +generateSample:true +``` +in your tspconfig.yaml + + +- "parameters.service-dir.default" would be `sdk/` +- "options.@azure-tools/typespec-ts.package-dir" would be `` + +SDK module would be generated under the SDK project folder at `sdk//`. + +### Generate Code with code-gen-pipeline tool (recommend) +**Notice** These steps are to generate code using the local spec repo. If you want to generate code with the github url, please refer [Generate Code with tsp-client tool](#generate-code-with-tsp-client-tool) + +Install dependencies to use code-gen-pipeline, +```ps +npm install -g @azure-tools/typespec-client-generator-cli@0.14.1 +npm install -g @microsoft/rush@5.92.0 +npm install -g @azure-tools/js-sdk-release-tools +``` + +Create a local json file named generatedInput.json with content similar to that shown below +``` + { + "dryRun": false, + "specFolder": , + "headSha": , + "repoHttpsUrl": "https://github.com/Azure/azure-rest-api-specs", + "relatedTypeSpecProjectFolder": [ + "specification/SERVICE_DIRECTORY_NAME/PACKAGE_DIRECTORY_NAME/" + ] + } +``` + +Run the command +``` +code-gen-pipeline --inputJsonPath= --outputJsonPath= --typespecEmitter=@azure-tools/typespec-ts --local +``` + +> path-to-generatedOutput.json is the detailed information of generated package, you can ignore it without pipeline. [generateOutput.json](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/sdkautomation/GenerateOutputSchema.json) is to show us the location of generated artifact and any other messages. + +This command will automatically: +1. Generate package code with TypeSpec. +2. Build the package. +3. Generate and run tests (optional, with warnings displayed if they fail). +4. Generate samples, if enabled. +5. Create or update the `CHANGELOG.md`. +6. Bump the version according to the Azure SDK for JS policy. +7. If this is a new package, add it to the project items in `rush.json`. +8. Generate or update `ci.mgmt.yml` or `ci.yml` (if the package is new). + + +### Generate Code with tsp-client tool +> To reduce workload and unnecessary mistakes, it is recommended to use the simple method from the previous section. Only if you are clear about what you are doing and the method from the previous section does not meet your needs, should you consider using the method below. + +Install `tsp-client` CLI tool + +```ps +npm install -g @azure-tools/typespec-client-generator-cli@0.14.1 +``` + +For initial set up, from the root of the SDK repo, call + +``` +tsp-client init -c +``` + +For updating TypeSpec generated SDK, call below in the SDK module folder (`sdk//`) where `tsp-location.yaml` exists + +```ps +tsp-client update +``` + +**Notice** +If you use tsp-client to generate code and your generated SDK is new, you need to do two extra things: + +**1**: +You should add your new SDK in [rush.json](https://github.com/Azure/azure-sdk-for-js/blob/main/rush.json). +Here is the example of the config +``` +{ + "packageName": , + "projectFolder": />, + "versionPolicyName": <"management"-or-"client"> +} +``` + +**2**: You should add `ci.yml` or `ci.mgmt.yml` under `sdk//